MAXScript Online Reference

Welcome to the MAXScript Reference!

MAXScript is the built-in scripting language for Autodesk® 3ds Max®, Autodesk® 3ds Max® Design and Autodesk® VIZ.

If you have used MAXScript in previous versions of the software,

the following topics will give you an overview of the changes and additions to both the MAXScript language and the MAXScript Reference in 3ds Max 2009:

What is New in MAXScript in 3ds Max 2009

Documentation Changes in 3ds Max 2009

The following new index page provides links to all topics dealing with changes in MAXScript in previous versions: New in MAXScript

If you are new to MAXScript,

the following topics will provide information about the structure of this document and the concepts of the MAXScript scripting language.

See What is MAXScript? for a short overview of the areas MAXScript can enhance your workflow and productivity.

See MAXScript Overview for a more detailed introduction to the possibilities of MAXScript.

The following topics are an introduction to the MAXScript Reference:

Using the MAXScript Documentation

Syntax Definitions in This Document

Locating Information in this Help File

The following topics provide quick access to learning resources, tutorials and Frequently Asked Questions:

Learning MAXScript - Topics Index

MAXScript for New and Casual Users

How To - Tutorials

Frequently Asked Questions

Important

Because the functionality of MAXScript is almost identical for 3ds Max, 3ds Max Design and Autodesk VIZ, this reference refers to "3ds Max" to avoid using product names redundantly. Where applicable, it also notes specific differences between MAXScript for 3ds Max, 3ds Max Design and Autodesk VIZ. You must have a licensed copy of the other software product in order for the MAXScript functionality specific to that product to run as designed.

See also

Using the HTML Help Viewer


What is MAXScript?

MAXScript is the built-in scripting language of Autodesk® 3ds Max®, Autodesk® 3ds Max® Design and Autodesk® VIZ.

MAXScript provides users of these products with the ability to:

  • Script most aspects of the program's use, such as modeling, animation, materials, rendering, and so on.

  • Control the program interactively through the command-line Listener window.

  • Package scripts within custom Utility panel rollouts or modeless windows to give them a standard user interface.

  • Package scripts as macro scripts, and install these macro scripts as buttons in the product’s toolbars, as items in menus, or assign them to keyboard shortcuts.

  • Extend or replace the user interface for objects, modifiers, materials, textures, render effects, and atmospheric effects.

  • Build scripted plug-ins for custom mesh objects, modifiers, render effects and more.

  • Build custom import/export tools using ASCII and binary file I/O.

  • Write procedural controllers that can access the entire state of the scene.

  • Build batch-processing tools, such as batch-rendering scripts.

  • Set up live interfaces to external systems through OLE Automation.

  • Record your actions in the product as MAXScript commands.

  • Store scripts in scene files to run at each of the supported notification events, for example when a scene has been reset, a file has been opened or saved, rendering has been started or stopped, object selection has changed and so on.

See also

MAXScript Overview

General MAXScript Topics

MAXScript for New and Casual Users


MAXScript Overview

The MAXScript language is specifically designed to complement 3ds Max. It has many special features and constructs such as coordinate system contexts, object primitives and materials that mirror high-level concepts in the 3ds Max user-interface. It has an animation mode with automatic keyframing and access to scene objects using hierarchical path names that match the 3ds Max object hierarchy.

The MAXScript language syntax is simple enough for non-programmers, as it includes minimal punctuation and formatting rules. Coupled with the use of the command-line Listener window, the ability to install scripts as toolbar buttons, and the recording of user actions as MAXScript commands, MAXScript can be employed casually by the user while working in the 3ds Max point-and-click user interface.

MAXScript is rich enough to enable sophisticated programming tasks, with capabilities such as 3D vector, matrix, and quaternion algebra. MAXScript is well suited to working with large collections of objects; for example, making complex procedural selections, constructing random star fields, or placing objects in numerically precise patterns.

MAXScript integrates well into the 3ds Max user interface. MAXScript allows scripts to be packaged as Utility panel rollouts, as modeless windows, and as 3ds Max Action Items that can be used as toolbar buttons, menu and QuadMenu items, or as keyboard shortcuts. MAXScript can also be used to extend or replace the user interface for objects, modifiers, materials, textures, render effects, and atmospheric effects; or to create custom mesh objects, modifiers, and render effects. This allows job-specific tools to be scripted by the technical department and made available to artists and animators through standard 3ds Max point-and-click user interfaces.

MAXScript supports formatted text as well as binary data input and output, so it is possible to produce asset reports directly from 3ds Max scene files and read files containing scene layout, naming, texture details, and so on, exported from other project management software. The built-in access to external files and directories makes MAXScript perfectly well suited to perform general data collection and analysis and generate reports about data assets, rendered files etc. and interact with other applications or scripting languages via its built-in command line and shell support.

MAXScript can also be used as a high-level scene import utility. By outputting MAXScript scripts containing object creation commands, it is possible for other programs and packages to export directly using any of the high-level 3ds Max constructs. Taking it even further, MAXScript could be even used to bridge the gap between newer and older 3ds Max versions without resorting to 3rd party data formats.

See also

MAXScript for New and Casual Users

Learning MAXScript

Frequently Asked Questions


The SDK and MAXScript

3ds Max gives you two ways to write plug-in applications: the SDK, which uses C++, and MAXScript, the program's native scripting language. Which language you choose depends partly on how you want to work, and partly on what you want your plug-in to accomplish. Both languages have their strengths and limitations, but you can develop complex applications with either of them.

MAXScript

In general, MAXScript plug-ins run more slowly than comparable plug-ins written in C++, so if performance is an issue, using the SDK is probably preferable.

On the other hand, MAXScript provides some methods that are higher level than those to be found in the C++ SDK, and supports a few 3ds Max features and capabilities that are not exposed to the SDK. If your feature needs functionality supported by MAXScript but not the SDK, then MAXScript is your only choice. In particular, exposing 3ds Max features via OLE/ActiveX controls is easier to code in MAXScript than it is with the SDK.

MAXScript can be useful for prototyping plug-ins, developing comparatively small features, and writing test suites.

The SDK

The SDK is preferable when performance is important; in general, this is when computation rather than interactivity is the main purpose of the plug-in. Performance is most often an issue when the plug-in handles large sets of entities such as objects, sub-objects, files, notification messages, and so on.

See also

Developing Scripted Plug-ins - Topics Index

Scripted Plug-ins


Using the MAXScript Documentation

This reference is written primarily for animators learning MAXScript. The topics are organized with the introductory material presented first, then descriptions of the MAXScript syntax and grammar, followed by a description of creating, accessing, and modifying the various 3ds Max objects. These 3ds Max objects include geometry objects, modifiers, controllers, materials, textures, and render effects. The MAXScript tools are then described, followed by descriptions of the methods for interacting with the 3ds Max user interface, accessing external files, and establishing notifications to a script when an object or 3ds Max state changes. Throughout these topics, the purpose and syntax of the commands in the MAXScript language are described.

Although it’s helpful to have programming experience, the basic aspects of MAXScript do not require this or an in-depth understanding of the structure underlying 3ds Max. Concepts presented in one topic do assume a basic understanding of the concepts presented in earlier topics. At the very least, the topics in the "Learning MAXScript" chapter and the topics up to and including Controlling Program Flow in the "MAXScript Language Reference" chapter should be read in order. By reading the topics in order, you will learn the MAXScript language starting with the basics, and work your way toward writing full-featured MAXScript utilities. In the later sections, features and techniques are presented for programmers with more advanced programming experience.

For those new to MAXScript, Learning MAXScript provides an introduction to the features, syntax, and practical applications of MAXScript. Users who only intend to use MAXScript tools written by 3rd parties without learning the language itself will find the MAXScript for New and Casual Users topics useful.

This document also features a set of How To - Practical Examples which can be used as tutorials or as starting point for own script development, and an index of Online Help Script Examples listing useful scripts located inside of various topics.

Several chapters have been dedicated to MAXScript Extensions incl. character studio , mental ray , Particle Flow , reactor , and other related products like plasma , gmax and Autodesk VIZ.

The Frequently Asked Questions chapter provides links to relevant topics and solutions to real-world problems based on questions by users.

The Locating Information in this Help File chapter provides several Topic Index pages for easier access to information related to common scripting tasks.

For information about navigating this online reference, searching, and marking often-accessed topics, see topics in the last section, Using the HTML Help Viewer .

To see what has been added to MAXScript in 3ds Max 2009, see What is New in MAXScript in 3ds Max 2009


Copyrights and Trademarks

Copyright © 2008 Autodesk, Inc. All rights reserved.

Except as otherwise permitted by Autodesk, Inc., this publication, or parts thereof, may not be reproduced in any form, by any method, for any purpose.

Certain materials included in this publication are reprinted with the permission of the copyright holder.

Portions Copyright © 2005 Microsoft Corporation. All rights reserved.

Portions Copyright Max HTR created 2003-2005 by Motion Analysis.

REALVIZ Copyright © 2006 REALVIZ S.A. All rights reserved.

Portions of this software JSR-184 Exporter Copyright © 2004 Digital Element, Inc.

JPEG software is copyright © 1991-1998, Thomas G. Lane. All Rights Reserved. This software is based in part on the work of the Independent JPEG Group.

Portions Copyright © 2005 Blur Studio, Inc.

Portions Copyright © 1999-2005 Joseph Alter, Inc. Credit to Joe Alter, Gonzalo Rueda, and Dean Edmonds.

Certain patents licensed from Viewpoint Corporation.

This product includes Radiance software (http://radsite.lbl.gov/radiance) developed by the Lawrence Berkeley National Laboratory (http://www.lbl.gov). Copyright © 1990–2005. The Regents of the University of California through Lawrence Berkeley National Laboratory. All rights reserved.

Portions Copyright © 1990-2007 Info-ZIP. All rights reserved.

For the purposes of this copyright and license, "Info-ZIP" is defined as the following set of individuals: Mark Adler, John Bush, Karl Davis, Harald Denker, Jean-Michel Dubois, Jean-loup Gailly, Hunter Goatley, Ed Gordon, Ian Gorman, Chris Herborth, Dirk Haase, Greg Hartwig, Robert Heath, Jonathan Hudson, Paul Kienitz, David Kirschbaum, Johnny Lee, Onno van der Linden, Igor Mandrichenko, Steve P. Miller, Sergio Monesi, Keith Owens, George Petrov, Greg Roelofs, Kai Uwe Rommel, Steve Salisbury, Dave Smith, Steven M. Schweda, Christian Spieler, Cosmin Truta, Antoine Verheijen, Paul von Behren, Rich Wales, Mike White. This software is provided "as is," without warranty of any kind, express or implied. In no event shall Info-ZIP or its contributors be held liable for any direct, indirect, incidental, special or consequential damages arising out of the use of or inability to use this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the above disclaimer and the following restrictions: 1) Redistributions of source code (in whole or in part) must retain the above copyright notice, definition, disclaimer, and this list of conditions. 2) Redistributions in binary form (compiled executables and libraries) must reproduce the above copyright notice, definition, disclaimer, and this list of conditions in documentation and/or other materials provided with the distribution. The sole exception to this condition is redistribution of a standard UnZipSFX binary (including SFXWiz) as part of a self-extracting archive; that is permitted without inclusion of this license, as long as the normal SFX banner has not been removed from the binary or disabled. 3) Altered versions--including, but not limited to, ports to new operating systems, existing ports with new graphical interfaces, versions with modified or added functionality, and dynamic, shared, or static library versions not from Info-ZIP--must be plainly marked as such and must not be misrepresented as being the original source or, if binaries, compiled from the original source. Such altered versions also must not be misrepresented as being Info-ZIP releases--including, but not limited to, labeling of the altered versions with the names "Info-ZIP" (or any variation thereof, including, but not limited to, different capitalizations), "Pocket UnZip," "WiZ" or "MacZip" without the explicit permission of Info-ZIP. Such altered versions are further prohibited from misrepresentative use of the Zip-Bugs or Info-ZIP e-mail addresses or the Info-ZIP URL(s), such as to imply Info-ZIP will provide support for the altered versions. 4) Info-ZIP retains the right to use the names "Info-ZIP," "Zip," "UnZip," "UnZipSFX," "WiZ," "Pocket UnZip," "Pocket Zip," and "MacZip" for its own source and binary releases.

Portions relating to OpenEXR Bitmap I/O Plugin © 2003-2005 SplutterFish, LLC.

Portions relating to OpenEXR © 2003 Industrial Light and Magic a division of Lucas Digital Ltd. LLC.

Portions relating to Zlib © 1995-2004 Jean-loup Gaily and Mark Alder

Portions Copyright © 2000-2005 Size8 Software, Inc.

Portions Copyright © 1988-1997 Sam Leffler.

Portions Copyright © 1991-1997 Silicon Graphics, Inc. Permissions to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that (i) the above copyright notices and this permission notice appear in all copies of the software and related documentation, and (ii) the names of Sam Leffler and Silicon Graphics may not be used in any advertising or publicity relating to the software without the specific, prior written permission of Sam Leffler and Silicon Graphics.

Portions Copyright © 2006 IntegrityWare, Inc.

Portions © Copyright 1999-2005 Havok.com Inc. (or its licensors). All Rights Reserved. See www.havok.com for details.

Portions Copyright © MAX2Obj and Obj2Max created 1996-2001 by Harald A. Blab.

Portions developed by Digimation, Inc. for the exclusive use of Autodesk, Inc.

Portions Copyright 1998-2003 by Neil Hodgson. All Rights Reserved. Permission to use, copy, modify, and distribute this software and it documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation.

Portions of this software, Point Cache 2 are copyright © 2005-2006 Blizzard Entertainment, Inc.

Portions Copyright © 2003 ATI Technologies, Inc. All Rights Reserved. Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and derivative works and that both the copyright notice and this permission notice appear in support documentation, and that the name of ATI Technologies, Inc. not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission.

Portions Copyright © 1994 F. Kenton Musgrave.

Portions of this software are Copyright © 1991-1994 by Arthur D. Applegate. All Rights Reserved. No part of this source code may be copied, modified or reproduced in any form without retaining the above copyright notice. This source code, or source code derived from it, may not be redistributed without express written permission of the author.

Portions Copyright ©1995, 1996 Guy Eric Schalnat, Group 42, Inc.

Portions Copyright ©1996, 1997 Andreas Dilger.

Portions Copyright © 1989, 1991, 1993 Aladdin Enterprises. All rights reserved.

Portions Copyright © 1999, 2000 NVIDIA Corporation. This file is provided without support, instructions or implied warranty of any kind. NVIDIA makes no guarantee of its fitness for a particular purpose and is not liable under any circumstances for any damages or loss whatsoever arising from the use or inability to use this file or items derived from it.

Portions Copyright © 2006 NVIDIA Corporation.

Portions Copyright 1990-1991 by Thomas Knoll. Copyright 1992-1995 by Adobe Systems, Inc.

Portions Copyright 1993-1996, Adobe Systems, Incorporated. All rights reserved worldwide.

This software contains source code provided by mental images GmbH.

Portions Copyright Guruware OBJio © 2007 www.guruware.at

Portions Copyright Orbaz Technologies © 2007

Portions Copyright Mathew Kaustinen © 2007

Trademarks

The following are registered trademarks or trademarks of Autodesk, Inc., in the USA and other countries: 3DEC (design/logo), 3December, 3December.com, 3ds Max, ActiveShapes, Actrix, ADI, Alias, Alias (swirl design/logo), AliasStudio, Alias|Wavefront (design/logo), ATC, AUGI, AutoCAD, AutoCAD Learning Assistance, AutoCAD LT, AutoCAD Simulator, AutoCAD SQL Extension, AutoCAD SQL Interface, Autodesk, Autodesk Envision, Autodesk Insight, Autodesk Intent, Autodesk Inventor, Autodesk Map, Autodesk MapGuide, Autodesk Streamline, AutoLISP, AutoSnap, AutoSketch, AutoTrack, Backdraft, Built with ObjectARX (logo), Burn, Buzzsaw, CAiCE, Can You Imagine, Character Studio, Cinestream, Civil 3D, Cleaner, Cleaner Central, ClearScale, Colour Warper, Combustion, Communication Specification, Constructware, Content Explorer, Create>what’s>Next> (design/logo), Dancing Baby (image), DesignCenter, Design Doctor, Designer's Toolkit, DesignKids, DesignProf, DesignServer, DesignStudio, Design|Studio (design/logo), Design Your World, Design Your World (design/logo), DWF, DWG, DWG (logo), DWG TrueConvert, DWG TrueView, DXF, EditDV, Education by Design, Exposure, Extending the Design Team, FBX, Filmbox, FMDesktop, Freewheel, GDX Driver, Gmax, Heads-up Design, Heidi, HOOPS, HumanIK, i-drop, iMOUT, Incinerator, IntroDV, Inventor, Inventor LT, Kaydara, Kaydara (design/logo), LocationLogic, Lustre, Maya, Mechanical Desktop, MotionBuilder, Mudbox, NavisWorks, ObjectARX, ObjectDBX, Open Reality, Opticore, Opticore Opus, PolarSnap, PortfolioWall, Powered with Autodesk Technology, Productstream, ProjectPoint, ProMaterials, Reactor, RealDWG, Real-time Roto, Recognize, Render Queue, Reveal, Revit, Showcase, ShowMotion, SketchBook, SteeringWheels, StudioTools, Topobase, Toxik, ViewCube, Visual, Visual Bridge, Visual Construction, Visual Drainage, Visual Hydro, Visual Landscape, Visual Roads, Visual Survey, Visual Syllabus, Visual Toolbox, Visual Tugboat, Visual LISP, Voice Reality, Volo, Wiretap, and WiretapCentral.

The following are registered trademarks or trademarks of Autodesk Canada Co. in the USA and/or Canada and other countries: Backburner, Discreet, Fire, Flame, Flint, Frost, Inferno, Multi-Master Editing, River, Smoke, Sparks, Stone, and Wire.

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

Disclaimer

THIS PUBLICATION AND THE INFORMATION CONTAINED HEREIN IS MADE AVAILABLE BY AUTODESK, INC. "AS IS." AUTODESK, INC. DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE REGARDING THESE MATERIALS.


The MAXScript Utility Panel

The MAXScript Utilities Panel

In its first version back in 3ds Max 2.0, MAXScript was only accessible through the MAXScript Utility in the Utility Panel. Starting with 3ds Max 3.0, MAXScript appeared in the Main Menu and an additional Mini Listener was added to the Status Panel.

The following topics describe the original user interface to MAXScript in the Utilities Panel. It consists of the MAXScript rollout in the Utilities panel, the Listener window, and MAXScript Editor windows.

To access the MAXScript Utility panel rollout, open the Utilities panel and click the MAXScript Utility button.

The following options appear in the MAXScript rollout:

Open Listener

Opens the MAXScript Listener window, or restores and brings it to the front if it is minimized or is behind other 3ds Max windows. The Listener window can also be opened by right-clicking in the Mini Listener in the 3ds Max status bar and choosing Open Listener Window; by choosing MAXScript > MAXScript Listener in the 3ds Max menu bar; or by pressing F11.

For Listener window features and commands, see The MAXScript Listener Window .

New Script

Opens a new MAXScript Editor window used for writing a new script. A new Editor window is also opened by choosing MAXScript > New Script in the 3ds Max menu bar, or File > New Script in the Listener window menu bar.

For Editor window features and commands, see The MAXScript Editor Windows .

Open Script

Opens a common File Open dialog for choosing an existing script. A new MAXScript Editor window then displays the selected script. A script file can also be opened by choosing MAXScript > Open Script in the 3ds Max menu bar, or File > Open Script in the Listener window menu bar.

For Editor window features and commands, see The MAXScript Editor Windows .

Run Script

Opens a common File Open dialog for choosing an existing script. MAXScript then reads and executes the selected script. Any output is printed to the Listener window. A script file can also be run by choosing MAXScript > Run Script in the 3ds Max menu bar, or File > Run Script in the Listener window menu bar.

For more information, see Running Scripts .

Utilities

Displays a list of available scripted utilities. A MAXScript defining a scripted utility must be executed before the scripted utility name appears in the Utilities list.

For more information, see Accessing Scripted Utilities .

Close

Closes the MAXScript Utility rollout. Any scripted Utilities panel rollouts are also closed.


The MAXScript Menu

Since 3ds Max 3.0, MAXScript appears as a separate pull-down menu in the Main Menu in addition to the MAXScript Utility in the Utilities Panel.

To access the MAXScript menu, click on the MAXScript item in the Main Menu:

The following options appear in the MAXScript menu:

New Script

Opens a new MAXScript Editor window used for writing a new script. A new Editor window is also opened by choosing 'New Script' in the MAXScript Utility in the Utilities Panel, or File > New Script in the Listener window menu bar.

For Editor window features and commands, see The MAXScript Editor Windows .

Open Script...

Opens a common File Open dialog for choosing an existing script. A new MAXScript Editor window then displays the selected script. A script file can also be opened by choosing 'Open Script' in the MAXScript Utility in the Utilities Panel, or File > Open Script in the Listener window menu bar.

For Editor window features and commands, see The MAXScript Editor Windows .

Run Script...

Opens a common File Open dialog for choosing an existing script. MAXScript then reads and executes the selected script. Any output is printed to the Listener window. A script file can also be run by choosing 'Run Script' in the MAXScript Utility in the Utilities Panel, or File > Run Script in the Listener window menu bar.

For more information, see Running Scripts .

MAXScript Listener

Opens the MAXScript Listener window, or restores and brings it to the front if it is minimized or is behind other 3ds Max windows. The Listener window can also be opened by right-clicking in the Mini Listener in the 3ds Max status bar and choosing Open Listener Window; by choosing 'Open Listener' in the MAXScript Utility in the Utilities Panel, or by pressing F11.

For Listener window features and commands, see The MAXScript Listener Window .

Macro Recorder

Toggles the MAXScript Macro Recorder. The Macro Recorder generates script code in a separate pane of the MAXScript listener based on the actions of the user.

For Macro Recorder features, see The Macro Recorder

Visual MAXScript Editor

Opens the Visual MAXScript Editor. It is used to create new and edit existing User Interfaces for your scripted rollouts, utilities and floaters.

For Visual MAXScript Editor features, see Visual MAXScript


The MAXScript Listener Window

The Listener

The MAXScript Listener window is an interactive interpreter for the MAXScript language and works similar to a DOS command prompt window. MAXScript commands entered in this window are executed immediately when you press the ENTER key in the numeric pad.

The Listener window is appropriate for performing interactive work and developing small code fragments. Extended blocks of code should be developed in a Script Editor Window .

Each command you execute in Listener is actually an expression with a result which Listener prints out after each execution. All commands in MAXScript are expressions or function calls that can look like commands in other languages. The terms command and expression are synonymous in MAXScript. You can enter any MAXScript expression or sub-expression in Listener for evaluation, and Listener prints out its result.

You can open only one instance of the MAXScript Listener window at a time.

To open the MAXScript Listener, you can perform one of the following actions:

  • Choose the MAXScript utility on the Utilities panel and click Open Listener;

  • Choose the MAXScript menu item in the Main Menu and select 'MAXScript Listener...' in the pull-down menu.

  • Right-click the Mini Listener and select 'Open Listener Window' from the context menu.

  • Press the F11 key.

The Listener window is a resizable, modeless window. You can switch between it and 3ds Max as you work. If you close the Listener window and then reopen it, the text in the window before it was closed reappears. If Auto Open Listener on Output is checked in Customize > Preferences > MAXScript, the Listener window opens automatically when a script outputs to it.

The Listener is divided into two panes: the top (pink) pane is the Macro Recorder pane, and the bottom (white) pane is the output pane. When the Macro Recorder is enabled, everything recorded is displayed in the Macro Recorder pane. The output of results from scripts are displayed in the output pane. The output of code executed in the Macro Recorder pane is always directed to the output pane so as not to clutter the recordings. Both panes allow you to cut-and-paste, drag-and-drop, edit, select, and execute code. You can resize the panes by dragging on the split bar between them.

To install the Listener into a viewport:

1. Right-click the viewport label.

2. Choose Views>Extended.

3. Choose MAXScript Listener.

To remove the Listener from the viewport:

1. Right-click the menu bar on top of the viewport.

2. Choose any Viewport View mode like Front, Top, Perspective etc.

The Mini-Listener

A resizable Mini Listener is located on the left side of the 3ds Max status panel. If the Mini Listener is not visible, drag on the vertical split bar at the left edge of the status panel to reveal the Mini Listener. The Mini Listener panes act as single-line sliding windows for the current line in the corresponding Listener panes.

The Mini Listener panes always show what you are typing or where the edit cursor is placed in the Listener panes. Conversely, anything you type into a Mini Listener pane is entered into the corresponding Listener pane at the current edit cursor position.

You can right-click the Mini-Listener window to access a context menu which provides you with the option to open the MAXScript Listener window and the Editor window.

In addition, if there are existing commands already present in the respective pane of the Listener, the menu will also contain a list of these commands. You can select a command from the menu to reevaluate it in the Listener. The command will be evaluated immediately.

See also

Using the MAXScript Listener


Using the MAXScript Listener

The MAXScript Listener is a combination of text editor and command prompt window. MAXScript executes the commands you write when you press ENTER, but you can also scroll through the text to re-execute existing commands, or edit them and then have MAXScript execute the modified code.

Listener has the following features:

  • A line selection margin at the left window border. When you move the cursor into the left margin, it changes to a right-pointing arrow. A single-click selects an entire line, and click-dragging selects multiple lines.

  • Drag-and-drop for copying text within Listener and to and from script Editor windows.

  • Selected text is loaded automatically into the search text dialog field when you choose Search > Find or Search > Replace. This is useful for quickly finding other occurrences of the selected text.

  • Color-coding for distinguishing between input text, output text, and error message text. Three MAXScript system global variables control these colors, and you can assign them new colors to customize your Listener.

    • Text Type | Variable | Default Color
typed input text | inputTextColor | black
output text | outputTextColor | blue
error message text | messageTextColor | red

    For commands within the Listener window, see Listener Commands .

    See also

    Using the '?' Symbol

    Turning on the Listener Log

    Controlling the Listener Contents and the Insertion Point

    Including Scripts Within Scripts

    Aborting Execution with the ESC Key


Listener Commands

Menu Bar Commands and Keyboard Shortcuts

The following menu bar commands and keyboard shortcuts are available in Listener. The edit commands listed are also available in the Listener right-click menu. The menu bar commands for Macro Recorder are described in The Macro Recorder .

File > Save As, CTRL+S

Opens a common File Save dialog for choosing a file name to which the current contents of the active Listener pane is stored. All text in the active pane is saved to the specified file.

File > New Script, CTRL+N

Opens a new MAXScript Editor window used for writing a new script.

File > Open Script, CTRL+O

Opens a common File Open dialog for choosing an existing script file. A new MAXScript Editor window displays the contents of the selected script file.

File > Run Script, CTRL+R

Opens a common File Open dialog for choosing an existing script file. The selected script file contents are executed.

Edit > Undo, CTRL+Z

If the last change made to the Listener’s content was an edit, undoes that edit. Only one level of undo is supported. If the last change was a command evaluation, removes all the text printed in Listener by that command, making it easy to remove large print-outs. Pressing CTRL+Z a second time restores the removed text and also selects it. This feature can be used as a quick way to cut or copy a command's output.

Edit > Cut, CTRL+X

Copies the selected text to the cut/paste buffer and deletes the text.

Edit > Copy, CTRL+C

Copies the selected text to the cut/paste buffer.

Edit > Paste, CTRL+V

Places the text in the cut/paste buffer at the cursor. If text is selected when executing this command, the selected text is replaced with the cut/paste buffer contents.

Edit > Delete, DEL

Deletes the selected text.

Edit > Clear All

Deletes all text in the active Listener pane.

Edit > Select All, CTRL+A

Selects all text in the active Listener pane.

Search > Find, CTRL+F

Displays Find dialog. Performs search in the active Listener pane for the Find What text. Search can be restricted to occurrences that are not part of a larger word, or are the exact combination of uppercase and lowercase letters as the Find What text. If matching text is found, the text is selected.

Search > Find Next, CTRL+G

Repeats the last Search > Find by finding and selecting the next occurrence of the Find What text in the active Listener pane.

Search > Replace, CTRL+H

Displays Replace dialog. Performs search in the active Listener pane for the Find What text, and replaces the matching text with the Replace With text. Search can be restricted to occurrences that are not part of a larger word, or are the exact combination of uppercase and lowercase letters is the specified text.

Help > Help

Displays the MAXScript Online Reference.

Help > About MAXScript

Displays About MAXScript dialog.

CTRL+B

Selects the text in the current bracket. Bracket balancer lets you check bracket balancing in long pieces of code. The balancer works with any of the following: (), [], and {}. To use it, place the cursor anywhere in the script text and press CTRL+B. If the cursor is next to a bracket, the code bracketed by it and its matching bracket will be selected and highlighted. If the cursor is not next to a bracket, the closest bracketed code containing the cursor will be selected. If you press CTRL+B again, the next outer bracketed fragment is selected, and so on. You can keep pressing CTRL+B to move out through bracket nestings. If at any point there is a bracket mismatch, the balancer will beep and not select any text.

End-Of-Text Commands

The simplest way to use the MAXScript Listener is to enter commands at the end of the existing text and press ENTER. This is called the end-of-text compilation. After each command is executed and any results are printed to the output pane, you can enter another command and press ENTER, and so on. When you write new commands at the end of the text in Listener, pressing ENTER executes the last line and inserts a new line.

Editing and Executing Mid-Text Commands

When you want to use or edit existing text in Listener, you can differentiate between inserting new lines and executing the current line as follows:

  • Press ENTER to insert a new line at the current cursor position.

  • Press Number-Pad ENTER to execute the line that contains the cursor. When you re-execute an existing line, its output and any Error Messages are inserted after the current line if the output pane is active, or at the current edit cursor location in the output pane if the Macro Recorder pane is active.

If you do not have a number pad on your keyboard, SHIFT+ENTER is an alternative to the Number-Pad ENTER key.

Selecting and Executing Commands

You can select multiple text lines and press SHIFT+ENTER to execute all of the selected lines. Each command in the selection is executed in the order it appears in the selection and any output is inserted after the entire selection. You can also select a portion of text within a line and press SHIFT+ENTER to evaluate it, as long as it constitutes a valid MAXScript expression. For example, you can display the value of a sub-expression in a long equation by selecting and executing only that sub-expression within a line. The output is inserted after the current line if the output pane is active, or at the current edit cursor location in the output pane if the Macro Recorder pane is active.

Executing Code Blocks

MAXScript commands may be single or multiline commands, or Block Expressions . If you want to enter a block expression or a multiline command within existing text in the MAXScript Listener window, press ENTER to insert each line. Then drag-select all the lines in the command or block and press SHIFT+ENTER to execute the lines.

If you enter multiline commands or a block expression at the end of the text in the MAXScript Listener window, remember that each line is compiled when you press ENTER. The multiline command isn’t executed until the end of the command is entered, nor are block expressions executed until the block is closed. While you cannot edit a faulty previous line within the multiline commands or block expression that has already been compiled but not yet executed, you can edit any text within the current line before you press ENTER. You can abort the current end-of-text compilation by pressing the ESC key to start over if necessary.

Installing Code Blocks as Macro Scripts

You can select one or more text lines and drag them to a 3ds Max toolbar to create a Macro Script containing the selected lines. For more information, see Defining Macro Scripts .


Using the '?' Symbol

Each time you evaluate a command or code selection, the last evaluation result output to the Listener output pane is captured into an internal variable denoted by the ? symbol. You can access that value again with the ? symbol. You can use the ? anywhere you normally use a variable name and MAXScript evaluates the ? as the last Listener result. A common use is to capture the ? value into one of your own variables for later reuse, such as in the following statement:

x = ?

See also

Using the MAXScript Listener


Turning On the Listener Log

While you work in Listener, you can use the Listener logging feature to capture your entered text and all printed output into a text file. Only text entered in either pane and printed output to the output pane is captured. Macro Recorder output is not captured. You turn on logging with the openLog() method.

openLog <filename_string> [ mode: "w" | "a" ] [ outputOnly:<boolean> ]

where <filename_string> is a string literal or an expression that evaluates to a string, and specifies the name of the log file to be created.

EXAMPLE

openLog "my_log.txt"

or

logfile="my_log.txt"

openLog logfile

The default mode (mode:"w") creates a new file or overwrites an existing file. To append the log results to an existing file; specify mode:"a". If the specified file does not exist, an error message will be generated. Both input and output are logged by default; specify outputOnly:true to log only MAXScript output.

EXAMPLE

openLog "my_log.txt" mode:"a" outputOnly:true

would append only the MAXScript output to file my_log.txt.

If a log file is already open, the openlog() method will close that log file.

MAXScript echoes Listener activity as it occurs to the log file until you stop logging. The log file data is not continuously written to the file, rather the log data is written to a buffer in memory, and when the buffer is full the data in the buffer is written to the file. You can use the flushLog() method to ensure the log's buffer is flushed so that all output is written to the file:

flushLog()

You can stop logging, flush the log’s buffer, and close the log file using the closeLog() method:

closeLog()

No error message is generated if the flushLog() or closeLog() methods are called and no log file is open.


Controlling the Listener Contents and the Insertion Point

The Listener output pane’s content and insertion point placement can be controlled with the following methods:

clearListener()

Clears all text from the Listener output pane.

setListenerSel #(<start_integer>,<end_integer>)

Sets the current text selection in Listener. The start and end values are the character offsets in the Listener output pane text, starting at 0. If the start and end values are the same, no text is selected and the insertion point is placed at the specified point. You can specify -1 for the start or end values, which specifies the end of the Listener output pane text.

FOR EXAMPLE

the following would put the insertion point at the end of the text:

setListenerSel #(-1,-1)

while the following would select all of the text in the Listener output pane text:

setListenerSel #(0,-1)

<start_integer> and <end_integer> are integer literals, or expressions that evaluate to an integer.

getListenerSel()

Returns the current text selection indexes as a two-element array, #(start, end). These values are the character offsets in the Listener output pane text, starting at 0. If there is no selection, but only an insertion point, the start and end values are equal. Only the selections set using the setListenerSel() method are recognized by this method. If no selection has been set using the setListenerSel() method, the start and end values returned are the offset to the end of the Listener output pane text.

getListenerSelText()

Returns the currently selected text, or an empty string if no text is selected and only the insertion point is showing. Only the selections set using the setListenerSel() method are recognized by this method. If no selection has been set using the setListenerSel() method, an empty string is returned.

FOR EXAMPLE

the following lines would capture the entire contents of the Listener output pane to variable ListenerText:

( global ListenerText -- declare variable so its scope is higher

-- than inside just the following block

-- expression

( setListenerSel #(0,-1) -- select all the text

ListenerText=getListenerSelText() -- get selected text

setListenerSel #(-1,-1) -- set insertion point at

-- end of output pane

)

)

setListenerSelText <replacement_string>

Replaces the currently selected text with the replacement string. If no text is selected and only the insertion point is showing, setListenerSelText() inserts the replacement string at the insertion point. Only the selections set using the setListenerSel() method are recognized by this method. If no selection has been set using the setListenerSel() method, the insertion point is the end of the Listener output pane text. <replacement_string> is a string literal or an expression that evaluates to a string.

include <filename_string>

Inserts the specified file’s content into the Listener output pane. The inserted text is not evaluated. You can use this method to load a script and then step through it, executing any selected text with SHIFT+ENTER. <filename_string> is a string literal or an expression that evaluates to a string, and specifies the name of the file to insert.

EXAMPLE USAGES ARE:

include "my_script.ms"

or

scriptfile="c:\\my_scripts\\my_script.ms"

include scriptfile

If you don’t explicitly specify a directory in the file name, the file will be searched for in the following directories, in the order listed:

  • The current MAXScript directory

  • The 3ds Max executable main directory

  • The Windows NT 32-bit system directory (system32)

  • The Windows 16-bit system directory (system)

  • The Windows directory

  • The directories that are listed in the PATH environment variable


The MAXScript Editor Windows

The multiple MAXScript Editor windows used in 3ds Max 2 to 9 have been replaced with a single tabbed editor in 3ds Max 2008. It is based on the Scintilla control and the SciTE editor and supports a large number of advanced features not available in the previous implementation.

The MAXScript Listener and its MacroRecorder pane, the Mini-Listeners in the bottom left corner of the GUI and the script editor windows are all now using the Scintilla control.

The undo depth for both the Listener and the Editor is now 500.

The documentation of the new Tabbed Editor Window is available here:

MAXScript Tabbed Editor Window

MAXScript Editor Commands

The legacy Editor Windows are still used in several areas of 3ds Max like the Particle Flow Scripted Operators. The original documentation of the legacy Editor Windows is available under

The MAXScript Legacy Editor Windows

MAXScript Legacy Editor Commands

Related MAXScript Methods

showSource <fn>

If you need to locate the source of a scripted function, you can use the showSource() method. It displays a MAXScript Editor window containing the source file in which the function was defined, positioned at the function's definition.

editorShowPath

The new system global variable editorShowPath introduced in 3ds Max 9 controls whether the MAXScript Editor will display the full path of the edited script (true, default in 3ds Max 9), or only the file name (false, the only mode prior to 3ds Max 9) in the title bar. Changing the value will update the open MAXScript editor windows.

In 3ds Max 9 and higher, when doing an Open or Save As from an editor window, and there is a filename associated with the editor window, the file open/save dialog will open to the filename's path. When doing an Open, Save, or Save As from an editor window without a filename, or from Listener or the main max window, the last directory specified in a MAXScript script file open/save dialog will be used (unless the user cancelled out of the dialog).


Running Scripts

To run an existing script file, press "Run Script" button on the MAXScript utility rollout, File > Run Script in the Listener menu bar, or MAXScript > Run Script in the 3ds Max menu bar. This opens a common File Open dialog for choosing the script. MAXScript then reads and executes the selected script. Any output is printed to the Listener output pane.

You can also run a script from Listener or from within other scripts using the fileIn() method:

fileIn <filename_string> [ quiet:<boolean> ]

where <filename_string> is a string literal or an expression that evaluates to a string, and specifies the name of the script file whose content is executed. The script file content is executed one expression at a time, and halts processing if an error is encountered at any point. By default, the file is not listed as it is loaded; use quiet:false to get a running listing to the Listener.

EXAMPLE USAGES ARE:

fileIn "my_script.ms"

or

scriptfile="my_script.ms"

fileIn scriptfile

The script file content is compiled in a global scope context, as opposed to the scope in effect when the filein() method is executed. For more information, see Scope_of_Variables .


Accessing Scripted Utilities

The Utilities list in the MAXScript rollout contains scripted utilities that have been defined in startup scripts or while working in MAXScript. For details about defining scripted utilities, see Scripted Utility Panels .

As soon as you define a utility, MAXScript adds the utility's name to the Utilities list. When you select a utility from this list, its rollout is added to the Utilities panel after the MAXScript rollout. You can open as many utilities as you need, and close each one with its designated Close button.

If you modify and reexecute the script for an open utility rollout, that rollout is replaced immediately with the updated rollout. This lets you develop scripted utility rollouts incrementally with immediate, visual feedback.


The Macro Recorder

The MAXScript Macro Recorder captures many of the actions performed by the user, and generates the MAXScript commands that correspond to those actions. Output from Macro Recorder is displayed in the Macro Recorder pane of the MAXScript Listener window. Several filtering options are available that control what types of user actions are recorded, whether the generated MAXScript commands contain explicit object references or are selection-relative, and whether the generated MAXScript commands contain explicit or relative transforms and coordinates. These options are set using the MacroRecorder menu in the Listener window. The default option settings are specified in the MAXScript page of the 3ds Max Preferences dialog, as described in the MAXScript Preferences Settings topic in the 3ds Max User Reference. These settings can also be changed or set by editing the [MAXScript] section of the 3dsmax.ini file.

While many areas in 3ds Max generate Macro Recorder output, there are also many areas that do not. In general, most of the buttons on the 3ds Max menu bar, toolbars, status bar, Create panel, and Modify panel will generate Macro Recorder output. If the button invokes a secondary dialog, changing setting or performing actions in the secondary dialog typically will not generate Macro Recorder output. In the Create and Modify panels, Macro Recorder output will be generated if the object or modifier can be created by MAXScript. In some cases, the plug-in implementing an object or modifier has not been updated to support Macro Recorder, so that object or modifier will not generate Macro Recorder output. Future versions of 3ds Max and 3ds Max plug-ins will be updated to support the Macro Recorder and will generate Macro Recorder output when used.

MAXScript supports text drag-and-drop onto toolbars to create Macro Script buttons. You can select and drag text from any text window, such as Listener window panes or Editor windows, onto any visible toolbar. The cursor changes to an arrow with a + sign when it is OK to drop the text. If you drop it, a Macro Script button is added to the toolbar with the dropped text as the body of the Macro Script. The classic case here would be to drag text from the Macro Recorder pane onto a toolbar to make a button that does the sequence of events just recorded. For more information, see Defining Macro Scripts .

The following Macro Recorder menu commands are available in Listener:

Enable

When Enable is selected the Macro Recorder will generate MAXScript commands.

Explicit Scene Object Names/Selection-Relative Scene Object Names

Specifies whether to use explicit scene object names or the selection set token in the generated commands if only one object is selected. If more than one object is selected, the selection set token is always used.

FOR EXAMPLE,

if Explicit Scene Object Names is enabled, a typical generated command would be:

move $Sphere03 [55.6739,23.5,0]

If Selection-Relative Scene Object Names is enabled, a typical generated command would be:

move $ [0,-47.8044,0]

By using Selection-Relative Scene Object Names, you can apply the recorded script to a different selection, thereby making it somewhat general. Use Explicit Scene Object Names if you want the script to always work on the same objects regardless of the current scene selection.

PERFORMANCE NOTE:

NEW in 3ds Max 2009: In releases prior to 3ds Max 2009, selecting many nodes with Macro Recorder enabled resulted in a significant slowdown. This slowdown has been removed in 3ds Max 2009 - selection times for 10000 objects with and without Macro Recorder are now practically identical.

Absolute Transform Assignments/Relative Transform Operations

Specifies whether to use absolute or relative transform commands in the generated commands.

FOR EXAMPLE,

if Absolute Transform Assignments is enabled, a typical generated command when you move a selection in a viewport would be:

$.position = [55.6739,23.5,0]

If Relative Transform Operations is enabled, a typical generated command would be:

move $ [0,-47.8044,0]

When the Absolute Transform Assignments option is selected, absolute transform assignments are output only if a single object is transformed. If multiple objects are selected, relative transform operations are output.

Explicit Sub-object Sets/Selection-Relative Sub-object Sets

Specifies whether to use explicit sub-object identifiers or the sub-object selection set property in the generated commands.

FOR EXAMPLE,

if Explicit Sub-object Sets is enabled, a typical generated command would be:

move $Sphere02.verts[#{20..32, 51..65}] [40.0986,10.3648,0]

If Selection-Relative Sub-object Sets is enabled, a typical generated command would be:

move $Sphere02.selectedVerts [40.0986,10.3648,0]

By using Selection-Relative Sub-object Sets, you can apply the recorded script to a different selection, thereby making it somewhat general. Use Explicit Sub-object Sets if you want the script to always work on the same sub-objects regardless of the current sub-object selection.

Command Panel Switching

When Command Panel Switching is selected, the Macro Recorder will generate MAXScript commands for command panel switches. In most cases, recording command panel switches is superfluous as most scripts are not dependent on the user interface mode to work.

Tool Selections

When Tool Selections is selected, the Macro Recorder will generate MAXScript commands for the selection of tools in the 3ds Max toolbar. In most cases, recording the selection of tools is superfluous as most scripts are not dependent on the tool selection to work.

Menu Item Selections

When Menu Item Selections is selected, the Macro Recorder will generate MAXScript commands for the selection of menu items from the 3ds Max menu bar.

See also

MacroScripts for New Users

Customizing MacroScript Buttons

Defining Macro Scripts

Creating Icon Bitmap Files


Customizing MacroScript Buttons

Since the introduction of the MacroRecorder and MacroScripts in 3ds Max 3, a fair amount of User Interface elements have been implemented using MAXScript.

In 3ds Max 4, a unified ActionItems system was introduced which allows MacroScripts to appear in all four major areas of the customization dialog - Keyboard Shortcuts, Toolbars, Menus and QuadMenus.

In the case of Toolbar buttons, MacroScripts provide a context-sensitive right-click menu with the following options:

  • Edit Button Appearance...

  • Delete Button

  • Edit Macro Script

  • Customize...

In this example, the user right-clicked the second icon of the Render Shortcuts toolbar which contains the Render Presets Slot B used to quickly assign Render Presets to the current Production renderer.

Edit Button Appearance...

The Edit Button Appearance... option opens a new dialog which allows the user to control the appearance of the button including:

  • The Tooltip to be displayed when the mouse rolls over the button,

  • The Text Label when a Text Button is requested, and

  • The image file and the icon number to be used when an Image Button is desired.

This is the default appearance of the dialog. Eventhough the button is currently showing an icon (specified in the source code of the script), the dialog will provide the Text Button settings as the default state.

The user can switch the button mode to Image Button, select an icon library from the drop-down list (for example, "Render"), and select a new icon from the list:

Delete Button

The Delete Button option lets the user remove the button from the toolbar. Since this is a destructive operation, a prompt will be issued:

Even after answering with Yes, the original Toolbar definition could be restored from a CUI file, or the deleted button could be re-created by using the Customize User Interface dialog.

Edit Macro Script

The Edit Macro Script option lets the user navigate directly to the source code of the MacroScript used for the button's definition. This can be very useful for quickly changing small errors in the functionality and for learning how certain features developed by Discreet or 3rd parties work.

For example, this is the MAXScript Editor showing the source code of the Render Presets Slot B button - note the first line of the MacroScript is automatically highlighted:

If the button is NOT implemented using MAXScript, the Edit Macro Script option will be grayed out. See for example the Manipulate button in the Main Toolbar.

Some buttons implemented in the core of 3ds Max will not allow the user to change their appearance (see most of the buttons on the Main Toolbar like Material Editor, Render etc.). These buttons will not provide a right-click context menu at all.

Customize...

The Customize... option opens the standard Customize User Interface dialog and lets the user create new buttons, assign ActionItems to shortcuts, place them on Menus and QuadMenus, and tweak the colors of the User Interface. It also provides the option to locate and edit MacroScripts for those items that have been created using MAXScript:

See also

MacroScripts for New Users

Defining Macro Scripts

Creating Icon Bitmap Files

The Macro Recorder


MAXScript Tabbed Editor Window

The multiple MAXScript Editor windows used in 3ds Max 2 to 9 have been replaced with a single tabbed editor in 3ds Max 2008.

The new editor is based on the SciTE editor and Scintilla control and supports a large number of advanced features not available in the previous RichEdit-based implementation.

The MAXScript Editor is a built-in editor you can open within 3ds Max and use to create or edit text files, notably MAXScript script files.

To open the Editor,

  • Click MAXScript > MAXScript Editor... in the 3ds Max Main Menu to toggle the new Editor window. Any scripts that have been open for editing will be kept in the Editor, even between 3ds Max sessions.

  • Click MAXScript > New Script in the 3ds Max Main Menu to start a new script, or

  • Click MAXScript > Open Script in the 3ds Max Main Menu and select an existing script from disk to load in the Editor, or

  • Press the New Script or Open Script buttons in the MAXScript Utility rollout, or

  • Select File > New Script or File > Open Script in the MAXScript Listener's menu bar or

  • Right-click the Mini-Listener and select Open Editor Window.

MAXScript opens the selected script in a tab inside the modeless MAXScript Editor window:

 Roll over image and click a Menu Item to jump to corresponding topic.

The MAXScript Editor is suited for developing longer scripts or code fragments you want to keep. You can edit and test parts of them until they are complete, then save your code in a script file for later use. This is a common method for developing large scripts, utilities, and function libraries.

You can select one or more text lines and drag them to a 3ds Max toolbar to create a Macro Script containing the selected lines. For more information, see Defining Macro Scripts .

You can open a MAXScript Editor tab from within the Listener or from other running scripts by calling the edit() method. The syntax for the edit() method is:

edit <filename_string>

where <filename_string> is a string literal or an expression that evaluates to a string, and specifies the name of the file whose contents are to be loaded into the new MAXScript Editor window.

EXAMPLE

edit "my_script.ms"

or

scriptfile="my_script.ms"

edit scriptfile

The file will be searched for in the following directories, in the order listed:

  • The current MAXScript directory

  • The 3ds Max executable main directory

  • The Windows NT 32-bit system directory (system32)

  • The Windows 16-bit system directory (system)

  • The Windows directory

  • The directories that are listed in the PATH environment variable

The MAXScript System Global Variable editorShowPath controls whether the MAXScript Editor will display the full path of the edited script (true) or only the file name in the title bar (false).


MAXScript Tabbed Editor Overview

The following topic describes the highlights of the Scintilla-based MAXScript Editor introduced in 3ds Max 2008.

The MAXScript Editor provides the following main features:

Roll over and click a Menu Item to jump to topic:

  • Tabbed Display - multiple Editor Windows can be opened in the same time within the same user interface.

    • By default, up to 10 files can be opened either one by one or by selecting multiple files in the Open File dialog. The Editor supports up to 100 files opened at once - it can be customized to do so, but only the first 10 tabs will be directly accessible via the Alt+number key described below.

    • The first 10 tabs are numbered as 1,2,3,4,5,6,7,8,9 and 0 - you can switch to a tab directly by holding down the Alt key and pressing the number of the tab from 1 to 0.

    • If there are more opened tabs than possible to fit in the tab bar at the same time, two scroll arrows will appear at the right side of the tab strip allowing you to scroll the tabs. Also, clicking on the left-most or right-most tab will attempt to center it and thus shift the tabs to reveal more tabs that might be eventually outside the view.

    • You can cycle the tabs using the CTRL+Tab keys or CTRL+SHIFT+Tab for cycling backwards.

    • Scripts that require saving because of editing changes will be marked with a * star in both the tab and in the title bar.

    • Right-clicking a tab displays a context menu with the options to Close, Save, Save As and Print the document represented by the tab.

    • Middle-clicking a tab closes it immediately if the file does not require saving or prompts for saving if it has been modified.

  • Full file name display - by default, the full path of the currently edited script will be displayed in the title bar of the window. This feature can be disabled and enabled by setting the system global variable editorShowPath introduced in 3ds Max 9 to false or true.

  • Line Numbering - all code lines will be numbered, making it easier to debug errors which are reported with a line number in the MAXScript Listener and MAXScript Debugger. Pressing CTRL+G opens the Go To dialog (the keyboard shortcut for this feature in the legacy Editor in 3ds Max 8 and 9 was Ctrl+J) which allows a jump to a line or character offset.

  • Automatic Dynamic Syntax Coloring - the full list of reserved keywords, built-in methods, global variables, special values and many more are passed directly from MAXScript to the Editor, enabling it to correctly highlight almost every word understood by MAXScript. In addition, all colors can be customized to match the user preferences and support local directory overrides, so different MAXScripting projects can use different color schemes. The color coding is extremely fast compared to the legacy editor and is performed over the whole document over the fly. Thus, if an opening quotation mark does not have a closing one, the complete file after the opening quote will be dynamically painted in the current string color and signal that a closing quote is missing.

  • Automatic Indentation - new lines will be automatically indented based on the context. For example, typing the code for i = 1 to 10 do and pressing Enter will indent the following line automatically, expecting a single line of body code. But if you type in an opening parenthesis to start a multi-line body, the indentation is automatically removed to align to the for loop's head.

  • Automatic Bracket Balancing - the opening and closing parentheses, brackets and braces will be automatically highlighted by simply clicking near either the opening or the closing one.

  • Visual guides (dotted lines) also help with balancing parentheses.

    • If a closing or opening parenthesis, bracket or brace is missing, the existing one will turn red as a warning.

    • Pressing CTRL+B near a bracket, brace or parenthesis will jump the cursor to the other one in the pair if existing.

    • Pressing CTRL+SHIFT+B while near a bracket, brace or parenthesis will select the code block encosed by it and its counterpart.

  • Folding Code Blocks - portions of the code between parentheses can be collapsed by clicking on the minus sign to the left of the opening parenthesis. Alternatively, press Ctrl+SHIFT+Plus on the top numeric row (next to the Backspace key) to toggle the folding of the code block the cursor is currently in.

  • Bookmarks - an arbitrary number of bookmarks can be placed at any number of lines using CTRL+F2. To jump to the next bookmark, press F2, for the previous bookmark, press SHIFT+F2.

  • Multiple Status Bars - multiple status bars can be customized to display various aspects of the loaded code like word and character count, file modification time, current time and more. To switch between the multiple status bars, simply click the status bar at the bottom of the Editor. See MAXScript Editor - Defining Custom Status Bars for details.

  • Right-click context menu - some often used commands are hard-coded in the context menu which appears when right-clicking in the Editor window. This menu is customizable and can be extended by the user - See MAXScript Editor - Defining Custom Context Menu Items for details.

  • Jump to code blocks - like in the legacy Editor, holding down the CTRL key and right-clicking in the Editor opens a context dialog listing various code blocks like function definitions, rollout definitions, event handlers, UI controls and so on. Selecting any of them repositions the cursor to that definition:

  • Freely Resizable Fonts - like in the legacy Editor, holding down the CTRL key, pressing the mouse wheel and turning the wheel will change the font size. Alternatively, use the CTRL+NumPad Plus key and CTRL+NumPad Minus key to increase and decrease the font size.

  • Auto-Complete and Abbreviation Support - already used words from the same document can be expanded manually or automatically thanks to the Auto-Complete feature. Abbreviations can be defined by the user and expanded into full words or even whole pieces of prototype code.

  • Powerful Search including Regular Expressions support - the Find and the Replace features support Regular Expressions for ultimate flexibility.

  • Extremely Customizable - the Editor can be extensively customized by the user to fit a specific workstlyle or visual appearance.

For Details on Usage, Commands, Customization etc. see:

MAXScript Editor Commands


MAXScript Editor Commands

MAXScript Tabbed Editor Commands

The following menu bar commands and keyboard shortcuts are available in the Tabbed MAXScript Editor introduced in 3ds Max 2008.

For an overview of the Tabbed Editor, please see MAXScript Tabbed Editor Window

MAXScript Editor - Menu Options:

Roll over and click a Menu Item to jump to topic:

MAXScript Editor - Keyboard Shortcuts:

MAXScript Editor - Keyboard Shortcuts

MAXScript Editor - Regular Expressions

Regular Expressions Find and Replace in the MAXScript Editor

MAXScript Editor - Output Pane

MAXScript Editor - Output Pane

MAXScript Editor - Configuration and Customization:

MAXScript Editor - Properties File Settings

MAXScript Editor - MAXScript-Specific Language Settings

MAXScript Editor - Customizing Syntax Color Schemes

MAXScript Editor - Defining Custom Keyboard Shortcuts

MAXScript Editor - Defining Custom Context Menu Items

List of Editor Menu Commands

List of Editor Key Commands

MAXScript Editor - Defining And Using Abbreviations

MAXScript Editor - Defining Custom Status Bars

See also

MAXScript Tabbed Editor Window


MAXScript Editor - Keyboard Shortcuts

MAXScript Tabbed Editor - Keyboard Shortcuts

The following tables list most keyboard shortcuts available in the Tabbed MAXScript Editor introduced in 3ds Max 2008.

The following table is odered by feature area.
See second table further on this page for shortcuts ordered alphabetically by key.

HELP | KEYBOARD SHORTCUTS
Help File. | F1
FILE OPERATIONS | KEYBOARD SHORTCUTS
New File. | Ctrl+N
Open File. | Ctrl+O
Open Selected Filename. | Ctrl+Shift+O
Revert File to last saved version. | Ctrl+R
Close File | Ctrl+W
Save File | Ctrl+S
Save File As… | Ctrl+Shift+S
Save As Copy… | Ctrl+Shift+P
Print File | Ctrl+P
Cycle through files currently open in tabs. | Ctrl+Tab, F6, Ctrl+PgDn
Cycle backwards through tabs. | Ctrl+Shift+Tab, Shift+F6, Ctrl+PgUp
SCRIPT EVALUATION | KEYBOARD SHORTCUTS
Evaluate All | Ctrl+E
Evaluate Line/Selection | Shift+ENTER, NumPad Enter
EDITING OPERATIONS | KEYBOARD SHORTCUTS
Undo | Ctrl+Z
Redo | Ctrl+Y
Cut | Ctrl+X
Copy | Ctrl+C
Paste | Ctrl+V
Duplicate | Ctrl+Shift+D
Select All | Ctrl+A
Line cut | Ctrl+L
Line copy | Ctrl+Shift+T
Line delete | Ctrl+Shift+L
Line transpose with previous. | Ctrl+T
DELETING TEXT | KEYBOARD SHORTCUTS
Delete | Del
Delete All in Listener | Ctrl+D
Delete All in Editor | Ctrl+Alt+D
Delete to start of word. | Ctrl+BackSpace
Delete to end of word. | Ctrl+Delete
Delete to start of line. | Ctrl+Shift+BackSpace
Delete to end of line. | Ctrl+Shift+Delete
SELECTING TEXT | KEYBOARD SHORTCUTS
Select to next bookmark. | Alt+F2
Extend selection to start of document. | Ctrl+Shift+Home
Extend selection to start of display line. | Alt+Shift+Home
Extend selection to end of document. | Ctrl+Shift+End
Extend selection to end of display line. | Alt+Shift+End
NAVIGATION | KEYBOARD SHORTCUTS
Scroll up. | Ctrl+Up
Scroll down. | Ctrl+Down
Previous paragraph. Shift extends selection. | Ctrl+[
Next paragraph. Shift extends selection. | Ctrl+]
Previous word. Shift extends selection. | Ctrl+Left
Next word. Shift extends selection. | Ctrl+Right
Previous word part. Shift extends selection. | Ctrl+/
Next word part. Shift extends selection. | Ctrl+\
INDENTING TEXT | KEYBOARD SHORTCUTS
Indent block. | Tab
De-indent block. | Shift+Tab
Change Indentation Settings. | Ctrl+Shift+I
BRACKET BALANCER | KEYBOARD SHORTCUTS
Match Bracket | Ctrl+B
Select to Bracket | Ctrl+Shift+B
AUTO-COMPLETE | KEYBOARD SHORTCUTS
Complete Word | Ctrl+ENTER
Expand Abbreviation | Ctrl+Shift+A
Insert Abbreviation | Ctrl+Shift+R
COMMENTING | KEYBOARD SHORTCUTS
Block Comment or Uncomment | Ctrl+Q
Box Comment | Ctrl+Shift+C
Stream Comment | Ctrl+Shift+Q
UPPER/LOWER CASE | KEYBOARD SHORTCUTS
Make Selection Uppercase | Ctrl+Shift+U
Make Selection Lowercase | Ctrl+U
SEARCH | KEYBOARD SHORTCUTS
Find… | Ctrl+F
Find Next | F3
Find Previous | Shift+F3
Find selection | Ctrl+F3
Find selection backwards | Ctrl+Shift+F3
Replace… | Ctrl+H
GO TO / BOOKMARKS | KEYBOARD SHORTCUTS
Go To… / Find Again In Listener | Ctrl+G
Go to start of document. | Ctrl+Home
Go to start of display line. | Alt+Home
Go to end of document. | Ctrl+End
Go to end of display line. | Alt+End
Next Bookmark | F2
Previous Bookmark | Shift+F2
Toggle Bookmark | Ctrl+F2
VIEW | KEYBOARD SHORTCUTS
Full Screen | F11
Show Whitespaces | Ctrl+Shift+8
Show End Of Line Characters | Ctrl+Shift+9
Expand or contract a fold point. | Ctrl+Keypad*
FONT CONTROLS | KEYBOARD SHORTCUTS
Magnify text size. | Ctrl+Keypad+
Reduce text size. | Ctrl+Keypad-
Restore text size to normal. | Ctrl+Keypad/
Toggle Monospaced Font. | Ctrl+F11
Switch to Text (No Syntax Coloring) | Shift+F11
OUTPUT PANE CONTROLS | KEYBOARD SHORTCUTS
Next Message | F4
Previous Message | Shift+F4
Clear Output | Shift+F5
Switch to/from Output pane | Ctrl+F6
SOURCE CONTROL | KEYBOARD SHORTCUTS
Add File | Ctrl+F5
Remove File | Ctrl+Shift+F5
Check In | Shift+F5
Check Out | F5

The following table is odered alphabetically by keys.
See previous table on this page for shortcuts ordered by feature.

KEYS | ACTION | NOTES
Tab | Indent Block | Editor and Listener
Del | Delete | Editor and Listener
Numpad Enter | Evaluate Line / Selection | Editor and Listener
F KEYS | ACTION | NOTES
F1 | Help | Editor and Listener
F2 | Next Bookmark | Editor only
F3 | Find Next | Editor only
F4 | Next Message | Output pane only
F5 | Check Out (Source Control) | Editor only
F6 | Cycle Tabs | Editor only
F11 | Full Screen Toggle | Editor only
CTRL + KEY | ACTION | NOTES
Ctrl + A | Select all | Editor and Listener
Ctrl + B | Select To Brace | Listener only
Ctrl + B | Match Brace | Editor only
Ctrl + C | Copy selection | Editor and Listener
Ctrl + D | Delete All | Listener only
Ctrl + E | Evaluate All | Editor only
Ctrl + F | Find | Editor and Listener
Ctrl + G | Find Again | Listener only
Ctrl + G | Go To | Editor only
Ctrl + H | Replace | Listener only
Ctrl + L | Line cut | Editor and Listener
Ctrl + N | New Script | Editor and Listener
Ctrl + O | Open Script | Editor and Listener
Ctrl + P | Print | Editor only
Ctrl + Q | Block Comment/Uncomment | Editor only
Ctrl + R | Run Script | Listener only
Ctrl + R | Revert | Editor only
Ctrl + S | Save | Editor and Listener
Ctrl + T | Line transpose | Editor and Listener
Ctrl + U | Lower case | Editor and Listener
Ctrl + V | Paste | Editor and Listener
Ctrl + W | Close | Editor and Listener
Ctrl + X | Cut selection | Editor and Listener
Ctrl + Y | Redo | Editor and Listener
Ctrl + Z | Undo | Editor and Listener
Ctrl + Down | Line scroll down | Editor and Listener
Ctrl + Up | Line scroll up | Editor and Listener
Ctrl + Left | Word left | Editor and Listener
Ctrl + Right | Work right | Editor and Listener
Ctrl + Ins | Copy | Editor and Listener
Ctrl + Del | Delete word right | Editor and Listener
Ctrl + Back | Delete word left | Editor and Listener
Ctrl + Home | Document start | Editor and Listener
Ctrl + End | Document end | Editor and Listener
Ctrl + Enter | Complete Word | Editor only
Ctrl + Numpad + | Zoom in | Editor and Listener
Ctrl + Numpad - | Zoom out | Editor and Listener
Ctrl + Numpad / | Set zoom | Editor and Listener
Ctrl + Numpad * | Fold toggle | Editor only
Ctrl + / | Word part right | Editor and Listener
Ctrl + \ | Word part left | Editor and Listener
Ctrl + [ | Paragraph up | Editor and Listener
Ctrl + ] | Paragraph down | Editor and Listener
Ctrl + Tab | Cycle Tabs | Editor only
Ctrl + PgDn | Cycle Tabs | Editor only
Ctrl + PgUp | Cycle Tabs Backwards | Editor only
Ctrl + F2 | Toggle Bookmark | Editor only
Ctrl + F3 | Find Selection | Editor only
Ctrl + F5 | Add File (Source Control) | Editor only
Ctrl + F6 | Switch Editor/Output | Editor and Output
Ctrl + F11 | Use Monospaced Font | Editor only
CTRL+SHIFT+KEY | ACTION | NOTES
Ctrl + Shift + A | Expand Abbreviation | Editor only
Ctrl + Shift + B | Select To Brace | Editor only
Ctrl + Shift + C | Box Comment | Editor only
Ctrl + Shift + D | Selection duplicate | Editor and Listener
Ctrl + Shift + I | Change Indentation Settings | Editor only
Ctrl + Shift + L | Line delete | Editor and Listener
Ctrl + Shift + O | Open Selected Filename | Editor only
Ctrl + Shift + P | Save a Copy | Editor only
Ctrl + Shift + Q | Stream Comment | Editor only
Ctrl + Shift + R | Insert Abbreviation | Editor only
Ctrl + Shift + S | Save As | Editor only
Ctrl + Shift + T | Line copy | Editor and Listener
Ctrl + Shift + U | Upper case | Editor and Listener
Ctrl + Shift + Left | Word left extend | Editor and Listener
Ctrl + Shift + Right | Work right extend | Editor and Listener
Ctrl + Shift + Del | Delete line right | Editor and Listener
Ctrl + Shift + Back | Delete line left | Editor and Listener
Ctrl + Shift + Home | Document start extend | Editor and Listener
Ctrl + Shift + End | Document end extend | Editor and Listener
Ctrl + Shift + / | Word part right extend | Editor and Listener
Ctrl + Shift + \ | Word part left extend | Editor and Listener
Ctrl + Shift + [ | Paragraph up extend | Editor and Listener
Ctrl + Shift + ] | Paragraph down exted | Editor and Listener
Ctrl + Shift + Tab | Cycle Tabs Backwards | Editor only
Ctrl + Shift + 8 | View Whitespace | Editor only
Ctrl + Shift + 9 | View End of Line | Editor only
Ctrl + Shift + F3 | Find Selection Backwards | Editor only
Ctrl + Shift + F5 | Remove File (Source Control) | Editor only
SHIFT+KEY | ACTION | NOTES
Shift + Down | Line extend down | Editor and Listener
Shift + Up | Line extend up | Editor and Listener
Shift + Left | Character extend left | Editor and Listener
Shift + Right | Character extend right | Editor and Listener
Shift + Ins | Paste | Editor and Listener
Shift + Home | Line begin extend | Editor and Listener
Shift + End | Line end extend | Editor and Listener
Shift + Page Down | Page down extend | Editor and Listener
Shift + Page Up | Page up extend | Editor and Listener
Shift + Tab | Backtab | Editor and Listener
Shift + Enter | Evaluate line/selection | Editor and Listener
Shift + F2 | Previous Bookmark | Editor only
Shift + F3 | Find Previous | Editor only
Shift + F4 | Previous Message | Output pane only
Shift + F5 | Clear Output | Output pane only
Shift + F5 | Check In (Source Control) | Editor only
Shift + F6 | Cycle Tabs Backwards | Editor only
Shift + F11 | Language - Text | Editor only
ALT+KEY | ACTION | NOTES
Alt + Home | Line begin jump | Editor and Listener
Alt + End | Line end jump | Editor and Listener
Alt + Backspace | Undo | Editor and Listener
Alt + Mouse Drag | Window Select | Editor and Listener
Alt + F2 | Select to next bookmark | Editor only
ALT+SHIFT+KEY | ACTION | NOTES
Alt+Shift + Down | Line down rectangle extend | Editor and Listener
Alt+Shift + Up | Line up rectangle extend | Editor and Listener
Alt+Shift + Left | Character left rectangle extend | Editor and Listener
Alt+Shift + Right | Character right rectangle extend | Editor and Listener
Alt+Shift + Home | Line begin rectangle extend | Editor and Listener
Alt+Shift + End | Line end rectangle extend | Editor and Listener
Alt+Shift + Page Down | Page down rectangle extend | Editor and Listener
Alt+Shift+ Page Up | Page up rectangle extend | Editor and Listener
Alt+Shift + Arrows | Window Select | Editor and Listener
CTRL+ALT+KEY | ACTION | NOTES
Ctrl + Alt + D | Delete All | Editor only


Regular Expressions Find and Replace in the MAXScript Editor

The following topic is based on the public domain document located on http://www.scintilla.org/SciTERegEx.html

Purpose

Regular Expressions (RegEx) can be used for searching for patterns rather than literals.

For example, using the following posix-mode Regular Expression, it is possible to search for variables in property files which look like $(name.subname)

\$([a-z.]+)

This Regular Expression can be read like this:

  • Find a string which matches the following rules:

    • Starts with $, denoted as the special character \$

    • Is followed by a lower case character between a and z followed by any character specified by a period .

    • The above set repeated one or more times, as denoted by the + sign after the [] set definition.

Replacement with regular expressions allows for complex transformations with the use of tagged expressions.

For example, pairs of numbers separated by a comma could be reordered by replacing the posix-mode regular expression

([0-9]+),([0-9]+)

with:

\2,\1

The first RegEx means: Match one or more digits between 0 and 9 before the comma and one or more digits between 0 and 9 after the comma.

In non-posix mode, the same would be written as

\([0-9]+\),\([0-9]+\)

The replacement RegEx \2,\1 means: Take the second matched expression and put it before the comma, then place the first matched expression after the comma.

The first posix mode RegEx could even be written as

(\d+),(\d+))

which also means any number of digits before the comma and any number of digits after the comma.

Syntax Styles - Posix vs. Old Unix Style

Regular expression syntax depends on the parameter

find.replace.regexp.posix

If set to 0 (default), the Regular Expression syntax uses the old Unix style where \( and \) mark capturing sections while ( and ) represent themselves.

If set to 1, the RegEx syntax uses the more common style where opening and closing parentheses ( and ) mark capturing sections while \( and \) are plain parentheses.

Syntax Rules

[1] char

A character matches itself, unless it is a special character (metachar): . \ [ ] * + ^ $ and ( ) in posix mode.

[2] .

matches any character.

[3] \

matches the character following it, except:

    • \a, \b, \f, \n, \r, \t, \v match the corresponding C escape char, respectively BEL, BS, FF, LF, CR, TAB and VT;
      Note that       \r and \n are never matched because in Scintilla, regular expression searches are made line per line (stripped of end-of-line chars).

    • if not in posix mode, when followed by a left or right round bracket (see [7]);

    • when followed by a digit 1 to 9 (see [8]);

    • when followed by a left or right angle bracket (see [9]);

    • when followed by d, D, s, S, w or W (see [10]);

    • when followed by x and two hexa digits (see [11]);

Backslash is used as an escape character for all other meta-characters, and itself.

[4] [set]

matches one of the characters in the set.

If the first character in the set is ^, it matches the characters NOT in the set, i.e. complements the set.

A shorthand S-E (start dash end) is used to specify a set of characters S up to E, inclusive.

The special characters ] and - have no special meaning if they appear as the first chars in the set. To include both, put - first: [-]A-Z], or just add a backslash before each of them, like [A-Z\]\-]

example | match
[-]|] | matches these 3 chars,
[]-|] | matches from ] to | chars
[a-z] | any lowercase alpha
[^-]] | any char except - and ]
[^A-Z] | any char except uppercase alpha
[a-zA-Z] | any alpha

[5] *

any regular expression form [1] to [4] (except [7], [8] and [9] forms of [3]), followed by closure char (*) matches zero or more matches of that form.

For example, [a-z]* means "Zero or more occurrences of a lower case alpha character".

[6] +

same as [5], except it matches one or more.

Both [5] and [6] are greedy - they match as many characters as possible, until a mismatch is encountered.

[7]

a regular expression in the form [1] to [12], enclosed as \(form\) (or (form) with posix flag) matches what form matches. The enclosure creates a set of tags, used for [8] and for pattern substitution. The tagged forms are numbered starting from 1.

[8]

a \ followed by a digit 1 to 9 matches whatever a previously tagged regular expression ([7]) matched.

[9] \< \>

a regular expression starting with a \< construct and/or ending with a \> construct, restricts the pattern matching to the beginning of a word, and/or the end of a word. A word is defined to be a character string beginning and/or ending with the characters A-Z a-z 0-9 and _. The Editor extends this definition by user setting. The word must also be preceded and/or followed by any character outside those mentioned.

[10] \l

a backslash followed by d, D, s, S, w or W, becomes a character class (both inside and outside [] sets).

    • d: decimal digits

    • D: any char except decimal digits

    • s: whitespace (space, \t \n \r \f \v)

    • S: any char except whitespace (anything but space, \t \n \r \f \v)

    • w: alphanumeric and underscore (changed by user setting)

    • W: any char except alphanumeric and underscore (see above)

[11] \xHH

a backslash followed by x and two hexadecimal digits, becomes the character whose Ascii code is equal to these digits. If not followed by two digits, it represents the character 'x' itself.

[12]

a composite regular expression xy where x and y are in the form [1] to [10] matches the longest match of x followed by a match for y.

[13] ^ $

a regular expression starting with a ^ character and/or ending with a $ character, restricts the pattern matching to the beginning of the line, or the end of line. Elsewhere in the pattern, ^ and $ are treated as ordinary characters.

Acknowledgments

Most of this documentation was originally written by Ozan S. Yigit.
Additions by Neil Hodgson and Philippe Lhoste.
All of this document is in the public domain.


MAXScript Editor - Output Pane

The Tabbed MAXScript Editor introduced in 3ds Max 2008 is based on the Scintilla control and the free SciTE editor. The stand-alone version of the SciTE editor provides an Output pane which can be used to output feedback, results and error messages when working with stand-alone programming languages like Python or LUA. Since the MAXScript Listener is already split into two panes (MacroRecorder and Listener), the SciTE Output Pane could not be easily redesigned to host both while providing all features the MAXScript Listener already has.

In 3ds Max, the Output pane of the MAXScript Editor is used mainly by the Find In Files feature as well as by the Source Control Check In and Check Out operations which generally call an external application like Perforce or Subversion.

The Output pane is located by default at the bottom of the Editor - drag the divider to expand it. It can be optionally placed at the right side of the editor - see the Output Pane Properties for details.

Using the Windows Command Shell

Some of the standard features of the Output pane can still be used in 3ds Max, for example typing in 'cmd' will launch a Windows Command Shell providing all DOS commands available in the stand-alone shell of MS Windows:


MAXScript Editor - File Menu

The File menu of the Tabbed MAXScript Editor introduced in 3ds Max 2008 contains all file-related commands for creating, opening, closing, exporting and printing files.

Roll over and click a Menu Item to jump to description or topic:

  • New (CTRL+N) - creates a new script in a new tab. This is equivalent to selecting Main Menu > MAXScript > New Script. If the maximum number of windows has been reached and no more tabs can be opened, you will have to save / close some script to make space for new ones. The default tab limit is set to 10 and can be customized in the range from 1 to 100 via the Properties file .

  • Open… (CTRL+O) - open one or more existing files.

    • While the main function of the MAXScript Editor is to edit MAXScript files (.ms, .mcr), it can be used to edit any text files.

    • The File Open dialog is a multi-file dialog and lets you select and load multiple files into multiple tabs at once.

  • Open Selected Filename (CTRL+SHIFT+O) - opens the file name selected in the current Editor Window.

    • If the file name is inside a pair of quotation marks, the quotes should not be selected.

    • Both forward slashes /, backslashes \ and double-backslashes \\ are supported, as well as spaces inside the file name.

    • Only one file name can be opened at a time - selecting two lines containing two file names would not open both.

  • Close (CTRL+W) - as in most Windows applications, this option closes the current Editor Window (tab). The Editor itself will not be closed - it will stay open with at least one tab showing an Untitled script you can edit.

  • Save (CTRL+S) - saves the current script to disk or, if it is still untitled, opens the Save As dialog to specify a file name first.

  • Save As… (CTRL+SHIFT+S) - forces the Save As dialog to open to enter a new name even if the script already has a name.

  • Save a Copy… (CTRL+SHIFT+P) - opens a Save As dialog and saves a copy of the current script to the specified name without changing the file name of the script loaded in the Editor.

  • Revert (CTRL+R) - if the current file has been edited but not saved yet (has a * symbol next to its name), this option lets you revert to the last saved version of the file. You will be prompted about saving the changes to a new file first.

  • Export - shows a sub-menu with multiple export options. Each option opens an Export File As... dialog and exports to one of the following formats:

    • As HTML...

    • As RTF…

    • As PDF...

    • As LaTeX...

    • As XML...

  • Source Control - shows a sub-menu with source control options which can be used in conjunction with a source control software like Perforce or Subversion (if installed). See MAXScript Editor Properties - SourceControl for details on customizing the Editor to use external source control applications.

    • Add File

    • Remove File

    • Check In

    • Check Out

  • Page Setup… - opens the Page Setup dialog for printing preparations.

  • Print - opens the Windows printer selection dialog and prints the current file.

  • List Of Recent Files - the MAXScript Editor will keep a list of recently edited files for easier access. The list of recent editor files is stored in the file MXS_SciTE.recent in the 3ds Max root directory. You can edit this list manually or even using MAXScript to add files to the recent files menu.

  • Close Editor - closes the Editor window.
    NOTE that this only HIDES the Editor but does not remove any opened files currently loaded in it. The Editor can be opened again for further editing of the opened or new files via the Main Menu > MAXScript > MAXScript Editor… menu option or any of the other options for creating new or editing existing files described in MAXScript Tabbed Editor Window . The same menu option can be used to toggle the editor on and off.

Previous Topic

MAXScript Tabbed Editor Window

Next Topic

MAXScript Editor - Edit Menu


MAXScript Editor - Edit Menu

The Edit menu of the Tabbed MAXScript Editor introduced in 3ds Max 2008 contains commands for undoing/redoing changes, copying, deleting and selecting text, as well as tools for bracket-matching, auto-completing words, commenting and case-changing.

Roll over and click a Menu Item to jump to description or topic:

  • Undo (CTRL+Z) - undoes the last change to the current Window. Each Editor Window has its own independent Undo buffer. Default number of Undo operations is 500.

  • Redo (CTRL+Y) - takes back the latest undo operations.

  • Cut (CTRL+X) - cuts the currently selected text, removing it from the Editor and placing it into the Windows Clipboard.

  • Copy (CTRL+C) - copies the currently selected text, leaving it in the Editor and placing a copy into the Windows Clipboard.

  • Copy as RTF - copies the currently selected text to the Windows Clipboard using Rich Text Formatting to preserve syntax coloring and fonts.

  • Paste (CTRL+V) - inserts the content of the Windows Clipboard at the current cursor position.

  • Select All (CTRL+A) - selects all text in the current Editor Window.

  • Duplicate (CTRL+SHIFT+D) - duplicates the current selection, placing the copy directly after the source.

  • Delete (Del) - deletes the currently selected text.

  • Delete All (CTRL+Alt+D) - deletes all text from the current Editor Window.

  • Match Brace (CTRL+B) - jumps to the corresponding second parenthesis, bracket or brace.

  • Select to Brace (CTRL+SHIFT+B) - selects the text from the current opening or closing parenthesis, bracket or brace to the second one in the pair.

  • Complete Word (CTRL+ENTER) - provides auto-completion hints by popping up a window with possible words.

    • This feature uses the currently edited file as the source of suggestions, in other words once you have used a keyword in your code, you can use auto-complete to type it faster a second time. It does not use the internal list of MAXScript keywords.

    • The word should be partially written. For example, typing in "format" and "for" and then entering "fo" would provide both "for" and "format" as suggestions, while entering "for" will suggest only "format" because "for" is already completed. Similartly, having just "for" in the document and typing in "for" a second time will provide no suggestion because "for" IS the complete word. Having only "format" but not "for" in the document and asking for suggestions after typing in "for" will provide "format" as possible complete word.

  • Expand Abbreviation (CTRL+SHIFT+A) - expands a pre-defined abbreviation. Abbreviations can be defined in the file MXS_Editor_Abbrev.properties which is quickly accessible via the Tools >Open Abbreviations File Editor Menu option. See MAXScript Editor - Defining And Using Abbreviations for details.

  • Insert Abbreviation (CTL+SHIFT+R)- inserts a pre-defined abbreviation using a dialog listing all abbreviations in a list box which also allows the typing of an abbreviation.

  • Block Comment or Uncomment (CTRL+Q) - adds AND removes -- comment characters in front of all selected lines.

  • Box Comment (CTRL+SHIFT+C) - adds /* */ comment characters in the beginning and end of the currently selected text and * in front of every line. Other than Block Comments, it cannot be removed using the same command, the operation can either be undone or the comment characters have to be deleted manually.
    It can be used to create comment boxes, for example for script headers, like

/*

* THIS IS AN EXAMPLE OF BOX COMMENT

* Version 2008

* And this is the end

*/

  • Stream Comment (CTRL+SHIFT+Q) - adds /* */ comment characters in the beginning and end of the currently selected text. Other than Block Comments, it cannot be removed using the same command, the operation can either be undone or the comment characters have to be deleted manually.

  • Make Selection Uppercase (CTRL+SHIFT+U) - capitalizes the currently selected text, for example "This is a MAXScript example" will be changed to "THIS IS A MAXSCRIPT EXAMPLE".

  • Make Selection Lowercase (CTRL+U) - changes the currently selected text to lower case, for example "This is a MAXScript example" will be changed to "this is a maxscript example"

Previous Topic

MAXScript Editor - File Menu

Next Topic

MAXScript Editor - Search Menu


MAXScript Editor - Search Menu

The Search menu of the Tabbed MAXScript Editor introduced in 3ds Max 2008 contains commands for searching and replacing text, jumping to line, offset or bookmark and managing bookmarks.

Roll over and click a Menu Item to jump to its description:

  • Find (CTRL+F) - opens the Find dialog.

    • If a string is selected in the Editor, it is placed in the "Find what:" field automatically. Note that you can search for the currently selected string directly using CTRL+F3 and CTRL+SHIFT+F3 without opening the Find dialog.

    • Previously used search strings can be accessed via the drop-down list.

    • The default search direction is Down, but can be switched to Up using the "Direction" radio buttons.

    • By default, the string will be searched for as part of words. Check "Match whole word only" to search for exactly that word.

    • By default, the search is case-insensitive. Check "Match case" to search for exact match including case.

    • Check the "Regular expression" option to search using a RegEx. See Regular Expressions Find and Replace in the MAXScript Editor for details on using Regular expressions.

    • By default, "Wrap around" is checked, meaning that the search will continue from the beginning of the file once the end is reached. To stop at the end (or beginning when searching Up), uncheck this option.

    • Check the "Transform backslash expressions" to convert special characters prefixed by a backslash like \t, \n etc. into their corresponding characters like <tab>. <newline> etc. For example, entering \n in the "Find what" field and checking this option will find all new line characters in the document. If the option is unchecked, it would only find "\n" verbatim occurrences, for example inside of formatting strings.
      The escape characters are:

      • \\ backslash

      • \n new line

      • \r carriage return

      • \t tab

This option is incompatible with Regular Expressions and is disabled when the "Regular Expression" option is selected.

    • Press the "Find Next" button to find the next occurrence of the search string in the specified direction.

    • Press the "Mark All" button to add a Bookmark in front of each line with an occurrence of the search string and close the dialog.

    • Press the "Close" button to close the Find dialog.

  • Find Next (F3) - press multiple times to use the last entered search string according to the latest settings in the dialog. Note that the settings are persistent between sessions, so the last string you entered would still be there next time you launch 3ds Max and press F3 or CTRL+F.

  • Find Previous (SHIFT+F3) - searches in the opposite direction to the one specified in the Find dialog via the Direction radio buttons.

  • Replace (CTRL+H) - searches for occurrences of a given string and replaces it with another string.

    • The Replace dialog provides controls similar to those in the Find dialog. The main difference is the "Replace with:" field which can be used just like the "Find what:" field to either enter a replacement string or select one of the latest replacement strings via the drop-down list.

    • The "Find Next" button finds the next occurrence of the search string without replacing it.

    • The "Replace" button replaces the currently selected occurrence of the find string, for example the one found using the "Find Next" button, with the replace string.

    • The "Replace All" button replaces all occurrences of the find string in the whole document with the replace string.

    • The "Replace in Selection" button replaces all occurrences of the search string with the replacement string within the currently selected text only. For example, if you want to replace a keyword within a single function only, you could select the function's body and use the "Replace In Selection" button.

  • Find in Files (CTRL+SHIFT+F) - open the Find in Files dialog.

    • The Find in Files dialog provides a "Find what:" field to enter the string to search for in specified files. The field is also a drop-down list containing the latest search strings.

    • The Files field contains by default the typical MAXScript file extensions, but can be used to specify arbitrary file name patterns using wildcards. The field is also a drop-down list containing the latest search patterns.

    • The Directory field can be used to specify the root directory for the search. The specified directory and all its subdirectories will be searched recursively for files of the given file name pattern containing the search string. The field is a drop-down list containing the latest search paths.

    • The button to the right of the Directory field can be used to remove one folder name at a time from the path, effectively moving one directory up.

    • The Browse… button can be used to select a search path via a Get Directory dialog.

    • The Match whole word only checkbox lets you search for complete words. When unchecked (default), a sub-string search will be performed.

    • The Match Case checkbox lets you search for the exact word including case. By default, a non-case-sensitive search will be performed.

    • To search using the specified settings, press the Find button. To cancel, press the Cancel button.

    • The results of the search will be displayed in the Output pane of the Editor which is hidden either at the bottom or at the right side of the Editing pane.

    • Double-clicking a search result file name in the Output pane will open that file in a new tab in the Editing pane and will select the line the search string appears on, marking the match with a yellow dot.

  • Go To (CTRL+G) - opens a Go To dialog which can be used to jump to a specific line number or character offset. The numbers could be copied from error messages in the MAXScript Listener or Debugger. The dialog also shows the current and last line and offset.

  • Next Bookmark (F2) - jumps to the next Bookmark.

  • Previous Bookmark (SHIFT+F2) - jumps to the previous Bookmark.

  • Toggle Bookmarks (CTRL+F2) - toggles a Bookmark on / off for the current line.

  • Clear All Bookmarks - toggles off all Bookmarks in the current document.

Previous Topic

MAXScript Editor - Edit Menu

Next Topic

MAXScript Editor - View Menu


MAXScript Editor - View Menu

The View menu of the Tabbed MAXScript Editor introduced in 3ds Max 2008 contains commands for folding/unfolding code blocks, toggling various editor elements and displaying additional editing helps like whitespaces, end of line symbols, indentation guides, line numbers and margins.

Roll over and click a Menu Item to jump to its description:

  • Toggle current fold - folds/unfolds the code block the cursor currently resides in.

  • Toggle all folds - folds/unfolds all code blocks in the document, regardless of their current state. In other words, if a script contains 10 possible folds and 5 of them are folded and 5 are not, this command will not invert their current folding but either fold all or unfold all.

  • Full Screen (F11) - opens the Editor on the whole screen, removing the title bar to provide even more editing space. Press again to toggle back to normal window.

  • Toolbar - unchecked by default. When checked, a toolbar with the most important commands represented in icon form will be displayed - New, Open, Save, Close, Print, Cut, Copy, Paste, Delete, Undo, Redo, Find and Replace.

  • Tab Bar - checked by default, the tab bar displays all currently opened files as tabs. Even when the tab bar is not displayed, you can use the shortcuts or the Windows menu to switch between tabs.

  • Status Bar - checked by default.

    • The default status bar displays the line (li), column (co), offset, insert/overwrite mode and end of line characters mode.

    • Multiple status bars can be defined and display different information. By default, there are 4 pre-defined status bars which can be switched by clicking on the status bar.

    • All status bars can be customized and new status bars can be defined - see MAXScript Editor - Defining Custom Status Bars for details.

  • Whitespace (CTRL+SHIFT+8) - unchecked by default. When checked, white spaces like tabs and spaces will be displayed as symbols.

  • End Of Line (CTRL+SHIFT+9) - unchecked by default. When checked, end of line characters will be displayed:

  • Indentation Guides - checked by default. When unchecked, the vertical guides helping align brackets and indentation will not be drawn:

  • Line Numbers - checked by default. When unchecked, no line numbers will be displayed in front of each line. The status bar could be used to read the current position.

  • Margin - checked by default. The margin is used to display the Bookmarks.

    • When unchecked, the margin will be disabled. To keep Bookmarks visible, the Editor will color the Bookmarked lines' background - you can still use F2 / SHIFT+F2 to jump to the next / previous Bookmark and so on.

  • Fold Margin - checked by default. When unchecked, the fold margin will not be displayed. You can still fold the current code block or all code blocks using the menu commands or keyboard shortcuts, but you cannot click with the mouse on the fold +/- symbols anymore.

Previous Topic

MAXScript Editor - Search Menu

Next Topic

MAXScript Editor - Tools Menu


MAXScript Editor - Tools Menu

The Tools menu of the Tabbed MAXScript Editor introduced in 3ds Max 2008 contains commands for script evaluation, access to the Visual MAXScript Editor and options to edit the various Option and Property files defining the functionality of the Editor.

Roll over and click a Menu Item to jump to topic:

  • Evaluate All (CTRL+E) - like in the legacy editor, this command will evaluate the whole script loaded in the current tab.

  • Evaluate Line / Selection (CTRL+ENTER) - like in the legacy editor and the Listener, this command will evaluate the current line or selection. Pressing CTRL+ENTER is equivalent to pressing the NumPad Enter key which can be used alternatively.

  • Edit Rollout - opens the Visual MAXScript Editor to edit the currently selected rollout. If no rollout is selected, a new rollout will be created.

  • New Rollout - opens the Visual MAXScript Editor and creates a new rollout at the current cursor position.

  • Next Message (F4) - goes to the next message in the Output pane.

  • Previous Message (SHIFT+F4) - goes to the previous message in the Output pane.

  • Clear Output (SHIFT+F5) - clears the Output pane.

  • Switch Pane (CTRL+F6) - switches between the Editor and the Output pane.

  • Open User Options File - opens the MXS_EditorUser.properties file for editing. If the file does not exist, an empty file will be generated by the Editor. It can be saved to the 3ds Max root directory by the user. It can contain the same settings as Global Options (see below), but settings made here will override those in the global file. This is useful for tweaking settings without deleting the global settings. Remarking or deleting the user overrides will enable the global settings again.

  • Open Global Options File - opens the global options file MXS_Editor.properties. See MAXScript Editor - Properties File Settings for details on supported settings.

  • Open Abbreviations File - opens the abbreviations file MXS_EditorAbbrev.properties for editing. See MAXScript Editor - Defining And Using Abbreviations for details on defining and using abbreviations.

  • Open MAXScript.properties - opens the MAXScript.properties file for editing. It is used to customize the MAXScript lexer which performs the MAXScript-specific color coding, as well as settings associated with editing MAXScript format files such as the file extensions for MAXScript files, the auto-generated keyword lists, keywords12 for adding custom keywords, options related to folding, the definition of the various styles and a couple of additional file formats. See MAXScript Editor - Customizing Syntax Color Schemes

  • Open html.properties - opens the HTML properties file.

Previous Topic

MAXScript Editor - View Menu

Next Topic

MAXScript Editor - Options Menu


MAXScript Editor - Options Menu

The Options menu of the Tabbed MAXScript Editor introduced in 3ds Max 2008 contains options to control various behaviors of the Editor as well as commands for fixing line end characters, changing indentation settings and switching between proportional and monspaced font dispaly.

Roll over and click a Menu Item to jump to topic:

  • Always On Top - Unchecked by default. When checked, forces the MAXScript Editor to stay on top of all windows including other 3ds Max floaters and any other applications.

  • Vertical Split - Unchecked by default. When checked, the Output Pane will be placed at the right side of the Editor Pane. When unchecked, it will be at the bottom.

  • Wrap - When unchecked (default), lines longer than the width of the Editor Pane will only be displayed partially. When checked, text lines longer than the width of the Editor Pane will be wrapped and shown as multiple lines, allowing you to see all the text.

  • Wrap Output - When unchecked (default), lines longer than the width of the Output Pane will only be displayed partially. When checked, text lines longer than the width of the Output Pane will be wrapped and shown as multiple lines, allowing you to see all the text.

  • Read-Only - Unchecked by default. When checked, the current document will be made read-only - typing into it will be disabled, but you will be able to select and copy text from it.

  • Fixup Line End Characters - corrects the Line End characters by adding an LF where the line ends with CR only.

  • Change Indentation Settings… (CTRL+SHIFT+I) - opens a dialog controlling the type and number of the indentation characters.

    • Tab Size - defines the width of a tab measured in space characters. Default is 4.

    • Indent Size - defines the number of spaces to use for indentation when tabs are not used. Default is 4.

    • Use Tabs - when checked, tabs of the specified size will be used to indent code automatically or when the TAB key is pressed. When unchecked, spaces of the specified count will be inserted instead.

    • Convert - press this button to convert tabs to spaces in the beginning of a line when Use Tabs is unchecked and spaces to tabs when Use Tabs is checked.

  • Use Monospaced Font (CTRL+F11) - toggles between proportional and monospaced fonts. In the latter case, all characters have the same pixel size so all lines align perfectly.

Previous Topic

MAXScript Editor - Tools Menu

Next Topic

MAXScript Editor - Language Menu


MAXScript Editor - Language Menu

The Language menu of the Tabbed MAXScript Editor introduced in 3ds Max 2008 contains commands for switching the syntax coloring between the currently installed modes:

Roll over and click a Menu Item to jump to topic:

  • Text (SHIFT+F11) - no syntax coloring

  • MAXScript - default for .ms and .mcr files

  • Properties - default for .properties files

  • Hypertext - default for HTML files

  • XML - default for XML files

Previous Topic

MAXScript Editor - Options Menu

Next Topic

MAXScript Editor - Windows Menu


MAXScript Editor - Windows Menu

The Windows menu of the Tabbed MAXScript Editor introduced in 3ds Max 2008 contains commands for switching between multiple opened files, closing and saving all and switching to any of the opened files directly.

Roll over and click a Menu Item to jump to topic:

  • Previous (SHIFT+F6) - Switched the focus to the previous file.

  • Next (F6) - Switched the focus to the next file.

  • Close All - Closes all opened files. If any of the files requires saving, you will be prompted to confirm the saving before closing or close without saving for each of them.

  • Save All - Saves all opened files that require saving.

  • List of opened files - Provides a list of all files currently in the editor.

    • You can also access them using the number keys from 1 to 0 while in the menu.

    • Files that need saving will display a * next to the name.

    • The current file will have a checkmark in front of its name.

Previous Topic

MAXScript Editor - Language Menu

Next Topic

MAXScript Editor - Help Menu


MAXScript Editor - Help Menu

The Help menu of the Tabbed MAXScript Editor introduced in 3ds Max 2008 contains commands for opening the MAXScript Reference and the Editor's About box.

Roll over and click a Menu Item to jump to topic:

  • Help (F1) - Selecting the Help item or pressing the F1 key opens the MAXScript Reference. If the caret is placed inside a word, the word will be entered into the Index tab of the Help dialog automatically, performing an index search for that keyword. For example, typing in 'box', placing the caret inside the word and selecting the Help menu item or pressing F1 will open the MAXScript Reference at the topic discussing the creation of box objects.

  • About MXS SciTE - Selecting this item opens the following about dialog:

Previous Topic

MAXScript Editor - Windows Menu


MAXScript Editor - Properties File Settings

The Tabbed MAXScript Editor introduced in 3ds Max 2008 can be customized by editing the MXS_Editor.properties and MAXScript.properties files located in the 3ds Max root folder.

To quickly access these two files, use the Tools>Open Global Options File and Tools>Open User Options File menu items in the Editor's menu bar.

The following is a sub-set of all properties supported by the Scintilla control the MAXScript Editor is based upon. These settings can be customized in the global properties file MXS_Editor.properties or the user-generated MXS_EditorUser.properties. Both files are located in the 3ds Max root folder.

For details on the MAXScript-specific settings like file formats and color coding, see the MAXScript-Specific Language Settings and Customizing Syntax Color Schemes topics.

NOTE:

The Scintilla control and the MAXScript SciTE Editor use UK English spelling.
Thus, color-related properties contain the keyword "colour" instead of "color".

The following documentation is based on the document found at
http://scintilla.sourceforge.net/SciTEDoc.html

Directory Property Files

properties.directory.enable (MAXScript default: not set)

When set to 1, enables the evaluation of the directory properties file. The Directory Properties file should be called "SciTEDirectory.properties" and can contain local properties overriding the global properties. See MAXScript Editor - Customizing Syntax Color Schemes for details.

The default is 0 which disables the evaluation of directory property files.

Editor Position

position.left (MAXScript default:0)

position.top (MAXScript default:0)

position.width (MAXScript default:576)

position.height (MAXScript default:740)

These properties set the initial window size and position.

If these are omitted then the environment's defaults are used.

If the width or height properties are set to -1 then the window is maximized.

Windows (Buffers) Properties

NOTE:

The multiple windows represented by tabs in the Editor's user interface are called "buffers" in Scintilla lingo, thus the property names.

buffers (MAXScript default:10)

Set this propertry to a number between 1 and 100 to enable that many buffers.

Values outside this range are clamped to be within the range.

The default is 1 which turns off UI features concerned with buffers.

This value is read only once, early in the startup process and only from the global properties files.

NOTE:

After changing this property, 3ds Max has to be restarted to see the effect.

buffers.zorder.switching (MAXScript default:not set)

This setting chooses the ordering of windows switching when Ctrl+Tab is pressed.

If set to 1, the windows are switched in the order of their previous selection.

If set to 0 (default) the windows are are switched based on the buffer number.

tabbar.visible (MAXScript default:1)

tabbar.hide.one (MAXScript default:not set)

Setting tabbar.visible to 1 makes the tab bar visible at start up.

The buffers property must be set to a value greater than 1 for this option to work.

Setting tabbar.hide.one to 1 hides the tab bar until there is more than one tab.

tabbar.multiline (MAXScript default:not set)

Setting tabbar.multiline uses multiple lines for the tab bar, thus fitting more tabs on screen at the same time.

NOTE:

After changing this property, 3ds Max has to be restarted to see the effect.

File Loading Properties

read.only (MAXScript default:not set)

When this option is set to 1, opened documents will be initially read only.

New files will not be affected by this setting.

openpath.<filepattern> (MAXScript default:not set)

Defines a path for the File>Open Selected Filename command.

The path is searched if the selected filename doesn't contain an absolute path or the file is not found in the current directory.

The directories in openpath are separated by a semi-colon ';'

An openpath setting may look like:

openpath.*.txt=c:\dos\;f:\;

open.suffix.<filepattern> (MAXScript default:not set)

Defines a suffix to add to the selected file name for the Open Selected Filename command in the File menu.

An open.suffix setting may look like:

open.suffix.*.ms=.ms

open.filter (MAXScript default:see below)

This is a complex expression used for determining the file types that will be available in the open file dialog.

For each type of file, there is some explanatory text, a '|' character, some file patterns, and another '|' character.

The line continuation character '\' can be used to spread these items out, one per line.

These file types appear in the "Files of type:" drop-down list. The first item is the default, so you may wish to change the first item to include the file types you commonly open.

MAXScript Shipping Defaults:

open.filter=\

$(filter.MAXScript)\

$(filter.text)\

$(filter.data)\

$(filter.properties)\

$(filter.web)\

$(all.files)

max.file.size (MAXScript default:not set)

To avoid loading huge files from slow media by accident, or just to ensure the Editor is used to edit human readable code only, you can set the max.file.size property to specify a load file size limit in bytes.

If not set or set to 0, there is no limit.

If set to a given byte size and if a file to be loaded exceeds this limit, the user will be asked if the file has to be loaded.

If accepted, the file will be loaded as usual.

If rejected, the file will not be loaded.

open.dialog.in.file.directory (MAXScript default:not set)

Setting open.dialog.in.file.directory to 1 causes the open dialog to initially display the same directory as the current file.

If it is 0 or not set, the last directory visited by the open dialog of the Editor will be used.

File Saving Properties

strip.trailing.spaces (MAXScript default:not set)

When set to 1, trailing white spaces will be stripped from the file while saving.

ensure.final.line.end (MAXScript default:not set)

Ensures the file ends with a line end when saved.

ensure.consistent.line.ends (MAXScript default:1)

When set to 1, ensures that all lines end with the current Line End Characters setting when saved.

save.deletes.first (MAXScript default:not set)

When set to 1, causes files to be deleted before being opened for saving.

Can be used to ensure saving under a different capitalization changes the files capitalization rather than silently using the old capitalization.

quit.on.close.last (MAXScript default:not set)

If this option is set to 1, the Editor will close when the last edited file has been closed, e.g. with File/Close or Ctrl+W.

By default, if this option is not set, the Editor will remain open and will create a new blank document when its last buffer is closed.

save.recent (MAXScript default:1)

Setting save.recent to 1 causes the most recently used files list to be saved on exit in a file and reloaded at start up.

The file is called MXS_SciTE.recent and is located in the 3ds Max root directory.

save.session (MAXScript default:not set)

If you set save.session=1, the current session will be automatically saved to a file MXS_SciTE.ses in the 3ds Max root directory.

When you start 3ds Max next time, the last session will be automatically loaded.

Reload Properties

load.on.activate (MAXScript default: not set)

save.on.deactivate (MAXScript default: not set)

When set to 1, the load.on.activate property causes the Editor to check whether the current file has been updated by another process whenever it is activated. This is useful when another editor such as a WYSIWYG HTML editor, is being used in conjunction with the Editor.

When set to 1, the save.on.deactivate property causes the Editor to save the file whenever it loses focus. This is useful when developing web pages and you want to often check the appearance of the page in a browser.

reload.preserves.undo (MAXScript default: not set)

When set to 1, reloading a file does not delete all the undo history.

This is useful when load.on.activate is used in conjunction with filter commands.

Prompts

are.you.sure (MAXScript default:1)

Normally, when the Editor is about to close a file which has unsaved edits it asks this question.

To turn off the question, set are.you.sure to 0 and files will be automatically saved without bothering the user. To abandon edits to a file use the New command. It always asks "Are you sure?" giving an opportunity to not save the file.

are.you.sure.on.reload (MAXScript default: not set)

When both this and load.on.activate are set to 1, the Editor will ask if you really want to reload the modified file, giving you the chance to keep the file as it is.

By default this property is disabled, causing the Editor to reload the file without bothering you if load.on.activate is set to 1.

View Properties

view.whitespace (MAXScript default:0)

view.indentation.whitespace (MAXScript default:1)

Setting view.whitespace to 1 makes the Editor start up with whitespace visible.

Setting view.indentation.whitespace to 0 hides visible whitespace inside indentation.

view.indentation.guides (MAXScript default:1)

highlight.indentation.guides (MAXScript default:1)

Setting view.indentation.guides to 1 displays dotted vertical lines within indentation white space every indent.size columns.

Setting highlight.indentation.guides to 1 highlights the indentation guide associated with a brace when that brace is highlighted.

whitespace.fore (MAXScript default: not set)

whitespace.back (MAXScript default: not set)

Sets the colous used for displaying all visible whitespace, overriding any styling applied by the current lexer .

view.eol (MAXScript default: not set)

Setting this to 1 makes the Editor display the characters that make up line ends. This looks similar to [CR], [LF], or [CR][LF].

This is useful when using files created on another operating system with software that is picky about line ends.

eol.mode (MAXScript default: not set)

The default EOL mode (characters that make up line ends) depends on the platform the file was created on.

You can overwrite this behavior by setting the property to

CRLF - for DOS/Windows format

LF - for UNIX format

CR - for Macintosh format

eol.auto (MAXScript default:1)

This setting overrides the eol.mode value and chooses the end of line character sequence based on the current contents of the file when it is opened. The line ending used the most in the file is chosen.

magnification (MAXScript default: not set)

output.magnification (MAXScript default: not set)

This property sets the initial magnification factor. It is useful when you want to change the size of text globally, such as after changing the screen resolution without having to touch every style setting.

0 is default, negative values make the size smaller and positive values make it larger.

Code Page Properties

code.page (MAXScript default:-1)

output.code.page (MAXScript default: not set)

To support a DBCS language such as Japanese, a code page can be set here. This ensures that double byte characters are always treated as a unit so the caret is never located between the two bytes of a double byte character. On Windows, 0 (single byte character set) and 65001 (UTF-8) will work and settings that may work, depending on how Windows is set up, include 932 (Japanese Shift-JIS), 936 (Simplified Chinese GBK), 949 (Korean), 950 (Traditional Chinese Big5), and 1361(Korean Johab).

Setting code.page to 65001 starts Unicode mode and the document is treated as a sequence of characters expressed as UTF-8. Display is performed by converting to the platform's normal Unicode encoding first so characters from any language will be displayed. Correct glyphs will only be displayed if fonts are chosen that contain the appropriate glyphs. Tahoma is a good choice on Windows 2000.

This property can not set a single byte character set.

Fonts with an "iso10646" registry should be used in a font set. Font sets are a '|' separated list of partial font specifications where each partial font specification can be in the form of foundry-fontface-charsetregistry-encoding *OR* fontface-charsetregistry-encoding *OR* foundry-fontface *OR* fontface. An example is "misc-fixed-iso10646-1|*".

If output.code.page is set then it is used for the output pane which otherwise matches the edit pane.

character.set (MAXScript default: not set)

This setting allows changing the character set that is asked for when setting up fonts.

To use Japanese characters, set character.set to 128.

Other values that may work include

Chinese (GB2312=134 or BIG5=136),

Korean (129),

Greek (161),

Eastern European (238),

Baltic (186),

Turkish (162),

Hebrew (177),

Arabic (178),

Thai (222).

To use Cyrillic characters, set character.set=204 (CP1251 encoding).

Font Properties

font.monospace (MAXScript default: font:Courier New,size:10)

Defines the font name and size to be used when the Use Monospaced Font command is performed using the same syntax as the style properties described in the MAXScript-Specific Language Settings topic.

Margin Properties

blank.margin.left (MAXScript default: 4)

blank.margin.right (MAXScript default: 4)

There is a blank margin on both sides of the text. It is drawn in the background color of default text.

This defaults to one pixel for both left and right sides but may be altered with these settings.

margin.width (MAXScript default:16)

Setting this to a number makes the Editor display a selection margin to the left of the text.

The value is the selection margin in pixels.

Line markers are displayed in the selection margin area.

fold.margin.colour (MAXScript default: not set)

fold.margin.highlight.colour (MAXScript default: not set)

These two properties defined the fold margin color and fold margin highlight color.

If they are not defined, the colors for the fold margin will default to a reasonable pair of colors - the system colors will used to make the fold margin appear like the background of scroll bars.

FOR EXAMPLE,

fold.margin.colour=#FF0000

fold.margin.highlight.colour=#0000FF

makes the fold margin to appear as a mixture of red and blue:

full.screen.hides.menu (MAXScript default: not set)

Setting this property to 1 hides the menu bar when the Editor is switched to Full Screen mode. Default is 0.

minimize.to.tray (MAXScript default: not set)

Setting this property to 1 minimizes the Editor to the system tray rather than to the task bar.

Default is 0.

line.margin.visible (MAXScript default: 1)

line.margin.width (MAXScript default: 3+)

The Editor is able to display a column of line numbers to the left of the selection margin.

Setting line.margin.visible to 1 makes this column visible at startup.

The line.margin.width property controls how much space is reserved for the line numbers, in terms of the number of digits that can be displayed.

To specify that the margin should expand if needed to accomodate larger line numbers, add a '+' after the number of digits,

FOR EXAMPLE,

line.margin.width=3+

Selection Properties

selection.fore (MAXScript default: not set)

selection.back (MAXScript default: #000000)

selection.alpha (MAXScript default: 30)

Sets the colors used for displaying selected text.

If one of these is not set then that attribute is not changed for the selection.

The default is to show the selection by changing the background to light grey and leaving the foreground the same as when it was not selected.

The translucency of the selection is set with selection.alpha.

FOR EXAMPLE,

line.margin.width=3+

Caret (Cursor) Properties

caret.fore

Sets the color used for the caret (cursor).

caret.line.back (MAXScript default: not set)

caret.line.back.alpha (MAXScript default: not set)

The caret.line.back property sets the background color used for the line containing the caret.

The caret.line.back.alpha property sets the translucency used for the line containing the caret.

Translucency ranges from 0 for completely transparent to 255 for opaque.

256 means opaque and not using translucent drawing code which may be slower.

caret.period (MAXScript default:)

Sets the rate at which the caret blinks.

The value is the time in milliseconds that the caret is visible before it is switched to invisible. It then stays invisible for the same period before appearing again.

A value of 0 stops the caret from blinking.

caret.width (MAXScript default:)

Sets the width of the caret in pixels.

Valid values are 1, 2, or 3.

caret.policy.xslop (MAXScript default:)

caret.policy.width (MAXScript default:)

caret.policy.xstrict (MAXScript default:)

caret.policy.xeven (MAXScript default:)

caret.policy.xjumps (MAXScript default:)

caret.policy.yslop (MAXScript default:)

caret.policy.lines (MAXScript default:)

caret.policy.ystrict (MAXScript default:)

caret.policy.yeven (MAXScript default:)

caret.policy.yjumps (MAXScript default:)

If slop is set, we can define a slop value: width for xslop, lines for yslop.
This value defines an unwanted zone (UZ) where the caret is... unwanted.
This zone is defined as a number of pixels near the vertical margins, and as a number of lines near the horizontal margins.
By keeping the caret away from the edges, it is seen within its context, so it is likely that the identifier that the caret is on can be completely seen, and that the current line is seen with some of the lines following it which are often dependent on that line.

If strict is set, the policy is enforced strictly.
The caret is centred on the display if slop is not set, and cannot go in the UZ if slop is set.

If jumps is set, the display is moved more energetically so the caret can move in the same direction longer before the policy is applied again.
'3UZ' notation is used to indicate three time the size of the UZ as a distance to the margin.

If even is not set, instead of having symmetrical UZs, the left and bottom UZs are extended up to right and top UZs respectively.
This way, we favour the displaying of useful information: the begining of lines, where most code resides, and the lines after the caret, eg. the body of a function.

See the table below to see how these settings interact.
Default: xslop, yslop, xeven, yeven=1, width=50, all others = 0.

slop | strict | jumps | even | Caret can go to the margin | When reaching limit (going out of visibility or going into the Unwanted Zone - UZ) display is...
0 | 0 | 0 | 0 | Yes | moved to put caret on top/on right
0 | 0 | 0 | 1 | Yes | moved by one position
0 | 0 | 1 | 0 | Yes | moved to put caret on top/on right
0 | 0 | 1 | 1 | Yes | centered on the caret
0 | 1 | - | 0 | Caret is always on top/on right of display | -
0 | 1 | - | 1 | No, caret is always centered | -
1 | 0 | 0 | 0 | Yes | moved to put caret out of the asymmetrical UZ
1 | 0 | 0 | 1 | Yes | moved to put caret out of the UZ
1 | 0 | 1 | 0 | Yes | moved to put caret at 3UZ of the top or right margin
1 | 0 | 1 | 1 | Yes | moved to put caret at 3UZ of the margin
1 | 1 | - | 0 | Caret is always at UZ of top/right margin | -
1 | 1 | 0 | 1 | No, kept out of UZ | moved by one position
1 | 1 | 1 | 0 | No, kept out of UZ | moved to put caret at 3UZ of the margin

caret.sticky (MAXScript default:)

Controls when the last position of the caret on the line is modified.

When set to 1, the position is not modified when you type a character, a tab, paste the clipboard content or press backspace.

The default is 0 which turns off this feature.

Visible Policy Properties

visible.policy.strict (MAXScript default:)

visible.policy.slop (MAXScript default:)

visible.policy.lines (MAXScript default:)

Determines how the display area is determined after a Go to command or equivalent such as a Find or Next Message. Options are similar to caret.policy.

Edge Mode Properties

edge.mode (MAXScript default: 0)

edge.column (MAXScript default: 200)

edge.colour (MAXScript default: #CODCCO)

Indicates long lines.

Possible values are:

0 - default, does not indicate long lines.

1 - uses a vertical line to indicate the specified column and

2 - changes the background color of characters beyond that column.

NOTE:

For proportional fonts, an edge.mode of 2 is more useful than 1.

Control Character Symbol Properties

control.char.symbol (MAXScript default: not set)

Sets the character to use to indicate control characters.

If not set, control characters are shown as mnemonics.

Error Marker Properties

error.marker.fore (MAXScript default: not used)

error.marker.back (MAXScript default: not used)

The colors used to indicate error and warning lines are set with these two values.

If there is a margin on a pane then a symbol is displayed in the margin to indicate the line causing the error message for the edit pane.

The error.marker.back is used as the fill color of the symbol and the error.marker.fore as the outline color.

If there is no margin then the background to the line is set to the error.marker.back color.

Bookmark Properties

bookmark.fore (MAXScript default: not set)

bookmark.back (MAXScript default: not set)

bookmark.alpha (MAXScript default: not set)

The colors used to display bookmarks in the margin.

If bookmark.fore is not set then a blue sphere is used.

When the margin is turned off, bookmarks are shown by a change in the background color of the line with the translucency set with bookmark.alpha.

Fold Properties

fold (MAXScript default: 1)

fold.margin.width (MAXScript default: 12)

fold.symbols (MAXScript default: 3)

fold.on.open (MAXScript default: not set)

Options to control folding.

Folding is turned on be setting fold to 1.

The fold.symbols setting chooses between four ways of showing folding.

Set to 0 (the default) for MacOS style arrows to indicate contracted (facing right) and expanded (facing down);

1 to display contracted folds with "+" and expanded with "-";

2 for a flattened tree control with round headers and rounded joins;

3 for a flattened tree control with square headers.

To automatically fold files as much as possible when loaded, set fold.on.open to 1.

fold.compact (MAXScript default: 0)

For HTML, XML, Lua and C++ and similar files, turning this option on leads to blank lines following the end of an element folding with that element. Defaults to on.

fold.html (MAXScript default: not set)

Folding is turned on or off for HTML and XML files with this option. The fold option must also be on for folding to occur.

Title Properties

title.full.path (MAXScript default: 1)

Chooses how the file name is displayed in the title bar.

When 0 (default) the file name is displayed.

When 1 the full path is displayed.

When 2 the window title displays "filename in directory".

title.show.buffers (MAXScript default: not set)

When set to 1 shows the current buffer number in the title bar.

Indentation and Tabs Properties

tabsize (MAXScript default: 8)

tab.size.<filepattern> (MAXScript default: not set)

indent.size (MAXScript default: 8)

indent.size.<filepattern> (MAXScript default: not set)

use.tabs (MAXScript default: 1)

use.tabs.<filepattern> (MAXScript default: not set)

indent.auto (MAXScript default: not set)

tab.indents (MAXScript default: not set)

backspace.unindents (MAXScript default: not set)

Sets the size of a tab as a multiple of the size of a space character in the style of the default style definition.

The indent size is the size to use when performing automatic indentation and may be different from the tab size. Many people use a tab size of 8 but 4 character indentation.

When creating indentation, use.tabs determines whether the indentation is made up purely from space characters or from a mix of tabs and spaces using as many tabs as possible.

The global tabsize, indent.size, and use.tabs properties can be overridden for files that match a pattern by using the file pattern forms:

indent.size.*.pas=3

If indent.auto is set then indent.size and use.tabs are set according to the contents of the opened document.

If tab.indents is set then pressing Tab within indentation whitespace indents by indent.size rather than inserting a tab character.

If backspace.unindents is set to 1 then pressing Backspace within indentation whitespace unindents by indent.size rather than deleting the character before the caret.

indent.automatic (MAXScript default: 1)

indent.opening (MAXScript default: 0)

indent.closing (MAXScript default: 0)

indent.maintain.<filepattern> (MAXScript default: not set)

Determines the look of automatic indentation.

Automatic indentation is turned on with indent.automatic=1.

To indent a brace line after a compound statement start set indent.opening=1, likewise for the terminating brace.

FOR EXAMPLE,

indent.automatic=0

indent.opening=0

With both set to 0, the result look like this:

if i == 10 do

(

    print "Yes!"

)

indent.automatic=1

indent.opening=1

With both set to 1, the result look like this:

if i == 10 do

    (

    print "Yes!"

    )

Automatic indentation may be changed to simply repeat the indentation of the previous line for some files with indent.maintain.<filepattern>=1 which overrides the other language specific settings.

statement.indent.<filepattern> (MAXScript default: set internally)

statement.end.<filepattern> (MAXScript default: not set)

statement.lookback.<filepattern> (MAXScript default: not set)

block.start.<filepattern> (MAXScript default: not set)

block.end.<filepattern> (MAXScript default: not set)

Each of these settings starts with a style number and then a set of words or characters that define how to recognise that feature. If there is a second space in the setting then it is a set of words, otherwise a set of characters. The set of keywords used to indicate the start of a compound statement is defined in statement.indent.

FOR EXAMPLE,

statement.indent.$(file.patterns.cpp)=5 if else while

says that for C++ the words "if", "else", and "while" in keyword style, 5, start compound statements which leads to the next line being indented if no other factors affect it. However, if a statement end is found on the same line then the next line is not indented. For C++ the statement end is the semicolon in the operator style, so this is defined:

statement.end.$(file.patterns.cpp)=10 ;

The number of lines looked at to determine indentation can be set with statement.lookback. This can be used either to bound the amount of time spent on this task or to specify that only the last line be examined for indentation.
The block.start and block.end properties define the language elements used to bracket groups of statements. In C++ these are '{' and '}'.

vc.home.key (MAXScript default: 1)

Chooses the behaviour of the Home and Shift+Home keys.

1 (default) is like Visual C++ moving the caret to the end of the line indentation unless already there, in which case it moves to the start of the line.

0 moves to the start of the line.

Find / Replace Properties

find.mark (MAXScript default: not set)

If set, then the Mark All command in the Find dialog will draw translucent boxes over each string found.

find.replace.matchcase (MAXScript default: not set)

find.replace.regexp (MAXScript default: not set)

find.replace.wrap (MAXScript default: not set)

find.replace.escapes (MAXScript default: not set)

find.replacewith.focus (MAXScript default: not set)

These properties define the initial conditions for find and replace commands.

The find.replace.matchcase property turns on the "Match case" option, find.replace.regexp the "Regular expression" option, find.replace.wrap the "Wrap around" option and find.replace.escapes the "Transform backslash expressions" option.

If the find.replacewith.focus property is set, the "Replace With" input box is focused in Replace dialog if "Find What" is non-empty.

find.replace.regexp.posix (MAXScript default: not set)

Change the behavior of the Regular Expression search.

If set to 0 (the default), the characters '(' and ')' must be escaped by '\' to behave as RegEx meta characters.

If set to 1, these characters are meta characters themselves.

See Regular Expressions Find and Replace in the MAXScript Editor

find.replace.advanced (MAXScript default: not set)

Enables Replace in Buffers command and Search only in this style checkbox.

If enabled, searches can be restricted to a particular style (e.g. strings).

find.files (MAXScript default: *.ms *.mcr)

This is the default set of files to search through using the Find in Files command.

The find.files property can contain a list of sets of files separated by '|' like "*.cxx *.h|*.py *.pyw|*.html" which adds three entries to the history and uses the first as the default value.

The evaluation of this setting is a little unusual in that each entry in the value from the property files is appended to the end of the history if that entry is not already present. This means that opening files from different directories will result in any local setting of find.files being added to the list.

find.in.dot (MAXScript default: not set)

If find.in.dot is 1 then Find in Files searches in directories that start with '.'. The default behavior is to prevent the Editor from finding matches in the unmodified versions of files kept by Subversion in .svn subdirectories.

find.in.binary (MAXScript default: not set)

If find.in.binary is 1 then Find in Files displays matches in binary files.

For Find in Files, a binary file is a file that contains a NUL byte in the first 64K block read from the file.

find.in.files.close.on.find (MAXScript default: not set)

Set to 0 to prevent the Find in Files dialog from closing when "Find" pressed.

Comment Properties

comment.block.<lexer> (MAXScript default: set internally)

comment.block.at.line.start.<lexer> (MAXScript default: set internally)

comment.stream.start.<lexer> (MAXScript default: set internally)

comment.stream.end.<lexer> (MAXScript default: set internally)

comment.box.start.<lexer> (MAXScript default: set internally)

comment.box.middle.<lexer> (MAXScript default: set internally)

comment.box.end.<lexer> (MAXScript default: set internally)

These settings are for the comment commands in the Edit menu and are defined separately for each lexer. Not all languages support both stream and block comments.

Block comments are comments that start with a particular string and continue until the end of line. The comment.block property sets the string to be inserted or deleted at the start of the selected lines when the Block Comment or Uncomment command is performed. To make this command perform sensibly over a range of text that already contains comments and other code, the string can be defined to contain a character such as '~' that is not used in real comments.

Set comment.block.at.line.start to "1" to place block comment symbols at the start of the lines, instead of just before the first non-blank character of the lines.

Stream comments start with a particular string and end with another particular string and may continue over line ends. These are defined with comment.stream.start and comment.stream.end.

Box comments are a form of stream comment that takes several lines and uses different strings for the start, end and other lines in the range. These are defined with comment.box.start, comment.box.middle and comment.stream.end.

Scrollbars Properties

horizontal.scrollbar (MAXScript default: not set)

horizontal.scroll.width (MAXScript default: not set)

end.at.last.line (MAXScript default:)

If horizontal.scrollbar set to 0 then the edit pane's horizontal scrollbar is not displayed.

horizontal.scroll.width is the document width assumed for scrolling.

The vertical scroll range is normally set so that maximum scroll position has the last line at the bottom of the view. Set end.at.last.line to 0 to allow scrolling one page below the last line.

Output Pane

split.vertical (MAXScript default: 1)

output.horizontal.size (MAXScript default: 200)

output.vertical.size (MAXScript default: 60)

output.initial.hide (MAXScript default: 1)

If split.vertical is set to 1 then the output pane is to the right of the editing pane, if set to 0 then the output pane is below the editing pane.

The output.*.size settings determine the initial size of the output pane.

If output.initial.hide is 1, then the output pane is hidden when SciTE first starts up even when output.*.size is set; otherwise the output pane is shown at startup.

output.horizontal.scrollbar (MAXScript default: 0)

output.horizontal.scroll.width (MAXScript default: 10000)

If output.horizontal.scrollbar is set to 0 then the Output pane's horizontal scrollbar is not displayed.

The output.horizontal.scroll.width is the Output width assumed for scrolling.

output.scroll (MAXScript default: 0)

To stop the output pane from automatically scrolling, set output.scroll to 0.

To have the output pane scroll and return back to the line of the executed command, set output.scroll to 1.

If you want the output pane to scroll and remain at the bottom after execution, set output.scroll to 2.

Status Bar Properties

statusbar.visible (MAXScript default: 1)

Setting this to 1 makes the status bar visible at start up.

statusbar.number (MAXScript default: 4)

statusbar.text.<number> (MAXScript default: see link below)

The statusbar.text.1 option defines the information displayed in the status bar by default on all platforms.

Property values may be used in this text using the $() syntax.

Commonly used properties are: ReadOnly, EOLMode, BufferLength, NbOfLines (in buffer), SelLength (chars), SelHeight (lines).

Extra properties defined for the status bar are LineNumber, ColumnNumber, and OverType which is either "OVR" or "INS" depending on the overtype status.

You can also use file properties, which, unlike those above, are not updated on each keystroke: FileName or FileNameExt, FileDate and FileTime and FileAttr.

You can also use CurrentDate and CurrentTime to display the system date and time.

Further status bars may be set as statusbar.text.2 and so on. You can cycle between them by clicking the status bar.

The statusbar.number option defines how many texts are to be cycled through.

See MAXScript Editor - Defining Custom Status Bars for more details.

Auto-Complete and Abbreviations Properties

abbreviations.<filepattern> (MAXScript default: not set)

Loads an abbreviations file for a particular language, overriding the default abbreviations file.

FOR EXAMPLE,

abbreviations.*.MAXScript=$(SciteUserHome)/my_mxs_abbrev.properties

api.<filepattern> (MAXScript default: not set)

Loads a set of API files for a particular language.

If there is more than one API file then the file names are separated by ';'.

API files contain a sorted list of identifiers and function prototypes, one per line.

The "Complete Symbol" command looks at the characters before the caret and displayed the subset of the API file starting with that string.

When an opening brace is typed, the file is searched for the text preceding the caret and if a function prototype is found then it is displayed as a calltip.

FOR EXAMPLE,

api.*.c=w.api

could be used with a w.api file containing

fclose(FILE* fileClose)

FILE

fopen(const char* szFileName, const char* szMode)

fpos_t

fread(void* buf, size_t size, size_t count, FILE* file)

fseek(FILE* file, long lnOffset, int nOrigin)

to provide auto-completion and calltips for some of the C file functions.

It is best to use the full path to the API file as otherwise the current directory is used.

autocomplete.choose.single (MAXScript default: not set)

When set to 1 and an auto-completion list is invoked and there is only one element in that list then that element is automatically chosen.

This means that the matched element is inserted and the list is not displayed.

autocompleteword.automatic (MAXScript default: not set)

If this setting is 1 then when typing a word, if only one word in the document starts with that string then an autocompletion list is displayed with that word so it can be chosen by pressing Tab.

autocomplete.<lexer>.ignorecase (MAXScript default: not set)

autocomplete.*.ignorecase (MAXScript default: not set)

When set to 1 the API file is searched in a case insensitive way to find elements for auto-completion lists.

Otherwise matches only occur if case also matches.

The * form is used if there is no lexer specific setting.

autocomplete.<lexer>.start.characters (MAXScript default: not set)

autocomplete.*.start.characters (MAXScript default: not set)

If this setting is not empty, typing any of the characters will cause autocompletion to start.

For example, if autocomplete.MAXScript.start.characters=. and the API file for MAXScript contains "meshop.getVert" and "meshop.getFace" then typing "meshop." will cause the auto-completion to display both identifiers. The

* form is used if there is no lexer specific setting.

autocomplete.<lexer>.fillups (MAXScript default: not set)

autocomplete.*.fillups (MAXScript default: not set)

If this setting is not empty, typing any of the characters will cause auto-completion to complete.

For example, if autocomplete.MAXScript.fillups=Space and the API file for MAXScript contains "meshop.getVert " then typing "meshop.g " will cause "meshop.getVert " to be inserted.

The * form is used if there is no lexer specific setting.

calltip.<lexer>.ignorecase (MAXScript default: not set)

calltip.*.ignorecase (MAXScript default: not set)

When set to 1 the API file is searched in a case insensitive way to find the function which will have its signature displayed as a calltip.

The * form is use if there is no lexer specific setting.

calltip.<lexer>.word.characters (MAXScript default: not set)

calltip.*.word.characters (MAXScript default: not set)

To determine the identifier to look up for calltips, a search is performed allowing the characters in this set to be included in the identifier. While the same setting can be used as for word.characters, sometimes additional characters may be allowed.

For example, in Python, '.' is not normally considered part of a word when selecting text, but it is good to allow "string.replace" to show a calltip so calltip.python.word.characters=._$(chars.alpha) would be a reasonable setting.

The * form is used if there is no lexer specific setting..

calltip.<lexer>.parameters.start (MAXScript default: not set)

calltip.<lexer>.parameters.end (MAXScript default: not set)

calltip.<lexer>.parameters.separators (MAXScript default: not set)

calltip.*.parameters.start (MAXScript default: not set)

calltip.*.parameters.end (MAXScript default: not set)

calltip.*.parameters.separators (MAXScript default: not set)

Allows you to specify characters which start, end and separate parameters.

For most common languages, it's usually left brace for start, right brace for end and comma or semicolon for separator.

E.g. CSS has colon for start, space for separator and nothing for end. You can specify more characters for each property.

The * form is used if there is no lexer specific setting.

calltip.<lexer>.end.definition (MAXScript default: not set)

calltip.*.end.definition (MAXScript default: not set)

API files may contain explanatory text after each function definition.

To display the explanation on a second line, set this property to the character used at the end of the definition part.

For most languages, this is ')'.

The * form is used if there is no lexer specific setting.

xml.auto.close.tags (MAXScript default: not set)

For XML and HTML, setting this property to 1 will automatically insert the corresponding end tag when '>' is typed to end a start tag.

Type "<td>" and the result will be "<td></td>" with the caret placed between the tags.

html.tags.case.sensitive (MAXScript default: not set)

For XML and HTML, setting this property to 1 will make tags match in a case sensitive way which is the expected behavior for XML and XHTML.

User Shortcuts Properties

user.shortcuts (MAXScript default: see link below)

Defines keyboard shortcuts to perform custom commands. This is a '|' delimited list of keys and the commands they produce.

See MAXScript Editor - Defining Custom Keyboard Shortcuts for details.

User Context Menu Properties

user.context.menu (MAXScript default: not set)

Define additional commands for the context menu.

This is a '|' delimited list of menu items and the commands they produce with commands defined as in user.shortcuts.

An empty item produces a separator.

user.context.menu=\

||\

Next File|IDM_NEXTFILE|\

Prev File|IDM_PREVFILE|

Wrap Properties

wrap (MAXScript default: not set)

If wrap set to 1 then the edit pane is dynamically line wrapped.

This option has a high performance cost which is proportional to the amount of text so should be turned off for large documents on slow machines.

wrap.style (MAXScript default: not set)

Chooses between word wrapping (1, the default) and character wrapping (2).

Character wrapping is a better choice for Asian languages with no spaces between words.

wrap.visual.flags (MAXScript default: not set)

Flags to display markers at end and begin of wrapped lines for visual identify them.

Possible values are:

0 - do not display markers (default).

1 - display markers at end of wrapped lines

2 - display markers at begin of wrapped lines

3 - display markers at begin and end.

wrap.visual.flags.location (MAXScript default: not set)

Flags to set the location of the display markers (if enabled) near to text or near to border.

0 - display begin and end markers near to border (default).

1 - display end markers near text,

2 - display begin markers near text

3 - display all markers near text.

wrap.visual.startindent (MAXScript default: not set)

Sets the indention of continued wrapped lines to better visually identify the wrapping.

Default is 0 (no indention).

NOTE:

If wrap.visual.flags is 2 or 3 (begin marker displayed), the line is indented at least 1, even if wrap.visual.startindent is still 0.

wrap.aware.home.end.keys (MAXScript default: not set)

This property changes the behavior of the home and end keys when dynamic line wrapping is turned on. When set to 0 (the default), the Home and End keys will move the caret to the very beginning / end of the 'logical' line, whether or not the line is wrapped over multiple lines in the display.

When this property is set to 1, the caret moves to the end of the current 'display' line if you press End once, or to the very end of the 'logical' line if you press End again.

Likewise, the Home key moves first to the beginning of the 'display' line, then on to the very beginning of the line.

In a window where dynamic line-wrapping is not enabled, this setting has no effect.

Editor Performance-Related Properties

cache.layout (MAXScript default: not set)

output.cache.layout (MAXScript default: not set)

A large proportion of the time spent in the editor is used to lay out text prior to drawing it. This information often stays static between repaints so can be cached with these settings.

There are four levels of caching:

0 - no caching,

1 - caches the line that the caret is on,

2 - caches the visible page as well as the caret,

3 - caches the whole document.

The more that is cached, the greater the amount of memory used, with 3 using large amounts of memory, 7 times the size of the text in the document.

However, level 3 dramatically speeds up dynamic wrapping by around 25 times on large source files so is a very good option to use when wrapping is turned on and memory is plentiful.

use.palette (MAXScript default: 0)

Setting this to 1 makes the Editor use a palette to enable it to display more colors on 8 bit displays.

Without this option the Editor will only display with colors already available which is normally the 20 color Windows system palette.

The downside of turning on this option is that there will be some flashing as windows are activated.

Brace / Bracket Properties

braces.check (MAXScript default: 1)

braces.sloppy (MAXScript default: 1)

style.<lexer>.34 (MAXScript default: not set, using global def. above)

style.<lexer>.35 (MAXScript default: not set, using global def. above)

braces.<lexer>.style (MAXScript default: not set)

Brace (Bracket) highlighting is a feature that shows the range of a brace when the caret is positioned immediately after it. It is especially useful when complex nested braces are used.

The characters '(', ')', '[', ']', '{', and '}' are considered braces.

The feature defaults to off unless braces.check is set to 1.

If braces.sloppy is set to 1 then if there is no brace before the caret then the character after the caret is checked.

The highlighting is performed by displaying the braces in style number 34 or in style number 35 if there is no matching brace.

While this is a full style, to avoid partial display of the braces, it is best to make this style differ from the standard style of braces only in foreground and background colour.

Only braces with style set to braces.<lexer>.style (which defaults to 0) are candidates for brace match highlighting.

Print Properties

print.magnification (MAXScript default: -1)

Printing is normally done with the same settings as screen display.

To make the printing larger or smaller, the print.magnification setting is added to the size of every font when printed.

To get a good miniaturization of text, set print.magnification to -4.

print.colour.mode (MAXScript default: not set)

Some people prefer light colored text on a black background on screen but dark text on white on paper.

Possible values are:

0 (default) - print as is.

1 - each color is inverted for printing.

2 - printing produces black text on white background.

3 - forces the background to white

4 - forces the default background to white.

print.margins (MAXScript default: 1500,1000,1000,1500)

Specify the default margins on the printer on Windows in left right top bottom order. Units depends on your locale, either hundredths of millimeters or thousandths of inches. You can see which units by the units used in the page setup dialog.

This property is only read at start up.

print.header.format (MAXScript default: see below)

print.footer.format (MAXScript default: see below)

These settings determine what will be printed if anything as headers and footers. Property settings can be substituted into the values using the $(property) syntax. There are some extra properties set up while printing: CurrentPage, FileTime, FileDate, CurrentDate, and CurrentTime (at start of printing). Common properties to use in headers and footers are FileNameExt and FilePath.

A header setting may look like:

print.header.format=$(FileNameExt) - Printed on $(CurrentDate),$(CurrentTime) - Page $(CurrentPage)

Shipping defaults set in the file MXS_Editor.properties:

print.header.format=$(FileNameExt) — Printed on $(CurrentDate), $(CurrentTime) — Page $(CurrentPage)

print.footer.format=$(FilePath) — File date: $(FileDate) — File time: $(FileTime)

print.header.style (MAXScript default:)

print.footer.style (MAXScript default:)

These settings determine the style of the header and footer using the same format as other styles in the Editor. Only the fore, back, font, size, bold, italics, and underlined attributes are supported.

Shipping defaults set in the file MXS_Editor.properties:

print.header.style=font:Arial,size:12,bold

print.footer.style=font:Arial Narrow,size:10,italics

Export Properties

export.keep.ext (MAXScript default: not set)

This property determines how the file name is transformed when exporting to include the appropriate export format extension - .html for HTML and .rtf for RTF.

If export.keep.ext is the default, 0, then the current extension is replaced (LineMarker.html).

If it is 1, then the export format extension is added (LineMarker.ms.rtf).

If it is 2 then the final '.' is replaced by '_' and the export format extension added (LineMarker_ms.rtf).

export.html.wysiwyg (MAXScript default: 1)

export.html.tabs (MAXScript default: not set)

export.html.folding (MAXScript default: not set)

export.html.styleused (MAXScript default: 1)

export.html.title.fullpath (MAXScript default: not set)

When export.html.wysiwyg is set to 0 then exporting to a HTML file produces a smaller file but which is less completely specified so may look more different to the on screen display. When export.html.tabs is set to 1 and export.html.wysiwyg is set to 0 then tab characters in the file are exported as tab characters rather than a sequence of space characters.
The exported file can be made to fold in browsers that support CSS well (Mozilla and Internet Explorer) by setting export.html.folding to 1. Only export styles actually used when export.html.styleused set to 1. The full path name of the file is put in the title, instead of just the file name when export.html.title.fullpath set to 1.

export.rtf.wysiwyg (MAXScript default: not set)

export.rtf.tabs (MAXScript default: not set)

export.rtf.font.face (MAXScript default: not set)

export.rtf.font.size (MAXScript default: not set)

export.rtf.tabsize (MAXScript default: not set)

When export.rtf.wysiwyg is set to 0 then exporting to a RTF file produces a smaller file but which is less completely specified so may look more different to the on screen display. When export.rtf.tabs is set to 1 and export.rtf.wysiwyg is set to 0 then tab characters in the file are exported as tab characters rather than a sequence of space characters.
export.rtf.font.face and export.rtf.font.size can be used to select a particular font and size for the exported RTF file. export.rtf.tabsize can be set to use a different tab size than that defined by the tabsize setting.

export.pdf.magnification (MAXScript default: 0)

export.pdf.font (MAXScript default: Helvetica)

export.pdf.pagesize (MAXScript default: 595,842)

export.pdf.margins (MAXScript default: 72,72,72,72)

export.pdf.magnification is a value that is added to the font size of the default screen style in use. A positive value increases the PDF document's font size, and vice versa.
export.pdf.font accepts a one-word parameter that selects one of the default PDF fonts: Courier, Helvetica or Times. Helvetica is the default. Helvetica and Times do not line wrap, Courier line wraps.
export.pdf.pagesize is used to set the document's page size, using points (1/72th of an inch) as the unit. E.g. Letter paper (8.5 inch x 11 inch) is specified using the values 612,792.
export.pdf.margins sets the widths of the page margins. Margins defaults to 72 points, or 1 inch.
The PDF exporter is necessarily feature-limited because PDF is a document archival format. Supporting a full set of features will bloat SciTE. Wrapping Helvetica or Times adequately isn't possible without the complexities of font metrics and kerning. The PDF produced uses WinAnsiEncoding, so pre-encoding has to be done before exporting to PDF, if you want to use extended characters.

export.xml.collapse.spaces (MAXScript default: 1)

export.xml.collapse.lines (MAXScript default: 1)

These flags control how empty lines and runs of space characters are converted into XML. The flags are enabled if set to 1. Tab characters are always converted by the XML exporter into spaces according to the tabsize property.

Language Properties

translation.missing (MAXScript default: not set)

When using a localized version, if a term is not found in the locale.properties translation file then use the value of translation.missing instead. By setting this to a marker such as "***" it is easier to check where terms have not been provided with translations.

menu.language (MAXScript default: see below)

Defines the entries in the Language menu and the file extensions they map to.

Each menu item is defined by 3 elements, language name, extension and an optional keyboard equivalent.

Each element is terminated by '|'.

For example:

H&ypertext|html|F12|

Menu items may be commented out by prefixing the name with '#'.

Shipping defaults set in the file MXS_Editor.properties:

menu.language=\

Text|txt|Shift+F11|\

MAXScript|ms||\

Properties|properties||\

Hypertext|html||\

XML|xml||

Warning Sounds Properties

warning.findwrapped (MAXScript default: not set)

warning.notfound (MAXScript default: not set)

warning.wrongfile (MAXScript default: not set)

warning.executeok (MAXScript default: not set)

warning.executeko (MAXScript default: not set)

warning.nootherbookmark (MAXScript default: not set)

Allows for sounds to be played and the window to be flashed when particular events occur.

The values consist of three items separated by ',':

flash duration, sound, sound duration.

If sound is a number then it is treated as a pitch and played for the duration in milliseconds.

Otherwise it is treated as a path to a sound file that is played.

If you do not want a flash, specify 0 for flash duration.

FOR EXAMPLE,

warning.wrongfile=0,C:\Windows\Media\SFX\Glass.wav

will play the glass sound if open selected is given a bad file name.

The warning.findwrapped warning occurs when a find operation wraps past either end of the file.

The warning.notfound warning occurs when the find fails to find a match.

The warning.executeok warning occurs when a command executes successfully.

The warning.executeko warning occurs when a command fails

The warning.nootherbookmark warning occurs when there is no bookmark to find.

Source Control Integration

sourcecontrol.command (MAXScript default: not set)

Defines the location of the external source control program, for example Perforce, TortoiseSVN / Subversion and so on.

sourcecontrol.add.command (MAXScript default: not set)

Defines the command to add a file to the external version control system.

sourcecontrol.remove.command (MAXScript default: not set)

Defines the command to remove a file from the external version control system.

sourcecontrol.checkin.command (MAXScript default: not set)

Defines the command to check in a file into the external version control system.

sourcecontrol.checkout.command (MAXScript default: not set)

Defines the command to check out a file from the external version control system.

FOR EXAMPLE,

The following is the default (but remarked) setup for Perforce as the external source control application:

# Source Control

sourcecontrol.command="C:\Program Files\Perforce\p4.exe"

sourcecontrol.add.command=$(sourcecontrol.command) add "$(FilePath)"

sourcecontrol.remove.command=$(sourcecontrol.command) delete "$(FilePath)"

sourcecontrol.checkin.command=$(sourcecontrol.command) submit "$(FilePath)"

sourcecontrol.checkout.command=$(sourcecontrol.command) edit "$(FilePath)"


MAXScript Editor - MAXScript-Specific Language Settings

The MAXScript-specific language settings of the Tabbed MAXScript Editor introduced in 3ds Max 2008 can be customized by editing the file MAXScript.properties located in the 3ds Max root folder.

Lexer Settings

lexer.<filepattern> (MAXScript default: see below)

A lexer splits a file up into syntactic pieces. The Editor can then display these pieces in different visual styles.

Several lexers are available.

Often several file extensions (.ms, .mcr) can map to one language (MAXScript) and can use one lexer.

These settings associate a file name with a lexer.

The MAXScript shipping default setting in the file MAXScript.properties file is:

lexer.$(file.patterns.MAXScript)=MAXScript

lexerpath.<filepattern> (MAXScript default: not set)

This property specifies the path to an external lexer module that will be loaded into the Editor.

Keyword Settings

keywords.<filepattern> (MAXScript default: set internally)

keywords is for keywords,

FOR EXAMPLE:

and animate attributes by collect else exit for from function rollout struct set then

keywords2.<filepattern> (MAXScript default: set internally)

keywords2 is for rollout controls,

FOR EXAMPLE:

label button edittext combobox

keywords3.<filepattern> (MAXScript default: set internally)

keywords3 is for function calls,

FOR EXAMPLE:

displaycontroldialog skipspace readfloat

keywords4.<filepattern> (MAXScript default: set internally)

keywords4 is for MAXScript Classes,

FOR EXAMPLE:

maxtvutility moflow trackviewpick array matrix3 integer

keywords5.<filepattern> (MAXScript default: set internally)

keywords5 is for MAX Classes,

FOR EXAMPLE:

box ffd_2x2x2 cameramapspacewarp

keywords6.<filepattern> (MAXScript default: set internally)

keywords6 is for MAX SuperClasses,

FOR EXAMPLE:

camera shape colorpicker soundclass texturemap

keywords7.<filepattern> (MAXScript default: set internally)

keywords7 is for Core Interfaces,

FOR EXAMPLE:

assemblymgr channelinfo iparserloader trackselectionsets pluginmanager

keywords8.<filepattern> (MAXScript default: set internally)

keywords8 is for Object Sets,

FOR EXAMPLE:

objects geometry lights cameras helpers shapes systems spacewarps selection

keywords9.<filepattern> (MAXScript default: set internally)

keywords9 is for Struct Defs,

FOR EXAMPLE:

meshops mouse dof cui camerafov xrefs

keywords10.<filepattern> (MAXScript default: set internally)

keywords10 is for const reserved globals,

FOR EXAMPLE:

red pi true undefined meditmaterials x_axis

keywords11.<filepattern> (MAXScript default: set internally)

keywords11 is for reserved globals,

FOR EXAMPLE:

animationrange slidertime backgroundcolor rootnode

keywords12.<filepattern> (MAXScript default: empty)

keywords12 is for user defined words to be colorized. Keywords are checked for in this list first

keywordclass.<lexer> (MAXScript default: not set)

Most of the lexers differentiate between names and keywords and use the keywords variables to do so.

To avoid repeating the keyword list for each file extension, where several file extensions are used for one language, a keywordclass variable is defined in the distributed properties file although this is just a convention.

Some lexers define a second set of keywords which will be displayed in a different style to the first set of keywords. This is used in the HTML lexer to display JavaScript keywords in a different style to HTML tags and attributes.

Keywords can be prefix based so ^GTK_ will treat all words that start with GTK_ as keywords.

File Extension Settings

default.file.ext (MAXScript default: .ms)

Defines the language mode used before the file has a name. For example, if default.file.ext=.ms, then when the New command is used to create a new file then MAXScript syntax styling is used.

Characters Settings

word.characters.<filepattern> (MAXScript default: see below)

Defines which characters can be parts of words.

The default value here is all the alphabetic and numeric characters and the underscore which is a reasonable value for most languages.

The shipping default definition in the file MAXScript.properties is:

word.characters.$(file.patterns.text)=$(chars.alpha)$(chars.numeric)$(chars.accented)-'

whitespace.characters.<filepattern> (MAXScript default: not set)

Defines which characters are considered whitespace.

The default value is space and all chars less than 0x20.

Setting this property allows you to force the Editor to consider other characters as whitespace (e.g. punctuation) during such activities as cursor navigation (ctrl+left/right).

Style Settings

style.*.<stylenumber> (MAXScript default: not set)

style.<lexer>.<stylenumber> (MAXScript default: see below)

The lexers determine a style number for each lexical type, such as keyword, comment or number. These settings determine the visual style to be used for each style number of each lexer.

The value of each setting is a set of ',' separated fields, some of which have a sub-value after a ':'.

The fields are font, size, fore, back, italics, notitalics, bold, notbold, eolfilled, noteolfilled, underlined, notunderlined, and case.

The font field has a sub-value which is the name of the font, the fore and back have color sub-values, the size field has a numeric size sub-value, the case field has a sub-value of 'm', 'u', or 'l' for mixed, upper or lower case, and the bold, italics and eolfilled fields have no sub-value.

The value "fore:#FF0000,font:Courier,size:14" represents 14 point, red Courier text.

A global style can be set up using style.*.stylenumber.

Any style options set in the global style will be inherited by each lexer style unless overridden.

The shipping properties and values set in the file MAXScript.properties are:

# Default

style.MAXScript.32=$(font.base)

# White space

style.MAXScript.0=fore:#808080

# Comment: /* */.

style.MAXScript.1=$(colour.code.comment.box),$(font.code.comment.box)

# Line Comment: --.

style.MAXScript.2=$(colour.code.comment.line),$(font.code.comment.line),eolfilled

# Number

style.MAXScript.3=$(colour.number)

# String

style.MAXScript.4=$(colour.string)

# Verbatim strings

style.MAXScript.5=fore:#007F00,$(font.monospace),back:#E0FFE0,eolfilled

# End of line where string is not closed

style.MAXScript.6=fore:#000000,$(font.monospace),back:#E0C0E0,eolfilled

# Identifiers

style.MAXScript.7=

# Operators

style.MAXScript.8=$(colour.operator),bold

# Keyword arg name

style.MAXScript.9=fore:#804080

# Name value

style.MAXScript.10=$(colour.char)

# Pathname

style.MAXScript.11=fore:#3F7F3F,$(font.monospace),back:#E0F0FF

# Keywords1 - Keywords

style.MAXScript.12=$(colour.keyword),bold

# Keywords2 - Rollout controls

style.MAXScript.13=$(colour.preproc),bold

# Keywords3 - Functions

style.MAXScript.14=fore:#3060A0

# Keywords4 - MXS Classes

style.MAXScript.15=fore:#6030A0

# Keywords5 - MAXClasses

style.MAXScript.16=fore:#60A030

# Keywords6 - MAXSuperClasses

style.MAXScript.17=fore:#0040B0

# Keywords7 - Core interfaces

style.MAXScript.18=fore:#00B040,italics

# Keywords8 - Object sets

style.MAXScript.19=fore:#D0B080,italics

# Keywords9 - StructDefs

style.MAXScript.20=fore:#804020,italics

# Keywords10 - Const reserved globals

style.MAXScript.21=fore:#3060A0,italics

# Keywords11 - Reserved globals

style.MAXScript.22=fore:#B00040

# Keywords12 - User defined

style.MAXScript.23=fore:#FF0000,bold,italics

style.<lexer>.32 (MAXScript default: see below)

style.<lexer>.33 (MAXScript default: see below)

style.<lexer>.34 (MAXScript default: see below)

style.<lexer>.35 (MAXScript default: see below)

style.<lexer>.36 (MAXScript default: see below)

style.<lexer>.37 (MAXScript default: see below)

In addition to the styles generated by the lexer, these numbered styles are being used:

32 - default style and its features will be inherited by all other styles unless overridden.

33 -- display line numbers in the margin.

34 and 35 - used to display matching and non-matching braces respectively.

36 - used for displaying control characters. This is not a full style as the foreground and background colors for control characters are determined by their lexical state rather than this style.

37 - used for displaying indentation guides. Only the fore and back fields are used.

A * can be used instead of a lexer to indicate a global style setting.

The shipping properties and values set in the file MXS_Editor.properties are:

# Global default styles for all languages

# Default

style.*.32=$(font.base)

# Line number

style.*.33=back:#C0C0C0,$(font.small)

# Brace highlight

style.*.34=fore:#0000FF,bold

# Brace incomplete highlight

style.*.35=fore:#FF0000,bold

# Control characters

style.*.36=

# Indentation guides

style.*.37=fore:#C0C0C0,back:#FFFFFF

See MAXScript Editor - Customizing Syntax Color Schemes topic for an example of a custom color scheme.


MAXScript Editor - Customizing Syntax Color Schemes

The Tabbed MAXScript Editor introduced in 3ds Max 2008 lets you define your own custom color schemes to highlight lexical components of the MAXScript language.

Global Definition:

Custom colors can be defined in the file MAXScript.properties which is easily accessible via the Tools>Open MAXScript.properties menu item. See MAXScript Editor - Properties File Settings for Lexer options.

A COLOR SCHEME SIMILAR TO 3DS MAX 9 COLORS:

# MAXScript styles

# Default

style.MAXScript.32=$(font.base)

# White space

style.MAXScript.0=fore:#808080

# Comment: /* */.

style.MAXScript.1=fore:#009900

# Line Comment: --.

style.MAXScript.2=fore:#009900,eolfilled

# Number

style.MAXScript.3=fore:#000000

# String

style.MAXScript.4=fore:#800000

# Verbatim strings

style.MAXScript.5=fore:#FF0000,$(font.monospace),eolfilled

# End of line where string is not closed

style.MAXScript.6=fore:#000000,$(font.monospace),back:#E0C0E0,eolfilled

# Identifiers

style.MAXScript.7=

# Operators

style.MAXScript.8=fore:#406060

# Keyword arg name

style.MAXScript.9=fore:#000080

# Name value

style.MAXScript.10=fore:#600080

# Pathname

style.MAXScript.11=fore:#005000

# Keywords1 - Keywords

style.MAXScript.12=fore:#0000C0

# Keywords2 - Rollout controls

style.MAXScript.13=fore:#202080

# Keywords3 - Functions

style.MAXScript.14=fore:#3060A0

# Keywords4 - MXS Classes

style.MAXScript.15=fore:#6030A0

# Keywords5 - MAXClasses

style.MAXScript.16=fore:#60A030

# Keywords6 - MAXSuperClasses

style.MAXScript.17=fore:#0040B0

# Keywords7 - Core interfaces

style.MAXScript.18=fore:#00B040

# Keywords8 - Object sets

style.MAXScript.19=fore:#D0B080

# Keywords9 - StructDefs

style.MAXScript.20=fore:#804020

# Keywords10 - Const reserved globals

style.MAXScript.21=fore:#3060A0

# Keywords11 - Reserved globals

style.MAXScript.22=fore:#B00040

# Keywords12 - User defined

style.MAXScript.23=fore:#FF0000

See bottom of this page for the result.

Local Directory Overrides:

If you have set the property

properties.directory.enable=1

in the Global Options File "MXS_Editor.properties", you can create local property files called "SciTEDirectory.properties" in any directories containing MAXScript files. If you would open a MAXScript file from a directory containing such a local property file, the lexer settings in it will override the global properties.

This allows for project-specific color configurations!

Here is the shipping \Ui\MacroScripts\Macro_BakeTextures.mcr file using the default color scheme:

After saving a new "SciTEDirectory.properties" file containing the color definitions listed in the beginning of this topic to \Ui\MacroScripts\ and setting properties.directory.enable=1 in the file "MXS_Editor.properties", the same script looks like this:

Changing the property properties.directory.enable=0 and saving the "MXS_Editor.property" file to disk will change instantly the color coding back to the default color scheme in all currently opened tabs showing MAXScript files located in the \Ui\MacroScripts folder.


MAXScript Editor - Defining Custom Keyboard Shortcuts

The Tabbed MAXScript Editor introduced in 3ds Max 2008 lets you define your own custom keyboard shortcuts in addition to the hard-coded shortcuts listed in the topic MAXScript Editor - Keyboard Shortcuts

Definition:

Custom keyboard shortcuts can be defined in the file MXS_Editor.properties which is easily accessible via the Tools>Open Global Options File menu item. See MAXScript Editor - Properties File Settings for all options.

Scroll down and locate the section remarked as

# User defined key commands

This section contains some existing keyboard shortcut definitions.

The definition starts with

user.shortcuts=\

and is a '|' delimited list of keys and the commands they produce.

To place each command on a new line, add a backslash \ at the end of each line.

FOR EXAMPLE,

user.shortcuts=\

Ctrl+Shift+V|IDM_PASTEANDDOWN|\

Ctrl+PageUp|IDM_PREVFILE|\

Ctrl+PageDown|IDM_NEXTFILE|

The commands are either strings or numeric IDs - see List of Editor Key Commands and List of Editor Menu Commands .

  • Numeric IDs above 2000 are Scintilla commands and are sent to the focussed pane.

  • Named IDs and numeric IDs below 2000 are SciTE menu commands.

  • The modifier keys are Ctrl, Shift, and Alt

  • The named keys are Left, Right, Up, Down, Insert, End, Home, Enter, Space, Tab, KeypadPlus, KeypadMinus, KeypadMultiply, KeypadDivide, Escape, Delete, PageUp, PageDown, Slash, Question, Equal, Win.

NOTE:

Changes to user-defined keyboard shortcut definitions will become active only after a restart of 3ds Max!

Adding a new user-defined keyboard shortcut

Let’s assume you want to add a keyboard shortcut for the editor feature "Clear All Bookmarks". This feature is listed in the Search menu but does not have a keyboard shortcut assigned.

  • Locate in the List of Named IDs the one called "IDM_BOOKMARK_CLEARALL". Since all existing Bookmark-related shortcuts use the Function Key F2, let's assign the keyboard shortcut CTRL+SHIFT+F2 to the Clear All Bookmarks feature by adding to the user.shortcuts definition in the MXS_Editor.properties file:

user.shortcuts=\

Ctrl+Shift+V|IDM_PASTEANDDOWN|\

Ctrl+PageUp|IDM_PREVFILE|\

Ctrl+PageDown|IDM_NEXTFILE|\

Ctrl+Shift+F2|IDM_BOOKMARK_CLEARALL|

  • Press CTRL+S to save the MXS_Editor.properties file.

  • Restart 3ds Max.

  • Open the Editor, load a script file and set several bookmarks using CTRL+F2.

  • Hold down CTRL and SHIFT and press F2 - all bookmarks will be cleared!


MAXScript Editor - Defining Custom Context Menu Items

The Tabbed MAXScript Editor introduced in 3ds Max 2008 lets you define your own custom Context (Right-Click) Menu Items in addition to the hard-coded items like Undo, Redo, Copy and Paste.

This is the default context menu which appears when you right-click in the Editor window:

Definition:

Custom context menu items can be defined in the file MXS_Editor.properties which is easily accessible via the Tools>Open Global Options File menu item. See MAXScript Editor - Properties File Settings for all options.

The definition starts with

user.context.menu=\

and is a '|' delimited list of menu item names and the commands they produce.

To place each command on a new line, add a backslash \ at the end of each line.

FOR EXAMPLE,

user.context.menu=\

Next File |IDM_PREVFILE|\

Prev File|IDM_NEXTFILE|

Note that the above definition is available by default in the Global Options file but is remarked and thus disabled by default. You can remove the # remark symbold from all lines to enable it.

The commands are either strings or numeric IDs - see List of Editor Key Commands and List of Editor Menu Commands .

  • Numeric IDs above 2000 are Scintilla commands and are sent to the focussed pane.

  • Named IDs and numeric IDs below 2000 are SciTE menu commands.

  • An Empty entry || defines a separator.

Other than keyboard shortcuts , changes to user-defined context menu definitions become active immediately and do not require a restart!

Adding a new user-defined keyboard shortcut

Let’s assume you want to add a menu item for the editor feature "Copy As RTF" (which was used extensively to create this document). This feature is already listed in the Edit menu but could be placed closer to the mouse for easier copying of formatted colored text between the Editor and external word processing applications.

  • Let's first add a separator by placing two | delimiters and end the line with \ at the end of the user.context.menu definition in the MXS_Editor.properties file.

  • Then we locate in the List of Named IDs the ID called "IDM_COPYASRTF".

  • Let's add this command with label "Copy As RTF" to the context menu by adding to the user.context.menu definition in the MXS_Editor.properties file. The final definition looks like this:

user.context.menu=\

Next File |IDM_PREVFILE|\

Prev File|IDM_NEXTFILE|\

||\

Copy As RTF|IDM_COPYASRTF|

  • Press CTRL+S to save the MXS_Editor.properties file.

  • Open a MAXScript file and select some lines.

  • Right-click in the Editor - the new separator and new menu item should appear!

  • Select the item "Copy As RTF" to copy the selected text to the clipboard including all formatting.

  • Now you can switch to an application like MS World and paste the text - it should appear in the same style!


List of Editor Menu Commands

The Tabbed MAXScript Editor introduced in 3ds Max 2008 provides the following NAMED IDs for its Menu Commands which can be used to define Custom Keyboard Shortcuts and Right-Click menus .

NOTE:

Some of the Named IDs have no meaning in the context of the MAXScript Editor and are only available for use in the stand-alone version of the Scintilla SciTE editor.

COMMAND | MENU TEXT
IDM_NEW | New
IDM_OPEN | Open
IDM_OPENSELECTED | Open Selected Filename
IDM_REVERT | Revert
IDM_CLOSE | Close
IDM_SAVE | Save
IDM_SAVEAS | Save As
IDM_SAVEACOPY | Save a Copy
IDM_ENCODING_DEFAULT | Code Page Property
IDM_ENCODING_UCS2B | EUCS-2 Big Endian
IDM_ENCODING_UCS2L | EUCS-2 Little Endian
IDM_ENCODING_UTF8 | UTF-8 with BOM
IDM_ENCODING_UCOOKIE | UTF-8
IDM_SAVEASHTML | As HTML
IDM_SAVEASRTF | As RTF
IDM_SAVEASPDF | As PDF
IDM_SAVEASTEX | As LaTeX
IDM_SAVEASXML | As XML
IDM_PRINTSETUP | Page Setup
IDM_PRINT | Print
IDM_LOADSESSION | Load Session
IDM_SAVESESSION | Save Session
IDM_QUIT | Exit
IDM_UNDO | Undo
IDM_REDO | Redo
IDM_CUT | Cut
IDM_COPY | Copy
IDM_PASTE | Paste
IDM_DUPLICATE | Duplicate
IDM_CLEAR | Delete
IDM_SELECTALL | Select All
IDM_COPYASRTF | Copy as RTF
IDM_MATCHBRACE | Match Brace
IDM_SELECTTOBRACE | Select to Brace
IDM_SHOWCALLTIP | Show Calltip
IDM_COMPLETE | Complete Symbol
IDM_COMPLETEWORD | Complete Word
IDM_ABBREV | Expand Abbreviation
IDM_INS_ABBREV | Insert Abbreviation
IDM_BLOCK_COMMENT | Block Comment or Uncomment
IDM_BOX_COMMENT | Box Comment
IDM_STREAM_COMMENT | Stream Comment
IDM_UPRCASE | Make Selection Uppercase
IDM_LWRCASE | Make Selection Lowercase
IDM_JOIN | Join
IDM_SPLIT | Split (not used in 3ds Max)
IDM_FIND | Find
IDM_FINDNEXT | Find Next
IDM_FINDNEXTBACK | Find Previous
IDM_FINDINFILES | Find in Files
IDM_REPLACE | Replace
IDM_INCSEARCH | Incremental Search
IDM_GOTO | Go to
IDM_BOOKMARK_NEXT | Next Bookmark
IDM_BOOKMARK_PREV | Previous Bookmark
IDM_BOOKMARK_TOGGLE | Toggle Bookmark
IDM_BOOKMARK_CLEARALL | Clear All Bookmarks
IDM_EXPAND | Toggle current fold
IDM_TOGGLE_FOLDALL | Toggle all folds
IDM_FULLSCREEN | Full Screen
IDM_VIEWTOOLBAR | Tool Bar
IDM_VIEWTABBAR | Tab Bar
IDM_VIEWSTATUSBAR | Status Bar
IDM_VIEWSPACE | Whitespace
IDM_VIEWEOL | End of Line
IDM_VIEWGUIDES | Indentation Guides
IDM_LINENUMBERMARGIN | Line Numbers
IDM_SELMARGIN | Margin
IDM_FOLDMARGIN | Fold Margin
IDM_TOGGLEOUTPUT | Output
IDM_TOGGLEPARAMETERS | Parameters
IDM_COMPILE | Compile
IDM_BUILD | Build (not used in 3ds Max)
IDM_GO | Go (not used in 3ds Max)
IDM_STOPEXECUTE | Stop Executing (not used in 3ds Max)
IDM_NEXTMSG | Next Message (not used in 3ds Max)
IDM_PREVMSG | Previous Message (not used in 3ds Max)
IDM_CLEAROUTPUT | Clear Output (not used in 3ds Max)
IDM_SWITCHPANE | Switch Pane (not used in 3ds Max)
IDM_ONTOP | Always On Top
IDM_OPENFILESHERE | Open Files Here
IDM_SPLITVERTICAL | Vertical Split (not used in 3ds Max)
IDM_WRAP | Wrap
IDM_WRAPOUTPUT | Wrap Output
IDM_READONLY | Read-Only
IDM_EOL_CRLF | CR + LF
IDM_EOL_CR | CR
IDM_EOL_LF | LF
IDM_EOL_CONVERT | Convert Line End Characters
IDM_TABSIZE | Change Indentation Settings
IDM_MONOFONT | Use Monospaced Font
IDM_OPENLOCALPROPERTIES | Open Local Options File
IDM_OPENDIRECTORYPROPERTIES | Open Directory Options File
IDM_OPENUSERPROPERTIES | Open User Options File
IDM_OPENGLOBALPROPERTIES | Open Global Options File
IDM_OPENABBREVPROPERTIES | Open Abbreviations File
IDM_OPENLUAEXTERNALFILE | Open Lua Startup Script
IDM_PREVFILE | Previous
IDM_NEXTFILE | Next
IDM_CLOSEALL | Close All
IDM_SAVEALL | Save All
IDM_HELP | Help
IDM_HELP_SCITE | Help
IDM_ABOUT | About MXS SciTE


List of Editor Key Commands

The Tabbed MAXScript Editor introduced in 3ds Max 2008 provides the following COMMAND IDs which can be used to define custom Keyboard Shortcuts and Right-Click menus that operate on the current document.

COMMAND | NAME | EXPLANATION
2101 | AutoCCancel | Remove the auto-completion list from the screen.
2104 | AutoCComplete | User has selected an item so remove the list and insert the selection.
2328 | BackTab | Dedent the selected lines.
2078 | BeginUndoAction | Start a sequence of actions that is undone and redone as a unit. May be nested.
2201 | CallTipCancel | Remove the call tip from the screen.
2325 | Cancel | Cancel any modes such as call tip or auto-completion list display.
2304 | CharLeft | Move caret left one character.
2305 | CharLeftExtend | Move caret left one character extending selection to new caret position.
2428 | CharLeftRectExtend | Move caret left one character, extending rectangular selection to new caret position.
2306 | CharRightMove | caret right one character.
2307 | CharRightExtend | Move caret right one character extending selection to new caret position.
2429 | CharRightRectExtend | Move caret right one character, extending rectangular selection to new caret position.
2399 | ChooseCaretX | Set the last x chosen value to be the caret x position.
2180 | Clear | Clear the selection.
2004 | ClearAll | Delete all text in the document.
2072 | ClearAllCmdKeys | Drop all key mappings.
2005 | ClearDocumentStyle | Set all style bytes to 0, remove all folding information.
2408 | ClearRegisteredImages | Clear all the registered XPM images.
2178 | Copy | Copy the selection to the clipboard.
2177 | Cut | Cut the selection to the clipboard.
2395 | DelLineLeft | Delete back from the current position to the start of the line.
2396 | DelLineRight | Delete forwards from the current position to the end of the line.
2335 | DelWordLeft | Delete the word to the left of the caret.
2336 | DelWordRight | Delete the word to the right of the caret.
2326 | DeleteBack | Delete the selection or if no selection, the character before the caret.
2344 | DeleteBackNotLine | Delete the selection or if no selection, the character before the caret. Will not delete the character before at the start of a line.
2318 | DocumentEnd | Move caret to last position in document.
2319 | DocumentEndExtend | Move caret to last position in document extending selection to new caret position.
2316 | DocumentStart | Move caret to first position in document.
2317 | DocumentStartExtend | Move caret to first position in document extending selection to new caret position.
2324 | EditToggleOvertype | Switch from insert to overtype mode or the reverse.
2175 | EmptyUndoBuffer | Delete the undo history.
2079 | EndUndoAction | End a sequence of actions that is undone and redone as a unit.
2330 | FormFeed | Insert a Form Feed character.
2400 | GrabFocus | Set the focus to this Scintilla widget.
2312 | Home | Move caret to first position on line.
2345 | HomeDisplay | Move caret to first position on display line.
2346 | HomeDisplayExtend | Move caret to first position on display line extending selection to new caret position.
2313 | HomeExtend | Move caret to first position on line extending selection to new caret position.
2430 | HomeRectExtend | Move caret to first position on line, extending rectangular selection to new caret position.
2349 | HomeWrap | These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)? except they behave differently when word-wrap is enabled: They go first to the start / end of the display line, like (Home|LineEnd)Display The difference is that, the cursor is already at the point, it goes on to the start or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?.
2450 | HomeWrapExtend | These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)? except they behave differently when word-wrap is enabled: They go first to the start / end of the display line, like (Home|LineEnd)Display The difference is that, the cursor is already at the point, it goes on to the start or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?.
2455 | LineCopy | Copy the line containing the caret.
2337 | LineCut | Cut the line containing the caret.
2338 | LineDelete | Delete the line containing the caret.
2300 | LineDown | Move caret down one line.
2301 | LineDownExtend | Move caret down one line extending selection to new caret position.
2426 | LineDownRectExtend | Move caret down one line, extending rectangular selection to new caret position.
2404 | LineDuplicate | Duplicate the current line.
2314 | LineEnd | Move caret to last position on line.
2347 | LineEndDisplay | Move caret to last position on display line.
2348 | LineEndDisplayExtend | Move caret to last position on display line extending selection to new caret position.
2315 | LineEndExtend | Move caret to last position on line extending selection to new caret position.
2432 | LineEndRectExtend | Move caret to last position on line, extending rectangular selection to new caret position.
2451 | LineEndWrap | These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)? except they behave differently when word-wrap is enabled: They go first to the start / end of the display line, like (Home|LineEnd)Display The difference is that, the cursor is already at the point, it goes on to the start or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?.
2452 | LineEndWrapExtend | These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)? except they behave differently when word-wrap is enabled: They go first to the start / end of the display line, like (Home|LineEnd)Display The difference is that, the cursor is already at the point, it goes on to the start or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?.
2342 | LineScrollDown | Scroll the document down, keeping the caret visible.
2343 | LineScrollUp | Scroll the document up, keeping the caret visible.
2339 | LineTranspose | Switch the current line with the previous.
2302 | LineUp | Move caret up one line.
2303 | LineUpExtend | Move caret up one line extending selection to new caret position.
2427 | LineUpRectExtend | Move caret up one line, extending rectangular selection to new caret position.
2288 | LinesJoin | Join the lines in the target.
2340 | LowerCase | Transform the selection to lower case.
2401 | MoveCaretInsideView | Move the caret inside current view if it's not there already.
2329 | NewLine | Insert a new line, may use a CRLF, CR or LF depending on EOL mode.
2172 | Null | Null operation.
2322 | PageDown | Move caret one page down.
2323 | PageDownExtend | Move caret one page down extending selection to new caret position.
2434 | PageDownRectExtend | Move caret one page down, extending rectangular selection to new caret position.
2320 | PageUp | Move caret one page up.
2321 | PageUpExtend | Move caret one page up extending selection to new caret position.
2433 | PageUpRectExtend | Move caret one page up, extending rectangular selection to new caret position.
2413 | ParaDown | Move caret between paragraphs (delimited by empty lines).
2414 | ParaDownExtend | Move caret between paragraphs (delimited by empty lines).
2415 | ParaUp | Move caret between paragraphs (delimited by empty lines).
2416 | ParaUpExtend | Move caret between paragraphs (delimited by empty lines).
2179 | Paste | Paste the contents of the clipboard into the document replacing the selection.
2011 | Redo | Redoes the next action on the undo history.
2169 | ScrollCaret | Ensure the caret is visible.
2366 | SearchAnchor | Sets the current caret position to be the search anchor.
2013 | SelectAll | Select all the text in the document.
2469 | SelectionDuplicate | Duplicate the selection. If selection empty duplicate the line containing the caret.
2444 | SetCharsDefault | Reset the set of characters for whitespace and word characters to the defaults.
2014 | SetSavePoint | Remember the current position in the undo history as the position at which the document was saved.
3001 | StartRecord | Start notifying the container of all key presses and commands.
3002 | StopRecord | Stop notifying the container of all key presses and commands.
2437 | StutteredPageDown | Move caret to bottom of page, or one page down if already at bottom of page.
2438 | StutteredPageDownExtend | Move caret to bottom of page, or one page down if already at bottom of page, extending selection to new caret position.
2435 | StutteredPageUp | Move caret to top of page, or one page up if already at top of page.
2436 | StutteredPageUpExtend | Move caret to top of page, or one page up if already at top of page, extending selection to new caret position.
2058 | StyleResetDefault | Reset the default style to its state at startup
2327 | Tab | If selection is empty or all on one line replace the selection with a tab character. If more than one line selected, indent the lines.
2287 | TargetFromSelection | Make the target range start and end be the same as the selection range start and end.
2459 | ToggleCaretSticky | Switch between sticky and non-sticky: meant to be bound to a key.
2176 | Undo | Undo one action in the undo history.
2341 | UpperCase | Transform the selection to upper case.
2331 | VCHome | Move caret to before first visible character on line. If already there move to first character on line.
2332 | VCHomeExtend | Like VCHome but extending selection to new caret position.
2431 | VCHomeRectExtend | Move caret to before first visible character on line. If already there move to first character on line. In either case, extend rectangular selection to new caret position.
2453 | VCHomeWrap | These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)? except they behave differently when word-wrap is enabled: They go first to the start / end of the display line, like (Home|LineEnd)Display The difference is that, the cursor is already at the point, it goes on to the start or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?.
2454 | VCHomeWrapExtend | These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)? except they behave differently when word-wrap is enabled: They go first to the start / end of the display line, like (Home|LineEnd)Display The difference is that, the cursor is already at the point, it goes on to the start or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?.
2308 | WordLeft | Move caret left one word.
2439 | WordLeftEnd | Move caret left one word, position cursor at end of word.
2440 | WordLeftEndExtend | Move caret left one word, position cursor at end of word, extending selection to new caret position.
2309 | WordLeftExtend | Move caret left one word extending selection to new caret position.
2390 | WordPartLeft | Move to the previous change in capitalization.
2391 | WordPartLeftExtend | Move to the previous change in capitalization extending selection to new caret position.
2392 | WordPartRight | Move to the change next in capitalization.
2393 | WordPartRightExtend | Move to the next change in capitalization extending selection to new caret position.
2310 | WordRight | Move caret right one word.
2441 | WordRightEnd | Move caret right one word, position cursor at end of word.
2442 | WordRightEndExtend | Move caret right one word, position cursor at end of word, extending selection to new caret position.
2311 | WordRightExtend | Move caret right one word extending selection to new caret position.
2333 | ZoomIn | Magnify the displayed text by increasing the sizes by 1 point.
2334 | ZoomOut | Make the displayed text smaller by decreasing the sizes by 1 point.


MAXScript Editor - Defining And Using Abbreviations

The Tabbed MAXScript Editor introduced in 3ds Max 2008 lets you define and use abbreviations of common used words to speed up the typing of scripting code.

Defining Abbreviations

The abbreviations are defined in a file called MXS_Editor_Abbrev.properties which is empty by default after a fresh installation of 3ds Max and is located in the 3ds Max root directory, but can be easily accessed and edited using the Tools >Open Abbreviations.properties Editor Menu option.

An abbreviation is defined in the form

<AbbrevName>=<Expanded Form>

The abbreviation names can contain any characters (except control chars lile \r or \n), including high ASCII characters (accented characters).
Abbreviation names cannot start with #, space or tab (but can contain spaces inside the name) and cannot contain the '=' character inside.
Abbreviations names are limited to 32 characters.

The expanded form may contain new line characters indicated by '\n' and a caret position indicated by the '|' character. To include a literal '|' character, use '||'.
When expanding, the names don't need to be separated from the previous text. For example, if you define 'é' as '&eacute;', you can expand it inside a word.
If a name is the ending of another one, only the shorter will ever be expanded. For example if you define 'ring' and 'gathering', the later will see only the 'ring' part expanded.

You can define abbreviation definitions for any word, special character or expression that you find yourself typing in too often or is too long to remember.

FOR EXAMPLE,

The following are some possible abbreviations for accelerating GUI creation:

cd=CreateDialog

nf=newRolloutFloater

rof=rendOutputFilename

After defining the abbreviations, press CTRL+S to save the MXS_Editor_Abbrev.properties file to disk.

Using the Expand Abbreviation Feature

Press CTRL+N to open a new Untitled script in a new tab. In the new script, enter

nf

While the cursor is still at the end of the abbreviation, press CTRL+SHIFT+A. The abbreviation will immediately turn into

newRolloutFloater

Using the Insert Abbreviation Feature

Alternatively, position the cursor at the desired location in the editor and press CTRL+SHIFT+R to open a small dialog listing all defined abbreviations.

Either select an entry from the list or type in an existing abbreviation and press the Insert button to add the expanded word to your code.

Using the Abbreviation Feature To Write Code Fragments

Since the expanded version can contain new line characters, it is possible to define abbreviations that contain prototype code and even full functions you need often to be inserted into your code.

FOR EXAMPLE,

You can define the following for loop prototype code as abbreviation in the file MXS_Editor_Abbrev.properties

fordo=for i = 1 to 100 where true do\n(\n)\n

After defining the abbreviations, press CTRL+S to save the MXS_Editor_Abbrev.properties file to disk.

If can now type in a script file

fordo

and after pressing CTRL+SHIFT+A, the following code would appear:

for i = 1 to 100 where true do

(

)

Now you could customize this prototype code by modifying the from and to values, entering a valid while condition in place of true and writing some code into the body of the for loop, but it would have saved you some typing.


MAXScript Editor - Defining Custom Status Bars

The Tabbed MAXScript Editor introduced in 3ds Max 2008 lets you define and switch between a large number of custom status bars displayed at the bottom of the Editor.

Multiple status bars can be defined to display different information about the current file and the editing environment.

By default, there are 4 pre-defined status bars which can be switched by clicking on the status bar.

All status bars can be customized and new ones can be defined in the MXS_Editor.properties file.

Here are the default definitions and the resulting status bars:

# Status Bar

statusbar.number=4

statusbar.text.1=\

li=$(LineNumber) co=$(ColumnNumber) offset=$(CharOffset) $(OverType) ($(EOLMode)) $(FileAttr)

statusbar.text.2=\

$(BufferLength) chars in $(NbOfLines) lines. Sel: $(SelLength) chars.

statusbar.text.3=\

Now is: Date=$(CurrentDate) Time=$(CurrentTime)

statusbar.text.4=\

$(FileNameExt) : $(FileDate) - $(FileTime) | $(FileAttr)


The MAXScript Legacy Editor Windows

NOTE:

This topic describes the MAXScript Legacy Editor Windows used in versions prior to 3ds Max 2008. Some areas of MAXScript in 3ds Max 2008 and higher such as Particle Flow Script Operators and the newScript() method still open instances of the Legacy Editors.

For documentation of the new MAXScript Editor, see MAXScript Tabbed Editor Window

MAXScript Editor windows are text editor windows you can open within 3ds Max and use to create or edit text files, notably MAXScript script files. Press Open Script on the MAXScript rollout, File > Open Script in the Listener menu bar, or MAXScript > Open Script in the 3ds Max menu bar to open an existing script file. MAXScript opens the selected script in a modeless MAXScript Editor window, such as the one shown.

To create a fresh script, press New Script on the MAXScript rollout, File > New Script in the Listener menu bar, or MAXScript > New Script in the 3ds Max menu bar to open a new, empty MAXScript Editor window. You can write and edit text, including drag-and-drop editing, in the MAXScript Editor as you would in other editors like WordPad. The menus are similar to those in many standard Windows text editors. You may have any number of MAXScript Editor windows open at the same time.

MAXScript Editor is suited to developing longer scripts or code fragments you want to keep. You can edit and test parts of them until they are complete, then save your code in a script file for later use. This is a common method for developing large scripts, utilities, and function libraries.

You can select one or more text lines and drag them to a 3ds Max toolbar to create a Macro Script containing the selected lines. For more information, see Defining Macro Scripts .

You can open a MAXScript Editor window from within the Listener or from other running scripts by calling the edit() method. The syntax for the edit() method is:

edit <filename_string>

where <filename_string> is a string literal or an expression that evaluates to a string, and specifies the name of the file whose contents are to be loaded into the new MAXScript Editor window.

EXAMPLE

edit "my_script.ms"

or

scriptfile="my_script.ms"

edit scriptfile

The file will be searched for in the following directories, in the order listed:

  • The current MAXScript directory

  • The 3ds Max executable main directory

  • The Windows NT 32-bit system directory (system32)

  • The Windows 16-bit system directory (system)

  • The Windows directory

  • The directories that are listed in the PATH environment variable

You can create an empty MAXScript Editor window from within the Listener or from other running scripts by calling the newScript() method. The syntax for the newScript() method is:

newScript()

Opens an empty MAXScript Editor window and returns a WindowStream value that may be used as the target for print and format operations. This is useful for directing output to a separate window for ease of inspection or editing, or later saving to a file. Output to a WindowStream is inserted at the current cursor position in that window.

NOTE:

In 3ds Max 2008 and 2009, the newScript() method still creates a Legacy Editor and not a new tab in the new Editor.

FOR EXAMPLE:

debug = newScript()

...

print $foo to:debug

...

format "name is %\n" obj.name to:debug

The Legacy MAXScript Editor window has the following features:

  • Titles that display only the current script's file name, rather than its full path name, so minimized MAXScript Editor windows can be easily distinguished.

  • A line selection margin at the left window border. When you move the cursor into the left margin, it changes to a right-pointing arrow. A single-click selects an entire line, and click-dragging selects multiple lines.

  • Drag-and-drop for moving and copying text to and from other MAXScript Editor windows, the Listener window, or any other text editor window that supports Window’s drag-and-drop. Simply dragging the text will move it. Holding down Ctrl while dragging will copy the text.

  • Selected text is loaded automatically into the search text dialog field when you choose Search > Find or Search > Replace. This is useful for quickly finding other occurrences of the selected text.

  • Selected text is loaded automatically into the Index field of this Online Reference - highlight a keyword in the MAXScript Editor and press the F1 button to open the Online Reference and search for information on the selected keyword.

  • Syntax Coloring - manual syntax coloring is supported, in addition, in 3ds Max 5 and higher, automatic syntax coloring will be performed when opening files and for the current line while typing in the Editor.

  • Bracket Balancing - place the cursor next to a bracket and press Ctrl+B to select all the text between this bracket and its corresponding counterpart.

  • Quick source code navigation - hold down the Ctrl key and right-click in the MAXScript editor to display a context menu listing all major building blocks of the currently loaded script including functions, rollouts, event handlers, UI elements and more.

  • Variable text size - hold down the Ctrl key and turn the mouse wheel (if available) to adjust the size of the source code text. Note: This feature might not be available in all products supporting MAXScript.

For commands use within the MAXScript Editor window, see MAXScript Editor Commands .


MAXScript Legacy Editor Commands

The following menu bar commands and keyboard shortcuts are available in the MAXScript Editor. The edit commands listed below are also available in the MAXScript Editor right-click menu.

File > New, CTRL+N

Opens a new MAXScript Editor window for writing a new script.

File > Open, CTRL+O

Opens a common File Open dialog for choosing an existing script. A new MAXScript Editor window then displays the selected script.

File > Close, CTRL+W

Saves the contents of the MAXScript Editor to the current file name, and then closes the Editor window. If there is not a current file name (that is, the MAXScript Editor window was opened with File > New), a common File Save dialog is opened.

File > Save, CTRL+S

Saves the contents of the MAXScript Editor to the current file name. If there is not a current file name (that is, the MAXScript Editor window was opened with File > New), a common File Save dialog is opened.

File > Save As

Opens a common File Save dialog for choosing a new file name used to store the existing script.

File > Evaluate All, CTRL+E

Evaluates the entire contents of the MAXScript Editor. This is similar to selecting all text, and then pressing SHIFT+ENTER. It has the advantage that the window's scroll position does not change.

Edit > Undo, CTRL+Z

Undoes the last change made to the MAXScript Editor’s content.

Edit > Undo, CTRL+Y

Redoes the undone changes made to the MAXScript Editor’s content.

Edit > Cut, CTRL+X

Copies the selected text to the cut/paste buffer and deletes the text.

Edit > Copy, CTRL+C

Copies the selected text to the cut/paste buffer.

Edit > Paste, CTRL+V

Places the text in the cut/paste buffer at the cursor. If text is selected when executing this command, the selected text is replaced with the cut/paste buffer contents.

Edit > Delete, DEL

Deletes the selected text.

Edit > Select All, CTRL+A

Selects all text in the MAXScript Editor.

Search > Find, CTRL+F

Displays Find dialog. Performs search in the MAXScript Editor for the Find What text. Search can be restricted to occurrences that are not part of a larger word, or are the exact combination of uppercase and lowercase letters as the Find What text. If matching text is found, the text is selected.

Search > Find Next, CTRL+G

Repeats the last Search > Find by finding and selecting the next occurrence of the Find What text.

Search > Replace, CTRL+H

Displays Replace dialog. Performs search in the MAXScript Editor for the Find What text, and replaces the matching text with the Replace With text. Search can be restricted to occurrences that are not part of a larger word, or are the exact combination of uppercase and lowercase letters in the specified text.

Help > Help

Displays the MAXScript Online Reference.

Help > About MAXScript

Displays About MAXScript dialog.

TAB, CTRL+I

Indents selected lines of text by one tab width.

SHIFT+TAB, SHIFT+CTRL+I

Unindents selected lines of text by one tab width.

SHIFT+ENTER

A MAXScript Editor can send code selections to Listener for evaluation. Select some text in MAXScript Editor and press SHIFT+ENTER to send the selected text to Listener. Listener compiles and evaluates it and prints out the result at the end of the current text in Listener. If you press SHIFT+ENTER with no text selected, the line containing the cursor is sent to Listener for evaluation. This behavior is similar to using SHIFT+ENTER in Listener, except that the results of the evaluations are printed in the Listener, not inserted into the MAXScript Editor text.

If you have a number pad on your keyboard, the Number-Pad ENTER key is an alternative to SHIFT+ENTER and can be used to execute commands. You may find the Number-Pad ENTER key faster and easier to use.

CTRL+Right-Click

Displays a pop-up menu of all the utility, structure, user-interface item, function, handler, plug-in, tool, Macro Script, and rcmenu definitions that exist in the current script. Select one of the items in the pop-up menu to position that definition at the top of the MAXScript Editor window. This simplifies large script navigation.

CTRL+B

Selects the text in the current bracket. Bracket balancer lets you check bracket balancing in long bits of code. The balancer works with any of the following: (), [], and {}. To use it, place the cursor anywhere in the script text and press CTRL+B. If the cursor is next to a bracket, the code bracketed by it and its matching bracket will be selected and highlighted. If the cursor is not next to a bracket, the closest bracketed code containing the cursor will be selected. If you press CTRL+B again, the next outer bracketed fragment is selected, and so on. You can keep pressing CTRL+B to move out through bracket nestings. If at any point there is a bracket mismatch, the balancer will beep and not select any text.

CTRL+D

Performs a simple syntax coloring scheme in the MAXScript Editor. Each time you press CTRL+D, the window is redrawn with comments in green, MAXScript reserved words in blue, and string literals in dark red. This often helps in reading large, complex programs. New text is always colored black and you have to press CTRL+D at some point to recolor the script. Syntax coloring is a programming aid and does not effect script execution.

Script files will be automatically syntax colored when opened. Automatic syntax coloring as you type in the Editor will also be performed, but only on single line basis. Comments and strings spanning multiple lines will not be colored properly - please use Ctrl+D in such cases to force a manual update.

CTRL+R

Places the cursor at the location where it was previously placed with a mouse click or a find operation. Consecutive uses of CTRL+R cycle through the last eight cursor positions. This feature is useful if you edit at one location, move the cursor elsewhere with find or scroll operations, and then want to return to the edit location. This feature allows you to quickly review the code pieces you recently worked on.

CTRL+J

Opens a modal "Go To Line Or Character" dialog which lets you enter a line and/or character position to jump to. This feature could be used for example with the line and character numbers found in the output of the Debugger or in an error message in the Listener in 3ds Max 8 and higher. The default values in the dialog will be set to the current cursor position.


General MAXScript Topics

This section presents topics that supply information on general MAXScript topics.

Error Messages

Aborting Execution with the ESC Key

MAXScript Desktop State

Startup Scripts

Running Scripts from the Command Line

Source Code Layout and Continuation Lines

Including Scripts within Scripts

Encrypting Script Files


Error Messages

When MAXScript detects a runtime error in your script, it displays an error message and prints diagnostic information to the Listener output pane. If the error occurs in a controller script or rollout panel script, the error message is displayed in an Alert Box window, otherwise it is printed in the Listener output pane.

The diagnostic information is in the form of a call stack trace-back which can help determine the cause and location of the error in your code. The call stack trace-back shows the nesting of called MAXScript functions at the point of error, deepest ones first to outermost ones last. The call stack trace-back also displays the values in all the local variables and function parameters at the levels they are declared or first used. Note that for loops produce separate entries in the call stack trace-back and include a variable dump for the loop variable and any locals in the loop body.

As a further aid in locating the error, MAXScript shows the line in which the error occurred in an MAXScript Editor window if the running code was compiled from a source file (any code not entered directly in the Listener). If the source file is not currently open in a window, MAXScript opens the file in a new MAXScript Editor window. The line containing the code in which the error occurred is highlighted and scrolled into view. The error message is either displayed in a Alert Box window or the Listener window. In both cases, the Alert Box or Listener window is brought to the front and the MAXScript Editor window containing the code causing the error is immediately behind.

All compile and runtime error messages reported in the Listener output pane are preceded by the comment symbol "--", so you can reselect and evaluate code in Listener that might have embedded error messages and not have them cause syntax errors.

In the following figure, an Editor and a Listener window are shown where an error was detected while running the script. The error occurred in the highlighted line in the Editor window. Looking at the call stack trace-back, we see the error occurred when the for loop variable i is equal to 101. In the line in error, the position of the object specified by the 101st element of array b is being set. After further investigation, it was found the array b only had 100 elements defined. Thus element b[i] contained the value undefined, which resulted in the error as there is no position property associated with undefined.

In the following figure, an error dialog and script controller dialog are shown. An error was detected while running the script assigned to a script controller. This error was caused by the deletion of object box02, whose position was used in the script.


Aborting Execution with the ESC Key

You can abort running MAXScript code by pressing and holding the ESC key. MAXScript may take a moment to respond, so hold the ESC key down until it does. The ESC key aborts any currently executing MAXScript code, whether it is in a scripted utility, a script controller, or running in the MAXScript Listener window. If the MAXScript code that is aborted is in a script controller, a Script Controller dialog is displayed showing the script used by the controller. Execution of the script controller will restart when you click the Close button.

MAXScript code locks out the rest of 3ds Max while it is executing. You cannot work interactively in 3ds Max while MAXScript code is running to avoid conflicts between code actions and your actions. If 3ds Max appears unresponsive at any time, it may be running MAXScript code which you can attempt to abort by pressing ESC. If you are testing scripts and 3ds Max doesn't return control to you within a reasonable time, press ESC to abort the code execution. You can also press ESC to abort a compilation of a multiline command in the MAXScript Listener window.

Use the MAXScript global variable escapeEnable in scripts to turn on and off the ESC key interrupt detection.

In 3ds Max 9 and higher, the default value was changed to false. It used to default to true in versions prior to 3ds Max 9.


MAXScript Desktop State

MAXScript remembers the state of its desktop (the location of active Editor and Listener windows) when you exit 3ds Max and restores this state when you restart MAXScript. Any MAXScript Editor files missing when you restart will not have their windows reopened.

The desktop state is stored in a file called maxscrpt.dsk in the 3ds Max executable directory. You can rename this file and replace it if you want to keep several desktop setups configured, or simply delete it so the current desktop will not be restored.


Startup Scripts

When 3ds Max is first started, MAXScript searches for any startup script files that it then automatically loads and runs. This feature is useful if you have function libraries you always use and want preloaded, or if you want to establish custom UI settings, define scripted plug-ins, or load scripted utility rollouts.

When 3ds Max starts up, it will always follow the script loading order described below. Certain parts of the software will still not be up and running at different stages of the startup process. Understanding the order and the reasons for it will help you organize your code and have all functions and UI auto-loading and working correctly together.

STEP 1 - Standard Scripts

3ds Max will evaluate the shipping scripts found under stdplugs\stdscripts. These define functions needed by several scripted elements of the base 3ds Max software. If you need to have some functions/global variables defined for use by your own macroScript, those should go into an .ms file in stdplugs\stdscripts. This will ensure that they will be defined first.

STEP 2 - User-Defined Plug-in Paths

Next, 3ds Max will load script files in directories defined in Customize... > Configure Paths... > Plug-Ins and their subdirectories - note that this is different from the way regular plug-ins are loaded. Plug-ins will only load from the specified path and not search sub-directories.
Here you can define functions, methods, and structures used by other scripts,
particularly MacroScripts.

The 3ds Max scene has not been created and the viewports have not been created at this point. You cannot create scene objects or do anything UI related in these scripts. Of course you can define functions that do these operations, you just can't call these functions at this point.

In this pass, any script files with the name startup.ms are ignored. This allows you to place your scripted plug-in scripts in the plug-in folders for automatic loading. They can be managed like DLL plug-ins, and used to organize your startup scripts into groups in their own directories for easier management. You can prevent a nested directory from being scanned by placing its name in parentheses, for example "(old-versions)", allowing you to enable and disable scripts in handy directory-based groupings.

STEP 3 - MacroScripts

Next, MacroScript .mcr files in ui\macroscripts will be evaluated - they define Action Items that can be displayed in the UI. At this point, UI has not been built yet, the MacroScripts will be needed to fill in their related buttons.

STEP 4 - Startup Scripts

Finally, the startup.ms and then any scripts found in the startup folders will be evaluated. At this point, scene, viewports, and UI are up. You can do anything here you want.

In 3ds Max 9 and higher, startup scripts in the 3ds Max system startup scripts directory are run first, then the startup scripts in the user startup scripts directory are run, providing that the user startup scripts directory is different than the max system startup scripts directory.

MAXScript first searches for a file named startup.ms in the following directories, in the order listed:

  • The user scripts directory

  • The user startup scripts directory

  • The max system scripts directory

  • The max system startup scripts directory

  • The 3DS executable main directory

  • The Windows NT 32-bit system directory (system32)

  • The Windows 16-bit system directory (system)

  • The Windows directory

  • The directories that are listed in the PATH environment variable

MAXScript stops searching when it finds the first occurrence of startup.ms.

The automatic loading of startup script files can be deactivated by turning off the Auto Start MAXScript option in the MAXScript page of the Preferences dialog, as described in the MAXScript Preferences Settings topic in the main product online help.


Running Scripts from the Command Line

You can launch 3ds Max from a DOS command line and have it run a specified launch script, which is useful for tasks such as unattended batch-rendering. This capability uses the existing -U command line switch that names a utility to be run when 3ds Max is started. The -U switch allows an optional extra argument which, for MAXScript, is taken to be the name of the launch script to run. The case of MAXScript must be as shown in the following example:

c:\3dsmax\3dsmax -U MAXScript rendercams.ms

This example command line would launch the 3ds Max executable in c:\3dsmax, start MAXScript, and then have it run the launch script rendercams.ms.

The following example launch script loads two scenes, renders frames from each of the cameras in them, and then quits 3ds Max:

loadMaxFile "foo.max"

for c in cameras do render camera:c outputfile:("foo_"+c.name+".bmp")

loadMaxFile "baz.max"

for c in cameras do render camera:c outputfile:("baz_"+c.name+".bmp")

quitMax #noPrompt

This example makes use of the quitMax() method to exit 3ds Max (see Exiting and Resetting 3ds Max ) when the script is finished. Launch scripts need not be batch scripts as in this example, but may be used to condition 3ds Max for interactive use, for example by loading a scene file and setting some user-interface options.

The normal startup scripts, startup.ms and those in the Startup Scripts directory, are run before the launch script.

It is also possible to install scripts into individual scene files that run automatically when that scene is open or closed or at certain other events (see General Event Callback Mechanism ).

NOTE:

Command line -U MAXScript startup scripts are run *after* 3ds Max has completely booted and the standard MAXScript stdscripts and scripts\startup scripts have been run.


Source Code Layout and Continuation Lines

The layout rules for MAXScript code are unlike those of most programming languages and give you the advantages of freeform languages, such as C and C++, but without the need for extensive punctuation, like semicolons and parenthesized parameter lists.

MAXScript lets you break statements and expressions across lines wherever you want, providing the line break is in the middle of an expression. MAXScript reads your code until the end of each line and determines whether it has a complete expression. If it does not, it continues to read subsequent lines until it finds the rest of the expression.

TAKE AS AN EXAMPLE THE FOLLOWING LINE:

a + b * c / d - e + f * g / h

This line can be broken after any of the operators. MAXScript continues to read the next line, because an operator needs another argument.

FOR EXAMPLE:

a + b * c / d - e +

f * g / h

You cannot break the example line as shown next and get the same result, because the expression on the first line is a complete expression. MAXScript considers the two lines as separate expressions, and the second line is now syntactically wrong, because it starts with an operator.

NOT POSSIBLE:

a + b * c / d - e

+ f * g / h

If you do want to break a line at the end of a sub-expression, you can use the backslash line continuation character: '\'. The previous example above of an invalid break can be made valid using the line continuation character after the 'e':

EXAMPLE

a + b * c / d - e \

+ f * g / h

Whenever MAXScript encounters a '\' as the last character on a line, except for spaces, tabs, or comments, it continues to read the next line as though the line break were not present.

Line continuations are often used to break up function calls with many arguments, as shown in many of the Expressions topics.

This scheme allows you to write the following forms of the same statement without using periods or semicolons, as you might in other freeform languages.

FOR EXAMPLE

An if/then/else construct could be written as:

if a < b then print c else print d

or

if a < b then print c

else print d

or

if

a < b

then

print c

else

print d

MAXScript also lets you combine multiple statements and expressions in a single line. The statements or expressions are separated with a ';'.

EXAMPLE

print "End of input data reached" to:f ; close f ; f = undefined

if a < 0 do (print "value out of range";a=0)

Comments in MAXScript begin with a double-hyphen ('--') and extend to the end of the current line. Many code examples in this help file use comments in this style.

EXAMPLE

-- special cases...

if first do

subanims[6]=undefined -- subanims[6] is #Image_Motion_Blur_Multiplier


Including Scripts Within Scripts

MAXScript provides a compile-time source-file include mechanism, allowing you to break up large scripts into smaller files that can be included at nearly any point in a script. You can use the include <file> construct at any point in your code to effectively insert the contents of a file at that point in your code.

The form is:

include "filename_string"

This is a compile-time construct, therefore the file name specification must be a string literal, and not a variable or an expression.

EXAMPLE

utility foo "Baz"

(

local a, b, c

include "foo-ui.ms"

rollout bar "Bar"

(

include "bar-rollout.ms"

)

include "foo-handlers.ms"

)

The include <file> construct is effectively replaced in the source code at that point with the contents of the named file.

You can nest included files as deeply as needed; included files can include other files, and so on.

Because include is a compile-time construct, the current MAXScript scope is maintained within the included file. This is opposed to the fileIn() method described in Running Scripts , whose script file content is compiled in a global scope context. For more information, see Scope_of_Variables .

The include <file> can appear at any point a new token is expected, such as a name, literal, or punctuation. This means that you could complete a partial expression with an included file.

FOR EXAMPLE

include "op1.ms" + include "op2.ms"

if include "test2.ms" then print a else print b

You cannot place an include <file> within a token. For example, the following is not valid:

NOT VALID:

timeval = 2:include "framenum.ms".0


Encrypting Script Files

MAXScript lets you create an encrypted copy of a specified script file with the same name prefix, but with the suffix .mse, in the same directory as the source script file. The encryption uses a fixed hidden key that lets it run on any 3ds Max system, but effectively hides the source of the script. Encrypted script files have the suffix .mse.

To encrypt a script, use the following MAXScript method:

encryptScript <filename_string> [version:<int>]

where <filename_string> is a string literal or an expression that evaluates to a string specifying the name of the script file whose contents are encrypted.

The optional version: keyword can be either 0 or 1.

  • When set to 0, the method uses the old encryption scheme of 3ds Max 2 to 9.

  • When set to 1 or not specified, the method uses the new encryption scheme introduced in 3ds Max 9 SP 1. Note that files encrypted with the new scheme cannot be run in previous versions of 3ds Max. If an encrypted script has to be used in an older version of 3ds Max, use the version:0 option.

    • EXAMPLE USES ARE

    encryptScript "my_script.ms"

    --create file compatible with old versions:

    encryptScript "my_script.ms" version:0

    or

    scriptfile="my_script.ms"

    encryptScript scriptfile

    The encrypted script file from the previous examples would be named my_script.mse.

    The Run Script button in the MAXScript rollout and the fileIn() method described in Running Scripts automatically support .mse encrypted scripts.

    You can couple this script source code encryption with the hardwareLockID variable and the encrypted file I/O functions to provide authorization-based protection for your scripts.


Syntax Definitions in This Document

The ways you can write MAXScript tokens and clauses are given using a set of shorthand rules as shown in the following example:

[-]{<digit>}[.{<digit>}][(e | E)[+ | -]{<digit>}+]

These rules, or syntax definitions, follow the standard EBNF notation (Extended Backus-Naur Form).

The previous example shows the syntax for a decimal number in MAXScript. The rules typically contain a number of characters with special meanings. For example, brackets enclose optional items, such as the minus sign in front of the number. Braces enclose items you can use repeatedly, and bars separate multiple items from which you can choose one. Sometimes, rules are given names so they can be referred to in the documentation or as parts of other rules. The special characters in the rules have the following meaning:

Characters | Meaning
[...] | items inside the brackets are optional
(...|...|...) | choose one of the items separated by the bars
{...} | you can specify the braced item ZERO or more times
{...}+ | you can specify the braced item ONE or more times
::= | define a name for a syntax rule
<rule> | you can insert what is defined by the named rule
bold_characters | characters or token as written

The previous number syntax example is interpreted as follows:

Syntax | Definition
[-]{<digit>} | an optional minus sign (the sign), followed by 0 or more digits (the integer part), followed by
[.{<digit>}] | an optional sequence (the fraction part) comprised of: a period character, followed by 0 or more digits, followed by
[(e | E)[+ | -]{<digit>}+] | an optional sequence (the exponent part) comprised of: either an ‘e’ or ‘E’, followed by an optional plus or minus sign, followed by one or more digits.

Examples of valid numbers are:

EXAMPLES OF VALID NUMBERS ARE:

123

1.456

-0.89e-7

1.536E23

THE FOLLOWING NUMBERS ARE NOT VALID:

12x34

-0.45x10^3

0e

The syntax definitions in MAXScript Grammar are in the form of named rule definitions.

FOR EXAMPLE

number ::= [-]{<digit>}[.{<digit>}](e | E)[+ | -]{<digit>}+]

allowing the rule to be referred to by name in other rules in the grammar.

AN EXAMPLE OF SUCH RULE IS:

mod <number1> <number2>

modulo arithmetic, the remainder when <number1> is divided by <number2>

Some definitions throughout this document also use the convention of showing alternative definitions for a rule on consecutive lines instead of separating them with the '|' symbol.

See also

Index vs Integer Function Arguments


Index vs Integer Function Arguments

In general, indices in MAXScript are 1-based.

Functions expecting a 1-based index will specify this as <index> in the function definition.

EXAMPLE:

<string>getName <index>listIndex

<index>listIndex: The index of the item for which to get the name.

In the cases where a function requires a 0-based argument, it will be specified as <integer> instead. Usually, the fact that the argument is expected as 0-based will also be noted explicitly in the description of the function.

EXAMPLE:

<maxObject>GetRenderElement <integer>index

Returns a specific element, index is 0 based.

See also

Syntax Definitions in This Document


Objects and Classes in Object-Oriented Programming

To understand the terminology associated with MAXScript, a basic understanding of object-oriented programming is required.

All of the values you work with in MAXScript have a well-defined type, such as integer, matrix3, or twist. The type of a value is also known as its class, following the convention of modern object-oriented languages. We've been using a somewhat neutral convention so far of calling the things you compute with values. The term for these things in object-oriented languages is, not surprisingly, object. The terms object and value are synonymous in this document. An object is a particular instance of a class.

For example, in MAXScript Box is a class. It is not a box as shown in 3ds Max, but rather defines the characteristics such a box has. These characteristics include the ways to create an instance of the Box class (a box object); the properties of a box object (such as Height, Width, and Length); and operations you can perform on a box object (such as move, copy, and delete).

To create a box object, you would say:

b=box()

In this line box() is a constructor - it causes a box object to be created, and returns a reference to the box object. This reference is then stored in variable b. No parameters (such as Height, Width, and Length) were supplied for the constructor, so the default values specified by the Box class are used. In the 3ds Max viewports, the box object is displayed, and can be manipulated like any other object you create in 3ds Max.

If parameters are supplied for the constructor, these parameters replace the "()".

FOR EXAMPLE

b=box width:10 length:100

creates a box object with the supplied parameters. All unsupplied parameters will use their default values.

MAXScript is internally object-oriented. All the built-in classes are arranged in an inheritance hierarchy and most of the built-in functions are polymorphic, terms we'll explore below. You cannot, however, create new classes in MAXScript and the functions you can script are not polymorphic. This may change in later versions of MAXScript, but it is an advanced refinement that is not really necessary in an application scripting language, where the most important abstractions are the features of the host application and are already built-in.

See also

Inheritance and Polymorphism

Properties, Methods, Operators, and Literals


Inheritance and Polymorphism

Inheritance and polymorphism are the two defining characteristics of object-oriented languages. Inheritance is the ability of an object class to inherit the operations and properties of its parent class. Polymorphism is the ability of a single-named operation to work on different values of different object classes. We'll explore them here to see how they are used in 3ds Max and MAXScript.

First and foremost, both characteristics depend on the system having a well-defined type, or class, for every value. Assigning classes to values divides all the values you can work with into groups, each of which have well-defined operations and properties for their values. In some languages, like standard C++, the class is only manifest at compile-time. In others, like Smalltalk and MAXScript, the classes are actual runtime entities and every value has a runtime class-tag that says what class it is. This is the main reason MAXScript can have type-free variables. It can look at the class-tag of the value in a variable at runtime to determine its class.

Once the objects are grouped into classes, the groups themselves can be arranged into hierarchies. We do this all the time in real life. A classic example is the biological hierarchy, arranging real-life objects hierarchically into animals and plants and mammals and vertebrates and humans and adults and children, and so on. An object-oriented language provides a way to arrange value classes into hierarchies and, like the hierarchies we are used to, a class at some point in the hierarchy shares all the operations and properties of all its parent classes. This sharing is known as inheritance in object-oriented languages, and the operations and properties defined for a class are automatically inherited by all of its descendant classes.

As an example, the following is the hierarchy for the Box class:

Value

MAXWrapper

Node

GeometryClass

  Box

Various characteristics are defined for a class, and each lower class inherits those characteristics. For example, the classOf() method is defined for class Value, and class Box inherits this method through its hierarchy. Thus you can specify a Box object as a parameter to the classOf() method.

In the MAXScript Class Hierarchy topic, all the built-in classes in MAXScript are laid out in their place in the hierarchy so you can see for each class the classes it inherits characteristics from. Some of the hierarchy comes from within 3ds Max itself which is internally object-oriented. All of its objects, modifiers, controllers, and so on are arranged in a well-defined inheritance hierarchy.

Once the objects have been grouped into classes, the symbology for the operations that can be performed on objects of each class can be simplified. The classic example of this comes from mathematics. The symbolic operators '+', '-', '*', and '/' are shared among many types of values (integers, reals, complex, vectors, matrices, and so on), and perform the correct action on the types they are applied to. This capability for a single-named operation to work on different types is called polymorphism. Object-oriented languages let you use the same name for different methods or operators across different classes, and the correct method to apply is automatically determined based on the class of the value it is used with.

In MAXScript, all math operators and methods are polymorphic in this sense and reflect the standard mathematical conventions. An interesting example for 3ds Max use is the random() method. It takes two arguments and generates a random value between them. So, if you give it floats it gives you a float back; if you give it 3D points, it gives you a random point in the box they define the corners of; if you give it quaternions, it gives you back a random rotation between them, and so on.

Further, all the methods that work on 3ds Max objects are polymorphic within their hierarchies. So move, hide, and select work on all types of scene objects; time scaling and insertion work on all the types of controllers, and so on.


Properties, Methods, Operators, and Literals

One principle of object-oriented programming is that how a class operates internally is hidden. All interactions with a class are defined by the external interfaces for the class. These external interfaces are broken up into several categories.

Properties: Accessible parameters for objects of the class. Examples of properties are height, width, and length for boxes, and radius for spheres.

Methods: Defines all the functions you can call for objects of the class. Examples of methods are moving or rotating a 3ds Max object, adding a modifier to a 3ds Max object, and accessing the position of vertices in a 3ds Max object. The terms method and function are synonymous in this document.

Operators: Defines the math and other symbolic operators that are defined on values in the class. An example of an operator is the '-' operator, which will perform a mathematical operation on numbers, colors, vectors, and matrices, but will perform a Boolean subtraction when used with 3ds Max objects.

Constructors: The various ways you can create objects of the class. For example Point3 0 0 0 and <color> as Point3 are constructors for the Point3 class. Executing either of these constructors will create a new Point3 object.

Literals: Any literal form for objects of the class. For example [0,0,0] is a literal form for the Point3 class, and "Hello world" is a literal form for the String class.


MAXScript for New and Casual Users

MAXScript is a very powerful addition to the 3ds Max toolset. Using it in daily work can highly increase productivity or even let the user find solutions not directly available in the base software. Just like using plug-ins, using freely or commercially available scripts does not require knowledge of the programming language used to develop them. MAXScript allows the developer to build a user-friendly UI that isolates the end user from the internal code.

In addition, a large portion of the User Interface of 3ds Max uses MAXScript. This means that having a basic understanding of how scripts are installed and executed is an important part of the ground knowledge of the software.

The following pages should give new or casual MAXScript users the necessary information to install and work with 3rd party scripts.

Topics:

Scripted Utilities for New Users

MacroScripts for New Users

Scripted Plug-ins for New Users

Scripted Functions for New Users

MAXScript DLX Extensions for New Users

See also

Startup Scripts

Learning MAXScript

How To - Introduction to the Tutorials

Online Help Script Examples


Scripted Utilities for New Users

Scripted Utilities appear in the Utilities Panel > MAXScript Utility. This used to be the main script type in the early 3ds Max versions (R2.x). Many older scripts are still available as scripted utilities. In addition, scripted utilities are probably the easiest to write script form since they are a special case of rollouts and can save the developer some UI management work.

Scripted utilities have the extension .ms and contain the constructor "utility" in the source code, something in the form of:

utility someName "Some Name"

(

...

)

To run a scripted utility (single 3ds Max session):

1. Go to the Utilities panel, open MAXScript Utility, press Run Script... (Alternatively, go to main menu, MAXScript, Run Script...)

2. Locate and select the .ms script source file and press Open. The name of the utility will appear in the "Utilities" drop-down list.

3. Select the name of the Utility from the list - the scripted utility will open in the Utilities panel.

Note: Next time you start 3ds Max, the Utility will NOT be loaded. You will have to repeat the above steps or use the method below:

To install a scripted utility (multiple 3ds Max sessions)

1. Copy the script file to the \Scripts\Startup folder.

2. Start 3ds Max - the script will be evaluated on startup and will appear in the Utilities Panel > MAXScript > Utilities drop-down list automatically. This will happen each time you start 3ds Max.

3. To start, select the name of the Utility from the drop-down list - the scripted utility will open in the Utilities panel.

See also

Startup Scripts

Topics:

MAXScript for New and Casual Users

MacroScripts for New Users

Scripted Plug-ins for New Users

Scripted Functions for New Users

MAXScript DLX Extensions for New Users


MacroScripts for New Users

MacroScripts were first introduced in 3ds Max 3. They were originally implemented to accommodate the output of the Macro Recorder (thus the name) and were intended for use as buttons on the toolbars. A MacroScript is generated automatically when scripting code (from the MacroRecorder output, from the MAXScript Listener or from a MAXScript editor) is dragged and dropped onto a toolbar. The new scripts have the extension .mcr and are written to the UI\MacroScripts folder.

To create a MacroScript using Drag And Drop:

1. Select some code in the MacroRecorder output, the MAXScript Listener or in a MAXScript editor.

2. Click and Drag the selection to a toolbar while holding the left mouse button pressed.

3. Drop the selection on the toolbar by releasing the left mouse button.

Result: A new button will be created, showing a generic MacroScript icon. The new script will be named "MacroN" where N is a unique number incremented after each drag and drop operation. The category of the new script will be "DragAndDrop".

Later in 3ds Max 4, the UI has been extended to allow the usage of MacroScripts as ActionItems in Menus, QuadMenus, Toolbars and Keyboard Shortcuts. Currently, this is probably the most common form of scripts found in 3ds Max and is vital to UI customizability.

Of course, a script developer can write the same form of scripts manually or use automatically generated MacroRecorder code as template for manual enhancements. The developer’s source code might also be contained in an .ms file.

A typical MacroScript will usually start like this:

macroScript scriptName category:"CategoryName"

(

...

)

Note the category: name. You will need this name in order to be able to quickly locate the script in the Customize dialog.

To install a MacroScript:

1a. Click the MAXScript item in the Main Menu, select Open Script...

1b. Alternatively, go to the Utilities panel, open the MAXScript Utility, press Open Script...

2. Locate and select the script and press Open.

3. Note the name of the MacroScript and the Category name.

4. In the MAXScript Editor, click File and select Evaluate All or press Ctrl+E. This will evaluate the script.

5. Go to Customize > Customize User Interface and select the desired Tab (Keyboard, Toolbars, Quads or Menus)

6. Locate the Category you noted in 3.

7. Search in the Category for the name you noted in 3.

8. Drag the script to the toolbar, Menu or QuadMenu or assign to a Shortcut.

An evaluated MacroScript appears in the Customize... dialog’s categories list of Action Items. The evaluated version of the script remembers its source’s location. As soon as a MacroScript ActionItem is being assigned to a Toolbar, Menu, QuadMenu or Shortcut, a copy of the source will be automatically written to the UI\MacroScripts folder with a new name comprised of the Category Name, the MacroScript’s name and the .mcr extension.

If you change or update the script by evaluating a newer / different version with the same name and category, the copy of the script in UI\MacroScripts will be overwritten with the actualized version.

All scripts in UI\MacroScripts will be automatically evaluated on startup and will be available to the user in future sessions. To remove a MacroScript permanently, you should remove the respective .mcr file from UI\MacroScripts.

It is not advisable to have any MacroScript sources in autostart folders like the \Scripts\Startup or the plug-in paths as this would mean a double evaluation of the same source code from two different locations. Store sources of MacroScripts (your own creations, free downloads from the web or commercial scripts) at paths that are not listed in your Configure Paths dialog. This way only the automatically managed content of the UI\MacroScripts folder will be used by 3ds Max.

See also

Startup Scripts

Topics:

MAXScript for New and Casual Users

Scripted Utilities for New Users

Scripted Plug-ins for New Users

Scripted Functions for New Users

MAXScript DLX Extensions for New Users


Scripted Plug-ins for New Users

Scripted plug-ins appear and behave inside of 3ds Max similar to regular plug-ins written using the SDK. Often the user will have a hard time telling whether a plug-in is actually a script or not (with the exception of scripted RenderEffects which are usually slower than their C++ counterparts)

Before installing a scripted plug-in, you can open the source file and note the plug-in’s name. This will make it easier for you to locate the actual UI entry as described below. A scripted plug-in has typically the form

plugin superClass ClassName

name: "PluginName"

classID:#(....)...

(

...

)

Remember the name: string and look for it in the respective area of the UI.

To install a scripted plug-in (multiple 3ds Max sessions)

1. Copy the script file to any folder listed in your Plug-ins Paths configuration. ( Main Menu > Customize > Configure Paths > Plug-ins tab )

2. Start 3ds Max - the script will be evaluated on startup and the new plug-in will appear in the respective area of the UI - see below for details regarding different plug-in classes. This will happen each time you start 3ds Max.

To test a scripted plug-in (single 3ds Max session):

1a. From the Main Menu, select MAXScript and Run Script...

1b. Alternatively, go to the Utilities panel, open MAXScript Utility, press Run Script...

2. Locate and select the script source file and press Open. The script will be evaluated and will create a new plug-in class. It will appear in the respective area of the UI - see below for details regarding different plug-in classes.

Note: Next time you start 3ds Max, the scripted plug-in will NOT be available. The plug-in will be available only until the end of the current session and will be reported later as missing when loading files saved in the test session. To load .MAX files containing scripted plug-ins, you have to make sure the plug-in is loaded prior opening the scene.

Scripted plug-ins can be used to extend 3ds Max with

Scripted Geometry

Will appear in the Create panel > Geometry in a category defined by the developer. These plug-ins can create and manipulate only instances of existing classes and are similar to System plug-ins, but living in the Create panel. They don’t have their own object and sub-object levels.

Scripted MeshObjects (SimpleObject Class)

Will appear in the Create panel > Geometry in a category defined by the developer. They can generate an EditableMesh object on the fly just like the basic and extended primitives.

Scripted Modifiers

Will appear in the Modify panel on the Modifiers list. There are two classes of modifiers. The one will extend existing modifiers (for example by replacing the UI). The other will modify the object in local space based on a Gizmo (like Bend and Twist do).

Scripted Lights

Will appear in the Create panel > Lights in a category defined by the developer. They can only extend existing lights.

Scripted Cameras

Will appear in the Create panel > Cameras in a category defined by the developer. They can only extend existing cameras.

Scripted Helpers

Will appear in the Create panel > Helpers in a category defined by the developer. They can only extend existing helpers.

Scripted Materials

Will appear in the Material/Map in a category defined by the developer. They can only extend existing materials.

Scripted TextureMaps

Will appear in the Material/Map in a category defined by the developer. They can only extend existing maps.

Scripted RenderEffects

Will appear in the Rendering > Effects... > Add Effect list.

Scripted Atmospheric Plug-ins

Will appear in the Rendering > Environment... > Atmosphere > Add... list.

Scripted Manipulators

Scripted Manipulators can appear under Create > Helpers > Manipulators or can be hidden to the user and only appear in the viewport when Manipulate mode is on and an object with a supported property is selected. They behave exactly as Manipulator plug-ins. In fact, several shipping manipulators like the Slider Manipulator, the Radius manipulator and the UV Manipulator are implemented as Scripted Manipulator Plug-ins. You can find their sources under \Stdplugs\StdScripts

See also

Startup Scripts

Topics:

MAXScript for New and Casual Users

Scripted Utilities for New Users

MacroScripts for New Users

Scripted Functions for New Users

MAXScript DLX Extensions for New Users


Scripted Functions for New Users

A function is a piece of code intended to complete a specific task. It can be defined once and called multiple times by different scripts. Using functions can make developing new scripts faster as often used parts of code are already available and just have to be called to get the desired results. In addition, using functions makes the final code better structured and easier to read and maintain.

There are many pre-defined custom functions shipping with 3ds Max, for example for defining object filters in MacroScripts, building rollouts automatically etc. There are also a multitude of freely available 3rd party scripted functions downloadable from the Web. If you are a new MAXScript user starting to learn the language, using such functions can make your first steps much easier.

A function in MAXScript can take no parameters or require any number of parameters. It is easy to find out what and how many parameters are required by a function by just looking at its definition. Functions that require zero parameters can be called by adding () to the name of the function.

See also

Startup Scripts

Creating Functions

Online Help Script Examples

Topics:

MAXScript for New and Casual Users

Scripted Utilities for New Users

MacroScripts for New Users

Scripted Plug-ins for New Users

MAXScript DLX Extensions for New Users


MAXScript DLX Extensions for New Users

MAXScript can be extended just like any other part of 3ds Max by installing additional 3rd party plug-ins. These plug-ins will have the extension .DLX and should be installed exactly like any other type of 3ds Max plug-in by just copying the .DLX file to any Plug-in path specified in the Customize... > Configure Paths... > Plug-Ins list.

MAXScript DLX Extensions can add any sort of additional functionality like access to object properties, new UI elements etc. In fact, some features available in the current version of MAXScript used to be DLX extensions to earlier versions of 3ds Max. This way, MAXScript can be enhanced between releases.

Since the current version of MAXScript allows 3rd party plug-in developers to expose properties and methods of their plug-ins via the Function Publishing Interface (FPS) introduced in 3ds Max 4, the need for custom DLX extensions has been reduced significantly.

Topics:

MAXScript for New and Casual Users

Scripted Utilities for New Users

MacroScripts for New Users

Scripted Plug-ins for New Users

Scripted Functions for New Users


New in MAXScript

This page provides an index of the pages dealing with changes to 3ds Max, the MAXScript language and this Reference in the current and previous versions.

3ds Max 2009

What is New in MAXScript in 3ds Max 2009

Documentation Changes in 3ds Max 2009

3ds Max 2008

What was New in MAXScript in 3ds Max 2008

Documentation Changes in 3ds Max 2008

3ds Max 9

What was New in MAXScript in 3ds Max 9

MAXScript Language Improvements in 3ds Max 9

Documentation Changes in 3ds Max 9

3ds Max 8

What was New in MAXScript in 3ds Max 8

MAXScript Language Improvements in 3ds Max 8

Documentation Changes in 3ds Max 8

3ds Max 7

Documentation Updates after 3ds Max 7 Release

What was New in MAXScript in 3ds Max 7

MAXScript Language Improvements in 3ds Max 7

Documentation Changes in 3ds Max 7

3ds Max 6 and VIZ 2005

What was New in MAXScript in Autodesk VIZ 2005

What was New in MAXScript in 3ds Max 6

3ds Max 5

Documentation Changes in Particle Flow Update

MAXScript Changes in 3ds Max 5.1

What was New in MAXScript in 3ds Max 5


What is New in MAXScript in 3ds Max 2009

The following pages will give you a quick overview of the MAXScript language changes and improvements in 3ds Max 2009. For details on each feature, please follow the links to the respective documentation pages.

NOTE:

New additions to MAXScript in 3ds Max 2009 are marked with
NEW in 3ds Max 2009:... throughout the MAXScript Reference.

Viewport

Viewport Navigation Tools

Interface: SteeringWheelsOps

This new interface exposes all settings of the Steering Wheel viewport navigation system.

Interface: ViewCubeOps

This new interface exposes all settings of the View Cube viewport navigation system.

Viewport Shading

Interface: IViewportShadingMgr

New property added to the existing IViewportShadingMgr Interface to set the maximum number of active lights in the viewports.

Two more properties and five methods were available but not documented in 3ds Max 2008 and have now been included. They are marked with [image] .

Viewport Access

Accessing Active Viewport Info, Type, and Transforms

New index: optional keyword parameter added to viewport.getType() and viewport.getCamera() to query viewports by index instead of the active one.

Viewport.GetID

New method viewport.getID()added to returns the ID of an indexed viewport. When a viewport is maximized, its index will be 1 but its ID will be the viewport's index when not maximized.

Texture Mapping

Texture Maps

CompositeTextureMap : TextureMap

The Composite Map has been completely reimplemented, while still providing backwards compatibility with old scenes containing the previous version of the map.

Color_Correction : TextureMap

The new Color_Correction TextureMap provides means to alter the color information of an incoming texture map by modifying its Brightness, Contrast, Saturation, Exposure, Gain, Gamma, Color Channels and so on.

Unwrap_UVW Spline Mapping

Unwrap_UVW Spline Mapping

New properties and methods have been added to the Unwrap_UVW modifiers, exposing the new Spline Mapping functionality.

Lighting and Rendering

Image Viewer (a.k.a. VFB or Rendered Image Window)

Image Viewer DisplayNotifications

Two new notifications added to the General Event Callbacks: #preImageViewerDisplay and #postImageViewerDisplay

Interface: IVFB

This new interface is returned as notification parameter of the above callbacks before or after a Rendered Frame Window or Image Viewer is opened and can be used to customize the custom User Interface panels.

Rollout Adding and Removing

A new optional keyword border: has been added to the existing addRollout() method to allow for borderless rollouts in the Image Viewer.

Interface: EditRenderRegion

This new interface provides access to the new Render Region rubberband gizmo in the Rendered Image Window and in the Viewport.

Controlling the Renderer

A new optional keyword pos: has been added to the render() method to allow the opening of the Rendered Frame Window (also known as Virtual Frame Buffer) at a particular location of the screen or at the last known position (the new default behavior).

Render Scene Dialog (a.k.a. Render Setup Dialog)

Viewport Index, Lock Button and Render Presets

New properties have been added to expose the Lock Button, Viewport Index list and Last Used Render Presets list at the bottom of the Render Scene Dialog.

mental ray Renderer

mental ray renderer > Rendering Algorithms Rollout > Raytrace Acceleration

A new BSP2 option has been added to the existing .RaytraceMethod property, the old Grid and Large BSP options have been removed.

mental ray renderer > Rendering Algorithms Rollout > Trace Depth

Two new.ReflectionsEnable and .RefractionsEnable properties have been added to the mental ray renderer to enable and disable trancing of reflections and refractions.

mental ray renderer > Rendering Algorithms Rollout > Subset Pixel Rendering

The new.enable_subset_pixel_rendering property has been added to mental ray renderer to enable and disable the rendering of changed objects only.

mental ray renderer > Translator Options Rollout > Geometry Caching

The new.Enable_Geometry_Cache, .isGeometryCacheEmpty and .LockGeometryCache properties have been added to the mental ray renderer to control the caching of geometry between iterative renders.

mental_ray_renderer_functions Interfaces

This new interface exposes properties and methods related to managing Final Gather Presets, Final Gather Maps and the clearing of the Mesh Cache.

mental ray Proxy

mr_Proxy : GeometryClass

This new geometry object allows the creation of proxy files on disk which can be loaded by mental ray at render time. This lets you replace very complex geometry with simple stand-ins and load their actual geometry ony when rendering.

mental ray Lights

mr_Sky : light

Several new properties have been added to the existing mental ray Sky light.

Photometric Lights

Photometric Light Classes

The Photometric Lights have been rewritten to allow easier creation, conversion between all types and more Area Light shapes.

Photometric Lights Common Properties, Operators, and Methods

All Photometric Lights share the same set of properties and methods. The list of properties has been updated and has also been redesigned to reflect the order the related controls appear in the User Interface.

Daylight System Assembly Head

DaylightAssemblyHead : Helper

New properties and methods related to weather file handling have been added to the Daylight Assembly Head helper.

Hair and Fur

HairEffect : RenderEffect

New properties have been added to the Hair RenderEffect, exposing the tile memory usage and transparency depth parameters and the Global Illumination/Skylight options.

Lighting Analysis Tools - 3ds Max Design Only

Lighting_Analysis_Overlay : RenderEffect

This new Render Effect allows the generation of lighting analysis data in screen or world space.

Lighting_Analysis_Data : RenderElement

This new Render Element can be used to output the lighting analysis data to an image file.

LightMeter : Helper

This new Helper can be used to define lighting analysis grids in world space to be used in conjunction with the Lighting Analysis Overlay RenderEffect.

Interface: LightMeterManager

This new Interface provides tools to perform lighting calculations and CSV file data export using any number of active LightMeter Helpers in the scene.

Interface: DaylightSimulationUtilities

Interface: DaylightSimulationUIOps

These two new Interfaces provide access to the functionality and the User Interface of the Daylight Simulation Utility.

Interface: PseudoColorManager

This new interface can be used to set up the PseudoColor range and type (Linear or Logarithmic).

Interface: LuminosityUtil

This new interface exposes a method for converting RGB data into Illumination data by taking into account the different contribution of the three channels.

Scripting Tools

User Interface Controls

Label

An optional keyword argument style_sunkenedge: has been added to the existing Label control to display a half-sunken border around it.

Button

Checkbutton

Mapbutton

Materialbutton

An optional keyword argument border: has been added to the existing Button controls to control the display of the border around them. When set to false, the button will appear as one with the UI background. This keyword is NOT available in the pickbutton control.

Checkbox

Dropdownlist

An optional keyword argument tooltip: and a .tooltip propery have been added to the existing Checkbox and Dropdownlist controls to get and set a tooltip string. Also note that 3ds Max 2009 will now automatically split long tooltips into multiple lines.

Binary Search In Array

Bsearch() Method

Using Bsearch For Fast Table Lookup

The new bsearch() method is used to efficiently find an item in a sorted array.

Network Manager

Interface: NetworkManager

This new Interface exposes a method to send emails via MAXScript.

Macro Recorder Performance

The Macro Recorder

The performance of the Macro Recorder when selecting a large number of objects has been improved significantly.

Miscellaneous MAXScript Additions

Accessing the Last Rendered Image

An option was added to the getLastRenderedImage() method to copy the image or reference the same bitmap value as the renderer.

General Event Callback Mechanism

Two options were added to the callbacks.show() method to show callbacks by type and/or by ID.

Interface: batchRenderMgr

Two properties of the batchRenderViewOps interface were hooked up to incorrect methods internally, making it impossible to access the scene state name and the enabled property. These have been fixed.

See also

Documentation Changes in 3ds Max 2009

New in MAXScript


Documentation Changes in 3ds Max 2009

The following changes have been made to the MAXScript Online Reference for the 3ds Max 2008 update:

Fixed Errors

TheHold

Fixed errors in theHold documentation - isHolding() returns Boolean values and not integers, theHold.SuperLevel() is the correct name of the method formerly listed as theHold.getSupperLevel()

Unwrap6 Interface

Fixed the names of all methods operating on a specific node by adding the missing "ByNode" suffix.

Additions

Mesh Vertex Methods

Added notes to both the setVert() and meshop.setVert() methods that only the latter supports vertex animation at the Editable Mesh level.

maxOps Set Key Mode

Added example and notes to the description of the maxOps.getDefaultTangentType() and maxOps.setDefaultTangentType() methods.

mental ray

mental ray Shaders Index

A large number of mental ray shaders have been included to allow interoperability with other Autodesk products supporting mental ray.

3dsmax mental ray Shaders Index

This is a list of mental ray shaders implementing 3ds Max maps and volumetic effects. These shaders provide identical results in mental ray to the native 3ds Max maps and effects rendered in the Default Scanline renderer.

Color Values

Color Values

Added a note on Alpha display, Addition and Multiplication of Color Values.

Point4 Values

The Point4 Value class was implemented in 3ds Max 6 but never documented. It can be used to manipulate floating point color values without implicit conversion from/to 0-255 range.

Formatting

mr_Sun : Light

mr_Sky : light

Reformatted the documentation of the two lights, added UI screenshots and ordered the properties in the same order as the parameters in the rollout for easier navigation.

Arch___Design__mi: material

mr_Physical_Sky : textureMap

Reformatted the documentation of the two shaders, added UI screenshots with clickable hotspots and ordered the properties in the same order as the parameters in the rollout for easier navigation.

See also

What is New in MAXScript in 3ds Max 2009

New in MAXScript


What was New in MAXScript in 3ds Max 2008

The following pages will give you a quick overview of the MAXScript language changes and improvements in 3ds Max 2008. For details on each feature, please follow the links to the respective documentation pages.

SciTE MAXScript Editor

The MAXScript Editor Windows

A new tabbed MAXScript Editor based on the open source Scintilla control and the SciTE editor has mostly replaced the original RichEdit-based MAXScript Editor.

In addition to the MAXScript Editor, both the MAXScript Listener and its MacroRecorder pane and the Mini-Listeners in the bottom left corner of the GUI are now using the Scintilla control and provide an Undo depth of up to 500 operations!

MAXScript Tabbed Editor Overview

The above topic is an introduction to the new Editor and its main features and advantages.

MAXScript Editor Commands

This topic is an index with links to all relevant topics discussing the use of the new Editor, its menus, commands, keyboard shortcuts and the various customization methods. The same links are provided below for faster access:

MAXScript Editor - Menu Options:

File Menu

Edit Menu

Search Menu

Regular Expressions Find and Replace in the MAXScript Editor

MAXScript Editor - Output Pane

View Menu

Tools Menu

Options Menu

Language Menu

Windows Menu

Help Menu

MAXScript Editor - Keyboard Shortcuts:

MAXScript Editor - Keyboard Shortcuts

MAXScript Editor - Configuration and Customization:

MAXScript Editor - Properties File Settings

MAXScript Editor - MAXScript-Specific Language Settings

MAXScript Editor - Customizing Syntax Color Schemes

MAXScript Editor - Defining Custom Keyboard Shortcuts

MAXScript Editor - Defining Custom Context Menu Items

List of Editor Menu Commands

List of Editor Key Commands

MAXScript Editor - Defining And Using Abbreviations

MAXScript Editor - Defining Custom Status Bars

New 3ds Max Features Exposure

The following new features have been added to 3ds Max 2008 and have been exposed to MAXScript:

Viewport Shading - Illumination and Shadows

Interface: IViewportShadingMgr

This interface exposes the Viewport Shading System to MAXScript including shadows and per-pixel lighting.

Interface: INodeShadingProperties

This node interface exposes the Viewport Shading node properties to MAXScript.

Adaptive Degradation

Adaptive Degradation Access

These new methods available in the viewport struct provide means to get and set all controls of the completely rewritten Adaptive Degradation system.

Interface: INodeDisplayProperties

This new node interface provides access to the .neverDegrade property which can be used to exclude nodes from Adaptive Degradation.

Show Map In Viewports

Show Hardware Map In Viewports

The new enableHardwareMaterial() and showHWTextureMap() methods can be used to toggle the new flyout option in the Show Map In Viewports icon.

Viewport Controls

Viewport.SetFOV

The new viewport.setFOV() method sets the active viewport's field of view in degrees.

Viewport.GetFocalDistance

The new method viewport.getFocalDistance() and viewport.setFocalDistance() get and set the active viewport's focal distance.

Viewport Pan, Zoom and Rotate

The new viewport.pan(),viewport.zoom(), viewport.zoomPerspective() and viewport.rotate() methods let you implement scripted viewport navigation operations similar to the interactive Pan, Zoom and Arc Rotate commands in the 3ds Max UI.

Display Color Correction - Gamma and LUT

Interface: IDisplayGamma

The existing core interface has been extended to expose some Gamma and LUT settings including the color correction mode, the LUT filename and the Gamma value.

Scene Explorer

Interface: SceneExplorerManager

This new core interface provides Scene Explorer management functions including methods to open, close, load, save, position and resize named Scene Explorers, as well as methods for adding new property filters to Scene Explorers via scripted functions.

ActionItem Override

Interface: ActionItemOverrideManager

This new core interface exposes the ActionItem Override feature to MAXScript.

Working Pivot

Interface: WorkingPivot

This new core interface exposes the Working Pivot feature to MAXScript.

Axis_Helper : Helper

An instance of this internal helper class is used by the Working Pivot feature to display an axis tripod in the scene and set it as the current transformation system reference node.

Polygon Modeling

Edit_Poly Selection Properties

A new property .selectMode was added to the Edit_Poly modifier. It exposes the new sub-object selection modes (Off - SubObj - Multi).

Edit_Poly Chamfer Properties

A new property .edgeChamferSegments was added to the Edit_Poly modifier. It exposes the new segmented edge chamfering feature.

Editable Poly Preview Selection

A new property .selectMode was added to the Editable_Poly base object. It exposes the new sub-object selection modes (Off - SubObj - Multi).

Editable_Poly Edge Chamfer Properties

A new property .edgeChamferSegments was added to the Editable_Poly base object. It exposes the new segmented edge chamfering feature.

Unwrap_UVW Modifier

Unwrap6 Interface

The new unwrap6 interface exposed by the Unwrap_UVW Modifier provides access to new properties.

Unwrap_UVW : Modifier

A new property .baseMaterial_list was added to the Unwrap_UVW Modifier.

Projection Modifier

Project_Mapping : ReferenceTarget

Several new properties related to Projection Quality were added to the Project_Mapping modifier.

Projection Modifier Cage

New methods exportCage() and importCage() were added to the projectionModOps Interface exposed by the Projection Modifier.

Point Cache Modifier and SpaceWarp

Point_Cache : modifier

Point_CacheSpacewarpModifier : SpacewarpModifier

A new .fileCount property was added to the Point Cache Modifier and SpaceWarp, controlling whether a single file or a file per frame will be saved.

Load / Save Animation

Interface: LoadSaveAnimation

Several new methods were added to the LoadSaveAnimation Interface, as well as a stripLayers: option to some existing methods.

Biped

Object Space Object and Head LookAt Target Properties

The properties.osObject and .headObject of the Biped Vertical_Horizontal_Turn(Body):Matrix3 Controller were changed to accept undefined as a valid value.

DirectX Shader

DirectX_9_Shader

Several new methods related to getting the shader's techniques have been added to the function publishing interface exposed by the DirectX Shader Material

Export

Interface: s3dexporter

This new core interface provides access to some actions in the Shockwave 3D Exporter Dialog.

Render Scene Dialog

Pre-Render Script Evaluation Order Changes in 3ds Max 2008

The evaluation order of Pre- and Post-Render Scripts has been changed.

mental ray

mr_Sky_Portal : light

The mental ray Sky Portal Light can be used to transfer outdoor lighting indoors by defining portals at openings like windows and doors and collecting light from skylight or HDRI environment maps.

mr_Photographic_Exposure_Control : ToneOperator

This new exposure control provides a real-world workflow familiar from traditional photography.

Bake Elements

Interface: BakeElementProperties

This new interface exposed by all BakeElements provides direct access to some Bake Element properties which were previously accessible only through the node's interface.

MaxOps Interface

Interface: maxOps

New properties and methods were added to the maxOps Interface to control the Default Key on Auto Key creation and time. More new properties to control the Motion tab > Trajectory sub-object modes were added.

A new maxOps.findNodes() method was added. It can be used for finidng similar nodes including filtering by material and layer.

MenuMan Interface

Interface: menuMan

A new method createMenuItemFromAction() was added to the menuMan Interface.

AnimHandle System

AnimHandle System

The new AnimHandle System provides a unique ID number for every entity in the scene including nodes, modifiers, materials, controllers and so on.

Node Event System

Node Event System

The new Node Event System provides better handling of node-related events than the General Event Callback Mechanism available in previous releases of 3ds Max.

Default Actions

Interface: defaultActions

The new default Actions core interface provides access to the default actions for several events like missing UVWs, missing DLLs and so on.

MAXScript Language Improvements

The following new features have been added to MAXScript in 3ds Max 2008:

Verbatim String Literals

Verbatim string literals prefixed with the '@' character are now supported and will not be expanded on evaluation even if containing escape character sequences like '\t', '\n' or '\r'.

Standard Open and Save File Dialogs

A new historyCategory: optional keyword was added to the getOpenFilename() and getSaveFilename() methods. It allows you to specify a history category for your file dialogs.

OpenBitmap

The existing openBitMap() method now returns undefined if the bitmap cannot be loaded instead of generating a run time error.

World Space Modifiers - Validity Methods

New isSpaceWarpValid() method returns true if a Space Warp can be applied to a given object.

Encrypting Script Files

A new encryption scheme is provided in addition to the old encryption method. Scripts encrypted using the new method cannot be run in older versions of 3ds Max!

Avguard Extensions

The Avguard DLX Extension has been completely incorporated into 3ds Max 2008.

NOTE:

Additions to MAXScript in 3ds Max 2008 taken from the Avguard DLX Extension are marked as
NEW in 3ds Max 2008 [AVG] : throughout the MAXScript Reference.

Node Related Methods

IntersectRayScene

Added a new method for intersecting a ray with all nodes in the scene.

Node Modifier Context Transform Methods

Added new methods setModContextTM() and setModContextBBox().

Node Deformable Methods

Added new methods isDeformable(), numPoints() and getPointPos().

Node Bounding Box Methods

Added new methods nodeGetBoundingBox() and nodeLocalBoundingBox().

getNodeTM Method

Added a new method getNodeTM() which returns the node's transformation matrix, including the cases where the node is XRef Scene Object.

References, Dependencies, Instances

refs.dependentNodes()

Added a new method for getting nodes dependent on a given MAXObject.

notifyDependents()

Added a new method for notifying all dependents of a MAXObject.

disableRefMsgs() and enableRefMsgs()

Added new methods for disabling and enabling the Reference System.

replaceInstances Method

Updated the existing replaceInstances() method.

AreNodesInstances Method

Added a new method areNodesInstances() which returns true if the two nodes passed as arguments are instances.

Interface: LayerManager

Added a method getLayerObject() which returns the layer's Reference Target. DEPRECATED, provided for backwards compatibility with scripts that use this method from the Avguard Extension.

CustAttributes Structure Methods

Custom Attributes Definition Values

Added two new methods: custAttributes.getDefClass()and custAttributes.getDefInstances()

Controller Methods and Structures

clearControllerNewFlag Method

Added a new clearControllerNewFlag()method to clear the flag signifying that a controller is a new instance that has not been assigned to a property yet.

BezierDefaultParams Structure

TCBDefaultParams Structure

Added two new structs to expose the default Bezier and TCB key settings for newly created keys.

IK_ControllerMatrix3Controller : Matrix3Controller

20 new methods added to the ik struct to provide access to the Axis settings of the IK controller, including Ease, Min, Max, Damping, Angle and Spring settings.

Meshop Structure Methods

Meshop Vertex Methods

Tweaked the existing methods: meshop.setVert()and meshop.moveVert() to allow positions to be specified alternatively as array, thus allowing multiple vertices to be affected at the same time. Also adds soft-selection support to the latter method.

Polyop Structure Methods

Editable Poly Methods

Tweaked the existing methods: polyop.setVert()and polyop.moveVert() to allow positions to be specified alternatively as array, thus allowing multiple vertices to be affected at the same time. Also adds soft-selection support to the latter method.

Spline Shape Methods

New SplineShape Methods

Added new methods: weldSpline(), findPathSegAndParam(), findLengthSegAndParam(), interpBezier3D(), tangetBezier3D().

Array Values

Array Values

Added new methods - appendIfUnique() and makeUniqueArray() - which can be used to ensure that the array contains only unique values.

Global Variables Management

globalVars Structure

The GlobalVars struct provides methods to collect, inspect and manage global variables.

Persistents Structure

The Persistents struct provides methods to collect, inspect and manage persistent global variables.

Bitmap Values

pasteBitmap

Added new methods - pasteBitmap() and getBitmapInfo() - which can be used to paste a bitmap into another bitmap and get info about the bitmap.

DataPair Values

DataPair Values

Added new DataPair Value class - a wrapper around two values of any type.

String Value Methods

String Value Methods

Added new methods toUpper(), toLower, replaceString(), replace_LF_with_CRLF() and replace_CRFL_with_LF() for changing a string to upper and lower case, replacing all occurrences of a string with another string and converting Line Feed and Carriage Return/Line Feed text files.

Quat and Euler Value Methods

EulerAngles Methods

Quat Related Methods

Added a new method quatToEuler2() which returns the same Euler value shown in the Transform Type-In dialog, and a new method quatArrayToEulerArray() which converts an array of Quats into an array of EulerAngles.

World Space Modifiers and Space Warps

World Space Modifiers - Force-Related Methods

Added new methods that can be used to calculate forces from World Space Modifiers.

File Input and Output

BinStream for Binary Reading and Writing

Added new BinStream I/O methods writeLongLong(), writeDouble(), writeFloatAsDouble(), readLongLong(), readDouble() and readDoubleAsFloat().

Accessing INI File Keys

Added a new method hasINIsetting() which returns true if the given key and/or section exists in the supplied INI file.

Filename Parsing

File Name Parsing

Added a new method pathIsNetworkPath()which returns true if the argument is a network path.

Plug-ins Loading

Miscellaneous Functions

Added a new method scanForNewPlugins()which scans for new plug-in classes and exposes them to MAXScript.

Viewports

Viewport Grids

Added new methods setGridSpacing() and setGridMajorLines() for setting the spacing and major lines of the viewport grids.

Viewport.GetViewportDib()

Added a new method viewport.getViewportDIB() which can be used to get the viewport Device Independent Bitmap including Multi-Pass Camera Effects preview.

Drawing Rectangle in the Viewport

Added new methods gw.hRect() and gw.wRect() for drawing a colored rectangle in the viewport.

Drawing Triangles in the Viewport

Added new methods gw.startTriangles(). gw.endTriangles() and gw.triangles() for drawing a series of triangles to the viewport.

Drawing TriStrip in the Viewport

Added a new method gw.triStrip() for drawing a series of triangles to the viewport as a triangle strip.

Refreshing the Viewports

Added a new method setNeedsRedraw()which sets an internal MAXScript flag that the viewports need to be redrawn before MAXScript returns.

Animation Playback

isAnimPlaying

Added new method isAnimPlaying() which returns true if the animation is playing back and false if it is not.

System Global Variables

timeDisplayMode

Added new system global variable timeDisplayMode which can be used to get and set the time display mode.

Renderers

Renderers

Added new methods renderers.GetDraftRenderer() and renderers.ClearDraftRenderer() for getting and resetting the former draft renderer which was retired in 3ds Max 6 but could still be present in old files.

Mouse Cursor

Mouse Cursors

Added new read-only property mouse.inAbort

Paths and Filenames

MAXScript Source Filename Access

Added new method getThisScriptFilename()which is the same as getSourceFileName() but has been available longer in the Avguard Extension and is provided for backwards compatibility with scripts written to use the Extension.

Executing External Commands

Executing External Commands

Added a new HiddenDOSCommand()method to execute DOS commands in a hidden window.

Interaction With The Operating System

Copy To and From Clipboard

Added new methods getClipBoardText(), setClipboardText(), getClipboardBitmap() and setClipboardBitmap() for getting and setting text and bitmap values from/to the Windows Clipboard.

System Information

Added new properties sysinfo.processAffinity and sysinfo.systemAffinity for getting and setting the process and system affinity per CPU.

System Tools

Added new methods systemTools.getEnvVariable()and systools.setEnvVariable() for getting and setting values from/to the Windows Environment variables.

Windows Structure

Added a new Windows struct providing methods to access Windows HWND values of child windows, 3ds Max and the Windows desktop.

Windows Registry Access

Registry Structure

Added a new Registry struct providing methods to access Windows Registry keys and values.

HKey Values

Added new HKey Value class representing a Registry Key value.

See also

Documentation Changes in 3ds Max 2008

New in MAXScript


Documentation Changes in 3ds Max 2008

The following changes have been made to the MAXScript Online Reference for the 3ds Max 2008 update:

New Navigation Methods

Added Quick Navigation Index and Quick Navigation Icons to:

  • all MAXScript Editor topics

  • the MAXScript Editor Properties topic

  • all Scripted User Interface topics

  • all Core Interfaces

  • the maxOps Interface

  • all Node Common Properties, Operators and Methods topics and other Node-related topics

  • all Values and Collections topics

  • all Geometry Class topics

  • all Editable Mesh topics

  • all Editable Poly topics

  • all Particle Flow topics

  • all Shapes and Splines topics

  • all Modifier Class topics

  • the Unwrap UVW Modifier topics

  • all Lights and Cameras topics

  • all Helper Nodes topics

  • all Reactor Dynamics topics

  • all Animation Controller topics

  • all Character Studio topics

  • all Materials and TextureMap topics

  • all Render Elements and Bake Elements topics

  • the mental ray Renderer topics

  • all Lighting and Rendering topics

  • all Atmospheric and Render Effects.

Added breadcrumb trails to several classes including Core Interfaces, MAXWrapper derived classes and some more. The trail provides quick access to the common properties and methods of the superclasses the class inherits from:

Value > MAXWrapper > Node > GeometryClass > Box

Added clickable image maps to MAXScript Editor topics.
Marked as [image] Roll over and click a Menu Item to jump to its description

Added clickable image maps [image] to topic mental_ray_renderer : RendererClass

Added clickable image maps [image] to topics Render Scene Dialog and ScanlineRender Struct

Added clickable image maps [image] to topic Editable_Poly Properties

Added clickable image maps [image] to topic Edit_Poly : Modifier

Added clickable image maps [image] to topic Unwrap_UVW : Modifier

Added clickable image maps [image] to topic Projection : Modifier

Added clickable image maps [image] to topic SplineShape : Shape

Added clickable image maps [image] to topic Rollout User-Interface Controls Types

Added clickable image maps [image] to topic General Node Properties

Added clickable image maps [image] to all topic related to GeometryClass : Node , Shape : Node , Light : Node , Camera : Node , Helper : Node , SpacewarpObject : Node , System : Node

Added clickable image maps [image] to all topics related to Particle Flow Helper Classes .

Additions

Changed the name of the existing mental ray shader Ambient_Reflective_Occlusion__Base to Ambient_Reflective_Occlusion__3dsMax . The shader was renamed in the 3ds Max 9 Productivity Booster Extension.

Added missing documentation of the XREF_Controller originally introduced in 3ds Max 9.

Updated the documentation of the Point_CacheSpacewarpModifier - superclass: SpacewarpModifier replaced by PointCach2 version in 3ds Max 9.

Added previously undocumented callbacks to the Callbacks File Notifications subtopic of General Event Callback Mechanism topic: #filePreOpenProcess, #filePostOpenProcess, #filePreSaveProcess, #filePostSaveProcess.

Added previously undocumented global variables related to Pre- and Post-Render Scripts in the Render Scene Dialog .

Added previously undocumented method appendMaxClip() to the MxTrack Class documentation. The method is used to append 3ds Max Animation .XAF clips to the Animation Mixer (as opposed to .BIP clips)

Updated the documentation of the Interface: IKSys .

Added a note and workarounds to the existing exprForMaxObject() method in MAXWrapper Common Properties, Operators and Methods topic regarding incorrect return result for ambientColorController

Updated and reformatted the documentation of the mental ray renderer .

Updated and reformatted the documentation of the Editable_Poly: GeometryClass

Updated and reformatted the documentation of the Edit_Poly : Modifier

Updated and added more examples to the documentation of Time Values

Added a separate topic documenting the Units Struct - Accessing System and Display Units .

Updated and added a better example to the topic Rollout .Controls Property

Updated and added a better example to the topic Rollout Systems 'category' Mechanism

Updated and added a better example to the topic Radiobuttons

Updated the example in the topic Visibility of Locals, Functions, Structures and User-Interface Items in Rollout Code

Added popups to various topics explaining the use of a [ Mixin Interface ]. Popups are enclosed in rectangular brackets [].

How To … MAXScript Tutorials

How To ... Copy The Last Rendered Image To The Windows Clipboard

How To … Call a MAXScript Function Periodically using DotNet

MAXScript Frequently Asked Questions

The How To Make It Faster? FAQ topic had grown too long and has been split into multiple sub-topics.

The following topics have been added to the MAXScript FAQ:

How do I call the dropdownList Selected handler as a function?

How do I uncheck a MacroScript button correctly?

For Loop By Index Vs For Loop Through Collection Performance

Optimizing Particle Flow Script Operator For Loops For Speed

How do I set the default path for file operations in MAXScript?

Other Updates

Changed titles background to black to make search result highlights (typically dark blue) easier recognizable.

As an ongoing effort to improve readability, the spacing between properties and methods definitions has been increased in most topics.

Replaced all screenshots in the Introduction to MAXScript to reflect the modern look of viewports and dialogs.

Reformatted the documentation of the maxOps Interface for easier navigation.

Changed formatting of Notes and Examples (Work In Progress)

NOTE:

Added new table formatting for Notes and Warnings.

EXAMPLE

Added new table formatting for Examples:

some code here

Bug Fixes

Fixed description of the macros.new() method in Macro Scripts topic. It listed first argument as Name and second as Category. The correct order is Category first, then Name.

Added missing link to the Area_Shadows : Shadow topic from the Contents tab and fixed broken link to the same topic from Light Common Properties, Operators, and Methods .

Fixed description of the #viewportChange general event callback . Old documentation claimed that it is called whenever the viewport layout changes. In reality, it is called each time the viewport parameters change, including panning, zooming, orbiting or changing the active viewport.

Fixed property name in the RBCollection : Helper - .rigidBody was listed as .rigidBodyTab.

Fixed method name in the Interface: ProCutter - .addStocks() was listed as .addStock().

Removed claims from render() method description about it being re-entrant. The only special case where render() can be called reentrantly is documented in Scripted RenderEffect Plug-ins

The content of the Path Constraint topic was very outdated and misleading. It has been completely rewritten, incl. notes and examples.

See also

What was New in MAXScript in 3ds Max 2008

New in MAXScript


What was New in MAXScript in 3ds Max 9

The following pages will give you a quick overview of the MAXScript language changes and improvements in 3ds Max 9. For details on each feature, please follow the links to the respective documentation pages.

Geometry

ProBoolean Extension

Interface: PolyBoolean

Exposes methods to create and manage the ProBoolean Compound Object

Interface: ProCutter

Exposes methods to create and manage the ProCutter Compound Object

Exposure Controls

Logarithmic_Exposure_Control : ToneOperator

A new tone mapping algorithm has been implemented for this exposure control. The old algorithm is still available for backwards compatibility. A new property .useLegacyAlgorithm has been added to allow the switching between the old and the new behavior.

DirectX and DirectX Shaders

Interface: SceneEffectLoader

New SceneEffectLoader Interface exposes the Scene Effect Loader Utility to MAXScript.

Viewport Drawing Methods

New method gw.setDirectXDisplayAllTriangle() lets the user change the Display All Triangle Edges option available in the UI as a checkbox in the Customize>Preferences>Viewports>Configure Driver dialog of the Direct3D driver.

Mental Ray

New mental ray properties in 3ds Max 9

Two new read-only properties were added to the mental ray renderer: .LastTotalNonRenderTime_ms and .LastTotalGeomTranslationTime_ms.
They will contain details about the translation time.

Arch___Design__mi: material

New Arch and Design Material added to 3ds Max 9 provides advanced functionality like shader presets, glossy reflections, custom BRDF reflectivity functions, built-in environment occlusion and edge rounding effects etc.

mr_Sky : light

mr_Sun : Light

New Photometric Lights added to 3ds Max 9. Provides physically correct sky light and sun light when rendering with mental ray.

mr_Physical_Sky : textureMap

New mental ray shader added to 3ds Max 9. Provides visual representation of the physical sky as an environment map.

Bitmap Proxy Management

Interface: BitmapProxyMgr

New BitmapProxyMgr Interface exposes the Bitmap Proxy system to MAXScript.

Asset Tracking System

Interface: ATSOps

New property added to the Asset Tracking System: CheckNetworkPaths

New methods added to the Asset Tracking System to allow the querying of a file's status: GetFileStatus(), GetFileSystemStatus(),TestFileSystemStatus().

New methods added to the Asset Tracking System to allow the conversion of selected paths to UNC, relative or absolute paths: ResolveSelectionToUNC(), ResolveSelectionRelativeToProjectFolder() and ResolveSelectionToAbsolute().

Return value for checkin(), checkout(), undocheckout(), addfiles() and getlatest() changed from <void> to <bool>.

New methods added to the Asset Tracking System: IsInputFile(),SetWorkingFolder(), GetWorkingFolder(), IsFileShareLocked()

Path Configuration, Access and Management

PathConfig Struct

The new PathConfig Struct exposes advanced methods for dealing with relative and absolute paths and provides access to System and Profile Paths.

3ds Max System Directories

New path names have been added as options to the GetDir(), SetDir() and some pathConfig struct methods expecting a system directory name value: #animations, #archives, #downloads, #maxData, #Photometric, #proxies, #renderassets, #renderPresets, #renderoutput, #temp, #userMacros, #userScripts, #userStartupScripts, #userIcons

New method has been added to MAXScript: ConvertDirIDToInt() - returns an integer corresponding to the system directory name ID.

mapPaths Struct

New method has been added to the mapPaths struct: getFullFilePath(). It resolves the filename using map paths, returning fully qualified filename if the file is found.

pluginPaths Struct

The new pluginPaths struct provides two methods: count() and get(). The former method returns the number of defined plugin paths, the latter returns the indexed plugin path.

xrefPaths Struct

New method has been added to the mapPaths struct: getFullFilePath(). It resolves the filename using xref paths, returning fully qualified filename if the file is found.

SymbolicPaths Struct

The new symbolicPaths Struct exposes advanced methods for accessing system symbolic paths and managing user-defined symbolic paths.

logsystem_Struct

New method logName added to logsystem struct. It lets you define the log file name and path.

Filename Properties and Arguments Changed from String to Filename Type

Bake Elements

The type of the Properties .fileName and .fileType in all Bake Elements has been changed from String to Filename.

bipedSystem : System

The type of the Properties .fileName and .dirName has been changed from String to Filename.

BitmapTexture : TextureMap

The type of the Property .fileName has been changed from String to Filename.

HairMod : Modifier

The type of the preset name argument in the SavePreset() and LoadPreset() methods of the Hair Interface has been changed from String to Filename.

Particle_Cache : SpacewarpModifier

Point_Cache : modifier

Point_CacheSpacewarpModifier : SpacewarpModifier

The type of the Property .cache_name has been changed from String to Filename.

Reflect_Refract : TextureMap

The type of the Properties .bitmapName and .outputName has been changed from StringsArray res. String to FilenameArray resp. Filename.

Interface: RenderElementMgr

The types of the filename arguments in the SetCombustionOutputPath() and SetRenderElementFilename() methods as well as the type of the return values of the GetCombustionOutputPath() and G etRenderElementFilename() methods have been changed from String to Filename.

Unwrap_UVW : Modifier

The type of the filename argument to the method renderUV() has been changed from String to Filename.

ViewportManagerCustAttrib interfaces: viewportmanager

The type of the filename argument to the method saveFXFile() has been changed from String to Filename.

Interface: colorMan

The types of the filename arguments to the methods loadColorFile(), saveColorFile(), setIconFolder() as well as the return value types of the methods getColorFile(), getFileName(), getIconFolder() have been changed from String to Filename.

Interface: msZip

The type of the filename arguments to the methods fileInPackage() and unloadPackage() has been changed from String to Filename.

Interface: menuMan

The types of the filename arguments to the methods loadMenuFile() and saveMenuFile() as well as the return value type of the method getMenuFile() have been changed from String to Filename.

Interface: actionMan

The types of the filename arguments to the methods loadKeyboardFile() and saveKeyboardFile() as well as the return value type of the method getKeyboardFile() have been changed from String to Filename.

Interface: dragAndDrop

The types of the filename arguments to the methods dropPackage(),downloadPackage() and DownloadUrlToDisk() as well as the return value type of the method getDownloadDirectory() have been changed from String to Filename.

Interface: LoadSaveAnimation

The return type of the methods getAnimFileDirectory() and getAnimMapFile() has been changed from String to Filename.

Interface: BitmapLayerManager

The type of the filename arguments to the methods getLayerCount() and getLayerName() and LoadLayer() has been changed from String to Filename.

Interface: maxOps

The type of the filename arguments to the methods canImportBitmap() and loadCUIFile() has been changed from String to Filename.

Interface: BrushPresetMgr

The type of the filename arguments to the methods LoadPresetFile() and SavePresetFile() has been changed from String to Filename.

Interface: visualMS

The type of the filename argument to the method createFormFromFile() has been changed from String to Filename.

Interface: XMLMaterial

The type of the filename arguments to the methods export() and exportArray() has been changed from String to Filename.

Interface: Hair

The type of the filename argument to the method ExportDRA() has been changed from String to Filename.

Interface: BipAnalyzer

The type of the filename arguments to the methods LoadAnalysisFile() and SaveAnalysisFile() has been changed from String to Filename.

Interface: ATSCustomDepsOps

The type of the filename arguments to the methods GetFiles(), AddFile(), SetFile() and RemoveFileByName() has been changed from String to Filename.

Interface: memStreamMgr

The type of the filename argument to the method openFile() has been changed from String to Filename.

Mixin Interface: maxOps.GetCurRenderElementMgr(...) : Interface: RenderElementMgr

The types of the filename arguments to the methods SetCombustionOutputPath() and SetRenderElementFilename() as well as the return value types of the methods GetCombustionOutputPath() and GetRenderElementFilename() have been changed from String to Filename.

Mixin Interface: memStreamMgr.openString(...) : Interface: memStream

The return value type of the method getFileName() has been changed from String to Filename.

Mixin Interface: netRender.getManager(...) : Interface: NetManager

The type of the file: keyword argument to the method NewJob() has been changed from String to Filename.

Mixin Interface: (schematicviews.open "A";schematicviews.current) : Interface: SchematicView

The return value type of the method getBackgroundImageName() as well as the type of the filename argument to the method setBackgroundImageName() has been changed from String to Filename.

Mixin Interface: batchRenderMgr.createView(...) : Interface: batchRenderViewOps

The value type of the properties .presetFile and .outputFilename has been changed from String to Filename.

Auto-Backup

Controlling the Auto-Backup

Interface: autosave

New autosave Interface exposes the Auto-Backup feature and lets the user enable and disable it, change the backup interval, the number and the name of auto-backup files, reset the timer and check whether the system is currently active. The Auto-Backup system has been refactored and will now respect the scene dirty flag (scene needs saving). In addition, the timer will be reset after the saving has finished, leaving the user enough time to work on the scene before the next auto-save.

Controllers

GetMasterController() Method

New method provides access to the master controller of a System.

Animation Layers

Interface: AnimLayerManager

New AnimLayerManager Interface exposes the Animation Layer system to MAXScript.

Float_Layer : FloatController

New Float_Layer controller created and used by the Animation Layer system to manage layered Float controllers.

Point3_Layer : Point3Controller

New Point3_Layer controller created and used by the Animation Layer system to manage layered Point3 controllers.

Point4_Layer : Point4Controller

New Point4_Layer controller created and used by the Animation Layer system to manage layered Point4 controllers.

Position_Layer : PositionController

New Position_Layer controller created and used by the Animation Layer system to manage layered Position controllers.

Rotation_Layer : RotationController

New Rotation_Layer controller created and used by the Animation Layer system to manage layered Rotation controllers.

Scale_Layer : ScaleController

New Scale_Layer controller created and used by the Animation Layer system to manage layered Scale controllers.

Layer_Output : FloatController

New Layer_Output controller created and used by the Animation Layer system to manage the output of the Layer controllers.

Layer Controller Interfaces

All Animation Layer Controllers except the Layer_Output controller expose the Layer Interface.

LayerManager Interface

Interface: LayerManager

Calling layermanger.newlayerfromname() triggers a new layer created callback. In previous versions, when polling the callback notification parameter, it would report the wrong name - the same default name that layermanager.newlayer() would report. This error has been fixed.

Object XRefs

IXrefItem Interface

The following properties are now writable: srcFileName, srcItemName

IXrefProxy

The following properties are now writable: proxyFileName, proxyItemName

IXrefRecord

The following properties are now read|write: srcFileName

Named Selection Sets

SelectionSet Values

The new .name property of named selection sets can be both get and set. This allows the direct renaming of existing named selection sets without the need to delete the old set and recreate a new one with a new name.

The isDeleted() method is now valid for named selection sets.

SelectionSetArray Values

The deleteItem() method for named selection sets can now accept the selection set value instead of the name of the selection set as the second argument.

Point Cache

Point_Cache : modifier

The PointCache Modifier has been replaced with the previously available as free plug-in PointCache2 modifier. It provides advanced controls over the cache playback and can now be used to share deformation and animation data with Autodesk Maya which implements a new cache using the same data format.

The same modifier defines the PointCacheMan struct exposing a method to get the current memory usage by PointCache modifiers: pointCacheMan.GetMemoryUsed()

The same modifier defines the CacheOps struct exposing methods to enable and disable modifiers below the Cache, Record, Reload and Unload the cache via MAXScript: CacheOps.DisableBelow(), cacheOps.EnableBelow(), cacheOps.RecordCache(), cacheOps.Reload, cacheOps.Unload()

Simple Face Data

Interface: simpleFaceManager

New Per-Face Data storage exposed to MAXScript via the simpleFaceManager Interface and the simpleFaceChannel MixinInterface returned by some of its methods. Enables the storage of integer, index, float, boolean, point2 and point3 values in each face.

Dialog Monitor

Interface: DialogMonitorOPS

Interface: UIAccessor

The DialogMonitorOPS Interface provides a system to register custom callbacks to be triggered by UI activities and handle dialogs and popups automatically using the methods exposed by the UIAccessor Interface.

Module Snooper Interface

Interface: Module_Snooper_Interface

New Module_Snooper UtilityPlugin provides memory debugging options.

The new Module_Snooper_Interface exposes some of the features of the Module Snooper to MAXScript.

Reference Target Monitor

RefTargMonitor : ReferenceTarget

This class can hold an indirect reference to any ReferenceTarget. It was added mainly for internal testing, but was left accessible as someone could find it useful in a script.

Systems

Interface: RingArray

The RingArray interface exposes a creation method for the RingArray System. This interface was created mainly for test and debugging purposes as the RingArray has no real function in 3ds Max. It is only an System example.

Character Studio

Biped Node Hierarchy

New methods added to the Biped Struct to allow MAXScript access to the twisty nodes and links in a character studio Biped: biped.maxTwistNodes(), biped.maxTwistLinks() and biped.getTwistStartID().

Viewport Frame Rate

viewport.getFPS

New method added to the viewport Struct to allow MAXScript access to the frame rate measurement of the current viewport provided by the Show Statistics option.

Communication Center

CommCenterGUP : GlobalUtilityPlugin

New Global Utility Plugin added but does not expose any properties, methods or interfaces.

See also

MAXScript Language Improvements in 3ds Max 9

Documentation Changes in 3ds Max 9

New in MAXScript


MAXScript Language Improvements in 3ds Max 9

The following is a description of internal changes and "tweaks" to the MAXScript language in 3ds Max 9. Other than the "What is new..." topic, these changes do not implement new objects, classes, methods or interfaces, but change the way MAXScript works internally. Usually these changes either improve performance or simplify programming.

64 bit Values and Operations

64 Bit Values - Double, Integer64, IntegerPtr

Three new Number value classes have been added to MAXScript: Double, Integer64 and IntegerPtr. They support all operations operating on Float and Integer values documented in the Number Values topic.

is64bitApplication Method

A new method has been added to MAXScript to determine whether it is running in a 32 bit or a 64 bit build.

Bit Methods For Double and Integer64 Conversion

Two new methods have been added to the bit struct in MAXScript to convert explicitly between Double and Integer64 values: bit.doubleAsInt64() and bit.int64AsDouble().

DotNet Controls, Classes, Objects and Methods

DotNet In MAXScript

Not all ActiveX controls have been compiled for the 64 bit versions of Microsoft Windows. Various areas of the 3ds Max User Interface rely on ActiveX controls like TreeView and ListView. To provide an alternative implementation of these and other controls, 3ds Max 9 adds access to DotNet Classes, Objects, Methods and Controls. These can be used in both 32-bit and 64-bit builds of 3ds Max.

MAXScript Editor Options

The MAXScript Editor Windows

The new system global variable editorShowPath controls whether the MAXScript Editor will display the full path of the edited script (true, default in 3ds Max 9), or only the file name (false, the only mode prior to 3ds Max 9) in the title bar. Changing the value will update the open MAXScript editor windows.

When doing an Open or Save As from an editor window, and there is a filename associated with the editor window, the file open/save dialog will open to the filename's path. When doing an Open, Save, or Save As from an editor window without a filename, or from Listener or the main max window, the last directory specified in a MAXScript script file open/save dialog will be used (unless the user cancelled out of the dialog).

MAXScript Source Filename and File Offset Access

MAXScript Source Filename Access

A new method was added to allow MAXScript code to query the source file is has been run from: getSourceFileName().

The new method getSourceFileOffSet() returns the character position in the source script file, 'undefined' if not called from a source script file.

Escape Behavior

Aborting Execution with the ESC Key

The system global variable escapeEnable has been changed to default to false. It used to default to true in versions prior to 3ds Max 9.

Deep Copy Arrays

Array Values

New method deepCopy() has been implemented for Array Values. It creates a copy of the array including copies of all its elements and supports nested arrays.

Formatted Print

FormattedPrint

A new method introduced in 3ds Max 9, previously available in the Avguard DLX Extensions, which can be used to control the format of numerical values.

Heap and Memory Management

Memory Allocation and Garbage Collection

The HeapSize and the HeapFree MAXScript System Global variables have been changed from Integer to Integer64 to accommodate the increased memory address space of 64 bit systems.

The initial heap size is now limited to 512MB. If the initial heap size is still too high, and the specified memory block cannot be allocated, the initial heap size is recursively decreased by 10% until the memory block can be allocated. If a 1MB memory block cannot be allocated, an assert is triggered and the 3ds Max session is terminated (if the system cannot allocate 1MB at startup, something is very wrong). Otherwise, a message is displayed in the status panel stating that the requested heap size was automatically decreased, and gives the actual heap size allocated.

A test was added to ensure that the initial heap size is at least the absolute minumum required by MXS - 12 bytes.

Code was added so that as new values are allocated, the heap size is automatically increased if necessary (requested memory size not available in the heap after performing a full garbage collection) . The first attempted increase is the maximum of 50* the requested size or 512KB. If this allocation fails, a series of allocation attempts is made with decreasing allocation sizes, with the last one being the maximum of the requested size or 256KB. If this final allocation attempt fails, a runtime error is thrown. Otherwise, a message is displayed in the status panel stating that the requested heap size was automatically increased, and gives the new heap size.

A new heapCheck() method added to MAXScript. This method is for internal debugging. It can be called by tools to perform a minimal consistency check of the Heap.

MAXScript System Globals

The MAXScript stack size was increased from 1024000 to 2048000 bytes. The MAXScript System Global variable stackSize will now return the new size, but the stack size cannot be effectively changed - setting the variable to higher values will do nothing.

User Interface Controls

A new .tooltip property has been added to Button , Checkbutton , Mapbutton , Materialbutton and Pickbutton UI controls. The property can now be both get and set via MAXScript. In version prior to 3ds Max 9, tooltip: was only a construction parameter.

Create Panel

Create Panel

The previously undocumented method isCreatingObject() returns true if any object is being created in the Create panel when called without arguments. Previously, it required exactly one parameter.

Callbacks

New callbacks related to Named Selection Sets were added to the General Event Callbacks Mechanism , in a new Named Selection Sets Notifications section.

#NamedSelSetCreated, calling callbacks.notificationParam() returns the new name

#NamedSelSetDeleted, calling callbacks.notificationParam() returns the name of the deleted selections set.

#NamedSelSetRenamed, calling callbacks.notificationParam() returns an array containing the old name and new name.

New callback related to Modify Panel Sub-Object Level was added to the General Event Callbacks Mechanism in the existing Modifier Panel Notifications section.

#ModPanelSubObjectLevelChanged, calling callbacks.notificationParam() returns an array containing the new SO level number and the old SO level number.

New callbacks related to resetting the Direct3D device (for example when switching between 3ds Max and other applications, screensavers etc.) were added to the General Event Callbacks Mechanism in the new Direct3D Notifications section.

#D3DPreDeviceReset

#D3DPostDeviceReset

MAXScript Debugger

Interface: MXSDebugger

An option was added to the MAXScript Debugger to clear the output message window when a break occurs.

The option was added in the MAXScript options dialog as a simple checkbox, is saved / loaded in the INI file and is also exposed via the MXSDebugger interface.

Previously when using the Debugger, any output that was already in the output message window was retained when a new break occured. Thus when a new stack dump was put into the output window, it could become confusing to users, where the new dump started, and where the old dump ended. This fix simply clears the output window, and scrolls to the top of the output window.

A horizontal line above each stack level dump was added to the output formatting during a Debugger stack dump to help seperate the different stack levels.

Icon Bitmaps

New Colorman Interface Methods

The following methods were added to the Colorman Interface: colorman.reInitIcons() and colorman.resolveIconFolder(). These methods can be used to reload add icon files and to resolve a file name using the icon paths.

Creating Icon Bitmap Files

CUI icon files (*_16i.bmp, *_16a.bmp, *_24i.bmp, *_24a.bmp) are loaded first from the user icon directory, then the max system icon directory, and then <3dsmax.exe>\ui\icons. If a file set is present in multiple directories, the version in the first directory is used.

The icon filename specified as an argument to loadPicture, the filename in images arrays for UI items, and the filename for the bitmap UI item no longer needs to specify a path to the icon folder. The icon filename will be searched for in the multiple directories - see above link for details.

Materials and Material Libraries

Two new methods added to allow the loading and saving of a material library as a temporary (as opposed to current) library - loadTempMaterialLibrary() and saveTempMaterialLibrary()

The method loadMaterialLibrary() was fixed to also search the material library path.

Wrapping of MtlBaseLib instances was not occurring properly.

refs.dependents a[1]

#(#materialLibrary())

--previously would return something like:

RefTarg:MtlBaseLib

New User Directories For "Least Privileged" Access

The new userMacroScripts system path becomes a second macroscript load location. Duplicate scripts found in this location take precedence over those found in exe\macroscript. Additional details:

  • Macroscript files auto-generated from MAXScript files are placed in this folder.

  • Macroscript files auto-generated from dragging script text to a toolbar will be placed in this folder.

  • If a user right-clicks to Edit the Macroscript, and the macroscript was in the default macroscript directory, the script editor filename will be changed to point the file to the userMacroscripts directory. A dialog will be displayed warning that the script editor filename path was changed. If the userMacroscripts and max system macroscript directory are the same, no dialog will be displayed.

The user Macros directory can be set to the max macros directory to retain existing behavior.

The new userStartupScripts is a user location for placing scripts that are run at startup.

The new temp system directory provides a safe location to write a temporary file. No special cleanup is done for this directory, this variable is only provided to avoid ambiguity with regards to where a client should write a temp file. Previously, plugins could write to anywhere, including the max root, C:\temp, or a location specified by the TMP environment variable. Most of these locations (except perhaps the last) would be invalid under Vista. The temp directory will directed to a safe-write location.

Folder Search Order

Startup Scripts

Startup scripts in the 3ds Max system startup scripts directory are run first, and then the Startup scripts in the user startup scripts directory are run, providing that the user startup scripts directory is different than the max system startup scripts directory. The startup.ms file is searched for in the following order:

  • The user scripts directory

  • The user startup scripts directory

  • The max system scripts directory

  • The max system startup scripts directory

  • The 3DS executable main directory

  • The Windows NT 32-bit system directory (system32)

  • The Windows 16-bit system directory (system)

  • The Windows directory

  • The directories that are listed in the PATH environment variable

The filename specified as an argument to openFile(), encryptScript(), include() and editScript() will now also be searched for in the user scripts directory.

Symbolic Pathnames

Symbolic Pathnames

The following new symbolic pathnames have been added to MAXScript:

 $exports

 $help

 $expressions

 $previews

 $maxstart

 $vpost

 $drivers

 $autoback

 $marketDefaults

 $icons

 $renderOutput

 $animation

 $archives

 $photometrics

 $renderAssets

 $userScripts

 $userMacros

 $userStartupScripts

 $userIcons

 $maxData

 $maxSysIcons

The $maps and $plugins symbolic pathnames can now also specify an index, and the indexed directory will be used.

For example:

"$maps[2]\\mybitmap.tga"

SymbolicPaths Struct

The new symbolicPaths Struct exposes advanced methods for accessing system symbolic paths and managing user-defined symbolic paths.

Compare Bitmaps

compareBitmaps() method

The new compareBitmaps() method returns true if the two bitmaps provided as arguments compare as the same, false if not.

Misc. Fixes

Exception reports which had the word '+ve' instead of 'positive' since 3ds Max R2 have been fixed.

The out-of range error message for Function Published Interfaces range checking was changed from:

-- Runtime error: Parameter value out of range: 100

to:

-- Runtime error: Parameter value out of range: < 1 or > 99: 100

The MAXScript inspection methods have been modified to return 'printable' names - these are names with punctuation replaced with '_'. Accessor methods have been modified to also test against the printable names. Existing scripts will still run, as the "raw" names are tested for resolution first, then the printable names.

Methods changes from const Primitive to const Generic:

The following methods now inherit from the const Generic instead of const Primitive. acos(), asin(), atan(), atan2(), ceil(), cos(), cosh(), floor(), getInterface(), getInterfaces(), log(), log10(), mod(), pow(), showMethods(), sin(), sinh(), sqrt(), tan(), tanh().

This change was made for internal SDK organization reasons and should have no influence in performance or functionality.

See also

What was New in MAXScript in 3ds Max 9

Documentation Changes in 3ds Max 9

New in MAXScript


Documentation Changes in 3ds Max 9

The following changes have been made to the MAXScript Online Reference for the 3ds Max 9 update:

Additions

Added missing documentation of the IScriptCtrl Interface originally introduced in 3ds Max 8. This interface provides full access to the new scripted controllers .

Added missing documentation of the hdr: bitmap value parameter originally introduced in 3ds Max 8. This parameter allows the construction of 32 bit per channel bitmaps instead of the default 8 bit per channel bitmaps.

Added missing documentation of the outputHDRbitmap: parameter to the render() method introduced originally in 3ds Max 8. This parameter allows the rendering to 32 bit per channel bitmaps instead of the default 8 bit per channel bitmaps.

Added missing documentation of the Go To Line Or Character dialog available in the MAXScript Editor since 3ds Max 8. By pressing Ctrl+J, the user can open a modal dialog to enter a line and/or character number to jump to the corresponding location in the source code, for example based on the output of the Debugger or an error message in the Listener.

Added missing documentation of the skinOps.setWeight(), skinOps.weightTool(), skinOps.isWeightToolOpen() and skinOps.closeWeightTool() methods added in 3ds Max 8 to the SkinOps struct exposed by the Skin Modifier . Also added a missing third boolean parameter to the skinOps.unNormalizeVertex() method.

Added missing documentation of the all: optional keyword argument to the makeDir() method in the topic External File Methods .

Added missing documentation of the following methods in the ATSOps Interface exposing the Asset Tracking System: OpenProject(), CloseProject(), GetFilesByFileSystemStatus(), GetMinVersion(), GetMaxVersion(), GetVersion(), GetNotificationProviderIndex()

Added missing documentation of the IXrefProxy Interface and the IXrefObject Interface exposed by the XRef Object.

Added the previously undocumented methods biped.loadFigJustTwists() and biped.loadFigNoTwists()to Biped Load and Save .

Added the previously undocumented methods biped.createCopyCollection(), biped.numCopyCollections(), biped.getCopyCollection(), biped.deleteCopyCollection(), biped.deleteAllCopyCollections() to Biped Copy and Paste Posture .

Added previously undocumented methods related to Biped Twist Poses controls.

Added previously undocumented methods related to Biped Quaternions / Euler controls.

Other Minor Changes

Changed the wording of the animationRange documentation to match the terminology used in the Render Scene Dialog and to allow for easier searching.

Changed the wording of the <index_integer> parameter description in the Reactor Controllers topic. The original description was: "...The order of reactions is the order in which they are created, and the order in which the reactions are listed in the Reactor Parameters dialog." This is no longer correct. The controller and the dialog have been refactored several releases ago and the dialog now reorders the reactions based on their values, so the order in the dialog does not match the creation order anymore.
The new description is: "...The order of reactions is the order in which they are created".

See also

What was New in MAXScript in 3ds Max 9

MAXScript Language Improvements in 3ds Max 9

New in MAXScript


What_was_New_in_MAXScript_in_3ds_max_8

The following pages will give you a quick overview of the MAXScript language changes and improvements in 3ds Max 8. For details on each feature, please follow the links to the respective documentation pages.

Geometry

Geometry - Standard and Extended Objects

A new realWorldMapSizeInterface has been added to most standard and extended geometry primitives to expose the new real-world map size feature.

Geometry - Doors and Windows

A new realWorldMapSizeInterface has been added to all Doors and Windows primitives to expose the new real-world map size feature.

Geometry - Stairs

A new realWorldMapSizeInterface has been added to all Stair primitives to expose the new real-world map size feature.

Geometry - AEC Extended Objects

A new realWorldMapSizeInterface has been added to the Railing and Wall AEC Extended primitives to expose the new real-world map size feature.

NURBSSurfaceApproximation : Value

Some existing but previously unexposed properties were exposed to MAXScript, including .merge, .subdivStyle, .minLevels, .maxLevels and .maxTris.

EditablePoly Convert Selection

New methods added to Editable Poly to expose the new Ring and Loop Shift and Convert Selection To Border features.

Shapes

Shapes - Splines

New properties have been added to all shapes to expose the real-world map size and the renderable spline properties for viewport and renderer.

Shapes - Extended

New classes have been added to expose the Extended Splines Angle, Channel, Tee, Wide Flange and Walled Rectangle.

SplineShape : Shape

New properties have been added to all shapes to expose the real-world map size and the renderable spline properties for viewport and renderer.

HalfRound : Shape

Pipe: Shape

QuarterRound : Shape

New (non-creatable by MAXScript) shapes have been added to provide some built-in cross-sections for the Sweep modifier.

Modifiers

Renderable_Spline : Modifier

New properties have been added to the modifier to expose the new Rectangular cross-section, Auto Smooth and Read-World Map Size options.

Sweep : Modifier

A new modifier has been added to 3ds Max to create meshes from a base spline and a custom cross-section.

MapScaler : modifier

MapScalerSpacewarpModifier : SpacewarpModifier

A new property has been added to Map Scaler to allow for texture wrapping based on Smoothing Groups.

Edit_Poly : Modifier

Multiple new properties and methods have been added to the Edit_Poly modifier.

Poly_Select : Modifier

Two new properties have been added to the Poly_Select modifier to expose the new Edge Loop and Edge Ring selection values.

Skin : Modifier

New properties added to the Skin modifier.

Projection : Modifier

New properties added to the Projection modifier to control the visibility of reference geometry.

Unwrap_UVW : Modifier

New properties added to the modifier to expose the Edge and Grid snapping and the new Render UVW Template Tool's properties.

The new unwrap5 interface provides access to new features including Pelt Mapping.

Morpher Channel Access

New methods added to the morpher modifier to provide access to the Progressive Morph Targets, Marker data and to allow moving and swapping channels.

Controllers

Expression Controllers

Float_Expression : FloatController

Point3_Expression : Point3Controller

Position_Expression : PositionController

Scale_Expression : ScaleController

The new implementations of the Expression controllers provide complete MAXScript access through the new IExprCtrl interface. All expression controllers listed above expose that interface.

Script Controllers

Using Script Controllers

Script controllers are now based on the same code as the new scriptable Expression controllers, providing additional features like access to time constants, the ability to define user variables and assign constants, controllers, tracks and nodes to them, a debug window showing dynamically all user variables and the controller value as the time changes, a description field and more.

Cameras

Camera Common Properties, Operators, and Methods

New properties have been added to cameras to provide access to the FOV type flyout and the current FOV value dependent on that flyout.

CameraFOV Structure

New structure has been added. It provides methods to convert FOV into MM and back and Current FOV Type to horizontal FOV and back.

Materials and Texture Maps

Architectural : Material

New MAXScript properties have been added to the Architectural material to allow inverted processing of Reflections, Refractions and Self-Illumination by Exposure Controls and to exclude the material from Exposure processing. These properties are not exposed in the User Interface!

UVGenClass : Material

New properties have been added to the StandardUVGen (accessed via the .coordinates property of texture maps) to expose the real-world scale properties of all texture maps using the StandardUVGen class, incl. Bitmaptexture, Bricks (Tiles), Checker, Combustion, Gradient, Gradient_Ramp and Swirl maps.

Bitmap IO

MaxOpenEXR :Bitmap IO

New Bitmap IO provides support for the OpenEXR file format.

TIF : BitmapIO

New #color16 type added to the getType() and setType() enums.

Renderer

Controlling the Renderer

New optional keyword arguments added to the render() command to control the rendering of Multipass camera effects and Render Elements when calling the renderer from MAXScript.

Render Elements

Material_ID : RenderElement

New RenderElement allows the output of Material IDs.

Object_ID : RenderElement

New RenderElement allows the output of Object IDs.

ZRenderElement - superclass: MAXObject

New Update Property added to the RenderElement.

Bake Elements

Ambient_Occlusion : BakeElement

New Bake Element allows the Ambient Occlusion to be rendered to texture.

Radiosity

Radiosity : RadiosityEffect

New properties have been added to the Radiosity RadiosityEffect to provide controls over the new Adaptive Subdivision feature.

The documentation has been reordered to reflect the location of the respective controls in the user interface for easier navigation.

mental ray

mental_ray_renderer : RendererClass

New properties have been added to the mental_ray_renderer RenderClass to provide access to the Final Gather bounces count, the RapidShading samples count, the displacement Smoothing option, the Material Override option, the Motion Blur Shutter offset and the Frame Buffer type.

Interface: INodeMentalRayProperties

A new INode Interface has been added to provide access to local mental ray Displacement controls.

mental_ray_Shadow_Map : Shadow

Two new properties added - .Bias and .UseBias.

Interfaces

Interface: MXSDebugger

A new Core Interface has been added to provide access to the new MAXScript Debugger.

Interface: ATSOps

A new Core Interface has been added to provide access to the new Asset Tracking System.

Interface: ATSCustomDepsOps

A new Core Interface has been added to provide access to the Custom Dependencies dialog of the Asset Tracking System.

Interface: LoadSaveAnimation

A new Core Interface has been added to provide access to the new Animation Loading and Saving feature.

Interface: sceneStateMgr

A new Core Interface has been added to provide access to the new Scene State manager feature. Scene State allows you to capture the current settings of the scene and restore them later.

Interface: batchRenderMgr

A new Core Interface has been added to provide access to the new Batch Render manager feature. It will let you specify multiple cameras with various settings, optional scene states and render presets and render with a single click of a button locally or on the network.

Interface: heightManager

A new Core Interface has been added to VIZ 2006. The Interface does nothing in 3ds Max 8 since the actual functionality is implemented by Light-creating MacroScripts shipping with VIZ 2006. The interface is only used to manage values used by these MacroScripts to create Lights at pre-defined custom Z heights.

Interface: globalDXDisplayManager

A new property has been added to the existing interface to enable and disable DirectX Scene Effects.

Interface: gridPrefs

The gridPrefs interface originally introduced in Gmax has been added to 3ds Max 8 and enhanced with more properties. It can be used to access and change the Home Grid Preferences.

Interface: BrushPresetMgr

This new interface exposes the Brush Preset Manager to MAXScript.

Interface: SkinUtils

A new method for importing skin data without opening a dialog added to the existing interface.

BipWorkBench Core Interface

New methods added to the existing interface to control the Quaternion curvers display.

Interface: trackviews

New .exists() method added to the existing interface and returns true if the specified trackview exists and false if it does not. It can be used to prevent Runtime errors from the .isOpen() method in the same interface.

XRefs

Interface: objXRefMgr

A new core interface has been added to provide access to the Object XRef's source and proxy file names and item names.

XRef_Material : Material

A new class whose instances are used to XRef materials from external files.

XRefAtmosWrapper

A new non-creatable class whose instances are used to XRef atmospheric effects from external files.

XRefObject : Node

New property added to the existing XRefObject node class to expose the actual object used by the XRef.

Interface: objXRefs

New method added to the existing objXRef interface to return the number of empty XRefs.

Cloth Extension

MAXScript Extensions for Cloth

New modifiers have been added to 3ds Max to simulate Cloth - Cloth : Modifier and Garment_Maker : Modifier

Hair & Fur Extension

MAXScript Extensions for Hair & Fur

New classes have been added to 3ds Max to generate and render Hair and other advanced surface-distributed effects like grass, trees etc. - HairMod : Modifier

Miscellaneous

maxops.overrideControllerRangeDefault

New option to control the infinite/limited range of procedural controllers.

Interface: maxOps

New methods to get and set the default tangent types of new keys added to the maxOps interface.

New method to get consistent color values from integer IDs added to the maxOps interface.

Bit Methods

New bit methods added to the existing bit structure to convert integers to floats, floats to integers, swap bytes and check whether a value is NaN or a finite number (not a NaN).

timeConfiguration.playbackLoop

New system global to control the state of the Loop checkbox in the Time Configuration dialog.

See also

New in MAXScript


MAXScript Language Improvements in 3ds Max 8

The following is a description of internal changes and "tweaks" to the MAXScript language in 3ds Max 8. Other than the "What is new..." topic, these changes do not implement new objects, classes, methods or interfaces, but change the way MAXScript works internally. Usually these changes either improve performance or simplify programming.

MAXScript Debugger

The MAXScript Debugger

Using the MAXScript Debugger

Interface: MXSDebugger

The MAXScript Debugger allows the main thread of 3ds Max to be suspended, the values of global and local variables to be examined and altered while the 3ds Max thread is not running, MAXScript commands to be executed from a command line, and the execution to be suspended using method calls from inside the MAXScript code. The Debugger also lets you stop or continue the execution of the suspended code.

MAXScript Crash Recovery

Saving MaxScript Files on Crash

After attempting to save the scene file, the crash handler now allows MAXScript to attempt to save modified open script windows...

Controller Improvements

Previously, when assigning a controller to a track, the value of the track was used by the new controller. While this works well when assigning a new controller class to an existing track, it would cause strange results when instancing an existing controller that already has a value. In addition, when assigning scripted controllers to a track, their script string set before the assignemtn was always overwritten by the current value of the track.

This has been fixed in 3ds Max 8. A flag is set internally when a controller is "not new" and the existing data of the controller being instanced will be used instead of the value of the track at frame 0.

Script Controllers

The replacement of the script string in scripted controllers with the current value of the track has been fixed thanks to the change in controllers described in the previous paragraph. When the settings of a script or expression controller have been changed, the controller will be marked as "not new" and its existing script / expression will be used instead of the value of the target track.

Weak References To Nodes in the Expression/Script Controller

Expression controller variables that point at nodes now use the new nodeTransformMonitor class to hold the reference to the node. This will speed up scenes where expression controllers with node variables are used.

copyPasteKeys function

A new method for copying and pasting selected keys has been added to MAXScript.

Fixed .Checked and .Enabled Properties in RCMenus

Fixed .Checked and .Enabled Properties in RCMenus

Menu items in RCMenus used in dialogs will now update correctly when the menuItem's .enabled and .checked properties change...

Read-Only .owner Property in Rollout Values

Utility and Rollout Properties, Methods, and Event Handlers

A read-only .owner property has been added to rollout values. If the rollout is being displayed by a scripted plugin or CA, the property will contain the scripted plugin or CA instance. This property was added to make it easier to access the variables in a scripted plugin or CA instance when a debugger break occurs in a rollout event handler. In this case, the owner of the event handler is the rollout, so you can access the scripted plugin or CA instance via getVar owner.owner.

Access to .caption Property of Rollout Groups

Group .caption Access

Setting the .caption property of either the GroupStartControl or GroupEndControl via the .controls property of a rollout will now update the name of the group.

Read-Only Local Variables in Scripted Plug-ins

The following predefined local variables in scripted plug-ins are now read-only:

All plug-in types: this, loading. version was previously marked as read-only.

SimpleMod: extent, min, max, center

SimpleManipulator: target, node

Specifying Global Variables As Global Using ::

Specifying Global Variables As Global Using ::

You can now specify a global variable name by preceeding the name with '::'. Such names are looked for only in the global variable pool, and will be created if they do not currently exist.

New Persistent Global Variables Behavior On Merge

Persistent Global Variables

When merging or XRef-ing in a file (scene/object XRefs are a special case of merge), when reading in persistent global variables, If the variable being read from the scene file already exists as a persistent global variable, the value of the persistent global is not overwritten.

Import/Export using a specified I/O class

ImportFile() and ExportFile()

A new [using:<maxclass>] optional keyword argument has been added to the ImportFile() and ExportFile() functions.

It can be used to pass the max class of the exact importer/exporter to be invoked, thus preventing conflicts when the same extension is supported by multiple files.

Saving Files - Quiet Mode and Return Value

3ds Max File Loading and Saving

A new [quiet:<bool>] optional keyword argument has been added to the SaveMaxFile() and SaveNodes() functions. In addition, instead of returning OK, these methods will now return true on success and false on failure (for example if the target file exists and is write-protected).

Bitmap Values

A new [quiet:<bool>] optional keyword argument has been added to the Save() method for bitmap values. In addition, instead of returning OK, the method will now return true on success and false on failure (for example if the target file exists and is write-protected).

Material Editor

A new [quiet:<bool>] optional keyword argument has been added to the fileSaveMatLib() method. It will still return OK as the corresponding SDK method does not return a valid success or failure result.

New initialDir: Keyword Argument To getSavePath()

Standard Open and Save File Dialogs

A new [initialDir:<pathname>] optional keyword argument has been added to the getSavePath() method. When specified, the dialog will open at the specified path.

Custom SnapPlane for gw.SnapPoint()

Viewport gw.snapPoint method

A new optional keyword argument has been added to the existing gw.snapPoint method. It lets the user provide a snapPlane matrix3 value which maps the XY plane to a custom snapping plane.

32bit Floating-point Support for Scripted Render Effects

Scripted render effects now implement the Effect8 interface. Effect8::SupportsBitmap() is implemented to return true in all cases.

This means that scripted Render Effects are considered compatible with all types of bitmaps since they only access bitmaps through the proper GetPixel() method and will automatically support high-dynamic-range images without clipping - unless, of course, the script intentionaly clips the colors or convertes them to integers.

mental ray Support for Scripted Materials

Scripted materials are now supported by mental ray, as long as the delegate material is supported. The delegate material is correctly interpreted by mental ray as the actual material used to render. The "mental ray Connection" rollout of the scripted material is also correctly used and initialized.

Undo/Redo Callbacks NotificationParams

Callbacks: Undo System Notifications

#sceneUndo and #sceneRedo callbacks now return the undo/redo name entry in callbacks.notificationparams().

Example script:

callbacks.removeScripts id:#test

callbacks.addScript #sceneRedo "format \"Redo: %\\n\" (callbacks.notificationParam())" id:#test

callbacks.addScript #sceneUndo "format \"Undo: %\\n\" (callbacks.notificationParam())" id:#test

Inspecting Interface Properties

The methods showProperties, getPropNames, and hasProperty now include FPS interface properties.

For example,

CameraMap exposes no properties through its param blocks, but it exposes two properties through an FPS interface:

c=CameraMap()

CameraMap:Camera Map Modifier

showinterfaces c

Interface: interface

Properties:

.cameraNode : node : Read|Write

.channel : integer : Read|Write

Methods:

Actions:

OK

getpropnames c -- on instance

#(#cameraNode, #channel) -- previously returned #()

showproperties c -- on instance

.cameraNode : node -- previously not shown

.channel : integer -- previously not shown

FALSE

hasproperty c #channel -- on instance

true -- previously returned false

getpropnames CameraMap -- on class

#()

showclass "cameraMap.*"

CameraMap : modifier {21ce6ea4,7ed434db}

OK

MAXScript Editor Improvements

New Edit>Clear All command in the Editor menu. This option was previously available only in the Listener. When executed, clears the content of the editor.

Color-coding of large scripts has been made over 30% faster. In addition, a wait cursor will be shown during color-coding.

Quiet Mode, DefaultAction and Quiet Contexts

defaultAction Context

New context to specify the default action.

quiet Context

New context to specify the current quiet mode.

Quiet Mode

For default action arguments for render, loadMaxFile, fetchMaxFile, mergeMaxFile, and getMAXFileObjectNames, the option #default has been added. When #default is specified, the current defaultAction context state is used.

If a default action argument is not specified for render, loadMaxFile, fetchMaxFile, mergeMaxFile, and getMAXFileObjectNames, it defaults to the current defaultAction context state.

Modified default for MAXScript render, loadMaxFile, fetchMaxFile, mergeMaxFile, and getMAXFileObjectNames method's 'quiet' keyword argument. Previously, the default was FALSE. Now the default is the current quiet mode.

Added keyword args to MXS mergeMAXFile method. missingExtFilesAction:, missingExtFilesList: , missingXRefsAction: and missingXRefsList:

Controlling the Renderer

Added new unsupportedRenderEffectAction: and unsupportedRenderEffectList: keyword arguments to MAXScript render method.

File Link and Quiet Mode

File Link dialogs now respect the Quiet Mode . All File Link dialogs (those that appear in the course of an Attach, Reload, Detach, or Bind) now respect this setting.

readValue Method Enhancement

StringStream Associated Methods

A new ignoreStringEscapes: keyword parameter has been added to readValue method.

filterString splitEmptyTokens Parameter

FilterString

A new splitEmptyTokens: keyword parameter has been added to the filterString method. If splitEmptyTokens is false or not specified, sequential tokens are handled as a single token, and tokens at the beginning or end of the string are ignored. If splitEmptyTokens is true, each token found will result in string element in the output, with the string element in the cases ignored above being empty strings.

OLE Improvements

SafeArrayWrapper Class

Instances of the new SafeArrayWrapper Class are creatable by the user and are returned by OLE methods that return SAFEARRAY values.

In previous releases, the MAXScript string / OLE string conversion routines were using stack memory. A particular method was attempting to allocate two times the string size on the stack. For very long strings, this was causing stack overflows. In 3ds Max 8, MAXScript is using much better conversion routines, only using stack memory when actually needed and when stack memory requirements are small.

Garbage Collection Status Display

options.showGCStatus

A new options.showGCStatus global variable has been added. When set to true, the message "MXS GC" will be displayed in the status bar during MAXScript Garbage Collection . When set to false, no message will be displayed. The setting is stored in the 3dsmax.ini file in the [MAXScript] section.

UI Speed-ups

In previous releases, the MacroScript isEnabled handler was called N times when N objects were deleted using MAXScript. This has been fixed. Scene redraw will be disabled while the objects are being deleted, and the MacroScript handlers will be called just once after the scene redraws have been re-enabled.

SelectByName showHidden: Option Now Working

Picking Scene Nodes by Name

In previous releases, the documented showHidden optional keyword was broken. Now it works as expected.

Slider controller: Creation Parameter

Slider

In previous releases, only spinner controls could be linked to a controller via the controller: creation parameter. Now the same can be done with Sliders.

New Spinner Change Handler Arguments

Spinner

New optional arguments have been added to the changed, entered and buttonUp change handlers to allow better manual undo handling.

Removing Button Control Images

Setting the value of the .images property for either Button or Checkbutton to undefined will set the control back to displaying its caption rather than images.

New Mouse Button Event Handlers in Buttons and ImgTag

A new rightclick event has been added to button , checkButton , mapButton , materialButton , pickButton , and imgTag .

Several new events similar to the ones found in dialogs have been added to imgTag, including lbuttondown, lbuttonup, lbuttondblclk, mbuttondown, mbuttonup, mbuttondblclk, rbuttondown, rbuttonup, rbuttondblclk

New useWireColor Handler for Scripted Cameras, Lights and Dummies and Custom Display Mesh for Lights

Scripted Cameras

Scripted Light Plug-ins

Scripted Helper Plug-ins

This event handler is available to scripted cameras, lights, and helpers and lets the developer specify whether to use the node's wire color when drawing the object in the viewport, or use the UI color for the object type (Dummy Object for helpers, Light Object for lights, and Camera Object for cameras). If this handler returns true, the node's wire color is used, otherwise the UI color for the object type is used. If the event handler is not specified, the wire color is used. This handler is only applicable when a getDisplayMesh handler is supplied.

This handler is optional.

Scripted Light Plug-ins

The getDisplayMesh event handler previously available to scripted cameras and helpers is now available to scripted light plug-ins, too.

Listener Can Be Toggled On and Off

The MAXScript Listener can now be toggled on and off using the default F11 key. Previously, it was being opened but not closed using the shortcut.

See also

New in MAXScript


Documentation Changes in 3ds Max 8

The following changes have been made to the MAXScript Online Reference for the 3ds Max 8 update:

Additions

Added a description of the difference between the hasProperty and isProperty inspector functions.

Added the missing documentation of the possible channelType values in the Interface: ChannelInfo topic.

Added the missing documentation of the MAXSuperClass.classes property in MAXWrapper Common Properties, Operators, and Methods .

Added the missing documentation of the getInterface Function .

Added the missing documentation of the rolledUp event handler in rollouts and utilities in Utility and Rollout Properties, Methods, and Event Handlers

Added the missing documentation of the FBX Export and Import dialog access functions added to but undocumented in 3ds Max 7: FBX Export Dialog Access , FBX Import Dialog Access

Added an undocumented .hasAlpha property of Bitmap Value .

Added an undocumented transferCAs keyword argument to replaceInstances method.

Added a note regarding canceling the Render dialog to the renderSceneDialog topic.

Added additional examples of using callbacks to manage the creation of Persistent Global Variables

Added an example of using the RayMeshGridIntersect : ReferenceTarget methods for advanced mesh intersection.

Updated the documentation of Mesh_Select Modifier .

Updated the documentation of Interface: ParamCollectorOps regarding Link to Object and Put to Object dialogs.

Updated the documentation of MultiMaterial : Material regarding access to the .numsubs property.

Updated the documentation of snapMode regarding access to the "Standard" snap items which are grouped in 4 different OSnap sets with indices 2 to 5.

Updated the documentation of BinStream for Binary Reading and Writing and FileStream Values Added note about case sensitive strings.

Fixed the description of the .SingleSel property of TreeView ActiveX Control

Added a new FAQ entry: How do I keep a Plane aligned to 3 Point Helpers?

Added a new FAQ entry: How do I filter a string including empty entries?

Added a new FAQ entry: How do I get the file name of the current scene?

Added a new FAQ entry How To Make It Better? taken from a MAXScript technical presentation at Siggraph 2005.

Added new information to the FAQ entry How To Make It Faster? taken from a MAXScript technical presentation at Siggraph 2005. The new examples have been marked with an [image] .

Deleted

Removed incorrect note from Command Panels suspendEditing and resumeEditing methods description claiming that only the Modify panel supports nested suspending and resuming. This was not correct.

Removed missing Character Studio Physique access methods which were documented in 3ds Max 4 but never actually included in the shipping build.

Formatting

Concluded the reformatting and color coding of the complete Reference by placing all object property definitions on a cyan background as was already done for methods, event handlers and some interface properties.

In an attempt to make the Reference even easier to read, all source code has been placed on light gray background, and the Examples and Notes bars have been indented to keep the flow of properties and methods definitions.

Reformatted the documentation of all Shapes to reflect the order of User Interface controls.

Reformatted the documentation of all Radiosity Dialog to reflect the order of User Interface controls.

All new modifiers and objects have been documented using the User Interface controls order for easier location of properties and methods.

See also

New in MAXScript


Saving MaxScript Files on Crash

This feature is available in 3ds Max 8 and higher

After attempting to save the scene file, the crash handler now allows MAXScript to attempt to save modified open script windows.

For each modified open script window, '_recover' is appended to the the script file name and the user is asked whether to save the file.

The file will be saved in the directory of the original script.

The full path is shown in the Yes/No message box that asks the user whether they want to save the file.

If the modified open script window contains a script that was not loaded from or previously saved to disk, the file name 'untitled_#_recover.ms' is used, where '#' in an integer starting with 0 and increasing for each such file. These files are saved in the scripts directory.

See also

MAXScript Language Improvements in 3ds Max 8


Weak References To Nodes in the Expression/Script Controller

This feature is available in 3ds Max 8 and higher

Two new classes have been implemented: NodeTransformMonitor and RefTargMonitorRefMaker classes. NodeTransformMonitor is derived from ReferenceTarget, and holds a pointer to a RefTargMonitorRefMaker, which derives from ReferenceMaker.

RefTargMonitorRefMaker holds a reference to the node, and passes notification messages to the NodeTransformMonitor through a callback method. The NodeTransformMonitor just looks for REFMSG_CHANGE/PART_TM messages and passes those on to its dependents, unless a message is already being passed on. This prevents potential recursion. Since the NodeTransformMonitor doesn't hold the node as a reference, we don't have a circular reference hierachy. If object A has a NodeTransformMonitor that points at Node B, and object A is saved, Node B is also saved. Likewise on merge/xref object, loading object A will cause Node B to be loaded. Also, using NodeTransformMonitor the base object of a node can point at its owning node to get its TM changed messages.

Expression controller variables that point at nodes now use the nodeTransformMonitor class to hold the reference to the node. This will speed up scenes where expression controllers with node variables are used since only REFMSG_CHANGE/PART_TM messages are being sent to and invalidating the expression controller and its dependents. Previously, all messages from the node, not just REFMSG_CHANGE/PART_TM, would invalidate the expression controller and its dependents.

NodeTransformMonitor : ReferenceTarget

NodeTransformMonitor - superclass: ReferenceTarget; super-superclass:MAXWrapper - 2:2 - classID: #(418912514, 419643346)

NodeTransformMonitor interfaces:

Interface: INodeTransformMonitor

Properties:

.node : node : Read|Write

Get/set the node to monitor.

.forwardTransformChangeMsgs : bool : Read|Write

If true (default), node transform messages from the monitored node invalidate the dependents of the NodeTransformMonitor instance. If false, only deletion of the monitored node invalidates the dependents of the NodeTransformMonitor instance.

See also

MAXScript Language Improvements in 3ds Max 8


Fixed .Checked and .Enabled Properties in RCMenus

This feature is available in 3ds Max 8 and higher

Menu items in RCMenus used in dialogs will now update correctly when the menuItem's .enabled and .checked properties change.

Test case:

try (destroyDialog ro_vPropShop3) catch()

rcmenu rc_Main

(

 local testval = false

 subMenu "Options"

 (

  subMenu "Placement Options"

  (

   menuItem mi_align "Align to face" checked:testval

   menuItem mi_art "Make Art"

   menuItem mi_pict "Make Picture" checked:false

  )

 )

 menuItem mi_halt "Halt and Catch Fire"

 on mi_align picked do (print "picked";testval = not testval)

 on rc_Main open do (print "opened")

 on rc_Main update do (print "update")

)

rollout ro_vPropShop3 "vPropShop3" ( )

createDialog ro_vPropShop3 width:600 height:400 bgColor:[153,153,153] menu:rc_Main style:#(#style_titlebar, #style_sysmenu, #style_minimizebox, #style_resizing)

If you pick Options/Placement Options/Align to Face, and then open to that item again, it will be checked. Previously, it would show as unchecked. Picking the other items doesn't cause this to happen because the script need to set up a variable to track the state (testval for menuItem mi_align).

Note

that when a RCMenu is used in a Dialog, the open handler is called once when the dialog is created.

Added 'update' event handler to RCMenu.

This event handler is called when one of the top level subMenu or menuItems is initially clicked on. This event handler only called once per focus being set to the menu items - if you click on 'Options' the event handler is called, but it is not called when moving the mouse back and forth between 'Options' and 'Halt and Catch Fire' or clicking on menu items. This event handler is called after the enabled and checked keyword parameters are evaluated, and allows you to set new values for these properties. If a keyword parameter is not specified for the checked or enabled property, that property value is not changed when processing the keyword parameters (i.e. after initial creation there is no default value for these properties).

Test case:

rc_Main.mi_align.enabled = not rc_Main.mi_align.enabled

rc_Main.mi_art.checked = not rc_Main.mi_art.checked

rc_Main.mi_art.enabled = not rc_Main.mi_art.enabled

rc_Main.mi_pict.checked = not rc_Main.mi_pict.checked

rc_Main.mi_pict.enabled = not rc_Main.mi_pict.enabled

rc_Main.mi_halt.checked = not rc_Main.mi_halt.checked

rc_Main.mi_halt.enabled = not rc_Main.mi_halt.enabled

After running the above, all of the menuItems are disabled, 'Align to Face' and 'Make Art' are checked, and 'Make Picture' is unchecked. 'Make Picture' is unchecked because it has the keyword parameter: checked:false

Note that when a RCMenu is opened, its local variables are re-initialized.

As such, you cannot say:

rcmenu MyRCmenu4

(

 local isChecked = false

 menuItem mi_xx "test slot" checked:isChecked

 on mi_xx picked do isChecked = not isChecked

 on MyRCmenu4 open do (print "opened")

)

popupmenu MyRCmenu4

popupmenu MyRCmenu4

because each time MyRCmenu4 is displayed isChecked is being set to false. Instead, you need to store the persistent state outside the scope of the RCMenu,

Like this:

isChecked = false

rcmenu MyRCmenu4

(

 menuItem mi_xx "test slot" checked:isChecked

 on mi_xx picked do isChecked = not isChecked

)

popupmenu MyRCmenu4

See also

MAXScript Language Improvements in 3ds Max 8


Specifying Global Variables As Global Using ::

This feature is available in 3ds Max 8 and higher

You can now specify a global variable name by preceeding the name with '::'. Such names are looked for only in the global variable pool, and will be created if they do not currently exist.

For example:

(

local pi = "Hello!"

format "% : %\n" pi ::pi

fn test x:pi y:::pi = format "% : %\n" x y

test()

)

Output:

Hello! : 3.14159

Hello! : 3.14159

See also

MAXScript Language Improvements in 3ds Max 8


What was New in MAXScript in 3ds Max 7

The following pages will give you a quick overview of the MAXScript language changes and improvements in 3ds Max 7. For details on each feature, please follow the links to the respective documentation pages.

Geometry

Editable_Poly Properties

New properties added to the Editable_Poly geometry class providing access to the Paint Soft Selections and Paint Deformations functionality.

Interface: EditablePoly

New methods added to the EditablePoly Interface, providing access to Bridge, MakePlanarIn and Relax functionality.

Editable_Mesh : GeometryClass and TriMesh : Value

New mesh: construction parameter added to the mesh constructor to allow creation of Editable_Mesh objects from existing TriMesh values.

NURBSCurveshape : Shape

Added access to the following parameters: #angle, #renderable, #mapCoords, #thickness, #sides, #viewport_thickness, #viewport_sides, #viewport_angle, #displayRenderMesh, #useViewportSettings, #displayRenderSettings

Helpers

ExposeTm : Helper

This new Helper can be used to extract position and rotation data from any scene nodes to be used as input for scripted controllers, wire controllers etc. It simplifies significantly the creation of custom animation rigs.

Modifiers

Edit_Poly : Modifier

The new Edit_Poly modifier implements the Editable Poly modeling tools in a modifier that can be added to the stack and allow for non-destructive editing and animation.

EmptyModifier : Modifier

Replaces the previous implementation of the EmptyModifier which is now EmptyModifier_Old. Can be used as an Custom Attributes holder.

Poly_Select : modifier

New properties controlling the Soft Selection Painting added to the existing modifier.

Projection : Modifier

Project_Mapping_Holder : Modifier

Project_Mapping : ReferenceTarget

The new Projection modifiers provide means to copy UVW coordinates between high-resolution meshes and low-resolution meshes necessary for Normal Map baking.

Renderable_Spline : Modifier

The new Renderable_Spline modifier provides a procedural way to turn a spline into a mesh in the renderer and the viewports. It is also used when transferring data between 3ds Max and other Autodesk products.

Skin_Morph : Modifier

The new Skin_Morph modifier...

Skin_Wrap : Modifier

The new Skin_Wrap modifier....

Skin_Wrap_Patch : Modifier

The new Skin_Wrap_Patch modifier...

TurboSmooth : Modifier

The new TurboSmooth modifier is an optimized and very fast subdivision modifier.

Unwrap_UVW : Modifier

The new Unwrap_UVW Interface provides additional methods to control the Unwrap_UVW modifier, including Open Edges display in the Editor and the Viewports, Flatten Map By Material IDs, access to geometry and UVW Area calculations for selected faces, Relative/Absolute type-in mode, and adding maps to the maps list of the Editor.

VertexPaint : Modifier

New .radiosityOption property added to the existing modifier.

Custom Attributes

MSCustAttribDef Class

New properties .isPB2Based , .isMSPluginClass and .isMSCustAttribClass added to the Custom Attributes definition class.

custAttributes.GetOwner_method

The new custAttributes.getOwner method returns the object the Custom Attribute is applied to.

Interface: custAttribCollapseManager

This new interface controls whether Custom Attributes will survive collapsing the modifier stack or not.

Materials and Texture Maps

Camera_Map_Per_Pixel : textureMap

The new per-pixel camera mapping texture map yields precise results on any geometry at any viewing angle.

DirectX_9_Shader : Material

New properties .lightDir, .k_a, .k_d, .k_s, .n added to the existing DirectX_9_Shader material. Some obsolete properties were retired from the material.

New methods added to the existing DirectX_9_Shader material.

ViewportManagerCustAttrib : CustAttrib

New properties and methods controlling the DirectX Standard Material shader and saving of FX files added to the existing ViewportManagerCustAttrib class and its interface.

Normal_Bump : textureMap

The new Normal_Bump texture map is used as the host for baked normal maps.

Ambient_Reflective_Occlusion__3dsmax : textureMap

A new mental ray texture map.

Bake Elements

HeightMap : BakeElement

The new HeightMap BakeElement can be used to bake geometry into Height Maps textures.

NormalsMap : BakeElement

Two new properties added to the existing BakeElement: .useHeightAsAlpha and .useNormalBump.

mental ray

mental_ray_Shadow_Map : Shadow

New properties added to the existing shader which is now officially supported in 3ds Max 7.

mental_ray_renderer : RendererClass

New properties added to the existing renderer class, some obsolete properties removed.

Sub-Surface Scattering - mental ray Shaders

New shaders implementing both physically-correct and fast Sub-Surface Scattering (SSS) added. Note that these classes are not officially supported in MAXScript.

Utility Plug-ins

Object_Display_Culling : UtilityPlugin

New Utility Plug-in to maintain user-defined frame rates in the viewports through view-dependent objects culling. Removed again in 3ds Max 2009 - the Adaptive Degradation system completely replaced its functionality.

Callbacks

#nodeNameSet

This new callback is sent when a scene node name is set or changed. It is more reliable to use this callback type than the #nodeRenamed callback. callbacks.notificationParam() will return a 3 element array for this callback type, containing the old name, the new name, and the node.

#filePreOpen and #filePostOpen

callbacks.notificationParam() will now return an integer value of 2 if a Render Presets file is being opened, undefined otherwise.

Trackbar Interface

New methods for registering and managing trackbar key filter functions added.

The two new topics

Exploring the Trackbar Filter Callback Functions

Trackbar Filter Callback Function Examples

discuss the functionality and possible custom filter functions.

Interfaces

Interface: FrameTagManager

The new FrameTagManager Interface provides access to the Time Tags feature. See also

Interface: ParamCollectorOps

The new ParamCollectorOps Interface provides access to the Parameter Collector dialog.

Interface: reactionMgr

The new reactionMgr Interface provides access to the Reaction Manager dialog.

Interface: walkThroughOps

The new walkThroughOps Interface provides access to the Walkthrough viewport navigation mode.

Interface: INodeBakeProjProperties

The new INodeBakeProjProperties Interface implements the projection mapping process using the new Projection : Modifier and Project_Mapping_Holder : Modifier modifiers.

Interface : thePainterInterface

New .hitNode method added to the existing Interface.

New properties .dragStrLimitMin and .dragStrLimitMax added to the existing Interface.

Interface: LayerManager

New .closeDialog and .isDialogOpen methods added to the existing Interface.

Interface: ChannelInfo

New .closeDialog and .isChecked methods added to the existing Interface.

Interface: maxOps

New .paintSelBrushSize property controlling the size of the new Paint Selection Brush option added to the existing Interface.

New deleteSelectedAnimation() method added to the existing Interface.

Command Panel

Command Panels

New SuspendEditing and ResumeEditing methods added.

The syntax of SetCommandPanelTaskMode was modified so that the panel name to switch to can either be specified as the mode keyword argument, or simply as the argument to the method.

Viewports

Accessing Active Viewport Info, Type, and Transforms

New method viewport.isWire() added.

New methods viewport.GetRenderLevel(), viewport.SetRenderLevel() added.

New methods viewport.GetShowEdgeFaces(), viewport.SetShowEdgeFaces() added.

New methods viewport.GetTransparencyLevel(), viewport.SetTransparencyLevel() added.

New method viewport.GetFOV() added.

New method viewport.GetScreenScaleFactor() added.

New method viewport.IsEnabled() added.

New method viewport.IsPerspView() added.

New system global viewport.DispBkgImage added.

Snaps

snapMode

Many new properties added to the existing Struct, providing full access to Snap options and results.

Preferences

3ds Max System Globals

New preferences.spinnerPrecision, preferences.spinnerSnap and preferences.useSpinnerSnap system globals corresponding to the controls in the Customize > Preferences > General > Spinner group added.

Track View Pick Dialog

Track View Pick Dialog

New optional filter_function and new optional keyword options: added to the existing TrackView.pickTrackDlg function.

User Interface Controls

Edittext

New labelOnTop keyword option in EditText UI controls. If true, the caption is placed above the edit text box. If false or not specified, the caption is placed to the left of the edit text box.

Listbox

New readOnly keyword option in ListBox UI controls. If true, the user cannot pick items from the list. NOT exposed as a property.

Pickbutton

New autoDisplay keyword option in Pickbutton UI controls. If true, the name of the picked object will be placed on the button automatically.

The .object property has been fixed to accept undefined as a valid value assignment.

Edittext

ComboBox

Dropdownlist

ListBox

Bitmap

.height and .width are now exposed as read/write properties of the these UI controls.

For ComboBox, DropdownList, and ListBox, these properties get/set the height/width of the list window in pixels.

Note

that as constructor parameter, the height specifies the height in lines of text!

For ComboBox and Dropdownlist , the height property does not include the height of the edit-text box. For ComboBox, the minimum height setting is clamped at 0 pixels, for DropdownList at 1 pixel.

CreateDialog

Two new methods to get and set the dialog's background bitmap added.

Utility and Rollout Properties, Methods, and Event Handlers

New read-only property .isDisplayed added to rollouts.

MacroScript Handlers

closeDialogs MacroScript handler

This new macroScript handler allows the implementation of macroScript toggling on and off in conjunction with the isChecked handler. When the isChecked handler returns true and the button is pressed again, the closeDialogs handler will be called instead of the on execute handler.

Scripted Plugins

Scripted Cameras

Scripted Helper Plug-ins

New on getDisplayMesh handler lets the developer replace the default viewport display mesh of the delegate with a custom viewport mesh.

Scripted Plug-in Clauses

ListBox user interface controls are now supported as a valid association with type:#integer parameters in scripted plugins.

SuperClasses

New superclass 'SoundClass' added. The default sound object class belongs to this superclass. Explicit declaration of 'Default_Sound' class added.

Class and Object Inspector Functions

isPropertyAnimatable

This new method returns true if the property is animatable, false if the property is not found or is not animatable.

getClassInstances

This new method returns an array of all instances of specified class that exist in the scene.

macros.list()

This new method prints in the Listener all installed macroscripts including ID, name, category and source path.

Value Common Properties, Operators, and Methods

New methods isMSCustAttrib(), isMSCustAttribClass(), isMSPlugin(), isMSPluginClass() for checking whether a value is a scripted plugin or custom attribute class or instance.

MAXWrapper

MAXWrapper Common Properties, Operators, and Methods

New method isValidObj returns true if the argument points to a MAXWrapper that has not been deleted.

New method getClassName returns the class name of the MAXWrapper as a string.

New optional explicitNames keyword added to the existing ExprForMaxObject method.

New immediateOnly keyword added to refs.dependents method . If true, only the immediate dependents of the specified object are returned.

New refs.dependencyLoopTest method added to the existing refs struct.

Indexed Access to Animatable Properties in 3ds Max Objects

New .name read-only property added to SubAnim class.

New optional asString keyword added to the existing getSubAnimName method.

TheHold

TheHold

New getSuperLevel method added.

Miscellaneous Functions

getMaxWindowPos

This new method returns the position of the 3ds Max window in relation to the upper left corner of the desktop.

Character Studio Extensions

MAXScript Extensions in character studio

Character Studio is now part of 3ds Max 7.

Mixer MAXScript Extensions

Added documentation of the Character Studio Motion Mixer properties and methods.

Biped Animation Manipulation and Clearing

Additional methods to clear animation in single body parts or whole bipeds.

Setting and Resetting Biped IK Keys

Additional methods related to IK access.

Biped Miscellaneous Methods

Additional general Biped-related methods.

Biped Load and Save

The Biped Load and Save function have been extended to specify objects and subAnim tracks to be loaded and saved.

See also

New in MAXScript


MAXScript Language Improvements in 3ds Max 7

The following is a description of internal changes and "tweaks" to the MAXScript language in 3ds Max 7. Other than the "What is new..." topic, these changes do not implement new objects, classes, methods or interfaces, but change the way MAXScript works internally. Usually these changes either improve performance or simplify programming.

Node Access Improvements

A node name cache has been implemented. It is used by MAXScript to resolve pathnames (like $box01) to scene nodes. This optimization primarily comes into play with script controllers that use pathnames. In a scene with 5001 nodes and a script controller that references the 5001'th node by name twice, the time for 10000 evaluations of the script controller went from 147 seconds to 1.6 seconds.

A new checkbox was added to the MAXScript tab of the Preference dialog: Use Fast Node Name Lookup. When on, scene node names are cached by MAXScript, resulting in significantly faster resolution of non-wildcard pathname values (i.e., $box01) to node values. When off, the scene nodes are enumerated looking for a scene node name that matches the pathname.

An optimization was introduced in 3ds Max 7 that checks to see if a node has already been invalidated before sending out notifications to it's dependents that it has been changed. It speeds up complex rigs, especially those that involve the new expose transform helper. It is controlled by the preferences.InvalidateTMOpt System Global variable. When set to true, the optimization is enabled and multiple notifications will not be sent out. When set to false, the animation system behaves as in 3ds Max 6 and earlier. It is enabled by default.

The MakeNameUnique function was changed to use an std::set rather than an a Tab<int>. This reduced the time for creating 2500 nodes of the same type from 145 seconds to 71 seconds. If the nodes are renamed as they are being created, time for creating 2500 nodes reduced from 47 seconds to 11 seconds.

The getNodeByName function has been significantly enhanced.

Custom Attributes

refs.dependson now returns the Custom Attributes of an object. In versions prior 3ds Max 7, Custom Attributes were not considered by this method as technically they are not dependent on the object.

classOf will return the custom attribute definition ( MSCustAttribDef ) if passed a scripted custom attribute instance. In previous releases, it was returning a MAXClass value.

The visible name of the MAXCustAttrib class was changed from CustAttrib to MAXCustAttrib. Now you can use: 'CustAttrib.classes' to access the custom attribute classes, and test the superclass of custom attributes against CustAttrib.

Added .isPB2Based as a property of custom attribute definition MSCustAttribDef . Already a property of MAXClass and MSPluginClass.

Added .isMSPluginClass as a read-only property of custom attribute definition MSCustAttribDef , MAXClass, and MSPluginClass. MSPluginClass derives from MAXClass, and MSCustAttribDef derives from MSPluginClass. Property is true if the class is a MSPluginClass or MSCustAttribDef. See also the previously defined isMSPluginClass() method.

Added .isMSCustAttribClass as a read-only property of custom attribute definition MSCustAttribDef , MAXClass, and MSPluginClass. Property is true if the class is a MSCustAttribDef. See also the previously defined isMSCustAttribClass() method.

Mesh

In versions prior 3ds Max 7, the user was responsible for re-initializing the mesh to make it valid before calling update. However, most users would not know everything that needs to be done to re-initialize the mesh properly. For this reason, the re-initializing is done when setting the .numfaces or calling the setNumFaces method.

when Change Handler

A when parameters obj change handler now also picks up topological and geometry changes.

The reason for the previous behavior was the following: if obj was a node, the parameter change message from a changing parameter in most modifiers (including Attribute Holder) was being changed by the ModApp to a geometry change message.

Function Publishing System methods NULL values

For FPS methods/properties that take a Material, RefTarg, INode, Object, or Control values, 'undefined' is an accepted value and is converted to NULL

getMAXFileObjectNames Strings

getMAXFileObjectNames now returns an array of string values, rather than an array of name values. The object names used by mergeMaxFile are case sensitive, and name values are not guaranteed to maintain the case of the string they wrap. See 3ds Max File Loading and Saving

Macro Recorder

The Macro Recorder Path Analyzer has been changed to ignore references that are either DeleteReference restore objects or MAXScript MAXWrapper values. In the past, if the Path Analyzer found one of these references before a reference into the scene, no macro recorder output was generated.

InsertItem for MAXPB2ArrayParam Values

The insertItem method has been extended to work with MAXPB2ArrayParam values:

Example:

plugin helper testObj

name:"testObj"

classid:#(8788668,86769866)

extends:dummy

(

parameters main

(

mtltab type:#materialtab tabsizevariable:true

)

)

t1 = testObj parent:b1

append tabtest.materialTab (standard name:"1")

append tabtest.materialTab (standard name:"2")

append tabtest.materialTab (standard name:"3")

insertItem (standard name:"4") tabtest.materialTab 3

Scripted Plugins

The testing of the 'extends' class type in scripted plugins has been fixed, so a scripted plugin can now extend a scripted plugin.

The simpleMod 'map' event handler call is now explicitly disabled if no map event handler is defined. This leads to no real execution speed increase, the first call to the map event handler would have returned a non-Point3 value that would result in the event handler being disabled anyway.

A remap keyword argument was added to scripted plug-in and scripted custom attribute definitions.

This keyword allows parameter names in the definitions to be changed when updating existing definitions. The keyword takes as an argument a 2 element array, where each element contains an array of string literal or name values. The size of the 2 arrays must be the same.

The names in the first array are the existing parameter names, the names in the second array are the new parameter names.

As parameter names are read in while migrating existing plugin instances, the parameter names are searched for in the first array. If the name is found, the data associated with that parameter is moved to the parameter name in the corresponding location in the second array.

If a parameter name is not found in the first array, the parameter name is not remapped. If the parameter name in the second array does not match a parameter name in the new definition, the parameter data is not moved to the new definition.

String to Boolean Coercion

Coercion of String to Boolean has been added.

Valid string values (case insensitive) for this coercion are:

"on" as booleanClass --> true

"off" as booleanClass --> false

"true" as booleanClass --> true

"false" as booleanClass --> false

All other string values will result in a runtime error

Array to String Coercion

Introduced a MAXScript variable options.printAllElements and a context with printAllElements <bool> do <expr> for controlling whether the complete Array, MeshSelection, BigMatrix, and BigMatrixRowArray is printed or coerced to string, or just the first 20 elements.

Name Values

A copy method was defined for name values . The method returns the same name value. This is needed to support deep copying of arrays in a clean way.

SubAnim Values

New read-only properties .parent and .index have been added to subAnim values. The parent is the true object owning the subAnim, and the index is the subAnim index within that object.

Note

The true object owning the subAnim can be different than what was originally specified when creating the subAnim, and MAXScript automatically hides certain types of subAnims, automatically promoting the subAnims within them.

For example:

s=sphere()

sa = s.baseobject[0]

SubAnim:Radius

sa.parent

ReferenceTarget:ParamBlock

sa.index

1

--The actual owner of the Radius subAnim is the sphere's parameter block.

User Interface Controls

The .text property is now equivalent to the .caption property for all rollout controls that do not define .text separately (for example, the EditText control already has a .text property). Setting a label's text is the same as setting a label's caption. In previous releases, setting the text would not update the UI, but would update the internal .caption value.

The calculation of the construction height of comboBox and dropdownlist was improved. The mininum value of the height parameter of comboBox, dropdownlist and listBox controls is now clamped to 1.

#worldUnits is now accepted as a type of Slider , and is equivalent to a type of #float

Spinner controls with align:#left were not being positioned correctly. Changing the spinner width would move the spinner right or left, with part of the spinner frequently outside the rollout width. This has been fixed so that left aligned spinner controls stay put on the left as width changes.

The Group UI control has been fixed to handle controls within the group that use the across: parameter. The bottom of the group is now below the largest control within the group, rather than below the last control within the group.

For Example:

rollout test "test"

(

group "Test Group"

(

radiobuttons rb_Test labels:#("AA","BB") columns:1 align:#left across:2

label lb_test "Test Label:" align:#left offset:[40,0]

)

)

createdialog test width:329

In 3ds Max 6 and earlier versions, the above would result in

In 3ds Max 7, the result looks like

Rollout event handlers are now accessible as properties of the rollout. For example, <rollout>.open() will call the open handler of the rollout.

Controlling Program Flow

Fix for continue while mapping across node objectsets.

For example:

b=box();b2=box parent:b

for o in objects do (print o.name; continue)

for o in $* do (print o.name; continue)

would print only Box01, not Box02 in 3ds Max 6 and earlier.

Now it prints both.

Getting the Current Exception

New getCurrentException() method returns the text of the current exception in conjunction with a catch() statement.

Miscellaneous Tweaks

no_max_maker was fixed to return MAXNode values instead of MAXRefTarg values for nodes.

If the first argument of getTransformAxis is the value undefined instead of a node, the viewport common axis is returned instead.

If the Coordinate System Center (returned by getCoordCenter()) is #local or the Ref Coord System (returned by getRefCoordSys()) is #local, #parent, or #gimbal, the last calculated common axis is returned.

See also

What was New in MAXScript in 3ds Max 7

Documentation Changes in 3ds Max 7

Documentation Updates after 3ds Max 7 Release

Documentation Changes in 3ds Max 6

Documentation Changes in Particle Flow Update


Documentation Changes in 3ds Max 7

The following changes have been made to the MAXScript Online Reference:

Formatting

Color bars have been added to provide better document structure and help quickly spot examples and warnings:

See Also topics will appear after an orange bar.

Class Description including Superclass and ClassID is now on blue background.

Important Notes and Warnings are on red background.

Groups of related methods or properties can be separated by a yellow bar.

Examples and Scripts are denoted by a green bar.

Syntax definitions are also on blue background for easier location

All example scripts are now color-coded for better readability!

Reorganized the Modifiers list in the Contents tab into a hierarchy for easier navigation.

Regrouped by function and added group titles to the Editable_Poly Properties and Interface: EditablePoly topics for easier navigation. The groups are also accessible from the Content tab.

Added a large number of screenshots illustrating the Editable Poly and Editable Mesh methods examples.

Reorganized the MAXScript Extensions in character studio chapters and added topics documenting additional classes.

New Tutorials

Added the following tutorial to the "How To" chapter:

How To ... Develop a Vertex Renderer

Added the following Particle Flow tutorials to the "How To" chapter:

How To ... Transfer ParticleFlow Particle Motion To Scene Objects

How To ... Affect Particle Flow Particles by Mass

Added a new sub-chapter "How To ... Develop a Bitmap Painting Tool in Nine Easy Steps" to the "How To" tutorials chapter:

How To ... Develop a Bitmap Painting Tool - Basic Utility

How To ... Develop a Bitmap Painting Tool - Strokes Support

How To ... Develop a Bitmap Painting Tool - Brush Size and Color

How To ... Develop a Bitmap Painting Tool - Airbrush and Shapes

How To ... Develop a Bitmap Painting Tool - Smooth Brushes

How To ... Develop a Bitmap Painting Tool - Load and Save

How To ... Develop a Bitmap Painting Tool - Erase Changes

How To ... Develop a Bitmap Painting Tool - Unwrap UV Coordinates

How To ... Develop a Bitmap Painting Tool - 3D Painting

Added a new sub-chapter "How To ... Develop a Selected Objects Inspector using ListView ActiveX Control" to the "How To" tutorials chapter:

How To ... Develop a Selected Objects Inspector using ListView ActiveX Control - Part One

How To ... Develop a Selected Objects Inspector using ListView ActiveX Control - Part Two

Added a new sub-chapter "How To ... Develop a Scene Browser using TreeView ActiveX Control" to the "How To" tutorials chapter:

How To ... Develop a Scene Browser using TreeView ActiveX Control - Part One

How To ... Develop a Scene Browser using TreeView ActiveX Control - Part Two

Additional Examples and Information

Replaced the example snippets with full-blown working scripts that actually do something in the following topics:

Edittext - BoxCreator - create boxes with user-defined names

Listbox - ObjectKiller - delete objects by double-clicking in a list

Implemented Skin Selection tools for Grow, Shrink, Loop and Ring using the unsupported SkinUtils methods:

Grow/Shrink/Loop/Ring Skin Selection

ActiveX Controls

Reorganized the ActiveX Controls topics into various sub-topics for easier navigation, added new topics describing some typical control types.

Adobe Acrobat ActiveX Control

ImageList ActiveX Control

Windows Media Player ActiveX Control

Point2 Values as "Twips" in ActiveX Controls

Added detailed documentation of the ListView ActiveX Control properties, methods and event handlers. See also the corresponding tutorials ListView ActiveX Controls Tutorials mentioned above.

Added detailed documentation of the TreeView ActiveX Control properties, methods and event handlers. See also the corresponding tutorials How To ... Develop a Scene Browser using TreeView ActiveX Control - Part One mentioned above.

MAXScript Frequently Asked Questions

Reorganized the MAXScript FAQ into various sub-chapters for easier navigation using the Content tab.

Added new topics to the MAXScript FAQ based on user requests:

How do I get a Space Warp by Binding?

How do I delete randomly a specified percentage of geometry objects?

How do I access UI elements to change their properties?

How do I make a vector from a vertex position?

How do I find the angle between two vectors?

How do I find the angle between 3 vertices?

How do I rotate a vector around the Z axis?

How do I align the UVW_Modifier's Gizmo to a selected face?

How do I display a value in a Rollout?

How do I batch-process multiple .MAX files?

How Do I Select a Face of an Editable Mesh by its Index?

How Do I Get Faces With Normals Facing Away?

How do I check if a string contains only numbers?

How do I link the rotation of an object to the scene time?

How do I remove duplicate arrays from an array?

How do I build Unconnected Edges Selections from EPoly Edge Selection?

How do I remove mid-edge EPoly Vertices?

How do I Select Edges Between Materail IDs?

The Wonderful World of Classes and Class Instances

Previously Undocumented Topics and Minor Fixes

Added previously undocumented system global variable preferences.dontRepeatRefMsg controlling the state of the animation system optimization introduced in 3ds Max 6.

Added previously undocumented Scripted Plugin Event Handler on clone do...

Added previously undocumented method setNumFaces to Mesh Face Methods topic.

Added previously undocumented parameter progressbar to the render() method.

Fixed the description of the hasNoteTracks method in the NoteTrack Value topic.

Fixed link from Contents tab to ActiveX by-reference arguments for methods and events which incorrectly pointed at ActiveX Controls in MAXScript Rollouts .

Added an example of finding the Angle between two Vectors to the dot product description in the topic Point3 Values

Fixed the description and added an example of coercing Time Values to Numbers in the Time Values topic.

Added previously missing description of the setVertColor method to the Mesh Color-Per-Vertex Methods topic.

Fixed .scale property description of Wind : SpacewarpObject object. Added note about proper access of the object-level property which collides with the node-level .scale property.

Added missing .mapCoords and/or .smooth properties documentation to C_Ext : GeometryClass , ChamferBox : GeometryClass , Gengon : GeometryClass , L_Ext : GeometryClass , OilTank : GeometryClass

Rewrote the documentation and replaced/added examples in the Selection Filters and Display Filters and Class Id Filters topics.

Fixed the description of the .object property of the Pickbutton UI control. It was originally documented as read-only, but it can be set.

Added missing documentation for .fuse and .selectByID methods in the splineOps structure.

Added a note to the Interface: INodeGIProperties regarding Radiosity not processing hidden objects even when not excluded from GI.

Added an example of the optional keyword filename in Standard Open and Save File Dialogs .

Fixed wrong name of .character property in CharacterAssembly .

Fixed a bug in the FAQ example How do I Sort a MultiMaterial By Material ID?

Changed the reference to the "Animate" button to "Auto Key" in the topic animate and added a historical note for new users to explain the reasons for the current naming.

Added a note to the topic ActiveX Controls in MAXScript Rollouts about the changed behavior of URLs in ActiveX controls introduced by Microsoft. All URLs should start with "http://"

Added a new topic Customizing MacroScript Buttons describing the right-click menu and options for editing MacroScript Buttons.

Fixed broken example in CurveControl topic and enhanced the explanations of some Properties and Methods.

Added documentation of optional second argument of get and set handlers of tab type parameters in scripted plugins . Also fixed minor errors in the documentation of types.

The optional on getDisplayMesh handler in scripted Camera Plug-ins was available since 3ds Max 5 but was not documented. The same handler in scripted helpers is new in 3ds Max 7.

Removed From The Reference

Removed obsolete Notes describing missing MAXScript access from multiple classes where these properties have been exposed in later 3ds Max versions.

Removed orphaned references to #draft renderer which was retired in 3dsmax 6.

Removed the ConvertToPatch topic which contained the same information as the Turn_To_Patch topic (ConvertToPatch is an alias of Turn_To_Patch).

See also

What was New in MAXScript in 3ds Max 7

MAXScript Language Improvements in 3ds Max 7

Documentation Updates after the 3ds Max 7 Release

Documentation Changes in 3ds Max 6

Documentation Changes in Particle Flow Update


Documentation Updates after 3ds Max 7 Release

Documentation Updates after the 3ds Max 7 Release

The following changes have been made to the MAXScript Online Reference in updates after the official release of 3ds Max 7:

New Topics:

Added new topic documenting the properties, methods, events and usage of the TabStrip ActiveX Controls used to create tabs for switching UI pages.

Added new topic (shared with the SDK documentation) describing the general differences between plug-in development using MAXScript and the SDK .

Previously Undocumented Features:

Added missing documentation for the filterAnim event handler in the Scripted TrackViewUtility Plug-ins topic. The feature has been available since 3ds Max 5.

The new 3ds Max 7 method getCurrentException() was documented but not included in the MAXScript Language Improvements in 3ds Max 7 topic or the Index keywords list. Now it is.

Documentation Fixes

Fixed the documentation of setFilter() and clearFilter() methods in the Interface: trackviews topic. setFilter() was missing the TrackviewName parameter, clearFilters() is now pointing at the list of possible flag names.

Fixed the documentation of the units structure in the 3ds Max System Globals - U topic. The location of the System Units Setup controls changed a couple of versions ago; the possible values list of units.CustomUnits was missing.

Fixed the documentation of the meshop.defaultMapFaces method in Meshop General Mapping Methods . The previous definition listed a 3rd argument, <Integer count>, but the method requires only 2 arguments.

Updated the documentation of Interface: ParamCollectorOps and added some examples.

Fixed the description of the getVertSelection() method in the Mesh Vertex Methods topic. Previously, the documentation claimed that when no modifier is specified, the selection is taken from the base object. In fact, the selection is taken from top of the stack.

Completely rewrote the documentation of Interface: renderpresets , which contained incorrect information. Added more examples and notes.

Commented the interface methods of RayMeshGridIntersect : ReferenceTarget .

Added a note to the Editable_Mesh : GeometryClass and TriMesh : Value topic regarding a known bug and temporary workaround for creating a mesh with a tverts array of mapping coordinates.

Added a note to the Script Controllers topic regarding trying to assign a script string as construction parameter.

Added a new paragraph to the How To Make It Faster? topic regarding the execution speed of matchPattern() vs. findString().Also added a note to the String Values topic.

Fixed the description and added an example to the loadLayer() method in the Interface: BitmapLayerManager topic.

Added missing sysInfo.DesktopSize, sysInfo.DesktopBPP and sysInfo.getMAXPriority() to the System Information topic. These global variables and function were previously documented under Max System Globals - S only.

Fixed the description of some ActiveX helper functions like hitTest(), getCursorPos() and mapPoint() which were previously documented as expecting/returning values in Twips while in reality they work in Pixels.

Fixed a small typo in EditablePoly Interface GetNumFaces() function.

Fixed the documentation of collapseStack() in both Editable_Mesh : GeometryClass and TriMesh : Value and Node Common Properties, Operators, and Methods . The previous description was written for 3ds Max 2 when the result of the collapsed stack was typically an Editable Mesh. The result could be actually Editable Patch, Editable Poly, Editable Spline etc. and is based on the class evaluated on top of the stack. The example code in the Editable_Mesh topic also needed a fix - it listed NormalModifier() as a possible modifier to turn an object to Editable_Mesh, but since 3ds Max 5 it would collapse to Editable_Poly instead of Editable_Mesh if the result on top of the stack were of class PolyMeshObject.

Added a note that the viewport drawing methods gw.hTriStrip and gw.wTriStrip are currently broken.

Removed the obsolete note about edited normals not being supported by the renderer from the Edit_Normals : Modifier topic.

Formatting

Changed the Dark Blue headers background color to Dark Teal. The default Windows color of search highlights was almost invisible in header areas.

Fixed black on Dark Blue divider text in some topics.

Fixed spacing in Index keywords of newly added Interfaces, for example "Interface ParamCollectorOps" should be "Interface ParamCollectorOps".

Added inverse Index keywords to dozens of recently added Interfaces. For example, in addition to "Interface ParamCollectorOps", you can now alternatively use the keyword "ParamCollectorOps Interface" to find the same topic.

Continued the ongoing reformatting and color coding of the complete Reference by placing some properties of Interfaces and ActiveX controls on a blue background as was already done for methods and event handlers.

See also

What was New in MAXScript in 3ds Max 7

MAXScript Language Improvements in 3ds Max 7

Documentation Changes in 3ds Max 7


What_s_New_in_Autodesk_VIZ_2005

What was New in Autodesk VIZ 2005

Autodesk VIZ 2005 provides access to most of the new classes and interfaces introduced by 3ds Max 5 and 3ds Max 6. As with earlier releases of Autodesk VIZ, new classes and interfaces related to bones, skinning, particle systems, and space warps are not available.

New Primitives

Autodesk VIZ 2005 includes MAXScript access to the following primitive classes:

Teapot

Torus Knot

C-Ext

L-Ext

Hose

Ringwave

New Interfaces and Classes

FileLinkMgr provides an interface to the File Link Manager.

Renderable_Spline : Modifier A new Renderable Spline Modifier which can turn a spline into renderable mesh procedurally.

See also

What was New in MAXScript in 3ds Max 6

What was New in MAXScript in 3ds Max 5


What was New in MAXScript in 3ds Max 6

The following pages will give you a quick overview of the MAXScript language changes and improvements in 3ds Max 6. For details on each feature, please follow the links to the respective documentation pages.

See also

MAXScript Language Improvements in 3ds Max 6

Documentation Changes in 3ds Max 6

MAXScript Documentation Changes in 3ds Max 5.1.1 (Particle Flow Update)

New Classes In 3ds Max 6

Nodes

Align Pivot and Reset Transform Methods

New methods were added to provide access to the ResetXForm Utility functionality and to the Hierarchy Tab Pivot alignment and transformation resetting functions.

HideByCategory Properties and Methods

The hideByCategory structure provides properties and methods to control the Hide By Category checkboxes found in the Display panel.

General Node Properties

New properties .isNodeHidden, .isHiddenInVpt and .isNodeFrozen added for enhanced access to the Hidden and Frozen state of nodes.

Interface : INode

New .vertexColorMapChannel property exposed by INode Interface, new enum value #map_channel in .vertexColorType

Display Panel: Wireframe and Shaded Colors

New displayColor.wireframe and displayColor.shaded read/write variables. Valid values are #object and #material. These variables correspond to the Wireframe and Shaded radio buttons in the Display panel, Display Color rollout

Shapes

Arc : Shape , Donut : Shape , Ellipse : Shape , Helix : Shape , NGon : Shape , Rectangle : Shape , Section : Shape , Text : Shape

.sides property value class changed from Float to Integer in all the above classes.

Editable Spline Modify Panel Command Modes and Operations

startCopyTangent(), startPasteTangent() methods added to splineOps structure.

PolymorphicGeomshape : shape

New PolymorphicGeomshape Shape added.

StPathClass : shape

New StPathClass Shape added.

Spline Shape Common Properties, Operators, and Methods

applyOffset() and measureOffset() methods previously available in Autodesk VIZ added.

Geometry

Editable_Poly Properties

Added new .isolineDisplay property to control the Isoline Display.

BlobMesh : GeometyClass

New compound object class whose instances can turn any geometry or Particle Flow particle system into a Metaball system.

patchOps

New methods added to the patchOps structure: .growSelection, .shrinkSelection, .selectEdgeRing, .selectEdgeLoop, .patchSmooth, .toggleShadedFaces

PolymorphicGeom : GeometryClass

New PolymorphicGeom class added.

AEC Objects and Autodesk VIZ Features

Geometry - Doors and Windows

All Doors and Windows AEC Objects have been made available again in 3ds Max 6. These include Awning , BiFold , Casement , Fixed , Pivot , Pivoted , Projected , SlidingDoor and SlidingWindow .

Geometry - Stairs

All Stairs AEC Objects are now available in 3ds Max 6.

These include L_Type_Stair , Spiral_Stair , Straight_Stair and U_Type_Stair : GeometryClass .

Geometry - AEC Extended Objects

All Extended AEC Objects are now available in 3ds Max 6. These include Foliage , Railing and Wall .

Luminaire : Helper

The Luminaire Helper class was introduced in Autodesk VIZ4 and is now available in 3ds Max 6.

ShineExp : UtilityPlugin

The ShineExp plugin and the related ShineExport Interface were introduced in Autodesk VIZ4 and are now available in 3ds Max 6.

DWG Import - Related Classes

A number of internal classes have been added. There is no MAXScript access to their properties or methods though.

ADT_Category : ReferenceTarget

This class provides access to the Category of Architectural Desktop objects Imported into 3ds Max

ADT_Style : ReferenceTarget

This class provides access to the Category of Architectural Desktop objects Imported into 3ds Max

Modifiers

Shell : Modifier

New Shell Modifier gives geometry objects thickness by extruding the surface by amount or using a control spline.

CamPerspCorrect : Modifier

New camera modifier for perspective correction, previously available in Autodesk VIZ.

Edit_Normals : Modifier

Several new methods added, existing methods enhanced. Modifier supports TriMeshes now.

MapScaler : modifier

Object-space version of the MapScaler. The original MapScaler WSM has been renamed to MapScalerSpacewarpModifier .

Unwrap_UVW : Modifier

New Unwrap3 interface providing access to AutoBackground and Relax functionality added to the Unwrap_UVW modifier.

New Skin Properties in 3ds Max 6

New properties added to the Skin modifier: .mirrorPlane, .mirrorOffset, .mirrorUseInitialTM, .mirrorEnabled, .mirrorThreshold, .mirrorProjection, .manualUpdate, .mirrorFast, .ignoreBoneScale, .rightJustifyBoneText

Skin Modifier

New Skin Mirror-related methods skinOps.pasteAllBones and skinOps.pasteAllVerts added to the SkinOps structure.

Interface: SkinUtils

New SkinUtils interface provides additional methods for controlling the Skin Modifier.

VertexPaint : Modifier

The original VertexPaint Class from older 3ds Max versions has been renamed to OldVertexPaint in 3ds Max 6. The new implementation has exactly the same class name but a different classID and completely replaces the old one.

UVW_Xform : Modifier

New properties added to the modifier: .Map_Channel, .Rotation_Angle, .Rotation_Center

Select_By_Channel : modifier

New Select_By_Channel modifier added.

UVW_Mapping_Add : modifier

New UVW_Mapping_Add modifier added.

UVW_Mapping_Clear : modifier

New UVW_Mapping_Clear modifier added.

UVW_Mapping_Paste : modifier

New UVW_Mapping_Paste modifier added.

Linked_XForm : Modifier

New property added to the modifier: .backTransform

Modifier Common Properties, Operators, and Methods

New property added to all modifiers: .enabledInRenders

Lights and Shadows

Adv__Ray_traced : Shadow

New .noAreaShadows property added to Adv. Ray Traced shadows generator.

Skylight : Light

New .rays_per_sample, .ray_bias and .castShadows properties explosed by Slylight. Removed the obsolete .rayengine property.

IES_Sky : Light

New .rays_per_sample, .ray_bias and .castShadows properties explosed by Slylight. Removed the obsolete .rayengine property.

IES_Sun : Light

Removed the following properties: .EmitterCausticPhotons, .EmitterDecay, .EmitterEnable, .EmitterEnergy, .EmitterGlobalIllumPhotons

Helpers

Substitute_Object : helper

New Substitute_Object Helper added.

Controllers and Trackview

Point4Controller : MAXWrapper

New point4Controller superClass added to 3ds Max. A number of Point4 controllers deriving from this superClass have been implemented. They support an alpha value and are used by DirectX and mental ray shaders.

'This' Local Variable in Scripted Controllers

The this local variable in scripted controllers will contain a MAXWrapper value wrapping the scripted controller.

Interface: trackviews

New #positionW, #alpha, #curveW, #boneobjects, #keyableTracks filter options added to the existing method trackviews.current.setFilter(). Also added a list of all valid filter names for this method's description. Same additions made to the setFilter() and clearFilter() methods in the Track View structure.

Materials and Maps

Architectural : Material

New Architectural Material

Standardmaterial_interfaces

New Interface ExposureMaterialControl added to Standard Material

RaytraceMaterial_interfaces

New Interface ExposureMaterialControl added to RaytraceMaterial

InkNPaint : Material

New property .samplerUseGlobal added to InkNPaint.

DirectX_9_Shader : Material

New material providing access to DirectX 9 shader files.

Material Common Properties, Operators, and Methods

The following new methods were added: getNumSubMtls, getSubMtl, setSubMtl, getSubMtlSlotName, getNumSubTexmaps, getSubTexmap, setSubTexmap, getSubTexmapSlotName

Material/Map Renderer Compatibility Method

The method areMtlAndRendererCompatible checks the compatibility between a material or texture map and a renderer class instance. It returns true when the map/material is supported by the specified renderer, false otherwise.

BitmapTexture : TextureMap

The new property .tieTimeToMatIDs corresponds to the new "Sync Frames to Particle Age" checkbox in the "Time" rollout.

FoliagetextureMap : TextureMap

A special textureMap class used by the Foliage GeometryClass .

Vertex_Color : TextureMap

New properties added to the Vertex_Color TextureMap (originally it had none): .map and .subid

MatEditor - Open and Close the Material Editor

New methods to open and close the Material Editor and check whether it is open.

Renderer

Renderers

New SystemGlobals .medit and .medit_locked added to the Renderers structure providing access to the Material Editor Renderer and the "Lock To Current Renderer" checkbutton in the Assign Renderer rollout of the Render Scene dialog. The .draft property has been removed.

New .supportsTextureBaking read-only boolean property added to all RendererClass classes.

New #mask channel name corresponding to the Sub-Pixel Mask channel in the RPF File Format added to the possible bitmap channels in the render method , Bitmap Values and Scripted RenderEffect Plug-ins

Default_Scanline_Renderer : RendererClass

New Global Super-Sampler related properties .globalSamplerEnabled, .globalSamplerClassByName, .globalSamplerSampleMaps, .globalSamplerQuality, .globalSamplerAdaptive, .globalSamplerAdaptiveThresh exposed by the props interface.

Atmospheric Effects Common Properties, Operators, and Methods

New behavior: Calling editAtmosphere() or editAtmospheric() without an argument will open the Environment tab in the Environment and Effects tabbed dialog.

Render Effects Common Properties, Operators, and Methods

New behavior: Calling editEffect()without an argument will open the Effects tab in the new Environment and Effects tabbed dialog.

Controlling the Renderer

New parameter: rendSimplifyAreaLights lets the renderer simplify area lights by rendering them as point lights when appropriate.

New parameter: quiet plus related flags.

3ds Max System Globals

New system global: rendSimplifyAreaLights lets the renderer simplify area lights by rendering them as point lights when appropriate.

envEffectsDialog - Open and Close the Environment and Effects dialog

New methods to open and close the Environment and Effects dialog and check whether it is open.

TabbedDialogs - Controlling Tabbed Dialogs

New methods to control all Tabbed dialogs in 3ds Max including the Render dialog, Environment and Effects, Configure Paths, Object Properties etc.

Bitmap IO

RLA : BitmapIO

New BitmapIO Interface provides access to the options of the RLA file format.

RPF : BitmapIO

New BitmapIO Interface provides access to the options of the RPF file format.

mental ray

Mental_Ray_Renderer : RendererClass

Represents the mental ray Renderer.

Interface: mental_ray_Preferences

This Interface lets you enable and disable the mental ray Extensions..

MAXScript Extensions for mental ray

This chapter lists some currently unsupported mental ray-related classes accessible through MAXScript.

Radiosity

Radiosity : RadiosityEffect

New methods added to the srrOps Interface: GetPointIlluminance, GetPointLuminance, GetPointReflectance, GetPointTransmittance. These methods let you script your own Lighting Analysis utilities.

Radiosity : RadiosityEffect

New Interface : srrRadiosityMesh provides access to the Radiosity Mesh and allows MAXScript access to the radiosity solution.

Interface: RadiosityPreferences

New property .updateDataWhenRequiredOnStart added, old property .displayWarningOnGIPropsChange removed.

Fix_Ambient : UtilityPlugin

New Utility for fixing the Ambient color for Radiosity processing by enabling the Ambient-Diffuse lock.

Vertex Colors

Interface: AssignVertexColors

This new Interface lets you assign vertex colors to a specified node, optionally specifying an existing VertexPaint modifier

Render Elements and Bake Elements

AlphaMap : BakeElement

New .targetMapSlotName property added to all Bake Elements.

diffuseRenderElement - superclass: MAXObject

New .lightingOn property added.

Lighting : RenderElement

New Lighting RenderElement added.

Illumination_Render_Element : RenderElement

New Illumination RenderElement added.

MatteRenderElement : RenderElement

New Matte RenderElement added.

Lumination_Render_Element : RenderElement

New Lumination RenderElement added.

Utility Plug-ins

Channel_Info : UtilityPlugin

New UtilityPlugin provides Map Channel Info. No properties exposed.

Clean_MultiMaterial : UtilityPlugin

Cleans unused sub-materials in scene Multi-Materials.

Fix_Ambient : UtilityPlugin

Fix Ambient Color values in materials by locking them to the Diffuse Color for use in Radiosity calculations.

Instance_Duplicate_Maps : UtilityPlugin

Finds all duplicate materials Bitmaps and makes them instances instead of copies

Material_XML_Exporter: UtilityPlugin

A utility to export materials to XML format.

Panorama_Exporter: UtilityPlugin

A utility to export and view 360 degrees panoramas of 3ds Max scenes.

ShineExp : UtilityPlugin

Renders the active viewport to a TIFF file which includes luminance and illuminance data that can be used for lighting analysis.

SkinUtilities : UtilityPlugin

New Utility to extract Skin data to Mesh and import Skin Data from Mesh. No MAXscript properties or methods exposed.

Particle Flow

Shape_Mark : Helper

New properties .Surface_Offset_Variation and .Vertex_Noise added to the Shape_Mark helper.

Position_Icon : Helper

New property .Subframe_Sampling added to the Position_Icon helper.

rotation : Helper

New properties .Restrict_Divergence_To_Axis, .Divergence_Axis_X, .Divergence_Axis_Y, .Divergence_Axis_Z added to the Rotation helper.

reactor

MAXScript Extensions for reactor

All reactor Helpers, Spacewarps and Modifiers have been fully exposed to MAXScript.

Interface: reactorInterface

This Interface provides properties and methods to access the reactor Utility's settings and simulation data including collision information.

Interfaces

Interface: InstanceMgr

This new interface controls the new material propagation to instances and provides methods to collect instanced nodes and make nodes, modifiers and controllers unique.

Interface: blockMgr

New blockMgr Interface added.

Interface: styleMgr

New styleMgr Interface added.

Interface: ChannelInfo

This new interface gives access to the new Map Channel Info dialog and provides methods for managing the Map Channels of selected objects.

Interface: quadMenuSettings

A number of methods have been changed to use RGB colors instead of RGBA.

Interface: XMLMaterial

Provides means to export a material to XML format.

Interface: radiosityMeshOps

This Interface provides access to the internal radiosity mesh generated by the Radiosity Advanced Lighting effect

Interface: SkinUtils

This Interface provides access to some new Skin-related methods related to skin data import and export and bone binding transformation matrices.

Interface: mental_ray_Preferences

The mental_ray_Preferences Interface lets you enable and disable the mental ray Extensions.

Interface: renderpresets

The renderpresets Interface provides access to the new render presets system

Interface: globalDXDisplayManager

The globalDXDisplayManager Interface controls how DirectX shaders are being drawn in the viewports.

Interface: MtlBrowserFilter_Manager

Internal use, no properties or methods exposed.

Interface: SubstManager

Internal use, no properties or methods exposed.

Interface: FlowRaytraceInterface

Internal use, no properties or methods exposed.

Layers

Interface: LayerProperties

New .nodes() method added to the LayerProperties Interface, returns an array containing all nodes on the layer.

New layerAsRefTarg property returns the layer as ReferenceTarget.

Schematic View

Interface: SchematicViews

The SchematicViews Core Interface provides access to the updated Schematic Views system in 3ds Max 6.

Interface: SchematicView

This SchematicView MixinInterface provides access to the properties and methods of a single Schematic View.

Schematic View Callbacks

New Schematic View-related callbacks have been added to the General Event Callback Mechanism: #svSelectionSetChanged, #svDoubleClickGraphNode, #svPreLayoutChange, #svPostLayoutChange

MaxOps Interface Additions

Interface: maxOps

New #vizR enum value added to the .productAppId property.

New .autoGrid property enables/disables AutoGrid mode.

New #all and #other enum values added to .setKeyFilters.

New method startNewShape() pressed the Start New Shape button, new .startNewShapeLock property enables/disables "Start New Shape" mode.

New .inProgressiveMode read-only property, new method beginProgressiveMode() enables Progressive mode, new method endProgressiveMode() disables Progressive mode.

User Interface Items, Rollouts and Dialogs

Colorpicker

New parameter alpha:<boolean> added to the colorpicker UI item. When set to true, the color picker will open with alpha support.

CreateDialog

New optional lockHeight and lockWidth keywords added to CreateDialog. When set to true, the height resp. width of the dialog cannot be interactively changed

Utility and Rollout Properties, Methods, and Event Handlers

New .placement property valid for rollouts and rollout floaters gets/sets whether the dialog is minimized, maximized, or normal.

Scripted Plug-ins

Scripted Plug-ins

The new optional autoPromoteDelegateProps: parameter gives control over whether the delegate’s properties are automatically searched if a property access is performed on the plug-in, but the property is not defined by the plug-in.

Scripted Plug-in Event Handlers

New event handlers added: postCreate and postLoad.

Loading Scripted Plug-in Local Variable

The new .loading local variable in Scripted Plug-ins will return true while the plug-in instance is in the process of being loaded.

Rollouts and related Event Handlers

New optional keyword argument added to rollout definitions of scripted plug-ins that extend an existing class: usePBValidity.

classID

The Super Class ID and the Class ID

New optional keyword argument added to genClassID to allow a return value rather than printing to the Listener: returnValue.

Callbacks

General Event Callback Mechanism

Over 50 new callback events have been added to the system. The callbacks documentation has been reworked to list both callback names and notificationParam() return values together.

Watch for the NEW in 3ds Max 6 symbol!

External Files Access and System Information

3ds Max File Loading and Saving

New optional keywords added to mergeMAXFile: [ #promptMtlDups | #useMergedMtlDups | #useSceneMtlDups | #renameMtlDups ], [ #promptReparent | #alwaysReparent | #neverReparent ]

Two new optional parameters added to saveMAXFile: clearNeedSaveFlag and useNewFile.

System Information

New method added to the sysInfo structure: .getLanguage returns a 3 element array describing the current system language.

logsystem_Struct

New method added to the logsystem structure:.logEntry outputs a user-defined string to the Log File.

Accessing INI File Keys

The getIniSetting method has been enhanced. If only the .ini file is specified, the method will return an array of the sections in the .ini file. If only the .ini file and section are specified, the method will return an array of the keys in the section.

The new delIniSetting method will delete a specified key from the supplied section of the given INI file, or a complete section with all keys when only filename and section are supplied.

External File Methods

Accessing INI File Keys

The new getMAXIniFile() method returns the current 3dsmax.ini file as a string.

3ds Max System Directories

New #defaults value returns the market specific defaults directory.

SessionPaths Struct

Session paths are identical to bitmap/photometric paths and xref paths, except they are never saved when 3ds Max exits. A possible use for session paths is to create a project management system.

Command Line

Command Line Rendering

Provides access to the renderer from the command line, including pre-render scripts via MAXScript.

Command Line Option: -mxs

This new command line option allows the execution of MAXScript commands from the command line.

Command Line Option: -silent

This new command line option suppresses dialogs participating in the new Default Actions system.

Mouse Tools

Mouse Tool Clauses

New behavior: While running a mouse tool, if you click in a viewport where the construction plane is on edge, the tool will exit with a return value of #abort

Ray Mesh Intersection

RayMeshGridIntersect : ReferenceTarget

Provides advanced ray-to-mesh intersection methods.

Text Values

Stricmp String Comparison Method

This new method performs a lower-case comparison of two strings and returns an integer value.

Internet

Internet Methods

This new structure provides a .CheckConnection method used to check whether a connection to a specified URL can be established.

See also

MAXScript Language Improvements in 3ds Max 6

Documentation Changes in 3ds Max 6

MAXScript Documentation Changes in 3ds Max 5.1.1 (Particle Flow Update)

New Classes In 3ds Max 6


MAXScript Language Improvements in 3ds Max 6

Garbage Collector Improvements

Manual Garbage Collection

This change to MAXScript extends the light:true parameter behavior introduced in 3ds Max 5 to automatic garbage collection.

Structure Scope Set When Initializing

Structure Scope While Initializing

When initializing a structure, the scope will now be set to the structure's context. Note that this effectively lets you run a function within the structure when an instance of the structure is created!

Return Values and Exiting Loops

You can now call return() in macroScripts whose body is a single expression (i.e, old style macroScripts that don't use 'on execute do ...') to exit the macroScript.

For Loop

A new optional while <expr> test has been added to the for loop. The for loop will terminate if the test expression evaluates to false.

Loop Exit

Exiting a for ... do loop using a with <expr> returns the expression value as the result of the loop. In releases prior 3ds Max 6, OK was returned.

ArrayParameter values coerced to Array.

ArrayParameter Values

ArrayParameter values can now be coerced to Array.

For Example:

mtl = standard()

mapsArray = mtl.maps as array

modPanel.ValidModifier Improvements

Modify Panel

The modPanel.validModifier method has been changed to return false if either the node/node collection or modifier/modifier class is 'undefined', or the node collection is empty.

Hide, Unhide, Freeze and Unfreeze Performance Improvements

Node Common Methods - Viewport State

The way the mappable methods hide, unhide, freeze and unfreeze are called when passed a node collection has been changed so that there is a single internal call passing a node array, rather than individual calls passing one node at a time.

The speed of these methods will be significantly higher than in older versions.

ActiveX

Setting Focus on User Interface Controls

The setFocus <rollout_ui_item> function can now be used with ActiveXControl UI items.

See also

What was New in MAXScript in 3ds Max 6

Documentation Changes in 3ds Max 6

MAXScript Documentation Changes in 3ds Max 5.1.1 (Particle Flow Update)

New Classes In 3ds Max 6


Documentation Changes in 3ds Max 6

The following changes have been made to the MAXScript Online Documentation since version 5.1.1 (Particle Flow Extension).

· All new classes, interfaces, properties and methods are now correctly marked with the [image] symbol in addition to the note NEW in 3ds Max 6.

· The Table Of Contents has been reorganized to provide a more logical structure and improved navigation.

New Sections

· Added a new section MAXScript Extensions for reactor . It lists all classes and interfaces related to the reactor Dynamics system.

· Added a new section MAXScript Extensions for mental ray . It lists some classes and interfaces related to the mental ray renderer.

· Added a new chapter Locating Information in this Help File containing several Topic Index pages to help you find relevant information related to typical scripting tasks:

Learning MAXScript - Topics Index

Creating MAXScript Tools - Topics Index

Developing MacroScripts - Topics Index

External File Access - Topics Index

Editable Mesh - Topics Index

Editable Poly - Topics Index

Applying Modifiers - Topics Index

Rendering - Topics Index

Developing Scripted Plug-ins - Topics Index

· Renamed the chapter "MAXScript Questions and Answers" to Frequently Asked Questions and reorganized it for easier topic navigation. Added more FAQ entries (see below).

Additional Examples and Information

· Added new examples to the MAXScript FAQ based on user requests:

How do I calculate the Volume of an Object?

How do I create a line between two points?

How do I change the text in a Text Shape dynamically?

How do I Get the Local Rotation of a Face?

How do I Sort a MultiMaterial By Material ID?

How do I Split a Mesh by UV Elements?

· Added new and extended existing topics in the MAXScript FAQ based on user requests:

What is Scope of variables?

Why does Execute return 'undefined' when accessing a loop variable?

When do I use If...Then and when If...Do ?

When do I use () after a function?

What is the difference between 'undefined' and 'unsupplied' values?

What is the difference between '=' and '==' operators?

What is the differences between Arrays and BitArrays?

How do I create a multi-dimensional array?

How do I change a property in multiple objects at once?

How do I change the Shadow type of a Light?

· Added more information related to vector dot and cross products in the Point3 Values topic.

· Added new example showing ways to control SplineShape sub-object selection passing up the stack. The example connects two objects with a dynamic spline similar to a rope.

· Added new example to EditablePoly Properties topic - split polygons to elements .

· Added a set of Editable Mesh Selection Converter MacroScripts as examples to the respective Editable Mesh topics. See Editable Mesh Selection Converters

· Added comments to the GroupBox description to avoid confusion with Group .

· Added a note and an example regarding resetting local variables when a rollout or utility is opened to Accessing Locals and Other Items in a Rollout from External Code

· Added two new sample functions as possible replacement for saveMaxFile and saveNodes. The new functions check for existing files and prompt the user about overwriting.

Changes to existing topics

· Split the large topic Editable_Mesh : GeometryClass and TriMesh : Value into multiple topics. Added many new examples.

· Split the large topic Editable_Poly: GeometryClass into multiple topics for easier navigation.

· Consolidated the callback event names and callbacks.notificationParam() return values into a single list for consistency and easier navigation.

· Made slight changes to the Learning MAXScript topics - updated descriptions of MAXScript access to reflect the changes since 3ds Max 2.0, added more links and useful information to the tutorials.

· Revisited some "How To" tutorials , added more explanations and ideas for further development. Additional illustrations were added in the 5.1.1 revision.

Previously Undocumented Topics and minor fixes

· Documented an existing but previously undocumented channels parameter/property of the Bitmap Value . The property has been available since 3ds Max 3, the parameter since 3ds Max 4.

· Documented an existing (since 3ds Max 4) but previously undocumented setFocus method for setting focus on User Interface Controls.

· Fixed description of on <spinner> entered handler in Spinner topic - also called when spinner is released.

· Added description of initialRollupState optional keyword in Scripted Custom Attributes and Scripted Plugins .

· Added description of .creatable and .ispb2based read-only boolean properties of maxclass.

· Added previously undocumented list of filter names to the description of the setFilter() method in Interface: trackviews

Note:

For documentation changes from version 5.1 to version 5.1.1 (which shipped to subscription members with the Particle Flow Extension), please see MAXScript Documentation Changes in 3ds Max 5.1.1

See also

What was New in MAXScript in 3ds Max 6

MAXScript Language Improvements in 3ds Max 6

MAXScript Documentation Changes in 3ds Max 5.1.1 (Particle Flow Update)

New Classes In 3ds Max 6


New Classes In 3ds Max 6

ADT_Category: ReferenceTarget

ADT_Object_Manager: ReferenceTarget

ADT_Object_Manager_Wrapper: FloatController

ADT_Style: ReferenceTarget

ADT_StyleComposite: ReferenceTarget

ADT_SyleLeaf: ReferenceTarget

ADTCategory: ReferenceTarget

ADTObjMgrWrapper: FloatController

AdtObjTranslator: ReferenceMaker

ADTStyle: ReferenceTarget

ADTStyleComp: ReferenceTarget

AlwaysEqualKey: ReferenceMaker

Architectural: material

ArchitecturalMaterial: material

Awning: GeometryClass

bezier_point4: Point4Controller

bezier_rgba: Point4Controller

BiFold: GeometryClass

BlobMesh: GeometryClass

Block_Manager_Wrapper: FloatController

BlockDefinition: ReferenceMaker

BlockInsert: ReferenceMaker

BlockInstancedGroupsFilter: ReferenceMaker

BlockInstanceFilter: ReferenceMaker

BlockMgrWrapper: FloatController

BoolPacket: ReferenceMaker

CamPerspCorrect: modifier

Casement: GeometryClass

Channel_Info: UtilityPlugin

Clean_MultiMaterial: UtilityPlugin

Color_RGBA: Point4Controller

Contour_Translator: ReferenceMaker

DirectX_9_Shader: material

DoublePacket: ReferenceMaker

DwgAlwaysEqualFilter: ReferenceMaker

DwgCameraPacket: ReferenceMaker

DwgColorFilter: ReferenceMaker

DwgEnhancedLayerFilter: ReferenceMaker

DwgEnhLayerPacket: ReferenceMaker

DwgEntityPacket: ReferenceMaker

DwgExtrusionFilter: ReferenceMaker

DwgFactory: ReferenceMaker

DwgFilterList: ReferenceMaker

DwgGridPacket: ReferenceMaker

DwgHandleFilter: ReferenceMaker

DwgLayerFilter: ReferenceMaker

DwgLayerTable: ReferenceTarget

DwgLightPacket: ReferenceMaker

DwgPluginTranslatorForwardingFilter: ReferenceMaker

DwgPointTrans: ReferenceMaker

DwgTableEntryPacket: ReferenceMaker

DwgTableRecord: ReferenceMaker

DxMaterial: material

File_Link_Manager: UtilityPlugin

FileLink_DwgLayerTable: ReferenceTarget

FileLink_LinkTable: FloatController

FileLink_VzMaterialTable: ReferenceTarget

Fix_Ambient: UtilityPlugin

FixAmbient: UtilityPlugin

Fixed: GeometryClass

FloatPacket: ReferenceMaker

Foliage: GeometryClass

FoliagetextureMap: textureMap

HDRI: BitmapIO

Illumination_Render_Element: RenderElement

Instance_Duplicate_Maps: UtilityPlugin

Instance_Manager_Wrapper: FloatController

InstanceDuplMap: UtilityPlugin

InstanceMgrWrapper: FloatController

Int64Packet: ReferenceMaker

IntPacket: ReferenceMaker

L_Type_Stair : GeometryClass

Layer_Manager: MAXWrapper

Lighting: RenderElement

LightingRenderElement: RenderElement

Link_Transform: Matrix3Controller

LinkBlockInstance: GeometryClass

LinkBlockInstanceshape: shape

LinkComposite: GeometryClass

LinkCompositeshape: shape

LinkLeaf: GeometryClass

LinkLeafshape: shape

LinkOriginPtHelper: helper

Lumination_Render_Element: RenderElement

MapChannelAdd: modifier

MapChannelDelete: modifier

MapChannelPaste: modifier

MapScaler: modifier

MapScalerOSM: modifier

MapScalerSpacewarpModifier: SpacewarpModifier

Material_XML_Exporter: UtilityPlugin

MatteRenderElement: RenderElement

Mb_select: GlobalUtilityPlugin

mental_ray: material

mental_ray__Area_Light_custom_attribute: CustAttrib

mental_ray__Indirect_Illumination_custom_attribute: CustAttrib

mental_ray__light_shader_custom_attribute: CustAttrib

mental_ray__material_custom_attribute: CustAttrib

mental_ray_Renderer: RendererClass

mental_ray_Shadow_Map: Shadow

MetalShader: Shader

miAreaLight: light

miAreaLightomni: light

Point4Controller

MMClean: UtilityPlugin

mrAreaLightCustAttrib: CustAttrib

mrIICustAttrib: CustAttrib

mrLightShaderCustAttrib: CustAttrib

mrMaterial: material

mrMaterialCustAttrib: CustAttrib

mrMaterialCustAttrib_Manager: GlobalUtilityPlugin

mrObjectCustAttrib_Manager: GlobalUtilityPlugin

mrOptions: ReferenceTarget

mrPBParameter: ReferenceTarget

mrShadowMap: Shadow

NullFilter: ReferenceMaker

OldVertexPaint: modifier

PaintboxStartup: GlobalUtilityPlugin

PaintLayerMod: modifier

Panorama_Exporter: UtilityPlugin

Paste_Skin_Weights: modifier

PasteSkinWeights: modifier

PF_NotifyDep_Catcher: ReferenceTarget

PFNotifyDepCatcher: ReferenceTarget

pivot: GeometryClass

Pivoted: GeometryClass

point4_list: Point4Controller

point4_script: Point4Controller

Point4_Wire: Point4Controller

Point4_XYZW: Point4Controller

Point4Controller: MAXWrapper

Point4List: Point4Controller

PointPacket: ReferenceMaker

PolymorphicGeom: GeometryClass

PolymorphicGeomshape: shape

projected: GeometryClass

Railing: GeometryClass

Raster_Image_Packet: ReferenceMaker

Raster_Image_Translator: ReferenceMaker

RayMeshGridIntersect: ReferenceTarget

Select_By_Channel: modifier

SelectByChannel: modifier

Shell: modifier

ShineExp: UtilityPlugin

SkinTools: UtilityPlugin

SkinUtilities: UtilityPlugin

SortKey: ReferenceTarget

Spiral_Stair: GeometryClass

StPathClass: shape

Straight_Stair: GeometryClass

StringPacket: ReferenceMaker

Substituion_Offset_Transform: Matrix3Controller

Substitute: modifier

Substitute_Manager: UtilityPlugin

Substitute_Object: helper

SubstituteMod: modifier

SubstituteObject: helper

tcb_point4: Point4Controller

tiles: textureMap

TreeViewUtil: UtilityPlugin

U_Type_Stair : GeometryClass

UVW_Mapping_Add: modifier

UVW_Mapping_Clear: modifier

UVW_Mapping_Paste: modifier

Vertex_Paint_Startup_GUP: GlobalUtilityPlugin

VertexColor: textureMap

VzMaterialTable: ReferenceTarget

VzObjectTable: ReferenceMaker

VzObjectTableRecord: ReferenceMaker

Wall: GeometryClass

Waves: textureMap

WirePoint4: Point4Controller

XmlMtlExporter: UtilityPlugin

See also

What was New in MAXScript in 3ds Max 6

MAXScript Language Improvements in 3ds Max 6

Documentation Changes in 3ds Max 6

MAXScript Documentation Changes in 3ds Max 5.1.1 (Particle Flow Update)


What was New in MAXScript in 3ds Max 5

The following pages will give you a quick overview of the MAXScript language changes and improvements in 3ds Max 5. For details on each feature, please follow the links to the respective documentation pages.

Modifiers

Edit_Normals

Edit_Normals modifier provides control over face and vertex normals for realtime display.

HSDS_Modifier

Support for the new features of the modifier has been added.

Morpher_Modifier

Access to the Morpher Modifier channels has been added.

MultiRes_Modifier

The MultiRes modifier MAXScript access has been updated in 3ds Max 5.

Skin Modifier

New properties have been added to the Skin modifier class in MAXScript to provide access to the new features in 3ds Max 5 like Weight Table, BackTransform vertices etc.

Spline_IK_Control Modifier

The Spline_IK_Control adds Helpers to any spline for control over the vertex animation.

Subdivide Modifier

The new Subdivide Modifier allows for mesh refinements to enhance radiosity processing.

Symmetry Modifier

The new Symmetry modifier allows modeling on one half of an object while procedurally mirroring and welding the other half.

Unwrap_UVW Modifier

The Unwrap_UVW modifier has been greatly enhanced. A new unwrap2 Interface provides access to the new features of the Unwrap_UVW modifier.

Vertex_Weld Modifier

Vertex Weld is a procedural welding modifier.

Space Warps and WSMs

MapScaler

MapScaler has been rewritten to use PB2. Enhanced property access.

subdivideSpacewarpModifier

New Subdivide SpacewarpModifier added

Editable Poly

Editable_Poly Properties

Access to most properties of the enhanced Editable_poly has been added.

EditablePoly Interface

This interface provides access to the new Editable Poly functions.

Advanced Lights and Shadows

Free_Area Light

The Free Area light is a Photometric light simulating lighting from a larger area source with two possible types of distribution. It is aimed using transforms.

Free_Linear Light

The Free Linear light is a Photometric light simulating lighting from long sources and supporting two types of distribution. It is aimed using transforms.

Free_Point Light

The Free Point light is a Photometric light with 3 distribution types. It is aimed using transforms.

Target_Area Light

The Target Area light is a Photometric light simulating lighting from a larger area. It is aimed at its target.

Target_Linear Light

The Target Linear light is a Photometric light simulating lighting from long sources and supporting two types of distribution. It is aimed at its target.

Target_Point Light

The target Point light is a Photometric light with 3 distribution types. It is aimed at its target.

IES_Sky Light

The IES_Sky light is a Photometric light simulating outdoor skylight.

IES_Sun Light

The FreeIesSun light is a Photometric light simulating sunlight.

Daylight System

The Daylight system combines an IES_Sun and IES_Sky light to a single system controlled by a Daylight controller.

Skylight Light

The Skylight light can be used to simulate skylight illumination.

Adv__Ray_traced

The Adv__Ray_Traced Shadows generator provides enhanced raytraced shadows for complex scenes.

Area_Shadows

The Area Shadows generator generates shadows typically cast by area light sources.

A new property .twoSidedShadows has been added to all shadow generators:

ShadowMap , RaytraceShadow , Area_Shadows , Adv__Ray_traced

Advanced Lighting (Radiosity)

Radiosity RadiosityEffect

The RadiosityEffect used by Autodesk VIZ has been added to 3ds Max 5.

Light Tracer RadiosityEffect

Light Tracer is a Global Illumination RadiosityEffect solver.

Lighting Units Interface

This Core interface provides access to the Lighting Units settings.

RadiosityPreferences

New Radiosity Preferences interface provides access to the Customize>Preferences>Adv.Lighting tab settings

INodeGIProperties

New Node Interface gives access to object-specific Advanced Lighting preferences.

Materials and Shading

Advanced_Lighting_Override_Material

A material class to control the Material’s Physical Properties when used in conjunction with Advanced Lighting.

InkNPaint

Provides access to the InkNPaint Cartoon Shading material.

Lightscape_Mtl

A material class used mainly by the Lightscape importer to control the radiosity mapping of materials imported from Lightscape solutions.

Raytrace_Material additions

Some additional Raytrace Material properties have been exposed.

Shell_Material

Provides a top-level material for the Render To Texture utility with the ability to control separate materials for viewport and rendering.

Translucent_shader

A new Translucent shader has been added to the Standard Material.

Hardware Shaders

Cubemap

Reference target for rendering cubic reflection maps in the viewports using D3D hardware shading. Unsupported sample.

Lightmap

Reference target for displaying the Render To Texture lighting map in the viewports using D3D hardware shading.

Membrane_Shader

Direct3D Membrane shader for viewport display. Unsupported sample.

Metal_Bump

Reference target for rendering Metal Bump maps in the viewports using D3D hardware shading. Unsupported sample.

Renderer

Default_Scanline_Renderer

The Default_Scanline_Renderer class allows creation of a renderer class instance to be assigned as the Current, Production or Draft Renderer. A new Interface provides access to the Default Scanline Renderer settings.

getLastRenderedImage

This new function returns a bitmap value containing the last rendered image.

renderers

This new structure gives access to the current, draft and production renderers.

RendererClass.classes

Returns an array of the available renderer classes.

renderSceneDialog

This new structure gives control over the renderer dialog window like opening, closing, updating, canceling etc.

Render Scene Dialog

The scanlineRender structure has been enhanced to give access to most settings of the default scanline renderer.

SetRendApertureWidth

A new global function to set the Render Aperture Width value.

Sub-frame Rendering

The MAXScript render() method now accepts time values for the frame, fromframe and toframe parameters which allows for sub-frame rendering.

VUE_File_Renderer

The VUE_File_Renderer class allows creation of class instance to be assigned as the Current, Production or Draft Renderer.

RenderElements

Ink RenderElement

New Ink RenderElement for rendering the InkNPaint Ink component.

Paint RenderElement

New Paint RenderElement for rendering the InkNPaint Paint component.

Render To Texture - BakeElements

Bake Elements

8 Bake Elements have been added to 3ds Max 5.

BlendMap BakeElement

Allows baking of a selection of lighting components.

CompleteMap BakeElement

Allows a lit, or lit & shadowed full material to be baked.

DiffuseMap BakeElement

Allows a raw, lit, or lit & shadowed diffuse channel to be baked.

LightingMap BakeElement

Allows a light map of incoming illumination to be baked with or without shadows.

NormalsMap BakeElement

Allows a light map of incoming illumination to be baked with or without shadows.

ShadowsMap BakeElement

Allows a shadow map to be baked.

SpecularMap BakeElement

Allows a raw, lit, or lit & shadowed specular channel to be baked.

INodeBakeProperties Interface

An interface to the Texture-Baking-related node properties

Exposure Controls

Linear_Exposure_Control

The Linear Exposure Control samples the rendered image and uses the average brightness of the scene to map physical values to RGB values.

Logarithmic_Exposure_Control

Logarithmic Exposure Control uses brightness, contrast, and whether the scene is outdoors in daylight to map physical values to RGB values. Logarithmic Exposure Control is better for scenes with a very high dynamic range.

Pseudo_Color_Exposure_Control

Pseudo Color Exposure Control is a lighting analysis tool that provides an intuitive way of visualizing and evaluating the lighting levels in the scene. It maps luminance or illuminance values to pseudo colors that show the brightness of the values being converted

Lightscape Integration

Lightscape_Mtl

A material class used mainly by the Lightscape importer to control the radiosity mapping of materials imported from Lightscape solutions.

Lightscape_Materials UtilityPlugin

The Lightscape Material utility allows mass-changes of Lightscape Materials, usually of objects imported using the Lightscape Importer.

LS_Colors SpacewarpModifier

This SpaceWarp modifier is only visible when a LightscapeMesh object is selected. It provides control over Lightscape Radiosity colors imported using the Lightscape Importer.

LS_Mesh Modifier

This Modifier is only visible when a LightscapeMesh object is selected. It provides control over the meshing of objects imported using the Lightscape Importer.

Layers

LayerManager interface and LayerProperties Interface

The LayerManager Interface provides access to the Layer Manager. The LayerProperties MixinInterface gives access to a single layer’s properties.

.displayByLayer, .motionByLayer, .renderByLayer

These properties control the node’s Layer-related options.

INodeLayerProperties

Provides access to the layer-related node properties.

Assemblies

AssemblyMgr interface

The Assembly Manager Interface lets you put objects together to Assemblies, test and manipulate the Assemblies

Interface: IAssembly

IAssembly is a MixinInterface providing access to the assembly’s head and members

Character Helper

The Character helper is used as the head of Character Assemblies

CharacterAssembly Helper

The CharacterAssembly helper provides the controls, UI and icon for the Character Assembly creation.

Luminaire Helper

The Luminaire Helper is not creatable by MAXScript in 3ds Max 5, but can be accessed when loading Autodesk VIZ files.

Controllers and TrackView

Boolean_Float

New Float controller

List Controllers

New Weight and Average properties have been added to the List Controller for real layered animation capabilities including Pose To Pose interpolation.

Lookat Interface

New ILookatControl Interface has been added to the LookAt Controller.

Interface: trackviews

TrackView has been rewritten in 3ds Max 5. The Trackviews Core Interface provides new properties and two MixinInterfaces that give access to the advanced features of the Function Curve Editor and its UI.

SplineIKChain : Matrix3Controller

Not creatable by MAXScript, but the SplineIKChain properties are accessible.

Interface: TrackSelectionSets

This Core Interface provides means to create and manage track selection sets.

Bitmap I/O

TIF BitmapIO

Provides a function published interface to allow access to the TIFF file format I/O settings.

Skin Modifier Enhancements

New Skin Properties in 3ds Max 5

New properties have been added to the Skin modifier, incl. access to the Weight Table.

SkinOps Methods

The following new methods have been added to the skinOps structure:

bakeSelectedVerts, buttonWeightTable, Invalidate, isRigidHandle, isRigidVertex, isUnNormalizeVertex, loadEnvelopeAsText, paintOptionsButton, paintWeightsButton, rigidHandle, rigidVertex, SaveEnvelopesAsASCII, unNormalizeVertex

Painter Interface

PainterInterface

The Painter Interface is a general painting API which is used for example by the Skin Modifier for painting weights.

Defining Custom Paint Tools Using the Painter Interface

The Painter Interface can be used for creating custom scripted painting tools.

String Parsing and Manipulation

String Parser Methods

New string parsing methods.

MemStream and MemStreamMgr Interfaces

New interfaces for fast parsing by loading into memory.

Append String

This new method lets you append to a string in place without creating intermediate string copies in memory, thus reducing memory usage when building incremental strings, for example for dynamic rollouts.

Viewports

viewport.setCamera

This method can now be used to set the active viewport to a Light View using a free, target or direct light node.

viewport.CanSetToViewport

New method added to viewport structure - returns true for cameras and lights that can be used as a viewport camera.

gw.dualPlane

New member added to the gw structure.

getMAXWindowSize

Returns the 3ds Max window size in pixels.

cui.setAppTitle

Lets you set the title bar string of 3ds Max.

Interface: StatusPanel

This Core Interface provides control over the visibility of the status panel. Now, a Super-Expert-Mode with just viewports and main menu can be achieved through MAXScript!

Interface: tmGizmos

This Core Interface provides control over the transform gizmo.

Dockable MAXScript dialogs

cui.registerDialogBar and cui.unRegisterDialogBar

Register / Unregister a scripted dialog as a dockable dialog bar.

cui.dockDialogBar and cui.floatDialogBar

Docks / Floats a floating registered dialog bar.

cui.getDockState

Returns the docking state of a registered dialog bar.

MAXScript UI Elements and Handlers

UI Elements .visible UI_Item_Visible_Property

A new general property lets you hide and disable UI Elements.

SubRollout Class

A subclass of Rollout class, this is a UI item which you can place rollouts into.

Checkbox Tristate Property

Tristate Parameter and Property added to the checkbox UI Element

Spinner Indeterminate Parameter

Indeterminate Parameter and Property have been added to the spinner UI Element.

Radiobuttons default 0

When default parameter is set to 0, none of the radio buttons will be selected.

MacroScript "on AltExecute type do" handler

Lets you specify an alternative execution option for a MacroScript.

CreateDialog modal and escapeEnable

New optional keywords added to CreateDialog.

Max Commands Additions

New max commands

New Set Key-related commands have been added to the Max Commands.

ActiveX

loadPicture

New method returns a IPictureDisp, an MSDispatch object to be used by activeX controls accepting IPictureDisp.

updateWindow

New method lets you force a refresh of ActiveX controls.

Key Functions

appendKey

Function for appending keys to controllers added to the controller common functions.

assignKey

Functions for assigning keys to controllers added to the controller common functions.

Misc. Additions

getFileSize

Get the external file size in bytes.

GetInterfaces Interface Inspector

Returns an array of all interfaces exposed by the specified MAXWapper or MAXClass.

GetPropNames and Interfaces

The GetPropNames method now works with interfaces and returns the names of interface properties.

loadmaxfile useFileUnits option

New option has been added to control the use of the file’s units.

manipulateMode access

New global variable: manipulateMode

#manipulateModeOn and #manipulateModeOff

New manipulate mode related events added to the callback events.

okToCreate

New method added to the Create Panel methods to check whether a class is creatable in the UI.

.productAppID

New property added to existing maxOps interface to determine the application MAXScript is running in.

RolloutCreator Functions

This is a structure of scripted functions that simplifies the creation of dynamic rollouts.

#systemPreNew NotificationParam

A new #systemPreNew Notification Parameter returns the option selected in the New Scene dialog.

toolmode.coordSysNode

Reflects which node, if any, is the current reference coordinate system node

UsedMaps()

This new method returns an array of all bitmapTexture maps’ filenames.

UtilityPanel interface

Lets you open and close Utility Plug-ins in the Utilities Tab

Other New Sections in the MAXScript Online Help

MAXScript for New and Casual Users

The section gives some basic knowledge about installing and using scripts in the daily work without knowing much about programming.

How To - Tutorials

The new "How To" Tutorials provide practical MAXScript examples with detailed explanations for beginners.

Online Help Script Examples

An index pointing at some of the useful example scripts found inside the Online Help.

MAXScript Questions and Answers

An index providing task-oriented links and some general concept explanations.

See also

MAXScript Changes in 3ds Max 5.1

MAXScript Documentation Changes in 3ds Max 5.1.1 (Particle Flow Update)

Particle Flow and MAXScript


MAXScript Changes in 3ds Max 5.1

Undo System

TheHold

Exposes public SDK methods to access the Undo/Redo system at a low level.

Modify Panel

modPanel.setCurrentObject

Documenation change: Added a previously undocumented switch ui:<boolean>

modPanel.validModifier

Added new method which returns true if Modify panel is open, one or more nodes are selected, and the specified modifier is applicable to all the nodes at their current edit level in the stack.

getSelectionLevel and setSelectionLevel

New methods added for getting/setting the sub-object selection level.

<node>.baseObject

The .baseobject property of a node is now write-able.

Interface: maxOps

The new maxOps.pivotMode property lets you get / set the Affect Pivot mode buttons in the Hierarchy panel. Possible values are #none, #pivotOnly, #objectOnly, #hierarchyOnly

Interfaces

Interface: LayerManager

New method deleteLayerByName has been added to the LayerManager Core Interface.

Interface: LayerProperties

A number of new properties have been added to the LayerProperties Interface:

.renderable, .inheritVisibility, .primaryVisibility, .secondaryVisibility, .receiveshadows, .castShadows, .applyAtmospherics, .renderOccluded, .ishidden, .isfrozen, .boxmode, .backfacecull, .alledges, .vertexTicks, .showTrajectory, .xray, .ignoreExtents, .showFrozenInGray, .showVertexColors, .vertexColorsShaded, .visibility, .imageMotionBlurMultiplier, .motionBlurOn, .motionblur, .display, .INodeGIProperties

Interface: trackviews

If you supply a height and width argument to trackviews.open, it only has effect the first time the track view is opened. After that the user defined size takes effect. This makes it possible to specify a size when scripting the opening of track view, but still allow users to change the size and have the new size remembered.

Interface: tmGizmos

More TransformGizmo properties have been exposed to MAXScript: .ShowMultipleTransformGizmos, .moveGizmoRelativeSize, .rotateGizmoRelativeSize, .scaleGizmoRelativeSize, .intersectMode, .perpsectiveSensitivity, .rotationIncrement, .arcRotateSnapAngle

SetKey Filters

Interface: maxOps

New maxOps.setKeyMode, maxOps.setKeySuspend, maxOps.setKeyFilters, maxOps.setKeyNodeSets, maxOps.setKeyNodeSetCurrent properties provide access to SetKey Mode, Filters and NodeSets. New GetSetKeyFilterState, setSetKeyFilterState methods for getting and setting the SetKey filter state.

Controller Common Properties, Operators, and Methods

New setKey-related controller properties .supportsKeys, .keyable and .isHSV

Custom Attributes

Access to Custom Attributes Virtual Array

MAXScript Custom Attributes for any Max object, new Custom Attributes virtual array class and .custAttributes property.

Scripted Custom Attributes

The custAttributes methods that take an object as an argument (add, delete, count, get, makeUnique, getDef, getDefs) can now be applied to the node itself. In the past, they operated only on the base object. New optional keyword argument baseObject:<bool> has been added to these methods.

Rollouts and Dialogs

Utility and Rollout Properties, Methods, and Event Handlers

Added new .name and .title and streamlined existing properties of rollouts and rollout floaters.

PrameterBlock2

TabChanged Paramblock event handlers exposed to MAXScript.

Scripted Plug-in Rollouts_and_related_Event_Handlers

Documenation change: Added previously undocumented scripted plug-ins rollout event handlers 'on <rollout> reload do' and 'on <rollout> setTime <val> do'.

cui.RegisterDialogBar and cui.UnRegisterDialogBar

When the new #cui_max_sized DialogBar Style flag is specified, docking the DialogBar on the top causes the DialogBar to expand to the full window width, docked to bottom it expands to full window width minus command panel width.

ActiveX Controls

ActiveXControl

Documenation change: Added two previously undocumented options in ActiveXControl UI element - setupEvents:<boolean> and releaseOnClose:<boolean>

ActiveX by-reference arguments for methods and events

ActiveX now supports by-reference arguments for methods and events.

Materials and Maps

MorpherMaterial

The .Mat_1 to .Mat_100 and .base are now standard properties and are accessible before materials have been assigned to these tracks.

Bricks

.Bricks_Map and .Mortar_Map properties are now standard properties and are accessible before materials have been assigned to these tracks.

Rendering

Render() cancelled argument

Added cancelled argument to the render method.

Callbacks

FilePreSave and FilePostSave

New callbacks.notificationParam parameters: #filePreSave and #filePostSave

Viewport Background

InvalidateAllBackgrounds

New method causes all viewport backgrounds to be invalidated and updated.

See also

What's new in MAXScript in 3ds Max 5

MAXScript Documentation Changes in 3ds Max 5.1.1 (Particle Flow Update)

Particle Flow and MAXScript


MAXScript Documentation Changes in Particle Flow Update

MAXScript Documentation Changes in 3ds Max 5.1.1

New Particle Flow Section

Particle Flow and MAXScript

This new section documents the usage of MAXScript with the Particle Flow System and lists all Classes, Interfaces and Methods exposed by Particle Flow. It also features multiple examples.

Topics Added

Scripted TrackViewUtility Plug-ins

This previously undocumented 3ds Max 5 feature lets the used create scripted Track View Utility plug-ins to implement custom tasks over tracks, keys and objects inside of Track View.

Accessing the Viewport Vertex Alpha Values

This additional topic explains the possibilities to access to Vertex Alpha as seen in the viewports. Also added the topic to the MAXScript Questions and Answers

New and Fixed Examples

SplineShape_RefineSegment

Fixed the RefineSegment usage example.

TexurePlane SimpleObject Scripted Plug-in

New SimpleObject example showing the implementation of UVW handlers and generation code.

How To - Introduction to the Tutorials

Added screenshots and rendered images to many of the "How To" tutorials to illustrate the features and results of the final scripts.

Exiting and Resetting 3ds Max

Fixed documentation for resetMaxFile() and added a new example using checkForSave() to only reset after a Save file prompt.

See also

What's new in MAXScript in 3ds Max 5

MAXScript Changes in 3ds Max 5.1


Class instances not creatable by MAXScript in 3ds Max 5

Adobe_Photoshop_Plug_In_Filter

Adobe_Premiere_Plug_In_Filter

Apollo_Param_Container

apolloParamContainer

ASCII_Object_Output

Asset_Browser

Assign_Vertex_Colors

Autodesk_Animator_Flic

AVI

Beauty

BeautyRenderElement

Bitmap_Photometric_Path_Editor

BlinnShader

Block

BMP

bmpio

Bombbinding

BoneGeometry

BoneObj

Boolean2

Bulge_Angle_Deformer

Camera_Match

Camera_Tracker

CameraMapSpaceWarp

Character

CharacterHelper

CIN

CMB

Collapse

Color_Clipboard

COM_DCOM_Server_Control

Conform

Connect

Create_Out_of_Range_Keys

CurveControl

CustAttribContainer

CV_Curveshape

CV_Surf

DaylightAssemblyHead

DDS

Deflectorbinding

Deform_Curve

Displacebinding

DragMod

DummyRadMapClass

Dynamics

Dynamics_Position_Controller

Dynamics_Rotation_Controller

Editable_Poly

EditablePolyMesh

Emulator

EPS_Image

Falloff_Manipulator

FalloffManip

fallofftextureMap

FFD_Binding

Float_Wire

Follow_Bank

GIF

gizmoBulge

gizmoJoint

gizmoJointMorph

Gradient_GradCtlData

Gravitybinding

Hotspot_Manip

HotspotManip

HSUtil

IFL

IFL_Manager

IK_Chain_Object

IK_Controller

IK_ControllerMatrix3Controller

IK_Spline_End_Twist_Manip

IK_Spline_Start_Twist_Manip

IK_Swivel_Manip

IKChainControl

IKControl

IKEndSpTwistManip

IKHISolver

IKLimb

IKStartSpTwistManip

IKSwivelManip

Illuminance_Render_Element

IllumRenderElement

JAngleData

JBinaryData

JBoolData

JColor3Data

JColorData

JFlagCtlData

JFlagSetData

JFloat3Data

JFloatData

JGradCtlData

Joint_Angle_Deformer

Joystick_Input_Device

JPEG

Jpegio

JPercent3Data

JPercentData

JSubtex

JWorld3Data

JWorldData

Layer_Manager

Level_of_Detail

Lightscape_Materials

Lightscape_Mesh

Lightscape_MeshGeometry

LinearShape

Lines

Link_Inheritance__Selected

LOD_Controller

Loft

LoftObject

Luminaire

LuminaireHelper

Luminance_Render_Element

lumRenderElement

LZFlare_AutoSec_Base

LZFlare_AutoSec_Data

LZFlare_Aux_Data

LZFlare_Data

LZFlare_Glow_Data

LZFlare_Inferno_Data

LZFlare_ManSec_Base

LZFlare_ManSec_Data

LZFlare_Prefs_Data

LZFlare_Rays_Data

LZFlare_Rend_Data

LZFlare_Ring_Data

LZFlare_Star_Data

LZFlare_Streak_Data

LZFocus_Data

LZGlow_Aux_Data

LZGlow_Data

LZGlow_Rend_Data

LZHilight_Aux_Data

LZHilight_Data

LZHilight_Rend_Data

MapScalerSpaceWarp

Master_Controller_plugin_not_found

MasterList

Material_Editor

MAX_File_Finder

MAX_Profiler

MaxRenderer_COM_Server

MAXScript

Measure

MeshCollision

MIDI_Device

Missing_Atmospheric

Missing_Camera

Missing_Custom_Attribute_Plugin

Missing_Exposure_Control

Missing_Float_Control

Missing_GeomObject

Missing_Helper

Missing_Light

Missing_Matrix3_Control

Missing_Morph_Control

Missing_Mtl

Missing_OSM

Missing_Point3_Control

Missing_Position_Control

Missing_Radiosity

Missing_RefMaker

Missing_RefTarget

Missing_Render_Effect

Missing_Render_Element_Plug_in

Missing_Renderer

Missing_Rotation_Control

Missing_Scale_Control

Missing_Shader_Plug_in

Missing_Shadow_Type

Missing_Shape

Missing_System

Missing_Texture_Bake_Element

Missing_TextureMap

Missing_UVGen

Missing_WSM

Missing_WSM_Object

Missing_XYZGen

Morph

Morph_Angle_Deformer

Motion_Capture

MotorMod

Mouse_Input_Device

MSEmulator

MtlBaseLib

MtlLib

NamedSelSetList

NCurve_Sel

NodeNamedSelSet

NodeObject

NURBS_API_Test

NURBS_Imported_Objects

NURBSCurveShape

NURBSSurf

OldBoolean

Particle_Cache

ParticleCache

Path_FollowMod

PathDeformSpaceWarp

PBombMod

PDynaFlectMod

PlanarCollision

Plug_in_Manager

pngio

Point3_Wire

Point_Curveshape

Point_SurfGeometry

Polygon_Counter

PolyMeshObject

POmniFlectMod

Portable_Network_Graphics

Position_Manip

Position_Wire

PositionManip

PositionValueManip

PSD_I_O

PushMod

QTime

radianceMap

radiusManip

Randomize_Keys

Ray_Engine

RayFX

RayFXUtil

Raytrace_Texture_ParamBlock

Reactor_Angle_Manip

ReactorAngleManip

RenderElementMgr

RenderEnvironment

Rescale_World_Units

Reset_XForm

Resource_Collector

rgb

Ripplebinding

RLA

RmModel

RmModelGeometry

Rotation_Value

Rotation_Wire

RPF

Scale_Wire

Scatter

Scene

Scene_Manager

SDeflectMod

SDynaFlectMod

Select_Keys_by_Time

Shape_Check

Simple_Shape

Simple_Spline

SimpleOSMToWSMMod

SimpleOSMToWSMMod2

Slave_Control

Slider_Manip

SliderManip

SOmniFlectMod

SphericalCollision

SplineIKChain

SplineIKSolver

Standin_for_missing_MultiPass_Camera_Effect_Plugin

StdDualVS

Strokes

Sunlight_Daylight_Slave_Controller

Sunlight_Daylight_Slave_ControllerPositionController

Sunlight_Daylight_Slave_Intensity_Controller

Sunlight_Daylight_Slave_Intensity_ControllerFloatController

Surface_Approximation

Targa

Texmaps

TexmapsReferenceMaker

tgaio

This_Data

TIF

tifio

TriMeshGeometry

TVDummyControl

TVNode

UDeflectorMod

UDynaFlectMod

UOmniFlectMod

UVW_Remove

uvwMappingHeightManip

uvwMappingLengthManip

uvwMappingUTileManip

uvwMappingVTileManip

uvwMappingWidthManip

Vertex_Colors

ViewportManager

ViewportManagerControl

Visual_MAXScript

VisualMSUtil

VortexMod

Wavebinding

Windbinding

WireFloat

WirePoint3

WirePosition

WireRotation

WireScale

XrefAtmosWrapper

YUV


MAXScript Language Improvements in 3ds Max 5

The following MAXScript areas have been improved in 3ds Max 5

New ParameterBlock2 data types added

TYPE_INDEX, TYPE_INDEX_TAB, TYPE_MATRIX3, and TYPE_MATRIX3_TAB data types added.

Append String Method Conserves Memory

Perfect for creating dynamic rollouts.

Rollout name as local variable in the scope of the rollout

Rollout names are now accessible as local variables in the scope of the rollout.

By-pointer argument handling in FPS methods fixed

FPS Methods’ Out Parameters can now be used to access data.

Notification parameters handling improved

Correct handling of notification parameters

ActiveX fix for controls/objects without a default interface

Controls without a default interface can now be created, for example Photoshop.

Manual Garbage Collection Light Option

A light option to garbage collection preserves the Undo buffer.

Rollout Floaters and Dialogs Position and Size Handling Fixed

Fixed the problem with moving dialogs when getting/setting dialog position.


New ParameterBlock2 data types added

MAXScript Language Improvements in 3ds Max 5

TYPE_INDEX, TYPE_INDEX_TAB, TYPE_MATRIX3, and TYPE_MATRIX3_TAB have been added as supported PB2 data types in MAXScript. TYPE_INDEX is used for parameters that are 0-based, but are exposed in MAXScript as 1-based - for example, a vertex index.

The above data types are also available in scripted parameter blocks with types of #index, #indexTab, #matrix3, and #matrix3Tab, respectively.

For Example:

height1 type:#index animatable:true default:1 ui:height1

height3 type:#indexTab tabSizeVariable:true

m3a type:#matrix3 default:(matrix3 [1,0,0] [0,0,1] [0,-1,0] [53.1187,-6.50834e-007,14.8893])

m3b type:#matrix3tab tabSizeVariable:true

type:#index is animatable, #matrix3 is not.

type:#index should behave in the same manner as type:#int, except the data value stored is 0-based but is seen by MAXScript as 1-based. So if you had an object using an animated height1 property (as defined above), you would see something like:

$.height1 --> 15

$.height1.controller.value --> 14.0

See also

Parameter Block 2

MAXScript Language Improvements in 3ds Max 5


Append String Method Conserves Memory

MAXScript Language Improvements in 3ds Max 5

Append String

A new Append method has been added to the string value class. It lets you append to a strings in place without creating intermediate string copies in memory. This reduces memory usage significantly when building a large incremental string out of smaller strings, for example when creating dynamic rollouts.

In versions prior 3ds Max 5, using the addition to a string created intermediate copies which would remain in memory until the next garbage collection. When creating large dynamic rollout, it would be possible to exceed the MAXScript memory limit.

See also

MAXScript Language Improvements in 3ds Max 5


Rollout name as local variable in the scope of the rollout

MAXScript Language Improvements in 3ds Max 5

The name of a rollout is now defined as a local variable in the scope of the rollout, as long as the name is not a global variable. This allows for constructs such as:

fn makeDialog =

(

 rollout test "test"

 ( on test open do print (getdialogpos test)

 )

 createdialog test

)

makeDialog()

See also

MAXScript Language Improvements in 3ds Max 5


By-pointer argument handling in FPS methods fixed

MAXScript Language Improvements in 3ds Max 5

In releases prior 3ds Max 5, MAXScript was not handling FPS method by-reference (by-pointer) arguments correctly. FPS methods typically pass back values through these pointers, but MAXScript wasn't doing anything with these values. Support for by-pointer parameter passing for by-reference arguments has been added to MAXScript in 3ds Max 5.

For example, the syntax for the getSlicePlane EPoly method is

getSlicePlane <&point3>planeNormal <&point3>planeCenter <*float>planeSize

planeNormal is In and Out parameter

planeCenter is In and Out parameter

planeSize is In and Out parameter

The planeNormal, planeCenter, and planeSize are values returned by the method. Previously, there wasn't a way to get the planeSize value.

Now you can say the following:

--Define variables to hold the Out parameters:

plane_normal = Point3 0 0 0

plane_center = Point3 0 0 0

plane_size = 1.0

--Call the function and supply the variables by reference as In parameters

$.EditablePoly.getSlicePlane &plane_normal &plane_center &plane_size

--The variables will now contain the actual values of the slice plane:

plane_normal

plane_center

plane_size

When a by-reference argument is an In parameter, its value type has to be preset before passing it. In the example above, the plane_normal variable has been preset to a Point3 value.

If a parameter is an Out parameter only (not an In parameter), the variable does not need to be preset to the correct value type.

For example:

AssemblyMgr.FilterAssembly a light &lightnodes

In this example, lightnodes can be passed in as undefined, but will contain an array of nodes coming out.

See also

New Epoly interfaces and methods in 3ds Max 5

MAXScript Language Improvements in 3ds Max 5


Auto-Wrapping Single Values in FPS Methods

MAXScript Language Improvements in 3ds Max 5

When a function published method expects an <array> as argument but a single value is passed to it, it will now wrap the single value to array automatically.

So you can say

maxops.cloneNodes objects[1]

instead of

maxops.cloneNodes #(objects[1])

See also

Interfaces

MAXScript Language Improvements in 3ds Max 5


Notification parameters handling improved

MAXScript Language Improvements in 3ds Max 5

The handling of notification parameters has been improved. callbacks.notificationParam() in a callback expression will always return the notification parameters for the event that triggered the callback. In the past, if another notification was received before the call to callbacks.notificationParam() , you would get the notification parameters for that event instead.

See also

General Event Callback Mechanism

MAXScript Language Improvements in 3ds Max 5


ActiveX fix for controls/objects without a default interface

MAXScript Language Improvements in 3ds Max 5

In previous releases, a problem has been preventing applications like Adobe Photoshop from being used as a comobject. This was caused by the fact that they have only one main interface and do not mark it as a default interface.

MAXScript now checks for such cases. This change will not affect already functioning scripts.

Here is an example of launching Photoshop from inside of 3ds Max:

Example:

rollout rPhotoshop "Photoshop Application"

(

 activeXControl ax "Photoshop.Application" height:200 width:300

)

createDialog rPhotoshop 400 400

showProperties rPhotoshop.ax

rPhotoshop.ax.open "d:\\temp\\appledis.jpg"

rPhotoshop.ax.actions[1].name

rPhotoshop.ax.playAction "My Action"

See also

ActiveX Controls in MAXScript Rollouts

MAXScript Language Improvements in 3ds Max 5


Manual Garbage Collection Light Option

MAXScript Language Improvements in 3ds Max 5

An optional light keyword argument has been added to the manual garbage collection gc() method. When passed as true, the undo buffer will not be flushed - any value that derives from MAXWrapper will not be collected.

The result is that less memory is released and gc runs a bit slower, but you can't corrupt the undo stack.

What does get collected with light:true includes rollouts, floaters, UI items, bitmaps, arrays, and bitArrays.

For more details, please see

Manual Garbage Collection

See also

MAXScript Language Improvements in 3ds Max 5


Rollout Floaters and Dialogs Position and Size Handling Fixed

MAXScript Language Improvements in 3ds Max 5

The handling of size and position has been made consistent within and between MXS rollout floaters and dialogs. Previously, the creation size specified the size of the entire window, now it specifies the size of the client window. Since, depending on OS and small/large font selection, the size of the window border varies, you never knew quite what size to make your dialog or floater. Now, in all cases, size refers to the window's client area, and position refers to the window. This is also true for values passed in to the moved and resized handlers.

Premature calls to the moved and resized handlers have been removed. These handlers are now only called when the user changes the position or size of the dialog or floater via the UI or script.

Note: Sizes of MAXScript-generated dialogs will be slightly larger than in older versions.

New properties added:

<rollout>.inDialog Boolean, read-only.

Signifies whether the rollout is currently displayed in a dialog created via createDialog <rollout>. Always valid.

<rollout>.inViewport Boolean, read-only.

Signifies whether the rollout is currently displayed in a viewport. Always valid.

<rollout>.open Boolean, read-only.

Signifies whether the rollout is currently displayed. Valid when the rollout is displayed in the command panel or in a rollout floater.

<rollout>.dialogBar Boolean, read-only.

Signifies whether the rollout floater is used as a dialog bar. Always valid.

<rollout>.height Integer

Get/Set the height of the rollout in pixels. Valid when rollout is in the command panel, in a rollout floater, or in a dialog.

<rollout>.width Integer

Get/Set the width of the rollout in pixels. This property exists only when the rollout is in a dialog.

New method added:

<Point2>GetDialogSize <rollout>

returns the size of the window's client area. Equivalent to

point2 <rollout>.width <rollout>.heigh

See also

Utility and Rollout Properties, Methods, and Event Handlers

MAXScript Language Improvements in 3ds Max 5


What was New in MAXScript in 3ds Max 4

MAXScript has been greatly expanded in 3ds Max 4 so that almost all actions in the software are now scriptable. Much of this exposure is due to Function Publishing and interfaces . Additionally, the exposure is an automatic result of more plug-ins moving from ParamBlocks to ParamBlock2s. The remaining exposure used the MAXScript SDK to expose functions to MAXScript.

Note: ParamBlock2s make it possible for plug-ins to host all of their user visible parameters in one or more parameter blocks, including complex parameters such as ReferenceTargets, Sub-Anims, dynamic parameter tables (Tabs<>), and class parameters. The parameter blocks handle old-version loading and reference management automatic. They augment the Parameter Map mechanism to provide automatic UI for the new parameter types including common 3ds Max controls such as node pickers, texmap selectors, etc. as well as listboxes for tabular parameters and, further, to automate the construction of ParamMaps and ParamDlgs in common situations. Additionally, ParamBlock2’s provide a system that describes all the parameter blocks and parameters of a plug-in along with a metadata 'reflection' API so that systems like the MAXScript, the Macro Recorder, Schematic View, and custom exporters can access plug-in data automatically. This metadata includes version and position-independent parameter IDs and both localized and fixed machine-parsable names for all classes and parameters. This helps to address version compatibility and MAXScript / exporter localization issues.

For design details, see the SDK help file topic, "Parameter Blocks and Maps in Release 3. "

NOTE:

The MAXScript SDK is a set of Visual C++ headers and import libraries that C++ programmers can use to extend MAXScript. These extensions can be in the form of new built-in functions, new system globals or descriptors for new 3ds Max plug-in class properties. This is useful for 3rd-party plug-in developers to write custom scripting interfaces for their plug-ins, and for programmers to do custom C++ performance code and drive it with scripts for hybrid tools.

The MAXScript SDK allows extensions to be added either incrementally through a MAXScript-specific DLL file type that is loaded by MAXScript or by runtime calls directly to MAXScript from within an existing plug-in.

For design details, see the SDK help file topic, "MAXScript SDK"

Note: The areas in this documentation exposed by Function Publishing will document the interface information provided by the "showInterfaces" function , in three sections: Properties, Methods, and Actions. In the Properties section, each property exposed by the interface is listed along with its data type or enumeration values and whether the property can be read and written to. In the Methods section, each method is listed along with its return type and its argument list. The value type for each argument is shown. If the return type is shown as <void>, the method returns a value of 'ok'. Methods that are used by Actions are commented as such. These methods typically require that the object be selected and active in the appropriate command panel. In the Actions section, each Action is listed along with its category and action description as shown in the Customize User Interface dialog, and the shortcut keys, if any, assigned to the Action.

The following topics are new to MAXScript:

  • Learning MAXScript - Walkthrough tutorial for beginning MAXScript users.

Additional Notes:

The name of the atmosphere in releases prior to 3ds Max 4, known as the "Combustion effect" is now called "Fire_Effect".

The following deflectors have been renamed:

Pspawnflector is now POmniflect

Sspawnflector is now SOmniflect

UspawnDeflector is now UOmniflect

Any scripts with these objects should be updated with the correct names.

The following are new MAXScript features in 3ds Max 4:

Action Manager:

Action Manager

ActiveX Controls in MAXScript Rollouts:

ActiveX Controls in MAXScript Rollouts

Asset Browser:

Asset Browser enhancements

Bones:

Access to the new node bone properties and methods

Bone Creation

Cache Modifiers:

Point Cache Modifier

CallBack Notification Codes:

RenderEffect Progress Callback Mechanism - You can control the main RenderEffects dialog progress bar using several callbacks.

Notify Callbacks for Animate button on and off Transitions

Color Manager:

Interface: colorMan

Combustion:

Combustion

Constraints:

Path Constraint

LookAt Constraint

Orientation Constraint Controller

Position Constraint

Link Controller for Constraints

Controller Functions for use with Constraint Assignments

Context Filters:

Context Filters

Custom Attributes:

Scripted Custom Attributes

Depth of Field:

Depth of Field

Editable Patch:

Patches

Filters:

class id filter

Selection Filter

iDrop - drag and drop:

iDrop - drag and drop

Interfaces:

Interfaces

Core Interfaces

Other Interfaces

Inverse Kinematics:

HD IK controller chains can be assigned to existing hierarchies

IKLimb Solver

Materials:

Multi/Sub Material

Menu Manager:

Menu Manager

Mesher:

Mesher

Network Render Interface:

Network Render Interface

Node Handles:

Node Handles

Node vertexColorType:

Node vertexColorType

OLE Automation:

MAXScript.reg - Registery file

Parameter Wiring:

Parameter Wiring

Plug-In Manager:

Plug-In Manager

Quad Menu:

Quad Menu

Reactors:

Reactor controller

Render Elements Manager:

Render Element Manager

Scripted Plug-In:

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

Scripted Plug-in Events

Scripted Cameras:

Scripted Cameras

Scripted Controllers:

dependsOn For Scripted Controllers

Matrix3 Scripted Controller

Scripted Manipulators:

Scripted Manipulators

Scripted Objects:

on detachedFromNode For Object Scripted Plug-ins

Scripted RenderEffects:

RenderEffect Progress Callback Mechanism

Scripted Rollouts:

Multi-line editText UI items in Scripted Rollouts

Spring Controller:

Spring Controller

System Tools:

System Tools

TrackBar:

Trackbar Interface

Trackviews:

Trackviews

Visual MAXScript:

Visual MAXScript

Xref Objects:

Xref Objects

Zip-file Script Packages:

Zip-file Script Packages

MAXScript Language Improvements in 3ds Max 4:

The following are new MAXScript methods for 3ds Max 4:

IsValidNode

getTextExtent

isActive <atmos>

isActive <renderEffect>

affectRegionVal

getMAXSaveFileName & getMAXOpenFileName

Language Improvements:

Affect Region Function

BinStream for Binary Reading and Writing

By Reference Parameter Passing

C++-style bracketing comments

Coercion of bitArray to array and integer arrays to bitArrays

Detecting Deleted Nodes

Dereferencing Operator

forceUpdate Function added to UVWUnwrap

hasProperty() function

Improved the Performance of Iterating and Indexing the 'selection' and '$' Object Sets

isValidNode

Readable/Writable Checks

RubberBanding in pickObject() Function

SetDir

Shortcut system replaced

startObjectCreation()

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

superclasses read-only global variable

Symbolic Pathnames

System Information

validModifier() function

Visible Class For '&' Reference Values

Controllers:

List Controllers

mapKeys() method

moveKeys function

Keys:

Bezier Keys inTangentLength and outTangentLength

Object Inspector Functions:

Class and Object Inspector Functions Enhanced

Renderer:

render() Function Re-entrant

SuperClasses:

Bitmap Manager - Function Published BMM control

Utilities, Global Utilities and Render Element plug-ins

Renderer

2 New Scripted Pug-in Superclasses: Scripted Camera and simpleManipulator

Globals and Locals:

Definition Constructs Can Include Global Variable Declarations At Top Level

Changes to Undeclared Implicit Global Variables

Material Editor, Material and Textures:

Accessing The Material Editor Active Slot

BitmapTex Reload and viewImage

BMP, PNG, JPEG and TGA I/O Interfaces

Material Level Show-in-viewport State

Maxops:

maxOps

User Interface:

Angle UI element

CreateDialog

Curve Control

isActive (atmos)

isActive (renderEffect)

keyboard.escPressed

MAX Open & Save Dialogs

Menu and CUI Loading

mtlBrowser

SetBackground Method

mouseTrack() Function

snapMode

Spinner UI Item setKeyBrackets

Timer UI element

TimeSlider on/off toggle

Undo/Redo Dropdown Labels

Zoom to Bounds

Command Panels and Rollout Pages:

Customize The Order of Rollup Pages

MAXScript Dialogs and Rollout Floaters as Extended viewports

Rollout .Controls Property

Rollout Systems 'category' Mechanism

New Classes in 3ds Max 4:

New Classes in release 4

New MAXScript Interfaces in 3ds Max 4:

Core Interfaces:

Core Interfaces

Other Interfaces:

Other Interfaces

The following topics contain updates to previous MAXScript documentation:

  • General Event Callback Mechanism - New notifications (everything from #systemPreReset down is new)

  • Defining Macro Scripts - Explanation of how the memory stack treats local macro script variables. (only need to review the one paragraph - "Normal locals are visible…")

  • Editable_Mesh : GeometryClass and TriMesh : Value - New MeshOps, including sub-object support.

  • New properties/methods in:

Skin

Flex

UVW Unwrap

  • Added/updated properties to the following objects/modifiers/controllers:

Attachment

Path

XYZ Controllers

Point Surf

Ringwave

Terrain

Point

Multimaterial (materialIDList, material1)

FFD_2x2x2 (deformType)

FFD_3x3x3 (deformType)

FFD_4x4x4 (deformType)

FFD_Box (deformType)

FFD_Cyl (deformType)

MeshSmooth

Blur

Deflector

Gravity

PDynaFlect

POmniFlect

SDeflector

SDynaFlect

SOmniFlect

UDeflector

UDynaFlect

UOmniFlect

Wind

Arc

Circle

Donut

CV_Curve

Ellipse

Helix

Line

NGon

Rectangle

Point_Curve

SplineShape

Star

Text

CompositeMaterial (amount, baseMaterial)

RaytraceMaterial (enable_Raytraced_refractions)

SpaceFFDBox (deformType)

SpaceFFDCyl (deformType)

StandardMaterial (bounce, staticFriction, slidingFriction, ambient, diffuse, specular, selfIllumAmount, selfIllumColor, specularLevel, glossiness, soften)


New Classes in release 4

New Classes in version 4

Note: The name of the atmosphere in releases prior to 3ds Max 4, known as the "Combustion effect" is now called "Fire_Effect".

Additive_Euler_XYZ : RotationController

AlphaRenderElement : MAXObject

AtmosphereRenderElement : MAXObject

AutomaticAdaptiveExposureControl : MAXObject

Automatic_Exposure_Control : MAXObject

BackgroundRenderElement : MAXObject

BlendRenderElement : MAXObject

Combustion.coordinates : MAXObject

Cone_Angle : helper

DeletePatch : modifier

Diffuse : MAXObject

diffuseRenderElement : MAXObject

Drag : SpacewarpObject

EmissionRenderElement : MAXObject

FloatList : FloatController

FloatReactor : FloatController

Hose : GeometryClass

HSDS_Modifier : modifier

imageMotionBlur : renderEffect

Link_Constraint : Matrix3Controller

Link_Constraint.link_params : MAXObject

LinkedXForm : modifier

LookAt_Constraint : RotationController

Mesher : GeometryClass

meshsmooth : modifier

Motion_Blur : renderEffect

MultiRes : modifier

Normalize_Spl : modifier

Orientation_Constraint : RotationController

particleMesher : GeometryClass

Patch_Select : modifier

Path_Constraint : PositionController

PDynaflector : SpacewarpObject

Plane_Angle : helper

PlaneAngleManip : helper

Point3Reactor : Point3Controller

Point3Spring : Point3Controller

Point_Cache : modifier

Point_CacheSpacewarpModifier : SpacewarpModifier

PointHelperObj : helper

Poly_Select : modifier

Position_Constraint : PositionController

position_list : PositionController

PositionReactor : PositionController

PositionSpring : PositionController

reflectionRenderElement : MAXObject

refractionRenderElement : MAXObject

RingWave : GeometryClass

RotationList : RotationController

Rotation_Reactor : RotationController

ScaleList : ScaleController

Scale_Reactor : ScaleController

SDynaflector : SpacewarpObject

section : shape

Self_Illumination : MAXObject

ShadowRenderElement : MAXObject

sliderManipulator : helper

specularRenderElement : MAXObject

SpringPoint3Controller : Point3Controller

SpringPositionController : PositionController

transform_script : Matrix3Controller

Turn_to_Mesh : modifier

Turn_to_Patch : modifier

Turn_to_Poly : modifier

UDynaDeflector : SpacewarpObject

UVWUnwrap : modifier

Vortex : SpacewarpObject

ZRenderElement : MAXObject


Utilities, Global Utilities and Render Element plug-ins

Superclasses for Utilities, Global Utilities and Render Element plug-ins have been added in 3ds Max 4 so they can be accessed and manipulated in MAXScript.

The Utility and GUP superclasses were added to permit access to any static Function Published interfaces published by the utilities, but MAXScript was attempting to treat them as ReferenceTarget-based objects, which they are not. There is now a new base superclass, non_reftarget_maxwrapper_class that should be used for any new superclasses added whose classes do not live in the ReferenceTarget class hierarchy.

See also

Render Element Manager

Plug In Manager

Visual MAXScript


Locating Information in this Help File

You can search for information in the MAXScript Online Reference by browsing the hierarchical Table of Contents in the Contents tab, locate topics and functions by typing the first letters of the required name in the Index tab, or search the complete document using the Search tab. All these search methods assume that you are familiar with the logic of the Table Of Contents hierarchy, know the exact name of the function or topic you are looking for, or that the search keywords you enter actually match words in the document. Obviously, navigating the MAXScript Reference can be difficult for new and even for experienced users.

The following additional Topics Index pages are meant to provide FAST access to information related to specific often-used areas of MAXScript. They are similar to the Table Of Contents to a certain extent, but are much easier to browse and provide additional comments describing briefly the linked topics.

Index Pages:

Creating MAXScript Tools - Topics Index

Developing MacroScripts - Topics Index

External File Access - Topics Index

Editable Mesh - Topics Index

Editable Poly - Topics Index

Applying Modifiers - Topics Index

Rendering - Topics Index

Developing Scripted Plug-ins - Topics Index

See also

Frequently Asked Questions


Quick Navigation - Main Index

Click a Quick Navigation icon to pop up the corresponding category menu, then click on a topic to navigate to, or click in a free area to dismiss the pop up menu.

Scripting

Interfaces

Nodes, Values, Collections

Geometry and Modifiers

Lights, Cameras, Helpers, Reactor Dynamics

Animation and Character Studio

Materials and Rendering

Note that the [image] icon in the popups is a shortcut back to this Index!


Learning MAXScript - Topics Index

The following page provides links to topics intended to introduce you to the MAXScript language.

MAXScript Online Reference

The introduction page of this document provides a short overview of MAXScript and links to the main areas of interest to start with.

MAXScript Overview

An overview of MAXScript.

Using the MAXScript Documentation

An overview of this document's structure.

Learning MAXScript

Introduction to the MAXScript learning topics.

Getting Started

Accessing MAXScript

Explains how and where to access MAXScript in the 3ds Max User Interface.

Source Code Layout

An introduction to the basics of the MAXScript code layout.

Entering Information into MAXScript

Explains how to enter information into MAXScript using the Listener.

Assigning Variables

Shows how to assign values to variables.

Mathematical Operations in MAXScript

Demonstrates the usage of some basic mathematical operations in MAXScript.

Manipulating The Box - First Steps in MAXScript

Drawing a Box with MAXScript

The first interaction with the 3ds Max scene using MAXScript - creating a simple Box primitive from the MAXScript command line.

Modifying the Box

Teaches you how to change some properties of the Box.

Applying Standard Transformations

Learn how to move, rotate and scale an object using the Box created in the previous tutorials.

More Box Transformations

Learn how add modifiers to the Box and animate the transformations.

Creating Your Own Scripts

The Script Editor

Introduction to the MAXScript Editor, the place you write actual programming code.

Controlling Program Flow in Scripts

Shows some basic of program flow control like conditions and loops.

Defining Custom Functions

Explains the usage of local and global variables and the definition of custom functions.

Structure Definitions

Demonstrates the definition of custom structures.

3ds Max Commands in MAXScript

Shows some basic 'max commands'. For a full list of commands, see MAX Commands

Saving your Commands in a Script File

Basic steps to save scripts to files.

Loading and Running Your Script File

Basic steps to load and use files from disk.

Learning From Other Scripts

Loading Other Scripts

Explains how to load scripts written by others to examine and study the way they were written.

Learning MAXScript by Walking Through a Script

Explains how to walk through existing scripts in order to understand their way of working.

Learning MAXScript with the Macro Recorder

Explains how to use the Macro Recorder to learn MAXScript. Note that the code automatically generated by the recorder can be used as a guideline but should not be taken as the perfect syntax. Code written by humans will be much more optimized in most cases!

MAXScript for New and Casual Users

MAXScript for New and Casual Users

These pages are meant as introduction for users not intending to become advanced scripters but wanting to use existing scripts in their daily work.

Scripted Utilities for New Users

Explains how to install and where to locate scripted utilities.

MacroScripts for New Users

Explains how to install and where to locate macroScripts.

Scripted Plug-ins for New Users

Explains how to install and where to locate scripted plug-ins.

Scripted Functions for New Users

Explains how to use existing scripted functions.

MAXScript DLX Extensions for New Users

Explains how to install MAXScript Extensions plug-ins.

Examples:

How To - Introduction to the Tutorials

This index page lists all 'How To...' Tutorials included in this document. These tutorials are based on real-world examples and contain detailed explanations and links to relevant topics.

Online Help Script Examples

This page lists the majority of example scripts included as examples in this document. These scripts and functions are usually directly usable in the daily practice and not just abstract examples.

Frequently Asked Questions

This page provides a large number of typical user questions and their answers. Most questions are based on real-world problems.


Creating MAXScript Tools - Topics Index

The following topics provide the necessary information for developing MAXScript tools - Scripted Utilities, Rollout Floaters and Dialogs using UI Controls.

Scripted Utilities and Rollouts:

Scripted Utilities:

Scripted Utilities and Rollouts

Introduction to scripted Utilities and Rollouts.

Scripted Utility Panels

Scripted Utilities are the most basic form of a scripted tool and were introduced with the original MAXScript release in 3ds Max 2. A scripted Utility can optionally manage multiple rollouts, but the simplest form will do most of the UI management for you - just add UI Items to the Utility and define their handlers.

Utility Clauses

Explains how to extend a Utility with multiple rollouts.

Managing Multiple Rollouts in a Scripted Utility

Details about multiple rollouts management.

General Rollout and Floater topics:

Rollout Clauses

Locals variables, functions, structure definitions, mouse tools, UI items and event handlers in scripted rollouts.

Utility and Rollout Properties, Methods, and Event Handlers

Describes the Properties, Methods and Event Handlers in Rollouts and Floaters.

Rollout Floater Windows

Creating and closing Floaters, adding and removing Rollouts, Floater properties.

RolloutCreator Functions

The RolloutCreator is a structure of functions to help you with the definition of Rollouts.

SubRollout Class

Describes the subRollout Class, a UI item which you can place rollouts into.

Rollout Access and Advanced Controls:

Visibility of Locals, Functions, Structures and User-Interface Items in Rollout Code

Explains how to access local variables and UI items inside of Rollouts.

Accessing Locals and Other Items in a Rollout from External Code

Explains how to access local variables and UI items from outside the Rollout.

Rollout .Controls Property

The .Controls property returns an array of all UI Controls in the Rollout.

Rollout Systems 'category' Mechanism

Allows you to control the order of Rollouts by providing a category index.

MAXScript Dialogs and Rollout Floaters as Extended viewports

Shows how to register floaters and dialogs to be displayed inside of Viewports.

Dialogs:

CreateDialog

Dialog creation and dialog event handlers.

DestroyDialog

Dialog destruction (closing).

GetDialogPos and SetDialogPos

Controlling the position of Dialogs.

cui.RegisterDialogBar and cui.UnRegisterDialogBar

Registering Dialogs as dockable CUI dialog bars.

cui.DockDialogBar and cui.FloatDialogBar

Docking and undocking (floating) dialog bars.

cui.getDockState

Accessing the docking state of dialog bars.

User Interface Controls:

Common UI Control Properties:

Rollout User-Interface Controls

Introduction to the MAXScript UI Controls.

Rollout User-Interface Controls Common Properties

All UI Controls share a number of common properties.

Rollout User-Interface Controls Common Layout Parameters

You can use the layout parameters to control the placement and appearance of the UI Controls.

Setting Focus on User Interface Controls

Lets you set focus on specific UI Controls.

UI Control Types:

Rollout User-Interface Controls Types

angle

bitmap

button

checkbox

checkbutton

colorpicker

combobox

curvecontrol

dropdownlist

edittext

groupBox

hyperLink

imgTag

label

listbox

mapbutton

materialbutton

multilistbox

pickbutton

popUpMenu

progressbar

radiobuttons

slider

spinner

timer

ActiveX Controls:

ActiveX Controls in MAXScript Rollouts

This page provides the largest amount of ActiveX Controls information.

ActiveX fix for controls/objects without a default interface

Describes a change to ActiveX Controls handling in 3ds Max 5.0.

ActiveX by-reference arguments for methods and events

Describes by-reference arguments support added to ActiveX Controls in 3ds Max 5.1

Listview ActiveX functions

Describes ListView-specific functions for hit-testing and indentation access.

updateWindow

Lets you force the refresh of ActiveX controls.

loadPicture

Provides a return value for use as icon in ActiveX controls.

DotNet Controls:

DotNet In MAXScript

This page provides links to all topics related to using DotNet with MAXScript.

Back To

Locating Information in this Help File


Developing MacroScripts - Topics Index

The following topics provide the necessary information for developing MacroScripts, dialogs and User Interfaces.

General MacroScript Topics

Defining Macro Scripts

MacroScript definition - all you want to know about MacroScripts.

Creating Icon Bitmap Files

Explains how to create custom UI Icons for your MacroScripts.

Rollout, Floater and Dialog Management

Creating MAXScript Tools - Topics Index

See the complete Tools Topic Index for details on rollout and dialog management.

Example Scripts:

How To ... Develop A Transform Lock Script

How To ... Remove All Materials

How To ... Quickly Rename Selected Objects

How To ... Assign Materials Automatically

How To ... Output Object Data To File

How To ... Select Non-Quad Polygons

How To ... Sort TrackView Alphabetically

How To ... Draw a Freehand Spline

How To ... Flatten a SplineShape

How To ... Enhance the Morpher Modifier With Floating Controls

How To ... Move Objects to a Surface

How To ... Create a Quick Preview

How To ... Change Objects At Render Time

How To ... Output Geometry Data To Text File - Part Two

How To ... Read Geometry Data From Text File - Part Two

How To ... Develop a Bitmap Painting Tool - Basic Utility

Free Camera Creation MacroScript

GrabViewport MacroScript

PolyToElement MacroScript

Render to RamPlayer

SubObject Vertex

SuperExpertMode

Parameter Wire altExectute

Edge2FaceSel

Edge2PolySel

Edge2VertSel

Face2EdgeSel

Face2VertSel

Vert2EdgeSel

Vert2FaceSel

SelOpenEdges

Back To

Locating Information in this Help File


External File Access - Topics Index

The following topics provide the necessary information for reading and writing data from / to external files. MAXScript provides functions to read and write both text (ASCII) and binary files. It also allows reading and writing of keys from/to INI files.

3ds Max Scene Files and Properties

3ds Max File Loading and Saving

Standard file dialogs for opening and saving external files. These can be used to let the user select an external file name for the script to process

3ds Max Scene File Properties

The file properties are organized into three sets corresponding to the three pages in the Main Menu > File > File Properties dialog. This is standard MS Windows feature supported by .MAX files.

3ds Max System Directories

3ds Max System Directories

The GetDir and SetDir methods provide access to the 3ds Max system directories.

Symbolic Pathnames

You can use symbolic pathnames anywhere a filename can be supplied to MAXScript..

External File Access

Standard Open and Save File Dialogs

These methods display the standard 3ds Max file open, file save, or folder selection browser dialogs.

File Name Parsing

These methods let you extract parts of the file name like just the path, the base file name, the extension etc.

External File Methods

These methods let you collect files from directories, create directories and files, move and delete files and change their attributes etc. Using these methods, you can not only write scripts to let 3ds Max interact with external files, but even write general file-management scripts unrelated to 3ds Max and your 3D work.

Text File Input and Output

FileStream Values

The FileStream class implements text file input and output in MAXScript. The topic lists related methods

String Parser Methods

String parsing methods.

Append String

This method lets you append to strings in place without creating intermediate string copies in memory, thus reducing memory usage when building incremental strings, for example for dynamic rollouts.

MemStream and MemStreamMgr Interfaces

Interfaces for fast parsing by loading into memory.

Binary Files:

BinStream for Binary Reading and Writing

Methods for reading and writing data from / to binary files.

INI Files:

Accessing INI File Keys

Methods for reading and writing key values in .INI files


Editable Mesh - Topics Index

The following topics provide the necessary information for creating, accessing and modifying Editable Meshes:

Main Topics:

Editable_Mesh : GeometryClass and TriMesh : Value

The original Editable_Mesh topic has been split into multiple shorter topics to make browsing easier.

Constructors (Editable_Mesh)

Explains how to create instances of the Editable_Mesh class.

Constructors (TriMesh)

Explains how to create instances of the TriMesh class.

Properties

Lists the Editable_Mesh properties, like vertex and face counts, TriMesh value etc.

Methods

Introduction to the mesh-related methods described in the following topics.

General Methods

Lists the general Editable_Mesh methods including methods for attaching, updating and accessing UI parameters.

Vertex Methods

Lists vertex-related methods for getting, setting and deleting vertices, accessing normals and vertex selections.

Vertex Methods (meshop struct)

Lists advanced vertex-related methods including breaking, chamfering, cloning, welding and moving vertices.

Vertex Data Methods (meshop struct)

Lists vertex data-related methods for storing per-vertex information.

Edge Methods

Lists edge-related methods for selecting edges and setting edge visibility.

Edge Methods (meshop struct)

Lists advanced edge-related methods for chamfering, cloning, deleting, extruding etc.

Face Methods

Lists face-related methods for accessing face data, material IDs, smoothing groups, selection state etc.

Face Methods (meshop struct)

Lists advanced face-related methods including bevel, extrude, detach, clone, explode and more.

Mesh Methods (meshop struct)

Lists mesh-related methods affecting multiple faces at a time.

Mapping Methods - General (meshop struct)

Lists general texture mapping methods.

Texture Vertex Methods

Lists legacy texture mapping methods affecting mapping channel 1. For general access to all mapping channels, see previous topic.

Color-Per-Vertex Methods

Lists legacy texture mapping methods affecting vertex color channel 0. For general access to all mapping channels, see Mapping Methods - General .

Subdivision Displacement Surface Properties Methods

Lists methods to set the Subdivision Displacement Surface Properties for a mesh object. Not applicable to TriMeshes.

Editable Mesh UI Property Methods (meshop struct)

Lists methods affecting the Editable_Mesh UI settings. Not applicable to TriMeshes.

Editable Mesh Modify Panel Command Modes and Operations (meshOps struct)

Lists methods starting Editable_Mesh UI actions. They are equal to pressing the respective buttons with the mouse. Not applicable to TriMeshes.

Related Topics:

Understanding Texture Coordinates

Explains the theory behind texture coordinates.

Working with Editable Meshes

Shows some examples of Editable Mesh operations.

Example Scripts:

FlipObjNormals

Flips all normals of an Editable Mesh by reversing vertex order.

getFaceSmoothGroupB

Gets the Smoothing Groups from an Editable Mesh

setFaceSmoothGroupB

Sets the Smoothing Groups in an Editable Mesh

Edge2FaceSel

Convert Edge to Face Selection in Editable Meshes

Edge2PolySel

Convert Edge to Polygon Selection in Editable Meshes

Edge2VertSel

Convert Edge to Vertex Selection in Editable Meshes

Face2EdgeSel

Convert Face to Edge Selection in Editable Meshes

Face2VertSel

Convert Face to Vertex Selection in Editable Meshes

Vert2EdgeSel

Convert Vertex to Edge Selection in Editable Meshes

SelOpenEdges

Select Open Edges in Editable Meshes

How To ... Output Geometry Data To Text File - Part One

Shows the basic of writing mesh geometry data to an external text file.

How To ... Read Geometry Data From Text File - Part One

Shows the basic of reading object data from an external text file.

How To ... Output Geometry Data To Text File - Part Two

Enhances the mesh geometry output script with support of smoothing groups, material ids and edge visibility.

How To ... Read Geometry Data From Text File - Part Two

Enhances the input script developed in Part One to support the new data added by the preceding tutorial.

How To ... Create Custom Mesh Object

Shows how to create a custom mesh object

How To ... Create Scripted Geometry Plug-in

An example of a scripted geometry plug-in

Back To

Locating Information in this Help File


Editable Poly - Topics Index

The following topics provide the necessary information for creating, accessing and modifying Editable Poly:

Main Topics:

Editable_Poly: GeometryClass

Editable_Poly Properties

Editable_Poly Methods

Editable_Poly Geometry Methods (polyOp struct)

Editable_Poly Mapping Methods(polyOp struct)

Interface: EditablePoly

Example Scripts:

Skyscraper Extrusion

Illustrates the usage of EditablePoly extrusion functions

PolyToElement MacroScript

Shows how to split every polygon in an EditablePoly into an Element.

How To ... Select Non-Quad Polygons

Example of accessing and selecting Polygons in an EditablePoly object.

Back To

Locating Information in this Help File


Applying Modifiers - Topics Index

The following topics provide the necessary information for creating and applying modifiers and binding Space Warps to scene objects.

Modifier : MAXWrapper and SpacewarpModifier : MAXWrapper

Introduction to the Modifier and SpacewarpModifier superclasses derived from MAXWrapper.

Modifier Common Properties, Operators, and Methods

Lists properties common to all modifiers including name and enabled state in viewport and renderer. Also lists related methods including checking whether a modifier can be applied to a certain object, adding a modifier to a node, deleting a modifier from a node, collapsing the modifier stack and getting the modifier context transformation matrix and bounding box.

Modifier Sub-Object Transform Properties

Describes how to access sub-object transform properties of modifiers.

Modify Panel

Lists all methods related to the Modify Panel, including enabling modifiers' show end result button, enabling sub-object selection, adding a modifier to the current selection, setting the current object in the modifier stack etc.

Modifier and SpacewarpModifier Types

Lists modifier and spacewarpModifier classes accessible in MAXScript.

SpaceWarp Binding SpacewarpModifiers

Lists spaceWarp Binding classes accessible in MAXScript.

SpacewarpObject : Node

Lists spaceWarp classes accessible in MAXScript.

ModifierArray Values

Explains how to access modifiers from the modifier stack of an object.

Modifier - Related Callbacks

Lists all modifier-related callbacks.


Rendering - Topics Index

The following topics provide the necessary information for accessing and setting up the renderers and render-related elements:

Rendering from MAXScript

Controlling the Renderer

You can use the render() function to invoke the 3ds Max renderer.

Accessing the Render Scene Dialog settings

Render Scene Dialog

Describes a set of system global variables and methods to control the settings of the 3ds Max rendering dialog.

renderSceneDialog

The renderSceneDialog structure provides a set of functions for controlling the Render Scene Dialog window.

envEffectsDialog - Open and Close the Environment and Effects dialog

The envEffectsDialog structure provides a set of functions for controlling the Environemnt and Effects Dialog window.

TabbedDialogs - Controlling Tabbed Dialogs

The tabbedDialogs structure lets you control tabbed dialogs in 3ds Max, including the new tabbed Render Scene dialog in 3ds Max 6.

Assigning a Renderer

Renderer

A MAXClass wrapper was added for the plug-in renderer superclass so that a renderer instance can be worked with in MAXScript.

Renderers

Renderers is a Structure of systemGlobals. It lets the user assign renderer class instances to the current, production, Material Editor and activeShade renderer

Default_Scanline_Renderer : RendererClass

This class represents the Default Scanline Renderer.

3ds Max Default Scanline Renderer Anti-Aliasing Filters

Describes the Filter class values which are available as 3ds Max Default Scanline renderer anti-aliasing filters.

Mental_Ray_Renderer : RendererClass

This class represents the Mental Ray Renderer.

VUE_File_Renderer : RendererClass

This class represents the VUE File Renderer.

Radiosity and Advanced Lighting

Interface: RadiosityPreferences

Represents the interface to the Renderer Radiosity Preferences. The properties of this interface correspond to UI controls located in the Preferences > Adv.Lighting tab and in Render Scene Dialog of 3ds Max

Interface: SceneRadiosity

This is a Core Interface providing access to the Advanced Lighting panel in 3ds Max. It lets the user assign a new radiosity plug-in and open/close/minimize the panel.

Light_Tracer : RadiosityEffect

The Light_Tracer RadiosityEffect is a Global Illumination solver used mainly for advanced lighting simulation in outdoor scenes.

Radiosity : RadiosityEffect

The RadiosityEffect originally implemented in Autodesk VIZ4 based on the Stochastic Relaxation Radiosity method.

Interface: INodeGIProperties

This is a Node Interface providing access to the node's Radiosity settings.

Interface: SceneExposureControl

This is a Core Interface providing access to the Scene Exposure Control.

Network Rendering

Interface: NetRender

The Interface provides access to the Network Rendering.

NetRender Sub-topics

Working with the Manager

Working with Jobs

Job Properties that Require SendUpdate

Accessing Render Element Information

Accessing Frame Information

Working with Servers

Working with Groups

Netstatus

NetRender Examples

RTT_Methods : Render To Texture Methods

Methods for texture baking using the network rendering system.

Back To

Locating Information in this Help File


Developing Scripted Plug-ins - Topics Index

The following topics provide the necessary information for developing scripted plug-ins.

General Scripted Plug-ins Topics

The Super Class ID and the Class ID

Explains the usage and generation of Class IDs in 3ds Max and MAXScript.

Scripted Plug-ins

Introduction to Scripted Plug-ins.

Scripted Plug-in Clauses

Discusses Scripted Plug-in Clauses - Locals, Parameter Blocks, Mouse Tools, Rollouts and Event Handlers

Scripted Plug-in Methods

Discusses Scripted Plug-in Methods - adding plug-in Rollouts

Updating Scripted Plug-ins

Version control and updating scripted plug-in classes

Scripted Plug-in Classes

Scripted Atmospheric Plug-ins

Scripted Atmospheric plug-ins can only extend existing Atmospheric plug-ins.

Scripted Camera Plug-ins

Scripted Camera plug-ins can extend existing MAX cameras or create temporary camera plug-ins that can be used to host create tools for a custom camera system.

Scripted Geometry Plug-ins

Scripted Geometry plug-ins can be used to create new plug-ins with own create tools, or to create invisible, temporary, or extended Geometry plug-ins based on existing ones.

Scripted Helper Plug-ins

Scripted Helper plug-ins can only extend existing Helper plug-ins.

Scripted Light Plug-ins

Scripted Light plug-ins can only extend existing Light plug-ins.

Scripted Manipulators

Scripted Manipulators can be set up to manipulate parameters on objects, modifiers, controllers and nodes. A large set of functions are provided to give access to all aspects of Manipulator creation in MAXScript.

Scripted Material Plug-ins

Scripted Modifier Plug-ins

Scripted Material plug-ins can only extend existing Material plug-ins.

Scripted RenderEffect Plug-ins

Scripted RenderEffect plug-ins can be used to apply any changes to pixels of the incoming rendered image and return the resulting image when ready, or extend existing RenderEffect plug-ins See also related topic RenderEffect Progress Callback Mechanism

Scripted Shape Plug-ins

Scripted Shape plug-ins can only extend existing Shape plug-ins.

Scripted SimpleMod Plug-ins

A scripted SimpleMod plug-in is a deformation-type modifier that moves vertices around but does not change topology.

Scripted SimpleObject Plug-ins

A scripted SimpleObject is a kind of geometry primitive object that is defined by a tri-mesh. In a SimpleObject plug-in, you supply a handler for building this mesh and 3ds Max automatically handles scene display, hit-testing, ray intersection, rendering, modifier applicability, etc.

Scripted TextureMap Plug-ins

Scripted TextureMap plug-ins can only extend existing TextureMap plug-ins.

Scripted TrackViewUtility Plug-ins

Scripted TrackViewUtility plug-ins can be used to implement new Utilities to manipulate tracks and keys in TrackView. Their UI can be registered as child of the respective TrackView.

Example Scripts:

Extended Rect Shape Plugin

Illustrates the creation of Scripted Shape Plug-ins

lightMaster

Illustrates the application of Scripted Plug-in Methods. See also threeLights.

threeLights

Illustrates the application of Scripted Plug-in Methods. See also lightMaster.

Negative renderEffect

Illustrates the creation of Scripted RenderEffect Plug-ins

Normal Spline Modifier Plug-in

Illustrates the creation of Scripted Modifier Plug-ins

SaddleDeform simpleMod

Illustrates the creation of Scripted SimpleMod Plug-ins

SquareTube simpleObject

Illustrates the creation of Scripted SimpleObject Plug-ins

Supa Mod modifier

Illustrates the creation of Scripted Modifier Plug-ins

SupaGlass material

Illustrates the creation of Scripted Material Plug-ins

Super Blur FX renderEffect

Illustrates the creation of Scripted RenderEffect Plug-ins

Super Color Balance FX renderEffect

Illustrates the creation of Scripted RenderEffect Plug-ins

Super Fog Env atmospheric

Illustrates the creation of Scripted Atmospheric Plug-ins

Texture Plane SimpleObject

Illustrates the creation of Scripted SimpleObject Plug-ins with UVW Coordinates

Tower plugin

Illustrates the creation of Scripted SimpleObject Plug-ins

How To ... Create a MonoChrome RenderEffect

A simple example of a Scripted RenderEffect plug-in

How To ... Create Scripted Geometry Plug-in

An example of a Scripted Geometry plug-in

How To ... Create a Dalmatian TextureMap Plug-in

An example of a Scripted Texture Map plug-in in the famous polka-dot dog look

Back To

Locating Information in this Help File


Online Help Script Examples

The following sample scripts can be found at various places in this Help file as illustrations of certain features. They could be used directly or with small changes in the daily practice or as a starting point for your own scripts. This index should help you locate them quickly.

Sample Scripts

My First Utility Example

Shows the creation of simple Scripted Utility.

Skyscraper Extrusion

Illustrates the usage of EditablePoly extrususion functions

Atmospheric Effects Test Bed

Illustrates the creation of Atmospheric effects.

ListView ActiveX Control

Shows the creation and usage of the ActiveX ListView control by Microsoft.

Excel Spreadsheet ActiveX Control

Illustrates the creation and properties inpsection of an Excel Spreadsheet control.

IE Browser ActiveX Control

Illustrates the creation of an Internet Explorer ActiveX control in a rollout.

Windows MediaPlayer ActiveX Control

Shows the creation and usage of an ActiveX Windows Media Player control.

WinsockTester

Demonstrates the creation and usage of an ActiveX Winsock control.

Save Multi-Frame Image File

Shows the correct way for saving multi-frame image files.

Convert Bitmap to Script

Shows a way to convert a bitmap to MAXScript in order to distribute bitmaps as part of the script code.

NetRender Examples

Shows the correct way to work with the NetRender interfaces.

TrackBarKeyLimit

Implements a limit spinner to control the number of keys allowed to be displayed in TrackBar using a trackbar filter callback function.

Scripted Functions

Apply_Planar_Map_Function

Shows the application of planar mapping

CalculateVolumeAndCenterOfMass

Reimplements the Measure Utility's functionality for finding the Volume and Center Of Mass of Geometry Objects.

drawLineBetweenTwoPoints

Shows how to create a simple line between two points in space.

EdgeVerts

Returns the two vertices used by an edge.

FlipObjNormals

Flips all normals of an editable mesh by reversing vertex order.

getLocalFaceRotation

Returns the local face rotation as displayed in the Transform Type-In.

getFilesRecursive

Returns all files matching a pattern from a given root and all its subdirectories.

TimeFromSolarTime

Returns the time value stored in a Daylight_Slave_Controller

GetCamVFOV

Returns the Vertical FOV of a Camera

getFaceSmoothGroupB

Gets the EMesh Smoothing Groups

setFaceSmoothGroupB

Sets the EMesh Smoothing Groups

maybe_saveMaxFile

Shows a replacement function for saveMaxFile to check for existing files and prompting before overwriting.

maybe_saveNodes

Shows a replacement function for saveNodes to check for existing files and prompting before overwriting.

setNodeWorldRotation

Sets a node's rotation relative to world space

sortMultiSubById

Sorts the sub-materials of a Multi/Sub material by their Material IDs.

splitMeshByUVElements

Splits a mesh to elements based on the UVW Face Elements.

UpperCase_function

Converts a mixed case string to upper case.

MacroScripts

Free Camera Creation MacroScript

Illustrates the definition of Macro Scripts

GrabViewport MacroScript

Illustrates the use of gw.getViewportDib() to access and save the viewport bitmap.

PolyToElement MacroScript

Shows how to split every polygon in an EditablePoly into an Element.

Render to RamPlayer

Illustrates the usage of rollouts and rolloutFloaters in macroScripts

SubObject Vertex

Illustrates the definition of Macro Scripts

SuperExpertMode

Implements a Super Expert Mode with just the viewports and main menu visible.

Parameter Wire altExectute

Illustrates the definition of alternative execute handlers in MacroScripts

MicroListener

Illustrates the use of the Execute method to convert strings into MAXScript expressions.

Grow/Shrink/Loop/Ring Skin Selection

Implement Skin Selection Grow/Shrink, Loop and Ring ActionItems to be used in QuadMenus when skinning.

Editable Mesh Selection Converter MacroScripts

Edge2FaceSel

Convert Edge to Face Selection in Editable Meshes

Edge2PolySel

Convert Edge to Polygon Selection in Editable Meshes

Edge2VertSel

Convert Edge to Vertex Selection in Editable Meshes

Face2EdgeSel

Convert Face to Edge Selection in Editable Meshes

Face2VertSel

Convert Face to Vertex Selection in Editable Meshes

Vert2EdgeSel

Convert Vertex to Edge Selection in Editable Meshes

Vert2FaceSel

Convert Vertex to Face Selection in Editable Meshes

SelOpenEdges

Select Open Edges in Editable Meshes

Scripted Plug-ins

Extended Rect Shape Plugin

Illustrates the creation of Scripted Shape Plug-ins

lightMaster

Illustrates the application of Scripted Plug-in Methods. See also threeLights.

threeLights

Illustrates the application of Scripted Plug-in Methods. See also lightMaster.

Negative renderEffect

Illustrates the creation of Scripted RenderEffect Plug-ins

Normal Spline Modifier Plug-in

Illustrates the creation of Scripted Modifier Plug-ins

SaddleDeform simpleMod

Illustrates the creation of Scripted SimpleMod Plug-ins

SquareTube simpleObject

Illustrates the creation of Scripted SimpleObject Plug-ins

Supa Mod modifier

Illustrates the creation of Scripted Modifier Plug-ins

SupaGlass material

Illustrates the creation of Scripted Material Plug-ins

Super Blur FX renderEffect

Illustrates the creation of Scripted RenderEffect Plug-ins

Super Color Balance FX renderEffect

Illustrates the creation of Scripted RenderEffect Plug-ins

Super Fog Env atmospheric

Illustrates the creation of Scripted Atmospheric Plug-ins

Texture Plane SimpleObject

Illustrates the creation of Scripted SimpleObject Plug-ins with UVW Coordinates

Tower plugin

Illustrates the creation of Scripted SimpleObject Plug-ins

How To Tutorials:

How To ... Develop A Transform Lock Script

Developing a simple script for checking all Transformation locks.

How To ... Remove All Materials

Creating a very simple script removing all materials from the scene.

How To ... Quickly Rename Selected Objects

Developing a simple renaming utility to change the names of selected objects

How To ... Select Non-Quad Polygons

Example of accessing and selecting Polygons in an EditablePoly object.

How To ... Assign Materials Automatically

Shows how to use MAXScript callbacks to automate material assignment

How To ... Move Objects to a Surface

Shows how to use the intersectRay function to find surface points on objects.

How To ... Output Object Data To File

Shows the basic of writing object data to an external text file.

How To ... Output Geometry Data To Text File - Part One

Shows the basic of writing mesh geometry data to an external text file.

How To ... Read Geometry Data From Text File - Part One

Shows the basic of reading object data from an external text file.

How To ... Output Geometry Data To Text File - Part Two

Enhances the mesh geometry output script with support of smoothing groups, material ids and edge visibility.

How To ... Read Geometry Data From Text File - Part Two

Enhances the input script developed in Part One to support the new data added by the preceding tutorial.

How To ... Create a Quick Preview

Implements a simple viewport preview and automatic RAMplayer loading

How To ... Access the Z-Depth channel

A small experiment creating objects based on the Z-Depth of the camera

How To ... Create a MonoChrome RenderEffect

A simple example of a scripted RenderEffect plug-in

How To ... Create Custom Mesh Object

Shows how to create a custom mesh object

How To ... Create Scripted Geometry Plug-in

An example of a scripted geometry plug-in

How To ... Create a Dalmatian TextureMap Plug-in

An example of a scripted texture map plug-in in the famous polka-dot dog look

How To ... Access Windows System Data

Shows an approach to access system data that is not directly exposed to MAXScript

How To ... Sort TrackView Alphabetically

Shows an approach to sort the objects in the TrackView

How To ... Flatten a SplineShape

Example of modifying a slineShape by moving knots and bezier vectors

How To ... Draw a Freehand Spline

Example of drawing a spline with the mouse in the ground plane.

How To ... Enhance the Morpher Modifier With Floating Controls

Example of dynamic UI creation, time and change callbacks usage to create a floater with controls linked interactively to a Morpher modifier.

How To ... Change Objects At Render Time

An example of changing object properties at render time using callback scripts.

How To ... Develop a Vertex Renderer

An example of a scripted vertex realtime renderer.

How To ... Script Particle Flow

How To ... Transfer ParticleFlow Particle Motion To Scene Objects

An example of moving scene objects using Particle Flow particles.

How To ... Affect Particle Flow Particles by Mass

An example of applying a Force to particles based on their mass.

How To ... Develop a Bitmap Painting Tool In Nine Easy Steps

How To ... Develop a Bitmap Painting Tool - Basic Utility

The first step of the tool creation - The basic tool with a single point brush without strokes support.

How To ... Develop a Bitmap Painting Tool - Strokes Support

The second iteration of the tool adds continuous stroke drawing.

How To ... Develop a Bitmap Painting Tool - Brush Size and Color

The third iteration of the tool adds control over the size and color of the brush.

How To ... Develop a Bitmap Painting Tool - Airbrush and Shapes

The fourth iteration of the tool adds circular brush shape support and an Airbrush option with variable strength.

How To ... Develop a Bitmap Painting Tool - Smooth Brushes

The fifth iteration of the tool adds a brush with smooth falloff

How To ... Develop a Bitmap Painting Tool - Load and Save

The sixth iteration of the tool adds bitmap file loading and saving. Finally, you can store your work of art to disk!

How To ... Develop a Bitmap Painting Tool - Erase Changes

The seventh iteration of the tool adds an eraser option to the right mouse button and a Commit Changes menu option to permanently bake the changes to the image.

How To ... Develop a Bitmap Painting Tool - Unwrap UV Coordinates

The eight iteration of the tool adds UV texture coordinates unwrapping and realtime updates of the bitmap as diffusemap on a selected object.

How To ... Develop a Bitmap Painting Tool - 3D Painting

The ninth iteration of the tool adds 3D Painting on a selected object in the viewport.

How To ... Develop a Selected Objects Inspector using ListView ActiveX Control

How To ... Develop a Selected Objects Inspector using ListView ActiveX Control - Part One

This tutorial will demonstrate how to set up an ActiveX Control in a MAXScript rollout to display details about selected scene objects

How To ... Develop a Selected Objects Inspector using ListView ActiveX Control - Part Two

This second tutorial will demonstrate how to customize the ListView ActiveX Control defined in Part One and update the display automatically when the selection set changes

How To ... Develop a Scene Browser using TreeView ActiveX Control

How To ... Develop a Scene Browser using TreeView ActiveX Control - Part One

This tutorial will demonstrate how to set up an ActiveX Control in a MAXScript rollout to display the hierarchy of the 3ds Max scene nodes.

How To ... Develop a Scene Browser using TreeView ActiveX Control - Part Two

The second tutorial will demonstrate how to customize the TreeView ActiveX Control defined in Part One by adding icons, colors and checkboxes to display and control the hidden state of scene nodes.


Learning MAXScript

Welcome to Learning MAXScript. This introductory reference helps you get started using MAXScript, the scripting language that is built into 3ds Max.

Learning MAXScript can be used as an introductory reference. However, it is most useful if read straight through as a tutorial. You can follow the examples in this reference by using drag-and-drop or copy-and-paste to bring the code from this document into the MAXScript Listener. You can also type in your own text and start experimenting with MAXScript as you learn it.

In addition, the "How To" tutorials chapter will introduce you to some simple real-world examples with detailed comments and links to the definitions of used methods and functions.

Getting Started

Accessing MAXScript

Source Code Layout

Entering Information into MAXScript

Assigning Variables

Mathematical Operations in MAXScript

Manipulating The Box - First Steps in MAXScript

Drawing a Box with MAXScript

Modifying the Box

Applying Standard Transformations

More Box Transformations

Creating Your Own Scripts

The Script Editor

Controlling Program Flow in Scripts

Defining Custom Functions

Structure Definitions

max Commands in MAXScript

Saving your Commands in a Script File

Loading and Running Your Script File

Learning From Other Scripts

Loading Other Scripts

Learning MAXScript by Walking Through a Script

Learning MAXScript with the Macro Recorder

MAXScript for New and Casual Users

MAXScript for New and Casual Users

Scripted Utilities for New Users

MacroScripts for New Users

Scripted Plug-ins for New Users

Scripted Functions for New Users

MAXScript DLX Extensions for New Users

FAQ:

Frequently Asked Questions

'How To' Tutorials:

How To - Introduction to the Tutorials

Sample Scripts:

Online Help Script Examples

Navigation Help:

Locating Information in this Help File

Using the HTML Help Viewer


Accessing MAXScript

MAXScript is the built-in scripting language for 3ds Max (version 2.0 or higher.) Because of this, you can use MAXScript only when 3ds Max is running. There are several ways to access MAXScript from within 3ds Max.

You can open the MAXScript Listener from the MAXScript menu in the Main Menu: MainMenu > MAXScript > MAXScript Listener. Note that the default keyboard shortcut to the MAXScript Listener, F11, is also listed next to the menu item. You can press F11 anytime to open the MAXScript Listener.

You can also right-click the Mini-Listener which is located in the lower left corner of the 3ds max UI. The right-click context menu will provide you with the option to open the MAXScript Listener window.

Another way to open the MAXScript Listener is as follows:

  1. On the Command panel, choose Utility, and click MAXScript.

The MAXScript rollout appears:

  2. Click Open Listener.

The MAXScript Listener window appears with its Welcome message.

HISTORICAL NOTE:

This was the original and only way to access MAXScript in its first implementation in 3ds Max 2.x, but the other methods described above which were introduced in 3ds Max 3 provide much faster access.

The MAXScript Listener

The MAXScript Listener window is an interactive interpreter for the MAXScript language and works similarly to a DOS command prompt window. You can enter MAXScript commands in this window and press the numeric ENTER key to execute them immediately.

For more details on the MAXScript Listener, see The MAXScript Listener Window topic.

The MAXScript Mini-Listener

The left end of the status bar contains a resizable Mini Listener.

If the Mini Listener is not visible, drag on the vertical split bar at the left edge of the status panel to reveal this feature. The Mini Listener panes act as single-line sliding windows for the current line in corresponding Listener panes. The Mini Listener panes always show what you are typing or where the cursor is placed in the Listener panes. Conversely, anything you enter into a Mini Listener pane is entered into the corresponding Listener pane at the current cursor position.

For more details on the Mini-Listener, see The MAXScript Listener Window topic.

Next Topic

Source Code Layout


Source Code Layout

The layout rules for MAXScript code are unlike those of most programming languages. MAXScript gives you the advantage of freeform languages, such as C and C++, without the need for extensive punctuation.

MAXScript lets you break statements and expressions across lines wherever you want. The line break can be in the middle of an expression. MAXScript reads your code until the end of each line and determines whether it has a complete expression. If it does not, it continues to read subsequent lines until it finds the rest of the expression.

Take as an example the following line:

a + b * c / d - e + f * g / h

This line can be broken after any of the operators. MAXScript continues to read the next line, because an operator needs another argument.

FOR EXAMPLE:

a + b * c / d - e +

f * g / h

You cannot break the example line as shown next and get the same result, because the expression on the first line is a complete expression. MAXScript considers the two lines as separate expressions, and the second line is now syntactically wrong, because it starts with an operator:

WRONG SYNTAX:

a + b * c / d - e

+ f * g / h

If you do want to break a line at the end of a sub-expression, you can use the backslash line continuation character: ‘\’. The previous example of an invalid break can be made valid using the line continuation character after the ‘e’:

FOR EXAMPLE:

a + b * c / d - e \

+ f * g / h

Whenever MAXScript encounters a ‘\’ as the last character on a line (except for spaces, tabs, or comments), it continues to read the next line as though the break were not present. Line continuations can be useful for breaking up long or complex lines of code, making them easier to read.

MAXScript also lets you combine multiple statements and expressions in a single line. The statements or expressions are separated with a ‘;’,

FOR EXAMPLE:

Sometimes it is useful to enter comments within your script to provide guidance or context. You can enter comments in MAXScript by preceding your comment with a double-hyphen (‘--‘). As soon as MAXScript reaches the double-hyphen, it stops evaluating the rest of that line.

FOR EXAMPLE:

Next Topic

Entering Information into MAXScript


Entering Information into MAXScript

There are several different types of information that you will typically want to enter into the MAXScript Listener window. These include numeric values, strings, and arrays.

Information is generally entered into MAXScript by typing a value or expression and pressing the numeric ENTER key, or the alternative key combination SHIFT+RETURN.

However, each type of information must be entered in a slightly different way.

Entering Numbers in MAXScript

MAXScript distinguishes between two types of numbers: integers and floats. An integer is a whole number, such as 0, 1, 2, 10, 527. Floats are floating-point numbers and contain decimal points, such as 2.5, 72.0, and 0.33.

When MAXScript performs numerical operations, the result is generally the same number-type as the arguments in the operation. For example: 3 + 4 will return 7, while 3.0 + 4.0 will return 7.0.

When MAXScript performs operations involving both float and integer-type numbers however, it treats the integer as a float number. For example: 3 + 4.0 will return 7.0.

Entering Strings in MAXScript

MAXScript is an expression-based language. All of its constructs yield a value. Strings are MAXScript constructs, and they are entered inside quotation marks. The command output for a string, meaning the value a string yields in MAXScript, is the string itself.

With the MAXScript Listener window open, say hello to MAXScript:

  1. At the prompt, type Hello and press ENTER on the numeric keypad.

MAXScript answers with undefined. This is called command output, which always appears in blue. The reason for this specific output is that MAXScript doesn’t know the word Hello. It is not defined in the language and therefore MAXScript cannot determine what to do with it.

  1. Write the word "Hello" again, this time with quotation marks, and press ENTER.

The command output is now "Hello".

It seems that MAXScript knows the string "Hello" because it answers with a friendly "Hello" Actually, it merely knows that you entered a string, and the command output for strings is always the value of the string you entered.

Entering Arrays in MAXScript

You can use an array to group several elements into one collection. An array is an ordered collection of values. In MAXScript, each element in the array can contain any type of value, and all of the elements can be accessed individually.

An array can be expressed in two forms. The first is:

#()

This is the most basic type of array: an empty one. It is important to note that all arrays must be defined with the number character (#) and a pair of parentheses.

#( <expr> , <expr> )

This form of the array is appropriate when you would like to define one or more of the initial elements within the array. Each value of <expr> can be a number, an expression (e.g., sin pi, 6.2^3), or a string (e.g., "hello"). Elements do not have to be the same type of information, and there is no limit on the number of elements you can have in an array.

Next Topic

Assigning Variables


Assigning Variables

In the previous lesson , you entered the string "Hello" in MAXScript, and MAXScript displayed the same string as its command output. When you enter other strings, MAXScript displays them and forgets about the previous ones. To make MAXScript remember the value of a string, assign it to a variable.

The general syntax for assigning a variable in MAXScript is:

variable_name = variable_value

A variable_name starts with an alphabetic character or "_" (underscore), followed by any number of alphanumeric characters. The variable_value can be a string, a number, or any other expression.

To assign a string to a variable:

  1. At the Listener prompt, enter the following command:

mystring = "This is my string."

MAXScript returns the value of the string variable:

  1. You can now refer to this string variable by entering the variable’s name. Enter mystring.

MAXScript again returns the value of the string variable:

This is faster than entering the string again. MAXScript remembers this string for as long as your 3ds Max session is open, or until you change the variable’s value.

To assign a new value to an existing variable:

  1. Enter mystring = "This is not your string."

MAXScript now displays the new value of mystring:

  2. When you refer to mystring now, MAXScript uses the new value. Enter mystring.

MAXScript now displays the new variable value:

Notice that MAXScript doesn’t distinguish between lowercase and uppercase variable names because MAXScript names are not case-sensitive.

Next Topic

Mathematical Operations in MAXScript


Mathematical Operations in MAXScript

Besides strings, you can enter other types of data into MAXScript. MAXScript not only recognizes numeric characters as numbers, it can also perform mathematical operations with them. As with strings, if you just enter a number by itself, MAXScript echoes it back to you; it evaluates the number and displays its value. Mathematical operations are more interesting.

Basic Mathematical Operations

MAXScript has many built-in functions that let you use MAXScript as a calculator.

Enter 36.5 * 2, for example, to see what a certain dimension needs to be if you want to double it.

MAXScript returns the result of the calculation. This is useful for quick calculations where loading an external calculator program doesn’t seem worth the trouble.

MAXScript also recognizes several mathematical constants. Enter pi.

MAXScript knows the value of pi and returns it.

You can use this value in more complex operations. For example, if you want to know the volume of a sphere with a 2.5-inch radius, multiply the cube of the radius by pi, then multiply by 4 and divide by 3. Enter 4/3 * pi * 2.5^3 .

Operations with Strings

You can also perform some simple mathematical operations with strings. For example, if you have defined a="MAXScript" and b=" is fun!", entering a+b returns "MAXScript is fun!"

For more string operations, see the String Values topic in the MAXScript reference.

Additional Mathematical Operations

MAXScript is able to perform many mathematical operations, including most trigonometric functions (sin, cosh, atan) and transcendental functions (exp, log, sqrt). This topic introduces two of the most useful operations: random numbers and incrementing. For a complete list of the operations supported by MAXScript, see the Number Values topic in the MAXScript reference.

Creating Random Numbers

One very useful mathematical operation in MAXScript is the random number function. It returns a pseudo-random number selected inclusively between two user-specified arguments.

EXAMPLE

random 1 100

returns a random integer between 1 and 100. The return value type (Float or Integer) is the same as the type of the first argument in the function, therefore if you enter

random 1.0 100

MAXScript returns a random float between 1.0 and 100.0

NOTE:

For reasons beyond the scope of this tutorial, the random command will generate the same ‘random’ numbers each time a script is run. This happens if you restart the software and run the script, but not if you run the script over and over. If you want the values created by the random function to change each time you start the software, you can use the seed command:

seed <number>

where <number> is any float or integer. Each time you change the seed value, MAXScript generates new ‘random’ numbers.

Incrementing

Another useful mathematical operation that MAXScript provides is incrementing. This is a shorthand form of assignment that can be used to modify a value in place, as shown in the following long form examples:

x = x + 1

There are assignment operators corresponding to the four math operations (+,-,*, and /) that apply the operation to the assignment’s destination with the result. Their syntax is:

<destination> += <expr> -- add <expr> to destination

<destination> -= <expr> -- subtract <expr> from destination

<destination> *= <expr> -- multiply destination by <expr>

<destination> /= <expr> -- divide destination by <expr>

Using this shorthand form of assignment, the previous example can be written as:

x += 1

Next Topic

Drawing a Box with MAXScript


Drawing a Box with MAXScript

In the previous lessons you have seen some of MAXScript’s useful capabilities; however, nothing that is visible in the interface. MAXScript is also useful for working with regular objects, such as boxes or cylinders. You can draw a box in MAXScript just by entering the box() command:

box()

This creates a box with the default parameters. It is generally better practice to assign an object to a variable, so you can later refer to it by name and manipulate it using that name:

mybox = box()

When you use MAXScript to create an object without specifying any parameters, it is important to use empty parentheses, "()". This tells MAXScript to use the default parameters for the object. If you want to specify any of the parameters during creation, such as the size or location of the object, you do not need parentheses.

FOR EXAMPLE:

mybox = box length:20 width:20 height:20

MAXScript returns the box object name and the position of the box:

This example creates a box, and supplies three parameters: the length, width, and height of the box. The parameter names are followed by a colon and then by the value for that parameter. You can enter all parameters, without any punctuation between them. MAXScript returns the following statement:

$Box:Box01 @ [0.000000, 0.000000, 0.000000].

The first part of the statement is called a pathname. A pathname in MAXScript is similar to a pathname in Windows, such as c:\3dsmax\examples\file.max, which represents a path through a hierarchy of directories pointing to a particular file. In MAXScript, a similar path concept is used. However paths in MAXScript end up pointing to objects, not files. Pathnames in MAXScript always begin with the "$" character. For more information on Pathnames, see the Pathname Literals topic in the MAXScript reference.

The second part of the statement is the object name: Box01, in this case. This name appears in the Select Object dialog when you use the [image] Select by Name toolbar button in 3ds Max. It is not the name of your box variable, which is mybox. This variable is merely a placeholder that points to the object, Box01.

The values inside the brackets represent the x, y, and z coordinates of the center of the box.

MAXScript also draws the box in the viewports, as shown in this perspective viewport:

Notice that you can use [image] Undo (as you can with most MAXScript creation and modification commands) to remove the box from the scene.

Next Topic

Modifying the Box


Modifying the Box

In the previous lesson , you created a box by assigning it to a named variable. Because you used a variable for the box, you can now access all of the box’s properties easily. The variable name mybox is the handle to your box. To access the properties of the handle, append a "." (period), and then the property name. For example, mybox.height can be read as "the height of mybox."

All 3ds Max objects have creation parameters such as width, length, and height for boxes, or radius for circles. These objects also have transformation properties, such as scale, rotation, or position, and general properties like name, wireColor, etc. To change any of these properties, you can set the property to a new value.

Changing Object Properties

Object Name

If you don’t like the default object name Box01, you can change the name property of the box:

Enter mybox.name = "BlueBox" in the Listener window and the software renames the box. You can see the new name in the Name edit box when you go to the Modify panel:

Color

The software assigns the color of objects randomly at creation time. Therefore, the color of your box is not necessarily blue. In this case, BlueBox wouldn’t be an appropriate name for your box. However, you can change the color of your box to match the name:

Enter mybox.wireColor = blue and watch the box in your viewports turn blue. You may have to select the box again to reflect the new color in the color swatch next to the object name in the Modify panel.

The color blue is a predefined color constant in MAXScript and its RGB value is defined as (0,0,255). The other predefined color variables are red, green, white, black, orange, yellow, and brown. Instead of using a predefined color, you can assign a color with different RGB values, such as:

mybox.wireColor = (color 255 0 255)

Notice the special syntax for entering specific color values. The example shown would change the box to magenta. If you entered this command, click [image] Undo to change the box back to blue.

For more information on colors, see the Color Values topic in the MAXScript reference.

Position

You can change the position of the box by changing the box’s position property. You refer to the position property for this example box with mybox.pos. The position is expressed as the X, Y, Z coordinate. For example [0,-75,0]. Bring the box forward by entering mybox.pos = [0,-75,0] and watch the box jump forward in the perspective view:

Click [image] Undo to move the box back to the origin.

Size

To make the box bigger, you can use the scale property of the box:

Enter mybox.scale = [1.5,1.5,1.5] to see the box resized to 1.5 times its original size.

The scale property requires a scaling factor for each of the X, Y, and Z axes, or, in this case, the width, length and height of the box. You don’t have to use the same value for each axis unless you want to resize the box uniformly.

If you want to change the scale to affect only the height and the width, but not the length, use the following

EXAMPLE:

mybox.scale = [1,3,2]

When you scale your original [20,20,20] box by any factor, the box’s parameters are still 20 for width, 20 for length, and 20 for height. You can see this when you open the Modify panel. The box parameters are not changed by the scale transformation:

Although altering the height and width properties of the box achieves the same result, visually, the above scale modification is not equivalent to using the following two commands:

mybox.height = 40 -- 2 times the original 20 units
mybox.width = 60 -- 3 times the original 20 units

The reason for this is that changing the height property of the box changes the creation parameter of the box’s height. Using the scale property to transform the height of the box does not.

Again, the effect of using either method is visually the same. However, when you want to maintain the original creation parameters of an object (so that you can alter them even after a number of different transformations), you must use the scale property to manipulate the size of the box, not the individual creation properties.

If you entered the last two commands, click [image] Undo twice to change the box back to its original height and width.

Finding Additional Parameters

The Parameters rollout shows all the creation parameters for a box. You can change them using the spinners in the rollout. If you want to change the value of the length, width, and height segments, or the setting of the mapping coordinates in MAXScript, you need to know the syntax for these parameters. In order to find the syntax for all of the parameter settings, there are two different inspector functions. The first of these is showclass().

The showClass() function prints information about a specified 3ds Max class or classes. The information entered in the parentheses is a string containing a wild-card pattern to match against 3ds Max class names, superclass names, and property names.

ENTER:

showclass "box.*"

MAXScript shows all the box parameters that are equivalent to the ones you see in the Parameters rollout, including which object class the box object belongs to, and the data type that each parameter requires:

Notice that you can use the "*" character as a wildcard to see all box parameters. If you had entered showClass "box*.*," MAXScript would have listed all of the parameters of the Box and the BoxGizmo classes.

EXAMPLES:

showClass "box*" -- all 3ds max classes starting "box"

showClass "box.*" -- all the accessible properties of the box class

showClass "*:mod*" -- all the modifier classes

showClass "*.*rad*" -- all the classes with a property name containing "rad"

The second inspector function is showProperties(). The showProperties() function is used to display the properties for a specific object that is an instance of one of the 3ds Max classes. It can be used in place of showClass() in situations where you have an actual object in hand. Unlike showClass(), it can display the dynamic properties that may appear in individual objects as you work on them in the scene.

To learn more about these functions, see Class and Object Inspector Functions .

Next Topic

Applying Standard Transformations


Applying Standard Transformations

Now that you know how to create and modify the basic properties of a box, you need to learn how to apply the standard transformations (move, scale, and rotate) to it. It is possible to designate position, size, and orientation when the box is created; however, you can also carry out these operations after you have created your object, just as you would in 3ds Max.

Moving the Box

Moving an object in MAXScript is very simple:

move name_obj [<x,y,z>]

where name_obj is the name of the object you want to move and <x,y,z> is the amount you want it to move. It is important to note that you are not moving the object to <x,y,z>, but by the amounts <x,y,z>. Therefore, if you apply the move function more than once, the object continues to move. This is also true for the scale and rotate transforms. This is in contrast to setting a property of an object. If you set the object position, scale, and rotation properties several times, the object won’t change, assuming that you assign the same value each time.

FOR EXAMPLE:

mybox.pos = [10,0,0]

mybox.pos = [10,0,0]

mybox.pos = [10,0,0]

will only change the position of your box after the first line is executed. The second and third lines do not affect the position of your box, as they do not change the position of the box.

If you entered the above commands, click [image] Undo three times to move the box back to its original position.

ON THE OTHER HAND, ENTERING

move mybox [10,0,0]

move mybox [10,0,0]

move mybox [10,0,0]

will move your box 30 units along the X-axis.

If you entered the above commands, click [image] Undo three times to move the box back to its original position.

Scaling the Box

Scaling is performed in a similar manner:

scale name_obj [<x,y,z]

where name_obj is the name of the object and <x,y,z> is a 3D coordinate that corresponds to the amount you would like to scale the object along the X, Y, and Z-axis, respectively. Again, the scale transformation is different from the scale object property. Setting the object’s scale property (name_obj.scale = …) repeatedly with the same values will only scale the object the first time, but applying the scale transformation repeatedly will continue to scale the object.

Rotating the Box

The rotate transformation is not as simple as the move and rotate transforms. In fact, there are three ways to rotate an object in MAXScript:

Euler Angles

Quaternions

Angleaxis

This document will only consider Euler Angles. If you would like further information on any of these transformations, see the MAXScript reference.

To apply a rotation transform in MAXScript, you must first define the rotation as a sort of rotation object, and then apply the rotation object to the object you want to rotate. The rotation object is defined in the following way:

rot_obj = eulerangles x y z

where rot_obj can be any name and x, y, and z represent the amount you want to rotate your object (in degrees) around the X, Y, and Z-axes, respectively.

FOR EXAMPLE,

rot_box = eulerangles 0 30 0

creates an object called rot_box, which will rotate an object around the Y-axis by 30 degrees. This rotation can be applied to your box in the following way:

rotate mybox rot_box

In fact, this rotation could be applied to any object by writing the same line as above and replacing mybox with the name of the object you want to rotate.

If you entered the above commands, click [image] Undo to move the box back to its original position.

IF YOU DESIGNATE ANGLES FOR MORE THAN ONE AXIS:

rot_box2 = eulerangles 30 45 60

The rotation is applied to an object, with the X-axis rotation occurring first, followed by the Y-axis rotation, and then the Z-axis rotation.

NOTE:

Moving, scaling, or rotating objects, or setting transform-related properties operates in the World Coordinate System, by default. If you want to perform these transformations in another coordinate system, see Coordsys .

Next Topic

More Box Transformations


More Box Transformations

The following lines prepare our box for more complex transformations. They change the number of box segments on all sides, and put a check mark into the Generate Mapping Coords. box in the Parameters rollout:

ENTER THE FOLLOWING FOUR LINES OF CODE:

mybox.lengthsegs = 10

mybox.widthsegs = 10

mybox.heightsegs = 10

mybox.mapCoords = true

MAXScript has changed the appropriate settings in the Parameters rollout:

Any time you change a property of a 3ds Max object, MAXScript immediately reflects the change in the scene and in the user interface.

You can also create modifiers and add them to an object.

Creating and Assigning Modifiers

Creating a Modifier

Creating a modifier is pretty simple. You use the addModifier command and specify the name of the modifier you want to use and its appropriate parameters.

To create a Twist modifier set at 30 degrees and apply it to your box, you would enter

FOR EXAMPLE

addModifier mybox (twist angle:30)

The box in your Perspective viewport is now twisted and the interface shows the new Twist modifier in the modifier stack display, together with its parameters:

Changing a Modifier

Changing a modifier is similar to changing a creation parameter. Again, because you used a variable name for your object, and you added a modifier to that object variable, you now have easy access to the new modifier properties of your object.

To change the angle of the twist modifier to 60 degrees,

ENTER

mybox.twist.angle = 60

The twist of your box is now more pronounced and the Angle parameter of the Twist modifier displays the new value:

From here on, you can add and change other modifiers as you like. The syntax is the same for all modifiers. To find out the names of other modifiers, search for the "Modifier : MAXWrapper" topic in the MAXScript Reference.

If you entered the above commands, click [image] Undo twice to bring the box back to its original state.

Animating the Box

MAXScript has several syntax forms that mirror the main UI tools, such as the Auto Key button, the time slider, and the active coordinate system.

In the following example, you turn on the Auto Key button, set the slider to several different values, and adjust the properties of your box, just as you would do using the software’s UI:

EXAMPLE:

animate on

(

at time 0 (mybox.pos = [-100, 0, 0]; mybox.scale = [1, 1, 0.25])

at time 100 (mybox.pos = [100, 0, 0]; mybox.scale = [1, 1, 3])

)

Drag the slider around, and you will see that MAXScript has animated the box, and placed keyframes at 0 and 100.

When you use MAXScript to animate objects, the actual Auto Key button in the UI does not come on, nor does the time slider move; these things happen within MAXScript.

In this example, the time was given as a simple number. If no unit is specified, MAXScript interprets this as a frame number. You can also use one of the various time literals in the following manner:

EXAMPLES:

2.5s -- 2.5 seconds

20f -- 20 frames

4800t -- 4800 ticks = 1 sec

1m3s5f -- 1 min, 3 seconds, 5 frames

1:15.5 -- SMPTE: 1 min, 15 seconds, 5 frames

NOTE:

All times are automatically converted to frames.

HISTORY:

In the early version of 3ds Max, the User Interface featured a button called Animate which performed the same function as the current Auto Key button. For this historical reason, the MAXScript context for creating animations is called Animate and not Autokey.

Next Topic

The Script Editor


The Script Editor

Now that you have explored the beginnings of object creation and manipulation , the next step is programming. MAXScript is a programming language at heart, and two of the most important concepts necessary for mastering MAXScript are conditional statements and loops.

At this point, real script writing comes into play. From the Main Menu > MAXScript menu item, select "New Script". A new MAXScript editor window will open. In this window, you can create, edit, save, and load scripts.

Another way to open a new script is the "New Script" button in the MAXscript Utility in the Utilities tab.

Other than the Listener, you can open many scripts as tabs inside the Edutor and work on multiple scripts at a time, copy and paste code between them etc.

Thus far in this tutorial, you have been performing all of the script examples in the MAXScript Listener, however when you are writing or editing a script of your own, you will use the Script editor.

The main difference between the Script Editor and the Listener is that the Listener can only evaluate one set of information at a time. In contrast, you can enter long, complex scripts in the Script Editor and evaluate them piece-by-piece or all at once.

Scripts are entered using the same syntax and rules, however they are not executed upon pressing ENTER. In order to execute the entire script, use "Evaluate All" from the Tools Menu of the Script Editor, or press CTRL+E. You can also execute scripts several lines at a time by highlighting the lines you want to execute and pressing SHIFT+ENTER, or ENTER on the numeric keypad.

Navigating the Script Editor

The Script Editor contains several useful tools for navigating and error-checking large scripts.

Tabs and Indentation

You can use the TAB key to control the indentation in your script. This makes it easier to read the script and to keep track of opening and closing parentheses used to create blocks of commands.

In contrast to some simpler text editors, selecting multiple lines and pressing TAB will not delete the lines but indent them as a block.

To move the selected line(s) back one tab position, you can press SHIFT+TAB.

If you press the RETURN key to add a new line while inside an indented block in your script, the newly inserted line will respect the indentation and will also use the same number of tabs as the surrounding code lines. If you want the new line to be less indented, you can press the BACKSPACE key one or more times to remove one or more Tabs.

Optionally, you can also display the tabs and other "white spaces" by pressing CTRL+SHIFT+8 to make it easier to see and correct the formatting.

CTRL-Right Click Navigation

Pressing CTRL+Right Mouse Button will open a right-click menu which allows you to jump to any specific event, UI item, function or rollout definition in the script. Selecting an entry from this menu will reposition the editor at the code line containing the definition of the selected item.

Bracket Balance

In complex scripts, it is common to lose track of blocks of commands, causing you to add extra parentheses or leave them out. You can find these errors by pressing CTRL+SHIFT+B. MAXScript will highlight the block that your cursor is on, showing you the start and end parentheses. Pressing CTRL+B will jump the cursor to the matching parenthesis. Also, the Editor will show by default guides connecting pairs of parentheses, making it easier to see the relationships.

Color Coding

MAXScript will display different elements of your script in different colors, making it easier for you to navigate your script at a glance. Since 3ds Max 2008, the color coding is based on data exported from MAXScript directly into the listener, thus all kinds of keywords, functions, interfaces, object names and so on are recognized automatically and colored accordingly.

The color coding is performed dynamically, but can be switched off by using SHIFT+F11 or Language>Text from the menu. Select Language>MAXScript to enable the color coding again.

See also

MAXScript Tabbed Editor Window

MAXScript Editor Commands

Next Topic

Controlling Program Flow in Scripts


Controlling Program Flow in Scripts

MAXScript provides commands that allow you to control the path that the software follows it evaluates your script. The two most useful groups of commands are the conditional statements and loop statements.

Conditional Statements

Conditional statements simply tell MAXScript to perform a specified command if a certain condition is met.

FOR EXAMPLE

if mybox.height == 10 then mybox.width = 20

This changes the width of your box to 20 if its height is equal to 10. You may have taken note of the double equal sign used in the statement above. This is discussed at the end of this topic.

This "if…then…" statement can be expanded to include an "else " statement.

FOR EXAMPLE

if mybox.height == 10 then mybox.width = 20 else mybox.width = 10

This statement tells MAXScript to change the width of your box to 20 if its height is 10, otherwise change the width to 10. The "if", "then" and "else" portions of the statement can all be on separate lines,

FOR EXAMPLE

if b.height == 10

then b.width = 20

else b.width = 10

If you are entering these commands into the Listener window, you may notice that the commands are not executed line by line, as is typical of the Listener. This is because the Listener recognizes that the "if" statement requires a "then" statement to be complete. In fact, the Listener does not execute the statement after the "then" statement, because it does not know if you intend to include an "else" statement. For this reason, the Listener does not execute an "if…then…" statement until you have either entered a "then" statement or after the next line you type, following the "if…then…" statement.

The double equal sign in the last statement, "==" tells MAXScript to compare two values. The single "=" sign always signifies assignment. This is common in many standard programming languages, such as C++. There are several different conditional parameters used in MAXScript. They are listed here:

  • == equal to

  • != not equal to

  • > greater than

  • >= greater than or equal to

  • < less than

  • <= less than or equal to

Note: Any time MAXScript evaluates a conditional expression, the result is either true or false. MAXScript temporarily stores the value of this result. In an "if…then" statement, MAXScript uses this result to determine the path to follow in the statement. If the result of the "if" statement is true, MAXScript will evaluate the "then" expression. If the result is false, MAXScript will evaluate the "else" expression, assuming one is specified; otherwise, it will cease evaluating the conditional statement. In some scripts, you might see the words on and off used in place of true and false, respectively. These words are interchangeable and they mean the same thing to MAXScript.

Loops

Loops are repetitive operations that tell MAXScript to repeat the execution of a collection of commands. Loops are useful for working with large groups of objects, as you can make changes to many objects with one set of commands. For example, if you wanted to make 50 boxes, you could use a loop to execute the create command 50 times, rather than creating the boxes with 50 separate commands. Loops are also useful for changing the properties of multiple objects.

There are several different types of loop. The first to be considered are for and while loops.

For Loops

The for loop iterates through a range of numbers, time values, or a sequenced collection of values, such as an array or object set.

Use a for loop to copy the box,

FOR EXAMPLE

for i = 1 to 5 do

(

box_copy = copy mybox

box_copy.pos = [i * 50, 0, 0]

)

Everything inside of the parentheses makes up a "block". All loop statements must be created as a block. This statement executes five times. Each time, a new box is created.

A for statement starts with the word ‘for’. Next, you must define how many times the statement will repeat. In this case, you have used the variable "i" to control the loop. The line, "for i = 1 to 5" tells MAXScript to set the variable "i" to the value 1, execute the contents of the loop statement, then set the variable "i" to 2, execute the loop contents, and so on. The variable "i" is called the index for the loop. Each time the loop executes, the index is incremented by 1 automatically, without requiring any user input. Each repetition of the loop is called an iteration. To make MAXScript increment the index by a value other than 1, insert ‘by x’ after the index statement, where x is the amount to increment the index.

The following statement will set the index to 1, then 3, then 5,

FOR EXAMPLE

for i = 1 to 5 by 2 do

(

box_copy = copy mybox

box_copy.pos = [i * 50, 0, 0]

)

The "do" keyword tells MAXScript to execute the following block or statement each time the loop repeats. Note that in some loops you might see the word "in" in place of the equal sign, "=". These both mean the same thing in for loops, and can be used interchangeably. Note how the index was used within the loop statement to set the position of each new box. This is a useful way to work with multiple object creation.

For loops can also be used to build arrays and/or access values within an array. In the following example, you use a for loop to build an array called ‘arr’:

Remember that because MAXScript is an expression-based language, you are able to use expressions in variable assignment, as seen above in the assignment of the for loop expression to the variable, arr. Note the ‘collect’ statement in the for loop above. This tells MAXScript to collect the results of each iteration in an array, rather than just calculate them. In this case, you only asked MAXScript to collect the value of the index; however, you can collect iterations of any expression.

Finally, for loops can also perform iterations with the contents of an array. In the following example, you use a for loop to access the values of the array you created in the previous example:

The ‘print’ command is a MAXScript function that displays the specified variable in the Listener window. In this example you used ‘in’ instead of an equal sign; however, they are still both acceptable, even when accessing values within an array.

NOTE:

You can also access the number of elements in an array with the .count property.

FOR EXAMPLE

the previous example could have been written as:

for i = 1 to arr.count do print arr[i]

This will return the same result.

While and Do Loops

While and Do loops are used to repeatedly execute an expression until a test expression evaluates as false. The while and do loop are simple variants of one another.

The syntax is:

do <expr> while <expr> -- do loop

while <expr> do <expr> -- while loop

The following example will return the value of a variable, incrementing the variable by -1 with each iteration.

FOR EXAMPLE

x=10

while x>0 do print (x-=1)

RETURNS

9

8

7

6

5

4

3

2

1

0

0

MAXScript automatically returns the final value of the loop to the Listener. In this example, MAXScript is also instructed to return the value at each iteration of the loop; therefore, the final value is returned twice.

Both loops repeat the do<expr> as long as the while<expr> evaluates to the value true. The do form evaluates the do<expr> at least at least once, before evaluating the text expression at the end of the loop. The while form evaluates the test expression at the start of the loop, and might not loop at all.

Both forms return, as their value, the result of the do<expr> from the last successful loop iteration. The while form returns the value undefined if the test expression immediately returns false.

FOR EXAMPLE

x=10

do print (x-=1) while x>10

RETURNS

9

undefined

HOWEVER

x=10

while x>10 do print (x-=1)

RETURNS

undefined

Next Topic

Local and Global Variables


Local and Global Variables

In MAXScript, there are two classes of variables that you can create: "local" and "global" variables. When a variable is global, it means that the variable can be used anywhere in the program. The only place you cannot use a global variable is before you have defined it.

For example, the following lines will produce an error:

sphere radius:rad

global rad = 10

The variable "rad" does not exist until it has been defined.

The following is an acceptable form of the previous lines:

global rad = 10

sphere radius:rad

Now that "rad" has been defined, MAXScript was able to use it in the definition of a sphere. In fact, since "rad" is a global variable, it can be used throughout the rest of the script.

There are several global variables that can be used without defining them first. They are the system global variables, which have already been created and assigned to a default value. Most of these variables can be reassigned to different values. For more information on the system global variables, see the 3ds Max System Globals topic in the MAXScript reference.

Unlike global variables, local variables can be used only within the block in which they are defined. A block is a grouping of MAXScript code, such as the statements within loops and conditional statements.

HERE IS AN EXAMPLE OF A FOR LOOP

for i = 1 to 3 do

(

local rad = 10

s = sphere()

s.pos.x = i * 10

s.radius = rad

)

Local variables can only exist within a block. For this reason, they must be created in a block. If you try to define a local variable from the top level of MAXScript, you will receive an error message.

In the previous example, you defined a local variable named "rad". This variable is active only within the parentheses inside the for loop; if you attempt to use the variable "rad" elsewhere, you will get an error.

Although rad is initialized to a specific value, this is not necessary. When you define variables using a "local" or "global" identifier, you can do so without assigning an initial value. The name of the variable will be recognized. However, the software will not know the type of the variable (name, number, color, etc.). MAXScript automatically assigns the variable a special value of "undefined". The first time you assign something to the variable, it will become defined by the data type that you have assigned it to. In practice, it is always best to define variables with an initial value.

It is important to note that rad is not the only local variable in the previous example. The variable "s" is also a local variable, and cannot be accessed outside of the parentheses. It is not necessary to declare every variable with a "global" or "local" statement. You learned previously that you can implicitly create a variable by simply assigning a value to it. If you do not make the "global" or "local" distinction upon your variable, MAXScript will create the appropriate association, depending on where the variable is defined in the script. For example if you create a variable inside a block, MAXScript automatically treats it as a local variable. On the other hand, any variable created at the top level of MAXScript (outside of all blocks) is always a global variable. As mentioned previously, MAXScript does not allow for the creation of local variables outside of a block.

These concepts are presented in the following

HERE IS AN EXAMPLE OF A FOR LOOP

for i = 1 to 5 do

(

global rad = 10

cyl_height = 25

c = cylinder()

c.radius = rad

c.height = cyl_height

c.pos.x = i * 25

)

s = sphere radius:rad

In this example, four variables are created: rad, cyl_height, c, and s. Because they were implicitly created within a block, c and cyl_height are both local variables. The other two variables are both global; s, because it was created outside of a block, and rad, because it was declared as a global variable. For this reason, you can use rad again to define the sphere, s.

Next Topic

Defining Custom Functions


Defining Custom Functions

MAXScript’s built-in functions are very powerful. They provide access to objects, allowing you to read and set their properties. However, scripting in 3ds Max normally entails going beyond simple object creation. Fortunately, MAXScript allows you to make your own functions, giving you the ability to streamline and customize your work.

In MAXScript, you can use functions to perform almost any of the software’s operations. Start with a simple function definition that subtracts two variables:

MAXScript returns subtract() to let you know that it has defined the function, subtract.

The definition contains the keyword function (you can also use the word fn in place of function), followed by the name of the function (subtract), followed by the list of variables (x and y). The equal sign signifies the start of the body of the function. The body is the series of statements that the function executes. Even if there is only one statement, the body of the function must be in parentheses.

NOTE:

Any variables created in the body of a function are local variables unless otherwise specified.

Once a function has been defined, it can be used anywhere throughout the script. Therefore, it is useful to place function definitions at the beginning of your scripts.

In order to use a function, you simply enter the function name and the values for its variables:

This example uses what are known as positional arguments. When you call the function, you must supply both arguments, and you must supply them in the proper order for the function to execute properly.

The second type of arguments you can use are keyword arguments. This is what is used for all of the object constructors in MAXScript. The function definition is the same, with the exception of declaring the keyword arguments, or default values for the variables in a function.

The following example determines whether a number is positive, negative, or equal to zero.

EXAMPLE

function sign val:0 =

(

if val == 0

then messagebox ("Equal to 0")

else if val > 0

then messagebox ("Greater than 0")

else messagebox ("Less than 0")

)

The messagebox command causes a message box to pop up on the screen, displaying the argument in the parentheses that follow the command.

In this example, a parameter called val has been declared in the function definition. The value after the colon is the parameter’s default value. When the function definition contains parameters like this, they are optional in the function call. If you enter sign(), without specifying any parameters in the function call, MAXScript uses the default value:

The "Equal to 0" message box appears, since the default value for val (0) will be used. However, if you do define val:

sign val:-5

the "Less than 0" message appears. You can include as many keyword arguments in a function as you need, and they can be entered in any order when calling the function. This is useful when you consider functions such as object-creation functions, where the new object might have 20 or 30 parameters associated with it. If you wanted to use positional argument functions to create the same objects, you would have to provide all of these parameters, in the right order, each time you wanted to call the function.

It is also possible to use both positional and keyword arguments in the same function call. In this case, you must use positional arguments first, followed by the keyword arguments,

FOR EXAMPLE

function mycube side position:[0, 0, 0] =

(

box length:side width:side height:side pos:position

)

This function requires you to enter the size of the cube, but the position is optional.

Next Topic

Structure Definitions


Structure Definitions

In addition to custom functions, you can also create custom compound values in MAXScript using "structure definitions". Structure definitions are a flexible data type, built of simpler data types. They let you define the layout of a new structured type of value that you can then create and work with in your code.

The syntax for a structure definition is:

struct <struct_name> ( <member> , <member> )

where each <member> can be one of:

<name> [ = <expr> ] - name and optional initial value

<function_definition>

Create a new structure, called person:

Struct person (name, height, age, sex)

Now create an instance of this structure using the ‘person’ constructor:

Bill = person name:"Bill" height:72 age:34 sex:#male

This stores an instance of the person structure in the variable Bill. Member name is initialized to the string value "Bill", height to the integer value 72, age to the integer value 34, and sex to the name value #male. Create another instance:

Joe = person name:"Joseph" sex:#male

In this example, another ‘person’ is created. However, this person does not have initialized values for the height and age members. Since you did not provide these members with an optional default value in our structure definition, they will default to a value of undefined.

Structure definitions are a good alternative to arrays when you have a fixed, small number of components. The code for these types of values is easier to work with since you can reference property names rather than index numbers in arrays.

Next Topic

3ds Max Commands in MAXScript


max Commands in MAXScript

In addition to controlling modeling and animation, MAXScript scripts can invoke 3ds Max menu and toolbar commands. You do this using the "max" keyword.

FOR EXAMPLE

max file open

max unhide all

max quick render

The keyword max is followed by one or more words that describe the command. The available commands can be displayed by using the "?" character in a partial max command.

FOR EXAMPLE

max time ? -- shows all the time-related commands

max sel ? -- shows all the commands with ‘sel’ in them as a substring

max ? -- shows all the commands (there are a lot)

For a complete list of max commands, see the MAX Commands topic.

Next Topic

Saving your Commands in a Script File


Saving Your Commands in a Script File

So far, you have entered your commands into the Listener window. If you had to stop at some point, and couldn't finish some code in one session, you would have to start all over, entering the commands you already used in the previous session. MAXScript allows you to store your commands in an external file that you can load and run.

The general procedure for storing commands in a script file is to click the New Script button in the MAXScript rollout, and type commands in the Script Editor window that opens. Because you have already entered a lot of commands in the Listener window, you can copy them from that window into the Script Editor window.

To copy tutorial commands from the Listener into the script editor window:

  1. Click the New Script button in the MAXScript rollout on the Display panel.

The Script Editor window appears with the title "Untitled - MAXScript".

  1. Position the Script Editor window side-by-side or below the Listener window so that you can copy and paste text between the two windows.

  2. In the Listener window, select the black command line from the Drawing a Box with MAXScript topic (mybox = box length:20 width:20 height:20)

  3. Press CTRL+C on your keyboard to copy the text to the Clipboard.

  4. Click the Script Editor window to place the cursor in it, and press CTRL+V on your keyboard to paste the command into the Script Editor window.

Tip: You can also drag selected text from the Listener and drop it in the Script Editor, or vice versa.

  5. Choose File > Save in the Choose File Name for Save dialog, navigate to your \Scripts directory. Name your script file box_draw.ms and click Save.

Your script file is saved and the script editor window title changes to "box_draw.ms - MAXScript."

You have now saved your first script file. MAXScript uses the .ms extension for script files. It is good general practice to save all of your script files into the scripts directory.

Next Topic

Loading and Running your Script File


Loading and Running Your Script File

You can open a script file for editing, or you can include it in another script to run automatically when that script runs.

To run the script you just saved:

  1. Reset 3ds Max.

  2. Go to the Utilities panel, turn on MAXScript, and in the MAXScript rollout, click the Run Script button.

The Choose Editor File dialog appears.

  1. Select the box_draw.ms file, and click Open.

MAXScript immediately carries out the command that is contained in the script file and places a box in the scene.

To open a script file for editing:

If you want to edit your script later to add more commands to it, you need to open it:

  1. In the MAXScript rollout, click the Open Script button

  2. Select the script you want to edit and click Open.

The Script Editor window opens, showing the text of your script. You can now edit your commands or add new ones, as you would edit any other text file. Save the script file to keep your changes.

To evaluate the commands in your script:

If you enter any commands in the Script Editor window manually (not by copying and pasting from the Listener window), you can test the validity of all commands:

  1. If your Listener window isn't open, click the Open Listener button in the MAXScript rollout.

  2. In the Script Editor window, choose File > Evaluate All.

MAXScript evaluates the commands in your script file. It sends any feedback to the Listener window. It also sends each valid command to the user interface as if you had run the script. If your script contains any syntax errors, MAXScript reports those in the Listener window in red.

To include your script in another script:

If you want to write a script for each tutorial (for example one for drawing a box, one for modifying the box, and another one for transforming it), you could then use those three scripts in another one that contains all the box operations. Assuming you had created the scripts box_draw.ms, box_mod.ms, and box_trans.ms, you could then include them in a new script, box_all.ms. The text for box_all.ms would be as follows:

include "box_draw.ms"

include "box_mod.ms"

include "box_trans.ms"

To reset 3ds Max before running scripts:

If you want to start with a new scene before running any scripts, you need to reset the software:

  1. Choose File > Reset.

  2. Answer the Yes-No prompt to either save or discard the changes to your scene.

  3. Open and run the script you want.

Note that resetting the software closes all MAXScript windows so that you can't copy any more commands from the Listener window. You can always copy commands from the help file, as described below.

To copy commands from the help file:

You can copy commands from the tutorial help file:

  1. In the Help window, highlight the command you want to copy.

  2. Right-click the highlighted text and select Copy from the pop-up menu.

  3. In the Script Editor window, choose the Edit > Paste menu to paste the command into the current script file, or press CTRL+V on your keyboard.

Next Topic

Loading Other Scripts


Loading Other Scripts

The software comes with many scripts pre-installed in the scripts directory. Or, you might find MAXScript files on the World Wide Web that other MAXScript users have posted. To load any of those script files isn't different from loading your own scripts:

To load a script:

If you want to study a script before running it, open it first:

  1. In the MAXScript rollout, click the Open Script button.

  2. Select the script you want to study and click Open.

The Script Editor window opens. It shows the text of the script you selected. You can now read the commands and see if you get an understanding of what the script might do when you run it.

To run a script:

  1. In the MAXScript rollout, click the Run Script button.

The Choose Editor File dialog appears.

  1. Select the script file you want to run, and click Open.

MAXScript immediately carries out the commands that are contained in the script file.

Next Topic

Learning MAXScript by Walking Through a Script


Learning MAXScript by Walking Through a Script

You can learn a lot about MAXScript by just using several different script files. The best method to learn MAXScript commands and command syntax is to step through a script and watch the responses in the Listener window and in the user interface. You can "walk" through a script by loading a script into the Script Editor window and executing one command line or a command block at a time:

To step through a script:

  1. Open a script into the Script Editor window.

  2. Place the cursor into the first command line and press ENTER on the number pad of your keyboard.

The Number Pad <ENTER> key is a shortcut for executing the current command line or the selected block of code.

MAXScript executes the current command line and reflects the outcome in the Listener window and, if appropriate, in the user interface.

  1. Move the cursor to the next command line or select the next block of code from the script. Press the number pad ENTER key again, and so on.

From here on, step through other scripts and take note of the effects. Most of the script files included with 3ds Max are very well commented and include a description about the scripts purpose. For more information about using script files, see the Running Scripts topic in the MAXScript Reference.

Next Topic

Learning MAXScript with the Macro Recorder


Learning MAXScript with the Macro Recorder

Another useful tool for learning MAXScript is the Macro Recorder. If you want to learn how to perform a task in MAXScript, you can use the Macro Recorder to get started. The Macro Recorder captures many of the actions performed by the user, and generates the MAXScript commands that correspond to those actions. The Macro Recorder output is displayed in the top pane of the MAXScript Listener window. This pane has a pink background.

The Macro Recorder has several filtering options that control what types of user actions are recorded, whether the generated script commands contain explicit object references or are selection-relative, and whether the generated MAXScript commands contain explicit or relative transforms and coordinates. These options can be set using the Macro Recorder menu in the Listener window.

Many user actions generate Macro Recorder output, but not all of them. In general, most of the buttons on the Menu Bar, toolbars, Status Bar, Create panel, and Modify panel generate Macro Recorder output. If the button invokes a secondary dialog, changing setting or performing actions in the secondary dialog typically will not generate Macro Recorder output. In the Create and Modify panels, Macro Recorder output is generated if MAXScript can create the object or modifier.

This makes the Macro Recorder a useful too for learning MAXScript, as you can perform tasks in the UI and simultaneously see how to perform these same tasks with MAXScript.

For further documentation on the Macro Recorder, see the Macro Recorder topic in the MAXScript reference.


Trigonometric Functions

This topic is a quick review for readers who need a reminder about this area of mathematics. If you’re familiar with trigonometry, you can skip this topic. If you find this topic difficult to follow, you might consult a more basic reference on mathematics.

Trigonometric functions are principally used to model or describe:

  • The relation between angles in a triangle (hence the name).

  • Rotations about a circle, including locations given in polar coordinates.

  • Cyclical or periodic values, such as sound waves.

The three basic trigonometric functions are derived from an angle rotating about a unit circle.

Trigonometric functions based on the unit circle

The tangent function is undefined for x = 0. Another way to define the target is:

Because XYR defines a right-angled triangle, the relation between the sine and cosine is:

The graphs of the basic trigonometric functions illustrate their cyclical nature.

Graphs of basic trigonometric functions

The sine and cosine functions yield the same values, but the phase differs along the X-axis by ?/2: in other words, 90 degrees.

The inverse functions for the trigonometric functions are the arc functions—the inverse only applies to values of x restricted by -?/2 = X = ?/2. The graphs for these functions appear like the basic trigonometric function graphs, but turned on their sides.

Graphs of basic arc functions

The hyperbolic functions are based on the exponential constant e instead of on circular measurement. However, they behave similarly to the trigonometric functions and are named for them. The basic hyperbolic functions are:

Graphs of basic hyperbolic functions


Frequently Asked Questions

The answers to the following Frequently Asked Questions should help you locate relevant information regarding some often used areas of MAXScript. It also provides direct links to some general programming topics of interest, and solutions to problems prompted by user questions on the online support forums.

MAXScript Syntax and Terminology

How do I understand the function definitions in this document?

What Are Mapped Operations in MAXScript?

What is Scope of variables?

When do I use If...Then and when If...Do ?

When do I use () after a function?

What is the difference between 'undefined' and 'unsupplied' values?

What is the difference between '=' and '==' operators?

What is the differences between Arrays and BitArrays?

How do I get the file name of the current scene?

The Wonderful World of Classes and Class Instances

General Advanced Topics

How do texture coordinates work?

How are Transformations calculated in 3ds Max and MAXScript?

Practical Questions

Working With Vectors

How do I make a vector from a vertex position?

How do I find the angle between two vectors?

How do I find the angle between 3 vertices?

How do I rotate a vector around the Z axis?

Working with MAXScript Values

Why does Execute return 'undefined' when accessing a loop variable?

How do I create a multi-dimensional array?

How do I calculate the Volume of an Object?

How do I check if a string contains only numbers?

How do I remove duplicate arrays from an array?

How do I filter a string including empty entries?

Working With Files

How do I set the default path for file operations in MAXScript?

Accessing Object Properties

How do I change a property in multiple objects at once?

How do I change the Shadow type of a Light?

How do I get the object by object name?

How do I access the Alpha values shown in the viewport?

How do I change the text in a Text Shape dynamically?

How do I Sort a MultiMaterial By Material ID?

Working with Scripted UI

How do I access UI elements to change their properties?

How do I display a value in a Rollout?

How do I update the items in a dropdownList or listBox?

How do I call the dropdownList Selected handler as a function?

How do I uncheck a MacroScript button correctly?

Working with Scene Nodes

How do I create a line between two points?

How Do I instance Modifiers and Controllers inside the same object?

How do I get a Space Warp by Binding?

How do I delete randomly a specified percentage of geometry objects?

How do I Create a Button to Show the Next Object?

How do I batch-process multiple .MAX files?

Can I use data from external files to control my scene or animation?

Working with Editable Meshes

How Do I Get the Local Rotation of a Face?

How do I Split a Mesh by UV Elements?

How do I align the UVW_Modifier's Gizmo to a selected face?

How Do I Select a Face of an Editable Mesh by its Index?

How Do I Get Faces With Normals Facing Away?

Working with Editable Polys

How do I build Unconnected Edges Selections from EPoly Edge Selection?

How do I remove mid-edge EPoly Vertices?

How do I Select Edges Between Materail IDs?

Working with Animation

How do I link the rotation of an object to the scene time?

How do I keep a Plane aligned to 3 Point Helpers?

Writing Better and Faster Scripts

How To Make It Faster?

For Loop By Index Vs For Loop Through Collection Performance

Optimizing Particle Flow Script Operator For Loops For Speed

How To Make It Better?

See also

Locating Information in this Help File


How do I understand the function definitions in this document?

MAXScript FAQ > How do I understand the function definitions in this document?

Syntax Definitions in This Document

The above topic explains the general syntax used in the MAXScript Online Reference, but practice has shown that many users have difficulties applying the function definitions to actual code. Below are some guidelines to help you understand the syntax.

Here is a typical function definition taken from the Meshop Face Methods :

meshop.detachFaces <Mesh mesh> <facelist> delete:<boolean=true> asMesh:<boolean=false>

Detaches the specified faces.

If delete is true, the faces are deleted after being detached. If delete is false, the faces are not deleted.

If asMesh is true, the faces are detached and returned as a Mesh value. If asMesh is false, the faces are detached as an element in the mesh and a value of OK is returned.

First of all, this function is part of a structure called meshop. A structure can be used to group related functions. This function has been implemented using the SDK, but you can organize your own MAXScript functions by putting them into a structure, too. See Defining Local Functions in Structures for more info.

The name of the function is detachFaces. It is written in bold because according to the Syntax Definitions in This Document topic, bold denotes code written "as is". Actually, the name of the structure (meshop) would have to be in bold too, but this would make it more difficult to read the documentation. Now you can easily spot any function or keyword by quickly browsing a page and looking for bold letters.

Next, two arguments (parameters) to the function are described. These two arguments are compulsory and the function will issue an error message if the parameters are not supplied or the classes of the provided values do not match the requirements.

<Mesh mesh> defines a rule. Any text written inside of <> describes what should be used in place of the rule. In this case, it tells you to replace the rule with a mesh object.

The next rule, <facelist>, tells you to provide a list of faces. A face list can be either a regular Array containing indices of the faces to affect, for example #(1,3,10,11,12,13,14,15), or a bitArray with bits set for any face to be affected, for example, #{1,3,10..15}.

Then, two optional parameters are described. While the order of the first two parameters is significant (the function always expects the mesh to be the first and the facelist to be the second parameter), optional named parameters can come in any order - they are recognized by their name.

NOTE:

In the syntax definitions of this document, optional parameters are written inside of [] brackets. Typically, when defining a function, any named parameters are optional. This is why in some function definitions, optional parameters might not have been listed inside of [] brackets.

When a value is not provided for an optional parameter, the special value of unsupplied will be sent to the function instead. The function will check whether the value is supplied or not and replace an unsupplied value with a default value. To learn more about unsupplied values, see What is the difference between 'undefined' and 'unsupplied' values? and Unsupplied Value topics.

In the case of the delete: parameter, the definition tells you that the name of the parameter should be written as is, and a boolean value (true or false) is expected after the colon ':'. A value of true will be assumed by default if the parameter is not supplied.

Finally, the asMesh: parameter is also optional and will be false by default if not supplied.

A TYPICAL CALL TO THIS FUNCTION WOULD LOOK LIKE:

meshop.detachFaces $MyMesh02 #{1..25}

In this case, the function is being told to detach faces with indices from 1 to 25 from the EditableMesh object named "MyMesh02". The faces will be deleted by default from the original mesh and a new element inside of MyMesh02 will be created because the two optional parameters will be used with default values.

IF YOU CHANGE THE LINE TO

meshop.detachFaces $MyMesh02 #{1..10,40..55} delete:false

the faces with indices from 1 to 10 and from 40 to 55 will be cloned to element inside of the mesh - a new element will be created (asMesh is false by default), but the original faces will not be deleted from the mesh.

IF YOU CHANGE THE CODE AGAIN TO

newMesh = meshop.detachFaces $MyMesh02 #(1,2,3,4,5,10,11,15) delete:false asMesh:true

then this time the faces with indices described by the regular array will be cloned to a new TriMesh without being deleted from the original object. The function will return the TriMesh value and will store it into the newMesh user variable. See the second example provided for this function in the Meshop Face Methods topic for more info on using the returned TriMesh value to create a new object.


What are Mapped Operations in MAXScript?

MAXScript FAQ > What are Mapped Operations in MAXScript?

In short, mapped operations let you perform the same operation across multiple objects without using a loop in MAXScript. Mapped operations are denoted as such in this Help File.

The following chapter explains Mapped Operations in-depth:

Collections

See also

Frequently Asked Questions


What is Scope of variables?

MAXScript FAQ > What is Scope of variables?

The following chapters provide detailed explanation of variable scope:

Variables - Assignment and Scope

Scope of Variables

Local Variables As Private Global Variables

Implicit Variable Declaration

Lexical Scoping

Accessing Locals and Other Items in a Rollout from External Code

Changes to Undeclared Implicit Global Variables

Definition Constructs Can Include Global Variable Declarations At Top Level

Persistent Global Variables

See also

Frequently Asked Questions

Why do I define variables outside of a scope so I can access them inside the scope?

You could imagine the scopes as an onion with nested "layers". When a local variable is created at a certain level, it is visible only at this level and all scopes nested inside of it.

In the special case of MacroScripts, Rollouts and Utilities, a local variable defined in the outer-most scope is visible to any code inside of the macroScript, rollout or utility but not visible to any other macroScript, rollout or utility. This can be seen as a kind of "private global" variable which is just how it works and not a technical name for a new kind of scope. For more info, see Local variables as private global variables

In addition, a variable can be only accessed if it has been already defined. This means that the order of functions and rollout definitions does matter as you cannot access a function or rollout which is defined later in the source code. This case can be solved by pre-defining the variable used to store the function or rollout in the same or higher scope before the actual function or rollout definition.

For example, if you have multiple rollout definitions in a Utility and want to access a user interface element of the second rollout from inside the first rollout, you will have to pre-define the variable storing the second rollout before the first one.

If you would not pre-define the variable and try to access a UI control from the second rollout, MAXScript would show you an error because when evaluating the first rollout it has no knowledge of the second one - it has not been evaluated yet!

If you have declared the variable name of the second rollout as local in the beginning of the Utility, it will first be set to the value "undefined", but will be seen as defined by any code that references it. In other words, MAXScript will find the name of the variable, ignore the fact there is still no rollout value inside and keep going with the evaluation. Once it finds the definition of the second rollout, it will "fill in" the rollout information and when you actually try to use code in the first rollout referencing the second one, everything will be ok.

Why do I declare local and global variables?

Local variables let you encapsulate values for "local use" without interfering with other parts of the script, or even worse, with other scripts. Imagine if every single script out there would use only global variables. If a user would write a script that uses the variable "i" in a loop and another users would write another that uses "i" for an index to a vertex somewhere, chances are these two scripts would have troubles running in the same scene unless the programmers have taken extra care to explicitly declare and initialize every variable before using it. All in one, it would be a real pain!

Luckily, MAXScript will keep the variables inside the respective scopes and the one script will never access variables from the other one unless you want it to by using explicit global definitions.

By default, any variable used without declaration inside of a scope becomes local for that scope so you usually don't really have to explicitly write "local" in front of every variable. While it would be a good programming practice to declare variables explicitly, MAXScript does not force you to do this most of the time. See Implicit Variable Declaration for more info.

You would define global variables in all those cases where multiple scripts have to access the same value, or share a value. Any MAXScript code could read that value. So you could have a macroScript storing some preferences in a variable, a Utility using these preferences, and both do not have to know about each-other, except for the name of the common global variables.

In some cases, you want to declare a local variable explicitly if a variable with the same name already exists in a higher scope, but you really want to use the same name in a nested scope. If you don't declare the variable as explicitly local, the value of the outer one would be accessed instead, which could lead to logical problems...

See also

Frequently Asked Questions


When do I use If...Then and when If...Do ?

MAXScript FAQ > When do I use If...Then and when If...Do ?

Generally, you can use both If...Then and If...Do within script code, but you cannot use If...Do when an 'else' expression is required for the cases the condition evaluates to false. On of the reasons If...Do exists is to make typing in the Listener easier. When you enter

if a==0 then print "A is Zero!"

the MAXScript Listener assumes that an 'else' expression will follow because you used 'then'. So it will sit around waiting for you to enter the 'else' expression, and will seem to hang. (Note that you can use the Escape key to interrupt the Listener and exit from this "hanging" mode).

If you have no intentions to enter a second expression after an 'else', you should type in

if a==0 do print "A is Zero!"

The Listener will notice you used 'do' and therefore don't want to enter an 'else' expression and will execute the line immediately!

For more details, see If Expression

See also

Frequently Asked Questions


When do I use () after a function?

MAXScript FAQ > When do I use () after a function?

A MAXScript function is stored in a variable. Some functions can take no arguments, others can expect one or more arguments (parameters).

If you type in only the name of the function, you are not actually calling the function but asking MAXScript to print the variable the function is stored in.

FOR EXAMPLE:

Type in the constructor of a Box without ()

box

RESULT:

Box

MAXScript is telling you the variable box contains the constructor function Box

In order to call a function without any arguments, you have to tell the function that no parameters are going to be passed to it. To do this, you add the pair of parentheses to the end of the function name.

FOR EXAMPLE:

Type in the constructor of a Box with ()

box()

RESULT:

$Box:Box01 @ [0.000000,0.000000,0.000000]

MAXScript executes the Box constructor function without parameters.

See also

Function Calls

Special Notes About Function Calls

Frequently Asked Questions


What is the difference between 'undefined' and 'unsupplied' values?

MAXScript FAQ > What is the difference between 'undefined' and 'unsupplied' values?

The undefined value is assigned to any variable or array element that has been declared but has not been assigned a value yet.

If you create a variable 'a' but do not use the assignment operator '=' to store a value in the variable, its initial value will be 'undefined'.

FOR EXAMPLE:

a

a == undefined

RESULT:

undefined

true

Also, if you create an array and assign a value to an element with index 4, all 3 elements before the one you assigned to will be initialized implicitly to the value 'undefined'. These values are like "placeholders" because you cannot have an array with the 4th element set to a value but without 3 elements before it being initialized.

FOR EXAMPLE:

a = #()

a[4] = "Yeah!"

a

RESULT:

#()

"Yeah!"

#(undefined, undefined, undefined, "Yeah!")

The unsupplied value is assigned to function parameters that have not been supplied when the function has been called.

A function can be called with no parameters (in this case, a pair of parentheses is required to denote 'no parameters'), one or more arguments, plus one or more named arguments. The arguments defined by the function are compulsory and have to be supplied. The named arguments on the other hand are optional and can be omitted. In such cases, the programmer could compare the named argument's value with the 'unsupplied' value to find out whether a meaningful value has been sent or has been omitted.

In the following example, the function expects no arguments or one optional named argument. It will check whether the named argument has been supplied and print a respective message to the Listener, then return true or false.

FOR EXAMPLE:

fn test_function thePrameter: =

(

 if thePrameter == unsupplied then

 (

  print "How about providing a parameter?"

  false

 )

 else

 (

  print "Thank you for calling the function with a parameter!"

  true

 )

)

test_function()

 "How about providing a parameter?"

 false

test_function theParameter:123

 "Thank you for calling the function with a parameter!"

 true

See also

Undefined Value

Unsupplied Value

Creating Functions

Function Calls

When do I use () after a function?

Frequently Asked Questions


What is the difference between 'assignment' and 'equality' operators

What is the difference between '=' and '==' operators?

MAXScript FAQ > What is the difference between '=' and '==' operators?

In MAXScript, there is a VERY BIG difference between these two operators!

The '=' is the so-called assignment operator and is used to assign the result of the expression on the right side of the operator to the variable on the left side.

The '==' is the so-called equality comparison operator and is used to check whether the two expressions on both sides are equal or not. It returns true of they are equal, and false if they are not.

It is a common error to mistype '==' as '=' which can lead to errors in IF comparisons, non-initialized variables etc.

In the following example, the variable a is set to 1. In the IF expression, 'a' should be compared to 0, but it is assigned by mistake the value 0 instead. The result of the expression is not a boolean value (true or false) and an error message is generated to inform you about the problem:

TYPICAL ERROR:

a = 1

if a = 0 then print "A is Zero!" else print "A is not Zero!"

 -- Type error: if-test requires BooleanClass, got: 0

CORRET CODE:

a = 1

if a == 0 then print "A is Zero!" else print "A is not Zero!"

 "A is not Zero!"

In the second version, the variable 'a' is set to 1. In the IF expression, 'a' is correctly compared to 0. The result of the expression is a boolean value (false) and the expected result is printed.

See also

Variable Assignment

Comparison Expressions

Frequently Asked Questions


What is the differences between Arrays and BitArrays?

MAXScript FAQ > What is the differences between Arrays and BitArrays?

An Array in MAXScript can contain any number of elements, and each element can be of any type incl. integers, floats, strings, Point3 values, colors, and even other arrays.

A BitArray on the other hand can contain only one type of information. Nomen Est Omen - this type is a single bit, a binary digit. A bit can be either set (1, true) or not set (0, false). This means that a BitArray can only store binary information, any number of bits representing true or false values. Obviously, a bitArray is much more memory-efficient as it can store 8 values in a single byte, while a single element of a regular array requires multiple bytes to store a single value!

A bitArray can be very useful when getting and setting face properties like selected status etc.

You can convert a bitArray to an Array, and an Array containing only true and false values to bitArray.

NOTE:

Appending elements to a bitArray tends to be slower than appending elements to a regular array. Pre-defining a bitArray to the desired size first and then setting its elements by index is much, much faster.

See also

Array Values

BitArray Values

How To ... Develop A Transform Lock Script

How do I create a multi-dimensional array?

Frequently Asked Questions


How do I get the file name of the current scene?

MAXScript FAQ > How do I get the file name of the current scene?

A user asked:

I can't seem to find a function for grabbing the name of the currently open maxfile!

Answer:

The file name of the currently loaded scene can be accessed via the System Global Variable maxFileName. The path of the current scene is accessible through maxFilePath. Both variables are read-only!

To get the complete scene file name, you can use

EXAMPLE

sceneName = maxFilePath + maxFileName

If the scene does not have a name yet (Untitled), both will return an empty string "".

These global variables are documented under the letter M in the topic 3dsmax System Globals

See also

3ds Max System Globals

3ds Max File Loading and Saving

Frequently Asked Questions


The Wonderful World of Classes and Class Instances

MAXScript FAQ > The Wonderful World of Classes and Class Instances

A user asked:

I want to be able to turn RenderEffects on and off, but I haven't been able to figure out if this is even possible.

I'm trying to decipher exactly how the Maxscript Help file syntax works... what does it mean when something is in the < > symbols as in:

setActive <renderEffect> <boolean>

I understand that setActive is the command, and boolean is an either true or false flag but what is required with renderEffect? and how does that command actually get written?

I tried

setActive blur true

setActive blur false

and that did not seem to be acceptable as the error states:

-- Runtime error: Invalid object, needed Atmospheric or Effect, got: blur

So what am I to provide in terms of an OOP object?

Answer:

According to Syntax Definitions in This Document

<rule> -- you can insert what is defined by the named rule

So when you see <boolean> , it tells you that you need an expression which evaluates to a boolean value. This also means that it doesn't only expect the symbol True or False itself, but any expression leading to the value represented by the symbols True and False would be legal. So in place of <boolean> you can have a variable containing a boolean value, or an expression like myValue >= 10.5, or a MAXScript method which returns a boolean value (like selection[1].isHidden).

In the case of <renderEffect>, obviously it expects a renderEffect object value. Since 3ds Max is an Object-Oriented program, most of its building blocks are objects in the OOP meaning of the word. Similarly, MAXScript lets you construct instances of object classes.

For example, b=box() creates an instance of the class Box and returns a value that is then stored in the variable b which then can be used anywhere where a <Node> is expected according to the MAXScript Help.

If you create an instance of the lens_effects class which is of renderEffect superClass, you get back an object which is not a scene node, but an object in the OOP meaning of the word and fits the rule mentioned above because its superClass matches the type of object expected by the setActive method.

Let's try to see this from a human perspective:

The CLASS of an object can be seen as the Nationality of a human.

The SUPERCLASS could be seen as the species, in this case, HumanBeing.

So when you give birth to a human being in Bulgaria, for example, you are creating an instance of the class Bulgarian, of superclass HumanBeing.

So class and superclass are general descriptions of types of objects, but not the objects themselves. If you want to apply the method "Kiss" to a human being, you cannot use "Kiss Bulgarian" as it is slightly difficult to kiss a nation. You need an INSTANCE of the class, a single human being, to call the method, so, in MAXScript pseudo-code:

PSEUDO-SCRIPT:

theHuman = Bulgarian() --create an instance of the class Bulgarian

theHuman.name = "Bobo" --give it a funny name

print (superclassof theHuman)

--> HumanBeing

if theHuman.location == "Winnipeg" do

theHuman.isFrozen = true --set some properties based on object's location

-- Now you have a single instance you can call a method

-- that expects an object of the superclass HumanBeing:

Kiss theHuman

If you would try to use "Kiss Bulgarian", in Pseudo-MAXScript you would get an error like

-- Runtime error: Invalid object, needed HumanBeing or Dog, got: Bulgarian

because Bulgarian is not an object itself, it is a class describing a category of objects!

The idea of Object Oriented Programming is to have common classes of objects which inherit from more general classes, and let you create any number of instances of a class which inherits all typical properties and capabilities of the class hierarchy above.

So you could have a class hierarchy like

LifeForm>EarthInhabitant>Mammal>HumanBeing>IndoEuropean>Bulgarian

The more general classes in the beginning define common capabilities of a life form, the fact it probably breathes air or swims in water, the fact it drinks lots of milk, the fact it is a strange two-legged creature spending most of its time wearing digital watches, the origin and some common skin, hair and eye color properties, the language it speaks and the region it comes from, etc.

Still, you have to create an instance of the class you are interested in to use methods applicable to objects, as shown above.

In the special case of the RenderEffects, you need an instance of the Blur effect, not the class Blur itself. Usually, if the object exists in the scene, you would try to get the existing one into a variable, by calling

FOR EXAMPLE

myEffect = getEffect 1 --returns the first effect on the RenderEffects list

setActive myEffect false --disables it

Or shorter, without the intermediate variable,

FOR EXAMPLE

setActive (getEffect 1) false

Obviously, to disable all effects in the scene, you could do something like

FOR EXAMPLE

for i = 1 to NumEffects do setActive (getEffect i) false

See also

Frequently Asked Questions


How do texture coordinates work?

MAXScript FAQ > How do texture coordinates work?

Is there a one-to-one relationship to mesh vertices?

Mapping coordinates (UVW coordinates and the related vertex colors) in 3ds Max are stored in Texture Vertices resp. Color Vertices which can have a completely different count from the mesh vertex count. Understanding the relationships between texture coordinates and the mesh they are applied to is crucial.

The following chapter explains the way texture coordinates work inside of 3ds Max.

Understanding Texture Coordinates

The following topics provide information about accessing and manipulating texture coordinates and vertex color data.

Mesh Texture Vertex Methods

Mesh Color-Per-Vertex Methods

General Meshop Mapping Methods

Unwrap_UVW : Modifier

See also

Frequently Asked Questions


How are Transformations in 3ds Max and MAXScript calculated?

How are Transformations calculated in 3ds Max and MAXScript?

MAXScript FAQ > How are Transformations calculated in 3ds Max and MAXScript?

The following chapter provides a detailed explanation of the internal transformation storage and manipulation:

Using Node Transform Properties

See also

Frequently Asked Questions


How do I make a vector from a vertex position?

MAXScript FAQ > How do I make a vector from a vertex position?

A user asked:

1. How to make a vector from a vertex position?

2. How to make a vector from two vertex positions?

Answer:

A vertex position IS a vector!

Any Point3 value is a vector with origin at the world origin [0,0,0] pointing at the Point3 value consisting of the X, Y and Z coordinates of the vertex.

On the image below, you can see a graphical representation of the 3ds Max world coordinate system with its X, Y and Z axes crossing at the Origin [0,0,0]:

A point with coordinates [20,10,10] would appear like this - let's call it "A":

The Point3 value [20,10,10] defines a vector with starting point at the origin [0,0,0] and ending point at A. The length of the vector is equal to the distance between the origin and A, and the direction is from the origin to A:

Point B with coordinates [-10,30,20] would appear like this:

The Point3 value [-10,30,20] defines a second vector with starting point at the origin [0,0,0] and ending point at B. The length of the vector is equal to the distance between the origin and B, and the direction is from the origin to B:

Now if you want to calculate the vector defined by the two points, you have to simply subtract the starting point from the end point. So a vector starting at A and pointing at B with length equal to the distance between the two points can be calculated as B-A:

The resulting Point3 value C = B-A is a vector expressed just like A and B with starting point at the origin [0,0,0] and ending point the point C with coordinates the result of ( [-10,30,20] - [20,10,10] ) which in turn is equal to [-10-20, 30-10, 20-10] which is finally equal to [-30,20,10]. Note that the vector C has exactly the same length and direction as B-A, it is just translated in parallel along the vector -A so its start matches the origin:

Obviously, the rules of addition and subtraction apply to this set of vectors as you can see from the resulting parallelogram:

Here is the same parallelogram in isometric view in order to show the parallel translation of the vectors:

As you would expect,

C = B-A (same vector, just translated to the origin)

A = B-C (same vector, just translated to the origin)

B is obviously equal to the sum of the vectors (B-A) and A. This can be expressed as (B-A)+A or B+(A-A). Since A-A returns a zero vector without length and direction, the result is B itself.

Same with the sum of (B-C) and C which can be written as B+(C-C). Since C-C returns a zero vector, the result is B itself.

This shows that the sum of two vectors can be calculated by starting each new vector at the end of the previous one. The sum would be a vector starting at the beginning of the first operand and ending at the end of the last operand.

See also

Frequently Asked Questions


How do I find the angle between two vectors?

MAXScript FAQ > How do I find the angle between two vectors?

A user asked:

How do I find the angle between two vectors?

Answer:

As explained in the Point3 Values topic, the angle between two vectors can be calculated using the dot product of the normalized vectors and calculating the acos of the result.

See also How do I find the angle between 3 vertices?

See also

Frequently Asked Questions


How do I find the angle between 3 vertices?

MAXScript FAQ > How do I find the angle between 3 vertices?

A user asked:

I have 3 vertices defining a face. How do I find the angle at the corner of the face?

Answer:

A face always has 3 vertices. Each pair of vertices define one of the 3 edges of the face, and at the same time can be seen as a vector. As shown in How do I make a vector from a vertex position? FAQ topic, every vertex is already a vector, and the edge vector connecting two vertices can be calculated easily by subtracting the two vertex positions.

Let's call the 3 vertices A, B and C. If you want to calculate the angle at vertex A, you will need the two vectors which start from vertex A and point at B and C respectively. These two vectors would be expressed as

V1 = B-A

V2 = C-A

The image shows point A with coordinates [0,0,0], point B with coordinates [2,0,1] and point C with coordinates [-1,0,2].

Now you have two vectors, but the vector dot product requires normalized vectors to return usable results. A normalized vector has the same direction as the original vector, but the length of 1.0.

You can calclulate the normalized vector by using the normalize method on the vectors V1 and V2:

N1 = normalize V1

N2 = normalize V2

In the case of V1 = [2,0,1], N1 = normalize V1 returns [0.894427,0,0.447214] because length V1 = 2.23607, and the normalized vector is calculated by dividing the X, Y and Z coordinates by the length, in this case [2/2.23607, 0/2.23607, 1/2.23607].

N2 = normalize V2 returns [-0.447214,0,0.894427] because the length of the vector [-1,0,2] is also 2.23607, and the normalized vector is calculated as [-1/2.23607, 0/2.23607, 2/2.23607].

Finally, as explained in the How do I find the angle between two vectors? , we need to calculate the acos of the dot product of these normalized vectors. acos is the reverse operations of cos, returning the angle whose cos is equal to the operand (in other words, if X = cos Alpha, then Alpha = acos X).

Angle = acos (dot N1 N2)

The Angle will range between 0 (when the two vectors are parallel) and 180 degrees (when the two vectors are pointing in opposite directions).

In the above case of coordinates [0,0,0], [2,0,1] and [-1,0,2], the angle at point A is 90 degrees.

To calculate the angle at B, you would apply the same rules, but will use the vectors A-B and C-B,

then normalize the vectors, calculate the dot product and get the acos of the result. The angle at point B in this example is 45 degrees.

See also

Frequently Asked Questions


How do I rotate a vector around the Z axis?

MAXScript FAQ > How do I rotate a vector around the Z axis?

A user asked:

I am trying to rotate a unit vector around 360 degrees in steps of 2 degrees. It only needs to rotate around the Z axis, X and Y stay the same.

Answer:

The Matrix3 Values topic provides convenient ways to transform vectors (Point3 values) including rotation about the world Z axis! You can simply construct a rotateZMatrix value and transform the original vector using it:

SCRIPT

resetMaxFile #noPrompt --reset the file

theV = normalize [5,0,10] --the vector to rotate, normalized to unit vector

theStep = 10 --the step by which you want to rotate

--rotate from 0 to 360-theStep with step TheStep:

for a = 0 to 360-theStep by theStep do

(

rm = rotateZMatrix a --create a rotation matrix from the value

theRotV = theV * rm --transform the original vector using the matrix

format "%: %\n" a theRotV --print the result to Listener

c = cylinder() --create a cylinder

c.dir = theRotV --orient along the vector to see what it looks like

)

The results looks like a muffin!

See also

Frequently Asked Questions


Why does Execute return 'undefined' when accessing a loop variable?

MAXScript FAQ > Why does Execute return 'undefined' when accessing a loop variable?

The following code tries to use Execute to convert the variable var containing the string "x" to the loop variable 'x' and print its value. It returns 'undefined' 10 times instead of printing the numbers from 1 to 10.

WHY DOES THIS FAIL?

var = "x"

for x = 1 to 10 do

(

y = execute var

print y

)

The answer to this question is based on the fact that Execute always uses the global scope . On the other hand, a for loop always creates a new scope and the variable 'x' is local to this scope. This is the key to understanding the original problem and its solution - the Execute just does not "see" the local variable 'x' in the global scope.

Here is a possible solution which correctly prints the numbers from 1 to 10.

EXAMPLE

global x --define a global stand-in variable for executing

var = "x" --define the string to execute

for xx = 1 to 10 do --the loop has a different var name

(

x = xx --copy the loop variable into global scope

y = execute var --execute in global scope

print y --print the result

)

See also

What is Scope of variables?

Frequently Asked Questions


How do I create a multi-dimensional array?

MAXScript FAQ > How do I create a multi-dimensional array?

A MAXScript Array is a one-dimensional list of elements. An element of an array is addressed by its index in brackets,

FOR EXAMPLE

myArray = #(10,20,30,40,50,60,70,80,90,100)

myArray[5] --> will return 50, the fifth element of the array.

Since an array can be an element inside of another array, you can create multi-dimensional arrays as you desire by placing multiple arrays inside an array. Using an index in brackets, you can reference the sub-array, using another pair of brackets and an index you can access an element inside the sub-array,

FOR EXAMPLE

-- create an array with two elements, each one an array with 10 elements.

myMultiDimArray=#(#(1,2,3,4,5,6,7,8,9,10),#(10,20,30,40,50,60,70,80,90,100))

-- add a third element to the array containing 10 more elements

append myMultiDimArray #(100,200,300,400,500,600,700,800,900,1000)

myMultiDimArray[2][5] --> returns 50 - the 5th element of the 2nd sub-array

See also

Array Values

What is the differences between Arrays and BitArrays?

Frequently Asked Questions


How do I calculate the Volume of an Object?

MAXScript FAQ > How do I calculate the Volume of an Object?

There is currently no access to the Measure Utility from MAXScript, but you can use the following MAXScript function to get the same results:

SCRIPT

fn CalculateVolumeAndCenterOfMass obj =

(

local Volume= 0.0

local Center= [0.0, 0.0, 0.0]

local theMesh = snapshotasmesh obj

local numFaces = theMesh.numfaces

for i = 1 to numFaces do

(

local Face= getFace theMesh i

local vert2 = getVert theMesh Face.z

local vert1 = getVert theMesh Face.y

local vert0 = getVert theMesh Face.x

local dV = Dot (Cross (vert1 - vert0) (vert2 - vert0)) vert0

Volume+= dV

Center+= (vert0 + vert1 + vert2) * dV

)

delete theMesh

Volume /= 6

Center /= 24

Center /= Volume

#(Volume,Center)

)

--Call the function on a geometry object - the result will be a list

--containing the Volume and the Center of mass in local space.

theVolAndCom = CalculateVolumeAndCenterOfMass $Sphere01

--To get the world space of the Center of Mass just like in the Utility,

--you have to do some extra work:

theComInWorld = theVolAndCom[2] * $Sphere01.objectTransform

See also

Point3 Values

Frequently Asked Questions


How do I check if a string contains only numbers?

MAXScript FAQ > How do I check if a string contains only numbers?

A user asked:

I like to check whether the text of an edittext UI element contains numbers or letters.

If it contains numbers, I like it to return the number.

But if it contains letters, I want it to display a message "You may only type numbers, try again"

How do I do that ?

Answer:

SCRIPT

rollout MicroListener "MicroListener"

(

edittext myEditText text:""

label theLabel "Ready."

on myEditText changed txt do

(

 if txt != "" then

 (

  try

  (

   val = execute txt

   theLabel.text = "You typed in " + (val as string )

  )

  catch

   theLabel.text = "Invalid Expression!"

 )

 else

  theLabel.text = "Ready."

)

on myEditText entered txt do myEditText.text = ""

)

createDialog MicroListener 300 60

)

This simple script implements a kind of "micro-listener". It uses the Execute method to turn the string typed in the edittext field into a MAXScript expression. It lets you not only enter numbers, but also constants like Pi, or global variables that you have defined. Not only this, you can define global variables inside the script, and even create objects on the fly!

HERE ARE SOME EXAMPLES:

125.1 is a valid expression - it is a constant and evaluates to itself (125.1).

On the other hand, d returns undefined as it is undefined.

Surprisingly, e does not return undefined - it is a reserved keyword in MAXScript!

Same with pi - as expected, it returns 3.14149....

Trying to add two undefined values results in an invalid expression.

This variable is also undefined...

...Until we define it! Now it is equal to 10...

...And so we can write an expression containing constants and variables!

Typing in a function name, in this case the constructor of a box, we get the function back.

By calling the function, we can create objects just like in the "real" Listener!

This box will be created 100 units to the right because we specified the position...

And so on.

See also

Execute

Frequently Asked Questions


How do I remove duplicate arrays from an array?

MAXScript FAQ > How do I remove duplicate arrays from an array?

A user asked:

I've been trying to figure out how to do this for a while now, but I just can't get it. Here's the situation, let's say I have an array of arrays like this:

#(#(1, 5), #(6, 10), #(6, 10), #(14, 18), #(14, 18))

How can I search for, and get rid of, the duplicates, which in this case would be 2 & 3, and 4 & 5.

If I use findItem, it just returns the first instance and doesn't continue searching. I've also tried comparing the first and second numbers using nested 'for' loops, but I can't seem to set it up so that it works like I want. Mainly, there seem to be problems when deleting items from an array while it's going through a loop.

Answer:

Here is a long version with some debug prints so you can see what is happening.

The key is to always count BACKWARDS when deleting elements from an array you are looping through! Otherwise, the loop will get confused as deleting elements renumbers the array items.

LONG VERESION

(

theArray = #(#(1, 5), #(6, 10), #(6, 10), #(14, 18), #(14, 18))

print "Before:"

print theArray

fn compareSubArrays first second =

(

 result = true

 if first.count != second.count then

  result = false

 else

  for i = 1 to first.count do

 if first[i] != second[i] do result = false

 result

)

for i = 1 to theArray.count do

(

 for j = theArray.count to i+1 by -1 do

 (

  format "Comparing %:% to %:% \n" i theArray[i] j theArray[j]

  test = (compareSubArrays theArray[i] theArray[j])

  print test

  if test do

  (

   deleteItem theArray j

   format "Deleting %\n" j

  )

 )--end j loop

)--end i loop

print "After:"

print theArray

)

RESULTS:

"Before:"

#(1, 5)

#(6, 10)

#(6, 10)

#(14, 18)

#(14, 18)

Comparing 1:#(1, 5) to 5:#(14, 18)

false

Comparing 1:#(1, 5) to 4:#(14, 18)

false

Comparing 1:#(1, 5) to 3:#(6, 10)

false

Comparing 1:#(1, 5) to 2:#(6, 10)

false

Comparing 2:#(6, 10) to 5:#(14, 18)

false

Comparing 2:#(6, 10) to 4:#(14, 18)

false

Comparing 2:#(6, 10) to 3:#(6, 10)

true

Deleting 3

Comparing 3:#(14, 18) to 4:#(14, 18)

true

Deleting 4

"After:"

#(1, 5)

#(6, 10)

#(14, 18)

OK

OK

COMPACT VERESION WITH COMMENTS:

(

theArray = #(#(1, 5), #(6, 10), #(6, 10), #(14, 18), #(14, 18))

--Function to compare the content of two arrays

fn compareSubArrays first second =

(

 result = true --init. return value to true

 if first.count != second.count then --if the count of the two subarrays is different,

  result = false --return false

 else --otherwise

  for i = 1 to first.count do --go through all elements in the arrays

 if first[i] != second[i] do result = false --and see if two elements are different

 result --return the result - true if identical, false if not

)

for i = 1 to theArray.count do --go through all elements of the main array

for j = theArray.count to i+1 by -1 do --go backwards from the last to the current+1

 if compareSubArrays theArray[i] theArray[j] do

  deleteItem theArray j --if identical, delete the one with the higher index

format "%\n" theArray --print the result to the Listener

)

RESULT:

#(#(1, 5), #(6, 10), #(14, 18))

OK

OK

See also

Array Values

Frequently Asked Questions


How do I filter a string including empty entries?

MAXScript FAQ > How do I filter a string including empty entries?

A user asked:

The filterString function does not return empty entries. For example, if I am filtering by tabs a string containing two tabs in a row, no empty entry will be returned.

For example,

filterString "One\t\tThree Four,,Five " "\t, "

#("One", "Three", "Four", "Five")

Answer:

The following scripted function behaves as requested.

SCRIPTED FUNCTION:

fn filterString2 theString theDelimiters =

(

 theTokens = #() --array of tokens to return

 ready = false

 while not ready do --repeat until no more delimiters can be found

 (

  ready = true --raise a flag that we are done

  thePosArray = #() --init. an array to hold possible split positions

  for i = 1 to theDelimiters.count do --go through all delimiters

  (

   checkPos = findString theString theDelimiters[i] --check if the delimiter is in the string

   if checkPos != undefined do append thePosArray checkPos --if it is, add to the split positions array

  )--end i loop

  if thePosArray.count > 0 then --if the array has any split positions,

  (

   sort thePosArray --sort the array in ascending order

   checkPos = thePosArray[1] --grab the first position

   aToken = substring theString 1 (checkPos-1) --take the token from start to the split pos. - 1

   append theTokens aToken --add the token to the array of tokens

   theString = substring theString (checkPos+1) theString.count --remove the token and the delimiter from the string

   ready = false --lower the flag because we are not ready yet

  )--end if

 )--end while loop

 append theTokens theString --add what is left of the string to the array

 theTokens --return the array of tokens

)

filterString2 "One\t\tThree,Four,,Five " "\t,"

#("One", "", "Three", "Four", "", "Five ")

filterString2 "One\t\tThree Four,,Five " "\t, "

#("One", "", "Three", "Four", "", "Five", "")

NOTE:

In 3ds Max 8, a new keyword parameter splitEmptyTokens was added to the filterString function to perform this kind of filtering.

See also

Frequently Asked Questions


How do I change a property in multiple objects at once?

MAXScript FAQ > How do I change a property in multiple objects at once?

One of the most often used applications of MAXScript in the daily work is the mass-changing of object properties. This can save tremendous amounts of clicks and time.

To change a property in multiple objects, you obviously need to:

1. Get the correct objects to change,

2. Assign a value to the correct property.

The simplest situation imaginable would be a selection of similar objects, for example, a large number of sphere primitives. MAXScript lets you easily access the current selection in the scene. In addition, an object property assignment is "mappable". This means that MAXScript will apply the value on the right side of the assignment operator '=' to every single object in the selection automatically without the need of an explicit MAXScript for loop. (See What Are Mapped Operations in MAXScript? for more details on mapped operations).

FOR EXAMPLE

-- select a large number of spheres in the scene with the mouse,

-- then change the radius of all selected objects to 10.0 units

-- by typing in the Listener:

selection.radius = 10

OK

In case you have selected some object which does not have a property called radius, like a Box primitive or some EditableMesh object, the above code will cause an error:

ERROR EXAMPLE

selection.radius = 10

-- Unknown property: "radius" in $Box:Box01 @ [0. 000000, 0. 000000,0.000000]

In such case you would have to make sure the collection of objects is filtered by your script before an assignment is made. See the For Loop topic for more info. A possible way would be

EXAMPLE

-- select any number of objects in the scene with the mouse,

-- then change the radius of all objects that have a .radius property

-- by typing in the Listener:

for i in selection where hasProperty i "radius" do i.radius = 10

OK

If you want to change the radius of any object in the scene that has such property instead of selecting objects manually, you can let MAXScript filter the scene for you. This will affect all Spheres, GeoSpheres, Cylinders etc. and ignore any Boxes etc. that do not have a "radius" property.

EXAMPLE

-- Go through all geometry objects, filter those that have a .radius property

-- and change the radius to 10 units by typing in the Listener:

for i in Geometry where hasProperty i "radius" do i.radius = 10

OK

If you want to affect only the GeoSpheres in the scene and exclude all other classes, you could check the class of the objects instead. In this case, you don't have to check for a property named "radius" since any GeoSphere has this property! The classOf function returns the object's class so you can compare it to the class you want to affect.

EXAMPLE

-- Go through all geometry objects, filter the GeoSpheres

-- and change their radius to 10 units by typing in the Listener:

for i in Geometry where classOf i == GeoSphere do i.radius = 10

OK

If you have no idea what the correct MAXScript name of a property is, you can either consult this Help File or use the showProperties inspector function in the Listener to print a list of all exposed object properties.

EXAMPLE

-- Select a single sphere in the scene using the mouse and

-- type in the Listener:

showProperties $

.smooth : boolean

.radius : float

.mapCoords : boolean

.segs : integer

.slice : boolean

.hemisphere : float

.sliceFrom : angle

.sliceTo : angle

.chop : integer

.recenter : boolean

false

See also

Frequently Asked Questions


How do I change the Shadow type of a Light?

MAXScript FAQ > How do I change the Shadow type of a Light?

In versions prior to 3ds Max 5, there were only two possible shadow types - ShadowMap and Raytraced shadows. The type was controlled by a single boolean property which caused the respective ShadowGenerator to be assigned to the light implicitly.

Starting with 3ds Max 5, a larger number of possible shadow map generators have been introduced. The access to the shadow generation of all lights has been extended to allow explicit assignment of an instance of a shadow generator class.

The shipping shadow generator classes are:

ShadowMap : Shadow

RaytraceShadow : Shadow

Adv__Ray_traced : Shadow

Area_Shadows : Shadow

In order to assign a shadow generator to a light, you have to create an instance of one of the above classes by calling the constructor with a pair of parentheses and assign the instance to the .shadowGenerator property of the light. Also see When do I use () after a function?

EXAMPLE

$Omni01.shadowGenerator = Area_Shadows()

For more details, see the Light Common Properties, Operators, and Methods topic.

See also

Frequently Asked Questions


How do I get the object by object name?

MAXScript FAQ > How do I get the object by object name?

Many Users Asked:

When typing in known object paths in the Listener, in scripts or scripted controllers, I can use the $ prefix to denote an object path (for example. $Box01 returns the object called "Box01"). But sometimes all I have is the name of the object as string ("Box01"), but I want to access the scene object that the name corresponds to.

Answer:

There are multiple ways to convert an object name (a string) to the object path (a MAXScript expression) corresponding to the scene object:

getNodeByName

This function provides an easy way to convert a name string to object path with case-sensitive and case-insensitive options. See the link for details.

Execute

Using the execute method, it is possible to convert any string into a MAXScript expression. This includes evaluating a string containing an object path into the object path itself. If an object name is stored in a string variable, you have to add the $ character as string to the name to convert it into object path. Since certain special characters like "." (dot) or " " (space) cannot be evaluated when being part of the name string, it is advisable to add "'" (single quote) characters around the object's name to prevent an evaluation error. Any characters enclosed between the single quote characters will be recognized as part of the string.

EXAMPLE

--if an object is called Box01, you could use

objName = "Box01"

objPath = execute ("$'"+objName + "'")

See also

Why does Execute return 'undefined' when accessing a loop variable?

Frequently Asked Questions


How do I access the Alpha values shown in the viewport?

MAXScript FAQ > How do I access the Alpha values shown in the viewport?

Meshes use an internal Mapping Channel –2 to store the Alpha values shown in the viewports. There are a couple of meshop methods to read and write the data to this mapping channel.

The following topic explains some details:

Accessing the Viewport Vertex Alpha Values

See also

Frequently Asked Questions


How do I change the text in a Text Shape dynamically?

MAXScript FAQ > How do I change the text in a Text Shape dynamically?

Normally, the text of a Text shape is not animatable. The resulting mesh will be evaluated once at the beginning of the rendering and will not change as it is considered static (not changing over time). A workaround is to assign a script controller to a property of the text shape which will do two things: tell the renderer that the text shape is animated and thus requires reevaluation on each frame, and set the actual text in the text property.

WARNING!

Changing the text object's text property in anything other than a controller applied to the text object can lead to a renderer crash!

EXAMPLE

b=box name:"ControlBox" wirecolor:blue

t=text name:"ControlledText" wirecolor:red

t.baseobject.renderable=true

t.kerning.controller=float_script()

scrpt="dependsOn

$'"+b.name+"';$'"+t.name+"'.text=$'"+b.name+"'.height

as string\n0"

t.kerning.controller.script=scrpt

animate on at time 100 b.height*=2

max tool zoomextents all

playAnimation()

See also

Text : Shape

Frequently Asked Questions


How do I Sort a MultiMaterial By Material ID?

MAXScript FAQ > How do I Sort a MultiMaterial By Material ID?

Since 3ds Max 4, material IDs can be specified independently from the sub-material order inside a MultMaterial. The material IDs can get messy after a long process of adding sub-materials. Especially when giving a scene to other people, it might be a good idea to reorder the sub-materials by sorting the Material IDs in ascending order for easier access.

The following function performs this operation using a simple bubble sort algorithm without using the built-in sort or qsort functions provided by MAXScript.

A bubble sort algorithm compares two values and switches their places when their order is not right. It repeats this process until no changes are required anymore. The name of the method is based on the fact that entries with low values tend to float up "to the surface" while higher values fall down "to the bottom".

The function sets a flag variable and repeats a while loop until the flag is set to true. The flag will be set to false whenever two materials have switched places denoting that the sorting is not over yet. Inside the while loop, a for loop will run through the sub-materials and compare pairs of neighbor Material ID values. When the current value is higher than the following one, then their IDs, the respective sub-materials, the names and the enable switches have to change places.

SCRIPT

fn sortMultiSubById m =

(

if classof m == MultiMaterial then --make sure the material is MultiMaterial

(

 local sorted = false --initialize a local variable as a sort status flag

 while not sorted do --repeat until the flag is set to true

 (

  sorted = true --set the flag to true in the beginning

  --loop though all sub-materials except the last one:

  for i = 1 to m.numsubs-1 do

  (

   --if the MatID of the current sub-material is greater than the next one...

   if m.materialIDList[i] != undefined and m.materialIDList[i+1] and m.materialIDList[i] > m.materialIDList[i+1] do

   (

    --store the current material in a temp. variable

    tmp = m.materialList [i]

    --copy the next material into the current one

    m.materialList [i] = m.materialList[i+1]

    --copy the current material into the next one using the temp var.

    m.materialList[i+1] = tmp

    --do the same with the material IDs

    tmp = m.materialIDList[i]

    m.materialIDList[i] = m.materialIDList[i+1]

    m.materialIDList[i+1] = tmp

    --then copy the states of the enable checkboxes

    tmp = m.mapEnabled[i]

    m.mapEnabled[i] = m.mapEnabled[i+1]

    m.mapEnabled[i+1] = tmp

    --and finally switch the places of the user-defined names.

    tmp = m.names[i]

    m.names[i] = m.names[i+1]

    m.names[i+1] = tmp

    --set the flag to false as we switched places, ergo sorting goes on

    sorted = false

   )--end if

  )--end for

 )--end while

)--end if

)--end fn

-- Sample usage:

sortMultiSubById $Box01.material

See also

MultiMaterial : Material

Frequently Asked Questions


How do I access UI elements to change their properties?

MAXScript FAQ > How do I access UI elements to change their properties?

A user asked:

I have built a UI with buttons and progressBars. The progressBars are actually being used as small color indicators of availability. I want to change the color of the progress bars according to the files found.

But I get 'undefined' if I put it after the creation of the rollout with the progress bars. I need to be able to change the color of these progress bars after they've been created based on data collected.

Answer:

Let's say you are creating a UI rollout with some progressbar in it.

macroScript TestUI category:"MXS Help"

(

-- note that the mactoscript itself defines a scope

rollout testUI_Rollout "Testing..."

(

progressbar Indicator01 width:20 height:20 color:green value:100

)

createDialog testUI_Rollout 100 100

)

You have 3 ways to access the Indicator01:

1. Inside the rollout

2. Before the rollout is created

3. After the rollout is created

1. is obvious and will not be discussed here.

2. This is rather interesting because you can access values that are not YET defined, but are at least pre-initialized.

macroScript TestUI category:"MXS Help"

(

local testUI_Rollout

-- this defines a variable

-- which has a memory address but still not valid value.

-- If you create a function that accesses the variable, the

-- evaluation will proceed as it sees the variable and assumes

-- it is a valid rollout. Later, when the actual execution of

-- the script happens, the variable will REALLY point at a valid

-- rollout, so everybody is happy!

fn changeTheLamp theColor =

(

testUI_Rollout.Indicator01.color = theColor

-- the function is outside of the rollout context,

-- so it has to prefix the UI element access.

)

-- This rollout is defined even before the rollout with the lamp

-- Still, it will be able to change the lamp to yellow using the

-- above function!

rollout Changer_Rollout "Testing..."

(

button changeIt "CHANGE STATE"

on changeIt pressed do changeTheLamp [255,255,0]

)

rollout testUI_Rollout "Testing..."

(

progressbar Indicator01 width:20 height:20 color:green value:100

)

createDialog Changer_Rollout 100 30 100 100

createDialog testUI_Rollout 100 100 100 200

)

3. Let's assume you want to access the value of Indicator01 or change its color after the dialog was created. In this case, since the variable TestUi_Rollout points at the rollout definition, you have to access the Indicator01 by prefixing it with the rollout name:

macroScript TestUI category:"MXS Help"

(

-- note that the mactoscript itself defines a scope

rollout testUI_Rollout "Testing..."

(

progressbar Indicator01 width:20 height:20 color:green value:100

)

createDialog testUI_Rollout 100 100

TestUI_rollout.Indicator01.color = red

)

Note that the line is INSIDE the scope of the macroScript where TestUI_rollout is visible. If you want to access the rollout from another script, you would have to define the rollout as global variable:

macroScript TestUI category:"MXS Help"

(

global testUI_Rollout --now the rollout is visible to anyone outside!

rollout testUI_Rollout "Testing..."

(

progressbar Indicator01 width:20 height:20 color:green value:100

)

createDialog testUI_Rollout 100 100

)

macroScript ChangeStatusTestUI category:"MXS Help"

(

TestUI_rollout.Indicator01.color = red

)

If you execute the first macro, a rollout with green light appears.

If you execute the second one, the lamp turns red.

As you can see, you can access anything from anywhere, provided that you have defined the respective rollouts as local or global variables in upper scopes to make them "visible". Even better, you can declare the variables prior defining their actual contents and access them before the point they are defined...

See also

Frequently Asked Questions


How do I display a value in a Rollout?

MAXScript FAQ > How do I display a value in a Rollout?

The following script is a test bed for value display in different User Interface elements. It is intended to show how to update UI properties to give feedback to the user.

Copy the code into a new Script Editor, press Ctrl+E to evaluate and press the "Generate New RANDOM Value" multiple times to see different methods to display the value in the Rollout.

SCRIPT

rollout test_digits "Display Values"

(

group "Display"

(

spinner spinner_item "The Value:" range:[0,1000,0] align:#center fieldwidth:50

edittext edit_text_item "The Value:" text:"" width:100 align:#center

button button_item "No Value" width:100 align:#center

label label_item "No Value" align:#center

progressbar progress_bar_item height:10 width:180 color:(color 255 100 100) orient:#horizontal

listbox list_box_item items:#()

)

button start_test "Generate New RANDOM Value..."

progressbar progress_bar2_item height:90 width:10 color:(color 255 100 100) orient:#vertical pos:[12,20]

on start_test pressed do

(

minValue = 0

maxValue = 100

theValue = random minValue maxValue

sliderTime = theValue

spinner_item.value = theValue

edit_text_item.text = theValue as string

button_item.text = theValue as string

label_item.text = theValue as string

progress_bar_item.value = 100.0*theValue/maxValue

progress_bar_item.color = color (255.0*theValue/maxValue) 128 0

progress_bar2_item.value = 100.0*theValue/maxValue

list_box_item.items = append list_box_item.items ("Value is now "+theValue as string)

list_box_item.selection = list_box_item.items.count

)--end on

)--end rollout

createDialog test_digits 200 300

See also

Creating MAXScript Tools - Topics Index

Frequently Asked Questions


How do I update the items in a dropdownList or listBox?

MAXScript FAQ > How do I update the items in a dropdownList or listBox?

The .items property is an array of strings. You can manipulate the array just like a regular array, use methods like append, findItem, deleteItem etc. to change its content, and assign the result to the .items property as often as you want.

The following sample script creates a dialog with a listBox UI element containing two initial items. Also there are two buttons to manipulate the content of the listBox. Pressing the first button will append a new item to the end of the list. Pressing the second button will insert the new item before the currently selected item. Pressing the third button will delete the currently selected item from the list.

See the comments in the code for more details!

EXAMPLE

rollout test "Test"

(

listBox testList items:#("Item 1","Item 2")

button addToList "Add Item To End Of List" width:180

button insertToList "Insert After Current Item" width:180

button removeFromList "Remove Current Item" width:180

--Append a new Item to the array. Since append returns the resuling array,

--it is OK to assign the result directly to the .items property

on addToList pressed do

 testList.items = append testList.items ("Item "+ (testList.items.count+1) as string)

--Instert new item before current item

on insertToList pressed do

(

--Check whether current item selection exists (greater than 0)

 if testList.selection > 0 do

 (

--Because insertItem returns OK instead of the resulting array,

--you cannot assign the result of the expression directly to the property.

--Instead, you have to get a copy of the items array in a local variable...

  temp_array = testList.items

--...perform the insertion with the temp. array in the local variable...

  insertItem ("Item "+ (testList.items.count+1) as string) temp_array testList.selection

--...and assign back the temp. array to the .items property

  testList.items = temp_array

 )

)

--Remove currently selected item from the list:

on removeFromList pressed do

(

--Check whether there are any items left and there is a valid selection.

--Then delete the current item. DeleteItem returns the resulting array,

--so you can assign the result directly to the .items property

 if testList.items.count > 0 and testList.selection > 0 do

  testList.items = deleteItem testList.items testList.selection

)

)

createDialog test 200 220

See also

Creating MAXScript Tools - Topics Index

Frequently Asked Questions


How do I call the dropdownList Selected handler as a function?

MAXScript FAQ > How do I call the dropdownList Selected handler as a function?

A user asked:

Event handlers of User Interface Controls can be called as functions, for example myButton.pressed(), mySpinner.changed 10.0 and so on, but this is not possible with the on selected() event handler of a dropdownlist control because it already has a property called .selected that "hides" the function.

Is there any way to call this method?

Answer:

Not directly - it is a known limitation, but unlikely to get fixed because of backwards compatibility problems.

What you can do is define a function that does what the handler does, then call this custom function from both the handler and from whatever other code wants to invoke the handler.

EXAMPLE

rollout testddl_rollout "Dropdownlist Handler"

(

dropdownlist ddl_someList items:#("1","2","3") --this is the dropdownlist

button btn_select1 "Select 1" --these buttons will set the list

button btn_select2 "Select 2" --by calling the custom function that

button btn_select3 "Select 3" --replaces the on selected() handler

--this is the custom function that performs the operations normally done

--inside the on selected() event handler:

fn ddl_someList_Selected itm = --we pass the argument passed to the handler

(

format "You selected %\n" itm --and do something inside

)

--now we can call this custom function from the event hander itself

on ddl_someList selected itm do ddl_someList_Selected itm

--and from any other event handlers that want to affect the dropdownlist

on btn_select1 pressed do ddl_someList_Selected (ddl_someList.selection = 1)

on btn_select2 pressed do ddl_someList_Selected (ddl_someList.selection = 2)

on btn_select3 pressed do ddl_someList_Selected (ddl_someList.selection = 3)

)

createDialog testddl_rollout

See also

Dropdownlist

Frequently Asked Questions


How do I uncheck a MacroScript button correctly?

MAXScript FAQ > How do I uncheck a MacroScript button correctly?

A user asked:

Let's say you have a macroscript button that opens a dialog. Now you'd like to take advantage of the isChecked handler to show the button being checked when the dialog is open and when pressed again (unchecked) will close the dialog. So far so good.

Now the user closes the interface using the [x] button.. or any other means except pressing that same macroscript button. How does one go about un-checking that macroscript button?

Answer:

Here is one possible way to implement this behavior using a "private global" variable (local to the macroScript's scope) which holds the current open/closed state.

This variable can be set from inside the On Close() handler of the rollout so when you hit [X], it forces the 3ds Max GUI to update and uncheck the button.

This can be done using a global variable (if you want other scripts to be able to force your script / dialog to close). Also, more error checking could be added, but the general idea is this:

EXAMPLE

macroScript test category:"Tests"

(

 local isOpen = false --initialize to false (closed)

 rollout myRollout "My Rollout"

 (

  label lbl_hello "hello world"

  on myRollout close do --when closing, set to false and redraw GUI

  (

   isOpen = false

   updateToolbarButtons()

  )

 )

 on execute do

 (

  if isOpen then --if open, close it

  (

   destroyDialog myRollout

   isOpen = false --and lower the flag

  )

  else --if closed, open it

  (

   createDialog myRollout

   isOpen = true --and raise the flag

  )

 )

 on isChecked return isOpen --return the flag

)

See also

Frequently Asked Questions


How do I create a line between two points?

MAXScript FAQ > How do I create a line between two points?

In order to create a simple line between two points, you have to perform the following steps:

  • Create a new SplineShape object, position at the first point.

  • Add a new Spline to the new object.

  • Add a new corner Knot at the first position.

  • Add a new corner Knot at the second position. Tell both knots to define a linear segment.

  • Update the SplineShape to reflect the changes.

  • Return the SplineShape as the result.

Here is the complete function implementing these steps:

SCRIPT

fn drawLineBetweenTwoPoints pointA pointB =

(

  ss = SplineShape pos:pointA

  addNewSpline ss

  addKnot ss 1 #corner #line PointA

  addKnot ss 1 #corner #line PointB

  updateShape ss

  ss

)

newSpline = drawLineBetweenTwoPoints [10,20,30] [100,200,10]

See also

SplineShape : Shape

Spline Shape Common Properties, Operators, and Methods

How To ... Draw a Freehand Spline

Frequently Asked Questions


How Do I instance Modifiers and Controllers inside the same object?

MAXScript FAQ > How Do I instance Modifiers and Controllers inside the same object?

A user asked:

Is there a function for copying a modifier and then pasting an instance of it onto the same object? I can copy and paste it but not as an instance.

Answer:

Reading an existing modifier through MAXScript and applying the SAME modifier will create an instance automatically.

FOR EXAMPLE:

b = Box heightsegs:10 height:100 --creates a high box

addModifier b (Bend()) --adds a bend modifier to it

addModifier b (b.bend) --instances the same modifier on top

So you just read ANY value in MAXScript - using it again means INSTANCE it.

IF YOU TRY

for i in selection do addModifier i (Bend())

you are adding a unique modifier to every object, because the constructor expression (Bend()) is evaluated n times where n is the number of selected objects.

BUT IF YOU USE

theBend = Bend()

for i in selection do addModifier i theBend

then you are creating a single modifier, storing it into a variable and then applying an instance of it to each object in the selection.

Even better, mapped operations are also good for instancing. The same result as above can be achieved with much less code:

FOR EXAMPLE

addModifier selection (Bend())

adds the SAME Bend modifier as instance to all selected objects, because the constructor expression (Bend()) is evaluated only once and is then applied in an internal loop as instance to every object in the collection.

Obviously, you can instance between objects, too.

You can also apply the same technique to controllers. For example, if you want to instance the controller of the X_Position and assign it to the Bend Angle, then you can say:

FOR EXAMPLE

theBox = Box heightsegs:10 height:100

theBox.bend.angle.controller = theBox.position.x_position.controller

Now if you move the object along X, the bend angle will change accordingly.

See also

Frequently Asked Questions


How do I get a Space Warp by Binding?

MAXScript FAQ > How do I get a Space Warp by Binding?

A user asked:

I created an object and a Conform space warp. I used bindSpaceWarp to bind the object to the space warp. After doing this a dozen times, I wanted to know... "Which space warp was object A assigned to?"

Answer:

You can explore the dependencies of existing space warps in the scene in order to filter the one that is affecting your object:

EXAMPLE

(

theArray = for i = 1 to 10000 collect random 1 100

st = timestamp()

for j = 1 to 1000 do

fn getSpaceWarpByBinding theBinding =

(

--Loop through all space warps in the scene

for s in SpaceWarps do

(

--Loop through all dependents of the current space warp

--If the space warp is dependent on the supplied binding, return it!

for o in refs.dependents s where o == theBinding do return s

)--end s loop

)--end fn

--Example Usage:

theSW = getSpaceWarpByBinding $Sphere01.modifiers[1]

See also

MAXWrapper Common Properties, Operators, and Methods

SpacewarpObject : Node

Frequently Asked Questions


How do I delete randomly a specified percentage of geometry objects?

MAXScript FAQ > How do I delete randomly a specified percentage of geometry objects?

A user asked:

I'm trying to create a script that will delete a certain percentage of the objects in a scene. I want the objects to be chosen randomly. I want the script to affect only the meshes.

Answer:

Here is a possible approach:

SCRIPT

-- Collect the object of a certain type into an array, for example

-- this one collects all geometry objects, excluding the target objects

-- which are of Geometry superClass for pre-MAXScript historical reasons

candidatesArray = for o in Geometry where classof o != TargetObject collect o

-- Because you want to remove random objects, but a specified percentage,

-- it is a good idea to make the decision which objects will be deleted

-- BEFORE actually deleting any objects.

-- You can create a second array and fill it up with the actual

-- objects to be deleted:

deadRowArray = #() -- init. an empty array

thePercentage = 50.0 -- define the percentage

-- Calculate the number of objects to delete:

numberToDelete = (thePercentage / 100.0 * candidatesArray.count) as integer

-- Loop until the deadRow array gets filled

-- with the desired number of objects:

while deadRowArray.count < numberToDelete do

(

newIndex = random 1 candidatesArray.count—generate new random index

--if not already chosen, add it to the deadrow array

if findItem deadRowArray candidatesArray[newIndex] == 0 do

append deadRowArray candidatesArray[newIndex]

)

delete deadRowArray --finally, delete the selected objects

See also

Frequently Asked Questions


How do I Create a Button to Show the Next Object?

MAXScript FAQ > How do I Create a Button to Show the Next Object?

A user asked:

I want to create a button that shows only one object at a time, hiding all others. When I press it multiple times, it should loop through the scene objects showing me the next one.

Answer:

Here is a possible solution:

SCRIPT

macroScript showNext category:"MXS Help"

(

local current_object = 0 --this is local to the macroScript

on execute do

(

allObjects = objects as array—collect all objects

hide $* --hide all objects

current_object += 1 --increment the counter

if current_object > allObjects.count do—loop if necessary

current_object = 1

if allObjects.count > 0 do --if anything in the scene...

unhide allObjects[current_object]

-- then unhide the current object

)

)

And this is the same script, but changed to show objects in alphabetical order:

SCRIPT

macroScript showNextABC category:"MXS Help"

(

local current_object = 0 --this is local to the macroScript

on execute do

(

-- collect all names and sort them:

allObjectNames = sort( for i in objects collect i.name )

hide $* --hide all objects

current_object += 1 --increment counter

if current_object > allObjectNames.count do --loop if necessary

current_object = 1

if allObjectNames.count > 0 do --if anything in the scene...

unhide getNodeByName allObjectNames[current_object]

-- then get the object by name and unhide it

)

)

See also

Frequently Asked Questions


How do I batch-process multiple .MAX files?

MAXScript FAQ > How do I batch-process multiple .MAX files?

A user asked:

I'm just wondering if there is an easy way on doing this. Let say I've got 100 max scene file and I need to scale or move an object in each file. Is there a command to tell 3dsmax to open each file, modify that object and then save the file again?

Answer:

Here is the basic code needed to select a path, collect all max files in the specified directory, open each one and then save it again. You can include your own code in the space between the loading and the saving.

SCRIPT

thePath = getSavePath() --get a path dialog to specify the path

if thePath != undefined do --if the user did not cancel

(

theFiles = getFiles (thePath+"\\*.max") --collect all max files in the dir.

for f in theFiles do --go through all of them

(

loadMaxFile f --load the next file

-----------------------------------------------------------

-- MAKE SOME SCRIPTED CHANGES TO THE SCENE HERE...

-----------------------------------------------------------

saveMaxFile f --save the file back to disk

)--end f loop

resetMaxFile #noPrompt --at the end, you can reset

)--end if

See also

3ds Max File Loading and Saving

Frequently Asked Questions


Can I use data from external files to control my scene or animation?

MAXScript FAQ > Can I use data from external files to control my scene or animation?

The answer is a definitive yes. All necessary classes and methods required to read and write text and binary files (and much more) can be found in the topic External File Access - Topics Index

See also

Frequently Asked Questions


How do I Get the Local Rotation of a Face?

MAXScript FAQ > How do I Get the Local Rotation of a Face?

Here is how to obtain the rotation value displayed in the Rotate Transform Type-In box when in the local coordinate system from a face in an Editable Mesh.

GetFaceNormal returns the face normal in local coordinates as a Point3 value.

Multiplied by the transformation matrix of the object, we get the face normal in world space.

Using matrixFromNormal , we create a new matrix3 value using the face normal as the local Z axis. This matrix3 value is rotated relatively to the identity matrix exactly by the values we are searching for.

By converting the matrix3 value to eulerAngles , we retrieve exactly the same 3 values displayed in the Transform Type-In when a face is selected while in Local coordinate system.

SCRIPT

fn getLocalFaceRotation mesh index =

(

(matrixFromNormal (getFaceNormal mesh index)*mesh.transform ) as eulerAngles

)

for f in getFaceSelection $ do

 format "Face: % - Rotation: % \n" f (getLocalFaceRotation $ f)

See also

Frequently Asked Questions


How do I Split a Mesh by UV Elements?

MAXScript FAQ > How do I Split a Mesh by UV Elements?

Using the Unwrap_UVW modifier's Flatten option, you can split the UV Coordinates into elements based on a threshold angle for easier texturing. The following scripted function allows you to detach the mesh faces based on the corresponding Map faces. (Remember, there is a one-to-one correspondence between their indices, so the task is relatively trivial - see Understanding Texture Coordinates ).

SCRIPT

fn splitMeshByUVElements mesh channel =

(

local obj = copy mesh --copy the original object

convertToMesh obj --convert to editable mesh

while obj.numfaces > 0 do --repeat until all elements have been detached

(

 face_array = #(1) --init. an array including only face 1

 cnt = 0 --init. a counter

 --repeat until the counter is higher than the faces stored in the array

 while cnt < face_array.count do

 (

  cnt += 1 --increase the counter

  --get all map vertices used by the current map face in the collection array:

  theVerts = meshop.getMapVertsUsingMapFace obj channel #(face_array[cnt])

  --get all map faces used by these map vertices -

  --this gives us all neighbours of the current map face

  theFaces = meshop.getMapFacesUsingMapVert obj channel theVerts

  --make sure only unique faces are written to the array

  for f in theFaces where findItem face_array f == 0 do

   append face_array f

 )--end while cnt

 --once all connected faces in an element are collected,

 --create a new empty EMesh:

 new_emesh = Editable_mesh()

 --detach the collected faces and assign to the EMesh's TriMesh

 new_emesh.mesh = meshop.detachFaces obj face_array delete:true asMesh:true

 --Copy the transformation of the original object

 new_emesh.transform = mesh.transform

 --Assign a unique name based on the original one

 new_emesh.name = uniquename (mesh.name +"_UVsplit")

)--end while numfaces

delete obj --delete the clone which has no faces at this point

)

--Example usage:

splitMeshByUVElements $Teapot01 1

See also

Understanding Texture Coordinates

Unwrap_UVW : Modifier

Meshop General Mapping Methods

Meshop Face Methods

Frequently Asked Questions


How do I align the UVW_Modifier's Gizmo to a selected face?

MAXScript FAQ > How do I align the UVW_Modifier's Gizmo to a selected face?

The following code implements the "Normal Align" feature of the UVW_Map modifier. The "Normal Align" button is not directly accessible to MAXScript. This function can be used as a replacement, and might help you understand the usefulness of the Vector Cross Product.

SCRIPT

fn alignUVGizmo theObj theFace =

(

-- First get the face normal vector.

-- It is shown in BLUE on the image

faceNormal = in coordsys theObj (getFaceNormal theObj theFace)

-- This is the desired up vector in world space

-- It is shown in YELLOW on the image

worldUpVector = [0,0,1]

-- Now get the cross-product of the face normal and the up vector.

-- This will give you a vector that is perpendicular to the plane defined

-- by the normal and the up vector. Normalize it to get a normal vector

-- pointing to the right.

-- It is shown in RED on the image

rightVector = normalize (cross worldUpVector faceNormal)

-- Now using the face normal and the new vector,

-- get a vector that is perpendicular to the plane defined by the two.

-- This is the "local up vector", the vector that is the projection of

-- the world up vector on the face you selected. This one is perpendicular

-- to both the face normal and the right vector, and you have 3 normals now

-- that define the X, Y and Z of your new orthogonal coordinate system

-- for the UVW gizmo!

-- Note that this new vector can be seen as the SHADOW of the World Up vector

-- on the face of the object in the above image.

-- It is now displayed in green in the image below:

upVector = normalize ( cross rightVector faceNormal )

-- Using the 3 vectors, define a matrix3 value which represents the

-- coordinate system of the gizmo. The face normal is the Z axis,

-- the right vector is the X axis, and the local up vector is the Y axis:

theMatrix = matrix3 rightVector upVector faceNormal [0,0,0]

theMap = Uvwmap()

modPanel.addModToSelection theMap ui:on

theMap.gizmo.transform = theMatrix

)

See also

Point3 Values - Vector Cross Product

Frequently Asked Questions


How Do I Select a Face of an Editable Mesh by its Index?

MAXScript FAQ > How Do I Select a Face of an Editable Mesh by its Index?

A user asked:

Is there a way to select a face in an editable mesh when you only know its index?

Answer:

When doing it just once, you can quickly type in the Listener something like

setFaceSelection $ {10}

This will select face with index 10 assuming that a single object is selected and it is an Editable_Mesh.

If you are doing this very often, the following macroScript provides a UI with a spinner to select the face index and some error handling:

SCRIPT

macroScript FaceByIndex category:"MXS Help"

(

global SelectFaceRoll

try(destroyDialog SelectFaceRoll)catch()

rollout SelectFaceRoll "Select Face"

(

spinner face_index "Face Index" type:#integer range:[1,100000000,1]

on face_index changed val do

(

if isValidNode selection[1] and classof selection[1].baseobject == Editable_Mesh do

(

if val <= selection[1].numfaces then

setFaceSelection selection[1] #{val}

else

setFaceSelection selection[1] #{}

)

)

)

max modify mode

try(subObjectLevel = 3)catch()

createDialog SelectFaceRoll 150 30

)--end macro

See also

Mesh Face Methods

Frequently Asked Questions


How Do I Get Faces With Normals Facing Away?

MAXScript FAQ > How Do I Get Faces With Normals Facing Away?

A user asked:

Can anyone tell me how to get faces that have normals pointing outside of the current viewport?

Answer:

You can get the face normal in view space, then you just have to check the sign of the Z component. If it is negative, it is facing away from the camera!

SCRIPT

(

theObj = Teapot segs:10 --create a teapot

convertToMesh theObj --convert to EMesh

theMeshCount = theObj.numfaces --get the number of faces in the object

selArray = #() --init. an array to collect faces

for f = 1 to theMeshCount do --loop through all faces

(

in coordsys (inverse (viewport.GetTM())) theFN = getFaceNormal theObj f

if theFN.z < 0 then append selArray f --if Z is negative, add to array

)

setFaceSelection theObj selArray --set the face selection in the EMesh

max modify mode --go to modify mode

select theObj --select the mesh

subObjectLevel = 3 --go to Face SO level

modPanel.addModToSelection (deleteMesh()) --add a delete mesh, preserving the SO selection

)

Result: All triangles facing away from the camera will be deleted!

The image on the left shows the teapot with deleted backfaces as seen from a camera viewport. The image on the right shows the teapot and the camera as seen from the side. Note that for the screenshot, the backface culling was disabled (you can see the backfaces on the right image), but the left image looks just like it would with backface culling enabled! This is because the script deletes the same faces the viewport backface culling would skip!

See also

Frequently Asked Questions


How do I build Unconnected Edges Selections from EPoly Edge Selection?

MAXScript FAQ > How do I build Unconnected Edges Selections from EPoly Edge Selection?

A user asked:

I want to filter the edge selection and create arrays containing connected edges, something like "edge selection elements". Edges from two arrays will never be connected, in other words will not share vertices.

Answer:

The following pseudo-code describes a possible approach:

  • Get the current edge selection into a main selection array.

  • Create an empty array to hold the unconnected selections

  • (A) Append a new empty array to it as a sub-array.

  • Note the index of the current sub-array.

  • Get the first edge from the main selection array.

  • Delete it from the main selection array, append to the current sub-array of the unconnected selections array.

  • For every edge in the new sub-array,

  • Get its corresponding vertices that define the edge

  • For each of the two vertices, get their edges - this gives you all neighbor edges sharing a vertex with the current edge

  • Loop through the neighbors and see if they appear in the main selection array.

  • If an edge is in the main selection array, delete it from there and append it to the current sub-array.

  • Finish the loop when you have checked all edges from the sub-array.

  • At this point, if all edges were connected, the main array will be empty. If it is not empty, there are edges unconnected to the selections you already collected.

  • Add a new empty sub-array to the collection array

  • Repeat starting with (A)

The function is ready when there are no edges left in the main array.

This will give you as many sub-arrays are there are unconnected edge selections.

The following function implements the pseudo-code in MAXScript code:

SCRIPT

fn getEPolyUnconnectedEdgesSelections thePoly =

(

--get the edge selection

mainSelection = (polyOp.getEdgeSelection thePoly) as array

--init. an array to collect sub-arrays with selections "elements"

unconnectedSelections = #()

--repeat until the main selection array is empty

while mainSelection.count > 0 do

(

--append a new empty sub-array:

append unconnectedSelections #()

--remember the current sub-array's index:

currentSelCount = unconnectedSelections.count

--append the first edge from the main selection array to the sub-array:

append unconnectedSelections[currentSelCount] mainSelection[1]

--and remove the first edge from the main selection array:

deleteItem mainSelection 1

--initialize a counter:

cnt = 0

--while the counter is less than the edges in the sub-array

while cnt < unconnectedSelections[currentSelCount].count do

(

 cnt += 1 --increase the counter by 1

 --get the vertices of the current edge in the current sub-array:

 currentEdgeVerts = (polyOp.GetVertsUsingEdge thePoly  unconnectedSelections[currentSelCount][cnt]) as array

 neigborEdges = #() --init. an array to collect neighbor

 --for every vertex in the current edge,

 for v in currentEdgeVerts do

 --add the edges used by the vertex to the neighbors array

  join neigborEdges ((polyOp.GetEdgesUsingVert thePoly v) as array)

 --for each neighbor edge,

 for edge in neigborEdges do

 (

  --see if the edge is in the main selection array

  checkInSelection = findItem mainSelection edge

  --if it is,

  if checkInSelection > 0 do

  (

   --delete the edge from the main array

   deleteItem mainSelection checkInSelection

   --and add it to the current sub-array

   append unconnectedSelections[currentSelCount] edge

  )--end if

 )--end for edge loop

)--end while cnt

)--end while mainSelection.count

--finally, return the array containing the sub-arrays of connected edges:

unconnectedSelections

)--end fn

getEPolyUnconnectedEdgesSelections $Box01 --call the function

See also

Frequently Asked Questions


How do I remove mid-edge EPoly Vertices?

MAXScript FAQ > How do I remove mid-edge EPoly Vertices?

A user asked:

I want to filter the edge selection and create arrays containing connected edges, something like "edge selection elements". Edges from two arrays will never be connected, in other words will not share vertices.

Answer:

The following code implements a possible solution:

SCRIPT

macroScript KillMidEdgeVerts category:"MXS Help"

(

--make sure a single EPoly object is selected

on isEnabled return

 selection.count == 1 and classof selection[1].baseobject == Editable_Poly

on execute do

(

 thePoly = selection[1] --get the selected object

 select thePoly --select it

 max modify mode --switch to modify panel

 --set the base object as current level:

 modPanel.setCurrentObject selection[1].baseobject

 subObjectLevel = 1 --set sub-*object level to vertex level

 numVerts = (polyop.getNumVerts thePoly) --get the total vertex count

 undo on "KillMidEdgeVerts" --enable undo context

 (

  --loop backwards from the last to the first vertex

  for v = numVerts to 1 by -1 do

  (

   --get the edges using the vertex to check the count

   nVerts = (polyop.getEdgesUsingVert thePoly v) as array

   if nVerts.count == 2 do --if only two edges found, then

   (

    --get the verts of the first egde

    edge1verts = (polyop.getVertsUsingEdge thePoly nVerts[1]) as array

    --calculate the vector defined by the two vertices in the first edge

    vector1 = (polyop.getVert thePoly edge1verts[1]) - (polyop.getVert thePoly edge1verts[2])

    --get the verts of the second edge

    edge2verts = (polyop.getVertsUsingEdge thePoly nVerts[2] as array)

    --calculate the vector defined by the two vertices in the second edge

    vector2 = (polyop.getVert thePoly edge2verts[1]) - (polyop.getVert thePoly edge2verts[2])

    --calculate the angle between the two normalized vectors

    angle = acos (dot (normalize vector1) (normalize vector2))

    --if the angle is less than the threashold (change 0.01 to whatever threashold you want!)

    if angle < 0.01 do

    (

     select thePoly.verts[v] --then select the current vertex

     thePoly.EditablePoly.buttonOp #Remove --and hit the remove button

    )

   )--end if

  )--end v loop

 )--end undo

)--end on

)--end macro

See also

Frequently Asked Questions


How do I Select Edges Between Materail IDs?

MAXScript FAQ > How do I Select Edges Between Materail IDs?

A user asked:

I want to select the edges between different Material IDs in an Editable Poly object.

Answer:

The following code implements a possible solution:

SCRIPT

macroScript SelMatIDEdges category:"MXS Help"

(

--The ActionItem will only be enabled when a single object with

--Editable_Poly base object is selected:

on isEnabled return

 selection.count == 1 and classof selection[1].baseobject == Editable_Poly

--When executed,

on execute do

(

 theEP = selection[1].baseobject --get the base object of the selected object

 edgeSelArray = #() --init. an empty array to collect the edges

 eCount = polyOp.getNumEdges theEP --get the total number of edges

 for edge = 1 to eCount do --loop through all edges

 (

  --get the faces sharing the current edge

  theFaces = (polyOp.getFacesUsingEdge theEP #(edge)) as array

  --if there are two faces sharing the edge,

  if theFaces.count == 2 do

  (

   --compare their Material IDs. If different, collect the edge

   if polyOp.getFaceMatID theEP theFaces[1] != polyOp.getFaceMatID theEP theFaces[2] do

    append edgeSelArray edge

  )--end if

 )--end loop

 --After checking all edges, select the collected ones

 polyOp.setEdgeSelection theEP edgeSelArray

 max Modify Mode -- switch to modify panel

 modPanel.setCurrentObject theEP -- go to the BaseObject level

 subObjectLevel = 2 --and go to Edge SubObject level to show the result

)--end on execute

)--end macroScript

A Box primitive has 6 Material IDs assigned to its 6 sides.
In this example, a box with 4x4x4 segments was converted to Editable Poly.
Then the above script was executed.

See also

Editable Poly Methods - Face Material IDs

Frequently Asked Questions


How do I link the rotation of an object to the scene time?

MAXScript FAQ > How do I link the rotation of an object to the scene time?

A user asked:

I want to create a simple expression that will rotate an object based on the current time.

Answer:

You can assign a Float Script Controller to the respective rotation sub-controller and use the currentTime global variable to get the time.

FOR EXAMPLE,

if you want to rotate the object about its X axis, you should assign a Float Script controller to the .rotation.x_rotation.controller property:

obj = Teapot()

obj.rotation.x_rotation.controller = Float_Script()

obj.rotation.x_rotation.controller.script = "currentTime"

This will rotate the object, but the rotation will be very fast because the time value is taken as radians, causing a full 360 degrees rotation every 6.28 frames!

To take the time as degrees,

YOU CAN USE

obj.rotation.x_rotation.controller.script = "degToRad currentTime"

This will rotate the object 360 degrees in 360 frames. You can of course multiply the result by any factor to control the exact speed,

LIKE

obj.rotation.x_rotation.controller.script = "0.1 * degToRad currentTime"

will rotate the object at 360 degrees in 3600 frames...

Another way to do the same is using the Float Expression controller. Unfortunately, it is not completely scriptable.

FOR EXAMPLE

obj = Box()

obj.rotation.x_rotation.controller = Float_Expression()

will assign a float expression controller to the X rotation track.

Now you can open the Expression window by going to the Motion tab, right-clicking the controller and selecting Properties...

ENTER THE EXPRESSION

degToRad(F)

and press the Evaluate button.

The result should be the same as the Flot Script controller version.

See also

Frequently Asked Questions


How do I keep a Plane aligned to 3 Point Helpers?

MAXScript FAQ > How do I keep a Plane aligned to 3 Point Helpers?

A user asked:

I have 3 Point Helpers which determines a plane in 3d space and I animated all of them randomly.

How can I keep a Plane object always oriented exactly to the plane determined by the Points?

Answer:

This is a good place to use a Transform Script controller.

  • Create 3 Point Helpers - Point01, Point02 and Point03

  • Create a Plane primitive.

  • Go to Motion tab, select the Transform controller track, assign Transform Script

    • ENTER THE FOLLOWING SCRIPT:

    dependsOn $Point01.pos.controller --update when Point01 moves

    dependsOn $Point02.pos.controller --update when Point02 moves

    dependsOn $Point03.pos.controller --update when Point03 moves

    p1 = $Point01.pos --the position of Point01

    p2 = $Point02.pos --the position of Point02

    p3 = $Point03.pos --the position of Point03

    v1 = normalize (p2-p1) --the vector from Point01 to Point02

    v2 = normalize (p3-p1) --the vector from Point01 to Point03

    nv1 = cross v1 v2 --the cross product, the normal to the plane

    nv2 = cross nv1 v1 --the cross product of the normal and vector 1

    --Create a matrix3 value using he first vector, the vector perpendicular

    --to it and the normal to the plane and the normal vector itself.

    --The translation part (.row4 which is the position) is the middle point

    --of the 3 points' positions:

    matrix3 v1 nv2 nv1 ((p1+p2+p3)/3)

    • Move / animate the points - the Plane should follow.

    See also

    Frequently Asked Questions


How To Make It Faster?

MAXScript FAQ > How To Make It Faster?

The following chapter discusses some general rules and approaches to get the maximum speed out of your code. A MAXScript could do the job as expected but it could do it very slowly or very quickly depending on the writing style of the developer.

In addition, optimizing a script for speed often leads to a cleaner code that is easier to read by others and to maintain by the developer.

Topics:

Disable Viewport Redraws when making changes to scene objects

Disable Undo system when possible

Modify Panel can be slow – change to Create Panel when possible

Use the 'flagForeground' node viewport state method

Never get a single pixel when you can get a whole line

Use Mapped Functions instead of For loops when possible

Only calculate once if possible

Cache freqeuntly used functions and objects

Dice your data into smaller pieces

Use bitArrays instead of Arrays when possible

Pre-initialize arrays when final size is known

Recursive functions can be faster

matchPattern is faster than findString

Do not use return, break, exit or continue

Use StringStream to build large strings

Use name values instead of strings when possible

Try not to use Execute function if there is an alternative

For Loop By Index Vs For Loop Through Collection Performance

Optimizing Particle Flow Script Operator For Loops For Speed

Using Bsearch For Fast Table Lookup

See also

How To Make It Better?

Frequently Asked Questions


Disable Viewport Redraws when making changes to scene objects

MAXScript FAQ > How To Make It Faster > Disable Viewport Redraws when making changes to scene objects.

When an object is being changed via MAXScript, 3ds Max will try to update the changes in the viewports as soon as possible. When the changes are many and done quickly in a loop, redraws should be disabled until all changes have been done. You can use the with redraw off() context or a pair of disableSceneRedraw() and enableSceneRedraw() calls to speed up you code.

redraw

Refreshing the Viewports

Next Tip

Disable Undo system when possible


Disable Undo system when possible

MAXScript FAQ > How To Make It Faster > Disable Undo system when possible

The undo system can consume large amounts of memory and slow down processing.

  • MAXScript commands run from Listener. Script Editor or Macro Script are run within an undo on context.

  • MAXScript commands run from scripted UI controls are not run within an undo on context.

  • Do not delete nodes with undo off, unless you also created the nodes with undo off and did not do anything to the node with undo on.

  • When working with meshes, you typically want to use meshop methods as they support undo/redo. But typically you do not want to store undo records for all operations in a loop, just the first and last.

  • When working with EPoly, you want to store undo records for all operations in a loop.

TEST CASE:

em = mesh()

meshop_setvert = meshop.setvert

fn test7 holdAll =

(

 local nVerts = getnumverts em

 for i = 1 to nVerts do

  with undo (holdAll or (i == 1 or i == nVerts))

   meshop_setvert em i ([1,1,1]*i)

)

FOR 100,000 ITERATIONS:

test7 true -- 85313 msec., 229 MB

test7 false -- 7609 msec., 11 MB

Every operation that creates an undo record will cost time and memory as it will create internal copies of the changing objects to allow an undo later. When making multiple changes in a loop like for example attaching multiple objects together, the Undo system would attempt to create a single undo copy of each resulting object and might even run out of memory. Disabling Undo explicitly using the Undo off () context can help to speed up scripts significantly in such cases.

undo

The following extreme example shows the difference. In both cases, 1000 boxes will be created using MAXScript and then attached to a single mesh using the attach function. In the first case, each attach call will generate by default an undo record. In the second case, the undo will be explicitly disabled.

EXAMPLE 1 - UNOPTIMIZED SCRIPT:

delete $Box* --delete any existing boxes

box_array = #() --initialize an array

for i = 1 to 1000 do --repeat 1000 times

box_array[i] = box pos:[i*30,0,0] --create 1000 boxes

st = timestamp() --get the start time in milliseconds

master_box = convertToMesh box_array[1] --collapse the first box to mesh

for i = 2 to 1000 do --go through all other boxes

attach master_box box_array[i] --attach each box to the mesh

et = timestamp() --stop the time

print (et-st) --print the resulting time

gc() --call Garbage Collection – you will needed it!

On a 800MHz PC, the execution of the attaching part of the script took more than a minute mainly because the system run out of memory and the OS had to swap to disk. Memory usage for 3ds Max went up with about 300 MB!

EXAMPLE 2 - OPTIMIZED SCRIPT:

delete $Box*

box_array = #()

for i = 1 to 1000 do

box_array[i] = box pos:[i*30,0,0]

st = timestamp()

undo off --the only difference - the undo

( --has been turned off

master_box = convertToMesh box_array[1]

for i = 2 to 1000 do

attach master_box box_array[i]

)--end undo off

et = timestamp()

print (et-st)

--call Garbage Collection – you will needed it!

On the same 800MHz machine, the execution of the attaching part of the script took only 3685 milliseconds, almost 20 times faster! There were no memory consumption changes visible in the Windows Task Manager.

Previous Tip

Disable Viewport Redraws when making changes to scene objects

Next Tip

Modify Panel can be slow – change to Create Panel when possible


Modify Panel can be slow – change to Create Panel when possible

MAXScript FAQ > How To Make It Faster > Modify Panel can be slow – change to Create Panel when possible

Some operations on scene objects will reevaluate the modifier stack and also force an update of the Command Panel UI. Even if the viewport redraws are suppressed, the Modify Panel might be forced to redraw. When the modifier stack is not needed by the script (for example for setting Sub-Object levels etc.), it is a good idea to switch to the Create Panel during execution of the script using the max create mode command.

MAX Commands

In 3ds Max 7 and higher, you can also completely disable Modify Panel updates using the new suspendEditing() and resumeEditing() methods:

Command Panels

Previous Tip

Disable Undo system when possible

Next Tip

Use the 'flagForeground' node viewport state method


Use the 'flagForeground' node viewport state method

MAXScript FAQ > How To Make It Faster > Use the 'flagForeground' node viewport state method

The 3ds Max graphics pipeline can use a dual plane technique for speeding up viewport redraws. When only few objects are changing, the graphics subsystem can take a snapshot of the viewport DIB bitmap showing only the non-changing objects which are flagged as background. After that, the graphics pipeline evaluates only the changing objects and draws on top of the background bitmap. These objects are internally flagged as foreground.

The flagForeground method controls the disposition of scene nodes in the viewport foreground/background planes, so you can influence interactive performance on a node. Nodes placed in the foreground plane are redrawn individually and so interactive changes to them through spinners in scripted rollout panels are much faster.

flagForeground

Previous Tip

Modify Panel can be slow – change to Create Panel when possible

Next Tip

Never get a single pixel when you can get a whole line


Never get a single pixel when you can get a whole line

MAXScript FAQ > How To Make It Faster > Never get a single pixel when you can get a whole line

The getPixels and setPixels functions for reading and writing pixels from / to bitmaps are rather slow. When changing a large number or even all pixels of a bitmap, it is a good idea to perform the getPixels and setPixels just once for each horizontal line and do the rest of the work with the resulting array elements.

In the following two examples, a 1000x1000 pixels bitmap should be altered by changing every single pixel. This means reading and writing back one million pixels. In the first example, every single pixel will be read separately, multiplied by a number and written back. We will stop the time in order to compare to the second, optimized version.

EXAMPLE 1 - UNOPTIMIZED SCRIPT:

st = timestamp() --get start time in milliseconds

b = bitmap 1000 1000 color:red --create new bitmap with red background

for y = 1 to 1000 do --go through all lines in the bitmap

(

for x = 1 to 1000 do --go through all pixels in a line

(

pixels = getPixels b [x-1,y-1] 1 --read one pixel from X,Y

pixels[1] *= (x+y)/2000.0 --alter the pixel

setPixels b [x,y] pixels --write modified pixel back

)--end x loop

)--end y loop

et = timestamp() --get end time in milliseconds

print (et-st) --print time to finish

display b --show a nice black-red gradient

Running this script on a 800MHz system resulted in a time stamp of 21091 milliseconds.

In the second example, instead of reading every single pixel, will be read every line and process all its pixels inside the array returned by getPixels before writing the whole line back to the bitmap. This means we will make only 1000 read and 1000 write calls instead of one million.

EXAMPLE 2 - OPTIMIZED SCRIPT:

st = timestamp() --get start time in milliseconds

b = bitmap 1000 1000 color:red --create new bitmap with red background

for y = 1 to 1000 do --go through all lines in the bitmap

(

pixels = getPixels b [0,y-1] 1000 --read all 1000 pixels of a single line

for x = 1 to 1000 do --go through all pixels in the line

(

pixels[x] *= (x+y)/2000.0 --alter the pixel

)

setPixels b [0,y-1] pixels --write back the complete modified line

)

et = timestamp() --get end time in milliseconds

print (et-st) --print time to finish

display b --show the same nice black-red gradient

Running the optimized script on the same 800MHz system resulted in a time stamp of 10786 milliseconds - more than twice as fast!

Previous Tip

Use the 'flagForeground' node viewport state method

Next Tip

Use Mapped Functions instead of For loops when possible


Use Mapped Functions instead of For loops when possible

MAXScript FAQ > How To Make It Faster > Use Mapped Functions instead of For loops when possible

Mapped functions perform a single operation on multiple objects in a selection using an internal loop and can be faster than a MAXScript loop applying the operation on every object separately. All mappable functions are noted as such in this help file.

Collections

Previous Tip

Never get a single pixel when you can get a whole line

Next Tip

Only calculate once if possible


Only calculate once if possible

MAXScript FAQ > How To Make It Faster > Only calculate once if possible

MAXScript does no code optimization. You must do your own optimizations.

Try to avoid running the same calculation more than once, or interrogating the same value in the same node more than once.

TEST CASE:

fn test4a inVal =

(

local res = 0

for i = 1 to 100 do res += ((inVal * 10) + i)

res

)

--show the same nice black-red gradient

fn test4b inVal =

(

local res = 0

local temp = inVal * 10

for i = 1 to 100 do res += (temp + i)

res

)

FOR 100,000 ITERATIONS:

test4a 0   -- 20562 msec.

test4b 0   -- 17797 msec.

In another example, a typical example of a script that you want to be as fast as possible is a Particle Flow Script Operator. In a typical Script Operator, you usually go through all particles in the Particle Container of the current Event and perform some operations on each one of them.

The Proceed handler typically looks like

GOOD CODE:

on Proceed pCont do

(

count = pCont.NumParticles()

for i in 1 to count do

(

pCont.particleIndex = i

pCont.particleVector = pCont.ParticlePosition

)

)

Note that the variable 'count', containing the number of particles to be processed, is evaluated only once and then used as the top limit of the i loop.

Writing the same as

BAD CODE:

on Proceed pCont do

(

for i in 1 to pCont.NumParticles() do

(

pCont.particleIndex = i

pCont.particleVector = pCont.ParticlePosition

)

)

would be a bad idea, because in the case of 1 million particles, the expression pCont.NumParticles() will be evaluated 1 million times instead of just once!

Previous Tip

Use Mapped Functions instead of For loops when possible

Next Tip

Cache freqeuntly used functions and objects


Cache freqeuntly used functions and objects

MAXScript FAQ > How To Make It Faster > Cache freqeuntly used functions and objects

You can store frequently used functions and objects in user variables to faster access.

TEST CASE:

ep = converttopoly (mesh())    --node

ep_bo = ep.baseobject      --ediable poly

polyop_getvert = polyop.getvert    --structure method

IEditablePoly = ep_bo.EditablePoly   --FPS interface

IEditablePoly_GetNumMapChannels =

IEditablePoly.GetNumMapChannels   --FPS interface

FOR 100,000 ITERATIONS:

polyop.getvert ep 1    -- 470 msec.

polyop_getvert ep 1    -- 79 msec.

polyop.getvert ep_bo 1   -- 48 msec.

polyop_getvert ep_bo 1   -- 0 msec.

ep.EditablePoly.GetNumMapChannels() -- 76532 msec.

ep.GetNumMapChannels()   -- 72141 msec.

ep_bo.EditablePoly.GetNumMapChannels() -- 36688 msec.

ep_bo.GetNumMapChannels()   -- 34219 msec.

IEditablePoly.GetNumMapChannels() -- 6454 msec.

IEditablePoly_GetNumMapChannels() -- 0 msec.

TEST CASE:

gs = geosphere()

gs_bo = gs.baseobject

theBend = bend()

addmodifier gs theBand

FOR 100,000 ITERATIONS:

gs.radius     -- 718 msec.

gs.baseobject.radius    -- 828 msec.

gs_bo.radius      -- 688 msec.

gs.modifiers[1].angle    -- 718 msec.

gs.modifiers[#bend].angle   -- 1187 msec.

theBend.angle     -- 609 msec.

See also

Increasing Performance when Searching for Interfaces and Methods

Previous Tip

Only calculate once if possible

Next Tip

Dice your data into smaller pieces


Dice your data into smaller pieces

MAXScript FAQ > How To Make It Faster > Dice your data into smaller pieces

If you are sorting, searching or correlating data within a large array, you'll get there much faster by cutting it up into smaller pieces, then maybe cutting again. If you're trying to find the closest neighbors of each point3, for example, you would want to dice the original array into a 3D grid of spatial subdivisions.

Previous Tip

Cache freqeuntly used functions and objects

Next Tip

Use bitArrays instead of Arrays when possible


Use bitArrays instead of Arrays when possible

MAXScript FAQ > How To Make It Faster > Use bitArrays instead of Arrays when possible

Many mesh-related methods operate on bitArrays. A bitArray stores only true and false flags and is very memory-efficient, but on the other hand, appending new elements to a bitArray is much slower than appending new elements to a regular array.

If the bitArray is of fixed size (for example returned by another method), using a bitArray is better than using a regular array.

If the final size of the array or bitArray is known, you can predeclare the array to reserve memory for as many elements by assigning a value to the last element as described below. Setting the values of arrays of bitArrays using indexed access to their elements after that is very fast. In this case, if you can need only true and false values, use a bitArray.

BitArray Values

Array Values

Previous Tip

Dice your data into smaller pieces

Next Tip

Pre-initialize arrays when final size is known


Pre-initialize arrays when final size is known

MAXScript FAQ > How To Make It Faster > Pre-initialize arrays when final size is known

When adding elements to an array using the append method, a copy of the original array is being created in memory before the new array is created. When the size of an array is known before the array is actually used, it is a good practice to pre-initialize the array in memory by assigning the last element of the array to some temporary value. This will create an array of the desired size in memory and will let you simply assign values to any element of the array using indexed access without the memory overhead of the append method.

FOR EXAMPLE, INSTEAD OF USING SOMETHING LIKE

MyArray = #() --creates an empty array

for i = 1 to 100 do

  append MyArray (random 1 100) --append each element

YOU CAN USE

MyArray = #()

MyArray[100] = 0 --initialize a 100 elements array in memory

for i = 1 to 100 do

  MyArray[i] = random 1 100 --assign to predefined array

Previous Tip

Use bitArrays instead of Arrays when possible

Next Tip

Recursive functions can be faster


Recursive functions can be faster

MAXScript FAQ > How To Make It Faster > Recursive functions can be faster

A recursive function is a function that calls itself in order to perform repetitive tasks.

The following scripted function returns a list of the animated subAnims of the object passed as parameter. The script works well and is not too slow.

NON-RECURSIVE VERSION

fn getAllAnimatedProperties theObject =

(

scan_properties = #(theObject)

animated_props = #()

cnt = 0

while cnt < scan_properties.count do

(

cnt +=1

currentObj = scan_properties[cnt]

if try(currentObj.isAnimated)catch(false) do

append animated_props currentObj

for i = 1 to currentObj.numSubs do

append scan_properties currentObj[i]

)

animated_props

)

getAllAnimatedProperties $

Now take a look at this code:

RECURSIVE VERSION

animated_props = #()

fn getAnimatedProps theObject =

(

if try(theObject.isAnimated)catch(false) do

append animated_props theObject

for i = 1 to theObject.numSubs do

getAnimatedProps theObject[i]

)

getAnimatedProps $

The recursive code does the same job, but is much shorter and almost 25% faster! (In order to get some usable measurement, both scripts were executed 100,000 times - the first took 13.875 seconds, the recursive version only 10.656 seconds.

Previous Tip

Pre-initialize arrays when final size is known

Next Tip

matchPattern is faster than findString


matchPattern is faster than findString

MAXScript FAQ > How To Make It Faster > matchPattern is faster than findString

  • When searching for a substring inside a string, using the matchPattern() method is faster than using findString(). Executing the same method one million times on the same PC resulted in

  • 3.7 seconds execution time for matchPattern

  • 5.9 seconds execution time for findString

  • 5.0 seconds execution time for subString when comparing the first 3 characters.

Previous Tip

Recursive functions can be faster

Next Tip

Do not use return, break, exit or continue


Do not use return, break, exit or continue

MAXScript FAQ > How To Make It Faster > Do not use return, break, exit or continue

Return, break, exit, continue and throw are implemented using C++ exception.

C++ exceptions are SLOW!

TEST CASES:

fn test1a v = (if v == true do return 1; 0)

fn test1b v = (if v == true then 1 else 0)

FOR 100,000 ITERATIONS:

test1a true  -- 15890 msec.

test1a false  -- 78 msec.

test1b true  -- 47 msec.

test1b false  -- 62 msec.

TEST CASES:

fn test2a =

(

local res

for i = 1 to 1000 do

  if i == 10 do (res = i; break;)

res

)

fn test2b =

(

local notfound = true, res

for i = 1 to 1000 while notfound do

  if i == 10 do (res = i; notfound = false;)

res

)

FOR 100,000 ITERATIONS:

test2a()   -- 84265 msec.

test2b()   -- 1359 msec.

Previous Tip

matchPattern is faster than findString

Next Tip

Use StringStream to build large strings


Use StringStream to build large strings

MAXScript FAQ > How To Make It Faster > Use StringStream to build large strings

If building strings, use a StringStream value to accumulate the string and then convert to a string.

Each string addition creates a new string.

FOR EXAMPLE:

a = "AAA"

b = a + a + a +a + a + a

--Creates 6 strings of length 3, 6, 9, 12, 15, 18

a = "AAA"

b = (a + a + a) + (a + a + a)

--Creates 6 strings of length 3, 6, 9, 6, 9, 18

TEST CASES:

fn test5a =

(

 local a = ""

 for i = 1 to 100 do a += (i as string)

)

fn test5b =

(

 local ss = stringstream ""

for i = 1 to 100 do format "%" (i as string) to:ss

ss as string

)

fn test5c =

(

 local ss = stringstream "", fmt = "%"

for i = 1 to 100 do format fmt (i as string) to:ss

ss as string

)

fn test5d =

(

 local ss = stringstream "", fmt = "%"

for i = 1 to 100 do format fmt i to:ss

ss as string

)

FOR 100,000 ITERATIONS:

test5a()     -- 58875 msec., 505 MB

test5b()     -- 54672 msec., 39.2 MB

test5c()     -- 41125 msec., 29.2 MB

test5d()     -- 13532 msec., 10.0 MB

Previous Tip

Do not use return, break, exit or continue

Next Tip

Use name values instead of strings when possible


Use name values instead of strings when possible

MAXScript FAQ > How To Make It Faster > Use name values instead of strings when possible

Each use of a string literal requires creating a new string value.

PROBLEM CASE:

fn test = append "A" "B"

test() à "AB"

test() à "ABB"

TEST CASE:

fn test6 v = ()

FOR 100,000 ITERATIONS:

test6 "A"  -- 125 msec.

test6 #a  -- 16 msec.

Previous Tip

Use StringStream to build large strings

Next Tip

Try not to use Execute function if there is an alternative


Try not to use Execute function if there is an alternative

MAXScript FAQ > How To Make It Faster > Try not to use Execute function if there is an alternative

Very few cases require the use of the execute function.

MAXScript has many introspection methods and properties:

  • getPropNames <maxobject>

  • getProperty <maxobject> <prop>

  • setProperty <maxobject> <prop> <val>

  • isProperty <maxobject> <prop>

  • getInterfaces <maxobject>

  • <maxobject>.custattributes

  • <rollout>.controls

  • getNodeByName <string>

Valid cases are:

  • Dynamic Rollout creation

  • Dynamic scripted CA creation

Previous Tip

Use name values instead of strings when possible

Next Tip

For Loop By Index Vs For Loop Through Collection Performance


For Loop By Index Vs For Loop Through Collection Performance

MAXScript FAQ > How To Make It Faster > Try not to use Execute function if there is an alternative

A user asked:

I've got a simple question about for loops and arrays.

What is the difference between using

for i = 1 to theArray.count do ( ... )

and

for i in theArray do ( ... )

Are they the same? Is one faster than the other ? Anything else I should be aware of?

Answer:

Both can be used to do the same, but have different strengths and performance characteristics.

The first version gives you an index, so if you want to drive a progress bar display, or use the index to access another array with the same amount of elements, it is usually the way to go - you can still get the i-th object, but you also have the number of objects you have processed so far for free.

FOR EXAMPLE:

(

for i = 1 to theArray.count do

(

--assuming prg_bar is a progressbar UI control:

prg_bar.value = 100.0*i/theArray.count

--some more code here...

)

)

In the second case, you would have to add your own counter local variable to keep track of the current index if you needed it:

FOR EXAMPLE:

(

cnt = 0

for i in theArray do

(

cnt+=1

prg_bar.value = 100.0*cnt/theArray.count

--some more code...

)

)

Also, the first form allows you to loop backwards which is essential if you are removing elements from the array while processing it. The following example creates an array of 1000 random integers and then in the second for loop deletes any elements with a value less than 50:

FOR EXAMPLE:

(

theArray = for i = 1 to 1000 collect random 1 100

for i = theArray.count to 1 by -1 where theArray[i] < 50 do

deleteItem theArray i

)

When it comes to speed though, the direct loop through the array elements is faster.
Let's create an array of 10000 elements and loop through it 1000 times to get a significant time value to measure. The inner loop itself does not perform any actual work, only loops through the array and accesses the i-th element.

LOOP BY INDEX:

(

theArray = for i = 1 to 10000 collect random 1 100

st = timestamp()

for j = 1 to 1000 do

for i = 1 to theArray.count do theArray[i]

format "% ms\n" (timestamp()-st)

)

This code executes on a particular machine in 5.6 seconds (+/- 0.1 seconds).

Removing the actual access to the array element by index (theArray[i]) reduces this time to 4.6 seconds - for example, if you were running from 1 to the array count but NOT using the array elements for anything, which is highly improbable.

IN COMPARISON, LOOPING THROUGH THE COLLECTION

(

theArray = for i = 1 to 10000 collect random 1 100

st = timestamp()

for j = 1 to 1000 do

for i in theArray do i

format "% ms\n" (timestamp()-st)

)

executes on the same machine in 4.3 seconds (+/- 0.1 sec.) which is 1.3 times faster. Since the variable i already contains the n-th element, it does not matter whether we actually use the array element value for anything or not.

Now for the surprise - if you DO need the counter for something else like progress updates, the first approach is almost 4 TIMES faster than the second!

SLOW!

(

theArray = for i = 1 to 10000 collect random 1 100

st = timestamp()

for j = 1 to 1000 do

(

cnt = 0

for i in theArray do cnt +=1

)

format "% ms\n" (timestamp()-st)
)

The above code executes in 14.3 seconds on the same machine because of the memory overhead involved in overwriting the value of the variable cnt 10 million times.

In other words, if the counter variable is significant for your code, you should use the form for i = 1 to theArray.count do(), otherwise stick to the direct loop through the collection as it is slightly faster in the general case.

Previous Tip

Try not to use Execute function if there is an alternative

Next Tip

Optimizing Particle Flow Script Operator For Loops For Speed


Optimizing Particle Flow Script Operator For Loops For Speed

MAXScript FAQ > How To Make It Faster > Optimizing Particle Flow Script Operator For Loops For Speed

A user posted this code used inside an On Proceed() handler:

for i in 1 to count do

(

pCont.particleIndex = i

colmult = 80

pspeed = pCont.particlespeed

pvel = sqrt (pspeed.x*pspeed.x+pspeed.y*pspeed.y+pspeed.z*pspeed.z)

pCont.particleAge = pvel*colmult

)

Performance Comments:

The line

pvel = sqrt (pspeed.x*pspeed.x+pspeed.y*pspeed.y+pspeed.z*pspeed.z)

is equivalent to saying

pvel = length pspeed

but is 4 times slower. When calculating inside a Particle Flow operator, you want the FASTEST method because the code is called thousands and even millions of times, once for each particle.

The first code block evaluates in 3360 ms when run on a particular machine.

(

st = timestamp()

pspeed = [10,2,3]

for i = 1 to 1000000 do

sqrt (pspeed.x*pspeed.x+pspeed.y*pspeed.y+pspeed.z*pspeed.z)

format "%\n" (timestamp()-st)

)

but the same code using the length() method

(

st = timestamp()

pspeed = [10,2,3]

for i = 1 to 1000000 do

length pspeed

format "%\n" (timestamp()-st)

)

evaluates in just 813 ms on the same machine, which is 4.13 times faster!

In addition, assigning to a temporary variable pvel adds 200 ms to 1 million calls in both cases, so rewriting the original code block to

(

for i = 1 to count do (

pCont.particleIndex = i

pCont.particleAge = length (pCont.particlespeed) * 80

)

)

without any intermediate variables could shave off up to 600 ms per one million calls on top of the speed up from using the length() method.

Here is another test to simulate this - it contains 3 variable assignments within the loop and the original velocity calculation:

(

st = timestamp()

for i = 1 to 1000000 do (

pspeed = [10,2,3]

colmult = 80

pvel = sqrt (pspeed.x*pspeed.x+pspeed.y*pspeed.y+pspeed.z*pspeed.z)

pvel * colmult

)

format "%\n" (timestamp()-st)

)

The above code is very similar to what the original code was doing (minus actually reading and writing particle values). It evaluates in 5750 ms.

In contrast,

(

st = timestamp()

for i = 1 to 1000000 do (

pspeed = [10,2,3]

colmult = 80

pvel = length pspeed

pvel * colmult

)

format "%\n" (timestamp()-st)

)

…executes in 3200 ms just because we got rid of the 3 additions and 3 multiplications within the MAXScript code - length() does the same internally, but is written in C++ and is thus much faster.

The inline version of the test code without any intermediate variables which calculates the same value at the end needs only 1400 ms!

(

st = timestamp()

for i = 1 to 1000000 do (

length [10,2,3] * 80

)

format "%\n" (timestamp()-st)

)

In short, avoid using local intermediate variables within your PFLow scripts and use built-in methods to get the best performance, as in

(

for i = 1 to count do (

pCont.particleIndex = i

pCont.particleAge = length (pCont.particlespeed) * 80

)

)

Previous Tip

For Loop By Index Vs For Loop Through Collection Performance

Next Tip

Using Bsearch For Fast Table Lookup


Using Bsearch For Fast Table Lookup

MAXScript FAQ > How To Make It Faster > Using Bsearch For Fast Table Lookup

The bsearch() method implemented in 3ds Max 2009 allows for very fast table lookup operations in sorted arrays.

The problem

Let's assume you have an array of arrays where each sub-array contains the same number of elements with the same layout. In many cases, you would like to collect this information just once and then be able to retrieve the data stored in a specific sub-array ("record") by providing a single search value ("key") that represents the whole record without having to go through all objects in the scene again.

Real-World Examples

An example would be a list of all Editable Poly objects in the scene including their name, vertex and poly count and, say, the number of triangles, quad polygons and n-gons in their geometry. Since the collection of the polygon sides data is relatively slow (it would require looping through all polygons and asking for their degree), you would prefer to collect this data just once and then be able to quickly ask "How many tris and quads does object with name "Box25" contain?"

Using MAXScript Functions for Linear Search

Using a user-made MAXScript function to solve this problem would be relatively slow. It would require a LINEAR search through the array - in other words, a loop - where the search key (in the above example, the object's name) is compared with the name stored in every sub-array of the table. If we would assume that each entry is unique, then we could stop searching the moment we find a matching key. Obviously, with this assumption the linear search would be very fast if the object in question happens to be the first record in the array, but much slower if it happens to be the last record. The average search time would be somewhere in between.

LINEAR SEARCH EXAMPLE:

Below is one of the possible linear search functions used later on this page to compete against bsearch(). In short, it is passed the search key and the table to search in and loops through it until it finds a match. At that point, it exits the loop and returns the current value.

fn LookupMAXScriptLoop3 itemKey itemTable = (

 for i in itemTable do if i[1] == itemKey do exit with i

)

Using FindItem To Speed Up MAXScript Search

A possible acceleration of the MAXScript function search would involve the creation of a second array containing only the keys from the original table and applying the findItem() method to it to get the index of the record. While this is technically also a form of linear search, findItem() is implemented in C++ and is much faster than a MAXScript FOR loop.

FINDITEM SEARCH EXAMPLE:

Here we pass the key, the table to search in and a table of all keys in the same order as the search table. FindItem() returns 0 if the key does not exist in the list or a positive index if it does. Using that index, we can return the record with the given key:

fn LookupMAXScriptFindItem itemKey itemTable keyTable = (

local theIndex = findItem keyTable itemKey

if theIndex > 0 then itemTable[theIndex] else undefined

)

Using bsearch() To Get There FAST!

The bsearch() function solves the problem by working on a table that is already pre-sorted by the search key using qsort. It applies the same comparison function used for sorting to the searching. As you will see below, bsearch() scales great as the size of the table increases and is independent on the position of the record inside the table - it needs the SAME AMOUNT OF TIME to find the first, the middle or the last record!

The following test script can be used to test the bsearch() method against various variations of MAXScript functions.

TEST SCRIPT:

(

-- Same compare function used by bsearch and qsort:

fn LookupTableComparator a b = (

if a[1]>b[1] then 1

else if a[1]<b[1] then -1

else 0

)

-- Finds an item in a lookup table;

-- A lookup table is a sorted array of items,

-- where each item is an array with its key as the same entry as the sort key.

-- In our case the LookupTableComparator uses the first element as the key

--So we have to make the search key an array too

--in order to make it compatible with the qsort function!

fn LookupTableLookup itemKey itemTable = (

local lookupKey = #(itemKey)

bsearch lookupKey itemTable LookupTableComparator

)

--MAXScript Function 1 - collects all matches and returns the first, if any

fn LookupMAXScriptLoop1 itemKey itemTable = (

local result = for i in itemTable where i[1] == itemKey collect i

if result.count > 0 then result[1] else undefined

)

--MAXScript Function 2 - loops until a match is found and returns the result, if any

fn LookupMAXScriptLoop2 itemKey itemTable = (

for i in itemTable do if i[1] == itemKey do return i

undefined

)

--MAXScript Function 3 - loops until a match is found and exists with the result, if any

fn LookupMAXScriptLoop3 itemKey itemTable = (

for i in itemTable do if i[1] == itemKey do exit with i

)

--MAXScript Function loops using a while - managing the i var. is slower!

fn LookupMAXScriptLoop4 itemKey itemTable = (

local i = 0

result = undefined

while i < itemTable.count do (

i+=1

if itemTable[i][1] == itemKey do (

result = itemTable[i]

i = itemTable.count + 1

)

)

result

)

fn LookupMAXScriptFindItem itemKey itemTable keyTable = (

  local theIndex = findItem keyTable itemKey

  if theIndex > 0 then itemTable[theIndex] else undefined

)

--TEST VALUES:

local searchKey = "5498" --the key to search for

local iterations = 1000 --number of search calls

local tableElements = 10000 --number of elements in the table

--Create an array to search in.

--Its elements will have the form #("NNN", "TestNNN", NNN).

--But the table could contain ANYTHING, this is just an example

searchTable = for i = 1 to tableElements collect

#( (i as string), "Test"+(i as string), i)

--For BSearch to work, the search table has to be sorted array!

st = timestamp()

qsort searchTable LookupTableComparator

format "QSort Time: %ms\n" (timestamp()-st)

--Print the current first, middle and last element for best, mean and worst case searches

format "First Element : %\n" searchTable[1]

format "Mid. Element : %\n" searchTable[tableElements/2]

format "Last Element : %\n" searchTable[tableElements]

local returnValue --variable to show the result

local st =timestamp()

for i = 1 to iterations do returnValue = LookupMAXScriptLoop1 searchKey searchTable

local totalTime =(timestamp()-st)

format "MXS Loop 1 - Total: %ms Per Search: %ms\n" totalTime (1.0*totalTime/iterations)

format "%\n" returnValue

st =timestamp()

for i = 1 to iterations do returnValue = LookupMAXScriptLoop2 searchKey searchTable

local totalTime =(timestamp()-st)

format "MXS Loop 2 - Total: %ms Per Search: %ms\n" totalTime (1.0*totalTime/iterations)

format "%\n" returnValue

st =timestamp()

for i = 1 to iterations do returnValue = LookupMAXScriptLoop3 searchKey searchTable

local totalTime =(timestamp()-st)

format "MXS Loop 3 - Total: %ms Per Search: %ms\n" totalTime (1.0*totalTime/iterations)

format "%\n" returnValue

st =timestamp()

for i = 1 to iterations do returnValue = LookupMAXScriptLoop4 searchKey searchTable

local totalTime =(timestamp()-st)

format "MXS Loop 4 - Total: %ms Per Search: %ms\n" totalTime (1.0*totalTime/iterations)

format "%\n" returnValue

local keyTable = (for i in searchTable collect i[1]) --collect all keys

local st =timestamp()

for i = 1 to iterations do

returnValue = LookupMAXScriptFindItem searchKey searchTable keyTable

local totalTime =(timestamp()-st)

format "FindItem - Total: %ms Per Search: %ms\n" totalTime (1.0*totalTime/iterations)

format "%\n" returnValue

st =timestamp()

for i = 1 to iterations do returnValue = LookupTableLookup searchKey searchTable

local totalTime =(timestamp()-st)

format "BSEARCH - Total: %ms Per Search: %ms\n" totalTime (1.0*totalTime/iterations)

format "%\n" returnValue

)

OUTPUT:

QSort Time: 375ms

First Element : #("1", "Test1", 1)

Mid. Element : #("5498", "Test5498", 5498)

Last Element : #("9999", "Test9999", 9999)

MXS Loop 1 - Total: 18812ms Per Search: 18.812ms

#("5498", "Test5498", 5498)

MXS Loop 2 - Total: 9750ms Per Search: 9.75ms

#("5498", "Test5498", 5498)

MXS Loop 3 - Total: 9594ms Per Search: 9.594ms

#("5498", "Test5498", 5498)

MXS Loop 4 - Total: 18609ms Per Search: 18.609ms

#("5498", "Test5498", 5498)

MXS FindItem - Total: 1812ms Per Search: 1.812ms

#("5498", "Test5498", 5498)

BSEARCH - Total: 0ms Per Search: 0.0ms

#("5498", "Test5498", 5498)

OK

In a table of 10,000 records sorted using qsort, key "5498" is exactly in the middle of the sorted table.

As we can see, the MXS Loop 1 performs as bad as in the worst case scenario of "9999" because it has to always loop through all elements.

The MXS Loop 2 and 3 functions finish in half the time because they break in the middle of the loop. If we were searching for "9999", their results would be close to those of MXS Loop 1. But if we were searching for key "1", they would be very fast because it would be the first thing they would hit when testing.

The FindItem approach proves to be an order of magnitude faster.

Finally, the BSEARCH method is so fast we cannot even stop its time (less than 1 millisecond for 1000 calls!)

The following table shows the per search times with different table sizes and the best, mean and worst cases for all methods. A large number of iterations (between 1000 and 100000 depending on the number of records) were used to ensure high precision.

Elements | Key | Loop 1 | Loop 2 | Loop 3 | Loop 4 | FindItem | Bsearch
10 | "1" | 0.01734ms | 0.06266ms | 0.04093ms | 0.00813ms | 0.00375ms | 0.01266ms
 | "4" | 0.01719ms | 0.06781ms | 0.04562ms | 0.01844ms | 0.00421ms | 0.00813ms
 | "9" | 0.01657ms | 0.07438ms | 0.05156ms | 0.03015ms | 0.00469ms | 0.01062ms
100 | "1" | 0.13031ms | 0.06437ms | 0.04078ms | 0.00797ms | 0.00406ms | 0.02032ms
 | "53" | 0.12922ms | 0.12297ms | 0.10454ms | 0.13016ms | 0.00829ms | 0.00812ms
 | "99" | 0.12984ms | 0.18688ms | 0.16859ms | 0.25812ms | 0.01329ms | 0.01546ms
1000 | "1" | 1.3516ms | 0.0609ms | 0.0391ms | 0.0078ms | 0.0031ms | 0.0328ms
 | "548" | 1.4187ms | 0.7156ms | 0.7000ms | 1.3000ms | 0.0547ms | 0.0078ms
 | "999" | 1.3875ms | 1.4250ms | 1.4156ms | 2.7469ms | 0.1063ms | 0.0187ms
10000 | "1" | 17.344ms | 0.0620ms | 0.0470ms | 0.0160ms | 0.0160ms | 0.0470ms
 | "5480" | 17.250ms | 8.8590ms | 8.7970ms | 20.187ms | 1.6090ms | 0.0310ms
 | "9999" | 18.641ms | 18.531ms | 18.625ms | 40.375ms | 3.6870ms | 0.0310ms
100000 | "1" | 191.56ms | 0.0630ms | 0.0470ms | 0.2650ms | 0.0150ms | 0.5940ms
 | "54998" | 194.38ms | 97.180ms | 96.570ms | 3172.0ms | 19.530ms | 0.0150ms
 | "99999" | 187.34ms | 187.03ms | 188.59ms | 5659.22ms | 38.750ms | 0.2660ms

As you can see from the table, the two best performers are the FindItem and bsearch methods. With very few records in the array, findItem perform a bit faster.

As the number of records in the array increases though, the bsearch approach wins in both the average (searching for the middle record) and worst case scenarios (searching for the last record), while the linear search of findItem only wins the best case scenario. Thus, if you have a very large list of records, for example 100,000, finding a random record by its key is 1300 times faster using bsearch() than by using findItem() and over 6400 times faster than the fastest of the MAXScript Linear Search (Loop) functions.

The above times do not take into account the time necessary to sort the table using qsort() for bsearch() to be able to use, nor the time necessary to collect a keys array for the findItem() method. We assume that these are performed in a separate step once and then a very large number of random searches have to be performed very fast. The time needed to sort 100,000 records using qsort is around 30 seconds, which equals to about 800 calls to the findItem function. Thus, if you know that you will be calling the search function thousands of times, spending 30 seconds to pre-sort the list for bsearch() use is worth it and would pay off due to the much shorter search times later on.

Previous Tip

Optimizing Particle Flow Script Operator For Loops For Speed

See Also

For Loop By Index Vs For Loop Through Collection Performance


How To Make It Better?

MAXScript FAQ > How To Make It Better?

Avoid using persistent global variables

A good idea gone bad.

Initially added to support scripted controllers and xrefs.

Problems:

  • No control over whether they are loaded

  • Overwriting previous values

Solutions:

  • Use the new scripted controllers in 3ds Max 8

  • Use scripted CAs for persistent data storage - see below.

Using scripted CAs for persistent data storage

Scripted Custom Attributes can be used instead of persistent global variables to store data with the scene file, avoiding the problems mentioned above.

A scripted CA can be placed on the scene root:

sceneDataCADef = attributes sceneDataCADef version:1 attribID:#(0x61e9ff5f, 0x63784819)

(

parameters main rollout:params

( note type:#string ui:et_note default:"" )

rollout params "Scene Data Parameters"

( edittext et_note "Note: " )

)

thescene = (refs.dependents rootnode)[1]

rootNodeDataCA = undefined

if (custattributes.add rootnode sceneDataCADef) do

 rootNodeDataCA = rootnode.custAttributes[rootnode.custAttributes.count]

sceneDataCA = undefined

if (custattributes.add thescene sceneDataCADef) do

 sceneDataCA = thescene.custAttributes[thescene.custAttributes.count]

rootNodeDataCA.note

sceneDataCA.note

rootNodeDataCA.note = "rootnode"

sceneDataCA.note = "thescene"

If the file is saved and reloaded, you can access the CAs:

rootNodeDataCA = undefined

if (rootnode.custAttributes.count != 0) do

 rootNodeDataCA = rootnode.custAttributes[rootnode.custAttributes.count]

sceneDataCA = undefined

if (thescene.custAttributes.count != 0) do

 sceneDataCA = thescene.custAttributes[thescene.custAttributes.count]

If the file is brought in as an XRef scene, you can still access the CAs:

xr = xrefs.getXRefFile 1

xr_root = xr.tree

xr_rootNodeDataCA = undefined

if (xr_root.custAttributes.count != 0) do

 xr_rootNodeDataCA = xr_root.custAttributes[xr_root.custAttributes.count]

Building UI on Script/Expression Controller

By placing a scripted Custom Attributes definition on a script or expression controller, you can provide a custom UI for the controller.

  • Define the CA to contain animatable parameters and rollout for UI.

  • Create a script controller.

  • Apply the CA to the script controller.

  • Apply the script controller.

  • Create variables in the script controller.

  • Assign Target values to the variables, specifying the CA parameters as the targets.

  • Display the CA’s UI using createDialog or newRolloutFloater & addrollout

EXAMPLE

floatDataCADef = attributes floatDataCADef version:1

(

parameters main rollout:params

( prop1 type:#float ui:s_prop1 )

rollout params "Parameters"

( spinner s_prop1 "Prop1: " )

fn getRollout = params

)

sc = float_Script()

custattributes.add sc floatDataCADef

floatCA = sc.custattributes[1]

sc.addTarget "prop1" floatCA[#prop1]

displayControlDialog sc ""

mscas = for ca in sc.custattributes where isMSCustAttrib ca collect ca

rollouts = for ca in mscas where isproperty ca #getrollout collect ca.getrollout()

if rollouts.count == 1 then

 createdialog rollouts[1]

else if rollouts.count > 1 do

(

 width = rollouts[1].width

 for ro in rollouts do

  width = amax width ro.width

 rof = newrolloutfloater "" (width+13) 0 0 0

 for ro in rollouts do addrollout ro rof

 height = 6

 for ro in rollouts do

  height += ro.height + 24

 rof.size = [rof.size.x,height]

)

See also

How To Make It Faster?

Frequently Asked Questions


How To - Introduction to the Tutorials

The "How To" topics present some simple programming tasks as extended MAXScript examples. All of them are based on actual real-world cases, include detailed explanations and tips and tricks from the scripting practice. In addition, most of the scripts are not longer than 30 lines so they are perfectly suited for beginners.

Objectives:

The main objective of these tutorials is to teach the MAXScript user some possible approaches for developing scripted solutions to practical problems - from the original idea through a concept expressed in a natural language (English) down to the actual MAXScript code and ideas for potential future enhancements.

Structure:

The "How To" tutorials provide

A list of related topics the user might want to read before trying the actual tutorial;

The complete uncommented code – the user can cut & paste it and use immediately;

The same code with detailed explanations;

Links to definitions of the used functions and methods;

Some info about the usage of the script in the practice;

Things to try – ideas for improvements that the user could try alone.

Topics:

How To ... Develop A Transform Lock Script

Developing a simple script for checking all Transformation locks.

How To ... Remove All Materials

Creating a very simple script removing all materials from the scene.

How To ... Quickly Rename Selected Objects

Developing a simple renaming utility to change the names of selected objects

How To ... Select Non-Quad Polygons

Example of accessing and selecting Polygons in an EditablePoly object.

How To ... Assign Materials Automatically

Shows how to use MAXScript callbacks to automate material assignment.

How To ... Move Objects to a Surface

Shows how to use the intersectRay function to find surface points on objects.

How To ... Output Object Data To File

Shows the basic of writing object data to an external text file.

How To ... Output Geometry Data To Text File - Part One

Shows the basic of writing mesh geometry data to an external text file.

How To ... Read Geometry Data From Text File - Part One

Shows the basic of reading object data from an external text file.

How To ... Output Geometry Data To Text File - Part Two

Enhances the mesh geometry output script with support of smoothing groups, material ids and edge visibility.

How To ... Read Geometry Data From Text File - Part Two

Enhances the input script developed in Part One to support the new data added by the preceding tutorial.

How To ... Create a Quick Preview

Implements a simple viewport preview and automatic RAMplayer loading

How To ... Access the Z-Depth channel

A small experiment creating objects based on the Z-Depth of the camera.

How To ... Create a MonoChrome RenderEffect

A simple example of a scripted RenderEffect plug-in.

How To ... Create Custom Mesh Object

Shows how to create a custom mesh object.

How To ... Create Scripted Geometry Plug-in

An example of a scripted geometry plug-in.

How To ... Create a Dalmatian TextureMap Plug-in

An example of a scripted texture map plug-in in the famous polka-dot dog look.

How To ... Access Windows System Data

Shows an approach to access system data that is not directly exposed to MAXScript.

How To ... Sort TrackView Alphabetically

Shows an approach to sort the objects in the TrackView.

How To ... Flatten a SplineShape

Example of modifying a slineShape by moving knots and bezier vectors.

How To ... Draw a Freehand Spline

Example of drawing a spline with the mouse in the ground plane.

How To ... Enhance the Morpher Modifier With Floating Controls

Example of dynamic UI creation, time and change callbacks usage to create a floater with controls linked interactively to a Morpher modifier.

How To ... Change Objects At Render Time

An example of changing object properties at render time using callback scripts.

How To ... Develop a Vertex Renderer

An example of a scripted vertex realtime renderer.

How To ... Script Particle Flow

How To ... Transfer ParticleFlow Particle Motion To Scene Objects

An example of moving scene objects using Particle Flow particles.

How To ... Affect Particle Flow Particles by Mass

An example of applying a Force to particles based on their mass.

How To ... Develop a Bitmap Painting Tool In Nine Easy Steps

How To ... Develop a Bitmap Painting Tool - Basic Utility

The first step of the tool creation - The basic tool with a single point brush without strokes support.

How To ... Develop a Bitmap Painting Tool - Strokes Support

The second iteration of the tool adds continuous stroke drawing.

How To ... Develop a Bitmap Painting Tool - Brush Size and Color

The third iteration of the tool adds control over the size and color of the brush.

How To ... Develop a Bitmap Painting Tool - Airbrush and Shapes

The fourth iteration of the tool adds circular brush shape support and an Airbrush option with variable strength.

How To ... Develop a Bitmap Painting Tool - Smooth Brushes

The fifth iteration of the tool adds a brush with smooth falloff

How To ... Develop a Bitmap Painting Tool - Load and Save

The sixth iteration of the tool adds bitmap file loading and saving. Finally, you can store your work of art to disk and continue on painting later in a new session...

How To ... Develop a Bitmap Painting Tool - Erase Changes

The seventh iteration of the tool adds an eraser option to the right mouse button and a Commit Changes menu option to permanently bake the changes to the image.

How To ... Develop a Bitmap Painting Tool - Unwrap UV Coordinates

The eight iteration of the tool adds UV texture coordinates unwrapping and realtime updates of the bitmap as diffusemap on a selected object.

How To ... Develop a Bitmap Painting Tool - 3D Painting

The ninth iteration of the tool adds 3D Painting on a selected object in the viewport.

How To ... Develop a Selected Objects Inspector using ListView ActiveX Control

How To ... Develop a Selected Objects Inspector using ListView ActiveX Control - Part One

This tutorial will demonstrate how to set up an ActiveX Control in a MAXScript rollout to display details about selected scene objects

How To ... Develop a Selected Objects Inspector using ListView ActiveX Control - Part Two

This second tutorial will demonstrate how to customize the ListView ActiveX Control defined in Part One and update the display automatically when the selection set changes

How To ... Develop a Scene Browser using TreeView ActiveX Control

How To ... Develop a Scene Browser using TreeView ActiveX Control - Part One

This tutorial will demonstrate how to set up an ActiveX Control in a MAXScript rollout to display the hierarchy of the 3ds Max scene nodes.

How To ... Develop a Scene Browser using TreeView ActiveX Control - Part Two

The second tutorial will demonstrate how to customize the TreeView ActiveX Control defined in Part One by adding icons, colors and checkboxes to display and control the hidden state of scene nodes.

How To ... Develop Tools Using DotNet

How To ... Copy The Last Rendered Image To The Windows Clipboard

This tutorial demonstrates how to use a DotNet class to put the last rendered image into the Windows Clipboard.

How To … Call a MAXScript Function Periodically using DotNet

This tutorial demonstrates how to use a DotNet Timer object to call a MAXScript function at given intervals without the need for a rollout.


How To ... Develop A Transform Lock Script

How To > Develop A Transform Lock Script

This simple tutorial is based on an actual real-world case – a 3ds Max user wanted to create a button to check all 9 checkboxes in the Hierarchy Panel>Link Info > Locks. Unfortunately, he discovered that the MacroRecorder does not output any code for this operation.

Below are the steps required to solve this case including searching the index of this Online Help...

Related Topics:

Defining Macroscripts

General Node Properties

NATURAL LANGUAGE

Open a new Script Editor by going to MAXScript>New Script in the Main menu.

Search the Online Help and locate a method that affects the Transformation locks.

  • Open the Online Help

  • Go to the "Search" tab of the Help System

  • Enter in the search field: "lock all transform" and press Enter

  • The first result (Rank 1) returned is "Node Common Properties, Operators and Methods".

  • Note that all occurrences of the search words will be highlighted in the help page.

  • Scroll down until you see the "setTransformLockFlags".

  • Copy the line and paste it into a new script editor.

  • Keep the Help file open for further reference.

Create a macroScript to be able to use the script as a button, menu item or shortcut.

Call the method for the current scene selection.

MAXSCRIPT

macroScript LockAllTransforms category:"HowTo"

(

setTransformLockFlags selection #all

)

Step-By-Step:

macroScript LockAllTransforms category:"HowTo"

(

The macroScript will be called LockAllTransforms. To use the script, you can go to Customize... and drag the script from the category "HowTo" to a toolbar, a menu, a quad menu or assign to a keyboard shortcut.

Defining Macro Scripts

setTransformLockFlags selection #all

The Help definition of this method lists it as—mapped. This means that it can be applied directly to a collection of objects without an additional MAXScript for loop. In our case we will use the current scene selection – the method will be called for each object in the selection.

General Node Properties

)

Using the Script

Evaluate the script. To use it, you can use Customize... to drag the script from the category "HowTo" to a toolbar, a menu, a quad menu or to assign to a keyboard shortcut. Select some objects and launch the script – all checkboxes under Hierarchy Panel>Link Info > Locks will be checked.

Where to go from here

As already mentioned, by just replacing the #all keyword with #none, the script can be altered to uncheck all boxes instead. Feel free to write a second macroScript (probably called UnlockAllTransforms) for this operation...

Also note that in 3ds Max 4, the setTransformLockFlags method wasn’t mappable. In case you want your script to be backwards compatible with that version, you could use a for loop to change each object separately. The code would look like

for i in selection do setTransformLockFlags i #all

Update

Some users who did this tutorial in 3ds Max 5 actually went even further and tried to use the general BitArray access to the Lock Flags. Here are some details about the usage of BitArrays in this case.

The setTransformLockFlags method description under General Node Properties explains that there are 9 bits in the BitArray corresponding to the position, rotation and scale locks.

A BitArray is a list of binary values (bits) which can be either True or False. A BitArray is defined by # followed by curly braces {} containing the indices of the True bits separated by commas. For example, #{1,4,7} will set only the X-axis locks of all 3 categories to True.

When multiple bits are set to True, they can be written as the first and last index separated by .., for example #{1..9} defines a BitArray of 9 elements all of which are set to True. It would be equivalent to the #all flag when using with the setTransformLockFlags method. #{} would be equivalent to the #none flag. #{1..3} would only check the first 3 Locks while turning the other 6 off and so on.

Feel free to experiment with the BitArray values and define further macroScripts to set only the Position, the Rotation or the Scale locks.

Back to

"How To" Tutorials Index Page


How To ... Remove All Materials

How To > Remove All Materials

This is one of the shortest scripts one could imagine, and yet very powerful and useful. It will let the user remove all materials from the scene objects.

Related Topics:

Defining Macroscripts

General Node Properties - .material

NATURAL LANGUAGE

Package the code as macroScript to be used as button, menu or shortcut.

Set the material property of all objects to undefined to remove any material assignments.

MAXSCRIPT

macroScript NoMaterials category:"HowTo"

(

$*.material = undefined

)

Step-By-Step:

macroScript NoMaterials category:"HowTo"

(

The macroScript will be called NoMaterials. To use the script, you can go to Customize... and drag the script from the category "HowTo" to a toolbar, a menu, a quad menu or assign to a keyboard shortcut. A good place to put it into would be the new menu of the Material Editor in 3ds Max 5.

Defining Macro Scripts

$*.material = undefined

MAXScript will iterate through all scene objects because $* is a wildcard for any object name found in the scene. The material object property assignment is mappable, which means that MAXScript will take the collection of objects on the left side of the assignment operator "=", loop internally through all objects in the collection and assign the right-hand expression (in this case the value undefined) to them.

When an object is first created, its .material property is by default set to undefined. When a material is assigned to an object, the .material property would return the Material object.

Setting the material property to undefined will effectively remove the assignment of the material to the object and thus restore the object’s default state.

General Node Properties

Undefined Value

)

Using the Script

Evaluate the script. To use it, you can use Customize... to drag the script from the category "HowTo" to a toolbar, a menu, a quad menu or to assign to a keyboard shortcut. In 3ds Max 5 and higher, you could customize the Material Editor’s menu to place the new Item for cleaning the scene materials there!

Start the script – all materials will be removed.

Where to go from here

This operation is very destructive – you might want to add a Yes/No query to make sure your user knows what he is doing. Take a look at

MAXScript Message and Query Dialogs

Back to

"How To" Tutorials Index Page


How To ... Quickly Rename Selected Objects

How To > Quickly Rename Selected Objects

A very often required task in the daily 3ds Max practice is the mass-changing of object properties. Here is a very simple renaming script that shows how easy and powerful MAXScript can be when working with multiple objects. Using this example as a starting point, you could develop scripts that change other object properties with a single click...

Related Topics:

Defining Macroscripts

NATURAL LANGUAGE

Package the code as macroScript to be used as button, menu or shortcut.

Define a rollout to create a dialog

Define an edit text box in the rollout to enter the new base name

Define a button to initiate the renaming

Define a pressed handler for the button

Check whether the entered name is valid

If yes, go through all selected objects and assign unique names using the base name string.

When started, create the dialog using the above definitions.

MAXSCRIPT

macroScript RenameThem category:"HowTo"

(

 rollout rename_rollout "Enter New Base Name"

 (

  edittext base_name ""

  button rename_them "RENAME SELECTED OBJECTS..."

  on rename_them pressed do

  (

   if base_name.text != "" do

    for i in selection do i.name = uniquename base_name.text

  )--end on

 )--end rollout

createDialog rename_rollout 250 50

)

Step-By-Step:

macroScript RenameThem category:"HowTo"

(

The macroScript will be called RenameThem. To use the script, you can go to Customize... and drag the script from the category "HowTo" to a toolbar, a menu, a quad menu or assign to a keyboard shortcut.

Defining Macro Scripts

rollout rename_rollout "Enter New Base Name"

(

The macroScript will present the user with a dialog to enter a new base name. A dialog requires a rollout. We define a new rollout stored in the variable rename_rollout and titled "Enter New Base Name". The rollout will contain two UI elements.

Rollout Clauses

edittext base_name

The first UI element is a text box called base_name. It will have no default text when created.

Edittext

button rename_them "RENAME SELECTED OBJECTS..."

The second UI element is a button called rename_them. It will display the text "RENAME SELECTED OBJECTS... ".

Button

on rename_them pressed do

(

This is the button’s event handler. It will be executed each time the button is pressed.

if base_name.text != "" do

for i in selection do i.name = uniquename base_name.text

When the button is pressed, we check the base name first. The edittext box has a property called .text which gives access to the currently entered text. If the text is not the empty string, we can go on with the renaming – this means the user has entered a meaningful base name.

The i loop will iterate through all selected objects. For each object, a new unique name will be generated using the base name entered in the edittext box. The resulting name will be assigned to the .name property of the current object.

If Expression

For Loop

uniquename

)--end on

)--end rollout

createDialog rename_rollout 250 50

When the script is executed, the createDialog function will take the rollout defined above and display it in a floating dialog with the width of 250 pixels and height of 50.

CreateDialog

)

Using the Script

Evaluate the script. To use it, you can use Customize... to drag the script from the category "HowTo" to a toolbar, a menu, a quad menu or to assign to a keyboard shortcut.

Start the script – the dialog will open in the center of the desktop. Select any number of objects to be renamed and enter a new base name. Press the button and check the names of the selected objects – they must have the same base name with unique sequential numbers now. You can repeat this as often as you want or close the dialog by pressing the X button of the dialog.

Where to go from here

As already mentioned, you could modify the script to mass-change other object properties.

Back to

"How To" Tutorials Index Page


How To ... Select Non-Quad Polygons

How To > Select Non-Quad Polygons

MAXScript lets you access Editable Poly object data and explore relationships between polygons, vertices and edges. When using polygon modeling it is usually desirable that all polygons are kept as quads. The following script will select all polygons that have less or more than 4 edges.

Related Topics:

Defining and Enabling Macroscripts

Accessing Editable Polygon Data

Accessing the Modify Panel

NATURAL LANGUAGE

Package the code as macroScript to be able to use as a button, menu item or shortcut.

Enable only if a single object with an Editable Poly base object is selected.

When executed, get the base object of the selected object.

Go though all polygons of the base object and ask about their edges.

Count the edges and if they are not exactly 4, remember the index of the polygon.

Select all the non-quad polygons.

Go to Polygon Sub-Object Level in the Modify Tab.

MAXSCRIPT

macroscript SelectNonQuadPolys category:"HowTo"

(

on isEnabled return

(

 selection.count == 1 and classOf selection[1].baseobject == Editable_Poly

)

on execute do

(

 local face_selection = #{}

 local base_obj = $.baseobject

 local num_faces = polyop.getNumFaces base_obj

 for f = 1 to num_faces do

 (

  local num_face_verts = polyop.getFaceDeg base_obj f

  if num_face_verts != 4 do face_selection[f] = true

 )--end f loop

 polyop.setFaceSelection base_obj face_selection

 max modify mode

 modPanel.setCurrentObject base_obj

 subobjectlevel = 4

)--end on execute

)--end script

Step-By-Step

Macroscript SelectNonQuadPolys category:"HowTo"

(

The macroScript will be called SelectNonQuadPolys. To use the script, you can use Customize... to drag the script from the category "HowTo" to a toolbar, a menu, a quad menu or to assign to a keyboard shortcut.

Defining Macro Scripts

on isEnabled return

(

selection.count == 1 and classOf selection[1].baseobject == Editable_Poly

)

The isEnabled handler should return true or false and determines the enabled state of the button / menu item. When true, the button will be available. When false, it will be grayed out. In the return expression, we check whether only one object is selected in the scene and whether its base object class is Editable Poly. The script will only work on objects that meet both conditions.

ClassOf

General Node Properties

on execute do

(

The on Execute handler will be executed each time the macroScript is executed (by pressing the button, selecting from the menu, pressing the shortcut etc.). The handler contains the "body" of the script.

Macroscript_Body_Event_Handlers

local face_selection = #{}

We will need a user variable to store the polygons to be selected. We initialize the variable to an empty BitArray

local base_obj = $.baseobject

Our script will work on the base object only. This means that the object may have modifiers on top of the base object – they will not be taken into account as polygon modeling usually happens at the base level anyway. Because we already made sure in the isEnabled handler that there is only a single object selected, we can access the selection using $ without worrying that it might contain multiple objects!

local num_faces = polyop.getNumFaces base_obj

We will need the number of faces in the object in order to iterate through them.

Editable_Poly Methods

for f = 1 to num_faces do

(

We will loop through all polygons in the base object – f will contain the index of the current polygon to be checked.

For Loop

local num_face_verts = polyop.getFaceDeg base_obj f

Next we get a the number of vertices in the current polygon.

Editable_Poly Methods

if num_face_verts != 4 do face_selection[f] = true

If the number of vertices is not 4, we should select the polygon so we set the respective bit in the bitArray corresponding to the current face to true.

Array Values

)--end f loop

polyop.setFaceSelection base_obj face_selection

After checking all polygons, we can simply select all collected polygons.

Editable_Poly Methods

max modify mode

In order to show the results of the selection to the user, we will first switch the command panel to modify mode...

MAX Commands

modPanel.setCurrentObject base_obj

...then set the current object in Stack View to the base object we checked...

Modify Panel

subobjectlevel = 4

...and finally switch to Polygon sub-object level to show the selected polygons.

subObjectLevel

)--end on execute

)--end script

Using the Script

To use the script, you can use Customize... to drag the script from the category "HowTo" to a toolbar, a menu, a quad menu or to assign to a keyboard shortcut. Select a single object with an Editable Poly base object and the script will be enabled. Execute and the non-quad polygons will become selected.

Back to

"How To" Tutorials Index Page


How To ... Assign Materials Automatically

How To > Assign Materials Automatically

MAXScript lets you create callback scripts which monitor scene events like object selection, start or stop of rendering etc. This would let you create scripts that perform certain actions automatically whenever monitored system events have been detected.

The following script will automatically assign the material from slot one of the Material Editor to any selected or newly created object.

Related Topics:

Defining Macroscripts and their Event Handlers

Callback Scripts

Assigning Materials

Accessing Material Editor Materials

NATURAL LANGUAGE

Package the code as macroScript to be used as button, menu or shortcut.

Show the macroScript button checked when the callback is active.

When executed, see if it is already active or not – should remember the active state between executions.

If not active, define a callback to go through all materials of selected objects and assign material editor slot one to all of them.

If already active, delete the old callback

MAXSCRIPT

macroScript AutoMat category:"HowTo"

(

 local AutoMat_Enabled

 on isChecked return AutoMat_Enabled

 on Execute do

 (

  if AutoMat_Enabled == undefined then

   AutoMat_Enabled = true

  else

   AutoMat_Enabled = not AutoMat_Enabled

  if AutoMat_Enabled then

  (

   txt = "if superclassof meditmaterials[1] != texturemap do \n"

   txt +="selection.material = meditmaterials[1]"

   callbacks.addscript #selectionSetChanged txt \

    id:#AssignMaterial persistent:false

  )

  else

   callbacks.removescripts id:#AssignMaterial

  updateToolbarButtons()

 )--end Execute

)--end macroScript

Step-By-Step:

macroScript AutoMat category:"HowTo"

(

The macroScript will be called AutoMat. To use the script, you can use Customize... to drag the script from the category "HowTo" to a toolbar, a menu, a quad menu or to assign to a keyboard shortcut.

Defining Macro Scripts

local AutoMat_Enabled

We need to store the state of the AutoMat script in a variable in order to keep track of whether it is active or not. The variable will be declared as local and will contain undefined in the beginning because we have not assigned a value to it yet.

Scope of Variables

on isChecked return AutoMat_Enabled

The isChecked handler should return true or false and determines the state of the button. When true, the button will appear pressed on the toolbar or will have a checkmark in the Menu / QuadMenu. When false, it will be displayed normally. AutoMat_Enabled is a local variable that will contain true when the callback is active, false when it is not active, and undefined when the script has not been started yet.

Macroscript_Body_Event_Handlers

on Execute do

(

The on Execute handler will be executed each time the macroScript is executed (by pressing the button, selecting from the menu, pressing the shortcut etc.). The handler contains the "body" of the script.

Macroscript_Body_Event_Handlers

if AutoMat_Enabled == undefined then

AutoMat_Enabled = true

else

AutoMat_Enabled = not AutoMat_Enabled

In case the script is started for the first time and the variable contains undefined, we assign true to it. Otherwise we invert the current value of the variable using the Not logical expression - if it was true it will become false and vice-versa.

If Expression

Logical Expressions

if AutoMat_Enabled then

(

If the variable contains true, we can go on and create our callback. Note that if expects a Boolean value in order to evaluate either the expression after then or the expression after else. So we don't have to say AutoMat_Enabled == true as the variable itself contains true or false which is enough for if to make the right decision. Both forms would be valid though.

If Expression

txt = "if superclassof meditmaterials[1] != texturemap do \n"

The callback requires a string containing the script to be executed. When the script text is longer than a single line, it is a good idea to store it in a string variable, in our case the variable txt. "\n" is used to denote the new line/carriage return inside the string.

Since the MaterialEditor can display both materials and maps in its slots, we have to make sure that the slot 1 currently does not contain a texturemap. So we check the superclass of the object in slot 1 against textureMap and only go on when it isn’t a texturteMap.

Class and Object Inspector Functions

txt +="selection.material = meditmaterials[1]"

This line of code adds a string to the string already defined in the previous line and makes it "grow". Because the first line's string contained "\n" at the end, the new string added will be on a new line when the string is evaluated or printed to the Listener.

The code inside the string assigns the object found in slot 1 of the Material Editor to the .material property of the current selection. The .material property is "mappable" which means that MAXScript will iterate internally through all objects found in the selection and assign the material to each one of them. See also How To ... Remove All Materials for a similar case.

Material_Editor_meditMaterials

General Node Properties

callbacks.addscript #selectionSetChanged txt id:#AssignMaterial persistent:false

Now we can add the script to the scene callback scripts. The script will be executed when the selection set changes, will have a unique ID #AssignMaterial so we can remove it later by name, and will not be saved with the MAX scene (it is not persistent) which means it will not run if you save the scene and load it again later.

General Event Callback Mechanism

)

else

callbacks.removescripts id:#AssignMaterial

In case the variable AutoMat_Enabled contains false, we have to disable the script by removing the callback. Having the unique ID, we can easily remove the script from the list of callbacks by supplying its user-defined name #AssignMaterial

Callbacks.removeScripts

updateToolbarButtons ()

To make sure that the button state is updated in the toolbar, we force an update of the toolbar buttons.

updateToolbarButtons

)--end Execute

)--end macroScript

Using the Script

After evaluating the script and customizing a toolbar, you can do a test. You will need some material (for example with a texture map) in the first Material Editor slot. You can also check the Show Map in Viewport icon in the Material Editor to see the map.

If you create some geometry (for example a box) without pressing the script's button, it will have no material as usual. After pressing the button and selecting the same object, the material will be assigned to it automatically.

Newly created objects will also have the material assigned immediately as they become the current selection during creation and trigger the selection callback event inside of 3ds Max.

To disable the script you will have to press the button again – the button / menu item will become unchecked and the callback will be removed. Now you can select and create objects as usual.

Back to

"How To" Tutorials Index Page


How To ... Move Objects to a Surface

How To > Move Objects to a Surface

The following will let the user move objects along their Z axis to fit a specified surface. Such a script can be used to automatically plant trees, poles etc. on the ground.

Related Topics:

Defining MacroScripts

IntersectRay

NATURAL LANGUAGE

Package the code as macroScript to be able to use as a button, menu item or shortcut.

Define a custom function for moving objects to a surface down the Z axis

Find the intersection along -Z starting from the position of the object to be moved to the target object.

If no intersection can be found, project the position of the object up the Z and intersect again down the –Z axis.

Return the intersection as result of the function.

Enable the macroScript only when objects are selected.

When the macroScript is executed, let the user pick a target object.

Filter the pick to allow only Geometry objects to be picked.

In case a valid object has been picked, enable an undo context

Go through all objects and call the intersection function for each one.

As long as the intersection is not undefined, move the object to the intersection.

MAXSCRIPT

macroscript MoveToSurface category:"HowTo"

(

fn g_filter o = superclassof o == Geometryclass

fn find_intersection z_node node_to_z =

(

 local testRay = ray node_to_z.pos [0,0,-1]

 local nodeMaxZ = z_node.max.z

 testRay.pos.z = nodeMaxZ + 0.0001 * abs nodeMaxZ

 intersectRay z_node testRay

)

on isEnabled return selection.count > 0

on Execute do

(

 target_mesh = pickObject message:"Pick Target Surface:" filter:g_filter

 if isValidNode target_mesh then

 (

  undo "MoveToSurface" on

  (

   for i in selection do

   (

    int_point = find_intersection target_mesh i

    if int_point != undefined then i.pos = int_point.pos

   )--end i loop

  )--end undo

 )--end if

)--end execute

)--end script

Step-By-Step

macroscript MoveToSurface category:"HowTo"

(

The macroScript will be called MoveToSurface. To use the script, you can go to Customize... and drag the script from the category "HowTo" to a toolbar, a menu, a quad menu or assign to a keyboard shortcut.

Defining Macro Scripts

fn g_filter o = superclassof o == Geometryclass

This custom function will be used as filter for geometry objects. It will accept an object as parameter and will return true when the object is of Geometry Superclass and false otherwise.

fn find_intersection z_node node_to_z =

(

This custom function will do the actual ray intersection. It will accept two parameters – the target object and the object to be moved to the target object’s surface.

Creating Functions

local testRay = ray node_to_z.pos [0,0,-1]

Here we define a custom Ray value with a starting position at the position of the object to be moved and direction along the -Z axis.

Ray Values

local nodeMaxZ = z_node.max.z

We also get the max. Z coordinate of the surface to intersect with.

testRay.pos.z = nodeMaxZ + 0.0001 * abs nodeMaxZ

Then we move the Z position of the ray slightly above the highest Z point of the surface to intersect with. This way we can be sure that the ray will have a chance to hit the surface along the -Z axis.

intersectRay z_node test_ray

This built-in intersectRay function is given a node and a ray (spatial vector with a start point and direction) and returns the point in space where the ray hits the surface of the node, or undefined if there is no intersection. The result of this intersection will be also the return value of the function as it is the last value calculated.

IntersectRay

)

on isEnabled return selection.count > 0

The script can only do meaningful job when at least one object is selected. If there are no selected objects in the scene, the script will be disabled. The 'on isEnabled' handler controls the enabled state by evaluating the expression after the 'return' statement. When the result is false, the script’s button resp. Menu item is greyed out and cannot be activated.

Macroscript_Body_Event_Handlers

on Execute do

(

The body of the script is contained in the 'on Execute' handler. It is executed when the script is started by pressing its button, selecting its menu item or pressing assigned shortcut keys.

Macroscript_Body_Event_Handlers

target_mesh = pickObject message:"Pick Target Surface:" filter:g_filter

The pickObject function lets the user pick objects in the scene. The filter function we provided allows the picking of Geometry objects only – the mouse will not register any other objects like Lights, Helpers etc. when moving over them! The result will be written to the user variable target_mesh. It can be either the picked node or undefined in case the picking has been canceled.

Picking Scene Nodes By Hit

if isValidNode target_mesh then

(

If the picked object is a valid object (which means the user actually picked an object and did not press Escape or right-clicked the mouse to cancel)...

If Expression

isValidNode

undo "MoveToSurface" on

(

...then we define an undo context to be able to reset all objects back to their original state if necessary...

undo

for i in selection do

(

...and create a loop that will go through all objects in the current selection. Each iteration of the loop, the variable i will contain another object from the selection.

For Loop

int_point = find_intersection target_mesh i

Here we call the user function we defined and pass the target_mesh object picked by the user and the current objects from the loop through the selection. The result will be either undefined or the point of intersection – the projection of the object’s position onto the surface of the target object along –Z.

if int_point != undefined then i.pos = int_point.pos

If the intersection really exists, we simply set the position of the current object to that point. If it doesn’t (the intersection is undefined), we skip this step.

If Expression

Undefined Value

)--end i loop

)--end undo

)--end if

)--end execute

)--end script

Using the Script

Evaluate the script. To use it, you can use Customize... to drag the script from the category "HowTo" to a toolbar, a menu, a quad menu or to assign to a keyboard shortcut.

Select any number of objects you wish to move to a surface. Start the script and pick the object to move to.

Where to go from here

Using this script as the starting point, you could add axes controls to allow alignment in any world or local direction.

Back to

"How To" Tutorials Index Page


How To ... Output Object Data To File

How To > Output Object Data To File

MAXScript lets you create text files on the hard disk and output custom data. The following example will create a macroScript which will output the speed of the current object selection on each frame and its average speed to a text file.

Related Topics:

Defining Macroscripts

Save File Dialog

Text Files Creation and Output

NATURAL LANGUAGE

Package the code as macroScript to be able to use as a button, menu item or shortcut

Let the user specify an output filename to save the information

Write out the list of all selected objects as the file header.

Go through all frames in the current animation segment, get the selection’s position on the current frame and the frame before and calculate the units per frame speed.

Write out the result for each frame.

Collect all frame speed values and divide by the length of the animation segment to get the average speed.

Write out the average speed result.

Show the user the result by opening the file in an Editor

MAXSCRIPT

macroScript SpeedSheet category:"HowTo"

(

if selection.count > 0 then

(

 output_name = getSaveFileName caption:"SpeedSheet File" types:"SpeedSheet (*.ssh)|*.ssh|All Files (*.*)|*.*|"

 if output_name != undefined then

 (

  output_file = createfile output_name

  at time animationrange.start format "Object(s): %\n" (selection as array) to:output_file

  average_speed = 0

  for t = animationrange.start to animationrange.end do

  (

   at time t current_pos = selection.center

   at time (t-1f) last_pos = selection.center

   frame_speed = (distance current_pos last_pos)*FrameRate

   average_speed += frame_speed

   format "Frame %: %\n" t frame_speed to:output_file

  )

  average_speed /= (animationrange.end-animationrange.start)

  format "Average Speed: %\n" average_speed to:output_file

  close output_file

  edit output_name

 )--end if

)--end if

)--end macroScript

Step-By-Step:

MacroScript SpeedSheet category:"HowTo"

(

We create a new macroScript called SpeedSheet which will appear in the "HowTo" category.

Defining Macro Scripts

if selection.count > 0 then

(

The script will function only if there is at least one object selected. We check the number of objects in the current scene selection and execute the code only if the number is higher than 0.

ObjectSet Values

output_name = getSaveFileName caption:"SpeedSheet File" types:"SpeedSheet (*.ssh)|*.ssh|All Files (*.*)|*.*|"

Then we present the user with a standard windows File Saving dialog box. The dialog title bar will show the custom caption string "SpeedSheet File". We specify the default file type as .SSH (SpeedSheet) file. If the user types in a file name, the extension specified in the dialog is being added automatically.

Standard Open and Save File Dialogs

if output_name != undefined then

(

If the user canceled the file selection in the Save File Name dialog, the output_name variable will contain undefined. In such a case, we will have to skip the whole output code. If the file name is valid, we can go on...

output_file = create output_name

Then we create a new file for output using the specified file name. If the file already exists, it will be overwritten.

FileStream Values

at time animationrange.start format "Object(s): %\n" (selection as array) to:output_file

Right after creating the file, we write out the names of the selected objects. The at time context ensures that position data of the objects is printed out for the first frame in the animation. The format method uses a formatting string where variables are denoted with %. "\n" forces a new line.

at time

3ds Max System Globals

FileStream Values

average_speed = 0

To calculate the average speed, we initialize a variable to store all speed values for all frames.

for t = animationrange.start to animationrange.end do

(

Now we go through all frames in the current animation segment. The variable t will contain a frame value which will change from the first to the last frame of the scene animation range.

For Loop

AnimationRange_Time_Configuration

at time t current_pos = selection.center

Using the current time from the for loop variable t, we read the position of the center of the object selection.

at time

ObjectSet Values

at time (t-1f) last_pos = selection.center

Then we read the position of the selection center one frame before the current frame.

frame_speed = (distance current_pos last_pos)*FrameRate

The frame speed on the current frame is equal to the distance traveled by the selection center since the last frame, multiplied by the frame number in a second. This gives us a speed in Generic Units per second.

Distance_Point3

Mid Topic ID: FrameRate_Time_Configuration

average_speed += frame_speed

The average speed variable collects all frame speed values. Note that the same could be expressed in the full form as average_speed = average_speed + frame_speed

Format "Frame %: %\n" t frame_speed to:output_file

The frame speed is written together with the frame number to the output file.

FileStream Values

)

average_speed /= (animationrange.end - animationrange.start)

After the loop is over, the average speed can be calculated by dividing the sum of all frame speed values through the number of frames. The same could be written as average_speed = average_speed / (animationrange.end-animationrange.start)

AnimationRange_Time_Configuration

format "Average Speed: %\n" average_speed to:output_file

The result is printed out to the output file.

Close output_file

The file is ready. We should close it before we can open it for reading.

close_fileStream

edit output_name

Using the edit method, we open the file in a MAXScript editor window.

edit_MAXScript_Editor

)--end if

)--end if

)--end macroScript

Using the Script

Evaluate the script and customize a toolbar by dragging the SpeedSheet button from the "HowTo" category. You can create any number of objects and animate their position. While the objects are selected, press the SpeedSheet button, specify the name of the output file and... the result will be there in a second!

Where to go from here

If you want to see the content of the text file in an external editor, for example in Windows Notepad, you can replace the line

edit output_name

with the line

shellLaunch "notepad.exe" output_name

which will launch the external application notepad.exe with the file name of the file as parameter.

You might want to improve the script by calculating real-world units (inches, feet, meters etc.) instead of generic units.

Back to

"How To" Tutorials Index Page


How To ... Create a Quick Preview

How To > Create a Quick Preview

The following macroScript will implement a highly simplified version of the Preview Animation feature of 3ds Max. We will access the content of the viewport directly and build an AVI file which will be then automatically loaded in the RAM player.

Related Topics:

Defining MacroScripts

Accessing Active Viewport Info, Type, and Transforms

Bitmap Values

Device_Independent_Bitmap_access

RAMPlayer

NATURAL LANGUAGE

Package the code as macroScript to be able to use as a button, menu item or shortcut.

Define an AVI output path name in the Previews system directory.

Get the size of the current viewport.

Create a bitmap with the size of the viewport and set the file name to the output path .

Loop through all animation frames in the current segment.

Set the slider to the time from the loop.

Capture the viewport Device Independent Bitmap.

Copy the DIB to the pre-defined bitmap.

Save the current frame to disk.

When ready with all frames, close the bitmap.

Force garbage collection manually to clear any used memory.

Load the ready animation in the RAM player.

MAXSCRIPT

macroScript QuickPreview category:"HowTo"

(

 preview_name = (getDir #preview)+"/quickpreview.avi"

 view_size = getViewSize()

 anim_bmp = bitmap view_size.x view_size.y filename:preview_name

 for t = animationrange.start to animationrange.end do

 (

  sliderTime = t

  dib = gw.getViewportDib()

  copy dib anim_bmp

  save anim_bmp

 )

 close anim_bmp

 gc()

 ramplayer preview_name ""

)

Step-By-Step

macroScript QuickPreview category:"HowTo"

(

The macroScript will be called QuickPreview. To use the script, you can go to Customize... and drag the script from the category "HowTo" to a toolbar, a menu, a quad menu or assign to a keyboard shortcut.

Defining Macro Scripts

preview_name = (getDir #preview)+"/quickpreview.avi"

Now we define the output path for the preview AVI file. Using the getDir function we access the current preview path specified in 3ds Max’ Customize>Configure Paths. We add the file name to the path separated with a slash. (we could also use double-backslash "\\" as directory delimiter). The resulting path will be stored in a user variable called preview_name.

3ds Max System Directories

view_size = getViewSize()

Next we check the size of the currently active viewport. The result of the getViewSize function is a Point2 value containing the width and height of the viewport in pixels. We will store this value in another user variable called view_size.

Accessing Active Viewport Info, Type, and Transforms

anim_bmp = bitmap view_size.x view_size.y filename:preview_name

Using these two user variables, we can define a bitmap to store the preview. We supply the x and y component of the viewport size as the width and height parameters of the bitmap constructor, and set the filename to the already defined preview path.

Bitmap Values

for t = animationrange.start to animationrange.end do

(

A for loop will iterate through all frames in the current animation segment. The variable t will contain the frame number of each frame, starting with the start value of the animation range interval and ending with the end value.

For Loop

animationRange_System_Global

sliderTime = t

Using the t variable, we move the time slider from frame to frame.

3ds Max System Globals

dib = gw.getViewportDib()

On each frame, we capture the viewport bitmap (Device Independent Bitmap, DIB) in a temporary variable.

Device_Independent_Bitmap_access

copy dib anim_bmp

Then we copy the content of the dib variable (which is the bitmap showing the viewport’s content) into the preview bitmap we created. This adds a new frame to the AVI preview animation.

Bitmap Values

save anim_bmp

Before repeating the same on the next frame, we save the current content of the bitmap to disk.

Bitmap Values

)--end t loop

close anim_bmp

Bitmap Values

gc()

When all frames have been stored, we can close the animation file and manually force garbage collection to ensure the memory used while copying bitmaps around has been released.

In 3ds Max 5, you can use gc light:true to free up memory.

Manual Garbage Collection

ramplayer preview_name ""

Finally, we call the RAM Player and provide the path of the preview animation as first parameter, and an empty string as the second. The two parameters tell the RAM player which two files to load. The empty string is a place holder for a non-existing animation – we want to preview just one file.

RAMPlayer

)

Using the Script

Evaluate the script. To use it, you can use Customize... to drag the script from the category "HowTo" to a toolbar, a menu, a quad menu or to assign to a keyboard shortcut.

Select the viewport you want to preview (you can drag the viewport division to make it smaller for faster results) and start the script. The animation will be played once, then the RAM Player should open and load the preview animation.

Back to

"How To" Tutorials Index Page


How To ... Access the Z-Depth channel

How To > Access the Z-Depth channel

The 3ds Max default scanline renderer generates a multitude of additional data channels providing information about colors, texture coordinates, normals, transparency, velocity, coverage etc. All of these channels can be accessed for reading via MAXScript.

The following simple script will render an image including Z-buffer depth info and convert it into what is known as a "voxel landscape" using the depth data to generate geometry representing the single image pixels.

Related Topics:

Deleting objects using wildcard pathname

Rendering the current view with Z-buffer data

Creating a Progressbar

Reading and writing pixels

Accessing the Z-buffer channel as greyscale mask

NATURAL LANGUAGE

Delete all objects from the last session.

Render the current view with Z-buffer info to a bitmap

Go through all lines in the rendered image and through all pixels in each line

For every pixel, get the color and the z-depth value and create a box representing that pixel using the color for the object’s wireframe color and the z-depth for the box’s height.

Give each object a unique name to be able to easily delete them when needed.

Display a progress bar to show how long it will take to go through all pixels.

MAXSCRIPT

delete $VoxelBox*

rbmp = render outputsize:[32,32] channels:#(#zdepth) vfb:off

z_d = getchannelasmask rbmp #zdepth

progressstart "Rendering Voxels..."

for y = 1 to rbmp.height do

(

 progressupdate (100.0 * y / rbmp.height)

 pixel_line = getpixels rbmp [0,y-1] rbmp.width

 z_line = getpixels z_d [0,y-1] rbmp.width

 for x = 1 to rbmp.width do

 (

  b = box width:10 length:10 height:(z_line[x].value/2)

  b.pos = [x*10,-y*10,0]

  b.wirecolor = pixel_line[x]

  b.name = uniquename "VoxelBox"

 )--end x loop

)--end y loop

progressend ()

Step-By-Step:

delete $VoxelBox*

First we make sure any voxel objects from past sessions have been deleted. We delete all objects starting with "VoxelBox" no matter what other characters the name contains.

PathName Values

rbmp = render outputsize:[32,32] channels:#(#zdepth) vfb:off

Now we render the active viewport at 32x32 resolution and store the result in the variable rbmp. We request an additional Z-depth channel to be generated. The Virtual Frame Buffer will be disabled during rendering.

Controlling the Renderer

z_d = getchannelasmask rbmp #zdepth

After rendering the image, we request a copy of the ZDepth channel as a greyscale mask. It will be stored in the bitmap z_d.

getChannelAsMask

progressstart "Rendering Voxels..."

We start a new progress indicator with a respective caption - it will be displayed in the status bar at the bottom of the UI.

Progress Bar Display

for y = 1 to rbmp.height do

(

Now we start looping through all lines in the rendered bitmap. The variable y will change from 1 to the height of the bitmap.

For Loop

progressupdate (100.0 * y / rbmp.height)

The progressupdate method requires a percentage value. We divide the current bitmap line number y by the total number of lines rbmp.height . This yields a result between 0.0 and 1.0

Multiplied by 100.0 it returns a percentage between 0.0 and 100.0.

Progress Bar Display

pixel_line = getPixels rbmp [0,y-1] rbmp.width

z_line = getpixels z_d [0,y-1] rbmp.width

Now we read a whole line of pixels from both the RGBA bitmap and its z-buffer. Note that bitmap indices are 0-based and count from 0 to height minus one. This explains the "minus one" in the vertical position value.

getPixels

for x = 1 to rbmp.width do

(

By counting from 1 to the width of the bitmap, we access each pixel of the current scanline.

For Loop

b = box width:10 length:10 height:(z_line[x].value/2) pos:[x*10,-y*10,0]

Now we create a box with width and length equal to 10, and height equal to half the Z-buffer's grayscale value. We also set the X and Y position to every 10th world unit based on the pixel's coordinates. Note that we have to use the negative y value to get the upper left corner appear up left. A bitmap starts up left, while the positive quadrant of the MAX world space starts down left. This way we mirror the vertical coordinate to get a valid representation of the bitmap in the viewport.

Box : GeometryClass

b.wirecolor = pixel_line[x]

Using the RGB color of the rendered pixel, we assign a new wireframe color to the new box.

Viewport_related_node_properties

b.name = uniquename "VoxelBox"

We also set its box's name to a unique name with the base "VoxelBox"

uniquename

)--end x loop

)--end y loop

progressend ()

After the loops are over, we can end the progress display.

Progress Bar Display

Using the Script

To run the script, simply press Ctrl+E or execute File>Evaluate All. Make sure the current viewport shows the desired view to be rendered. The progress bar will let you know that the script is working. The result will be a group of boxes representing both color and depth of the rendered bitmap with the upper left corner at the world origin.

Where to go from here

Using this script as starting point, you could play with the creation of different object types like Spheres, Cylinders etc. A more advanced version could alter the Z position of vertices in a mesh grid based on the camera Z depth for a real heightmap elevation.

Back to

"How To" Tutorials Index Page


How To ... Create a MonoChrome RenderEffect

How To > Create a MonoChrome RenderEffect

MAXScript lets you create scripted plug-ins which function similar to plug-ins written in MSVC++ using the Max SDK. One of the scriptable plug-in classes is the RenderEffect class. We will write a very simple plug-in which will simply remove the color from the rendering.

Related Topics:

Scripted Plug-ins and RenderEffects

Getting and Setting Pixel values

RenderEffect Progress Callback Mechanism

NATURAL LANGUAGE

Create a scripted RenderEffect to change the rendered image after rendering.

Go through all lines in the image and through all pixels in each line

Replace the color information in each pixel with the monochrome value, keep alpha

Update the renderer progress bar based on the current line and total number of lines

MAXSCRIPT

plugin RenderEffect MonoChrome

name:"MonoChrome"

classID:#(0x9e6e9e77, 0xbe815df4)

(

rollout about_rollout "About..."

(

 label about_label "MonoChrome Filter"

)

on apply r_image progressCB: do

(

 progressCB.setTitle "MonoChrome Effect"

 local oldEscapeEnable = escapeEnable

 escapeEnable = false

 bmp_w = r_image.width

 bmp_h = r_image.height

 for y = 0 to bmp_h-1 do

 (

  if progressCB.progress y (bmp_h-1) then exit

  pixel_line = getPixels r_image [0,y] bmp_w

  for x = 1 to bmp_w do

  (

   p_v = pixel_line[x].value

   pixel_line[x] = color p_v p_v p_v pixel_line[x].alpha

  )--end x loop

  setPixels r_image [0,y] pixel_line

 )--end y loop

 escapeEnable = oldEscapeEnable

)--end on apply

)--end plugin

Step-By-Step:

plugin RenderEffect MonoChrome

name:"MonoChrome"

classID:#(0x9e6e9e77, 0xbe815df4)

(

A scripted plug-in starts with the constructor plugin followed by the superclass of the scripted plug-in (renderEffect) and the class name of the plug-in (MonoChrome). In addition, we have to provide the name which will appear in the effects list, and a unique classID.

The classID is used by 3ds Max to recognize the plug-in class when loading the scene. To generate a new unique ID, you can use the GenclassID() method in the Listener and copy the result into the script.

To keep all versions of this plug-in compatible around the world, it is recommended to copy the above classID though.

Scripted Plug-ins

Scripted RenderEffect Plug-ins

classID

rollout about_rollout "About..."

(

label about_label "MonoChrome Filter"

)

The plug-in will have no controls. We will create a very simple rollout containing a single line of text just to show the user he has loaded something.

Rollout Clauses

Label

on apply r_image progressCB: do

(

A renderEffect plug-in has a main handler which will be executed each time the effect is applied to the image. The image buffer of the renderer will be passed as the only parameter to the handler - we use a user variable named r_image which will contain the image we will work on. Also, we define a progress callback object in order to update the main renderer progress bar while processing the image.

Scripted RenderEffect Plug-ins

RenderEffect Progress Callback Mechanism

progressCB.setTitle "MonoChrome Effect"

Using the setTitle method in the progressCB object, we define the name to be displayed in the Rendering Effect progress window resp. the Renderer Progress window during processing. In the former case, the line will read "Currently Updating: MonoChrome Effect". In the latter case, the line will read "Current Task: MonoChrome Effect".

RenderEffect Progress Callback Mechanism

local oldEscapeEnable = escapeEnable

escapeEnable = false

In order to be able to capture and process the pressing of the Escape key during the main loop of the effect without actually breaking the script execution, we will have to disable the MAXScript Escape key handling. For this purpose we will store the current state of the Escape handling (true or false) in a temporary user variable and then assign false to the MAXScript System Global variable controlling the Escape handling . Later on, after the main loop, we will set it back to its original state stored in the oldEscapeEnable user variable.

bmp_w = r_image.width

We will need the width of the rendered image. We store the .width property of the image in the user variable bmp_w.

bmp_h = r_image.height

We will also need the height of the rendered image. We store the .height property of the image in the user variable bmp_h.

bitmap.height

for y = 0 to bmp_h-1 do

(

We will loop through all lines in the image. Image pixel access requires 0-based indexing, this means the upper left pixel of a 640x480 image has coordinates [0,0] and the bottom right pixel has coordinates [639,479]. The variable y will be assigned the values from 0 to the height of the image minus 1 each time the for loop repeats itself.

For Loop

if progressCB.progress y (bmp_h-1) then exit

This line does two things:

Since the .progress method of the progress callback object returns true when the user has pressed Escape and false otherwise, we check the return value and exit the loop when true is returned. This will bring us to the line after the end of the y loop.

The same method also accepts two arguments – the current value and the max. value needed to calculate the progress percentage. In our case, we supply the current line and the total number of lines. For example, if we are on line 300 and the bitmap has 600 lines, the progress bar will show 50% done...

RenderEffect Progress Callback Mechanism

Loop Exit

pixel_line = getPixels r_image [0,y] bmp_w

The getpixels function reads pixels from the specified file starting at the position supplied by the Point2 value and reads the number of pixels specified by the last value. The result will be assigned as array to the user variable pixel_line. We start reading at the first pixel to the left and read all bmp_w pixels - a whole scanline contains as many pixels as the width of the image.

getPixels

for x = 1 to bmp_w do

(

Now we can loop through all values in the array of pixel values. Because arrays in MAXScript are 1-Based, we count from 1 to the width of the image.

For Loop

p_v = pixel_line[x].value

pixel_line[x] = color p_v p_v p_v pixel_line[x].alpha

This is the actual core of the code - we get the .Value property of the color (its greyscale intensity) and generate a new color value with Red, Green and Blue values equal to the .Value of the original pixel. To keep the alpha channel untouched, we just add the original alpha value to the RGBA color. We store the result at the same position in the array and thus overwrite the color information with a grayscale version!

Color Values

)--end x loop

setPixels r_image [0,y] pixel_line

After processing all pixels of a scanline, the setpixels function writes the array pixel_line containing the new grayscale values back into the image starting at the same position. This overwrites the colors in the current line y.

setPixels

)--end y loop

We are ready with the loops and the whole bitmap has been changed. The on apply handler will return the resulting bitmap to the system and it will be shown in the Virtual Frame Buffer.

escapeEnable = oldEscapeEnable

As mentioned before, we will have to set the MAXScript Escape key handling to its original state before the render effect loop.

)--end on apply

)--end plugin

Using the Script

After evaluating the script, a new plug-in effect called "MonoChrome" will appear on the Renderer > Effects... > Add... list. Add it to the effects queue and render the scene. The result will be a monochrome version of the rendering. Note that scripted renderEffects are relatively slow compared to "real" plug-ins written with the SDK, but are very flexible and fast to prototype.

In the Virtual Frame Buffer, you can take a look at the Alpha and Monochrome version of the image - the Alpha should be unchanged, and the Monochrome version should be identical to the RGB image generated by the renderEffect.

Where to go from here

A relatively easy change to this basic script would be the change of only every Nth line of the bitmap. By just adding a by 2 option to the for y loop you will affect only every second line!

for y = 0 to bmp_h-1 by 2 do

Adding by 2 to the x loop too will affect only a grid of pixels! You could play with values higher than 2, or even add UI controls for user-defined line and pixel steps.

A more complex change to the script would be the tinting of the monochrome image by using different proportions of the monochrome value in the R, G and B channels. To do this, you could add a rollout and a paramBlock defining 3 Float values and let the user specify how much of each channel to be used. Then multiply the p_v value by the 3 values while assigning them to the R, G and B values of the image.

Back to

"How To" Tutorials Index Page


How To ... Create Custom Mesh Object

How To > Create Custom Mesh Object

MAXScript lets you create editable mesh objects by supplying lists of vertices and faces to the mesh constructor.

We are going to write a very simple mesh generation code which will create a circular 2D mesh object similar to a sun symbol.

Related Topics:

Working with Arrays

Creating Editable Mesh objects

NATURAL LANGUAGE

Define the basic parameters of the mesh object

Generate all vertices of the mesh and store in an array

Generate all faces by indexing the vertices and store in another array

Call the mesh constructor with the two arrays as parameters.

MAXSCRIPT

radius1 = 100

radius2 = 10

width = 10

vert_array = #()

face_array = #()

vert_count = 0

num_faces = 10

for a = 0 to 360 by 360/num_faces do

(

v1 = [radius1*cos(a+width),radius1*sin(a+width),0]

v2 = [radius1*cos(a-width),radius1*sin(a-width),0]

v3 = [radius2*cos(a),radius2*sin(a),0]

append vert_array v1

append vert_array v2

append vert_array v3

append face_array [vert_count+1,vert_count+3,vert_count+2]

vert_count += 3

)

m = mesh vertices:vert_array faces:face_array

Step-By-Step:

radius1 = 100

radius2 = 10

width = 10

First, we need some variables to define the geometry. The circular object has an inner and outer radius and a width value defining the outer size of the ray.

vert_array = #()

face_array = #()

The two arrays will be needed to store the vertex coordinates and the face definitions.

Array Values

vert_count = 0

The user variable vert_count is set to 0 and will be incremented while creating the faces of the mesh.

num_faces = 10

The number of steps is related to the number of faces to create. It is used as step in the following loop.

for a = 0 to 360 by 360/num_faces do

(

The for a loop counts from 0 to 360 (degrees) with a user-defined step provided by the num_faces variable. This variable defines the number of "rays" in the mesh. For example, to get 10 rays we need 360/10 = 36 degrees per ray. The a value will be incremented 10 times by the value of 36 to make a full turn in degrees.

For Loop

v1 = [radius1*cos(a+width),radius1*sin(a+width),0]

v2 = [radius1*cos(a-width),radius1*sin(a-width),0]

v3 = [radius2*cos(a),radius2*sin(a),0]

Now we will define the 3 vertices for a single face.

The Vertices v1 and v2 are at the outer side of the object.

The Vertex v3 is closer to the center (at distance equal to radius2).

When radius3 is 0, all v3 vertices of all faces are coincident at the center.

We use the equation of the circle which is:

X = CenterX + Radius * Cos(A); Y = CenterY + Radius * Sin(A); Z = 0.0

where A is an angle changing from 0 to 2*Pi. In our case, CenterX and CenterY are 0.0.

By adding and subtracting the width value to/from the angle a, we get the outer two vertices offset from the actual angle used by the third vertex. The third coordinate Z is always 0 in our case – the mesh will reside on the ground XY plane.

append vert_array v1

append vert_array v2

append vert_array v3

We add all 3 new vertices to the vertex array.

Array Values

append face_array [vert_count+1,vert_count+3,vert_count+2]

Now we can store a face in the face array, listing the 3 vertex indices as a Point3 value in Counter-Clockwise order. This will create the face with a normal pointing up. Since vert_count is still 3 less than the number of vertices in the vert_array, we can add 1, 2 and 3 to its current value to get the correct indices needed for the face definition.

vert_count += 3

Now we increase the vertex counter by 3. Next face definition will use the correct indices again. The same could be expressed as vert_count = vert_count + 3

)

m = mesh vertices:vert_array faces:face_array

Now we can create a new Editable mesh by calling the mesh constructor and supplying the vertex and face arrays.

Editable_Mesh : GeometryClass and TriMesh : Value

Using the Script

If you evaluate the script now, a new mesh object will appear in the scene. Changing the initial radius and width values lets you create multiple variations of the mesh.

Where to go from here

This was just a sketch of a mesh creating script. In a second step, we will enhance this code to generate a real geometry plug-in script operating interactively from within the Create tab.

How To ... Create Scripted Geometry Plug-in

Possible things to try yourself would be assigning different material IDs to the separate faces, assigning UVW coordinates to the mesh etc.

Back to

"How To" Tutorials Index Page


How To ... Create Scripted Geometry Plug-in

How To > Create Scripted Geometry Plug-in

MAXScript lets you create scripted geometry plug-ins which can generate procedural mesh objects on the fly just like regular C++plug-ins.

We are going to use the simple mesh code from the How To ... Create Custom Mesh Object topic and extend it to a scripted plug-in.

Related Topics:

Defining SimpleObject plug-ins

Scripted mouse tools

Mouse tool clauses

NATURAL LANGUAGE

Define a simpleObject scripted plug-in

Convert the basic parameters of the mesh object created in the first tutorial to parameter block parameters.

Define a UI and link to the parameter block values

Paste the original mesh code into the buildMesh handler of the plug-in

Create a mouse tool to place the object and define the parameters

MAXSCRIPT

plugin simpleObject AntiStar

name:"AntiStar"

category:"HowTo"

classID:#(0xe855567c, 0xbcd73b8b)

(

 parameters main rollout:params

 (

  num_faces type:#integer ui:num_faces default:10

  radius1 type:#float ui:radius1 default:0

  radius2 type:#float ui:radius2 default:0

  width type:#float ui:width default:1

 )

 rollout params "AntiStar"

 (

  spinner num_faces "# Faces" range:[2,100,10] type:#integer

  spinner radius1 "Radius 1" range:[0,10000,0]

  spinner radius2 "Radius 2" range:[0,10000,0]

  spinner width "Width" range:[0,90,1]

 )

 on buildMesh do

 (

  --Note: The code below has been taken from the

  -- How To – Create Custom Mesh Object topic and is identical.

 vert_array = #()

 face_array = #()

 vert_count = 0

 for a = 0 to 360 by 360.0/num_faces do

 (

  v1 = [radius1*cos(a+width),radius1*sin(a+width),0]

  v2 = [radius1*cos(a-width),radius1*sin(a-width),0]

  v3 = [radius2*cos(a),radius2*sin(a),0]

  append vert_array v1

  append vert_array v2

  append vert_array v3

  append face_array [vert_count+1,vert_count+3,vert_count+2]

  vert_count += 3

 )

 setMesh mesh verts:vert_array faces:face_array

)--end buildMesh

tool create

(

 on mousePoint click do

 (

  case click of

  (

   1: coordsys grid (nodeTM.translation = gridPoint)

  )

 )

 on mouseMove click do

 (

  case click of

  (

   2: (radius1 = abs(gridDist.y))

   3: (radius2 = abs(gridDist.y))

   4: (width = abs(gridDist.x))

   5: (#stop)

  )

 )

)--end create

)--end plugin

Step-By-Step

plugin simpleObject AntiStar

name:"AntiStar"

category:"HowTo"

classID:#(0xe855567c, 0xbcd73b8b)

(

A scripted plug-in starts with the constructor plugin followed by the superclass of the scripted plug-in (simpleObject) and the new class name of the plug-in (AntiStar). In addition, we have to provide the name which will appear in the effects list, and a unique classID.

The classID is used by 3ds Max to recognize the plug-in class when loading the scene. To generate a new unique ID, you can use the GenclassID() method in the Listener and copy the result into the script.

To keep all versions of this plug-in compatible around the world, it is recommended to copy the above classID though.

Scripted SimpleObject Plug-ins

classID

parameters main rollout:params

(

The scripted plug-in will store its parameters in a so-called Parameter Block. The ParamBlock2 format has been introduced in 3ds Max 3 and allows for easy properties and tracks management, automatic animation brackets in the UI and much more. In our case, we will store the same values used in the first mesh script (number of faces, the two radii and the width (offset) value in the ParamBlock.

All parameters in the block will have their counterparts in the plug-ins rollout in the UI. By providing the rollout name, we allow the ParamBlock to establish an automatic connection between the internal values and the UI elements.

Mid Topic ID: Parameter_block2

num_faces type:#integer ui:num_faces default:10

The num_faces object property will control the number of "rays" in the object, actually the number of faces. It will be an integer and will correspond to a spinner in the UI with the same name. The default number of faces will be 10.

radius1 type:#float ui:radius1 default:10

The radius1 object property will control the outer radius of the object. It will be a floating point value and will correspond to a spinner in the UI with the same name. The default radius on creation will be 10. If you create an object via MAXScript by calling the constructor antiStar(), the object will use this value as the default outer radius.

radius2 type:#float ui:radius2 default:0

The radius2 object property will control the inner radius of the object. It will be a floating point value and will correspond to a spinner in the UI with the same name. The default radius on creation will be 0.

width type:#float ui:width default:1

The width object property will control the offset of the outer vertices and will define the width of the rays. It will be a floating point value and will correspond to a spinner in the UI with the same name. The default width on creation will be 1.

)

rollout params "AntiStar"

(

spinner num_faces "# Faces" range:[2,100,10] type:#integer

spinner radius1 "Radius 1" range:[0,10000,0]

spinner radius2 "Radius 2" range:[0,10000,0]

spinner width "Width" range:[0,90,1]

)

Now we provide the rollout with UI elements referenced by the Parameter Block. The UI elements can limit the input values using the optional range: parameter, but the default value will be taken from the ParamBlock2.

Rollout Clauses

Spinner

on buildMesh do

(

The buildMesh is the main handler of scripted simpleObject plug-ins. It is called each time the geometry needs to be updated. Inside the handler, we can use our existing mesh generation code from the other tutorial to generate the vertices and faces of the mesh.

vert_array = #()

face_array = #()

vert_count = 0

for a = 0 to 360 by 360.0/num_faces do

(

v1 = [radius1*cos(a+width),radius1*sin(a+width),0]

v2 = [radius1*cos(a-width),radius1*sin(a-width),0]

v3 = [radius2*cos(a),radius2*sin(a),0]

append vert_array v1

append vert_array v2

append vert_array v3

append face_array [vert_count+1,vert_count+3,vert_count+2]

vert_count += 3

)

setMesh mesh verts:vert_array faces:face_array

The buildMesh handler accepts the setMesh method which feeds the mesh generation data into a fast routine which regenerates the object on the fly.

)--end buildMesh

tool create

(

The tool create handles the mouse controls on object creation.

Scripted Mouse Tools

on mousePoint click do

(

The on mousePoint handler is executed each time the user clicks with the mouse in the viewport. The variable click will count the number of clicks.

Mouse_Tools_Event_Handlers

case click of

(

1: coordsys grid (nodeTM.translation = gridPoint)

In case the user has clicked for the first time, we can set the translation part of the Node Transformation Matrix of the object to the grid point the user specified. This repositions the center of the object to the clicked point in the active grid.

Mouse_Tools_nodeTM

Mouse_Tools_gridPoint

)

)

on mouseMove click do

(

The on mouseMove handler is executed each time the user moves the mouse in the viewport. The variable click will count the number of clicks so far.

Mouse_Tools_Event_Handlers

Case click of

(

The case expression allows the selection of options based on the value of the supplied variable. It is similar to using multiple if statements to compare the same variable with multiple values.

Case Expression

2: (radius1 = abs(gridDist.y))

If the user has clicked twice so far, set the outer radius to the Y distance from the center of the object to the current mouse position.

Mouse_Tools_gridDist

3: (radius2 = abs(gridDist.y))

If the user has clicked tree times, set the inner radius to the Y distance from the center of the object to the current mouse position.

4: (width = abs(gridDist.x))

If the user has clicked four times already, set the offset if the outer vertices by measuring the X distance from the center of the object to the current mouse position.

5: (#stop)

Finally, finish the creation. A new object has been born!

)

)

)--end create

)--end plugin

Using the Script

This is a scripted plug-in and it will be handled by 3ds Max as a real C++ plug-in.

To install it permanently on your system, just copy the file to the \plugins folder or to any folder listed in the plug-ins paths.

To try the plug-in without installing it permanently, just evaluate the code and look under Create panel>Geometry>HowTo category in the drop-down list. The plug-in will be only available for the single session and will not be there after restarting 3ds Max.

Any MAX files saved with the plug-in in the scene will require the script to be installed and evaluated in order to load correctly.

To use the plug-in, click the AntiStar button in the Create panel>Geometry>HowTo. Click in the viewport to define the center, drag to define the outer radius, click, drag again to define the inner radius, click, drag again to define the width. Click to finish or right-click to cancel.

Play with the controls in the UI under the Modify panel and note how quickly the mesh is updated by the script!

Back to

"How To" Tutorials Index Page


How To ... Create a Dalmatian TextureMap Plug-in

How To > Create a Dalmatian TextureMap Plug-in

The following example shows how to extend an existing texture map plug-in. We will reduce the number of UI elements exposed to the user and link some of them together in a logical way to achieve a new look.

The same effect could be easily achieved using a normal Cellular procedural map with the right settings, but a new interface greatly simplifies the task for the end user.

Related Topics:

Scripted Plug-ins

Scripted TextureMap Plug-ins

Scripted_Plugin_Event_Handlers

NATURAL LANGUAGE

Extend the existing Cellular map

Replace the existing UI with a simplified one

Create a parameter block to hold the new UI values

Create Handlers to logically link values together

Create a new rollout linked to the parameter block with two colors and three spinners

MAXSCRIPT

plugin textureMap Dalmatian

name:"Dalmatian"

classID:#(0x7f14579d, 0x5caf6eb8)

extends:Cellular

replaceUI:true

(

parameters main rollout:params

(

 DColor1 type:#color default:(color 255 255 255) ui:color1

 DColor2 type:#color default:(color 0 0 0) ui:color2

 Dsize type:#float default:30.0 ui:dot_size

 Dspread type:#float default:10.0 ui:dot_spread

 Dsmooth type:#float default:20.0 ui:dot_smooth

 on DColor1 set val do delegate.divColor1 = delegate.divColor2 = val

 on DColor2 set val do delegate.cellColor = val

 on DSize set val do delegate.size = val

 on DSpread set val do delegate.spread = val/100.0

 on DSmooth set val do

 (

  delegate.lowthresh = 1.0-(val/50.0)

  delegate.midthresh = 1.0-(val/100.0)

  delegate.highthresh = 1.0

 )

)--end params

rollout params "Dalmatian Map Parameters"

(

 colorpicker color1 "Base Color" align:#right fieldwidth:48

 colorpicker color2 "Dots Color" align:#right fieldwidth:48

 spinner dot_smooth "Smoothing" range:[0,100,20] \

  align:#left fieldwidth:40 across:3

 spinner dot_spread "Spread" range:[0,100,10] align:#center fieldwidth:40

 spinner dot_size "Dot Size" range:[0,100,30] align:#right fieldwidth:40

)--end rollout

)--end plugin

Step-By-Step

plugin textureMap Dalmatian

name:"Dalmatian"

A scripted plug-in starts with the constructor plugin followed by the superclass of the scripted plug-in (textureMap) and the new class name of the plug-in (Dalmatian). In addition, we have to provide the name which will appear in the Map Browser.

Scripted Plug-ins

Scripted TextureMap Plug-ins

classID:#(0x7f14579d, 0x5caf6eb8)

The classID is used by 3ds Max to recognize the plug-in class when loading the scene. To generate a new unique ID, you can use the GenclassID() method in the Listener and copy the result into the script.

To keep all versions of this plug-in compatible around the world, it is recommended to copy the above classID though.

classID

extends:Cellular

As we are extending an existing texture map, we have to supply the class of the original plug-in, in our case Cellular.

replaceUI:true

(

Finally, we request a UI replacement – the original UI of the Cellular map will not be displayed. Instead, we will create our own UI rollout showing just the controls needed to control our new texture.

parameters main rollout:params

(

The scripted plug-in will store its parameters in a so-called Parameter Block. The ParamBlock2 format has been introduced in 3ds Max 3 and allows for easy properties and tracks management, automatic animation brackets in the UI and much more. In our case, we will store some user parameters (dot and background color, dot size, etc.)

All parameters in the block will have their counterparts in the plug-ins rollout in the UI. By providing the rollout name, we allow the ParamBlock to establish an automatic connection between the internal values and the UI elements.

Parameter_block2

DColor1 type:#color default:(color 255 255 255) ui:color1

This parameter will control the base (background) color. Obviously, it will be of type #color and have the default value of white. This parameter will be linked to the UI spinner color1. Later, we will control the two Division colors of the host Cellular map with this value.

DColor2 type:#color default:(color 0 0 0) ui:color2

This parameter will control the dot color. It will be of type #color and have the default value of black. This parameter will be linked to the UI spinner color2. Later, we will control the Cell color colors of the host Cellular map with this value.

Dsize type:#float default:30.0 ui:dot_size

This parameter will control the size of the dots. It will be of type #float (a floating point value) and have the default value of 30.0. This parameter will be linked to the UI spinner dot_size and control the Size property of the host Cellular map.

Dspread type:#float default:10.0 ui:dot_spread

This parameter will control the spreading of the dots. It will be of type #float (a floating point value) and have the default value of 10.0. This parameter will be linked to the UI spinner dot_spread. Later, we will control the host Cellular map’s own Spread property with it.

Dsmooth type:#float default:20.0 ui:dot_smooth

This parameter will control the smoothing of the dots. It will be of type #float (a floating point value) and have the default value of 20.0. This parameter will be linked to the UI spinner dot_smooth. Later, we will control the Low, Mid and High Thresholds of the Cellular map with it.

on DColor1 set val do delegate.divColor1 = delegate.divColor2 = val

This is a change handler executed each time the value of the parameter DColor1 is changed (usually because the user has changed the value of the UI element linked to it). The variable val will contain the new value. When the value changes, we assign it to the divcolor1 and divcolor2 parameters of the Cellular map. Delegate stands for the host map. You can see all available parameters of the Cellular map by using

showProperties (cellular())

.cellColor (Cell_Color) : RGB color

.divColor1 (Division_Color1) : RGB color

.divColor2 (Division_Color2) : RGB color

.cellMap : texmap

.divMap1 (DivisionMap1) : texmap

.divMap2 (DivisionMap2) : texmap

.map1Enabled (Map1_On) : boolean

.map2Enabled (Map2_On) : boolean

.map3Enabled (Map3_On) : boolean

.variation : float

.size : float

.spread : float

.lowThresh (Low) : float

.midThresh (Mid) : float

.highThresh (High) : float

.type : integer

.fractal : boolean

.iteration (Iterations) : float

.roughness : float

.smooth (Bump_smoothing) : float

.adaptive : boolean

.coords : max object

.output : max object

on DColor2 set val do delegate.cellColor = val

This is a change handler executed each time the value of the parameter Dcolor2 is changed. The variable val will contain the new value. When the value changes, we assign it to the .cellColor parameter of the Cellular map.

on DSize set val do delegate.size = val

This is a change handler executed each time the value of the parameter Dsize is changed. The variable val will contain the new value. When the value changes, we assign it to the .Size parameter of the Cellular map.

on DSpread set val do delegate.spread = val/100.0

This is a change handler executed each time the value of the parameter DSpread is changed. The variable val will contain the new value. When the value changes, we assign the value divided by 100.0 to the .Spread parameter of the Cellular map. This way, we can have a Spread value of 100.0 percent in the UI while using it in the range from 0.0 to 1.0 in the host Cellular map. This makes manipulating values easier for the end user.

on DSmooth set val do

(

delegate.lowthresh = 1.0-(val/50.0)

delegate.midthresh = 1.0-(val/100.0)

delegate.highthresh = 1.0

)

Lastly, we define the change handler of the parameter Dsmooth. The variable val will contain the new value. When the value changes, we assign the value in different proportions to the Low and Mid Threshold, and 1.0 to the High Threshold.

)--end params

rollout params "Dalmatian Map Parameters"

(

This is the new UI rollout to replace the original Cellular map UI.

Rollout Clauses

colorpicker color1 "Base Color" align:#right fieldwidth:48

colorpicker color2 "Dots Color" align:#right fieldwidth:48

These two color pickers will be linked to the respective color parameters in the ParameterBlock2. We don’t have to assign a default color here – the default value stored in the ParameterBlock2 will be displayed automatically because of the internal two-directional connection between parameters and UI elements.

Colorpicker

spinner dot_smooth "Smoothing" range:[0,100,20] \

align:#left fieldwidth:40 across:3

spinner dot_spread "Spread" range:[0,100,10] align:#center fieldwidth:40

spinner dot_size "Dot Size" range:[0,100,30] align:#right fieldwidth:40

These 3 spinners will also be linked to the respective Floating Point parameters in the ParameterBlock2. While we don’t have to assign a default value here, we have to specify the range of the value allowed by the UI – the ParameterBlock2 parameters like most internal values in 3ds Max do not have any range limitations!

Using the across:3 keyword, we force the UI to place the 3 spinners in a single horizontal row.

Spinner

)--end rollout

)--end plugin

Using the Script

Evaluate the script. A new Dalmatian map will appear in the Material/Map browser. You can use it anywhere a regular texture map could be used. The default look will be much like the typical Dalmatian dog’s skin...

Back to

"How To" Tutorials Index Page


How To ... Access Windows System Data

How To > Access Windows System Data

MAXScript lets you access some system information like file attributes, files and directories etc. Still, most areas of the system environment outside of 3ds Max are not directly covered by MAXScript itself. Fortunately, there is also the dosCommand method which lets you execute DOS commands in the command prompt console.

In the following example, we will use the dosCommand method to get the PATH environment variables set in Windows.

Related Topics:

System Information

Executing External Commands using DOScommand

External File Methods

FileStream Values

NATURAL LANGUAGE

Create a function to reuse the code in the future.

Execute the Path command from the Command Prompt and redirect output to file.

Read the resulting file and collect all paths between the starting = and the following ; characters.

Store the paths in a list and when ready, return the list as result of the function.

Delete the temporary file to reduce disk pollution.

MAXSCRIPT

fn getEnvironmentPaths =

(

 dosCommand "path >env.txt"

 path_array = #()

 in_text = openfile "env.txt"

 skipToString in_text "="

 while not eof in_text do

 (

  str = readDelimitedString in_text ";"

  if str != "\n" then append path_array str

 )

 close in_text

 deleteFile "env.txt"

 path_array

)

Step-By-Step

fn getEnvironmentPaths =

(

This is going to be a user-defined function without any arguments.

DosCommand "path >env.txt"

The dosCommand method expects a string parameter containing the command to be executed. You can supply any command sequences you could type in the Windows Command Prompt. In this case, we execute the PATH command which shows the currently set OS environment paths. We also tell Windows to write the result to a text file called "env.txt". Then we can use this file to read in the results.

Executing External Commands

path_array = #()

We will need an array to store the single path definitions. We will initialize the array to the empty array in the beginning.

in_text = openfile "env.txt"

Now let’s open the file created by the dosCommand execution. The content of the file will look like this: "PATH=D:\WINDOWS\SYSTEM32;D:\WINDOWS; " etc. The exact paths will of course vary from system to system. We can see that the first path starts after the "=" character and ends at the ";" character. Each path after the first starts after the ";" and ends with ";".

FileStream Values

SkipToString in_text "="

So we skip to the position of the "=" sign to start reading the first path.

FileStream Values

while not eof in_text do

(

Using a while loop which will repeat the code within the brackets until End Of File of in_text has been detected, we will extract all paths found in the file.

While and Do Loops

str = readDelimitedString in_text ";"

Because we know that all all paths are delimited by a ";", we can use the readDelimitedString function to read text fragments from the file. We will store them in the user variable str.

FileStream Values

if str != "\n" then append path_array str

Next we will have to check whether the str variable does not contain the last End Of Line symbol before the End Of File and if it doesn’t, we can add the string to the array of paths.

)

close in_text

Now we are ready with the reading and can close the file.

FileStream Values

DeleteFile "env.txt"

It was just a temporary file so we can delete it from the disk.

External File Methods

path_array

Lastly, we can return the array with the collected paths as the result of the function.

)

Using the Script

As this is a function, we have to call it. It has no parameters, so we just call it with ()

env_paths = GetEnvironmentPaths()

The variable env_paths will contain an array of the environment paths set under Windows.

Where to go from here

You could use the same method to develop variations of the script to access other OS-related data like the environment TEMP path name, the name of the Hard Disk Drive etc.

Back to

"How To" Tutorials Index Page


How To ... Sort TrackView Alphabetically

How To > Sort TrackView Alphabetically

In general, 3ds Max shows the scene hierarchy in TrackView in the order of object creation. While there are some keyboard shortcuts for moving single objects up and down, there is no built-in function to reorder the TrackView.

Using the fact that unlinking a parented object moves it to the end of the hierarchy, we can write a short script to sort the TrackView display anyway we want.

The following script will sort the objects in TrackView in alphabetical order.

Related Topics:

Defining MacroScripts

Parent_Node_Property

NATURAL LANGUAGE

Package the code as macroScript to be able to use as a button, menu item or shortcut.

Collect the names of all objects in the scene.

Sort the names alphabetically.

Create a temporary helper for linking.

Resolve each object’s path by using its name.

If the object has no parent, link to the temporary helper and unlink again to move the object to the end of the database.

Delete the temporary object.

MAXSCRIPT

macroScript AlphaSortTracks category:"HowTo"

(

 names_array = for i in $* collect i.name

 sort names_array

 d = dummy ()

 for i = 1 to names_array.count by 1 do

 (

  node_by_name = getNodeByName names_array[i]

  if node_by_name.parent == undefined then

  (

   node_by_name.parent = d

   node_by_name.parent = undefined

  )

 )--end i loop

 delete d

)--end macroScript

Step-By-Step

macroScript AlphaSortTracks category:"HowTo"

(

The macroScript will be called AlphaSortTracks. To use the script, you can go to Customize... and drag the script from the category "HowTo" to a toolbar, a menu, a quad menu or assign to a keyboard shortcut.

Defining Macro Scripts

names_array = for i in $* collect i.name

Using a for loop, we will collect the names of all objects found in the scene in an array called names_array.

For Loop

Sort names_array

The sort method will sort all names in the array in alphabetical order. Now that we have the names in the right order, we will have to retrieve the objects using the names and put them in the same order.

Sort_Array

d = dummy()

To simulate linking and unlinking and thus reorder the nodes, we will create a temporary dummy object to be used as parent.

Dummy, Helper

for i = 1 to names_array.count by 1 do

(

The for loop will assign the index of each name from the array to the value of variable i. The by 1 option does not do anything in this case, but if we would change it to –1, and switch places of the start and end value, we would invert the sorting from ascending (A-Z) to descending (Z-A) order!

For Loop

node_by_name = getNodeByName names_array[i]

Using the getNodeByName function, we convert the object names to nodePath values. This way we get the objects in the right order. The variable i is used as an index to get the i-th element of the array of names.

getNodeByName

Array Values

if node_by_name.parent == undefined then

(

We are going to sort only objects that are "children of the world", in other words the top-level nodes that are not linked to parents. That’s why we have to check whether the object has a parent. Of there is none (the .parent property returns undefined), we can proceed.

node_by_name.parent = d

node_by_name.parent = undefined

By assigning the dummy object to the .parent property, we link the node to the temporary dummy we created after sorting the names. By assigning undefined to the same property we unlink it again and send it to the end of the scene node database.

Parent_Node_Property

Undefined Value

)

)--end i loop

delete d

Now that the loop has finished its work, we can delete the temporary dummy.

)--end macroScript

Using the Script

Evaluate the script. To use the script, you can use Customize... to drag the script from the category "HowTo" to a toolbar, a menu, a quad menu or to assign to a keyboard shortcut. Create some objects and open TrackView to take a look at their current order. Execute the macroScript and compare the order in TrackView – the nodes should be listed in Alphabetical order now.

Where to go from here

As already mentioned in the Step-By-Step description, simply changing the for loop to

for i = names_array.count to 1 by -1 do

will give you sorting in reverse order. You will probably want to give your second version of the script a new name like

macroScript RevSortTracks category:"HowTo"

or you could even add a prompt asking the user about the desired order mode in the same script.

Another idea for improvements would be to change the script to sort the objects based on some additional property, for example by class (Geometry, Lights, Helpers etc. in blocks by class, then sorted alphabetically within the class blocks)...

Back to

"How To" Tutorials Index Page


How To ... Flatten a SplineShape

How To > Flatten a SplineShape

The following tutorial shows how to access and modify the splines and their knots (vertices) and tangents in a SplineShape. The resulting macroScript will move all knots to the Z height defined by the shape’s Z position, thus aligning them to a plane parallel to the ground XY world construction plane.

Related Topics:

Defining MacroScripts

SplineShape : Shape

Spline Shape Common Properties, Operators, and Methods

NATURAL LANGUAGE

Package the code as macroScript to be able to use as a button, menu item or shortcut.

Enable the script only when a single Editable Spline without modifiers has been selected.

When executed, go through all splines in the shape

For each spline, go through all knots (vertices)

For each knot, set the Z coordinate of the In and Out tangent to the shape’s Z position

For each knot, set knot’s Z coordinate to the shape’s Z position

When ready with all splines and knotes, update the shape.

MAXSCRIPT

macroscript FlattenSpline category:"HowTo" tooltip:"Flatten Spline"

(

on isEnabled return

(

 selection.count == 1 and \

 (classof selection[1] == SplineShape or \

 classof selection[1] == Line) \

 and selection[1].modifiers.count == 0

)

on execute do

(

 new_z = $.pos.z

 for s = 1 to (numSplines $) do

 (

  for k = 1 to (numKnots $ s) do

  (

   knt = getKnotPoint $ s k

   in_vec = getInVec $ s k

   out_vec = getOutVec $ s k

   knt.z = in_vec.z = out_vec.z = new_z

   setInVec $ s k in_vec

   setOutVec $ s k out_vec

   setKnotPoint $ s k knt

  )--end k loop

 )--end s loop

updateshape $

)--end execute

)--end script

Step-By-Step

macroscript FlattenSpline category:"HowTo" tooltip:"Flatten Spline"

(

The macroScript will be called FlattenSpline. To use the script, you can go to Customize... and drag the script from the category "HowTo" to a toolbar, a menu, a quad menu or assign to a keyboard shortcut.

Defining Macro Scripts

on isEnabled return

(

selection.count == 1 and \

(classof selection[1] == SplineShape or \

classof selection[1] == Line) \

and selection[1].modifiers.count == 0

)

The macroScript ActionItem (button, menu item, shortcut) will only be enabled when the scene selection contains a single object AND this one object is either a SplineShape class (in other words an EditableSpline) without any modifiers as MAXScript cannot modify a spline with modifiers on top. The result of the expression after the return statement evaluates to true or false. When true, the script becomes enabled.

In these lines we compare the count of the current scene selection with 1, then the class of the first selected object to the class SplineShape. Then once again we compare the class of the first selected object with the class Line as a newly drawn line would be an exception – we can modify it, but the class is not SplineShape until collapsed to EditableSpline. Lastly, we check the number of modifiers and compare to 0.

If the first AND either the second OR the third, AND the fourth condition are true, the selected object is valid and can be modified by the script!

Macroscript_Body_Event_Handlers

ClassOf

ModifierArray Values

on execute do

(

The on execute handler contains the actual code. It will be executed whenever the script is started by clicking the button, selecting the item from a menu, using the keyboard shortcut etc.

Macroscript_Body_Event_Handlers

new_z = $.pos.z

We will need the Z coordinate of the splineShape in order to move all Knots and Tangents to that position. We store the Z component of the position of the scene selection in the user variable new_z. Because we already checked in the isEnabled handler that there is only one object selected, we don’t need to use selected[1] to access the first selected object – we are completely sure the $ representing the current selection is actually a single object!

Node Transform Properties

for s = 1 to (numSplines $) do

(

A splineShape can contain any number of splines (a Donut shape for example contains two circles!). To change every single spline, we will create a for loop which counts from 1 to the number of splines in the selected object.

For Loop

SplineShape : Shape

for k = 1 to (numKnots $ s) do

(

Each spline in the shape can contain any number of knots. To change every single knot, we will create another for loop which counts from 1 to the number of knots in the s-th spline – the index of the spline is controlled by the outer for loop. Note that the for k... loop will be executed again and again for each repetition of the for s loop. So these are nested loops!

For Loop

SplineShape : Shape

knt = getKnotPoint $ s k

Using getKnotPoint, we read the K-th knot in the S-th spline in the selected splineShape. We store its Point3 world coordinates in the user variable knt.

SplineShape : Shape

in_vec = getInVec $ s k

Then we read the in vector of the K-th knot in the S-th spline in the selected splineShape. We store its Point3 world coordinates in the user variable in_vec.

SplineShape : Shape

out_vec = getOutVec $ s k

We read the out vector of the K-th knot in the S-th spline in the selected splineShape. We store its Point3 world coordinates in the user variable out_vec.

SplineShape : Shape

knt.z = in_vec.z = out_vec.z = new_z

Now we can set the Z coordinate of both vectors and the knot to the new value stored in the new_z variable. Note we can assign the same value to multiple variables as MAXScript processes the expression by evaluating the right-hand side of the assignment first then assigning the result to the left-hand side and so on.

Variable Assignment

setInVec $ s k in_vec

setOutVec $ s k out_vec

Now we can assign the new in and out vectors back to the respective knot and spline.

SplineShape : Shape

setKnotPoint $ s k knt

Then we assign the new knot position back to the respective knot and spline.

SplineShape : Shape

)--end k loop

)--end s loop

updateshape $

Finally, it is very important to update the splineShape. This makes all changes visible by updating the internal data structures. Failing to do so could cause instabilities in 3ds Max.

SplineShape : Shape

)--end execute

)--end script

Using the Script

Evaluate the script. To use it, you can use Customize... to drag the script from the category "HowTo" to a toolbar, a menu, a quad menu or to assign to a keyboard shortcut.

Select a single spline in the scene and execute the script. All knots should move to become aligned to the XY plane in the height of the spline’s pivot.

Where to go from here

You could add an UI with options to align to other construction planes or to move the knots to the ground plane (by just using 0.0 instead of new_Z)

Back to

"How To" Tutorials Index Page


How To ... Draw a Freehand Spline

How To > Draw a Freehand Spline

3ds Max does not provide a built-in function for drawing splines freely with the mouse. Surprisingly enough, the old Autodesk 3D Studio DOS had such a feature.

Using the power of MAXScript, we can implement this feature as a simple MacroScript. It will let us draw a spline in the ground plane using the mouse.

Related Topics:

Defining MacroScripts

SplineShape : Shape

Spline Shape Common Properties, Operators, and Methods

Picking Points in the Viewports

MAXScript Message and Query Dialogs

NATURAL LANGUAGE

Package the code as macroScript to be able to use as a button, menu item or shortcut.

Define a function to measure the distance between the last and current mouse position and add a new knot to the spline when a threshold is exceeded.

Define a drawing function to capture the mouse movement using the built-in pickPoint function.

Put the complete creation code in an undo context to be able to undo the drawing.

Create a new splineShape object.

Let the user click in the viewport to define the start of the spline.

If the user right-clicked, cancel the operation

If the user left-clicked, add a knot to the spline and call the draw function.

As long as the user moves the mouse, the pickPoint callback will keep on measuring the segment lengths and adding new knots when needed.

If the user clicked again, ask about closing the spline.

If answer is yes, close the spline, select it and exit the script

If answer is no, just select the spline and exit the script.

MAXSCRIPT

macroscript FreeSpline category:"HowTo" tooltip:"FreeSpline"

(

local old_pos

local new_spline

local second_knot_set

fn get_mouse_pos pen_pos old_pen_pos =

(

 if old_pos == undefined then old_pos = old_pen_pos

 if distance pen_pos old_pos > 10 then

 (

  if second_knot_set then

   addKnot new_spline 1 #smooth #curve pen_pos

  else

  (

   setKnotPoint new_spline 1 2 pen_pos

   second_knot_set = true

  )

  old_pos = pen_pos

  updateShape new_spline

 ) -- end if

) -- end fn

fn draw_new_line old_pen_pos =

(

 pickPoint mouseMoveCallback:#(get_mouse_pos,old_pen_pos)

)

undo "Free Spline" on

(

 new_spline = splineShape ()

 old_pen_pos = pickPoint ()

 if old_pen_pos == #RightClick then

 (

  delete new_spline

 )

 else

 (

  select new_spline

  new_spline.pos = old_pen_pos

  addNewSpline new_spline

  addKnot new_spline 1 #smooth #curve old_pen_pos

  addKnot new_spline 1 #smooth #curve old_pen_pos

  second_knot_set = false

  draw_new_line old_pen_pos

  q = querybox "Close Spline?" title:"Free Spline"

  if q then

  (

   close new_spline 1

   updateshape new_spline

  )

  select new_spline

 )--end else

)--end undo

)--end script

Step-By-Step

macroscript FreeSpline category:"HowTo" tooltip:"FreeSpline"

(

The macroScript will be called FreeSpline. To use the script, you can go to Customize... and drag the script from the category "HowTo" to a toolbar, a menu, a quad menu or assign to a keyboard shortcut.

Defining Macro Scripts

local old_pos

local new_spline

local second_knot_set

We will need some local variables to store the last knot position and the new object created by the script. The third variable will be used as a flag to tell us whether we just started creation of the spline.

These variables will exist only inside the macroScript’s context as we declare them as local.

Scope of Variables

fn get_mouse_pos pen_pos old_pen_pos =

(

We create our own function to handle the drawing of new knots in the splineShape. This function receives two parameters – the current position of the mouse, and the result of the first click captured by the pickPoint function (see below).

Defining Custom Functions

if old_pos == undefined then old_pos = old_pen_pos

If we don’t know of an existing Knot (creation just started!), we set the value of the old_pos local variable to the first clicked point provided by the old_pen_pos parameter.

If Expression

Undefined Value

if distance pen_pos old_pos > 10 then

(

Next we check the distance between the last known knot’s position and the current mouse position. If the distance is longer than 10 units...

If Expression

Distance_Point3

if second_knot_set then

The flag variable we defined will contrain either true or false. When the variable contains false, spline creation has just started. Because a spline must have at least two knots (vertices), we will create the first knot twice and then set this flag to false. When the next knot position is to be set, instead of creating a new one, we will reposition the existing second knot to the new coordinates and then set the flag to true.

When the flag is set to true, we will just create the next new knot - see next line...

addKnot new_spline 1 #smooth #curve pen_pos

...we go on and place a new knot, thus adding a new segment to the spline shape. The addKnot function requires a splineShape object, the index of the spline (we have just 1), the type of the knot (we use #smooth in our case), and the position to put the knot at.

SplineShape : Shape

else

(

setKnotPoint new_spline 1 2 pen_pos

When the flag is set to false, we have to move the existing second knot instead of creating a new one...

second_knot_set = true

Then we set the flag to true. Next time, a new knot will be created instead...

)

old_pos = pen_pos

Then we remember the new knot’s position to use by the next mouse movement check.

updateShape new_spline

To see the changes made to the spline, we update the splineShape object.

SplineShape : Shape

) -- end if

) -- end fn

fn draw_new_line old_pen_pos =

(

We create another function to handle the capturing of the mouse motion.

Defining Custom Functions

pickPoint mouseMoveCallback:#(get_mouse_pos,old_pen_pos)

Our function calls only the built-in pickPoint function which provides an optional callback which calls the function we just defined (get_mouse_point) and passes the current mouse position and any user parameters supplied (in our case, old_pen_pos).

As long as the mouse is moving and no clicks are encountered, the pickPoint’s mouseMoveCallback will constantly call our function and thus create new knots at distance of 10 units...

Picking Points in the Viewports

)

undo "Free Spline" on

(

We will put the complete code in an undo context to be able to undo the whole drawing result.

undo

new_spline = splineShape ()

When starting the script, we first construct an empty splineShape object.

SplineShape : Shape

old_pen_pos = pickpoint ()

Then we go into pickPoint mode (but this time without a mouse callback). The function will wait for a click in the viewport and return the position of the picked point, or #RightClick if the Right Mouse Button has been pressed.

Picking Points in the Viewports

if old_pen_pos == #RightClick then

(

delete new_spline

)

If the Right Mouse Button has been actually pressed, we just delete the newly created splineShape and finish the script.

If Expression

else

(

select new_spline

If the pickButton has returned a position value and not #RightClick, we can select the splineShape...

new_spline.pos = old_pen_pos

Set the position of the splineShape to the clicked point...

addNewSpline new_spline

...add a new spline to the empty splineShape...

SplineShape : Shape

addKnot new_spline 1 #smooth #curve old_pen_pos

addKnot new_spline 1 #smooth #curve old_pen_pos

...and add two new knots to the newly create spline in the splineShape. As mentioned above, a spline should have at least two knots, so we create the first two with the same position and will then move the second knot instead of creating a new one.

SplineShape : Shape

second_knot_set = false

We "lower the flag" by setting it to false. This way, the script will know that we just created the first two knots and the second one has to be set to the next mouse position captured by the script. When this is done in the get_mouse_pos function, we will "raise the flag" again by setting it to true and thus know that the initial spline creation steps are over...

draw_new_line old_pen_pos

Now we can call our draw_new_line function and pass the first clicked point as parameter. That function will start monitoring the mouse movements until a new click occurs.

Defining Custom Functions

q = querybox "Close Spline?" title:"Free Spline"

If a new click has been captured by the pickPoint function, the draw_new_line function will return to this point. Now we can ask the user whether he wants to close the newly drawn spline.

MAXScript Message and Query Dialogs

if q then

(

close new_spline 1

updateshape new_spline

If the answer to the query is Yes, we close the first and only spline in the splineShape and update the internal data structures to reflect the changes.

If Expression

SplineShape : Shape

)

select new_spline

Finally, we select the newly-created splineShape in the scene before exiting.

)--end else

)--end undo

)--end script

Using the Script

Evaluate the script. To use it, you can use Customize... to drag the script from the category "HowTo" to a toolbar, a menu, a quad menu or to assign to a keyboard shortcut.

Execute the FreeSpline script and left-click in the top or perspective viewport. Drag the mouse freely to draw a spline. Left-click again to finish drawing. Answer the prompt with Yes to close or No to leave the spline open.

Where to go from here

This is just some basic code. You could try to add a UI with controls for segment length threshold, spline segment and knot types (linear, smooth, bezier etc.)

Back to

"How To" Tutorials Index Page


How To ... Enhance the Morpher Modifier With Floating Controls

How To > Enhance the Morpher Modifier With Floating Controls

The Morpher modifier in 3ds Max provides up to 100 morph channels, but only 10 of them are visible at a time and can be controlled only using a value spinner. Using MAXScript, we will add a very basic floating UI extension to the Morpher modifier representing and controlling the Morpher channels using progress bars.

The script will also demonstrate the dynamic creation of UI elements by a script and the usage of time and change callbacks to react to time and properties changes.

Related Topics:

Defining MacroScripts

Morpher : Modifier

Morpher_Channel_Access

Time Change Callback Mechanism

Change Handlers and When Constructs

NATURAL LANGUAGE

Package the code as macroScript to be able to use as a button, menu item or shortcut.

Make sure an object with a morpher modifier is selected

Get the morpher modifier and collect the used channels

Build a string describing a dialog with controls for each used channel.

Create a function to update all controls’ values

Register a callback to call the update function when scene time changes

Register a callback to call the update function when a parameter of the morpher changes

MAXSCRIPT

macroscript MorpherFloater category:"HowTo"

(

global mf_float, mf_morpher_mod

on isEnabled return

 selection.count == 1 and (try($.morpher)catch(undefined)) != undefined

on execute do

(

 mf_morpher_mod = $.modifiers[#morpher]

 used_channels = #()

 txt ="rollout mf_main \"Morpher Floater\" (\n"

 for i = 1 to 100 do

 (

  if WM3_MC_HasData mf_morpher_mod i then

  (

   append used_channels i

   txt +="progressbar mf_slider_"+ i as string

   txt +=" value:"+ (WM3_MC_GetValue mf_morpher_mod i) as string

   txt +=" width:150 height:18 across:2 align:#left\n"

   txt +="edittext mf_label_"+i as string

   txt +=" align:#right text:\""+i as string+": "

   txt +=(WM3_MC_GetName mf_morpher_mod i) +"\"\n"

   txt +="on mf_slider_"+i as string+" clicked val do (\n"

   txt +="WM3_MC_SetValue mf_morpher_mod "

   txt += i as string+" (val as float) \n"

   txt +="SliderTime +=0)\n"

  )

 )--end i loop

txt +=")\n"

createDialog (execute txt) 340 (used_channels.count*24)

txt ="fn mf_update_slider = (\n"

for i in used_channels do

(

 txt +="mf_main.mf_slider_"+i as string

 txt +=".value = WM3_MC_GetValue mf_morpher_mod "+i as string+" \n"

)--end i loop

txt +=")\n"

global mf_update_slider = execute txt

registertimecallback mf_update_slider

deleteAllChangeHandlers id:#morpher_floater

when parameters mf_morpher_mod changes \

 HandleAt:#RedrawViews \

 id:#morpher_floater do mf_update_slider()

)--end if

)--end script

Step-By-Step

macroscript MorpherFloater category:"HowTo"

(

The macroScript will be called MorpherFloater. To use the script, you can go to Customize... and drag the script from the category "HowTo" to a toolbar, a menu, a quad menu or assign to a keyboard shortcut.

Defining Macro Scripts

global mf_float, mf_morpher_mod

We will need a couple of global variables to store the rollout used to display the Morpher controls, and the currently selected Morpher modifier to control.

Scope of Variables

on isEnabled return

selection.count == 1 and (try($.morpher)catch(undefined)) != undefined

The script will become active only when a single objects is selected in the scene and it has a Morpher modifier on its stack.

The isEnabled handler evaluates the expression after the return statement and enables the script’s button, menu item or shortcut when the expression yields true. Otherwise, the script is disabled.

In the first statement, we compare the number of selected objects in the scene with 1. If there is only one selected object, this expression returns true.

Then we also ask whether the selection has a Morpher modifier applied. We do this inside a try()catch() context – if there is a Morpher modifier, it will be returned as the result of this expression. If there is no Morpher, an error would normally occur. We catch this error and return undefined instead. The result is then checked whether it is NOT undefined. This gives us the result of true when a Morpher was encountered, and false when not.

Only when the first AND the second part of the test return true will the isEnabled handler also return true and activate the script!

Macroscript_Body_Event_Handlers

on execute do

(

The execute handler contains the body of the script and is executed whenever the user clicks the button, selects the menu item or presses the keyboard shortcut the script is assigned to. This can only happen when isEnabed has returned true!

Macroscript_Body_Event_Handlers

mf_morpher_mod = $.morpher

First we store the Morpher modifier in the global variable defined at the beginning. We have made sure that there is only one selected object, so we use $ instead of selection[1]. Also, we don’t need error catching anymore as we already know there is a Morpher modifier in the selected object thanks to the isEnabled check...

used_channels = #()

We will need a user-defined array to store the indices of used channels in the Morpher.

Array Values

txt ="rollout mf_main \"Morpher Floater\" (\n"

Here we start a quite strange operation – we are going to build a whole new rollout dynamically by first putting all necessary definitions in a long string variable and the executing as if it were a regular script file. Note that we will need a backslash \ everywhere quotation marks appear inside of the string! Also, we will have to denote each new line using the \n sequence.

String Values

Rollout Clauses

for i = 1 to 100 do

(

A Morpher modifier can have up to 100 channels. Using a for loop, we will go through all of them. The variable i will count from 1 to 100 representing the current morph target channel.

For Loop

if WM3_MC_HasData mf_morpher_mod i then

(

In 3ds Max 5, a few functions for accessing morpher channels have been implemented. By calling the WM3_MC_HasData function and passing the morpher and the channel index to it, we can check whether a channel has morpher data or not. If it does, we go on inside the if statement’s context, if not, we just skip this channel...

If Expression

Morpher_Channel_Access

append used_channels i

We append the channel index stored in the for loop’s variable i to the array of used channels. When we are ready with the for loop, the array will contain all used channels!

Array Values

txt +="progressbar mf_slider_"+ i as string

txt +=" value:"+ (WM3_MC_GetValue mf_morpher_mod i) as string

txt +=" width:150 height:18 across:2 align:#left\n"

Now we describe the creation of a new progressbar UI element inside the rollout string. Note that we ADD the new partial strings to the current string using +=. We append the channel number as string to get unique names for all UI elements. We set the current value of the progressbar to the current value of the Morpher modifier’s channel. Using the across:2 keyword, we tell the UI to place two UI elements in the same row (we will add a text label with the name of the morph target later)

ProgressBar

txt +="on mf_slider_"+i as string+" clicked val do (\n"

txt +="WM3_MC_SetValue mf_morpher_mod "

txt += i as string+" (val as float) \n"

txt +="SliderTime +=0)\n"

A progressbar UI element is normally used to display the progress of processes, but it can also be used in place of a slider because it provides a change handler that can return the value changed with the mouse. The on ... clicked val do... handler is executed each time the user clicks with the mouse on the progressbar. The variable var will contain the current value between 0 and 100. We will assign it as a floating point number between 0.0 and 100.0 to the respective channel with index i.

SliderTime += 0 is a small trick to fool the time callback we will define a bit later. It does not actually change the slider time as we add zero, but it causes the system to evaluate the change and execute the time callback.

Time Control

txt +="edittext mf_label_"+i as string

txt +=" align:#right text:\""+i as string+": "

txt +=(WM3_MC_GetName mf_morpher_mod i) +"\"\n"

We also describe the creation of an edit text UI element. Its text will contain the channel index as string and the name of the i-th morpher channel. This label will appear in the same line as the progressbar and will be aligned to the right.

Edittext

)--end if

)--end i loop

txt +=")\n"

At this point, the i loop is over. It has added controls for all non-empty morpher channels to the string describing the UI. We just have to add the rollout’s closing bracket.

createDialog (execute txt) 340 (used_channels.count*24)

Now we create a dialog using the string we just put together as the source of the new rollout. The execute function evaluates the string just like any external source code file. The result of the evaluation is a rollout as you would type in using a Script Editor. The dialog will be 340 pixels wide and 24 times the total number of collected channels / number of controls in the rollout. This means that the UI will change its height if there are more or less morpher channels in the modifier every time the script is started again.

CreateDialog

String Values

txt ="fn mf_update_slider = (\n"

Once again, we start a new string defining the function to be called each time the morpher has changed.

Defining Custom Functions

for i in used_channels do

(

We will need to update every single slider corresponding to a used morpher channel. The variable i will contain the index of the respective channel in each loop repetition.

For Loop

txt +="mf_main.mf_slider_"+i as string

txt +=".value = WM3_MC_GetValue mf_morpher_mod "+i as string+" \n"

Here we tell the progressbar of channel i in the globally defined rollout mf_main to change its value to the value of the i-th channel in the Morpher modifier stored in the global variable mf_morpher_mod.

Morpher_Channel_Access

)--end i loop

txt +=")\n"

At the end, we close the function’s bracket.

global mf_update_slider = execute txt

Then we execute the function’s definition text which gives us an evaluated function we can use in our callbacks. We store it in a global variable to make it accessible to all the callbacks we intend to define...

Scope of Variables

String Values

registertimecallback mf_update_slider

The first callback reacts to time changes. Every time the scene time changes (by moving the time slider with the mouse, playing the animation etc.), the time callback will call the supplied function, in our case the UI update function we just defined! Remember the SliderTime += 0 part some paragraphs higher? It causes this callback to be called, too.

The result of this callback is that if you animate the morpher channel values and then play the animation, the progress bars will update dynamically in realtime WHILE the animation is playing!

Time Change Callback Mechanism

deleteAllChangeHandlers id:#morpher_floater

Before registering our other callback, we first make sure any older callbacks registered by the same script have been removed from memory. Our callback has a unique ID called #morpher_floater (this name is user-defined and can be anything as long as it is unique). So we tell MAXScript to delete any existing callbacks with that ID.

Change Handlers and Callbacks

when parameters mf_morpher_mod changes \

HandleAt:#RedrawViews \

id:#morpher_floater do mf_update_slider()

And finally, we register a parameter change callback. The when construct defines a callback which is executed whenever a monitored property type of a specified set of objects (in our case any parameter of the Morpher modifier) has changed its value.

We tell the callback to update only when the viewports are being redrawn. This reduces the actual number of internal calls and speeds the script up without any noticeable drawbacks for the user.

We provide out unique ID to be able to delete the callback later.

The only thing the callback will do is call the update function. The effect is that when you change the value of a morpher channel, the floating UI we created will automatically reflect the changes!

Change Handlers and Callbacks

)--end if

)--end script

Using the Script

Evaluate the script. To use it, you can use Customize... to drag the script from the category "HowTo" to a toolbar, a menu, a quad menu or to assign to a keyboard shortcut.

Select a single object with a Morpher modifier and some active channels in the scene and execute the script. A new floating dialog should appear showing a progress bar and a text field displaying the channel number and the target name.

Where to go from here

This is a very simplified example. You could go on and expand the floater by adding things like additional spinners, buttons for selecting the single target objects in the scene (as long as they exist) etc. You could also change the progress bar elements and use regular sliders instead.

The above script will not detect changes in the used morpher channels (adding/deleting morph targets). Currently, the script would have to be restarted to reflect the changes. You could try to add handling for these cases, too.

Back to

"How To" Tutorials Index Page


How To ... Change Objects At Render Time

How To > Change Objects At Render Time

Using callback scripts, you can let MAXScript perform specific operations whenever certain system events occur. In the following example, we will increase the segment count of all spheres in the scene prior rendering, and decrease again after finishing. This will implement a kind of custom render resolution control for spheres. You can use similar approach to implement other pre-render preparations.

Related Topics:

Defining MacroScripts

General Event Callback Mechanism

NATURAL LANGUAGE

Package the code as macroScript to be able to use as a button, menu item or shortcut.

Remove any existing callbacks with our unique id.

Create a string containing the callback script for increasing the segment count of spheres.

In the script, loop through all geometry objects, check for sphere class of the base object and increase the segment count value 8 times.

Register a callback to be called before Rendering starts, give it a unique id.

Create a second string containing the callback script for decreasing the segment count of spheres.

In the script, loop through all geometry objects, check for sphere class of the base object and decrease the segment count value 8 times.

Register a callback to be called after Rendering finishes, give it the same unique id.

Create a second macroScript that removes our callbacks by id.

MAXSCRIPT

macroscript SphereSegsOn category:"HowTo"

(

callbacks.removescripts id:#sphere_segs

txt = "for o in geometry do(\n"

txt +="if classof o.baseObject == Sphere then \n"

txt +="o.baseObject.segments *= 8.0\n"

txt +=")\n"

callbacks.addscript #preRender txt id:#sphere_segs

txt = "for o in geometry do(\n"

txt +="if classof o.baseObject == Sphere then \n"

txt +="o.baseObject.segments /= 8.0\n"

txt +=")\n"

callbacks.addscript #postRender txt id:#sphere_segs

)

macroscript SphereSegsOff category:"HowTo"

(

callbacks.removescripts id:#sphere_segs

)

Step-By-Step

macroscript SphereSegsOn category:"HowTo"

(

The macroScript will be called SphereSegsOn. To use the script, you can go to Customize... and drag the script from the category "HowTo" to a toolbar, a menu, a quad menu or assign to a keyboard shortcut.

Defining Macro Scripts

callbacks.removescripts id:#sphere_segs

Before creating new callbacks, we try to remove any existing ones from a previous session. It is allowed to call callbacks.removescripts even if no callbacks with the specified id exist in the moment. If there are none, the call does nothing. If there are any, they will be removed.

We are going to use the same id #sphere_segs throughout the code. This way, we can affect only our callbacks without touching any others callbacks.

Callbacks.removeScripts

txt = "for o in geometry do(\n"

txt +="if classof o.baseObject == Sphere then \n"

txt +="o.baseObject.segments *= 8.0\n"

txt +=")\n"

In order to define a callback, we will need a string containing the code to be executed. We define a new user variable called txt and assign our code to it. The backslash n sequence denotes a new line. The script will loop through all geometry objects in the scene and ask each one for its base object (the object at the bottom of the modifier stack). If the class of the base object is Sphere, then we multiply the existing number of segments by 8. This means that the spheres will be changed even if there are modifiers like MeshSmooth, Bend etc. on the stack.

String Values

For Loop

Class and Object Inspector Functions

General Node Properties

Sphere : GeometryClass

callbacks.addscript #preRender txt id:#sphere_segs

Now we can assign the code as a callback script. . The keyword #preRender tells the callback that the script will be executed before rendering begins. The callback will have our unique id #sphere_segs so we can remove it by id anytime.

General Event Callback Mechanism

txt = "for o in geometry do(\n"

txt +="if classof o.baseObject == Sphere then \n"

txt +="o.baseObject.segments /= 8.0\n"

txt +=")\n"

This is basically the same code as before, but instead of multiplying, we divide the segments by 8. This should return all spheres to their original state.

callbacks.addscript #postRender txt id:#sphere_segs

We assign the new code as a callback script again. The keyword #postRender tells the callback that the script will be executed after the rendering finishes. The callback will have the same unique id.

)

macroscript SphereSegsOff category:"HowTo"

(

We define a second macroScript for turning off the effect of the callbacks. It will appear in the same category and will have the name SphereSegsOff

Defining Macro Scripts

callbacks.removescripts id:#sphere_segs

We remove any existing callbacks with our id. Rendering a scene with spheres should work as usual after calling this line.

Callbacks.removeScripts

)

Using the Script

Evaluate the code. To use the two scripts, you can use Customize... to drag the scripts from the category "HowTo" to a toolbar, a menu, a quad menu or to assign to a keyboard shortcut.

To use the script, create a scene with a couple of spheres and set their segments count quite low (as low as 4). Render the scene – all spheres should look exactly as they do in the viewports. (See first image). Then execute the SphereSegsOn script – nothing will change in the viewport, but if you render the scene again, all spheres will appear completely smooth. (see second image). Execute the SphereSegsOff script and the rendering should return to normal.

Back to

"How To" Tutorials Index Page


How To ... Develop a Vertex Renderer

How To > Develop a Vertex Renderer

The tutorial will demonstrate the basics of rendering - transforming objects from 3D space into 2D images. To make it simple and fast (realtime!), the script will draw only vertices. The image will be redrawn every time the viewport is updated - changing the view, panning, zooming and orbiting will be reflected by the vertex renderer instantly!

Related topics:

Accessing Active Viewport Info, Type, and Transforms

NATURAL LANGUAGE

Create a macroScript.

Define a flag variable to remember whether the renderer is enabled or disabled

Define local variables to hold the render size and the front and back buffer images

Define a function to be called when the viewport redraws.

In the function,

  • Copy the back buffer into the front buffer

  • Go through all geometry objects and get their mesh

  • Get every vertex of the mesh, transform into image coordinates using the current view transformation matrix

  • Draw a pixel for the vertex in the front buffer

  • When done, display the image

Return the flag from the on isChecked handler.

When executed,

  • Invert the flag

  • Redefine the render size variables and the bitmaps

  • Register the viewport redraw callback function if the flag is true, unregister if false.

SCRIPT:

macroScript VertexRender category:"HowTo"

(

local VertexRendererEnabled = false

local screen_width, screen_height, back_vfb, front_vfb

fn VertexRendererFunction =

(

st = timestamp()

copy back_vfb front_vfb

for o in geometry where classof o != TargetObject do

(

theMesh = snapshotAsMesh o

dot_color = #(o.wirecolor)

theVertCount = theMesh.numverts

for v = 1 to theVertCount do

(

thePos = (getVert theMesh v)* viewport.getTM()

screen_origin = mapScreenToView [0,0] (thePos.z) [screen_width,screen_height]

end_screen = mapScreenToView [screen_width,screen_height] (thePos.z) [screen_width,screen_height]

world_size = screen_origin-end_screen

x_aspect = screen_width/(abs world_size.x)

y_aspect = screen_height/(abs world_size.y)

screen_coords = point2 (x_aspect*(thePos.x-screen_origin.x)) (-(y_aspect*(thePos.y-screen_origin.y)))

setPixels front_vfb screen_coords dot_color

)--end v loop

)--end o loop

display front_vfb

et = timestamp()

pushPrompt ("VertRender " +(1000.0/(et-st)) as string + " fps")

)--end fn

on isChecked return VertexRendererEnabled

on execute do

(

VertexRendererEnabled = not VertexRendererEnabled

if VertexRendererEnabled then

(

screen_width=RenderWidth

screen_height=RenderHeight

back_vfb = bitmap screen_width screen_height

front_vfb = bitmap screen_width screen_height

registerRedrawViewsCallback VertexRendererFunction

RedrawViews()

)

else

(

unRegisterRedrawViewsCallback VertexRendererFunction

close front_vfb

)

)--end on execute

)--end script

Step-By-Step

macroScript VertexRender category:"HowTo"

(

We start by defining a MacroScript with the name VertexRender which will appear in the category "HowTo". This will be an advanced macroScripts which will have on execute do or on isChecked do event handlers.

local VertexRendererEnabled = false

We define a local variable to hold a flag determining whether the renderer is active or not. In the beginning, the variable will be set to false.

local screen_width, screen_height, back_vfb, front_vfb

We define a couple more local variables to hold the width and height of the image and the two bitmaps - the back buffer and the front buffer (see below for more info).

fn VertexRendererFunction =

(

This is the function that will be executed when the renderer is enabled and the viewport is being updated.

st = timestamp()

To be able to output info on the rendering speed, we will use the timestamp function to get the current system time.

copy back_vfb front_vfb

Then we will copy the back buffer into the front buffer, basically clearing the previous image. The back buffer could be changed to hold a background image, and the function would draw on top of it... For now, the back buffer image is set to black.

for o in geometry where classof o != TargetObject do

(

We loop through all scene geometry objects that are not target objects of lights, cameras etc. Note that we are not checking for hidden objects - you could add this to the code as an exercise! Right now, all objects will be drawn, even the hidden ones!

theMesh = snapshotAsMesh o

Then we snapshot the objects as mesh into memory. This includes all modifiers AND space warps applied to the object.

dot_color = #(o.wirecolor)

We define an array to be used for painting the vertices and use the wireframe color to draw.

theVertCount = theMesh.numverts

To speed things up, we read the number of vertices in the mesh once. We will use this value below to limit the vertex loop:

for v = 1 to theVertCount do

(

The v variable will count from 1 to the number of vertices.

thePos = (getVert theMesh v)* viewport.getTM()

The position of the v-th vertex has to be multiplied by the transformation matrix of the viewport. (If the viewport is a Camera, the viewport.getTM() returns the inverse of the camera's transformation matrix. If the viewport is a Perspective or Ortho view, the matrix is already inverted). By multiplying the vertex position by this matrix, we transform the 3D space coordinates into camera space!

screen_origin = mapScreenToView [0,0] (thePos.z) [screen_width,screen_height]

Now we need to know the size of the projection plane with pixel size equal to the rendering image when placed at the depth of the current vertex. To calculate this, we will need the two extemes (upper left and lower right) points of the plane as 3D points in camera space.

Since thePos is already in camera coordinates, the .Z coordinate is the Z-depth of the point! The return value of mapScreenToView is a 3D point in camera space corresponding to the upper left corner of the projection plane.

end_screen = mapScreenToView [screen_width,screen_height] (thePos.z) [screen_width,screen_height]

We do the same for the lower right corner of the projection plane.

Here is what we just did and why:

As you know, the camera has a cone (frustrum) with the top at the position of the camera. If the projection plane would "travel" along the Z axis of the camera, the farther it gets from the "eye", the larger it becomes in world units, but the number of pixels in the final image remains the same.

On the screenshot, you can see a camera and two projection planes (shown as red X). You can also see that the size of the projection plane is increasing as it gets farther from the camera.

The farther projection plane is exactly at the depth of the teapot's position in camera space.

The red sphere in the upper left corner of the projection plane corresponds to the screen_origin coordinate calculated above. To create the image, the screen_origin value was calculated, then the MAXScript line of code

sphere pos:(screen_origin*$Camera01.transform)

was called to create a sphere in world coordinates representing that point. (screen_origin was originally in camera space, multiplying it by the camera's transformation matrix transforms it back into world coordinates!)

Same with the blue sphere - it represents the end_screen coordinate.

Here is what the camera sees when rendering the view - notice the red and blue spheres appearing exactly where expected:

world_size = screen_origin-end_screen

Now we know the two extemes of the projection plane and can calculate the width and height of the projection plane in world units. We also know the size of the plane in pixels, so we can determine the relationship between pixels and world units!

x_aspect = screen_width/(abs world_size.x)

y_aspect = screen_height/(abs world_size.y)

Using the size of the plane, we can calculate the aspect values - basically the number of pixels corresponding to one world unit along X and Y.

screen_coords = point2 (x_aspect*(thePos.x- screen_origin.x)) (-(y_aspect*(thePos.y-screen_origin.y)))

Using the aspect values, we can convert the X and Y values of the vertex position into actual pixel positions. Note that the Y coordinate is inverted, and the X position has to be offset by the screen_origin because the camera axis (the center of the image) is located at coordinates [0,0], while the actual origin of the image in MAXScript is in the upper left corner...

setPixels front_vfb screen_coords dot_color

Now we can draw a pixel in the front buffer at the location of the current vertex using the color array defined above using the wireframe color.

)--end v loop

)--end o loop

display front_vfb

When all vertices of all objects have been processed, we can update the display.

et = timestamp()

Then we can stop the time again to see how long it took to draw once.

pushPrompt ("VertRender " +(1000.0/(et-st)) as string + " fps")

The result will be output to the status bar.

)--end fn

on isChecked return VertexRendererEnabled

When the macroScript is placed on a toolbar, menu or QuadMenu, its checked status will be determined by the boolean value stored in the local variable we defined in the beginning...

on execute do

(

When the user presses the button / selects the menu item...

VertexRendererEnabled = not VertexRendererEnabled

...we flip the state of the variable - if it was true it becomes false and vice-versa.

if VertexRendererEnabled then

(

If the script was just enabled, then

screen_width=RenderWidth

screen_height=RenderHeight

we read the current size values of the Render Scene dialog. You could replace these values with your fixed values, for example 320 and 240 to have a fixed size regardless of the renderer settings...

back_vfb = bitmap screen_width screen_height

front_vfb = bitmap screen_width screen_height

Then we use these size values to define two bitmaps. The first is the back buffer used to clear the image before drawing. Once again, you could use an openBitmap call here to load a background image from disk to draw on top of it!

registerRedrawViewsCallback VertexRendererFunction

Here we register the function we defined above as a viewport redraw callback. Each time the 3ds Max viewport is redrawn, the function will be called and update the rendered image!

VertexRendererFunction()

To initialize the display, we call the function once.

)

else

(

unRegisterRedrawViewsCallback VertexRendererFunction

If the renderer was already open, it has to close now. We unregister the callback function to avoid further updates,

close front_vfb

and close the image to undisplay it.

)

)--end on execute

)--end script

See also

"How To" Tutorials Index Page


How To ... Output Geometry Data To Text File - Part One

How To > Read and Write Geometry Data > Output Geometry Data To Text File - Part One

This is a very basic example of exporting mesh geometry data to an external text file. The file could be then parsed back by MAXScript or any other 3D application supporting scripting and reading of ASCII files. In Part One, we will export only the vertex and face list to a fixed path name. In Part Two, we will enhance the code to let the user select a destination file, and will support several other mesh features (edge visibility, smoothing groups, texture coordinates etc.)

In a separate tutorial, we will develop a script to import back the geometry data and recreate the mesh in the scene.

Related Topics:

Editable_Mesh : GeometryClass and TriMesh : Value

FileStream Values

NATURAL LANGUAGE

Get a snapshot of the first selected object.

Define an output file name.

Create a new file using the file name.

Get the number of vertices and faces in the mesh.

Output the vertex and face count to the file.

Step through all vertices .

Read the position into a variable.

Write out the vertex position to the file.

Step through all faces.

Read the face definition into a variable.

Write out the face definition to the file.

Close the file.

Open the file to take a look at the result.

MAXSCRIPT

tmesh = snapshotAsMesh selection[1]

out_name = ((GetDir #export)+"/testmesh.dat")

out_file = createfile out_name

num_verts = tmesh.numverts

num_faces = tmesh.numfaces

format "%,%\n" num_verts num_faces to:out_file

for v = 1 to num_verts do

(

 vert = getVert tmesh v

 format "%," vert to:out_file

)

format "\n" to:out_file

for f = 1 to num_faces do

(

 face = getFace tmesh f

 format "%," face to:out_file

)

close out_file

delete tmesh

edit out_name

Step-By-Step

tmesh = snapshotAsMesh selection[1]

We create a TriMesh snapshot of the first object found in the scene selection. This method evaluates the state on top of the modifier stack including any Space Warp bindings. The result is a TriMesh value which is stored in memory (does not exist in the scene). We will be able to access all its vertices and faces as if it was a scene object though.

Note that we still don’t check whether the user has selected an object in the scene and whether the first selected object is of geometry class. This is just a rough sketch of the final code and isn’t completely idiot-proof. The user has to make sure a valid object is selected. We will add such tests in Part Two of the tutorial.

snapshotAsMesh

out_name = ((GetDir #export)+"/testmesh.dat")

Next we define a variable containing the destination path for exporting. We use the GetDir function with the keyword #export to get the 3ds Max system path set up for export operations. We add to it the file name testmesh.dat. This name can be any valid name you might want to use. In Part Two, we will let the user select a path and name using an open file dialog.

3ds Max System Directories

out_file = createfile out_name

Using the defined output path, we create a new file and store the resulting fileStream value in a user variable called out_file. Using this variable as the destination, we will be able to output to the file.

FileStream Values

num_verts = tmesh.numverts

num_faces = tmesh.numfaces

The TriMesh value we created has the properties .numverts and .numfaces just like every mesh object in the scene. We get both values and store in user variables because we are going to need them multiple times.

Editable_Mesh : GeometryClass and TriMesh : Value

format "%,%\n" num_verts num_faces to:out_file

Now we can output to the file for the first time – we define a formatting pattern specifying that there will be two user elements written out, divided by a comma. The line will end with a new line control character specified by backslash-n. After the formatting string, we have to provide as many output expressions as % symbols in the formatting string – each of the variables we supply will be evaluated and the result will replace the % character.

If the numbers of vertices and faces are 8 and 12 respectively (a typical Box), the result of the output will be

8,12

At the end of the format function we provide a to: destination. If we don’t do this, the output will go by default to the MAXScript Listener.

FileStream Values

for v = 1 to num_verts do

(

The next step would be to output all vertices of the mesh. We will step through all vertices by using a for loop starting with 1 and ending with the number of vertices in the TriMesh. The variable v will change its value from 1 to num_verts each time the loop is repeated. It will end when the num_verts value is exceeded.

For Loop

vert = getVert tmesh v

Using the value currently stored in the loop’s v variable, we get the respective indexed vertex by calling the getVert method on the tmesh value. The result will be stored in a user variable and will be a Point3 value (3D Position value) representing the world position of the vertex.

Editable_Mesh : GeometryClass and TriMesh : Value

format "%," vert to:out_file

The vertex position has to be written out to the file. We specify a formatting string telling the format function to output the value of the vert variable followed by a comma. We don’t want a new line – all vertex positions will appear in a single line, divided by commas.

)

At this place, the v loop ends and returns to the for v... statement unless the v variable has reached the num_verts value. This means that the block enclosed in the brackets will be repeated num_verts times.

format "\n" to:out_file

To separate the vertex list from the face list, we output a single New Line character to the file. The formatting string expects no user expressions as we don’t include any % placeholders.

for f = 1 to num_faces do

(

The output of the face list is very similar to the vertex list code We just use the other variable...

face = getFace tmesh f

...and get the face definition instead of the vertex position. A face definition is also a Point3 value, but it contains indices to the 3 vertices defining the face instead of a position. The numbers stored in the Point3 value will be thus integers between 1 and num_verts. We store the result in a user variable called face...

format "%," face to:out_file

...and output it to the file just like we did with the vertex.

)

At this place, the f loop ends and returns to the for f... statement unless the f variable has reached the num_faces value. This means that the block enclosed in the brackets will be repeated num_faces times.

close out_file

Finally, we close the file so we can open it for reading. If we don’t do this, the file will be marked as open by the Windows OS and MAXScript will be unable to read from it.

delete tmesh

Delete the TriMesh value to release the used memory for garbage collection. Otherwise, running the script multiple times can cause memory leaks.

edit out_name

To make sure the output looks like expected, we open the file name defined in the beginning of the script in a MAXScript editor.

For a simple cube at the world origin, the output should look like

Sample Output of a Cube

8,12

[-50,-50,0],[50,-50,0],[-50,50,0],[50,50,0],[-50,-50,100],[50,-50,100],[-50,50,100],[50,50,100],

[1,3,4],[4,2,1],[5,6,8],[8,7,5],[1,2,6],[6,5,1],[2,4,8],[8,6,2],[4,3,7],[7,8,4],[3,1,5],[5,7,3],

Using the Script

To test the script, create a geometry object, select it in the scene, then select File>Evaluate from the MAXScript Editor’s menu or alternatively, press Ctrl+E. The resulting output file should open in a new MAXScript editor.

Optimizing the code

As already mentioned, this is the basic code for geometry output. Still it can be made even more compact. Below is a shorter version of the same code without the opening in Editor for preview. Please compare the two scripts and see why both of them do the same thing although expressed slightly differently.

tmesh = snapshotAsMesh selection[1]

out_file = createfile ((GetDir #export)+"/testmesh.dat")

format "%,%\n" tmesh.numverts tmesh.numfaces to:out_file

for v = 1 to tmesh.numverts do

format "%," (getVert tmesh v) to:out_file

format "\n" to:out_file

for f = 1 to tmesh.numfaces do

format "%," (getFace tmesh f) to:out_file

close out_file

Where to go from here

Now that we have some output, we can go on and write a corresponding input script to read back the data and create a new scene object.

How To ... Read Geometry Data From Text File - Part One

Also, in Part Two of the Geometry Output tutorial, we will make the code more robust and add some more features.

Back to

"How To" Tutorials Index Page

Next

How To ... Read Geometry Data From Text File - Part One

How To ... Output Geometry Data To Text File - Part Two

How To ... Read Geometry Data From Text File - Part Two


How To ... Read Geometry Data From Text File - Part One

How To > Read and Write Geometry Data > Read Geometry Data From Text File - Part One

This is a very basic example of importing mesh geometry data from an external text file created in the Output Geometry Data – Part One tutorial. The file contains only vertex and face lists.

Related Topics:

FileStream Values

Editable_Mesh : GeometryClass and TriMesh : Value

NATURAL LANGUAGE

Create two empty arrays to hold the vertex and face lists.

Define an input file name.

Open the file for reading.

In the file exists, read the vertex and face number values from the file.

Step through all vertex values and read them into a variable, then append the value of the variable to the vertex array.

Step through all face values and read them into a variable, then append the value of the variable to the vertex array.

Close the file.

Create a new mesh using the vertex and face arrays.

MAXSCRIPT

vert_array = #()

face_array = #()

in_name = ((GetDir #export)+"/testmesh.dat")

in_file = openFile in_name

if in_file != undefined then

(

 num_verts = readValue in_file

 num_faces = readValue in_file

 vert_array.count = num_verts

 face_array.count = num_faces

 for v = 1 to num_verts do

 (

  vert = readValue in_file

  vert_array[v] = vert

 )

 for f = 1 to num_faces do

 (

  face = readValue in_file

  face_array[f] = face

 )

 close in_file

 new_mesh = mesh vertices:vert_array faces:face_array

)

Step-By-Step

vert_array = #()

face_array = #()

In the beginning, we define two emptry arrays to collect the vertex and face data into.

Array Values

in_name = ((GetDir #export)+"/testmesh.dat")

Then we define the imput file name just like in the Output Geometry – Part One tutorial. This is currently a hard-coded name in both the output and input script. We will let the user pick a file from an open file dialog in Part Two of this tutorial.

in_file = openFile in_name

Using the file name, we try to open the file for input. If the specified path exists, a fileStream value will be stored in the in_file variable. If the path does not exist, the value undefined will be stored instead.

FileStream Values

if in_file != undefined then

(

Knowing the above, we check to see if the file is valid or not. If the value isn’t undefined, the file has been opened successfully. If not, all of the next lines enclosed in the brackets will be ignored.

If Expression

Undefined Value

num_verts = readValue in_file

The file will contain the number of vertices and faces separated by a comma in the first line. Using the readValue method, we read the first value from the file. The value will be stored in the num_verts variable.

FileStream Values

num_faces = readValue in_file

Using the same readValue method, we read the next value from the file. The value will be stored in the num_faces variable.

vert_array.count = num_verts

face_array.count = num_faces

Now that we know the number of vertices and faces stored in the file, we initialize both arrays to those numbers. This will reserve enough memory for both arrays.

for v = 1 to num_verts do

(

Then we can read the vertex positions. We start a new loop that will change the variable v from 1 to the number of vertices stored in the file.

For Loop

vert = readValue in_file

Using the readValue method, we read Point3 values from the file. We store them in a user variable vert...

vert_array[v] = vert

...and then assign the value to the v-th position of the vert_array array.

)

At this point, we have all vertex positions read and put into the array.

for f = 1 to num_faces do

(

Using the num_faces variable, we can also read as many face definitions. We start another loop that will change the variable f from 1 to the number of faces stored in the file.

face = readValue in_file

Using the readValue method, we read Point3 values from the file specifying the vertex indices defining the face. We store them in a user variable face...

face_array[f] = face

...and then assign the value to the f-th position of the face_array array.

)

At this point, we have all face definitions read and put into the array.

close in_file

We can close the file...

new_mesh = mesh vertices:vert_array faces:face_array

...and finally construct a new mesh by providing the vertex and face arrays collected from the file.

Editable_Mesh : GeometryClass and TriMesh : Value

)

Using the Script

To test the script, use the Output script first to create a file. Then open this script, select File>Evaluate from the MAXScript Editor’s menu or alternatively, press Ctrl+E. The object exported to the file by the other script should appear in the scene. Note that it will have to correct position, but its pivot point will be at the world origin as we did not export local coordinates and object transformations.

Optimizing the code

As already mentioned, this is the basic code for geometry input. Still it can be made even more compact. Below is a shorter version of the same code. Please compare the two scripts and see why both of them do the same thing although expressed slightly differently.

MAXSCRIPT

vert_array = #()

face_array = #()

in_file = openFile ((GetDir #export)+"/testmesh.dat")

if in_file != undefined then

(

 num_verts = readValue in_file

 num_faces = readValue in_file

 vert_array.count = num_verts

 face_array.count = num_faces

 for v = 1 to num_verts do vert_array[v] = (readValue in_file)

 for f = 1 to num_faces do face_array[f] = (readValue in_file)

 close in_file

 new_mesh = mesh vertices:vert_array faces:face_array

)

Where to go from here

In Part Two of the Geometry Input tutorial, we will make the code more robust and add some more features to reflect the changes made to the Geometry Output Part Two tutorial.

Back to

"How To" Tutorials Index Page

How To ... Output Geometry Data To Text File - Part One

Next

How To ... Output Geometry Data To Text File - Part Two

How To ... Read Geometry Data From Text File - Part Two


How To ... Output Geometry Data To Text File - Part Two

How To > Read and Write Geometry Data > Output Geometry Data To Text File - Part Two

This is the second part of the Output Geometry Data tutorial. We will enhance the script developed in Part One to support smoothing groups, material ids and edge visibility.

Related Topics:

Defining MacroScripts

Picking Scene Nodes By Hit

NATURAL LANGUAGE

Load the script from Part One.

Create a filter function for geometry objects.

Let the user pick a scene object and apply the filter function.

If the user picked a valid object, get a save file dialog and ask for a target name.

If the file name is valid, export the vertices.

In the face export code, collect the smoothing groups values, material ids and edge visibility.

Output the collected values as a single line.

Close the file.

Open for review.

MAXSCRIPT

macroScript ExportMesh category:"HowTo"

(

fn GetGeometry o = (

 Superclassof o == Geometryclass and classof o != TargetObject )

obj = pickobject filter:GetGeometry

if isValidNode obj then

(

 tmesh = snapshotAsMesh obj

 out_name = GetSaveFileName()

 if out_name != undefined then

 (

  out_file = createfile out_name

  num_verts = tmesh.numverts

  num_faces = tmesh.numfaces

  format "%,%\n" num_verts num_faces to:out_file

  for v = 1 to num_verts do

   format "%," (getVert tmesh v) to:out_file

  format "\n" to:out_file

  for f = 1 to num_faces do

  (

   face = getFace tmesh f

   sgroup = getFaceSmoothGroup tmesh f

   matid = getFaceMatId tmesh f

   edge1 = getEdgeVis tmesh f 1

   edge2 = getEdgeVis tmesh f 2

   edge3 = getEdgeVis tmesh f 3

   format "%,%,%,%,%,%\n" face sgroup matid edge1 edge2 edge3 to:out_file

  )

  close out_file

  edit out_name

 )--end if

)--end if

)--end macroscript

Step-By-Step

MacroScript ExportMesh category:"HowTo"

(

We define a macroScript which will be called ExportMesh. To use the script, you can go to Customize... and drag the script from the category "HowTo" to a toolbar, a menu, a quad menu or assign to a keyboard shortcut.

Defining Macro Scripts

fn GetGeometry o = (

Superclassof o == Geometryclass and classof o != TargetObject )

We will need a filter function to allow the picking of only specific object types. In this case, the function will return true only when the superclass of the object passed as parameter is GeometryClass and the class of the passed object is not TargetObject (TargetObject is the only Geometry object without a mesh).

Defining Custom Functions

obj = pickobject filter:GetGeometry

Now we can let the user pick a scene object and apply the filter to all objects below the mouse pointer. As you will note, the mouse pointer will allow scene objects to be picked only when their class matches the classed defined in the filter function.

Picking Scene Nodes By Hit

if isValidNode obj then

(

If the user picked a valid object (in other words he didn’t right-click to cancel or didn’t pressed Escape), we will execute the rest of the script. Otherwise, we will skip the following lines.

isValidNode

tmesh = snapshotAsMesh obj

This is the same as the Part One code. We get the mesh from the picked object.

out_name = GetSaveFileName()

Instead of providing a hard-coded path, we let the user type in any file name.

Standard Open and Save File Dialogs

if out_name != undefined then

(

If the user specified a valid name (in other words he didn’t press Cancel), we continue with the execution.

out_file = createfile out_name

num_verts = tmesh.numverts

num_faces = tmesh.numfaces

format "%,%\n" num_verts num_faces to:out_file

Just like in Part One, we create a new file and output the vertex and face count

for v = 1 to num_verts do

format "%," (getVert tmesh v) to:out_file

format "\n" to:out_file

Then we export the vertices just like in the compact version of the Part One script.

for f = 1 to num_faces do

(

In the face loop, we will export some more data this time. Each face has a smoothing group value, a material id value, and 3 edge visibility values. We will export all of them in a single pass.

face = getFace tmesh f

First we get the face.

sgroup = getFaceSmoothGroup tmesh f

Then we get the smoothing group value from the same face...

matid = getFaceMatId tmesh f

...then the material id value...

edge1 = getEdgeVis tmesh f 1

edge2 = getEdgeVis tmesh f 2

edge3 = getEdgeVis tmesh f 3

...and the edge visibility for each of the 3 face edges.

Editable_Mesh : GeometryClass and TriMesh : Value

format "%,%,%,%,%,%\n" face sgroup matid edge1 edge2 edge3 to:out_file

Now that we have all the values, we output all of them in a single line. We add a new line character to the end of the line – this will give us a single line for each face.

FileStream Values

)

close out_file

When the face loop is ready, we close the output file...

edit out_name

and open the new file to check the result.

)--end if

)--end if

)--end macroscript

Using the Script

To test the script, select File>Evaluate from the MAXScript Editor’s menu or alternatively, press Ctrl+E. Then customize a toolbar and drag the script from the "HowTo" category. Press the button and pick a geometry object from the scene. You can pick any geometry object like Patch, NURBS, procedural object etc.

SAMPLE OUTPUT OF A CUBE:

8,12

[-50,-50,0],[50,-50,0],[-50,50,0],[50,50,0],[-50,-50,100],[50,-50,100],[-50,50,100],[50,50,100],

[1,3,4],2,2,true,true,false

[4,2,1],2,2,true,true,false

[5,6,8],4,1,true,true,false

[8,7,5],4,1,true,true,false

[1,2,6],8,5,true,true,false

[6,5,1],8,5,true,true,false

[2,4,8],16,4,true,true,false

[8,6,2],16,4,true,true,false

[4,3,7],32,6,true,true,false

[7,8,4],32,6,true,true,false

[3,1,5],64,3,true,true,false

[5,7,3],64,3,true,true,false

Where to go from here

Now that we have the enhanced output, we can go on and enhance the corresponding input script to read back the new data format and create a new scene object with all the face properties.

In a later step, you could try to extend the script yourself by adding, for example, texture coordinates support.

Back to

"How To" Tutorials Index Page

How To ... Read Geometry Data From Text File - Part One

How To ... Output Geometry Data To Text File - Part One

Next

How To ... Read Geometry Data From Text File - Part Two


How To ... Read Geometry Data From Text File - Part Two

How To > Read and Write Geometry Data > Read Geometry Data From Text File - Part Two

This is Part Two of the Geometry Import tutorial. It will be able to read the extended data written by the output script developed in How To ... Output Geometry Data To Text File - Part Two

NATURAL LANGUAGE

Package as macroScript to let the user place the script on a toolbar, QuadMenu, keyboard shortcut or Menu.

Create 3 more arrays to store smoothing groups, material ids and edge visibility

Let the user select a file to open.

If the user selected a valid file name, go on with the script

After reading the vertices and faces as in Part One,

Read also the smoothing groups, material ids and edge visibility.

Close the file.

Create a new mesh out of the collected vertices and faces.

Apply the smoothing groups, material ids and edge visibility values to all faces.

Update the mesh to reflect the changes.

MAXSCRIPT

macroScript ImportMesh category:"HowTo"

(

 vert_array = #()

 face_array = #()

 sgroup_array = #()

 matid_array = #()

 edge_array = #()

 in_name = getOpenFileName()

 if in_name != undefined then

 (

  in_file = openFile in_name

  if in_file != undefined then

  (

   num_verts = readValue in_file

   num_faces = readValue in_file

   for v = 1 to num_verts do

    append vert_array (readValue in_file)

   for f = 1 to num_faces do

   (

    append face_array (readValue in_file)

    append sgroup_array (readValue in_file)

    append matid_array (readValue in_file)

    edge1 = readValue in_file

    edge2 = readValue in_file

    edge3 = readValue in_file

    append edge_array #(edge1, edge2, edge3)

   )

   close in_file

   new_mesh = mesh vertices:vert_array faces:face_array

   for f = 1 to num_faces do

   (

    setFaceSmoothGroup new_mesh f sgroup_array[f]

    setFaceMatID new_mesh f matid_array[f]

    setEdgeVis new_mesh f 1 edge_array[f][1]

    setEdgeVis new_mesh f 2 edge_array[f][2]

    setEdgeVis new_mesh f 3 edge_array[f][3]

   )

   update new_mesh

  )--end if

 )--end if

)--end macroscript

Step-By-Step

macroScript ImportMesh category:"HowTo"

(

We define a macroScript which will be called ImportMesh. To use the script, you can go to Customize... and drag the script from the category "HowTo" to a toolbar, a menu, a quad menu or assign to a keyboard shortcut.

Defining Macro Scripts

vert_array = #()

face_array = #()

We define the arrays to hold the vertex and face arrays like in Part One...

sgroup_array = #()

matid_array = #()

edge_array = #()

...but we also define 3 more arrays to store smoothing groups, material ids and edge visibility.

Array Values

in_name = getOpenFileName()

Instead of reading a fixed name, we will let the user pick a file name.

Standard Open and Save File Dialogs

if in_name != undefined then

(

As long as the file name picked is not undefined (in other words the user did not press Cancel), we continue.

in_file = openFile in_name

if in_file != undefined then

(

num_verts = readValue in_file

num_faces = readValue in_file

for v = 1 to num_verts do

append vert_array (readValue in_file)

for f = 1 to num_faces do

(

append face_array (readValue in_file)

This part of the reading code is identical to Part One, but we also have to read the additional data:

append sgroup_array (readValue in_file)

append matid_array (readValue in_file)

We read the smoothing group value and the material id value from the file and append to the arrays.

edge1 = readValue in_file

edge2 = readValue in_file

edge3 = readValue in_file

Also, we read the 3 edge visibility values.

Editable_Mesh : GeometryClass and TriMesh : Value

append edge_array #(edge1, edge2, edge3)

In order to store the edge visibility for later application, we create a new array and append it to our edge array.

)

close in_file

new_mesh = mesh vertices:vert_array faces:face_array

At this point, we have the mesh just like in Part One. Now we have to apply the additional data to the resulting mesh.

for f = 1 to num_faces do

(

To do so, we start a new loop...

setFaceSmoothGroup new_mesh f sgroup_array[f]

Then we set the smoothing group of the f-th face of the new_mesh object to the value stored in the sgroup_array at the f-th position.

setFaceMatID new_mesh f matid_array[f]

We set the material id of the f-th face of the new_mesh object to the value stored in the matid_array at the f-th position.

setEdgeVis new_mesh f 1 edge_array[f][1]

setEdgeVis new_mesh f 2 edge_array[f][2]

setEdgeVis new_mesh f 3 edge_array[f][3]

And we set the edge visibility of each of the 3 edges in the f-th face of the new_mesh object to the values stored in the sub-array at f-th position in the edge_array

)

update new_mesh

Finally, we have to update the internal mesh caches to get the changes reflected in the scene. This is a very important step!

)

)

)

Using the Script

To test the script, use the Output script first to create a file. Then open this script, select File>Evaluate from the MAXScript Editor’s menu or alternatively, press Ctrl+E. The object exported to the file by the other script should appear in the scene. Note that it will have to correct position, but its pivot point will be at the world origin as we did not export local coordinates and object transformations.

Where to go from here

If you have managed to implement texture coordinates export in your Geometry Output script as suggested in the Part Two tutorial, you might also want to alter this script to read the additional data...

Back to

"How To" Tutorials Index Page

How To ... Output Geometry Data To Text File - Part Two

How To ... Read Geometry Data From Text File - Part One

How To ... Output Geometry Data To Text File - Part One


How To ... Transfer ParticleFlow Particle Motion To Scene Objects

How To > Script Particle Flow > Transfer ParticleFlow Particle Motion To Scene Objects

This simple tutorial provides the basics of moving scene objects using Particle Flow.
The objects can be anything from lights through helpers to mesh objects.

In this example, we will move a large number of Atmospheric Gizmos with a Fire Effect assigned to simulate a steaming Teapot.

NATURAL LANGUAGE - SETUP

Go to Create tab > Helpers > Atmospheric Apparatus > Sphere Gizmo.

Create a single object called SphereGizmo01 with any radius.

Shift-Move the object and enter 29 to create 30 copies of the Sphere Gizmo (NOT Instances!)

Create a Particle Flow with Birth operator generating particles from start to end frame at the rate of 20.0

Use Speed operator to accelerate the particles up. Use some variation to get a more random look.

Set the Display to Geometry

Add an AgeTest to kill the particles after 50 frames. Wire to a Delete operatator in a separate event.

Add a Force and some Wind if you want more motion.

To get the scene working completely, assign a Fire Effect in the Environment dialog and assign ALL 30 SphereGizmos to it.
Play with the color settings, density etc. to get the look you want.

Create a Teapot and place the Particle Flow at the spout to get the steam coming out of the right place!

SCRIPT OPERATOR CODE:

on ChannelsUsed pCont do

(

 pCont.useTM = true

 pCont.useAge = true

)

on Init pCont do

(

 global My_Atmospheric_Gizmos_01 = $SphereGizmo*

 My_Atmospheric_Gizmos_01.pos = [0,0,-100000]

)

on Proceed pCont do

(

 partcount = pCont.NumParticles()

 count = amin #(partcount,My_Atmospheric_Gizmos_01.count)

 for i in 1 to count do

 (

  pCont.particleIndex = i

  My_Atmospheric_Gizmos_01[i].transform = pCont.ParticleTM

  My_Atmospheric_Gizmos_01[i].radius = 10 + pCont.ParticleAge*2

 )

)

on Release pCont do ( )

RESULT:

Step-By-Step

on ChannelsUsed pCont do

(

The ChannelsUsed handler defines the channels to be used by the Script Operator - you cannot get or set particle related values from the particle container without specifying which properties you need access to. This way, Particle Flow does not have to provide the Script Operator with all possible channels (and there can be an arbitrary number of channels in Particle Flow) but only with those that are actually needed. This conserves memory!

The parameter pCont contains the Particle Container.

pCont.useTM = true

We want to copy the complete transformation of the particle to the scene object, so we will need access to that channel.

pCont.useAge = true

To get an even nicer effect, we will want to read the age of the particle and assign it to the gizmos' radius property to make them grow over time!

)

on Init pCont do

(

The Init handler is used to initialize the Script Operator.
The parameter pCont contains the Particle Container.

global My_Atmospheric_Gizmos_01 = $SphereGizmo*

We define a global variable which will contain an array of the scene objects to be driven by the particles.
In this case, we collect all SphereGizmos from the scene using their common base name.

My_Atmospheric_Gizmos_01.pos = [0,0,-100000]

To remove the gizmos from the scene in the first frames of the animation, we move them away from the camera field of view, in this case way down.

)

on Proceed pCont do

(

The Proceed handler is called every time the Script Operator is evaluated by Particle Flow. It contains the actual body of the script.
The parameter pCont contains the Particle Container which contains all particles the Operator is applied to.

partcount = pCont.NumParticles()

First we read the number of particles in the current Event. There can be 0 or millions of particles in the event.

count = amin #(partcount,My_Atmospheric_Gizmos_01.count)

Then we compare the number of particles to the number of collected gizmos.
The function amin returns the smallest value in the array.

THE SAME COULD BE EXPRESSED AS

if partcount < My_Atmospheric_Gizmos_01.count then

count = partcount

else

count = My_Atmospheric_Gizmos_01.count

but as you see, the first version is much shorter and looks cool, too! Also, it would work with more than two values if necessary, always picking the smallest value.

WHY DO WE NEED THIS?

Because we have a limited number of particles in the beginning of the animation, less than the number of gizmos. After a while, the number of particles will be higher than the available gizmos. In both cases, we want to build "pairs" of gizmo+particle, and some of the particles or gizmos might have no corresponding partner at certain parts of the animation. Knowing the lowest count of the two sets of objects gives us the number of possible pairs we can process!

for i in 1 to count do

(

Now we will repeat the following code as many times as there are possible particle+gizmo pairs in the scene...

pCont.particleIndex = i

In order to read data from a particle, we must make it the current one.
To do so, we assign the index i to the particleIndex property of the particleContainer of the current event.
After this, any particle-related queries or assignments will be performed on the i-th particle only!

My_Atmospheric_Gizmos_01[i].transform = pCont.ParticleTM

Now we can assign the transformation matrix of the current i-th particle to the i-th gizmo in the array.
Note that because of our smart amin test above, i is guaranteed smaller or equal to both the available particle and gizmo counts...

My_Atmospheric_Gizmos_01[i].radius = 10 + pCont.ParticleAge*2

Finally, we change the radius of the i-th gizmo to 10 units plus twice the age of the i-th particle.
10 is the minumum size of a gizmo (when particleAge is 0), at age of 10 the gizmo's radius will be 30 units etc.
You can play with different values to get different cloud behaviours.

)

)

on Release pCont do ( )

See Also

Particle Flow Sample Scripts

"How To" Tutorials Index Page


How To ... Affect Particle Flow Particles by Mass

How To > Affect Particle Flow Particles by Mass

Particle Flow allows the user to control the influence of certain Force-related Operators via MAXScript-generated particle channels. This is called Particle Wiring and is a rather hidden option in the Particle Flow User Interface.

The following tutorial shows how to calculate a mass value for each particle and control the influence of a Wind force to get a more realistic behavior where light particles are blown away while heavy ones stay almost unaffected.

NATURAL LANGUAGE - SETUP

Generate Particles on a surface without any speed or rotation, just position.

Add a Scale Operator to vary the size of the particles.

Add a Script Operator which will read the size of the particles generated by the Scale Operator.

Add a Force Operator

Create A Wind Space Warp, add to the Force Operator

Enable Script Wiring (see below)

Edit the script of the Script Operator to calculate the influence value for the Force Operator

NATURAL LANGUAGE - SCRIPT

Enable the Scale and Force channels

For each particle, get the Scale value (the size of the particle)

Calculate the influence value

Assign to the Force channel.

PARTICLE VIEW SETUP:

The Particle View setup features a Scale operator which defines variable sizes for the particles.

In order to get the Script Wiring, you have to do the following:

  • A: Add a Script Operator BEFORE the Force Operator to generate the Particle Float channel values needed to control the Force Influence.

  • B: Right-click the Force Operator and check the "Use Script Wiring" option.

  • C: This enables a new additional rollout in the Force Operator which lets you enable the Influence Control through the Float channel.

SCRIPT OPERATOR CODE:

on ChannelsUsed pCont do

(

 pCont.useScale = true

 pCont.useFloat = true

)

on Init pCont do ()

on Proceed pCont do

(

 count = pCont.NumParticles()

 for i in 1 to count do

 (

  pCont.particleIndex = i

  pCont.particleFloat = 1.0/(pCont.particleScale^3)

 )

)

on Release pCont do ( )

RESULT:

Step-By-Step

on ChannelsUsed pCont do

(

The ChannelsUsed handler defines the channels to be used by the Script Operator - you cannot get or set particle related values from the particle container without specifying which properties you need access to. This way, Particle Flow does not have to provide the Script Operator with all possible channels (and there can be an arbitrary number of channels in Particle Flow) but only with those that are actually needed. This conserves memory!

The parameter pCont contains the Particle Container.

pCont.useScale = true

Since we want to read the size of the particles in order to calculate the mass, we will need access to the Scale channel.

pCont.useFloat = true

We will also need the Float channel which is a all-purpose data channel that can be used to store floating point values.

)

on Init pCont do

(

The Init handler is used to initialize the Script Operator.
Usually you define variables and acquire initial values or create objects to be used by the Proceed handler.
In our case, we will not use this handler though.
The parameter pCont contains the Particle Container.

)

on Proceed pCont do

(

The Proceed handler is called every time the Script Operator is evaluated by Particle Flow.
It contains the actual body of the script.
The parameter pCont contains the Particle Container which contains all particles the Operator is applied to.

count = pCont.NumParticles()

Here we read the current number of particles in the particle container.
We will access every one of them in the following loop.
The reason we assign the value to a variable is that in the for loop that follows, the to limit is evaluated after each cycle of the loop to decide whether the i variable is greater than the limit.
Using the pCont.NumParticles() method call inside the for loop would call the method n times where n is the number of particles.
With the current code though, the method will be called just once and this will make the script faster!

for i in 1 to count do

(

Now we repeat the following code block for every single particle by using a for loop which counts from 1 to the number of particles. The variable i will contain the current particle index.

pCont.particleIndex = i

In order to work with multiple particles, we have to specify the current particle to access.
Setting the .particleIndex property of the Particle Container to the i variable will make the i-th particle the current one.
Any subsequent particle property access calls will be directed to that particle!

pCont.particleFloat = 1.0/(pCont.particleScale^3)

This is the actual code line that calculates an influence value which is reverse-proportional to the mass of the particle.
The result is assigned to the particleFloat channel of the current particle and will be accessed by the Force Operator which has its Script Wiring enabled to accept the Float values from the particleFlot channel.

THIS LINE REQUIRES SOME MORE EXPLANATION:

In general, the mass of an object depends on its volume and its density.
Since we assume that all particles in this system are made of the same material, we don't really need the density.
We will use just the Bounding Sphere of the particles.
The volume of a sphere can be calculated using the following expression:

4/3*Pi*R^3

where R is the radius of the sphere.
Since 4, 3 and Pi are constants, we don't actually need them - they would just scale the final value a bit and make the calculation slower.
What we have now is Radius to the power of 3.
The influence should be decrease as the volume (and mass) increase, so we divide 1.0 by the R^3.

This is not completely realistic - when using Wind, the influence of the Wind is also proportional on the cross-section of the blown object.
The smaller the object, the lower the cross-section and thus lower the influence.
Since the cross-section of a sphere is a circle (Pi*R^2), we could reduce the R^3/R^2 to just R (which is the particleScale in our case)

SO WE SHOULD ACTUALLY USE THE LINE:

pCont.particleFloat = 1.0/pCont.particleScale

to be more realistic. Both functions provide a nice effect - feel free to use whatever suits your needs better.

)

This is the end of the i loop.

)

on Release pCont do

(

The Release handler is usually needed to do cleanup work, but we do not need it this time around.

)

See Also

Particle Flow Sample Scripts

"How To" Tutorials Index Page


How To ... Develop a Bitmap Painting Tool - Basic Utility

How To > Develop a Bitmap Painting Tool - Basic Utility

The original code of the complete advanced version was developed in less than an hour and showcases the flexibility of MAXScript for prototyping applications of any kind.

Here is the very basic initial version:

NATURAL LANGUAGE

We will develop a simple MacroScript that creates a dialog from a rollout.

The rollout will contain only a bitmap UI control

The user will paint by pressing the left mouse button and dragging the mouse inside the bitmap.

The brush will be a single black dot - if the mouse moves fast, the strokes will appear dotted.

SCRIPT:

macroScript MicroPaint category:"HowTo"

(

global MicroPaint_CanvasRollout

try(destroyDialog MicroPaint_CanvasRollout)catch()

local isDrawing = false

local bitmapX = bitmapY = 512

local theCanvasBitmap = bitmap bitmapX bitmapY color:white

rollout MicroPaint_CanvasRollout "MicroPaint"

(

 bitmap theCanvas pos:[0,0] width: bitmapX height: bitmapY bitmap:theCanvasBitmap

 fn paintBrush pos =

 (

  setPixels theCanvasBitmap pos #(black)

  theCanvas.bitmap = theCanvasBitmap

 )

 on MicroPaint_CanvasRollout lbuttondown pos do

 (

  isDrawing = true

  paintBrush pos

 )

 on MicroPaint_CanvasRollout lbuttonup pos do isDrawing = false

 on MicroPaint_CanvasRollout mousemove pos do if isDrawing do paintBrush pos

)

createDialog MicroPaint_CanvasRollout bitmapX bitmapY

)

Step-By-Step

macroScript MicroPaint category:"HowTo"

(

We define a macroScript called MicroPaint which will appear in the "HowTo" category .

global MicroPaint_CanvasRollout

In order to be able to close any existing dialog from previous sessions, we define the variable of the rollout to be used as dialog as a global variable.

Local and Global Variables

try(destroyDialog CanvasRollout)catch()

Then we try to destroy any existing dialog from a previous session. If there is none, the try()catch() error trap will prevent any error messages.

Try Expression

local isDrawing = false

This local variable will be used as a flag for enabling drawing. When the variable is false, the mouse move event handler will not draw. When the left mouse button has been pressed, this variable will be set to true and allow drawing until the left mouse button is released.

BooleanClass Values

local bitmapX = bitmapY = 512

These local variables will contain the size of the bitmap to be painted. Simply changing this value would resize the tool to paint on a different canvas size!

local theCanvasBitmap = bitmap bitmapX bitmapY color:white

This variable will contain the canvas to draw on. We initialize it to a white bitmap with a size of 400 by 400 pixels.

Bitmap Values

rollout MicroPaint_CanvasRollout "MicroPaint"

(

This is the rollout which will define the dialog with the bitmap canvas.

bitmap theCanvas pos:[0,0] width:bitmapX height: bitmapY bitmap:theCanvasBitmap

This is the bitmap User Interface control. It is aligned to the upper left corner of the rollout and displays the 400 by 400 canvas bitmap.

Bitmap

NOTE:

that there are two different constructors with the name bitmap - the User Interface control used here and the bitmap value constructor used two lines higher! MAXScript knows which one you have in mind based on the context - if you are inside a rollout definition scope and type in

bitmap my_bmp width:100 height:100

MAXScript will create a User Interface control.

If you are inside the same rollout and type in

local my_bmp = bitmap 100 100

a new local bitmap value will be created and NOT a User Interface control!

fn paintBrush pos =

(

This function will be called to draw a point on the bitmap. The argument pos will contain the 2D coordinates to place the new point at.

Defining Custom Functions

setPixels theCanvasBitmap pos #(black)

setPixels is used to change the color of one or more pixels in a row. The pos defines the location in the bitmap (where 0,0 is the upper left corner) the paining should start at. The colors to be changes are provided in an array. In our case, the array contains a single element, the color black.

setpixels

theCanvas.bitmap = theCanvasBitmap

After the black point is drawn into the bitmap, we assign it to the user interface control to update the drawing.

)

on MicroPaint_CanvasRollout lbuttondown pos do

(

This dialog event handler is called whenever the left mouse button is pressed while the mouse is located over the rollout. The argument pos will contain the 2D position in rollout coordinates.

CreateDialog

isDrawing = true

We raise the flag to notify the mousemove handler (see below) that the drawing can be started.

paintBrush pos

We also call the paintbrush function by passing the currently clicked point to it. This way, simply clicking without moving the mouse will cause a black point to be placed on the bitmap.

)

on MicroPaint_CanvasRollout lbuttonup pos do isDrawing = false

This dialog event handler is called whenever the left mouse button is released. We just lower the flag again so the drawing can be stopped.

on MicroPaint_CanvasRollout mousemove pos do if isDrawing do paintBrush pos

This dialog event handler is called whenever the mouse movies over the rollout, regardless of the button state. The argument pos contains the 2D position in pixels inside the rollout, coinciding with the position in pixels inside the bitmap (remember? Both have the same origin [0,0].

We check to see whether the left mouse button has been pressed but not released yet by looking into the isDrawing variable. If it contains true, we call the drawing paintbrush function with the current position of the mouse inside the dialog.

)

createDialog MicroPaint_CanvasRollout bitmapX bitmapY

Finally, we create a dialog using the rollout we just defined.

)

Result

Next Tutorial:

How To ... Develop a Bitmap Painting Tool - Strokes Support

See also

"How To" Tutorials Index Page


How To ... Develop a Bitmap Painting Tool - Strokes Support

How To > Develop a Bitmap Painting Tool - Strokes Support

In this step of the Bitmap Painting tool development, we will add some better stroke drawing code to avoid the dotted appearance.

NATURAL LANGUAGE

We will extend the existing MacroScript by adding a new function.

The new function will be passed the old and the new position of the mouse and a line will be drawn between the two points to define a continuous stroke.

SCRIPT:

macroScript MicroPaint category:"HowTo"

(

global MicroPaint_CanvasRollout

try(destroyDialog MicroPaint_CanvasRollout)catch()

local isDrawing = false

local bitmapX = bitmapY = 512

local theCanvasBitmap = bitmap bitmapX bitmapY color:white

local currentPos = lastPos = [0,0]

rollout MicroPaint_CanvasRollout "MicroPaint"

(

 bitmap theCanvas pos:[0,0] width:bitmapX height:bitmapY bitmap:theCanvasBitmap

 fn paintBrush pos = ( setPixels theCanvasBitmap pos #(color 0 0 0) )

 fn drawStroke lastPos pos =

 (

  currentPos = lastPos

  deltaX = pos.x - lastPos.x

  deltaY = pos.y - lastPos.y

  maxSteps = amax #(abs(deltaX),abs(deltaY))

  deltaStepX = deltaX / maxSteps

  deltaStepY = deltaY / maxSteps

  for i = 0 to maxSteps do

  (

   paintBrush currentPos

   currentPos += [deltaStepX, deltaStepY]

  )

  theCanvas.bitmap = theCanvasBitmap

 )

 on MicroPaint_CanvasRollout lbuttondown pos do

 (

  lastPos = pos

  isDrawing = true

  drawStroke lastPos pos

 )

 on MicroPaint_CanvasRollout lbuttonup pos do isDrawing = false

 on MicroPaint_CanvasRollout mousemove pos do

 (

  if isDrawing do drawStroke lastPos pos

  lastPos = pos

 )

)

createDialog MicroPaint_CanvasRollout bitmapX bitmapY

)

Step-By-Step

--Code in green has not changes since the previous version!

macroScript MicroPaint category:"HowTo"

(

global MicroPaint_CanvasRollout

try(destroyDialog CanvasRollout)catch()

local isDrawing = false

local bitmapX = bitmapY = 512

local theCanvasBitmap = bitmap bitmapX bitmapY color:white

local currentPos = lastPos = [0,0]

The first change we will have to do is to define the current and the last known position variables which will be used to keep track of the current stroke. We initialize both to [0,0].

rollout MicroPaint_CanvasRollout "MicroPaint"

(

bitmap theCanvas pos:[0,0] width:400 height:400 bitmap:theCanvasBitmap

fn paintBrush pos = ( setPixels theCanvasBitmap pos #(black) )

We will simplify the paintbrush function. It will only draw the point, but will not update the canvas. This is necessary because the stroke will contain a large number of brush points, but will have to be updated just once after the stroke to maintain interactivity.

fn drawStroke lastPos pos =

(

This will be the stroke drawing function called by the mouse handlers. It will be passed two arguments - the last mouse position (beginning of the stroke) and the current mouse position (the end of the stroke).

currentPos = lastPos

The current position variable is initialized to the beginning of the stroke. It will be used to draw the line from the start to the end point of the stroke.

deltaX = pos.x - lastPos.x

deltaY = pos.y - lastPos.y

In order to draw a straight line from the last to the new position, we must know how far these two points are from each other along both X and Y.

maxSteps = amax #(abs(deltaX),abs(deltaY))

Then we compare the absolute values along X and Y to see which one is larger. MaxSteps will be equal to either the number of pixels between the two along X or along Y.

deltaStepX = deltaX / maxSteps

deltaStepY = deltaY / maxSteps

Now we calculate the incement per step we will need for the X and Y axis. If maxSteps is equal to the distance along X, then deltaStepX will be +1 or -1, while deltaStepY will be a number less than 1.0. If maxSteps is equal to the distance along Y, then deltaStepY will be +1 or -1, and deltaStepX will be < 1.0.

for i = 0 to maxSteps do

(

Now we loop from 0 to the number of steps,

paintBrush currentPos

Paint a black dot at the current position by calling our custom paintbrush function,

currentPos += [deltaStepX, deltaStepY]

and then increment the current position with the deltaStep values until the current mouse position is reached.

)

theCanvas.bitmap = theCanvasBitmap

Finally, when the stroke is done, we update the bitmap in the rollout.

)

on MicroPaint_CanvasRollout lbuttondown pos do

(

lastPos = pos

If the user pressed the mouse button, we will have to reset the stroke to the currently clicked point.

isDrawing = true

drawStroke lastPos pos

Instead of calling the PaintBrish function, we call the drawStroke function and pass the last and the current position (which are equal at this point) to it. This will create a single dot at the clicked point (the stroke has length 0, both deltaX and deltaY are 0, thus maxSteps is 0, but since the for i loop starts counting at 0, we get at least one iteration to draw the point!)

)

on MicroPaint_CanvasRollout lbuttonup pos do isDrawing = false

on MicroPaint_CanvasRollout mousemove pos do

(

if isDrawing do drawStroke lastPos pos

Instead of calling the PaintBrish function, we call the drawStroke function again. At this point, the lastPos and the pos values are different and require a longer stroke to be drawn.

lastPos = pos

After the stroke is drawn, we record the current mouse position into the lastPos variable to be used as the starting point of the next stroke.

)

)

createDialog MicroPaint_CanvasRollout bitmapX bitmapY

)

Result

Previous Tutorial:

How To ... Develop a Bitmap Painting Tool - Basic Utility

Next Tutorial:

How To ... Develop a Bitmap Painting Tool - Brush Size and Color

See also

"How To" Tutorials Index Page


How To ... Develop a Bitmap Painting Tool - Brush Size and Color

How To > Develop a Bitmap Painting Tool - Brush Size and Color

In this step of the Bitmap Painting tool development, we will add brush color and size controls.

NATURAL LANGUAGE

We will extend the existing MacroScript by adding new UI controls to the rollout to define the Ink color and the Brush Size.

The paintbrush function will be changed to use the color defined by the UI color picker.

The drawStroke function will be enhanced to draw a large rectangle based on the defined size.

SCRIPT:

macroScript MicroPaint category:"HowTo"

(

global MicroPaint_CanvasRollout

try(destroyDialog CanvasRollout)catch()

local isDrawing = false

local bitmapX = bitmapY = 512

local theCanvasBitmap = bitmap bitmapX bitmapY color:white

local currentPos = lastPos = [0,0]

rollout MicroPaint_CanvasRollout "MicroPaint"

(

 bitmap theCanvas pos:[0,0] width:bitmapX height:bitmapY  bitmap:theCanvasBitmap

 colorpicker inkColor height:16 modal:false color:black across:2

 spinner BrushSize "Size" range:[1,50,10] type:#integer fieldwidth:40

 fn paintBrush pos = (setPixels theCanvasBitmap pos #(inkColor.color))

 fn drawStroke lastPos pos =

 (

  currentPos = lastPos

  deltaX = pos.x - lastPos.x

  deltaY = pos.y - lastPos.y

  maxSteps = amax #(abs(deltaX),abs(deltaY))

  deltaStepX = deltaX / maxSteps

  deltaStepY = deltaY / maxSteps

  for i = 0 to maxSteps do

  (

   for b = -BrushSize.value/2 to BrushSize.value/2 do

    for c = -BrushSize.value/2 to BrushSize.value/2 do

     paintBrush (currentPos + [c,b])

   currentPos += [deltaStepX, deltaStepY]

  )

  theCanvas.bitmap = theCanvasBitmap

 )

 on MicroPaint_CanvasRollout lbuttondown pos do

 (

  lastPos = pos

  isDrawing = true

  drawStroke lastPos pos

 )

 on MicroPaint_CanvasRollout lbuttonup pos do isDrawing = false

 on MicroPaint_CanvasRollout mousemove pos do

 (

  if isDrawing do drawStroke lastPos pos

  lastPos = pos

 )

)

createDialog MicroPaint_CanvasRollout bitmapX (bitmapY + 30)

)

Step-By-Step

--Code in green has not changes since the previous version!

macroScript MicroPaint category:"HowTo"

(

global MicroPaint_CanvasRollout

try(destroyDialog CanvasRollout)catch()

local isDrawing = false

local bitmapX = bitmapY = 512

local theCanvasBitmap = bitmap bitmapX bitmapY color:white

rollout MicroPaint_CanvasRollout "MicroPaint"

(

bitmap theCanvas pos:[0,0] width:bitmapX height:bitmapY bitmap:theCanvasBitmap

colorpicker inkColor height:16 modal:false color:black across:2

This is the color picker which will be used to define the color of the paintbrush.

Colorpicker

spinner BrushSize "Size" range:[1,50,10] type:#integer fieldwidth:40

This spinner will define the size of the paintbrush.

Spinner

fn paintBrush pos = (setPixels theCanvasBitmap pos)

fn drawAPoint lastPos pos =

(

currentPos = lastPos

deltaX = pos.x - lastPos.x

deltaY = pos.y - lastPos.y

maxSteps = amax #(abs(deltaX),abs(deltaY))

deltaStepX = deltaX / maxSteps

deltaStepY = deltaY / maxSteps

for i = 0 to maxSteps do

(

for b = -BrushSize.value/2 to BrushSize.value/2 do

(

This new loop will define the vertical size of the brush. It counts from minus half the size to plus half the size, full size altogether.

for c = -BrushSize.value/2 to BrushSize.value/2 do

This second loop defines the width of the paintbrush. It also loops from minus half the size to plus half the size, full size altogether.

paintBrush (currentPos + [c,b])

After each iteration of the c loop, we call our paintBrush function, passing the current position in the stroke plus the offset based on half the size of the brush and the b loop.

)

currentPos += [deltaStepX, deltaStepY]

)

theCanvas.bitmap = theCanvasBitmap

)

on MicroPaint_CanvasRollout lbuttondown pos do

(

lastPos = pos

isDrawing = true

drawAPoint lastPos pos

)

on MicroPaint_CanvasRollout lbuttonup pos do isDrawing = false

on MicroPaint_CanvasRollout mousemove pos do

(

if isDrawing do drawAPoint lastPos pos

lastPos = pos

)

createDialog MicroPaint_CanvasRollout bitmapX (bitmapY+30)

In order to accommodate the new User Interface controls for the color and brush size, we have to increase the vertical size of the dialog by 30 pixels.

)

Result

Previous Tutorial:

How To ... Develop a Bitmap Painting Tool - Strokes Support

Next Tutorial:

How To ... Develop a Bitmap Painting Tool - Airbrush and Shapes

See also

"How To" Tutorials Index Page


How To ... Develop a Bitmap Painting Tool - Airbrush and Shapes

How To > Develop a Bitmap Painting Tool - Airbrush and Shapes

In this step of the Bitmap Painting tool development, we will add an airbrush option to the tool and a brush shape option to draw both rectanglular and circular brushes.

NATURAL LANGUAGE

The existing rollout will be enhanced by adding a dropdown list to define the Brush shape, a checkbutton to enable the AirBrush, and a spinner to control its strength.

We will extend the existing code by drawing random points for the AirBrush option.

The drawStroke function will be enhanced to draw a circle with the Size as the radius.

SCRIPT:

macroScript MicroPaint category:"HowTo"

(

global MicroPaint_CanvasRollout

try(destroyDialog CanvasRollout)catch()

local isDrawing = false

local bitmapX = bitmapY = 512

local theCanvasBitmap = bitmap bitmapX bitmapY color:white

local currentPos = lastPos = [0,0]

rollout MicroPaint_CanvasRollout "MicroPaint"

(

bitmap theCanvas pos:[0,0] width:bitmapX height:bitmapY bitmap:theCanvasBitmap

colorpicker inkColor height:16 modal:false color:black across:4

checkbutton airBrush "AirBrush" width:50

spinner AirBrushSpeed "Speed" range:[0.1,50,10] fieldwidth:40

spinner BrushSize "Size" range:[1,50,10] type:#integer fieldwidth:40

listbox BrushShape items:#("Circle", "Box") pos:[bitmapX+5,0] width:90

fn paintBrush pos =

(

case BrushShape.selection of

(

1: (

if distance pos currentPos <= BrushSize.value/2 do

setPixels theCanvasBitmap pos #(inkColor.color)

)

2:  setPixels theCanvasBitmap pos #(inkColor.color)

)

)

fn drawStroke lastPos pos =

(

currentPos = lastPos

deltaX = pos.x - lastPos.x

deltaY = pos.y - lastPos.y

maxSteps = amax #(abs(deltaX),abs(deltaY))

deltaStepX = deltaX / maxSteps

deltaStepY = deltaY / maxSteps

for i = 0 to maxSteps do

(

if airBrush.checked then

(

for b = 1 to (BrushSize.value / AirBrushSpeed.value) do

paintBrush (currentPos + (random [-BrushSize.value/2,-BrushSize.value/2] [BrushSize.value/2,BrushSize.value/2] ))

)

else

for b = -BrushSize.value/2 to BrushSize.value/2 do

for c = -BrushSize.value/2 to BrushSize.value/2 do

paintBrush (currentPos + [c,b])

currentPos += [deltaStepX, deltaStepY]

)

theCanvas.bitmap = theCanvasBitmap

)

on MicroPaint_CanvasRollout lbuttondown pos do

(

lastPos = pos

isDrawing = true

drawStroke lastPos pos

)

on MicroPaint_CanvasRollout lbuttonup pos do isDrawing = false

on MicroPaint_CanvasRollout mousemove pos do

(

if isDrawing do drawStroke lastPos pos

lastPos = pos

)

)

createDialog MicroPaint_CanvasRollout (bitmapx+100) (bitmapy+30)

)

Step-By-Step

--Code in green has not changes since the previous version!

macroScript MicroPaint category:"HowTo"

(

global MicroPaint_CanvasRollout

try(destroyDialog CanvasRollout)catch()

local isDrawing = false

local bitmapX = bitmapY = 512

local theCanvasBitmap = bitmap bitmapX bitmapY color:white

rollout MicroPaint_CanvasRollout "MicroPaint"

(

bitmap theCanvas pos:[0,0] width:bitmapX height:bitmapY bitmap:theCanvasBitmap

colorpicker inkColor height:16 modal:false color:black across:4

To accommodate automatically all new controls in the bottom row, we will have to increase the across: parameter to 4.

checkbutton airBrush "AirBrush" width:50

When checked, this checkbutton will enable the Airbrush feature.

spinner AirBrushSpeed "Speed" range:[0.1,50,10] fieldwidth:40

This value will control the strength of the Airbrush feature.

spinner BrushSize "Size" range:[1,50,10] type:#integer fieldwidth:40

listbox BrushShape items:#("Circle", "Box") width:90 pos:[bitmapx+5,0]

This listbox controls the shape of the brush. In the future versions, we will add additional tools to it.

Listbox

fn paintBrush pos =

(

case BrushShape.selection of

(

Depending on the setting of the Brush Shape dropdown list, the pixels will be limited inside a circle, or will be drawn as before.

Case Expression

1: (

if distance pos currentPos <= BrushSize.value/2 do

setPixels theCanvasBitmap pos #(inkColor.color)

)

If the Circle shape is selected, the distance from the position to be drawn to the center of the brush will be compared to the radius value (the size divided by 2). Only if the point is at a distance less than the radius, it will be drawn. This defines a circular brush.

2: setPixels theCanvasBitmap pos #(inkColor.color)

This is the original function used in the previous step. It will be used when the dropdown list selection is 2 - "Box".

)

)

fn drawStroke lastPos pos =

(

currentPos = lastPos

deltaX = pos.x - lastPos.x

deltaY = pos.y - lastPos.y

maxSteps = amax #(abs(deltaX),abs(deltaY))

deltaStepX = deltaX / maxSteps

deltaStepY = deltaY / maxSteps

for i = 0 to maxSteps do

(

if airBrush.checked then

(

When the Airbrush option is checked, the following code will be executed:

for b = 1 to (BrushSize.value / AirBrushSpeed.value) do

We will repeat a number of times, the actual number will be dependent on the size of the brush and the Airbrush speed value. The higher the Speed value, the lower the number of samples in the brush.

paintBrush (currentPos + (random [-BrushSize.value/2,-BrushSize.value/2] [BrushSize.value/2,BrushSize.value/2] ))

For every iteration, we will draw a random point between the lower left and upper right corners of the box brush. If circular brush is selected, some of the points will be filtered out by the new code in the paintbrush function above.

)

else

Otherwise, the original brush code below will be execured.

for b = -BrushSize.value/2 to BrushSize.value/2 do

for c = -BrushSize.value/2 to BrushSize.value/2 do

paintBrush (currentPos + [c,b])

currentPos += [deltaStepX, deltaStepY]

)

theCanvas.bitmap = theCanvasBitmap

)

on MicroPaint_CanvasRollout lbuttondown pos do

(

lastPos = pos

isDrawing = true

drawAPoint lastPos pos

)

on MicroPaint_CanvasRollout lbuttonup pos do isDrawing = false

on MicroPaint_CanvasRollout mousemove pos do

(

if isDrawing do drawAPoint lastPos pos

lastPos = pos

)

createDialog MicroPaint_CanvasRollout (bitmapX+100) (bitmapY+30)

In order to accommodate the new User Interface controls for the color and brush size, we have to increase the horizontal size of the dialog by 100 pixels.

)

Result

Previous Tutorial:

How To ... Develop a Bitmap Painting Tool - Brush Size and Color

Next Tutorial:

How To ... Develop a Bitmap Painting Tool - Smooth Brushes

See also

"How To" Tutorials Index Page


How To ... Develop a Bitmap Painting Tool - Smooth Brushes

How To > Develop a Bitmap Painting Tool - Smooth Brushes

In this step of the Bitmap Painting tool development, we will add optional smooth falloff to the brush.

NATURAL LANGUAGE

We will add a new item to the brushes listbox.

We will extend the existing paintbrush function with a new case calculating the new color using the existing one and a falloff based on the pixel's distance to the center of the brush.

SCRIPT:

macroScript MicroPaint category:"HowTo"

(

global MicroPaint_CanvasRollout

try(destroyDialog CanvasRollout)catch()

local isDrawing = false

local bitmapX = bitmapY = 512

local theCanvasBitmap = bitmap bitmapX bitmapY color:white

local currentPos = lastPos = [0,0]

rollout MicroPaint_CanvasRollout "MicroPaint"

(

bitmap theCanvas pos:[0,0] width:bitmapX height:bitmapY bitmap:theCanvasBitmap

colorpicker inkColor height:16 modal:false color:black across:4

checkbutton airBrush "AirBrush" width:50

spinner AirBrushSpeed "Speed" range:[0.1,50,10] fieldwidth:30

spinner BrushSize "Size" range:[1,50,10] type:#integer fieldwidth:40

listbox BrushShape items:#("Circle", "Box", "Circle Smooth") pos:[bitmapX+5,0] width:90

fn paintBrush pos =

(

case BrushShape.selection of

(

1: (

if distance pos currentPos <= BrushSize.value/2 do

setPixels theCanvasBitmap pos #(inkColor.color)

)

2: setPixels theCanvasBitmap pos #(inkColor.color)

3: (

theFactor = (distance pos currentPos) / (BrushSize.value/2.0)

if theFactor <= 1.0 do

(

theFactor = sin ( 90.0 * theFactor)

thePixels = getPixels theCanvasBitmap pos 1

if thePixels[1] != undefined do

(

thePixels[1] = (thePixels[1] * theFactor) + (inkColor.color * (1.0 - theFactor))

setPixels theCanvasBitmap pos thePixels

)

)

)--end case 3

)--end case

)--end fn

fn drawStroke lastPos pos =

(

currentPos = lastPos

deltaX = pos.x - lastPos.x

deltaY = pos.y - lastPos.y

maxSteps = amax #(abs(deltaX),abs(deltaY))

deltaStepX = deltaX / maxSteps

deltaStepY = deltaY / maxSteps

for i = 0 to maxSteps do

(

if airBrush.checked then

(

for b = 1 to (BrushSize.value / AirBrushSpeed.value) do

paintBrush (currentPos + (random [-BrushSize.value/2,-BrushSize.value/2] [BrushSize.value/2,BrushSize.value/2] ))

)

else

for b = -BrushSize.value/2 to BrushSize.value/2 do

for c = -BrushSize.value/2 to BrushSize.value/2 do

paintBrush (currentPos + [c,b])

currentPos += [deltaStepX, deltaStepY]

)

theCanvas.bitmap = theCanvasBitmap

)

on MicroPaint_CanvasRollout lbuttondown pos do

(

lastPos = pos

isDrawing = true

drawStroke lastPos pos

)

on MicroPaint_CanvasRollout lbuttonup pos do isDrawing = false

on MicroPaint_CanvasRollout mousemove pos do

(

if isDrawing do drawStroke lastPos pos

lastPos = pos

)

)

createDialog MicroPaint_CanvasRollout (bitmapx+100) (bitmapy+30)

)

Step-By-Step

--Code in green has not changes since the previous version!

macroScript MicroPaint category:"HowTo"

(

global MicroPaint_CanvasRollout

try(destroyDialog CanvasRollout)catch()

local isDrawing = false

local bitmapX = bitmapY = 512

local theCanvasBitmap = bitmap bitmapX bitmapY color:white

local currentPos = lastPos = [0,0]

rollout MicroPaint_CanvasRollout "MicroPaint"

(

bitmap theCanvas pos:[0,0] width:bitmapX height:bitmapY bitmap:theCanvasBitmap

colorpicker inkColor height:16 modal:false color:black across:4

checkbutton airBrush "AirBrush" width:50

spinner AirBrushSpeed "Speed" range:[0.1,50,10] fieldwidth:40

spinner BrushSize "Size" range:[1,50,10] type:#integer fieldwidth:40

listbox BrushShape items:#("Circle", "Box", "Circle Smooth") pos:[bitmapX+5,0] width:90

We add a new brush to our "toolbox" - "Circle Smooth"

fn paintBrush pos =

(

case BrushShape.selection of

(

1: (

if distance pos currentPos <= BrushSize.value/2 do

setPixels theCanvasBitmap pos #(inkColor.color)

)

2: setPixels theCanvasBitmap pos #(inkColor.color)

3: (

When the "Circle Smooth" brush is selected,

theFactor = (distance pos currentPos) / (BrushSize.value/2.0)

We calculate the distance from the pixel to be drawn to the center of the brush and divide by the radius of the brush.

if theFactor <= 1.0 do

(

If the result is less than 1.0, the pixel lies inside the circle.

theFactor = sin ( 90.0 * theFactor)

In that case we multiply the value by 90 and use the Sine function to calculate a nice falloff curve. Note that remarking this line would give you a linear falloff curve instead of the sine-based falloff curve!

thePixels = getPixels theCanvasBitmap pos 1

Next we read a single pixel from the position we are about to write to.

if thePixels[1] != undefined do

(

If the single pixel in the array is a valid color,

thePixels[1] = (thePixels[1] * theFactor) + (inkColor.color * (1.0 - theFactor))

we blend the color of the background with the brush color based on the distance factor. If the factor is 0.5, the two colors will be blended 50-50%. If the factor is 1 (at the edge of the circle, the background color will be used 100% and the ink will be 0%.

setPixels theCanvasBitmap pos thePixels

Finally, we write the color back into the bitmap.

)

)

)

)

)

fn drawStroke lastPos pos =

(

currentPos = lastPos

deltaX = pos.x - lastPos.x

deltaY = pos.y - lastPos.y

maxSteps = amax #(abs(deltaX),abs(deltaY))

deltaStepX = deltaX / maxSteps

deltaStepY = deltaY / maxSteps

for i = 0 to maxSteps do

(

if airBrush.checked then

(

for b = 1 to (BrushSize.value / AirBrushSpeed.value) do

paintBrush (currentPos + (random [-BrushSize.value/2,-BrushSize.value/2] [BrushSize.value/2,BrushSize.value/2] ))

)

else

for b = -BrushSize.value/2 to BrushSize.value/2 do

for c = -BrushSize.value/2 to BrushSize.value/2 do

paintBrush (currentPos + [c,b])

currentPos += [deltaStepX, deltaStepY]

)

theCanvas.bitmap = theCanvasBitmap

)

on MicroPaint_CanvasRollout lbuttondown pos do

(

lastPos = pos

isDrawing = true

drawStroke lastPos pos

)

on MicroPaint_CanvasRollout lbuttonup pos do isDrawing = false

on MicroPaint_CanvasRollout mousemove pos do

(

if isDrawing do drawStroke lastPos pos

lastPos = pos

)

)

createDialog MicroPaint_CanvasRollout (bitmapx+100) (bitmapy+30)

)

Result

Previous Tutorial:

How To ... Develop a Bitmap Painting Tool - Airbrush and Shapes

Next Tutorial:

How To ... Develop a Bitmap Painting Tool - Load and Save

See also

"How To" Tutorials Index Page


How To ... Develop a Bitmap Painting Tool - Load and Save

How To > Develop a Bitmap Painting Tool - Load and Save

In this step of the Bitmap Painting tool development, we will add a main menu bar with New, Open and Save options.

NATURAL LANGUAGE

We will define a new right-click menu with some menu items and corresponding event handlers

We will assign the right-click menu as menu bar to the dialog.

SCRIPT:

macroScript MicroPaint category:"HowTo"

(

global MicroPaint_CanvasRollout

try(destroyDialog MicroPaint_CanvasRollout)catch()

local isDrawing = false

local bitmapX = bitmapY = 512

local theCanvasBitmap = bitmap bitmapX bitmapY color:white

local theBackgroundBitmap = bitmap bitmapX bitmapY color:white

local currentPos = lastPos = [0,0]

--NEW MENU CODE STARTS HERE

rcMenu CanvasMenu

(

subMenu "File"

(

menuItem new_menu "New"

menuItem open_menu "Open..."

menuItem save_as "Save As..."

separator file_menu_1

menuItem quit_tool "Quit"

)

subMenu "Edit" ( )

subMenu "Help"

(

menuItem about_tool "About MicroPaint..."

)

on new_menu picked do

(

theBackgroundBitmap = theCanvasBitmap = bitmap bitmapX bitmapY color:MicroPaint_CanvasRollout.paperColor.color

MicroPaint_CanvasRollout.theCanvas.bitmap = theCanvasBitmap

)

on open_menu picked do

(

theOpenBitmap= selectBitmap()

if theOpenBitmap != undefined do

(

copy theOpenBitmap theCanvasBitmap

copy theOpenBitmap theBackgroundBitmap

close theOpenBitmap

MicroPaint_CanvasRollout.theCanvas.bitmap = theCanvasBitmap

)

)

on save_as picked do

(

theSaveName = getSaveFileName types:"BMP (*.bmp)|*.bmp|Targa (*.tga)|*.tga|JPEG (*.jpg)|*.jpg"

if theSaveName != undefined do

(

theCanvasBitmap.filename = theSaveName

save theCanvasBitmap

)

)

on about_tool picked do messagebox "MicroPaint\nMAXScript Tutorial" title:"About..."

on quit_tool picked do destroyDialog MicroPaint_CanvasRollout

)

--NEW MENU CODE END HERE

rollout MicroPaint_CanvasRollout "MicroPaint"

(

bitmap theCanvas pos:[0,0] width:bitmapX height:bitmapY bitmap:theCanvasBitmap

colorpicker inkColor height:16 modal:false color:black across:5

colorpicker paperColor height:16 modal:false color:white

checkbutton airBrush "AirBrush" width:50

spinner AirBrushSpeed "Speed" range:[0.1,50,10] fieldwidth:30

spinner BrushSize "Size" range:[1,50,10] type:#integer fieldwidth:40

listbox BrushShape items:#("Circle", "Box", "Circle Smooth") pos:[bitmapX+5,0] width:90

fn paintBrush pos =

(

case BrushShape.selection of

(

1: (

if distance pos currentPos <= BrushSize.value/2 do

setPixels theCanvasBitmap pos #(inkColor.color)

)

2: setPixels theCanvasBitmap pos #(inkColor.color)

3: (

theFactor = (distance pos currentPos) / (BrushSize.value/2.0)

if theFactor <= 1.0 do

(

theFactor = sin ( 90.0 * theFactor)

thePixels = getPixels theCanvasBitmap pos 1

if thePixels[1] != undefined do

(

thePixels[1] = (thePixels[1] * theFactor) + (inkColor.color * (1.0 - theFactor))

setPixels theCanvasBitmap pos thePixels

)

)

)--end case 3

)--end case

)--end fn

fn drawStroke lastPos pos =

(

currentPos = lastPos

deltaX = pos.x - lastPos.x

deltaY = pos.y - lastPos.y

maxSteps = amax #(abs(deltaX),abs(deltaY))

deltaStepX = deltaX / maxSteps

deltaStepY = deltaY / maxSteps

for i = 0 to maxSteps do

(

if airBrush.checked then

(

for b = 1 to (BrushSize.value / AirBrushSpeed.value) do

paintBrush (currentPos + (random [-BrushSize.value/2,-BrushSize.value/2] [BrushSize.value/2,BrushSize.value/2] ))

)

else

for b = -BrushSize.value/2 to BrushSize.value/2 do

for c = -BrushSize.value/2 to BrushSize.value/2 do

paintBrush (currentPos + [c,b])

currentPos += [deltaStepX, deltaStepY]

)

theCanvas.bitmap = theCanvasBitmap

)

on MicroPaint_CanvasRollout lbuttondown pos do

(

lastPos = pos

isDrawing = true

drawStroke lastPos pos

)

on MicroPaint_CanvasRollout lbuttonup pos do isDrawing = false

on MicroPaint_CanvasRollout mousemove pos do

(

if isDrawing do drawStroke lastPos pos

lastPos = pos

)

)

createDialog MicroPaint_CanvasRollout (bitmapx+100) (bitmapy+30) menu:CanvasMenu

MicroPaint_CanvasRollout.theCanvas.bitmap = theBackgroundBitmap

)

MAXScript

Step-By-Step

--Code in green has not changes since the previous version!

macroScript MicroPaint category:"HowTo"

(

global MicroPaint_CanvasRollout

try(destroyDialog MicroPaint_CanvasRollout)catch()

local isDrawing = false

local bitmapX = bitmapY = 512

local theCanvasBitmap = bitmap bitmapX bitmapY color:white

local theBackgroundBitmap = bitmap bitmapX bitmapY color:white

We will define a second bitmap called background. It will not be used yet, but will be needed in the next tutorial to allow for an eraser function!

local currentPos = lastPos = [0,0]

rcMenu CanvasMenu

(

This is a right-click menu definition.

RCMenu User-Interface Items

subMenu "File"

(

The first item in the menu will be called File. A typical program implements File, Edit and Help items in its main menu, we will defined these, too.

menuItem new_menu "New"

menuItem open_menu "Open..."

menuItem save_as "Save As..."

Inside the File menu, we will add some menu items to start a new drawing, open an existing one and saving the results to a file on disk.

separator file_menu_1

This is a separator which draws a horizontal line between the menu items.

menuItem quit_tool "Quit"

This menu item will be used to quit the tool.

)

subMenu "Edit" ( )

We will leave the Edit menu empty for now...

subMenu "Help"

(

menuItem about_tool "About MicroPaint..."

)

The Help menu will contain only the about item.

on new_menu picked do

(

This is the event handler of the File>New menu item. If the user selected it from the menu...

RCMenu Clauses

theBackgroundBitmap = theCanvasBitmap = bitmap bitmapX bitmapY color:MicroPaint_CanvasRollout.paperColor.color

...we will define a new bitmap using the new paper color (background color) added to the User Interface, and will assign to the painting canvas and the new background bitmap.

MicroPaint_CanvasRollout.theCanvas.bitmap = theCanvasBitmap

Then, we assign the result to the User Interface bitmap.

)

on open_menu picked do

(

This is the event handler of the File>Open menu item. If the user selected it from the menu...

theOpenBitmap= selectBitmap()

...we open the standard Bitmap picker dialog of 3dsmax. It provides options to preview all supported file formats.

if theOpenBitmap != undefined do

(

If the user picked a valid bitmap and did not cancel out...

copy theOpenBitmap theCanvasBitmap

...we copy the bitmap that was opened into the painting canvas...

copy theOpenBitmap theBackgroundBitmap

...and into the background bitmap. The copy method resizes the original to fit the size of the canvas!

close theOpenBitmap

Finally, we close the opened bitmap...

MicroPaint_CanvasRollout.theCanvas.bitmap = theCanvasBitmap

...and assign the painting canvas to the User Interface bitmap.

)

)

on save_as picked do

(

This is the event handler of the File>Save As... menu item. If the user selected it from the menu...

theSaveName = getSaveFileName types:"BMP (*.bmp)|*.bmp|Targa (*.tga)|*.tga|JPEG (*.jpg)|*.jpg"

...we open the standard file saving dialog of 3ds Max and provide a list of some file extensions. (You can add any supported file formats like RLA, RPF etc. to this list).

if theSaveName != undefined do

(

If the user specified a valid name and did not cancel out...

theCanvasBitmap.filename = theSaveName

...we set the file name of the painting canvas to the selected name...

save theCanvasBitmap

...and save the bitmap to disk.

)

)

on about_tool picked do messagebox "MicroPaint\nMAXScript Tutorial" title:"About..."

If the user picked the Help>About menu item, we open a message box with some text. You can add your own text to this dialog with version number etc....

on quit_tool picked do destroyDialog MicroPaint_CanvasRollout

If the user picked the File>Quit menu item, we destroy the dialog. In the future, we could add a prompt whether the current painting should be saved to disk...

)

rollout MicroPaint_CanvasRollout "MicroPaint"

(

bitmap theCanvas pos:[0,0] width:bitmapX height:bitmapY bitmap:theCanvasBitmap

colorpicker inkColor height:16 modal:false color:black across:5

To add the paper color (background color of new images), we have to increase the across: parameter to 5.

colorpicker paperColor height:16 modal:false color:white

This colorpicker adds the paper color (background color of new images). Note that the color pickers are modeless and can be kept open all the time. You can also drag and drop colors to copy colors between the Ink and Paper color pickers, or drag and drop from other areas of 3ds Max!

checkbutton airBrush "AirBrush" width:50

spinner AirBrushSpeed "Speed" range:[0.1,50,10] fieldwidth:30

spinner BrushSize "Size" range:[1,50,10] type:#integer fieldwidth:40

listbox BrushShape items:#("Circle", "Box", "Circle Smooth") pos:[bitmapX+5,0] width:90

fn paintBrush pos =

(

case BrushShape.selection of

(

1: (

if distance pos currentPos <= BrushSize.value/2 do

setPixels theCanvasBitmap pos #(inkColor.color)

)

2: setPixels theCanvasBitmap pos #(inkColor.color)

3: (

theFactor = (distance pos currentPos) / (BrushSize.value/2.0)

if theFactor <= 1.0 do

(

theFactor = sin ( 90.0 * theFactor)

thePixels = getPixels theCanvasBitmap pos 1

if thePixels[1] != undefined do

(

thePixels[1] = (thePixels[1] * theFactor) + (inkColor.color * (1.0 - theFactor))

setPixels theCanvasBitmap pos thePixels

)

)

)--end case 3

)--end case

)--end fn

fn drawStroke lastPos pos =

(

currentPos = lastPos

deltaX = pos.x - lastPos.x

deltaY = pos.y - lastPos.y

maxSteps = amax #(abs(deltaX),abs(deltaY))

deltaStepX = deltaX / maxSteps

deltaStepY = deltaY / maxSteps

for i = 0 to maxSteps do

(

if airBrush.checked then

(

for b = 1 to (BrushSize.value / AirBrushSpeed.value) do

paintBrush (currentPos + (random [-BrushSize.value/2,-BrushSize.value/2] [BrushSize.value/2,BrushSize.value/2] ))

)

else

for b = -BrushSize.value/2 to BrushSize.value/2 do

for c = -BrushSize.value/2 to BrushSize.value/2 do

paintBrush (currentPos + [c,b])

currentPos += [deltaStepX, deltaStepY]

)

theCanvas.bitmap = theCanvasBitmap

)

on MicroPaint_CanvasRollout lbuttondown pos do

(

lastPos = pos

isDrawing = true

drawStroke lastPos pos

)

on MicroPaint_CanvasRollout lbuttonup pos do isDrawing = false

on MicroPaint_CanvasRollout mousemove pos do

(

if isDrawing do drawStroke lastPos pos

lastPos = pos

)

)

createDialog MicroPaint_CanvasRollout (bitmapx+100) (bitmapy+30) menu:CanvasMenu

We add the RightClick menu defined in the beginning of the script to the dialog.

MicroPaint_CanvasRollout.theCanvas.bitmap = theBackgroundBitmap

After starting the tool, it is a good idea to clear the display, as the bitmap might be still displaying an older version from a previous painting session.

)

Result

Previous Tutorial:

How To ... Develop a Bitmap Painting Tool - Smooth Brushes

Next Tutorial:

How To ... Develop a Bitmap Painting Tool - Erase Changes

See also

"How To" Tutorials Index Page


How To ... Develop a Bitmap Painting Tool - Erase Changes

How To > Develop a Bitmap Painting Tool - Erase Changes

In this step of the Bitmap Painting tool development, we will add an eraser option to the existing brishes. When the user is drawing with the right mouse button pressed, the background image will be revealed. This mode will support all available brushes including the Airbrush mode, allowing the user to erase smoothly.

NATURAL LANGUAGE

We will add a new flag variable to control the Erase mode

We will change the paintbrush function to support reading pixels from the background image

We will implement right mouse button handlers to enable erasing existing pixels with the original pixels from the background

We will add a commit changes option to the Edit menu top copy the foreground painting canvas into the background and "bake in" all changes.

SCRIPT:

macroScript MicroPaint category:"HowTo"

(

global MicroPaint_CanvasRollout

try(destroyDialog MicroPaint_CanvasRollout)catch()

local isErasing = isDrawing = false

local bitmapX = bitmapY = 512

local theCanvasBitmap = bitmap bitmapX bitmapY color:white

local theBackgroundBitmap = bitmap bitmapX bitmapY color:white

local currentPos = lastPos = [0,0]

rcMenu CanvasMenu

(

subMenu "File"

(

menuItem new_menu "New"

menuItem open_menu "Open..."

menuItem save_as "Save As..."

separator file_menu_1

menuItem quit_tool "Quit"

)

subMenu "Edit"

(

 menuItem commit_menu "Commit Changes"

)

on commit_menu picked do copy theCanvasBitmap theBackgroundBitmap

subMenu "Help"

(

menuItem about_tool "About MicroPaint..."

)

on new_menu picked do

(

theBackgroundBitmap = theCanvasBitmap = bitmap bitmapX bitmapY color:MicroPaint_CanvasRollout.paperColor.color

MicroPaint_CanvasRollout.theCanvas.bitmap = theCanvasBitmap

)

on open_menu picked do

(

theOpenBitmap= selectBitmap()

if theOpenBitmap != undefined do

(

copy theOpenBitmap theCanvasBitmap

copy theOpenBitmap theBackgroundBitmap

close theOpenBitmap

MicroPaint_CanvasRollout.theCanvas.bitmap = theCanvasBitmap

)

)

on save_as picked do

(

theSaveName = getSaveFileName types:"BMP (*.bmp)|*.bmp|Targa (*.tga)|*.tga|JPEG (*.jpg)|*.jpg"

if theSaveName != undefined do

(

theCanvasBitmap.filename = theSaveName

save theCanvasBitmap

)

)

on about_tool picked do messagebox "MicroPaint\nMAXScript Tutorial" title:"About..."

on quit_tool picked do destroyDialog MicroPaint_CanvasRollout

)

rollout MicroPaint_CanvasRollout "MicroPaint"

(

bitmap theCanvas pos:[0,0] width:bitmapX height:bitmapY bitmap:theCanvasBitmap

colorpicker inkColor height:16 modal:false color:black across:5

colorpicker paperColor height:16 modal:false color:white

checkbutton airBrush "AirBrush" width:50

spinner AirBrushSpeed "Speed" range:[0.1,50,10] fieldwidth:30

spinner BrushSize "Size" range:[1,50,10] type:#integer fieldwidth:40

listbox BrushShape items:#("Circle", "Box", "Circle Smooth") pos:[bitmapX+5,0] width:90

fn paintBrush pos =

(

if isErasing then

thePaintColor = (getPixels theBackgroundBitmap pos 1)[1]

else

thePaintColor = inkColor.color

if thePaintColor == undefined do thePaintColor = white

case BrushShape.selection of

(

1: (

if distance pos currentPos <= BrushSize.value/2 do

setPixels theCanvasBitmap pos #(thePaintColor)

)

2: setPixels theCanvasBitmap pos #(thePaintColor)

3: (

theFactor = (distance pos currentPos) / (BrushSize.value/2.0)

if theFactor <= 1.0 do

(

theFactor = sin ( 90.0 * theFactor)

thePixels = getPixels theCanvasBitmap pos 1

if thePixels[1] != undefined do

(

thePixels[1] = (thePixels[1] * theFactor) + (thePaintColor * (1.0 - theFactor))

setPixels theCanvasBitmap pos thePixels

)

)

)--end case 3

)--end case

)--end fn

fn drawStroke lastPos pos =

(

currentPos = lastPos

deltaX = pos.x - lastPos.x

deltaY = pos.y - lastPos.y

maxSteps = amax #(abs(deltaX),abs(deltaY))

deltaStepX = deltaX / maxSteps

deltaStepY = deltaY / maxSteps

for i = 0 to maxSteps do

(

if airBrush.checked then

(

for b = 1 to (BrushSize.value / AirBrushSpeed.value) do

paintBrush (currentPos + (random [-BrushSize.value/2,-BrushSize.value/2] [BrushSize.value/2,BrushSize.value/2] ))

)

else

for b = -BrushSize.value/2 to BrushSize.value/2 do

for c = -BrushSize.value/2 to BrushSize.value/2 do

paintBrush (currentPos + [c,b])

currentPos += [deltaStepX, deltaStepY]

)

theCanvas.bitmap = theCanvasBitmap

)

on MicroPaint_CanvasRollout lbuttondown pos do

(

lastPos = pos

isDrawing = true

isErasing = false

drawStroke lastPos pos

)

on MicroPaint_CanvasRollout rbuttondown pos do

(

lastPos = pos

isErasing = isDrawing = true

drawStroke lastPos pos

)

on MicroPaint_CanvasRollout lbuttonup pos do isErasing = isDrawing = false

on MicroPaint_CanvasRollout rbuttonup pos do isErasing = isDrawing = false

on MicroPaint_CanvasRollout mousemove pos do

(

if isDrawing do drawStroke lastPos pos

lastPos = pos

)

)

createDialog MicroPaint_CanvasRollout (bitmapx+100) (bitmapy+30) menu:CanvasMenu

MicroPaint_CanvasRollout.theCanvas.bitmap = theBackgroundBitmap

)

Step-By-Step

--Code in green has not changes since the previous version!

macroScript MicroPaint category:"HowTo"

(

global MicroPaint_CanvasRollout

try(destroyDialog MicroPaint_CanvasRollout)catch()

local isErasing = isDrawing = false

We add a new variable isErasing which will be set to true when the right mouse button is pressed.

local bitmapX = bitmapY = 512

local theCanvasBitmap = bitmap bitmapX bitmapY color:white

local theBackgroundBitmap = bitmap bitmapX bitmapY color:white

local currentPos = lastPos = [0,0]

rcMenu CanvasMenu

(

subMenu "File"

(

menuItem new_menu "New"

menuItem open_menu "Open..."

menuItem save_as "Save As..."

separator file_menu_1

menuItem quit_tool "Quit"

)

subMenu "Edit"

(

menuItem commit_menu "Commit Changes"

We add a new menu item to the Edit dialog. It will be used to commit the editing changes and make them "unerasable".

)

on commit_menu picked do copy theCanvasBitmap theBackgroundBitmap

This is the event handler for the commit changes option. When selected, the foreground image we are painting on will be copied into the background image, thus "baking" all the changed pixels into it. Using the eraser from this point on will reveal the new pixels.

subMenu "Help"

(

menuItem about_tool "About MicroPaint..."

)

on new_menu picked do

(

theBackgroundBitmap = theCanvasBitmap = bitmap bitmapX bitmapY color:MicroPaint_CanvasRollout.paperColor.color

MicroPaint_CanvasRollout.theCanvas.bitmap = theCanvasBitmap

)

on open_menu picked do

(

theOpenBitmap= selectBitmap()

if theOpenBitmap != undefined do

(

copy theOpenBitmap theCanvasBitmap

copy theOpenBitmap theBackgroundBitmap

close theOpenBitmap

MicroPaint_CanvasRollout.theCanvas.bitmap = theCanvasBitmap

)

)

on save_as picked do

(

theSaveName = getSaveFileName types:"BMP (*.bmp)|*.bmp|Targa (*.tga)|*.tga|JPEG (*.jpg)|*.jpg"

if theSaveName != undefined do

(

theCanvasBitmap.filename = theSaveName

save theCanvasBitmap

)

)

on about_tool picked do messagebox "MicroPaint\nMAXScript Tutorial" title:"About..."

on quit_tool picked do destroyDialog MicroPaint_CanvasRollout

)

rollout MicroPaint_CanvasRollout "MicroPaint"

(

bitmap theCanvas pos:[0,0] width:bitmapX height:bitmapY bitmap:theCanvasBitmap

colorpicker inkColor height:16 modal:false color:black across:5

colorpicker paperColor height:16 modal:false color:white

checkbutton airBrush "AirBrush" width:50

spinner AirBrushSpeed "Speed" range:[0.1,50,10] fieldwidth:30

spinner BrushSize "Size" range:[1,50,10] type:#integer fieldwidth:40

listbox BrushShape items:#("Circle", "Box", "Circle Smooth") pos:[bitmapX+5,0] width:90

fn paintBrush pos =

(

if isErasing then

If the eraser mode is active (that means, the user is holding down the right mouse button), then

thePaintColor = (getPixels theBackgroundBitmap pos 1)[1]

we get the color of the pixel from the background as the ink color.

else

thePaintColor = inkColor.color

otherwise we use the ink color defined by the User Interface.

if thePaintColor == undefined do thePaintColor = white

If the pixel was outside the bitmap, it might contain undefined. To avoid errors, we reset it back to white.

case BrushShape.selection of

(

1: (

if distance pos currentPos <= BrushSize.value/2 do

setPixels theCanvasBitmap pos #(thePaintColor)

)

2: setPixels theCanvasBitmap pos #(thePaintColor)

In both cases, we replace the explicit use of the InkColor.color with thepaintColor which contains the correct color to paint with.

3: (

theFactor = (distance pos currentPos) / (BrushSize.value/2.0)

if theFactor <= 1.0 do

(

theFactor = sin ( 90.0 * theFactor)

thePixels = getPixels theCanvasBitmap pos 1

if thePixels[1] != undefined do

(

thePixels[1] = (thePixels[1] * theFactor) + (thePaintColor * (1.0 - theFactor))

Again, we replace the explicit use of the InkColor.color with thepaintColor which contains the correct color to paint with.

setPixels theCanvasBitmap pos thePixels

)

)

)--end case 3

)--end case

)--end fn

fn drawStroke lastPos pos =

(

currentPos = lastPos

deltaX = pos.x - lastPos.x

deltaY = pos.y - lastPos.y

maxSteps = amax #(abs(deltaX),abs(deltaY))

deltaStepX = deltaX / maxSteps

deltaStepY = deltaY / maxSteps

for i = 0 to maxSteps do

(

if airBrush.checked then

(

for b = 1 to (BrushSize.value / AirBrushSpeed.value) do

paintBrush (currentPos + (random [-BrushSize.value/2,-BrushSize.value/2] [BrushSize.value/2,BrushSize.value/2] ))

)

else

for b = -BrushSize.value/2 to BrushSize.value/2 do

for c = -BrushSize.value/2 to BrushSize.value/2 do

paintBrush (currentPos + [c,b])

currentPos += [deltaStepX, deltaStepY]

)

theCanvas.bitmap = theCanvasBitmap

)

on MicroPaint_CanvasRollout lbuttondown pos do

(

lastPos = pos

isDrawing = true

isErasing = false

The isErasing flag is set to false whenever the user presses the left mouse button.

drawStroke lastPos pos

)

on MicroPaint_CanvasRollout rbuttondown pos do

(

lastPos = pos

isErasing = isDrawing = true

drawStroke lastPos pos

)

This new handler is called whenever the right mouse button is pressed. It is identical to the left mouse button handler except for the isErasing flag which is set to true this time.

on MicroPaint_CanvasRollout lbuttonup pos do isErasing = isDrawing = false

on MicroPaint_CanvasRollout rbuttonup pos do isErasing = isDrawing = false

Both the lbuttonup and the new rbuttonup handlers will stop both drawing and erasing by setting both flags to false.

on MicroPaint_CanvasRollout mousemove pos do

(

if isDrawing do drawStroke lastPos pos

lastPos = pos

)

)

createDialog MicroPaint_CanvasRollout (bitmapx+100) (bitmapy+30) menu:CanvasMenu

MicroPaint_CanvasRollout.theCanvas.bitmap = theBackgroundBitmap

)

Previous Tutorial:

How To ... Develop a Bitmap Painting Tool - Load and Save

NextTutorial:

How To ... Develop a Bitmap Painting Tool - Unwrap UV Coordinates

See also

"How To" Tutorials Index Page


How To ... Develop a Bitmap Painting Tool - Unwrap UV Coordinates

How To > Develop a Bitmap Painting Tool - Unwrap UV Coordinates

In this exciting step of the Bitmap Painting tool development, we will add the option to generate a graphical representation of the UV coordinates of an object inside the painting tool and assign automatically as diffuse map to the scene object.

NATURAL LANGUAGE

We will add a local variable to store the mesh object to work with.

We will add a new filter function to select only mesh objects.

We will add a new pickbutton to the UI to select an object to work with which will use the filter function.

We will add an option to the Edit menu to acquire the texture coordinates

We will add a new function to read UV coordinates from a selected mesh and draw strokes in the painting based on the vertex positions in texture space

We will define a default temp. file name for the painting and will optionally save it after each stroke

We will assign the temp. disk copy of the bitmap to the diffuse channel of the picked object.

We will add a new checkbox to the User Interface to enable and disable autosaving. When enabled, the bitmap will update in realtime as we paint in our tool!

SCRIPT:

macroScript MicroPaint category:"HowTo"

(

global MicroPaint_CanvasRollout

try(destroyDialog MicroPaint_CanvasRollout)catch()

local isErasing = isDrawing = false

local bitmapX = bitmapY = 512

local bitmapx_1 = bitmapx-1

local bitmapy_1 = bitmapy-1

local temp_bitmap_filename = (getDir #preview +"/microPaint_temp.bmp")

local theCanvasBitmap = bitmap bitmapX bitmapY color:white filename:temp_bitmap_filename

local theBackgroundBitmap = bitmap bitmapX bitmapY color:white

local currentPos = lastPos = [0,0]

local theChannel = 1

local theObj = undefined

rcMenu CanvasMenu

(

subMenu "File"

(

menuItem new_menu "New"

menuItem open_menu "Open..."

menuItem save_as "Save As..."

separator file_menu_1

menuItem quit_tool "Quit"

)

subMenu "Edit"

(

menuItem commit_menu "Commit Changes"

separator edit_menu_1

menuItem uv_menu "Get UV Coordinates..."

)

on commit_menu picked do copy theCanvasBitmap theBackgroundBitmap

on uv_menu picked do MicroPaint_CanvasRollout.unwrapTexture()

subMenu "Help"

(

menuItem about_tool "About MicroPaint..."

)

on new_menu picked do

(

theBackgroundBitmap = theCanvasBitmap = bitmap bitmapX bitmapY color:MicroPaint_CanvasRollout.paperColor.color filename:temp_bitmap_filename

MicroPaint_CanvasRollout.theCanvas.bitmap = theCanvasBitmap

)

on open_menu picked do

(

theOpenBitmap= selectBitmap()

if theOpenBitmap != undefined do

(

copy theOpenBitmap theCanvasBitmap

copy theOpenBitmap theBackgroundBitmap

close theOpenBitmap

MicroPaint_CanvasRollout.theCanvas.bitmap = theCanvasBitmap

)

)

on save_as picked do

(

theSaveName = getSaveFileName types:"BMP (*.bmp)|*.bmp|Targa (*.tga)|*.tga|JPEG (*.jpg)|*.jpg"

if theSaveName != undefined do

(

theCanvasBitmap.filename = theSaveName

save theCanvasBitmap

theCanvasBitmap.filename = temp_bitmap_filename

)

)

on about_tool picked do messagebox "MicroPaint\nMAXScript Tutorial" title:"About..."

on quit_tool picked do destroyDialog MicroPaint_CanvasRollout

)

fn mesh_filter obj = superclassof obj == GeometryClass and classof obj != TargetObject

rollout MicroPaint_CanvasRollout "MicroPaint"

(

bitmap theCanvas pos:[0,0] width:bitmapX height:bitmapY bitmap:theCanvasBitmap

colorpicker inkColor height:16 modal:false color:black across:6

colorpicker paperColor height:16 modal:false color:white

checkbutton autoSave "AutoSave" width:70

checkbutton airBrush "AirBrush" width:70

spinner AirBrushSpeed "Speed" range:[0.1,50,10] fieldwidth:30

spinner BrushSize "Size" range:[1,50,1] type:#integer fieldwidth:40

listbox BrushShape items:#("Circle", "Box", "Circle Smooth") pos:[bitmapX+5,0] width:90

--NEW PICK BUTTON AND HANDLER:

pickbutton pickMesh "Pick Mesh" width:90 height:30 pos:[bitmapX+5,140] filter:mesh_filter autodisplay:true

on pickMesh picked obj do

(

if obj != undefined do

(

theObj = Obj

try

(

copy theObj.material.diffusemap.bitmap theCanvasBitmap

copy theObj.material.diffusemap.bitmap theBackgroundBitmap

theCanvas.bitmap = theCanvasBitmap

)catch()

)

)

--END NEW PICK BUTTON AND HANDLER

fn paintBrush pos =

(

if isErasing then

thePaintColor = (getPixels theBackgroundBitmap pos 1)[1]

else

thePaintColor = inkColor.color

if thePaintColor == undefined then thePaintColor = white

case BrushShape.selection of

(

1: (

if distance pos currentPos <= BrushSize.value/2 do

setPixels theCanvasBitmap pos #(thePaintColor)

)

2: setPixels theCanvasBitmap pos #(thePaintColor)

3: (

theFactor = (distance pos currentPos) / (BrushSize.value/2.0)

if theFactor <= 1.0 do

(

theFactor = sin ( 90.0 * theFactor)

thePixels = getPixels theCanvasBitmap pos 1

if thePixels[1] != undefined do

(

thePixels[1] = (thePixels[1] * theFactor) + (thePaintColor * (1.0 - theFactor))

setPixels theCanvasBitmap pos thePixels

)

)

)--end case 3

)--end case

)--end fn

fn drawStroke lastPos pos drawIt: =

(

currentPos = lastPos

deltaX = pos.x - lastPos.x

deltaY = pos.y - lastPos.y

maxSteps = amax #(abs(deltaX),abs(deltaY))

deltaStepX = deltaX / maxSteps

deltaStepY = deltaY / maxSteps

for i = 0 to maxSteps do

(

if airBrush.checked then

for b = 1 to (BrushSize.value / AirBrushSpeed.value) do

paintBrush (currentPos + (random [-BrushSize.value/2,-BrushSize.value/2] [BrushSize.value/2,BrushSize.value/2] ))

else

for b = -BrushSize.value/2 to BrushSize.value/2 do

for c = -BrushSize.value/2 to BrushSize.value/2 do

paintBrush (currentPos + [c,b])

currentPos += [deltaStepX, deltaStepY]

)

if drawIt== true or drawIt == unsupplied do theCanvas.bitmap = theCanvasBitmap

)

--NEW UNWRAP TEXTURE FUNCTION STARTS HERE

fn unwrapTexture =

(

if theObj != undefined then

(

theMesh = snapshotAsMesh theObj

if meshop.getMapSupport theMesh theChannel do

(

faceCount = meshop.getNumMapFaces theMesh theChannel

for f = 1 to faceCount do

(

theFace = meshop.getMapFace theMesh theChannel f

vert1= meshop.getMapVert theMesh theChannel theFace.x

vert2= meshop.getMapVert theMesh theChannel theFace.y

vert3= meshop.getMapVert theMesh theChannel theFace.z

drawStroke [vert1.x * bitmapx_1, bitmapy_1 - vert1.y * bitmapy_1] [vert2.x * bitmapx_1, bitmapy_1 - vert2.y * bitmapy_1] drawIt:false

drawStroke [vert1.x * bitmapx_1, bitmapy_1 - vert1.y * bitmapy_1] [vert3.x * bitmapx_1, bitmapy_1 - vert3.y * bitmapy_1] drawIt:false

drawStroke [vert3.x * bitmapx_1, bitmapy_1 - vert3.y * bitmapy_1] [vert2.x * bitmapx, bitmapy_1 - vert2.y * bitmapy_1] drawIt:false

)

)

theCanvas.bitmap = theCanvasBitmap

save theCanvasBitmap

if theObj.material == undefined do theObj.material = Standard()

if theObj.material.diffusemap == undefined do

theObj.material.diffusemap = bitmapTexture filename:temp_bitmap_filename

showTextureMap theObj.material true

autoSave.checked = true

)

)

--NEW UNWRAP TEXTURE FUNCTION END HERE

on autoSave changed state do if state do save theCanvasBitmap

on MicroPaint_CanvasRollout lbuttondown pos do

(

lastPos = pos

isDrawing = true

isErasing = false

drawStroke lastPos pos

)

on MicroPaint_CanvasRollout rbuttondown pos do

(

lastPos = pos

isErasing = isDrawing = true

drawStroke lastPos pos

)

on MicroPaint_CanvasRollout lbuttonup pos do

(

isErasing = isDrawing = false

if autoSave.checked do save theCanvasBitmap

)

on MicroPaint_CanvasRollout rbuttonup pos do

(

isErasing = isDrawing = false

if autoSave.checked do save theCanvasBitmap

)

on MicroPaint_CanvasRollout mousemove pos do

(

if isDrawing do drawStroke lastPos pos

lastPos = pos

)

)

createDialog MicroPaint_CanvasRollout (bitmapx+100) (bitmapy+30) menu:CanvasMenu

MicroPaint_CanvasRollout.theCanvas.bitmap = theBackgroundBitmap

)

Step-By-Step

--Code in green has not changes since the previous version!

macroScript MicroPaint category:"HowTo"

(

global MicroPaint_CanvasRollout

try(destroyDialog MicroPaint_CanvasRollout)catch()

local isErasing = isDrawing = false

local bitmapX = bitmapY = 512

local bitmapx_1 = bitmapx-1

local bitmapy_1 = bitmapy-1

In order to calculate the position of the UV coordinates inside the bitmap, we have to count the pixels as the size of the bitmap minus one (for example, 0 to 511 and not 1 to 512). To make out life easier, we define two variables to store these corrected values.

local temp_bitmap_filename = (getDir #preview +"/microPaint_temp.tga")

local theCanvasBitmap = bitmap bitmapX bitmapY color:white filename:temp_bitmap_filename

In order to be able to save the current painting to a temporary file on disk, we have to define a file name and assign it to the bitmap. The file name is stored in a local variable which will be used in other parts of the script to access it. TGA appears to be faster to save than BMP for example, but you can save to any format you want.

local theBackgroundBitmap = bitmap bitmapX bitmapY color:white

local currentPos = lastPos = [0,0]

local theChannel = 1

This is the map channel to read from. You could add a User Interface spinner to control its value... For now, we will work with channel 1 only.

local theObj = undefined

This variable will store the mesh object to access the UV coordinates from.

rcMenu CanvasMenu

(

subMenu "File"

(

menuItem new_menu "New"

menuItem open_menu "Open..."

menuItem save_as "Save As..."

separator file_menu_1

menuItem quit_tool "Quit"

)

subMenu "Edit"

(

menuItem commit_menu "Commit Changes"

separator edit_menu_1

menuItem uv_menu "Get UV Coordinates..."

)

We add a new menu item which will be used to acquire texture coordinates from a scene object.

on commit_menu picked do copy theCanvasBitmap theBackgroundBitmap

on uv_menu picked do MicroPaint_CanvasRollout.unwrapTexture()

If the user picked the menu item, we call a new function which will be defined inside the rollout. (see below)

subMenu "Help"

(

menuItem about_tool "About MicroPaint..."

)

on new_menu picked do

(

theBackgroundBitmap = theCanvasBitmap = bitmap bitmapX bitmapY color:MicroPaint_CanvasRollout.paperColor.color filename:temp_bitmap_filename

MicroPaint_CanvasRollout.theCanvas.bitmap = theCanvasBitmap

)

on open_menu picked do

(

theOpenBitmap= selectBitmap()

if theOpenBitmap != undefined do

(

copy theOpenBitmap theCanvasBitmap

copy theOpenBitmap theBackgroundBitmap

close theOpenBitmap

MicroPaint_CanvasRollout.theCanvas.bitmap = theCanvasBitmap

)

)

on save_as picked do

(

theSaveName = getSaveFileName types:"BMP (*.bmp)|*.bmp|Targa (*.tga)|*.tga|JPEG (*.jpg)|*.jpg"

if theSaveName != undefined do

(

theCanvasBitmap.filename = theSaveName

save theCanvasBitmap

theCanvasBitmap.filename = temp_bitmap_filename

After saving to a new file name, set back the filename to the temporary location, otherwise autosaving would start writing into the new file and we don't want this to happen!

)

)

on about_tool picked do messagebox "MicroPaint\nMAXScript Tutorial" title:"About..."

on quit_tool picked do destroyDialog MicroPaint_CanvasRollout

)

fn mesh_filter obj = superclassof obj == GeometryClass and classof obj != TargetObject

This function allows us to pick only geometry objects except target objects. It will be used as a filter function by a new pickbutton User Interface control.

rollout MicroPaint_CanvasRollout "MicroPaint"

(

bitmap theCanvas pos:[0,0] width:bitmapX height:bitmapY bitmap:theCanvasBitmap

colorpicker inkColor height:16 modal:false color:black across:6

To accommodate the new autoSave option, we increase the across parameter to 6.

colorpicker paperColor height:16 modal:false color:white

checkbutton autoSave "AutoSave" width:70

This new checkbutton will control whether the paiting is constantly saved to disk after each stroke.

checkbutton airBrush "AirBrush" width:70

spinner AirBrushSpeed "Speed" range:[0.1,50,10] fieldwidth:30

spinner BrushSize "Size" range:[1,50,1] type:#integer fieldwidth:40

The default brush size is now 1. This is to avoid drawing a texture unwrapping with a thickness of 10 which can be very slow...

listbox BrushShape items:#("Circle", "Box", "Circle Smooth") pos:[bitmapX+5,0] width:90

pickbutton pickMesh "Pick Mesh" width:90 height:30 pos:[bitmapX+5,140] filter:mesh_filter autodisplay:true

This pickbutton will be used to select the scene object to unwrap the texture coordinates. It uses the new optional keyword autoDisplay added to 3ds Max 7. When set to true, it will display the name of the picked object on the button automatically. In 3ds Max 6 and earlier, the option will be ignored, but the script will still function correctly!

Pickbutton

on pickMesh picked obj do

(

This is the event handler of the pickbutton. If the user picked an object, it will be passed to the handler in the obj variable.

if obj != undefined do

(

If the obj variable contains a valid object (in other words, the user did not cancel the picking), then

theObj = Obj

we first assign the picked object to our new variable which will store the pick during the painting session.

try

(

copy theObj.material.diffusemap.bitmap theCanvasBitmap

copy theObj.material.diffusemap.bitmap theBackgroundBitmap

theCanvas.bitmap = theCanvasBitmap

Then we try to read the diffusemap bitmap of the object and copy it into the canvas and background bitmaps of the painting tool, then assign it to the UI.

If there is no bitmap there, the error will be trapped and nothing will happen.

)catch()

)

)

fn paintBrush pos =

(

if isErasing then

thePaintColor = (getPixels theBackgroundBitmap pos 1)[1]

else

thePaintColor = inkColor.color

if thePaintColor == undefined then thePaintColor = white

case BrushShape.selection of

(

1: (

if distance pos currentPos <= BrushSize.value/2 do

setPixels theCanvasBitmap pos #(thePaintColor)

)

2: setPixels theCanvasBitmap pos #(thePaintColor)

3: (

theFactor = (distance pos currentPos) / (BrushSize.value/2.0)

if theFactor <= 1.0 do

(

theFactor = sin ( 90.0 * theFactor)

thePixels = getPixels theCanvasBitmap pos 1

if thePixels[1] != undefined do

(

thePixels[1] = (thePixels[1] * theFactor) + (thePaintColor * (1.0 - theFactor))

setPixels theCanvasBitmap pos thePixels

)

)

)--end case 3

)--end case

)--end fn

fn drawStroke lastPos pos drawIt: =

(

We add a new optional keyword to the drawStroke function. If it is set to false, the stroke will be drawn but the bitmap will not be updated in the rollout. If it is true or not supplied, the bitmap will be updated after the stroke. This is to allow for faster drawing of the unwrapped texture without updating the view after each texture face!

currentPos = lastPos

deltaX = pos.x - lastPos.x

deltaY = pos.y - lastPos.y

maxSteps = amax #(abs(deltaX),abs(deltaY))

deltaStepX = deltaX / maxSteps

deltaStepY = deltaY / maxSteps

for i = 0 to maxSteps do

(

if airBrush.checked then

for b = 1 to (BrushSize.value / AirBrushSpeed.value) do

paintBrush (currentPos + (random [-BrushSize.value/2,-BrushSize.value/2] [BrushSize.value/2,BrushSize.value/2] ))

else

for b = -BrushSize.value/2 to BrushSize.value/2 do

for c = -BrushSize.value/2 to BrushSize.value/2 do

paintBrush (currentPos + [c,b])

currentPos += [deltaStepX, deltaStepY]

)

if drawIt== true or drawIt == unsupplied do theCanvas.bitmap = theCanvasBitmap

If the new switch is set to true or not set at all, we update the display as before, otherwise the update is skipped!

)

fn unwrapTexture =

(

This is the new function which performs the selection of an object, the unwrapping of the texture coordinates and the material/texture assignment.

if theObj != undefined then

(

If the user clicked a valid object...

theMesh = snapshotAsMesh theObj

...we extract the mesh from the top of its stack.

if meshop.getMapSupport theMesh theChannel do

(

If the selected object supports the specified channel,

faceCount = meshop.getNumMapFaces theMesh theChannel

we read the number of texture faces in that channel...

for f = 1 to faceCount do

(

...and repeat the following code for every face found in the mesh:

theFace = meshop.getMapFace theMesh theChannel f

This is the map face definition. It returns a Point3 value where .x .y and .z are indices pointing at the texture vertices the face is using.

vert1= meshop.getMapVert theMesh theChannel theFace.x

vert2= meshop.getMapVert theMesh theChannel theFace.y

vert3= meshop.getMapVert theMesh theChannel theFace.z

Using this data, we read the 3 vertices of the face. Each one is a Point3 value containing the actual U, V and W values. We will draw only the UV and discard the W though.

drawStroke [vert1.x * bitmapx_1, bitmapy_1 - vert1.y * bitmapy_1] [vert2.x * bitmapx_1, bitmapy_1 - vert2.y * bitmapy_1] drawIt:false

We call the drawStroke function using the first and second texture vertex coordinates multiplied by the size of the bitmap. The flag drawIt is set to false to speed up the generation of the image. If you would change it to true, you could watch the function drawing interactively in the image, but this could take a very long time.

The calculation of the coordinates is based on the fact that the lower left corner of the UV space has coordinates 0,0 and the upper right has coordinates 1,1.

The bitmap on the other hand has its UPPER left corner as 0,0 and its lower right corner as bitmapx-1,bitmapy-1 (511,511 in our example).

So in order to convert the UV coordinates in pixel coordinates, we multiply the width resp. height of the bitmap by the U resp. V value, and turn the vertical result upside-down by subtracting from the height.

drawStroke [vert1.x * bitmapx_1, bitmapy_1 - vert1.y * bitmapy_1] [vert3.x * bitmapx_1, bitmapy_1 - vert3.y * bitmapy_1] drawIt:false

drawStroke [vert3.x * bitmapx_1, bitmapy_1 - vert3.y * bitmapy_1] [vert2.x * bitmapx_1, bitmapy_1 - vert2.y * bitmapy_1] drawIt:false

We call the drawStroke function for the other two pairs of vertices, thus drawing all edges of the face.

)

)

theCanvas.bitmap = theCanvasBitmap

Now we can update the rollout bitmap to show the result.

save theCanvasBitmap

We can also save the bitmap to its temporary location.

if theObj.material == undefined do theObj.material = Standard()

If the selected object has no material, we assign a new material.

try

(if theObj.material.diffusemap == undefined do

theObj.material.diffusemap = bitmapTexture filename:temp_bitmap_filename

If the selected object's diffusemap is not defined yet, we try to assign a new texure map pointing at the temporary copy of our painting. If the object does not have a standard material assigned, trying to access the diffusemap channel will cause an error which will be prevented by the try()catch() context.

showTextureMap theObj.material true

We press the Show Map In Viewport of the material at object level. If the texture assignment was successful, the bitmap should be shown in the viewport.

autoSave.checked = true

If everything went ok, we can also turn the new autosave option on to force the bitmap to update on the selected object as you paint...

)catch()

)

)

on autoSave changed state do if state do save theCanvasBitmap

If the user checked the new checkbutton, the bitmap will be saved to its temporary location immediately.

on MicroPaint_CanvasRollout lbuttondown pos do

(

lastPos = pos

isDrawing = true

isErasing = false

drawStroke lastPos pos

)

on MicroPaint_CanvasRollout rbuttondown pos do

(

lastPos = pos

isErasing = isDrawing = true

drawStroke lastPos pos

)

on MicroPaint_CanvasRollout lbuttonup pos do

(

isErasing = isDrawing = false

if autoSave.checked do save theCanvasBitmap

If the new checkbutton is pressed, the bitmap will be saved to its temporary location after each stroke.

)

on MicroPaint_CanvasRollout rbuttonup pos do

(

isErasing = isDrawing = false

if autoSave.checked do save theCanvasBitmap

If the new checkbutton is pressed, the bitmap will be saved to its temporary location after each erase stroke.

)

on MicroPaint_CanvasRollout mousemove pos do

(

if isDrawing do drawStroke lastPos pos

lastPos = pos

)

)

createDialog MicroPaint_CanvasRollout (bitmapx+100) (bitmapy+30) menu:CanvasMenu

MicroPaint_CanvasRollout.theCanvas.bitmap = theBackgroundBitmap

)

RESULT:

In this example, Unwrap UVW modifier was applied to a teapot and the Flatten function was used to create new texture coordinates.

Then the object was selected in MicroPaint and the texture coordinates were drawn using the Circular Smooth brush with size 5, Airbrush turned on and Airbrush Speed set to 1.0.

This is the teapot as seen in the viewport:

Now you can start painting on top of the UV coordinates using all available brushes - as long as the AutoSave button is checked, all your strokes should update in the viewports:

Previous Tutorial:

How To ... Develop a Bitmap Painting Tool - Erase Changes

Next Tutorial:

How To ... Develop a Bitmap Painting Tool - 3D Painting

See also

"How To" Tutorials Index Page


How To ... Develop a Bitmap Painting Tool - 3D Painting

How To > Develop a Bitmap Painting Tool - 3D Painting

In this even more exciting step of the Bitmap Painting tool development, we will add the option to directly paint on scene object in the 3ds Max viewports!

NATURAL LANGUAGE

We will add a new checkbutton to the User Interface to enable and disable the 3D Painting.

We will define a couple of simple functions using thePainterInterface to control the brush in the viewport, read the UV coordinates of the faces it is painting on and draw in the corresponding area of the bitmap.

SCRIPT:

macroScript MicroPaint category:"HowTo"

(

global MicroPaint_CanvasRollout

try(destroyDialog MicroPaint_CanvasRollout)catch()

local isErasing = isDrawing = false

local bitmapX = bitmapY = 512

local bitmapx_1 = bitmapx-1

local bitmapy_1 = bitmapy-1

local temp_bitmap_filename = (getDir #preview +"/microPaint_temp.tga")

local theCanvasBitmap = bitmap bitmapX bitmapY color:white filename:temp_bitmap_filename

local theBackgroundBitmap = bitmap bitmapX bitmapY color:white

local currentPos = lastPos = [0,0]

local theChannel = 1

local theObj = undefined

local bary = [0,0,0]

local faceIndex = 1

rcMenu CanvasMenu

(

subMenu "File"

(

menuItem new_menu "New"

menuItem open_menu "Open..."

menuItem save_as "Save As..."

separator file_menu_1

menuItem quit_tool "Quit"

)

subMenu "Edit"

(

menuItem commit_menu "Commit Changes"

separator edit_menu_1

menuItem uv_menu "Get UV Coordinates..."

menuItem paint3d_menu "Toggle 3D Painting..."

)

on commit_menu picked do copy theCanvasBitmap theBackgroundBitmap

on uv_menu picked do MicroPaint_CanvasRollout.unwrapTexture()

on paint3d_menu picked do MicroPaint_CanvasRollout.startPainting3D()

subMenu "Help"

(

menuItem about_tool "About MicroPaint..."

)

on new_menu picked do

(

theBackgroundBitmap = theCanvasBitmap = bitmap bitmapX bitmapY color:MicroPaint_CanvasRollout.paperColor.color filename:temp_bitmap_filename

MicroPaint_CanvasRollout.theCanvas.bitmap = theCanvasBitmap

)

on open_menu picked do

(

theOpenBitmap= selectBitmap()

if theOpenBitmap != undefined do

(

copy theOpenBitmap theCanvasBitmap

copy theOpenBitmap theBackgroundBitmap

close theOpenBitmap

MicroPaint_CanvasRollout.theCanvas.bitmap = theCanvasBitmap

)

)

on save_as picked do

(

theSaveName = getSaveFileName types:"BMP (*.bmp)|*.bmp|Targa (*.tga)|*.tga|JPEG (*.jpg)|*.jpg"

if theSaveName != undefined do

(

theCanvasBitmap.filename = theSaveName

save theCanvasBitmap

theCanvasBitmap.filename = temp_bitmap_filename

)

)

on about_tool picked do messagebox "MicroPaint\nMAXScript Tutorial" title:"About..."

on quit_tool picked do destroyDialog MicroPaint_CanvasRollout

)

fn mesh_filter obj = superclassof obj == GeometryClass and classof obj != TargetObject

rollout MicroPaint_CanvasRollout "MicroPaint"

(

bitmap theCanvas pos:[0,0] width:bitmapX height:bitmapY bitmap:theCanvasBitmap

colorpicker inkColor height:16 modal:false color:black across:6

colorpicker paperColor height:16 modal:false color:white

checkbutton autoSave "AutoSave" width:70 offset:[0,-3] highlightcolor:(color 255 200 200)

checkbutton airBrush "AirBrush" width:70 offset:[0,-3] highlightcolor:(color 200 255 200)

spinner AirBrushSpeed "Speed" range:[0.1,50,10] fieldwidth:30

spinner BrushSize "Size" range:[1,50,1] type:#integer fieldwidth:40

listbox BrushShape items:#("Circle", "Box", "Circle Smooth") pos:[bitmapX+5,0] width:90

pickbutton pickMesh "Pick Mesh" width:90 height:30 highlightcolor:(color 200 200 255) pos:[bitmapX+5,140] filter:mesh_filter autodisplay:true

on pickMesh picked obj do

(

if obj != undefined do

  (

   theObj = Obj

   try

   (

    copy theObj.material.diffusemap.bitmap theCanvasBitmap

    copy theObj.material.diffusemap.bitmap theBackgroundBitmap

    theCanvas.bitmap = theCanvasBitmap

   )catch()

  )

)

checkbutton paint3D "3D PAINT" width:90 height:50 highlightcolor:(color 200 200 255) pos:[bitmapX+5,180]

fn paintBrush pos =

(

if isErasing then

thePaintColor = (getPixels theBackgroundBitmap pos 1)[1]

else

thePaintColor = inkColor.color

if thePaintColor == undefined then thePaintColor = white

case BrushShape.selection of

(

1: (

if distance pos currentPos <= BrushSize.value/2 do

setPixels theCanvasBitmap pos #(thePaintColor)

)

2: setPixels theCanvasBitmap pos #(thePaintColor)

3: (

theFactor = (distance pos currentPos) / (BrushSize.value/2.0)

if theFactor <= 1.0 do

(

theFactor = sin ( 90.0 * theFactor)

thePixels = getPixels theCanvasBitmap pos 1

if thePixels[1] != undefined do

(

thePixels[1] = (thePixels[1] * theFactor) + (thePaintColor * (1.0 - theFactor))

setPixels theCanvasBitmap pos thePixels

)

)

)--end case 3

)--end case

)--end fn

fn drawStroke lastPos pos drawIt: =

(

currentPos = lastPos

deltaX = pos.x - lastPos.x

deltaY = pos.y - lastPos.y

maxSteps = amax #(abs(deltaX),abs(deltaY))

deltaStepX = deltaX / maxSteps

deltaStepY = deltaY / maxSteps

for i = 0 to maxSteps do

(

if airBrush.checked then

for b = 1 to (BrushSize.value / AirBrushSpeed.value) do

paintBrush (currentPos + (random [-BrushSize.value/2,-BrushSize.value/2] [BrushSize.value/2,BrushSize.value/2] ))

else

for b = -BrushSize.value/2 to BrushSize.value/2 do

for c = -BrushSize.value/2 to BrushSize.value/2 do

paintBrush (currentPos + [c,b])

currentPos += [deltaStepX, deltaStepY]

)

if drawIt== true or drawIt == unsupplied do theCanvas.bitmap = theCanvasBitmap

)

fn unwrapTexture =

(

if theObj != undefined then

(

theMesh = snapshotAsMesh theObj

if meshop.getMapSupport theMesh theChannel do

(

faceCount = meshop.getNumMapFaces theMesh theChannel

for f = 1 to faceCount do

(

theFace = meshop.getMapFace theMesh theChannel f

vert1= meshop.getMapVert theMesh theChannel theFace.x

vert2= meshop.getMapVert theMesh theChannel theFace.y

vert3= meshop.getMapVert theMesh theChannel theFace.z

drawStroke [vert1.x * bitmapx_1, bitmapy_1 - vert1.y * bitmapy_1] [vert2.x * bitmapx_1, bitmapy_1 - vert2.y * bitmapy_1] drawIt:false

drawStroke [vert1.x * bitmapx_1, bitmapy_1 - vert1.y * bitmapy_1] [vert3.x * bitmapx_1, bitmapy_1 - vert3.y * bitmapy_1] drawIt:false

drawStroke [vert3.x * bitmapx_1, bitmapy_1 - vert3.y * bitmapy_1] [vert2.x * bitmapx_1, bitmapy_1 - vert2.y * bitmapy_1] drawIt:false

)

)

theCanvas.bitmap = theCanvasBitmap

save theCanvasBitmap

if theObj.material == undefined do theObj.material = Standard()

if theObj.material.diffusemap == undefined do

theObj.material.diffusemap = bitmapTexture filename:temp_bitmap_filename

showTextureMap theObj.material true

autoSave.checked = true

)

)

fn StartStroke = ( thePainterInterface.undoStart() )

fn PaintStroke =

(

theMesh = theObj.mesh

thePainterInterface.getHitFaceData &bary &faceIndex theObj 0

theFace = meshop.getMapFace theMesh theChannel faceIndex

vert1= meshop.getMapVert theMesh theChannel theFace.x

vert2= meshop.getMapVert theMesh theChannel theFace.y

vert3= meshop.getMapVert theMesh theChannel theFace.z

thePoint = bary.x*vert1 + bary.y*vert2 + bary.z*vert3

drawStroke [thePoint.x * bitmapx_1, bitmapy_1 - thePoint.y * bitmapy_1] [thePoint.x * bitmapx_1, bitmapy_1 - thePoint.y * bitmapy_1]

thePainterInterface.clearStroke()

)

fn EndStroke =

(

thePainterInterface.undoAccept()

if autoSave.checked do

(

save theCanvasBitmap

try(theObj.material.diffsemap.bitmap = theCanvasBitmap)catch()

)

)

fn CancelStroke = (thePainterInterface.undoCancel())

fn SystemEndPaintSession = ( paint3D.checked = false )

fn startPainting3D =

(

if thePainterInterface.InPaintMode() or theObj == undefined then

(

thePainterInterface.EndPaintSession()

paint3D.checked = false

)

else

(

paint3D.checked = true

thePainterInterface.pointGatherEnable = TRUE

thePainterInterface.initializeNodes 0 #(theObj)

thePainterInterface.offMeshHitType = 2

thePainterInterface.ScriptFunctions startStroke paintStroke endStroke cancelStroke SystemEndPaintSession

thePainterInterface.startPaintSession()

)

)

on paint3D changed state do startPainting3D()

on MicroPaint_CanvasRollout lbuttondown pos do

(

lastPos = pos

isDrawing = true

isErasing = false

drawStroke lastPos pos

)

on MicroPaint_CanvasRollout rbuttondown pos do

(

lastPos = pos

isErasing = isDrawing = true

drawStroke lastPos pos

)

on MicroPaint_CanvasRollout lbuttonup pos do

(

isErasing = isDrawing = false

if autoSave.checked do save theCanvasBitmap

)

on MicroPaint_CanvasRollout rbuttonup pos do

(

isErasing = isDrawing = false

if autoSave.checked do save theCanvasBitmap

)

on autoSave changed state do if state do save theCanvasBitmap

on MicroPaint_CanvasRollout mousemove pos do

(

if isDrawing do drawStroke lastPos pos

lastPos = pos

)

)

createDialog MicroPaint_CanvasRollout (bitmapx+100) (bitmapy+30) menu:CanvasMenu

MicroPaint_CanvasRollout.theCanvas.bitmap = theBackgroundBitmap

)

Step-By-Step

--Code in green has not changes since the previous version!

macroScript MicroPaint category:"HowTo"

(

global MicroPaint_CanvasRollout

try(destroyDialog MicroPaint_CanvasRollout)catch()

local isErasing = isDrawing = false

local bitmapX = bitmapY = 512

local bitmapx_1 = bitmapx-1

local bitmapy_1 = bitmapy-1

local temp_bitmap_filename = (getDir #preview +"/microPaint_temp.tga")

local theCanvasBitmap = bitmap bitmapX bitmapY color:white filename:temp_bitmap_filename

local theBackgroundBitmap = bitmap bitmapX bitmapY color:white

local currentPos = lastPos = [0,0]

local theChannel = 1

local theObj = undefined

local bary = [0,0,0]

This variable will be used by the PainterInterface to return the Barycentric Coordinates of the hit point inside the face.

local faceIndex = 1

This variable will be used by the PainterInterface to return the index of the face that has been hit.

rcMenu CanvasMenu

(

subMenu "File"

(

menuItem new_menu "New"

menuItem open_menu "Open..."

menuItem save_as "Save As..."

separator file_menu_1

menuItem quit_tool "Quit"

)

subMenu "Edit"

(

menuItem commit_menu "Commit Changes"

separator edit_menu_1

menuItem uv_menu "Get UV Coordinates..."

menuItem paint3d_menu "Toggle 3D Painting..."

This is the new "Toggle 3D Painting" menu item. We will also add a very prominent button to the main User Interface...

)

on commit_menu picked do copy theCanvasBitmap theBackgroundBitmap

on uv_menu picked do MicroPaint_CanvasRollout.unwrapTexture()

on paint3d_menu picked do MicroPaint_CanvasRollout.startPainting3D()

This is the handler of the new "Toggle 3D Painting" menu item. It calls a function that will toggle the PainterInterface on and off.

subMenu "Help"

(

menuItem about_tool "About MicroPaint..."

)

on new_menu picked do

(

theBackgroundBitmap = theCanvasBitmap = bitmap bitmapX bitmapY color:MicroPaint_CanvasRollout.paperColor.color filename:temp_bitmap_filename

MicroPaint_CanvasRollout.theCanvas.bitmap = theCanvasBitmap

)

on open_menu picked do

(

theOpenBitmap= selectBitmap()

if theOpenBitmap != undefined do

(

copy theOpenBitmap theCanvasBitmap

copy theOpenBitmap theBackgroundBitmap

close theOpenBitmap

MicroPaint_CanvasRollout.theCanvas.bitmap = theCanvasBitmap

)

)

on save_as picked do

(

theSaveName = getSaveFileName types:"BMP (*.bmp)|*.bmp|Targa (*.tga)|*.tga|JPEG (*.jpg)|*.jpg"

if theSaveName != undefined do

(

theCanvasBitmap.filename = theSaveName

save theCanvasBitmap

theCanvasBitmap.filename = temp_bitmap_filename

)

)

on about_tool picked do messagebox "MicroPaint\nMAXScript Tutorial" title:"About..."

on quit_tool picked do destroyDialog MicroPaint_CanvasRollout

)

fn mesh_filter obj = superclassof obj == GeometryClass and classof obj != TargetObject

rollout MicroPaint_CanvasRollout "MicroPaint"

(

bitmap theCanvas pos:[0,0] width:bitmapX height:bitmapY bitmap:theCanvasBitmap

colorpicker inkColor height:16 modal:false color:black across:6

colorpicker paperColor height:16 modal:false color:white

checkbutton autoSave "AutoSave" width:70 offset:[0,-3] highlightcolor:(color 255 200 200)

checkbutton airBrush "AirBrush" width:70 offset:[0,-3] highlightcolor:(color 200 255 200)

spinner AirBrushSpeed "Speed" range:[0.1,50,10] fieldwidth:30

spinner BrushSize "Size" range:[1,50,1] type:#integer fieldwidth:40

listbox BrushShape items:#("Circle", "Box", "Circle Smooth") pos:[bitmapX+5,0] width:90

pickbutton pickMesh "Pick Mesh" width:90 height:30 highlightcolor:(color 200 200 255) pos:[bitmapX+5,140] filter:mesh_filter autodisplay:true

on pickMesh picked obj do

(

if obj != undefined do

(

theObj = Obj

try

(

copy theObj.material.diffusemap.bitmap theCanvasBitmap

copy theObj.material.diffusemap.bitmap theBackgroundBitmap

theCanvas.bitmap = theCanvasBitmap

)catch()

)

)

checkbutton paint3D "3D PAINT" width:90 height:50 highlightcolor:(color 200 200 255) pos:[bitmapX+5,180]

This is the new checkbutton controlling the painting in 3D space. It will turn blue when enabled.

fn paintBrush pos =

(

if isErasing then

thePaintColor = (getPixels theBackgroundBitmap pos 1)[1]

else

thePaintColor = inkColor.color

if thePaintColor == undefined then thePaintColor = white

case BrushShape.selection of

(

1: (

if distance pos currentPos <= BrushSize.value/2 do

setPixels theCanvasBitmap pos #(thePaintColor)

)

2: setPixels theCanvasBitmap pos #(thePaintColor)

3: (

theFactor = (distance pos currentPos) / (BrushSize.value/2.0)

if theFactor <= 1.0 do

(

theFactor = sin ( 90.0 * theFactor)

thePixels = getPixels theCanvasBitmap pos 1

if thePixels[1] != undefined do

(

thePixels[1] = (thePixels[1] * theFactor) + (thePaintColor * (1.0 - theFactor))

setPixels theCanvasBitmap pos thePixels

)

)

)--end case 3

)--end case

)--end fn

fn drawStroke lastPos pos drawIt: =

(

currentPos = lastPos

deltaX = pos.x - lastPos.x

deltaY = pos.y - lastPos.y

maxSteps = amax #(abs(deltaX),abs(deltaY))

deltaStepX = deltaX / maxSteps

deltaStepY = deltaY / maxSteps

for i = 0 to maxSteps do

(

if airBrush.checked then

for b = 1 to (BrushSize.value / AirBrushSpeed.value) do

paintBrush (currentPos + (random [-BrushSize.value/2,-BrushSize.value/2] [BrushSize.value/2,BrushSize.value/2] ))

else

for b = -BrushSize.value/2 to BrushSize.value/2 do

for c = -BrushSize.value/2 to BrushSize.value/2 do

paintBrush (currentPos + [c,b])

currentPos += [deltaStepX, deltaStepY]

)

if drawIt== true or drawIt == unsupplied do theCanvas.bitmap = theCanvasBitmap

)

on pickMesh picked obj do if obj != undefined do theObj = Obj

fn unwrapTexture =

(

if theObj != undefined then

(

theMesh = snapshotAsMesh theObj

if meshop.getMapSupport theMesh theChannel do

(

faceCount = meshop.getNumMapFaces theMesh theChannel

for f = 1 to faceCount do

(

theFace = meshop.getMapFace theMesh theChannel f

vert1= meshop.getMapVert theMesh theChannel theFace.x

vert2= meshop.getMapVert theMesh theChannel theFace.y

vert3= meshop.getMapVert theMesh theChannel theFace.z

drawStroke [vert1.x * bitmapx_1, bitmapy_1 - vert1.y * bitmapy_1] [vert2.x * bitmapx_1, bitmapy_1 - vert2.y * bitmapy_1] drawIt:false

drawStroke [vert1.x * bitmapx_1, bitmapy_1 - vert1.y * bitmapy_1] [vert3.x * bitmapx_1, bitmapy_1 - vert3.y * bitmapy_1] drawIt:false

drawStroke [vert3.x * bitmapx_1, bitmapy_1 - vert3.y * bitmapy_1] [vert2.x * bitmapx_1, bitmapy_1 - vert2.y * bitmapy_1] drawIt:false

)

)

theCanvas.bitmap = theCanvasBitmap

save theCanvasBitmap

if theObj.material == undefined do theObj.material = Standard()

if theObj.material.diffusemap == undefined do

theObj.material.diffusemap = bitmapTexture filename:temp_bitmap_filename

showTextureMap theObj.material true

autoSave.checked = true

)

)

fn StartStroke = ( thePainterInterface.undoStart() )

This function is executed in the beginning of a stroke. See the PainterInterface documentation for details.

fn PaintStroke =

(

This function performs the painting of a stroke in 3D.

theMesh = theObj.mesh

We take a copy of the TriMesh of the object to paint on.

thePainterInterface.getHitFaceData &bary &faceIndex theObj 0

Then we call this function to get the last face that was hit by the brush (last argument is face index 0 which means "get the last hit"). The variables bary and faceIndex we defined in the beginning of the script are passed "by reference" - the function will write the results into them. After the call, bary will contain the Barycentric coordinates of the hit point inside the face, and faceIndex will contain the index of the face that was last hit. theObj is the variable containing the object we selected in the scene to paint on.

theFace = meshop.getMapFace theMesh theChannel faceIndex

Using this data we get the map face in channel 1 with the same index as the mesh face that was hit.

vert1= meshop.getMapVert theMesh theChannel theFace.x

vert2= meshop.getMapVert theMesh theChannel theFace.y

vert3= meshop.getMapVert theMesh theChannel theFace.z

Next, we read the texture vertices referenced by the map face.

thePoint = bary.x*vert1 + bary.y*vert2 + bary.z*vert3

 drawStroke [thePoint.x * bitmapx_1, bitmapy_1 - thePoint.y * bitmapy_1] [thePoint.x * bitmapx_1, bitmapy_1 - thePoint.y * bitmapy_1]

Now we can calculate the UV coordinates of the hit point using its barycentric coordinates inside the face and the texture vertex coordinates corresponding to that face.

thePainterInterface.clearStroke()

Finally, we clear the stroke.

)

fn EndStroke =

(

This function is called at the end of a stroke.

thePainterInterface.undoAccept()

Accept the changes in the undo system...

if autoSave.checked do

(

If autosaving is enabled,

save theCanvasBitmap

save the painting to disk

try(theObj.material.diffsemap.bitmap = theCanvasBitmap)catch()

and try to force the bitmap of the diffuse map channel in the object's material to the painting bitmap value.

)

)

fn CancelStroke = (thePainterInterface.undoCancel())

This function is called when the stroke is canceled.

fn SystemEndPaintSession = ( paint3D.checked = false )

This function is called when the painting session is ended. It will make sure the UI button is unchecked if the painting is stopped for some other reason.

fn startPainting3D =

(

This function toggles the 3D Painting.

if thePainterInterface.InPaintMode() or theObj == undefined then

(

If we are already painting or the object is not selected yet,

  thePainterInterface.EndPaintSession()

  paint3D.checked = false

we end the 3D painting session and uncheck the button in the UI.

)

else

(

If the 3D paining is not active and the mesh scene object has been selected already,

paint3D.checked = true

we make sure that the checkbutton is pressed (as we can start this from the Main menu, too!)

thePainterInterface.pointGatherEnable = TRUE

Enable point gathering.

thePainterInterface.initializeNodes 0 #(theObj)

Initialize the PainterInterface with just the single object that was selected

thePainterInterface.offMeshHitType = 2

Set the behavior for the cases the mesh was not hit to 2 which does not require a mesh. Obviously, there will be no face hit and no painting in this case.

thePainterInterface.ScriptFunctions startStroke paintStroke endStroke cancelStroke SystemEndPaintSession

Register all previously defined scripted functions with the PainterInterface and

thePainterInterface.startPaintSession()

start the painting!

)

)

on paint3D changed state do startPainting3D()

If the checkbutton was pressed by the user, call the above function.

on MicroPaint_CanvasRollout lbuttondown pos do

(

lastPos = pos

isDrawing = true

isErasing = false

drawStroke lastPos pos

)

on MicroPaint_CanvasRollout rbuttondown pos do

(

lastPos = pos

isErasing = isDrawing = true

drawStroke lastPos pos

)

on MicroPaint_CanvasRollout lbuttonup pos do

(

isErasing = isDrawing = false

if autoSave.checked do save theCanvasBitmap

)

on MicroPaint_CanvasRollout rbuttonup pos do

(

isErasing = isDrawing = false

if autoSave.checked do save theCanvasBitmap

)

on autoSave changed state do if state do save theCanvasBitmap

on MicroPaint_CanvasRollout mousemove pos do

(

if isDrawing do drawStroke lastPos pos

lastPos = pos

)

)

createDialog MicroPaint_CanvasRollout (bitmapx+100) (bitmapy+30) menu:CanvasMenu

MicroPaint_CanvasRollout.theCanvas.bitmap = theBackgroundBitmap

)

RESULT:

You can paint on both the 3D object and the 2D image at the same time!

Previous Tutorial:

How To ... Develop a Bitmap Painting Tool - Unwrap UV Coordinates

See also

thePainterInterface

"How To" Tutorials Index Page


How To ... Develop a Selected Objects Inspector using ListView ActiveX Control - Part One

How To > Use ActiveX Controls > Develop a Selected Objects Inspector - Part One

This tutorial will demonstrate how to set up an ActiveX Control in a MAXScript rollout to display details about selected scene objects.

Related topics:

ActiveX Controls in MAXScript Rollouts

ListView ActiveX Control

Listview ActiveX functions

ListView ActiveX Control Example

NATURAL LANGUAGE

Create a simple macroScript.

Define a rollout which will be used to create a floating dialog.

The only UI control in the rollout will be a Listview ActiveX Control.

Create a function to define the layout and appearance of the Listview.

Create another function to fill in the data of selected objects into the list

The two functions will be called by the on open event handler whenever the dialog is created (and thus the rollout is opened).

SCRIPT:

macroScript SceneListView category:"HowTo"

(

rollout listview_rollout "ListView Selected"

(

fn initListView lv =

(

lv.gridLines = true

lv.View = #lvwReport

lv.fullRowSelect = true

layout_def = #("Object Name","Object Class","Verts","Faces","Material")

for i in layout_def do

(

column = lv.ColumnHeaders.add()

column.text = I

)

)

fn fillInSpreadSheet lv =

(

for o in selection do

(

li = lv.ListItems.add()

li.text = o.name

sub_li = li.ListSubItems.add()

sub_li.text = (classof o) as string

sub_li = li.ListSubItems.add()

sub_li.text = try((o.mesh.numverts) as string)catch("--")

sub_li = li.ListSubItems.add()

sub_li.text = try((o.mesh.numfaces) as string)catch("--")

sub_li = li.ListSubItems.add()

sub_li.text = (o.material) as string

)

)

activeXControl lv_objects "MSComctlLib.ListViewCtrl" width:490 height:190 align:#center

on listview_rollout open do

(

initListView lv_objects

fillInSpreadSheet lv_objects

)

)

try(destroyDialog listview_rollout)catch()

createDialog listview_rollout 500 200

)

RESULT:

Step-By-Step

macroScript SceneListView category:"HowTo"

(

We start by defining a simple MacroScript with the name SceneListview which will appear in the category "HowTo". Simple (old-style) macroScripts do not have on execute do or on isEnabled event handlers. The code inside the MacroScript definition is executed immediately when the ActionItem (button, menu item or keyboard shortcut) representing the MacroScript is activated.

rollout listview_rollout "ListView Selected"

(

This is the rollout to be created when the MacroScript is executed. It will display the title "ListView Selected". The variable listview_rollout will be local to the macroScript and will be used later on to create a dialog out of the rollout definition.

fn initListView lv =

(

This is the function which will perform the initialization of the ListView ActiveX control we will create. The control itself will be passed as argument to the function.

lv.gridLines = true

We want the ListView Control to display grid lines.

lv.View = #lvwReport

We also want to see the column headers, so we define the view type as lvwReport.

lv.fullRowSelect = true

By setting this property to true, we ensure that selecting a row will select across all columns.

layout_def = #("Object Name","Object Class","Verts","Faces","Material")

This user variable is assigned an array containing the names of the columns to be created.

for i in layout_def do

(

The i loop will go through all elements of the array defined above. Inside the loop, a new column will be created for each entry in the array.

column = lv.ColumnHeaders.add()

By calling the function add() in the ColumnHeaders property of the listview, we add a new column to the list. A reference to the column is returned and written in the user variable "column", so we can now access properties of the column.

column.text = i

For example, we can set the text in the column header to the string stored in the array we are looping through.

)

This is the end of the i loop..

)

This is the end of the function.

fn fillInSpreadSheet lv =

(

This is the function which will fill in the data of the selected scene objects into the Listview ActiveX control. The control itself will be passed as argument to the function.

for o in selection do

(

This loop will iterate through all objects currently selected in the scene. The variable o will contain one object at a time, the loop will repeat as ofter as there are objects in the selection set.

li = lv.ListItems.add()

We add a new row to the Listview.

li.text = o.name

Then we set the text displayed in the first column of the list to the name of the object.

sub_li = li.ListSubItems.add()

Now we add a new sub-item (which is basically the following column) by calling the .add() method in the ListSubItems property of the current listItem (which represents the first column). The result is written into the user variable sub_li

sub_li.text = (classof o) as string

We can now set the .text property of the new column to the class of the current object. Since the result of classof is not a string, we have to explicitly convert it to string before assigning it to the .text property.

sub_li = li.ListSubItems.add()

sub_li.text = try((o.mesh.numverts) as string)catch("--")

We create a third column the same way as above and assign the number of vertices in the mesh of the current object to the .text property of the new column. Since the number of vertices is returned as an integer, we have to convert it to a string before assigning it to the .text property.

Some of the selected objects might not have a .mesh property (for example lights, helpers, cameras, targetObjects etc.) In these cases, trying to access o.mesh.numverts would cause an error. For these cases, we put the try()catch() error trap. If the attempt to read the vertex count fails, we assign the string "--" to the .text property of the sub-list item instead.

sub_li = li.ListSubItems.add()

sub_li.text = try((o.mesh.numfaces) as string)catch("--")

We create another column the same way as above and assign the number of faces in the mesh of the current object to the .text property of the new column. Since the number of faces is returned as an integer, we have to convert it to a string before assigning it to the .text property.

Some of the selected objects might not have a .mesh property (for example lights, helpers, cameras, targetObjects etc.) In these cases, trying to access o.mesh.numfaces would cause an error. For these cases, we put the try()catch() error trap. If the attempt to read the face count fails, we assign the string "--" to the .text property of the sub-list item instead.

sub_li = li.ListSubItems.add()

sub_li.text = (o.material) as string

Finally, we create another column the same way as above and assign the material of the current object to the .text property of the new column. Objects without a material will display "undefined" in the column.

)

)

activeXControl lv_objects "MSComctlLib.ListViewCtrl" width:490 height:190 align:#center

This is it - the ActiveX control we have been processing in the above functions! It is the only user interface element in the rollout. It is centered to the rollout and slightly smaller than the dialog dimensions.

on listview_rollout open do

(

When the rollout is opened for display as a dialog, this event handler will be called.

initListView lv_objects

fillInSpreadSheet lv_objects

We can use the event to both initialize and fill in the listview with the currently selected objects' data.

)

This is the end of the on open event handler.

)

This is the end of the rollout definition.

try(destroyDialog listview_rollout)catch()

Before creating the dialog, we try to close it. Since the variable listview_rollout is local to the MacroScript, calling the MacroScript multiple times will always access the same variable and will be able to close a previously opened dialog before creating a new one.

createDialog listview_rollout 500 200

At the end, we create the dialog using the rollout we defined above.

)

Using the Script

After evaluating the script, you will find a new ActionItem in the "HowTo" category of the Customize User Interface dialog. Assing it to a toolbar, menu, QuadMenu or keyboard shortcut to be able to access it quickly.

Select some scene objects and press the button/select the menu item or press the keyboard shortcut - a new dialog with a listView ActiveX control displaying the name, class, vertex and face count and assigned material should appear.

Select some other object and call the script again - the old dialog will be closed, a new one will be opened and will display the data of the new selection.

What's Next?

This is a very basic version of the script. To see how it can be further improved and customized, see How To ... Develop a Selected Objects Inspector using ListView ActiveX Control - Part Two

See also

"How To" Tutorials Index Page

ListView ActiveX Control


How To ... Develop a Selected Objects Inspector using ListView ActiveX Control - Part Two

How To > Use ActiveX Controls > Develop a Selected Objects Inspector - Part Two

This second tutorial will demonstrate how to customize the Listview ActiveX Control defined in Part One and update the display automatically when the selection set changes.

Related topics:

ActiveX Controls in MAXScript Rollouts

ListView ActiveX Control

Listview ActiveX functions

ListView ActiveX Control Example

General Event Callback Mechanism

Callbacks.removeScripts

NATURAL LANGUAGE

Expand the existing macroScript.

Define the rollout as a global variable to be accessible to outside code.

Set the background color of the Listview to a nice pale cyan color.

Enable the checkboxes in the first column of the Listview and use them to represent the renderable state of the selected objects.

Control the width of each column using a second value per column in the layout_def array.

Clear the items from the list before filling it up with new data

Register a callback to update the list (which is now visible as a user interface element of a globally accessible rollout) whenever the scene selection set changes.

Unregister the callback whenever the rollout is closed to avoid errors.

SCRIPT:

macroScript SceneListView category:"HowTo"

(

global listview_rollout

rollout listview_rollout "ListView Selected"

(

fn initListView lv =

(

lv.gridLines = true

lv.View = #lvwReport

lv.fullRowSelect = true

 lv.backColor = color 225 215 210

 lv.checkboxes = true

layout_def = #(#("On",28), #("Object Name",120), #("Object Class",80), #("Verts",45), #("Faces",45), #("Material",120))

for i in layout_def do

(

column = lv.ColumnHeaders.add()

column.text = i[1]

)

 LV_FIRST = 0x1000

 LV_SETCOLUMNWIDTH = (LV_FIRST + 30)

 for i = 0 to layout_def.count-1 do

  windows.sendMessage lv.hwnd LV_SETCOLUMNWIDTH i layout_def[1+i][2]

)

fn fillInSpreadSheet lv =

(

 lv.ListItems.clear()

for o in selection do

(

li = lv.ListItems.add()

li.checked = o.Renderable

sub_li = li.ListSubItems.add()

sub_li.text = o.name

sub_li = li.ListSubItems.add()

sub_li.text = (classof o) as string

sub_li = li.ListSubItems.add()

sub_li.text = try((o.mesh.numverts) as string)catch("--")

sub_li = li.ListSubItems.add()

sub_li.text = try((o.mesh.numfaces) as string)catch("--")

sub_li = li.ListSubItems.add()

sub_li.text = (o.material) as string

)

)

activeXControl lv_objects "MSComctlLib.ListViewCtrl" width:490 height:190 align:#center

on listview_rollout open do

(

initListView lv_objects

fillInSpreadSheet lv_objects

)

on listview_rollout close do callbacks.removeScripts #selectionSetChanged id:#SceneListView

)

try(destroyDialog listview_rollout)catch()

createDialog listview_rollout 500 200

callbacks.addScript #selectionSetChanged "listview_rollout.fillInSpreadSheet listview_rollout.lv_objects" id:#SceneListView

)

RESULT:

Step-By-Step

macroScript SceneListView category:"HowTo"

(

global listview_rollout

In order to be able to access the rollout from outside of the macroScript scope (in our case a callback script), we have to define the rollout variable as global.

rollout listview_rollout "ListView Selected"

(

fn initListView lv =

(

lv.gridLines = true

lv.View = #lvwReport

lv.fullRowSelect = true

lv.backColor = color 225 215 210

We assign a new color to the backColor property of the Listview.

NOTE

Microsoft color values are expected as BGR (Blue/Green/Red) and NOT RGB as 3ds Max and MAXScript provide them. In MAXScript, the above color would appear as pale pink. You can visualize these colors by using something like

display ( bitmap 128 128 color:(color 225 215 210) ) --pale pink

display ( bitmap 128 128 color:(color 215 210 225) ) --pale blue

lv.checkboxes = true

We will also enable the built-in checkboxes of the Listview control and use them to represent the renderable node-level property.

layout_def = #(#("On",28), #("Object Name",120), #("Object Class",80), #("Verts",45), #("Faces",45), #("Material",120))

We will extend the existing version of the layout definition array. Instead of storing only the names of the colums, we will store sub-arrays containing both the name and the width of the column. In the future, you could store any additional per-column data like bold text Boolean flag, foreground color of the text etc.)

 `

for i in layout_def do

(

column = lv.ColumnHeaders.add()

column.text = i[1]

)

LV_FIRST = 0x1000

LV_SETCOLUMNWIDTH = (LV_FIRST + 30)

We define two user variables which will contain the first column's address and the message id to be sent to the windows handle of the Listview control responsible for setting the column width. This is "esoteric knowledge" available from literature on general Microsoft Windows and ActiveX Controls programming. Just use it the way it is provided here.

for i = 0 to layout_def.count-1 do

windows.sendMessage lv.hwnd LV_SETCOLUMNWIDTH i layout_def[1+i][2]

Now we loop from 0 to the number of columns minus one. This is because the windows.sendMessage method expects the index of the column to be set as a 0-based index, but MAXScript array indices are 1-based.

The windows.sendMessage method expects the windows handle of the ActiveX control (lv.hwnd), the message to be sent, the index of the column to set the width and the width value (which is stored in the 1-based array at index (i+1), in the second item of the sub-array)

)

fn fillInSpreadSheet lv =

(

lv.ListItems.clear()

Before we fill in the data into the Listview, we should make sure the list is emptied first. This is because this time around, the list will be updated on the fly without closing and reopening the dialog!

for o in selection do

(

li = lv.ListItems.add()

li.checked = o.Renderable

The first column will contain only the checkbox. We set the .checked property to the boolean value returned by the node-level .renderable property of the current object.

sub_li = li.ListSubItems.add()

The former first column with the name of the object is now the second column, so we have to create a sub list item for it.

sub_li.text = o.name

We set the .text property of the sub list item to the name of the object just like before.

sub_li = li.ListSubItems.add()

sub_li.text = (classof o) as string

sub_li = li.ListSubItems.add()

sub_li.text = try((o.mesh.numverts) as string)catch("--")

sub_li = li.ListSubItems.add()

sub_li.text = try((o.mesh.numfaces) as string)catch("--")

sub_li = li.ListSubItems.add()

sub_li.text = (o.material) as string

)

)

activeXControl lv_objects "MSComctlLib.ListViewCtrl" width:490 height:190 align:#center

on listview_rollout open do

(

initListView lv_objects

fillInSpreadSheet lv_objects

)

on listview_rollout close do callbacks.removeScripts #selectionSetChanged id:#SceneListView

Callbacks.removeScripts

Whenever the user closes the dialog by either pressing the [X] button in the upper right corner of the titlebar or by calling the MacroScript again, we will have to make sure that the callback we will register to update the display when the selection set changes is removed. Otherwise, selecting objects in the scene would cause the callback to try to access an already closed rollout and throw an error!

)

try(destroyDialog listview_rollout)catch()

createDialog listview_rollout 500 200

callbacks.addScript #selectionSetChanged "listview_rollout.fillInSpreadSheet listview_rollout.lv_objects" id:#SceneListView

Finally, we register the callback to update the Listview whenever the user changes the selection set in the scene.

The callbacks.addScript tells MAXScript that we are registering a new callback.

#selectionSetChanged is the name of the notification message broadcast by 3ds Max whenever the selection changes.

The string contains the actual script executed when the callback is activated, it accesses the Listview as a property of the now global rollout definition and calls the fillInSpreadSheet function we defined.

The id:#SceneListView is a user-defined name to be able to affect only this special callback (for example in the callbacks.removeScripts call above) without affecting other callbacks defined by other developers or the shipping 3ds Max version itself.

)

Using the Script

After evaluating the script, the SceneListView ActionItem in the "HowTo" category defined by the first part of the tutorial will be updated.

Press the button/select the menu item or press the keyboard shortcut corresponding to the SceneListView script - the dialog with the listView ActiveX control should appear. If there are no objects selected, the list will be empty.

Now select some object and watch the list updating automatically. Change the selection set again and the list will update dynamically! Select an object, right-click, go to Properties... and uncheck the Renderable checkbox. Note that the checkbox in the Listview will be unchecked, too!

Where to go from here?

The next logical step would be to add an even handler to link the checkbox in the Listview bi-directionally to the .Renderable property, so changing the state in the Listview would affect the node property, too!

Other things to try include adding more column definitions to the layout array to show other object properties you might be interested in.

See also

How To ... Develop a Selected Objects Inspector using ListView ActiveX Control - Part One

"How To" Tutorials Index Page


How To ... Develop a Scene Browser using TreeView ActiveX Control - Part One

How To > Use ActiveX Controls > Develop a Scene Browser - Part One

This tutorial demonstrates how to create a Scene Browser showing the object hierarchy in a TreeView ActiveX Control.

Related topics:

ActiveX Controls in MAXScript Rollouts

TreeView ActiveX Control

NATURAL LANGUAGE

Create a simple macroScript.

Define a rollout which will be used to create a floating dialog.

The only UI controls in the rollout will be a TreeView ActiveX Control and a spinner to control the Indentation

Create a function to recursively traverse all children and add children nodes to the TreeView.

Create a function to define the layout and appearance of the TreeView.

Create a function to fill in the nodes into the TreeView by calling the recursive function.

The two functions will be called by the on open event handler whenever the dialog is created (and thus the rollout is opened).

SCRIPT:

macroScript SceneTreeView category:"HowTo"

(

rollout treeview_rollout "TreeView Scene Browser"

(

fn initTreeView tv =

(

tv.Indentation = 28*15

tv.LineStyle = #tvwRootLines

)

fn addChildren tv theNode theChildren =

(

for c in theChildren do

(

newNode = tv.Nodes.add theNode.index 4 "" c.name 0

addChildren tv newNode c.children

)

)

fn fillInTreeView tv =

(

theRoot = tv.Nodes.add()

theRoot.text = "WORLD ROOT"

rootNodes = for o in objects where o.parent == undefined collect o

addChildren tv theRoot rootNodes

)

activeXControl tv "MSComctlLib.TreeCtrl" width:190 height:290 align:#center

spinner spn_indent "Indentation" range:[0,100,28] type:#integer fieldwidth:40

on tv nodeClick theNode do try(select (getNodeByName theNode.text))catch()

on spn_indent changed val do tv.indentation = val*15

on treeview_rollout open do

(

initTreeView tv

fillInTreeView tv

)

)

try(destroyDialog treeview_rollout)catch()

createDialog treeview_rollout 200 320

)

RESULT:

Step-By-Step

macroScript SceneTreeView category:"HowTo"

(

We start by defining a simple MacroScript with the name SceneTreeView which will appear in the category "HowTo". Simple (old-style) macroScripts do not have on execute do or on isEnabled event handlers. The code inside the MacroScript definition is executed immediately when the ActionItem (button, menu item or keyboard shortcut) representing the MacroScript is activated.

rollout treeview_rollout "TreeView Scene Browser"

(

This is the rollout to be created when the MacroScript is executed. It will display the title "TreeView Scene Browser". The variable treeview_rollout will be local to the macroScript and will be used later on to create a dialog out of the rollout definition.

fn initTreeView tv =

(

This is the function which will perform the initialization of the TreeView ActiveX control we will create. The control itself will be passed as argument to the function.

tv.Indentation = 28*15

The .indentation property expects a value in Twips and defines the amount of twips to indent children relatively to their parent. Since a pixel is roughly 15 twips, this line tells the hierarchy to use 28 pixels indentation.

tv.LineStyle = #tvwRootLines

The LineStyle propery controls the appearance of the lines connecting the nodes in the hierarchy. We want the root to have its own plus/minus box and be connected to the scene nodes.

)

fn addChildren tv theNode theChildren =

(

This function will be called recursively to create children of the node passed as argument using theChildren argument containing an array of 3ds Max scene nodes. The argument tv will contain the TreeView to add to.

for c in theChildren do

(

For each 3ds Max scene node in theChildren array...

newNode = tv.Nodes.add theNode.index 4 "" c.name 0

...we add a new child to the supplied node. We pass a couple of parameters to the add() methid - the index of the parent, the relationship flag (4), the key (empty string), the text of the new child (the name of the scene node), and the index of the image to be displayed as icon (0 for no image)

addChildren tv newNode c.children

Once the child is created, the function calls itself recursively, passing the newly created node and the array of children of the current scene object as parameter. This way, the complete scene hierarchy will be recreated by the TreeView!

)

The c loop ends here.

)

The recursive function ends here.

fn fillInTreeView tv =

(

This function will define the content of the TreeView.

theRoot = tv.Nodes.add()

We add a single new node to represent the Root.

theRoot.text = "WORLD ROOT"

We set its label to "WORLD ROOT"

rootNodes = for o in objects where o.parent == undefined collect o

Then we collect all objects in the scene that have no parent. These are the top-level nodes that will be the "children of the world".

addChildren tv theRoot rootNodes

Finally, we call the recursive function, passing the TreeView, the Root node and the array of top-level scene objects as arguments.

)

activeXControl tv "MSComctlLib.TreeCtrl" width:190 height:290 align:#center

Now we can create a TreeView ActiveX control in the rollout.

spinner spn_indent "Indentation" range:[0,100,28] type:#integer fieldwidth:40

This spinner will allow us to test interactively the .indentation property of the TreeView. Simply changing the spinner's value will dynamically update the indentation of the complete hierarchy!

on tv nodeClick theNode do try(select (getNodeByName theNode.text))catch()

If the user clicked a node, we will try to convert its name back to a 3ds Max scene node and select it in the scene. This demonstrates the usage of TreeView event handlers...

on spn_indent changed val do tv.indentation = val*15

If the user changed the spinner, we want the .indentation to be set to the respective amount of Twips .

on treeview_rollout open do

(

When the rollout is opening (this is when the CreateDialog function is called)...

initTreeView tv

fillInTreeView tv

...the initialization function and the data collecting function will be called to define the style and poplulate the TreeView control with the names of the 3ds Max scene objects.

)

The rollout open event ends here.

)

try(destroyDialog treeview_rollout)catch()

Before creating a new dialog, we want to make sure any previously opened dialog with the same name is closed...

createDialog treeview_rollout 200 320

Finally, we create a new Dialog using the rollout definition.

)

What's Next?

This is a very basic version of the script. To see how it can be further improved and customized, see Part Two of the tutorial - How To ... Develop a Scene Browser using TreeView ActiveX Control - Part Two

See also

TreeView ActiveX Control

"How To" Tutorials Index Page


How To ... Develop a Scene Browser using TreeView ActiveX Control - Part Two

How To > Use ActiveX Controls > Develop a Scene Browser - Part Two

The second part of the tutorial will demonstrate how to customize the TreeView ActiveX Control defined in Part One to include icons by object class, display wireframe colors and control the hidden state of scene nodes.

Related topics:

ActiveX Controls in MAXScript Rollouts

TreeView ActiveX Control

NATURAL LANGUAGE

Extend the existing macroScript.

Define a function to grab a single icon from the shipping icon files of 3ds Max

Extend the initTreeView function to generate icons for most object types

Assign an icon to each node created for each scene node

Set the color of each node to the wireframe color of the scene node

Set the checked state of each node to the opposite of the hidden state of the scene node

Enable checkboxes in the TreeView

Define another ActiveX control to hold and manage the icons to be displayed

Add an event handler to hide/unhide objects when the corresponding checkboxes are unchecked/checked

SCRIPT:

macroScript SceneTreeView category:"HowTo"

(

rollout treeview_rollout "TreeView Scene Browser"

(

fn getIconFromBitmap thePath number =

(

tempBmp = openBitmap thePath

iconBmp = bitmap 16 15

for v = 0 to 14 do

setPixels iconBmp [0,v] (getPixels tempBmp [(number-1)*16, v] 16)

iconBmp.filename = getDir #image +"/_temp.bmp"

save iconBmp

close iconBmp

close tempBmp

getDir #image +"/_temp.bmp"

)

fn initTreeView tv ilTv =

(

tv.Indentation = 28*15

tv.LineStyle = #tvwRootLines

tv.checkboxes = true

tv.sorted = true

ilTv.imagewidth = 16

ilTv.imageheight = 15

iconDir = (getDir #ui) + "\\icons"

ilTv.listImages.add 1 #root (loadPicture (getIconFromBitmap (iconDir + "\\Standard_16i.bmp") 2))

ilTv.listImages.add 2 #geomnode (loadPicture (getIconFromBitmap (iconDir + "\\Standard_16i.bmp") 1))

ilTv.listImages.add 3 #light (loadPicture (getIconFromBitmap (iconDir + "\\Lights_16i.bmp") 3))

ilTv.listImages.add 4 #camera (loadPicture (getIconFromBitmap (iconDir + "\\Cameras_16i.bmp") 2))

ilTv.listImages.add 5 #helper (loadPicture (getIconFromBitmap (iconDir + "\\Helpers_16i.bmp") 1))

tv.imageList = ilTv

)

fn addChildren tv theNode theChildren =

(

for c in theChildren do

(

theIcon = case superclassof c of

(

GeometryClass: 2

Light: 3

Camera: 4

Helper: 5

Default:2

)

newNode = tv.Nodes.add theNode.index 4 "" c.name theIcon

theNode.sorted = true

newNode.checked = not c.isHidden

newNode.forecolor = color c.wirecolor.b c.wirecolor.g c.wirecolor.r

addChildren tv newNode c.children

)

)

fn fillInTreeView tv =

(

theRoot = tv.Nodes.add()

theRoot.image = 1

theRoot.text = "WORLD ROOT"

rootNodes = for o in objects where o.parent == undefined collect o

addChildren tv theRoot rootNodes

)

activeXControl tv "MSComctlLib.TreeCtrl" width:290 height:490 align:#center

activeXControl ilTv "MSComctlLib.ImageListCtrl" height:0 width:0

on tv NodeCheck theNode do

(

theSceneNode = (getNodeByName theNode.text)

if theSceneNode != undefined do

theSceneNode.isHidden = not theNode.checked

)

on tv nodeClick theNode do try(select (getNodeByName theNode.text))catch()

on treeview_rollout open do

(

initTreeView tv ilTv

fillInTreeView tv

)

)

try(destroyDialog treeview_rollout)catch()

createDialog treeview_rollout 300 500

)

RESULT:

Step-By-Step

macroScript SceneTreeView category:"HowTo"

(

rollout treeview_rollout "TreeView Scene Browser"

(

fn getIconFromBitmap thePath number =

(

This new function will let us grab and reuse the icons shipping with 3ds Max. The arguments passed to the function are the path of the icons bitmap file and the icon number to get. We assume that we will use the 16x15 small icons only. The function could be changed to support the 24x24 version of the icons, but the TreeView wouldn't look very nice with icons of that size!

tempBmp = openBitmap thePath

First, we open the bitmap containing the path to the icons file. Icon files can contain an arbitrary number of icons. The small, 16x15 pixels icon files have a height of 15 pixels and width equal to the number of icons multiplied by 16.

iconBmp = bitmap 16 15

Next, we create an empty bitmap with the size of a single 16x15 pixels icon

for v = 0 to 14 do

The loop will go from 0 to 14 (since pixel access in bitmaps is 0-based, and we have to go from 0 to 15 minus one.

setPixels iconBmp [0,v] (getPixels tempBmp [(number-1)*16, v] 16)

For each row in the icon, we use getPixels to grab the 16 pixels starting at the beginning of the icon. (Number-1)*16 returns 0 for the first icon, 16 for the second icon, 32 for the third and so on. Then we assign the whole row of 16 pixels to the iconBmp bitmap defined before, starting at the left-most pixel (0) and going through the same number of lines (v). The result is the icon with the requested number being copied into the new empty bitmap!

iconBmp.filename = GetDir #image +"/_temp.bmp"

Now we set the name of the new single icon bitmap to a remporary bitmap file in the \Images sub-directory of 3ds Max. This is necessary because the loadPicture method converting a bitmap to an OLE-capable icon requires a saved .BMP or .ICO file, and only bitmaps with the .filename property set can be saved to disk.

save iconBmp

Since we have the file name defined, we can save the single icon to disk.

close iconBmp

close tempBmp

Then we close both the original multi-icon file and the temporary single icon file.

GetDir #image +"/_temp.bmp"

As a result of the function, we return the filename of the new single icon.

)

fn initTreeView tv ilTv =

(

This is the existing TreeView initialization function, but this time it gets a second argument, which will be the ImageListCtrl ActiveX control responsible for the icon management.

tv.Indentation = 28*15

tv.LineStyle = #tvwRootLines

tv.checkboxes = true

This time, we will want to have checkboxes in front of every node. They will be used to display and control the Hidden state of the scene nodes.

tv.sorted = true

We also want the tree to be alphabetically sorted.

ilTv.imagewidth = 16

ilTv.imageheight = 15

We define the size of the icon image to be the same as the icon we are going to grab from the icons file.

iconDir = (getDir #ui) + "\\icons"

This is the default location of the shipping icon files.

ilTv.listImages.add 1 #root (loadPicture (getIconFromBitmap (iconDir + "\\Standard_16i.bmp") 2))

We call the .add() method of the .listImages property of the ImageListCtrl which is used to manage the icons. The first image we add will be used for the root node only. We call the getIconFromBitmap function we defined earlier and pass the icon file containing Standard geometry primitives and the icon number 2 (Sphere). The resulting path is passed to the loadPucture method which opens the temporary icon .bmp file and assigns the resulting OLE-capable icon image to the ImageListCtrl.

ilTv.listImages.add 2 #geomnode (loadPicture (getIconFromBitmap (iconDir + "\\Standard_16i.bmp") 1))

We repeat the whole again, but this time we create the image number 2 which will be used for geometry nodes. We grab icon number 1 (Box).

ilTv.listImages.add 3 #light (loadPicture (getIconFromBitmap (iconDir + "\\Lights_16i.bmp") 3))

Same for the third image which will be used for light, but we ask for the third icon of the Lights icons file (Omni).

ilTv.listImages.add 4 #camera (loadPicture (getIconFromBitmap (iconDir + "\\Cameras_16i.bmp") 2))

The camera will be image number 4. We grab the second icon from the Cameras icons library.

ilTv.listImages.add 5 #helper (loadPicture (getIconFromBitmap (iconDir + "\\Helpers_16i.bmp") 1))

Finally, we define a fifth image which grabs the first icon from the Helpers icons file (Dummy).

There are some more classes that were not defined yet (Shapes, Space Warps), you can try to implement your own icons in the same way by extending the above code!

tv.imageList = ilTv

At the end, we assign the ImageListCtrl Control to the .imageList property of the TreeView. This makes all the above images available as icons in the TreeView control!

)

fn addChildren tv theNode theChildren =

(

for c in theChildren do

(

theIcon = case superclassof c of

Now that we have icons in the control, we can check the superclass of the 3ds Max scene node being processed by the function and define the right icon based on the type. The variable theIcon will contain an integer corresponding to the icon to be used.

(

GeometryClass: 2

Geometry objects will use image 2 as icon,

Light: 3

Lights will use image 3,

Camera: 4

Cameras will use image 4,

Helper: 5

Helpers will use image 6,

Default:2

All others will use the Geometry icon until they get their own icons.

)

newNode = tv.Nodes.add theNode.index 4 "" c.name theIcon

Instead of setting the icon index to 0 as we did in Part One, we set the icon to the value defined above...

theNode.sorted = true

We wanted all levels of the hierarchy to be sorted alphabetically.

newNode.checked = not c.isHidden

The checked state of the node will be the inverse of the isHidden property (which is true when the node is hidden). Since we want to check the box when the node is NOT hidden, we tell exactly this...

newNode.forecolor = color c.wirecolor.b c.wirecolor.g c.wirecolor.r

Since we have complete control over the color of each node in the TreeView, why not grab the color of the wireframe display and assign to the .forecolor property? This gives us a colorful reference to the color of the scene objects!

You could enhance this to grab the diffuse color of the material in the cases where the object has a Standard material assigned, or use the color to represent some other property... In addition, you could also set the .bold property of the TreeView node to true to represent some other property of the 3ds Max objects...

addChildren tv newNode c.children

)

)

fn fillInTreeView tv =

(

theRoot = tv.Nodes.add()

theRoot.image = 1

We already defined the first image of the ImageListCtrl to show a sphere icon. We will use it to represent the root node.

theRoot.text = "WORLD ROOT"

rootNodes = for o in objects where o.parent == undefined collect o

addChildren tv theRoot rootNodes

)

activeXControl tv "MSComctlLib.TreeCtrl" width:290 height:490 align:#center

activeXControl ilTv "MSComctlLib.ImageListCtrl" height:0 width:0

This is the ImageList ActiveX Control used by the TreeView to manage its icons. It needs no rollout representation - we set the height and width to 0.

on tv NodeCheck theNode do

(

If the user changed the state of the checkbox of a node...

theSceneNode = (getNodeByName theNode.text)

...we try to figure out which scene node it represents by converting the text label to the actual object name...

if theSceneNode != undefined do

...and if the attempt was successful,

theSceneNode.isHidden = not theNode.checked

...we set the .isHidden property of the scene node to the inverted value of checked state of the TreeView node. If the user unchecked the checkbox, theNode.checked will return false, which will be converted to true by not and assigned to the hidden property, effectively hiding the node!

)

on tv nodeClick theNode do try(select (getNodeByName theNode.text))catch()

on treeview_rollout open do

(

initTreeView tv ilTv

fillInTreeView tv

)

)

try(destroyDialog treeview_rollout)catch()

createDialog treeview_rollout 300 500

)

See also

How To ... Develop a Scene Browser using TreeView ActiveX Control - Part One

TreeView ActiveX Control

"How To" Tutorials Index Page


How To ... Copy The Last Rendered Image To The Windows Clipboard

How To > Use DotNet > Copy The Last Rendered Image To The Windows Clipboard

The following tutorial demonstrates the use of the System.Windows.Forms.Clipboard DotNetClass to read and write bitmaps from and to the Windows Clipboard.

The script can be saved into one of the Startup folders to be evaluated on startup.
The custom function will be executed by a PostRender callback each time the renderer finishes, putting the last rendered image into the Windows Clipboard automatically.

Related topics:

DotNet In MAXScript

dotNetClass

dotNetClass:System.Windows.Forms.Clipboard

NATURAL LANGUAGE

Define a global function to be called by a general callback after each rendering.

Get the DotNet class exposing Windows Clipboard functionality

Get the last rendered image via MAXScript

Save the image to disk

Convert the image to a DotNet Image

Put the image into the Windows Clipboard

Release any memory related to the image and delete the file from disk

Returns true if the clipboard now contains an image

Unregister any callbacks with the same ID

Register a PostRender callback with a custom ID that calls the function

SCRIPT:

fn CopyRenderToClipboard =

(

clipboardClass = dotNetClass "System.Windows.Forms.Clipboard"

b = getLastRenderedImage()

theFileName = GetDir #image + "\\_renderToClipboard.bmp"

b.filename = theFileName

save b

close b

theImage = dotNetClass "System.Drawing.Image"

theBitmap = theImage.FromFile theFileName

clipboardClass.setImage theBitmap

theBitmap.Dispose()

deleteFile theFileName

clipboardClass.ContainsImage()

)--end fn

callbacks.removeScripts id:#CopyRenderToClipboard

callbacks.addScript #PostRender "CopyRenderToClipboard()" id:#CopyRenderToClipboard

Step-By-Step

fn CopyRenderToClipboard =

(

Define a global function. We will place the script in a startup folder, so we want the function to be visible in the global scope.

clipboardClass = dotNetClass "System.Windows.Forms.Clipboard"

Get the Clipboard dotNetClass from System.Windows.Forms

b = getLastRenderedImage()

Get the last rendered image

theFileName = GetDir #image + "\\_renderToClipboard.bmp"

Define a temporary file name.

b.filename = theFileName

Set the bitmap's file name to the one defined in the previous step.

save b

Save the bitmap to disk under the assigned file name.

close b

Close the bitmap.

theImage = dotNetClass "System.Drawing.Image"

Get the Image dotNetClass from System.Drawing

theBitmap = theImage.FromFile theFileName

Get the saved image from file as bitmap

clipboardClass.setImage theBitmap

Copy the image to the clipboard by calling the setImage method exposed by the clipboard class.

theBitmap.Dispose()

Release the bitmap - it is already in the Windows Clipboard!

deleteFile theFileName

Delete the temporary file from disk.

clipboardClass.ContainsImage()

Return true if the Windows Clipboard contains an image, which we can assume is our image.

)--end fn

This is the end of the global function.

Now we will register a general callback to call the function whenever the renderer finishes.

callbacks.removeScripts id:#CopyRenderToClipboard

First we make sure we remove any callbacks with the same ID as the one we are about to register. This way, you can run the script multiple times (for example while further developing the function or making changes to the code in general).

callbacks.addScript #PostRender "CopyRenderToClipboard()" id:#CopyRenderToClipboard

Then we register a PostRender callback to run the function whenever the renderer finishes.

See also

"How To" Tutorials Index Page


How To … Call a MAXScript Function Periodically using DotNet

How To > Use DotNet > Call a MAXScript Function Periodically

The following tutorials demonstrates the use of the System.Windows.Forms.Timer dotNetObject as alternative to the MAXScript Timer UI Control. Other than the latter, the DotNet object version does not require a MAXScript User Interface to be created and open in order to run a MAXScript function at given time intervals.

Related topics:

DotNet In MAXScript

dotNetObject

dotNetObject:System.Windows.Forms.Timer

NATURAL LANGUAGE

Create a DotNet Timer Object.

Define a MAXScript function to be called periodically by the timer.

Register an Event Handler to call the function

Start the Timer.

EXAMPLE

theTimer = dotNetObject "System.Windows.Forms.Timer"

fn printTime = (print localTime)

dotnet.addEventHandler theTimer "tick" printTime

theTimer.interval = 1000

theTimer.start()

--theTimer.stop()

LISTENER OUTPUT:

dotNetObject:System.Windows.Forms.Timer
printTime()
OK
1000
undefined
"10/20/2007 1:11:28 PM"
"10/20/2007 1:11:29 PM"
"10/20/2007 1:11:30 PM"
"10/20/2007 1:11:31 PM"

theTimer = dotNetObject "System.Windows.Forms.Timer"

Create a Timer

fn printTime = (print localTime)

Define a MAXScript function to be called by the Timer.

dotnet.addEventHandler theTimer "tick" printTime

Add ON TICK event hander to call the function

theTimer.interval = 1000

Set the tick interval to 1 second (1000 milliseconds)

theTimer.start()

Start the Timer

--theTimer.stop()

Remove the remark and call this method to stop the Timer!


MAXScript Grammar

The following is the complete MAXScript grammar in EBNF form. It differs slightly in factoring from the syntax forms given in the online reference, so that all precedence is explicit in the rules.

These rules, or syntax definitions, follow the standard EBNF notation (Extended Backus-Naur Form). The rules typically contain a number of characters with special meanings. For example, brackets enclose optional items, such as the minus sign in front of the number. Braces enclose items you can use repeatedly, and bars separate multiple items from which you can choose one. Sometimes, rules are given names so they can be referred to in the documentation or as parts of other rules. The special characters in the rules have the following meaning:

[...] -- items inside the brackets are optional

(...|...|...) -- choose one of the items separated by the bars

{...} -- you can specify the braced item ZERO or more times

{...}+ -- you can specify the braced item ONE or more times

::= -- define a name for a syntax rule

<rule> -- you can insert what is defined by the named rule

bold_characters -- characters or token as written

An example of an EBNF form is:

[-]{<digit>}[.{<digit>}][(e | E)[+ | -]{<digit>}+]

which is interpreted as follows:

Syntax | Definition
[-]{<digit>} | an optional minus sign (the sign), followed by 0 or more digits (the integer part), followed by
[.{<digit>}] | an optional sequence (the fraction part) comprised of: a period character, followed by 0 or more digits, followed by
[(e | E)[+ | -]{<digit>}+] | an optional sequence (the exponent part) comprised of: either an ‘e’ or ‘E’, followed by an optional plus or minus sign, followed by one or more digits.

<program> ::= { <expr> }+

<expr> ::= <simple_expr>

<variable_decls>

<assignment>

<if_expr>

<while_loop>

<do_loop>

<for_loop>

<loop_exit>

<case_expr>

<struct_def>

<try_expr>

<variable_decls>

<function_def>

<function_return>

<context_expr>

<max_command>

<utility_def>

<rollout_def>

<tool_def>

<rcmenu_def>

<macroscript_def>

<plugin_def>

<variable_decls> ::= ( local | global ) <decl> { , <decl> }

persistent global <decl> { , <decl> }

<decl> ::= <var_name> [ = <expr> ] -- name and optional

-- initial value

<var_name> ::= { <alphanumeric> | _ }

'{ <any_char_except_quote> }'

<assignment> ::= <destination> = <expr>

<destination> += <expr>

<destination> -= <expr>

<destination> *= <expr>

<destination> /= <expr>

<destination> ::= <var_name>

<property>

<index>

<if_expr> ::= if <expr> then <expr> [ else <expr> ]

if <expr> do <expr>

<while_loop> ::= while <expr> do <expr>

<do_loop> ::= do <expr> while <expr>

<for_loop> ::= for <name> ( in | = ) <source> (do | collect) <expr>

<source> ::= <expr> to <expr> [ by <expr> ] [ where <expr> ]

<expr> [ where <expr> ]

<loop-exit> ::= exit [ with <expr> ]

<loop-continue> ::= continue

<case_expr> ::= case [ <expr> ] of ( { <case_item> } )

<case_item> ::= <factor> : <expr>

default : <expr>

<struct_def> ::= struct (<member> { , <member> } )

<member> ::= <name> [ = <expr> ] -- name and optional initial value

<function_def>

<try_expr> ::= try <expr> catch <expr>

<function_def> ::= [ mapped ] (function | fn) <var_name> { <arg> } = <expr>

<arg> ::= <var_name>

<var_name>: [ <operand> ]

<function_return> ::= return <expr>

<context_expr> ::= <context> { , <context> } <expr>

<context> ::= [with] animate <logical_expr>

at level <operand>

at time <operand>

in <operand>

[in] coordsys ( local | world | parent | <operand> )

about ( pivot | selection | coordsys | <operand> )

[ with ] undo <logical_expr>

<set_context> ::= set <context>

<utility_def> ::= utility <var_name> <string> { <var_name>:<operand> } \

( { <utility_clause> }+ )

<utility_clause> ::= <rollout>

<rollout_clause>

<rollout_def> ::= rollout <var_name> <string> { <var_name>:<operand> } \

( { <rollout_clause> }+ )

<rollout_clause> ::= local <decl> { , <decl> }

<function_def>

<struct_def>

<mousetool>

<item_group>

<rollout_item>

<rollout_handler>

<item_group> ::= group <string> ( { <rollout_item> } )

<rollout_handler> ::= on <var_name> <var_name> { <var_name> } do <expr>

<rollout_item> ::= <item_type> <var_name> [ <string> ] { <var_name>:<operand> }

<item_type> ::= label

button

edittext

combobox

dropdownList

listbox

spinner

slider

pickbutton

radiobuttons

checkbox

checkbutton

colorPicker

mapbutton

materialbutton

progressbar

timer

bitmap

<rcmenu_def> ::= rcmenu <var_name> ( { <rcmenu_clause> }+ )

<rcmenu_clause> ::= local <decl> { , <decl> }

<function_def>

<struct_def>

<rcmenu_item>

<rcmenu_handler>

<rcmenu_handler> ::= on <var_name> <var_name> do <expr>

<rcmenu_item> ::= <rcmenu_item_type> <var_name> <string> { <var_name>:<operand> }

<rcmenu_item_type>::= menuitem

separator

submenu

<macroscript_def> ::= macroscript <var_name> <string> { <var_name>:<operand> } \

( <expr_seq> )

<mousetool_def> ::= tool <var_name> { <var_name>:<operand> } ( { <tool_clause> }+ )

<tool_clause> ::= local <decl> { , <decl> }

<function_def>

<struct_def>

<tool_handler>

<tool_handler> ::= on <var_name> <var_name> { <var_name> } do <expr>

<plugin_def> ::= plugin <var_name> <var_name> { <var_name>:<operand> } \

( { <plugin_clause> }+ )

<plugin_clause> ::= local <decl> { , <decl> }

<function_def>

<struct_def>

<parameters>

<mousetool_def>

<rollout_def>

<plugin_handler>

<parameters> ::= parameters <var_name> { <var_name>:<operand> } ( { <param_clause> }+ )

<param_clause> ::= { <param_defs> }+

{ <param_handler> }

<param_defs> ::= <var_name> { <var_name>:<operand> }

<param_handler> ::= on <var_name> <var_name> { <var_name> } do <expr>

<plugin_handler> ::= on <var_name> do <expr>

<simple_expr> ::= <operand>

<math_expr>

<compare_expr>

<logical_expr>

<function_call>

<expr_seq>

<math_expr> ::= <math_operand> + <math_operand> -- standard arithmetic addition

<math_operand> - <math_operand> -- standard arithmetic subtraction

<math_operand> * <math_operand> -- standard arithmetic multiplication

<math_operand> / <math_operand> -- standard arithmetic division

<math_operand> ^ <math_operand> -- exponential, raise to the power

<math_operand> as <class> -- conversion between types

<math_operand> ::= <operand>

<function_call>

<math_expr>

<logical_expr> ::= <logical_operand> or <logical_operand>

<logical_operand> and <logical_operand>

not <logical_operand>

<logical_operand> ::= <operand>

<compare_expr>

<function_call>

<logical_expr>

<compare_expr> ::= <compare_operand> == <compare_operand> -- equal

<compare_operand> != <compare_operand> -- not equal

<compare_operand> > <compare_operand> -- greater than

<compare_operand> < <compare_operand> -- less than

<compare_operand> >= <compare_operand> -- greater than or equal

<compare_operand> <= <compare_operand> -- less than or equal

<compare_operand> ::= <math_expr>

<operand>

<function_call>

<function_call> ::= <operand> ()

<operand> { <parameter> } -- up to an end of line or

-- lower precedence token

<parameter> ::= <operand>

<name>: <operand>

<operand> ::= <factor>

<property>

<index>

<property> ::= <operand> . <var_name> -- properties and indexes

-- left associate

<index> ::= <operand> [ <expr> ]

<factor> ::= <number>

<string>

<path_name>

<var_name>

#<var_name>

<array>

<bitarray>

<point3>

<point2>

true

false

on

off

ok

undefined

unsupplied

- <expr> -- unary minus

<expr_seq>

? -- last Listener result

<expr_seq> ::= ( <expr> { (; | <eol>) <expr> } )

<number> ::= [-]{<digit>}[.{<digit>}[(e | E)[+ | -]{<digit>}+] -- decimal number

0x{<hex_digit>}+ -- hexadecimal number

<string> ::= "{ <any_char_except_quote> | \" | \n | \r | \t | \* | \? | \\ | \% | \x{<hex_digit>}+ }"

<time> ::= [-]{<decimal_number>[m | s | f | t]}+ -- minutes/sec/frames/ticks

[-]{<digit>}:{<digit>}[.{<digit>}] -- SMPTE mins:secs.frame

[-]<decimal_number>n -- active segment normalized time

<box2> ::= [ <expr>, <expr>, <expr>, <expr> ]

<point3> ::= [ <expr>, <expr>, <expr> ]

<point2> ::= [ <expr>, <expr> ]

<array> ::= #()

#( <expr> { , <expr> } )

<bitarray> ::= #{}

#{ [<expr> | <expr>..<expr>] { , [<expr> | <expr>..<expr>] } }

<path_name> ::= $<path> | $

<path> ::= [ <objectset> ] [ / ] [ <levels> ] <level_name>

<levels> ::= <level> { / <level> }

<level> ::= <level_name>

...

<level_name> ::= { <alphanumeric> | _ | * | ? | \ }

'{ <any_char_except_single_quote> | \* | \? | \\ }'


MAXScript Class Hierarchy

The following is the complete MAXScript class hierarchy. Each class typically inherits the properties, operators, and methods of its parent class.

Value

--AngleAxis

--Array

--ArrayParameter

--AtmosphericClass

--BigMatrix

--BigMatrixRowArray

--BipedExportInterface

--BitArray

--Bitmap

--BitmapControl

--BooleanClass

--Box2

--ButtonControl

--CTBitMap

--CTMotionTracker

--ChangeHandler

--CharStream

--CheckBoxControl

--CheckButtonControl

--Class

--Color

--ColorPickerControl

--ComboBoxControl

--Control

--EdgeSelection

--EditTextControl

--EffectClass

--EmptyClass

--EulerAngles

--FaceSelection

--FileStream

--Float

--GeomObject

--GroupEndControl

--GroupStartControl

--HashTable

--Integer

--Interval

--LabelControl

--ListBoxControl

--MAXClass

--MAXFilterClass

--MAXKey

--MAXKeyArray

--MAXMeshClass

--MAXModifierArray

--MAXNoteKey

--MAXNoteKeyArray

--MAXObject

--MAXRootNode

--MAXScriptFunction

--MAXSuperClass

--MAXTVNode

--MSPluginClass

--MapButtonControl

--MapSupportClass

--MaterialLibrary

--Matrix3

--MeditMaterialsClass

--Menuitem

--ModifierClass

--MotionTracker

--MouseTool

--MtlButtonControl

--MultiMaterialClass

--NURBSDisplay

--NURBSObject

----NURBSControlVertex

----NURBSCurve

------NURBSBlendCurve

------NURBSCVCurve

--------NURBSCurveOnSurface

------NURBSChamferCurve

------NURBSFilletCurve

------NURBSIsoCurve

------NURBSMirrorCurve

------NURBSOffsetCurve

------NURBSPointCurve

--------NURBSPointCurveOnSurface

------NURBSProjectNormalCurve

------NURBSProjectVectorCurve

------NURBSSurfSurfIntersectionCurve

------NURBSSurfaceEdgeCurve

------NURBSSurfaceNormalCurve

------NURBSXFormCurve

----NURBSPoint

------NURBSCurveConstPoint

------NURBSCurveIntersectPoint

------NURBSCurveSurfaceIntersectPoint

------NURBSIndependentPoint

------NURBSPointConstPoint

------NURBSSurfConstPoint

----NURBSSurface

------NURBS1RailSweepSurface

------NURBS2RailSweepSurface

------NURBSBlendSurface

------NURBSCVSurface

------NURBSCapSurface

------NURBSExtrudeSurface

------NURBSFilletSurface

------NURBSLatheSurface

------NURBSMirrorSurface

------NURBSMultiCurveTrimSurface

------NURBSNBlendSurface

------NURBSOffsetSurface

------NURBSPointSurface

------NURBSRuledSurface

------NURBSULoftSurface

------NURBSUVLoftSurface

------NURBSXFormSurface

----NURBSTexturePoint

--NURBSSelection

--NURBSSet

--NURBSSurfaceApproximation

--NURBSTextureSurface

--Name

--NodeChildrenArray

--NoteTrack

--Number

--OLEMethod

--OLEObject

--Object

--OkClass

--PathName

--PhyBlendedRigidVertex

--PhyContextExport

--PhyRigidVertex

--PickerControl

--Point2

--Point3

--ProgressBar

--Quat

--RadioControl

--Ray

--RolloutControl

--RolloutFloater

--SelectionSet

--SelectionSetArray

--Set

--SliderControl

--SpinnerControl

--StandardMaterialClass

--String

--StringStream

--StructDef

--SubAnim

--Time

--Timer

--TriMesh

--UndefinedClass

--UnsuppliedClass

--UserGeneric

--VertexSelection

--WindowStream

--XRefScene

--MAXWrapper

----atmospheric

------Fire_Effect

------Fog

------Missing_Atmospheric

------RenderEnvironment

------Volume_Fog

------Volume_Light

----filter

------Area

------Blackman

------Blendfilter

------Catmull_Rom

------Cook_Variable

------cubic

------Mitchell_Netravali

------Plate_Match_MAX_R2

------Plate_Match_VIZ_R2

------Quadratic

------Sharp_Quadratic

------Soften

------Video

----FloatController

------AudioFloat

------bezier_float

------Block

------Float_Expression

------float_list

------Float_Motion_Capture

------Float_Reactor

------float_script

------linear_float

------LOD_Controller

------Missing_Float_Control

------Noise_float

------On_Off

------SlaveFloat

------tcb_float

------Waveform_Float

----Layer_Manager

----MasterBlockController

------Block_Control

------Free_Center

------MasterBlock

----material

------Blend

------compositematerial

------DoubleSided

------doubleSidedMat

------Matte

------MatteShadow

------Missing_Mtl

------Morphermaterial

------Multimaterial

------multiSubMaterial

------NoMaterial

------RaytraceMaterial

------Shellac

------standard

------Standardmaterial

------TexOutputClass

--------StandardTextureOutput

------textureMap

--------Adobe_Photoshop_Plug_In_Filter

--------Adobe_Premiere_Video_Filter

--------bitmapTex

--------Bitmaptexture

--------Bricks

--------Cellular

--------Checker

--------compositeTexture

--------CompositeTexturemap

--------Dent

--------falloff

--------fallofftextureMap

--------FlatMirror

--------Gradient

--------Gradient_Ramp

--------Marble

--------Mask

--------maskTex

--------Missing_TextureMap

--------Mix

--------Noise

--------NoTexture

--------output

--------Paint

--------Particle_Age

--------Particle_MBlur

--------Perlin_Marble

--------Planet

--------Raytrace

--------Reflect_Refract

--------RGB_Multiply

--------RGB_Tint

--------Smoke

--------Speckle

--------Splat

--------Stucco

--------Swirl

--------Thin_Wall_Refraction

--------Vertex_Color

--------Water

--------Wood

------TopBottom

------topBottomMat

------UVGenClass

--------Missing_UVGen

--------StandardUVGen

------XYZGenClass

--------Missing_XYZGen

--------StandardXYZGen

----Matrix3Controller

------IK_ControllerMatrix3Controller

------Link_Control

------Link_Transform

------lookat

------Missing_Matrix3_Control

------prs

------Slave_Control

------TVDummyControl

----modifier

------Affect_Region

------Bend

------Bevel

------Bevel_Profile

------CameraMap

------Cap_Holes

------CrossSection

------DeleteMesh

------DeleteSplineModifier

------Displace

------Disp_Approx

------Edit_Mesh

------Edit_Patch

------Edit_Spline

------Extrude

------Face_Extrude

------FFDBox

------FFDCyl

------FFD_2x2x2

------FFD_3x3x3

------FFD_4x4x4

------FFD_Select

------Fillet_Chamfer

------Flex

------Lathe

------Lattice

------Linked_xform

------MaterialByElement

------Materialmodifier

------Melt

------MeshSmooth

------Mesh_Select

------MIrror

------Missing_OSM

------Morpher

------NCurve_Sel

------Noisemodifier

------Normalize_Spline

------Normalmodifier

------NSurf_Sel

------optimizeValue

--ActionPredicate

--ActiveXControl

--AngleAxis

--AngleControl

--Array

--ArrayParameter

--AtmosphericClass

--AttributeDef

----Layer_Manager

--BigMatrix

--BigMatrixRowArray

--BinStream

--BitArray

--bitmap

--BitmapControl

--BooleanClass

--Box2

--ButtonControl

--ccCurve

--ccPoint

--CCRootClass

--ChangeHandler

--CharStream

--CheckBoxControl

--CheckButtonControl

--class

--color

--ColorPickerControl

--ComboBoxControl

--Control

--CTBitMap

--CTMotionTracker

--CurveCtlGeneric

--CurvePointsArray

--EdgeSelection

--EditTextControl

--EffectClass

--EmptyClass

--EulerAngles

--FaceSelection

--FileStream

--float

--Generic

--GeomObject

--GroupBoxControl

--GroupEndControl

--GroupStartControl

--HashTable

--ImgTag

--integer

--Interface

--InterfaceFunction

--Interval

--IObject

--LabelControl

--LinkControl

--ListBoxControl

--MapButtonControl

--MappedGeneric

--MappedPrimitive

--MapSupportClass

--MaterialLibrary

--Matrix3

--MAXAKey

--MAXClass

--MAXCurveCtl

--MAXFilterClass

--MAXKey

--MAXKeyArray

--MAXMeshClass

----mesh

--MAXModifierArray

--MAXNoteKey

--MAXNoteKeyArray

--MAXObject

--MAXRefTarg

--MAXRootNode

--MAXScriptFunction

--MAXSuperClass

--MAXTVNode

--MeditMaterialsClass

--menuitem

--MixinInterface

--ModifierClass

--MotionTracker

--MouseTool

--MPassCamEffectClass

--MSComMethod

--MSCustAttribDef

--MSDispatch

--MSPluginClass

--MtlButtonControl

--MultiListBoxControl

--MultiMaterialClass

--name

--NodeChildrenArray

--NodeGeneric

--NoteTrack

--Number

--NURBSDisplay

--NURBSObject

----NURBSControlVertex

----NURBSCurve

------NURBSBlendCurve

------NURBSChamferCurve

------NURBSCVCurve

--------NURBSCurveOnSurface

------NURBSFilletCurve

------NURBSIsoCurve

------NURBSMirrorCurve

------NURBSOffsetCurve

------NURBSPointCurve

--------NURBSPointCurveOnSurface

------NURBSProjectNormalCurve

------NURBSProjectVectorCurve

------NURBSSurfaceEdgeCurve

------NURBSSurfaceNormalCurve

------NURBSSurfSurfIntersectionCurve

------NURBSXFormCurve

----NURBSPoint

------NURBSCurveConstPoint

------NURBSCurveIntersectPoint

------NURBSCurveSurfaceIntersectPoint

------NURBSIndependentPoint

------NURBSPointConstPoint

------NURBSSurfConstPoint

----NURBSSurface

------NURBS1RailSweepSurface

------NURBS2RailSweepSurface

------NURBSBlendSurface

------NURBSCapSurface

------NURBSCVSurface

------NURBSExtrudeSurface

------NURBSFilletSurface

------NURBSLatheSurface

------NURBSMirrorSurface

------NURBSMultiCurveTrimSurface

------NURBSNBlendSurface

------NURBSOffsetSurface

------NURBSPointSurface

------NURBSRuledSurface

------NURBSULoftSurface

------NURBSUVLoftSurface

------NURBSXFormSurface

----NURBSTexturePoint

--NURBSSelection

--NURBSSet

--NURBSSurfaceApproximation

--NURBSTextureSurface

--object

--OkClass

--OLEMethod

--OLEObject

--PathName

--PickerControl

--Point2

--point3

--Primitive

--progressBar

--Quat

--RadioControl

--Ray

--RCMenu

--RolloutClass

--RolloutControl

--RolloutFloater

--SelectionSet

--SelectionSetArray

--Set

----ObjectSet

--SliderControl

--SpinnerControl

--StandardMaterialClass

--StaticMethodInterface

--String

--StringStream

--StructDef

--subAnim

--TextureClass

--time

--Timer

--TriMesh

--UndefinedClass

--UnsuppliedClass

--UserGeneric

--ValueRef

--VertexSelection

--WindowStream

--XRefScene

--MAXWrapper

----atmospheric

------Fire_Effect

------Fog

------Missing_Atmospheric

------RenderEnvironment

------Volume_Fog

------Volume_Light

----BitmapIO

------Autodesk_Animator_Flic

------AVI

------BMP

------bmpio

------CIN

------CMB

------EPS_Image

------GIF

------IFL

------JPEG

------jpegio

------pngio

------Portable_Network_Graphics

------PSD_I_O

------QTime

------rgb

------RLA

------RPF

------Targa

------tgaio

------TIF

------YUV

----CustAttrib

------Missing_Custom_Attribute_Plugin

----filter

------Area

------Blackman

------Blendfilter

------Catmull_Rom

------Cook_Variable

------cubic

------Filter_kernel_plug_in_not_found

------Mitchell_Netravali

------Plate_Match_MAX_R2

------Quadratic

------Sharp_Quadratic

------Soften

------Video

----FloatController

------AudioFloat

------bezier_float

------Block

------Float_Expression

------float_list

------Float_Motion_Capture

------Float_Reactor

------float_script

------Float_Wire

------FloatList

------FloatReactor

------linear_float

------LOD_Controller

------Missing_Float_Control

------Noise_float

------On_Off

------SlaveFloat

------tcb_float

------Waveform_Float

------WireFloat

----GlobalUtilityPlugin

------MaxRenderer_COM_Server

------Plugin_Manager

----IKSolver

------IKHISolver

------IKLimb

----MasterBlockController

------Block_Control

------Master_Controller_plugin_not_found

------MasterBlock

------MasterList

----material

------Blend

------compositematerial

------DoubleSided

------doubleSidedMat

------Matte

------MatteShadow

------Missing_Mtl

------Morphermaterial

------Multimaterial

------multiSubMaterial

------NoMaterial

------RaytraceMaterial

------Shellac

------standard

------Standardmaterial

------TexOutputClass

--------StandardTextureOutput

------textureMap

--------Adobe_Photoshop_Plug_In_Filter

--------Adobe_Premiere_Video_Filter

--------bitmapTex

--------Bitmaptexture

--------Bricks

--------Cellular

--------cellularTex

--------Checker

--------Combustion

--------compositeTexture

--------CompositeTexturemap

--------Dent

--------dents

--------falloff

--------fallofftextureMap

--------Flat_Mirror

--------flatMirror

--------Gradient

--------Gradient_Ramp

--------Marble

--------Mask

--------maskTex

--------Missing_TextureMap

--------Mix

--------mixTexture

--------Noise

--------NoTexture

--------output

--------Particle_Age

--------Particle_MBlur

--------particleBlur

--------Perlin_Marble

--------perlinMarble

--------Planet

--------Raytrace

--------Reflect_Refract

--------reflectRefract

--------RGB_Multiply

--------RGB_Tint

--------rgbMult

--------rgbTint

--------Smoke

--------Speckle

--------Splat

--------Stucco

--------Swirl

--------Thin_Wall_Refraction

--------thinWallRefraction

--------Vertex_Color

--------Water

--------Wood

------TopBottom

------topBottomMat

------UVGenClass

--------Missing_UVGen

--------StandardUVGen

------XYZGenClass

--------Missing_XYZGen

--------StandardXYZGen

----Matrix3Controller

------IK_ControllerMatrix3Controller

------IKChainControl

------IKControl

------Link

------Link_Constraint

------lookat

------Missing_Matrix3_Control

------prs

------Slave_Control

------transform_script

------TVDummyControl

----modifier

------Affect_Region

------Bend

------BendMod

------Bevel

------Bevel_Profile

------CameraMap

------Cap_Holes

------ConvertToPatch

------CrossSection

------DeleteMesh

------DeletePatch

------DeleteSplineModifier

------Disp_Approx

------Displace

------Edit_Mesh

------Edit_Patch

------Edit_Spline

------Extrude

------Face_Extrude

------FFD_2x2x2

------FFD_3x3x3

------FFD_4x4x4

------FFD_Select

------FFD2x2x2

------FFD3x3x3

------FFD4x4x4

------FFDBox

------FFDCyl

------Fillet_Chamfer

------Flex

------HSDS_Modifier

------HSDSObject

------Lathe

------Lattice

------Linked_XForm

------LinkedXForm

------MaterialByElement

------Materialmodifier

------Melt

------Mesh_Select

------MeshSelect

------meshsmooth

------MIrror

------Missing_OSM

------Morpher

------MultiRes

------NCurve_Sel

------Noisemodifier

------Normalize_Spl

------Normalize_Spline

------Normalmodifier

------NSurf_Sel

------optimize

------Patch_Select

------PatchDeform

------PathDeform

------Point_Cache

------PointCache

------Poly_Select

------Preserve

------Push

------Relax

------Ripple

------Skew

------Skin

------SliceModifier

------smooth

------SmoothModifier

------Spherify

------SplineSelect

------Squeeze

------STL_Check

------Stretch

------surface

------SurfDeform

------Taper

------tessellate

------Trim_Extend

------Turn_to_Mesh

------Turn_to_Patch

------Turn_to_Poly

------Twist

------Unwrap_UVW

------UVW_Xform

------Uvwmap

------UVWUnwrap

------Vertex_Colors

------VertexPaint

------Vol__Select

------VolumeSelect

------Wave

------XForm

----MorphController

------Barycentric_Morph_Controller

------Cubic_Morph_Controller

------Missing_Morph_Control

----MPassCamEffect

------Depth_of_FieldMPassCamEffect

------Motion_BlurMPassCamEffect

------multiPassDOF

------multiPassMotionBlur

------Standin_for_missing_MultiPass_Camera_Effect_Plugin

----node

------camera

--------Freecamera

--------Missing_Camera

--------Targetcamera

------GeometryClass

--------Apollo_Param_Container

--------apolloParamContainer

--------Blizzard

--------BoneGeometry

--------BoneObj

--------Boolean2

--------Box

--------C_Ext

--------Capsule

--------ChamferBox

--------ChamferCyl

--------Cone

--------Conform

--------Connect

--------ControlContainer

--------CV_Surf

--------Cylinder

--------Damper

--------Editable_mesh

--------Editable_Patch

--------Editable_Poly

--------EditablePolyMesh

--------Gengon

--------GeoSphere

--------Hedra

--------Hose

--------L_Ext

--------Loft

--------LoftObject

--------Mesher

--------meshGrid

--------Missing_GeomObject

--------Morph

--------Nurbs

--------NURBS_Imported_Objects

--------NURBSSurf

--------OilTank

--------OldBoolean

--------PArray

--------particleMesher

--------PCloud

--------Plane

--------Point_Surf

--------Point_SurfGeometry

--------PolyMeshObject

--------Prism

--------Pyramid

--------Quadpatch

--------RingWave

--------RmModel

--------RmModelGeometry

--------Scatter

--------ShapeMerge

--------SlidingDoor

--------SlidingWindow

--------Snow

--------Sphere

--------Spindle

--------Spray

--------Spring

--------SuperSpray

--------Targetobject

--------Teapot

--------Terrain

--------Torus

--------Torus_Knot

--------TriMeshGeometry

--------Tripatch

--------Tube

------helper

--------Anchor

--------AudioClip

--------Background

--------Billboard

--------Bone

--------BoxGizmo

--------CamPoint

--------Compass

--------Cone_Angle

--------ConeAngleManip

--------CylGizmo

--------Dummy

--------Falloff_Manipulator

--------FalloffManip

--------FogHelper

--------grid

--------Hotspot_Manip

--------HotspotManip

--------IK_Chain_Object

--------IK_Swivel_Manip

--------IKSwivelManip

--------Inline

--------LOD

--------Missing_Helper

--------NavInfo

--------Plane_Angle

--------PlaneAngleManip

--------Point

--------PointHelperObj

--------Position_Manip

--------PositionManip

--------Protractor

--------ProxSensor

--------radiusManip

--------Reactor_Angle_Manip

--------Reactor_Vector_Handle_Manip

--------ReactorAngleManip

--------ReactorVectorHandleManip

--------Rotation_--

--------Rotation_Valuehelper

--------RotationValueManip

--------Slider_Manip

--------SliderManip

--------sliderManipulator

--------Sound

--------SphereGizmo

--------Tape

--------TimeSensor

--------TouchSensor

--------uvwMappingHeightManip

--------uvwMappingLengthManip

--------uvwMappingUTileManip

--------uvwMappingVTileManip

--------uvwMappingWidthManip

------light

--------Directionallight

--------freeSpot

--------Missing_Light

--------Omnilight

--------TargetDirectionallight

--------targetSpot

------NodeObject

------shape

--------Arc

--------Circle

--------CV_Curve

--------CV_Curveshape

--------Donut

--------Ellipse

--------Helix

--------line

--------LinearShape

--------Lines

--------Missing_Shape

--------Ngon

--------NURBSCurveShape

--------Point_Curve

--------Point_Curveshape

--------Rectangle

--------section

--------Simple_Shape

--------Simple_Spline

--------SplineShape

--------Star

--------text

------SpacewarpObject

--------BendModWSM

--------Bomb

--------CameraMapSpaceWarp

--------ConformSpaceWarp

--------Deflector

--------Drag

--------gravity

--------MapScalerSpaceWarp

--------Missing_WSM_Object

--------Motor

--------Path_Follow

--------PathDeformSpaceWarp

--------PBomb

--------PDynaFlect

--------PDynaflector

--------POmniFlect

--------PushSpaceWarp

--------SDeflector

--------SDynaFlect

--------SDynaflector

--------SOmniFlect

--------SpaceBend

--------Spacedisplace

--------SpaceFFDBox

--------SpaceFFDCyl

--------SpaceNoise

--------Spaceripple

--------SpaceSkew

--------SpaceStretch

--------SpaceTaper

--------SpaceTwist

--------Spacewave

--------UDeflector

--------UDynaDeflector

--------UDynaFlect

--------UOmniFlect

--------Vortex

--------Wind

------System

--------Bones

--------Missing_System

--------Ring_Array

--------Sunlight

--------XRefObject

----ParamBlock

------ParamBlockParamBlock

----ParamBlock2----

------ParamBlock2ParamBlock2

----Point3Controller

------AudioPoint3

------bezier_color

------bezier_point3

------Color_RGB

------Missing_Point3_Control

------Noise_point3

------Point3_Expression

------point3_list

------Point3_Motion_Capture

------Point3_Reactor

------point3_script

------Point3_Wire

------Point3_XYZ

------Point3List

------Point3Reactor

------Point3Spring

------Slave_Point3

------SlavePoint3

------SpringPoint3Controller

------tcb_point3

------WirePoint3

----PositionController

------Attachment

------AudioPosition

------bezier_position

------Dynamics_Position_Controller

------linear_position

------Missing_Position_Control

------Noise_position

------path

------Path_Constraint

------Position_Constraint

------Position_Expression

------position_list

------Position_Motion_Capture

------Position_Reactor

------position_script

------Position_Wire

------Position_XYZ

------PositionList

------PositionReactor

------PositionSpring

------SlavePos

------SpringPositionController

------Sunlight_Slave_Controller

------Surface_position

------tcb_position

------WirePosition

----QuatController

----RadiosityEffect

------Missing_Radiosity

----ReferenceMaker

------CurveControl

------CustAttribContainer

------Deform_Curve

------HSUtil

------Material_Editor

------MeshCollision

------Missing_RefMaker

------MtlBaseLib

------MtlLib

------NamedSelSetList

------NodeNamedSelSet

------PlanarCollision

------Scene

------SphericalCollision

------StdDualVS

------Texmaps

------TexmapsReferenceMaker

----ReferenceTarget

------Auto_Secondary_Element

------Bulge_Angle_Deformer

------gizmoBulge

------gizmoJoint

------gizmoJointMorph

------Glow_Element

------Gradient_GradCtlData

------IK_Controller

------JAngleData

------JBinaryData

------JBoolData

------JColor3Data

------JColorData

------JFlagCtlData

------JFlagSetData

------JFloat3Data

------JFloatData

------JGradCtlData

------Joint_Angle_Deformer

------Joystick_Input_Device

------JPercent3Data

------JPercentData

------JSubtex

------JWorld3Data

------JWorldData

------LZFlare_AutoSec_Base

------LZFlare_AutoSec_Data

------LZFlare_Aux_Data

------LZFlare_Data

------LZFlare_Glow_Data

------LZFlare_Inferno_Data

------LZFlare_ManSec_Base

------LZFlare_ManSec_Data

------LZFlare_Prefs_Data

------LZFlare_Rays_Data

------LZFlare_Rend_Data

------LZFlare_Ring_Data

------LZFlare_Star_Data

------LZFlare_Streak_Data

------LZFocus_Data

------LZGlow_Aux_Data

------LZGlow_Data

------LZGlow_Rend_Data

------LZHilight_Aux_Data

------LZHilight_Data

------LZHilight_Rend_Data

------Manual_Secondary_Element

------MIDI_Device

------Missing_RefTarget

------Morph_Angle_Deformer

------Mouse_Input_Device

------Ray_Element

------Ray_Engine

------Raytrace_Engine_Global_Parameters

------Raytrace_Texture_ParamBlock

------RenderElementMgr

------Ring_Element

------Star_Element

------Streak_Element

------This_Data

------TVNode

----renderEffect

------blur

------Brightness_and_Contrast

------briteCon

------Color_Balance

------colorBalance

------Depth_of_Field

------DOFEffect

------File_Output

------fileOut

------Film_Grain

------FilmGrain

------imageMotionBlur

------Lens_Effects

------Missing_Render_Effect

------Motion_Blur

----RenderElement

------Alpha

------alphaRenderElement

------Atmosphere

------atmosphereRenderElement

------BackgroundRenderElement

------Beauty

------beautyRenderElement

------bgndRenderElement

------BlendRenderElement

------clrShadowRenderElement

------Colored_Shadow

------Diffuse

------diffuseRenderElement

------emissionRenderElement

------Missing_Render_Element_Plug_in

------Reflection

------reflectionRenderElement

------Refraction

------refractionRenderElement

------Self_Illumination

------ShadowRenderElement

------Specular

------specularRenderElement

------Z_Depth

------ZRenderElement

----RendererClass

------Default_Scanline_Renderer

------DefaultScanlineRenderer

------Missing_Renderer

------VUE_File_Renderer

----RotationController

------AudioRotation

------bezier_rotation

------Dynamics_Rotation_Controller

------Euler_XYZ

------linear_rotation

------Local_Euler_XYZ

------LookAt_Constraint

------Missing_Rotation_Control

------Noise_rotation

------Orientation_Constraint

------rotation_list

------Rotation_Motion_Capture

------Rotation_Reactor

------rotation_script

------Rotation_Wire

------RotationList

------RotationReactor

------SlaveRotation

------tcb_rotation

------WireRotation

----ScaleController

------AudioScale

------bezier_scale

------linear_scale

------Missing_Scale_Control

------Noise_scale

------Scale_Expression

------scale_list

------Scale_Motion_Capture

------Scale_Reactor

------scale_script

------Scale_Wire

------ScaleList

------ScaleReactor

------ScaleXYZ

------SlaveScale

------tcb_scale

------WireScale

----Shader

------Anisotropic

------Blinn

------Blinn2

------BlinnShader

------Metal

------Metal2

------Missing_Shader_Plug_in

------Multi_Layer

------MultiLayer

------Oren_Nayar_Blinn

------OrenNayarBlinn

------Phong

------Phong2

------Strauss

----Shadow

------raytraceShadow

------shadowMap

----SpacewarpModifier

------Bombbinding

------Deflectorbinding

------Displace_Mesh

------Displace_NURBS

------Displacebinding

------DragMod

------FFD_Binding

------Gravitybinding

------MapScaler

------Missing_WSM

------MotorMod

------Particle_Cache

------ParticleCache

------Path_FollowMod

------PBombMod

------PDynaFlectMod

------Point_CacheSpacewarpModifier

------PointCacheWSM

------POmniFlectMod

------PushMod

------Ripplebinding

------SDeflectMod

------SDynaFlectMod

------SimpleOSMToWSMMod

------SOmniFlectMod

------SpaceCameraMap

------SpaceConform

------SpacePatchDeform

------SpacePathDeform

------SpaceSurfDeform

------Surface_Mapper

------UDeflectorMod

------UDynaFlectMod

------UOmniFlectMod

------VortexMod

------Wavebinding

------Windbinding

----ToneOperator

------Automatic_Exposure_Control

------AutomaticAdaptiveExposureControl

------Missing_Exposure_Control

----UtilityPlugin

------ASCII_Object_Output

------Asset_Browser

------Assign_Vertex_Colors

------Camera_Match

------Camera_Tracker

------collapse

------Color_Clipboard

------COM_DCOM_Server_Control

------Dynamics

------Follow_Bank

------IFL_Manager

------Level_of_Detail

------Link_Inheritance__Selected

------MapPath_Editor

------MAX_File_Finder

------MAXScript

------Measure

------Motion_Capture

------Polygon_Counter

------Rescale_World_Units

------Reset_XForm

------Resource_Collector

------Shape_Check

------Strokes

------Surface_Approximation

------UVW_Remove

------Visual_MAXScript

------VisualMSUtil


Reserved Keywords, Symbols, Punctuation and Variables

As with any computer language, MAXScript features a number of lexical tokens, corresponding to the words and numbers and punctuation that are the building blocks of English. Tokens fall into several categories:

  • Reserved ‘keywords’ that typically introduce clauses in the language, such as if, for, and function.

  • Punctuation marks and symbols that separate or group clauses or specify math operators, etc.

  • Reserved global variables containing 3ds Max system global variables and MAXScript predefined global variables.

The following list of topics contains information about the above types of tokens and their syntax:

Language Reserved Keywords

Punctuation and Symbols

Reserved Global Variables


Language Reserved Keywords

Keywords begin or separate portions of MAXScript commands. For example, one form of the if expression is:

if <expr> then <expr> [ else <expr> ]

In order for MAXScript to easily identify the various portions of the if expression, the words if, then and else are reserved keywords and can not be used as variable names or identifiers. So, for example, you cannot declare a variable or function called if. The following table lists all MAXScript reserved keywords. Click a reserved keyword to go to a description of its usage. In some cases, a keyword may have more additional meanings, depending on its context. This information is also summarized in MAXScript Grammar .

Reserved Keywords

about

and

animate

as

at

by

case

catch

collect

continue

coordsys

do

else

exit

fn

for

from

function

global

if

in

local

macroscript

mapped

max

not

of

off

on

or

parameters

persistent

plugin

rcmenu

return

rollout

set

struct

then

throw

to

tool

try

undo

utility

when

where

while

with

NOTE:

The from keyword is reserved, but not currently used.


Punctuation and Symbols

The following table shows all MAXScript punctuation marks and symbols. Their meanings are described in the definitions of the various language constructs that use them and also in MAXScript Grammar . Some of these punctuation marks and symbols offer more information. Click a linked punctuation mark or symbol to go to a description of its usage. In some cases, a keyword may have more additional meanings, depending on its context.

(

)

+

*

-

/

^

+=

-=

*=

/=

--

=

;

<eol>

,

[

]

:

'

&

.

{

}

#

==

!=

<

>

>=

<=

?

$

...

..

\


C++-Style Bracketing Comments

C++-style bracketing can be used to comment out extended segments of code or add lengthy comments. These comments begin with the two characters /* and end at the next */ (or end of file).

EXAMPLE

/* this is a long comment

blah blah

print "debug 1" -- code commented out

more comments

*/

You can also use this within a line to comment out a script fragment:

EXAMPLE

for i in 1 to 10 do ( /* messageBox "in loop"; */ frabulate i )

NOTE:

The /* and */ have to be adjacent characters. If you leave out the closing */ or make it * /, the rest of the file will be commented out.

See also

MAXScript Editor Commands

Source Code Layout

Source Code Layout and Continuation Lines


Reserved Global Variables

Reserved global variables are variables to which MAXScript automatically assigns values. The MAXScript reserved global variables fall in 3 categories: predefined globals (such as red and pi); 3ds Max system globals which give you access to state information in the 3ds Max system (such as currentFrame); and MAXScript system globals which give you access to the MAXScript system state.

Unlike language reserved keywords, you can re-use these variable names as local variables, with values that you specify. However, it is highly recommended that you do not re-use reserved global variable names as such usage can be highly confusing.

See also

Predefined Globals

3ds Max System Globals

MAXScript System Globals

Variables - Assignment and Scope


Predefined Globals

The predefined global variables contain special values that are frequently used in scripts. These variables are read-only.

true, false

Boolean values. Can be used for testing the results of comparisons and for state tests.

on, off

Synonyms for true and false, sometimes easier to read in state accesses.

pi, e

Float values that contain the standard mathematical constants' values. They are equivalent to 3.1415926535 and 2.718281828, respectively.

red, green, blue, white, black, orange, yellow, brown, gray

A predefined set of useful Color values.

x_axis, y_axis, z_axis

Point3 values that define normal vectors for the 3 major axes. They are equivalent to [1, 0, 0], [0, 1, 0], and [0, 0, 1], respectively.

ok

A void value returned by some functions or expressions that don’t have a meaningful value to return.

undefined

The initial value of all variables and array elements. MAXScript generates an error if you try to perform any operation on the undefined value, except for checking to see if some value is equal to it or not:

if a == undefined then print "oh, oh"

if b != undefined then print "whew!"

unsupplied

The initial value of all function keyword arguments. Keyword arguments are optional arguments to functions. If a keyword argument is not supplied by the function caller and the function definition does not specify a default value, MAXScript initializes the keyword argument to unsupplied. You can test for this value to see whether a caller has supplied a particular keyword. For more details, see Function Calls .

dontcollect

This value is used in for loops to signal that the value is not to be collected. See For Loop for details.


3ds Max System Globals

The 3ds Max system global variables give you access to state information in the 3ds Max system. Except where noted as read-only, you can both access and assign to the global variables.

A

activeGrid

Contains the currently active grid. If the home grid is active, returns the value undefined. You can assign a grid node object to this variable to make it the currently active grid. See Viewport Grids .

You can also return to the home grid by setting activegrid = undefined.

ambientColor

Lets you get and set a Color value that defines the global rendering environment (Rendering > Environment) ambient lighting color. See Working with 3ds Max Atmospherics .

ambientColorController

Lets you get and set a Controller value that defines the global rendering environment (Rendering > Environment) ambient lighting color controller. See Working with 3ds Max Atmospherics .

animationRange

Lets you get and set an Interval value that defines the start and end of the current active animation range. This variable contains the corresponding values set in the Time Configuration dialog. See Time Configuration Dialog .

animButtonEnabled

A Boolean value that specifies whether the user can change the state of the Animate button. If set to false, the user can not change the Animate button state. If set to true, the user can change the Animate button state. A script can change the state of the Animate button using animButtonState regardless of the animButtonEnabled value. See Time Control .

animButtonState

Lets you to get and set the state of the Animate button. A Boolean value - true if Animate is on, false if Animate is off. See Time Control .

autoBackup.enabled

Get/set whether auto backup is enabled as a <boolean>.

autoBackup.time

Get/set the time in minutes between auto backup as a <float>. If the specified value is < 0.01 (the UI limit), the time is set to 0.01.

B

backgroundColor

Lets you get and set a Color value that defines the global rendering environment (Rendering > Environment) background color. See Working with 3ds Max Atmospherics .

backgroundColorController

Lets you get and set a Controller value that defines the global rendering environment (Rendering > Environment) background color controller. See Working with 3ds Max Atmospherics .

backgroundImageFileName

Lets you get and set a String value that defines the viewport background image bitmap file name. This variable contains the corresponding bitmap file name set in the Viewport Background dialog. See Viewport Background Images .

C

cui.commandPanelOpen

Lets you get and set whether the command panel is displayed. A Boolean value - true if the command panel is displayed, false if not displayed. See Command Panels .

currentMaterialLibrary

Contains a virtual array of materials and root level maps corresponding to the currently opened material library. You can get library materials via array indexing and iterate over them in a for loop. The array can be indexed by number, or by name or string to select by material name. This variable is read-only. See MaterialLibrary Values .

D

displayGamma

fileInGamma

fileOutGamma

Lets you get and set Float values that define the gamma preference settings. They contain the corresponding values set in the Gamma tab of the Preferences dialog. You could use these global variables to establish gamma for a MAXScript-created bitmap,

FOR EXAMPLE,

b = bitmap 320 240 gamma:displayGamma

render camera:c to:b

This would cause the rendered bitmap to display using the current displays gamma setting if used as a rollout bitmap or button image.

displaySafeFrames

Lets you get and set whether Show Safe Frames is on for the active viewport. A Boolean value - true if Show Safe Frames is on, false if off.

E

environmentMap

Lets you get and set a TextureMap value that defines the global rendering environment (Rendering > Environment) environment map. See Working with 3ds Max Atmospherics .

F

flyOffTime

Lets you get and set an Integer value that defines the time in milliseconds the user must hold down on a flyout before the flyout is activated. This variable contains the corresponding value set in the General tab of the Preferences dialog.

frameRate

Lets you get and set an Integer value that defines the current scene frame rate in frames-per-second. This variable contains the corresponding value set in the Time Configuration dialog. See Time Configuration Dialog .

G

globalTracks

Contains a MAXTVNode value that defines the top-level Global Tracks node in Track View. This variable is read-only. See Track View Nodes .

H

hardwareLockID

Contains an Integer value that defines the 3ds Max hardware lock ID. This variable is read-only.

hotspotAngleSeparation

Contains a Float value that defines the Hot Spot/FallOff Angle Separation value. This variable contains the corresponding value set in the Rendering tab of the Preferences dialog. This variable is read-only.

K

keyboard.shiftPressed

keyboard.controlPressed

keyboard.altPressed

keyboard.escPressed

These variables access the current state of the keyboard shift, control, alt and escape keys and return true or false depending on the pressed state of the key at the time the variable is read and are read-only variables.

L

lightTintColor

Lets you get and set a Color value that defines the global rendering environment (Rendering > Environment) Global Lighting Tint color. See Working with 3ds Max Atmospherics .

lightTintColorController

Lets you get and set a Controller value that defines the global rendering environment (Rendering > Environment) Global Lighting Tint color controller. See Working with 3ds Max Atmospherics .

lightLevel

Lets you get and set a Float value that defines the global rendering environment (Rendering > Environment) Global Lighting Tint Level. See Working with 3ds Max Atmospherics .

lightLevelController

Lets you get and set a Controller value that defines the global rendering environment (Rendering > Environment) Global Lighting Tint Level controller. See Working with 3ds Max Atmospherics .

listener

Read only system global - listener edit window <WindowStream> value

localTime

Contains a String value that defines the current local date and time. This variable is read-only. An example of the value stored in localtime is:

s = localTime

"4/14/97 10:24:57 AM"

The format of this string is controlled by the date format selected in the main Windows Regional Settings control panel.

logsystem.quietmode

Lets you get and set whether error logging quiet mode is enabled. A Boolean value set to true when you do not want error messages from the renderer to bring up dialog boxes. If set to false, error messages from the renderer will bring up dialog boxes. 3ds Max sets the corresponding internal variable to true during network rendering to suppress error messages such as the "Missing Maps" and "Missing Map Coordinates" dialogs. If this variable is set to true and the renderer generates an error message, the renderer will exit. After setting quiet mode, do not forget to clear it when you are done, since the user will not see any error messages from the renderer while quiet mode is enabled.

M

macroRecorder

Read only system global - macro recorder edit window <WindowStream> value

manipulateMode

Get/set the 3ds Max manipulate mode. When true, manipulate mode is active.

maxFileName

Contains a String value that defines the file name for the currently open scene. This variable is read-only.

maxFilePath

Contains a String value that defines the directory path for the currently open scene. This variable is read-only.

maxOps.productAppID : enum : Read

productAppID enums: {#none|#max|#viz|#gmax}

The enum values returned are as follows:

#none - no ID

#max - 3ds Max

#viz - Autodesk VIZ

#gmax - gmax

meditMaterials

Contains a virtual array of materials and root level maps corresponding to the slots in the material editor. You can access material editor materials and root level maps via array indexing and iterate over them in a for loop. The array can be indexed by number to specify slot number or name or string to select by material and root level map name.

EXAMPLE

$foo.material = meditMaterials[1]

meditMaterials["foo mat"].diffuse = red

for m in meditMaterials do print m.diffuseMap

meditMaterials[1]=standard()

print meditMaterials.count -- number of slots

This variable is read-only, but the elements (the materials in the slots) are assignable. See MaterialLibrary Values . See Material Editor for methods for assigning materials and maps to the material editor slots.

N

numEffects

Contains an Integer value that defines the number of current render effects defined in the Rendering > Effects dialog list. This variable is read-only. See RenderEffect .

numAtmospherics

Contains an Integer value that defines the number of atmospheric events, as shown in Rendering > Environment. This variable is read-only. See Working with 3ds Max Atmospherics .

numSubObjectLevels

Lets you get the number of sub-object levels supported by the object or modifier currently selected in the modifier stack. If the Modify panel is not open or no objects are selected, the global contains the value undefined. See Modify Panel .

NOTE:

The subObjectLevel and numSubObjectLevels system global variables return values other than 'undefined' if you are in the Motion panel. At the top of the Motion panel there is a Selection Level/Sub-Object drop-down list. This is for Trajectory mode, and switches you in and out of Keys SO mode. Because of this, the test (subobjectlevel != undefined) is not a valid test of whether you are in the Modify panel. Instead, use the test (getCommandPanelTaskMode() == #modify).

O

P

playActiveOnly

Lets you get and set whether to playback the active viewport only. This variable contains the corresponding value set in the Time Configuration dialog. A Boolean value - true if Active Viewport Only is on, false if off. See Time Configuration Dialog .

preferences.constantReferenceSystem

Lets you get and set whether to use the same coordinate system for the Move, Rotate, and Scale tools in the 3ds Max toolbar. A Boolean value - true if Constant is on, false if off. This variable matches the Constant check box in the General page of Customize > Preferences.

preferences.dontRepeatRefMsg

A PRS animation controllers message notification system optimization was introduced in 3ds Max 6 and was enabled by default. It speeds up complex rigs using multiple animation controllers. When set to true, the optimization is enabled and no redundant notifications are sent by the controllers. When set to false, the animation system behaves as in 3ds Max 5 and earlier.

preferences.flyOffTime

Lets you get and set an Integer value that defines the time in milliseconds the user must hold down on a flyout before the flyout is activated. This variable contains the corresponding value set in the General page of Customize > Preferences.

preferences.InvalidateTMOpt

An optimization was introduced in 3ds Max 7 that checks to see if a node has already been invalidated before sending out notifications to it's dependents that it has been changed. It speeds up complex rigs, especially those that involve the new expose transform helper. When set to true, the optimization is enabled and multiple notifications will not be sent out. When set to false, the animation system behaves as in 3ds Max 6 and earlier. It is true by default.

preferences.maximumGBufferLayers

Lets you get and set an Integer value that specifies the maximum number of g-buffer layers generated during a render.

preferences.spinnerWrap

Lets you get and set a Boolean value that defines whether cursor wrapping is limited to an area close to the spinner when you drag to adjust spinner value. This variable contains the corresponding value set in the General page of Customize > Preferences.

preferences.spinnerPrecision

This integer value defines the number of decimal digits displayed by spinners.Corresponds to the Precision value in the Spinners group in Customize > Preferences > General.

preferences.spinnerSnap

This float value defines the spinner snap value. Corresponds to the Snap value in the Spinners group in Customize > Preferences > General.

preferences.useSpinnerSnap

This Boolean value defines whether to use the spinner snap. Corresponds to the Use Snap checkbox in the Spinners group in Customize > Preferences > General.

preferences.useLargeVertexDots

Lets you get and set whether to use small or large dots when representing vertices as dots. A Boolean value set to true if you when using dots to represent vertices and a large size is desired. The value of this variable only has effect when UseVertexDots is set to true. This variable contains the corresponding value set in the Viewports page of Customize > Preferences.

preferences.useTransformGizmos

Lets you get and set whether to use the Transform Gizmos. A Boolean value - true if on, false if off. This variable contains the corresponding value set in the Viewports page of Customize > Preferences.

preferences.useVertexDots

Lets you get and set whether to represent vertices as dots. A Boolean value set to true when you want to use dots as the representation of the vertices in a mesh. If set to false, ticks will be used. This variable contains the corresponding value set in the Viewports page of Customize > Preferences.

Q

R

realTimePlayback

Lets you get and set whether to playback in real time mode. This variable contains the corresponding value set in the Time Configuration dialog. A Boolean value - true if Real Time is on, false if off. See Time Configuration Dialog .

renderer

In versions prior 3ds Max 6, this global variable was used to get and set the renderer type (#production or #draft). The #draft renderer option has been removed from 3ds Max 6, making this variable obsolete. It only accepts and returns #production now and is kept for backwards compatibility of scripts from earlier versions that might be checking this value.

renderDisplacements

Lets you get and set whether to perform displacement mapping during a render. A Boolean value - true if displacement mapping is to be performed, false if not.

renderEffects

Lets you get and set whether to perform Render Effects after a scene render. A Boolean value - true if Render Effects are to be performed, false if not.

renderHeight

Lets you get and set an Integer value that defines the output size height for the active renderer. This variable contains the corresponding value set in the Render Scene dialog. See Render Scene Dialog .

renderPixelAspect

Lets you get and set an Integer value that defines the output pixel aspect for the active renderer. This variable contains the corresponding value set in the Render Scene dialog.

renderWidth

Lets you get and set an Integer value that defines the output size width for the active renderer. This variable contains the corresponding value set in the Render Scene dialog. See Render Scene Dialog .

rendOutputFilename

Lets you get and set a String value that defines the output file name for the active renderer. This variable contains the corresponding value set in the Render Scene dialog. If this global variable is set to "" the Save File check box in the Render Scene dialog is unchecked.

rendSimplifyAreaLights

When set to true, area lights will be examined and converted to point light sources when appropriate.

NOTE:

There is also an equaly-named parameter to the render() command to achieve this behavior.

rootNode

Contains a Node value that defines the root node of the scene. The root node does not physically exist in the scene, rather it is a special node that is the parent node of all nodes that are not linked to another node. The scene can be enumerated by accessing the children property of the root node. A run-time error is generated if you try to perform other node operations on the root node.

S

sceneMaterials

Contains a virtual array of materials and root level maps corresponding to the materials and root level maps present in the scene. You can get scene materials and root level maps via array indexing and iterate over them in a for loop. The array can be indexed by number, or by name or string to select by material or root level map name. This variable is read-only. See MaterialLibrary Values .

scriptsPath

Contains a String value that defines the full directory path to the current Scripts directory. This variable is read-only.

selectionSets

Contains a virtual array of all the current named node selection sets in the Named Selection Set drop-down list on the 3ds Max toolbar. You can get named selection sets via array indexing and iterate over them in a for loop. The array can be indexed by number, or by name or string to select by named selection sets. You can change, add and delete Named Selection Sets by using the standard array methods on the selectionSets array. See SelectionSetArray Values .

showEndResult

Lets you get and set the state of the Show End Result Toggle icon in the Modify panel. A Boolean Value - true if Show End Result is on, false if off. See Modify Panel .

skipRenderedFrames

Lets you get and set whether to skip rendered frames during a render. A Boolean Value - true if rendered frames are to be skipped, false if not.

sliderTime

Lets you get and set a Time value that defines the time associated with the 3ds Max time slider. See Time Control .

snapMode.active

Lets you get and set a Boolean value defining the Snap toggle state - on (true) or off (false). See Status Bar Buttons .

snapMode.type

Lets you get and set a Name value defining whether 2D (#2D), 2.5D (#2_5D), or 3D (#3D) is the current snap type. See Status Bar Buttons .

subObjectLevel

Lets you get and set the sub-object level in the Modify panel if it is open. An Integer value of zero or greater up to the number of sub-object levels supported by the currently open modifier, typically in the order shown in the Sub-Object drop-down list. A subObjectLevel of 0 means sub-object mode is off. If the Modify panel is not open or sub-object level setting not permitted in the current modifier, the global contains the value undefined. Use the numSubObjectLevels global variable to access the maximum valid subObjectlevel value. See Modify Panel .

EXAMPLE

b=box() -- create a box

em=edit_mesh() -- create an Edit Mesh modifier

addModifier $box01 em -- add edit mesh mod

max modify mode -- open mod panel

select $box01 -- select object box01

print subObjectLevel -- print the current subobject level

subObjectLevel = 2 -- set sub-object level to Edge

NOTE:

The subObjectLevel and numSubObjectLevels system global variables return values other than 'undefined' if you are in the Motion panel. At the top of the Motion panel, there is a Selection Level/Sub-Object drop-down. This is for Trajectory mode, and switches you in and out of Keys SO mode.

Because of this, the test (subobjectlevel != undefined) is not a valid test of whether you are in the Modify panel. Instead, use the test (getCommandPanelTaskMode() == #modify).

sysInfo.DesktopSize

A read only variable to get the desktop size in pixels as a <point2> value. See also System Information and getMAXWindowSize() under Miscellaneous Functions

sysInfo.DesktopBPP

A read only variable to get the desktop color depth in bits per pixel as an <integer> value. See also System Information

sysInfo.MAXPriority

Get/set the 3ds Max process priority as a <name> value. Valid priority values are #high, #normal, and #low. See also System Information

T

ticksPerFrame

Lets you get and set an Integer value defining the system time resolution. There are always 4800 ticks per second, this means that ticksPerFrame is dependent on the frames per second rate
(ticksPerFrame * frameRate == 4800)

timeConfiguration.playActiveOnly

Lets you get and set whether to playback the active viewport only. This variable contains the corresponding value set in the Time Configuration dialog. A Boolean value - true if Active Viewport Only is on, false if off. See Time Configuration Dialog .

timeConfiguration.realTimePlayback

Lets you get and set whether to playback in real time mode. This variable contains the corresponding value set in the Time Configuration dialog. A Boolean value - true if Real Time is on, false if off. See Time Configuration Dialog .

timeConfiguration.PlaybackSpeed

Lets you get and set the viewport playback speed mode. See Time Configuration Dialog .

timeConfiguration.PlaybackLoop

Get/set whether to loop the viewport playback. Only used when timeConfiguration.realTimePlayback is set to true. See Time Configuration Dialog . Available in 3ds Max 8 and higher.

timeConfiguration.useTrackBar

Lets you get and set the state of the Time Configuration dialog 'Key Steps / Use TrackBar' check box. A Boolean value - true if checked, false if not. See Time Configuration Dialog .

timeDisplayMode

NEW in 3ds Max 2008: [ AVG ] Lets you get and set whether to playback the Time Display mode. It contains the corresponding value set in the Time Configuration dialog as a Name value. Possible values are #frames, #smpte, #frameTicks, #timeTicks.

toolMode.coordSysNode

A read/write variable containing a node value or undefined. This variable reflects which node, if any, is the current reference coordinate system node. Assignment to this variable must be a node value.

trackbar.filter

Lets you get and set the filter specifying which types of keys to show in the Trackbar. A Name value - the valid values are: #all, #TMOnly, #currentTM, #object, and #mat.

trackbar.visible

Lets you get and set whether the trackbar is visible. A Boolean value - true if the trackbar is visible, false if invisible

trackViewNodes

Contains a MAXTVNode value that defines top-level World node in Track View. This variable is read-only. See Track View Nodes .

U

units.DisplayType

Get/set the current unit display type as a <name>. Valid unit display types are:

#Generic

#Metric

#US

#custom

units.MetricType

Get/set the current metric unit display type as a <name>. Valid metric unit display types are:

#Millimeters

#Centimeters

#Meters

#Kilometers

units.USType

Get/set the current US standard unit display type as a <name>. Valid US standard unit display types are:

#Frac_In

#Dec_In

#Frac_Ft

#Dec_Ft

#Ft_Frac_In

#Ft_Dec_In

units.USFrac

Get/set the current US fraction display type as a <name>. Valid US fraction display types are:

#Frac_1_1

#Frac_1_2

#Frac_1_4

#Frac_1_8

#Frac_1_10

#Frac_1_16

#Frac_1_32

#Frac_1_64

#Frac_1_100

units.CustomName

Get/set the current custom unit name as a <string>

units.CustomValue

Get/set the current custom unit value as a <float>

units.CustomUnit

Get/set the current custom unit type as a <name>. Valid custom unit display types are:

#Inches

#Feet

#Miles

#Millimeters

#Centimeters

#Meters

#Kilometers

units.SystemScale

Get/set the current system unit scale value as a <float>. This is the value shown in Customize Units Setup... > System Units Setup > System Units Scale group.

units.SystemType

Get/set the current system unit scale type as a <name>. This is the unit shown in Customize > Units Setup... > System Units Setup > System Units Scale group. Valid system unit scale types are:

#Inches

#Feet

#Miles

#Millimeters

#Centimeters

#Meters

#Kilometers

useEnvironmentMap

Lets you get and set the global rendering environment (Rendering > Environment) Use Map value. A Boolean value - true if Use Map is on, false if off. See Working with 3ds Max Atmospherics .

V

videoPostTracks

Contains a MAXTVNode value that defines the top-level Video Post Track View node. This variable is read-only. See Track View Nodes . This variable contains the value undefined in Autodesk VIZ.

viewport.activeViewport

Lets you get and set the index of the active viewport. See Accessing Active Viewport Info, Type, and Transforms .

viewport.numViews

Contains the number of viewports in the current viewport layout. This variable is read-only. See Accessing Active Viewport Info, Type, and Transforms .

Scanline Renderer Specific System Global Variables

The following 3ds Max system global variables are specific to 3ds Max’s default scanline A-Buffer renderer. These variables return undefined if the current renderer is not 3ds Max’s default scanline A-Buffer renderer.

scanlineRender.antiAliasFilter

Lets you get and set the anti-aliasing filter.

For a list of all of the anti-aliasing filters you can say:

showClass "*:filter*"

EXAMPLE

scanlineRender.antiAliasFilter = quadratic()

The anti-aliasing filters and their parameters are described in 3ds Max Scanline A-Buffer Renderer Anti-Aliasing Filters .

scanlineRender.antiAliasFilterSize

Contains a float value that defines the anti-aliasing filter size.

scanlineRender.enablePixelSampler

Lets you enables and disables global super sampling. A Boolean value - true if Disable all Samplers is off, false if on.


MAXScript System Globals

These globals give access to the MAXScript system state. You can access and assign to them as noted.

currentTime

Contains a Time value that defines the current evaluation time in frames as set by the at time context expression currently in force. This is useful in functions that need to do time-relative computations that may be called from code that sets working animation time. If there is no at time context in force, currentTime contains the current user interface slider time, unless a render is in progress. If a render is being performed, currentTime contains the frame being rendered. This variable is read-only.

editorFont

Lets you get and set a String value that defines the font name for script Editor windows. Setting this variable effects all currently open and future script Editor and MAXScript Listener windows. This variable contains the corresponding value set in the MAXScript page of Customize > Preferences.

The Tabbed Script Editor introduced in 3ds Max 2008 has its own extensive formatting controls documented in the topic MAXScript Editor - Properties File Settings and is not affected by this value.

editorFontSize

Lets you get and set an Integer value defining the font point size for script Editor. Setting this variable effects all currently open and future script Editor and MAXScript Listener windows. This variable contains the corresponding value set in the MAXScript page of Customize > Preferences.

The Tabbed Script Editor introduced in 3ds Max 2008 has its own extensive formatting controls documented in the topic MAXScript Editor - Properties File Settings and is not affected by this value.

editorShowPath

This system global variable controls whether the MAXScript Editor will display the full path of the edited script (true, default in 3ds Max 9 and higher), or only the file name (false, the only mode prior to 3ds Max 9).

This property affects both the Legacy Script Editor windows and the Tabbed Script Editor introduced in 3ds Max 2008.

editorTabWidth

Lets you get and set an Integer value defining the tab width (in characters) for Legacy Script Editor windows. Setting this variable affects all currently open and future script Editor windows.

The Tabbed Script Editor introduced in 3ds Max 2008 has its own extensive formatting controls documented in the topic MAXScript Editor - Properties File Settings and is not affected by this value.

escapeEnable

Lets you get and set a Boolean value defining whether ESC key interrupt detection is on or off. Setting enableEscape to false turns ESC key interrupt detection off, setting it to true turns it on again. This variable is useful when used in conjunction with a Progress Bar. You can set enableEscape to false when you don't want the user to be able to interrupt a script running a long computation and you have set up a progress bar with its own Cancel button. See Progress Bar Display .

In 3ds Max 9 and higher, the default value of this variable is false. It used to be true in versions prior to 3ds Max 9.

heapFree

Contains an Integer64 value defining the current amount of free memory in the MAXScript heap. This value will vary constantly depending on where MAXScript is in its collection regime. This variable is read-only.

The value type of this variable has been changed from Integer to Integer64 to accommodate the increased memory space of 64 bit systems in 3ds Max 9 and higher.

heapSize

Lets you get and set an Integer64 value defining the size of the heap currently allocated to MAXScript. MAXScript carves its own working memory (called a heap) out of the memory that 3ds Max has allocated.

You can add to this heap at any time by assigning the new size to this system variable,

FOR EXAMPLE

heapSize += 1000000 -- another meg please

See also Memory Allocation and Garbage Collection .

The value type of this variable has been changed from Integer to Integer64 to accommodate the increased memory space of 64 bit systems in 3ds Max 9 and higher.

inputTextColor

Lets you get and set a Color value defining the color of typed input text in Listener.

messageTextColor

Lets you get and set a Color value defining the color of error message text in Listener.

outputTextColor

Lets you get and set a Color value defining the color of output text in Listener.

options.oldPrintStyles

The printed form of all basic data value types, except for BigArray, are directly readable by the readValue() and readExpr() functions, making it simpler to read back in values printed to a file by MAXScript. If the pre-3ds Max 4 print forms are required for compatibility with existing scripts, you can set this variable to true.

options.showGCStatus

When set to true, the message "MXS GC" will be displayed in the status bar during MAXScript Garbage Collection . When set to false, no message will be displayed. The setting is stored in the 3dsmax.ini file in the [MAXScript] section. Available in 3ds Max 8 and higher.

stackLimit

The stack is region of reserved memory in which MAXScript temporarily stores status data such as procedure and function call return addresses, passed parameters, and local variables.

In versions prior to 3ds Max 9, this defaulted to 1024000 bytes. Certain scripts that contain recursive algorithms could exceed this limit and generate a runtime error. You could assign to the stackLimit variable to increase the stack size available.

In 3ds Max 9 and higher, the stack limit is 2048000 bytes but you cannot effectively change the size anymore. Assigning to the stackLimit variable will not change the stack size.

?'

A special variable that is used only in the context of the MAXScript Listener. This variable contains the result of the last expression evaluated in the Listener. For more details, see Using the '?' Symbol .


Variables - Assignment and Scope

A variable is a user-defined container to which you can assign a value, and then later retrieve the value. A variable is identified by its name, and anywhere the variable name is referenced, the value stored in that variable is used.

In this section, the various attributes and considerations associated with variables are described.

See also

Variable Assignment

Scope of Variables

Persistent Global Variables

Type-Free Variables

Reference Assignment

Memory Allocation and Garbage Collection

Manual Garbage Collection


Variable Assignment

The syntax for general assignment, <assignment>, is:

<destination> = <expr>

where <destination> can be one of:

<var_name>

<property>

<array_index>

Each of these destination type is described below.

MAXScript provides a swap() method that takes two valid assignment destinations as arguments and swaps their values. Its syntax is:

swap <destination> <destination>

Assignment to Variables

A variable is identified with a MAXScript <var_name>, as described in Names . If <destination> is a var_name, it identifies the variable to be assigned a value, as shown in the following examples:

x = 2 + 2 * 3 -- assign to variable x

y = [1, 2, 3] + pos -- assign to variable y

z = #(1, 2, "foo", "bar") -- assign to variable z

z = #oops -- oops, changed my mind

Assignment to Accessors

If <destination> is a <property> or an <array_index>, the assignment is to an accessor. Accessors are constructs used to access the components in compound values, such as arrays and 3D points. There are two kinds of accessors corresponding to the two kinds of compound values in MAXScript:

  • The component values are arranged in an indexable sequence, as in arrays or strings.

  • The compound value contains a fixed set of named components, as with 3D points and time intervals.

All 3ds Max objects, such as boxes, spheres, bend modifiers, or bitmap textures are treated as compound values in this sense. All their parameters, such as height and angle, or map file name, are accessed as named components. In MAXScript, these named components are referred to as properties. For more information, see Properties, Methods, Operators, and Literals .

Accessors have one of two forms, an <array_index>:

<operand> [ <expr> ] -- an indexed element

or a <property>:

<operand>.<var_name> -- a named property - property var_name of value in operand

Examples of assignment to accessors are:

$box01.pos = baseObj.pos + (baseObj.radius*[0,0,1])

Set the position property of object box01 based on the position and radius properties of the object whose value is stored in variable baseObj.

z[2] = d.rotation as eulerangles

Convert the rotation property value of the value stored in variable d to an eulerAngles class value, and store this value in element 2 of the array stored in variable z.

Because MAXScript is an origin 1 language, all sequencable collections in MAXScript start at index position 1. This is an important convention to remember when using the indexing operator.

The syntax definitions allow you to use any <operand> before the . or []. Because accessors are themselves operands, this definition is recursive, which means you can string accessors together to query nested arrays or properties:

my_things[i][j]

my_objects[i].target.position.x

Accessors are evaluated left-to-right. The first example evaluates the i’th element of my_things, which is presumably a nested array or an array of strings, before yielding the j'th element of that element.

The second example retrieves an object from an array of my_objects, then its target, then the position of the target (a 3D point), and finally the x coordinate of that point.

An <operand> can also be a block-expression, allowing you to compute the target object to be accessed.

FOR EXAMPLE,

(instance myNode).pos=myNode.parent.pos

Create an instance of the node whose value is stored in variable myNode, and set its position to the position of the myNode’s parent object.

(find_table "foo")[n - 2] = "fred"

Call function find_table with a parameter value of "foo". The return value from the function is presumably an array. Set element n-2 of this array to the value "fred".

The named properties defined for the MAXScript values and classes are documented with the value and class descriptions.

Order of Evaluation

In an assignment, <expr> is evaluated before <destination>, as can be seen in the following example:

SCRIPT

a=#() -- create an empty array to play with

a[(print "in <destination>";1)]=(print "in <expr>";10)

OUTPUT

#() -- result line 1

"in <expr>" -- output from <expr> side of assignment

"in <destination>" -- output from <destination> side of assignment

10 -- result line 2

Assignment in MAXScript is itself an expression and yields the value just assigned. Therefore, you can use assignments inside other expressions or cascade assignments, as in:

x = y = z = 0

#(1, 2, a = [0,0,1], 4)


Scope of Variables

Variables have an attribute called scope, which determines where in MAXScript code a variable can be accessed. MAXScript has two kinds of variable scope, global and local. Global variables are visible in all running MAXScript code and hold their values until you exit 3ds Max. Local variables are directly visible to code only in the lexical scope currently in effect, and hold their values only as long as the current scope is active. Once a scope is no longer active, you can no longer access the contents of a variable local to that scope. This is similar to how most modern programming languages implement variables. The conditions under which MAXScript creates a new scope are described next.

MAXScript provides language constructs used to explicitly declare and initialize both global and local variables.

The syntax for variable declaration, <variable_decls>, is as follows:

( local | global ) <decl> { , <decl> }

where <decl> is defined as:

<var_name> [ = <expr> ] -- name and optional initial value

EXAMPLES:

global baz -- initialized to 'undefined'

global foo=10, initialized=false -- initialized globals

local x = 1, -- continued on several lines

y = 2,

z = sqrt(123.7)

As mentioned above, local variables hold their values as long as that scope is active. In nested scopes, this is usually a very short period - it starts when a function or loop or block expression runs and ends when it exits. Each time the scope is entered at runtime, a new set of locals is created and then retired when the scope is exited.

Local Variables as 'Private Global' variables

In certain situations, however, the top-level scope can remains active for extended periods and so the locals declared at that top-level hold their values for that extended period. In particular, top-level locals declared in scripted rollouts, utilities, plug-ins, script controllers and Macro Scripts hold their values for as long as the rollout, utility, plug-in, or Macro Script exists. Typically, they remain in existence until you redefine them, so for example when you define a Macro Script and run it for the first time, the top-level scope is created and remains active over any number of subsequent executions unless you redefine the Macro Script. At this point, the existing top-level scope is retired and a fresh one (along with its top-level locals) is created when you next execute the Macro Script. This lets you use top-level locals in these constructs as a kind of private global; the values they hold remain in place over many executions but only code in that construct can see the variable and so it does not conflict with other globals.

Note that in scripted plug-ins, a separate copy of the top-level local scope is created for each instance of the plugin and this scope remains active while that instance remains in existence up until the end of the current 3ds Max session.

HISTORY NOTE:

In 3ds Max R2.x, the optional initialization value was applied to global variables only if the declaration creates a new variable. So, for example, if you ran the following script twice, the value of x in the second line would be 10 for the first execution, and 20 for the second execution. In 3ds Max 3 and later, the optional initialization value is always applied to global variables.

global x = 10

print x

x=20

If you want to make the global variable initialization conditional in 3ds Max 3 and higher, use a construct similar to:

global foo; if foo == undefined do foo = 23

Implicit Variable Declaration

If you do not explicitly declare a variable, and the variable name does not exist at a higher scope, MAXScript will create the variable the first time you use it and initialize it to hold the special value undefined. You are not required to explicitly declare a variable, or initialize its value, before you can use it. Variable names not explicitly declared by one of the previous statements are called implicitly declared variables. The scope of implicitly declared variables is the MAXScript scope context currently in effect when the variable is first used. The initial MAXScript scope context is global, and new scope contexts are opened for the following:

  • Top-level open parentheses in a script file or in the Listener

  • Start of a function body

  • Start of a for loop body

  • Start of a utility, rollout, right-click menu, Macro Script, or tool definition

  • Start of a rollout, utility, right-click menu, Macro Script, or tool event handler

  • Start of a when body

Within these new scopes, newly referenced variables will be implicitly declared as local variables. Scope contexts are nested, with the scope of a variable explicitly or implicitly declared at one scope context level extending to all scope contexts below that level. Take for example the following script:

EXAMPLE

a=10 -- scope context: global

( b=20 -- new scope context: level 1

for i = 1 to 5 do -- new scope context: level 2

( j=random i a

k=random i b

print (j*a+k*b)

) -- end of scope context: level 2

a=a+b

) -- end of scope context: level 1

print a -- back to global scope context

print k

In this script, variable a is first used in the global scope context, and its scope includes scope contexts global, level 1, and level 2. Variable b is first used in scope context level 1, so it is implicitly declared as a local variable and its scope includes scope contexts level 1 and 2. Variables i and j are first used in scope context level 2, and their scope is only scope context level 2. The scope of variable k varies depending on whether this script has been run before. The first time the script is run, variable k is first defined at line 5, and its scope is scope context level 2. In line 11, variable k is used again. Because the variable k defined at line 5 is no longer in scope, a new variable k is defined whose scope is global. The second time you run the script, at line 5 MAXScript detects variable k already exists and uses it. So the first time you run the script line 11 will print undefined, and the second time you run the script line 11 will print the last value calculated at line 5.

NOTE:

The scope of the variable used as a for loop counter (variable i in the above script) is a special case. The for loop counter variable's scope is always the scope context created for the for loop. This is true even if the for loop counter variable's name has already been implicitly or explicitly declared at a higher scope context level.

Lexical Scoping

When you explicitly declare a local variable, you can reuse the same name as a variable at a higher scope context level. If you do this, the newly declared local variable hides the outer variables with the same name. Any reference to that variable name later in the local variable's scope refers to the new local variable. At the end of the local variable's scope, the next outer variable becomes visible again. This visibility scheme is called lexical scoping. An example of lexical scoping is shown in the following script.

EXAMPLE

global foo = 23, x = 20 -- explicit declaration of foo and x,

-- scope is global

y = 10 -- implicit declaration of y,

-- scope is global

format "context level global: foo= %\n" foo

if x > y then

( -- top-level open parentheses - new

-- scope is created

local baz = foo + 1 -- uses the global foo

local foo = y - 1 -- declares 1st local foo, hides global foo

format "context level 1: foo= %\n" foo

b=box() -- b implicitly declared as local

b.pos.x = foo -- uses 1st local foo

if (foo > 0) then

(

local a

local foo = y - x -- a nested 2nd local foo, hides 1st local

format " context level 2: foo= %\n" foo

a = sin foo -- uses 2nd local foo

format "a= %\n" a

) -- leave scope

b.pos.y = foo - 1.5 -- back to 1st local foo

format "context level 1: foo= %\n" foo

) -- leave scope

-- b, baz and foo no longer in scope

format "context level global: foo= %\n" foo -- back to global foo

OUTPUT

20 -- result of line 1

10 -- result of line 3

context level global - foo= 23 -- output from line 5

OK -- result of line 5

context level 1: foo= 9 -- output from line 11

context level 2: foo= -10 -- output from line 18

a= -0.173648 -- output from line 20

context level 1: foo= -10 -- output from line 23

OK -- result of if expression lines 6 to 24

context level global: foo= 23 -- output from line 26

OK -- result of line 26

This might seem a strange way of over-using a single variable name, but in large programs, these scoping rules can be useful. For example, you may add a new user-interface item and its handlers to a utility script. By explicitly declaring the variables used in the handlers as local, you ensure these variables are independent of any preexisting variables with the same names in the remainder of the script.

When writing scripts, it is good programming practice to explicitly declare your local and global variables. Implicit declaration is provided as a short-hand, typically used when working in the Listener interactively or developing short scripts. When developing extended scripts, explicitly declaring variables can reduce errors and improve readability of the code. It is also recommend that you declare as local all variables unless you really want them to be global variables. There are several reasons for this practice:

  • All the variable names used in the block or function will be together, which makes it easier to find the variable names and helps prevent using incorrect names in the script.

  • If more than one script is executed at the same time (for example, you are running a scripted utility and have a scripted controller in the scene) and both scripts use the same global variable name, the two scripts can interfere with one another. This can cause apparently random failures of one or both scripts.

  • You are sure you are using the correct variable in the event that a variable with the same name has already been declared at a higher scope, and you won't inadvertently change the higher-level variable's value.

  • Values of variables explicitly defined as local are displayed in error call stack trace-backs.

  • In 3ds Max R2.5, if a 3ds Max class, a MAXScript method, or a MAXScript read-only global variable has the same name as an implicitly declared local variable, a MAXScript runtime error will be generated if an assignment to that variable name occurs. Since the variable name already existed with a global scope, an implicitly declared local variable was not created. Since one or more new 3ds Max classes will be created by any third party plug-ins the user has loaded, you were not be able to tell ahead of time if a variable name was a global variable name. In 3ds Max R3, if the MAXScript compiler detects that the first reference to such a variable is an assignment, it will implicitly declare a local variable, rather than leaving it as a reference to a read-only system global. For example, executing the following expression in 3ds Max R2.5 would result in a value of Box, since Box is a 3ds Max object class. In 3DS R3, MAXScript detects that the first use of variable box is an assignment and creates an implicitly declared local variable box. The result of this expression in 3ds Max R3 is the value undefined.

    • (if false do box=10; box)

    In the following script, an error was introduced by using undefined variable k in line 7. In the output, the error call stack trace-back shows the value for variable b in function afunc and in the block-expression calling afunc.

    SCRIPT

    fn afunc =

    (

    local b

    b = box()

    for i in 1 to 10 do

    for j in 1 to 10 do

    instance b pos:[i*20,j*30,30*sin(k*36)]

    )

    --

    (

    global c=10

    local b

    b="hello"

    afunc()

    )

    OUTPUT:

    afunc()

    -- Error occurred in j loop

    -- Frame:

    -- k: undefined

    -- j: 1

    -- called in i loop

    -- Frame:

    -- i: 1

    -- called in afunc()

    -- Frame:

    -- b: $Box:Box102 @ [0.000000,0.000000,0.000000]

    -- called in <block>()

    -- Frame:

    -- b: "hello"

    -- No ""*"" function for undefined

    OK

    If the same script is run with lines 3 and 12 removed, the following output is generated. Because function afunc and the block-expression are in different MAXScript scope contexts, variable b is implicitly declared as local in each and contain different values. However, because they were implicitly defined, they are not included in the error call stack trace-back.

    OUTPUT:

    afunc()

    -- Error occurred in j loop

    -- Frame:

    -- k: undefined

    -- j: 1

    -- called in i loop

    -- Frame:

    -- i: 1

    -- called in afunc()

    -- Frame:

    -- No ""*"" function for undefined

    OK

    See also

    Type-Free Variables

    Reference Assignment

    Visibility of Locals, Functions, Structures and User-Interface Items in Rollout Code

    Accessing Locals and Other Items in a Rollout from External Code


Persistent Global Variables

MAXScript supports a limited form of persistent global variables. You declare a particular global to be persistent and the value it contains is always saved to and restored from scene files as they are opened and closed. Therefore, you can keep direct references to objects in the scene in variables and those references will persist across scene save and reload.

You declare a global variable as persistent by prefacing its declaration with the reserved word persistent.

SCRIPT

persistent global foo, baz, bar

declares the variables foo, baz, and bar to be persistent. From then on, the values in foo, baz, and bar at the time of a scene save are stored in the .max scene file. When that file is reopened, the values in foo, baz, and bar are restored, with an implicit declaration as persistent globals if they are not so already declared.

The current limitation with persistent global variables is that only certain kinds of value are storable in a scene file, and only those types of values are saved and restored across scene saves and loads. The supported value classes are: Integer, Float, String, Color, Time, Interval, Array, Point3, Ray, Quat, AngleAxis, EulerAngles, Matrix3, Point2, Undefined, OK, Boolean, and all the MAXWrapper classes (nodes, modifiers, controllers, materials, and so on). All other types of values restore as the value undefined.

In the case of Array, only those values in the array that are in the previous list are correctly saved and restored; others appear as undefined in the restored array.

Persistent globals are removed from the persistent globals pool when a File > Reset, File > New, or File > Open is performed, but they will remain in memory as ordinary, non-persistent global variables for that MAX session. Subsequently, persistent global variables declared during a MAX session do not "stick around" and get stored with every other file saved during that session.

NOTES:

When merging or XRef-ing in a file (scene/object XRefs are a special case of merge), when reading in persistent global variables,

  • If the variable being read from the scene file already exists as a persistent global variable, the value of the persistent global is not overwritten. (It was overwritten in versions prior to 3ds Max 8).

  • If the variable exists as a non-persistent global variable, the global variable's value is overwritten.

  • If the variable does not exist as a global variable, a non-persistent global variable will be created. The last 2 behaviors are the same as in previous versions of 3ds Max.

If needed, you can install persistent globals in each new file using a #filePreSave callback. See General Event Callback Mechanism for more information.

However, this behavior also means that variables originally declared as persistent global variables may remain defined as ordinary global variables over multiple scenes while a script is being created or run, yet show up as undefined when these saved scenes are reopened in another MAX session.

Below are two examples illustrating the use of callbacks to handle such situations:

EXAMPLE 1:

If a script requires that a certain critical variable carries its value into new and opened scenes and always exists as a persistent global, the following callbacks would ensure this during File > Reset, File > New and File > Open events:

callbacks.addscript #systemPostNew "persistent global myVar" id:#myTools

callbacks.addscript #systemPostReset "persistent global myVar" id:#myTools

callbacks.addscript #filePostOpen "persistent global myVar" id:#myTools

The critical variable is simply re-declared, leaving its value unaffected but ensuring that it is saved as a persistent global within the scene.

EXAMPLE 2:

Another case would be a script requiring that a certain critical variable always exist as a persistent global but never carry its current value into other scenes, instead either reverting to a default value for new and opened scenes that don't have the persistent global defined, or restoring the value from opened scenes that do have the persistent global defined. The following callbacks would assign default values to the variable during File > Reset and File > New events, but would only assign a default value during a File > Open event if the persistent global was not already present in the opened file:

callbacks.addscript #systemPostReset "persistent global myVar=0.0" id:#myTools

callbacks.addscript #systemPostNew "persistent global myVar=0.0" id:#myTools

callbacks.addscript #filePreOpen "myVar=undefined" id:#myTools

callbacks.addscript #filePostOpen "if myVar==undefined do (persistent global myVar=0.0)" id:#myTools

During File > Reset and File > New events the critical variable is re-declared and assigned a default value, but during a File > Open event the variable first becomes undefined and is then tested after the file is opened. If that persistent global variable was already present and defined in the scene being opened, the variable would have already been restored as a persistent global variable with its old value. In that case, there's no need to re-declare it as a persistent global since it is already in the persistent global pool and will remain there forever until explicitly removed.

NOTES:

There is one potential problem with both of the above examples: the persistent globals will continue being created by the callbacks for the rest of the current MAX session. Unless this is the desired behavior, this should be avoided by having the created callbacks removed when the script is closed.

FOR EXAMPLE,

if the script exists in a utility or dialog rollout then the associated close event handler should include a "callbacks.removeScripts" command to remove the callbacks.

on myToolsUtility close do (callbacks.removeScripts id:#myTools)

This example also illustrates the advantage of using id: parameter whenever possible. This not only makes removal easy but specific as well, since it avoids accidentally removing callbacks that belong to other scripts.

See General Event Callback Mechanism and Utility and Rollout Properties, Methods, and Event Handlers for more information.

The following methods are used to show and delete persistent globals variables:

persistents.show()

Displays a list of persistent globals and their value.

persistents.remove <var_name>

Removes the named persistent global from the persistent global pool. The variable remains as a global variable and retains its value.

persistents.removeAll()

Removes all persistent globals from the persistent global pool. The variables remain as global variables and retain their value.

SCRIPT:

a="Hello world"

persistent global a

persistent global b=box()

persistents.show()

persistents.remove #a

persistents.removeall()

a

b

SCRIPT:

"Hello world"

OK

$Box:Box02 @ [0.000000,0.000000,0.000000]

a: "Hello world"

b: $Box:Box02 @ [0.000000,0.000000,0.000000]

OK

OK

OK

"Hello world"

$Box:Box02 @ [0.000000,0.000000,0.000000]

NOTE:

If a persistent global contains a MAXWrapper value, but the class instance is not in the scene, that value is not stored/restored on a file save/load.

EXAMPLES:

-- persistents - node only

persistent global global_array = #()
global_array[1] = b= box()
global_array[2] = bm= bend()
global_array[3] = sm= standard()
global_array[4] = fog()
global_array[5] = area()
global_array[6] = bezier_float()
global_array[7] = br= bricks()
global_array[8] = lookat()
global_array[9] = blur()
global_array[10] = MapScaler()
--b.material=sm
--addmodifier b bm
--sm.diffusemap=br
persistents.show()
max hold
max fetch

persistents.show()

REMARKS:

Only the box is in the array after running this script. If the commented lines are run, the material, modifier, and map are also in the array. MAXScript does not do a full reference-tree dump when it outputs its persistent variables, it just outputs RefIDs for MAX objects and so depends on them being dumped as references by the main file save code.

See also

How To Make It Better?


Type-Free Variables

Variables can hold any type of value, and the value type they hold can change from assignment to assignment. For example, you can store a point3 value, then a float value, and then an array to the same variable. The variables in MAXScript are known as type-free variables, unlike variables in C or Java, which can only hold values of a particular declared type. This freedom makes scripting simpler and more exploratory.

As well as being type-free, variables in MAXScript are also type-safe. This means you cannot perform the wrong operation on a value in a variable, as shown in the following example, where MAXScript prints an error message following the invalid operation:

x = $Box01.position -- a point3 value

x = "foo" -- a string value

x = x + 2 -- try to add a number to a string

Error: Unable to convert 2 to type String


Reference Assignment

MAXScript uses a type of assignment called reference assignment. When you create a value, for example by writing a literal, the memory for that value is allocated and a pointer or reference to the value is placed into the variable rather than the value itself. If you assign that variable's value to another variable, the reference to that value's memory is placed in the new variable. The same applies to assigning a variable’s value to an array element or passing it as a function call argument; in all cases the reference is assigned or passed. When you assign a new value to a variable or when a variable goes out of scope, the reference that the variable contained is dropped. When your program has dropped all references to a value's memory, that memory becomes eligible for reclamation.

This is in contrast to value assignment in which a copy of the whole value's memory is made and assigned. Value assignment has one advantage over reference assignment, namely that every time a variable or an array element is re-assigned, the old value’s memory space can be immediately reclaimed because the old value is unique and nothing else can be referring to it. With reference assignment, the system cannot reclaim the original value’s memory space, because other variables may still point to the same value.

Some scripting languages use a copy-based approach, such as HyperCard's HyperTalk, but its inefficiency as well as some value sharing problems make it inappropriate for MAXScript. This creates the task of reclaiming memory in MAXScript. Programming languages such as C or Pascal require that the programmer explicitly reclaim a value's memory when it is no longer needed, and this is one of the most difficult parts of programming in those languages. Recent variants like Java and some advanced languages like Lisp and Smalltalk provide automatic memory reclamation. MAXScript also provides this and it is described in Memory Allocation and Garbage Collection .

If you assign a variable's value to another variable, the reference to that value's memory is placed in the new variable. Thus, both variables are actually referencing the exact same value. If you assign a new value to one of the variables, that variable will contain a reference to the new value, and the other variable will contain a reference to the old value. Normally this is the desired behavior, as you don't want both variables to reference the new value. However, a complication occurs if a compound value, like a point3 or array, is referenced by more than one variable, and you assign a new value to a component of the compound value. When you assign a value to a component of a compound value, a new compound value is not created. Therefore any variables that reference the compound value will still point to the same value, and will "see" the changed component value. Examples of this behavior are shown in the following script:

SCRIPT

(

a="hello world" -- create a string value, put reference in a

b=a -- put string’s reference in b

format "a=%; b=%\n" a b -- and print their values

b="thanks for the fish" -- create a string value, put reference in b

format "a=%; b=%\n" a b -- print values - they are different

b=a -- put string’s reference from a in b

a[1]="J" -- change a component value

format "a=%; b=%\n" a b -- print values - they are the same

a=b=[10,20,30] -- assign a point3 value reference to a and b

format "a=%; b=%\n" a b -- and print their values

a.x=-100 -- change a component value

format "a=%; b=%\n" a b -- print values - they are the same

)

OUTPUT

a=hello world; b=hello world

a=hello world; b=thanks for the fish

a=Jello world; b=Jello world

a=[10,20,30]; b=[10,20,30]

a=[-100,20,30]; b=[-100,20,30]

OK

In some cases, this behavior is the desired behavior, and in other cases it is not. For those cases where it is not the desired behavior, a copy method is defined for most value types that will create a separate copy of a value.

In some cases, such as arrays and structures, the value itself may contain compound values. The copy made is what is called a shallow copy - only a copy of the upper-level value itself (that is, the array) is created. Copies aren't made of compound values in the value (that is, the elements of the array).

In 3ds Max 9 and higher, a special copy method called deepCopy() is available for copying arrays. It allows the copying of all compound values inside the array. See Array Values for details.

See also

Manual Garbage Collection

Memory Allocation and Garbage Collection


Definition Constructs Can Include Global Variable Declarations At Top Level

All the major definition constructs in MAXScript (such as utility, rollout, macroScript, rcmenu, tool, plug-in, etc.) can now include global variable declarations at the top-level within them.

EXAMPLE

rollout foo "foo"

(

local a, b = undefined, c

global d, e = 3 -- now possible

spinner bar "Bar"

checkBox baz "Baz: "

on bar changed do ...

)

In releases prior 3ds Max 4, globals had to be declared inside on-handler bodies. Any initializers present in a global declaration like this are at compile time, so the initial value expressions must be executable at the time the script is compiled.

See also

Scope of Variables


Changes to Undeclared Implicit Global Variables

Changes to Undeclared Implicit Global Variables since 3ds Max 4

In releases prior 3ds Max 4, the MAXScript compiler was treating any undeclared variables used in rollout and plug-in and macroScript handlers as implicitly global. This was at variance with the use of undeclared variables inside ordinary functions and for-loop bodies and also at variance with the main MAXScript documentation. It was also preventing the new stack-based MAXScript memory management system from achieving maximum effect in handler execution.

All undeclared variables in handler code are now implicitly declared as locals.

See also

Definition Constructs Can Include Global Variable Declarations At Top Level

Scope of Variables


Persistents Structure

The Persistents struct provides methods to collect, create and test persistent global variables.

These methods are available in 3ds Max 2008 and higher. They were previously available in the [ AVG ] Avguard Extensions.

persistents.gather()

This method returns an array of all persistent global variable names as <name> values.

persistents.make <global var name>

This method makes the specified global variable name persistent.

The name specified must be a global variable's name, otherwise a runtime error is thrown. See globalVars structure .

persistents.isPersistent <global var name>

Returns true if the specified global variable name is persistent, false if it is not persistent.

EXAMPLE

global aVar --define a global variable

OK  --done!

persistents.isPersistent #aVar --is it persistent?

false   --it is not!

persistents.make #aVar --make the existing global persistent

OK   --done!

persistents.isPersistent #aVar --see if it is persistent now

true  --now it is!

persistent global aNewPV --declare a variable as persistent global

undefined  --done, variable has a value of undefined

persistents.isPersistent #aNewPV --then see if it is persistent

true  --it is!

persistents.isPersistent #anUndeclaredVar --check an undeclared var.

false  --it is not persistent

See also

Persistent Global Variables

globalVars Structure


globalVars Structure

The globalVars struct provides methods to collect, create, test and remove global variables.

These methods are available in 3ds Max 2008 and higher. They were previously available in the [ AVG ] Avguard Extensions.

globalVars.get <global var name>

Returns the value of the specified global variable.

The argument must be a MAXScript name value.

The global variable name must exist, otherwise a runtime error will be generated.

globalVars.set <global var name> <value>

Sets the value of the specified global variable.

The argument must be a MAXScript name value.

The global variable name must exist, otherwise a runtime error will be generated.

FOR EXAMPLE:

globalVars.get #dontknow --try to get an undeclared variable

-- Runtime error: Specified global variable does not exist: #dontknow

global dontknow = "Now I Know" --declare the variable

"Now I Know"

globalVars.get #dontknow -- now we can get and set the value

"Now I Know"

globalVars.set #dontknow "I Still Know What You Did Last Siggraph"

"I Still Know What You Did Last Siggraph"

globalVars.set #reallydontknow "MAXScript"

-- Runtime error: Specified global variable does not exist: #reallydontknow

globalVars.gather()

Returns an array of all global variable names declared in the current session.

globalVars.isglobal <var name>

Returns true if the specified variable name is global, false if it is not global or not declared.

EXAMPLE (CONTINUED FROM PREVIOUS EXAMPLE)

globalVars.isglobal #dontknow --declared in previous example

true

globalVars.isglobal #reallydontknow --still not declared

false

globalVars.getTypeTag <var name>

Returns the type of the global variable as an integer or name value.

The specified global variable name must exist.

This method is mainly for internal testing.

The primary type tag values are:

10 - general global

11 - constant global

12 - system global

EXAMPLE (CONTINUED FROM PREVIOUS EXAMPLE)

globalVars.getTypeTag #dontknow --declared in previous example

10P

globalVars. getTypeTag #reallydontknow --variable does not exist

-- Runtime error: Specified global variable does not exist: #reallydontknow

globalVars.getValueTag <var name>

Returns the type of the value in the global variable as an integer or name value.

The specified global variable name must exist.

This method is mainly for internal testing.

Each value type has its own tag value.

FOR EXAMPLE:

global aString = "I Know Kung-Fu!"

"I Know Kung-Fu!"

global aFloat = 123.456

123.456

global anInt = 42

42

global aMatrix = matrix3 1

(matrix3 [1,0,0] [0,1,0] [0,0,1] [0,0,0])

globalVars.getValueTag #aString

#String

globalVars.getValueTag #aFloat

#float

globalVars.getValueTag #anInt

#integer

globalVars.getValueTag #aMatrix

#Matrix3

globalVars.getValueTag #reallydontknow

-- Runtime error: Specified global variable does not exist: #reallydontknow

globalVars.remove <var name>

Removes the specified variable name from the list of global variables.

WARNING!

Use With Caution!

See also

Variables - Assignment and Scope

Variable Assignment

Scope of Variables

Persistents Structure


Memory Allocation and Garbage Collection

MAXScript allocates its own working memory in addition to any memory 3ds Max allocates as it works. The default working memory size setting for MAXScript is 7.5 MB, and the memory is virtual and pageable like all 3ds Max memory. The default allocation accommodates most tasks, but you can increase it by incrementing the MAXScript system global variable heapSize:

heapSize += 2000000 -- another 2 MB, for a total of 9.5 MB

You can add this statement to your startup script if you always need extra memory allocated for MAXScript tasks or you can set the default size in the MAXScript tab in the 3ds Max Customize>Preferences dialog.

Increasing the MAXScript heap reduces memory address space for other 3ds Max tasks. Adjust the default memory setting only after you receive "Out of memory" error messages from MAXScript, or when garbage collection pauses occur frequently.

You can increase the MAXScript heap as many times as you need during a 3ds Max session, but you cannot reduce it. Restart 3ds Max to reset the MAXScript memory heap to the default setting.

MAXScript uses a memory management scheme called automatic garbage collection. This means you don’t have to explicitly reclaim any memory that a value takes up when you no longer need it. When you assign a new value to a variable or when a local variable’s block exits, the reference that the variable contained is dropped. When your program has dropped all references to a value's memory, that memory becomes eligible for reclamation.

Some values, such as arrays, have internal references to other values. In an array, each element contains a reference to another value. When you assign a new value to an array element, the element's old reference is dropped. If you remove all references to the array itself, all the references in the elements of that array are implicitly dropped. The same applies to component values, such as in user structures and most 3ds Max objects.

MAXScript reclaims memory in a garbage collection pass through memory when MAXScript runs out of memory. This simple approach can result in a short pause because the entire MAXScript memory is scanned for garbage. Some languages use background collectors that work continuously; others use advanced schemes that minimize the scanning. Later versions of MAXScript might adopt one or more of these techniques.

The advantage of garbage collection is you can create as many values as you need, and MAXScript cleans up the ones you no longer use.

In 3ds Max 9. the HeapSize and the HeapFree system variables were changed from Integer to Integer64 to accommodate the increased memory address space of 64 bit systems.

In 3ds Max 9 and higher, the initial heap size is limited to 512MB. If the initial heap size is still too high and the specified memory block cannot be allocated, the initial heap size is recursively decreased by 10% until the memory block can be allocated. If a 1MB memory block cannot be allocated, an assert is triggered and the 3ds Max session is terminated (if the system cannot allocate 1MB at startup, something is very wrong). Otherwise, a message is displayed in the status panel stating that the requested heap size was automatically decreased, and gives the actual heap size allocated.

A test was added to ensure that the initial heap size is at least the absolute minumum required by MXS - 12 bytes.

Code was added so that as new values are allocated, the heap size is automatically increased if necessary (requested memory size not available in the heap after performing a full garbage collection) . The first attempted increase is the maximum of 50* the requested size or 512KB. If this allocation fails, a series of allocation attempts is made with decreasing allocation sizes, with the last one being the maximum of the requested size or 256KB. If this final allocation attempt fails, a runtime error is thrown. Otherwise, a message is displayed in the status panel stating that the requested heap size was automatically increased, and gives the new heap size.

heapCheck()

The heapCheck() method is mostly for internal debugging. It can be called by scripts to perform a minimal consistency check of the Heap. Available in 3ds Max 9 and higher.

Possible return values are:

OK - Heap appears to be consistent (_HEAPOK)

-1 - Heap has not been initialized (_HEAPEMPTY)

-3 - Initial header information is bad or cannot be found. (_HEAPBADBEGIN)

-4 - Bad node has been found or heap is damaged. (_HEAPBADNODE)

-6 - Pointer into Heap is not valid (_HEAPBADPTR)

See also

Manual Garbage Collection


Manual Garbage Collection

The function gc() invokes the garbage collector. Normally, the collector runs automatically when available memory runs low, so you don't normally need to call it explicitly. However, in some situations, it is useful to be able to force a collect to ensure a pause due to garbage collection will be delayed as long as possible.

You can also invoke the collector to cause any unreferenced open files to be closed. In some situations, a file can be left open if a runtime error occurs while it is still open. If the file object was being held in a local variable at this point, it may not be possible to get at it from the Listener to force a close. Any subsequent attempts to open it may result in an "already open" error from the operating system. Running the collector will cause the file object to be reclaimed and this forces any open file associated with it to be closed.

gc [light:false] [delayed:false]

This function returns the number of bytes free in the MAXScript heap after collection. Note that the collector may take many seconds to run if the heap is full of many small reclaimable objects.

Garbage Collection light option

When the optional light keyword argument is passed as true, the undo buffer will not be flushed. If you are performing a lot of scene operations then it is recommended to call gc() without any argument or pass light:false, in which case the undo buffer will be flushed prior to the garbage collection.

When light:true is specified, any value that derives from MAXWrapper will not be collected. This covers all value types that could potentially be in the undo buffer. The result is that, for this case, less memory is released and gc runs a bit slower, but you can't corrupt the undo stack. If light:true is not specified, behavior and speed is same as before.

What does get collected with light:true includes rollouts, floaters, UI items, bitmaps, strings, arrays, and bitArrays. Those are all items that do not exist in the scene.

Automatic Garbage Collection behavior and delayed: option

When MAXScript runs out of heap memory, it runs garbage collection to free unused memory. Since a value collected may be the last reference to a MAX object, we need to flush the undo system since it may contain a pointer to that object or one of its dependents.

In 3ds Max 5, the 'light' keyword argument has been introduced for manual garbage collection where, if true, MAXWrapper-derived values are not garbage collected, thus no MAX objects are deleted, and no flush of the undo system is required.

The change to MAXScript in 3ds Max 6 extends this to automatic garbage collection. When an automatic garbage collection is performed, and the undo system is not empty, an initial garbage collection is performed where MAXWrappers are not garbage collected, and a flag is set so that on the next undo system flush, a full garbage collection is performed. If this initial garbage collection does not free up sufficient memory to satisfy the memory request, or if the undo system is empty, a full garbage collection is performed where MAXWrappers are deleted and the undo system is flushed.

With the recent improvements in MAXWrapper interning, undo system flushes due to MAXScript garbage collection should be a fairly rare event.

To maintain current behavior, a manual garbage collection using 'gc()' still flushes the undo system. gc light:true will still not flush the undo system.

The delayed:<boolean> option will cause a full garbage collection at the next undo system flush. So the user could say the following to match the behavior of an automatic garbage collection:

gc light:true delayed:true

See also

Memory Allocation and Garbage Collection


Names

Names are used in MAXScript to identify variables, functions, parameters, properties, and so on. Names start with an alphabetic character or "_" (underscore), and can contain any number of alphanumeric characters or "_".

EXAMPLES OF VALID NAMES ARE:
foo bar123 this_is_a_very_long_identifier _heresOneWithStudlyCaps
THE FOLLOWING NAMES ARE NOT VALID:
1object | First character not an alphabetic character
pressed? | ? is not a valid alphanumeric character
a big number | spaces not allowed in names
seven(7) | ( and ) are not valid alphanumeric characters

In contrast to most general purpose programming languages, MAXScript names are not case-sensitive. For example, the names in the following list refer to the same variable in MAXScript:

BitMapTexture

bitmaptexture

BITMAPtexture

In syntax descriptions, name identifiers are specified as:

<var_name>

An example of a syntax where a name identifier is specified is:

for <var_name> ( in | = ) <sequence> ( do | collect ) <expr>

In this example, <var_name> specifies the for loop variable.

A name in a program is always interpreted as the name of a variable or parameter and it effectively stands for the current value of that variable or parameter in any expression in which it is used.

FOR EXAMPLE, CONSIDER THE FOLLOWING SCRIPT:

i=10

j=i+5

print j

In this script, i and j are variable names. In the first line, the value 10 is assigned to variable i. In the second line, the value 5 is added to the value stored in variable i, and then the result is stored in variable j. In the third line, the value 15 is printed, which is the value stored in variable j.

MAXScript also allows you to work directly with names as values at runtime, as you can with numbers and strings. To write a name value in MAXScript, you preface the name with a "#":

#<var_name>

In syntax descriptions, name values are specified as:

<name>

Name values are primarily used for symbolic parameters in function calls, and many of the built-in functions use them as such. The allowed values specified for symbolic parameters are defined by the function, and are documented with the function.

As an example, consider the setBeforeORT() function. Its syntax is:

setBeforeORT <controller> <ORT_type_name>

Sets the Out-of-Range (ORT) type for the controller for the time before the first key. The <ORT_type_name> must be one of the following name values:

#constant

#cycle

#loop

#pingPong

#linear

#relativeRepeat

AN EXAMPLE USAGE OF THIS FUNCTION IS:

setBeforeORT $box01.position.controller #pingPong

Name values can also be used as an index in certain Collections .

FOR EXAMPLE,

the index for a ModifierArray can be an integer, name, or string:

-- access modifier on object loft01 called Optimize:

$loft01.modifiers[#Optimize]

See also

Name Values

Quoted Names

Names set in single quotes allow you to write names that contain illegal identifier characters, such as spaces and other punctuation. They are primarily intended for specifying 3ds Max object classes and properties that have special characters in their names.

The form is:

'<any_char_except_quote>' -- for an identifier or property name

#'<any_char_except_quote>' -- for a name literal

'<any_char_except_quote>': -- for a keyword parameter label

EXAMPLES:

snow 'starttime(start)':5

b.'lifetime(life)'

$box01.modifiers[#'FFD 4x4x4']

Spaces in Names

Because of the large amount of names in 3ds Max that include spaces, the underscore character ("_") can be used instead of a space in a name. The following is equivalent to the last line of the above example:

$box01.modifiers[#FFD_4x4x4]


Literal Constants

MAXScript has many built-in data types: numbers, strings, names, arrays, vectors, and matrices, as well as special data types which store the 3ds Max objects such as geometry objects, splines, materials, modifiers, etc.

Some data types have special literal constant forms, where the literal constant is a value that is keyed directly into your program where it is needed. The syntax of the literal constant specifies both its value and data type. In MAXScript, the assignment of a literal constant might look like this:

b = 50

In this line, b is the variable name, and 50 is the literal constant of type integer assigned to b. 50 is a literal constant because you cannot assign a value to 50, and its value cannot be changed.

See also

Number Literals

String Literals

Time Literals

Pathname Literals

2D and 3D Point Literals

Array Literals


Number Literals

MAXScript uses two types of numbers:

  • single precision floating point

  • 32 bit signed integers

These number types correspond to the two number types (Integer and Float) used internally in 3ds Max. The syntax for numbers is:

[-]{<digit>}[.{<digit>}[(e | E)[+ | -]{<digit>}+] -- decimal

0x{<hex_digit>}+ -- hexadecimal

EXAMPLES:

123

123.45

-0.00345

1.0e-6

0x0E

.1

See also

Number Values


String Literals

String literals in MAXScript are one or more characters enclosed in double quotes:

"3ds Max"

"August 4th, 1997"

String literals can contain any character except another plain double quote. You can include a double quote in a string literal, as well as some useful control characters, by using a "\" (backslash) escape character sequence.

The valid escape sequences are:

ESCAPE SEQUENCE | MEANING
\" | a double quote character
\n | a newline character
\r | a carriage return character
\t | a TAB character
\* | an asterisk character
\? | a question mark character
\\ | a single "\" character
\% | a percent character
\x{d} | a hexadecimal character

EXAMPLE:

print "foo should be quoted like this: \"foo\" and a new line: \n"

would output:

"foo should be quoted like this: "foo" and a new line:

"

A "\" character that does not preface one of the specified characters is left as a single backslash.

You can break a string literal into several lines and the line breaks will stay in the string.

FOR EXAMPLE:

"Twas brillig and the slithy tobes

did gyre and gimbol in the wabe

or something like that..."

Non-Printing Characters in Strings

You can specify non-printing characters in string literals using the \x hexadecimal escape sequence convention from C/C++. The form is:

\x{<hex_digit>}+ -- <hex_digit> is a hexadecimal digit (0-9,a-f)

EXAMPLE:

str = "Copyright \xa9 1997, FrabWorks, Inc"

would insert a copyright sign ©. Hexadecimal a9 is the code for that symbol.

Running the following script displays in Listener the characters associated with each hexadecimal code:

EXAMPLE:

char="0123456789abcdef"

for i=1 to char.count do

for j=1 to char.count do

(

s=execute("\"\\x"+char[i]+char[j]+"\"")

format "%% %\n" char[i] char[j] s

)

File Path Name Strings

File path name strings use the backslash character to separate a parent directory from its sub-directory. The backslash is used as an escape character, therefore file path names specified in a string should use the escape character sequence for a single "\" character, i.e., "\\", or specify the string as verbatim using the @ character introduced in 3ds Max 2008 (see further on this page)

AN EXAMPLE IS:

scene_path = "g:\\3dsmax25\\scenes" -- specifies file path g:\3dsmax25\scenes

For strings that are used as file names or paths, the "/" character can be used instead of the "\\". MAXScript internally interprets the "/" character as a "\" character when used in a file path name string.

AN EXAMPLE IS:

scene_path = "g:/3dsmax25/scenes" -- specifies file path g:\3dsmax25\scenes

Verbatim String Literals

NEW in 3ds Max 2008: Verbatim string literals added to MAXScript in 3ds Max 2008 are prefixed by the '@' character and are NOT expanded even if containing backslash escape character sequences like '\t', '\n' or '\r'.

The syntax is

@"{<character>}+"

FOR EXAMPLE,

--the following verbatim string remains unchanged after evaluation:

thePath = @"g:\temp\newfolder\render"

"g:\temp\newfolder\render"

--while the following results in a

--scrambled string with tabs and new lines:

thePath = "g:\temp\newfolder\render"

"g: emp

ewfolder

ender"

See also

String Values


Time Literals

Time is a basic data type in MAXScript. Its semantics are based on animation time in 3ds Max, where you can express time in frames, ticks or normalized time. In 3ds Max, time is stored with a resolution of 4800 ticks per second.

The format for a time literal is one of:

[-]{<decimal_number>[m | s | f | t]}+ -- minutes/sec/frames/ticks

[-]{<digit>}:{<digit>}[.{<digit>}] -- SMPTE mins:secs.frame

[-]<decimal_number>n -- active segment normalized time

In the first form, the {...}+ indicates one or more repetitions, so you can string together minutes/seconds/frames/ticks. If you do this, they must be in the specific minutes/seconds/frames/ticks order.

The normalized time form is always relative to the current active animation time segment.

EXAMPLE | MEANING
2.5s | 2.5 seconds
1m15s | 1 minute 15 seconds
2m30s5f2t | 2 minutes 30 seconds 5 frames 2 ticks
125f | 125 frames
18.25f | 18.25 frames
1f20t | 1 frame 20 ticks
2:10.0 | 2 minutes 10 seconds 0 frames (SMPTE)
0:0.29 | 29 frames (SMPTE)
0.45n | 0.45 normalized time (fraction of active segment)

See also

Time Values


Pathname Literals

Names identify entities such as variables and parameters inside the running MAXScript program. If you want to identify objects by name in the 3ds Max scene, you use a pathname. Pathnames can name a single object in the scene, specify a particular object using a path through the object hierarchy, or name sets of objects using pattern matching.

The full syntax for a pathname literal is:

<path_name> ::= $<path> | $
<path> ::= [ <objectset> ] [ / ] [ <levels> ] <level_name>
<levels> ::= <level> { / <level> }
<level> ::= <level_name>

<level_name> ::= { <alphanumeric > | _ | * | ? | \ }
 '{ <alphanumeric > | _ | * | ? | \ }'

The root of a <path> can be an <objectset>, which limits the pathname searching to the object set you specify. ObjectSets are described in ObjectSet Values .

EXAMPLES:

$box01 -- object named 'box01'

$torso/left_up_arm/left_low_arm -- hierarchy path name

$*box* -- all objects with 'box' in

-- the name

$torso/* -- all the direct children of

-- $torso

$helpers/d* -- all helper objects whose name starts with 'd'

All objects in a 3ds Max scene are arranged in a hierarchy as presented in Track View. This is both an important organizing scheme in 3ds Max, and it suggests a MAXScript naming scheme for objects based on the path to an object through the hierarchy. It is also very similar to path names in an operating system's directory structure.

FOR EXAMPLE:

$dummy/head/neck

names the scene object neck whose parent is object head, which has the top-level parent object dummy. This pathname helps you identify a specific object in a 3ds Max scene, even if several objects have the same name. If head is unique in the scene, MAXScript lets you use the shorthand $head to refer to it regardless of its hierarchy position. Even if the object is not uniquely named you can use the shorthand form, but it is undetermined which of the same-named objects you will get.

Pathnames also provide a powerful way to refer to several objects at once, such as all the children of a certain parent, or all the objects with names containing the string foot. For this, you can use wild-card patterns, as you can with operating system shell file naming schemes.

FOR EXAMPLE:

$dummy/*

names all the immediate children of dummy. The "*" character is used as a wild card.

$neck*

finds all the objects, whose names start with the string neck, anywhere in the hierarchy.

You can use wild cards anywhere in a pathname.

FOR EXAMPLE:

$*foot*

finds all the objects with foot anywhere in their names. The "*" wild-card character effectively matches any number other characters.

You can also use the "?" wild-card character to match exactly one "don't care" character. This is, the "?" wild-card character will match any single character.

FOR EXAMPLE:

$box0?

finds all the objects that begin with box0 and have exactly one character after the 0 in their names.

Wild-card characters can also be used for specifying parent levels in a hierarchy.

FOR EXAMPLE:

$dummy/*/*

names all the children of all the children of $dummy.

If you want to find an object and all the children of the object at any nested level, you use the special ellipsis level name "...",

FOR EXAMPLE:

$dummy/.../box*

names all the children of all the children of $dummy.

This refers to $dummy and all the box* children at any level below $dummy. The "..." indicates to search the entire hierarchy below the level of the ellipsis. MAXScript lets you omit the "/" when using "..." because it is unambiguous:

$dummy...box*

Or, in another common example,

$dummy...*

names $dummy and all the children of $dummy at any level.

If you use a wild card in an object pathname MAXScript will manipulate all matching objects at one time.

FOR EXAMPLE:

hide $*foot*

hides all objects whose names contain foot.

You can also perform automatic collection mapping, where a property for each matching object is set.

FOR EXAMPLE:

$*box*.position += [10, 10, 0]

adds [10,10,0] to the positions of all scene objects whose names contain box. For more information, see Collections .

You can use a shorthand form for specifying the currently selected object or objects with the pathname syntax. A lone "$" character refers to either the currently selected object if a single object is selected, the current selection set as an ObjectSet if more than one object is selected, or undefined if no objects are selected. This is a useful shorthand for use in the Listener when working on selections.

FOR EXAMPLE:

$.pos = [0,0,0]

hide $

rotate $ 35 z_axis

NOTE:

Inside a script, it is better to use the selection ObjectSet rather than $.

selection always contains an ObjectSet regardless of the number of selected objects. Where hide $ will generate an error if no objects are selected (because $ contains the value undefined), hide selection will not generate an error.

Due to the way that 3ds Max internally processes notification signals, the $ form of accessing selected objects is not recommended in a select change handler. To access the selected objects, you should use the selection ObjectSet. This is because $ relies on information that has not yet been set in the selection processing whereas selection uses a different method of accessing selections and the information it uses has been set up.

See also

Spaces and Other Special Characters in Pathnames

ObjectSet Values

Collections


Spaces and Other Special Characters in Pathnames

3ds Max lets you use any characters you want in object names, including spaces and other MAXScript punctuation.

You can write pathnames that contain these characters by putting the name in single quotes,

FOR EXAMPLE:

$'a silly name!!'

These quotes do not hide wild-card characters, so if you happen to have an object in your scene with a "*" in its name, you have to escape the "*" character in the pathname with a backslash,

FOR EXAMPLE:

$'what the \*'

See String Literals for other escape character sequences.

Because of the large number of names in 3ds Max that include spaces, the underscore character ("_") can be used instead of a space in a name.

FOR EXAMPLE:

the following two lines are equivalent:

bodyPart=$'Bip01 L UpperArm'

bodyPart=$Bip01_L_UpperArm


2D and 3D Point Literals

Coordinates are used extensively in MAXScript programming. They support a large range of operations as described in Point2 Values and Point3 Values . You can write point literals using the following forms:

2D

[ <expr>, <expr> ]

3D

[ <expr>, <expr>, <expr> ]

where <expr> evaluates to an Integer or Float value.

EXAMPLES:

[320, 240] -- 2D point

[10, 20, 30] -- 3D point

Expressions in a literal are evaluated when the literal is built. The following script and results show the value stored in a Point3 when expressions are used in the literal:

SCRIPT:

a=10

b=45

[10, 20, 30]

[sin a, 2 * b, a^2 + b^2] -- can contain expressions

OUTPUT:

10.0 -- result of line 1

45 -- result of line 2

[10,20,30] -- result of line 3

[0.173648,90,2125] -- result of line 4

See also

Point2 Values

Point3 Values


Array Literals

An array in MAXScript is an ordered collection of values. Each element in the array can contain any type of value, and you can index and iterate an array. You can write array literals directly in a program or build the collection with the array functions provided in MAXScript. For details, see Array Values . Array literals can be expressed in two forms:

#( <expr> { , <expr> } )

#() -- empty array

EXAMPLES:

#(1, 2, 3)

#()

#(1,"foo",#(1.2, -4,#fred),[1,2,3]) -- this one has a nested array

Expressions in an array literal are evaluated when the literal is built. The following script and results show the values stored in an array when expressions are used in the literal:

SCRIPT:

a=10

x=45

#(1, sin x, a * 2.3) -- can contain expressions

OUTPUT:

10.0

45

#(1, 0.707107, 23.0)


Expressions

MAXScript is an expression-based language. Every construct in the language is an expression and yields a result; this includes constructs that other languages consider statements. The simplified syntax of the language allows you to build very expressive code. Anywhere you can write an <expr> expression, you can write any construct in MAXScript.

A good example of this is the if construct. In statement-based languages, there is usually one syntax for if statements and another for conditional expressions. In MAXScript, a single syntax is used for both cases.

FOR EXAMPLE,

the following two lines of code are both valid, and their meaning should be obvious:

if a > b then print c else print d

x = if a > b then c else d

You can also write the following line, containing a nested if expression and a nested assignment, which itself is an expression:

x = if (if a > b then c else d) < e then f else (g = 23)

Another example is the block-expression, denoted <block_expr>. It contains a series of <expr> expressions enclosed in parentheses,

FOR EXAMPLE,

(

print a

print b

if a > b then print "the big a"

)

Each expression in the block is separated by a line break. You can also write several expressions on one line using a ";" (semicolon) to separate them:

FOR EXAMPLE,

(print a; print b; if a > b then print "the big a")

Block-expressions are themselves <expr> expressions. They evaluate their component expressions in sequence and yield as their value the value of the last expression in the block.

To create classic block-structured statements,

YOU MIGHT WRITE

if a > b then

(

print c

x = sqrt (c)

)

else

(

print d

x = sin (e)

)

OR

use a nested block-expression to compute a comparison operand,

if a > (y = sin b; sqrt(y * z)) then print c

At its simplest, a MAXScript program is made up of <expr> expressions.

An <expr> is defined as any of the following:

<simple_expr>

<variable_decls>

<assignment>

<context_expr>

<if_expr>

<while_loop>

<do_loop>

<for_loop>

<loop_exit>

<case_expr>

<try_expr>

<function_def>

<function_return>

<struct_def>

<max_command>

<utility_def>

<rollout_def>

<tool_def>

<rcmenu_def>

<plugin_def>

These expressions constitute the main constructs in MAXScript.

See also

Simple Expressions

Context Expressions

Controlling Program Flow

Creating Functions

Structure Definition

Literal Constants

Variables - Assignment and Scope

3ds Max Commands

Scripted Utilities

Utility Clauses

Scripted Mouse Tools

Scripted Right-Click Menus

Scripted Plug-ins


Simple Expressions

Simple expressions in MAXScript, denoted as <simple_expr>, correspond to the constructs normally considered expressions in math and conventional programming languages, as in the following examples:

a + b * c

sin x

The expressions are generally comprised of operands (a, b, c, and x), that are acted on by operators (+ and *) or given as parameters to functions (sin). Simple expressions are divided into the following groups:

See also

Operands

Math Expressions

Comparison Expressions

Logical Expressions

Function Calls

Block-Expressions


Operands

Operands, denoted as <operand> in the syntax definitions, are the references to values that surround operators or are passed as parameters to a function. Prime examples are Literal Constants and variable names. Operands are divided into two groups, Factors and Accessors.

Factors

Factors, denoted as <factor> in the syntax definitions, are references to values, where the entire value is acted on. A factor can be a Literal Constants , a Reserved Global Variable , a variable name, or an expression.

The unary minus applies the math negate operator to its operand.

-<operand> -- unary minus

The unary minus is only applicable to factors that evaluate to a number.

EXAMPLES:

-0.75

sin (-a*pi)

Accessors

Accessors are constructs that let you access the components in compound values, such as arrays and 3D points. There are two kinds of accessors corresponding to the two kinds of compound values in MAXScript:

  • The component values are arranged in an indexable sequence, as in arrays or strings.

  • The compound value contains a fixed set of named components, as with 3D points and time intervals.

All 3ds Max objects, such as boxes, spheres, bend modifiers, or bitmap textures are treated as compound values in this sense. All of their parameters, such as height and angle, or map file name, are accessed as named components. In MAXScript, these named components are referred to as properties.

Accessors have one of two forms, an <array_index>:

<operand> [ <expr> ] -- an indexed element

or a <property>:

<operand>.<var_name> -- a named property

EXAMPLES:

maps[i]

selection[n+1]

position.x

bend.angle


Math Expressions

The math expressions in MAXScript correspond to the common operator expressions in mathematics, such as add, subtract, multiply, divide, and so on. The <math_expr> constructs in MAXScript are:

<math_operand> + <math_operand> -- standard arithmetic addition
<math_operand> - <math_operand> -- standard arithmetic subtraction
<math_operand> * <math_operand> -- standard arithmetic multiplication
<math_operand> / <math_operand> -- standard arithmetic division
<math_operand> ^ <math_operand> -- exponential, raise to the power
<math_operand> as <class> -- conversion between types

where <math_operand> can be one of:

<operand>

<function_call>

<math_expr>

NOTE:

A math operand can be another nested math expression. This is another instance of a recursive syntax definition which lets you create arbitrary sequences of operands and operators. Note also that the math unary minus is not defined here, it is one of the <operand> types described in Operands .

EXAMPLES:

42

2 + 2

2 * a - sin x / b -- using a function call

(a + b) * -c

2 ^ n

(n + 1) as string -- converts result to a string value

The conversion operator, as, works between selected sets of source and destination value types. Only certain kinds of values can be converted into certain other kinds of values. These allowed conversions are defined for each type of value, and are documented with the value type descriptions.

See also

Math Assignment

Precedence and Association Rules

Polymorphism


Math Assignment

MAXScript provides the C language shorthand form of assignment that can be used to modify a value in place, as shown in the following long-form examples:

x = x + 1 -- increment x by one

$obj.pos = $obj.pos * scale -- multiply $obj.pos by scale

Corresponding to the four math operations (+, -, *, and /) are assignment operators that apply the operation to the assignment's destination and update the destination with the result.

Their syntax is:

<destination> += <expr> -- add <expr> to destination
<destination> -= <expr> -- subtract <expr> from destination
<destination> = <expr> -- multiply destination by <expr>
<destination> = <expr> -- divide destination by <expr>

Using the shorthand form of assignment, the previous examples can be written as:

x += 1 -- increment x by one

$obj.pos *= scale -- multiply $obj.pos by scale


Precedence and Association Rules

As in mathematics, a sequence of operands and operators is evaluated according to a set of precedence and association rules.

The following table shows sample expressions and their order of evaluation:

Expression | Order of evaluation | Note
a + b * c | a + (b * c) |
a + b - c | (a + b) - c |
a ^ b ^ c | a ^ (b ^ c) | exponentiation, raise to the power

The evaluation order in the previous table follows standard precedence rules, where * and / operations are evaluated before + and - operations, and where + and - operations associate to the left (that is, operands on the left are evaluated before operands on the right) and exponentiation operations associate to the right (that is, operands on the right are evaluated before operands on the left).

These precedence rules define the ordering of evaluation in all expressions in MAXScript, unless parenthesizing is used to force a different order. Expressions in parenthesis are evaluated before the surrounding operands are applied.

The following list shows the precedence order for math expressions starting with the highest precedence:

<operand>

<function_call>

as

^ -- right associative

* and / -- left associative

+ and - -- left associative

See also

Function Precedence


Polymorphism

As in mathematical expressions, MAXScript operators are polymorphic. This term means a single operator can be used to operate on a number of different types of values and performs the appropriate action for each type of value.

For example, a "+" operator between two integers performs integer arithmetic, between two floats it performs real arithmetic, and between two matrices it performs a matrix addition.

MAXScript allows certain non-mathematical types to use certain math operators. You can concatenate two strings with the "+" operator,

FOR EXAMPLE

"twas brillig" + " and the slithy tobes"

x.name += sequence_number as string

In some cases, you can mix operand types and MAXScript converts them appropriately. For example, adding a float to an integer results in a float. Multiplying a 3D point by a float results in a scalar vector product, and so on.

Internally in MAXScript the allowable operators and the actions performed by the operators are defined for each type of value. The allowable operators and their actions are documented with the value type descriptions.

See also

Inheritance and Polymorphism


Comparison Expressions

Using comparison expressions you can compare values of comparable types. The result is always one of the two Boolean values, true or false. The various forms of <compare_expr> are as follows:

<compare_operand> == <compare_operand> -- equal
<compare_operand> != <compare_operand> -- not equal
<compare_operand> > <compare_operand> -- greater than
<compare_operand> < <compare_operand> -- less than
<compare_operand> >= <compare_operand> -- greater than or equal
<compare_operand> <= <compare_operand> -- less than or equal

where <compare_operand> can be one of:

<math_expr>

<operand>

<function_call>

EXAMPLES:

a > b

sin x == 0.0

a + b <= n - 1

Comparison operations have lower precedence than math operations. In the previous examples, the sin function call and the "+" and "-" operations are performed before the comparisons.

As with math expressions, the comparison operators work on all appropriate types. Equal "==" and not-equal "!=" operate on all types, and the relative comparisons work between comparable types. The allowable comparison operators are documented with the value type descriptions.


Logical Expressions

Logical expressions combine the results of Boolean expressions, such as comparisons, to construct complex conditional expressions.

The forms of a <logical_expr> are as follows:

<logical_operand> or <logical_operand> -- true if either operand is true

<logical_operand> and <logical_operand> -- true if both operands are true

[ not ] <logical_operand> -- true if operand is false

where <logical_operand> is one of the following:

<operand>

<compare_expr>

<function_call>

<logical_expr>

Logical operators only operate on Boolean values, so each <logical_operand> must evaluate to true or false.

EXAMPLES

a > 0 and a < n + 1

not x and y

a and b or c and d and not e

As with math expressions, <logical_expr> is a recursive definition, meaning a logical operand can be another logical expression. You can have arbitrary sequences containing and, or, and not, and the order of evaluation is defined by the following precedence ordering (in decreasing order of precedence):

not -- right associative

and -- left associative

or -- left associative

This means that in an unparenthesised logical expression, not is evaluated before and which is evaluated before or.

Logical operators have a lower precedence than comparison operators, math, and function calls. Therefore, these operations are always evaluated before logical operators, which follows convention.

The previous examples would be evaluated in the following order:

(a > 0) and (a < (n + 1))

(not x) and y

(a and b) or ((c and d) and (not e))

See also

Short-Circuiting Logical Expressions


Short-Circuiting Logical Expressions

Following the convention in most other programming languages, logical expressions in MAXScript are short-circuiting or non-strict. This means only enough of the sub-expression is evaluated to determine the overall result:

  • If the first operand is false in an and expression, the result must be false, therefore, the second operand is not evaluated.

  • If the first operand is true in an or expression, the result must be true, therefore, the second operand is not evaluated.

This saves execution time and enables useful shorthand notation.

FOR EXAMPLE,

if you want to calculate "sin a" if the value of variable a isn’t undefined, you can use the following

if a != undefined and sin a > 0 then ...

In a strict language, the "sin a" evaluation of an undefined operand results in an error, and you would need to break up the expression into two if statements:

if a != undefined then

if sin a > 0 then ...


Function Calls

A function call expression passes an optional list of arguments to a MAXScript or user-defined function, and the value returned by the function is the function call expression’s result. A <function_call> has one of the following forms:

<operand> { <argument> }+ -- one or more arguments

<operand> () -- no arguments

in which, <argument> is one of the following:

<operand>

<name>: <operand> -- keyword argument

EXAMPLES:

sin a

tan2 x y

print (n + 1) to:debug

fns[i] $box01 -- get function out of array fns

move object1 [10,20,x * 3]

This syntax is unlike most programming languages which typically use parenthesized lists of comma-separated arguments. This syntax was chosen for MAXScript for the following reasons:

  • It is simpler and easier to use, particularly if a function has many optional keyword arguments.

  • The language is used in a command-line window within 3ds Max. Therefore this form is similar to other command or shell languages that users might be already know.

All 3ds Max objects, including geometric objects, splines, materials, and so on are created using function calls. The name of the object creation function is the object’s class name.

FOR EXAMPLE:

standard() -- create a standard material

bend angle:45 -- create a bend modifier

box height:20 width:40 -- create a box

See also

Positional and Keyword Arguments

Function Precedence

Code Layout

Special Notes about Function Calls

Creating Functions


Positional and Keyword Arguments

A function can take two kinds of arguments:

  • Positional Arguments. If you call a function that takes positional arguments, you must specify those arguments first and in the correct order. Positional arguments correspond to the function arguments in most programming languages—they are required and have a fixed number and order.

  • Keyword Arguments. You write keyword arguments as a keyword:<value> pair, and they can appear in any order after the positional arguments. Functions can use some or all of their keyword arguments as optional arguments. If you call a function and don't supply optional keyword arguments, they will have either the default value supplied by the called function, or the special value unsupplied when first referenced in the called function.

Optional keyword arguments are useful in command languages where commands can have many options. They are particularly useful within 3ds Max where most functions have numerous optional keyword arguments. For example, all scene object creation functions take optional keyword arguments for their creation parameters. As there are sometimes more than 100 arguments to these functions, using positional arguments would simply be unworkable.

As an example of positional arguments, the syntax for the print function is:

print <value> [ to: <file> ]

<value> is a positional argument, and is required. to: <file> is an optional keyword argument, where to is the argument keyword and <file> is the argument value. If the to argument value is unsupplied, MAXScript outputs <value> to Listener. Otherwise, MAXScript outputs <value> to the file specified by <file>.

EXAMPLE

As another example, you can create a sphere object in the 3ds Max scene with no arguments:

sphere()

Or, you could specify just one argument:

sphere radius:23

Or, you can specify more optional arguments:

sphere segs:20 smooth:on radius:15 hemisphere:0.5 mapcoords:on

For those keyword arguments not specified when creating 3ds Max objects, default values are used. The default value used for each keyword argument is shown in the descriptions of the object classes.


Function Precedence

A <function_call> has a lower precedence than an <operand>, but it has a higher precedence than all the math, comparison, and logical operations. This means you have to be careful about correctly parenthesizing function arguments.

FOR EXAMPLE,

sin x + 1

is evaluated as:

(sin x) + 1

In general, you have to put arguments that are expressions inside parentheses,

sin (x + 1)

atan2 (y - 1) (z - 1)

This rule has one exception, the unary minus. It is recognized as one type of <operand> you don’t have to parenthesize.

FOR EXAMPLE,

sin -x

is interpreted as:

sin (-x)


Code Layout

The end-of-line layout rules, as described in Source Code Layout and Continuation Lines , mean an end-of-line indicates the end of a function call if the line ends at the end of a complete argument.

You cannot simply break up a function call with many arguments into several lines, because each line becomes a separate expression, almost certainly causing an error. Use the "\" continuation character in this situation,

FOR EXAMPLE,

foo = standardMaterial twosided:on shininess:34 \

diffuseMap:baz \

opacityMap:bar \

bumpMap:boo


Special Notes About Function Calls

Functions in MAXScript are just another value that can be stored in variables and arrays, and passed to other functions as arguments. Such functions are sometimes called higher-order functions. All built-in functions, and functions that MAXScript defines based on the 3ds Max object classes, are values stored in system global variables of the same name as the function. When you define a scripted function, the function value is placed in a variable with the same name as the function. You can use the value in these variables and work with them as you would with other values, such as storing them in an array or passing them as arguments.

Because the function name is a variable that simply yields the function itself, functions that take no arguments need to be called in a special way.

FOR EXAMPLE,

if you want to call a function get_current_target that takes no arguments, you can not simply write:

t = get_current_target

This stores the get_current_target function value in variable t, rather than storing the result of executing function get_current_target. Instead, you must use the "()" nullary call operator:

t = get_current_target()

The function to be called is defined as an <operand> in the syntax for function calls. This means that it can be an expression that is evaluated to get the function to call.

FOR EXAMPLE,

(if a > b then sin else cos) x --conditional function choice

handlers= #(move, scale)

x = 2

handlers[x] $box01 [1,1,1] --get the function out of an array

See also:

When do I use () after a function?


Block-Expressions

Block-expressions are the basic constructors for structured code. They allow you to group a sequence of expressions and evaluate them in sequence as though they were a single expression.

The syntax for <block_expr> is:

( <expr> { (; | <eol>) <expr> } )

That is, a parenthesized sequence of expressions with each <expr> separated by either a line break or a "; " semicolon.

MAXScript also allows empty block-expressions, (). This is useful when incrementally building code in order to place an empty expression in a path to be filled in later. When evaluated, empty expressions yield the value undefined.

EXAMPLES:

(

d = centre.x^2 - (p.x^2 + p.y^2)

newz = if d > 0 then sqrt d else p.z

print newz

)

if x < y then (print x; print y; u += 10; print u)

You can use a mixture of line breaks or semicolons:

EXAMPLE:

(

print x; print y

u += 10

print u; print z

)

Because a block-expression is an <operand>, you can insert a block-expression anywhere you can put an <operand>. This is unlike most languages which limit where you can put blocks of code to only a few places.

Further, because all constructs are expressions in MAXScript, a block-expression yields a value defined to be the last <expr> in the block. This allows you to use a nested sequence of expressions to compute an operand for some operation:

EXAMPLE:

$box.pos.z =

(

d = x^2 - y^2

if d > 0 then sqrt d else z

)

Here, the result of the block-expression is the result of the final if expression, which is then assigned to $box.pos.z.

Because the item in parentheses can be any <expr>, you can turn any construct in MAXScript into an operand by putting it in parentheses. This allows you to write the following example, in which the operand to be indexed is the conditional result of an if expression:

(if a > b then c else d)[n + 1]

As described in Scope of Variables , top-level open parentheses in a script file or in the Listener create a new variable scope. Any block-expressions with the top-level block-expression do not create a new variable scope, even if the variable is explicitly declared as local in the inner block-expression. A variable’s scope extends into any block-expressions within the variable’s scope. If you declare a variable as local in a scope, the newly declared local variable hides any outer variables with the same name. Any reference to that variable name later in the local variable's scope refers to the new local variable. At the end of the local variable's scope, the next outer variable becomes visible again. This is shown in the following script:

SCRIPT:

a=1

(

local a=2

(

local a=3

)

print a

)

a

OUTPUT:

1 -- result of line 1

3 -- output of line 7

3 -- result of block-expression lines 2 to 8

1 -- result of line 9

Any variable names used in a block-expression which have not been created at a higher scope level are implicitly declared as local in the present scope. This can result in unexpected execution results for scripts that are not set up correctly.

FOR EXAMPLE, CONSIDER THE FOLLOWING SCRIPT:

(b=bend();addmodifier Objs b) -- create bend modifier and apply to objects

b.angle=10

The first time you execute this script, the following error message is generated:

-- Unknown property: "angle" in undefined

If you execute the script again, it works properly. The reason is there are actually two variables with the name b - one is local to the block-expression and contains the bend modifier value, and the other is global and has the value undefined. During the second execution, global b exists, so the block-expression does not implicitly declare a new variable b, rather it uses the global variable b.

When writing scripts, it is also a good programming practice to explicitly declare as local all variables unless you really want them to be global variables. There are several reasons for this practice:

  • All the variable names used in the block or function will be together, which makes it easier to find the variable names and helps prevent using incorrect names in the script.

  • If more than one script is executing at the same time (for example, you are running a scripted utility and have a scripted controller in the scene) and both scripts use the same global variable name, the two scripts can interfere with one another. This can cause apparently random failures of one or both scripts.

  • You are sure you are using the correct variable in the event that a variable with the same name has already been declared at a higher scope, and you won't inadvertently change the higher-level variable's value.

  • Values of variables explicitly defined as local are displayed in error call stack trace-backs.

  • In 3ds Max R2.5, if a 3ds Max class, a MAXScript method, or a MAXScript read-only global variable has the same name as an implicitly declared local variable, a MAXScript runtime error will be generated if an assignment to that variable name occurs. Since the variable name already existed with a global scope, an implicitly declared local variable was not created. Since one or more new 3ds Max classes will be created by any third party plug-ins the user has loaded, you were not be able to tell ahead of time if a variable name was a global variable name. In 3ds Max 4 and higher, if the MAXScript compiler detects that the first reference to such a variable is an assignment, it will implicitly declare a local variable, rather than leaving it as a reference to a read-only system global.

    • FOR EXAMPLE,

    executing the following expression in 3ds Max R2.5 would result in a value of Box, since Box is a 3ds Max object class.

    In 3ds Max 4 and higher, MAXScript detects that the first use of variable box is an assignment and creates an implicitly declared local variable box.

    The result of this expression in 3ds Max 4 and higher is the value undefined.

    (if false do box=10;box)


Context Expressions

Context expressions are the parts of the MAXScript syntax that are most specifically designed for use with 3ds Max. Context expressions are mirrors of some of the most important abstractions in the 3ds Max user interface - the animate button, the time-line slider, the working coordinate system, and so on. Context expressions make it as easy to create animation and perform geometry manipulation in MAXScript as these tools do in the user interface.

The basic idea for this is a prefix is supplied that sets up a context for the evaluation of its expression.

FOR EXAMPLE,

animate on

(

move $box01 [20, 0, 0]

rotate $box02 45 x_axis

)

This effectively "turns on" the animate button for the duration of its block-expression. The move and rotate will automatically generate keyframes, just as would happen if you turned the animate button on in the 3ds Max user interface and moved objects around.

Another kind of context expression has a prefix for setting the current animation time, as though you had moved the time slider. If we mix the two forms together,

FOR EXAMPLE,

animate on

(

at time 0 $box01.position = [-100, 0, 0]

at time 100 $box01.position = [100, 0, 0]

)

you can see how to do keyframe animation in MAXScript.

The full syntax for <context_expr> is:

<context> { , <context> } <expr>

where <context> is one of:

[ with ] animate <boolean>

at level <node>

in <node>

at time <time>

[ in ] coordsys <coordsys>

about <center_spec>

[ with ] undo <boolean>

[ with ] redraw <boolean>

EXAMPLES:

-- randomly jiggle each object in the selection around + or - 20 units

in coordsys local selection.pos = random [-20,20,20] [20,20,20]

-- rotate all the boxes 30 degrees about the y_axis of $foo

about $foo rotate $box* 30 y_axis

-- generate a keyframed animation of $foo randomly chasing $baz

animate on

for t in 0 to 100 by 5 do

at time t

foo.pos = $baz.pos + random [-10,-10,-10] [10,10,10]

The individual context expressions are described in the following topics:

animate

at level, in

at time

coordsys

about

undo

redraw

See also

Cascading Contexts

Nested Contexts

Sticky Contexts


animate

The [ with ] animate <boolean_expr> context corresponds to setting the Auto Key button in the 3ds Max user interface. Placing an expression, operation, or block-expression within an animate on context causes keyframes to be generated whenever an animatable property of a 3ds Max object is changed, regardless of the actual state of the Auto Key button. Likewise, placing an expression within an animate off context prevents keyframes from being generated whenever an animatable property of a 3ds Max object is changed. Expressions that change an animatable property of a 3ds Max object, and are not within an animate context, will generate keyframes only if the Auto Key button is on.

Setting the animate context on or off does not affect the state of the Auto Key button. The state of the Auto Key button can be queried and set using the animButtonState global variable. The user can be prevented from changing the state of the Auto Key button using the animButtonEnabled global variable.

EXAMPLES:

loadheight=obj.pos.z

-- lift object, no key generated

animate off

obj.pos.z=loadheight+LiftHeight

-- Create key at time tStart to keep object lifted until that time.

-- If tStart != 0, a key will also automatically be created at frame 0.

-- Then create a key at time tEnd to drop the object

with animate on

(

at time tStart obj.pos.z=loadheight+LiftHeight

at time tEnd obj.pos.z=loadheight

)

HISTORICAL NOTE FOR NEW USERS:

In 3ds Max prior to versions 5, the Auto Key button was called Animate. Since MAXScript has been first introduced back in 3ds Max 2 when there were no Auto Key and Set Key buttons, the MAXScript terminology remains the same for compatibility reasons, including the name of the animate context and the name of the global variable animButtonEnabled. Changing their names to reflect the new 3ds Max UI would break old scripts and is thus not a good idea.


at level; in

at level, in

The at level <node> and in <node> contexts set the specified node to be the effective root for any pathnames specified, or scene objects created, in the context. These contexts automatically prefix the specified node to any pathnames in the context. They also set the specified node to be the parent for any scene objects created in the context.

To be able to use pathnames within level contexts to name objects anywhere in the scene, you can override the current working level by using a rooted pathname. A rooted pathname has an extra "/" before the first-level name and indicates "start at the actual root of the object tree".

FOR EXAMPLE,

scale $/baz/* [1,1,2]

operates on the object baz in the actual top level, not just as a child of the current working level.

You can also use this rooted pathname form to force a pathname to only consider top-level objects when you name a single object.

FOR EXAMPLE,

$foo

looks throughout the whole scene, at all levels for an object named foo,

BUT

$/foo

will only look for a top-level object named foo.

EXAMPLES:

in $mannequin01...LClav...hand --set context to hand

$mannequin01.spine.LClav.arm.hand

(

rotate $thumb1 15 y_axis --rotate hand's child thumb

rotate $finger11 10 y_axis --rotate hand's child first finger

PalmCenter=$finger21.parent.pos --get hand's position

PalmCenter+=(LHandPos-$finger21.pos)/2. --calculate center of palm

--create a dummy there, dummy is a child of the hand:

dummy name:"palmLink" pos:PalmCenter

)

in $dummy

(

-- create automatically as children of $dummy:

sphere name:"ear1" pos:[10,10,10]

sphere name:"ear2" pos:[-10,10,10]

scale $foo/* [1,1,2] --look for 'foo' as a child of $dummy

)


at time

The at time <time> context corresponds to the 3ds Max time slider. Any animatable property references will yield their interpolated values for the specified time. If the Animate button is on, or the script is also in an animate on context, keyframes are generated at the specified time when an animatable property of a 3ds Max object is changed.

Setting an at time context does not affect the 3ds Max time slider. The time associated with the time slider can be queried and set using the sliderTime global variable.

EXAMPLES:

-- generate a keyframed animation of $foo randomly chasing $baz

animate on

for t in 0 to 100 by 5 do

at time t

$foo.pos = $baz.pos + random [-10,-10,-10] [10,10,10]


about

The about <center_spec> context is the MAXScript equivalent of the rotate/scale transform center list on the main 3ds Max toolbar. It defines the center point about which any scale or rotation operation is performed within its context. Note that, like the center list in 3ds Max, this sets only the center point for the operation, not the axis. The axis is taken from the current working coordinate system set using the coordsys context expression:

about selection

rotates/scales about the center of the current selection

about pivot

rotates/scales about each object's pivot point

about coordsys

rotates/scales about the center of the current working coordinate system set using the coordsys context expression

about <node>

rotates/scales about the pivot point of the given object

about <matrix3>

rotates/scales about the center of the coordinate system specified by the given 3D matrix

about <point3>

rotates/scales about the given point with coordinate system and axes taken from the current working coordinate system.

EXAMPLES:

-- rotate all the boxes 30 degrees about the y_axis of $foo

about $foo rotate $box* 30 y_axis

-- rotate each planet 45 degrees around its parent

in coordsys parent about coordsys rotate $planets* 45 z_axis


coordsys

The [ in ] coordsys <coordsys_spec> context corresponds to the current reference coordinate system list in the main 3ds Max toolbar. Prefixing an expression, operation, or block-expression with a coordsys context causes 3D coordinate operations to be interpreted in the specified coordinate system. Moving, scaling, or rotating objects, or setting transform-related properties within a coordsys context operate in relation to the given coordsys. Accessing coordinate properties such as position, center, rotation axis, and so on, within a coordsys context causes those values to be delivered relative to the given coordsys.

The following forms are supported:

[ in ] coordsys world

Use the world space coordinate system

[ in ] coordsys local

Use the object's local coordinate system

[ in ] coordsys parent

Use the object's parent's coordinate system

[ in ] coordsys grid

Use the active grid’s coordinate system

[ in ] coordsys screen

Use the currently active viewport’s coordinate system

[ in ] coordsys <node>

Use the specified node's local coordinate system - this is equivalent to the "pick" coordinate system capability in the 3ds Max user interface

[ in ] coordsys <matrix3>

Use the coordinate system specified by the given 3D matrix

EXAMPLES:

-- randomly jiggle each object in the selection around +/- 20 units

in coordsys local selection.pos = random [-20,20,20] [20,20,20]

-- rotate objects in parent’s coordinate system

in coordsys parent rotate selection (EulerAngles 0 0 90)


defaultAction Context

This context is available in 3ds Max 8 and higher.

with defaultAction <action> <expression>

where <action> is #logmsg, #logToFile, or #abort.

When entering this context, MAXScript stores the current state of the DefaultActionSys and when exiting it restores the DefaultActionSys to that state.

Messages being held by the DefaultActionSys are not affected by entering or exiting this context.

When entering this context, after storing the current state, all existing event actions are set to the specified action.

The pre-defined 3ds Max events (missingExtFiles, missingDLLs, missingXRefs, missingUVW, and unsupportedRendereffect) are added if not already present and set to the specified action.

The defaultAction context state is #logToFile. Also when entering this context (unless entering the context via a 'set defaultAction') the quiet mode is set on, and is restored when exiting the context.


quiet Context

This context is available in 3ds Max 8 and higher.

with quiet <bool> <expression>

Entering this context sets the quiet mode to the specified value, and the original quiet mode is restored when exiting the context. By default, the quiet mode is off unless specified otherwise.


redraw

While the expression within the redraw <boolean> context is being evaluated, screen redraws are completely disabled, and the modify and motion panels are suspended.

This is basically an exception safe form of

disableSceneRedraw(); < expr >; enableSceneRedraw()

That is, if an exception is thrown in < expr >, the scene redraws will be automatically re-enabled as part of the exception handling. The modify and motion panels are suspended if they are the currently active command panel. If the expression sets the current command panel to either modify or motion, the command panel will not be suspended at that point.

EXAMPLE USAGE:

with redraw off

for t=0 to 10 do

(

sliderTime=t

exportFile ("outfile_"+(t as string)+".dxf") #noPrompt selectedOnly:true

)

See also

disableSceneRedraw & enableSceneRedraw


undo

The undo <boolean> context provides control over whether scripted scene changes will be undoable. By default, the operations performed in MAXScript are undoable. This means that scene-modifying commands typed in the Listener are undoable by default. Making this a context-controlled activity allows you to decide when the undo overhead is to be taken.

EXAMPLE:

undo on

(

delete $box*

delete $sphere*

clearUndoBuffer()

)

The undoable operations appear as items labeled "MAXScript" in the 3ds Max Undo menu. It is important to note that the granularity of the undoable operations is at the level of entire undo clauses. In the previous example, one entry is added to the Undo stack containing both deletes as a single operation. Choosing undo for this entry in the Undo menu causes both deletes to be undone. Therefore, you can control the granularity of an undo by choosing the appropriate undo block expression groupings.

You can invoke an undo from MAXScript with the max command:

max undo

When you script very large scene changes, you should consider turning undo off as it is quite easy to fill up the Undo stack and consume substantial amounts of memory. Disabling undo can improve performance in this situation. If the actions your script performs could interfere with entries already in the Undo stack, you should explicitly clear the Undo stack before enabling undo. An entry in the Undo stack generally expects the scene to be in the state it was when the entry was placed in the Undo stack. If you interrupt the storing of Undo stack entries, and modify the scene in an incompatible way (such as deleting an object that an entry assumes is still around), a 3ds Max crash is likely if you then try to perform an undo.

Using the following functions you can control the undo and scene save states in 3ds Max:

clearUndoBuffer()

Empties the Undo stack, both providing a way to reset the undo state and another way to control the save-changes requester.

setSaveRequired <boolean>

Lets you set the 3ds Max system "dirty" flag. If this flag is set or there are entries in the Undo stack, you are asked if you want to save the scene file on a File > New or File > Reset.

getSaveRequired()

Returns true if the 3ds Max system "dirty" flag is set to true or if the Undo buffer is not empty. If the Undo buffer if not empty, this function will still return true, even if you just called setSaveRequired false.

Normally, if there are entries in the Undo stack when the scene is closed, 3ds Max will prompt with a save-changes requester. In some cases, where you are controlling undo in MAXScript, you may want to force the need for a save-changes prompt.

MAXScript provides some control over the labels displayed in the 3ds Max undo/redo dropdown list for undoable MAXScript operations. This is an improvement to just displaying "MAXScript" in all cases, as it did in versions prior to 3ds Max 4.

Any undoable macroScript execution, such as via a toolbar button, menu item, hotkey or quad-menu item, will be displayed in the undo/redo list with the name of the macroScript.

The 'undo on' context prefix accepts an optional string literal (text in double quotes) after the 'undo' keyword, which will be used as the label for the undo block in the 3ds Max undo/redo lists.

Syntax

undo ["undo_item_label" | label:<string_operand> | variable_name ] <bool_expr> <expr>

where

"undo_item_label" must be a string literal,

<string_operand> evaluates to a string at runtime,

variable_name is a global or local variable containing a string value.

EXAMPLES:

rollout test "test"

(

local undoString = "Button Press"

local buttonPress = 0

button b "press me"

on b pressed do with undo label:(undoString + (buttonPress +=1) as string) on box()

)

createdialog test

undo "add background" on

(

...

)

my_context_name = "An Undo Context"

undo my_context_name on

(

...

)

These examples will generate an undo-block for all the operations in the block-expression following the prefix, which will display in the undo/redo lists with the given string as its name. The name must be a literal string and is optional, and will default to "MAXScript".


Cascading Contexts

You can cascade a set of context prefixes, optionally separated by commas, onto one subject expression, effectively applying all the contexts (in order) to the subject expression.

FOR EXAMPLE:

animate on, at time (t+1), with undo off, coordsys local

(

...

)

All the context forms are true expressions, yielding the value of their subject expression, so:

pos0 = at time 35 $box01.position

pos1 = at time 75 $box01.position

assigns the box01 position at time's 35 and 75 to variables pos0 and pos1.

This is particularly useful with the at time context, as you can very easily do across-time computations.

The operand to an at time context can be any valid time value (numbers are taken as frames for convenience), including sub-frame times down to the tick level.

The animation system in 3ds Max will interpolate animated parameters at these fine levels so you can easily do sub-frame simulation computations.


Nested Contexts

All context expressions remember the prior setting of the context when they are set, and restore the original setting when the expression completes. Therefore, you can nest context clauses in any way you want, including contexts of the same type to override an outer setting.

EXAMPLE:

with animate on, at time t

(

move ... -- all these place keys

rotate ...

animate off -- turn off animate for a bit

(

move ... -- working maneuvers, these don't effect animation

rotate ...

) -- animate on is restored here

scale ... -- place keys again

...

)

Further, all the contexts are dynamically scoped. Any code inside a context expression, any functions that code calls, and functions they call down to any level, are executed in the current prevailing context. So, a function can move an object and place keyframes at a certain time when called from one client and do no keyframing when called from another client, depending on how the callers have set up the contexts. Of course, the called function can explicitly set its own contexts if it wants to, overriding those that may have been set up by the caller.


Sticky Contexts

You can force the settings of contexts such as coordsys, animate, time, and so on, to be "sticky." The settings will stay active for any code execution that follows, up until the point you change them or override them with a context prefix for an expression. This is particularly useful when working in the Listener, allowing you to set a context and then perform several interactive operations in that context without prefixing each with the desired context construct.

Establishing a sticky context is accomplished with the set construct:

set <context>

where <context> is one of the MAXScript context prefixes: animate, time, in, coordsys, about, level, or undo.

EXAMPLE:

set animate on

set time 30f

move $foo [80,0,0]

scale $baz [1,1,3]

$bar.bend.angle += 23

...

set animate off

set time off

This turns animate on and sets the current time to frame 30 after which any number of interactive operations can be performed that will generate animation at frame 30. The modes are then returned to default. As shown in this example, certain MAXScript contexts permit syntactic variants to make the set construct read clearly.

In particular, these are:

set time <value> | off -- variant of at time <time>

set level <node> -- variant of at level <node>

The time context can be set to off, signifying the current value of the 3ds Max time slider is to be used.

All the set constructs are expressions that yield the context setting that was in force at the time the new context was set. This allows you to simulate the standard nested forms of these constructs by storing the old context in a variable and using that to restore the context later.

FOR EXAMPLE:

oc = set coordsys parent -- remember old coordsys

rotate $foo (quat 30 z_axis)

...

set coordsys oc -- restore it

You can also force several of the contexts back to their default states by specifying #default as their parameter. The set constructs for which you can specify #default are: animate, in, coordsys, and level.

When using the set undo on construct to enable the undoing of scripted changes in the Listener, undo granularity is a top-level expression. Every time you evaluate an expression or sequence of selected expressions with the ENTER or Number-Pad ENTER key, a single entry is added to the Undo stack.


Controlling Program Flow

MAXScript has several <expr> expression forms used to explicitly control the flow of execution. They are:

<if_expr>

<case_expr>

<do_loop>

<while_loop>

<for_loop>

<loop_exit>

<try_expr>

These expression forms correspond to the standard control constructs found in many programming languages. Each is described in its own topic:

If Expression

Case Expression

While and Do Loops

For Loop

Loop Exit

Try Expression

Additionally, there are several constructs for implicitly controlling program flow.

The when construct is used for scripting general change handlers, so you can write scripts that respond to user operations such as object moves, vertex edits, object deletions, name changes, and so on. Callback mechanisms are used to have a function called when certain specific events occur. See Change Handlers and When Constructs for more information.

The on construct is used when scripting rollouts or tools or plugins, so the script can respond to events, often user-generated, in those constructs. See Utility and Rollout Properties, Methods, and Event Handlers for more information.


If Expression

The if expression is used to conditionally execute an expression based on the result of a boolean test expression.

The syntax for an <if_expr> is one of:

if <expr> then <expr> [else <expr> ]

if <expr> do <expr>

EXAMPLES:

if a > b do (print d; print e)

a = (if d == 0 then 0 else a / d)

The first <expr> is a test expression that must evaluate to true or false, such as a comparison or logical expression. If the result is true, the then or do <expr> is evaluated and its value is returned as the result of the <if_expr>. If the result is false, the optional else <expr> is evaluated and its value is returned as the result of the <if_expr>. If there is no else or the do form is used, the <if_expr> returns the value undefined.

The do form is provided particularly for use during interactive sessions in the MAXScript Listener. When you enter expressions for immediate evaluation into the Listener, MAXScript determines if your expression is complete and then evaluates it. If you use the optional else form in the Listener and you want to omit the else <expr>, MAXScript continues to "wait and see" if you enter an else <expr>. The line break after the then <expr> is legal and does not cause MAXScript to evaluate the current line right away.

AS AN EXAMPLE,

As an example, if the following script is entered in Listener, the first line will not evaluate until you enter the second line:

if match x y then print x

print "hello"

When you use the optional else form inside a block or another expression, MAXScript can determine from the code that follows it if you omitted the optional else. Use the do form for if statements without an else as top-level commands in the Listener:

FOR EXAMPLE,

if match x y do print x

As described in Expressions , anywhere you can write an <expr> expression, you can write any construct in MAXScript. In statement-based languages, there is usually one syntax for if statements and a separate one for conditional expressions. In MAXScript, a single syntax is used for both cases.

FOR EXAMPLE,

the following two lines of code are both valid, and their meaning should be obvious:

if a > b then print c else print d

x = if a > b then c else d

You can also write the following line, containing a nested if expression and a nested assignment, which is itself an expression:

x = if (if a > b then c else d) < e then f else (g = 23)


Case Expression

The case expression is used to select an expression to be evaluated from a set of labeled expressions based on a test value compared against the labels.

Only the first expression whose label matches the test expression is evaluated. All labels must be comparable to the test expression. Labeled expressions can be block-expressions, so you can use the case expression as a case statement, choosing between blocks of code to execute.

The syntax for <case_expr> is:

case [ <expr> ] of ( <cases> )

where <expr> is the test expression and <cases> is a sequence of labeled expressions:

<factor>: <expr>

default: <expr>

FOR EXAMPLE,

new_obj = case copy_type.state of

(

2: copy $foo

3: instance $foo

default: reference $foo

)

A special label, default, can be optionally used to tag the expression that will be evaluated if no other labels match the test expression. If the default label is not used, and no label matches the test expression, the case expression returns a value of undefined.

The labels are <factors> - elements such as number literals, name literals, string literals, variables, or block-expressions. When a case expression is evaluated, the test expression is evaluated once, then each label expression is evaluated in order until one is found that compares equally to the test expression value. The expression it labels is then evaluated and this becomes the result of the case expression. No further labels are evaluated or tested.

The test expression is optional. If it is not supplied, the labels are expected to be Boolean values or expressions, and the first label evaluated as true determines the chosen case. In this variant, it is common to use expressions as labels, so be sure to parenthesize them.

FOR EXAMPLE,

case of

(

(a > b): print "a is big"

(b < c): print "b is little"

(c <= d*3): ...

default: ...

)


While and Do Loops

while and do loops are used to repeatedly execute an expression until a test expression evaluates as false. The while loop and do loop are simple variants of one another.

The syntax is:

do <expr> while <expr>

while <expr> do <expr>

Both loops repeat the do <expr> as long as the while <expr> evaluates to the value true. The do form evaluates the do <expr> at least once, evaluating the test expression at the end of each loop. The while form evaluates the test expression at the start of each loop and may not loop at all.

Both forms return as their value the result of the do <expr> from the last successful loop iteration. The while form will return the value undefined if the test expression immediately returns false.

EXAMPLES:

while x > 0 do

( print x

x -= 1

)

while not eof f do print (read_value f)

do

(

exchanged=false

for i=1 to imax do

(

j=i+gap

if (compare array[j] array[i]) do

(swap array[j] array[i]; exchanged=true)

)

)

while exchanged

See also

Skipping Loop Iterations

Loop Exit


For Loop

The for loop iterates through a range of numbers, time values, or a sequenced collection of values, such as an array or object set.

The syntax for the for loop is:

for <var_name> ( in | = ) <sequence> ( do | collect ) <expr>

where <var_name> is the name of the loop index variable that holds the loop value, and <sequence> is the source of values for the loop.

The <sequence> can be one of the following:

<expr> to <expr> [ by <expr> ] [while <expr>] [where <expr> ]

<expr> [while <expr>] [ where <expr> ]

<expr> to <expr> [ by <expr> ] [where <expr> ]

<expr> [ where <expr> ]

EXAMPLES:

for i = 1 to 10 do print i -- sequence numbers

for item in table1 do x = x + item.height -- sequence an array

for t in 0f to 100f by 5f do sliderTime=t -- sequence time (given as frames, here)

bigones = for obj in $box* -- you can sequence pathnames!

where obj.height > 100 collect obj -- collect the big boxes into an array

The first <sequence> form is the standard number loop, the first <expr> value is the start value, the to <expr> value is the limit value and the optional by <expr> value is the loop value increment. The allowable value types are integer, float and time. If the by value isn't given it defaults to 1.

The second form of <sequence> takes a sequencable collection, such as an array or ObjectSet , and iterates through all its values, assigning successive elements in the collection to the loop value each time through the loop. MAXScript contains several sequence collections, including PathName values , the current selection set, the children of a node, and the stack of modifiers on an object. See also Collections for caveats when using a collection in a for loop.

If an optional while <expr> test is specified, the for loop will terminate if the test evaluates to false. The while test expression must evaluate to a boolean (true/false).

PERFORMANCE WARNING!

Breaking out of a loop using an exit construct is implemented internally using try/catch, which is extremely slow!

This is why the use of the while test is recommended over the use of exit for performance reasons. The while expression is evaluated before the where expression.

EXAMPLES:

function findByClass _obj _className =

(

local notFound = true

local res = 0

local searchName = _className as name

for i = 1 to _obj.NumBakeElements() while notFound do

(

local myElement = _obj.GetBakeElement i

if myElement.enabled do

(

local eleName = (classof myElement as string) as name

if eleName == searchName do

(

res = i

notFound = false

)

)

)

return res

)

Each <sequence> source form takes an optional where <expr> which must evaluate to true or false. The where expression is evaluated at the beginning of each loop and only executes the loop body for that loop value if the where expression is true.

The do <expr> form simply evaluates the body expression once for each value in the sequence. The loop variable is visible to the code in the body expression as though it was declared locally and initialized to the successive loop values each time. When the do <expr> form of a for loop is used as an expression, its return value is always OK.

The collect <expr> form gathers the expression values from the loop iterations and stores them in an array, which is then yielded as the value of the overall for loop. This, for example, is a good way to gather procedural selections of objects from a scene. If the where expression is used with the collect form of the for loop, only the values from those iterations for which the where expression is true are collected. This can be used to collect a filtered sub-set of the iterated values. You can also achieve this collection filtering in a for loop that does not use a where expression by yielding the special value dontCollect for those iterations that should not be added to the collection.

As described in Scope of Variables , a for loop creates a new scope context. The for loop index variable's scope is always the extent of the for loop, even if another variable of the same name already exists. Once the for loop exits, the for loop index variable is no longer accessible. The scope of any variables created in a for loop is always the extent of the for loop. This is shown in the following example:

EXAMPLES:

obj=$box01

avg_pos=[0,0,0]

offset_pos=[100,100,0]

-- new for loop index variable obj created even though

-- a variable named obj already exists, scope is for loop

for obj in $* do

(

-- new variable pos created, scope is for

-- loop offset_pos already exists outside

-- for loop, its value will be used

pos=obj.pos-offset_pos

-- avg_pos already exists outside for loop,

-- its value will be used for loop index since variable

-- obj goes out of scope

avg_pos += pos

)

avg_pos /= $*.count

See also

Skipping Loop Iterations

Loop Exit


Skipping Loop Iterations

MAXScript provides a continue construct that allows you to jump to the end of a for, do, or while loop body <expr> and resume with the next loop iteration.

Its syntax is:

Continue

EXAMPLES:

for i=1 to 8 do (if i == 5 do continue; print i) -- prints 1..4, 6..8

while not eof f do -- read until reach end of file

(

local line=readline f -- read in a line

if line[1] == "-" do continue -- if comment, skip to next line

line1=parser1 line -- call function parser1

processobjs line1 -- call function processobjs

)

If a continue is executed in a for ... collect loop, the expression result for that loop iteration is not collected in the array of body values.

EXAMPLE:

for i=1 to 8 collect (if i == 5 do continue; i) -- returns #(1, 2, 3, 4, 6, 7, 8)

See also

For Loop

Loop Exit


Loop Exit

MAXScript provides an exit construct for breaking out of for, do, and while loops prematurely, even though the loop test expression is still true. This is often useful to simplify the loop test expression, and still use error or other complex termination tests in the body <expr> of the loop.

Its syntax is:

exit [with <expr> ]

EXAMPLE:

while x < y do

(

local delta = x - y

if delta <= 0 then exit -- time to bail

$foo.pos.x = compute_x (foo / delta)

x += 0.1

)

The optional with <expr> lets you specify what the overall value of the loop expression should be if the loop exits prematurely. If you don't specify an exit value, the loop returns the value undefined upon exit.

Exiting a for ... do loop using a with <expr> returns the expression value as the result of the loop. Note that in releases prior 3ds Max 6, OK was returned.

Exiting a for ... collect loop using a with <expr> results in the array of body values collected up to the point of exit.

PERFORMANCE WARNING!

Breaking out of a loop using an exit construct is implemented internally using try/catch, which is extremely slow!

It is recommended to use the optional while test added to for loops in 3ds Max 6 for performance reasons.

See also

For Loop

Skipping Loop Iterations


Try Expression

MAXScript provides simple exception-handling with the try expression, a simplified form of the C++ exception-handling scheme. The try expression lets you bracket a piece of code and catch any runtime errors. This allows you to respond appropriately or take corrective action, rather than let MAXScript halt the execution of your script and print an error message.

The syntax for the try expression is:

try <protected_expr> catch <on_err_expr>

The <protected_expr> is executed and any errors that occur are trapped and the <on_err_expr> is executed. If the <protected_expr> is a block-expression, the block-expression stops executing at the point of the error. If there are no errors in the protected expression, the <on_err_expr> is not executed. This is a very simple error-trapping scheme, but limited heavily by the fact that you cannot get at any error codes or information about the error that occurred.

EXAMPLE:

f = openFile "foo.dat"

try

while not eof f do read_some_data f

catch

(

messageBox "bad data in foo.dat"

results = undefined

)

close f

In this example, any errors in reading or processing the data in the read_some_data() function are trapped, then a Message box is displayed and some clean-up is done. This is a good example of a use for the simple error-trapping.

Throw

There is also an associated function, throw(), which can be used to generate your own runtime error and pass on an error you caught when doing some interim clean-up, or do a non-local jump.

It has the form:

throw <error_message_string> [ <value> ]

throw()

If you have no intervening catches in your script, calling throw() with error message arguments will cause a runtime error to be signaled and MAXScript will report the error message using its standard error reporting. The optional second argument can be any value you want printed with the error message, perhaps the object involved in the error. This second argument can not be specified if the throw is in the body of a catch() and will generate a compile error if present.

If the try/catch is within another try expression, calling throw() will cause the catch expression associated with the outer try expression to be executed. If you have no intervening catches in your script, calling throw() will cause MAXScript to continue running the script from just after the top-most set of parenthesis surrounding the try/catch, or will stop the currently running script if there are no parenthesis surrounding the try/catch.

If you want to catch an error, perhaps to do some clean-up processing, and then pass the error on to outer handlers or MAXScript for error reporting, you can call throw() with no arguments. This throws the current error again and must only be done inside a catch expression.

EXAMPLE:

try

(

i=10

try ( i.x=1 ) -- will generate a run-time error

catch

(

print "Bad Error" -- error message printed

try (i.pos=[0,0,0]) -- will also generate a run-time error

catch (throw()) -- throw() will cause outer catch

-- to execute

)

)

catch (print "Really Bad Error Occurred") -- error message printed

Current Exception

getCurrentException()

This method returns the text of the current exception. It is only useful inside a catch statement - if used outside a catch, it will return 'undefined'.

EXAMPLE:

try

(

throw "AAAAA"

)

catch

(

format "*** % ***\n" (getCurrentException())

)

RESULT:

*** -- Runtime error: AAAAA ***


Creating Functions

Functions are defined in MAXScript using the function definition expression.

The syntax for <function_def> is:

[mapped] (function | fn) <name> { <parameter> } = <expr>

in which <name> is the name of the function.

The optional sequence of <parameter>s can be one of:

<name>

<name>: [<operand>] --keyword parameter with optional default value

and the <expr> after the '=' (equal sign) is the body of the function.

The function <name> is actually used to name a variable into which a value representing the function is placed. When you call a function by using its name, you are accessing its definition in a variable of that name. The scope of the function name variable is the current MAXScript scope.

The parameters for a function are either positional or keyword.

Positional parameters are defined with a simple <name> and must be placed before any keyword parameters.

Keyword parameters have a ':' (colon) after the name and an optional default value. The caller of the function can optionally supply keyword arguments in any order. Those not supplied will be set to the default value given, or the special value unsupplied if a default value is not given.

Using the mapped prefix on a function definition marks this function to be automatically mapped over collections. This means the function will be automatically called repeatedly on the elements of a collection if the collection is given as the first argument to the function. This allows you to define scripted functions that behave in a similar manner to the mapped built-in functions, such as copy, delete, move, and so on, which can be applied to an object set, path name pattern, or array. See Collections for more information.

EXAMPLE

function add a b = a + b

fn factorial n = if n <= 0 then 1 else n * factorial(n - 1)

mapped function rand_color x =

x.wireColor = random (color 0 0 0) (color 255 255 255)

fn starfield count extent:[200,200,200] pos:[0,0,0] =

(

local f = pos - extent / 2,

t = pos + extent / 2

for i = 1 to count do

sphere name:"star" \

radius:(random 0.1 2.0) \

position:(random f t) \

segs:4 smooth:false

)

A scripted function returns as its value the value of the body <expr>. If the body is a block-expression, the function evaluates to the value of the last expression in the block.

A function can be called recursively (that is, the function can call itself), as is the factorial function in the previous examples.

If you need to locate the source of a scripted function, you can use the showSource() function. It displays a script Editor containing the source file in which the function was defined and positioned at the function's definition.

The form is:

showSource <fn>

This is useful for browsing definitions if you are working on many scripted functions, that were perhaps defined in several script files loaded with fileIn() or Run Script in the MAXScript utility.

See also

Function Variables

Function Parameters

The Return Expression

Special Notes about Function Calls


Function Variables

When you define a function, the following events occur:

  • The function definition is evaluated, creating a function value.

  • The function <name> is used to declare a new variable with that name.

  • The function value is placed into that variable.

  • The function value is returned as the result of the function definition expression.

Because the function itself is a value stored in a variable, you not only can call the function through the function name variable. By simply referring the function's variable you can also assign the function value to another variable, store it in an array, or pass it as an argument to another function.

EXAMPLE

-- some 3D surface functions

fn saddle x y = sin x * sin y

fn sombrero x y = cos (x^2 + y^2) / (1 + (x^2 + y^2))

print (saddle 1 1) -- try one out

surface_functions[1] = saddle -- store the functions in an array

surface_functions[2] = sombrero

-- call one of them from within the array:

z = (surface_functions[i]) 10 10

-- pass one in to a higher-order function:

build_math_mesh sombrero

The scope of a function variable is the current MAXScript scope context. The variables used inside a function have a local scope, unless the variable was already defined at a higher scope or is declared as global in the function. An exception to this is the function parameter variables, which always have a local scope.

When writing scripts, it is good programming practice to explicitly declare your local and global variables. Implicit declaration is provided as a short-hand, typically used when working in the Listener interactively or developing short scripts. When developing extended scripts, explicitly declaring variables can reduce errors and improve readability of the code. It is also recommend that you declare as local all variables unless you really want them to be global variables. The reasons for this are described in Scope of Variables .

If a function variable is assigned to another variable, a reference to the function value is stored in that variable. Thus while a function variable may no longer be in scope, the function itself still is if the variable it is assigned to has a scope that extends outside the current MAXScript scope context.

EXAMPLE

fn funcA which =

(

if which == 1 then

fn saddle x y = sin x * sin y

else

fn sombrero x y = cos (x^2 + y^2) / (1 + (x^2 + y^2))

)

myfunc=funcA 2

z=myfunc 10 10

In the above example, the scope of variables saddle and sombrero is local to funcA, and the variables are out of scope outside the function. The return value of funcA is either the function value saddle() or sombrero(), and is assigned to variable myfunc. As also can be seen in this example, you can define a function within any expression.

See also

Scope of Variables

Function Calls


Function Parameters

The parameters to a function are implicitly declared as local variables at the head of the function body, and are initialized with the arguments given by the caller. The parameters have a scope that extends to the end of the function body <expr>. They can be assigned to and hidden by nested local variables with the same name, as can other local variables.

Keyword parameters can be given default values in the function definition, implicitly making them optional to the caller. If the caller does not supply one of the keyword arguments, it is initialized to the default value upon function entry. The default values are specified after the ':' (colon).

If a keyword parameter is defined with no default value and is not supplied by the caller, it is initialized to the special value unsupplied. You can check for this value in the body of your function and handle missing required keyword argument errors accordingly.

EXAMPLE

fn foo a b: c: d: =

(

if c == unsupplied then print "Where's the c: argument??"

...

)

As described in Reference Assignment , MAXScript uses an assignment called reference assignment. In a function, each parameter variable contains a reference to the value passed to the function by the caller. Assigning to a parameter variable places a new reference in the parameter variable, and has no effect on the variable values in the caller - it is an entirely local action. An exception to this is if the parameter value is a compound value such as an 3D Point, string, or array, and you assign a new value to one of the components of the compound value. In this case, the variable's reference does not change, and the changed compound value will still be referenced by the variable in the caller.

While in some cases you may want a function to return multiple values, it typically is not a good practice to do this by assigning to the components of a parameter variable compound value. To manipulate a compound value passed as a parameter, a compound value needs to be created in the caller and passed to the function, which can give results as shown in this example:

SCRIPT:

fn getXYZset val =

(

val.x=random -100 100

val.y=random 100 100

val.z=random val.x val.y

)

(

v1=[0,0,0]

v4=v1

getXYZSet v1

format "v1= %; v4= %\n" v1 v4

getXYZSet v4

format "v1= %; v4= %\n" v1 v4

)

OUTPUT:

getXYZset() -- result lines 1 to 5

v1= [-84,100,78.1224]; v4= [-84,100,78.1224] -- output line 10

v1= [10,100,18.6575]; v4= [10,100,18.6575] -- output line 12

OK -- result lines 6 to 12

Note that it appears the value for both variables v1 and v4 are set in the calls to getXYZset, even though only one variable is being passed. The reason for this is in line 8 variable v4 is initialized to the value of v1. What actually occurs is that in line 7 a reference to a Point3 value of [0,0,0] is created, and this reference is stored in v1. In line 8, that same reference is retrieved from v1 and assigned to v4. Rather than storing two different values, both v1 and v4 reference the same value. When you set the components of the compound value in getXYZset, the reference to the Point3 value is not being changed, and both variables still reference that value.

The proper way to return multiple values from a function is to have the return value of the function be an array or a structure. For example,

SCRIPT:

fn readDataFile filename =

(

f=openfile filename

data=#()

avg=0

nVals=0

while not eof f do

(

val = readvalue f

append data val

avg += val

nVals += 1

)

close f

#(data,(avg/nVals))

)

result=readDataFile "c:\\datafiles\\run1.dat"

data=result[1]

avg=result[2]

Normally, if you are writing a function that is operating on a compound value which is passed as a parameter, you should make a copy of the value. This prevents the value in the caller from inadvertently being changed. For example,

SCRIPT:

fn uppercase instring =

(

local upper, lower, outstring

upper="ABCDEFGHIJKLMNOPQRSTUVWXYZ"

lower="abcdefghijklmnopqrstuvwxyz"

outstring=copy instring -- operate on copy of instring

for i=1 to outstring.count do

(

j=findString lower outstring[i]

if j != undefined do outstring[i]=upper[j]

)

return outstring

)


By Reference Parameter Passing

MAXScript supports by-reference parameter passing. This allows a reference to be passed to a variable, property, or array element in the caller's context as a parameter to a function and any assignments to that parameter in the called function will be assigned directly to the caller's variable, property. or array element. This is often used as a mechanism for passing multiple results back from a function.

To define by-reference parameters for a function, you prefix them with an '&' character.

System Exception Note:

The following example is an error:

ERROR EXAMPLE

fn test1 &p3 = return &p3.x

p=[1,2,3]

r=test1 p

*r

Result: access violation!

It is an error to pass back a reference to a local that has gone from the call stack, but it is very difficult to detect this efficiently. Be careful not to pass back &refs to local variables as it may cause system exceptions.

EXAMPLE

function foo x y &z =

(

...

z = x * y

...

return true

)

Declares a function taking three parameters, x, y and z. The &z in the parameter list indicates the z parameter is to be passed by-reference. To call this function, you provide a reference value for the z parameter using the new '&' reference operator.

local var1, var2

...

var1 = foo 2 3 &var2

The above example calls the foo function with the arguments 2, 3 and &var2. The &var2 is a reference to the var2 local variable. When the function is called, the z parameter in the body is a reference to var2 local in the caller, and the

z = x * y

in the body of foo will cause x * y to be assigned to the var2 local in the caller. After

var1 = foo 2 3 &var2

var1 will contain true and var2 will contain x * y or 6.

Any number of by-reference parameters can be used and they can be keyword parameters if needed:

fn foo x y &z: = ...

called like this:

var1 = foo 2 3 z:&var2

The '&' reference operator used to supply references in a call can be applied to any <accessor> construct in MAXScript. These are:

variables (locals, globals, rollout locals, plug-in locals, etc.)

property access

array index

parameter (of a scripted plug-in)

EXAMPLE

p = [1, 2, 3]

foo 2 3 &p.x

would cause the x coordinate in the point to be passed by-reference and so after the call, the value in p would be

[6, 2, 3]

EXAMPLE

a = #(1, 2, 3, 4, 5)

foo 2 3 &a[3]

would cause the 3rd element in the array to be passed by-reference and so after the call, the value in a would be #(1, 2, 6, 4, 5)

NOTE:

This mechanism is used by the Function Publishing interface in MAXScript to support BY-REF interface method parameters and results. Any parameter defined as by-ref (or with a type code suffix _BR) in the published interface, requires an '&' reference value.

See also

Dereferencing Operator

Visible Class For '&' Reference Values


Dereferencing Operator

Visible Class For '&' Reference Values

A Function Published dereferencing prefix operator, *, has been added to MAXScript in 3ds Max 4. This can be used in conjunction with the new '&' reference operator that was added to support pass-by-reference arguments to functions and interface methods.

The '&' operator is used to get a 'reference' to a variable or property or array element slot in MAXScript. You can pass this reference in to a function that accepts by-reference arguments, allowing its code to directly assign values to the referenced variable or property or array element, thus supporting a kind of multiple-value return.

The new '*' operator allows you to work with '&' reference values anywhere in MAXScript code. Therefore 'dereference' the reference and get the value in the slot or variable it is referring to and to assign it to the referenced slot.

ref = &$foo.pos

this puts a value into ref which is a reference to the .pos property in the scene object $foo. Elsewhere in the code, you could use the new '*' dereferencing operator to say:

$baz.pos = *ref

the '*' dereferences the reference value in ref, essentially making this equivalent to:

$baz.pos = $foo.pos

you can also use this construct as a destination for an assignment:

*ref = [10,0,0]

first dereferences the reference in 'ref' to $foo.pos and then assigns to that, effectively setting $foo's position.

In order to avoid ambiguity with the '*' multiply operator, the precedence of the '*' dereferencing operator is set at just lower than the function call and just higher than the 'as' coercion operator. This means that if you want to send a dereferenced value into a function as an argument, you must surround the dereferencing with parentheses,

FOR EXAMPLE

foo (*ref) x y z

Remember that reference values can be generated for variables, properties and array elements,

FOR EXAMPLE

&foo

&$box.position.x

&valArray[23]

The '*' dereferencing operator is a moderately advanced feature in MAXScript that is often used to allow very general purpose code to be written that uses references instead of actual objects so that it can be applied to different kinds of objects and properties at different times.

Nested property access allowed in '&' reference values in MAXScript. This allows constructs like: r = &$foo.pos , and later *r.controller to mean $foo.pos.controller.

See also

By Reference Parameter Passing


Visible Class For '&' Reference Values

Dereferencing Operator

In releases prior 3ds Max 4, the class of a reference value (as returned by the '&' prefix operator) was shown as Value. It is now the class 'ValueRef'.

EXAMPLE

ref = &foo.name

classOf ref -> ValueRef

if classOf x == ValueRef then y = *x

Nested property accessing allowed in '&' reference values in MAXScript.

This allows constructs like: r = &$foo.pos , and later *r.controller to mean $foo.pos.controller.

See also

By Reference Parameter Passing

Dereferencing Operator


The Return Expression

As with the loop constructs, you can break out of a function body block-expression prematurely in MAXScript, and return a result without evaluating the remaining portion of the block.

For this purpose, you use the return expression:

return <expr>

If a return expression is evaluated in the course of running a function body, the function exits immediately and yields the value given in the return <expr>.

SCRIPT:

fn find_root twod_fn =

(

local root, last_root

while true do

(

...

if abs(root - last_root) < epsilon then return root

...

)

)

NOTE:

It is unnecessary to place a return expression at the end of a function body to return an expression value. Instead, simply place the result expression at the end of a function body.

If a return <expr> is used in a mapped function and a collection is passed as the first argument to the function, the value returned will be OK rather than <expr>.

As a special case, you can exit a script controller’s script using a return <expr>.

In 3ds Max 6 and higher

You can call return() in macroScripts whose body is a single expression (i.e, old style MacroScripts that do not implement 'on execute do ...' handler) to exit the MacroScript.

WARNING!

return is very slow - if your function will be called very often, try to avoid using it. See Do not use return, break, exit or continue for details.


Definitions for MAXScript internal organization

MAXScriptFunction

Const Generic

Const MappedGeneric

Const NodeGeneric

Const Primitives

Const StructDef

Const Class

When you use something like 'fn test val = ...", a MAXScriptFunction value is created and stored in variable test. If variable test was passed into another method, for example as a filter function, that method would test the class of the value to make sure it's a MAXScriptFunction and then call it using apply().

The 'Const' preceding the following simply says that it is a value that is created during MAXScript initialization.

A Generic is one or more methods with the same name, but defined for different classes. Which method is called depends on the class of the first argument to the method. For example, 'random' is declared as a Generic, and there are methods implementing 'random' in several classes - Integer, Float, Point3, Color, Quat, etc. When MAXScript sees 'random v1 v2' in a script, it looks at the class of v1, and then calls the 'random' method for that class. So if v1 were a float, MAXScript would call the Float::random() method.

A MappedGeneric is the same as a Generic, but the first argument can be a collection. If it is a collection, the the method is called individually on each member of the collection. For example, 'deleteTime $box* 10f 10f' deletes 10f at frame 10 in all keys in all objects named $box*. deleteTime can also be used on controllers, that's why it is a Generic

A NodeGeneric is the same as a MappedGeneric, but its first argument has to be a node or a collection of nodes. But given the definition of Generic, that doesn't make much sense. If the first argument is a collection, and the method is applied to each member of the collection.

Primitives are methods that aren't class specific. The method is responsible for checking the types of its arguments (if any) and throwing an error if one isn't correct. There is only one definition of the Primitive.

A StructDef is a structure value. If the structure value is created by a script, its class is StructDef. If MAXScript creates the structure during initialization, its class is Const StructDef. So, for example, my meshop methods are defined to exist in a structure called meshop. Since this structure is created during initialization, the class of meshop is Const StructDef.

Const Class is just a class that is defined in MAXScript itself. So, for example, BitArray is a Const Class. MAXScript also scans the classes registered with 3ds Max - these classes will be created in MAXScript as Const MAXClass.


Structure Definition

You can create your own compound values in MAXScript using Structure definitions. Structure definitions let you define the layout of new 'classes' of values that you can then create and work with in your code.

The syntax for a structure definition is:

struct <struct_name> ( <member> { , <member> } )

where each <member> can be one of:

<name> [ = <expr> ] -- name and optional initial value

<function_def>

EXAMPLE

struct person (name, height, age, sex)

The above example defines a new 'person' class. You create values of this class using the 'person' constructor:

bill = person name:"Bill" height:72 age:34 sex:#male

creates an instance of the person class, storing the instance in variable bill. Member name is initialized to the string value "Bill", height to the integer value 72, age to the integer value 34, and sex to the name value #male.

joe = person name:"Joseph" sex:#male

creates an instance of the person class, storing the instance in variable joe. Member name is initialized to the string value "Joseph" and sex to the name value #male. Since the height and age members are not assigned values, and do not have optional initial values supplied in the structure definition, they default to a value of undefined.

You access structured values using the standard property accessing syntax in MAXScript,

EXAMPLE

bill.age -- returns 34

joe.age -- returns undefined

joe.age = bill.age-4 --assigns Bill's age less 4 to Joe's age.

Structure definitions are useful as an alternative to arrays when you have a fixed, usually small number of independent components and the code to work with them is much clearer when they can be referenced by property name, rather than by index number.

As with function definitions, a structure definition actually creates a value to represent the definition and stores it in a variable of the same name as the structure. You can therefore store the structure definitions in other compound objects or pass them as function arguments The classOf() function returns this structure definition value when applied to these values, so you can use it to test the definition of structure instances at runtime.

EXAMPLE

classOf bill -- returns person

The struct value constructors are just like function calls and take positional argument initializers as well as keyword initializers. The elements of the new struct are filled-in in order from any positional arguments and then by name from any keyword arguments.

FOR EXAMPLE,

given the following struct definition:

struct foo (name, age, height, hair="brown")

you can create instances in several ways:

f1 = foo "bill" 23 72 -- fills in name, age, height in order

f2 = foo age:45 name:"sam" -- random named initializers

f3 = foo "mary" hair:"red" -- first name, then keywords

There are several methods associated with struct values:

getProperty <struct>

Allows you to access properties of the structure.

getPropNames

Returns the properties of the structure as an array.

copy <struct>

Creates a copy of the structure. The copy made is what is called a shallow copy - only a copy of the upper-level value itself (that is, the struct value) is created. Copies aren't made of compound values stored in the structure, rather the same compound value is stored in both struct values. This can be seen in the following example, where changing a component value of a compound value in a copy of a struct value also changes value in the original struct value:

SCRIPT:

Struct test (pos1, pos2) -- define a structure

testval = test [1,2,3] [4,5,6] -- create struct value

testval_copy=copy testval -- copy the struct value

testval_copy.pos1.x=10 -- change component value of a compound

-- value in the copy

testval -- look at original struct value

OUTPUT:

#Struct:test( -- result line 1

pos1:<data>,

pos2:<data>)

#test(pos1:[1,2,3], pos2:[4,5,6]) -- result line 2

#test(pos1:[1,2,3], pos2:[4,5,6]) -- result line 3

10 -- result line 4

#test(pos1:[10,2,3], pos2:[4,5,6]) -- result line 6

See also

Defining Local Functions in Structures

Structure Inherited Methods

Structure Scope While Initializing


Defining Local Functions in Structures

You can define local functions in structures, providing a convenient mechanism for packaging a set of related functions and avoiding possible name conflicts when many global functions are defined, possibly by several separate scripts.

FOR EXAMPLE,

struct foo

(

a, b, c,

fn baz n = sqrt (n + 1),

fn bar x y = print (x ^ 2 + y ^ 2)

)

This defines a structure definition foo with 3 elements named a, b, and c, and two local functions, bar and baz. You can access these functions as properties of either the structure definition value itself or an instance of the foo structure:

p = foo.baz q -- access as property of the structure definition value

foo.bar x y

f = foo 2 3 4

f.bar x y -- access as property of the structure instance

Local functions declared in a structure definition can make references to the member data variables defined in the structure, such that when that member function in some instance of the structure is called, the references access the members of that instance. This allows you to initialize and maintain data structures for the structure functions within the structure itself. An example of including functions that use members of the structure is shown in the following script.

SCRIPT:

struct RandVals

(

RndVals=#(), ptr, seedVal,

fn generateRV num fromVal toVal =

(

if seedVal != undefined do seed seedVal

RndVals=for i=1 to num collect random fromVal toVal

ptr=1

RndVals

),

fn deleteRv =

(

RndVals=#()

ptr=undefined

undefined

),

fn getNextRV =

(

if Nvals == 0 do return undefined

val=RndVals[ptr]

ptr += 1

if ptr > RndVals.count do ptr=1

val

),

fn sortRV = (sort RndVals),

fn setSeed val = (SeedVal = val),

fn setPointer val =

(

if val > 0 and val <= RndVals.count then

(ptr=val;true)

else

false

)

)

MyRandomVals= RandVals()

MyRandomVals.setSeed 12345

MyRandomVals.generateRV 10 0 100

MyRandomVals.getNextRV()

MyRandomVals.sortRV()

MyRandomVals.setPointer 1

MyRandomVals.getNextRV()

MyRandomVals.deleteRv()

OUTPUT:

#Struct:RandVals( -- result of struct def lines 1 to 29

generateRV:<fn>,

sortRV:<fn>,

RndVals:<data>,

deleteRv:<fn>,

getNextRV:<fn>,

seedVal:<data>,

setSeed:<fn>,

setPointer:<fn>,

ptr:<data>)

#RandVals(RndVals:#(), ptr:undefined, seedVal:undefined) -- result line 30

12345 -- result line 31

#(23, 59, 79, 68, 17, 72, 84, 16, 89, 72) -- result line 32

23 -- result line 33

#(16, 17, 23, 59, 68, 72, 72, 79, 84, 89) -- result line 34

true -- result line 35

16 -- result line 36

undefined -- result line 37

In this script, the structure has 3 data members and 6 function members. Note the references to the structure data members in the generateRV() function. In line 30, an instance of the RndVals structure is created and stored in variable MyRandomVals. In line 31, the setSeed() function in the structure instance is called, which initializes the random seed variable by storing the specified value in data member seedVal in the structure instance. In line 32, the generateRV() function in the structure instance is called, which initializes the random number using the seed value specified by setSeed(), sets up and stores an array of random numbers in data member RndVals, updates data member ptr, and then returns the random number array.

Local functions defined in structures are not stored in every instance of the structure. The local function is stored once in the structure definition and references to them in the instances refer to their definitions in the structure definition.

See also

Structure Definition

Structure Inherited Methods

Structure Scope While Initializing


Structure Scope While Initializing

When initializing a structure, the scope will be set to the structure's context. Note that this effectively lets you run a function within the structure when an instance of the structure is created!

For example, when creating an instance of the following structure, the variable 'foo' is initialized to 2, the function 'onCreate' increments the value of foo and then returns a value of foo plus 3, and the variable 'a' is initialized to the result of calling the function 'onCreate':

EXAMPLE:

struct doinStuff (

foo = 2,

fn onCreate= (foo += 1;foo+3),

a = onCreate()

)

DoIt = doinStuff()

RESULTS IN:

doinStuff foo:3 a:6

You can be real inventive with what you can do when you create a structure instance.

See also

Structure Definition

Defining Local Functions in Structures

Structure Inherited Methods


Structure Inherited Methods

All structures inherit from the Value class and so structure instances implement the Value methods print(), format(), classOf(), superClassOf(), isKindOf(), ==, and !=. The copy() method is the only method not inherited from Value that structures implement. It yields a top-level copy of the structure you call it on, meaning that you get a new, separate structure instance containing the same element values as the original and then you can modify that copy independently. The element values are not themselves copies, so for example, if one of the elements was an array, the copy would reference that same array, not a copy of that array.

See also

Structure Definition

Defining Local Functions in Structures

Structure Scope While Initializing


Values

Value

The Value class is the root class for all MAXScript classes. It supplies methods and operators that any class can use.

As described in Properties, Methods, Operators, and Literals , each class can specify external interfaces for the class. These external interfaces are broken up into the following categories:

  • Literals: Any literal form for objects of the class.

  • Constructors: The various ways you can create objects of the class.

  • Properties: Accessible parameters for objects of the class.

  • Operators: Defines the math and other symbolic operators that are defined on values in the class.

  • Methods: Defines all the functions you can call for objects of the class.

In the description of each class in MAXScript, each of these external interfaces are documented.

In the syntax forms given for methods, operators, and properties, the types of argument or property values are specified using the <type_name> convention, in which type_name describes the type of value that is allowable for that argument or property. You can, of course, use an arbitrary expression for these values, as long as it evaluates to a value of the right type. For example, <boolean> means either the true or false Boolean values.

Also indicated for function calls are those that are automatically mapped over collections. This means that the function will be automatically called repeatedly on the elements of a collection if the collection is given as the first argument to the function. See Collections for more information.

See also

Value Common Properties, Operators, and Methods

Working with Values

Basic Data Values

Time Data Values

Special Data Values

Bitmap Values

Stream Values

MAXKey Values

ArrayParameter Values

DataPair Values

Collection Types


Value Common Properties, Operators, and Methods

Value > Value Commong Properties, Operators and Methods

The Value class is the root class for all MAXScript classes. It supplies methods and operators that any class can use.

Operators

<value> == <value>

compare if equal

<value> != <value>

compare if not equal

<value> as <class>

Converts the value to an instance of given class. See the description for each class for valid conversions. All values can be converted to class String, which yields a string with the printed representation of the value.

Methods

print <value> [ to:<stream> ] [#noMap] -- mappable

where <stream> is

( <filestream> | <stringstream> | <windowstream> )

Prints single value to Listener or optional filestream , stringstream , or windowstream , followed by a line break. If the argument value is a Collection , and #noMap is not specified, each value in the collection is printed out on a separate line. If #noMap is specified, the collection value is printed out on a single line. The printed form of all basic data value types, except for BigArray, are directly readable by the readValue() and readExpr() functions, making it simpler to read back in values printed to a file by MAXScript. If the pre-3ds Max R3 print forms are required for compatibility with existing scripts, you can set the system global variable options.oldPrintStyles to true.

format <format_string> { <value> } [ to:<stream> ]

Prints one or more values to Listener or optional filestream, stringstream, or windowstream, using the format string as a template. The format string is a string that can contain plain text to print interspersed with the '%' (percent) metacharacter. Each occurrence of a '%' is replaced by the printed representation of the successive argument values following the format string.

EXAMPLE

format "name:%, pos:%\n" obj.name obj.pos

generates something like:

name: box01, pos: [0, 150.0, 0.5]

format does not automatically append a line break to the output stream, so you can build up a line from several format calls and generally control layout better. An explicit '\n' newline escape character sequence is needed to place a line break in the output stream. Other escape character sequences are documented in String Literals .

classOf <value>

Returns the value's class. Each type of value has its own class. If the value is a Node value, classOf() returns the class of the world state object (the state of the node at the top of its stack). See Node : MAXWrapper for more information.

NOTE:

To avoid a conflict between a user class value in global variable named 'rollout' and MAXScript reserved word 'rollout' which always introduces a rollout definition the class variable name for a rollout is RolloutClass. So, for a rollout foo you'd now say "if classOf foo == RolloutClass do ..."

superClassOf <value>

Returns the value's superclass. A value's superclass is the class from which the value's class was derived.

isKindOf <value> <class>

Returns true if value has given class or inherits from class.

isStructDef <value>

Returns true if the value is a structure definition

isStruct <value>

Returns true if the value is a structure instance

isController <value>

Returns true if the value is a controller

isMSPlugin <value>

Returns true if the value is a MAXScript scripted plugin.

isMSPluginClass <value>

Returns true if the value is a MAXScript scripted plugin class.

FOR EXAMPLE:

b = box() --create a Box primitive

$Box:Box01 @ [0.000000,0.000000,0.000000]

a = emptymodifier() --create an attribute holder modifier

EmptyModifier:Attribute Holder

addModifier b a --add the modifier to the box

OK

isMSPlugin a --see if the modifier is a scripted plugin? Yes!

true

isMSPlugin b --see if the box is a scripted plugin? No!

false

isMSPluginClass EmptyModifier --is the modifier class scripted? Yes!

true

isMSPluginClass Box --is the object class scripted? No!

false

isMSCustAttrib <value>

Returns true if the value is a MAXScript Custom Attribute.

NOTE:

Since Custom Attributes are a special case of a scripted plugin, isMSPlugin will also return true.

isMSCustAttribClass <value>

Returns true if the value is a MAXScript Custom Attribute class.

NOTE:

Since Custom Attributes are a special case of a scripted plugin, isMSPluginClass will also return true.

FOR EXAMPLE

weaponDataCA = attributes weaponData

(

Parameters main

(

)

)

b=box()

custAttributes.add b weaponDataCA

c=b.baseobject.custAttributes[1]

d=classof c

superclassof c

isMSPluginClass d

isMSCustAttribClass d

isMSPluginClass b

isMSCustAttribClass b

`

RESULTS:

<AttributeDef:weaponData>

$Box:Box03 @ [0.000000,0.000000,0.000000]

true

weaponDataCustAttrib:weaponData

<AttributeDef:weaponData>

CustAttrib

true

true

false

false

getHashValue <value> <Integer oldHaskValue>

If the value is one of the supported value types, returns an integer hash value that is a factor of the value and oldHaskValue. If the value type is not supported, returns a value of undefined.

The supported value types are:

Float

Integer

String

BitArray

Point3

Ray

Quat

AngAxis

EulerAngles

Matrix3

Point2

Color

Arrays containing any of the above value types

See also

Values

Working with Values

Basic Data Values

Bitmap Values

Stream Values

MAXKey Values

ArrayParameter Values

Collection Types


Working with Values

Print and Format

The print() and format() functions are straightforward. The format function is used when any formatting of the output is desired, or if you want to print multiple values on a line. When printing a value using either of these functions, a string representation of the value is printed. This is not the object name for those objects with names (for example a 3ds Max object or material). In the following example, variable b contains a reference to a 3ds Max Box object that has a material applied:

FOR EXAMPLE

print b

print b.name

print b.material

print b.material.name

`

OUTPUT:

$Box:Box01 @ [-74.353745,0.000001,-19.931978]

"Box01"

Material #1:Standard

"Material #1"

The printed results above also reflect the result of a <value> as string operation, that is the result is a string representation of the object rather than the object name.

classOf, superClassOf, and isKindOf

The following table shows the hierarchy of classes and superclasses for a variable that contains a reference to a 3ds Max Box object (i.e., b=box()).

 | ClassOf | SuperClassOf
b | Box | GeometryClass
box | GeometryClass | Node
GeometryClass | Node | MAXWrapper
Node | MAXWrapper | Value
MAXWrapper | Value | Value
Value | Value | Value

The isKindOf() and classOf() functions are useful for filtering objects from a set.

FOR EXAMPLE

either of the following will collect all objects of class box into variable allBoxes:

allBoxes=for obj in $* where (isKindOf obj box) do collect obj

`

allBoxes=#()

for obj in $* do (if classOf obj == box then append allBoxes obj)

One of the named parameters to the interactive node selection functions is filter, which allows you to specify a function that returns a value of true if an object can be selected. The classOf, superClassOf, and isKindOf functions are frequently used in these functions. For example,

FOR EXAMPLE

the following function limits the choices to shape objects:

fn shape_filt obj = isKindOf obj Shape`

For an example of such a usage, see Pickbutton .


PrintAllElements Variable and Context

In versions prior to 3ds Max 7, printing or coercing Array , MeshSelection, BigMatrix , and BigMatrixRowArray values to string would convert only the first 20 elements.

In 3ds Max 7 and higher, a MAXScript variable and a new context are available. They control whether the above mentioned value types are fully printed / coerced to string, or just their first 20 elements.

The variable is:

options.printAllElements

When set to true, all elements of Array, MeshSelection, BigMatrix, and BigMatrixRowArray values are printed or coerced to string. If false, only the first 20 elements of these value types are printed.

The context is:

with printAllElements <bool> do <expr>

If bool is true, expr is run with printAllElements true. This is exception safe - if an exception occurs in expr, printAllElements is returned to its initial value.

EXAMPLES

a = for i = 1 to 30 collect i

#(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, ...)

with printAllElements off (print a #nomap;ok)

#(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, ...)

OK

with printAllElements on (print a #nomap;ok)

#(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30)

OK

with printAllElements off a as string

"#(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, ...)"

with printAllElements on a as string

"#(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30)"

(

-- note that the following is not exception safe!

local oldPrintAllElements = options.printAllElements

options.PrintAllElements = true

print a #nomap

options.printAllElements = oldPrintAllElements

ok

)

#(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30)

OK


FormattedPrint

The FormattedPrint method was added to MAXScript in 3ds Max 9. It was previously available through the free Avguard DLX Extensions.

formattedPrint <value> format:<string>

Returns a string representation of value based on the format specified. The format specified is applied for each component value for values that are comprised of more than a single value. For values or component values that are floating point numbers, the default format string is "0.8g", for integers, "%d". The value specified must be one of: float, double, integer, integer64, intptr, string, bool, ray, point2, point3, point4, quat, angleAxis, eulerAngle, matrix3, box2, color, time, or interval.

The optional format: string is of the form:

"[Flags][Width][.Precision][SizePrefix]Type"

where

Flags is:

Flag | Meaning
- | Left align the result within the given field width. Default is to right align.
+ | Prefix the output value with a sign (+ or -). Default is that sign appears only for negative signed values (-).
0 | If width is prefixed with 0, zeros are added until the minimum width is reached. If 0 and - appear, the 0 is ignored. If 0 is specified with an integer format (i, u, x, X, o, d) the 0 is ignored. Default is no padding.
Blank (' ') | Prefix the output value with a blank if the output value is signed and positive; the blank is ignored if both the blank and + flags appear. Default is no blank appears.
# | When used with the o, x, or X format, the # flag prefixes any nonzero output value with 0, 0x, or 0X, respectively. Default is no blank appears. When used with the e, E, or f format, the # flag forces the output value to contain a decimal point in all cases. Default is decimal point appears only if digits follow it. When used with the g or G format, the # flag forces the output value to contain a decimal point in all cases and prevents the truncation of trailing zeros. Default is decimal point appears only if digits follow it, and trailing zeros are truncated. Ignored when used with d, i, or u.

Width is a nonnegative decimal integer controlling the minimum number of characters printed. If the number of characters in the output value is less than the specified width, blanks are added to the left or the right of the values - depending on whether the - flag (for left alignment) is specified - until the minimum width is reached. If width is prefixed with 0, zeros are added until the minimum width is reached (not useful for left-aligned numbers). The width specification never causes a value to be truncated. If the number of characters in the output value is greater than the specified width, or if width is not given, all characters of the value are printed (subject to the precision specification).

Precision specifies a nonnegative decimal integer, preceded by a period (.), which specifies the number of characters to be printed, the number of decimal places, or the number of significant digits. Unlike the width specification, the precision specification can cause either truncation of the output value or rounding of a floating-point value. If precision is specified as 0 and the value to be converted is 0, the result is no characters output.

Type: d, i, u, o, x, X - The precision specifies the minimum number of digits to be printed. If the number of digits in the argument is less than precision, the output value is padded on the left with zeros. The value is not truncated when the number of digits exceeds precision. Default precision is 1.

Type: e, E - The precision specifies the number of digits to be printed after the decimal point. The last printed digit is rounded. Default precision is 6; if precision is 0 or the period (.) appears without a number following it, no decimal point is printed.

Type: f - The precision value specifies the number of digits after the decimal point. If a decimal point appears, at least one digit appears before it. The value is rounded to the appropriate number of digits. Default precision is 6; if precision is 0, or if the period (.) appears without a number following it, no decimal point is printed.

Type: g, G - The precision specifies the maximum number of significant digits printed. Six significant digits are printed, with any trailing zeros truncated.

where Type character is the only required format field; it appears after any optional format fields.

Character | Type | Output Format
d, i | int | Signed decimal integer.
o | int | Unsigned octal integer.
u | int | Unsigned decimal integer.
x | int | Unsigned hexadecimal integer, using "abcdef."
X | int | Unsigned hexadecimal integer, using "ABCDEF."
e | double | Signed value having the form [ – ]d.dddd e [sign]ddd where d is a single decimal digit, dddd is one or more decimal digits, ddd is exactly three decimal digits, and sign is + or –.
E | double | Identical to the e format except that E rather than e introduces the exponent.
f | double | Signed value having the form [ – ]dddd.dddd, where dddd is one or more decimal digits. The number of digits before the decimal point depends on the magnitude of the number, and the number of digits after the decimal point depends on the requested precision.
g | double | Signed value printed in f or e format, whichever is more compact for the given value and precision. The e format is used only when the exponent of the value is less than –4 or greater than or equal to the precision argument. Trailing zeros are truncated, and the decimal point appears only if one or more digits follow it.
G | double | Identical to the g format, except that E, rather than e, introduces the exponent (where appropriate).

SizePrefix is:

I - value being printed is an IntegerPtr

I32 - value being printed is an Integer

I64 - value being printed is an Integer64

For Integer values, the default format is "I32d"

v = 12611668 -- Integer

formattedPrint v

à "12611668"

For Integer64 values, the default format is "I64d"

v = 126116680000L -- Integer64

formattedPrint v

à "126116680000"

For IntegerPtr values, the default format is "Id"

v = 12611668P -- IntegerPtr

formattedPrint v

à "12611668"

EXAMPLE

formattedPrint pi

"3.1415927"

formattedPrint pi format:"0 g"

" 3.14159"

formattedPrint -pi format:"0 g"

"-3.14159"

formattedPrint pi format:"12.8g"

" 3.1415927"

formattedPrint yellow

"(color 255 255 0)"

m = matrix3 1

formattedPrint m

"(matrix3 [1,0,0] [0,1,0] [0,0,1])"

formattedPrint m format:"#g"

"(matrix3 [1.00000,0.000000,0.000000] [0.000000,1.00000,0.000000] [0.000000,0.000000,1.00000])"

formattedPrint 10 format:"#o"

"012"

formattedPrint 10 format:"#x"

"0xa"

formattedPrint v format:"19.18g"

" 1.2345678901234567"


Basic Data Values

Value > Basic Data Values

Number Values

String Values

Name Values

BooleanClass Values

Color Values

Point3 Values

Point2 Values

Ray Values

Quat Values

AngleAxis Values

EulerAngles Values

Matrix3 Values

BigMatrix Values

Box2 Values

BitArray Values

ArrayParameter Values


Number Values

Value > Basic Data Values > Number Values

Integer : Number
Float : Number

Three additional Number value classes are available in 3ds Max 9 and higher. Please see 64 Bit Values - Double, Integer64, IntegerPtr for details.

The Number class provides standard arithmetic capabilities to MAXScript. The Number types can be freely intermixed and MAXScript will convert as necessary. They support all the following operators and methods. Also see Number Literals .

Literals

[-]{<digit>}[.{<digit>}[(e | E)[+ | -]{<digit>}+] -- decimal number

0x{<hex_digit>}+ -- hexadecimal number

EXAMPLES

123

123.45

-0.00345

1.0e-6

0x0E

0xFFE0

.1

Operators

<number> + <number>

<number> - <number>

<number> * <number>

<number> / <number>

Standard arithmetic operations. If both numbers are integers, the result is a non-rounded integer. If one or both numbers are floats, both arguments are widened to floats and the result is a float.

<number> ^ <number>

Raise the first number to the power given by the second number. If the first number is an integer, the result is a rounded integer.

- <number>

unary minus

<number> == <number>

<number> != <number>

<number> > <number>

<number> < <number>

<number> >= <number>

<number> <= <number>

Standard number comparison operations.

<number> as <class>

Converts the number to an instance of the given class. Allowed classes are:

Float
Integer
String

Time (number taken as frames)
Double
Integer64

IntegerPtr

Methods

copy <number>

Creates a new copy of the number value. This method exists primarily to support copying arrays.

abs <number>

Returns the absolute value of the number. The result is the same type as the argument.

mod <number1> <number2>

Modulo arithmetic, the remainder when number1 is divided by number2. The result is always a float.

ceil <number>

Returns the nearest whole number greater than or equal to number. The result is always a float.

floor <number>

Returns the nearest whole number less than or equal to number. The result is always a float.

Trigonometric Functions

MAXScript supports the following standard trigonometric functions. Angles are represented in degrees. The result is always a float.

acos <number>

asin <number>

atan <number>

atan2 <number> <number>

cos <number>

cosh <number>

sin <number>

sinh <number>

tan <number>

tanh <number>

Transcendental Functions

MAXScript supports the following standard transcendental functions. The result is always a float.

exp <number>

log <number>

log10 <number>

pow <number> <number>

sqrt <number>

Random Value Methods

random <number> <number>

Returns a pseudo random number inclusively between the two arguments. Return value type is the type of the first argument.

seed <number>

Reseeds the random number generator using the specified value.

Angle Conversion Methods

degToRad <number>

Returns the conversion of the number from degrees to radians. The result is always a float.

radToDeg <number>

Returns the conversion of the number from radians to degrees. The result is always a float.

Float Close_Enough Method

close_enough <float> <float> <int>

Returns true if the two <float> values are approximately equal, where increasing values of <int> increase the range defined as appoximately equal. Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

A good value of <int> in most cases is 10.

EXAMPLE:

for d1 in #(1., 10., 100., 1000.) do

(

  print d1

  for i = 0 to 8 do

  (

   d2 = d1+(d1*10.^(-i))

   format "% : % : % : % : %\n" i d1 d2 (d1==d2) (close_enough d1 d2 10)

  )

)

RESULTS:

1.0

0 : 1.0 : 2 : false : false

1 : 1.0 : 1.100000024 : false : false

2 : 1.0 : 1.00999999 : false : false

3 : 1.0 : 1.001000047 : false : false

4 : 1.0 : 1.000100017 : false : false

5 : 1.0 : 1.000010014 : false : false

6 : 1.0 : 1.000000954 : false : true

7 : 1.0 : 1.000000119 : false : true

8 : 1.0 : 1 : true : true

10.0

0 : 10.0 : 20 : false : false

1 : 10.0 : 11 : false : false

2 : 10.0 : 10.10000038 : false : false

3 : 10.0 : 10.01000023 : false : false

4 : 10.0 : 10.0010004 : false : false

5 : 10.0 : 10.00010014 : false : false

6 : 10.0 : 10.00000954 : false : true

7 : 10.0 : 10.00000095 : false : true

8 : 10.0 : 10 : true : true

100.0

0 : 100.0 : 200 : false : false

1 : 100.0 : 110 : false : false

2 : 100.0 : 101 : false : false

3 : 100.0 : 100.0999985 : false : false

4 : 100.0 : 100.0100021 : false : false

5 : 100.0 : 100.0009995 : false : false

6 : 100.0 : 100.0000992 : false : true

7 : 100.0 : 100.0000076 : false : true

8 : 100.0 : 100 : true : true

1000.0

0 : 1000.0 : 2000 : false : false

1 : 1000.0 : 1100 : false : false

2 : 1000.0 : 1010 : false : false

3 : 1000.0 : 1001 : false : false

4 : 1000.0 : 1000.099976 : false : false

5 : 1000.0 : 1000.01001 : false : false

6 : 1000.0 : 1000.000977 : false : true

7 : 1000.0 : 1000.000122 : false : true

8 : 1000.0 : 1000 : true : true

OK

Bit Operation Methods

bit.and <integer1> <integer2>

Returns the <integer> result of AND-ing the bits in integer1 and integer2

bit.or <integer1> <integer2>

Returns the <integer> result of OR-ing the bits in integer1 and integer2

bit.xor <integer1> <integer2>

Returns the <integer> result of XOR-ing the bits in integer1 and integer2

bit.not <integer1>

Returns the <integer> result of flipping the bits in integer1

bit.shift <integer1> <integer2>

Returns the <integer> result of shifting the bits in integer1 by integer2 places. If integer2 is positive, the bits are shifted to the left, if negative, to the right. The highest order bit is not carried when shifting to the left (unsigned shift operation).

bit.set <integer1> <integer2> <boolean>

Returns an <integer> result where bit integer2 of integer1 is set to the specified boolean value. Bit 1 is the lowest order (least significant) bit.

bit.flip <integer1> <integer2>

Returns an <integer> result where bit integer2 of integer1 is flipped. Bit 1 is the lowest order (least significant) bit.

bit.get <integer1> <integer2>

Returns the <boolean> state of the integer2 bit of integer1. Bit 1 is the lowest order (least significant) bit.

bit.intAsChar <integer>

Returns a <string> result of length 1 containing the character corresponding to the integer value. Only the lowest order 8-bits (16-bits for localized versions of 3ds Max) of the integer are used.

bit.charAsInt <string>

Returns the <integer> value corresponding to the first character of the string.

bit.intAsHex <integer>

Returns a <string> value containing the hex representation of the integer.

bit.intAsFloat <integer>

Returns the integer value cast to a float value. Typically used for converting between integer and float values so that the remaining bit methods can be used on a float. Available in 3ds Max 8 and higher.

bit.floatAsInt <float>

Returns the float value cast to a integer value. Typically used for converting between integer and float values so that the remaining bit methods can be used on a float. Available in 3ds Max 8 and higher.

bit.swapBytes <integer> <integer byte1> <integer byte2>

Returns an integer with bytes byte1 and byte2 of value int swapped. Byte 1 is the lowest order byte. Available in 3ds Max 8 and higher.

bit.isNAN <float>

Returns true if the float is the reserved float value NaN (Not a Number). A NAN is generated when the result of a floating-point operation cannot be represented as a floating point number. An example of NAN is f = (1.0/0.0). Available in 3ds Max 8 and higher.

bit.isFinite <float>

Returns true if the float is any value other than NaN, negative infinity, or positive infinity. In those three cases, it returns false. Available in 3ds Max 8 and higher.

64 Bit Operation Methods in 3ds Max 9 and higher

bit.doubleAsInt64 <double>

Converts a Double value into an Integer64 value.

bit.int64AsDouble <int64>

Converts an Integer64 value into a Double value.

NOTES:

The range of valid Integers in MAXScript is -2,147,483,648 to 2,147,483,647. If you perform calculations that result in integers outside of this range, you will get integer overflow errors that are not detected by MAXScript. You must take care in designing your code to prevent or detect this overflow yourself. The result of an overflow is typically a large number of the wrong sign. Dividing an integer by 0 will result in a MAXScript system exception.

A Float in MAXScript has an absolute value range of is 1.18E-38 to 3.40E38, with a precision of one part in 1.0E7. If you perform calculations that result in floats with an absolute value less than this range, the result will be stored as 0.0. If you perform calculations that result in floats with an absolute value larger than this range, the result will be stored as a special value that represents infinity, 1.#INF. Adding, subtracting, or multiplying a number by 1.#INF results in a value of 1.#INF. Dividing a number by 1.#INF results in a value of 0.0. Dividing 0.0 by 0.0 or 1.#INF by 1.#INF, multiplying 1.#INF by 0, or 1.#INF from 1.#INF results in a special value that represents an indeterminate number, -1.#IND. Adding, subtracting, multiplying, or dividing a number by -1.#IND results in a value of -1.#IND.

When you display or print a Float, MAXScript prints the value to the 6th significant digit. The following table shows examples of values stored to a MAXScript variable, the value as stored, and the value as displayed.

Input Value | Stored Value | Displayed Value
1.23456789 | 1.23456788 | 1.23457
1.1 | 1.10000002 | 1.1
1.01 | 1.00999999 | 1.01
1.001 | 1.00100004 | 1.001
1.0001 | 1.00010001 | 1.0001
1.00001 | 1.00001001 | 1.00001
1.000001 | 1.00000095 | 1.0
1.0000001 | 1.00000011 | 1.0
1.00000001 | 1.00000000 | 1.0
100017.911 | 100017.914 | 100018.0

EXAMPLES

The following script shows the use of various literals, constructors, properties, operators, and methods of the Number class.

-- numbers test bed

i=10 -- assign integers to variables

j=20

i/j -- integer divide, result is integer

i=i as float -- convert i to a float

i/j -- float divide, result is float

i += 1 -- increment i by 1

if i < j do i=2.^3 -- if i is less than j, set i to 2 to the 3rd power

mod j i -- return remainder of j divided by i

cos 30.0 -- return cosine of 30 degrees

sqrt j -- return square root of j

seed 12345 -- seed the random number generator

for k=1 to 5 do print (random i j) -- print out 3 random numbers

OUTPUT:

10 -- result of line 2

20 -- result of line 3

0 -- result of line 4 (10/20)

10.0 -- result of line 5

0.5 -- result of line 6 (10./20)

11.0 -- result of line 7

8.0 -- result of line 8 (2.^3)

4.0 -- result of line 9

0.866025 -- result of line 10

4.47214 -- result of line 11 (sqrt 20)

OK -- result of line 12

10.7775 -- output from line 13 (random 8. 20)

15.0183

17.4467

16.1027

10.1344

OK -- result of line 13

See also

64 Bit Values - Double, Integer64, IntegerPtr


64 Bit Values - Double, Integer64, IntegerPtr

Value > Basic Data Values > Number Values > 64 Bit Values

Double : Number
Integer64 : Number
IntegerPtr: Number

Three Number value classes have been added to MAXScript in 3ds Max 9: Double, Integer64 and IntegerPtr.

  • The widest float value in the .NET Common Type System (CTS) is the System::Double, which corresponds to the C++ double value (real*8). The Double value class in MAXScript wraps the double value class.

  • All generic mathematical methods and operations (sin, cos, random, +, -, etc.) that operate on the Float value class in MAXScript are also implemented on the Double class.

  • The Double class supports the 'bit' structure methods in a manner similar to the Float class.

  • The Double class is a MAXScript saveable class - in other words, it can be used in persistent globals.

  • The data type convertors for ActiveX, OLE, and fileProperties.getPropertyValue/ setPropertyValue will convert variant VT_R8 to Doubles, and vice versa.

  • For methods that expect a Float as an argument, the Double value will be cast to a Float value and used.

  • Double literals are indicated by 'd' exponential qualifier.

FOR EXAMPLE:

1.0d0

0.5 as Double à 0.5d0

  • 'bit' structure methods that operate on an Integer can also operate on Integer64 and IntegerPtr. For methods that take 2 integer arguments, the first argument determines the output value type.

  • bit.intAsHex will append an "L" to the output string for Integer64 inputs, and a "P" for IntegerPtr inputs.

  • bit.hexAsInt will output a Integer64 in the input string contains an "L", a IntegerPtr if it contains a "P".

  • String and Stringstream values can be coerced to Double, Integer64 and IntegerPtr.

  • All number data types (Integer, Float, Integer64, IntegerPtr, Double) and Time can be coerced from one to the other.

  • For loop variables are either Integer, Float, Integer64, IntegerPtr, or Double based on the widest value type for the to, from, and step values

Related Methods:

is64bitApplication()

In 3ds Max 9 and higher, returns true if running in a 64 bit build of 3ds Max, false otherwise.

See also

Number Values


String Values

Value > Basic Data Values > String Values

The String class defines the characteristics of character strings. The character strings can be of any length.

Literal

"<characters>"

See String Literals for a description of String literals.

Constructors

<value> as string

Converts any value into its string representation.

Properties

<string>.count : Integer, read-only

The number of characters in the string.

Operators

<string> + <string>

Returns a new string that is the concatenation of the two strings.

<string> == <string>

<string> != <string>

<string> > <string>

<string> < <string>

<string> >= <string>

<string> <= <string>

Standard lexical string comparisons (case sensitive). To perform a case insensitive comparison, first convert the strings to Name values.

<string>[<index_number>]

Returns indexed character as a single-character string, index starts at 1.

<string>[<index_number>] = <single_character_string>

Sets indexed character to character given.

<string> as <class>

Converts the string to an instance of the given class. You can convert a string into a Name value using the as operator,

FOR EXAMPLE

"Foo" as name -- returns #foo

You can also convert strings to numbers using the as operator.

FOR EXAMPLE

"123.4" as float -- returns 123.4

You can use any of the Number classes as a target class - Number, Float, or Integer. If you use Number, the appropriate class will be used depending on the syntax of the number in the string.

You can convert a string to a StringStream value using the as operator.

FOR EXAMPLE

"$box01" as stringstream -- returns the string as a stringstream

Converting a string to a StringStream value allows you to read through a string using the MAXScript's text file I/O operations. See StringStream Values for a description of StringStreams.

Methods

<string>copy <string>

Creates a new copy of the string value and returns it.

FOR EXAMPLE

newstr = copy oldstr

The new value contains a copy of the text contents of the copied string, and is independent of the copied string.

execute <string>

Compiles and evaluates the contents of the string as a MAXScript expression and returns the result of the evaluation.

FOR EXAMPLE

execute "2 + 2" -- yields the value 4

str = "$foo.ffd_2x2x2.control_point_" +

n as string + " = [1,1,1]"

execute str

The result of an execute() call is the result of the last expression in the string argument.

You can use execute() to access object using a computed name.

FOR EXAMPLE

obj = execute ("$foo/" + child_name)

would retrieve the child of $foo named in the variable child_name.

Here's a more complex example:

EXAMPLE

side = "left"

finger = 2

limb = "arm"

obj = execute ("$torso/" + limb + "/" +

side + "/finger/" +

finger as string)

The scope of variables used in the evaluated string is global and not the scope in effect when the execute() method is executed. So if you call execute() within a function, scripted utility, or anywhere where the scope is not global, you will need to explicitly specify the scope of any variables used in the string that is executed. In the following example, the scope of variable posObj is local to utility myUtil, so the string needs to specify the variable’s name as being in myUtil’s scope:

EXAMPLE

Utility myUtil "My Utility"

(

local posObj

fn test obj =

(

local i, j, thisCont

thisCont=execute ("myUtil.posObj.'"+j+"'pos.controller")

)

)

In general, you cannot access locals from outside of an object, except for top-level locals in rollouts, utilities, tools and plug-ins (because they are semi-permanent and are stored with these objects). Function parameters and locals are dynamic and stack-based and not accessible as properties of the function definition.

For more information on variable scope, see Scope of Variables and Accessing Locals and Other Items in a Rollout from External Code .

<Point2>GetTextExtent <string>

Returns a Point2 value containing the size of the string in pixels if it was displayed in a command panel.

<integer>findString <string> <search_string>

Returns the index of search_string in string or undefined if not found.

EXAMPLE

findString "Thanks for all the fish!" "all" -- returns 12

<array of strings>filterString <string> <token_string> [splitEmptyTokens:<boolean>]

Parses string based on token_string and returns an array of strings. filterString splits the input string into substrings based on the characters given in token_string, and returns each substring as a member of the array. The token_string is simply a list of 'splitter characters' - when the string is scanned, any occurrence of any of the tokens is regarded as the start of a substring. This function is useful for file import/export scripts, or for any type of manual parsing.

FOR EXAMPLE

filterString "MAX Script, is-dead-funky" ", -"

WOULD RETURN

#("MAX","Script","is","dead","funky")

If splitEmptyTokens is false or not specified, sequential tokens are handled as a single token, and tokens at the beginning or end of the string are ignored. If splitEmptyTokens is true, each token found will result in string element in the output, with the string element in the cases ignored above being empty strings. Available in 3ds Max 8 and higher.

FOR EXAMPLE

s = "One\t\tThree\tFour"

tokens = filterString s "\t"

#("One", "Three", "Four")

tokens = filterString s "\t" splitEmptyTokens:true

#("One", "", "Three", "Four")

s = "\t\t\tOne\t\t\tThree\tFour\t\t\t"

tokens = filterString s "\t"

#("One", "Three", "Four")

tokens = filterString s "\t" splitEmptyTokens:true

#("", "", "", "One", "", "", "Three", "Four", "", "", "")

<string>replace <string> <from_integer> <length_integer> <new_string>

Returns a new string where the substring in string starting at index from_integer, and of length length_integer, is replaced with the new_string. new_string can be any length. The sum of from_integer and length_integer must be less than the length of string.

FOR EXAMPLE

s="1234567890"

s1=replace s 5 3 "inserted string"

RETURNS:

"1234inserted string890"

<string>substring <string> <from_integer> <length_integer>

Returns a new string consisting of the substring in string starting at index from_integer, and of length length_integer. If the sum of from_integer and length_integer is greater than the length of string, a shorter string is returned containing as many characters as are available in the source. If a negative value is specified for length_integer, the remainder of the string starting from from_integer is returned.

FOR EXAMPLE

s = "Balerofon"

ss = substring s 5 3 -- returns "rof"

ss = substring s 5 -1 -- returns "rofon"

ss = substring s 5 100 -- returns "rofon"

<bool>matchPattern <string> pattern:<pattern_string> [ignoreCase:<boolean>]

Returns true if string is matched by the wild card pattern_string, false otherwise. The comparison is case-insensitive unless ignoreCase:false is specified.

NOTE:

matchPattern executes much faster than findString and should be used instead when possible.

FOR EXAMPLE

s= "text1"

matchPattern s pattern:"text?" -- returns true

matchPattern s pattern:"T*" -- returns true

matchPattern s pattern:"T*" ignoreCase:false -- returns false

matchPattern s pattern:"s*" -- returns false

<string>append <string1> <string2>

Appends string2 to string1. Operates on string1 in place, and returns string1 as its result.

NOTE:

that since this method operates on string1 in place, after running the following code snippet, both s1 and s2 will continue to point to the same string value:

s1 = "aa"

s2 = s1

append s1 "bb"

s1 -- returns "aabb"

s2 -- returns "aabb" and not "aa"

Append would typically be used when incrementally building a large string from many small strings. Since the string is operated on in place, memory usage may be significantly reduced since intermediate string values will not remain in memory until the next garbage collection.

<integer>stricmp <string1> <string2>

In 3ds Max 6 and higher, this method performs a lower case comparison of string1 and string2. Returns an integer value < 0 if string1 is less than string 2, = 0 if string1 is identical to string 2, and > 1 if string1 is greater than string 2.

toUpper <string>

Returns a new string value with the string converted to upper case. Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

FOR EXAMPLE

toUpper "so long and thanks for all the scripts"

RESULT:

"SO LONG AND THANKS FOR ALL THE SCRIPTS"

toLower <string>

Returns a new string value with the string converted to lower case. Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

FOR EXAMPLE

toLower "Life, The Universe And Everything"

RESULT:

"life, the universe and everything"

substituteString <source_string> <from_string> <to_string>

Returns a new string with all occurrences of from_string in source_string replaced with to_string. Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

FOR EXAMPLE

s1 = "Truth, Justice And The American Way"

s2 = "The American Way"

s3 = "All That Stuff"

substituteString s1 s2 s3

RESULT:

"Truth, Justice And All That Stuff"

replace_LF_with_CRLF <string>

Returns a new string where line feeds in input string are replaced with carriage return/line feed, unless the character preceeding the line feed is a carriage return. Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

replace_CRLF_with_LF <string>

Returns a new string where carriage return/line feeds in input string are replaced with line feeds. Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

The following script shows the use of various literals, constructors, properties, operators, and methods of the String class.

EXAMPLE

-- strings test bed

fn uppercase instring = -- beginning of function definition

( local upper, lower, outstring -- declare variables as local

upper="ABCDEFGHIJKLMNOPQRSTUVWXYZ" -- set variables to literals

lower="abcdefghijklmnopqrstuvwxyz"

-- create an unique copy of the string referenced by instring,

-- and store reference to unique copy in outstring

outstring=copy instring

-- increment from 1 to number of character in string

for i=1 to outstring.count do

-- see if the single character at index i in outstring

-- is present in string lower

-- If so, j equals position in string lower.

-- If not, j equals undefined

( j=findString lower outstring[i]

-- if character was found in lower,

-- replace with corresponding character in upper:

if (j != undefined) do outstring[i]=upper[j]

)

outstring -- value will be returned as function result

) -- end of fn uppercase

s1="AbCdEfGh" -- set variable to literal

s2=uppercase s1 -- call function uppercase, passing s1 as parameter

if s1 == s2 do print "strings s2 and s3 are the same" -- compare strings

if s1 != s2 do print "strings s1 and s2 are different"

theObject="sphere" -- set variable to literal

theRadius= (random 10. 100.) as string -- convert number to string

-- concatenate strings and execute string

myObject=execute (theObject + " radius:" + theRadius)

OUTPUT:

uppercase() -- result to function definition

"AbCdEfGh" -- result of line 24

"ABCDEFGH" -- result of line 25

undefined -- result of line 26 - strings not equal,

-- and no else expression in if expression

"strings s1 and s2 are different" -- output from line 27

"strings s1 and s2 are different" -- result of line 27

"sphere" -- result of line 29

"75.4091" -- result of line 30

$Sphere:Sphere01 @ [0.0,0.0,0.0] -- result of line 32. Execute function

-- created a sphere object


Name Values

Value > Basic Data Values > Name Values

The Name class defines the characteristics of names. Names are primarily used as parameters in function calls to signify one of a set of options.

Literal

#<var_name>

See Names for a description of Name literals.

Constructors

<string> as name

Converts a String value into a name

Operators

<name> == <name>

<name> != <name>

<name> < <name>

<name> > <name>

<name> <= <name>

<name> >= <name>

Comparison of names is caseless alphabetic. Among other things, this allows arrays of names to be sorted using the array sort function.

Methods

copy <name>

Creates a new copy of the name value.

The following script shows the use of various literals, constructors, and operators of the Name class.

SCRIPT

-- name test bed

name1=#Hello -- set variable to name literal

name2="HELLO" as name -- convert string to name

if name1 == name2 do print "names are equal" -- compare the names

box_props=getpropnames box -- get the properties of box class

sort box_props -- sort the property names

OUTPUT:

#Hello -- result of line 2

#Hello -- result of line 3

"names are equal" -- output from line 4

"names are equal" -- result of line 4

-- following are the results of lines 5 and 6

#(#height, #length, #lengthsegs, #width, #widthsegs, #mapCoords, #heightsegs)

#(#height, #heightsegs, #length, #lengthsegs, #mapCoords, #width, #widthsegs)


BooleanClass Values

Value > Basic Data Values > BooleanClass Values

The BooleanClass class defines the characteristics of values that can only have one of two states.

Literals

true

false

on -- equivalent to true

off -- equivalent to false

"true" as booleanClass

"false" as booleanClass

"on" as booleanClass

"off" as booleanClass

Operators

not <boolean>

true if boolean=false, false if boolean=true

<boolean> and <boolean>

true if both boolean values are true

<boolean> or <boolean>

true if either boolean value is true

NOTES:

The boolean and and or evaluations are non-strict. This means that only the first boolean may be evaluated to determine the overall result:

  • If the first operand is false in an and expression, the result must be false, therefore, the second operand is not evaluated.

  • If the first operand is true in an or expression, the result must be true, therefore, the second operand is not evaluated.

This saves execution time and enables useful shorthand notation. For example, if you want to calculate 'sin a' if the value of variable 'a' isn’t undefined, you could use the example below:

if a != undefined and sin a > 0 then ...

The following script shows the use of various literals and operators of the BooleanClass class.

SCRIPT:

-- boolean test bed

bool1=true -- set variables to boolean literals

bool2=on

if bool1 and bool2 do print "booleans are equal" -- compare the booleans

-- define an "exclusive or" function

-- returns true if only one of the

-- inputs is true

fn xor b1 b2 = (not (b1 and b2)) and (b1 or b2)

xor false false -- evaluate 4 combinations of inputs to xor

xor false true

xor true false

xor true true

OUTPUT:

true -- result of line 2

true -- result of line 3

"booleans are equal" -- output from line 4

"booleans are equal" -- result of line 4

xor() -- function definition

false -- result of line 8

true -- result of line 9

true -- result of line 10

false -- result of line 11


Color Values

Value > Basic Data Values > Color Values

All the places that colors turn up in MAXScript (such as wireColor, light color, etc.) are represented by instances of the Color class. You can also use Point3 values to specify colors.

Literals

red

green

blue

white

black

orange

yellow

brown

gray

Predefined MAXScript globals .

Constructors

color <r> <g> <b> [ <a> ]

r,g,b and optional alpha are float values, typically in the range 0 to 255.

<point3> as color

Interprets x as r, y as g, z as b. Alpha is assumed opaque (255).

Properties

<color>.red or .r : Float

<color>.green or .g : Float

<color>.blue or .b : Float

<color>.alpha or .a : Float

Color component properties

<color>.hue or .h : Float

<color>.saturation or .s : Float

<color>.value or .v : Float

Derived properties

Operators

<color> == <color>

<color> != <color>

<color> + <color_or_number>

<color> - <color_or_number>

<color> * <color_or_number>

<color> / <color_or_number>

Channel-by-channel math operations. Numbers operate on R, G, B and A channels equally.

- <color>

unary minus

IMPORTANT NOTES ON COLOR OPERATIONS:

The addition and subtraction operations are performed on the R, G, B and A channels equally:

aColor = color 1 1 1

à (color 1 1 1)
aColor + aColor

à (color 2 2 2 510)

The high Alpha value is caused by the fact that MAXScript does not print the Alpha value if it is 255, but internally the value of the variable aColor is (color 1 1 1 255). Thus, adding the Alpha channels of 255 to 255 produces an Alpha of 512, analogous to the R,G and B channels.

While the Color Values allow floating point components, when originally implemented in 3ds Max 2, it was assumed that they would be used mainly for 8 bit per channel RGBA values because MAXScript did not support floating point color bitmaps at that point in time. An internal conversion is performed when printing color values or converting other values to color.

Thus, multiplication of two color values leads to seemingly strange results:

aColor = color 1 1 1

aColor * aColor

à (color 0.00392157 0.00392157 0.00392157)

aColor * [1,1,1]

à (color 0.00392157 0.00392157 0.00392157)

aColor = color 128 128 128

aColor * aColor

à (color 64.251 64.251 64.251)

The reason for these results when multiplying color values is that the actual component values are float values normally in the range 0 to 1.

The scaling from 0-1 to 0-255 is an operation MAXScript performs to the underlying color value when the value is printed or converted to some other value type.

A gray value of 128 multiplied by a gray value of 128 is not really 128*128 = 16384, which is a blown out white, but

(128/255.0 * 128/255.0)*255 or (.501961*.501961)*255

which is the DARKER shade of gray (color 64.251 64.251 64.251)

So when (color 1 1 1 255) is converted to components in the range from 0 to 1, it also results in RGB components of (1.0/255*1.0/255)*255 = 0.00392157, while the Alpha of 255 turns into 1.0 and then back into 255.

Thus, the Color Value is not well suited for High Dynamic Range Image calculations with floating point color components.

For that type of operations, MAXScript provides a Point4 value which can be used to represent floating point colors without implicit conversion from/to the 0-255 range. This value was introduced in 3ds Max 6 to support the color parameters of mental ray shaders.

Methods

copy <color>

Creates a new copy of the color value.

FOR EXAMPLE:

newClr = copy oldClr

The new value contains a copy of the input color value, and is independent of the input color value.

random <from_color> <to_color>

Returns a random color between the given colors. The alpha component of the result will always be 255.

composite <color1> <color2>

Composites color1 over color2 through color1's alpha. This function is equivalent to:

FOR EXAMPLE:

color1 + color2*((255. - color1.alpha)/255.)

3D Noise Functions

noise3 <color>

noise4 <color> <phase_float>

turbulence <color> <frequency_float>

fractalNoise <color> <H_float> <lacunarity_float> <octaves_float>

See Point3 Values for a description of the noise functions.

NOTE:

The component values of a Color value (r, g, b, and a) are normally in the range 0.0 to 255.0. However values outside this range are permissible. When color values outside the normal range are used in 3ds Max, 3ds Max clamps the values to the range of 0.0 to 255.0.

The following script shows the use of various literals, constructors, properties, operators, and methods of the Color class.

SCRIPT

-- color test bed

magenta=color 255 255 0 255 -- create colors using constructors

aqua = [0, 255, 255] as color

aqua.v /= 2. -- reduce "strength" of aqua color

aqua

aqua.alpha=128 -- set aqua to 50% opacity

aqua

lightGray=white/4 -- create light gray color by dividing

-- each component of white by 4

composite aqua lightGray -- composite light gray over aqua

random black white -- generate a random color

OUTPUT:

(color 255 255 0) -- result of line 2. Note that if

-- alpha=255 it is not displayed

(color 0 255 255) -- result of line 3

127.5 -- result of line 4 - value property of aqua

(color 0 127.5 127.5) -- result of line 5 - color of aqua

128 -- result of line 6 - alpha property of aqua

(color 0 127.5 127.5,128) -- result of line 7 - color of aqua

(color 63.75 63.75 63.75) -- result of line 8 - each component divided by 4

(color 31.75 159.25 159.25 159.75) -- result of line 10

(color 170.944 109.543 74.1957) -- result of line 11


Point3 Values

Value > Basic Data Values > Point3 Values

The Point3 class defines the characteristics of points in 3D space. These values are also known as 3D vectors , and contain 3 component floating point numbers. All the coordinates passed to and from 3ds Max are in these values. See also 2D and 3D Point Literals .

Literals

[ <expr>, <expr>, <expr> ]

EXAMPLES

[x, y, z]

[10, 10, 10]

[sin x, cos y, tan z]

x_axis -- equivalent to [1,0,0]

y_axis -- equivalent to [0,1,0]

z_axis -- equivalent to [0,0,1]

Constructors

point3 <x> <y> <z>

<color> as point3

Properties

<point3>.x : Float -- the x coordinate

<point3>.y : Float -- the y coordinate

<point3>.z : Float -- the z coordinate

Operators

<point3> == <point3>

<point3> != <point3>

<point3> + <point3_or_number>

<point3> - <point3_or_number>

<point3> * <point3_or_number>

<point3> / <point3_or_number>

Standard vector arithmetic. If the second operand is a number, the operation is performed on each component of the value.

<point3> * <matrix3>

Transforms point3 into the coordinate system specified by matrix3.

<point3> * <quat>

rotates point3

- <point3>

unary minus

<point3>[<integer>]

Returns a component of the Point3 as a float. Valid range on the index is 1 to 3.

<point3>[<integer>] = <float>

Sets a component of the Point3 to the float. Valid range on the index is 1 to 3.

Methods

copy <point3>

Creates a new copy of the point3 value.

FOR EXAMPLE

newPos = copy oldPos

The new value contains a copy of the input point3 value, and is independent of the input point3 value.

Vector Length

length <point3>

Returns the length of the vector.

Vector Dot Product

dot <point3> <point3>

Returns the vector dot product.

The geometric interpretation of the dot product is the length of the projection of the first vector onto the unit vector of the second vector. Obviously, when the two vectors are perpendicular, the dot product is 0.0.

The dot product is commutative, this means that dot X Y == dot Y X.

The dot product is associative, this means that dot (r*X) Y == r*(dot X Y)

The dot product is distributive, this means that dot X (Y+Z) == (dot X Y) + (dot X Z)

Since the dot product of two normal vectors is the cosine of the angle between them, the dot product can be used conveniently to calculate the angle between two vectors:

FOR EXAMPLE

fn GetVectorsAngle v1 v2 =

(

theAngle = acos(dot (normalize v1) (normalize v2))

)

GetVectorsAngle [10,0,0] [10,20,0]

63.435

Vector Cross Product

cross <point3> <point3>

Returns the vector cross product.

The cross product is a third vector which is always perpendicular to the plane defined by the two vectors, with orientation determined by the right-hand rule.

The cross product can be expressed as the length of the first vector multiplied by the length of the second vector, multiplied by the sine of the angle between the two vectors. Because of this, the cross product of parallel vectors is 0.0 (since sin 0.0 == 0.0)

The cross product is also equal to the Area of the parallelogram formed by the two vectors. Obviously, if the two vectors are edges of a face, the cross product is the normal vector to that face (a vector perpendicular to the face) with length equal to the Area of the face multiplied by 2.

The cross product is anticommutative, this means that cross X Y == cross -Y X

The cross product is associative, this means that cross (r*X) Y == r*(cross X Y)

The cross product is distributive, this means that cross X (Y+Z) == (cross X Y) + (cross X Z)

SEE EXAMPLE IN THE MAXSCRIPT FAQ:

How do I align the UVW_Modifier's Gizmo to a selected face?

Normalize Vector

normalize <point3>

Returns the point3 value normalized such that the vector length equals 1.

FOR EXAMPLE

b = [100,30.5,41.3] -- take some Point3 value

[100,30.5,41.3]

normalB1 =normalize b -- get the normalized vector

[0.889603,0.271329,0.367406]

length normalB1 -- check the length, should be 1.0

1.0 -- It is!

normalB2 = b / (length b) -- Do-It-Yourself Normalize...

[0.889603,0.271329,0.367406] -- same value

length normalB2 -- of course, the length is also 1.0

1.0

Distance Between Two Points / Vectors

distance <point3> <point3>

Returns the distance between the points, equivalent to the length of (point 2 - point 1).

FOR EXAMPLE

a = [10,20,30]

b = [100,30.5,41.3]

distance a b -- returns 91.3123

distance b a -- returns 91.3123

length (b-a) -- returns 91.3123

length (a-b) -- returns 91.3123

Pseudo-Random Point / Vector

random <point3> <point3>

Generates a pseudo-random point between the given points.
If point A and point B are seen as the corners of a world-oriented bounding box, the random points will NOT reside on the vector B-A but will fill in the volume of the bounding box!

FOR EXAMPLE

a = [-10,-20,-30] -- define point A

b = [20,30,50] -- define point B

p1 = Point pos:a -- create a Point Helper at point A

p2 = Point pos:b -- create a Point Helper at point B

-- create 2000 spheres at random positions between point A and B

for i = 1 to 2000 do

 sphere pos:(random a b) radius:2 wirecolor:blue

Arbitrary Axis Matrix

arbAxis <point3>

Returns a Matrix3 value representing an arbitrary axis system using point3 as the "up" direction.

Matrix From Normal

matrixFromNormal <point3>

Returns a Matrix3 value with the normal specified by the given point as the Z axis. The translation portion of the Matrix3 value will be [0,0,0]. The components of the scale portion are the inverse of the values required to normalize the point3 value.

See How Do I Get the Local Rotation of a Face? for an example.

FOR EXAMPLE

MatrixFromNormal [0,0,1]

MatrixFromNormal [0,1,1]

will return

(matrix3 [1,0,0], [0,1,0], [0,0,1], [0,0,0])

(matrix3 [0,-0.707107,0.707107] [1.41421,0,0] [0,1,1] [0,0,0])

3D Noise Functions

noise3 <point3>

A floating point noise function over 3D space, implemented by a pseudo-random tricubic spline. The return value is in the range -1.0 to +1.0. Given the same point3 value, the noise3() function always returns the same value.

noise4 <point3> <phase_float>

The same function as noise3 in which the phase can be varied using the second parameter. The return value is in the range -1.0 to +1.0.

turbulence <point3> <frequency_float>

This is a simple fractal-loop turbulence built on top of the noise3 function. The second parameter controls the frequency of the turbulence. The return value is in the range 0.0 to +1.0.

fractalNoise <point3> <H_float> <lacunarity_float> <octaves_float>

This is a fractal function of 3D space implemented using fractional Brownian motion. The function is homogeneous and isotropic. It returns a float.

The parameters are as follows:

point3 - The point in space at which the noise is computed.

H_float - The fractal increment parameter in the range [0,1]. When H_float is 1 the function is relatively smooth; as H_float goes to 0, the function approaches white noise.

lacunarity_float - The gap between successive frequencies, best set at 2.0.

octaves_float - The number of frequencies in the function.

All the noise functions are based on code and algorithms in the book "Texturing and Modeling: A Procedural Approach", Musgrave, Peachey, Perlin and Worley. Academic Press, ISBN: 0-12-228760-6.

The following script shows the use of various literals, constructors, properties, operators, and methods of the Point3 class.

The following script was written as a test bed for the noise functions. This script displays a 2 dimensional slice of the noise function output as a bitmap. By changing the noise parameters in lines 4 through 10, and specifying which noise function to evaluate in line 12, you can see the effects of changes in the parameters and using different noise functions.

SCRIPT

-- noise functions test bed

b_width=320 -- specify size of bitmap

b_height=320

size=10. -- total distance covered by each row and column

z=0. -- z coordinate of 2D slice

phase=0.5 -- noise4 parameter

frequency=10. -- turbulence parameter

fract_interval=.5 -- fractalNoise parameters

lacunarity=2.

octaves=5

--

whichfunc=1 -- 1 = noise3; 2 = noise4; 3 = turbulence; 4 = fractalNoise

--

b=bitmap b_width b_height -- create the bitmap

for h=0 to (b_height-1) do -- step through each row of the bitmap

(

h_norm=(h as float/(b_height-1))*size -- calculate y coordinate

row = for w=0 to (b_width-1) collect -- collect row of pixel colors

(

w_norm=(w as float/(b_width-1))*size -- calculate x coordinate

noise_val = case whichfunc of -- store result of selected function

(

1: noise3 [w_norm, h_norm , z]

2: noise4 [w_norm, h_norm , z] phase

3: turbulence [w_norm, h_norm , z] frequency

4: fractalNoise [w_norm, h_norm , z] fract_interval lacunarity octaves

)

noise_val = 0.5*(1.+noise_val) -- convert output range to 0. to 1.

white*noise_val -- and multiply by color white

)

setpixels b [0,h] row -- store row of pixels in bitmap

)

display b -- display bitmap in VFB

OUTPUT

The following figures show the bitmap generated by the above script for each noise function type.

noise3

noise4

turbulence

fractalNoise


Point2 Values

Value > Basic Data Values > Point2 Values

The Point2 class defines the characteristics of points in 2D space. This class is a 2D version of Point3 and is used in utility rollout positioning parameters and for accessing Bitmap values, etc. See also 2D and 3D Point Literals .

Literals

[ <expr>, <expr> ]

EXAMPLES

[x, y]

[10, 20]

[sin x, cos x]

Constructors

point2 <x> <y> -- x and y are numbers

<point3> as point2 -- created from the x and y components of the point3

Properties

<point2>.x : Float

<point2>.y : Float

Operators

<point2> == <point2>

<point2> != <point2>

<point2> + <point2_or_number>

<point2> - <point2_or_number>

<point2> * <point2_or_number>

<point2> / <point2_or_number>

Standard vector arithmetic. If the second operand is a number it does scalar arithmetic on vector.

- <point2>

unary minus

<point2>[<integer>]

Returns a component of the Point2 as a float. Valid range on the index is 1 to 2.

<point2>[<integer>] = <float>

Sets a component of the Point2 to the float. Valid range on the index is 1 to 2.

Methods

copy <point2>

Creates a new copy of the point2 value. For example:

newPoint = copy oldPoint

The new value contains a copy of the input point2 value, and is independent of the input point2 value.

random <point2> <point2>

Generates a pseudo-random point between the given points.

length <point2>

Returns the length of the vector.

distance <point2> <point2>

Returns the distance between the points - length of (point 2 - point 1).

normalize <point2>

Returns the point2 value normalized such that the vector length equals 1.


Point4 Values

Value > Basic Data Values > Point4 Values

The Point4 class defines the characteristics of points in 4D space (for example RGBA space). These values contain 4 component floating point numbers and can be used to express floating point color values where the components are the Red, Green, Blue and Alpha values.

This value class was first introduced in 3ds Max 6 to accommodate floating point colors required by the mental ray renderer. Several Point4 controllers were also introduced to store animation of parameters containing Point4 values.

Literals

[ <expr>, <expr>, <expr>, <expr> ]

Constructors

point4 <x> <y> <z> <w>

<color> as point4

Properties

<point3>.x : Float -- the x component

<point3>.y : Float -- the y component

<point3>.z : Float -- the z component

<point3>.w : Float -- the w component

Operators

<point4> == <point4>

<point4> != <point4>

<point4> + <point4_or_number>

<point4> - <point4_or_number>

<point4> * <point4_or_number>

<point4> / <point4_or_number>

Standard vector arithmetic. If the second operand is a number, the operation is performed on each component of the value.

- <point4>

unary minus

<point4>[<integer>]

Returns a component of the Point4 as a float. Valid range on the index is 1 to 4.

<point3>[<integer>] = <float>

Sets a component of the Point4 to the float. Valid range on the index is 1 to 4.

Methods

copy <point3>

Creates a new copy of the point3 value.

The new value contains a copy of the input Point4 value, and is independent of the input point4 value.

FOR EXAMPLE

oldValue = Point4 1.0 2.0 3.0 4.0 --define a Point4 value

à [1,2,3,4]

newValue1 = copy oldValue --create a copy of the value

à [1,2,3,4]

newValue2 = oldValue --variable b points at the same value!

à [1,2,3,4]

newValue2.x = 10.0 --set the x component of the instance to 10

à 10.0

newValue2 --see the result

à [10,2,3,4]

oldValue --note that the original value was also changed!

à [10,2,3,4]

newValue1 --but the copy was independent and did not change!

à [1,2,3,4]

random <point4> <point4>

Generates a pseudo-random point between the given points.

length <point4>

Returns the length of the 4D vector.

distance <point4> <point4>

Returns the distance between the points in 4D space.

normalize <point4>

Returns the point4 value normalized such that the 4D vector length equals 1.


Ray Values

Value > Basic Data Values > Ray Values

The Ray class defines the characteristics of a ray in 3D space. A ray has two Point3 components, one defining a start position and the other a direction vector for the ray.

Constructors

ray <pos_point3> <dir_point3>

Returns a new ray with given position and direction vector.

<node> as ray

Takes a scene object that has a target, such as a tape measure or a target camera and returns a ray from the object to the target. Returns undefined if the object has no target.

Properties

<ray>.pos : Float

<ray>.position : Float -- pos and position are synonyms

<ray>.dir : Point3 -- unit normalized direction vector

Methods

copy <ray>

Creates a new copy of the ray value.

FOR EXAMPLE

newRay = copy oldRay

The new value contains a copy of the input ray value, and is independent of the input ray value.


Quat Values

Value > Basic Data Values > Quat Values

The Quat class provides a compact representation for orientation in three space and provides methods to perform Quaternion algebra. Quaternions are used to store object rotations in 3ds Max. A quaternion is made up of four terms: a real scalar part which specifies the amount of rotation and an imaginary vector part which defines the axis of rotation. If the quaternion is normalized, the scalar term equals the cosine of half the angle of rotation, the vector term is the axis of rotation, and the magnitude of the vector term equals the sine of half the angle of rotation.

Interpolation between two key frame orientations is much easier using quaternions and produces smooth and natural motion. Unlike Euler angles, no numerical integration is necessary; quaternions provide an analytic result (no approximations).

Rotations in MAXScript follow the right-hand-rule, namely positive angles rotate counter-clockwise about positive axes, consistent with the convention in the 3ds Max UI.

Constructors

quat <x_float> <y_float> <z_float> <w_float>

The x, y, z values make up the vector portion. w is the angle of rotation about the vector.

quat <degrees_float> <axis_point3>

<angleaxis> as quat

<eulerangle> as quat

<matrix3> as quat -- extracts the rotation component as a quat

Properties

<quat>.w : Float

<quat>.x : Float

<quat>.y : Float

<quat>.z : Float

quaternion complex components as Floats

<quat>.angle : Float

<quat>.axis : Point3

derived properties - an angle in degrees and a rotation axis

Operators

<quat> + <quat>

<quat> - <quat>

<quat> * <quat_or_number>

<quat> / <number>

- <quat>

Quaternion algebra

<quat> * <matrix3>

Quaternion algebra using rotation portion of the matrix3

<quat> == <quat>

<quat> != <quat>

<quat> as <class>

quats can convert to Matrix3's, Angleaxis's, Eulerangle's

Methods

copy <quat>

Creates a new copy of the quat value. For example:

newQuat = copy oldQuat

The new value contains a copy of the input quat value, and is independent of the input quat value.

isIdentity <quat>

Returns true if the quaternion is equal to the identity quaternion (x=y=z=0.0; w=1.0).

normalize <quat>

Returns a normalized quat, dividing each term of the input quat by a scale factor such that the resulting sum of the squares of all parts equals unity.

inverse <quat>

Returns the inverse of the quaternion (1/q).

conjugate <quat>

Returns the conjugate of a quaternion.

logN <quat>

Returns the natural logarithm of UNIT quaternion.

exp <quat>

Returns the exponentiated quaternion (where q.w=0).

slerp <start_quat> <end_quat> <number>

Returns a spherical linear interpolation of UNIT quaternions. As number goes from 0 to 1, the returned value goes from start_quat to end_quat.

LnDif <p_quat> <q_quat>

Returns the "log difference" of two quaternions as:

logN ((inverse p_quat)*q_quat)

qCompA <prev_quat> <now_quat> <next_quat>

Compute a, the term used in Boehm-type interpolation:

a = now_quat * exp(-(1/4)*(logN((inverse now_quat)*next_quat)+ logN((inverse now_quat)*prev_quat)))

squad <p_quat> <a_quat> <b_quat> <q_quat> <number>

slerp (slerp p_quat q_quat number) \

(slerp a_quat b_quat number) \

(2*(1-number)*number)

qorthog <quat> <axis_point3>

Returns quat rotated by 180 degrees (quaternion space metric) about the specified axis axis_point3.

transform <quat> <matrix3>

Returns the transformation of the specified quaternion by the specified matrix.

squadrev <angle_number> <axis_point3> <start_quat> <start_tangent_quat> <end_tangent_quat> <end_quat> <number>

Returns quaternion interpolation for angles > 2PI where angle_number is angle of rotation, and axis_point3 is axis of rotation. As number goes from 0 to 1, the returned value goes from start_quat to end_quat.

random <quat> <quat>

Returns a random rotation between the two quats, using Slerp.

Related Methods

quatToEuler <quat> order:<eulertype_integer>

eulerToQuat <eulerAngle> order:<eulertype_integer>

Convert between quat and euler angle values. The optional order parameter specifies the order of application of the angles. If not specified, XYZ ordering is used. Its value can be any of the following:

1 - XYZ

2 - XZY

3 - YZX

4 - YXZ

5 - ZXY

6 - ZYX

7 - XYX

8 - YZY

9 - ZXZ

quatToEuler2 <quat>

Returns the same Euler value for the given Quaternion as shown in the Transform Type-In dialog. Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

quatArrayToEulerArray <quat array>

Returns an array of smooth Euler values from the Quat array. Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

getEulerQuatAngleRatio <quat1> <quat2> <eulerAngles1> <eulerAngles2> [angle:<eulertype_integer>]

When converting a series of quat values to eulerAngles values, it is possible for sign flips to occur in the eulerAngles values. This is due to the fact that one single quat value can be expressed through many different eulerAngles values. This flip can be detected by based on the eulerAngles/quat ratio. The eulerAngles/quat ratio is the relation of the angle difference in eulerAngles space to the angle difference in quat space. If this ratio is bigger than PI the rotation between the two quat to eulerAngles conversions. This method returns the eulerAngles/quat angle ratio between the two quat to eulerAngles conversions as a float value. The actual detection of the flip is dependent on the amount of rotation in between conversions. The smaller the amount of rotation, the more accurate the detection is. The parameters to this method are:

quat1 and quat2 are the previous and current rotation values.

eulerAngles1 and eulerAngles2 are the previous and current converted rotation angles.

The optional eulertype_integer parameter specifies the order of application of the angles. If not specified, XYZ ordering is used. Its value can be any of the following:

1 - XYZ

2 - XZY

3 - YZX

4 - YXZ

5 - ZXY

6 - ZYX

7 - XYX

8 - YZY

9 - ZXZ


AngleAxis Values

Value > Basic Data Values > AngleAxis Values

The AngleAxis class provides a representation for orientation in 3D space using an angle in degrees and a rotation axis. This class is similar to a quaternion, except that a normalized quaternion only represents -PI to +PI rotation. Angles can be greater than 360 and so specify multiple revolutions, unlike quaternions. Rotations follow the right-hand-rule.

Constructors

angleaxis <degrees_float> <axis_point3>

<quat> as angleaxis

<eulerangle> as angleaxis

<matrix3> as angleaxis

extracts the rotation component as an angleaxis

Operators

<angleaxis> == <angleaxis>

<angleaxis> != <angleaxis>

<angleaxis> as <class>

AngleAxis can convert to Matrix3's, Quat's, Eulerangle's

Properties

<angleaxis>.angle : Float

<angleaxis>.axis : Point3

<angleaxis>.numrevs : Integer

Methods

copy <angleaxis>

Creates a new copy of the angleaxis value. For example:

newAngleAxis = copy oldAngleAxis

The new value contains a copy of the input angleaxis value, and is independent of the input angleaxis value.

random <angleaxis> <angleaxis>

Random rotation in degrees, but uses quat Slerp, so loses multiple revolution angles.


EulerAngles Values

Value > Basic Data Values > EulerAngles Values

The EulerAngles class provides a representation for orientation in 3D space using rotation angles in degrees about each axis. Angles can be greater than 360 and so specify multiple revolutions. Rotations follow the right-hand-rule.

Constructors

eulerAngles <x_degrees> <y_degrees> <z_degrees>

<quat> as eulerAngles

<angleAxis> as eulerAngles

<matrix3> as eulerAngles

Extracts the rotation component as an eulerAngles.

Operators

<eulerAngles> == <eulerAngles>

<eulerAngles> != <eulerAngles>

<eulerAngles> as <class>

eulerAngles can convert to Matrix3, Quat, angleAxis values

Properties

<eulerAngles>.x : Float

<eulerAngles>.y : Float

<eulerAngles>.z : Float

Rotation about each primary axis in float degrees

Methods

copy <eulerAngles>

Creates a new copy of the eulerAngles value. For example:

newEulerAngles = copy oldEulerAngles

The new value contains a copy of the input eulerAngles value, and is independent of the input eulerAngles value.

random <eulerAngles> <eulerAngles>

Random rotation between the eulerAngles, but uses quat Slerp, so loses multiple revolution angles.

quatToEuler <quat> order:<eulertype_integer>

eulerToQuat <eulerAngle> order:<eulertype_integer>

Convert between quat and euler angle values. The optional order parameter specifies the order of application of the angles. If not specified, XYZ ordering is used. Its value can be any of the following:

1 - XYZ

2 - XZY

3 - YZX

4 - YXZ

5 - ZXY

6 - ZYX

7 - XYX

8 - YZY

9 - ZXZ

quatToEuler2 <quat>

Returns the same Euler value for the given Quaternion as shown in the Transform Type-In dialog. Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

quatArrayToEulerArray <quat array>

Returns an array of smooth Euler values from the Quat array. Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

getEulerQuatAngleRatio <quat1> <quat2> <eulerAngles1> <eulerAngles2> [angle:<eulertype_integer>]

When converting a series of quat values to eulerAngles values, it is possible for sign flips to occur in the eulerAngles values. This is due to the fact that one single quat value can be expressed through many different eulerAngles values. This flip can be detected by based on the eulerAngles/quat ratio. The eulerAngles/quat ratio is the relation of the angle difference in eulerAngles space to the angle difference in quat space. If this ratio is bigger than PI the rotation between the two quat to eulerAngles conversions. This method returns the eulerAngles/quat angle ratio between the two quat to eulerAngles conversions as a float value. The actual detection of the flip is dependent on the amount of rotation in between conversions. The smaller the amount of rotation, the more accurate the detection is. The parameters to this method are:

quat1 and quat2 are the previous and current rotation values.

eulerAngles1 and eulerAngles2 are the previous and current converted rotation angles.

The optional eulertype_integer specifies the order of application of the angles. If not specified, XYZ ordering is used. Its value can be any of the following:

1 - XYZ

2 - XZY

3 - YZX

4 - YXZ

5 - ZXY

6 - ZYX

7 - XYX

8 - YZY

9 - ZXZ

getEulerMatAngleRatio <matrix3_1> <matrix3_2> <eulerAngles1> <eulerAngles2> [angle:<eulertype_integer>]

This method parallels the getEulerQuatAngleRatio() method. This method is identical to getEulerQuatAngleRatio() with the exception that matrix3 values are passed rather than quat values.


Matrix3 Values

Value > Basic Data Values > Matrix3 Values

The Matrix3 class implements a 4x3 3D transformation matrix object. The transform matrix is a 3D homogeneous matrix typically used to hold object coordinate systems and transformations.

Constructors

matrix3 <row1_point3> <row2_point3> <row3_point3> <row4_point3>

matrix from row vectors

matrix3 0

zero matrix

matrix3 1

identity matrix

<quat> as matrix3

<angleaxis> as matrix3

<eulerangles> as matrix3

rotation matrices

rotateXMatrix <number> -- all angles in degrees

rotateYMatrix <number>

rotateZMatrix <number>

rotation matrices

transMatrix <point3>

translation matrix

scaleMatrix <point3>

scale matrix

rotateYPRMatrix <yaw_number> <pitch_number> <roll_number>

Returns a Matrix3 value for use as a rotation transformation by specifying yaw, pitch and roll angles. All angles are in degrees.

matrixFromNormal <point3>

Returns a Matrix3 value with the normal specified by the given point as the Z axis. The translation portion of the Matrix3 value will be [0,0,0]. The components of the scale portion are the inverse of the values required to normalize the point3 value.

FOR EXAMPLE

MatrixFromNormal [0,0,1]

MatrixFromNormal [0,1,1]

will return

(matrix3 [1,0,0], [0,1,0], [0,0,1], [0,0,0])

(matrix3 [0,-0.707107,0.707107] [1.41421,0,0] [0,1,1] [0,0,0])

Operators

<matrix3> + <matrix3>

<matrix3> - <matrix3>

<matrix3> * <matrix3>

<matrix3> as <class>

Matrix3's can convert to Quat's, AngleAxis, EulerAngles using the matrix's rotation component

<matrix3>[<integer>]

Returns a row of the Matrix3 as a Point3. Valud range on this index is 1 to 4.

<matrix3>[<integer>] = <Point3>

Sets a row of the Matrix3 to the Point3. Valid range on the index is 1 to 4.

Properties

<matrix3>.row1 : Point3

<matrix3>.row2 : Point3

<matrix3>.row3 : Point3

<matrix3>.row4 : Point3

<matrix3>.translation : Point3

read/write access to rows. Row4 is the translation.

NOTE:

When working with object transformation matrix3 values, the rows and their sub-elements cannot be modified directly. To change a row or an element of the row, assign the matrix3 value to a user variable first, modify the matrix3 rows by assigning to the variable and then assign the variable back to the .transform property of the original object.

DOES NOTHING:

$Teapot01.transform.row4 = [10.0,20.0,30.0]

WORKS:

myTransform = $Teapot01.transform

myTransform.row4 = [10.0,20.0,30.0]

$Teapot01.transform = myTransform

<matrix3>.rotationpart : Quat, read-only

<matrix3>.translationpart : Point3, read-only

<matrix3>.scalerotationpart : Quat, read-only

<matrix3>.scalepart : Point3, read-only

access to various transforms, with the remaining transforms zero-ed out.

<matrix3>.determinantsign : Integer, read-only

returns sign of the matrix's determinant

Methods

copy <matrix3>

Creates a new copy of the matrix3 value.

FOR EXAMPLE:

newMatrix3 = copy oldMatrix3

The new value contains a copy of the input matrix3 value, and is independent of the input matrix3 value.

isIdentity <matrix3>

Returns true if the matrix is equal to the identity matrix.

inverse <matrix3>

Returns the inverse of the matrix.

xformMat <transform_matrix3> <space_matrix3>

Returns the transform matrix transformed into a particular space. For example, say you have a rotation you want to apply, but you want to perform the rotation in another coordinate system. To do this, you typically transform into the space of the coordinate system, then apply the transformation, and then transform out of that coordinate system. This method transformats matrix transform_matrix3 into the space of matrix space_matrix3. The resulting matrix3 value is calculated as space_matrix3 * transform_matrix3 * inverse(space_matrix3).

identity <matrix3> -- mapped function

Sets the input matrix or matrices to the identity matrix. If the parameter is a single matrix, this function returns an identity matrix. If the parameter is an array of matrices, this function returns the value OK. In both cases, the input matrix3 values are replaced with the identity matrix.

zero <matrix3> -- mapped function

Sets the input matrix or matrices to the zero matrix. If the parameter is a single matrix, this function returns an zero matrix. If the parameter is an array of matrices, this function returns the value OK. In both cases, the input matrix3 values are replaced with the zero matrix.

orthogonalize <matrix3> -- mapped function

Sets the input matrix or matrices to the an "unbiased" orthogonalization of the matrix. An orthogonal matrix has an axis system where each axis is 90 degrees from the others (it's not skewed). If the parameter is a single matrix, this function returns the orthogonalized matrix. If the parameter is an array of matrices, this function returns the value OK. In both cases, the input matrix3 value(s) are replaced with the orthogonalized matrix value(s).

translate <matrix3> <point3> -- mapped function

Applies an incremental translation transformation to the input matrix or matrices. This is equivalent to multiplying on the RIGHT by the transform. If the matrix3 parameter is a single matrix, this function returns the transformed matrix. If the parameter is an array of matrices, this function returns the value OK. In both cases, the input matrix3 value(s) are replaced with the transformed matrix value(s).

rotateX <matrix3> <number> -- mapped functions -- all angles in degrees

rotateY <matrix3> <number>

rotateZ <matrix3> <number>

rotate <matrix3> <quat>

Applies an incremental rotation transformation to the input matrix or matrices. This is equivalent to multiplying on the RIGHT by the transform. If the matrix3 parameter is a single matrix, this function returns the transformed matrix. If the parameter is an array of matrices, this function returns the value OK. In both cases, the input matrix3 value(s) are replaced with the transformed matrix value(s).

scale <matrix3> <point3> [ <boolean> ] -- mapped function

Applies an incremental scale transformation to the input matrix or matrices. This is equivalent to multiplying on the RIGHT by the transform. If <boolean> is true, the translation component is scaled. If <boolean> is false the translation component is unaffected. When 3ds Max was originally written there was a bug in the code for this method where the translation portion of the matrix was not being scaled. This meant that when a matrix was scaled the bottom row was not scaled. Thus it would always scale about the local origin of the object, but it would scale the world axes. When this bug was discovered, dependencies existed in the code upon this bug. Thus it could not simply be fixed because it would break the existing code that depended upon it working the incorrect way. To correct this boolean parameter was added. If it is set to true, the translation component will be scaled correctly. If not specified, the boolean defaults to false, and the code behaves the old way. If the matrix3 parameter is a single matrix, this function returns the transformed matrix. If the parameter is an array of matrices, this function returns the value OK. In both cases, the input matrix3 value(s) are replaced with the transformed matrix value(s).

preTranslate <matrix3> <point3> -- mapped function

Applies an incremental translation transformation to the input matrix or matrices. This is equivalent to multiplying on the LEFT by the transform. If the matrix3 parameter is a single matrix, this function returns the transformed matrix. If the parameter is an array of matrices, this function returns the value OK. In both cases, the input matrix3 value(s) are replaced with the transformed matrix value(s).

preRotateX <matrix3> <number> -- mapped functions -- all angles in degrees

preRotateY <matrix3> <number>

preRotateZ <matrix3> <number>

preRotate <matrix3> <quat>

Applies an incremental rotation transformation to the input matrix or matrices. This is equivalent to multiplying on the LEFT by the transform. If the matrix3 parameter is a single matrix, this function returns the transformed matrix. If the parameter is an array of matrices, this function returns the value OK. In both cases, the input matrix3 value(s) are replaced with the transformed matrix value(s).

preScale <matrix3> <point3> [ <boolean> ] -- mapped function

Applies an incremental scale transformation to the input matrix or matrices. This is equivalent to multiplying on the LEFT by the transform. If <boolean> is true, the translation component is scaled. If <boolean> is false the translation component is unaffected. If not specified, the boolean defaults to false. If the matrix3 parameter is a single matrix, this function returns the transformed matrix. If the parameter is an array of matrices, this function returns the value OK. In both cases, the input matrix3 value(s) are replaced with the transformed matrix value(s).

Related Methods

getEulerMatAngleRatio <matrix3_1> <matrix3_2> <eulerAngles1> <eulerAngles2> [angle:<eulertype_integer>]

When converting a series of matrix3 values to eulerAngles values, it is possible for sign flips to occur in the eulerAngles values. This is due to the fact that one single matrix3 value can be expressed through many different eulerAngles values. This flip can be detected by based on the eulerAngles/matrix3 ratio. The eulerAngles/matrix3 ratio is the relation of the angle difference in eulerAngles space to the angle difference in matrix3 space. If this ratio is bigger than PI the rotation between the two matrix3 to eulerAngles conversions. This method returns the eulerAngles/matrix3 Angle ratio between the two matrix3 to eulerAngles conversions as a float value. The actual detection of the flip is dependent on the amount of rotation in between conversions. The smaller the amount of rotation, the more accurate the detection is. The parameters to this method are:

matrix3_1 and matrix3_2 are the previous and current transform matrix values.

eulerAngles1 and eulerAngles2 are the previous and current converted rotation angles.

The optional eulertype_integer specifies the order of application of the angles. If not specified, XYZ ordering is used. Its value can be any of the following:

1 - XYZ

2 - XZY

3 - YZX

4 - YXZ

5 - ZXY

6 - ZYX

7 - XYX

8 - YZY

9 - ZXZ


BigMatrix Values

BigMatrix Values, BigMatrixRowArray Values

Value > Basic Data Values > BigMatrix Values, BigMatrixRowArray Values

The BigMatrix class implements an MxN matrix for situations and calculations where the usual 4x3 Matrix3 class is not adequate. The BigMatrixRowArray class implements an N element vector. Each row in a BigMatrix value is a BigMatrixRowArray value. Only Float values can be stored in the elements of a BigMatrixRowArray.

Constructors

BigMatrix <rows> <columns>

Properties

<BigMatrix>.rows : Integer, read-only

<BigMatrix>.columns : Integer, read-only

Operators

<BigMatrix> + <BigMatrix>

Both BigMatrix values must have same size

<BigMatrix>[<int_row>]

Returns BigMatrixRowArray of indexed row

<BigMatrixRowArray>[<int_column>]

Returns float value of indexed column

<BigMatrixRowArray>[<int_column>] = <float_value>

Sets value in the indexed column

Because accessors are themselves operands, these definitions are recursive, which means that you can string accessors together:

<BigMatrix>[<int_row>][<int_column>]

Returns float value of indexed row and column

<BigMatrix>[<int_row>][<int_column>] = <float_value>

Sets value in the matrix

Methods

invert <BigMatrix>

Inverts the matrix in place, i.e., the input BigMatrix itself is modified. The return value is also the inverted matrix. Note that this method only works if this matrix is "square", i.e. if m = n.

transpose <BigMatrix>

Returns the transpose of <BigMatrix>, i.e. result BigMatrix[i][j] = BigMatrix[j][i].

clear <BigMatrix>

Frees all the elements and sets the matrix size to be 0x0

setSize <BigMatrix> <rows> <columns>

Deletes the current elements and sets the size of the matrix to rows x columns.

identity <BigMatrix> -- mapped function

If the number of rows and columns are equal, this method sets the matrix to the identity (diagonal elements = 1, all other elements = 0). If the number of rows and columns are not equal, it does nothing. If the parameter is an array of matrices, this function returns the value OK. In both cases, the input BigMatrix value(s) are set to the identity.

NOTE:

A BigMatrix object is a compound object, similar to an array of arrays. All of the BigMatrix methods operate directly on the components of the input BigMatrix. As described in Reference Assignment , this can cause complications to occur if a BigMatrix object referenced by more than one variable. If you assign a new value to an element of the matrix, or use any of the BigMatrix methods, the same object is still referenced by the variables. This can be seen in the following example.

SCRIPT

bm1=bigmatrix 2 2

for i=1 to 2 do for j=1 to 2 do bm1[i][j]=random 0 10

bm2=bm1

invert bm1

bm2

OUTPUT:

#BigMatrix( -- result of line 1, contents of bm1

[0.00,0.00],

[0.00,0.00]

)

OK -- result of line 2

#BigMatrix( -- result of line 3, contents of bm2

[4.00,6.00],

[4.00,9.00]

)

#BigMatrix( -- result of line 4, contents of bm1

[0.75,-0.50],

[-0.33,0.33]

)

#BigMatrix( -- result of line 5, contents of bm2

[0.75,-0.50],

[-0.33,0.33]

)


Box2 Values

Value > Basic Data Values > Box2 Values

The Box2 class describes a 2D rectangular region using integer coordinates. The Box2 class provides methods that return individual coordinates of the box, scale and translate it, retrieve its center, modify its size, and determine if points are inside the box. Box2 values are primarily used in the viewport graphics methods described in Viewport Drawing Methods .

Constructors

Box2 <x_integer> <y_integer> <w_integer> <h_integer>

Constructs a Box2 with the upper left corner at [x,y] with width w and height h.

Box2 <upperleft_point2> <lowerRight_point2>

Constructs a Box2 object from the specified corners.

Properties

<Box2>.x : Integer

<Box2>.y : Integer

<Box2>.w : Integer

<Box2>.h : Integer

<Box2>.left : Integer, alias of x property

<Box2>.right : Integer

<Box2>.top : Integer, alias of y property

<Box2>.bottom : Integer

<Box2>.center : Point2, read-only

The right property is calculated as right = x + w - 1. The bottom property is calculated as bottom = y + h - 1. Setting the right or bottom property will normally change the w and h properties, respectively. However, if right is set less than left, the right and left values will be swapped, and then the new value will be used as the left value. Likewise, if bottom is set less than top, the bottom and top values will be swapped, and then the new value will be used as the top value.

Operators

<Box2> == <Box2>

<Box2> != <Box2>

Standard comparison operators. Two Box2 values are equal if all of their component values are equal.

Methods

scale <Box2> <float>

Scales the coordinates of the box about the center of the box.

translate <Box2> <point2>

Translates the coordinates of the box by the distance specified.

contains <Box2> <point2>

Determines if the point2 value is contained within the Box2. Returns true if the point is inside the Box2 or on the Box2 edge; otherwise false.

rectify <Box2>

Adjusts the coordinates of the box such that top < bottom and left < right.

empty <Box2>

Sets the Box2 to a special "empty" value.

isEmpty <Box2>

Returns true if the Box2 contains the special "empty" value, false otherwise.


Time Data Values

Value > Time Data Values

The Time data value types are:

Time Values

Interval Values


Time Values

Value > Time Data Values > Time Values

The Time class implements animation time in MAXScript. Time values reflect the properties of animation time in 3ds Max. Resolution is in ticks, with 4800 ticks per second. You can work with time as ticks, frames, h.m.s, or normalized time.

You can intermix numbers and time values in time computations defined below. The rule is that numbers are always interpreted as frame counts, with floating point numbers specifying fractional frames. The numbers are always converted to tick-based time values internally and so have an ultimate resolution of 4800 ticks per second.

You can do time arithmetic and comparisons using numbers as well as time values and convert between time and (frame) numbers using the as operator. See also Time Literals .

Literals

[-]{<decimal_number>[m | s | f | t]}+

minutes/sec/frames/ ticks

[-]{<digit>}:{<digit>}[.{<digit>}]

SMPTE mins:secs.frame

[-]<decimal_number>n

Active segment normalized time

Example Literals

2.5s -- 2.5 seconds

1m15s -- 1 minute 15 seconds

2m30s5f2t -- 2 minutes 30 seconds 5 frames 2 ticks

125f -- 125 frames

17.25f -- 17.25 frames

1f20t -- 1 frame 20 ticks

2:10.0 -- 2 minutes 10 seconds 0 frames (SMPTE)

0:0.29 -- 29 frames (SMPTE)

Constructor

normTime <float>

Time from normal fraction based on the current scene animation range:

FOR EXAMPLE

animationRange --check out the current animation range:

(interval 0f 100f)

theHalfTime = normTime 0.5 --get the middle of the range:

50f

animationRange = interval 42f 1024f --set new scene range:

(interval 42f 1024f)

theHalfTime = normTime 0.5 --get the middle of the new range:

533f

theTenth = normTime 0.1 --get the frame at 1/10 of the range:

140.2f

Properties

<time>.ticks

Time as ticks .

<time>.frame

Time as frames

<time>.normalized

Time as normalized fraction of active segment (scene animation range):

FOR EXAMPLE

animationRange --check out the current animation range:

(interval 0f 100f)

theHalfTime = 50f --the middle of the range:

50f

normalizedTime = theHalfTime.normalized --the normalized time:

0.5

This is the inverse of the normTime constructor described earlier.

Operators

<time> + <time>

Time values addition.

<time> - <time>

Time values subtraction.

- <time>

Invert time value

<time> * <number>

<time> / <number>

Scale time

<time> == <time>

Compare time values for equality. Returns true if the two time values are equal, false if they are not.

FOR EXAMPLE

if sliderTime == 42f then "It is time!" else "Not yet!"

<time> != <time>

Compare time values for non-equality. Returns true if the two time values are not equal, false if they are equal.

<time> > <time>

Returns true if the first time value is greater than the second time value, false if it is less or equal to the second time value.

<time> >= <time>

Returns true if the first time value is greater or equal to the second time value, false if it is less than the second time value.

<time> < <time>

Returns true if the first time value is less than the second time value, false if it is greater than or equal to the second time value.

<time> <= <time>

Returns true if the first time value is less than or equal to the second time value, false if it is greater than the second time value.

<time> as <class>

You can coerce a time value to an Integer or Float number - you get the time in ticks :

EXAMPLE

sliderTime = 35

35

currentTime

35f

currentTime as integer

5600

currentTime as float

5600.0

(currentTime as integer)/TicksPerFrame

35

(currentTime as float)/TicksPerFrame

35.0

NOTE:

To coerce a Time Value to Frames integer, you can use the .frame property documented above:

currentTime

35f

currentTime as integer

5600

currentTime.frame

35

Methods

random <time> <time>

Generates a random time value in the range defined by the two time values.

FOR EXAMPLE

random 10f 100f

POSSIBLE OUTPUT VALUES:

70.9813f

78.175f

59.225f

...

NOTE:

To generate full frame random values, use Integers instead of Time Values instead. Integers are always assumed to represent full frames when used in place of Time Values.

random 10 100

abs <time>

Returns the absolute value of the time value.

FOR EXAMPLE

theTime = -100f

-100f

abs theTime

100f

Some of the examples above refer to system global variables. See 3ds Max System Globals for more details.


Interval Values

Value > Time Data Values > Interval Values

An Interval class represents an interval of time. It has two time value components, start and end. The time values can be numbers or Times, numbers being interpreted as frame counts.

Constructor

interval <start_time> <end_time>

Properties

<interval>.start : Time

Get/set the start value of the interval.

<interval>.end : Time

Get/set the end value of the interval.

EXAMPLES

t = animationRange.start + 5

orig_anim_range=animationRange -- store original animation range

animationRange=interval 0 100000 -- set real long animation range

-- assign script controller, controllers range is the current

-- animation range

ControlObj.scale.controller=scale_script()

-- assign a script to the controller

ControlObj.scale.controller.script = controlscript

-- reset animationRange back to original value

animationRange=orig_anim_range

Some of the examples above refer to system global variables.

See 3ds Max System Globals for more details.


Special Data Values

Value > Special Data Values

Undefined Value

Ok Value

Unsupplied Value

DontCollect Value


Undefined Value

Value > Special Data Values > Undefined Value

The Undefined class implements the value used in uninitialized variables and array members. There is one distinguished instance of the Undefined class in the reserved system variable undefined.

Constructor

undefined

EXAMPLES

-- check to see if MyLight has a target

if MyLight.target != undefined then

-- distance from light to target

dist=distance MyLight.pos MyLight.target.pos

else

-- distance from light to [0,0,0]

dist=length MyLight.pos

-- set CH_Hand1 to undefined so can test later to see if deleted

deleteChangeHandler CH_Hand1; CH_Hand1=undefined

See also

MAXScript FAQ: What is the difference between 'undefined' and 'unsupplied' values?

Unsupplied Value

Special Data Values


Ok Value

Value > Special Data Values > OK Value

The Ok class implements the void value returned by some functions and expressions that don’t have a meaningful value to return. There is one distinguished instance of the OK class in the reserved system variable OK.

See also

Special Data Values


Unsupplied Value

Value > Special Data Values > Unsupplied Value

The Unsupplied class implements the value used to initialize unsupplied keyword parameters to functions. There is one distinguished instance of the Unsupplied class in the reserved system variable unsupplied. You can test to see whether a caller has supplied an optional keyword argument by comparing it with unsupplied.

Constructor

Unsupplied

EXAMPLES

fn walk_tree obj parent: =

(

if parent == unsupplied then

...

else

...

...

)

See also

Creating Functions

Function Calls

MAXScript FAQ: What is the difference between 'undefined' and 'unsupplied' values?

Special Data Values


DontCollect Value

Value > Special Data Values > DontCollect Value

The dontCollect value is used in for loops to signal that the value is not to be collected. See For Loop for details. dontCollect is a separate distinguished instance of the Undefined class, and so will fail in the way the undefined value does if used in computations.

Constructor

dontCollect

EXAMPLES

-- collect all spheres with radius less than 5

little_spheres =

for i in $* collect

if classOf i == sphere and i.radius < 5 then i else dontCollect

See also

For Loop

Special Data Values


Bitmap Values

Value > Bitmap Value

The Bitmap class provides storage of and low-level access to 3ds Max bitmaps.

Bitmaps can be temporary objects that are resident only in memory, or they can be associated with a file on disk. Those bitmaps associated with files have a non-null .fileName property and are either load-only or save-only, but not both (this is with respect to file I/O; all bitmaps in memory can have their pixels modified by the setPixel() functions). You make load-only bitmaps with the openBitmap() and selectBitmap() functions. You make temporary or save-only bitmaps with the bitmap() constructor, or with the render(), copy(), or getChannelAsMask() functions. To make them savable, they must have a valid file name, supplied either on the constructor with a fileName: parameter or by setting the .fileName property.

Constructors

bitmap <width <height> [ filename:<filename_string> ] \

[ numframes:<integer> ] \

[ color:<color> ] \

[ gamma:<float> ] \

[ pixelAspect:<float> ] \

[ channels:<channel_name array> ] \

[ hdr:<bool> ]

Creates an empty bitmap. The bitmap value returned is a savable bitmap.

The filename: parameter allows you to set the name of the file the bitmap will be saved to using the save method. Specifying an existing bitmap file name does not load the contents of the bitmap file into the bitmap value.

The numframes: parameter allows you to create a multi-frame bitmap.

The color: parameter allows you to set the initial color of all pixels in the bitmap.

EXAMPLES

b = bitmap 320 240 color:white

The gamma: parameter allows you to set the gamma for the newly created bitmap.

EXAMPLES

b = bitmap 320 240 gamma:1.9

render camera:c to:b

The pixelAspect: parameter allows you to set the pixel aspect for the newly created bitmap.

NOTE:

It is not possible to change the gamma or pixel aspect of a bitmap once created, though you can copy one bitmap into a newly created one that has a different gamma or pixel aspect to achieve this effect.

The channels: parameter lets you specify the channels to be created. It is also available as a property. For a list of valid names, see the getChannel method documentation.

When the optional hdr: parameter introduced in 3ds Max 8 is set to true, the constructor creates a 32 bit per channel bitmap value instead of an 8 bit per channel bitmap value.

openBitMap <filename_string>

Returns a bitmap value containing the contents of the specified bitmap file. The bitmap value returned is a load-only bitmap.

If the specified bitmap file does not exist, a runtime error was generated in 3ds Max 9 and earlier.

If the specified bitmap does not exist, a value of undefined is returned in 3ds Max 2008 and higher.

selectBitMap [ caption:<open_dialog_title_string> ]

This method displays a Image Input selection browser for the user to select a bitmap file. Returns a bitmap value containing the contents of the selected bitmap file, or the value undefined if the user presses Cancel in the browser. The bitmap value returned is a load-only bitmap.

copy <bitmap>

Copies an existing bitmap, creating an unique instance of the bitmap. If the source bitmap is load-only, the bitmap value returned is a temporary bitmap value, with a null filename and just one frame. If the source is a multi-frame file, it snaps the current frame into the new copy, which becomes frame 0.

Properties

<bitmap>.filename : String

Lets you get or set the file name associated with the bitmap.

<bitmap>.palette : Array

Yields an array of 256 colors (a bug in the current 3ds Max SDK prevents working with paletted files of other than 256 entries). Take care accessing this array with colors indexes retrieved by the getIndexedPixels() function described below, because these indexes are 0-based and MAXScript array indexes are 1-based. Yields undefined if the bitmap is not paletted. Currently you cannot create a paletted bitmap in MAXScript, however you can read and write to a pre-existing paletted bitmap.

<bitmap>.frame : Integer

Get and set the current frame number in a multi-frame file. Setting this property is permitted only on load-only bitmaps. The frame number is 0-based for inherently multi-frame files, such as .avi and .mov.

<bitmap>.numframes : Integer

The number of frames in a multi-frame file, yields 1 for a single image file.

<bitmap>.height : Integer, read-only

Returns bitmap's height in pixels.

<bitmap>.width : Integer, read-only

Returns bitmap's width in pixels.

<bitmap>.gamma : Float, read-only

Returns bitmap's gamma value.

<bitmap>.aspect : Float, read-only

Returns the bitmap's pixel aspect. Note that this is the aspect of the pixel, not the aspect of the bitmap image.

<bitmap>.channels : Array

This property lets you get and set the bitmap channels available in the bitmap. For a list of valid names, see the getChannel method documentation.

EXAMPLES

b = bitmap 100 100 channels:#(#weight)

BitMap:

b.channels

#(#weight)

b.channels = #(#zDepth)

#(#zDepth)

<bitmap>.hasAlpha : Boolean, read-only

This property contains true if the bitmap has an alpha channel and false if it does not.

Methods

display <bitmap>

Opens a virtual frame buffer (VFB) displaying the image. Changes to the bitmap are not automatically displayed to the VFB. To update the VFB, you need to call this function again. Setting the frame property does cause the VFB to update. Each bitmap has its own VFB, i.e., if you display two different bitmaps, two VFBs will be displayed.

unDisplay <bitmap>

Close the VFB associated with the bitmap if open.

<bool>save <bitmap> [frame:<integer>] [quiet:<bool>]

Saves current state of the bitmap. Make sure the file name has been set first. When saving multi-frame image files, the effect of the frame: keyword parameter is different depending on the type of output file. Inherently multi-frame files, such as .avi and .mov, ignore the frame: parameter and always write to the next output file frame in sequence on each save(); you cannot randomly write frames or rewrite frames already saved. Saving image sequences (such as .bmp, jpg, .tga) requires supplying the frame: parameter and causes the frame number to be appended to the output file name for each frame saved. This effectively generates a sequence of image files suitable for building an IFL. The output file remains open until you call close on the bitmap.

The save() function can only be called on a savable bitmap. You will get a runtime error if you attempt to save a bitmap opened with openBitmap() or selectBitmap().

For details on the quiet: option which was added to this method in 3ds Max 8, please see Quiet Mode

The method will return true on success or false if the saving failed (for example if attempting to overwrite an existing read-only file) in 3ds Max 8 and higher.

close <bitmap>

Closes the bitmap file associated with the bitmap if it is open for output. A bitmap file is opened for output when you call save on the bitmap value the first time. If a Virtual Frame Buffer associated with the bitmap is open, it will be closed. This function also frees all memory allocated by the bitmap, including the internal pixel frame buffer. If you are generating many bitmaps, say in a rendering loop, you can use the close() function to free these often large amounts of memory, that won’t otherwise be released until the next garbage collection.

copy <source_bitmap> <dest_bitmap>

Copies the source bitmap to the destination bitmap. If the size of the two bitmaps is different, the image will be scaled to fit the destination bitmap.

gotoFrame <bitmap> <frame>

Position multi-frame file (avi, flc, etc.) to frame frame. This method is permitted only on load-only bitmaps. The frame number is 0-based for inherently multi-frame files, such as .avi and .mov. Updates VFB if open.

getPixels <bitmap> <coord_point2> <num_pixels>

Retrieve a sequence of pixels from a row in the bitmap as an array of color values. The coord_point2 argument specifies the starting pixel coordinate with [0,0] at the top-left-hand pixel. The .x component of the Point2 coordinate is the column, and the .y component is the row. The sequence must come from one row only; you cannot retrieve a sequence of pixels that spans multiple rows. Using any out of-bounds coordinates or retrieving over row boundaries will fail and yield an empty array.

setPixels <bitmap> <coord_point2> <color_value_array>

Sets the sequence of pixels in a row in the bitmap starting at the Point2 coordinate to the values in the given array. The .x component of the Point2 coordinate is the column, and the .y component is the row. The number of pixels to set is taken from the size of the array. As with getPixels(), you cannot set pixel sequences across a row boundary.

getIndexedPixels <bitmap> <coord_point2> <num_pixels>

Retrieve a row of pixels as an array of palette index numbers. The coord_point2 argument specifies the starting pixel coordinate with 0,0 at the top-left-hand pixel. The index numbers are origin 0.

NOTE:

that this is in keeping with indexed color conventions but not MAXScript's. Take care accessing any retrieved palette array using these numbers because the retrieved palette is returned as a MAXScript array and these arrays use 1-based indexes. You cannot get pixels sequences that cross row boundaries.

setIndexedPixels <bitmap> <coord_point2> <number_array>

Sets the row of pixels starting at the Point2 coordinate to the color indexes in the given array. The number of pixels to set is taken from the size of the array. The color indexes are zero-based. You cannot set pixels sequences that cross row boundaries.

getChannel <bitmap> <coord_point2> <chan_name>

Retrieves the g-buffer channel data for the named channel for the pixel specified by 2D coordinate. The chan_name argument specifies the channel identifier, chosen from the following:

#zDepth

#matID

#objectID

#UVCoords

#normal

#unClamped

#coverage

#node

#mask

#shaderColor

#shaderTransparency

#velocity

#weight

If the bitmap contains the requested channel, the returned value is always an array of values, one for each layer present in the channel at that pixel, ordered from front to back. If the bitmap does not contain the requested channel, the function returns the value undefined. Typically, you get bitmaps containing channels by opening .rla files or using the MAXScript render() function with the channels: parameter supplied. You will get multiple values in the array if the front objects have any transparency.

FOR EXAMPLE

getChannel bm [x,y] #zDepth

might return:

#(-354.413, -354.467, -355.271, -1e+030)

indicating there is a front surface with non-zero transparency at depth -354.413, another at -354.467 and a final one at -355.271. The -1e+30 value represents the background image plane.

You could retrieve the #node channel (if it was generated) to get the actual scene objects at those depths,

getChannel bm [x,y] #node

might return:

#($Sphere:Sphere02 @ [-4.7,24.3,0.0], $Sphere:Sphere02 @ [-4.7,24.3,0.0],$Sphere:Sphere01 @ [-8.3,56.2,5.7])

The type of values returned in the array depend of the channel, as follows:

#zDepth : <float>

#matID : <integer>

#objectID : <integer>

#UVCoords : <point2>

#normal : <point3>

#unClamped : <color>

#coverage : <float>

#node : <node>

#shaderColor : <color>

#shaderTransparency : <color>

#velocity : <point2>

#weight : <color>

See the 3ds Max Software Development Kit Help file for information on the data stored in the g-buffer channels.

getChannelAsMask <bitmap> <chan_name> [to:<bitmap>] \

[fileName:"filename_string"] [pixelAspect:<float>] \

[gamma:<float>] [layer:<integer>] [invert:<boolean>] \

[node:<node> | objectID:<integer> | matID:<integer>] \

[velocity:#angle | #magnitude] | [angle:<float>]

Builds and returns a separate 8-bit gray-level bitmap, suitable for use as a mask in materials, maps, effects, and so on. This bitmap corresponds roughly to the display you see in the visual frame buffer if you select a g-buffer channel to view. In addition, you can cause this mask to be masked itself to a selected node, object ID or material ID. The parameters are as follows:

<bitmap>

The source bitmap containing the source g-buffer channel data.

<chan_name>

The channel from which to generate a mask. The chan_name values are as described for the getChannel() method.

NOTE:

The mask is a single 8 bit value while the channel may be a complex value of some kind. In each case, a mapping to 8 bits is performed. Unless noted differently below, this mapping is the same mapping as in used by 3ds Max to generate monochrome images in the Virtual Frame Buffer.

to:<bitmap>

Specifies an existing bitmap to write the mask into. Its width and height must match the source bitmap.

fileName:"filename_string"

Specifies the file name associated with the generated bitmap.

gamma:<float>

Specifies the generated bitmap's gamma value.

pixelAspect:<float>

Specifies the generated bitmap's pixel aspect. Note that this is the aspect of the pixel, not the aspect of the bitmap image.

layer: <integer>

Specifies the channel layer of the source bitmap to extract data from. Defaults to 1.

invert:<boolean>

If true, inverts the generated bitmap. Defaults to false.

node:<node>

objectID:<integer>

matID:<integer>

Specifies a sub-mask. If one of these parameters is supplied, the generated mask is clipped to contain data only in pixels where the given node, objectID or materialID is visible. To use this sub-masking, you must ensure the #node, #objectID or #matID channel is present in the source bitmap. Further, if the #coverage channel is present in the source bitmap, the sub-mask is anti-aliased by the coverage data.

velocity:#angle | #magnitude

angle:<float>

These parameters can only be specified if the selected channel is #velocity. The default velocity parameter value is #magnitude. These parameters control the generated bitmap as follows:

velocity:#angle

Generated bitmap pixel values are proportional to angle of pixel movement direction, with an angle of direction of 0 degrees (horizontal to the right) mapping to a luminance value of 0, 180 degrees mapping to a luminance value of 127, and 360 degrees mapping to a luminance value of 255.

velocity:#magnitude

Generated bitmap pixel values are proportional to velocity magnitude. High velocities are darker than low velocities.

angle:<float>

Generated bitmap pixel values are proportional to movement direction deviation from the given angle, with a luminance value of 255 at the exact angle and falling off to a luminance value of 0 at 10 degrees from the specified angle. The specified angle is relative to 0 being horizontal to the right.

CompareBitmaps {<filename>File1 | <bitmap>bitmap1} {<filename>File2 | <bitmap>bitmap2} \
<int>tolerance(# different pixels) <int>variation(0-255) \
useAlpha:<boolean> errorMsg:<&string>

In 3ds Max 9 and higher, returns true if the bitmaps compare as the same, false if not.

More than 'tolerance' number of pixels must be different before the comparison fails.

Two pixels are considered the same if the difference in each component value is less than or equal to 'variation'.

If useAlpha is true, the alpha component value is also tested. If false (the default), the alpha component is not tested.

If specified, the errorMsg keyword variable (passed by reference) will contain an error message.
The potential messages are:

  • "Passed."

  • "Different Pixels: #" (where # is the number of pixels that are different)

  • "One or both Bitmaps not found"

  • "Bitmaps have different sizes"

pasteBitmap <src_bitmap> <dest_bitmap> (<src_box2> | <src_point2>) <dest_point2> maskColor:<color> type:{#paste | #composite | #blend} alphaMultiplier:<float>

Copies a block of pixels from src_bitmap to dest_bitmap. Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

  • The position of the source block is specified by src_box2 or src_point2, and the destination by dest_point2.

  • The width and height of the block is specifed by src_box2 or, if src_point2 is specified, by the remaining size of the source bitmap.

  • The width and height will be clamped to prevent either source or target overruns.

  • If maskColor: is supplied, pixels with this color in src_bitmap are not copied to dest_bitmap.

  • If type: is #paste (the default), the source is pasted on the destination ignoring all alpha.

  • If type: is #composite, the source alpha of the source is used:
    clamp(R = S + D * (1-S.alpha))

  • If type: is #blend, the source alpha of the source is used:
    R = S * S.alpha + D * (1-S.alpha)

  • For both type:#composite and type:#blend,
    R.alpha = S.alpha + D.alpha * (1-S.alpha)

  • The type:#composite would typically be used for pre-multiplied alpha images.

  • If type: is #composite or #blend, the source alpha is multiplied by the alphaMultiplier: value, which defaults to a value of 1.0 if not supplied.

  • Only RGBA information is copied - no channel data is copied.

FOR EXAMPLE

bm1=bitmap 100 100 color:red

bm2=bitmap 100 100 color:green

bm3=bitmap 100 100 color:blue

pasteBitmap bm2 bm1 (box2 0 0 25 50) [50,50]

display bm1

pasteBitmap bm1 bm3 [25,25] [25,50] maskColor:green

display bm3

getBitmapInfo {<filename> | <bitmap>}

Returns information on the specified bitmap file as a 13 element array. Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

Array elements are:

1. Expanded bitmap file name as String

2. Device name as String

3. Bitmap width as Integer

4. Bitmap height as Integer

5. Number of bits for each RGB component value as Integer

6. Number of bits for alpha component as Integer.

7. The aspect ratio of the bitmap as Float

8. The gamma of the bitmap as Float

9. Whether the bitmap has alpha as a Boolean

10. First frame as Integer

11. Last frame as Integer

12. The bitmap type (from BitmapInfo::Type()) as Integer. See topic "Bitmap Types" in the SDK help file for more info on the bitmap types.

13. The bitmap flags (from BitmapInfo::Flags()) as Integer. See topic "Bitmap Flags" in the SDK help file for more info on the meaning of each bit.

EXAMPLE:

print (getBitmapInfo (getDir #maxroot + "\\maps\\OAKLEAF.TGA"))

RESULT:

"C:\Program Files\Autodesk\3ds max 2008\maps\OAKLEAF.TGA"

"Targa Image File"

152

256

8

8

1.0

1.0

false

0

0

3

0

OK

Related Methods

setSilentMode <boolean>

Sets Silent mode on or off. If Silent mode is off, any errors occurring during bitmap input or output will result in an error message dialog being displayed by the 3ds Max bitmap I/O routines. If Silent mode is on, error message dialogs are not displayed. Returns a boolean signifying the prior Silent mode state.

The Silent mode state is an internal 3ds Max state, and other 3ds Max plug-ins can turn this state on or off. It is recommended that if you use this method that you turn the state on or off saving the return value, perform the bitmap input or output, and then restore the state to its original value.

silentMode()

Returns a boolean signifying the Silent mode state.

selectSaveBitMap [ caption:<open_dialog_title_string> ]

Displays a 3ds Max bitmap save dialog and returns the fully-specified file path name as a string. Returns undefined if the user cancels out of the bitmap save dialog.

freeSceneBitmaps()

Frees up all the memory used by the image file bitmap caches. This is useful if memory is fragmented with a lot of different bitmaps and you want to have just the ones currently active reloaded.

getBitmapOpenFileName [caption:<title>] [filename:<seed_filename_string>]

getBitmapSaveFileName [caption:<title>] [filename:<seed_filename_string>]

Displays the bitmap file selection dialog. Both functions return a fully-specified file path name or undefined if the user cancels out. If an existing file name is selected using the getBitmapSaveFileName() function, a File Exists/Confirm Overwrite dialog will be displayed.

NOTE:

The getBitmapOpenFileName() function does not require that an existing file name be selected - i.e., a file name is returned if the user types a file name that does not exist. If necessary, you should check the file name that is returned to ensure the file exists.

When you open a bitmap file, an entire frame is loaded into memory. When you are finished processing a bitmap, it is a good idea to either call close() on the bitmap or assign the value undefined to the variable storing the bitmap value, and then manually run garbage collection (gc light:true), so that it’s memory can be released. Another technique for conserving memory when using the render() or getChannelAsMask() functions repeatedly is to use the to:<bitmap> keyword argument which allows those functions to overwrite an existing bitmap’s pixel image with the new rendering or mask.

There is currently no access to the properties associated with some of the bitmap output plug-ins. This means that you cannot set the codec used for .avi files. The properties used are the properties that were last used when saving that file type in 3ds Max.

The following script shows how to properly create and save a multi-frame image file in AVI format.

SCRIPT

theTeapot=teapot() --something to render

animate on at time 10 \ --set animate and time context

rotate theTeapot 180 z_axis --rotate the teapot

cam=targetcamera pos:[200,0,100] \ --camera pointed at teapot

target:theTeapot

renderFrames=#{1,3,5..12} -- specify frames to render

b=bitmap 160 120 filename:"c:\\t.avi" --create a new bitmap

for i = 1 to renderFrames.count do --loop though renderFrames

(

if renderFrames[i] then --if supposed to render frame...

(

at time i --set time context

render 160 120 camera:cam to:b -- render to bitmap frame

save b frame:i -- save each frame as you advance

) -- if you save AFTER the loop,

-- just the last frame is saved.

)

close b -- close the output file - this will also get rid of

--the reference to the bitmap value and free its memory.

OUTPUT:

$Teapot:Teapot01 @ [0,0,0] -- result of line 1

OK -- result of lines 2 and 3

$Target_Camera:Camera01 @ [200,0,100] -- result of lines 4 and 5

#{1, 3, 5..12} -- result of line 6

BitMap:c:\t.avi -- result of line 7

OK -- result of for loop, lines 8 to 15

OK -- result of line 16

NOTE:

While the frame:i keyword argument to the save() method is optional for AVI files (they would advance automatically after each frame), Quicktime MOV files require it to save correctly. Otherwise, each rendered frame will overwrite the first frame in the file and the MOV would end up only one frame long.

The following script reads a bitmap file, and outputs a script to Listener that implements a function that will recreate the same bitmap. This function can then be copied into your script. This is useful for building button images in MAXScript, so that you don't need to distribute bitmap files along with your script.

SCRIPT

(

b=selectbitmap() -- open image file browser

bname="bitmap_"+(getfilenamefile b.filename) -- build name from filename

w=b.width -- get properties of bitmap

h=b.height

format "----------\nfn load_% = (\n" bname -- start defining function

format "local %=bitmap % %\n" bname w h -- create bitmap in function

-- write out a function that unpacks an integer into a pixel color

format "fn unpack val = for p in val collect (r=p/256^2; g=p/256-r*256; b=mod p 256; color r g b)\n"

for r=0 to h-1 do -- for each row in the bitmap

-- have function write the column of pixels to the bitmap

( format "setpixels % [0,%] (unpack #(" bname r

pixels=getpixels b [0,r] w -- read in the column of pixels

for c=1 to w do -- loop through each pixel

( p=pixels[c] -- get the pixel

-- pack the pixel into an integer and write it out

format "%" (((p.r as integer)*256+(p.g as integer))*256+(p.b as integer))

if c != w then -- if not at end of data

format ", " -- write a comma

else

format "))\n" -- else close out the line

)

)

format "return %\n" bname -- function returns the bitmap

format ")\n----------\n" -- finish off function definition

)

OUTPUT:

----------

fn load_bitmap_convert = (

local bitmap_convert=bitmap 4 4

fn unpack val = for p in val collect (r=p/256^2; g=p/256-r*256; b=mod p 256; color r g b)

setpixels bitmap_convert [0,0] (unpack #(12632256, 12632256, 12632256, 12632256))

setpixels bitmap_convert [0,1] (unpack #(255, 255, 255, 255))

setpixels bitmap_convert [0,2] (unpack #(255, 255, 255, 255))

setpixels bitmap_convert [0,3] (unpack #(255, 12632256, 12632256, 12632256))

return bitmap_convert

)

----------

Also see the example in Point3 Values for another usage of class Bitmap.

See also

Accessing the Last Rendered Image


Stream Values

Value > Stream Values

Stream values are used to format and hold character data. You can read and write character data to Stream values. The types of Stream values are:

FileStream Values

StringStream Values

WindowStream Values

MemStream Values


FileStream Values

Value > Stream Values > FileStream Values

A FileStream class implements text file input and output in MAXScript. A FileStream value represents an open text file in MAXScript. Text file I/O is performed by calling functions on the FileStream value.

Constructors

createFile <filename_string>

Creates a new file and returns a <filestream> value. If the specified file cannot be created, the value undefined is returned.

openFile <filename_string> [ mode:<mode_string> ]

Opens a file and returns a <filestream> value. If the specified file cannot be opened, the value undefined is returned. The optional <mode_string> can be (default is "rt"):

r - read-only text - file must exist

rt - read-only text - file must exist

rb - read-only binary - file must exist

r+ - read/write text - file must exist

a - write-only text, append writes - file must exist

at - write-only text, append writes - file must exist

ab - write-only binary, append writes - file must exist

a+ - read/write text, append writes - file must exist

w - write-only text - deletes file contents if it exists

wt - write-only text - deletes file contents if it exists

wb - write-only binary - deletes file contents if it exists

w+ - read/write text - deletes file contents if it exists

S - access is primarily sequentional

R - access is primarily random

T - temporary storage file, try not to flush

D - file is deleted when last handle is closed

c - enable the commit flag for the associated filename so that the contents of the file buffer are written directly to disk if flush or flush is called.

n - reset the commit flag for the associated filename to "no-commit" - contents of the file buffer are written to operating system buffers.

WARNING!

These modes are actual string and should always be written in quotation marks! They are also CASE SENSITIVE!

When a file is opened with one of the "a" access types, all write operations occur at the end of the file. The file pointer can be repositioned using seek, but is always moved back to the end of the file before any write operation is carried out. Thus, existing data cannot be overwritten.

The "a" mode does not remove the EOF marker before appending to the file. After appending has occurred, the MS-DOS TYPE command only shows data up to the original EOF marker and not any data appended to the file.

The "a+" mode does remove the EOF marker before appending to the file. After appending, the MS-DOS TYPE command shows all data in the file. The "a+" mode is required for appending to a stream file that is terminated with the CTRL+Z EOF marker.

When the "r+", "w+", or "a+" access type is specified, both reading and writing are allowed (the file is said to be open for "update"). However, when you switch between reading and writing, there must be an intervening flush or seek operation. The current position can be specified for the seek operation, if desired.

openEncryptedFile <filename> <key>

Opens the encrypted file using the given integer key and returns a FileStream value that you can then do read calls on, exactly as you can on FileStreams returned from the openFile() function. See Encrypted Files for details on encrypted files.

Methods

readLine <filestream>

Read next line, return as string

readChar <filestream>

Read next char, return as string

readChars <filestream> <char_count>

Reads the specified number of characters and returns them in a string.

readDelimitedString <filestream> <string>

Takes a delimiter character (as a string) and reads in characters until the delimiter is found (or end-of-file is reached) and returns the characters in a string.

skipToString <filestream> <string>

Takes a character string and scans forward in the file until it finds an occurrence of the string and positions the file just after that string. If the string is not found, the function returns the value undefined.

skipToNextLine <filestream>

Positions the input file at the beginning of the next line

filePos <filestream>

Retrieve the current offset into the file

seek <filestream> <integer>

Position the file at the given offset so that subsequent I/O will start there.

NOTE:

The seek methods accept #eof as an argument. Specifying this will place you at the end of the file/string stream. A filePos at this point will tell you the length of the file. The readChars method now also accepts a Boolean keyword parameter called errorAtEOF. The default value for this keyword parameter is True, to match current behavior. If False, and an attempt is made to read across the end of the file, no error message is generated and the return string will contain the contents up to the end of the file.

SO YOU CAN SAY:

seek fin #eof

maxlen=filepos fin

seek fin 0

res = readChars fin maxlen errorAtEOF:false

eof <filestream>

Returns true if there is no more data in the file, false otherwise.

flush <filestream>

Ensure all output to file is on disk, flushes the memory buffers.

close <filestream>

Flushes the memory buffers and closes the file

For the following methods, see the description of the execute() method in String Values for information on the scope of variables used in the evaluated expressions.

readValue <filestream> [ ignoreStringEscapes:<boolean> ]

Read and evaluate the next MAXScript <operand> from the file

If the optional ignoreStringEscapes: keyword argument is not supplied or supplied as false and the value read is a string, '\' characters in the string are handled as escape characters. If true, '\' characters in the string are not handled as escape characters. Available in 3ds Max 8 and higher.

readExpr <filestream>

Read and evaluate the next MAXScript <expr> from the file. Note that the scope of the evaluation is the global scope, not the current scope!

execute <filestream>

Read and evaluate all the expressions left in the file. Note that the scope of the evaluation is the global scope, not the current scope!

The differences between the above methods can be seen in the following example. In this example, a stringstream value is created that contains a string containing two expressions - random 0. 1. and random red blue. The readValue, readExpr, and execute methods are then used with the stringstream as the argument.

SCRIPT

s=stringstream "random 0. 1.;random red blue"

readvalue s -- read and evaluate the first value

readvalue s -- read and evaluate the second value

seek s 0 -- position at beginning of stringstream

readexpr s -- read and evaluate the first expression

readexpr s -- read and evaluate the second expression

seek s 0 -- position at beginning of stringstream

execute s -- evaluate all expressions

OUTPUT

StringStream:"random 0. 1.;random red blue" -- result line 1

random() -- result line 2 (evaluated "random")

0.0 -- result line 3 (evaluated "0.")

OK -- result line 4

0.448042 -- result line 5 (evaluated "random 0. 1. ")

(color 86.476 0 163.24) -- result line 6 (evaluated "random red blue")

OK -- result line 7

(color 30.2417 0 143.636) -- result line 7 (evaluated all expressions,

-- returns result of last expression)

Associated Methods

print <value> to: <filestream>

Prints the value to the specified file stream.

format <fmt_string> { <value> } to: <filestream>

Formats the value to the specified file stream.

See Value Common Properties, Operators, and Methods for detailed descriptions of these methods.

See also

External File Methods

File Name Parsing

Standard Open and Save File Dialogs


StringStream Values

Value > Stream Values > StringStream Values

The StringStream class allows you to construct and parse strings using all the text file I/O functions. For example, you can set up a StringStream and build it up by performing prints and formats to it, just as you would to a text file. Conversely, you can convert a String into a StringStream and then work through it using functions like readLine(), readValue(), skipToString(), etc. Since Strings are easily converted to and from StringStreams, this is often a convenient way to work on large, complex strings.

The StringStream class can be used in conjunction with the AppData accessing functions for storing and retrieving large and complex amounts of script-generated data permanently within a 3ds Max scene file.

Constructors

stringStream <initial_string>

Create a new StringStream using the initial string.

<string> as stringStream

Convert existing String to StringStream.

See also String Literals and String Values .

Operators

<stringstream> as string

Convert StringStream to a String

Methods

copy <stringstream>

Create a separate copy of the StringStream

Associated Methods

print <value> to:<stringstream>

format "<fmt_string>" {values} to:<stringstream>

The print() and format() functions provide a way to build up a StringStream a piece at a time. As with text file output, each call to print or format appends to existing text, the StringStream dynamically grows as needed. Note that you can reposition output streaming using the seek() function documented below.

The following functions are identical to the text file input functions available for text FileStream values. (See the FileStream Values class documentation). When called on StringStream instances, they read progressively through the string extracting successive values and lines and characters, etc.

readValue <stringstream> [ ignoreStringEscapes:<boolean> ]

Read and evaluate the next MAXScript <operand> from the stringStream.

If the optional ignoreStringEscapes: keyword argument is not supplied or supplied as false and the value read is a string, '\' characters in the string are handled as escape characters. If true, '\' characters in the string are not handled as escape characters. This option is available in 3ds Max 8 and higher.

EXAMPLE

ss = stringstream "\"a\\tb\""

seek ss 0

readvalue ss

RESULT

"a  b" -- \t handled as a tab

BUT

seek ss 0

readvalue ss ignoreStringEscapes:true

RESULT

"a\t\b" -- \t handled as characters

readExpr <stringstream>

Read and evaluate the next MAXScript <expr> from the stringStream. As with execute(), the scope of the evaluation is the global scope, not the current scope.

readLine <stringstream>

Read next line, return as string

readChar <stringstream>

Read next char, return as string

readChars <stringstream> <number>

Reads the specified number of characters and returns them in a string.

readDelimitedString <stringstream> <string>

Takes a delimiter character (as a string) and reads in characters until the delimiter is found (or end-of-file is reached) and returns the characters in a string.

skipToString <stringstream> <string>

Takes a character string and scans forward in the file until it finds an occurrence of the string and positions the file just after that string. If the string is not found, the function returns the value undefined.

skipToNextLine <stringstream>

Positions the input file at the beginning of the next line

execute <stringstream>

Read and evaluate all the expressions left in the stringStream. Note that the scope of the evaluation is the global scope, not the current scope!

filePos <stringstream>

Retrieve the current offset into the file

seek <stringstream> <pos>

Position the file at the given offset so that subsequent I/O will start there.

eof <stringstream>

Returns true if there is no more data in the stringStream, false otherwise.

close <stringstream>

flush <stringstream>

The close() and flush() functions are provided for consistency with file I/O but are not necessary for StringStreams and do nothing if called.


WindowStream Values

Value > Stream Values > WindowStream Values

The WindowStream class allows you to output strings to a script Editor window. This is useful for directing output to a separate window for ease of inspection, editing, or later saving to a file.

Constructors

newScript()

Opens an empty script Editor window and returns a WindowStream value.

Associated Methods

print <value> to:<windowstream>

format "<fmt_string>" {values} to:<windowstream>

Output to a WindowStream is inserted at the current cursor position in that window.

NOTE:

When using the format() function with a WindowStream, a new line in the Editor window is not displayed until an end-of-line character ("\n") is output!

EXAMPLE

debug = newScript()

...

print $foo to:debug

...

format "name is %\n" obj.name to:debug


MAXKey Values

Value > MAXKey Values

Certain controllers (keyframeable controllers) store their animation values as keys. As seen by MAXScript, keys are stored in a MAXKeyArray. The MAXKeyArray for a keyframeable controller is accessed via the .keys property of the controller.

For more information on MAXKeyArrays, see MAXKeyArray Values .

See also

MAXKey Common Properties, Operators, and Methods

Working with MAXKey Values


MAXKey Common Properties, Operators, and Methods

Value > MAXKey Values > MAXKey Common Properties, Operators and Methods

Constructor

addNewKey <controller> <time> [ #select ] [ #interpolate ]

Adds a new key to the controller track at the time specified. The new key is also selected in the track view if the #select optional argument is specified. The value for the new key is taken from the previous key, unless the #interpolate argument is specified in which case the value is the interpolated controller value at that time.

getKey <controller> <index_integer>

Returns the indexed key as a MAXKey instance.

<key_array>[<index_integer>]

where <key_array> is:

<controller>.keys

<node>.<animatable_property>.keys

Properties

For keys associated with all keyframeable controller types, the following properties are accessible:

<key>.time Time

time value or number (interpreted as frames)

<key>.selected Boolean

specifies whether the key is selected. Read/write access.

The .time property is read-only for the keys for some controllers, and read/write for the keys of other controllers. The controller type description specifies whether the .time property is read-only or read/write. For controllers where the key .time property is read/write, the following properties are also available:

<key>.value varies -- class determined by its containing controller

Methods

copy <key>

Creates a copy of the key value. This copy is not independent of the original key, as a key value always references a key in a controller. This method exists primarily to support copying of arrays.

The keys on Bézier, TCB, and Barycentric Morph controllers have additional properties and methods. See Bezier Controller Keys , TCB Controller Keys , and Barycentric Morph Controller Keys for details.

See also

MAXKeyArray Values

Controller Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Working with MAXKey Values

Value > MAXKey Values > Working with MAXKey Values

Changing the .time property of a key may cause it to go out of time order relative to the other keys in the controller. You must call the sortKeys() function on the controller or associated MAXKeyArray once all key time manipulations of this kind is complete so that animation will perform correctly.

The class of a key's value property is determined by the controller it is in, for example, a linear_float key has a float .value, a tcb_rotation key has a quaternion .value, etc. The properties are all settable and support the math-assignment operators and nested-property access.

HERE ARE SOME EXAMPLES:

$foo.pos.keys[2].time += 20f -- change time of single key

$foo.pos.keys.time += 20f -- change time of all keys

$box1.uvw_map.center.keys[2].value.x += 20

for k in $baz.bend.angle.keys do k.value *= 1.1

In some cases, the actual value stored in a key is not the value shown in the command panels, shown in Track View, the value returned by the .value property of the key, or the value returned when accessing the property to which the key’s controller is assigned. Instead, a scaling factor is applied to the key’s value before the value is made "visible". For example, percentages are normally displayed with a range of 0-100, rotation angles are in degrees, colors are [0-255,0-255,0-255]. The unscaled key values for percentages are normally in a range of 0-1, rotation angles in radians, and colors are [0-1,0-1,0-1].

In the description of properties for each class, the scaling factor, if any, is identified for each property. Take the following properties for the PArray class

FOR EXAMPLE:

<PArray>.X_Spin_Vector Float default: 1.0 -- animatable

<PArray>.Spin_Time_Variation Float default: 0.0 -- animatable, percentage

<PArray>.Spin_Phase Float default: 0.0 -- animatable, angle

<PArray>.viewPercent Float default: 10.0 -- percentage

The .X_Spin_Vector property does not apply any scaling to its controller keys. The .Spin_Time_Variation property applies percentage scaling to its controller keys (displayed as percentage, stored as fraction). The .Spin_Phase property applies angle scaling to its controller keys (displayed as degrees, stored as radians). The .viewPercent property is stored internally with a percentage scaling factor, but since this property is not animatable, this scaling it invisible to MAXScript.

Normally this scaling is not of concern when programming in MAXScript, but there are two cases where it must be taken into account. The first is when using script controllers, and is described in Script Controllers .

The second case is when one controller is applied as the controller for two or more properties. The scaling is an attribute of the animatable property, not the controller, so in (the admittedly rare) situations in which a controller is shared by several animatables that have different scaling, unexpected results will occur if you do not take into account the scaling factor. An example of this is shown in the following script, where the same controller is shared between three differently scaled properties.

FOR EXAMPLE:

obj=PArray()

cont=bezier_float()

obj.X_Spin_Vector.controller=cont

obj.Spin_Time_Variation.controller=cont

obj.Spin_Phase.controller=cont

obj.X_Spin_Vector=1

obj.X_Spin_Vector -- no scaling

obj.Spin_Time_Variation -- percentage

obj.Spin_Phase -- angle

OUTPUT:

$PArray:PArray03 @ [0,0,0] -- result line 1

Controller:Bezier_Float -- result line 2

Controller:Bezier_Float -- result line 3

Controller:Bezier_Float -- result line 4

Controller:Bezier_Float -- result line 5

1 -- result line 6

1.0 -- result line 7, unscaled

100.0 -- result line 8, percentage scaled, 1 = 100%

57.2958 -- result line 9, angle scaled, 1 radian = 57.2958 degrees

If you do assign the same controller to properties with different scaling factors, you should take care to access the .value property through the correct animatable property - this provides a scaling context for the access operation.


ArrayParameter Values

Value > ArrayParameter Values

Certain plug-ins in 3ds Max store parameter data in a form that is accessible by MAXScript as ArrayParameters. As such, you can access the parameter data by index and iterate over the parameter data.

Constructors

<MAXWrapper>.parameter

Where the parameter contains an ArrayParameter.

Properties

<ArrayParameter>.count

Returns the number of values in the ArrayParameter. Read-only in most cases, with exceptions noted in the MAXWrapper object description where an adjustable ArrayParameter is used.

Operators

<ArrayParameter>[<integer>]

Returns element of ArrayParameter. Indexes start at 1.

<ArrayParameter>[<integer>] = <value>

Sets element of ArrayParameter to value.

Each ArrayParameter can only contain data of a certain type (for example, Float), or a controller that matches that data type. The showProperties() function indicates these array parameters as <type> array, for example, int array, texmap array, etc.

A plug-in can also define parameter names which point to specific entries in one of its ArrayParameters. For example, mapAmounts is a property of Standard materials containing an ArrayParameter. Each element in this ArrayParameter contains the map amount for one of the map channels. For easier access in a script, the Standard .ambientMapAmount property is provided as an alias for mapAmounts[1] (along with aliases for all the other common maps). You can access the controller for the ambientMapAmount alias either via the .controller property on the alias or on the .mapAmounts[1] property.

FOR EXAMPLE,

either

$foo.material.ambientMapAmount.controller

or

$foo.material.mapAmounts[1].controller

will gets the controller on the ambient map amount material property.

ArrayParameter values can be coerced to Array in 3ds Max 6 and higher.

FOR EXAMPLE

mtl = standard()

mapsArray = mtl.maps as array

The following script shows the use of showProperties() to show the data type for elements of ArrayParameters, access to ArrayParameter elements, and a case of a plug-in defining parameter names which point to a specific entry in one of its ArrayParameters.

SCRIPT

m=CompositeMaterial() -- create a Composite material

showproperties m -- show the properties for the material

m.amount -- show value of parameter amount

m.amount[1] *= .5 -- reduce the value for one element

m=standard() -- create a Standard material

showproperties m -- show it’s properties

m.ambientMapAmount=13 -- set the value for one element via its alias

m.mapAmounts[1] -- and show the element was changed

OUTPUT

compositematerial:Composite -- result line 1

.materialList (Material : material array -- output line 2

.mixType (Composite Type) : int array -- ArrayParameter elements are integer

.mapEnables (Map Enable) : bool array -- ArrayParameter elements are boolean

.amount : float array -- ArrayParameter elements are float

OK -- result line 2

#(100, 100, 100, 100, 100, 100, 100, 100, 100, 100) -- result line 3

50.0 -- result line 4

Standardmaterial:Standard -- result line 5

.mapEnables (Map Enables) : bool array -- pruned output line 6

.maps : texmap array

.mapAmounts (Map Amounts) : percent array

.ambientMap (alias for maps[0])

.ambientMapAmount (alias for mapAmounts[0])

.ambientMapEnable (alias for mapEnables[0])

.bumpMap (alias for maps[8])

.bumpMapAmount (alias for mapAmounts[8])

.bumpMapEnable (alias for mapEnables[8])

13 -- result line 7

13.0 -- result line 8


DataPair Values

The DataPair class is simply a wrapper around two values. The values can be of any value type.

The class is available in 3ds Max 2008 and higher. It was previously available in the [ AVG ] Avguard Extensions.

Constructors

DataPair()

DataPair <value1> <value2>

DataPair <value1_name>:<value1> <value2_name>:<value2>

Properties

<dataPair>.v1 : Value

Get/set the first value in the DataPair.

<dataPair>.v2 : Value

Get/set the second value in the DataPair.

<dataPair>.<value1_name> : Value

Get/set the first value in the DataPair by name.

<dataPair>.<value2_name> : Value

Get/set the second value in the DataPair by name.

Methods

getPropNames <dataPair>

Returns array of names values where first two values are #v1 and #v2, remaining 2 values are <value1_name> and <value2_name> if that form of the constructor is used.

EXAMPLE:

--Define a new value consisting of a Point3 value and an Integer

theVal = DataPair [10,20,30] 42

(DataPair [10,20,30] 42)

theVal.v1 --get the first value in the pair

[10,20,30]

theVal.v2 --get the second value in the pair

42

See also

Values


Collections

Collections

Many of the values you work with in MAXScript are sequenced collections, notably arrays, wild-card pathname selections, and the built-in object sets. In the manner of most operating system shell command languages, MAXScript will automatically apply appropriate operations to each of the members in these target collections.

EXAMPLES:
hide $lights/key* | Hide all the 'key' lights in the scene
$box*.position = [0,0,0] | Re-center all boxes
delete dead_objects | Delete all the objects in the array 'dead_objects'
obj.pos.keys.intangent=#fast | Set in tangent to fast for all obj's position keys
lights.value *= 0.8 | Turn down all the lights 20%

MAXScript determines whether to perform a mapped operation by looking at the first argument to a function or the target in a property assignment to see if it is a sequenced collection. In the case of a function call, it also looks to see if the function is of the appropriate kind, evaluates all the other argument expressions once only. MAXScript then calls the function on each of the members of the first argument collection passing along the other evaluated arguments. In the case of a property assignment, it evaluates the right-hand-expression once only and assigns the value to the named property of each of the elements in the target value collection.

This means that every element in the collection must be a valid target for the function or have the named property in question. If MAXScript comes across an inappropriate target it will report an error and stop the automatic operation.

Except for certain common properties, MAXScript currently only allows automatic collection mapping of property assignment one level deep.

EXAMPLE

the following will perform collection mapping across the objects ObjectSet:

objects.pos = [0,0,0] -- move all objects to world center

If the last level specified is one of the following component names, the automatic collection mapping is performed on the preceeding property:

.angle

.b

.blue

.axis

.controller

.g

.green

.isAnimated

.keys

.r

.red

.track

.x

.x_rotation

.y

.y_rotation

.z

.z_rotation

EXAMPLE

the following will perform collection mapping across the objects ObjectSet:

objects.pos.z = 0.0 -- move all objects to world XY plane

This behavior of calling a function on all the elements of a collection is known as mapping in computer science. In the description of each collection type, you will find those kinds of sequenced collections that can be mapped over identified as mappable. In the descriptions of the various functions and operators throughout this document, those that act on each element in a collection are labeled mapped. In general, the functions that are mapped are those that have some side-effect on the value they take, such as moves, and deletes and hides. Others, like the test function isHidden(), are not mapped because it would be pointless.

All mapped functions defined by MAXScript, such as copy(), delete(), or move(), take an optional last argument, #noMap. This causes the functions not to be mapped when called on collection arguments such as arrays. When used with copy() on arrays in particular, this will return a top-level copy of the array itself and not perform an individual copy() on each element of the array.

You can make your own mapped scripted functions by preceding the function definition with the reserved word mapped,

EXAMPLE

the following will perform collection mapping across the objects ObjectSet:

mapped function rand_color x = (x.wireColor = random black white)

This causes such functions to be automatically called repeatedly on the elements of a collection if a collection is given as the first argument to the function. The #noMap argument is not applicable to user-written functions.

As described in For Loop , a for loop can be set up to iterate through a collection set assigning successive elements in the collection to the loop value each time through the loop. For loops can also be set up to return an array collection set as its result.

EXAMPLES:

-- sequence an array:

for item in table1 do x = x + item.height

-- you can sequence pathnames:

bigones = for obj in $box* where obj.height > 100 collect obj

--collect the big boxes into an array

When iterating through a collection set using a for loop, or when passing a collection to a mapped function, care must be taken not to reorder or remove elements in the collection set within the for loop or function.

Take for an example a script that is supposed to convert all of the selected splines into NURBS curves.

TWO SCRIPTS THAT DO NOT EXECUTE PROPERLY ARE:

for obj in selection do ( convertToNURBSCurve obj)

convertToNURBSCurve selection

The reason neither of these lines execute properly is that the convertToNURBSCurve() function clears the current selection. So only the first spline is passed to convertToNURBSCurve() and converted. Since convertToNURBSCurve() is a built-in function, there is no way to modify this behavior.

To get around this problem, you need to first "snapshot" the selection collection set as an array using the as operator, or use the getCurrentSelection() function, which returns the current selection set as an array.

TWO SCRIPTS THAT EXECUTE PROPERLY ARE:

for obj in (selection as array) do ( convertToNURBSCurve obj)

convertToNURBSCurve (getCurrentSelection())


Collection Types

Collections > Collection Types

Array Values

PathName Values

ObjectSet Values

SelectionSet Values

SelectionSetArray Values

NodeChildrenArray Values

VertexSelection Values

FaceSelection Values

EdgeSelection Values

KeyArray Values

MAXNoteKeyArray Values

ModifierArray Values

MaterialLibrary Values

NURBSSet Values


Array Values

Collections > Collection Types > Array Values

An array is a variable length indexable sequence of values. The values in an array can be of any type. Array values are mappable.

Literals

#(<value>, <value>, ...)

#() -- an empty array

See also Array Literals .

Constructors

<collection> as array

Convert collection to an array.

Properties

<array>.count : Integer

Get/Set the number of elements in the array. In 3ds Max versions prior release 5, this property was read-only.

Operators

<array>[<integer>]

Returns element of array. Indexes start at 1.

<array>[<integer>] = <value>

Sets element of array to value, growing array as necessary.

<array> + <collection>

Like join except a completely new array is constructed containing all the elements of the first and second operands

EXAMPLE:

a = #(1,2,3,4)

join a #(5,6,7,8)

(cameras as array) + lights

props = getPropNames Node

join props getPropNames (classOf $foo)

join props getPropNames $foo $dynamicOnly

sort props

Methods

append <array> <value>

Append value to array, growing it as necessary. Returns the resulting array.

appendIfUnique <array> <value>

Appends the value to the array if the value is not already in the array. Returns true if the value is added, false if not.

Available in 3ds Max 2008 and higher. Previously available in the free [ AVG ] Avguard Extensions.

EXAMPLE:

(

local h = #(1,2,3,4)

appendIfUnique h 60 -- should work

appendIfUnique h 4 -- shouldn't work

if ((h.count != 5) or (h[5] != 60)) do

throw "Entry 5 in the array is incorrect"

format "%\n" h

)

RESULT:

#(1, 2, 3, 4, 60)

OK

makeUniqueArray <array>

Returns a new array with only unique members of source array.

Available in 3ds Max 2008 and higher. Previously available in the free [ AVG ] Avguard Extensions.

EXAMPLE:

makeUniqueArray #(1, 2, 3, 4, 3, 2, 1)

RESULT:

#(1, 2, 3, 4)

copy <array> [#noMap] -- mapped

Creates a copy of all the elements in the array. Returns a value of OK. If #noMap is specified, the copy made is what is called a shallow copy - only a copy of the upper-level value itself (that is, the array value) is created. Copies aren't made of values stored in the array, rather a reference to the same value is stored in both array values.

deepCopy <array>

Creates a copy of all elements in the array, including nested sub-arrays and returns the new array as the result.

Available in 3ds Max 9 and higher.

EXAMPLE:

a = #(10,20,30,"test") --create an array

#(10, 20, 30, "test")

b = a --array is b is referencing the same array a

#(10, 20, 30, "test")

b[1] = 5 --if we change an element in b, a will also change!

5

a

#(5, 20, 30, "test")

b

#(5, 20, 30, "test")

c = deepcopy a --but if we use deepcopy, c will be independent

#(5, 20, 30, "test")

c[1] = 15 --we change the first item of c, but a is unchanged

15

a

#(5, 20, 30, "test")

c

#(15, 20, 30, "test")

deleteItem <array> <number>

Delete element indexed by number from array, shrinking it in size by 1. Returns the resulting array.

join <array> <collection>

Appends all the elements of the second argument to the array (first) argument.

findItem <array> <value>

Does a MAXScript '==' comparison between elements in the array and the target object and then returns the index of the first occurrence of the given value in the array or zero if the value is not in the array.

Values such as Point3s and Strings match if they have the same contents.

insertItem <value> <array> <integer>

Inserts the value at the specified index in the array, growing the array if necessary. Returns OK.

sort <array>

Sorts the elements of the array into ascending order. All the elements must be comparable.

qsort <array> <function> [start:<integer>] [end:<integer>] [user-defined key args passed to function]

Sorts the array using the specified function for element-by-element comparison. The comparison function must take 2 values as arguments, and return an integer number < 0 if the first value is less than the second value, 0 if the values are equivalent, and an integer number > 0 if the first value is greater than the second value. The entire array is sorted unless a start or end value is specified.

EXAMPLE:

The following script generates 10 random positions, and then sorts the positions based on their distance from [0,0,0]:

positions=for i=1 to 10 collect (random [0,0,0] [100,100,0])

fn compareFN v1 v2 =

(

local d = (length v1)-(length v2)

case of

(

(d < 0.): -1

(d > 0.): 1

default: 0

)

)

qsort positions compareFN

for p in positions do print p

All key arguments are passed to the comparison function. This allows you to do things like an indexed sort:

EXAMPLE:

fn compareFN v1 v2 valArray: =

(

local v1i = valArray[v1]

local v2i = valArray[v2]

local d = (length v1i)-(length v2i)

case of

(

(d < 0.): -1

(d > 0.): 1

default: 0

)

)

positions=for i=1 to 10 collect (random [0,0,0] [100,100,0])

indexArray = for i = 1 to positions.count collect i

qsort indexArray compareFN valArray:positions

for i = 1 to positions.count do print positions[indexArray[i]]

bsearch <key> <array> <function> [start:<integer>] [end:<integer>] [user-defined key args passed to function]

NEW in 3ds Max 2009: Performs binary search in a sorted list of arrays and can be used to efficiently find an item in an array by a search key.

The <key> argument defines the search key. It will be passed to the search function as its first argument.

The <array> argument is the array to search for the key in.

The <function> argument is a user-defined search function. By default, it will be passed two arguments - the search key and the current element of the array. The function is identical to the one used by the qsort() method described earlier on this page.

Additional optional keyword arguments can be defined in the function and passed to it by name from the bsearch call.

The start: and end: optional keyword arguments can be used to limit the search in the given range.

For examples and detailed benchmarks of bsearch() compared to MAXScript-based search functions, see Using Bsearch For Fast Table Lookup in the "How To Make It Faster" chapter of the Frequently Asked Questions section.

amin ( <array> | {value} )

Returns minimum value of items in the array or of the argument values. If the array size is zero or no arguments are specified, the value undefined is returned.

EXAMPLE:

myMin1 = amin #(5,1,4,2,8)

myMin2 = amin 5 1 4 2 8

amax ( <array> | {value} )

Returns maximum value of items in the array or of the argument values. If the array size is zero or no arguments are specified, the value undefined is returned.

NOTE:

As described in Reference Assignment , the elements in an array are stored by reference rather than by value. When you operate directly on array elements, and the reference to the array is stored in more than one place, unexpected results may occur.
An example of this is shown in the following script.

SCRIPT:

RandomSets=#() -- create array

RandomSet=#() -- create array

for i=1 to 3 do -- loop i

( for j=1 to 3 do -- for each i loop j

RandomSet[j]=random 1 100 -- set array element to random value

print RandomSet #nomap -- print array of random values

RandomSets[i]=RandomSet -- store random value array in array

)

print RandomSets -- print array of arrays of random values

OUTPUT:

#() -- result of line 1

#() -- result of line 2

#(33, 47, 31) -- output from line 6, i=1

#(4, 52, 39) -- output from line 6, i=2

#(52, 36, 23) -- output from line 6, i=3

OK -- result of for loop, lines 3 to 8

#(52, 36, 23) -- 3 lines of output from line 7

#(52, 36, 23)

#(52, 36, 23)

OK -- result of line 9

As can be seen in the output lines 7 to 9, all the elements of array RandomSets contain the same values, which is not the result as expected from the output shown on lines 3 to 5. The reason the same values are stored in each element of RandomSets is only one array value is actually ever created for RandomSet (in line 2), and line 5 of the script is only changing the elements of that array value. Thus each element of RandomSets is actually pointing at the exact same value.

The easiest fix for the above script is to move line 2 into the for i loop expression, thereby creating a new array value which will then be stored in RandomSets.

SCRIPT:

RandomSets=#()

for i=1 to 3 do

( RandomSet=#() -- create a new array value for RandomSet

for j=1 to 3 do

RandomSet[j]=random 1 100

print RandomSet #nomap

RandomSets[i]=RandomSet

)

print RandomSets

OUTPUT:

#()

#(89, 27, 88)

#(87, 87, 10)

#(74, 27, 64)

OK

#(89, 27, 88)

#(87, 87, 10)

#(74, 27, 64)

OK

You can convert object sets and wild-card pathnames to arrays using the as operator. This has the effect of taking a "snapshot" into the array of the current objects in the set or those matched by the pathname, so that you can then later work on that collection of objects without worrying if the set or match has changed. This is similar to named selection sets in the 3ds Max user interface, and can be used, for example, to keep track of selections as you work interactively with MAXScript. If the user deletes from the scene any of the objects in the array, you will get an error if you try to map operations over the array.

EXAMPLES:

sel1 = selection as array

boxes_at_load = $box* as array

snap_children = $torso...* as array

original_cameras = cameras as array

See also

MAXScript FAQ: How do I create a multi-dimensional array?

MAXScript FAQ: What is the differences between Arrays and BitArrays?

MAXScript FAQ: How do I remove duplicate arrays from an array?


PathName Values

Collections > Collection Types > PathName Values

PathNames provide the mechanism for naming objects in the 3ds Max scene. See also Pathname Literals . Pathname values are mappable.

Example Literals

$box01

$torso/left_upper_arm/left_lower_arm

$*box*

$torso/*

$torso...*

Properties

<pathname>.center : Point3, read-only

Returns center of bounding box of all objects in pathname.

<pathname>.max : Point3, read-only

Returns maximum corner of bounding box.

<pathname>.min : Point3, read-only

Returns minimum corner of bounding box.

<pathname>.count : Integer, read-only

Returns number of objects in set. This property is only valid for wild-carded pathnames, i.e., a pathname that could contain more than one scene object.

Operators

<pathname>[<integer>]

Accesses member of collection. Indexes start at 1.

<pathname> as array

Converts pathname collection to an array

Associated Methods

isDeleted <MAXWrapper_object>

This function yields the result true if the object has been deleted and false if it still exists in the scene. Using the function only makes sense in situations where references to 3ds Max objects are held in variables or arrays or passed as parameters and you want to determine whether the object has been deleted from the scene. Performing an operation on a deleted 3ds Max object referenced in a variable or array otherwise generates an exception. Any kind of 3ds Max object can be tested in this way, scene objects, modifiers, controllers, materials, etc.

EXAMPLE:

myBoxes = $box* as array -- store list of all boxes in array myBoxes

...

-- <one or more objects in the selection are deleted

-- by the user or other scripts>

...

for obj in myBoxes

where not isDeleted obj do

obj [10,0,0]

NOTE:

The order of sequencing is consistent in a stable scene but somewhat arbitrary - it depends on how 3ds Max stores its object hierarchy internally which is affected mostly by order of additions and deletions to and from the scene.

MAXScript lets you set up a 'working level' in the 3ds Max scene hierarchy that affects pathnames and coordinate systems and object creation. You do this with a <level_expr>, one of the many context expressions that are described in Context Expressions .

EXAMPLES:

a = $*feet*[i] -- retrieves the i’th object in the *feet*'s

-- tell me what things inside dummy have a non-identity scale

for obj in $dummy...*

where obj.scale != [1,1,1]

do format "% has non-identity scale: %\n" obj.name obj.scale

-- place $foo's pivot point at the max corner of the set of 'box*' objects.

$foo.pivot = $box*.max

in $dummy

(

sphere name:"ear1" pos:[10,10,10] -- create as children of $dummy

sphere name:"ear2" pos:[-10,10,10]

scale $foo/* [1,1,2] -- looks for 'foo' as a child of $dummy

)


ObjectSet Values

Collections > Collection Types > ObjectSet Values

ObjectSets represent the main scene object categories in 3ds Max. The "constructors" below are all reserved system variables. ObjectSet values are mappable.

Constructors

objects -- all the objects

geometry -- the standard 3ds Max categories...

lights

cameras

helpers

shapes

systems

spacewarps

selection -- the current selection

Properties

<objectset>.center : Point3, read-only

Returns center of bounding box of all objects in set.

<objectset>.max : Point3, read-only

Returns maximum corner of bounding box.

<objectset>.min : Point3, read-only

Returns minimum corner of bounding box.

<objectset>.count : Integer, read-only

Returns number of objects in set.

Operators

<objectset>[<integer>]

Accesses member of collection. Indexes start at 1.

<objectset> as array

Converts objectset collection to an array.

Associated Methods

clearSelection()

Clears current scene node selection.

deselect <PathName>

Deselects given node(s).

EXAMPLE:

deselect $box* --deselects all items whose names start with "box".

select <PathName>

Deselects any current selection first, then selects the node(s) you specified.

selectMore <PathName>

Adds the specified node(s) to the current selection.

getCurrentSelection()

Returns the current selection as an array. This is similar to selection as array, however selection as array returns a copy of the selection.

NOTE:

ObjectSets are actually special types of value that denote their sets, stored in reserved system variables of the same name, so you can assign them to other variables and pass them around as function arguments, etc.

When storing an ObjectSet in a variable, the ObjectSet value is stored rather than the objects in the ObjectSet. Thus, if the scene changes and the ObjectSet is affected by this change, the value assigned to the variable will also change dynamically to reflect the scene changes.

To store a snapshot of the objects currently in the ObjectSet to a variable, first convert the ObjectSet to an array using the as operator.

You can use ObjectSets as the root of a pathname,

FOR EXAMPLE

$helpers/d*

which limits the pathname searching to the object set you've specified. So, in the above example, it will name only helper objects that start with 'd'.

The order of sequencing is consistent in a stable scene but somewhat arbitrary - it depends on how 3ds Max stores its object hierarchy internally which is effected mostly by order of additions and deletions to and from the scene.

The lights and cameras object sets include the target objects, if any, for the lights and cameras. If you want to change a property value for all the lights or cameras, you will need process each object in the ObjectSet individually, testing to make sure it is a light or camera.

FOR EXAMPLE

to increase the multiplier property value for all lights, you would say:

for obj in lights do

if iskindof obj light do

obj.multiplier *= 1.3

EXAMPLES

s = selection[1] -- grab the first object in the current selection

move camera[2] [x, y, z + 10] -- move the second camera

-- select everything within a 100 units of $foo

for o in objects where distance o $foo < 100 do selectmore o


SelectionSetArray Values

Collections > Collection Types > SelectionSetArray Values

The SelectionSetArray class has only one instance, selectionSets, which is an array of all the named selection sets in the current scene. The named selection sets correspond to the selection sets in the Named Selection Set drop-down list on the 3ds Max toolbar. Also see SelectionSet Values . SelectionSet values are mappable.

Constructors

selectionSets

Properties

<selectionsetarray>.count : Integer, read-only

Returns number of named selection sets.

Operators

<selectionsetarray>[<set_name>]

Accesses member of collection by named selection set name. set_name can be either a String or Name value.

<selectionsetarray>[<set_index_integer>]

Accesses member of collection by index number. Indexes start at 1.

<selectionsetarray>[<set_name>] = <node_array>

Create or replace named selection set with name set_name, which can be either a String or Name value. node_array must be an array of nodes.

Methods

deleteItem <selectionsetarray> [<set_name> | <selectionset> ]

Deletes the selection set. The first argument is the selection sets array selectionSets.

The second argument can be the name of the selection set which can be either a String or Name value, or the selection set itself (which is a new option in 3ds Max 9).

The method isDeleted() is valid for named selection sets since 3ds Max 9. See SelectionSet Values for details and examples.

Associated Methods

getNumNamedSelSets()

Returns the number of named selection sets as an integer.

getNamedSelSetName <set_index>

Returns the name of the indexed named selection set as a string. <set_index> is 1 based.

getNamedSelSetItemCount <set_index>

Returns the number of nodes in the indexed named selection set as integer. <set_index > is 1 based.

getNamedSelSetItem <set_index> <node_index>

Returns the indexed node in the indexed named selection set as a node. <set_index> and <node_index> are 1 based.

You access an individual selection set by indexing the selectionSets array with its name or index,

FOR EXAMPLE

set1 = selectionSets["my set 1"]

You can then use that set just as you would use any other object set in MAXScript, such as selection, objects, lights, etc.

FOR EXAMPLE

move set1 [10,0,0]

--moves all the objects in the set across 10 in x.

You can use strings or MAXScript names (starting with #) interchangeably as indexes for the selectionSets array, or you can use an integer as an index if you want to loop over all the sets,

FOR EXAMPLE

selectionSets[#set2].wireColor = red

for i in 1 to selectionSets.count do

saveNodes selectionSets[i] ("set" + i as string + ".max")

You can change, add and delete new Named Selection Sets by using the standard array methods on the selectionSets array:

FOR EXAMPLE

selectionSets["new set"] = selection --snap the current selection

selectionSets["old spheres"] = $sphere* --all the current objects named "sphere*"

selectionSets[#foo] = #(obj1, obj2, obj3)

deleteItem selectionSets "old set" --delete the set named "old set"

nss = selectionSets["another set"] --get the selection set by name

deleteItem selectionSets nss --possible syntax since 3ds Max 9

See Also

SelectionSet Values


SelectionSet Values

Collections > Collection Types > SelectionSet Values

A SelectionSet represents the named scene node selection sets in the Named Selection Sets drop-down list in the 3ds Max toolbar. Also see SelectionSetArray Values . SelectionSet values are mappable.

Constructors

selectionSets[<set_name>]

Set by string or name value

selectionSets[<index>]

Set by order in drop-down list

Operators

<selectionset>[<integer>]

Retrieve nth object in set

Properties

<selectionset>.center : Point3, read-only

Returns center of bounding box of all objects in set.

<selectionset>.max : Point3, read-only

Returns maximum corner of bounding box.

<selectionset>.min : Point3, read-only

Returns minimum corner of bounding box.

<selectionset>.count : Integer, read-only

Returns number of objects in set.

<selectionset>.name : String

Get/Set the name of the selection set. This means that you can now rename an existing named selection set instead of destroying it and creating it again.

Available in 3ds Max 9 and higher.

Methods

isDeleted <selectionset>

Returns true if the selection set is deleted, false of it exists.

Available in 3ds Max 9 and higher.

FOR EXAMPLE

b = box()

$Box:Box01 @ [0.000000,0.000000,0.000000]

selectionSets["boxes"] = #(b)

#($Box:Box01 @ [0.000000,0.000000,0.000000])

nss = selectionSets["boxes"]
SelectionSet:boxes

nss.name
"boxes"

isdeleted nss
false

nss.name = "one box"
"one box"

nss.name
"one box"

deleteItem selectionsets nss
OK

isDeleted nss
true

NOTES:

Unlike ObjectSet, you cannot use SelectionSet as the root of a pathname!

The order of sequencing is consistent in a stable scene but somewhat arbitrary - it depends on how 3ds Max stores its object hierarchy internally which is effected mostly by order of additions and deletions to and from the scene.

See Also

SelectionSetArray Values


NodeChildrenArray Values

Collections > Collection Types > NodeChildrenArray Values

A NodeChildrenArray represents the direct children of a scene node as a virtual array. As such, you can iterate over the children, apply mapped functions to them and obtain certain properties such as count and bounding box info. Also see General Node Properties . NodeChildrenArray values are mappable.

Constructors

<node>.children

Properties

<nodechildrenarray>.center : Point3, read-only

Returns center of bounding box of children.

<nodechildrenarray>.max : Point3, read-only

Returns maximum corner of bounding box.

<nodechildrenarray>.min : Point3, read-only

Returns minimum corner of bounding box.

<nodechildrenarray>.count : Integer, read-only

Returns number of objects in set.

Operators

<nodechildrenarray>[<integer>] -- retrieve nth child

Methods

append <nodechildrenarray> <node>

Makes the specified node a child of the node NodeChildrenArray was constructed from.

deleteItem <nodechildrenarray> <node>

Removes specified node as a child of the node NodeChildrenArray was constructed from.

NOTES:

Unlike ObjectSets, you cannot use NodeChildrenArray as the root of a pathname!

The order of sequencing is consistent in a stable scene but somewhat arbitrary - it depends on how 3ds Max stores its object hierarchy internally which is effected mostly by order of additions and deletions to and from the scene.


VertexSelection Values

Collections > Collection Types > VertexSelection Values

A VertexSelection represents a set of vertices for a scene mesh node as a virtual array. As such, you can access a vertex by index, iterate over the vertices, and apply mapped functions to the vertices. See also Editable_Mesh . The VertexSelection array is dynamic, i.e., its contents will change as the vertices or selected vertices of the mesh node change. VertexSelection values are mappable.

Constructors

<mesh>.selectedVerts

The currently selected vertices of the mesh object

<mesh>.verts

All of the vertices of the mesh object, read-only

Properties

<vertexselection>.count : Integer, read-only

Returns the number of vertices in the VertexSelection array.

<vertexselection>.selSetNames : Array of names, read-only

Returns an array of names of the current vertex-level named selection sets for the object the VertexSelection is associated with.

The following properties are present for singleton selections (of the form $foo.verts[n]):

<vertexselection>.index : Integer, read-only

Returns the index of the selected element in the mesh,

FOR EXAMPLE

$foo.selectedVerts[2].index

returns the vertex index of the 2nd vertex in the current selection.

<vertexselection>.pos : Point3

Returns or sets the position of the selected element in the mesh,

FOR EXAMPLE

$foo.verts[i].pos = $baz.verts[j].pos + [10,0,0]

Iterating over a selection yields singleton selections in the loop body:

FOR EXAMPLE

sv = for i in $foo.selectedVerts collect i.index

--sv contains selected vertices as array

Operators

<mesh>.selectedVerts = (<array> | <bitarray>)

Selects the specified vertices.

<vertexselection>[<integer>]

Retrieves the indexed vertex as a singleton VertexSelection. Index starts at 1

<vertexselection>[<integer>] = <point3>

Sets the position of the indexed vertex.

<vertexselection>[(<integer_array> | <bitarray>)]

Retrieves the indexed vertices as a VertexSelection. Index starts at 1.

<vertexselection>[(<#name> | <string>)]

Retrieves the vertex-level named selection set, where the name of the named selection set can be specified as a name or string value.

<vertexselection>[(<#name> | <string>)] = (<vertexselection> | <integer_array> | <bitarray>)

Sets the vertex-level named selection set to the specified vertices. The name of the named selection set can be specified as a name or string value, and the vertices can be specified as an array, bitArray, or a VertexSelection from the same object.

Methods

move <vertexselection> <point3>

Moves the vertices in the VertexSelection.

select <vertexselection>

Selects the vertices in the VertexSelection.

deselect <vertexselection>

Deselects the vertices in the VertexSelection.

delete <vertexselection>

Deletes the vertices in the VertexSelection.

append <vertexselection> (<vertexselection> | <integer>)

Appends the vertex or vertices to the VertexSelection.

findItem <vertexselection> (<vertexselection[<integer>] | <integer>)

Returns the selection index of the matching item or 0 if not found. The item is selection index or singleton VertexSelection.

FOR EXAMPLE

-- move vertices in 'mouth' named selection set

move $foo.verts[#mouth] [0,0,10]

-- select vertices in 'front verts' set

select $baz.verts["front verts"]

-- set 'baz' named selection set to given vertices

$foo.verts[#baz] = #(1,3,4,5,10)

-- set 'cursel' set to current selection

$baz.verts[#cursel] = $baz.selectedVerts

-- all the names of the vertex-level named selection sets for object $foo

$foo.verts.selSetNames

-- print out all vertex-level named selection sets

for n in $.verts.selSetNames do print $.verts[n]


FaceSelection Values

Collections > Collection Types > FaceSelection Values

A FaceSelection represents a set of faces for a scene mesh node as a virtual array. As such, you can access a face by index, iterate over the faces, and apply mapped functions to the faces. See also Editable_Mesh . The FaceSelection array is dynamic, i.e., its contents will change as the faces or selected faces of the mesh node change. FaceSelection values are mappable.

Constructors

<mesh>.selectedFaces

The currently selected faces of the mesh object

<mesh>.Faces

All of the faces of the mesh object, read-only

Properties

<faceselection>.count : Integer, read-only

Returns the number of faces in the FaceSelection array.

<faceselection>.selSetNames : Array of names, read-only

Returns an array of names of the current face-level named selection sets for the object the FaceSelection is associated with.

The following property is present for singleton selections (of the form $foo.faces[n]):

<faceselection>.index : Integer, read-only

Returns the index of the selected element in the mesh,

FOR EXAMPLE

$foo.selectedFaces[2].index

-- returns the face index of the 2nd face in the current selection.

Iterating over a selection yields singleton selections in the loop body:

FOR EXAMPLE

sf = for i in $foo.selectedFaces collect i.index

--sf contains selected faces as array

Operators

<mesh>.selectedFaces = (<array> | <bitarray>)

Selects the specified faces.

<faceselection>[<integer>]

Retrieves the indexed face as a singleton FaceSelection. Index starts at 1.

<faceselection>[<integer>] = <point3>

Sets the vertices of the indexed face to the vertex indices specified in the point3 value.

<faceselection>[(<integer_array> | <bitarray>)]

Retrieves the indexed faces as a FaceSelection. Index starts at 1.

<faceselection>[(<#name> | <string>)]

Retrieves the face-level named selection set, where the name of the named selection set can be specified as a name or string value.

<faceselection>[(<#name> | <string>)] = (<faceselection> | <integer_array> | <bitarray>)

Sets the face-level named selection set to the specified faces. The name of the named selection set can be specified as a name or string value, and the faces can be specified as an array, bitArray, or a FaceSelection from the same object.

Methods

move <faceselection> <point3>

Moves the faces in the FaceSelection.

select <faceselection>

Selects the faces in the FaceSelection.

deselect <faceselection>

Deselects the faces in the FaceSelection.

delete <faceselection>

Deletes the faces in the FaceSelection.

append <faceselection> (<faceselection> | <integer>)

Appends the face(s) to the FaceSelection.

findItem <faceselection> (<faceselection[<integer>] | <integer>)

Returns the selection index of the matching item or 0 if not found. The item is selection index or singleton FaceSelection.

EXAMPLES

-- move faces in 'mouth' named selection set

move $foo.faces[#mouth] [0,0,10]

-- select faces in 'front faces' set

select $baz.faces["front faces"]

-- set 'baz' named selection set to given faces

$foo.faces[#baz] = #(1,3,4,5,10)

-- set 'cursel' set to current selection

$baz.faces[#cursel] = $baz.selectedFaces

-- all the names of the face-level named selection sets for object $foo

$foo.faces.selSetNames

-- print out all face-level named selection sets

for n in $.faces.selSetNames do print $.faces[n]


EdgeSelection Values

Collections > Collection Types > EdgeSelection Values

An EdgeSelection represents a set of edges for a scene mesh node as a virtual array. As such, you can access an edge by index, iterate over the edges, and apply mapped functions to the edges. See also Editable_Mesh . The EdgeSelection array is dynamic, i.e., its contents will change as the edges or selected edges of the mesh node change. EdgeSelection values are mappable.

Constructors

<mesh>.selectedEdges

The currently selected edges of the mesh object

<mesh>.Edges

All of the edges of the mesh object, read-only

Properties

<edgeselection>.count : Integer, read-only

Returns the number of edges in the edge array.

<edgeselection>.selSetNames : Array of names, read-only

Returns an array of names of the current edge-level named selection sets for the object the EdgeSelection is associated with.

The following property is present for singleton selections (of the form $foo.edges[n]):

<edgeselection>.index : Integer, read-only

Returns the index of the selected element in the mesh,

FOR EXAMPLE:

$foo.selectedEdges[2].index

--returns the edge index of the 2nd edge in the current selection.

Iterating over a selection yields singleton selections in the loop body:

FOR EXAMPLE:

se = for i in $foo.selectedVerts collect i.index

--se contains selected edges as array

Operators

<mesh>.selectedEdges = (<array> | <bitarray>)

Selects the specified edges.

<edgeselection>[<integer>]

Retrieves the indexed edge as a singleton EdgeSelection. Index starts at 1

<edgeselection>[(<integer_array> | <bitarray>)]

Retrieves the indexed edges as a EdgeSelection. Index starts at 1.

<edgeselection>[(<#name> | <string>)]

Retrieves the edge-level named selection set, where the name of the named selection set can be specified as a name or string value.

<edgeselection>[(<#name> | <string>)] = (<faceselection> | <integer_array> | <bitarray>)

Sets the edge-level named selection set to the specified edges. The name of the named selection set can be specified as a name or string value, and the edges can be specified as an array, bitArray, or a EdgeSelection from the same object.

Methods

move <edgeselection> <point3>

Moves the edges in the EdgeSelection.

select <edgeselection>

Selects the edges in the EdgeSelection.

deselect <edgeselection>

Deselects the edges in the EdgeSelection.

delete <edgeselection>

Deletes the edges in the EdgeSelection.

append <edgeselection> (<edgeselection> | <integer>)

Appends the edge(s) to the EdgeSelection.

findItem <edgeselection> (<edgeselection[<integer>] | <integer>)

Returns the selection index of the matching item or 0 if not found. The item is selection index or singleton EdgeSelection.

EXAMPLES:

-- move edges in 'mouth' named selection set

move $foo.edges[#mouth] [0,0,10]

-- select edges in 'front edges' set

select $baz.edges["front edges"]

-- set 'baz' named selection set to given edges

$foo.edges[#baz] = #(1,3,4,5,10)

-- set 'cursel' set to current selection

$baz.edges[#cursel] = $baz.selectedEdges

-- all the names of the edge-level named selection sets for object $foo

$foo.edges.selSetNames

-- print out all edge-level named selection sets

for n in $.edges.selSetNames do print $.edges[n]


BitArray Values

Collections > BitArray Values

The MAXScript BitArray class provides direct access to 3ds Max’s SDK BitArray class. The SDK BitArray is used throughout 3ds Max to compactly encode selections as a string of bits.

Literals

#{ <selection> } -- these are curly-brackets!

where <selection> is a comma-separated list of the following

<integer> -- integers must be > 0

<integer> .. <integer>

For example, #{1, 5, 10..200, 302} says that the bits 1, 5, 10 to 200, and 302 are "turned on". When used in connection with selections in 3ds Max (such as vertex or face or control vertex) the "on" bits imply the elements or sub-objects with those indexes are selected.

Properties

<bitarray>.count : Integer

Returns the largest possible index held in the BitArray at that point in time. This value is independent of whether any particular indexes are selected or not. BitArrays grow dynamically as needed to accommodate the indexes used on it, just as with arrays.

Writing to the .count property sets the storage to the specified number of bits.

Operators

<bitarray>[<integer>]

Yields true if selected, else false

<bitarray>[<integer>] = <boolean>

Sets or clears indexed bit

<bitarray> + <bitarray>

Union ("OR" operation)

<bitarray> * <bitarray>

Intersection ("AND" operation)

<bitarray> - <bitarray>

Difference

-<bitarray>

Invert the bitarray

Methods

append <bitarray> <integer>

Adds index to bitarray, growing bitarray if necessary.

join <bitarray> <bitarray>

Union ("OR" operation) of the two bitarrays.

findItem <bitarray> <integer>

Yields index <integer> if selected, 0 otherwise.

deleteItem <bitarray> <integer>

Clears the index selection.

copy <bitarray>

Creates an independent copy of the bitarray.

NOTE:

BitArrays can be used interchangeable with ordinary #(...) arrays of index numbers where ever a selection array is applicable, such as in mesh sub-object selections.

FOR EXAMPLE:

$foo.verts[#{20..1023}] --selects all vertices between 20 and 1023

You can sequence over BitArrays with a for-loop, which yields a sequence of index numbers corresponding to the currently selected items.

FOR EXAMPLE:

for i in #{2..200} do print i -- print the numbers between 2 & 200

You can perform an "AND" operation between two BitArrays by inverting the difference between them.

FOR EXAMPLE:

a=#{1..5}

b=#{3..10}

c=-(a-b) -- result in c is #{3..5}

Coercion of bitArray to array and integer arrays to bitArrays:

<bitArray> as array

<integer array> as bitArray

FOR EXAMPLE:

a=#{1..5,10}

b=a as array

c=b as bitarray

If an element of the array cannot be coerced to an integer, an error is thrown. .numberSet and .isEmpty are read-only properties, which have been added to the BitArrayValue class.

.numberSet

Returns the number of bits set

.isEmpty

Returns true if no bits are set and false if one or more bits are set.

FOR EXAMPLE:

a=#{1..5,10..20}
a.numberset --> 16
a.isEmpty --> false
a=#{}
a.numberset --> 0
a.isEmpty --> true


MAXKeyArray Values

Collections > Collection Types > MAXKeyArray Values

A MAXKeyArray represents all the keyframe keys in a 3ds Max controller track. See also MAXKey Values , Working with MAXKey Values , and Controller Common Properties, Operators, and Methods . MAXKeyArray values are mappable.

Constructors

<node>.<animatable_property>.keys

The key array can be accessed using the keys property on an animated 3ds Max object property.

EXAMPLES:

$foo.position.keys

$foo.twist.angle.keys

If the 3ds Max object parameter is not yet animated (i.e., no controller has been assigned to the parameter), a value of undefined is returned.

<controller>.keys

The key array can be accessed using the keys property on a controller.

EXAMPLES:

$foo.position.controller.keys

$foo[3][1].keys

Properties

<key_array>.count : Integer, read-only

Returns the number of keys in the key array.

Operators

<key_array>[<index_integer>]

Returns a MAXKey value representing the indexed key in the key array. Indexes start at 1.

Methods

append <key_array> <key>

Appends key to key array.

deleteItem <key_array> <index_integer>

Deletes the indexed key. Key indexes are 1-based.

addNewKey <key_array> <time> [ #select ]

Adds a new key to the key array at the time specified. The value for the new key is the interpolated controller value at the specified time. The new key is also selected if the #select optional argument is specified. The value for the new key is the interpolated controller value at that time. addNewKey() will not add a key if a key already exists at the specified time. The return value in this case is the key located at the specified time.

deleteKeys <key_array> [ #allKeys ] [ #selection ]

Deletes keys from the controller according to the optional symbolic argument supplied.

#allKeys (default): deletes all keys in the controller.

#selection: deletes the currently selected keys

deleteKey <key_array> <index_integer>

Deletes the indexed key. Key indexes are 1-based.

moveKeys <key_array> <time> [ #selection ]

Moves all keys by the time given. If #selection is specified, move the current selection otherwise move all keys.

sortKeys <key_array>

Re-sorts keys according to their times. Some MAXKey operations can result in out of order keys and this function must be called to correctly order keys.

NOTE:

All of the above methods may re-sequence keys in the key array and so cause existing keys to take on different indexes, because key array indexes are time positional.

Take care when inserting and deleting keys into arrays that have individual keys in variables and other containers - MAXKey values are defined internally in terms of this index and so may point to different keys if you re-arrange the keys in a controller.

MAXKeyArrays also support mapped property assignment on their contents in the same way that pathname and array collections do on their contents.

FOR EXAMPLE:

$box01.pos.keys.time += 10f

--bumps all key times by 10 frames,

--and

$cyl23.bend.angle.keys.value *= 1.2

--scales all the bend angle key values up by 1.2.

EXAMPLE:

keys = $box01.bend.angle.keys

for t in 0f to 100f by 10f do addNewKey keys t


MAXNoteKeyArray Values

Collections > Collection Types > MAXNoteKeyArray Values

A MAXNoteKeyArray represents all the note keys in a 3ds Max note track. This value is described in Note Track Access . MAXNoteKeyArray values are mappable.


ModifierArray Values

Collections > Collection Types > ModifierArray Values

A ModifierArray represents the modifiers present on a scene node as an array. As such, you can access a modifier by index, iterate over the modifiers, and apply mapped functions to the modifiers. See also Modifiers . ModifierArray values are mappable.

Constructors

<node>.modifiers

Properties

<modifierarray>.count : Integer, read-only

Returns the number of modifiers in the modifier array.

Operators

<modifierarray>[<integer>]

Retrieves indexed modifier. Index is 1-based with 1 being the modifier on the top of the modifier stack.

<modifierarray>[( <name> | <string> )]

Retrieves named modifier using modifier name as string or name.

See Also

Modifier and SpacewarpModifier Types

Modifier : MAXWrapper and SpacewarpModifier : MAXWrapper


MaterialLibrary Values

Collections > Collection Types > MaterialLibrary Values

A MaterialLibrary contains a table of materials as an array. The 3ds Max system global variables currentMaterialLibrary and sceneMaterials contain MaterialLibrary instances. System global variable meditMaterials strictly speaking is not a MaterialLibrary value, rather it is a virtual array of the materials in the Material Editor sample slots. In most cases, meditMaterials can be considered a MaterialLibrary value, with the exception that you can assign a material or textureMap value to a meditMaterials element. MaterialLibrary values are mappable.

Constructors

currentMaterialLibrary -- system global

sceneMaterials -- system global, the materials in the scene

meditMaterials -- system global, the materials in material editor

materialLibrary { <material> }

Creates a temporary material library. You can add materials to this library with the append function, but there is currently no way to save it or make it the current library.

Properties

<mat_lib>.count : Integer, read-only

Returns the number of materials in the library.

Operators

<mat_lib>[ <integer> | <name> | <string> ]

Retrieves a material from the material library. Material libraries can be indexed just like arrays with an integer index, or by using the material name as a Name or String value.

<mat_lib>[ <integer> | <name> | <string> ] = ( <material> | <textureMap> )

Assigns the specified material or textureMap to the material library. Material libraries can be indexed just like arrays with an integer index, or by using the material name as a Name or String value. If the material library is indexed by an index value, and the index value is larger than the size of the material library, a runtime error is generated. If the material library is indexed by a material name, and the material name is not already present in the material library, the material or textureMap is appended to the material library.

meditMaterials[<slot_index_integer>]

Returns the material or textureMap in the indexed material editor slot. Valid <slot_index_integer> values are 1 through 24.

meditMaterials[<slot_index_integer>] = ( <material> | <textureMap> )

Assigns the specified material or textureMap to the indexed material editor slot. Valid <slot_index_integer> values are 1 through 24.

FOR EXAMPLE:

meditMaterials[3]= standard()

--sets the third slot of the Material Editor

--to a new standard material.

Methods

append <mat_lib> <material>

Append the specified material to the material library. This method is not applicable to the meditMaterials material library.

deleteItem <mat_lib> ( <integer> | <name> | <string> )

Delete the specified material from the material library. The material can be specified as the indexed material in the material library, as a String, or as a Name. This method is not applicable to the meditMaterials material library.

findItem <mat_lib> <material>

Returns the index of the material in the material library or zero if the material is not in the material library.

Associated Methods

getMeditMaterial <slot_index_integer>

Returns the top level material or textureMap in the specified material editor slot. Valid <slot_index_integer> values are 1 through 24.

FOR EXAMPLE:

theMat = getMeditMaterial 3

--gets the material from the third slot of the Material Editor.

setMeditMaterial <slot_index> ( <material> | <textureMap> )

Complements the getMeditMaterial function allowing you to place a material or textureMap into the numbered material editor slot.

loadDefaultMatLib()

Loads the default 3ds Max material library file.

loadMaterialLibrary <filename_string>

Loads the named 3ds Max material library file, which becomes the current material library. If the file name does not have a fully specified directory path, the function searches through all the currently configured bitmap paths. Returns true if the loads succeeds, false if it fails.

saveMaterialLibrary <filename_string>

Saves the current material library into the named file. Returns true if the save succeeds, false if it fails.

fileOpenMatLib()

This method displays the File Open dialog and allows the user to select a material library to load.

NOTE:

If the Material/Map Browser is open when fileOpenMatLib() is called, the Material/Map Browser display is not updated!

fileSaveAsMatLib()

Displays the standard Save File As dialog to allow the user to save the current material library.

fileSaveMatLib [quiet:<bool>]

If the current material library has been saved previously (has been named) this method saves the material library to the same file. Otherwise it displays the standard Save File As dialog to allow the user to save the current material library.

For details on the quiet: option available in 3ds Max 8 and higher, please see Quiet Mode

getMatLibFileName()

Returns the current material library file name as a String value.

EXAMPLES:

You can use the standard array indexing accessors to get and set materials in the library. MaterialLibraries also allow you to use name and string literals as indexes to get at materials in them by name:

$foo.material = currentMaterialLibrary["Rough Gold"]

for m in sceneMaterials do print m.name

append currentMaterialLibrary $baz.material

<MAXMaterialLibrary>loadTempMaterialLibrary <mtllib_file_name>

Loads the named 3ds Max material library file. Unlike loadMaterialLibrary(), the material library does not become the current material library. If the file name does not have a fully specified directory path, the function searches the material library path and through all the currently configured bitmap paths. Returns MAXMaterialLibrary value if the loading succeeded, undefined if it failed.

Available in 3ds Max 9 and higher.

saveTempMaterialLibrary <MAXMaterialLibrary> <mtllib_file_name>

Saves the specified MAXMaterialLibrary value into the named file. Returns true if the save succeeded, false if it failed.

Available in 3ds Max 9 and higher.

EXAMPLES:

You can use the standard array indexing accessors to get and set materials in the library. MaterialLibraries also allow you to use name and string literals as indexes to get at materials in them by name:

a = loadTempMaterialLibrary "mrArch_DesignTemplates.mat"

#materialLibrary()

a[1]

brushed metal:Arch___Design__mi

saveTempMaterialLibrary a "$matlibs/test.mat"

true


NURBSSet Values

Collections > Collection Types > NURBSSet Values

A NURBSSet is used to create NURBS objects, or retrieve data from existing NURBS objects. The NURBSSet acts as a container for the various NURBSObject derived entities (points, curves, surfaces) used to make up the set.

This value is described in NURBSSet : Value .

NURBSSet values are mappable.


Identifying and Accessing MAXScript Classes and Properties

The largest set of classes and functions in MAXScript are those that provide access to the elements in the 3ds Max application and in your scene. This section has several topics that discuss the use of these 3ds Max-specific classes and functions. One important family of classes is the MAXWrapper Value class that give you access to the scene objects, lights, cameras, modifiers, controllers, materials, etc., in 3ds Max scenes.

The topics in this section are:

Class and Object Inspector Functions

Dynamic Properties

Indexed Access to Animatable Properties

Third-Party Plug-In Classes


superclasses read-only global variable

superclasses

A read-only global variable containing an array of the MAXSuperClass values

superclasses system Array #(MAXWrapper, MAXWrapper, node, ParamBlock, GeometryClass, camera, light, shape, helper, System, ParamBlock2, ReferenceMaker, ReferenceTarget, modifier, SpacewarpModifier, SpacewarpObject, BitmapIO, material, textureMap, UVGenClass, ...)

See also

Utilities, Global Utilities, and Render Element Plug-ins

Scripted Plug-ins


Class and Object Inspector Functions

MAXScript provides a number of built-in functions that display information about the classes that are accessible in your particular 3ds Max installation. These functions are useful as an online reference for the core 3ds Max classes and provide the only way of determining what properties in third-party plug-in classes are accessible.

apropos

The apropos() function is used to search for and print out information about global variables by name pattern and class of contents.

This function has the form:

apropos <pattern_string> [ to:<stream> ]

The <pattern_string> argument is a string containing a wild-card pattern for matching against global variables.

The pattern form is:

<variable_name_pattern_string[:class_name_pattern_string]>

that is, a global variable name pattern optionally followed by a ':' and a class name pattern. If the optional class name pattern is given, it restricts the printout to globals containing values of the specified classes. The apropos() function assumes a wild-card '*' at the start and end of each pattern, implying a 'contains' pattern match. The pattern strings can contain name characters and '*'s and '?'s.

The output consists of the global variable name, a tag in () indicating if the variable is a system or const (unchangeable) variable and the class of the value currently in it, followed by a printed representation of that value.

EXAMPLES

apropos "light" -- any variables with 'light' in the variable name

apropos ":float" -- any variables containing float values

apropos "" to:f -- dump all variables to the stream f

apropos "controller:super" -- the list of controller superclasses

apropos "foo:control" -- any variables whose name contains 'foo'

-- and that contain controller classes

Here's a fragment of the first example's output:

lights (const ObjectSet): $lights

lightLevel (system Float): 1.0

Sunlight (const MAXClass): Sunlight

Directionallight (const MAXClass): Directionallight

lightLevelController (system Control): Controller:Bezier_Float

light (const MAXSuperClass): light

NewLight (const Primitive): NewLight()

lightTintColor (system Color): (color 255 255 255)

Volume_Light (const MAXClass): Volume_Light

lightTintColorController (system Control): Controller:Bezier_Color

gw.getMaxLights (Primitive): getMaxLights()

gw.setLight (Primitive): setLight()

To make scripting easier to teach and use everyday, a ScriptTool function for Help has been added. It is an alias for apropos.

Typing Help "Box", will show all the commands using the name BOX.

showClass

The showClass() function prints information about a specified 3ds Max class or classes. It has the following form:

showClass <pattern_string> [ to:<stream> ]

where <pattern_string> is a string containing a wild-card pattern to match against 3ds Max class names, superclass names and property names, and the optional to:<stream> keyword argument specifies a Stream Value to output the display to.

The pattern string has this form:

"<class_name>[ :<superclass_name> ][ .<property_name> ]"

EXAMPLES

showClass "path*" -- all 3ds Max classes starting 'path'

showClass "noise.*" -- all the accessible properties on the

-- Noise texture map

showClass "*:mod*" -- all the modifier classes

showClass "*.*rad*" -- all the classes with a property name

-- containing 'rad'

showClass "*.*" to:f -- everything, out to a file

showClass "*:*controller*" -- all the classes that have

-- "controller" in their superclass

-- name

In the output from the last example, the controllers include 3ds Max's core controllers and any 3rd-party plug-in controllers. In some cases, embedded controllers for some complex plug-ins may be visible in the showClass() listing (such as for Character Studio and HyperMatter). You should not attempt to create and use these controllers individually, this may result in system exceptions.

If you leave out the superclass pattern (the ':' part), it matches all superclasses. If you leave out the property pattern (the '.' part), you only get class names printed.

NOTE:

This function only displays matching MAXWrapper classes (nodes, modifiers, materials, etc.), not the foundation classes in MAXScript (float, integer, array, point3, etc.).

The following shows examples of the output of showClass():

SCRIPT:

showclass "box*" -- show all classes whose name starts with "box"

showclass "box.*" -- show all properties for class box

OUTPUT:

Box : GeometryClass {10,0} -- start of output from line 1

BoxGizmo : helper {3bc31904,67d74ec9}

OK -- result returned from line 1

Box : GeometryClass {10,0} -- start of output from line 2

.height : float

.length : float

.lengthsegs : integer

.width : float

.widthsegs : integer

.mapCoords : boolean

.heightsegs : integer

OK -- result returned from line 2

showProperties

The showProperties() function is used to display the properties for a specific object that is an instance of one of the MAXWrapper classes. It can be used in place of showClass() in situations where you have an actual object in hand. Unlike showClass(), it can display the dynamic properties that may appear in individual objects as you work on them in the scene, such as the sub-controllers in a list controller or the animated control points in an FFD modifier.

The showProperties() function has the form:

showProperties <maxwrapper_object> [ <property_pattern> ] [ to:<stream> ]

where <maxwrapper_object> is the 3ds Max entity to be inspected, the optional <property_pattern> is a wild-card pattern that names the properties to be inspected, and the optional to:<stream> keyword argument specifies a Stream Value to output the display to.

If the property name pattern is not supplied, all properties are listed.

SCRIPT:

showProperties $foo.bend -- show properties of the bend modifier on object foo

ffdmod = $baz.'FFD_box__4x4x4' -- point to the FFD modifier on object baz

showProperties ffdmod "disp*" to:log -- show properties starting with "disp" in the

-- FFD modifier

showProperties $foo.pos.controller -- sub controllers in a position list controller

NOTES:

When the 3ds Max entity specified is a node (for example $box01), this function only displays the properties of base object. It does not show the properties of the transform controllers, modifiers, or materials applied to the object. To display the properties for one of these objects, that object must be specified as the 3ds Max entity as shown in the above examples.

showProperties includes properties defined by FPS interfaces in 3ds Max 8 and higher. See Inspecting Interface Properties for an example.

The following shows examples of the output of showProperties:

SCRIPT:

b=box() -- create a box

ffd_mod=ffdBox() -- create a ffdBox modifier

addmodifier b ffd_mod -- apply ffdBox modifier to the box

showproperties b -- show all properties for the box

showproperties ffd_mod -- show all properties for the ffdBox modifier

OUTPUT:

$Box:Box07 @ [0.0000,0.0000,0.0000] -- result from line 1

FFD_box__4x4x4:FFD(box) 4x4x4 -- result from line 2

OK -- result from line 3

.height : float -- start of output from line 4

.length : float

.lengthsegs : integer

.width : float

.widthsegs : integer

.mapCoords : boolean

.heightsegs : integer

OK -- result from line 4

.dispLattice (Lattice) : boolean -- start of output from line 5

.dispSource (Source Volume) : boolean

.deformType (<unknown>) : integer

.falloff : float

.tension : float

.continuity : float

.inPoints (Inside Points) : boolean

.outPoints (Outside Points) : boolean

.offset : float

.lattice_transform : transform

OK -- result from line 5

To make scripting easier to teach and use everyday, a ScriptTool function for "Show" has been added.

Show is the short way of typing ShowProperties

EXAMPLE:

Show $ --will show you the properties of the selected object

getPropNames

The getPropNames() function is similar to showProperties(), except it returns the property names for a specific object as an array. Unlike showProperties(), you can specify whether to return only the names of dynamic properties of the object.

The getPropNames function has the form:

getPropNames <maxwrapper_obj> [ #dynamicOnly ]

The getPropNames() function returns an array of the property names accessible on the object.

FOR EXAMPLE:

if a FFD(Box) modifier with animated control points is applied to a sphere,

getPropNames $sphere01.'FFD(box) 4x4x4'

could yield:

#(#dispLattice, #dispSource, #deformType, #falloff, #tension, #continuity, #inPoints, #outPoints, #offset, #Lattice_Transform, #Control_Point_49, #Control_Point_50, #Control_Point_51, #Control_Point_52, #Control_Point_53)

NOTES:

When the 3ds Max entity specified is a node (for example $box01), this function only returns the properties of base object. It does not return the properties of the transform controllers, modifiers, or materials applied to the object. To return the properties for one of these objects, that object must be specified as the 3ds Max entity as shown in the above examples.

getPropNames includes properties defined by FPS interfaces in 3ds Max 8 and higher. See Inspecting Interface Properties for an example.

If you call getPropNames() on MAXWrapper classes such as Box, Line, or Bend, it will return the properties common to all instances of that class. If you call getPropNames() on a 3ds Max entity, it will return the properties currently defined for that entity. If you add the optional keyword #dynamicOnly to the getPropNames() call for an entity, it returns the dynamic properties unique to that instance.

FOR EXAMPLE:

if a FFD(Box) modifier with animated control points is applied to a sphere,

getPropNames $sphere01.'FFD(box) 4x4x4' #dynamicOnly

could yield:

#(#Lattice_Transform, #Control_Point_49, #Control_Point_50, #Control_Point_51, #Control_Point_52, #Control_Point_53)

NOTE:

The property names for the lattice transform and control points which was returned by the previous example is not returned when #dynamicOnly is specified. These properties are unique to the specific FFD modifier.

As a special case, you can also call getPropNames() on the superclass 'Node' to get the list of properties common to all scene nodes such as .position, .name, or .wireColor.

FOR EXAMPLE:

getPropNames node

getPropNames and Interfaces

The getPropNames method has been extended to work with the various interface values. The method will return the names of properties exposed by the interface.

FOR EXAMPLE:

getpropnames s.inode

#(#boneEnable, #posTaskWeight, #rotTaskWeight, #boneAutoAlign, #boneFreezeLength, #boneScaleType, #stretchTM, #boneAxis, #boneAxisFlip, #primaryVisibility, #secondaryVisibility, #applyAtmospherics, #vertexColorType, #showVertexColors, #shadeVertexColors, #handle, #posInParent, #rotInParent, #scaleInParent, #scaleOrientInParent)

getProperty and setProperty

The getProperty() and setProperty() functions allow you to access and set properties using computed property names.

The forms for each of these functions are:

getProperty <obj> <property_name>

setProperty <obj> <property_name> <value>

The property name can be either a name, for example #length, or a string, for example "length", so you can construct property names with string operations.

EXAMPLES:

getProperty foo #x -- equiv. to foo.x

setProperty $foo "radius" 23 -- equiv. to $foo.radius = 23

getProperty $foo.ffd_2x2x2 ("control_point_" + n as string)

The getPropNames() function can be used in conjunction with the getProperty() function to implement object ‘dumping’ tools that can iterate over all the properties of an arbitrary object and output them as required.

FOR EXAMPLE:

for p in getPropNames $foo do

format "% = %\n" p (getProperty $foo p)

Similar functions for accessing and setting the values of property-assigned controllers are:

getPropertyController <value> <string_or_name>

setPropertyController <value> <string_or_name> <controller>

Get and set the controller assigned to the named property of the value. If no controller has been assigned to the property, a value of undefined is returned.

hasProperty

The hasProperty() function allows you to test whether an object has a specified property name. Unlike isProperty(), the property name string supports wildcard patterns.

hasProperty <obj> <prop_name_or_pattern_string>

Returns true if the object has the given property or has properties matching the string pattern.

FOR EXAMPLE:

hasProperty $Box01 "height" --test for height in a Box

true

hasProperty $Box01 "radius" --test for radius in a Box

false

hasProperty $Sphere01 "radius" --test for radius in a Sphere
true

hasProperty $Sphere01 "rad*" --test for any property name
true --starting with "rad" in a Sphere

isProperty

The isProperty() function allows you to test whether an object has a specified property.

isProperty <MAXWrapper_object> <property_name_or_string>

isProperty() returns true if the specified property is a property of the MAXWrapper object, false otherwise. The property name can be either a name, for example #length, or a string, for example "length", so you can construct property names with string operations.

EXAMPLES:

isProperty $Box01 #height --test for height in a Box

true

isProperty $Box01 #radius --test for radius in a Box

false

isProperty $Sphere01 #radius --test for radius in a Sphere
true

The difference between hasProperty and isProperty

hasProperty and isProperty do entirely different things.

EXAMPLES:

hasProperty $Box01 "name"

false

isProperty $Box01 "name"

true

hasProperty uses the same code as showPropeties, but instead of returning a list of the properties found, it returns true on the first property name that matches the specified pattern. showProperties is looking at just the box base object and its MAXClass definition. It does not look at any higher level properties (and in versions prior to 3ds Max 8 it does not look at any of the FPS interface exposed properties).

isProperty on the other hand actually tries to access the specified object with the specified name and to detect whether the access succeeded or failed.

isPropertyAnimatable

isPropertyAnimatable <obj> <string_or_name>

Returns true if the property is found and is animatable. Returns false if the property is not found or is not animatable.

FOR EXAMPLE:

s = Sphere() --create a sphere

$Sphere:Sphere01 @ [0.000000,0.000000,0.000000]

isPropertyAnimatable s #radius --check if radius is animatable

true

isPropertyAnimatable s #mapCoords --check if UV coords are

false

ANOTHER EXAMPLE:

s = Sphere() --create a sphere

--Print a list of all properties of the sphere and whether

--they are animatable or not:

for i in getPropNames s do

format "% Property: % - Animatable: %\n" s.name i (isPropertyAnimatable s i)

RESULT:

Sphere01 Property: #smooth - Animatable: true

Sphere01 Property: #radius - Animatable: true

Sphere01 Property: #mapCoords - Animatable: false

Sphere01 Property: #segs - Animatable: true

Sphere01 Property: #slice - Animatable: false

Sphere01 Property: #hemisphere - Animatable: true

Sphere01 Property: #sliceFrom - Animatable: true

Sphere01 Property: #sliceTo - Animatable: true

Sphere01 Property: #chop - Animatable: false

Sphere01 Property: #recenter - Animatable: false

OK

OK

SubAnims and ParamBlocks

3ds Max stores all of properties for objects in structures called subAnims. In some cases, a subAnim will contain nested subAnims. An example of this can be seen with the Standard material. If you apply a Standard material to an 3ds Max object, and then expand the object's tracks in Track View to display the material, you will see three Track View nodes - Parameters, Maps, and Shader. Each of these nodes is a subAnim defined in the Standard material’s class. Expanding the tracks for these three nodes, you will see various properties listed. These properties are defined in each of the nested subAnims in a structure called a ParamBlock.

MAXScript automatically finds animatable properties in all ParamBlocks associated with an object. To access these properties, you use the same nesting as shown in Track View when referencing those properties in MAXScript.

FOR EXAMPLE,

you would access the Ambient Color property in a Standard material in MAXScript as:

$box01.material.shader.diffuse_color

For more information about accessing animatable properties in MAXScript, see also Indexed Access to Animatable Properties in 3ds Max Objects .

The properties accessible on the various kinds of values is documented for each class. Many of the foundation classes in MAXScript (such as point3, color, etc.) support a special kind of nested-property assignment which allows sub-properties on object properties, such as the .x, .y, and .z coordinates in a node's .position property, to be individually and directly set. See Nested Object Properties for details.

See also

showInterfaces Inspector Function

GetInterfaces Interface Inspector

showInterface Inspector Function

getClassInstances

Core Interfaces

Other Interfaces


getClassInstances

The getClassInstances method returns an array of all instances of specified class that exist in the scene.

The syntax is:

getClassInstances <MAXClass> target:<MAXObject> asTrackViewPick:<bool>

If target: is specified, only the subAnim hierarchy for that target is searched, otherwise the entire scene is searched.

If asTrackViewPick:true is specified, each use of a class instance is returned as a TrackViewPick value. If asTrackViewPick:false is specified or not supplied, each class instance is returned.

NOTE:

This method was previously available in the Avguard DLX 3rd party MAXScript extension.

FOR EXAMPLE,

--Create two spheres, and an instance of one of the spheres:

resetMaxFile #noPrompt

s1 = sphere()

s2 = sphere pos:[100,0,0]

s3 = instance s1

s3.pos = [-100,0,0]

RESULT

OK

$Sphere:Sphere01 @ [0.000000,0.000000,0.000000]

$Sphere:Sphere02 @ [100.000000,0.000000,0.000000]

$Sphere:Sphere03 @ [0.000000,0.000000,0.000000]

[-100,0,0]

NOW EXECUTE

tvps=getClassInstances sphere asTrackViewPick:true

for tvp in tvps do

(

print tvp.anim

print tvp.client

print tvp.subNum

print tvp.name

print tvp.client[tvp.subNum]

)

RESULT

#(TrackViewPick:"Object (Sphere)", TrackViewPick:"Object (Sphere)", TrackViewPick:"Object (Sphere)")

Sphere

$Sphere:Sphere01 @ [0.000000,0.000000,0.000000]

4

"Object (Sphere)"

SubAnim:Object__Sphere

Sphere

$Sphere:Sphere02 @ [100.000000,0.000000,0.000000]

4

"Object (Sphere)"

SubAnim:Object__Sphere

Sphere

$Sphere:Sphere03 @ [-100.000000,0.000000,0.000000]

4

"Object (Sphere)"

SubAnim:Object__Sphere

OK

NOW EXECUTE

objs=getClassInstances sphere

for obj in objs do

print (refs.dependents obj) #nomap

RESULT

#(Sphere, Sphere)

#($Sphere:Sphere03 @ [-100.000000,0.000000,0.000000], $Sphere:Sphere01 @ [0.000000,0.000000,0.000000], ReferenceTarget:Animatable)

#($Sphere:Sphere02 @ [100.000000,0.000000,0.000000])

OK

CONCLUSION:

Since one of the spheres is instanced, 3 TrackViewPick values are returned, but only 2 class instances are returned.

See also

Interface: InstanceMgr

Class and Object Inspector Functions

showInterfaces Inspector Function

GetInterfaces Interface Inspector

showInterface Inspector Function


Dynamic Properties

In addition to the properties listed in the reference, MAXScript provides access to the dynamic properties in 3ds Max entities, those properties that are specific to an individual object and depend on the operations you've performed on that object in the 3ds Max scene. These includes such things as animatable modifier sub-objects like gizmos and FFD control points and sub-controllers like those in a List controller or P/R/S Transform or Path controller.

These correspond to the many animatable parameters and sub-objects that you see in the Track View for an object; if you can see them in the Track View they will be visible as either static or dynamic properties in the MAXScript value that corresponds to that object.

The property name you specify is matched against the sub-animatable name (as it would be seen in the Track View or sub-object drop-down) using the standard MAXScript conventions of mapping spaces to '_' underscores and ignoring case when dealing with 3ds Max class and property names. You can also simply leave out the spaces in any dynamic property names.

FOR EXAMPLE:

p = $foo.bend.center

$baz.taper.gizmo.rotation = quat 30 z_axis

$foo.pos.controller.bezier_position = [10,0,0]

Because these properties are dynamic and may change as controllers are replaced and sub-objects become animated, they may vary from object to object and so are not reported in the properties section of the showClass() function output. Instead, you can use the built-in function showProperties() which will display the accessible properties on a 3ds Max entity including the currently visible dynamic properties. Both functions are described in Class and Object Inspector Functions .


Indexed Access to Animatable Properties in 3ds Max Objects

As an alternative to using named property accesses, you can access in an object any animatable property that is visible as a track in Track View by indexing the 3ds Max object value as though it were an array. This simplifies such tasks as iterating over all the animatable properties in an object and accessing sub-controllers that don't have unique names, such as within list controllers.

Properties

<maxwrapper_object>.numSubs : Integer, read-only

Yields the number of accessible sub-animatables, or tracks, in an object. This is the number of immediate children subAnims, and may include as yet invisible tracks in the track view, such as visibility tracks on a node or yet-to-be animated vertices in an FFD. This property operates on any MAXWrapper subclass.

Methods

getSubAnimName <maxwrapper_object> <index> [asString:<Boolean>]

Returns the name of the indexed subAnim in the supplied MAXWrapper.

If the optional asString keyword is supplied and set to true, the name is returned as a string. If false or not specified, a Name Value is returned.

getSubAnimNames <maxwrapper_object>

Returns an array of names in subAnim index order.

getSubAnim <maxwrapper_object> <index>

Returns the indexed subAnim. See the index operator below.

Operators

<maxwrapper_object>[<index_number>|<subanim_name>]

Returns the subAnim with the specified index or name. You can apply the index operator, [<index_number>], to any MAXWrapper object (nodes, modifiers, controllers, materials, etc.) to access a numbered subAnim.

FOR EXAMPLE:

for i in 1 to $foo.numSubs do print $foo[i] -- iterate them

$bar.position.controller[3] -- third subAnim in a position list controller

ffd_mod[i].value -- position of i'th FFD control point

NOTE:

You cannot set subAnims with the index operator, this is a read-only access.

In place of an index, you can also use a subanim name. It can be any expression that yields a string or name value. So, whereas in releases prior 3ds Max 4, getting at the position subAnim in a node require you to remember index 3 for the transform subanim and 1 for its position subanim, in other words

$foo[3][1] -- position within transform within node

you can use instead:

$foo[#transform][#position]

The names you can use are those seen in the track view or retrieved with the functions getSubAnimName() or getSubAnimNames().

SubAnim Class

MAXScript defines a SubAnim class, instances of which provide a general representation for sub-animatables. Whenever you use the index operator on a 3ds Max object, it returns a SubAnim instance.

FOR EXAMPLE:

$box01[3] -> SubAnim:Transform

The third subAnim in a node is typically the transform track.

Properties

<subAnim>.name : String, read-only

Returns the name of the track subAnim as shown in TrackView.

<subAnim>.parent : Node, read-only

Returns the true owner of the subAnim.

NOTE:

The true object owning the subAnim can be different than what was originally specified when creating the subAnim, and MAXScript automatically hides certain types of subAnims, automatically promoting the subAnims within them.

FOR EXAMPLE:

s=sphere()

sa = s.baseobject[0]

SubAnim:Radius

sa.parent

ReferenceTarget:ParamBlock

sa.index

1

--The actual owner of the Radius subAnim is the sphere's parameter block.

<subAnim>.index : Integer, read-only

Returns the index of the subAnim.

<subAnim>.value : Value

The current value of the track subAnim, equivalent to <controller>.value. Returns undefined if no appropriate value exists or the track has not yet been assigned a controller. The .value property yields the value at the current MAXScript time. You can assign to this value to set the track's value at that time.

<subAnim>.controller : Controller

The controller for the track SubAnim. Returns undefined if a controller has not yet been assigned or if the SubAnim is not animatable. You can assign a new controller to a track by assigning to the .controller property of its subAnim.

<subAnim>.keys : KeyArray, read-only

Yields the key array for that track or undefined if not keyable or a controller has not yet been assigned. This property is read-only.

<subAnim>.isAnimated : Boolean, read-only

Yields true if there is an animated controller present. This property is read-only.

<subAnim>.object : MAXWrapper, read-only

Yields the subAnim object, or undefined if not assigned. This property is read-only. The .object property may return any kind of MAXWrapper object, depending on what the parent object decides to put there. For example, <node>[1].object is the visibility controller or undefined if not yet assigned, <node>[2].object contains the bindings of any space warps bound to the node, or undefined if none have been bound, <node>[3].object is the transform controller, <node>[4].object is the node's object, either the modified object if there are modifiers present or the base object if not, <node>[5].object is the material assigned to the node or undefined if no material has been assigned, and <node>[6].object is the Image Motion Blur Multiplier controller or undefined if not yet assigned.

EXAMPLE

b = box()

b[4].object -- returns a reference to the Box base object

<subAnim>.numSubs : Integer, read-only

The number of immediate subAnim children.

If you attempt to access subAnim properties, such as .value, .numSubs, .category, etc., on certain subAnims that had yet to be assigned controllers, such as scene node visibility tracks, these properties return null values such as 0, or undefined, as appropriate.

Methods

getSubAnim <subAnim> <index>

Returns the indexed subAnim. See the index operator below.

Operators

<subAnim>[<index_number>]

Returns the indexed subAnim. You can work down through nested subAnims (nested tracks) by indexing into subAnims themselves.

EXAMPLE

$box01[3][2]

yields the rotation track subAnim since <node>[3] is always the transform track and the second track in it is always the rotation track. Indexing a SubAnim always yields another SubAnim. For those familiar with SubAnims in the 3ds Max SDK, it should be noted that MAXScript SubAnims descend automatically through 'hidden' subAnim levels, reflecting the structure seen in Track View.

NOTE:

You can get at the base object's Track View parameters by indexing into the base object:

b=box()

getSubAnimNames b[4] -- returns #(#length, #width, #height, ...)

b[4][2].value -- returns current width value

i = 3

b[4][i].controller = float_list() -- assign height controller


AnimHandle System

The AnimHandle system defines a unique ID number for every entity in the scene, including nodes, modifiers, materials, controllers, etc. When an entity is deleted from memory, its number will never be reused by any entity created later, except in the case of the so-called "wrap-around" - an unhealthy condition possible only when four billion entities (the 32-bit limit) are created in a single 3ds Max session.

Therefore you can determine whether an object is deleted by requesting the object using its handle, and seeing if the result is undefined.

Available in 3ds Max 2008 and higher.

Methods:

<integer>GetHandleByAnim <object>

This method returns the unique AnimHandle ID for the given scene entity.

<object>GetAnimByHandle <integer>

This method returns the scene entity corresponding to the unique AnimHandle ID, or undefined if the entity has been deleted or has not been created yet.

FOR EXAMPLE:

x = teapot() --create a teapot

xHandle = GetHandleByAnim x --get the anim.handle

x_verify = GetAnimByHandle xhandle --get by anim.handle

x == x_verify --compare the two - returns true

delete x --delete the teapot

clearUndoBuffer() --object deleted completely from memory

x_verify = GetAnimByHandle xhandle --now returns undefined


Third-Party Plug-In Classes

The MAXWrapper Value classes are the core 3ds Max classes that are supported directly within MAXScript. Many of the kinds of 3ds Max objects you will work with are provided through 3rd-party plug-ins for 3ds Max, they are not built directly in to MAXScript.

For these classes, an automatic plug-in detector scans for plug-ins that MAXScript doesn't internally know about and attempts to provide MAXScript access to them. This includes new core classes in new releases of 3ds Max that MAXScript doesn't internally know about, and 3rd-party plug-ins. Not all parameters and properties of the detected plug-ins are accessible. In general, the detector will only find animatable parameters on these plug-ins, and in some cases none at all, if the plug-in uses non-standard parameter coding.

You can use the class and object inspector functions in MAXScript to browse through the 3ds Max core and 3rd-party classes accessible in MAXScript.


Interfaces

The Function Publishing System, introduced with 3ds Max version 4, is a system that allows plug-ins to publish their major functions and operations in such a way that code outside the plug-in can discover and make inquiries about these functions and is thus able to call them though a common calling mechanism. The whole system is very similar to Window’s COM and OLE Automation systems and share many similar concepts in the architecture. However, the Function Publishing System is not based on COM and OLE but instead is a custom architecture more suited and optimized for 3ds Max. The Function Publishing API serves a number of purposes, which allow third-party developers to open up important portions of their plug-ins for use by external sources, allowing for users to extend and control these directly.

Some of the purposes of the Function Publishing System are:

  • Modularizing plugin code into various "engines" that are able to supply services to other parts of 3ds Max and other third party plug-ins and can be delivered to the user through various different user-interfaces.

  • Providing automatic scriptability by exposing the published functions directly to MAXScript.

  • Providing alternate means of invoking plugin functions in the UI, such as via the manipulator system, scripted menus, quad menus, keyboard shortcuts, macroScripts, toolbar buttons, etc.

  • Allowing the MAXScript Macro Recorder to automatically generate calls to the published functions, in the event that these are invoked by the expanded ParamMap2 system or other UI mechanisms such as keyboard shortcuts or menu items.

NOTE:

For complete details on the Function Publishing System, please see the 3ds Max SDK help file topic "Function Publishing".

Interfaces

Core Interfaces

Node Interfaces

Other Interfaces

Functions are published in one or more Interfaces by a plug-in. Action functions must be published in their own set of interfaces. Each interface is represented by an instance of a class derived from the base class FPInterface. An external system can find out about the interfaces published by calling various query methods on ClassDesc that access these interface definition objects. As well as these enquiry or 'reflection' methods, an FPInterface also has the calling methods for actually invoking a particular function in the interface, so that if something has hold of one of your interfaces, it can call any of its published functions.

Action Interfaces

Action Manager

A special kind of interface is the Action Interface. These interfaces only contain UI Action Functions that provide a programmatic way of "pressing" buttons and keys in the UI for a plug-in.

Direct dot-notation properties

MAXScript exposes properties defined in this way as direct dot-notation properties on the interface. So, were before the Get/SetRadius in the example cylinder mixin would have been accessed as functions

EXAMPLE

r = $cyl01.cylMixin.getRadius()

$cyl01.cylMixin.setRadius 23

you now can use:

r = $cyl01.cylMixin.radius

$cyl01.cylMixin.radius = 23

This is true for all the types of Function Published Interfaces that exist in MAXScript - static, [ mixin ] and core. As a further optimization, MAXScript now effectively promotes all interface methods and properties to the level of the interface, so if individual methods and properties have unique names within all the interfaces of an object or class, you can omit the interface name.

The above examples could be written as

EXAMPLE

r = $cyl01.getRadius()

$cyl01.setRadius 23

and

r = $cyl01.radius

$cyl01.radius = 23

If there is a naming conflict, you can always include the interface name level to resolve this.

Published Functions and MAXScript

MAXScript automatically provides access to all functions published by a plug-in via the Function Publishing system. Each plug-in class appears in MAXScript as a MAX class object, which can be used to construct instances of the plug-in, do class tests, etc. If a plug-in publishes interfaces, they are visible in MAXScript as properties on this class object. The internal name for the interface is used as the property name. All the functions in the interface are accessible as named properties on the interface. So, if the above example interfaces were published by EditMesh, the following script fragments would work

EXAMPLE

EditMesh.faceOps.extrude $foo.mesh #{1,2,3} 10

The above script calls the Extrude function in the FaceOps interface on $foo's mesh, faces 1, 2 and 3, amount 10 units.

EditMesh.actions

Retrieves and displays the action functions. Each interface is stored as a struct definition in the class object.

EditMesh.actions.create()

Starts (or stops) the create mode. This would have the side-effect of highlighting/unhighlighting the Create button in the EditMesh rollups. Calls to Action functions in MAXScript return true if the function returns FPS_OK and false otherwise.

if EditMesh.actions.create.isChecked() then ...

The predicate functions for an Action Function are available as properties on the action function object itself, as shown. You can determine if a predicate is supplied by asking:

if EditMesh.actions.create.isChecked != undefined

Two Ways of Accessing the Interface

There are two ways to access the interface - as a standalone interface and as an interface on a particular object. If you access the interface directly, you need to pass to it the object to work on.

EXAMPLE

m = Bitmaptexture fileName:"L:\\mypath\\scenes\\2500hicon.JPG"
bitmapTex.viewImage m -- direct interface access, need to pass object
m.viewImage() -- accessing interface on object, object internally passed as arg 1.

Associated Method:

getCoreInterfaces()

Returns an array of core interface values.

EXAMPLE

The following will list all of the core interfaces:

core_interfaces = getcoreinterfaces()

for i in core_interfaces do (showinterface i; format "\n")

See also

Core Interfaces

Other Interfaces

By Reference Parameter Passing

Dereferencing Operator

Visible Class For '&' Reference Values

Action Manager

Class and Object Inspector Functions

showInterfaces Inspector Function

GetInterfaces Interface Inspector

showInterface Inspector Function

Increasing Performance when Searching for Interfaces and Methods

Auto-Wrapping Single Values in FPS Methods


Increasing Performance when Searching for Interfaces and Methods

Searching for an interface and a method in an interface can be slow. Especially when calling the same method multiple times in a loop, for example in order to affect multiple vertices, faces, normals, objects etc., performance can decrease significantly.

To speed up access to methods in interfaces, you can let MAXScript search for the interface and method once and then access the method directly in the loop.

INSTEAD OF SAYING

for i = 1 to 100 do

myObject.edit_normals.setNormal i myNormals[i]

YOU SHOULD SAY

EN_setNormal = myObject.edit_normals.setNormal -- the method

for i = 1 to 100 do

EN_setNormal i myNormals[i]

This way, the required interface and method will be searched for just once, and then accessed directly multiple times in the loop without searching.

ANOTHER WAY (NOT AS FAST AS THE ABOVE) WOULD BE

EN_mod_i = myObject.edit_normals.EditNormalsMod -- the interface

for i = 1 to 100 do

EN_mod_i.setNormal i myNormals[i]

In this case, the interface will be searched for just once, but the method will be searched for multiple times. If you intend to access many methods from the same interface, this way would be still faster than searching for both interface and method inside the loop.

See also

Interfaces

Core Interfaces

Other Interfaces


showInterfaces Inspector Function

Interfaces

Core Interfaces

Other Interfaces

showInterfaces {<maxwrapper> | <maxclass> | node} [ to:<stream> ]

where <maxwrapper> is the 3ds Max object to be inspected

and <maxclass> is the 3ds Max class to be inspected

and the optional to:<stream> keyword argument specifies a Stream Value to output the display to.

When the 3ds Max entity specified is a node (for example $box01), this function only displays the Interfaces of the base object. It does not show the Interfaces of the transform controllers, modifiers, or materials applied to the object. To display the Interfaces for one of these objects, that object must be specified as the 3ds Max entity.

As a special case, you can also call showInterfaces on the superclass 'Node' to display the interfaces that are common to all scene nodes.

The display of interface information is divided into three sections: Properties, Methods, and Actions.

In the Properties section, each property exposed by the interface is listed along with its data type or enumeration values and whether the property can be read and written to.

In the Methods section, each method is listed along with its return type and its argument list. The value type for each argument is shown. If the return type of is shown as <void>, the method returns a value of 'ok'. Methods that are used by Actions are commented as such. These methods typically require that the object be selected and active in the appropriate command panel.

In the Actions section, each Action is listed along with its category and action description as shown in the Customize User Interface dialog, and the shortcut keys, if any, assigned to the Action.

NOTE:

Refer to the MAXScript Class Hierarchy to see which objects are exposed via maxwrapper.

EXAMPLE

showinterfaces node

OUTPUT

showinterfaces node

Interface: INode

Properties:

.boneEnable : boolean : Read|Write

.posTaskWeight : float : Read|Write

.rotTaskWeight : float : Read|Write

.boneAutoAlign : boolean : Read|Write

.boneFreezeLength : boolean : Read|Write

.boneScaleType : enum : Read|Write

boneScaleType enums: {#scale|#squash|#none}

.stretchTM : matrix3 by value : Read

.boneAxis : enum : Read|Write

boneAxis enums: {#X|#Y|#Z}

.boneAxisFlip : boolean : Read|Write

.primaryVisibility : boolean : Read|Write

.secondaryVisibility : boolean : Read|Write

.applyAtmospherics : boolean : Read|Write

.vertexColorType : enum : Read|Write

vertexColorType enums: {#color|#illum|#alpha|#color_plus_illum}

.showVertexColors : integer : Read|Write

.shadeVertexColors : integer : Read|Write

.handle : DWORD : Read

Methods:

<void>setBoneEnable <boolean>onOff <time>time

<void>realignBoneToChild()

<void>resetBoneStretch()

Actions:

OK

See also

Core Interfaces

Other Interfaces

GetInterfaces Interface Inspector


getInterfaces Interface Inspector

getInterfaces {<MAXWrapper> | <MAXClass>}

getInterfaces returns an array containing the interfaces exposed by the argument.

If the argument is a node, the node level interfaces for that node are returned. If you want the interfaces for the node's base object, you need to specify <node>.baseobject as the argument.

EXAMPLE

s=sphere()

$Sphere:Sphere01 @ [0.000000,0.000000,0.000000]

converttopoly s

$Editable_Poly:Sphere01 @ [0.000000,0.000000,0.000000]

getInterfaces s

#(<MixinInterface:IAssembly>, <MixinInterface:INodeGIProperties>, <MixinInterface:INode>, <MixinInterface:INodeLayerProperties>, <MixinInterface:INodeBakeProperties>, <MixinInterface:SkinPose>)

getInterfaces s.baseobject

#(<MixinInterface:EditablePoly>)

If the argument is a MAXClass, only static interfaces for that class are returned. Typically, only utility plugin classes define static interfaces.

EXAMPLE

getInterfaces Plug_in_Manager

#(<Interface:PluginMgrAction>)

See also

getInterface Function

Class and Object Inspector Functions

Core Interfaces

Other Interfaces


showInterface Inspector Function

Interfaces

Core Interfaces

Other Interfaces

showInterface <interface> [ to:<stream> ]

where <interface> is the Interface to be inspected.

and the optional to:<stream> keyword argument specifies a Stream Value to output the display to.

This function displays the interface information of the interface supplied as parameter.

The display of interface information is divided into three sections: Properties, Methods, and Actions.

In the Properties section, each property exposed by the interface is listed along with its data type or enumeration values and whether the property can be read and written to.

In the Methods section, each method is listed along with its return type and its argument list. The value type for each argument is shown. If the return type of is shown as <void>, the method returns a value of 'ok'. Methods that are used by Actions are commented as such. These methods typically require that the object be selected and active in the appropriate command panel.

In the Actions section, each Action is listed along with its category and action description as shown in the Customize User Interface dialog, and the shortcut keys, if any, assigned to the Action.

EXAMPLE

ctrl = lookat_constraint() --create a new lookat constraint

showinterface ctrl.constraints --show the constraints interface

RESULT:

Interface: constraints

Properties:

Methods:

<index>getNumTargets()

<node>getNode <index>targetNumber

<float>getWeight <index>targetNumber

<boolean>setWeight <index>targetNumber <float>weight

<boolean>appendTarget <node>target <float>weight

<boolean>deleteTarget <index>targetNumber

Actions:

In conjunction with the getInterfaces function which returns an array of interfaces exposed by a MAXWrapper or MAXClass, the showInterface function can be used to get similar output as from the showInterfaces function.

See also

getInterfaces Interface Inspector

showInterfaces Inspector Function

Core Interfaces

Other Interfaces


getInterface Function

getInterface {<MAXWrapper> | <MAXClass>} <InterfaceNameString>

getInterface returns the interface specified by the InterfaceNameString, or undefined if the interface does not exist.

If the first argument is a node, the node-level interfaces for that node are returned. If you want the interfaces for the node's base object, you need to specify <node>.baseobject as the argument.

EXAMPLE

s=sphere()

$Sphere:Sphere01 @ [0.000000,0.000000,0.000000]

theAInterface = getInterface s "IAssembly"

<MixinInterface:IAssembly>

converttopoly s

$Editable_Poly:Sphere01 @ [0.000000,0.000000,0.000000]

theEPInterface = getInterface s "EditablePoly"

undefined

theEPInterface = getInterface s.baseobject "EditablePoly"

<MixinInterface:EditablePoly>

If the argument is a MAXClass, only static interfaces for that class are returned. Typically, only utility plugin classes define static interfaces.

EXAMPLE

getInterface Plug_in_Manager "PluginMgrAction"

<Interface:PluginMgrAction>

See also

GetInterfaces Interface Inspector

Class and Object Inspector Functions

Core Interfaces

Other Interfaces


Core Interfaces

The following Core Interfaces are exposed to MAXScript using the Function Publishing System introduced with 3ds Max 4. Interfaces in italic expose no properties, methods or actions.

A
ActionItemOverrideManager | AnimLayerManager | ATSCustomDepsOps
ATSOps | actionMan | assemblyMgr
autosave | AssignVertexColors |
B
batchRenderMgr | BitmapLayerManager | BoneSys
browserMgr | BipAnalyzer | BipFilter
BipFixer | BipWorkBench | BitmapProxyMgr
BrushPresetMgr | blockMgr |
C
cmdPanel | colorMan | ChannelInfo
custAttribCollapseManager |  |
D
dxshadermanager | dragAndDrop | DaylightSystemFactory
defaultActions | DialogMonitorOPS | DaylightSimulationUIOps
DaylightSimulationUtilities | DaylightSystemFactory2 |
E
EditRenderRegion |  |
F
FileLinkMgr | FlowRaytraceInterface | FrameTagManager
G
globalDXDisplayManager | gridPrefs |
H
HDIKSys | heightManager | Hair
I
IKSys | IViewportShadingMgr | IRTShadeTreeCompiler
ITabDialogManager | InstanceMgr | InterfaceIDRegistry
IDisplayGamma | iParserLoader |
imerge | IRTShadeTreeCompiler |
L
LayerManager | LightingUnits | LoadSaveAnimation
LuminosityUtil | LightingAnalysisOverlayFactory | LightMeterManager
M
manip | maxOps | medit
MemStreamMgr | MaxNetWorkerInterface | msZip
MXSDebugger | mental_ray_Public_Interface | menuMan
MtlBrowserFilter_Manager | mental_ray_Preferences |
N
netrender | NetCreateHelpers | NullInterface
NetworkManager |  |
O
objXRefs | objXRefMgr |
P
paramWire | pluginManager | particleFlow
ParamCollectorOps | ProjectionIntersectorMgr | PseudoColorManager
PaintSoftSelPresetContext | ProjectionRenderMgr |
Q
quadMenuSettings |  |
R
RadiosityPreferences | radiosityMeshOps | refhierarchy
reactionMgr | renderpresets | RingArray
RenderEnhancements | rollup |
S
s3dexporter | SceneExplorerManager | SceneExposureControl
SceneRadiosity | sceneStateMgr | SceneEffectLoader
SchematicViews | StatusPanel | simpleFaceManager
SkinUtils | SubstManager | SteeringWheelsOps
srr_exports | styleMgr |
T
timeSlider | tmGizmos | TrackSelectionSets
trackviews |  |
U
UtilityPanel | UIAccessor |
V
visualMS | ViewCubeOps |
W
walkThroughOps | WorkingPivot |
X
XMLMaterial |  |

See also

Interfaces

Node Interfaces

Other Interfaces

Class and Object Inspector Functions

showInterface Inspector Function

GetInterfaces Interface Inspector

showInterface Inspector Function


Interface: ActionItemOverrideManager

Interfaces > Core Interfaces > ActionItemOverrideManager

The ActionItemOverrideManager Core Interface exposes the keyboard shortcuts overriding mechanism to MAXScript.

The Action Item Override lets the user temporarily override the current mode with one of the Action supporting Overriding (shown in bold in the Customize User Interface dialog) by pressing and holding the key while performing the action, then releasing to exit the override mode.

Available in 3ds Max 2008 and higher.

Interface: ActionItemOverrideManager

Properties:

ActionItemOverrideManager.overridesActive : boolean : Read|Write

When set to true (default), the Action Item Override is enabled. When set to false, the Override will be turned off.

ActionItemOverrideManager.timeToStartOverride : float : Read|Write

Get/set the time in seconds before the override kicks in. Default is 0.1.

These properties correspond to the controls found in the Customize User Interface dialog > Keyboard tab:

Left: Rotate in local coordinate system. Right: Pressing and holding the custom Use Working Pivot keyboard shortcuts overrides the current mode and switches to using the working pivot coordinate system.

The Viewport shows the mode and the keyboard shortcut being pressed.

Releasing the keys returns the system to local coordinate rotation.

Pressing the same shortcut and releasing within the time defined by ActionItemOverrideManager.timeToStartOverride switches to the Use Working Pivot mode permanently - the viewport hint helps the user exit the mode.

See also

Core Interfaces


Interface: actionMan

Interfaces > Core Interfaces > actionMan

Action Manager

All Action Items are macro recorded when executed. This includes main menus items, CUI buttons, keyboard shortcuts and quad menu items.

<boolean>actionMan.executeAction <integer>tableId <string>persistentId

Executes the action specified by the table ID and persistent ID. Returns True if successful and false otherwise. You can get an action's IDs by enabling the MacroRecorder and performing actions in the 3ds Max User Interface. Actions that can be performed only via the actionMan interface will appear as actionMan.executeAction calls with the corresponding IDs.

FOR EXAMPLE

  • Enable MacroRecorder

  • Go to Main Menu > Tools > Selection Floater.

  • The MacroRecorder will display the code:

actionMan.executeAction 0 "40266" -- Selection: Selection Floater

<boolean>actionMan.loadKeyboardFile <filename>file

Loads the keyboard shortcuts settings from the specified file. Returns True if successful and false otherwise.

<boolean>actionMan.saveKeyboardFile <filename>file

Saves the keyboard shortcuts settings to the specified filename. Returns True if successful and false otherwise.

<filename>actionMan.getKeyboardFile()

Returns the filename of the current keyboard shortcuts file.

EXAMPLE

actionMan.getKeyboardFile()

"C:\Program Files\Autodesk\3ds Max 2008\UI\MaxStartUI.kbd"

See also

Action Manager

The Macro Recorder

Defining Macro Scripts

The MAXScript Listener Window

Turning On the Listener Log

Listener Commands


Interface: AnimLayerManager

Interfaces > Core Interfaces > AnimLayerManager

This Core Interface exposes the Animation Layer Manager to MAXScript.

Available in 3ds Max 9 and higher.

Properties:

AnimLayerManager.filterActiveOnly : bool : Read|Write

Get/Set the state of the Filter Active Only option.

AnimLayerManager.justUpToActive : bool : Read|Write

Get/Set the state of the Just Up To Active option.

Methods:

<void>AnimLayerManager.showAnimLayersManagerToolbar <bool>show

Show/hide the Animation Layers Manager toolbar. When the argument is true, the toolbar will be displayed. When the argument is false, the toolbar will be hidden.

FOR EXAMPLE

AnimLayerManager.showAnimLayersManagerToolbar true --show the toolbar

AnimLayerManager.showAnimLayersManagerToolbar false --hide the toolbar

<integer>AnimLayerManager.enableLayersDlg <&node array>nodes

nodes is In and Out parameter

Shows the Enable Anim Layers dialog for the specified objects.

<integer>AnimLayerManager.enableLayers <&node array>nodes pos:<boolean> rot:<boolean> scale:<boolean> ik:<boolean> object:<boolean> customAtt:<boolean> mod:<boolean> mat:<boolean> other:<boolean>

nodes is In and Out parameter

pos default value: true

rot default value: true

scale default value: true

ik default value: false

object default value: false

customAtt default value: false

mod default value: false

mat default value: false

other default value: false

Enables the Animation Layers for the specified objects without user interaction via the Enable Anim Layers dialog. The optional keyword parameters can be used to enable or disable animation layers for the given track types.

<boolean>AnimLayerManager.canEnableLayer <maxObject>anim <maxObject>client <index>subNum

Returns true if the Animation Layer can be enabled for the specified object and track, false otherwise.

<boolean>AnimLayerManager.enableLayer <maxObject>anim <maxObject>client <index>subNum

Enables the Animation Layer for the specified object and track. Returns true on success, false on failure.

<index>AnimLayerManager.getLayerCount()

Returns the number of layers.

<index array>AnimLayerManager.getNodesLayers <&node array>nodes

nodes is In and Out parameter

Returns an array of indices representing the layers used by the specified nodes.

<void>AnimLayerManager.setLayerActive <index>listIndex

listIndex Validated by Validator function

Sets the indexed layer as the current layer.

<void>AnimLayerManager.setLayerActiveNodes <index>listIndex <&node array>nodes

listIndex Validated by Validator function

nodes is In and Out parameter

Sets the active nodes for the indexed layer to the by-reference array of nodes.

<index array>AnimLayerManager.getActiveLayersNodes <&node array>nodes

nodes is In and Out parameter

Writes the active layers nodes into the by-reference array of nodes. Returns an array of layer indices.

<void>AnimLayerManager.getNodesActiveLayer <&node array>nodes

nodes is In and Out parameter

Returns the nodes using the active layer into the by-reference array of nodes.

<void>AnimLayerManager.addLayer <&TSTR>name <&node array>nodes <bool>useActiveControllerType

name is In and Out parameter

nodes is In and Out parameter

Adds a layer with the given name to the nodes specified by the second argument. The third argument controls whether to use the active controller type.

<void>AnimLayerManager.addLayerDlg <&node array>nodes

nodes is In and Out parameter

Opens the Add Layer dialog.

<void>AnimLayerManager.deleteLayer <index>listIndex

listIndex Validated by Validator function

Deletes the indexed Animation Layer.

<void>AnimLayerManager.deleteLayerNodes <index>listIndex <&node array>nodes

listIndex Validated by Validator function

nodes is In and Out parameter

Deletes the indexed Animation Layer from the specified scene nodes.

<void>AnimLayerManager.copyLayerNodes <index>listIndex <&node array>nodes

listIndex Validated by Validator function

nodes is In and Out parameter

Copies the indexed Animation Layer from the specified scene nodes.

<void>AnimLayerManager.pasteLayerNodes <index>listIndex <&node array>nodes

listIndex Validated by Validator function

nodes is In and Out parameter

Pastes the copied Animation Layer into the specified scene nodes at the indexed position.

<String by value>AnimLayerManager.getLayerName <index>listIndex

listIndex Validated by Validator function

Returns the name of the indexed Animation Layer.

<void>AnimLayerManager.setLayerName <index>listIndex <String by value>name

listIndex Validated by Validator function

Sets the name of the indexed Animation Layer to the given string.

<float>AnimLayerManager.getLayerWeight <index>listIndex <time>atTime

listIndex Validated by Validator function

Returns the weight of the indexed Animation Layer.

<void>AnimLayerManager.setLayerWeight <index>listIndex <time>atTime <float>weight

listIndex Validated by Validator function

Sets the weight of the indexed Animation Layer to the given value.

<bool>AnimLayerManager.getLayerMute <index>listIndex

listIndex Validated by Validator function

Returns the Mute state of the indexed Animation Layer as a boolean value.

<void>AnimLayerManager.setLayerMute <index>listIndex <bool>mute

listIndex Validated by Validator function

Sets the Mute state of the indexed Animation Layer to the given boolean value.

<bool>AnimLayerManager.getLayerOutputMute <index>listIndex

listIndex Validated by Validator function

Returns the Output Mute state of the indexed Animation Layer as a boolean value.

<void>AnimLayerManager.setLayerOutputMute <index>listIndex <bool>mute

listIndex Validated by Validator function

Sets the Output Mute state of the indexed Animation Layer to the given boolean value.

<void>AnimLayerManager.collapseLayerNodes <index>listIndex <&node array>nodes

listIndex Validated by Validator function

nodes is In and Out parameter

Collapses the indexed Animation Layer of the given scene nodes.

<void>AnimLayerManager.disableLayerNodes <&node array>nodes

nodes is In and Out parameter

Disables the Animation Layers of the given scene nodes.

<void>AnimLayerManager.animLayerPropertiesDlg()

Opens the Layer Properties dialog.

<void>AnimLayerManager.SetCollapseControllerType <enum>controllerType

controllerType enums: {#Bezier|#Linear|#Default}

Sets the Controller Type to collapse to. Corresponds to the radio buttons in the Layer Properties dialog.

<enum>AnimLayerManager.GetCollapseControllerType()

GetCollapseControllerType enums: {#Bezier|#Linear|#Default

Returns the Controller Type to collapse to. Corresponds to the radio buttons in the Layer Properties dialog.

<void>AnimLayerManager.SetCollapsePerFrame <bool>keyable

Sets whether to collapse to keys only when possible (false) or to keys per frame (true). Note that this value is the inverse of the checkbox' state in the Layer Properties dialog.

<bool>AnimLayerManager.GetCollapsePerFrame()

Returns whether to collapse to keys only when possible (false) or to keys per frame (true). Note that this value is the inverse of the checkbox' state in the Layer Properties dialog.

<void>AnimLayerManager.SetCollapsePerFrameActiveRange <bool>activeRange

Sets whether to collapse the active range (true) or the user-defined range (false). Corresponds to the radio buttons in the Layer Properties dialog > Per Frame Collapse Range.

<bool>AnimLayerManager.GetCollapsePerFrameActiveRange()

Get whether to collapse the active range (true) or the user-defined range (false). Corresponds to the radio buttons in the Layer Properties dialog > Per Frame Collapse Range.

<void>AnimLayerManager.SetCollapseRange <interval>range

Sets the Collapse Range to the given interval value. Corresponds to the value spinners in the Layer Properties dialog > Per Frame Collapse Range.

<interval>AnimLayerManager.GetCollapseRange()

Returns the Collapse Range interval value. Corresponds to the value spinners in the Layer Properties dialog > Per Frame Collapse Range.


Interface: assemblyMgr

Interfaces > Core Interfaces > assemblyMgr

Represents the interface to the Assembly Manager. Used to put objects together to Assemblies, test and manipulate the Assemblies.

Methods:

<node>assemblyMgr.Assemble <node array>nodes [name:<string>] [classDesc:<class>] [select:<bool>]

name default value: undefined

classDesc default value: undefined

select default value: true

Create a new Assembly using the nodes in the <node array>.

A Create Assembly dialog will be displayed if either the name or the classDesc is not specified. The classDesc is passed a MAXClass, an instance of which will be used as the assembly head. This MAXClass must be for a helper object. You can create a scripted plugin that extends helper to use as assembly head, exposing the properties you desire for the assembly head.

NOTE:

In Autodesk VIZ, the category for the scripted plugin must be "Assembly Heads" in order for the class to appear in the Create Assembly dialog. In 3ds Max, all helper classes will appear in the dialog.

EXAMPLE

object1 = Cylinder() --create a cylinder

$Cylinder:Cylinder01 @ [0.000000,0.000000,0.000000]

object2 = Box() --create a box

$Box:Box01 @ [0.000000,0.000000,0.000000]

object3 = OmniLight()

$Omni_Light:Omni01 @ [0.000000,0.000000,0.000000]

obj_array = #(object1, object2, object3)

#($Cylinder:Cylinder01 @ [0.000000,0.000000,0.000000], $Box:Box01 @ [0.000000,0.000000,0.000000], $Omni_Light:Omni01 @ [0.000000,0.000000,0.000000])

--Create a new Assembly out of the objects, name it Test01 and use

--a Dummy as the head. new_ass will contain the assembly head.

new_ass = assemblyMgr.assemble obj_array name:"Test01" classDesc:Dummy

$Dummy:Test01 @ [0.000000,0.000000,-8.000000]

<bool>assemblyMgr.Disassemble <node array>nodes

Disassembles the specified nodes. Returns true on success.

EXAMPLE

--Continuing with the assmbly from the above example...

obj_array

#($Cylinder:Cylinder01 @ [0.000000,0.000000,0.000000], $Box:Box01 @ [0.000000,0.000000,0.000000], $Omni_Light:Omni01 @ [0.000000,0.000000,0.000000])

--We cannot disassemble the original array because it does not

--contain the head object!

assemblyMgr.Disassemble obj_array

false

--Let’s append the head to the array and try again...

append obj_array $Test01

#($Cylinder:Cylinder01 @ [0.000000,0.000000,0.000000], $Box:Box01 @ [0.000000,0.000000,0.000000], $Omni_Light:Omni01 @ [0.000000,0.000000,0.000000], $Dummy:Test01 @ [0.000000,0.000000,-8.000000])

--Now that we supplied all objects of the assembly,

--the Disassemble method worked.

assemblyMgr.Disassemble obj_array

true

<bool>assemblyMgr.Open <node array>nodes [clearSelection:<bool>]

clearSelection default value: true

Opens the the specified nodes. Returns true on success. When clearSelection is supplied as false, the selection will not be cleared.

<bool>assemblyMgr.Close <node array>nodes [select:<bool>]

select default value: true

Closes the the specified nodes. Returns true on success.

<bool>assemblyMgr.Explode <node array>nodes

Explodes the specified nodes. Returns true on success.

<bool>assemblyMgr.Attach <node array>nodes [assembly:<node>]

assembly default value: undefined

Attach the specified nodes to the assembly. Returns true on success.

<bool>assemblyMgr.Detach <node array>nodes

Detaches the specified nodes from the assembly. Returns true on success.

<bool>assemblyMgr.CanAssemble <node array>nodes

Returns true if the <node array> contains nodes that can be assembled.

<bool>assemblyMgr.CanDisassemble <node array>nodes

Returns true if the <node array> contains nodes that can be disassembled.

<bool>assemblyMgr.CanExplode <node array>nodes

Returns true if the <node array> contains nodes that can be exploded.

<bool>assemblyMgr.CanOpen <node array>nodes

Returns true if the <node array> contains nodes that can be opened.

<bool>assemblyMgr.CanClose <node array>nodes

Returns true if the <node array> contains nodes that can be closed.

<bool>assemblyMgr.CanAttach <node array>nodes assembly:<node>

assembly default value: undefined

Returns true if the nodes in <node array> can be attached to the assembly

<bool>assemblyMgr.CanDetach <node array>nodes

Returns true if the nodes in <node array> can be detached

<node>assemblyMgr.IsAssembly <node array>nodes

Returns the Head Node of the Assembly comprised by the nodes specified by <node array> , or undefined if the nodes do not form an Assembly.

<bool>assemblyMgr.FilterAssembly <node>assemblyHead <value>filterSClassID <&node array>filteredNodes

filteredNodes is Out parameter

Filters all nodes of the specified superclass that are contained in the assembly with the specified head and passes them out to the supplied filterNodes array. Returns true on success.

EXAMPLES

--Assembly contains a Cylinder,a Box and a Dummy Helper as head:

test_array = #($Box01, $Cylinder01)

#($Box:Box01 @ [0.000000,0.000000,0.000000], $Cylinder:Cylinder01 @ [0.000000,0.000000,0.000000])

--Check for assembly with the lights only

assemblyMgr.IsAssembly test_array

undefined

--Now check with all assembly nodes including the Head

test_array = #($Box01, $Cylinder01, $Omni01, $Test01)

#($Box:Box01 @ [0.000000,0.000000,0.000000], $Cylinder:Cylinder01 @ [0.000000,0.000000,0.000000], $Omni_Light:Omni01 @ [0.000000,0.000000,0.000000], $Dummy:Test01 @ [0.000000,0.000000,-8.000000])

a_head = assemblyMgr.IsAssembly test_array

$Dummy:Test01 @ [0.000000,0.000000,-8.000000]

--a_head now contains the Head of the Assembly containing the above objects!

--Find all light objects in assembly a_head

AssemblyMgr.FilterAssembly a_head Light &lightnodes

true

-- lightnodes now contains all nodes corresponding to objects of superclass Light

lightnodes

#($Omni_Light:Omni01 @ [0.000000,0.000000,0.000000])

--Find all camera objects in assembly a_head

AssemblyMgr.FilterAssembly a_head Camera &camnodes

true

--There are no cameras in the assembly!

camnodes

#()

See also

Interface:IAssembly


Interface: AssignVertexColors

Interfaces > Core Interfaces > AssignVertexColors

This Core Interface lets you assign vertex colors to any number of nodes.

Methods:

<integer>AssignVertexColors.ApplyNodes <node array>nodes [vertexPaint:<maxObject>]

vertexPaint default value: undefined

Assigns vertex colors to the specified nodes array.

If you already have a VertexPaint modifier applied to the nodes and want to assign colors into the existing modifier, supply the optional VertexPaint: parameter, where MaxObject is the VertexPaint modifier and nodes is an array of nodes on which the modifier is applied, or a subset of those nodes.

See also

VertexPaint : Modifier

Vertex_Paint_Floater : ReferenceTarget


Interface: ATSCustomDepsOps

Interfaces > Core Interfaces > ATSCustomDepsOps

A Core Interface to access Custom Dependencies in the Asset Tracking System.

Available in 3ds Max 8 and higher.

Interface: ATSCustomDepsOps

Methods:

<void>ATSCustomDepsOps.LaunchDialog()

Opens the Custom Dependencies dialog.

<integer>ATSCustomDepsOps.NumFiles()

Returns the number of files in the Custom Dependencies dialog.

<integer>ATSCustomDepsOps.GetFiles <&filename array>FileList

FileList is In and Out parameter

Gets the files into the by-reference FileList array. Returns the number of returned files as result.

<integer>ATSCustomDepsOps.AddFile <filename>Filename

Gets the specified file to the list. Returns the index of the new file.

<bool>ATSCustomDepsOps.SetFile <index>Index <filename>Filename

Sets the indexed file to the specified filename. Returns true on success, false otherwise.

<integer>ATSCustomDepsOps.RemoveFileByIndex <index>Index

Removes the specified file by index.

<integer>ATSCustomDepsOps.RemoveFileByName <filename>Filename

Removes the specified file by name.

<void>ATSCustomDepsOps.RemoveAll()

Removes all files.


Interface: ATSOps

Interfaces > Core Interfaces > ATSOps

This Core Interface provided access to the Asset Tracking System.

Available in 3ds Max 8 and higher.

Interface: ATSOps

Properties:

ATSOps.Visible : bool : Read|Write

Get/set the visibility of the Asset Tracking dialog.

ATSOps.Silent : bool : Read|Write

Get/set the silent mode of the Asset Tracking dialog.

ATSOps.Disabled : bool : Read|Write

Enable/disable asset tracking. Corresponds to the Options>Disable Asset Tracking menu item in the Asset Tracking dialog.

ATSOps.AutoLogin : bool : Read|Write

Enable/disable auto-login. Corresponds to the Options>Auto Login menu item in the Asset Tracking dialog.

ATSOps.TreeView : bool : Read|Write

Enable/disable tree view display. Corresponds to the Options>Tree View menu item in the Asset Tracking dialog. If in table view and the .TreeView property has been set to true, the .TableView property will be set to false automatically.

ATSOps.TableView : bool : Read|Write

Enable/disable table view display. Corresponds to the Options>Table View menu item in the Asset Tracking dialog. If in tree view and the .TableView property has been set to true, the .TreeView property will be set to false automatically.

ATSOps.DisplayExcluded : bool : Read|Write

Enable/disable the display of exclused files. Corresponds to the Options>Display Excluded Files item in the Asset Tracking dialog.

ATSOps.ExcludeOutputFiles : bool : Read|Write

Enable/disable the exclusion of output files. Corresponds to the Options>Exclude Output Files item in the Asset Tracking dialog.

ATSOps.CheckNetworkPaths : bool : Read|Write

Enable/disable the checking of network paths. Available in 3ds Max 9 and higher.

Methods:

<integer>ATSOps.NumFilesSelected()

Returns the number of selected files.

<integer>ATSOps.GetSelectedFiles <&string array>FileList

FileList is In and Out parameter

Returns the selected files into the by-reference FileList array.

<integer>ATSOps.NumFiles()

Returns the total number of files.

<integer>ATSOps.GetFiles <&string array>FileList

FileList is In and Out parameter

Returns all files into the by-reference FileList array.

<integer>ATSOps.GetDependentFiles <string>Filename <bool>Recurse <&string array>FileList

FileList is In and Out parameter

Returns the dependent files of the specified filename into the by-reference FileList array. If the Recurse boolean parameter is set to true, also recourses through all collected files, collecting their dependent files too.

<void>ATSOps.SelectFiles <&string array>FileList

FileList is In and Out parameter

Selects the files specified by the by-reference FileList array.

<void>ATSOps.ClearSelection()

Clears the selection.

<void>ATSOps.Refresh()

Refreshes the Asset Tracking dialog.

<void>ATSOps.ShowPromptsDialog()

Opens the Prompts dialog.

<void>ATSOps.ShowWorkingCommentDialog()

Opens the Working Comment dialog. Corresponds to the File>Working Comment... option in the Asset Tracking dialog's menu.

<void>ATSOps.ShowStatusLogDialog()

Opens the Asset Tracking Log dialog.

<integer>ATSOps.NumProviders()

Returns the number of providers.

<string>ATSOps.GetProviderName <index>ProviderIndex

Returns the name of the indexed provider as string. If the index is less than 1 and higher than the number of available providers, returns undefined.

<index>ATSOps.GetActiveProvider()

Returns the index of the active provider. If the index is less than 1 and higher than the number of available providers, returns undefined.

<void>ATSOps.SetActiveProvider <index>ProviderIndex

Sets the the active provider to the indexed provider.

<void>ATSOps.Login <index>ProviderIndex

Logs in the indexed provider. Corresponds to the Server>Log in... option in the Asset Tracking dialog's menu.

<void>ATSOps.Logout <index>ProviderIndex

Logs out the indexed provider. Corresponds to the Server>Log out option in the Asset Tracking dialog's menu.

<bool>ATSOps.IsFileExcluded <index>ProviderIndex <string>Filename

Returns true if the specified file is excluded from the indexed provider, false otherwise.

<bool>ATSOps.IsInitialized <index>ProviderIndex

Returns true if the indexed provider is initialized, false otherwise.

<bool>ATSOps.IsProjectOpen <index>ProviderIndex

Returns true if a project is open for the indexed provider, false otherwise.

<void>ATSOps.LaunchOptions <index>ProviderIndex

Opens the Options dialog of the indexed provider. Corresponds to the Server>Options... option in the Asset Tracking dialog's menu.

<void>ATSOps.LaunchProvider <index>ProviderIndex

Launches the indexed provider. Corresponds to the Server>Launch Provider... option in the Asset Tracking dialog's menu.

<void>ATSOps.OpenFromVault()

Opens from Autodesk Vault.

<void>ATSOps.OpenProject <index>ProviderIndex <filename>ProjectPath

Opens the specified project using the indexed provider.

The call to atsops.openproject() is required in order to stay compliant with MSSCC and 3rd party providers like Perforce, Alienbrain, VSS etc. For consistency, Autodesk Vault also requires a call to atsops.openproject() if no scene file is open in 3ds Max.

FOR EXAMPLE:

atsops.login 2 --using the second provider...

atsops.openproject 2 "C:\\myVault\\3dsmax\\DWFTest" --open the project

fl = #("C:\\myVault\\3dsmax\\DWFTest\\noload.max") --define a file list

atsops.addfiles 2 fl "comment" --add the file list

atsops.logout 2 --log out from the second provider

<void>ATSOps.CloseProject <index>ProviderIndex

Closes the current project in the indexed provider.

<void>ATSOps.GetFromProvider <index>ProviderIndex <string>FilterName <string>FilterExtensions <bool>AddAllFilesFilter <bool>MultiSelect <bool>Download <&string array>FileList

FileList is In and Out parameter

Gets files from the indexed provider using the specified filterName and filterExtensions strings. If the AddAllFilesFilter parameter is supplied as true, adds all files. If MultiSelect is supplied as true, allows multiple selections. The FileList array passed by-reference will contain the resulting list of files returned by the provider.

<bool>ATSOps.TestFileStatus <index>ProviderIndex <string>Filename <enum>Status

Status enums: {#Unknown|#NotControlled|#Controlled|#CheckedOut|#CheckedOutOther|#OutOfDate|#Deleted|#Missing|#Modified|#CanCheckin|#CanCheckout|#CanUndoCheckout|#CanGetLatest|#CanAddFile|#CanShowHistory|#CanShowProperties}

Returns true if the specified file has the supplied status on the indexed provider.

<void>ATSOps.GetFilesByStatus <index>ProviderIndex <enum>Status <&string array>FileList

Status enums: {#Unknown|#NotControlled|#Controlled|#CheckedOut|#CheckedOutOther|#OutOfDate|#Deleted|#Missing|#Modified|#CanCheckin|#CanCheckout|#CanUndoCheckout|#CanGetLatest|#CanAddFile|#CanShowHistory|#CanShowProperties}

FileList is In and Out parameter

Returns all files that have the supplied status on the indexed provider into the by-reference FileList array.

<bool>ATSOps.Checkin <index>ProviderIndex <&string array>FileList <&TSTR>Comment

FileList is In and Out parameter

Comment is In and Out parameter

Checks in the files specified by the by-reference FileList array of strings using the by-reference Comment string into the indexed provider.

In 3ds Max 9 and higher, returns true if the action can be performed, false otherwise.

NOTE:

The return value does NOT indicate whether the operation succeeded or failed- if you need that level of verification, you should call ATSOps.GetFileStatus() or ATSOps.Refresh() for a server update.

<bool>ATSOps.Checkout <index>ProviderIndex <&string array>FileList <&TSTR>Comment

FileList is In and Out parameter

Comment is In and Out parameter

Checks out the files specified by the by-reference FileList array of strings using the by-reference Comment string into the indexed provider.

In 3ds Max 9 and higher, returns true if the action can be performed, false otherwise.

NOTE:

The return value does NOT indicate whether the operation succeeded or failed- if you need that level of verification, you should call ATSOps.GetFileStatus() or ATSOps.Refresh() for a server update.

<bool>ATSOps.UndoCheckout <index>ProviderIndex <&string array>FileList

FileList is In and Out parameter

Undoes the check out of the files specified by the by-reference FileList array of strings on the indexed provider.

In 3ds Max 9 and higher, returns true if the action can be performed, false otherwise.

NOTE:

The return value does NOT indicate whether the operation succeeded or failed- if you need that level of verification, you should call ATSOps.GetFileStatus() or ATSOps.Refresh() for a server update.

<bool>ATSOps.GetLatest <index>ProviderIndex <&string array>FileList

FileList is In and Out parameter

Gets the latest version of the files specified by the by-reference FileList array of strings from the indexed provider. Corresponds to the File>Get Latest option in the Asset Tracking dialog's menu.

In 3ds Max 9 and higher, returns true if the action can be performed, false otherwise.

NOTE:

The return value does NOT indicate whether the operation succeeded or failed- if you need that level of verification, you should call ATSOps.GetFileStatus() or ATSOps.Refresh() for a server update.

<bool>ATSOps.AddFiles <index>ProviderIndex <&filename array>FileList <&TSTR>Comment IsHidden:<&bool array>

FileList is In parameter

Comment is In and Out parameter

IsHidden default value: #()

IsHidden is In parameter

Adds the files specified by the by-reference FileList array of strings to the indexed provider, using the by-reference Comment string.

In 3ds Max 9 and higher, returns true if the action can be performed, false otherwise.

NOTE:

The return value does NOT indicate whether the operation succeeded or failed- if you need that level of verification, you should call ATSOps.GetFileStatus() or ATSOps.Refresh() for a server update.

<void>ATSOps.Properties <index>ProviderIndex <&string array>FileList

FileList is In and Out parameter

Opens the Properties... dialog for the files specified by the by-reference FileList array of strings with the indexed provider. Corresponds to the File>Properties... option in the Asset Tracking dialog's menu.

<void>ATSOps.ShowHistory <index>ProviderIndex <&string array>FileList

FileList is In and Out parameter

Opens the History... dialog for the files specified by the by-reference FileList array of strings with the indexed provider. Corresponds to the File>History... option in the Asset Tracking dialog's menu.

The following 8 methods are implemented as menu utility functions which return true when a file is selected in the ATS dialog and the corresponding operation can be performed. When automating ATS functionality using MAXScript, these methods will generally return false! You can use the atsops.TestFileStatus() method to perform these tests as described in the notes below.

<bool>ATSOps.CanCheckin()

Returns true if checking in is possible in the ATS dialog, false otherwise.

NOTE:

To test whether the atsops.Checkin() method can be called successfully, you should use

atsops.TestFileStatus providerIndex filename #CanCheckin

<bool>ATSOps.CanCheckout()

Returns true if checking out is possible in the ATS dialog, false otherwise.

NOTE:

To test whether the atsops.Checkout() method can be called successfully, you should use

atsops.TestFileStatus providerIndex filename #CanCheckout

<bool>ATSOps.CanUndoCheckout()

Returns true if checking out can be undone in the ATS dialog, false otherwise.

NOTE:

To test whether the atsops.undoCheckout() method can be called successfully, you should use

atsops.TestFileStatus providerIndex filename #CanUndoCheckout

<bool>ATSOps.CanGetLatest()

Returns true if getting latest is possible in the ATS dialog, false otherwise.

NOTE:

To test whether the atsops.getLatest() method can be called successfully, you should use

atsops.TestFileStatus providerIndex filename #CanGetLatest

<bool>ATSOps.CanAddFiles()

Returns true if adding files is possible in the ATS dialog, false otherwise.

NOTE:

To test whether the method atsops.addFiles() can be called successfully, you should use

atsops.TestFileStatus providerIndex filename #CanAddFile

<bool>ATSOps.CanProperties()

Returns true if getting the properties is possible in the ATS dialog, false otherwise.

NOTE:

To test whether the method atsops.Properties() can be called successfully, you should use

atsops.TestFileStatus providerIndex filename #CanProperties

<bool>ATSOps.CanShowHistory()

Returns true if showing history is possible in the ATS dialog, false otherwise.

NOTE:

To test whether the method atsops.showHistory() can be called successfully, you should use

atsops.TestFileStatus providerIndex filename #CanShowHistory

<bool>ATSOps.CanGetFromProvider <index>ProviderIndex

Returns true if getting from provider is possible in the ATS dialog, false otherwise.

<void>ATSOps.CheckForDependentFiles <index>ProviderIndex <string>Filename

Checks for files dependent on the supplied file in the indexed provider.

<void>ATSOps.CheckForCheckedOutFiles <index>ProviderIndex

Checks for checked out files in the indexed provider.

<void>ATSOps.CheckForUnControlledFiles <index>ProviderIndex

Checks for uncontrolled files in the indexed provider.

<void>ATSOps.CheckForOutDatedFiles <index>ProviderIndex

Checks for outdated files in the indexed provider.

<void>ATSOps.CheckForSceneFileCheckOut <index>ProviderIndex

Checks for scene file check-out in the indexed provider.

<void>ATSOps.SetWorkingComment <string>Comment

Sets the working comment to the supplied string.

<string>ATSOps.GetWorkingComment()

Returns the working comment as string.

<void>ATSOps.AppendStatusLog <string>Status

Adds the supplied string to the Status Log.

<void>ATSOps.ClearStatusLog()

Clears the Status Log.

<string>ATSOps.GetStatusLog()

Returns the Status Log as string.

<bool>ATSOps.RegisterNotification <value>Callback <integer>ID

Registers a notification callback with the specified integer ID.

<void>ATSOps.UnRegisterNotification <integer>ID

Unregisters the notification callback with the specified integer ID.

<enum>ATSOps.GetNotificationID()

GetNotificationID enums: {#NotifyPreLogin|#NotifyPostLogin|#NotifyPreLogout|#NotifyPostLogout|#NotifyPreOpenProject|#NotifyPostOpenProject|#NotifyPreCloseProject|#NotifyPostCloseProject|#NotifyPreLaunchOptions|#NotifyPostLaunchOptions|#NotifyPreLaunchProvider|#NotifyPostLaunchProvider|#NotifyPreCheckin|#NotifyPostCheckin|#NotifyPreCheckout|#NotifyPostCheckout|#NotifyPreUndoCheckout|#NotifyPostUndoCheckout|#NotifyPreAddFiles|#NotifyPostAddFiles|#NotifyPreGetLatest|#NotifyPostGetLatest|#NotifyPreProperties|#NotifyPostProperties|#NotifyPreShowHistory|#NotifyPostShowHistory|#NotifyFileListUpdate|#NotifyPreExploreProvider|#NotifyPostExploreProvider

Returns the notification ID.

<integer>ATSOps.GetNotificationFileList <&string array>FileList

FileList is In and Out parameter

Writes the notification file list into the by-reference array of strings.

<bool>ATSOps.AddAttachmentToNotificationFileListEntry <index>FileListIndex <string>Filename

Adds the file specified by the supplied Filename string as an attachment to the indexed file in the notification file list.

<bool>ATSOps.IsNotificationCancelled()

Returns true if notification was cancelled, false otherwise.

<bool>ATSOps.AddFileToNotificationFileList <string>Filename

Adds the supplied file name string to the notification file list. Returns true on success, false otherwise.

<bool>ATSOps.RemoveFileFromNotificationFileList <index>FileListIndex

Removes the indexed file name from the notification file list. Returns true on success, false otherwise.

<bool>ATSOps.SetPathOnSelection <filename>NewPath CreateOutputFolder:<bool>

CreateOutputFolder default value: false

Assigns the new path to the selection. If the optional CreateOutputFolder keyword parameter is supplied and is true, the new path will be created if it does not exist.

<bool>ATSOps.RetargetCommonRootOfSelection <filename>NewPath CreateOutputFolder:<bool>

CreateOutputFolder default value: false

Retargets the root of the selection to the new path. If the optional CreateOutputFolder keyword parameter is supplied and is true, the new path will be created if it does not exist.

<bool>ATSOps.RetargetSelection <filename>NewPath CreateOutputFolder:<bool>

CreateOutputFolder default value: false

Retargets the selection to the new path. If the optional CreateOutputFolder keyword parameter is supplied and is true, the new path will be created if it does not exist.

<bool>ATSOps.SetPath <filename>NewPath CreateOutputFolder:<bool>

CreateOutputFolder default value: false

Sets the new path. If the optional CreateOutputFolder keyword parameter is supplied and is true, the new path will be created if it does not exist.

<bool>ATSOps.RetargetCommonRoot <filename>NewPath CreateOutputFolder:<bool>

CreateOutputFolder default value: false

Retargets the common root. If the optional CreateOutputFolder keyword parameter is supplied and is true, the new path will be created if it does not exist.

<bool>ATSOps.RetargetAssets <&maxObject>AssetOwner <filename>OldPath <filename>NewPath CreateOutputFolder:<bool>

AssetOwner is In and Out parameter

CreateOutputFolder default value: false

Retargets the assets of the specified asset owner from the given old path to the new path. If the optional CreateOutputFolder keyword parameter is supplied and is true, the new path will be created if it does not exist.

<names array>ATSOps.GetFileStatus <index>ProviderIndex <string>Filename

In 3ds Max 9 and higher, returns an array of Name Literals based on the status of the file.

FOR EXAMPLE:

myStatus = ATSOps.GetFileStatus 1 "C:\\myVault\\myScene.max"

#(#Controlled, #OutOfDate, #Modified)

<names array>ATSOps.GetFileSystemStatus <index>ProviderIndex <string>Filename

Returns an array of Name Literals based on the status of the file. Available in 3ds Max 9 and higher.

<bool>ATSOps.ResolveSelectionToUNC()

In 3ds Max 9 and higher, converts paths selected in the Asset Tracker to UNC paths. Available in 3ds Max 9 and higher.

<bool>ATSOps.ResolveSelectionRelativeToProjectFolder()

Converts paths selected in the Asset Tracker to relative paths with respect to the project folder. Available in 3ds Max 9 and higher.

<bool>ATSOps.ResolveSelectionToAbsolute()

Converts relative paths selected in the Asset Tracker to absolute paths. Available in 3ds Max 9 and higher.

<bool>ATSOps.IsInputFile <filename>Filename

Returns true if the specified file name is an input file, false otherwise. Available in 3ds Max 9 and higher.

<void>ATSOps.SetWorkingFolder <index>ProviderIndex <filename>Folder

Sets the working folder of the indexed provider to the specified file name. Available in 3ds Max 9 and higher.

<filename>ATSOps.GetWorkingFolder <index>ProviderIndex

Returns the working folder file name of the indexed provider. Available in 3ds Max 9 and higher.

<bool>ATSOps.IsFileShareLocked <index>ProviderIndex <filename>Filename

Returns true if the specified file share is locked, false otherwise. Available in 3ds Max 9 and higher.

<integer>ATSOps.GetFilesByFileSystemStatus <enum>Status <&filename array>FileList

Status enums: {#Unknown|#Ok|#Missing|#Found|#NetworkPath}

FileList is In and Out parameter

Returns the number of files with the specified system status and and array of the file names via the by-reference parameter FileList.

<bool>ATSOps.TestFileSystemStatus <filename>Filename <enum>Status

Status enums: {#Unknown|#Ok|#Missing|#Found|#NetworkPath}

Returns true if the given file name has the specified status, false otherwise. Available in 3ds Max 9 and higher.

<integer>ATSOps.GetResolvedPaths <&filename array>FileList <&filename array>ResolvedFileList

FileList is In parameter

ResolvedFileList is In and Out parameter

Returns the number of resolved paths. The list of the files to check should be passed via the FileList parameter. The by-reference ResolvedFileList parameter will be filled with the resolved file names.

Available in 3ds Max 9 and higher.

<integer>ATSOps.GetMinVersion <index>ProviderIndex <filename>Filename

Returns the min. version of the given filename using the indexed provider.

<integer>ATSOps.GetMaxVersion <index>ProviderIndex <filename>Filename

Returns the max. version of the given filename using the indexed provider.

<bool>ATSOps.GetVersion <index>ProviderIndex <filename>Filename <integer>VersionNumber

Gets the specified version of the given file using the indexed provider. Returns true on success, false otherwise.

<index>ATSOps.GetNotificationProviderIndex()

Returns the current provider index.


Interface: autosave

Interfaces > Core Interfaces > autosave

This interface provides access to the improved auto backup functionality.

Available in 3ds Max 9 and higher.

Properties:

autosave.Enable : boolean : Read|Write

Get/Set the Auto-Backup enabled state. Equivalent to the System Global variable autobackup.enabled.

autosave.NumberOfFiles : integer : Read|Write

Get/Set the number of Auto-Backup files. Possible values are between 1 and 99.

autosave.Interval : float : Read|Write

Get/Set the Auto-Backup interval in minutes.

autosave.filename : string : Read|Write

Get/Set the Auto-Backup filename as a string. Default is "AutoBackup".

Methods:

<void>autosave.resettimer()

Resets the Auto-Backup timer. After the rest, the next save will occur after the number of minutes specifed by the .interval property.

<boolean>autosave.isactive()

Resets true if the Auto-Backup is currently saving, false otherwise.

See also

Controlling the Auto-Backup


Interface: batchRenderMgr

Interfaces > Core Interfaces > batchRenderMgr

This Interface provides access to the Batch Render Manager feature.

Available in 3ds Max 8 and higher.

Interface: batchRenderMgr

Properties:

batchRenderMgr.numViews : integer : Read

Returns the number of views defined in the Batch Render manager.

batchRenderMgr.displayRenderedViews : bool : Read|Write

Corresponds to the Display Rendered Views checkbox in the Batch Render UI. When set to true, the rendered views will be displayed.

batchRenderMgr.netRender : bool : Read|Write

Corresponds to the Net Render checkbox in the Batch Render UI. When set to true, the rendering will be sent to the network.

Methods:

<Interface>batchRenderMgr.GetView <index>index

Returns a batchRenderViewOps MixinInterface to the indexed view.

<index>batchRenderMgr.FindView <string>name

Returns the index of the named view.

<Interface>batchRenderMgr.CreateView <node>camera

Creates a new view from the specified camera and returns a batchRenderViewOps MixinInterface to the new view.

<bool>batchRenderMgr.DeleteView <index>index

Deletes the indexed view. Returns true on success, false otherwise.

<Interface>batchRenderMgr.DuplicateView <index>index

Duplicates the indexed view and returns a batchRenderViewOps MixinInterface to the new view.

<void>batchRenderMgr.Render()

Starts the batch rendering.

<MixinInterface:batchRenderViewOps>

This MixinInterface is returned by the GetView(), CreateView() and DuplicateView() methods of the batchRenderMgr Interface in 3ds Max 8 and higher and provides the following properties:

Interface: batchRenderViewOps

Properties:

<MixinInterface:batchRenderViewOps>.enabled : bool : Read|Write

Get/set the enabled state of the view.

This property was exposed incorrectly in previous versions of 3ds Max and has been fixed in 3ds Max 2009.

<MixinInterface:batchRenderViewOps>.overridePreset : bool : Read|Write

Get/set whether to override the Render Preset with the view's .

<MixinInterface:batchRenderViewOps>.startFrame : time : Read|Write

Get/set the start frame to be used when rendering this view.

<MixinInterface:batchRenderViewOps>.endFrame : time : Read|Write

Get/set the end frame to be used when rendering this view.

<MixinInterface:batchRenderViewOps>.width : integer : Read|Write

Get/set the render width to be used when rendering this view.

<MixinInterface:batchRenderViewOps>.height : integer : Read|Write

Get/set the render height to be used when rendering this view.

<MixinInterface:batchRenderViewOps>.pixelAspect : float : Read|Write

Get/set the pixel aspect to be used when rendering this view.

<MixinInterface:batchRenderViewOps>.name : string : Read|Write

Get/set the name of the view.

<MixinInterface:batchRenderViewOps>.outputFilename : filename : Read|Write

Get/set the output file name to be used when rendering this view.

<MixinInterface:batchRenderViewOps>.camera : node : Read|Write

Get/set the Camera to be used when rendering this view with Override Preset turned on.

<MixinInterface:batchRenderViewOps>.sceneStateName : string : Read|Write

Get/set the name of the Scene State to be used when rendering this view.

This property was exposed incorrectly in previous versions of 3ds Max and has been fixed in 3ds Max 2009.

<MixinInterface:batchRenderViewOps>.presetFile : filename : Read|Write

Get/set the Render Preset file to be used when rendering this view.

See also

Other Interfaces


Interface: BitmapLayerManager

Interfaces > Core Interfaces > BitmapLayerManager

This Core Interface provides access to the layered Photoshop PSD image format.

Interface: BitmapLayerManager

Methods:

<integer>BitmapLayerManager.getLayerCount <filename>filename

Returns the number of layers in the specified file.

<string>BitmapLayerManager.getLayerName <filename>filename <integer>index

Returns the name of the indexed layer in the specified file.

<bitmap>BitmapLayerManager.LoadLayer <filename>filename <integer>index <boolean>fullframe

Loads the specified 0-based indexed layer from the the specified file. Returns a bitmap value. If fullframe is set to true, loads the layer at the resolution of the full image.

FOR EXAMPLE

--load the background layer from a PSD file

theBmp = bitmapLayerManager.LoadLayer "c:/temp/test.psd" 0 true

--assign a bitmap texture to the first material in the MEdit

meditMaterials[1].diffusemap = bitmapTexture()

--assign the PSD background layer to the diffuse slot:

meditMaterials[1].diffusemap.bitmap = theBmp


Interface: BitmapProxyMgr

Interfaces > Core Interfaces > BitmapProxyMgr

This Core Interface exposes the Bitmap Proxy System to MAXScript.

Available in 3ds Max 9 and higher.

Properties:

BitmapProxyMgr.globalProxyEnable : boolean : Read|Write

Enables Bitmap Proxies globally. Corresponds to the "Enable Proxy System" checkbox in the Bitmap Proxies dialog.

BitmapProxyMgr.globalProxyRenderMode : enum : Read|Write

globalProxyRenderMode enums: {#renderMode_UseProxies|#renderMode_UseFullRes_KeepInMemory|#renderMode_UseFullRes_FlushFromMemory}

Gets/Sets the global Proxy Render Mode. Corresponds to the Render Mode drop-down list in the Bitmap Proxies dialog.

BitmapProxyMgr.globalProxySizeFactor : enum : Read|Write

globalProxySizeFactor enums: {#full|#half|#third|#quarter|#eighth}

Gets/Sets the global Proxy Size Factor. Corresponds to the "Downscale map to…" drop-down list in the Bitmap Proxies dialog.

BitmapProxyMgr.globalProxySizeMin : integer : Read|Write

Gets/Sets the global Proxy minimum size in pixels. Corresponds to the "pixels" spinner in the Bitmap Proxies dialog.

Methods:

<enum>BitmapProxyMgr.GetProxySizeFactor <string>bitmap

GetProxySizeFactor enums: {#full|#half|#third|#quarter|#eighth}

Returns the local Proxy size factor for the specified bitmap.

<void>BitmapProxyMgr.SetProxySizeFactor <string>bitmap <enum>factor

factor enums: {#full|#half|#third|#quarter|#eighth}

Sets the local Proxy size factor for the specified bitmap to the given enum. This setting will be used only if the SetProxyUseGlobal has been set to false for the bitmap.

<boolean>BitmapProxyMgr.GetProxyUseGlobal <string>bitmap

Returns true if the specified bitmap is using the global proxy settings, false if it is using the local settings.

<void>BitmapProxyMgr.SetProxyUseGlobal <string>bitmap <boolean>useGlobal

When the second argument is passed as true, the global settings will be used for the bitmap specified by the first argument. When the second argument is false, the local settings will be used instead.

<boolean>BitmapProxyMgr.GetProxyReady <string>bitmap

Returns true if the proxy of the specified bitmap filename is ready, false if it has not been cached yet.

<void>BitmapProxyMgr.RefreshAll requestRefresh:<enum>

requestRefresh enums: {#updateStale|#refreshAll|#generateAll}

requestRefresh default value: #updateStale

Regenerates proxies of some or all the bitmaps.

When requestRefresh is not supplied or is set to #updateStale, only stale proxies will be updated.

When requestRefresh is set to #refreshAll, only bitmaps that are newer than their proxies will be updated..

When requestRefresh is set to #generateAll, all proxies will be regenerated.

<void>BitmapProxyMgr.GenerateAll requestRefresh:<enum>

requestRefresh enums: {#updateStale|#refreshAll|#generateAll}

requestRefresh default value: #updateStale

Same as RefreshAll.

<void>BitmapProxyMgr.ShowConfigDialog bitmapFielnames:<string array>

bitmapFielnames default value: #()

Opens the Bitmap Proxies configuration dialog.

If the optional bitmapFilenames argument is #() or not supplied, the dialog will be titled "Global Settings and Defaults for Bitmap Proxies" and will affect all bitmaps globally.

If it contains a list of bitmap filenames, the dialog will be titled "Per-Bitmap Resolution for Bitmap Proxies" and the settings will apply to the specified bitmaps only.

<void>BitmapProxyMgr.ShowPrecacheDialog bitmapFilenames:<string array>

bitmapFilenames default value: #()

Opens the Precache dialog.


Interface: blockMgr

Interfaces > Core Interfaces > blockMgr

The blockMgr Core Interface provides access to Blocks imported from AutoCAD.

Methods:

<Interface>blockMgr.IsInstance <node>node

<Interface>blockMgr.GetInstance <node>node <&node array>instances

instances is In parameter

<node>blockMgr.GetTopBlock <node>node

<Interface>blockMgr.MakeBlockRefComponent <node>node

<bool>blockMgr.RemoveBlockRefComponent <node>node


Interface: BoneSys

Interfaces > Core Interfaces > BoneSys

The BoneSys Core Interface allows the Bone Creation via MAXScript.

Interface: BoneSys

Methods:

<node>BoneSys.createBone <point3>startPos <point3>endPos <point3>zAxis

It returns the new bone node that was created.

<point3>startPos : The location of the new bone as point3

<point3>endPos : The direction (X axis) of the bone and the bone length as point3

<point3>zAxis: The direction of the Z axis for the new bone node as point3

NOTE:

If the Z axis is not perpendicular to the X axis, the Z axis will be made perpendicular. To create a bone chain, call createBone repeatedly with the startPosition set to the value of the previous endPosition. Note that newly created bones are not linked to any parent. So to create a bone chain, the script would also need to link each newly created bone segment to the previous.

<boolean>BoneSys.refineBone()

Enables the Refine Bone mode.

See also

Bones : System

Core Interfaces

Node Common Properties, Operators, and Methods

Bone Creation

Bone : Helper

Skin : Modifier

Access to the new node bone properties and methods


Interface: browserMgr

Interfaces > Core Interfaces > browserMgr

The Browser Manager Core Interface has currently no functionality.

See also

Asset Browser enhancements

iDrop - drag and drop

Zip-file Script Packages


Interface: BrushPresetMgr

Interfaces > Core Interfaces > BrushPresetMgr

This Core Interface exposes the Brush Preset Manager to MAXScript.

Available in 3ds Max 8 and higher.

Interface: BrushPresetMgr

Methods:

<boolean>BrushPresetMgr.IsActive()

Returns true if the Brush Preset Manager is active, false if not active.

<void>BrushPresetMgr.OpenPresetMgr()

Opens the Brush Preset Manager.

<void>BrushPresetMgr.AddPreset()

Adds a new Preset.

<void>BrushPresetMgr.LoadPresetFile <filename>file

Loads the supplied Preset file.

<void>BrushPresetMgr.SavePresetFile <filename>file

Saves a Preset file to the supplied file name.


Interface: ChannelInfo

Interfaces > Core Interfaces > ChannelInfo

The ChannelInfo Core Interface provides access to the new Map Channel system and the Map Channel Info dialog.

Properties:

ChannelInfo.subComp : boolean : Read|Write

Enables/Disables the sub-component display. Corresponds to the SubComp button in the Map Channel Info dialog.

ChannelInfo.lock : boolean : Read|Write

Sets the state of the Lock button in the Map Channel Info dialog.

Methods:

<void>ChannelInfo.dialog()

Opens the Map Channel Info dialog.

<void>ChannelInfo.CopyChannel <node>node <integer>channelType <integer>channel

Copies the specified channel of specified channel type in the supplied node.

Possible channelType values are:

1 - Geometry
2 - Selection
3 - Map

<void>ChannelInfo.CopySubChannel <node>node <integer>channelType <integer>channel <integer>subchannel

Copies the specified sub-channel of the supplied channel of specified channel type in the given node.

Possible channelType values are:

1 - Geometry
2 - Selection
3 - Map

<void>ChannelInfo.PasteChannel <node>node <integer>channelType <integer>channel

Pastes the specified channel of specified channel type in the supplied node.

Possible channelType values are:

1 - Geometry
2 - Selection
3 - Map

<void>ChannelInfo.PasteSubChannel <node>node <integer>channelType <integer>channel <integer>subchannel

Pastes the specified sub-channel of the supplied channel of specified channel type in the given node.

Possible channelyTpe values are:

1 - Geometry
2 - Selection
3 - Map

<void>ChannelInfo.AddChannel <node>node

Adds a new channel to the specified node.

<void>ChannelInfo.ClearChannel <node>node <integer>channel

Clears the specified channel from the given node.

<void>ChannelInfo.NameChannel <node>node <integer>channelType <integer>channel <string>name

Renames the specified channel of the supplied type in the given node to the provided string.

Possible channelType values are:

1 - Geometry
2 - Selection
3 - Map

<void>ChannelInfo.NameSubChannel <node>node <integer>channelType <integer>channel <integer>subchannel <string>name

Renames the specified sub-channel of the specified channel of the supplied type in the given node to the provided string.

Possible channelType values are:

1 - Geometry
2 - Selection
3 - Map

<void>ChannelInfo.update()

Updates the Map Channel Info dialog. Corresponds to pressing the Update button in the Map Channel Info dialog.

<void>ChannelInfo.closeDialog()

Closes the Map Channel Info dialog.

<boolean>ChannelInfo.isChecked()

Returns true if the Map Channel Info dialog is open, false otherwise.


Interface: cmdPanel

Interfaces > Core Interfaces > cmdPanel

The cmdPanel Core Interface provides control over the behavior of the command panel in multi-column mode.

Methods

<integer>cmdPanel.GetRollupThreshold()

Returns how many pixels of a rollout should be scrollable in the command panel before the rollout is shifted into a separate command panel column. This option is only applicable when there are multiple columns displayed in the command panel.

<void>cmdPanel.SetRollupThreshold <integer>threshold

Sets how many pixels of a rollout should be scrollable in the command panel before the rollout is shifted into a separate command panel column. This option is only applicable when there are multiple columns displayed in the command panel.

See also

Customize The Order of Rollup Pages

Rollout User-Interface Controls

Rollout User-Interface Controls Types

Rollout User-Interface Controls Common Properties

Rollout User-Interface Controls Common Layout Parameters

Visual MAXScript


Interface: colorMan

Interfaces > Core Interfaces > colorMan

The colorMan Core Interface exposes the Color Manager to MAXScript.

Within 3ds Max, using the Main Menu > Customize > Customize User Interface > Colors tab, you can alter the colors used for various UI elements, change the saturation, value and transparency of elements, and load and save color schemes.

NOTE:

After making any color changes, you must call
colorMan.repaintUI #repaintAll
to apply the changes and synchronize with the customize dialog.

Methods:

<boolean>colorMan.useStandardWindowsColors()

Returns true if the standard windows colors are used and false if custom colors are used.

colorMan.setUseStandardWindowsColors <boolean>onOff

Sets whether standard windows colors are used or not. This allows the developer to tell the system to use standard windows colors, instead of the custom colors.

<boolean>onOff: Pass true to use the standard windows color and false to use the custom colors.

<boolean>colorMan.registerColor <string>color <string>name <string>category <point3>defaultColor

This registers a new color with the system, and adds a color to the color manager database that is then accessible from the color customization UI. It returns false if the color is already registered; otherwise true.

<string>color: The ID of the color to register. Example: #myNewColor

<string>name: The name for the color. Example: "My Own Color"

<string>category: The category for the color. If the name passed matches one of the existing 3ds Max categories the color will be placed in there, otherwise a new one will be created. Example: "Fun Gaming Colors"

<point3>defaultColor: The default value for the color. This is the value that the color will be reset to when a 3ds Max user presses "Reset" in the color customization dialog. Example: [1,0,0]

EXAMPLE

colorMan.registerColor #myNewColor "My Own Color" "Ugly Colors" [1,0,0]

This registers a new color, with the name #myNewColor, with a default value of red. The category in the customization UI will be "Ugly Colors" and the name will be "My Own Color".

In other scripts you can access this color using:

colorMan.getColor #myNewColor

NOTE:

colorMan.registerColor should be called from a script in the \stdplugs\stdscripts folder. These scripts are run when 3ds Max starts, so the color will be available in the customization UI immediately. If the user customizes this color, its value will be saved in the MaxColors.clr file.

<boolean>colorMan.loadColorFile <filename>file

This method will load the specified color file from the current UI directory. Returns true if the load was successful, otherwise false.

<string>file: The filename of the color file to load.

NOTE:

The path specified must be relative to the \UI directory.

<boolean>colorMan.saveColorFile <filename>file

This method will save the specified color file from the current UI directory. Returns true if the save process was successful, otherwise false.

<string>file: The filename of the color file to save.

NOTE:

The path specified must be relative to the \UI directory.

<filename>colorMan.getColorFile()

Returns the file name of the current color file.

<boolean>colorMan.setColor <string>color <point3>colorValue

Sets the color value of the previously registered color whose ID is passed. Returns true if the color was set and false if the id passed could not be found.

<string>color: Specifies which color to set.

<point3>colorValue: The color value to set.

Predefined colors include:

#background | The background for all controls and buttons
#text | The text for all controls and buttons
#activeCommand | The color command mode buttons turn when pressed
#hilight | The hilight color for 3d controls
#shadow | The shadow color for 3d controls
#window | The background color for edit boxes, list boxes and other windows
#activeCaption | The color of the active caption
#toolTipBackground | The background for viewport tool tips
#toolTipText | The text color for viewport tool tips
#hilightText | The hilight color in the stack view drop-down list
#windowText | The color used in edit boxes, list boxes and other windows
#itemHilight | The item hilite color
#subObjectColor | The color used to hilight sub-object levels in StackView
#3dDarkShadow | the dark shadow color on 3d controls
#3dLight | the light color on 3d controls
#appWorkspace | the application workspace color
#trackbarBg | trackbar background
#trackbarBgSel | trackbar background for selected keys
#trackbarText | trackbar text
#trackbarTicks | trackbar ticks
#trackbarKeys | trackbar keys
#trackbarSelKeys | track bar selected keys
#trackbarCursor | track bar cursor
#pressedButton | background color for pressed buttons, like the transform constraints
#timeSliderBg | The background for the time slider bar.
#viewportBorder | The viewport border color
#activeViewportBorder | The active viewport border color
#rollupTitleFace | Rollout title background
#rollupTitleText | rollout title text
#rollupTitleHilight | rollout title 3d highlight
#rollupTitleShadow | rollout title 3d shadow
#selectionRubberBand | the selection marquee color
#stackViewSelection | the color of a selected item in stack view

<color>colorMan.getColor <string>color

Returns the color value of the color whose ID is passed, or black (RGB(0,0,0)) if the Color passed was not found.

<string>color: Specifies which color to get.

<name>colorMan.getName <string>color

Returns the name of the color whose ID is passed.

<string>color: The ID of the color.

<string>colorMan.getCategory <string>color

Returns the category string of the color whose ID is passed.

<string>color: The ID of the color.

<boolean>colorMan.setIconFolder <filename>folder

<string>folder - The name of the folder relative to the UI directory. Absolute pathnames are not supported.

This method sets the folder from which all icons for the UI are loaded, and immediately reloads the icons from that folder.

NOTE:

If a folder with no icon files is loaded, all icons in the UI become blank, and no warning is issued.

<filename>colorMan.getIconFolder()

Returns the absolute pathname of the current icon folder. Note that getIconFolder returns an absolute path while setIconFolder accepts only relative paths.

<float>colorMan.getIconColorScale <enum>type <enum>which

type enums: {#disabledIcon|#enabledIcon}

which enums: {#saturationScale|#valueScale|#alphaScale}

Returns a floating point value (in the range 0.0 to 1.0) that is one of the scale factors applied to the specified icon type. These scale values used to do image processing on the icons at start-up time.

<enum>type: One of the following values:

#disabledIcon: The disabled icons.

#enabledIcon: The enabled icons.

<enum>which: The icon color scale. One of the following values:

#saturationScale: The saturation scale.

#valueScale: The value scale.

#alphaScale: The alpha scale.

colorMan.setIconColorScale <enum>type <enum>which <float>value

type enums: {#disabledIcon|#enabledIcon}

which enums: {#saturationScale|#valueScale|#alphaScale}

Sets the specified scale factor for the icon type passed. The color manager maintains the values for the 3ds Max icon image processing system. Developers can set values to scale the saturation, value and transparency for enabled and disabled icon images using this method.

<enum>type: The icon type. One of the following values:

#disabledIcon: The disabled icons.

#enabledIcon: The enabled icons.

<enum>which: The icon color scale. One of the following values:

#saturationScale: The saturation scale.

#valueScale: The value scale.

#alphaScale: The alpha scale.

<float>value: The value runs from 0.0 to 100.0.

colorMan.getIconColorInvert <enum>type

type enums: {#disabledIcon|#enabledIcon}

Returns true if the invert flag is set for the specified icon type and false if not set.

<enum>type: The icon type. One of the following values:

#disabledIcon: The disabled icons.

#enabledIcon: The enabled icons.

setIconColorInvert <enum>type <boolean>value

type enums: {#disabledIcon|#enabledIcon}

Sets the invert flag for the specified icon type to on or off.

<enum>type: The icon type. One of the following values:

#disabledIcon: The disabled icons.

#enabledIcon: The enabled icons.

<boolean>value: Pass true for inverted; false for not inverted.

<filename>colorMan.getFileName()

Returns the file name of the currently loaded color file.

NOTE:

This filename specifies an absolute path, even though loadColorFile and saveColorFile use relative paths.

<color>colorMan.getDefaultColor <string>color

Returns the default color for the specified ID. The default color is the value passed as defaultValue in registerColor, regardless if a SetColor() has been done subsequently. This is used by the UI when the user presses "Reset" to reset a color to its default value.

<string>color: The ID of the color.

colorMan.repaintUI <enum>type

type enums: {#repaintAll|#repaintTrackBar|#repaintTimeBar}

This method allows you to issue a repaint of the user interface. This is equivalent to the Apply Colors Now button in the Customize dialog.

<repaintType>type: The type of repaint you wish to issue; #repaintAll, #repaintTrackBar, #repaintTimeBar.

Here is a macroScript that turns the time slider and trackbar backgrounds blue:

EXAMPLE

macroScript BlueBar

category: "Color"

tooltip: "Blue Bar"

(

on execute do

(

colorMan.setColor #timeSliderBg [0, 0, .6]

colorMan.repaintUI #repaintTimeBar

colorMan.setColor #trackbarBg [0, 0, .6]

colorMan.repaintUI #repaintTrackBar

)

)

NOTE:

All of 3ds Max's standard icon BMP files must exist in that folder. If any of the standard files are missing, icons will appear blank in 3ds Max's UI. All the icons files needed live in the UI\Icons folder, which is the default icon folder.

colorman.reInitIcons()

Reloads all CUI icons from the icon files. This can be used to refresh the UI after adding new or editing existing icon bitmap files.

Available in 3ds Max 9 and higher.

<bool>colorman.resolveIconFolder <filename> <&fullfilename>

This method resolves the filename using the user icon path, then the system icon path, and then <3dsmax.exe>\ui\icons.

If the file is found, fully qualified filename is placed in fullfilename and the method returns true.

If not found, the method returns false.

Available in 3ds Max 9 and higher.

See also Class IcolorManager, in the SDK Help file accompanying this product

See also

3ds Max User Interface Colors

Creating Icon Bitmap Files


Interface: custAttribCollapseManager

Interfaces > Core Interfaces > custAttribCollapseManager

The custAttribCollapseManager Core Interface provides controls over the behavior of Custom Attributes when the modifier stack is being collapsed.

NOTE:

This Interface is not available in Autodesk VIZ.

Properties:

custAttribCollapseManager.surviveState : boolean : Read|Write

When set to true, Custom Attributes will survive collapsing the Modifier Stack - they will be copied onto the base object.

When false, Custom Attributes will be lost after collapsing.


Interface: DaylightSimulationUIOps

Interfaces > Core Interfaces > DaylightSimulationUIOps

NEW in 3ds Max 2009 Design: The DaylightSimulationUIOps Interface exposes the Daylight Simulation dialog in 3ds Max 2009 Design and provides the following properties and methods.

NOTE:

This feature is exposed in 3ds Max Design only.

Properties:

DaylightSimulationUIOps.Visible : bool : Read|Write

Get/set whether the Daylight Simulation dialog is visible (true) or hidden (false).

Methods:

<void>DaylightSimulationUIOps.Refresh()

Causes an update of the Daylight Simulation dialog.

See also

Lighting Analysis and Daylight Simulation Tools


Interface: DaylightSimulationUtilities

Interfaces > Core Interfaces > DaylightSimulationUtilities

NEW in 3ds Max 2009 Design: The DaylightSimulationUtilities Interface exposes methods used by the Light Analysis Utility to collect objects and ensure the validity of render effects, lights, materials and the renderer for performing Daylight Simulation.

NOTE:

This feature is exposed in 3ds Max Design only.

Methods:

<node by value array>DaylightSimulationUtilities.FindValidLights()

Returns an array of valid lights.

<node by value array>DaylightSimulationUtilities.FindInvalidLights()

Returns an array of invalid lights.

<node by value array>DaylightSimulationUtilities.FindActiveLights()

Returns an array of active lights.

<node by value array>DaylightSimulationUtilities.FindInactiveLights()

Returns an array of inactive lights.

<node by value array>DaylightSimulationUtilities.FindLightsWithValidType()

Returns an array of lights with valid type.

<node by value array>DaylightSimulationUtilities.FindLightsWithInvalidType()

Returns an array of lights with invalid type.

<node by value array>DaylightSimulationUtilities.FindLightsWithShadowsOn()

Returns an array of lights that have shadow casting enabled.

<node by value array>DaylightSimulationUtilities.FindLightsWithShadowsOff()

Returns an array of lights that have shadow casting disabled.

<node by value array>DaylightSimulationUtilities.FindLightsUsingRaytracedShadows()

Returns an array of lights that have shadow set to raytraced.

<node by value array>DaylightSimulationUtilities.FindLightsNotUsingRaytracedShadows()

Returns an array of lights that have shadow set to any type but raytraced.

<node by value array> DaylightSimulationUtilities.FindRenderableObjects()

Returns an array of all renderable objects in the scene.

<node by value array>DaylightSimulationUtilities.FindInvalidMaterials()

Returns an array of objects that have materials that are invalid for daylight simulation.

<boolean>DaylightSimulationUtilities.FixInvalidMaterials()

Fixed the materials that are invalid for daylight simulation. Returns true on success, false if nothing was fixed.

<node by value array>DaylightSimulationUtilities.FindDaylightSystems()

Returns an array of daylight system lights.

<boolean>DaylightSimulationUtilities.LightAnalysisRenderEffectExists()

Returns true if a Light Analysis Render Effect has already been added to the Effects list, false if it does not exist on the Effects list.

<boolean>DaylightSimulationUtilities.IsLightAnalysisRenderEffectActive()

Returns true if a Light Analysis Render Effect has already been added to the Effects list and is active, false if it is not active.

<integer>DaylightSimulationUtilities.GetLightAnalysisRenderEffectCount()

Returns the number of LightAnalysis Render Effects.

<boolean>DaylightSimulationUtilities.IsValidRenderer()

Returns true if the current renderer is valid (mental ray), false if it is not valid (Default Scanline Renderer, 3rd party renderers)

<boolean>DaylightSimulationUtilities.IsMentalRaySunDaylightSystem <Interface>daylightSystem

Returns true if the supplied daylight system uses the mental ray Sun, false otherwise.

<boolean>DaylightSimulationUtilities.IsMentalRaySkyDaylightSystem <Interface>daylightSystem

Returns true if the supplied daylight system uses the mental ray Sky, false otherwise.

<boolean>DaylightSimulationUtilities.IsShadowCastingDaylightSystem <Interface>daylightSystem

Returns true if the supplied daylight system is set to cast shadows, false otherwise.

<boolean>DaylightSimulationUtilities.IsValidSunMultiplier <Interface>daylightSystem

Returns true if the Sun Multiplier in the Daylight System represented by the given Interface is valid, false if it is invalid.

<boolean>DaylightSimulationUtilities.IsValidSkyMultiplier <Interface>daylightSystem

Returns true if the Sky Multiplier in the Daylight System represented by the given Interface is valid, false if it is invalid.

<boolean>DaylightSimulationUtilities.IsSunOn <Interface>daylightSystem

Returns true of the Sun in the Daylight System represented by the given interface is on, false if it is off.

<boolean>DaylightSimulationUtilities.IsSkyOn <Interface>daylightSystem

Returns true of the Sky in the Daylight System represented by the given interface is on, false if it is off.

<void>DaylightSimulationUtilities.SetMentalRayAsProductionRenderer()

Sets mental ray as the production renderer. Equivalent to assigning an instance of the mental_ray_renderer class to the production renderer.

<void>DaylightSimulationUtilities.OpenIndirectIlluminationRenderDialogPage()

Opens the Render Dialog at the Indirect Illumination tab.

<boolean>DaylightSimulationUtilities.Is32bitFrameBuffer()

Returns true if the frame buffer is using 32 bit per channel, false if using 16 bpc.

<boolean>DaylightSimulationUtilities.IsRenderIterative()

Returns true if the renderer is set to Iterative mode, false if set to Production mode.

<void>DaylightSimulationUtilities.SetRenderIterative <boolean>renderIterative

Sets the renderer to Iterative mode when the argument is true or to Production mode when the argument is supplied as false.

<void>DaylightSimulationUtilities.ApplyDefaultRenderPreset()

Applies the default render preset to the renderer.

See also

Interface: LightingAnalysisOverlayFactory

Interface: LightMeterManager

Lighting_Analysis_Overlay : RenderEffect

Lighting_Analysis_Data : RenderElement

Lighting Analysis and Daylight Simulation Tools


Interface: DaylightSystemFactory2

Interfaces > Core Interfaces > DaylightSystemFactory2

NEW in 3ds Max 2009 Design: The DaylightSystemFactory2 Interface exposes a method for creating a daylight system using the given sun and sky classes:

Methods:

<Interface>DaylightSystemFactory2.Create sunClass:<class> skyClass:<class>

sunClass default value: undefined

skyClass default value: undefined

Creates a Daylight system.

If the optional keywords are supplied, they should define the sun and/or sky classes to be used. If any of the optional keywords is omitted, the system default settings will be used.

Possible classes for sunClass: are:

DirectionalLight - corresponds to Standard entry in the Daylight System UI

IES_Sun

mr_Sun

Possible classes for skyClass: are:

IES_Sky

mr_Sky

Skylight

EXAMPLE:

theInt = DaylightSystemFactory2.Create sunClass:mr_Sun skyClass:mr_Sky

à <MixinInterface:IDaylightSystem>

theInt.getSun()

à mr Sun

theInt.getSky()

à mr Sky

theInt = DaylightSystemFactory2.Create sunClass:DirectionalLight

à <MixinInterface:IDaylightSystem>

theInt.getSun()

à Free Directional Light

theInt.getSky()

à Skylight

See also

Daylight : System

Light : Node

Lighting Analysis and Daylight Simulation Tools


Interface: defaultActions

Interfaces > Core Interfaces > defaultActions

The defaultActions Core Interface exposes the default actions for several system events.

Available in 3ds Max 2008 and higher.

Interface: defaultActions

Methods:

<boolean>defaultActions.getAction <enum>eventID <&enum array>action

eventID enums: {#missingExtFiles|#missingDLLs|#missingXRefs|#missingUVW|#unsupportedRendereffect|#invalidXRefFiles}

action enums: {#logToFile|#logmsg|#abort}

action is Out parameter

Get the default actions with the event ID given as first argument into the by-reference second argument.

Returns true on success, false if no actions were found for the given ID.

<boolean>defaultActions.setAction <enum>eventID <&enum array>action title:<string> oldAction:<&enum array>

eventID enums: {#missingExtFiles|#missingDLLs|#missingXRefs|#missingUVW|#unsupportedRendereffect|#invalidXRefFiles}

action enums: {#logToFile|#logmsg|#abort}

action is In parameter

title default value: undefined

oldAction enums: {#logToFile|#logmsg|#abort}

oldAction default value: #()

oldAction is Out parameter

Set the default actions with the event ID given as first argument to the actions specified by the second argument.

The optional title: string can be used to give a name to the action setup.

The old actions will be returned into the optional oldAction: argument.

Returns true if an old action was found, false if no old action was previously defined for this ID.

EXAMPLE:

--get the default action for missing UVW:

defaultActions.getAction #missingUVW &actions

false

actions --see the result - there are no actions defined

#()

--now set the default action to Log to File:

defaultActions.setAction #missingUVW #(#logToFile) oldAction:oldActionsArray

true

oldActionsArray --see what the previous actions were

#()

--check to see if the new actions are defined:

defaultActions.getAction #missingUVW &actions

true

actions --yes, the default action was set correctly

#(#logToFile)

<boolean>defaultActions.deleteAction <enum>eventID

eventID enums: {#missingExtFiles|#missingDLLs|#missingXRefs|#missingUVW|#unsupportedRendereffect|#invalidXRefFiles}

Deletes the default actions for the event ID given as first argument.

Returns true on success, false if no actions were found to delete.

EXAMPLE (CONTINUED FROM PREVIOUS EXAMPLE):

--get the default action for missing UVW:

defaultActions.deleteAction #missingUVW

true

defaultActions.getAction #missingUVW &actions

false

actions --see the content of the actions array - there are none

#()

<integer>defaultActions.getActionCount()

Returns the number of default actions.

<String by value>defaultActions.getActionTitle <enum>eventID

eventID enums: {#missingExtFiles|#missingDLLs|#missingXRefs|#missingUVW|#unsupportedRendereffect|#invalidXRefFiles}

Returns the title of the action defined for the given event ID, or empty string "" if no title has been defined.

<String by value>defaultActions.getActionTitleByIndex <index>index

Returns the title of the action by index, or empty string "" if no title has been defined.

<enum>defaultActions.getActionIDByIndex <index>index

getActionIDByIndex enums: {#missingExtFiles|#missingDLLs|#missingXRefs|#missingUVW|#unsupportedRendereffect|#invalidXRefFiles}

Returns the Action ID by index.

<boolean>defaultActions.logEntry <enum>eventID <string>message

eventID enums: {#missingExtFiles|#missingDLLs|#missingXRefs|#missingUVW|#unsupportedRendereffect|#invalidXRefFiles}

Logs the message given by the second argument for the event ID given by the first argument. Returns true on success, false otherwise.

<void>defaultActions.MsgLogClear <enum>eventID

eventID enums: {#missingExtFiles|#missingDLLs|#missingXRefs|#missingUVW|#unsupportedRendereffect|#invalidXRefFiles}

Clears the messages for the event ID given by the first argument.

<integer>defaultActions.getMsgLogCount <enum>eventID

eventID enums: {#missingExtFiles|#missingDLLs|#missingXRefs|#missingUVW|#unsupportedRendereffect|#invalidXRefFiles}

Returns the message count for the event ID given by the first argument.

<TSTR by value>defaultActions.getMsgLogMsg <enum>eventID <index>index

eventID enums: {#missingExtFiles|#missingDLLs|#missingXRefs|#missingUVW|#unsupportedRendereffect|#invalidXRefFiles}

Returns the indexed message logged for the event ID given by the first argument.

<TSTR by value array>defaultActions.getMsgLogMsgs <enum>eventID

eventID enums: {#missingExtFiles|#missingDLLs|#missingXRefs|#missingUVW|#unsupportedRendereffect|#invalidXRefFiles}

Returns an array of all message for the event ID given by the first argument.

<enum>defaultActions.getMsgLogID <index>index

getMsgLogID enums: {#missingExtFiles|#missingDLLs|#missingXRefs|#missingUVW|#unsupportedRendereffect|#invalidXRefFiles}

Returns the Log ID for the indexed message given by the first argument.

<integer>defaultActions.setMsgLogMaxCount <integer>count

Sets the maximum number of messages in the message log.


Interface: DialogMonitorOPS

Interfaces > Core Interfaces > DialogMonitorOPS

The DialogMonitorOPS Core Interface provides a callback system to monitor the 3ds Max User Interface. In conjunction with the Interface: UIAccessor it can be used to collect data and interact with dialogs and popups, for example to press the default or specific button in a pop-up dialog when running automated tasks or log data about the 3ds Max UI activities to a log file.

Available in 3ds Max 9 and higher.

Properties:

DialogMonitorOPS.Enabled : bool : Read|Write

Get/Set the enabled state of the Dialog Monitor.

DialogMonitorOPS.Interactive : bool : Read|Write

Get/Set the interactive state of the Dialog Monitor.

Methods:

<bool>DialogMonitorOPS.RegisterNotification <value>Callback ID:<name>

ID default value: undefined

Registers a notification callback function with an optional user-defined ID.

The callback function can be any MAXScript function and will be called each time a dialog or menu is opened, but the best way to use this feature is to access the dialog's or menu's data using the Interface: UIAccessor methods.

The callback function MUST return a Boolean value - true on success, false on failure.

<bool>DialogMonitorOPS.UnRegisterNotification ID:<name>

ID default value: undefined

Unregisters the notification callbacks with the user-defined ID. If no ID is specified, all callbacks will be unregistered.

<void>DialogMonitorOPS.ShowNotification()

Lists all registered notification callbacks with their ID and callback function.

<HWND>DialogMonitorOPS.GetWindowHandle()

Returns the Window Handle of the current dialog. The handle can be used as an argument in most Interface: UIAccessor methods to collect details about the current dialog and manipulate it.

See also

Interface: UIAccessor


Interface: dragAndDrop

Interfaces > Core Interfaces > dragAndDrop

iDrop - drag and drop

The Drag and Drop system is managed through a Core Function Published interface. It provides control over the DnD system, manages handler registration and exposes some useful utility methods for downloading URL’s, simulating drops, etc.

Methods:

<void>dragAndDrop.globalEnableDragAndDrop <boolean>onOff

This method allows you to globally enable or disable the DnD interface.

<boolean>onOff: True to enable, false to disable.

<boolean>dragAndDrop.isEnabled()

This method returns true if the global DnD interface is enabled, otherwise false.

<boolean>dragAndDrop.enableDragAndDrop <HWND>window <boolean>onOff

This method allows you to enable DnD for a given window (and its children). If no custom DragAndDropHandler is supplied, a default one is used that will accept dropped scene files for opening and scripts for running. Returns true if successful and false otherwise.

<HWND>window : A handle to the window you wish to enable or disable DnD for.

<boolean>onOff: True to enable, False to disable.

<boolean>dragAndDrop.dropPackage <HWND>window <&point>mousePoint <&filename array>files

This method allows the simulation of a package of files into a window at a given point. A package of files, specified as a list of URL strings is the common form of DropType data from iDrop sources and files dragged from the Windows desktop. The entire package is downloaded, as needed, but only the first file in the list is actually dropped into 3ds Max. The other files in the package are presumed to be support files, such as texmaps or xref sources, for the main drop file. After the drop, the URL strings in the URLTab are converted to fully-specified path names to local file copies, if any had to be downloaded from the web. Returns true if the drop was successful, otherwise false.

<HWND>window : A handle to the window. If this is set to NULL, the default 3ds Max window is used.

<&point>mousePoint : The point at which to drop. mousePoint is In and Out parameter

<&filename array>files: A reference to the local copies of the URL strings. files is In and Out parameter

<boolean>dragAndDrop.downloadPackage <&filename array>files <string>directory <boolean>Showprogress

This method serves as a utility function that can be used to download a package of URLs to the specified directory. If the hwnd argument is supplied, any progress or other messages are centered over that window. Returns true if successful and false otherwise.

<&filename array>files : A reference to the local copies of the URL strings. files is In and Out parameter

<string>directory: The directory path string to download to.

<boolean>Showprogress: Displays the progress dialog.

<filename>dragAndDrop.getDownloadDirectory()

This method returns the fully-specified path to the directory in which package drops are downloaded.

<boolean>dragAndDrop.DownloadUrlToDisk <string>url <filename>fileName <integer>flags

This method allows you to download the file referenced by the URL to disk. Returns true if successful and false otherwise.

<string>url : The URL string of the file to download.

<string>fileName : The filename string of the URL to store on disk.

<integer>flags

<node>dragAndDrop.ImportContextNode()

Returns a pointer to the import context node.

See also

Zip-file Script Packages

iDrop - drag and drop


Interface: dxshadermanager

Interfaces > Core Interfaces > dxshadermanager

The dxshadermanager Core Interface exposes the DirectX Shader Manager to MAXScript.

Interface: dxshadermanager

Methods:

<maxObject>dxshadermanager.getViewportManager <material>material

Returns the viewport manager’s ViewportManagerCustAttrib object for the specified material.

<boolean>dxshadermanager.IsVisible()

Returns true if the manager is visible.

<float>dxshadermanager.SetVisible <boolean>show

This method can be used to turn the manager on and off. It will not have an effect if the user is runnig in DirectX mode.

<maxObject>dxshadermanager.addViewportManager <material>material

Adds a new viewport manager to the specified material and returns the ViewportManagerCustAttrib object providing an interface to access its effects.

EXAMPLE:

-- Create a new standard material

newmat = StandardMaterial()

-- Get the viewport manager from the material

manager = DXShaderManager.getViewportManager newmat

-- If there is no manager, assign a new oneif(manager==null) then manager = DXShaderManager.addViewportManager newmat

-- Get the active viewport effect

effect = manager.getactiveviewporteffect()

-- If there is no active effect, create a new one.

if(effect == null)then

effect = manager.setviewporteffect 1

-- 1 in our case is the lightmap, 0 sets it to "none"

-- Set the LightMap file names

effect.lightmap_filename = GetDir(#image) + "\\testlightmap.bmp"

effect.diffuse_filename = GetDir(#image) + "\\testdiffuse.bmp"

-- set the mapping channel to use

effect.lightmap_mapping = 1

effect.diffuse_mapping = 1

-- Search for the effect based on name

-- Get the total number of effects:num = manager.getNumViewportEffects()

-- Step through all effects and check for name. If found,

-- then activate it.for i = 1 to num do

( if(manager.getViewportEffectName(i) == "LightMap") then effect = manager.setviewporteffect i

)

See also

CubeMap : ReferenceTarget

LightMap : ReferenceTarget

Membrane_Shader : ReferenceTarget

Metal_Bump : ReferenceTarget


Interface: FileLinkMgr

Interfaces > Core Interfaces > FileLinkMgr

Previously available in Autodesk VIZ, this Core Interface is now part of 3ds Max 7 and higher.

Properties:

FileLinkMgr.numLinks : integer : Read

Returns the number of linked files. Read-only.

Methods:

<bool>FileLinkMgr.Attach <String>filename fileformat:<enum> showUI:<bool>

filename is In parameter

fileformat enums: {#UseFileExt|#DWG|#DXF}

fileformat default value: #UseFileExt

showUI default value: false

Attaches the specified file to the current scene. By default, the file extension of the specified file will determine the file format to be linked. When the optional showUI parameter is set to True, the File Linking dialog will be displayed. When set to False or not specified, the linking will be performed silently. Returns True on success.

<bool>FileLinkMgr.AttachWithPreset <String>filename <String>preset showUI:<bool>

filename is In parameter

preset is In parameter

showUI default value: false

Attaches the specified file name using the supplied preset. When the optional showUI parameter is set to True, the File Linking dialog will be displayed. Returns True on success.

The preset string is the name of the preset inside <3dsmax>\plugcfg\filelink.ini, not the name of the file itself.

<bool>FileLinkMgr.Reload <integer>which showUI:<bool> translateMaterials:<bool>

showUI default value: false

translateMaterials default value: true

Reloads the specified indexed File Link. Returns True on success.

<bool>FileLinkMgr.Detach <integer>which

Detaches the specified indexed File Link. Returns True on success.

<bool>FileLinkMgr.Bind <integer>which

Removes specified indexed File Link. Returns True on success.

<bool>FileLinkMgr.IsAnyLinked <&node array>nodes

nodes is In parameter

Returns True if any of the specified nodes the supplied array originates from a linked file.

<bool>FileLinkMgr.ChangeFilename <integer>which <String>filename

Changes the file name of the specified indexed File Link. Returns True on success.

<bool>FileLinkMgr.SelectNodes <integer>which clearCurrentSel:<bool>

ClearCurrentSel default value: true

Selects all nodes in the scene associated with specified indexed File Link. Returns True on success.


Interface: FlowRaytraceInterface

Interfaces > Core Interfaces > FlowRaytraceInterface

Flow is the Raytrace engine used for Radiosity and Shadows.

It is used internally. There is no access from MAXScript.

Properties:

No properties or methods exposed.


Interface: FrameTagManager

Interfaces > Core Interfaces > FrameTagManager

The FrameTagManager Core Interface exposes the Time Tags to MAXScript. See also Time Tags Access using the FrameTagManager Interface for examples.

Interface: FrameTagManager

Methods:

<integer>FrameTagManager.GetTagCount()

Returns the number of Time Tags.

<DWORD>FrameTagManager.GetTagID <index>index

Returns the ID of the indexed Time Tag.

<time>FrameTagManager.GetTimeByID <DWORD>id relative:<boolean>

relative default value: false

Returns the time of the tag specified by ID. If relative is false or not supplied, the time is returned as absolute time. If relative is true, time is relative to the tag this tag is locked to, if any. If false, or this tag is not locked to another tag, the time is absolute.

<void>FrameTagManager.SetTimeByID <DWORD>id <time>time relative:<boolean>

relative default value: false

Sets the time of the tag specified by ID to the supplied time value. If relative is false or not supplied, the time is returned as absolute time. If relative is true, time is relative to the tag this tag is locked to, if any. If false, or this tag is not locked to another tag, the time is absolute.

<DWORD>FrameTagManager.GetLockIDByID <DWORD>id

Returns the ID of the tag the supplied tag is locked to. An ID value of 0 means not locked.

<boolean>FrameTagManager.SetLockIDByID <DWORD>id <DWORD>lockID

Sets the ID of the tag the specified Tag is locked to. An ID value of 0 means not locked. Returns true on success. Attempting to set a lock that would cause a circular dependency will not change the current lock and the method will return false.

<string>FrameTagManager.GetNameByID <DWORD>id

Returns the name of the Time Tag specified by ID.

<void>FrameTagManager.SetNameByID <DWORD>id <&string>name

name is In parameter

Sets the name of the tag specified by ID to the supplied string.

<boolean>FrameTagManager.GetScaleByID <DWORD>id

Returns true if the time of the tag specified by ID will be scaled when the scene time is scaled.

<void>FrameTagManager.SetScaleByID <DWORD>id <boolean>scale

Set whether the time of the tag specified by ID will be scaled when the scene time is scaled.

<index>FrameTagManager.FindItemByTime <time>time

Returns the index of the first tag in the sorted list, if any, for the given
absolute time value.

<index>FrameTagManager.FindItem <DWORD>id

Returns the index of the tag with the supplied ID in the sorted tag list. A return value of -1 means a tag with the given ID was not found.

<DWORD>FrameTagManager.CreateNewTag <string>name <time>time lockID:<DWORD> scale:<boolean>

lockID default value: 0

scale default value: true

Creates a new tag with the given name at the given time. If lockID is 0 or not supplied, the tag is not locked to another tag.

<void>FrameTagManager.DeleteTag <DWORD>id

Deletes the tag specified by ID.

<void>FrameTagManager.ResetFrameTags()

Deletes all tags.

<boolean>FrameTagManager.CheckForLoop <DWORD>testID <DWORD>id

Returns true if tag testID is dependent on tag id

See also:

Time Tags Access using the FrameTagManager Interface


Interface: globalDXDisplayManager

Interfaces > Core Interfaces > globalDXDisplayManager

The globalDXDisplayManager Core Interface controls how DirectX shaders are being drawn in the viewports. It affects the new DirectX_9_Shader : Material and all other Viewport Manager shaders.

Properties:

globalDXDisplayManager.forceSoftware : boolean : Read|Write

If set to true, it will prevent the shaders from being displayed, and will default to the base material viewport display handler.

globalDXDisplayManager.forceSelected : boolean : Read|Write

This will only be ative if Force Software is set to true, it will allow the display of shaders on only selected objects - if they are not selected, they will use the default material viewport display code.

globalDXDisplayManager.sceneEffectActive : boolean : Read|Write

If set to true, Scene Effects will be active. If set to false, no Scene Effects will be used. Available in 3ds Max 8 and higher.

Methods:

<boolean>globalDXDisplayManager.isDXActive()

Returns true if DirectX is active.

The default location for setting this data is in the Medit Options dialog. There is also a Macroscript that will set these up, so they can be added by the user to the CUI system - see Macro_DXDisplay.mcr.


Interface: gridPrefs

Interfaces > Core Interfaces > gridPrefs

Originally impremented in Gmax, this core interface exposes the Home Grid settings in 3ds Max 8 and higher.

Interface: gridPrefs

Properties:

gridPrefs.spacing : float : Read|Write

Get/set the grid spacing value.

gridPrefs.majorLines : integer : Read|Write

Get/set the major line every Nth line value.

gridPrefs.perspViewGridExtents : integer : Read|Write

Get/set the extents of the grid in perspective views.

gridPrefs.inhibitGridSubdivision : boolean : Read|Write

Get/set the state of the "Inhibit Grid Subdivision Below Grid Spacing" checkbox.

gridPrefs.inhibitPerspViewGridResize : boolean : Read|Write

Get/set the state of the "Inhibit Perspective View Grid Resize" checkbox.

gridPrefs.dynamicUpdateAllVpts : boolean : Read|Write

Get/set the state of the "Dynamic Update" radio buttons. When set to true, the "All Viewports" option will be selected. When set to false, the "Active Viewport" option will be selected.


Interface: HDIKSys

Interfaces > Core Interfaces > HDIKSys

This Core Interface provides methods for creating and removing History Dependent IK Chains.

Methods

<void>HDIKSys.ikChain <node>startJoint <node>endJoint <boolean>createEndEffector

Creates an IK chain from the given start joint to the given end joint node. If createEndEffect is true, an end effector will be created.

<boolean>HDIKSys.RemoveChain <node>chainNode

Calling this method on the master controller causes all slave controllers in the chain to be replaced with default transform controllers (PRS). This method will support undo if it is enabled but will not turn undo on. This method does not cause viewports to be redrawn.

See also

HD IK controller chains can be assigned to existing hierarchies


Interface: heightManager

Interfaces > Core Interfaces > heightManager

The heightManager Core Inerface allows certain objects (Lights) in VIZ 2006 and higher to be created at a pre-defined Z height. This interface only manages the height values, the actual creation at custom Z-height is implemented by the Light-creating MacroScripts which access heights from this interface and perform the real work.

Interface: heightManager

Methods:

<void>heightManager.customizeHeights()

Opens the Heights customization dialog.

<void>heightManager.setCurrentHeightIndex <index>index

index Validated by Validator function

Sets the current Height index to the supplied index.

<float>heightManager.getHeight <index>index

index Validated by Validator function

Returns the Height value corresponding to the supplied index.

<integer>heightManager.getCurrentHeightIndex()

Returns the current Height index.

<float>heightManager.getNumHeights()

Returns the number of Height values available.

<string>heightManager.getHeightString <index>index

index Validated by Validator function

Returns the String of the Height value with the supplied index.

See also

Core Interfaces


Interface: EditRenderRegion

Interfaces > Core Interfaces > EditRenderRegion

NEW in 3ds Max 2009: The EditRenderRegion Interface exposes the new Render Region rubber band gizmo feature in 3ds Max 2009 and provides the following properties and methods:

Properties:

EditRenderRegion.IsEditing : boolean : Read|Write

Get/set whether the region is being edited. While you can set the value without an error, the setting will have no effect. Use the method EditRenderRegion.EditRegion() described below to toggle the value.

EditRenderRegion.IsEditable : boolean : Read|Write

Get/set whether the region is editable. It is true when the renderer is set to Region, Crop or Blowup mode.

Methods:

<void>EditRenderRegion.EditRegion()

Toggles the Region Editing mode on and off. You can check the value in EditRenderRegion.IsEditing to see whether the region editing is on or off.

Calling this method will set the renderer to Region mode automatically if it is not in Region mode yet.

<void>EditRenderRegion.UpdateRegion()

Updates the region after changes using the viewport.setRegionRect() method documented under Viewport Regions .

EXAMPLE:

EditRenderRegion.IsEditing --see if the region is being edited

à false

EditRenderRegion.IsEditable --see if it is editable (Region render mode)

à false

viewport.activeViewport = 1 --set the viewport 1 as the current one

à 1

viewport.getRegionRect 1 --get the current region rectangle of view 1

à (Box2 64 48 512 384)

EditRenderRegion.EditRegion() --enable editing the region

à OK

EditRenderRegion.IsEditing --see if it is in editing mode

à true

EditRenderRegion.IsEditable --see if it is in Region mode

à true

viewport.setRegionRect 1 (Box2 200 50 300 300) --set to a new region

à OK

EditRenderRegion.UpdateRegion() --and update the rubbed-band gizmo

à OK

EditRenderRegion.EditRegion() --toggle the editing off again

à OK

EditRenderRegion.IsEditing --see if still in editing mode

à false

EditRenderRegion.IsEditable --see if still in Region render mode

à true

See also

Viewport Regions


Interface: IDisplayGamma

Interfaces > Core Interfaces > IDisplayGamma

The IDisplayGamma Core Interface exposes some Display Gamma settings to MAXScript. The interface was exposed without any properties in 3ds Max 8 and extended to actually expose Color Correction properties in 3ds Max 2008.

Interface: IDisplayGamma

Properties:

IDisplayGamma.colorCorrectionMode : enum : Read|Write

colorCorrectionMode enums: {#LUT|#gamma|#none}

Get/Set the color correction mode to LUT, Gamma, or disables it. Available in 3ds Max 2008 and higher.

NOTE:

#LUT is not available in Autodesk VIZ!

IDisplayGamma.LUTFileName : filename : Read|Write

Get/Set the LUT file name. Available in 3ds Max 2008 and higher.

NOTE:

LUT integration is disabled in Autodesk VIZ, this property has only effect in 3ds Max.

IDisplayGamma.gamma : float : Read|Write

Get/Set the Gamma value. Available in 3ds Max 2008 and higher.

EXAMPLE:

IDisplayGamma.colorCorrectionMode = #gamma --enable Gamma

IDisplayGamma.gamma = 1.8 --set the Gamma to 1.8


Interface: IKSys

Interfaces > Core Interfaces > IKSys

This Core Interface provides methods for creating IK Chains.

NOTE:

This interface is not available in Autodesk VIZ.

Methods

<node>IKSys.ikChain <node>startJoint <node>endJoint <string>solver

Creates an IK chain where startJoint is the first node in the new chain (ancestor), endJoint is the last node in the chain (descendant) and solver is the name of the IK solver to use (as returned by the iksys.solverName() method described below.

<integer>IKSys.solverCount()

Returns the number of available solvers installed on the system.

<string>IKSys.solverName <integer>solverIndex

Returns the name of the indexed solver as string.

<string>IKSys.solverUIName <integer>solverIndex

Returns the UI Name of the indexed solver.

FOR EXAMPLE:

for i = 1 to iksys.solverCount() do

format "% : %\n" (iksys.solverName i) (iksys.solverUIName i)

RESULT:

IKHISolver : IKHISolver

IKLimb : IKLimb

SplineIKSolver : SplineIKSolver

OK

<void>IKSys.suspendLinkNotify()

Disables the link notification in IK systems.

<void>IKSys.resumeLinkNotify()

Enables the link notification in IK systems.

<bool>IKSys.isLinkNotifySuspended()

Returns true if IK link notification is disabled, false if enabled.


Interface: IMetaDataManager

NEW in 3ds Max 2009: The IMetaDataManager Interface is used internally by 3ds Max but exposes no properties or methods to MAXScript.

Properties:

Methods:

Actions:


Interface: InstanceMgr

Interfaces > Core Interfaces > InstanceMgr

The Instance Manager Core Interface provides access to properties and methods related to Instanced Nodes. It provides means for collecting instances, managing material propagation to instances, making instanced modifiers, controllers and nodes unique etc.

Properties:

InstanceMgr.autoMtlPropagation : boolean : Read|Write

When set to True, Materials assigned to an object will propagate automatically to all its instances.

Methods:

<DWORD>InstanceMgr.GetInstances <node>source <&node array>instances

instances is Out parameter

Returns the number of instances of the specified source node and the list of all instances in the by-reference Out parameter.

FOR EXAMPLE:

tp = Teapot() --create a teapot

$Teapot:Teapot01 @ [0.000000,0.000000,0.000000]

tp1 = instance tp --instance the teapot

$Teapot:Teapot02 @ [0.000000,0.000000,0.000000]

tp2 = instance tp --instance it again

$Teapot:Teapot03 @ [0.000000,0.000000,0.000000]

tp3 = copy tp --copy the teapot

$Teapot:Teapot04 @ [0.000000,0.000000,0.000000]

InstanceMgr.GetInstances tp &instances -- get the instances of the original

3

instances --show the returned array- all instances are there, the copy isn't

#($Teapot:Teapot03 @ [0.000000,0.000000,0.000000], $Teapot:Teapot02 @ [0.000000,0.000000,0.000000], $Teapot:Teapot01 @ [0.000000,0.000000,0.000000])

InstanceMgr.GetInstances tp3 &instances --get the instances of the copy

1

instances -- show the returned array - the copy is the only object in it

#($Teapot:Teapot04 @ [0.000000,0.000000,0.000000])

<DWORD> InstanceMgr.SetMtlOnInstances <node>source <material>newMtl

Propagates the supplied new material to all instances of the specified source node. Normally, instances can have independent materials. Using this method, all instances can be updated to use the same material. Returns the number of instances.

FOR EXAMPLE:

tp = Teapot() --create a teapot

$Teapot:Teapot01 @ [0.000000,0.000000,0.000000]

tp.material = standard diffuse:(color 255 0 0) --assign a red material

Standardmaterial:Standard

tp1 = instance tp --create an instance

$Teapot:Teapot02 @ [0.000000,0.000000,0.000000]

tp1.pos = [100,0,0] --move the instance

[100,0,0]

tp1.material = standard diffuse:(color 0 255 0) --assign a green material

Standardmaterial:Standard

tp2 = instance tp --create another instance

$Teapot:Teapot03 @ [0.000000,0.000000,0.000000]

tp2.pos = [200,0,0] --move the instance

[200,0,0]

tp2.material = standard diffuse:(color 0 0 255) --assign a blue material

Standardmaterial:Standard

newMaterial = standard diffuse:(color 250 255 255) --create a white material

Standardmaterial:Standard

InstanceMgr.SetMtlOnInstances tp newMaterial --assign to all instances

3 --3 object affected!

<bool>InstanceMgr.MakeObjectsUnique <&node array>nodes <enum>multiNodeOption

nodes is In parameter

multiNodeOption enums: {#prompt|#individual|#group}

Makes the objects passed by-reference unique. Returns True on success.

FOR EXAMPLE:

tp = Teapot() --create a teapot

$Teapot:Teapot01 @ [0.000000,0.000000,0.000000]

tp1 = instance tp --instance the trapot

$Teapot:Teapot02 @ [0.000000,0.000000,0.000000]

tp2 = instance tp --instance it once again

$Teapot:Teapot03 @ [0.000000,0.000000,0.000000]

InstanceMgr.GetInstances tp &instances --get all instances

3

--make the instances unique. Show a prompt to confirm the operation

InstanceMgr.MakeObjectsUnique &instances #prompt

true

--Check that every object is an instance of itself only.

InstanceMgr.GetInstances tp &instances

1

InstanceMgr.GetInstances tp1 &instances

1

InstanceMgr.GetInstances tp2 &instances

1

<bool>CanMakeObjectsUnique <&node array>nodes

nodes is In parameter

Returns True when the specified nodes can be made unique, False otherwise.

FOR EXAMPLE:

tp = Teapot() --create a teapot

$Teapot:Teapot01 @ [0.000000,0.000000,0.000000]

tp1 = instance tp --instance the teapot

$Teapot:Teapot02 @ [0.000000,0.000000,0.000000]

tp2 = copy tp --copy the teapot

$Teapot:Teapot03 @ [0.000000,0.000000,0.000000]

--Check if the two instances can be made unique - they can

InstanceMgr.CanMakeObjectsUnique #(tp,tp1)

True

--Check the original and the copy - not instances, cannot be made unique

InstanceMgr.CanMakeObjectsUnique #(tp,tp2)

False

<bool>InstanceMgr.MakeModifiersUnique <&node array>nodes <&maxObject array>modifiers <enum>multiNodeOption

nodes is In parameter

modifiers is In parameter

multiNodeOption enums: {#prompt|#individual|#group}

Makes the specified modifiers of the supplied nodes unique. Returns True on success.

<bool>InstanceMgr.CanMakeModifiersUnique <&node array>nodes <&maxObject array>modifiers

nodes is In parameter

modifiers is In parameter

Returns True when the specified modifiers of the supplied nodes can be made unique, False otherwise.

<bool>MakeControllersUnique <&node array>nodes <&maxObject array>controllers <enum>multiNodeOption

nodes is In parameter

controllers is In parameter

multiNodeOption enums: {#prompt|#individual|#group}

Makes the specified controllers of the supplied nodes unique. Returns True on success.

<bool>InstanceMgr.CanMakeControllersUnique <&node array>nodes <&maxObject array>controllers

nodes is In parameter

controllers is In parameter

Returns True when the specified controllers of the supplied nodes can be made unique, False otherwise.

See also:

getClassInstances


Interface: IVFB

NEW in 3ds Max 2009: The IVFB Interface is returned as notification parameter result by the two Rendered Frame Window and Image Viewer - related callbacks . It can be used to customize the appearance and register user-defined scripted rollouts in the top left, top right and bottom panels of the dialog.

Properties:

<IVFB>.ShowOverlays : boolean : Read|Write

Get/set the display of the render region box in the Rendered Frame Window. Corresponds to the "Toggle UI Overlays" button in the Rendered Frame Window main toolbar.

<IVFB>.ShowRollups : boolean : Read|Write

This property is true when the rollout panels are displayed in the Rendered Frame Window.

If no rollout panels have been installed, this may still return true, because it's only a global toggle used to optionally hide the rollouts. Setting this property will show/hide the rollout panels, and the UI is immediately updated.

<IVFB>.IsFramebuffer : boolean : Read

This property contains true if the window is a Rendered Frame Window. It is false for Image Viewer windows (as from File>View Image File).

This allows a script to install render controls on only the Rendered Frame Window.

<IVFB>.IsVisible : boolean : Read|Write

Get/set the visible state of the Image Viewer.

<IVFB>.IsInitialized : boolean : Read

Contains true if the Image Viewer has been initialized already by calling the .InitLayout() method documented further on this page.

Methods:

<value><IVFB>.InitRolloutWindow <enum>which <integer>width <integer>height

which enums: {#TopLeft|#TopRight|#Bottom}

Returns a RolloutFloater value, allowing rollouts to be added to it. It represents a single panel, not the entire floating window.

NOTE:

MAXScript can now create rollouts in borderless mode by calling AddRollout with the optional keyword argument border: set to false.

Such rollouts do not have a title bar nor border around them and merge seamlessly with the rest of the panel.

<boolean><IVFB>.GetRolloutWindowVisible <enum>which

which enums: {#TopLeft|#TopRight|#Bottom}

Returns the visibility of the specified rollout panel.

<void><IVFB>.SetRolloutWindowVisible <enum>which <boolean>show

which enums: {#TopLeft|#TopRight|#Bottom}

Sets the visibility of the specified rollout panel.

<void><IVFB>.SetMetric <enum>metricID <integer>value

metricID enums: {#HorzMarginLeft|#HorzMarginCenter|#HorzMarginRight|#VertMarginTop|#VertMarginCenter|#VertMarginBottom|#MinClientWidth|#MinClientHeight}

Sets the spacing between the panels in the framebuffer.

The first parameters can be one of the following:

#horzMarginLeft - Space in pixels between the left edge of the window and the left rollout panel.

#horzMarginCenter - Horizontal space in pixels between the two rollout panels.

#horzMarginRight - Space in pixels between the right edge of the window and the right rollout panel.

#vertMarginTop - Space in pixels between the top of the window and the top of the rollout panels.

#vertMarginCenter - Vertical space in pixels between the rollout panels and the bitmap view.

#vertMarginBottom - Vertical space in pixels between the bottom rollout panel and the bitmap view.

#minClientWidth - Minimum sizable width of the window in pixels.

#minClientHeight - Minimum sizable height of the window in pixels.

NOTE:

Despite the values of #minCleintWidth and #minClientHeight, the window can never be resized down to become smaller than the combined width of the top two rollouts.

<integer><IVFB>.GetMetric <enum>metricID

metricID enums: {#HorzMarginLeft|#HorzMarginCenter|#HorzMarginRight|#VertMarginTop|#VertMarginCenter|#VertMarginBottom|#MinClientWidth|#MinClientHeight}

Returns the spacing settings for the specified parameter of the current layout. See above for details.

<void><IVFB>.InitLayout()

Calling this method causes the current layout set up using the properties and methods above to be initialized.

See also

Rendered Frame Window and MAXScript


Interface: IViewportShadingMgr

Interfaces > Core Interfaces > IViewportShadingMgr

The IViewportShadingMgr Core Interface exposes the viewport shading (per-pixel illumination and shadow casting) to MAXScript.

Available in 3ds Max 2008 and higher.

Interface: IViewportShadingMgr

Properties:

IViewportShadingMgr.ShadingLimits : enum : Read|Write

ShadingLimits enums: {#None|#Good|#Best}

Get/Set the Viewport Shading Limits:

  • None - old mode, light limit dependent on graphics driver, typically 8 lights, per vertex lighting.

  • Good (SM 2.0) - shadow casting is enabled. On graphics hardware that supports only the SM2.0 shader model, only the old-style per vertex lighting will be calculated.

  • Best (SM 3.0) - shadow casting and per-pixel lighting are enabled, 64 lights are supported. This mode depends on the graphics hardware which must be SM 3.0 compliant.

See [ Red Area here ]

IViewportShadingMgr.AutoDisplaySelLights : bool : Read|Write

Get/Set the state of the "Auto Display Selected Lights" checkbox in the "Lighting and Shadows" tab of the "Viewport Configuration" dialog. When set to true, the currently selected lights will be enabled to illuminate/cast shadows, while unselected lights will be off. When set to false, all lights will be turned on.

See [ Blue Area here ]

IViewportShadingMgr.DefaultLightCastShadows : bool : Read|Write

Get/Set the state of the "Cast Shadows for Default Light" checkbox in the "Lighting and Shadows" tab of the "Viewport Configuration" dialog. When set to true, the default lights will cast shadows. When set to false, default lights will not cast shadows.

See [ Green Area here ].

IViewportShadingMgr.GlobalShadowIntensity : float : Read|Write

Get/Set the value of the "Global Shadow Intensity" spinner in the "Lighting and Shadows" tab of the "Viewport Configuration" dialog. Controls the intensity of the viewport Shadows. When set to 0.5, shadows will be 50% less dense.

See [ Green Area here ].

IViewportShadingMgr.UseTransparencyInShadows : bool : Read|Write

Get/Set whether viewport shadows will respect transparency.

IViewportShadingMgr.UpdateShadowsInActiveViewportOnly : bool : Read|Write

Get/Set whether viewport shadows will update in the active viewport only (true) or in all viewports (false, default).

IViewportShadingMgr.MaxActiveLight : integer : Read|Write

NEW in 3ds Max 2009: Get/Set the maximum number of lights to be displayed in the viewport. Default is 64.

Methods:

<void>IViewportShadingMgr.SelectShadowCastingLights()

Calling this method selects all lights currently set to cast shadows in the viewports.

Only the Light node's Interface: INodeShadingProperties .ViewportShadowCasting property value is taken into account, not the base object's shadow casting property.

<void>IViewportShadingMgr.SelectIlluminatingLights()

Calling this method selects all lights currently set to illuminate in the viewports.

Only the Light node's Interface: INodeShadingProperties .ViewportIllumination property value is taken into account, not the base object's .on property.

<void>IViewportShadingMgr.DisplayOnlySelectedLights()

Calling this method disables the viewport illumination for all lights that are not selected, enabling only the selected lights to illuminate in the viewports.

If no lights are selected, the illumination is disabled for all lights.

The method manipulates the Light Node's Interface: INodeShadingProperties .ViewportIllumination property, turning Viewport Illumination on and off based on the node's selected state. It does not affect the node's .ViewportShadowCasting property.

<void>IViewportShadingMgr.LockSelectedLights <bool>locked

Locks/Unlocks the currently selected lights.

When the .AutoDisplaySelLights property is set to true, lights that are not selected will not illuminate the scene.

You can lock the current selection to keep on illuminating the scene even after it has been deselected using this method with argument of true, or unlock the selected lights again by passing an argument of false.

<void>IViewportShadingMgr.GetViewportShadingLights <&node array>nodeList <enum>lightProperty

nodeList is In and Out parameter

lightProperty enums: {#ShadowCasting|#Illuminating|#Locked}

Returns the viewport shading lights into the by-reference array nodeList.

The lightProperty enum defines whether to collect the shadow-casting, the illuminating or the locked lights.

<void>IViewportShadingMgr.CastShadowsSelectedOnly <bool>Enabled

When the argument is true, the system will be switched to cast shadows only from selected lights. When the argument is false, all lights will be allowed to cast shadows.

<bool>IViewportShadingMgr.IsLightNodeSupported <node>LightNode

Returns true if the given light is supported by the Viewport Shading system.

<bool>IViewportShadingMgr.IsShadingLimitValid <enum>ShadingLimits

ShadingLimits enums: {#None|#Good|#Best}

Returns true if the given shading mode is valid on the current hardware.

<void>IViewportShadingMgr.ReviewGPUDiagnostics()

Prints a GPU diagnostics report to the MAXScript Listener.

EXAMPLE

IViewportShadingMgr.ReviewGPUDiagnostics()

//////////////////////////////////////////////////////

////////// Review GPU Feature Support ////////////

//////////////////////////////////////////////////////

Graphics Vendor Information: Direct3D 9.0 (NVIDIA Quadro FX 4000)

GPU Shader Model Support: SM3.0

Maximum pixel shader instruction count: 4096

Viewport Shading Quality: Best

Real-time Sun and Sky: Supported

Real-time Architectural Material: Supported

//////////////////////////////////////////////////////

OK

<void>IViewportShadingMgr.SetViewportShadingLimits <enum>ShadingLimits Quiet:<bool>

ShadingLimits enums: {#None|#Good|#Best}

Quiet default value: true

Sets the viewport shading limit to the given mode. If the quiet: optional keyword argument is specified as true, no errors will be reported if the given node is not supported on the current system.

See also

Interface: INodeShadingProperties

Core Interfaces


Interface: LayerManager

Interfaces > Core Interfaces > LayerManager

This Core Interface exposes the Layer Manager to MAXScript.

Properties:

LayerManager.count : integer : Read

Get the number of layers in the scene

LayerManager.current : Interface : Read

Returns a LayerProperties MixinInterface to the current layer.

Methods:

<Interface>LayerManager.getLayer <integer>which

Returns a LayerProperties MixinInterface to the indexed layer. The index is 0-based.

<Interface>LayerManager.newLayer()

Creates a new Layer and returns a LayerProperties MixinInterface to it.

<Interface>LayerManager.getLayerFromName <string>name

Returns a LayerProperties MixinInterface to the layer with the given name.

<Interface>LayerManager.newLayerFromName <string>name

Creates a new layer with the given name and returns a LayerProperties MixinInterface to it.

<void>LayerManager.editLayerByName <string>name

Enters editing mode for the layer with the given name.

<boolean>LayerManager.deleteLayerByName <string>name

Deletes the layer with the given name. Returns true if layer deleted, false otherwise. A layer can only be deleted if no nodes are in the layer and the layer is not the currently active layer.

This method is not available in Autodesk VIZ.

<void>LayerManager.closeDialog()

Closes the Layer Manager dialog.

<boolean>LayerManager.isDialogOpen()

Returns true if the Layer Manager dialog is open, false otherwise.

<ReferenceTarget>LayerManager.getLayerObject {<integer layer_index>|<string layer_name>}

Returns the specified layer as a ReferenceTarget. layer_index is 0-based, layer_name is case-insensitive. Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

NOTE:

Deprecated.

Use the FPS LayerProperties interface's .layerAsRefTarg property instead.

Provided for backwards compatibility with scripts written using the Avguard Extension in previous versions of 3ds Max.

EXAMPLE

for i = 0 to layerManager.count-1 do

(

  ilayer = layerManager.getLayer i

  layerName = ilayer.name

  layer = ILayerManager.getLayerObject i

  layerNodes = refs.dependents layer

  format "Layer: %; nodes: %\n" layerName layerNodes

)

LayerManager Interfaces:

Interface: LayerProperties

Interface: LayerProperties

See also

Interface: INodeLayerProperties

Interface: LayerProperties


Interface: LightingUnits

Interfaces > Core Interfaces > LightingUnits

The LightingUnits Core Interface exposes the Lighting Units settings to MAXScript.

Interface: LightingUnits

Methods:

<bool>LightingUnits.IsLightingSystemSI()

Returns true if the Lighting Units are set to International (SI) system, false if set to American (AS) sytem.

<bool>LightingUnits.IsLightingSystemAS()

Returns true if the Lighting Units are set to American (AS) system, false if set to International (SI) system.

<void>LightingUnits.SetLightingSystemToSI()

Sets the Lighting Units to International (SI) system.

<void>LightingUnits.SetLightingSystemToAS()

Sets the Lighting Units to American (AS) system.

<string>LightingUnits.GetLuminanceUnits()

Returns a string containing the Luminance Units, for example "cd/m^2" for SI and "cd/ft^2" for AS.

<string>LightingUnits.GetIlluminanceUnits()

Returns a string containing the Illuminance Units, for example "lx" for SI and "fc" for AS.

<float>LightingUnits.ConvertASToSI <float>as_value

Returns the SI value corresponding to the supplied AS value.

<float>LightingUnits.ConvertSIToAS <float>si_value

Returns the AS value corresponding to the supplied SI value.

<float>LightingUnits.ConvertToCurrentSystem <float>value <bool>is_SI_value

Returns the value in the current system corresponding to the supplied value. When is_SI_value is true, the input value is taken as SI, when false, it is taken as AS value.


Interface: LightingAnalysisOverlayFactory

NEW in 3ds Max 2009 Design: The LightingAnalysisOverlayFactory Interface is used internally by 3ds Max Design to create Lighting Analysis Overlays, but exposes no properties or methods to MAXScript.

Properties:

Methods:

Actions:

See also

Lighting Analysis and Daylight Simulation Tools


Interface: LightMeterManager

Interfaces > Core Interfaces > LightMeterManager

NEW in 3ds Max 2009 Design: The LightMeterManager Interface exposes properties and methods related to managing LightMeter Helpers. The same methods are used by the Lighting Analysis Assistant tool.

NOTE:

This feature is exposed in both 3ds Max and 3ds Max Design, but the LightMeter Helper is not available in 3ds Max. Thus, the interface can only be used on scenes containing Light Meters created using 3ds Max Design.

Methods:

<integer>LightMeterManager.getNumLightMeterHelpers()

Returns the number of LightMeter Helpers in the scene.

<Interface>LightMeterManager.getNthLightMeterHelper <index>index

Returns the LightMeter Interface of the N-th LightMeter Helper in the scene.

<node>LightMeterManager.getNthLightMeterHelperNode <index>index

Returns the node of the N-th LightMeter Helper in the scene.

<integer>LightMeterManager.getNumActiveLightMeterHelpers()

Returns the number of active LightMeter Helpers in the scene.

<bool>LightMeterManager.isCalculatingMeters()

Returns true if the Lighting Analysis Assistant is calculating LightMeters, false if not.

<bool>LightMeterManager.calculateMeters <index>index <bool>useRenderTimes <bool>useRenderSettings

Performs the LightMeter calculation for the indexed light meter.

<void>LightMeterManager.outputActiveMetersToCSVFiles <string>namePrefix

Writes the data from the active LightMeters to a Comma-Separated Values file with the specified name prefix.

See also

LightMeter : Helper

Interface: DaylightSimulationUtilities

Interface: DaylightSimulationUIOps

Interface: LightingAnalysisOverlayFactory

Lighting_Analysis_Overlay : RenderEffect

Lighting_Analysis_Data : RenderElement

Lighting Analysis and Daylight Simulation Tools


Interface: LoadSaveAnimation

Interfaces > Core Interfaces > LoadSaveAnimation

The LoadSaveAnimation Core Interface provides access to the animation clip loading and saving feature.

Available in 3ds Max 8 and higher.

Interface: LoadSaveAnimation

Methods:

<filename>LoadSaveAnimation.loadAnimationDlg()

Opens the Load Animation dialog.

Returns the filename of the selected file, or undefined if the dialog was cancelled.

<filename>LoadSaveAnimation.saveAnimationDlg()

Opens the Save Animation dialog.

Returns the filename of the selected file, or undefined if the dialog was cancelled.

<boolean>LoadSaveAnimation.saveAnimation <filename>fileName <&node array>nodes <&string array>userAttributes <&string array>userValues animatedTracks:<boolean> includeConstraints:<boolean> keyableTracks:<boolean> saveSegment:<boolean> segInterval:<interval by value> segKeyPerFrame:<boolean>

nodes is In and Out parameter

userAttributes is In and Out parameter

userValues is In and Out parameter

animatedTracks default value: true

includeConstraints default value: true

keyableTracks default value: false

saveSegment default value: false

segInterval default value: (interval 0f 0f)

segKeyPerFrame default value: false

Saves the animation of the nodes specified by the nodes by-reference array to the specified filename, adding the supplied user attributes and user values from the by-reference string arrays.

The optional keyword parameters correspond to the options found in the Save Animation dialog.

<boolean>LoadSaveAnimation.saveAnimationNodeAnim <filename>fileName <&Interface array>nodeAnims <&string array>userAttributes <&string array> userValues animatedTracks:<boolean> includeConstraints:<boolean> keyableTracks:<boolean> saveSegment:<boolean> segInterval:<inteval by value> segKeyPerFrame:<boolean>

nodeAnims is In and Out parameter

userAttributes is In and Out parameter

userValues is In and Out parameter

animatedTracks default value: true

includeConstraints default value: true

keyableTracks default value: false

saveSegment default value: false

segInterval default value: (interval 0f 0f)

segKeyPerFrame default value: false

Saves the animation of the node anims specified by the by-reference array of interfaces to the specified filename, adding the supplied user attributes and user values from the by-reference string arrays.

The optional keyword parameters correspond to the options found in the Save Animation dialog.

<boolean>LoadSaveAnimation.loadAnimation <filename>fileName <&node array>nodes relative:<boolean> insert:<boolean> insertTime:<time> stripLayers:<boolean> useMapFile:<boolean> mapFileName:<filename>

nodes is In and Out parameter

relative default value: true

insert default value: false

insertTime default value: 0f

useMapFile default value: false

mapFileName default value: undefined

Loads the animation from the specified filename to the nodes specified by the nodeTab by-reference array.

The optional keyword parameters correspond to the options found in the Load Animation dialog.

<boolean>LoadSaveAnimation.loadAnimationNodeAnim <filename>fileName <&Interface array>nodeAnims relative:<boolean> insert:<boolean> insertTime:<time> useMapFile:<boolean> mapFileName:<filename>

nodeAnims is In and Out parameter

relative default value: true

insert default value: false

insertTime default value: 0f

stripLayers default value: false

useMapFile default value: false

mapFileName default value: undefined

Loads the animation from the specified filename to the nodeAnims specified by the by-reference array.

The optional keyword parameters correspond to the options found in the Load Animation dialog.

<boolean>LoadSaveAnimation.createMapFile <filename>fileName <&node array>nodes <filename>incomingAnimationFile <&string array>userAttributes <&string array>userValues <&Interface array>retargetData nodeMapType:<enum> matchControllerExactName:<boolean> matchControllerType:<boolean> stripLayers:<boolean>

nodes is In and Out parameter

userAttributes is In and Out parameter

userValues is In and Out parameter

retargetData is In and Out parameter

nodeMapType enums: {#matchExactNodeName|#matchClosestNodeName|#matchNodeHierarchy}

nodeMapType default value: #matchClosestNodeName

matchControllerExactName default value: true

matchControllerType default value: false

stripLayers default value: false

Creates a map file with the given filename using the nodes specified by the by-reference array.

<boolean>LoadSaveAnimation.createMapFileNodeAnim <filename>fileName <&Interface array>nodeAnims <filename>incomingAnimationFile <&string array>userAttributes <&string array>userValues <&Interface array>retargetData nodeMapType:<enum> matchControllerExactName:<boolean> matchControllerType:<boolean>

nodeAnims is In and Out parameter

userAttributes is In and Out parameter

userValues is In and Out parameter

retargetData is In and Out parameter

nodeMapType enums: {#matchExactNodeName|#matchClosestNodeName|#matchNodeHierarchy}

nodeMapType default value: #matchClosestNodeName

matchControllerExactName default value: true

matchControllerType default value: false

Creates a map file with the given filename using the nodeAnims specified by the by-reference array of interfaces.

<Interface>LoadSaveAnimation.makeRetargetData()

Returns a retargetData [ Mixin Interface ] which can be used in the LoadSaveAnimation.createMapFile() method. See bottom of this page for details.

<boolean>LoadSaveAnimation.getUserAttributes <filename>fileName <&TSTR array>userAttributes <&TSTR array>userValues

userAttributes is In and Out parameter

userValues is In and Out parameter

Reads the user attributes and user values from the specified XAF file and writes them into the userAttributes and userValues by-reference string arrays. Returns true on success, false otherwise.

<string>LoadSaveAnimation.getAnimFileExtension()

Returns the animation format's file extension as string. Default value returned is "xaf".

<string>LoadSaveAnimation.getAnimMapFileExtension()

Returns the map format's file extension as string. Default value returned is "xmm".

<filename>LoadSaveAnimation.getAnimFileDirectory()

Returns the animation files path as filename.

<void>LoadSaveAnimation.setAnimFileDirectory <filename>fileName

Sets the animation files path to the given file name.

<filename>LoadSaveAnimation.getAnimMapFile()

Returns the animation map file as filename. Default return value is "Default".

<void>LoadSaveAnimation.setAnimMapFile <filename>fileName

Sets the animation map file to the given file name.

<Interface by value array>LoadSaveAnimation.setUpAnimsForSave <&node array>nodesToSetup animatedTracks:<boolean> includeContraints:<boolean> keyable:<boolean>

nodesToSetup is In and Out parameter

animatedTracks default value: true

includeContraints default value: true

keyable default value: false

Prepares the specified nodes for animation saving.

<Interface by value array>LoadSaveAnimation.setUpAnimsForLoad <&node array>nodesToSetup includePB2s:<boolean> stripLayers:<boolean>

nodesToSetup is In and Out parameter

includePB2s default value: false

stripLayers default value: false

Prepares the specified nodes for animation loading.

<Interface by value array>LoadSaveAnimation.setUpAnimsForMap <&node array>nodesToSetup stripLayers:<boolean>

nodesToSetup is In and Out parameter

stripLayers default value: false

Prepares the specified nodes for mapping.

<boolean>LoadSaveAnimation.replaceAttributesInMapFile <filename>mapFileName <filename>newMapFileName <&TSTR array>oldStrings <&TSTR array>newStrings <boolean>mapName

oldStrings is In and Out parameter

newStrings is In and Out parameter

Replaces attributes specified by oldStrings from the file mapFileName with the attributes specified by newStrings and creates a file named according to newMapFileName.

Available in 3ds Max 2008 and higher.

<boolean>LoadSaveAnimation.createDefaultMapFile <&node array>nodes <filename>mapFileName

nodes is In and Out parameter

Creates a default map file with the name provided as second argument out of the the nodes given as first argument.

Available in 3ds Max 2008 and higher.

<void>LoadSaveAnimation.createNodeAnimsForLoad <&maxObject array>anims <&maxObject array>clients <&maxObject array>subNums <&Interface array>nodeAnims

anims is In and Out parameter

clients is In and Out parameter

subNums is In and Out parameter

nodeAnims is In and Out parameter

Creates node anims for loading. Available in 3ds Max 2008 and higher.

<void>LoadSaveAnimation.createNodeAnimsForSave <&maxObject array>anims <&maxObject array>clients <&maxObject array>subNums <&Interface array>nodeAnims

anims is In and Out parameter

clients is In and Out parameter

subNums is In and Out parameter

nodeAnims is In and Out parameter

Creates node anims for saving. Available in 3ds Max 2008 and higher.

<void>LoadSaveAnimation.createNodeAnimsForMap <&maxObject array>anims <&maxObject array>clients <&maxObject array>subNums <&Interface array>nodeAnims

anims is In and Out parameter

clients is In and Out parameter

subNums is In and Out parameter

nodeAnims is In and Out parameter

Creates node anims for mapping. Available in 3ds Max 2008 and higher.

<filename>LoadSaveAnimation.loadAnimationDlgFromAnims <&maxObject array>anims <&maxObject array>clients <&integer array>subNums

anims is In and Out parameter

clients is In and Out parameter

subNums is In and Out parameter

Opens a Load Animation Dialog using the provided Anims. Available in 3ds Max 2008 and higher.

<filename>LoadSaveAnimation.saveAnimationDlgFromAnims <&maxObject array>anims <&maxObject array>clients <&integer array>subNums

anims is In and Out parameter

clients is In and Out parameter

subNums is In and Out parameter

Opens a Save Animation Dialog using the provided Anims. Available in 3ds Max 2008 and higher.

The following [ Mixin Interface ]can be used to create the elements of the retarget data array required by the LoadSaveAnimation.createMapFile() method:

<MixinInterface:retargetData>

Interface: retargetData

Properties:

<MixinInterface:retargetData>.currentNodeName : string : Read|Write

Get/set the name of the current node.

<MixinInterface:retargetData>.incomingNodeName : string : Read|Write

Get/set the name of the incoming node.

<MixinInterface:retargetData>.absolute : boolean : Read|Write

Enable/disable absolute/relative retargeting.

<MixinInterface:retargetData>.scale : point3 : Read|Write

Get/set the retarget scale.

<MixinInterface:retargetData>.currentBaseNodeName : string : Read|Write

Get/set the name of the current base node.

<MixinInterface:retargetData>.incomingBaseNodeName : string : Read|Write

Get/set the name of the incoming base node.

<MixinInterface:retargetData>.currentBaseChainNodeName : string : Read|Write

Get/set the name of the current base chain node.

<MixinInterface:retargetData>.currentEndChainNodeName : string : Read|Write

Get/set the name of the current end chain node.

<MixinInterface:retargetData>.incomingBaseChainNodeName : string : Read|Write

Get/set the name of the incoming base chain node.

<MixinInterface:retargetData>.incomingEndChainNodeName : string : Read|Write

Get/set the name of the incoming end chain node.

<MixinInterface:retargetData>.FKRetargetingEnabled : boolean : Read|Write

Enable/disable FK Retargeting. When set to true, FK Retargeting will be enabled.

<MixinInterface:retargetData>.FKBaseChainNodeName : string : Read|Write

Get/set the name of the FK base chain node.


Interface: LuminosityUtil

Interfaces > Core Interfaces > LuminosityUtil

NEW in 3ds Max 2009 Design: The LuminosityUtil Interface exposes a method for calculating the luminosity using the given R, G, and B components:

NOTE:

This feature is exposed in 3ds Max Design only.

Methods:

<float>LuminosityUtil.illumination <float>r <float>g <float>b

Returns the illumination based on the supplied Red, Green and Blue values.

Note that the contribution of the Red, Green and Blue channels is not identical:

EXAMPLE:

LuminosityUtil.illumination 255 255 255 à 255.0

LuminosityUtil.illumination 255 0 0 à 67.575

LuminosityUtil.illumination 0 255 0 à 170.85

LuminosityUtil.illumination 0 0 255 à 16.575

LuminosityUtil.illumination 255 255 0 à 238.425

LuminosityUtil.illumination 255 0 255 à 84.15

LuminosityUtil.illumination 0 255 255 à 187.425

See also

Lighting Analysis and Daylight Simulation Tools


Interface: manip

Interfaces > Core Interfaces > manip

The manip Core Interface exposes the viewport Manipulators to MAXScript.

Interface: manip

Properties:

manip.msXYPlane : Interface : Read

manip.msXZPlane : Interface : Read

manip.msYZPlane : Interface : Read

Return a manipPlane [ Mixin Interface ] providing methods to get intersections with the respective plane.

Methods:

<mesh>manip.makeSphere <point3>pos <float>radius <integer>segments

This returns a mesh sphere with the given position, radius, and segments.

<point3>pos: Sets the mesh sphere Position

<float>radius: Specifies the radius of the sphere.

<integer>segments: Sets the number of polygonal divisions for the sphere.

<mesh>manip.makeTorus <point3>pos <float>radius <float>radius2 <integer>segs <integer>sides

Create a torus mesh with the given values.

<point3>pos: Sets the position of the torus.

<float>radius: Sets the distance from the center of the torus to the center of the cross-sectional circle. This is the radius of the torus ring.

<float>radius2: Sets the radius of the cross-sectional circle. The default is 10 units. This value is replaced each time you create a torus.

<integer>segs: Sets the number of radial divisions around the torus. By reducing this number, you can create polygonal rings instead of circular ones.

<integer>sides: Sets the number of sides on the cross-sectional circle of the torus. By reducing this number, you can create prism-like cross sections instead of circular ones.

<mesh>manip.makeBox <point3>pos <float>l <float>w <float>h <integer>lsegs <integer>wsegs <integer>hsegs

Creates a box mesh with the given parameters.

<point3>pos

Sets the position of the Box.

<float>l

Sets the length, width, and height of the Box object. These fields also act as readouts while you drag the sides of the box. Default=0,0,0.

<float>w

Sets the length, width, and height of the Box object. These fields also act as readouts while you drag the sides of the box. Default=0,0,0.

<float>h

Sets the length, width, and height of the Box object. These fields also act as readouts while you drag the sides of the box. Default=0,0,0.

<integer>lsegs

Sets the number of divisions along each axis of the object. Can be set before or after creation. By default, each side of the box is a single segment. When you reset these values, the new values become the default during a session. Default=1,1,1.

<integer>wsegs

Sets the number of divisions along each axis of the object. Can be set before or after creation. By default, each side of the box is a single segment. When you reset these values, the new values become the default during a session. Default=1,1,1.

<integer>hsegs

Sets the number of divisions along each axis of the object. Can be set before or after creation. By default, each side of the box is a single segment. When you reset these values, the new values become the default during a session. Default=1,1,1.

TIP:

Increase the Segments settings to give objects extra resolution for being affected by modifiers. For example, if you're going to bend a box on the Z axis, you might want to set its Height Segments parameter to 4 or more.

<Interface>manip.makeCircle <point3>center <float>radius <integer>segments

Creates a circle with the given parameters.

<point3>center

Sets the position of the Circle.

<float>radius

Sets the radius of the Circle.

<integer>segments

Sets the number of segments in the Circle.

<Interface>manip.makeGizmoShape()

Returns a gizmoShape Interface representing an empty gizmo shape that can be used to create user-defined gizmos by adding points to define freeform lines.

<Interface>manip.makePlaneFromPts <point3>p1 <point3>p2 <point3>p3

Returns a manipPlane Interface representing a plane passing through the three given points.

<point3>p1

first point of the plane definition

<point3>p2

second point of the plane definition

<point3>p3

third point of the plane definition

<Interface>manip.makePlaneFromNormal <point3>normal <point3>point

Returns a manipPlane Interface representing a plane with the given normal that passes through the given point.

<point3>normal

the normal of the plane

<point3>point

the point the plane passes through

See also

Scripted Manipulators

Interface: simpleManip

Interface: gizmoShape

Interface: manipPlane


Interface: maxOps

Interfaces > Core Interfaces > maxOps

This Core Interface exposes various 3ds Max system properties and methods to MAXScript.

Version and License Info

Properties:

maxOps.productAppID : enum : Read

productAppID enums: {#none|#max|#viz|#gmax,#vizR}

The enum values returned are as follows:

#none - no ID

#max - 3ds Max

#viz - Autodesk VIZ

#gmax - gmax

#vizR - VIZrender

maxOps.productVersion : enum : Read

productVersion enums: {#productVersionDevel|#productVersionTrial|#productVersionOrdinary|#productVersionEdu|#productVersionNFR}

Returns the Product Version type.

The enum values returned are as follows:

#productVersionDevel - debug build, or licensed in-house

#productVersionTrial - trial license

#productVersionOrdinary - commercial license

#productVersionNFR - not for resale

#productVersionEdu - educational or student license

NOTE:

It should be noted that all copies of 3ds Max return a hardwarelockid of "-1" while under the grace period and until they have been authorized. You can also check for that number and initiate your own demo mode .

maxOps.licenseBehavior : enum : Read

licenseBehavior enums: {#licenseBehaviorPermanent|#licenseBehaviorExtendable|#licenseBehaviorNonextendable}

Returns the License Behavior.

The enum values returned are as follows:

#licenseBehaviorPermanent - permanent license, or hardware lock

#licenseBehaviorExtendable - term license, can be extended

#licenseBehaviorNonextendable - term license, cannot be extended

maxOps.licenseDaysLeft : integer : Read

Its return value is an integer indicating the number of full days left in the term of the license. A value of 0 means that today is the last day of validity. For permanent licenses, a fixed value is returned indicating greater than 10 years are left.

maxOps.isNetworkLicense

The property is read-only, with a boolean value: true means a network license, false means a local license.

FOR EXAMPLE:

--This example displays the values of your Cdilla license:

rollout CdillaOPS "License Properties" width:220 height:270

(

groupBox grp1 "License Values" pos:[18,18] width:180 height:265

button btn5 "Days until Expiration" pos:[50,45] width:119 height:18

editText edt5 "" pos:[50,75] width:119 height:18

button btn6 "License Version" pos:[50,105] width:119 height:18

editText edt6 "" pos:[50,135] width:119 height:18

button btn7 "License Behavior" pos:[50,165] width:119 height:18

editText edt7 "" pos:[50,195] width:119 height:18

button btn8 "Hardware Lock ID" pos:[50,225] width:119 height:18

editText edt8 "" pos:[50,255] width:119 height:18

on btn5 pressed do

edt5.text = (maxOps.licenseDaysLeft as string)

on btn6 pressed do

(

version = maxOps.productVersion as string

edt6.text = substring version 15 version.count

)

on btn7 pressed do

(

version = maxOps.licenseBehavior as string

edt7.text = substring version 16 version.count

)

on btn8 pressed do

edt8.text = (hardwarelockid as string)

)

rof = newRolloutFloater "License Status" 230 380

addRollout CdillaOPS rof

Methods:

maxOps.isFeatureLicensed <integer>featureNumber

Returns true if the given feature is licensed, false otherwise.

Trackbar, Controllers

Properties:

maxOps.trackbar : Interface : Read

Contains the Trackbar Interface .

maxOps.overrideControllerRangeDefault : boolean : Read|Write

When set to true, new procedural controllers that normally require a range will be set to infinite range. When set to false (default behavior prior to 3ds Max 8), the range of such controllers will be set explicitly to the current animation range, causing the controllers to stop updating after the last frame of the range should the scene animation range be increased later. Available in 3ds Max 8 and higher.

maxOps.springQuickEditMode : boolean : Read|Write

Get/set Spring Quick Edit mode on and off. Corresponds to the checkbox in the Animation tab of the Preferences dialog.

maxOps.springRollingStart : integer : Read|Write

Get/set the Spring Controller's Rolling Start value. Corresponds to the Rollback value in the Animation tab of the Preferences dialog.

Methods:

maxOps.getTrackBar()

Returns the interface to the trackbar. See Trackbar Interface for details.

Progressive Mode

Properties:

maxOps.inProgressiveMode : boolean : Read

Returns true if 3ds Max is in Progressive mode, false otherwise.

When a time sequence of matrices is computed and has to be assigned to the transformation matrix of a node that employs the standard PRS controller and the standard Euler XYZ controller for the rotation, we would achieve a better animation result if the euler angles for the current frame were calculated based on the angles from the previous frame. The Progressive Mode tells the Euler controller to derive angles based on the previous frame. It is assumed that in this mode, the node transformation is set in strictly forward time order.

Also see beginProgressiveMode() and endProgressiveMode() methods below.

Methods:

<void>maxOps.beginProgressiveMode()

Enables Progressive mode. See also maxOps.inProgressiveMode property above.

<void>maxOps.endProgressiveMode()

Disables Progressive mode. See also maxOps.inProgressiveMode property above.

Delete Animation

Methods:

<void>deleteSelectedAnimation()

Deletes selected animation.

Create Tab

Properties:

maxOps.autoGrid : boolean : Read|Write

Enable/Disable the AutoGrid option.

maxOps.startNewShapeLock : boolean : Read|Write

Enable/Disable the Start New Shape option checkbox.

Methods:

<void>startNewShape()

Start the creation of a new Shape.

Hierarchy Tab

Properties:

maxOps.pivotMode : enum : Read|Write

pivotMode enums: {#none|#pivotOnly|#objectOnly|#hierarchyOnly}

This property corresponds to the pivot buttons in the Pivot subpanel of the Hierarchy Panel.

Motion Tab > Trajectory

Properties:

maxOps.trajectoryMode : bool : Read|Write

When set to true, the Hierarchy tab of the Command Panel will be switched to Trajectories mode.

When set to false, the Hierarchy tab of the Command Panel will be switched to Parameters mode.

If the Command Panel is not in the Hierarchy tab, it will be switched to it automatically.

Available in 3ds Max 2008 and higher.

maxOps.trajectoryKeySubMode : bool : Read|Write

When set to true, the Trajectories mode will be switched to Key Sub-Object mode.

If the Command Panel is not in the Hierarchy tab, it will be switched to it automatically.

If the Hierarchy has not been set to Trajectories mode by setting maxops.trajectoryMode=true or by manually switching with the mouse , it will be set to Trajectories mode automatically.

Available in 3ds Max 2008 and higher.

maxOps.trajectoryAddKeyMode : bool : Read|Write

When set to true, the Add Key mode in the Trajectories rollout of the Hierarchy tab of the Command Panel will be turned on. When false, it will be turned off.

If the Command Panel is not in the Hierarchy tab, it will be switched to it automatically.

If the Hierarchy has not been set to Trajectories mode by setting maxops.trajectoryMode=true or by manually switching with the mouse , it will be set to Trajectories mode automatically.

If the Trajectories mode is not in Key Sub-Object mode by setting maxops.trajectoryKeySubMode=true or by manually switching with the mouse, the Sub-Object mode will be set automatically.

Available in 3ds Max 2008 and higher.

Methods:

<void>maxOps.deleteSelectedTrajectoryKey()

Deletes the selected trajectory key. Available in 3ds Max 2008 and higher.

Display Tab

Properties:

maxOps.hideFrozenObjects : boolean : Read|Write

Gets/Sets the state of the Hide Frozen Objects checkbox in the Display tab.

NOTE:

You have to call completeRedraw() after setting this property.

Set Key Mode

Properties:

maxOps.setKeyMode : boolean : Read|Write

Get/set the SetKey mode state

maxOps.setKeySuspend : boolean : Read|Write

Get/set the SetKey Suspend mode state

maxOps.setKeyFilters : enum by value array : Read

setKeyFilters enums: {#all|#position|#rotation|#scale|#ikParams|#objParams|#custAttribs|#modifiers|#materials|#other}

Always returns the fixed list of the filter names.

maxOps.setKeyNodeSets : String array : Read

Returns an array of node sets.

NOTE:

The array does not include "Selected".

maxOps.setKeyNodeSetCurrent : String : Read|Write

Returns "" if the current setKey node set is "Selected", setting it to "" sets the current setKey node set to "Selected".

NOTE:

A "SetKey NodeSet" is what is shown in the dropdown list above the Key Filters button in the status panel. The first entry in this dropdown is "Selected", which corresponds to a set name of "". The remaining items are all character nodes in the scene and all named selection sets in the scene.

Methods:

<boolean>maxOps.getSetKeyMode()

This method returns true if Set Key mode is active, false if not active.

maxOps.getSetKeyFilterState <enum>filter

filter enums: {#position|#rotation|#scale|#ikParams|#objParams|#custAttribs|#modifiers|#materials}

Returns the state of the specified SetKey filter.

maxOps.setSetKeyFilterState <enum>filter <bool>onOff

filter enums: {#position|#rotation|#scale|#ikParams|#objParams|#custAttribs|#modifiers|#materials}

Sets the state of the specified SetKey filter.

FOR EXAMPLE:

-- print SetKey Filters state

for filter in maxops.setKeyFilters do

format "% : %\n" (filter as string) (maxops.getSetKeyFilterState filter)

-- turn all on

for filter in maxops.setKeyFilters do

maxops.setSetKeyFilterState filter true

<void>maxOps.getDefaultTangentType <&enum>dfltInTangentType <&enum>dfltOutTangentType

dfltInTangentType enums: {#smooth|#linear|#step|#fast|#slow|#custom|#flat}

dfltInTangentType is Out parameter

dfltOutTangentType enums: {#smooth|#linear|#step|#fast|#slow|#custom|#flat}

dfltOutTangentType is Out parameter

Returns the default In and Out tangent types into the two Out parameters passed by-reference.

Available in 3ds Max 8 and higher.

<void>maxOps.setDefaultTangentType <enum>dfltInTangentType <enum>dfltOutTangentType writeInCfgFile:<boolean>

dfltInTangentType enums: {#smooth|#linear|#step|#fast|#slow|#custom|#flat}

dfltOutTangentType enums: {#smooth|#linear|#step|#fast|#slow|#custom|#flat}

writeInCfgFile default value: true

Sets the default In and Out tangent types. When writeInCfgFile: is set to true (default), the changes will also be recorded in the configuration file, making them sticky between 3ds Max sessions.

Available in 3ds Max 8 and higher.

EXAMPLE:

maxops.setDefaultTangentType #slow #fast

OK

maxops.getDefaultTangentType &inTangent &outTangent

OK

inTangent

#slow

outTangent

#fast

NOTE:

The flyout in the 3ds Max GUI provides icons only for the cases where the In and Out tangents are equal. The above method can be used to set the default tangents to any combination of In and Out types which cannot be represented by the flyout icons. In these cases, a special icon with a question mark ? will be displayed in the GUI.

AutoKey Default Key

Properties:

maxOps.autoKeyDefaultKeyOn : boolean : Read|Write

When this option is set to true (default), creating a key in AutoKey mode on a frame other than the one specified by maxops.autoKeyDefaultKeyTime will create a key on the frame specified by maxops.autoKeyDefaultKeyTime with the initial value of the animated property. This is the default behavior of 3ds Max since its first release.

When this option is set to false, no key other than the one on the current frame will be created by the AutoKey feature.

Available in 3ds Max 2008 and higher.

maxOps.autoKeyDefaultKeyTime : time : Read|Write

When maxops.autoKeyDefaultOn is set to true, a key will be created automatically on the frame defined by this time value.

Possible values are 0f and 1f.

Available in 3ds Max 2008 and higher.

Paint Selection Brush

Properties:

maxOps.paintSelBrushSize : integer : Read|Write

Get/Set the size of the Paint Selection brush. The Paint Selection is a selection mode accessible through the Selection Region flyout. The value corresponds to the "Paint Selection Brush Size" value under Customize>Preferences>General>Scene Selection. Note that right-clicking the Paint Selection icon in the main toolbar will open the Preferences dialog.

Bitmap Importer

Methods:

<bool>maxOps.canImportBitmap <filename>fileName

Returns true if a bitmap importer is present for the extention in the file name, false otherwise. Does not check to see if the file exists or if it is a valid bitmap file.

Viewport Display

Methods:

bool>maxOps.displayActiveCameraViewWithMultiPassEffect()

If the active view is a Camera view and a multi-pass effect is turned on in the camera's properties, then this function returns true. Otherwise it does nothing and returns false.

maxOps.setActiveViewportTransparencyDisplay <integer>transparencyLevel

Takes a single integer argument:

0 - turns off transparency in the active viewport

1 - sets it to screendoor

2 - sets it to blended transparency.

Custom User Interface

Methods:

<bool>maxOps.loadCUIFile <filename>fileName

Returns true if successful and false otherwise.

Iterative Rendering

Properties:

<bool>maxOps.rendUseIterative

NEW in 3ds Max 2009: Get/set the Iterative Rendering mode.

When set to true, only the current frame will be rendered and no file will be saved to disk.

When set to false, the Render Dialog settings for Time Output and File Saving will be respected (this is the default and the only behavior in releases prior to 3ds Max 2009).

NOTE:

Iterative rendering CANNOT be activated using the render() method.

You can use max quick render after setting maxOps.rendUseIterative to true to perform an iterative rendering.

Render Element Manager

Methods:

maxOps.GetCurRenderElementMgr()

Returns the current render element manager .

maxOps.GetRenderElementMgr <enum>

{#Production|#Draft}

Gets a specific render element manager .

NOTE:

The #Draft renderer was retired in 3ds Max 6.

Calling this method with #Draft argument will return undefined in 3ds Max 6 and higher.

Collapse and Clone Nodes

Methods:

<bool>maxOps.CollapseNode <node>node <boolean>noWarning

Collpases the complete modifier stack of the node. When noWarning is set to true, no prompt will be issued. Returns true if successful and false otherwise.

<bool>maxOps.CollapseNodeTo <node>node <index>modIndex <boolean>noWarning

Collpases the modifier stack up to the indexed modifier. The modifiers are counted from top of the stack. All modifiers below and INCLUDING the specified one will be collapsed.

When noWarning is set to true, no prompt will be issued. Returns true if successful and false otherwise.

<bool>maxOps.CloneNodes <&node array>nodes offset:<point3> expandHierarchy:<boolean> cloneType:<enum> actualNodeList:<node array> newNodes:<node array>

This method will return true if successful, otherwise it will return false.

<&node array>nodes

This is the list of nodes that you want to clone. nodes is In parameter.

<&point3>offset

The positional offset that will be applied to the cloned nodes. offset is In parameter.

expandHierarchy:<boolean>

expandHierarchy default value: false

Indicates if children will be cloned in hierarchies. Default is false.

cloneType:<enum>

cloneType enums: {#copy|#instance|#reference}

cloneType default value: #copy

actualNodeList:<node array>

actualNodeList default value: #()

This node array will be filled in with the original nodes to be cloned. The reason for this is that there can be dependencies between nodes that causes other nodes to be added to the list. For example light/camera targets, nodes part of systems, part of groups or expanded hierarchies etc.

newNodes:<node array>

newNodes default value: #()

This node array will be filled in with the new cloned nodes. There is a one to one relationship between the nodes returned in the actualNodeList array and the newNodes array.

NOTE:

actualNodeList and newNodes take an argument of <&node array>, and are Out parameters. This is important because:

1) the variables should be passed by reference, and

2) we don't need to intitialize the variables to arrays since they are only Out parameters (MAXScript doesn't try to convert the value passed in to an array).

FOR EXAMPLE:

s=sphere()

-- variables not passed by reference, does not work rightmaxops.clonenodes s actualNodeList:a newNodes:b

a --> undefined

b --> undefined

-- variables passed by reference without initializing, works rightmaxops.clonenodes s actualNodeList:&c newNodes:&d

c --> #($sphere01)

d --> #($sphere03)

Also note that the first argument type is specifed as <&node array>nodes, In parameter. Since it is an In parameter, we know that the method does not change the contents of the array passed, so there is no point in passing this array by reference.

In addition, MAXScript automatically wraps the single argument passed into a temporary array, so we can use s instead of #(s) to supply the node array.

WARNING!

You may not use maxOps.cloneNodes inside an undo off context. Doing so will crash 3ds Max when using the Undo function!

Window/Crossing Selection Type

Methods:

maxOps.setSelectionType <boolean>auto <enum>method

Returns true if successful and false otherwise.

<boolean>auto

method enums: {#window|#crossing|#leftToRight|#rightToLeft}

true 1: Enables auto Win/Cross: moving left-to-right is crossing selection

true 0: Enables auto Win/Cross: moving right-to-left is crossing selection

false 1: Disables auto Win/Cross, turns ON crossing selection

false 0: Disables auto Win/Cross, turns OFF crossing selection

The integer relates to the radiobutton index in Customize/Preferences.

Node Handle

Methods:

maxOps.getNodeByHandle <DWORD>handle

Returns a node associated with a given handle.

Color By ID

Methods:

<void>maxOps.colorById <DWORD>id <&color>color

color is Out parameter

Returns a specific color for each unique ID passed. The result is written to the Out parameter by reference. This method is used internally to generate colors representing Material and Object IDs in the respective RenderElements. Available in 3ds Max 8 and higher.

FOR EXAMPLE:

for i = 0 to 9 do

(

  maxops.colorById i &theColor

  format "ID:% Color:%\n" i theColor

)

RESULT:

ID:0 Color:(color 100 100 100)

ID:1 Color:(color 213 16 100)

ID:2 Color:(color 70 188 100)

ID:3 Color:(color 183 104 100)

ID:4 Color:(color 40 20 100)

ID:5 Color:(color 153 192 100)

ID:6 Color:(color 10 108 100)

ID:7 Color:(color 123 24 100)

ID:8 Color:(color 236 196 100)

ID:9 Color:(color 93 112 100)

Find Nodes

Methods:

<void>maxOps.findNodes <&node array>templateNodes <&node array>foundNodes nodePropsToMatch:<&enum array>

templateNodes is In parameter

foundNodes is Out parameter

nodePropsToMatch enums: {#nodePropMaterial|#nodePropLayer}

nodePropsToMatch default value: #()

nodePropsToMatch is In parameter

Finds nodes similar to the ones specified in the template. Optionally matches material and layer properties. Available in 3ds Max 2008 and higher.

FOR EXAMPLE:

(

resetMaxFile #noPrompt --reset max file

--create 10 boxes and 10 spheres:

for i = 1 to 10 do box pos:[i*50,0,0]

for i = 1 to 10 do sphere pos:[i*50,100,0]

$Box*.material = standard() --assign standard material to all boxes

$Box01.material = multiMaterial() --change material of first box

--find all objects similar to the Box01 and Sphere01

--that have the same material as the template object

maxOps.findNodes #($Box01,$Sphere01) &foundNodes nodePropsToMatch:#(#nodePropMaterial)

print foundNodes --print the resulting array

)

RESULT:

$Box:Box01 @ [50.000000,0.000000,0.000000]

$Sphere:Sphere01 @ [50.000000,100.000000,0.000000]

$Sphere:Sphere02 @ [100.000000,100.000000,0.000000]

$Sphere:Sphere09 @ [450.000000,100.000000,0.000000]

$Sphere:Sphere08 @ [400.000000,100.000000,0.000000]

$Sphere:Sphere07 @ [350.000000,100.000000,0.000000]

$Sphere:Sphere10 @ [500.000000,100.000000,0.000000]

$Sphere:Sphere06 @ [300.000000,100.000000,0.000000]

$Sphere:Sphere03 @ [150.000000,100.000000,0.000000]

$Sphere:Sphere04 @ [200.000000,100.000000,0.000000]

$Sphere:Sphere05 @ [250.000000,100.000000,0.000000]

OK

As you can see, only the first box was collected because all other boxes have a different material.

All spheres have the same material (no material at all), so they were all collected as similar to the $Sphere01.


Interface: medit

Interfaces > Core Interfaces > medit

This Core Interface is available for Texture maps and Materials and exposes the Material Editor slots to MAXScript.

Methods:

<maxObject>medit.GetCurMtl()

This method returns the material currently selected in one of the 24 sample slots of the Material Editor.

<void>medit.SetActiveMtlSlot <index>slot <boolean>forceUpdate

This method allows you to set the active material slot:

<index>slot

The material slot index, range from 1 to 24.

<boolean>forceUpdate

Set this to true to update the slot contents.

<index>medit.GetActiveMtlSlot()

This method returns the index of the active material slot.

<void>medit.PutMtlToMtlEditor <maxObject>mtl <index>slot

This method allows you to put the specified material to the specified material editor slot:

<maxObject>mtl

The material you want to put.

<index>slot

The index of the material slot you wish to put the material into.

FOR EXAMPLE

MatEditor.Open() --open the material editor.

theMat = multiMaterial numsubs:5 --create a new material

medit.PutMtlToMtlEditor theMat 3 --add it to slot 3

medit.SetActiveMtlSlot 3 true --set slot 3 as the active slot

<maxObject>medit.GetTopMtlSlot <index>slot

This method returns a pointer to the material base from the specified slot.

<index>slot

The index of the material slot for which you wish to obtain the material.

<boolean>medit.OkMtlForScene <material>mtl

Before assigning material to scene, call this to avoid duplicate names.

Available in 3ds Max 4 and higher.

<material>mtl

The material to test for putting into the scene.

<void>medit.UpdateMtlEditorBrackets()

It makes sure the Materials Editor slots correctly reflect which materials are used in the scene, which are used by selected objects, etc. This is used internally for the drag-and-drop of materials to nodes -- there is no reason why a plug-in developer should need to call it.

Available in 3ds Max 3 and higher.

See also

Material Editor

BitmapTex Reload and viewImage


Interface: MemStream

Interfaces > Core Interfaces > MemStream

The MemStream Core Interface was first introduced in gMax 1.0 and is available in MAXScript since 3ds Max 5. MemStream provides fast stream parsing by loading the entire file into memory.

The memStreamMgr and memStream interfaces provide a large set of methods for parsing the stream.

memStreamMgr - Interface

Methods

<Interface>MemStreamMgr.openFile <filename>fname

Returns a memStream interface where the content of the specified file is the input stream to be processed. If the file cannot be opened, a value of undefined is returned.

<Interface>MemStreamMgr.openString <filename>string

Returns a memStream interface where the content of the string is the input stream to be processed.

<void>MemStreamMgr.close <Interface>memStream

Closes the input stream for the memStream, freeing the memory associated with this stream.

memStream - Interface

The memStream Interface provides methods for parsing the input stream. This interface is returned from the memStreamMgr.openString() and memStreamMgr.openFile() methods.

Methods

<filename><Interface:MemStream>.getFileName()

Returns the file name that the memStream was created from. Returns "" if the interface was created via memStreamMgr.openString().

<void><Interface:MemStream>.skipSpace()

Skips leading whitespace characters (space, tab, and newlines) starting at the current stream cursor position. Following this call the stream cursor position will be at a non-whitespace character, or at the end of the stream.

<string><Interface:MemStream>.readChar()

Reads a single character from the stream, returning it as a string.

<string><Interface:MemStream>.peekChar()

Reads a single character from the stream, returning it as a string. Does not increment the stream cursor position.

<string><Interface:MemStream>.readLine()

Reads all characters from the current stream cursor position until a newline and returns it as a string.

<string><Interface:MemStream>.readToken()

Reads a token from the given stream returns it as a string. A token is defined by a sequence of characters surrounded by whitespace or the stream start or end. Leading whitespace and one line "//" style comments are automatically skipped.

The maximum allowed length of the returned string is 5120 characters. If a token larger than this length is read, the string returned contains the first 5120 characters of the token. The stream cursor position will be at the next character.

<string><Interface:MemStream>.peekToken()

Same as <memStream>.readToken except it does not increment the stream cursor position.

<void><Interface:MemStream>.unReadToken()

Resets the stream cursor position to right before the last readToken operation.

<string><Interface:MemStream>.readBlock <string>open <string>close

Reads a block of tokens from the 'open' token until the 'close' token, automatically skipping nested open/close token pairs, and returns the contents as a string. This string will contain the initial 'open' token and the final 'close' token. The initial 'open' token must be the next token in the input stream. If it is not, a value of ‘undefined’ will be returned.

Following this call, the stream cursor position will be at the beginning of the next token, or at the end of the stream if there are no more tokens following the 'close' token. The comparison of tokens against the 'open' and 'close' tokens is case-insensitive.

NOTE:

The open and close strings represent tokens, and not character strings.

EXAMPLE

b2=memStreamMgr.openstring "{aaaaa}"

b2.readblock "{" "}"

will return undefined, because the '{' and '}' are not surrounded by whitespace, and so are not found as tokens (the entire content of the memStream is a single token).

If the 'open' token is not the next token in the input stream, a value of 'undefined' will be returned, and the stream cursor position will be unchanged.

If the 'open' token is the next token in the input stream, but the 'close' token is not found, returns a string starting at the open token, and ending at the end of stream -1 character.

The maximum allowed length of the block is 5120 characters. If a block is found, but is larger than this length, a value of 'undefined' is returned. However, the stream cursor position will be at the end of the block.

<void><Interface:MemStream>.skipBlock <string>open <string>close

Same as readBlock except does not return the block of tokens (this is a little faster).

<integer><Interface:MemStream>.pos()

Returns the current stream cursor position.

<void><Interface:MemStream>.seek <integer>offset <enum>origin

origin enums: {#seek_set|#seek_cur|#seek_end}

Moves stream cursor position 'offset' number of characters from the base specified.

#seek_set -- start of file

#seek_cur -- current file position

#seek_end -- end of file (works with negative offset values)

<integer>size()

Returns the size of the input stream

<bool>eos()

Returns true if the current stream cursor position is at or past the end of the input stream, false otherwise.

EXAMPLE

ms = memStreamMgr.openString "token! //comment!\n { { nested bracket pair } } "

ms.readToken()

ms.readBlock "{" "}"

ms.eos()

memStreamMgr.close ms

RESULT

<MixinInterface:memStream>

"token!"

"{ { nested bracket pair } }"

true

OK

NOTES:

The read or peek methods currently do not protect against reading past the end of the input stream.

The seek method currently does not protect against setting position past end of the input stream.

The readBlock and skipBlock methods performs case-insensitive comparisons on the open and close token strings.


Interface: mental_ray_Preferences

Interfaces > Core Interfaces > mental_ray_Preferences

The mental_ray_Preferences Core Interface lets you enable and disable the mental ray Extensions.

NOTE: Unsupported feature.

Properties:

mental_ray_Preferences.mrExtensionsActive : bool : Read|Write

Enable / Disable the mental ray Extensions.

See also

MAXScript Extensions for mental ray

Mental_Ray_Renderer : RendererClass


Interface: menuMan

Interfaces > Core Interfaces > menuMan

The MenuMan Core Interface provides access to the Menu Manager and allows the user to create new and access existing menus and QuadMenus and their sub-menus and menu items as well as load, save, register and unregister them.

For details and examples of using this interface, see also the topic Menu Manager

Menu Loading And Saving

<boolean>menuMan.loadMenuFile <filename>file

This method allows you to load a menu file from disk and automatically update the UI accordingly. Returns true if the menu file was loaded, otherwise false.

<string>file: The path and filename of the menu file to load.

<boolean>menuMan.saveMenuFile <filename>file

This method allows you to save a menu file to disk. Returns true if the menu file was saved, otherwise false.

<string>file: The path and filename of the menu file to save.

<string>menuMan.getMenuFile()

This method returns the file name of the currently loaded and active menu file.

Finding Menus

<Interface>menuMan.findMenu <string>menuName

This method will return a pointer to a menu based on its name. Returns a menu MixinInterface to the menu or undefined if the menu was not found.

<string>menuName: The name of the menu to return.

<Interface>menuMan.findQuadMenu <string>menuName

This method will return a pointer to a quad menu based on its name. Returns a quadMenu MixinInterface to the quad menu or undefined if the menu was not found.

<string>menuName: The name of the menu to return.

Querying Menu Count

<integer>menuMan.numMenus()

Returns the total number of menus in registered with the menu manager.

<integer>menuMan.numQuadMenus()

Returns the total number of quad menus registered with the menu manager.

Getting Menus

<Interface>menuMan.getMenu <index>index

Retrieves the indexed menu in the menu manager. This is a 1-based index. Returns a menu MixinInterface .

<Interface>menuMan.getQuadMenu <index>index

Retrieves the indexed quad menu in the menu manager. This is a 1-based index. Returns a quadMenu MixinInterface .

Creating Menus

<Interface>menuMan.createMenu <string>name

This method creates a new, empty menu with the given name and returns a menu MixinInterface .

<Interface>menuMan.createQuadMenu <string>name <string>quad1Name <string>quad2Name <string>quad3Name <string>quad4Name

This method creates a new, empty quad menu. It contains 4 empty menus, one for each quad. Returns a quadMenu MixinInterface .

<Interface>menuMan.createSubMenuItem <string>name <Interface>subMenu

This method creates a new sub-menu item that can be added to a menu. It uses the given "name" and it displays the given sub-menu. Returns a MenuItem MixinInterface .

<Interface>menuMan.createSeparatorItem()

This creates a new menu separator that can be added to a menu. Returns a MenuItem MixinInterface .

<Interface>menuMan.createActionItem <string>macroScriptName <string>macroScriptCategory

This method creates a new menu item that can be added to a menu. The item is an action that executes the macro script with the given name and category. Returns a MenuItem MixinInterface when successful, or "undefined" if there is no macroScript with the given name and category.

<Interface>menuMan.createMenuItemFromAction <string>group <string>action category:<string>

category default value: undefined

This method creates a new menu item from an action and returns a menu MixinInterface .

Available in 3ds Max 2008 and higher.

Viewport Right Click Menus

<boolean>menuMan.setViewportRightClickMenu <enum>which <Interface>menu

which enums: {#nonePressed|#shiftPressed|#altPressed|#controlPressed|#shiftAndAltPressed|#shiftAndControlPressed|#controlAndAltPressed|#shiftAndAltAndControlPressed}

This method method allows you to set the viewport right-click menu to the specified quad menu. Returns true if it was set successfully.

<enum>which : See the List of Right-Click Contexts above.

<Interface>menu: A pointer to the quad menu you wish to set.

<Interface>menuMan.getViewportRightClickMenu <enum>which

which enums: {#nonePressed|#shiftPressed|#altPressed|#controlPressed|#shiftAndAltPressed|#shiftAndControlPressed|#controlAndAltPressed|#shiftAndAltAndControlPressed}

This method returns a quadMenu MixinInterface to the current viewport right-click quad menu.

<enum>which: See the List of Right-Click Contexts.

Main Menu Bar

<Interface>menuMan.getMainMenuBar()

This method returns a menu MixinInterface to the main menu bar.

<boolean>menuMan.setMainMenuBar <Interface>menu

This method allows you to set the main menu bar. Returns true if it was set successfully.

<Interface>menu: A menu MixinInterface to the menu you wish to set as the main menu bar.

QuadMenu Settings

<bool>menuMan.getShowAllQuads <Interface>quadMenu

This method checks if the "Show All Quads" flag is set for a specific QuadMenu. This method will return true if the flag is set or false if the flag is not set.

<Interface>quadMenu: A quadMenu MixinInterface to the QuadMenu you wish to check the flag for.

<void>menuMan.setShowAllQuads <Interface>quadMenu <bool>value

This method sets the "Show All Quads" flag for a specific QuadMenu.

<Interface>quadMenu : A quadMenu MixinInterface to the QuadMenu you wish to set the flag for.

<bool>value: True to set the flag to on, false to set the flag off.

<string>menuMan.getQuadMenuName <Interface>quadMenu

This method returns the name given to a specific QuadMenu as a string.

<Interface>quadMenu: A quadMenu MixinInterface to the QuadMenu for which you wish to retrieve the name.

<void>menuMan.setQuadMenuName <Interface>quadMenu <string>name

This method allows you to set the name of a specific QuadMenu.

<Interface>quadMenu : A quadMenu MixinInterface to the QuadMenu for which you wish to set the name.

<string>name: The string containing the name for the QuadMenu.

Update Menu

<void>menuMan.updateMenuBar()

This method can be called to update 3ds Max’ main menu bar after adding sub-menu’s or menu items.

<boolean>menuMan.registerMenuContext <integer>contextId

To add items to 3ds Max’s main menu, the plug-in should check the return value of RegisterMenuContext(), and if it is true, that means that this is the first time it has been registered, and the plug-in can then create new menus, add items to 3ds Max’s main menu and Quad menus.

Unregistering Menus

<boolean>menuMan.unRegisterMenu <Interface>menu

This method allows you to remove a menu form the mananger. Returns false if the menu was not registered, true if successfully unregistered.

<Interface>menu: Points to the menu to unregister.

<boolean>menuMan.unRegisterQuadMenu <Interface>quadMenu

This is like "unregisterMenu" but for quad menus.

See also

Menu Manager

Interface: quadMenuSettings

Mixin Interface: menuMan.getMenu(...)

Interface: menu

The menu [ Mixin Interface ] is returned by several methods described earlier on this page.

Methods:

<void><MixinInterface:menu>.setTitle <string>title

Sets the menu title to the supplied string.

<&string><MixinInterface:menu>.getTitle()

Returns the menu title.

<integer><MixinInterface:menu>.numItems()

Returns the number of menu items.

<Interface><MixinInterface:menu>.getItem <index>position

Returns a menuItem MixinInterface to the indexed menu item.

<void><MixinInterface:menu>.addItem <Interface>item <index>position

Adds a new menu item to the menu at the specified position.

<void><MixinInterface:menu>.removeItemByPosition <index>position

Removes the indexed menu item.

<void><MixinInterface:menu>.removeItem <Interface>item

Removes the specified menu item.

Mixin Interface: menuMan.getQuadMenu (...)

Interface: quadMenu

The quadMenu [ Mixin Interface ] is returned by several methods described earlier on this page.

Methods:

<Interface><MixinInterface:quadMenu>.getMenu <index>position

Returns a menu MixinInterface to the indexed menu (1 to 4).

<void><MixinInterface:quadMenu>.trackMenu <bool>showAllQuads

When set to true, forces the quadMenu to show all quads.

Mixin Interface: menuMan.createSubMenuItem(...)

Interface: menuItem

The menuItem [ Mixin Interface ] is returned by several methods described earlier on this page.

Methods:

<void><MixinInterface:menuItem>.setTitle <string>title

Sets the menu item title to the supplied string.

<&string><MixinInterface:menuItem>.getTitle()

Returns the menu item title.

<bool><MixinInterface:menuItem>.setUseCustomTitle <bool>value

When true is supplied, forces the menu item to show the custom title.

<bool><MixinInterface:menuItem>.getUseCustomTitle()

Returns true if custom title is enabled, false otherwise.

<bool><MixinInterface:menuItem>.setDisplayFlat <bool>value

When true is supplied, forces the menu item to be displayed as flat.

<bool><MixinInterface:menuItem>.getDisplayFlat()

Returns true if the menu item is set to display as flat.

<bool><MixinInterface:menuItem>.getIsSeparator()

Returns true if the menu item is a separator.

<Interface><MixinInterface:menuItem>.getSubMenu()

Returns a menu MixinInterface to the sub-menu.

See also

Menu Manager


Interface: MtlBrowserFilter_Manager

Interfaces > Core Interfaces > MtlBrowserFilter_Manager

For internal use.

Properties:

No properties or methods exposed.


Interface: msZip

Interfaces > Core Interfaces > msZip

The msZip Core Interface provides methods to handle zip packages using MAXScript.

Methods:

<boolean>msZip.fileInPackage <filename>fileName <&string>extractDir

extractDir is In and Out parameter

This method will unload and run a zip package and return the extract_dir. Returns true if the zip package was run, otherwise false. Note: extractDir is In parameter

<filename>fileName: The file name of the ZIP script package.

<&string>extractDir: The directory in which the files were extracted.

<boolean>msZip.unloadPackage <filename>fileName <&string>extractDir <&string>dropFile

extractDir is In and Out parameter

dropFile is In and Out parameter

This method will unload the package while ignoring any drop or run commands and return the extract_dir and any primary drop file. If the primary dropFile is a *.ds, compile it in context of the package and return the MacroEntry in dropScript. Returns true if the package was unloaded, otherwise false.

<filename>fileName: The file name of the ZIP script package.

<&string>extractDir: The directory in which the files were extracted.

<&string>dropFile: The primary drop file.

See also

Interface: dragAndDrop

Zip-file Script Packages

iDrop - drag and drop


Interface: MXSDebugger

Interfaces > Core Interfaces > MXSDebugger

The MXSDebugger Core Interface provides access to the settings of the MAXScript Debugger in 3ds Max 8 and higher.

Interface: MXSDebugger

Properties:

MXSDebugger.isDialogOpen : boolean : Read

Contains true when the Debugger's dialog is open, false otherwise. Read-only.

MXSDebugger.hWnd : HWND : Read

Contains the Windows Handle of the Debugger's dialog. Read-only.

Configuration - Parameters

MXSDebugger.allowBreakOnThrow : boolean : Read|Write

Get/Set the state of the Allow Break On Throw checkbox. Default is true.

MXSDebugger.breakOnError : boolean : Read|Write

Get/Set the state of the Break On Error checkbox. Default is false.

MXSDebugger.breakOnException : boolean : Read|Write

Get/Set the state of the Break On Exception checkbox. Default is false.

MXSDebugger.defaultBreakOnThrow : boolean : Read|Write

Get/Set the state of the Default Throw debugBreak:on checkbox. Default is false.

MXSDebugger.ignoreCaughtThrows : boolean : Read|Write

Get/Set the state of the Ignore Caught Throws checkbox. Default is true.

MXSDebugger.ignoreCaughtErrors : boolean : Read|Write

Get/Set the state of the Ignore Caught Errors checkbox. Default is true.

MXSDebugger.ignoreCaughtExceptions : boolean : Read|Write

Get/Set the state of the Ignore Caught Throws checkbox. Default is true.

MXSDebugger.enabledInQuietMode : boolean : Read|Write

Get/Set the state of the Enable in Quiet Mode checkbox. Default is false.

MXSDebugger.enabledInNetRender : boolean : Read|Write

Get/Set the state of the Enable in Net Render checkbox. Default is false.

MXSDebugger.allowUnsafeMethods : boolean : Read|Write

Get/Set the state of the Allow Unsafe Method Calls checkbox. Default is false.

If true, methods and property sets that could potentially hang 3ds Max are allowed to be performed from the debugger.

In many cases, if a hang occurs, the hang will last only as long as the command timeout period.

In some cases though, the hang is complete and the 3ds Max session will need to be manually terminated.

AN EXAMPLE OF THIS IS PERFORMING

eval loadmaxfile "ateapot.max".

MXSDebugger.showGlobalConstants : boolean : Read|Write

Get/Set the state of the Show Global Constants checkbox. Default is false.

MXSDebugger.showFirstFrameOnly : boolean : Read|Write

Get/Set the state of the Show First Frame Only checkbox. Default is false. If true, only the information associated with the top frame is displayed.

MXSDebugger.stayOnTop : boolean : Read|Write

Get/Set the state of the Stay On Top checkbox. Default is false. If true, the Debugger dialog will always stay on top.

MXSDebugger.clearOutputOnOpen : boolean : Read|Write

Get/Set the state of the Clear Output On Open checkbox. When set to true, any previous output of the Debugger will be cleared before a new stack dump when a break occurs. When set to false, existing output will be preserved and added to. Default is true.

Available in 3ds Max 9 and higher.

Configuration - Set Periods

MXSDebugger.commandTimeOutPeriod : DWORD : Read|Write

Get/Set the Command Timeout period in seconds. Default is 15.0 sec.

MXSDebugger.breakTimeoutPeriod : DWORD : Read|Write

Get/Set the Break Timeout period in milliseconds. Default is 5 ms.

MXSDebugger.gcTimeoutPeriod : DWORD : Read|Write

Get/Set the GC Timeout period in seconds. Default is 5.0 sec.

MXSDebugger.breakCyclePeriod : DWORD : Read|Write

Get/Set the Break Cycle Timeout period in milliseconds. Default is 1 ms.

Methods:

<void>MXSDebugger.openDialog break:<boolean> message:<string> setFocus:<boolean>

break default value: false

message default value: undefined

setFocus default value: false

Opens the Debugger dialog.

If the optional keyword break: is supplied and is true, the debugger breaks 3ds Max execution and dumps the stack.

If the optional keyword message: is supplied and is not undefined, the string will be output to the message window before dumping the stack.

If the optional keyword setFocus: is supplied and is true, OR break: is true, the focus will be set on the Debugger dialog.

FOR EXAMPLE:

mxsdebugger.openDialog message:"Welcome to MAXScript Debugger"

<void>MXSDebugger.closeDialog()

Closes the Debugger dialog.

<void>MXSDebugger.writeString <string>message

Writes the given string to the Debugger's message queue without adding a new line at the end and without displaying the string. Consecutive messages would be added to the same line. If an explicit new line sequence \n is provided, the resulting message will be displayed.

FOR EXAMPLE:

mxsdebugger.openDialog()

mxsdebugger.writeString "This text is "

mxsdebugger.writeString "on the same line.\n"

<void>MXSDebugger.writeLine <string>message

Writes the given string to the Debugger's message window and adds a new line to the end automatically. The message is displayed immediately.

FOR EXAMPLE:

mxsdebugger.openDialog()

mxsdebugger.writeLine "This message is a complete line."

See Also:

The MAXScript Debugger

Using the MAXScript Debugger


Interface: NetRender

Interfaces > Core Interfaces > NetRender

This Core Interface exposes the Network Rendering to MAXScript.

Methods

<Interface>NetRender.GetManager()

In order to access network rendering through MAXScript, you need to create a manager instance.

The syntax is the following:

NetRender.GetManager()

Mixin Interface: netRender.getManager(...)

Interface: NetManager

The NetManager [ Mixin Interface ] returned by the NetRender.GetManager method lets you access network rendering through MAXScript.

Properties

The following properties can be used to get information or set certain properties of the manager.

<netManager>.connected

Returns true if connected to the manager. Read-only.

<netManager>.netStatus

Returns the status of the manager. Various information about the manager can be gathered through netstatus, see netstatus topic. Read-only.

<netManager>.wantControl

If you have QueueControl, and other computers call QueryControl, this indicates whether you want to maintain control, or relinquish it; their call to QueryControl will return whatever you have set for WantControl

<netManager>.haveControl

True, if you currently have QueueControl. Read-only.

<netManager>.numJobs

Returns the number of jobs in the queue. Read-only.

<netManager>.numServers

Returns the number of servers. Read-only.

<netManager>.numGroups

Returns the number of groups. Read-only.

Working with the Manager

Methods

The following methods can be used to query and or control the manager.

<netManager>.setCallback <#progress | #message | #update | #managerdown | #queuecontrol | #querycontrol> <somefunction>

Used to listen to the manager for certain event types that occur during a network render. For each event type, you can call a single function that you define. Each of the 6 callback types is one type of event, and you can install a callback for any of these event or none.

You must define the function to take a different number of arguements depending on the event type.

Requires 2 arguments, they can be:

#progress myprogess

Called anytime a download/upload is underway, including anytime you fetch information about jobs or servers.

Requires a function defined with 2 integer parameters, ‘Total’ and ‘Current’. Total is the total amount to transfer, and Current is the amount tranferred so far.

FOR EXAMPLE:

fn myprogress total current =  -- NOTE: two integer parameters

format "Progress: completed % out of %\n" current total

m.setcallback #progress myprogress -- sets the #progress callback to use myprogress()

#message mymessage

Called when the manager has a text message for the user. Requires a function defined with 1 string parameter which is the message text.

FOR EXAMPLE:

fn myNetMessage msg = -- NOTE: one string parameter

format "Message: %\n" msg

m.setcallback #message mymessage -- sets the #message callback to use mymessage()

#update myupdate

Called when something has changed, like a job started or finished. Let's you know when you need to make GetUpdate calls, or other refreshing. Requires a function defined with no parameters.

FOR EXAMPLE:

fn myUpdate =

job.GetUpdate() --example of what you might do

m.setcallback #update myupdate -- sets the #update callback to use myupdate()

#managerdown mymanagerdown

Called when the manager shuts down. Requires a function defined with no parameters.

FOR EXAMPLE:

fn myManagerDown =

 format "Manager is dead\n"

m.setcallback mymanagerdown -- sets the #managerdown callback to use mymanagerdown()

#queuecontrol myqueuecontrol

Called whenever queue control changes. Requires a function defined with no parameters.

FOR EXAMPLE:

fn myQueueControl =

 format "Queue control has changed\n"

m.setcallback #QueueControl myQueueControl --install the "QueueControl" callback

#querycontrol myquerycontrol

Called when you have Queue Control, and another computer wants it, either via the QueueManager, or with the script function <netManager>.QueryControl(). If you want to keep control, set the value <netManager>.WantControl to true, otherwise set it to false. The function must take one arguement, which is the name of the machine requesting control. See the function <netManager>.QueueControl() for more information.

FOR EXAMPLE:

fn myQueryControl clientName = ( --NOTE: one string parameter

 format "The computer % wants queue control" clientName

 m.wantControl = true -- use this to keep queue control

 m.wantControl = false -- use this to release queue control

)

m.setcallback #QueryControl myQueryControl --install the "QueryControl" callback

<netManager>.GetCallback <#progress | #message | #update | #managerdown | #queuecontrol | #querycontrol>

Returns the name of the function used for that particular callback. Returns an empty array if no callback is assigned. Requires 1 argument, can be:

#progress : Called anytime a download/upload is underway, including anytime you fetch information about jobs or servers

#message : Called when the manager has a text message for the user

#update : Called when something has changed, like a job started or finished. Let's you know when you need to make GetUpdate calls, or other refreshing

#managerdown : Called when the manager dies

#queuecontrol : Called whenever queue control changes

#querycontrol : Called when you have Queue Control, and another computer wants it

<netManager>.connect #manual <manager name>|<manager IP address> [port:<integer>]

or

<netManager>.connect #automatic <subnet mask> [port:<integer>]

Establishes a connection to the manager, allowing access to job states, server states, editing job settings, etc….It takes 2 arguments and a 3rd optional argument. You can either connect to a manager manually by specifying the manager name or ip address of the manager as a string, or automatically by specifying the subnet mask and optional port number,

FOR EXAMPLE:

m.connect #manual "manager" -- connects to manager of name "manager"

or

m.connect #manual "192.168.0.1" -- connects to manager of IP 192.168.0.1

or

m.connect #automatic "255.255.255.0" port:1234

-- automatically connects to manager on subnet 255.255.255.0 at port 1234

in either case, you can specify the optional port number should the manager be using a non default port number. Will return true if connection was succesful.

<netManager>.Disconnect()

Disconnects the connection established with <netManager>.connect.

<netManager>.Kill()

Shutsdown the manager. You must have queue control to do this.

<netManager>.QueryControl <#wait | #dontwait>

This requires either #wait or #dontWait. The function works as follows:

Nobody has queue control: #dontWait returns true, #wait returns true.

Someone has queue control: #dontwait returns false, #wait prompts the current queue controller.

In the last case, the queue controller gets the QueryControl callback, and must indicate if they want control. If that user indicates they want to keep control, then the function returns false, if they will give up control (or the 10 second timeout expires), it returns true. Note that the QueueManager gives a prompt for the user to indicate what they want; in MAXScript, you just get the callback and have to use the wantControl value.

Note: Please refer to callback, "#queuecontrol myqueuecontrol", found above in <netManager>.setCallback.

<netManager>.GetControl()

Takes control of the queue. Returns true if control was taken. From that moment on, jobs can be submitted, edited, reprioritized, servers can be removed, until queue control is relinquished.

Note: The current queue controller does not get its QueryControl callback triggered. Instead, they just lose the queue control (unless they also have the queue locked lock). You should always precede a call to GetControl() with a call to QueryControl(true), to be sure if it’s OK to do this.

<netManager>.Lock <true | false>

Locks out others from getting queue control; and if they call QueryControl, it will automatically return false. For example, suppose you got control of the queue through MAXScript using getcontrol(), someone else who has the queuemanager up in readonly mode can request queuecontrol. Setting lock to true, will disallow anyone else to take control until you until you disconnect from the manager, or until you reset the lock to false. Note that the QueueManager always calls QueryControl to check if it can grab the queue.

<netManager>.SetUpdates <true | false>

This function’s usage resembles the Lock() function, in that a boolean value is passed, and you must already have queue control. Setting updates to false will freeze the manager so that it refuses any changes to the queue. It does not affect the callbacks. Fewer Update callbacks will be received, since the job queue is not updating. Use this function when submitting large numbers of changes, and when you want all the changes to take effect at the same time. This will occur when setUpdates() is called with a true value.

<netManager>.checkoutputvisibility <path>

Takes 1 argument, a pathname defined as a string, ie "c:\\temp". It verifies that the path exists, returns "The system cannot find the path specified. (0x3)" if the path doesn't exist.

NOTE:

Note that the manager checks this output path relative to itself, not to your local machine. Thus if you pass "C:\\" and you have not shared you C drive, it will return OK (because the manager checks its own C drive). Thus you should use a network name when calling this function, like "\\\\mymachine\\share\\". Also, if the parameter does not end in \\, the functions assumes you're naming a file (not a directory) and checks whether this file could be created. Always include the \\ at the end if you're checking whether a directory is accessible.

Working with Jobs

Various functions and properties can be used to access jobs. You can use the GetJobs() function to retrieve an array of all jobs in the queue. The jobs can be filtered in various ways to return an array based on the filter.

WARNING!

Do not call GetJobs() or GetServers() very often, because these are VERY heavyweight methods.

<netManager>.getjobs [filter:#suspended | #complete | #waiting | #started | #error | #name | #handle | #index] [key:<name> | <handle> | <index>]

The latter three filter types require a corresponding key arguement. If used without a filter, returns an array of all jobs in queue. If no jobs are in the queue, an empty array will be returned.

filter:#suspended: Returns an array of all suspended jobs. Returns an empty array #() if no jobs are suspended

filter:#complete: Returns an array of all completed jobs. Returns an empty array #() if no jobs are complete.

filter:#waiting: Returns an array of jobs that are waiting to be rendered or are being rendered. Will return an empty array #() if no jobs are waiting.

filter:#started: Returns an array of jobs that are actually started and being rendered.

filter:#complete: Returns an array of all completed jobs. Returns an empty array #() if no jobs are complete

filter:#error: Returns an array of all jobs experiencing an error. Returns an empty array #() if no jobs have errors

filter:#name: Pass a name as the Key argument; Returns an array of all jobs with the given name. Returns an empty array #() if the no jobs have that name

filter:#handle: Pass a handle as the Key argument; the job with that handle will be returned (as an array with one element). Returns an empty array #() if the no job has that handle

filter:#index: Pass an integer as the Key argument; the job at that index in the queue will be returned (as an array with one element). Returns an empty array #() if the no job exists at that index

EXAMPLE

manager.GetControl() --get queue control

manager.SetUpdates false --the queue is now frozen

jobs = manager.GetJobs()

manager.SetUpdates true --the queue is unfrozen

NOTE:

The GetJobs() function could return incorrect results if the Queue is changed while the job information is downloading. SetUpdates() is used to guarantee that GetJobs() operates without error.

<netManager>.SetJobOrder <array>

Changes the order of the jobs in the queue. The array must contain the same jobs that are contained in the array from .getjobs(), although they can be in different order. You must also have queuecontrol, use .getcontrol() function to take control before setting the job order.

<netManager>.NewJob file:<filename>

Creates a new job instance. It requires a valid max file name, ie a max file that exists somewhere on the hard drive or the network. Returns a job definition if the file exists, undefined if the file can’t be found.

EXAMPLE

job.newJob file:"file.max" --submitting a file

job.newJob() --submitting the current scene

NOTE:

Jobs can not have maps included, and render element data will not be available for submitted job but render elements will process correctly. These problems are resent when submitting a job from a file, but not when submitting the current scene.

<job>.GetUpdate()

Updates the information about the selected job. Remember this involves a network interaction, so it’s a heavyweight operation

<job>.SendUpdate()

Updates the job in the queue with new job settings. Must have queuecontrol. Use <netManager>.getcontrol() to get queue control. Remember this involves a network interaction, so it’s a heavyweight operation.

<job>.Submit() Servers:<array>

Submits a new job to be rendered to the queue. Must have queuecontrol. Use <netManager>.getcontrol() to get queue control. if no servers are provided, then all servers will be assigned to the job.

<job>.Suspend()

Suspends the selected job. Must have queuecontrol. Use <netManager>.getcontrol() to get queue control.

<job>.Resume()

Will cause the job to resume where it left off when it was suspended. Must have queuecontrol. Use <netManager>.getcontrol() to get queue control.

<job>.Restart()

Will restart the job from the beginning. Must have queuecontrol. Use <netManager>.getcontrol() to get queue control.

<job>.Delete()

Will delete the job from the queue. Must have queuecontrol. Use <netManager>.getcontrol() to get queue control.

<job>.AssignServer <server>

Assigns a selected server to the job. Must have queuecontrol. Use <netManager>.getcontrol() to get queue control.

<job>.SuspendServer <server>

Removes a server from the selected job. Must have queuecontrol. Use <netManager>.getcontrol() to get queue control.

<job>.GetServerInfo <integer>

Gets information about a particular server assigned to the job. Requires a server number, 1 based.

<job>.nonconcurrentDriver

Returns true if the output cannot be rendered one frame at a time (like an .MOV file). READ-ONLY.

<job>.uninterruptibleDriver

Returns true if the render cannot be resumed after it is interrupted or suspended.

For example, you cannot render half of an .AVI file, then finish it later. You need to render the whole thing without interruption. Read-only.

<job>.GetCameras()

Returns an array of cameras in the scene. An empty array #() is returned if no cameras are in the scene.

<job>.GetLog() start:x numLines:y

Returns the log for the job as text. The 'start' and 'numLines' parameters are optional. If you pass no parameters, you get the entire log. If you only pass start, you get every line starting from the given line. If you pass only numLines, then start is assumed to be 0.

<job>.GetServerStatusText <server>

Returns any messages from the chosen server assigned to the job. Will return an empty string if no messages from the server. Read-only.

<job>.numServers

Returns the number of servers assigned to the job. Read-only.

<job>.state

Returns the state of the job. This can be #complete, #suspended, #busy or #waiting. Read-only.

<job>.serverPID

This function gives low-level information that is intended for internal-use-only.

<job>.handle

Returns the job’s handle. Read-only.

Many of the following values are read-write, but changes you make to these values will not register with the manager until you call <job>.SendUpdate().

NOTE:

SendUpdate requires queue control (obtained via <NetManager>.getControl)

<job>.name

Returns the name of the job. The name can be changed.

<job>.filesize

Returns the job’s file size.

<job>.filesizeExtracted

Returns the job’s extracted file size. Read-only.

<job>.timeSubmitted

Returns the time at which the job was submitted as a string.

<job>.timeStarted

Returns the time at which the job was started as a string. Returns undefined if job hasn’t started. Read-only.

<job>.timeFinished

Returns the time at which the job was finished as a sting. Returns undefined if job hasn’t finished. Read-only.

<job>.notifications

Returns true if notifications are on. Can be changed.

<job>.notifyFailure

Returns true if notified of failures. Can be changed.

<job>.notifyProgress

Returns true if notified of progress. Can be changed.

<job>.notifyCompletion

Returns true if notified of progress is on. Can be changed.

<job>.notifyFrameInterval

Returns an interval at which notifications occur. Can be changed.

<job>.fromFrame

Returns the rendering start frame. Can be changed.

<job>.toFrame

Returns the rendering end frame. Can be changed.

<job>.nthFrame

Returns the rendering frame interval. Can be changed.

<job>.outputWidth

Returns the width of the rendered frame. Can be changed.

<job>.outputHeight

Returns the height of the rendered frame. Can be changed.

<job>.numFramesComplete

The number of completed frames for the job. Read-only.

<job>.priority

Returns the job priority.

<job>.videoPost

Returns true if there is a video post sequence. Read-only.

<job>.nonconcurrentDriver

Returns true if the output cannot be rendered one frame at a time (like .MOV). Read-only.

<job>.includeMaps

Returns true if the job was submitted with include maps on. Can be changed.

<job>.uninterruptibleDriver

Returns true if the render can’t be resumed if it was interrupted or suspended. For an.AVI, you cannot render half the file, then finish it later. You need to render the whole thing without interruption. Read-only.

<job>.skipRenderedFrames

Returns true if skip rendered frames was set to on when job was submitted. Can be changed.

<job>.useAllServers

Returns true if use all servers was set to on when job was submitted. Can be changed

<job>.suspended

Returns true if the job is suspended. Read-only. To suspend the job use <job>.suspend().

<job>.finished

Returns true if the job is finished. Read-only.

<job>.ignoreShare

Returns true if the job was submitted with ignore share on. Can be changed.

<job>.skipOutputTest

Returns true if the job was submitted with skip output test on. Can be changed.

<job>.nonSeqFrames

Returns true if the job was submitted to render non sequential frames. Can be changed.

<job>.combustionJob

Returns false if the job is a max job. Read-only.

<job>.uncompressedFile

Returns false if the job file is compressed. Read-only.

<job>.gammaCorrection

Returns true if the job was submitted with gamma correction on. Can be changed.

<job>.gammaValueIn

Returns a float value of the incomming gamma value. Can be changed.

<job>.gammaValueOut

Returns a float value of the outgoing gamma value. Can be changed.

<job>.renderPixelAspect

Returns a float value of the render pixel aspect ratio. Can be changed.

<job>.renderCamera

Returns a string with the name of the camera view being rendered. Will return an empty string if view being rendered is an non camera view, ie perspective, front, user, etc…Can be changed. Use <job>.getcameras() function to get a list of valid cameras in the scene to change to.

<job>.renderElements

Returns true if a job was submitted with the render elements active. Note that this will return true even there aren’t any elements to be rendered. Can be changed.

<job>.numSceneObjects

Returns the number of objects in the scene as an integer. Read-only.

<job>.numSceneFaces

Returns the number of faces in the scene as an integer. Read-only.

<job>.numSceneLights

Returns the number of lights in the scene as an integer. Read-only.

<job>.sceneStartTime

Returns the scene start time in frames, so if your scene is set to use MM:SS:Ticks, this will still return a value in frames.

<job>.sceneEndTime

Returns the scene end time in frames.

<job>.videoColorCheck

Returns true if the job was submitted with videocolorcheck on. Can be changed.

<job>.force2Sided

Returns true if the job was submitted with force 2 sided on. Can be changed.

<job>.renderHiddenObjects

Returns true if the job was submitted with render hidden objects on. Can be changed.

<job>.renderAtmosphericEffects

Returns true if the job was submitted with render render atmospheric effects on. Can be changed.

<job>.superBlack

Returns true if the job was submitted with superblack on. Can be changed.

<job>.serialNumbering

Returns true if nth serial numbering is on this property is accesible through the preferences \ rendering dialog.

<job>.ditherPaletted

Returns true if Dither Paletted was enabled when the job was submitted. Can be changed.

<job>.ditherTrueColor

Returns true if Dither True Color was enabled when the job was submitted. Can be changed.

<job>.renderFields

Returns true if Render Fields was enabled when the job was submitted. Can be changed.

<job>.renderDisplacements

Returns true if displacements was enabled when the job was submitted. Can be changed.

<job>.renderEffects

Returns true if render effects was enabled when the job was submitted. Can be changed.

<job>.fieldOrder

Returns either #odd or #even depending on what the field order was set to when job was submitted. Can be changed.

<job>.numRenderElements

Returns the number of render elements in the scene. Read-only.

<job>.userName

Returns the name of the user, as a string, that submitted the job. Note that if a job is submitted through MAXScript using <job>.submit(), and the max file was last saved by another user on a different computer, the username will be that of the other user. Read-only

<job>.computerName

Returns the name of the computer, as a string, that the job was submitted from. Note that if a job is submitted through MAXScript using <job>.submit(), and the max file was last saved by another user on a different computer, the computername will be that of the computer on which the max file was last saved. Read-only

<job>.managerShare

Returns the shared folder as a string where all jobs are stored on the manager.

<job>.frames

Returns a string of frames to render, ie "1,3,5-12". Can be changed.

<job>.frameOutputName

Returns the name and path of the output file. Can be changed

<job>.frameOutputGamma

Returns the output gamma of the rendered frames.

<job>.frameOutputDevice

Returns the device name if a device is specified at render time.

<job>.numFrames

Returns the total number of frames for the particular job

Accessing Render Element Information

<job>.GetRenderElement <index>

Returns information as a data structure about the nth element in the. The <element> structure is defined below. Returns undefined if no element at the index number, eg: el = jobs[1].getrenderelement 1 -- retrieves the 1st element in the 1st job in the queue. With this you can find out if the element is enabled, if filtering is enabled, if atmosphere is applied, if shadows are applied, the element name and the element output filename. The following are the properties that are valid for an element.

<element>.enabled

Returns true if the element is enabled. Can also set it’s state.

<element>.filterEnabled

Returns true if filtering is enabled. Can also set it’s state.

<element>.atmosphereApplied

Returns true if atmosphere is applied. READ-ONLY

<element>.shadowsApplied

Returns true if shadows are applied. READ-ONLY

<element>.name

Returns the elements name. Name can be changed.

<element>.output

Returns the element’s output file name. Output name and path can be changed, however, changing the filetype will change the extension of the image but not the actual file type, eg: the current output returned is "\\ej4sf\frames\foo_diffuse.tga", changing the extension to .bmp will just result in the tga file having a .bmp extension instead of the .tga extension.

<job>.SetRenderElement <index> <element>

Sets the selected render element to the new values assigned to the element. In order for the change to take effect in the job, you need to do a <job>.sendupdate() to update the job itself in the queue.

Accessing Frame Information

<job>.GetFrameInfo <integer>

Returns information, as a data structure, about the nth frame. The index is 1 based. The <frame> structure is defined below.

EXAMPLE

fr = getframeinfo 4 -- Returns info about the 4th frame. Read-only.

<frame>.state

Returns the state of the frame. The state can be #waiting, #assigned or #complete.

<frame>.index

Returns the actual frame number. Read-only.

<frame>.serverhandle

Returns the serverhandle. Should return undefined when frame hasn’t been rendered yet. Read-only.

<frame>.servername

Returns the name of the server that is assigned to that frame. Should return undefined if the frame isn’t assigned yet. Read-only.

<frame>.elapsedtime

Returns the time it took for the frame to render. Should return undefined if the frame isn’t assigned yet. Read-only.

Working with Servers

Various functions and properties can be used to access rendering servers. You can use the getservers() function to retrieve an array of all servers managed by the manager. The servers can be filtered in various ways to return an array based on the filter.

WARNING!

Do not call GetJobs() or GetServers() very often, because these are VERY heavyweight methods!

<netManager>.GetServers [filter:#idle | #busy | #absent | #suspended | #error | #group | #job | #handle | #index] [key:<string> | <integer> | <job> ]

If used without a filter, GetServers() will return an array of all servers managed by the manager. If there are no servers, the function will return an empty array.

filter:#idle: Returns an array of all idle servers

filter:#busy: Returns an array of all servers busy rendering a job

filter:#absent: Returns an array of all servers that are absent, ie that were connected to the manager at one point but that are either down or the server service or serverapp is not running on it.

filter:#suspended: Returns an array of all suspended servers

filter:#error: Returns an array of all servers experiencing an error

filter:#group: Returns an array of servers in a group. Requires that the key option is used, the key can be a group name as a string or a group number as an integer (1 based). An empty array is returned if no groups are defined.

filter:#job: Returns an array of servers that are assigned to the specified job. Requires that the key option be used, the key must be a job definition.

filter:#handle: Returns the server with a given handle (as an array with one item). Requires that the key option be used, the key must be a server handle.

filter:#index: Returns the server at a given index in the server list (as an array with one item). Requires that the key option be used, the key must be an integer (the index).

EXAMPLE

server = m.getservers()

<server>.GetUpdate()

Gets an update on the state of the server. Returns Ok if succesful.

<server>.SendUpdate()

Updates the server with new settings. Must have queuecontrol.

<server>.Delete()

Deletes the server from the manager. Must have queuecontrol.

<server>.ResetPerformance()

Resets the performance metric to 0.0. Must have queuecontrol and must do <server>.sendupdate() to update the server.

<server>.netStatus

Netstatus

<server>.handle

Returns the server’s handle. Read-only

<server>.state

Returns the state of the server, this can be #idle, #absent, #busy

<server>.name

Returns the name of the server. Read-only

<server>.totalFrames

Returns the total number of frames rendered by the server. Read-only

<server>.totalTime

Returns the total time that the server has been up. The value returned is in hours.

<server>.performance

Returns the performance index of the server. Read-only

<server>.AttendedPriority

Returns the priority, as an integer, of the server when the user is logged in.

0: high priority

1: low priority

2: idle.

Can be changed.

<server>.UnattendedPriority

Returns the priority level, as an integer, of the server when the system is logged out.

0: high priority

1: low priority

2: idle.

Note that this is only valid if running serversvc and the user is not logged in on the system. If running serversvc and a user is logged in on the system then the attendedpriority values are in effect. Can be changed.

<server>.schedule

Returns an array of 7 bitarrays. Each bitarray is a day, each bit is an hour, each bit within that bit array means that the server is available at that hour. A bit array of #{1, 3..5, 15..24} means that the server is available from 12 midnight to 1am, from 3am to 5am and from 3pm to midnight.

<server>.jobHandle

Returns the handle ot the job it is working on. Will return a value of 0 if no job is being worked on by that server.

<server>.jobFrameIndex

Returns the frame index of the job that the server is working on.

<server>.jobFrameTimeStarted

Returns the time at which the frame being rendered was started.

Working with Groups

<netManager>.SizeofGroup <index>

Returns the number of servers in the nth group.

<netManager>.GetGroupName<index>

Returns the name of the nth group.

<netManager>.CreateGroup <array> <string>

Creates a named group of servers. It takes 2 arguments: an array of servers and a string to define the group name.

<netManager>.DeleteGroup <string>

Deletes a named group. Takes a string as an argument.

Netstatus

Both manager and servers have a netstatus property. All properties are Read-only.

system = m.netstatus

<system>.SpaceOnDisk <index>

Returns the amount of space in megs on a specified disk. The index is 1 based. Disks 1 and 2 are the a: and b: drives.

NOTES:

Currently, this only returns correct results for one disk, your workdisk (given by .workdisk). You actually need to pass (workdisk+1).

To maintain compatibility with UNIX/Linux, a NetStatus object will always report exactly 1 disk, which is the work disk. Thus, the NetStatus.SpaceOnDisk() value will not actually be correct, though it is still possible to determine the amount of free space on the working disk (which is the information most users will usually want):

<system>.numDroppedPackets

Returns the number of dropped packets.

<system>.numBad

Returns the number of bad packets.

<system>.numTCPRequests

Returns the number of TCP requests

<system>.numUDPRequests

Returns the number of UDP packets

<system>.bootTime

Returns the time at which the system was started.

<system>.memorySize

Returns the amount of memory of the system.

<system>.numProcessors

Returns the number of processors in system machine

<system>.username

Returns the login name of the user logged in on the computer or the login name used by the service.

<system>.computerName

Returns the name of the computer.

<system>.workdisk

Returns the disk where max is setup.

NOTE:

Currently broken, always returns the same value.

<system>.Disks

Returns a bitarray of which disks exist (1=A, 2=B, 3=C etc.) .

NOTES:

Currently broken.

To maintain compatibility with UNIX/Linux, a NetStatus object will always report exactly 1 disk, which is the work disk. Thus, the NetStatus.Disks() value will not actually be correct, though it is still possible to determine the amount of free space on the working disk (which is the information most users will usually want)

<system>.mac

Returns the MAC address of the system’s network card. If the computer is a network server, this is its handle.

The following properties are no longer supported in 3ds Max 5 and higher because of the introduction of the Backburner technolgy:

<system>.platformID

In 3ds Max 4, it returns an integer, a value of 1 indicates win95, a value of 2 indicates WinNT.

<system>.majorVersion

In 3ds Max 4, it returns an integer. When the platformID indicates a WinNT system, a value of 5 or higher here indicates Win2k.

<system>.minorVersion

In 3ds Max 4, it returns an integer. Win98 is indicated by a minor build greater than 0 for win95

<system>.buildNumber

In 3ds Max 4, it returns the build number, this only applies to winnt and win2k. Not supported under win95, win98 or win ME.

<system>.CSDVersion

In 3ds Max 4, it returns the service pack number of the OS as a string.

<system>.tempDir

In 3ds Max 4, it returns the tempdir for the system.

EXAMPLES

-- ESTABLISHING A CONNECTION --

m = netrender.getmanager() --get a NetManager instance

--start this session

m.connect #manual "nimbus"

-- OR m.connect #manual "nimbus" port:1234 --specifying a port number

-- QUEUE CONTROL --

--Get QueueControl using GetControl();

--there is no way to release control, but if wantControl==false

--then control will be relinquished to the next client

--that requests it

if( m.QueryControl #wait ) do --only take control if you have permission

m.getcontrol() --takes queue control

m.wantControl=true --if another client does QueryControl(), they will get a return value of false

m.Lock true  --this completely prevents others from getting queue control

m.Lock false  --others can now get control

-- SUBMITTING JOBS --

job = m.newjob file:"c:\\share\\test.max"

job.suspended = true --jobs can be submitted as suspended

job.state    --should be unsubmitted

job.includeMaps = true --turn on "Include Maps"

srv_list = m.getservers() --get the server list to assign to the job

job.submit servers:srv_list --specify which servers to use for the job

-- job.submit() --this uses all servers for the job

-- GETTING JOBS & SERVER OBJECTS --

m.SetUpdates false --lock the queue, to make sure nothing changes while you download info

j = m.getjobs filter:#suspended --an array of NetJob objects; filters are optinal

s = m.getservers filter:#idle --an array of NetServer objects; filters are optinal

--see below for other filters... there are many

m.SetUpdates true --be sure to unlock the queue!

-- WORKING WITH GROUPS --

m.creategroup s "myGroup"  --takes an array of NetServers and a name

num_groups = m.numGroups  --total number of groups

size_group1 = m.SizeofGroup 1 --number of servers in the first group

g = m.getservers filter:#group key:1 --an array of the servers for group 1

g = m.getservers filter:#group key:"myGroup" --an array of the servers for group "myGroup"

g_name = m.GetGroupName 1  --the name of the first group

m.deletegroup g_name   --delete a group

-- WORKING WITH JOBS --

job = j[1]    --pull a job out of the list

jHandle = job.handle   --the job's ID

p = job.priority   --job's priority

if job.nonSeqFrames==True then

 frames = job.frames  --one of those "1,3,5-12" frame lists

else

 frames = (job.fromFrame as string) + "-" + (job.toFrame as string)

 --now frames is "0-100" if 0 and 100 are the start/end frames

cameraArray = job.GetCameras() --an array of the camera names

l = job.GetLog    --the entire log, as text

l = job.GetLog start:4 numLines:2 --gets the 4th and 5th entries of the log

statText = job.GetServerStatusText s[1] --text about a server, regarding this job

num_workers = job.numServers --number of servers on this job

job.frameOutputName = "d:\\blah.bmp" --change the output name

isDevice = job.frameOutputDevice  --true if the output is to a device, false otherwise

share = job.managerShare  --the manager share for this job

job.filesize    --size of the MAZ file for the job

job.filesizeextracted  --extracted sisze of the MAZ file for the job

-- WORKING WITH SERVERS --

srv = s[1]    --pull a server out of the list

sHandle = srv.Handle   --the server's ID

sName = srv.name   --the server's machine name

speed = srv.performance  --server's performance index

srv.ResetPerformance()  --reset the index

timeUsed = srv.totalTime  --total time spent rendering

sjHandle = srv.jobHandle  --the handle of the server's current job, 0 if none

sjFrameIndex = srv.jobFrameIndex --the index of the frame the server is rendering

--PRACTICAL EXAMPLE; get info about the frame being rendered

sjHandle = srv.jobHandle

sjIndex = srv.jobFrameIndex

sJobs = m.getJobs filter:job key:sjHandle --should be an array with one entry

frameInfo = (sJobs[1].getFrameInfo sjIndex) --get info about the current frame

frameTime = frameInfo.elapsedTime

-- UPDATES FROM MANAGER --

--Jobs and Servers support GetUpdate and SendUpdate functions,

-- for synchronizing with the manager

job.status  --should be busy

job.Suspend()

job.status  --still says busy (status value is stale)

job.GetUpdate() --download the latest news

job.status  --now says suspended

s[1].GetUpdate() --servers also have Get/SendUpdate

-- CALLBACKS --

-- These are used to listen for messages from the manager,

-- They are functions you can define, that will get called when

-- the manager has something to say

-- There are 6 possible callbacks

-- NOTE: you can name these functions anything you want, but they must have correct paramters

--NETPROGRESS CALLBACK; Called anytime a download/upload is underway,

-- including anytime you fetch information about jobs or servers

fn myNetProgress total current = --NOTE: two integer parameters

format "Progress: completed % out of %\n" current total

--NETMESSAGE CALLBACK; Called when the manager has a text message for the user

fn myNetMessage msg = --NOTE: one string parameter

 format "Message: %\n" msg

--UPDATE CALLBACK; Called when something has changed, like a job started or finished

-- Let's you know when you need to make GetUpdate calls, or other refreshing

fn myUpdate =

job.GetUpdate() --example of what you might do

--MANAGERDOWN CALLBACK; Called when the manager dies

fn myManagerDown =

format "Manager is dead\n"

--QUEUECONTROL CALLBACK; Called whenever queue control changes

fn myQueueControl =

format "Queue control has changed\n"

--QUERYCONTROL CALLBACK; Called when you have Queue Control, and another computer wants it

fn myQueryControl clientName = (  --NOTE: one string parameter

format "The computer % wants queue control" clientName

m.wantControl = true -- use this to keep queue control

m.wantControl = false -- use this to release queue control

)

--INSTALLING THE CALLBACKS; after you define the functions, you must give them to the

-- manager as follows

--NOTE: only one callback of each type is allowed (e.g., you can't have two "Update" callbacks)

m.setcallback #Progress myNetProgress --install the "Progress" callback

m.setcallback #Message myNetMessage --install the "Message" callback

m.setcallback #Update myUpdate --install the "Update" callback

m.setcallback #ManagerDown myManagerDown --install the "ManagerDown" callback

m.setcallback #QueueControl myQueueControl --install the "QueueControl" callback

m.setcallback #QueryControl myQueryControl --install the "QueryControl" callback

-- NETSTATUS OBJECTS --

--Read-only information about a computer on the network

stat = s[1].netStatus --get network info about server 1

stat.boottime   --make a query

stat.Disks   --

d = stat.workDisk  --which is the disk for net-rendering work?

stat.SpaceOnDisk d  --megabytes of free space on the workdisk

stat.memorySize  --computer's memory in bytes (note: 1 meg = 1048576 bytes)

s[1].GetUpdate()  --this refreshes the netStatus object

stat = m.netStatus  --manager also has a NetStatus

--NOTE: Manager has no GetUpdate(), you must fetch the NetStatus again to see any changes

--To print out the operating system on the machine...

--Win95 has a platformID of 1; WinNT has a platformID of 2

--Win2K is indicated by a majorBuild of 5 or more for WinNT

--Win98 is indicated by a minorBuild greater than 0 for Win95.

-- Also, build number and the CSDVersion string are not supported by Win95/98

format "Windows %.%, Build %, %\n" \

stat.majorVersion stat.minorVersion stat.buildNumber stat.CSDVersion

-- JOBFRAME OBJECTS --

num_frames = job.numFrames()

frame = job.getFrameInfo 1 --get info about the 1st frame

elapsed_time = frame.ElapsedTime --amount of time frame has been rendering

num_rendElems = job.numRenderElements() --number of render elements for render

if num_rendElems>0 do (

rendElem = job.GetRenderElement 1 --pass the index of the element

rendElem.enabled = false   --turn off the rend element

job.SetRenderElement 1 rendElem  --update the job with the new changes

job.SendUpdate()     --upload the changes

)

-- JOBSERVER OBJECTS --

--Read-only information about a server, in relation to a particular job

j_num_servers = j[1].numServers  --how many servers does the job have?

js = j[1].GetServerInfo 1   --info about the job's first server

sh = js.serverHandle    --what's the server's handle?

sn = js.serverName    --what's the server's name?

isWorker = js.active    --whether this server participates in this job

js_state = js.state    --is the server busy with the job? has an error? etc

--Print out some stats

format "rendering frame %, completed %, total time % hours\n" \

js.currentFrame js.numFramesComplete js.elapsedTime

--ways to get more info about this server...

jSrv = m.GetServers filter:#handle key:sh --get the actual server object

statText = j[1].GetServerStatusText jSrv[1] --text info from the server about this job

-- RENDERELEMENT OBJECTS --

--Information about particular render elements for a job

n = j[1].numRenderElements    --how many render elements for this job?

re = j[1].GetRenderElement 1   --get the first one

re.enabled = false      --disable it

re.filterEnabled = false    --disable filtering

re.name = "newName"      --change its name

useShadows = re.shadowsApplied   --are shadows applied? (read-only)

useShadows = re.atmosphereApplied  --are atmospherics applied (read-only)

re.output = "C:\\share\\rendElem1.bmp" --change its output path & name

j[1].SetRenderElement 1 re    --update the job with the new changes

j[1].SendUpdate       --upload the changes

-- WEEKLY SCHEDULES --

-- a servers' weekly schedule is an array of seven BitArrays;

-- Each bitArray is a day, each bit is an hour

sched = s[1].schedule

sched[1][11] = false --sunday 11am, the server will not work

sched[1][12] = false  -- same for sunday noon

s[1].attendedPriority = 60  --set the priorities for the server's schedule

s[1].unattendedPriority = 10

s[1].schedule = sched --set the new schedule

s[1].schedule    --printout to prove the change worked

s[1].SendUpdate()  --upload the changes to this server

--NOTE: a Schedule is just a BitArray and has no GetUpdate,

--you must fetch it again from the server to see any changes

-- MISCELANEOUS FUNCTIONS --

jobList = #( j[3], j[1], j[2] ) --make an array of some jobs

m.SetJobOrder jobList  --rearrange the jobs; e.g. j[3] is now the first in the queue

mName = (m.netStatus).computerName --the machine name of the manager

-- JOB & SERVER FILTERS --

jobServers = m.getservers filter:#Job key:j[1]

groupServers = m.getservers filter:#group key:"Clouds"

-- ENDING THE SEESION --

m.wantControl=true --other clients can now get QueueControl

m.disconnect()  --end this session

-- m.kill()  --brings down the manager, (would need queue control)


Interface: NetworkManager

Interfaces > Core Interfaces > NetworkManager

NEW in 3ds Max 2009 Design: The NetworkManager Interface exposes a method to send email messages via MAXScript.

Methods:

<boolean>NetworkManager.Send <string>to <string>from <string>subject <string>body <string>server

Sends an email message.

The first argument is the address to send to.

The second argument is the address the message is sent from.

The third argument is the subject of the message.

The fourth argument is the body of the message.

The fifth argument is the email server to use to send the message.

EXAMPLE:

(

theAddress = "youremail@yourcompany.com"

theSender = "myemail@mycompany.com"

theSubject = "Greetings from Max 2009!"

theBody = "This email was sent by MAXScript\n"

theBody += "from inside of 3ds Max 2009!\n\n"

theBody += "Cool, eh?"

theServer = "smtp.myprovider.net"

res = NetworkManager.Send theAddress theSender theSubject theBody theServer

if res then

messagebox ("Email sent successfully to " + theAddress)

else

messagebox ("Failed to send email to " + theAddress)

)


Interface: objXRefs

Interfaces > Core Interfaces > objXRefs

The objXRefs Core Interface provides MAXScript access to the XRef Object feature.

Methods

<maxObject>objXRefs.addNewXRefObject <filename>fname <string>objname <integer>flags

The merge behavior is controlled by the bits set in flags:

Add as proxy 1 (value = 1)

Drop (ignore) modifiers 4 (value = 16)

Merge modifiers 5 (value = 32)

Merge manipulators 6 (value = 64)

The default behavior (flags = 0) is XRef the modifiers, XRef the manipulators

<integer>objXRefs.getNumXRefObjects <filename>fname

Returns the number of object XRefs contained in the file

<maxObject>objXRefs.getXRefObject <filename>fname <index>index

Returns the Nth XRef'ed object contained in the specified file

<integer>objXRefs.getNumFiles()

Returns the number of files that contain object XRefs

<filename>objXRefs.getFileName <index>index

Returns the file name of the Nth file that contains object XRefs

<boolean>objXRefs.reloadFile <filename>fname

Returns true if successful and false otherwise.

<boolean>objXRefs.isFileUnresolved <filename>fname

Returns true if successful and false otherwise.

<boolean>objXRefs.isFileDisabled <filename>fname

Returns true if successful and false otherwise.

<array>objXRefs.getAllXRefObjects()

Returns an array of all XRef Objects present in the current scene.

<integer>objXRefs.getEmptyXRefRecCount()

Returns the number of empty XRefs. Available in 3ds Max 8 and higher.

See also

Interface: objXRefMgr

XRefObject : Node

XRefScene Values

XRef Files


Interface: objXRefMgr

Interfaces > Core Interfaces > objXRefMgr

The objXRefMgr Core Interface provides access to the XRef Manager.
Available in 3ds Max 8 and higher.

Interface: objXRefMgr

Properties:

objXRefMgr.recordCount : DWORD : Read

Returns the number of records.

objXRefMgr.dupObjNameAction : enum : Read|Write

dupObjNameAction enums: {#prompt|#xref|#skip|#deleteOld|#autoRename}

Get/set the action to perform when duplicate names have been detected.

objXRefMgr.dupMtlNameAction : enum : Read|Write

dupMtlNameAction enums: {#prompt|#useXRefed|#useScene|#autoRename}

Get/set the action to perform when duplicate materials have been detected.

Methods:

<Interface>objXRefMgr.GetRecord <index>index

Returns the indexed record, where index is between 1 and the .recordCount

<Interface>objXRefMgr.FindRecord <DWORD>handle

record Validated by Validator function

Returns the record by handle. See IXrefRecord MixinInterface for details on the return value.

<bool>objXRefMgr.RemoveRecordFromScene <Interface>record

Removes the specified record from the scene. Returns true on success, false on failure. See IXrefRecord MixinInterface for details on the record argument.

<bool>objXRefMgr.MergeRecordIntoScene <Interface>record

record Validated by Validator function

Merges the specified record into the scene. Returns true on success, false on failure. See IXrefRecord MixinInterface for details on the record argument.

<bool>objXRefMgr.SetRecordSrcFile <Interface>xrefRecord <filename>fileName

Sets the source file of the specified record to the given file name. Returns true on success, false on failure. See IXrefRecord MixinInterface for details on the record argument.

<bool>objXRefMgr.UpdateAllRecords()

Updates all records in the scene. Returns true on success, false on failure.

<bool>objXRefMgr.SetXRefItemSrcName <&maxObject>xrefItem <string>itemName

xrefItem is In parameter

Sets the source item name of the object passed by-reference to the given string. Returns true on success, false on failure.

<bool>objXRefMgr.SetProxyItemSrcName <&maxObject>proxyItem <string>itemName

proxyItem is In parameter

Sets name of the proxy of the object passed by-reference to the given string. Returns true on success, false on failure.

<bool>objXRefMgr.SetXRefItemSrcFile <&maxObject>xrefItem <filename>fileName

xrefItem is In parameter

Sets the source item file name of the object passed by-reference to the given filename string. Returns true on success, false on failure.

<bool>objXRefMgr.SetProxyItemSrcFile <&maxObject>proxyItem <filename>fileName

proxyItem is In parameter

Sets the proxy item file name of the object passed by-reference to the given filename string. Returns true on success, false on failure.

<bool>objXRefMgr.AddXRefItemsToRecord <Interface>record promptObjNames:<bool> objNames:<string array>

record Validated by Validator function

promptObjNames default value: false

objNames default value: #()

Adds the array of object names to the given record. See IXrefRecord MixinInterface for details on the record argument.

<Interface>objXRefMgr.AddXRefItemsFromFile <filename>fileName promptObjNames:<bool> objNames:<string array> xrefOptions:<&enum array>

promptObjNames default value: false

objNames default value: #()

xrefOptions enums: {#asProxy|#xrefModifiers|#dropModifiers|#mergeModifiers|#mergeManipulators|#selectNodes|#mergeMaterials}

xrefOptions default value: #()

xrefOptions is In parameter

Adds the array of names to the given record.

<bool>objXRefMgr.CanCombineRecords <Interface>firstRecord <Interface>secondRecord

firstRecord Validated by Validator function

secondRecord Validated by Validator function

Returns true if the two records can be combined, false otherwise. See IXrefRecord MixinInterface for details on the record arguments.

<Interface>objXRefMgr.CombineRecords <&Interface array>records

records Validated by Validator function

records is In parameter

Combines the records given as by-reference array of interfaces to a single interface. See IXrefRecord MixinInterface for details on the record argument and return value.

<bool>objXRefMgr.RemoveXRefItemsFromScene <&maxObject array>xrefItems

xrefItems is In parameter

Removes the given XRef Items from the scene. Returns true on success, false on failure.

<bool>objXRefMgr.MergeXRefItemsIntoScene <&maxObject array>xrefItems

xrefItems is In parameter

Merges the XRef Items specified as an array into the scene. Returns true on success, false on failure.

<void>objXRefMgr.ApplyXRefMaterialsToXRefObjects <&maxObject array>objectXRefItems

objectXRefItems is In parameter

Applies XRef Materials to the specified XRef objects.

<Interface>objXRefMgr.IsNodeXRefed <node>node

If the node is XRef-ed, returns an IXRefItem MixinInterface .

The following MixinInterface represents an Object XRef Record:

Interface: IXRefRecord

Properties:

<IXRefRecord MixinInterface>.includeAll : bool : Read|Write

Get/Set the state of the Include All checkbox. When set to true, all objects in the record will be included.

<IXRefRecord MixinInterface>.autoUpdate : bool : Read|Write

Get/Set the state of the Auto Update checkbox. When set to true, changes to the XRef source will be automatically updated in the scene.

<IXRefRecord MixinInterface>.enabled : bool : Read|Write

Get/Set the state of the Enable checkbox.

<IXRefRecord MixinInterface>.uptodate : bool : Read|Write

Get/Set the whether the record is up to date or outdated.

<IXRefRecord MixinInterface>.empty : bool : Read

Contains true if the record is empty, false otherwise.

<IXRefRecord MixinInterface>.nested : bool : Read

Contains true if the record is nested, false otherwise.

<IXRefRecord MixinInterface>.unresolved : bool : Read

Contains true if the record is unresolved, false otherwise.

<IXRefRecord MixinInterface>.srcFileName : filename : Read|Write

Contains the file name of the source file.
This property can be set in 3ds Max 9 and higher, prior to 3ds Max 9 it was read-only.

<IXRefRecord MixinInterface>.recordID : DWORD : Read

Contains the record's ID.

<IXRefRecord MixinInterface>.handle : DWORD : Read

Contains the record's Handle.

<IXRefRecord MixinInterface>.xrefOptions : enum by value array : Read

xrefOptions enums: {#asProxy|#xrefModifiers|#dropModifiers|#mergeModifiers|#mergeManipulators|#selectNodes|#mergeMaterials}

Contains an array of the XRef Options.

Methods:

<DWORD><IXRefRecord MixinInterface>.ItemCount <&enum array>types

types enums: {#XRefObjectType|#XRefMaterialType|#XRefAtmosphericType|#XRefAllType}

types is In parameter

Returns the number of items in the record that correspond to the types passed by the by-reference array argument.

<maxObject><IXRefRecord MixinInterface>.GetItem <index>index <enum>type

type enums: {#XRefObjectType|#XRefMaterialType|#XRefAtmosphericType}

Returns the indexed item of the specified XRef type.

<DWORD><IXRefRecord MixinInterface>.GetItems <&enum array>types <&maxObject array>xrefItems

types enums: {#XRefObjectType|#XRefMaterialType|#XRefAtmosphericType|#XRefAllType}

types is In and Out parameter

xrefItems is In and Out parameter

Returns all items of the types specified by the by-reference array of the first argument into the by-reference array of the second argument.

<DWORD><IXRefRecord MixinInterface>.GetChildRecords <&Interface array>children

children is Out parameter

Returns the child records into the by-reference array. See IXrefRecord MixinInterface for details on the array's values type.

<DWORD><IXRefRecord MixinInterface>.GetParentRecords <&Interface array>parents

parents is Out parameter

Returns the parent records into the by-reference array. See IXrefRecord MixinInterface for details on the array's values type.

<DWORD><IXRefRecord MixinInterface>.GetRootRecords <&Interface array>roots

roots is Out parameter

Returns the root records into the by-reference array. See IXrefRecord MixinInterface for details on the array's values type.

<bool><IXRefRecord MixinInterface>.CheckSrcFileChanged()

Returns true if the source file has changed, false if it has not.

<bool><IXRefRecord MixinInterface>.Update()

Forces an update of the XRef Record and returns true on success, false on failure.

The following MixinInterface represents an Object XRef Item:

Interface: IXRefItem

Properties:

<IXRefItem MixinInterface>.srcFileName : filename : Read|Write

Contains the file name of the source file.

This property was read-only in versions prior to 3ds Max 9.

<IXRefItem MixinInterface>.srcItemName : string : Read|Write

Contains the name of the source item.

This property was read-only in versions prior to 3ds Max 9.

<IXRefItem MixinInterface>.xrefRecord : Interface : Read

Contains the Xref Record's IXRefRecord MixinInterface .

<IXRefItem MixinInterface>.unresolved : bool : Read

Contains true if the XRef is unresolved, false otherwise.

<IXRefItem MixinInterface>.nested : bool : Read

Contains true if the XRef is nested, false otherwise.

<IXRefItem MixinInterface>.retargetable : bool : Read

Contains true if the XRef can be retargeted, false otherwise.

Methods:

<maxObject><IXRefItem MixinInterface>.GetSrcItem resolveNested:<bool>

resolveNested default value: false

Returns the source item. If the resolveNested optional keyword is specified and is true, nested XRefs will be resolved to get the source item. If not specified or false, nested XRefs will not be resolved.

<DWORD><IXRefItem MixinInterface>.GetParentItems <&maxObject array>parentItems

parentItems is Out parameter

Returns the parent items into the by-reference array argument.

<DWORD><IXRefItem MixinInterface>.GetRootItems <&maxObject array>rootItems

rootItems is Out parameter

Returns the root items into the by-reference array argument.

<DWORD><IXRefItem MixinInterface>.GetChildItems <&maxObject array>childItems

childItems is Out parameter

Returns the child items into the by-reference array argument.

<void><IXRefItem MixinInterface>.GetNodes <&node array>xrefNodes

xrefNodes is Out parameter

Returns the XRef nodes into the by-reference array argument.

The following MixinInterface represents an Object XRef Proxy:

Interface: IXRefProxy

Properties:

<IXRefProxy MixinInterface>.proxyFileName : filename : Read|Write

Contains the proxy filename.

This property was read-only in versions prior to 3ds Max 9.

<IXRefProxy MixinInterface>.proxyItemName : string : Read|Write

Contains the proxy item name.

This property was read-only in versions prior to 3ds Max 9.

<IXRefProxy MixinInterface>.proxyRecord : Interface : Read

Contains the IXRefRecord Interface of the Proxy.

<IXRefProxy MixinInterface>.displayProxy : bool : Read|Write

Get/set whether to display the proxy in the viewports or not.

<IXRefProxy MixinInterface>.renderProxy : bool : Read|Write

Get/set whether to render the proxy or not.

The following MixinInterface represents an Object XRef Proxy:

Interface: IXRefObject

Properties:

<IXRefObject MixinInterface>.activeFileName : filename : Read

Contains the active filename.

<IXRefObject MixinInterface>.activeObjName : string : Read

Contains the active object name.

<IXRefObject MixinInterface>.activeRecord : Interface : Read

Contains the IXRefRecord Interface of the Xref Object.

Methods:

<maxObject><IXRefObject MixinInterface>.GetSourceObject <bool>resolveNestedXRef modifiers:<&maxObject array>

modifiers default value: #()

modifiers is Out parameter

Returns the Source Object. When the first argument is set to true, nested XRefs will be resolved. The optional modifiers: array parameter will be populated with the modifiers of the object.

See also

Interface: objXRefs

XRefObject : Node

XRefScene Values

XRef Files


Interface: PaintSoftSelPresetContext

Interfaces > Core Interfaces > PaintSoftSelPresetContext

A Core Interface used by the Paint Soft Selection Preset. Exposes no properties or methods.
Available in 3ds Max 8 and higher.

Interface: PaintSoftSelPresetContext

Properties:

Methods:

Actions:


Interface: ParamCollectorOps

Interfaces > Core Interfaces > ParamCollectorOps

This Core Interface provides access to the Parameter Collector dialog.

Interface: ParamCollectorOps

Properties:

ParamCollectorOps.visible : bool : Read|Write

When set to true, the Parameter Collector floater becomes visible. When set to false, it is hidden.

ParamCollectorOps.multiEdits : bool : Read|Write

Get/Set the state of the Multiple Edits icon. When set to true, multiple parameters can be controlled simultaneously.

ParamCollectorOps.isAbsolute : bool : Read|Write

Get/Set the state of the Absolute/Relative icon. When set to true (icon unchecked), the spinners display the absolute values. When set to false (icon checked), the spinners will display relative changes.

The following properties control the custom TrackBar Keys Filter "Parameter Collector Keys"

ParamCollectorOps.showTrackBarKeys : bool : Read|Write

Controls whether the TrackBar will show animation keys of the parameters displayed by the Parameter Collector. Default is false.

ParamCollectorOps.showTrackBarSelectedKeys : bool : Read|Write

Controls whether the TrackBar will show selected keys. Default is false.

ParamCollectorOps.hideOtherKeys : bool : Read|Write

Controls whether the TrackBar will show keys of parameters NOT shown in the Parameter Collector. Default is false.

Methods:

<void>ParamCollectorOps.newCollection()

Creates a new Parameter Collection.

<void>ParamCollectorOps.duplicateCollection()

Clones the current Parameter Collection.

<void>ParamCollectorOps.deleteCollection()

Deletes the current Parameter Collection.

<integer>ParamCollectorOps.numCollections()

Returns the number of Parameter Collections.

<index>ParamCollectorOps.getActiveCollection()

Returns the index of the current Parameter Collection.

<void>ParamCollectorOps.setCollectionName <index>collectionIndex <string>name

Sets the name of the indexed Parameter Collection to the given string.

<string>ParamCollectorOps.getCollectionName <index>collectionIndex

Returns the name of the indexed Parameter Collection as string

<void>ParamCollectorOps.doLinkToObjectDialog()

Opens the "Links to Object" dialog.

Picking an object stores the current collection using a live link as part of the object in the scene. Any change to the collection instantly updates the version of the collection stored in the object.

Link to Object has basically the same function as Put To Object except that it guarantees an up-to-date stored version of the collection, especially when merging the object into another scene that is a common production workflow.

NOTE:

Only one "linked-to" object can be active in a scene, but you can use Put To Object on any number of objects at a time.

<void>ParamCollectorOps.linkToObject <node>node

Links the current collection to the specified node. See above for details on linking collections to scene objects.

<void>ParamCollectorOps.removeLinkToObject()

Unlinks the collection from the object it was linked to.

<void>ParamCollectorOps.doPutToObjectDialog()

Opens the "Put To Object" dialog.

Putting to object stores the current collection as part of the object in the scene.

Although parameter collections are stored with the scene in which they're created, you can use this function to transfer a collection to a different scene. After putting the collection to an object, save the scene. Open or create another scene, merge the object from the saved scene to the new one, and then use Get from Object.

You can also back up, organize and streamline parameter collections by putting and getting different collections to and from various objects in your scene. Just remember that if you add, reorder, or remove parameters or rollouts to a collection that has been put to an object, you must then put it to the object again so the changes are saved to the collection. For a "live" update, see Linking to objects described above.

<void>ParamCollectorOps.doGetFromObjectDialog()

Opens the "Get from Object" dialog to retrieve a collection stored in an object isong either Put To Object or Link To Object.

<void>ParamCollectorOps.putToObject <node>node

Puts the collection to the specified node. See above for details on putting collections to scene objects.

<void>ParamCollectorOps.getFromObject <node>node

Gets a put or linked collection from the specified node. See above for details.

<void>ParamCollectorOps.doAddToSelectedDialog()

Corresponds to pressing the "Add To Selected" icon and opens the Track View Pick dialog to add tracks to the selected rollout.

<void>ParamCollectorOps.doAddDialog()

Corresponds to pressing the "Add to New Rollout" icon and opens the Track View Pick dialog to add tracks to a new rollout.

<void>ParamCollectorOps.deleteSelectedParameters()

Deletes the selected parameters. Corresponds to pressing the "Delete Selected" icon.

<void>ParamCollectorOps.deleteAllParameters()

Deletes all parameters. Corresponds to pressing the "Delete All" icon.

<void>ParamCollectorOps.addNewRollout <string>name <bool>addSelectedParameters

Adds a new rollout with the given name. If addSelectedParameters is true, any selected parameters from existing rollouts will be added to the new rollout, too. If false, no parameters will be added to the new rollout.

<void>ParamCollectorOps.deleteRollout <index>index

Removes the indexed rollout.

<void>ParamCollectorOps.deleteRolloutMoveUp <index>index

Deletes the indexed rollout and moves all parameters from the deleted rollout to the previous rollout.

<void>ParamCollectorOps.deleteRolloutMoveDown <index>index

Deletes the indexed rollout and moves all parameters from the deleted rollout to the next rollout.

<void>ParamCollectorOps.DoRenameRolloutDialog()

Opens the Rename Rollout dialog for the selected rollout.

<void>ParamCollectorOps.RenameRollout <index>index <string>name

Renames the indexed rollout to the given name.

<bool>ParamCollectorOps.isRolloutSelected()

Returns true if there is a selected rollout.

<index>ParamCollectorOps.getSelectedRollout()

Returns the index of the selected rollout.

<integer>ParamCollectorOps.numRollouts <index>collectionIndex

Returns the number of rollouts in the indexed Collection.

<void>ParamCollectorOps.setRolloutName <index>collectionIndex <index>rolloutIndex <string>name

Sets the rollout name of the indexed rollout in the indexed collection to the given string.

<string>ParamCollectorOps.getRolloutName <index>collectionIndex <index>rolloutIndex

Returns the the rollout name of the indexed rollout in the indexed collection as a string value.

<integer>ParamCollectorOps.getNumParameters <index>collectionIndex <index>rolloutIndex

Returns the number of parameters in the indexed rollout of the indexed collection as integer value.

<bool>ParamCollectorOps.anyParameters()

Returns true if there are any parameters, false otherwise.

<bool>ParamCollectorOps.anySelected()

Returns true if there are any selected parameters, false otherwise.

<integer>ParamCollectorOps.numSelected()

Returns the number of selected parameters as integer value.

<void>ParamCollectorOps.selectAll()

Selects all parameters.

<void>ParamCollectorOps.selectAllRollout()

Select all parameters in the selected rollout.

<void>ParamCollectorOps.selectNone()

Deselects all parameters.

<void>ParamCollectorOps.selectInvert()

Invert the parameter selection.

<bool>ParamCollectorOps.addParameterBySubNum <fpvalue>animOwner <index>subNum

<index>collectionIndex <index>rolloutIndex <string>name

Add the indexed subAnim of the given animOwner to the indexed rollout of the indexed collection using the supplied name.

<void>ParamCollectorOps.moveSelectedParameters <enum>type

type enums: {#moveUp|#moveDown|#moveUpRollout|#moveDownRollout}

Move the selected parameters in the specified direction.

<void>ParamCollectorOps.keyParameters <bool>selectedOnly

Set key for all parameters. If selectedOnly is true, only selected parameters will be keyed.

<void>ParamCollectorOps.resetParameters <bool>selectedOnly

Reset all parameters. If selectedOnly is true, only selected parameters will be reset.

<bool>ParamCollectorOps.addParameter <fpvalue>anim <index>collectionIndex <index>rolloutIndex

Add the specified anim parameter to the indexed rollout of the indexed collection.

<integer>ParamCollectorOps.getParameterIndex <index>collectionIndex <index>rolloutIndex

<index>paramIndexInRollout

Returns the index of the indexed parameter from the indexed rollout of the indexed collection.

<maxObject>ParamCollectorOps.getParameterParentAnim <index>paramIndex

Returns the parent track of the indexed parameter

<integer>ParamCollectorOps.getParameterSubAnimNum <index>paramIndex

Returns the index of the indexed parameter's subAnim inside the parent track.

FOR EXAMPLE:

--Create a Box, collect its Length, Width and Height parameters.

--Get the index of the first parameter in the first rollout

--of the first collection (in the above case this is the Length param):

theIndex = ParamCollectorOps.getParameterIndex 1 1 1

1

--Get the parent track of the parameter:

theParent = ParamCollectorOps.getParameterParentAnim theIndex

ReferenceTarget:ParamBlock

--Get the subAnim index of the parameter inside the parent:

theSubNum = ParamCollectorOps.getParameterSubAnimNum theIndex

1

--Get the parameter's subAnim

theSubnim = theParent[theSubNum]

SubAnim:Length

--Get the value of the parameter

theValue = theSubnim.value

25.0

--Set the value of the parameter to 10

theSubnim.value = 10

10

<maxObject>ParamCollectorOps.getParameterAnim <index>paramIndex

Returns the animation controller object of the indexed parameter.

NOTE:

If the parameter is not animated (and does not have a controller assigned), this method will return undefined.

FOR EXAMPLE:

--Using the same Box and Collection from the above example,

--if you try to access the Length parameter's animation controller,

--you will get undefined by default:

theIndex = ParamCollectorOps.getParameterIndex 1 1 1

1

ParamCollectorOps.getParameterAnim theIndex

undefined

--Animate the Length of the Box over time and try again:

with animate on at time 100 $Box01.length = 100

100

ParamCollectorOps.getParameterAnim theIndex

Controller:Bezier_Float

<void>ParamCollectorOps.setParameterNotesTitle <index>paramIndex <string>text

Set the title of the notes of the the indexed parameter to the given string

<string>ParamCollectorOps.getParameterNotesTitle <index>paramIndex

Returns the title of the notes of the the indexed parameter as string

<void>ParamCollectorOps.setParameterNotesNotes <index>paramIndex <string>text

Sets the notes text of the indexed parameter to the given string

<string>ParamCollectorOps.getParameterNotesNotes <index>paramIndex

Returns the notes text of the indexed parameter as string

<void>ParamCollectorOps.setParameterNotesURL <index>paramIndex <string>text

Sets the notes URL of the indexed parameter to the given string

<string>ParamCollectorOps.getParameterNotesURL <index>paramIndex

Returns the notes URL of the indexed parameter as string

<void>ParamCollectorOps.doEditNotesDialog()

Opens the Edit Notes dialog

<void>ParamCollectorOps.refresh()

Refreshes the Paremter Collector.

<integer>ParamCollectorOps.getNumParametersInCollection <index>collectionIndex

Returns the number of parameters in the indexed collection.

<int by value array>ParamCollectorOps.getSelectedParameters <index>collectionIndex

Returns an array of the selected parameters in the indexed collection.

<void>ParamCollectorOps.doRemoveFromObjectDialog()

Opens the Remove From Object dialog. Used to remove collections put or linked to objects as described earlier on this page.

<void>ParamCollectorOps.removeFromObject <node>node

Removes the collection from the specified node. Used to remove collections put or linked to objects as described earlier on this page.

<integer>ParamCollectorOps.getNumSelectedParameters <index>collectionIndex <index>rolloutIndex

Returns the number of selected parameters in the indexed rollout of the indexed collection.

<bool>ParamCollectorOps.anyRollouts()

Returns true if there are any rollouts in the current collection, false otherwise

<bool>ParamCollectorOps.addParameterTraverse <fpvalue>anim <bool>addChildren <index>collectionIndex <index>rolloutIndex <string>name

Adds multiple parameters to the indexed rollout of the indexed collection by traversing the subAnim hierarchy of the given anim object.

<void>ParamCollectorOps.setParameterSelected <index>paramIndex <bool>selected

Sets the selected state of the indexed parameter to the given boolean value.

<bool>ParamCollectorOps.getParameterSelected <index>paramIndex

Returns the selecred state of the indexed parameter as boolean value.

<node by value array>ParamCollectorOps.getParameterNodes <index>paramIndex

Returns an array of the nodes affected by the indexed parameter.

See also

Other Interfaces


Interface: paramWire

Interfaces > Core Interfaces > paramWire

Parameter Wiring

The paramWire Core Interface provides general access to the parameter wiring functions introduced in 3ds Max 4.

Methods:

<void>paramWire.start()

This method will launch the parameter wiring UI mode on the currently selected object. Only works if there is a single object selected in the viewport. It will move the cursor to the pivot point of the node.

EXAMPLE

It can be used in a macroScript like this:

macroScript paramWire

category:"Tools"

buttonText:"Wire Parameters"

tooltip:"Start Param Wiring"

Icon:#("MAXScript",1)

(

on execute do paramWire.start()

on isEnabled return selection.count == 1

)

<void>paramWire.openEditor()

This method will open up the parameter wiring dialog on the selected objects with no track selected in either tree view.

<void>paramWire.editParams <value>leftParam <value>rightParam

Opens the parameter wiring editor dialog on the parameters specified. The parameter is specified as a SubAnim in MAXScript, via the index [] operator on a 3ds Max object.

<value>leftParam: The sub-animatable of the left-hand reference target.

<value>rightParam: The sub-animatable of the right-hand reference target.

NOTE:

The subanim index operator can also take number indexes.

<void>paramWire.editParam <value>param

Opens the parameter wiring editor dialog on the parameter specified. The parameter is specified as a SubAnim in MAXScript, via the index [] operator on a 3ds Max object.

<value>param: The sub-animatable of the left-hand reference target.

EXAMPLE

-- The radius parameter in a sphere node

paramWire.editParam $sphere01.baseObject[#radius]

-- The angle parameter in a bend modifier would be

paramWire.editParam $foo.bend[#angle]

-- The position parameter in node would be

paramWire.editParam $foo[#transform][#position], etc.

<void>paramWire.editControllers <control>leftController <control>rightController

Opens the parameter wiring editor dialog on the two given existing wire controllers.

<control>leftController: A pointer to the controller for the left-hand wire.

<control>rightController: A pointer to the controller for the right-hand wire.

<void>paramWire.editController <control>controller

Opens the parameter wiring editor dialog on the given existing wire controller.

<control>controller: A pointer to the controller being edited.

EXAMPLE

paramWire.editController $foo.radius.controller

<bool>paramWire.connect <value>fromParam <value>toParam <string>toExpr

This method allows you to set up a one-way parameter wire from the 'fromParam' subAnim to the 'toParam' subAnim, using the 'toExpr' as the expression for the controlled parameter. Returns true if the connection can be made, otherwise false.

<value>fromParam: The sub-animatable to wire from.

<value>toParam: The sub-animatable to wire to.

<string>toExpr: A string containing the expression on the "to wire".

EXAMPLE

paramWire.connect $foo.baseObject[#radius] $baz.bend[#angle] "radius / 2"

<bool>paramWire.connect2Way <value>leftParam <value>rightParam <string>leftExpr <string>rightExpr

This method allows you to set up a two-way parameter wire between the 'leftParam' parameter and the 'rightParam’ parameter, with the given expression strings. Returns true if the connection can be made, otherwise false.

<value>leftParam: The sub-animatable of the left-hand reference target.

<value>rightParam: The sub-animatable of the right-hand reference target.

<string>leftExpr: A string containing the expression for the left-hand target.

<string>rightExpr: A string containing the expression for the right-hand target.

EXAMPLE

paramWire.connect2Way $foo.baseObject[#radius] $baz.bend[#angle] \ "angle / 2" "radius * 2"

<bool>paramWire.disconnect <control>controller

This method allows you to disconnect a one-way wireController from its current parameter, replacing it with either the wire's existing animation track or a default controller for the parameter. Returns true if the disconnect was successful, otherwise false.

<control>controller: A pointer to the wire controller you wish to disconnect.

<bool>paramWire.disconnect2Way <control>leftController <control>rightController

This method allows you to disconnect a two-way wire between ‘leftcontroller’ and ‘rightController’. If this is the last two-way wire for either controller, replace it with either the the wire's existing animation track or a default controller for the parameter. Returns true if the disconnect was successful, otherwise false.

<control>leftController: A pointer to the first wire controller you wish to disconnect.

<control>rightController: A pointer to the second wire controller you wish to disconnect.

See also Class IparamWireMgr, in the SDK Help file accompanying this product.

See also

Parameter Wiring

Float_Wire : FloatController

Point3_Wire : Point3Controller

Position_Wire : PositionController

Rotation_Wire : RotationController

Scale_Wire : ScaleController


Interface: pluginManager

Interfaces > Core Interfaces > pluginManager

The pluginManager Core Interface exposes the Plugin Manager to MAXScript.

Properties

pluginManager.visible : boolean : Read|Write

Show and hide the plug-in manager.

Methods

<void>pluginManager.loadClass <class>class

Will ensure that the given class is loaded, in the event that it is a deferred loading class, and so any MAXScript methods or Function Published interfaces it publishes will be available.

FOR EXAMPLE:

pluginManager.loadClass Flex

After this code is executed, all the Flex modifier MAXScript methods are installed and callable. Note this is only needed in situations where a plug-in loading may be deferred and it does not have any instances already in the current scene.

Plugin_Manager interfaces:

Interface: PluginMgrAction

Methods:

<boolean>show() -- Action Interface

Actions:

Category: Plugin_Manager; Action: Plugin_Manager; Shortcut: -- none defined -

See also

Plug-In Manager


Interface: ProjectionIntersectorMgr

Interfaces > Core Interfaces > ProjectionIntersectorMgr

Interface: ProjectionIntersectorMgr

Note:

This interface is not available in Autodesk VIZ.

No properties or methods exposed.

See also

Other Interfaces


Interface: ProjectionRenderMgr

Interfaces > Core Interfaces > ProjectionRenderMgr

Interface: ProjectionRenderMgr

Note:

This interface is not available in Autodesk VIZ.

No properties or methods exposed.

See also

Other Interfaces


Interface: PseudoColorManager

Interfaces > Core Interfaces > PseudoColorManager

NEW in 3ds Max 2009 Design: The PseudoColorManager Interface exposes properties related to pseudo color display.

NOTE:

This feature is exposed in 3ds Max Design only.

Properties:

PseudoColorManager.rangeStart : float : Read|Write

Get/set the Start of the Pseudo-Color Range.

PseudoColorManager.rangeEnd : float : Read|Write

Get/set the End of the Pseudo-Color Range.

PseudoColorManager.scaleType : enum : Read|Write

scaleType enums: {#linear|#logarithmic}

Get/set the Pseudo-Color Scale - either Linear or Logarithmic.

See also

Lighting Analysis and Daylight Simulation Tools


Interface: quadMenuSettings

Interfaces > Core Interfaces > quadMenuSettings

The quadMenuSettings Core Interface exposes methods for controlling the quad menu settings.

Methods:

<void>quadMenuSettings.ResetDefaults()

This method will reset the menu settings to their defaults.

<void>quadMenuSettings.SetBorderSize <integer>borderSize

This method allows you to set the menu border size in pixels.

<integer>quadMenuSettings.GetBorderSize()

This method returns the menu border size.

<void>quadMenuSettings.SetHorizontalMarginInPoints <integer>horizontalMarginInPoints

This method allows you to set the menu’s horizontal margin size in points.

<integer>quadMenuSettings.GetHorizontalMarginInPoints()

This method returns the menu’s horizontal margin size in points.

<void>quadMenuSettings.SetVerticalMarginInPoints <integer>verticalMarginInPoints

This method allows you to set the menu’s vertical margin size in points.

<integer>quadMenuSettings.GetVerticalMarginInPoints()

This method returns the menu’s vertical margin size in points.

<void>quadMenuSettings.SetItemFontFace <string>szItemFontFace

This method allows you to set the menu item’s font typeface by providing a string containing the typeface name.

<string>quadMenuSettings.GetItemFontFace()

This method returns the name of the menu item’s font typeface.

<void>quadMenuSettings.SetTitleFontFace <string>szTitleFontFace

This method allows you to set the menu title’s font typeface by providing a string containing the typeface name.

<string>quadMenuSettings.GetTitleFontFace()

This method returns the name of the menu title’s font typeface.

<void>quadMenuSettings.SetItemFontSize <integer>itemFontSize

This method allows you to set the menu item’s font size in points.

<integer>quadMenuSettings.GetItemFontSize()

This method returns the menu item’s font size, in points.

<void>quadMenuSettings.SetTitleFontSize <integer>titleFontSize

This method allows you to set the menu title’s font size, where the title font size value is given in points.

<integer>quadMenuSettings.GetTitleFontSize()

This method returns the menu title’s font size, in points.

<void>quadMenuSettings.SetUseUniformItemHeight <boolean>useUniformItemHeight

This method allows you to set the status of a menu item’s uniform height flag.

<boolean>quadMenuSettings.GetUseUniformItemHeight()

This method returns true or false if the menu item’s uniform height flag is set or not set, respectively.

<void>quadMenuSettings.SetOpacity <float>opacity

This method allows you to set the menu’s opacity value. The opacity value can range from 0.0 to 1.0, where 1.0 is opaque.

<float>quadMenuSettings.GetOpacity()

This method returns the menu’s opacity value.

<void>quadMenuSettings.SetDisplayMethod <integer>displayMethod

This method allows you to set a menu’s display method.

The display method argument can be one of the following:

0 - displays the menu with transparency, if opacity is < 1.

1 - stretch animate the menu by making it grow in size from its center with transparency, if opacity is < 1.

2 - fade in from invisible to whatever opacity is set to.

<integer>quadMenuSettings.GetDisplayMethod()

This method returns the menu’s display method, which is either of the following; DM_NORMAL, DM_STRETCH, DM_FADE, DM_NUM_METHODS

<void>quadMenuSettings.SetAnimatedSteps <integer>animatedSteps

This method allows you to set the menu’s number of animated steps for the ‘growing’ effect as integer.

<integer>quadMenuSettings.GetAnimatedSteps()

This method returns the menu’s number of animated steps used for the ‘growing’ effect.

<void>quadMenuSettings.SetAnimatedStepTime <integer>animatedStepTime

This method allows you to set the menu’s animated step time in milliseconds.

<integer>quadMenuSettings.GetAnimatedStepTime()

This method returns the menu’s animated step time in milliseconds.

<void>quadMenuSettings.SetSubMenuPauseTime <integer>subMenuPauseTime

This method allows you to set the delay before a submenu is displayed, in milliseconds.

<integer>quadMenuSettings.GetSubMenuPauseTime()

This method returns the delay before a submenu is displayed, in milliseconds.

<void>quadMenuSettings.SetUseLastExecutedItem <boolean>useLastSelectedItem

This method allows you to set the "last executed item" flag which determines whether to use the menu’s last executed item when the user clicks on the menu’s titlebar.

<boolean>quadMenuSettings.GetUseLastExecutedItem()

This method returns whether the "last executed item" flag is set (true) or not set (false). The flag determines whether to use the menu’s last executed item when the user clicks on the menu’s titlebar.

<void>quadMenuSettings.SetRepositionWhenClipped <boolean>repositionWhenClipped

This method allows you to set the flag which controls and determines whether the menu is repositioned when near the edge of the screen.

<integer>quadMenuSettings.GetRepositionWhenClipped()

This method returns the status of the flag which controls and determines whether the menu is repositioned when near the edge of the screen. Returns true if the flag is on, otherwise false.

<void>quadMenuSettings.SetRemoveRedundantSeparators <boolean>removeRedundantSeparators

This method allows you to set the flag which controls and determines whether the menu should remove redundant separators.

<integer>quadMenuSettings.GetRemoveRedundantSeparators()

This method returns the status of the flag which controls and determines whether the menu should remove redundant separators. Returns true if the flag is on, otherwise false.

<void>quadMenuSettings.SetFirstQuadDisplayed <integer>firstQuadDisplayed

This method allows you to set the first quad which will be displayed when a quad menu pops up.

The quad index, an integer between 0 and 3.

<integer>quadMenuSettings.GetFirstQuadDisplayed()

This method returns the index of the first quad which will be displayed. Returns the quad index, an integer between 0 and 3.

<void>quadMenuSettings.SetUseUniformQuadWidth <boolean>useUniformQuadWidth

This method allows you to set whether the quad menu has a uniform width or not.

<boolean>quadMenuSettings.GetUseUniformQuadWidth()

This method returns the status of the uniform width flag for the quad menu. true if the quad menu has been set to use uniform width, otherwise false.

<void>quadMenuSettings.SetMirrorQuad <boolean>mirrorQuad

This method allows you to set whether the quad menus are mirrored left to right.

<integer>quadMenuSettings.GetMirrorQuad()

This method returns true if the quad menu is mirrored left to right, otherwise false.

<void>quadMenuSettings.SetMoveCursorOnReposition <boolean>moveCursorOnReposition

This method allows you to set whether the cursor moves when the quad menu is repositioned because of clipping the edge of the screen.

<boolean>quadMenuSettings.GetMoveCursorOnReposition()

This method returns true if the cursor moves when the quad menu is repositioned because of clipping the edge of the screen, otherwise false.

<void>quadMenuSettings.SetReturnCursorAfterReposition <boolean>returnCursorAfterReposition

This method allows you to set whether the cursor is moved the opposite distance that it was automatically moved when the quad menu is repositioned because of clipping the edge of the screen.

<boolean>quadMenuSettings.GetReturnCursorAfterReposition()

This method returns true if the cursor is moved the opposite distance that it was automatically moved when the quad menu is repositioned because of clipping the edge of the screen, otherwise false.

<void>quadMenuSettings.SetInitialCursorLocInBox_0to1 <float>initialCursorLocX <float>initialCursorLocY

This method allows you to set the initial location of the cursor in the center quad box.

The two arguments specify the X and Y location of the cursor, as a ratio of the box size, between 0.0 and 1.0.

<float>quadMenuSettings.GetInitialCursorLocXInBox_0to1()

This method returns the initial x location of the cursor in the center quad box, as a ratio of the box size, between 0.0 and 1.0.

<float>quadMenuSettings.GetInitialCursorLocYInBox_0to1()

This method returns the initial y location of the cursor in the center quad box, as a ratio of the box size, between 0.0 and 1.0.

The following methods were changed to use RGB color values instead of RGBA in 3ds Max 6 and higher.

<void>quadMenuSettings.SetTitleBarBackgroundColor <integer>quad <&RGB color>color

This method allows you to set the title bar background color for a specific quad. Note: color is In parameter

<integer>quad: The quad (numbered 1 through 4).

<&RGB color>color: The color to set.

<&RGB color>quadMenuSettings.GetTitleBarBackgroundColor <integer>quad

This method returns the title bar background color of a specific quad. This method returns the color as an RGB Color value.

<integer>quad: The quad (numbered 1 through 4).

<void>quadMenuSettings.SetTitleBarTextColor <integer>quad <&RGB color>color

This method allows you to set the title bar text color for a specific quad. Note: color is In and Out parameter

<integer>quad: The quad (numbered 1 through 4).

<&RGB color>color: The color to set.

<&RGB color>quadMenuSettings.GetTitleBarTextColor <integer>quad

This method returns the title bar text color of a specific quad. This method returns the color as a Color.

<integer>quad: The quad (numbered 1 through 4).

<void>quadMenuSettings.SetItemBackgroundColor <integer>quad <&RGB color>color

This method allows you to set the item background color for a specific quad. Note: color is In and Out parameter

<integer>quad: The quad (numbered 1 through 4).

<&RGB color>color: The color to set.

<&RGB color>quadMenuSettings.GetItemBackgroundColor <integer>quad

This method returns the item background color of a specific quad. This method returns the color as an RGB Color value.

<integer>quad: The quad (numbered 1 through 4).

<void>quadMenuSettings.SetItemTextColor <integer>quad <&RGB color>color

This method allows you to set the item text color for a specific quad. Note: color is In and Out parameter

<integer>quad: The quad (numbered 1 through 4).

<&RGB color>color: The color to set.

<&RGB color>quadMenuSettings.GetItemTextColor <integer>quad

This method returns the item text color of a specific quad. This method returns the color as an RGB Color value.

<integer>quad: The quad (numbered 1 through 4).

<void>quadMenuSettings.SetLastExecutedItemTextColor <integer>quad <&RGB color>color

This method allows you to set the last executed item text color for a specific quad. Note: color is In and Out parameter

<integer>quad: The quad (numbered 1 through 4).

<&RGB color>color: The color to set.

<&RGB color>quadMenuSettings.GetLastExecutedItemTextColor <integer>quad

This method returns the last executed item text color of a specific quad. This method returns the color as a Color.

<integer>quad: The quad (numbered 1 through 4).

<void>quadMenuSettings.SetHighlightedItemBackgroundColor <integer>quad <&RGB color>color

This method allows you to set the highlighted item background color for a specific quad. Note: color is In and Out parameter

<integer>quad: The quad (numbered 1 through 4).

<&RGBA color>color: The color to set.

<&RGB color>quadMenuSettings.GetHighlightedItemBackgroundColor <integer>quad

This method returns the highlighted item background color of a specific quad. This method returns the color as a Color.

<integer>quad: The quad (numbered 1 through 4).

<void>quadMenuSettings.SetHighlightedItemTextColor <integer>quad <&RGB color>color

This method allows you to set the highlighted item text color for a specific quad. Note: color is In and Out parameter

<integer>quad: The quad (numbered 1 through 4).

<&RGB color>color: The color to set.

<&RGB color>quadMenuSettings.GetHighlightedItemTextColor <integer>quad

This method returns the highlighted item text color of a specific quad. This method returns the color as a Color.

<integer>quad: The quad (numbered 1 through 4).

<void>quadMenuSettings.SetBorderColor <integer>quad <&RGB color>color

This method allows you to set the border color for a specific quad. Note: color is In and Out parameter

<integer>quad: The quad (numbered 1 through 4).

<&RGB color>color: The color to set.

<&RGB color>quadMenuSettings.GetBorderColor <integer>quad

This method returns the border color of a specific quad. This method returns the color as a Color.

<integer>quad: The quad (numbered 1 through 4).

<void>quadMenuSettings.SetDisabledShadowColor <integer>quad <&RGB color>color

This method allows you to set the disabled shadow color for a specific quad. Note: color is In and Out parameter

<integer>quad : The quad (numbered 1 through 4).

<&RGB color>color: The color to set.

<&RGB color>quadMenuSettings.GetDisabledShadowColor <integer>quad

This method returns the disabled shadow color of a specific quad. This method returns the color as a Color.

<integer>quad: The quad (numbered 1 through 4).

<void>quadMenuSettings.SetDisabledHighlightColor <integer>quad <&RGB color>color

This method allows you to set the disabled highlight color for a specific quad. Note: color is In parameter

<integer>quad : The quad (numbered 1 through 4).

<&RGB color>color: The color to set.

<&RGB color>quadMenuSettings.GetDisabledHighlightColor <integer>quad

This method returns the disabled highlight color of a specific quad. This method returns the color as a Color.

<integer>quad : The quad (numbered 1 through 4).

See also

Menu Manager

Interface: menuMan

Class ImenuSettings (in the SDK Help file accompanying this product)


Interface: radiosityMeshOps

Interfaces > Core Interfaces > radiosityMeshOps

This Core Interface provides access to the internal radiosity mesh generated by the Radiosity Advanced Lighting effect.

Methods:

<mesh by value>radiosityMeshOps.getRadiosityMesh <node>radiosity_Node

Returns the radiosity mesh of the specified node.

<boolean>radiosityMeshOps.isRadiosityValid()

Returns true if the radiosity solution is valid.

<boolean>radiosityMeshOps.isNodeInSolution <node>radiosity_Node

Returns true if the node is part of the radiosity solution.

See also

Radiosity - srrRadiosityMesh Interface


Interface: RadiosityPreferences

Interfaces > Core Interfaces > RadiosityPreferences

This Core Interface exposes the Renderer Radiosity Preferences. The properties of this interface correspond to UI controls located in the Preferences > Adv.Lighting tab and in Render Scene Dialog of 3ds Max resp. Preferences > Radiosity tab of Autodesk VIZ.

Properties:

RadiosityPreferences.autoProcessObjectRefine : boolean : Read|Write

Corresponds to the "Automatically Process Refine Iterations Stored in Geometry Objects" checkbox in the "Radiosity Processing" group of the Radiosity tab under Customize>Preferences

RadiosityPreferences.displayReflectanceInMEditor : boolean : Read|Write

Corresponds to the "Display Reflectance & Transmittance Information" checkbox in the "Material Editor" group of the Radiosity tab under Customize>Preferences

RadiosityPreferences.displayInViewport : boolean : Read|Write

Corresponds to the "Display Radiosity in Viewports" checkbox in the "Interactive Display" group of the Radiosity tab under Customize>Preferences

RadiosityPreferences.displayResetWarning : boolean : Read|Write

Corresponds to the "Display Reset Warning" checkbox in the "Start/Reset Behavior" group of the Radiosity tab under Customize>Preferences

RadiosityPreferences.displayWarningOnGIPropsChange : boolean : Read|Write

Corresponds to the "Display Undo Warning on Properties Change" checkbox in the "Warnings" group of the Radiosity tab under Customize>Preferences in 3ds Max.

NOTE:

This property has been removed from 3ds Max 6.

RadiosityPreferences.updateDataWhenRequiredOnStart : boolean : Read|Write

Corresponds to the "Update Data When Required On Start" checkbox in the "Start/Reset Behavior" group of the Radiosity tab under Customize>Preferences and in the "Process" group of the Advanced Lighting > Radiosity dialog.

RadiosityPreferences.saveScene : boolean : Read|Write

Corresponds to the "Save Scene Information in MAX File (Decrease Load Time)" checkbox in the "File Save" group of the Radiosity tab under Customize>Preferences

RadiosityPreferences.useRadiosity : boolean : Read|Write

Corresponds to the "Use Radiosity" checkbox in the "Radiosity" group of the Render Scene dialog in AutodeskVIZ, resp. "Use Advanced Lighting" checkbox in the "Advanced Lighting" group in 3ds Max.

RadiosityPreferences.computeRadiosity : boolean : Read|Write

Corresponds to the "Compute Radiosity when Required" checkbox in the "Radiosity" group of the Render Scene dialog in AutodeskVIZ, resp. "Compute Advanced Lighting when Required" checkbox in the "Advanced Lighting" group in 3ds Max.

RadiosityPreferences.useAdvancedLighting : boolean : Read|Write

Corresponds to "Use Advanced Lighting" checkbox in the "Advanced Lighting" group of the Render Scene dialog in 3ds Max.

RadiosityPreferences.computeAdvancedLighting : boolean : Read|Write

Corresponds to "Compute Advanced Lighting when Required" checkbox in the "Advanced Lighting" group of the Render Scene dialog in 3ds Max.

FOR EXAMPLE

RadiosityPreferences.useAdvancedLighting = true

RadiosityPreferences.computeAdvancedLighting = true

See also

Interface: SceneRadiosity

Light_Tracer : RadiosityEffect

Radiosity : RadiosityEffect

Interface: INodeGIProperties

Render Scene Dialog


Interface: reactionMgr

Interfaces > Core Interfaces > reactionMgr

The reactionMgr Core Interface allows you to open the Reaction Manager.

Interface: reactionMgr

Methods:

<void>reactionMgr.openEditor()

Opens the Reaction Manager Editor.

See also

Other Interfaces


Interface: refhierarchy

Interfaces > Core Interfaces > refhierarchy

The refhierarchy Core Interface provides MAXScript access to the reference hierarchy.

Interface: refhierarchy

Methods:

<boolean>refhierarchy.IsRefTargetInstanced <maxObject>refTarget

This method can be used to find out if an object is instanced (instanced pipeline).

It Checks if the Derived Object is instanced. If it is, the pipeline part below and including that derived object is instanced.

In certain circumstances, objects need to find out whether they are instances or not. Some plugins need this functionality in order to properly interpret the size and position of their ModContext bounding box.

Returns True if the maxObject is an instance, False otherwise.

If the argument is undefined, it also returns False.

FOR EXAMPLE

--see if undefined returns anyting - it returns false:

refhierarchy.IsRefTargetInstanced undefined

false

--create a box - it is not instanced:

b1 = box()

$Box:Box01 @ [0.000000,0.000000,0.000000]

refhierarchy.IsRefTargetInstanced b1

false

--create an instance of the box:

b2 = instance b1

$Box:Box02 @ [0.000000,0.000000,0.000000]

--check the first box - it is now an instance

refhierarchy.IsRefTargetInstanced b1

true

--as is the second box:

refhierarchy.IsRefTargetInstanced b2

true

--create a bend modifier and see if it is instanced - it is not:

theMod = Bend()

Bend:Bend

refhierarchy.IsRefTargetInstanced theMod

false

--add the Bend modifier to the one box

addModifier b1 theMod

OK

--the modifier is still not instanced:

refhierarchy.IsRefTargetInstanced theMod

false

--now create a sphere and add the same bend modifier to it:

s1 = sphere()

$Sphere:Sphere01 @ [0.000000,0.000000,0.000000]

addModifier s1 theMod

OK

--now the modifier is instanced:

refhierarchy.IsRefTargetInstanced theMod

true


Interface: renderpresets

Interfaces > Core Interfaces > renderpresets

This Core Interface provides access to the render presets system introduced in 3ds Max 6.

Methods:

<boolean>renderpresets.Save <integer>which <filename>file <bitArray>categories

Save preset to the specified file using the categories described by the bitArray.

Returns true on success.

The integer which specifies the renderer slot to load into:

0 - Production

1 - Material Editor

2 - ActiveShade

NOTE:

Integer values greater than 2 will cause a System Exception!

<boolean>renderpresets.Load <integer>which <filename>file <bitArray>categories

Load the preset from the specified file, using the categories described by the bitArray.

Returns true on success.

The integer which specifies the renderer slot to load into:

0 - Production

1 - Material Editor

2 - ActiveShade

<boolean>renderpresets.SaveAll <integer>which <filename>file

Save preset to the specified file using all categories.

Returns true on success.

The integer which specifies the renderer slot to load into:

0 - Production

1 - Material Editor

2 - ActiveShade

<boolean>renderpresets.LoadAll <integer>which <filename>file

Load the indexed preset from the specified file, using all categories.

Returns true on success.

The integer which specifies the renderer slot to load into:

0 - Production

1 - Material Editor

2 - ActiveShade

<boolean>renderpresets.IsFileCompatible <integer>which <filename>file

Returns true if the specified file is compatible with the renderer slot specified by the integer which, false otherwise.

The integer which can be one of the following:

0 - Production

1 - Material Editor

2 - ActiveShade

<string>renderpresets.MapIndexToCategory <filename>file <integer>index

Returns a string containing the name of the category corresponding to the specified index in the supplied file. See example further on this page .

<integer>renderpresets.MapCategoryToIndex <filename>file <string>category

Returns the index corresponding to the specified category name in the supplied file.

<string>renderpresets.MapSceneIndexToCategory <integer>which <integer>index

Returns a string containing the name of the category corresponding to the renderer slot specified by the integer which:

0 - Production

1 - Material Editor

2 - ActiveShade

<integer>renderpresets.MapSceneCategoryToIndex <integer>which <string>category

Returns the index corresponding to the specified category name in the renderer slot specified by the integer which:

0 - Production

1 - Material Editor

2 - ActiveShade

<bitArray>renderpresets.LoadCategories <filename>file

Returns the categories available in the specified render presets file as bitArray. Each bit represents a category. See example further on this page .

EXAMPLE

renderPresets.LoadCategories (GetDir #renderPresets + "/mental.ray.no.gi.draft.rps")

#{32..34}

<bitArray>renderpresets.SaveCategories <integer>which

Returns the categories available for the specified renderer as bitArray. The bitArray will have a bit set for each category that can be saved for the specified renderer.

The integer which can be one of the following:

0 - Production

1 - Material Editor

2 - ActiveShade

WARNING!

A side effect of saving and loading the Radiosity presets from the Advanced Lighting tab is that your radiosity solution will be lost.

If you have invested a lot of time in the radiosity solution, it is suggested that you not choose the advanced lighting category when loading a render presets file.

The following script prints all categories from all Render Presets files. It can be used to "peek" into the files to determine which categories are saved in which file, and what category corresponds to which index in the BitArray.

EXAMPLE

(

--Collect all Render Presets files:

theFiles = getFiles (GetDir #renderPresets + "\\*.rps")

--For each Render Presets file,

for f in theFiles do

(

 format "\nRender Preset: %\n" (getFileNameFile f) --Print the file name

 --Get the category indices as BitArray and loop through them,

 --printing the index and the corresponding category name:

 for c in (renderPresets.LoadCategories f) do

  format "%: %\n" c (renderpresets.MapIndexToCategory f c)

)

)

RESULT:

Render Preset: 3dsmax.scanline.no.advanced.lighting.draft.rps

32: Default Scanline Renderer

33: Advanced Lighting

34: Raytracer

Render Preset: 3dsmax.scanline.no.advanced.lighting.high.rps

32: Default Scanline Renderer

33: Advanced Lighting

34: Raytracer

Render Preset: 3dsmax.scanline.radiosity.draft.rps

3: Environment

32: Default Scanline Renderer

33: Advanced Lighting

34: Raytracer

Render Preset: 3dsmax.scanline.radiosity.high.rps

3: Environment

32: Default Scanline Renderer

33: Advanced Lighting

34: Raytracer

Render Preset: a.rps

1: Common

4: Render Elements

32: Default Scanline Renderer

33: Advanced Lighting

34: Raytracer

Render Preset: b.rps

1: Common

4: Render Elements

32: Default Scanline Renderer

33: Advanced Lighting

34: Raytracer

Render Preset: mental.ray.hidden.line.contours.rps

32: mental ray Renderer

33: Processing

Render Preset: mental.ray.no.gi.draft.rps

32: mental ray Renderer

33: Processing

34: Indirect Illumination

Render Preset: mental.ray.no.gi.high.rps

32: mental ray Renderer

33: Processing

34: Indirect Illumination

OK

OK

Using this information, you can easily load just a single category from a file using MAXScript. In the following example, only category 32 - mental ray Renderer will be loaded, but not the categories 33 and 34 (Processing and Indirect Illumination) that are also stored in the file:

EXAMPLE

renderpresets.Load 0 (GetDir #renderPresets + "\\mental.ray.no.gi.high.rps") #{32}

See also

TabbedDialogs - Controlling Tabbed Dialogs

Render Scene Dialog

renderSceneDialog


Interface: RingArray

Interfaces > Core Interfaces > RingArray

The RingArray Core Interface exposes a creation method for the RingArray System. This interface was created mainly for test and debugging purposes as the RingArray has no real function in 3ds Max. It is only an System example.

Available in 3ds Max 9 and higher.

Methods:

<Interface>RingArray.Create posOrigin:<&point3> numNodes:<integer> amplitude:<float> radius:<float> cycles:<float> phase:<float>

posOrigin default value: [0,0,0]

posOrigin is In parameter

numNodes default value: 4

numNodes Validated by Range: 1 to 200

amplitude default value: 20.0

amplitude Validated by Range: 0 to 1140457472

radius default value: 100.0

radius Validated by Range: 0 to 1140457472

cycles default value: 3.0

cycles Validated by Range: 0 to 1092616192

phase default value: 1.0

phase Validated by Range: -998637568 to 1148846080


Interface: rollup

Interfaces > Core Interfaces > rollup

Note: Intentionally blank.


Interface: s3dexporter

Interfaces > Core Interfaces > s3dexporter

The s3dexporter Core Interface exposes the Shockwave 3D Exporter to MAXScript.

Available in 3ds Max 2008 and higher.

Interface: s3dexporter

Methods:

<void>s3dexporter.preview()

Corresponds to pressing the Preview button in the Shockwave 3D exporter dialog, creating a preview of the scene to be exported to Shockwave 3D.

<void>s3dexporter.analyze()

Corresponds to pressing the Analyze button in the Shockwave 3D exporter dialog, performing analyzis and displaying statistics about the scene to be exported to Shockwave 3D.

<void>s3dexporter.authcheck()

Calling this method corresponds to pressing the Author Check button in the Shockwave 3D exporter dialog.

See also

Core Interfaces


Interface: SceneEffectLoader

Interfaces > Core Interfaces > SceneEffectLoader

This Core Interface exposes the Scene Effect Loader Utility to MAXScript.

Available in 3ds Max 9 and higher.

Methods:

<bool>SceneEffectLoader.LoadSceneEffect <filename>effectFile effectType:<enum> numberOfPasses:<integer>

effectType enums: {#Post|#Pre|#Env}

effectType default value: #Post

numberOfPasses default value: 0

Loads the specified effects file into the Scene Effect Loader.

Loads the specified file and registers it with the Scene Effect system. The system maintains three lists: Post, Pre and Env.

#Post = The effect is applied at the end of the scene graph. E.g Sepia, or edge detect

#Pre = Runs before any geometry is rendered. Useful for background effects. Only the first pre effect loaded will be used.

#Env = Environmental effects - these are run in a seperate pass and general create data for object based shaders or shaders later on in the scene graph. An example would shadows, or depth info

To specify which list the effect belongs to, use the effectType: argument.

The numberOfPasses: argument is only used with Env type shaders. Environment shaders need to tell the system how many passes it requires, for example to create a cubemap the shader would need 6 passed.

The lists are maintained in the order they are generated. This means that the effects are run in the same order. So if you want to reorganise the list, simply remove all effects and apply them in the correct order.

<void>SceneEffectLoader.ResetEffects()

Resets the Scene Effect Loader, removing all effects.

<bool>SceneEffectLoader.EnableSceneEffects <bool>enable

Enables or disables the Scene Effect Loader depending on the boolean argument. If there are not "post" effects present then the system will not be enabled. There need to be at least one post effect for the system to be able to render.

<bool>SceneEffectLoader.IsSceneEffectsEnabled()

Returns true if the Scene Effect Loader is enabled, false otherwise.

<integer>SceneEffectLoader.GetNumberOfSceneEffects effectType:<enum>

effectType enums: {#Post|#Pre|#Env}

effectType default value: #Post

Returns the number of scene effects currently loaded in the Scene Effect Loader. By default, returns only Post Effects unless the effect type is specified explicitly.

<bool>SceneEffectLoader.RemoveSceneEffect <index>index effectType:<enum>

effectType enums: {#Post|#Pre|#Env}

effectType default value: #Post

Removes the indexed scene effect from the Loader. By default affects the Post Effects list. A different effect type can be specified to affect the corresponding effects list.

<material>SceneEffectLoader.GetSceneEffect <index>index effectType:<enum>

effectType enums: {#Post|#Pre|#Env}

effectType default value: #Post

Returns a DirectX Shader material hosting the indexed effect from the specified effects list. For example, if the Post list contains the effect post_corona.fx, calling this method with index 1 will create a DirectX Shader with this fx file loaded which could be assigned to any slot of the Material Editor for tweaking or manipulated using MAXScript.

EXAMPLE

theFile = (GetDir #maxroot + "maps\\fx\\scene\\post_corona.fx") --the FX file

SceneEffectLoader.LoadSceneEffect theFile --add the file to the Post list.

theShader = SceneEffectLoader.GetSceneEffect 1 --get the first Post effect

theShader.GlowCol = blue --set the glow color to blue

theShader.Bias = 8.0 --set the bias to 8

meditmaterials[1] = theShader --assign to MEdit slot 1 for manual tweaking

SceneEffectLoader.EnableSceneEffects true --enable the scene effects


Interface: SceneExplorerManager

Interfaces > Core Interfaces > SceneExplorerManager

The SceneExplorerManager Core Interface exposes the Scene Explorer to MAXScript.

Available in 3ds Max 2008 and higher.

Interface: SceneExplorerManager

Methods:

<integer>SceneExplorerManager.GetExplorerCount()

Returns the number of Scene Explorers.

<String by value>SceneExplorerManager.GetExplorerName <index>explorerIndex

Returns the name of the indexed Scene Explorer.

Possible values for the index argument are from 1 to SceneExplorerManager.GetExplorerCount()

<boolean>SceneExplorerManager.ExplorerExists <&String>explorerName

explorerName is In parameter

Returns true if a Scene Explorer with the given name already exists, false if no such Scene Explorer has been created yet.

<boolean>SceneExplorerManager.ExplorerIsOpen <&String>explorerName

explorerName is In parameter

Returns true if the Scene Explorer with the given name is open, false if it is not open.

<boolean>SceneExplorerManager.OpenExplorer <&String>explorerName

explorerName is In parameter

Opens the Scene Explorer with the given name.

Returns true on success, false otherwise.

<boolean>SceneExplorerManager.CloseExplorer <&String>explorerName

explorerName is In parameter

Closes the Scene Explorer with the given name.

Returns true on success, false otherwise.

<void>SceneExplorerManager.ClearAllExplorers()

Clears all Scene Explorers.

<point2 by value>SceneExplorerManager.GetExplorerPosition <&String>explorerName

explorerName is In parameter

Returns the position of the named Scene Explorer as Point2 value relatively to the top left corner of the Desktop.

<boolean>SceneExplorerManager.SetExplorerPosition <&String>explorerName <point2 by value>position

explorerName is In parameter

Sets the position of the named Scene Explorer to the given Point2 value relatively to the top left corner of the Desktop.

Returns true on success, false otherwise.

<point2 by value>SceneExplorerManager.GetExplorerSize <&String>explorerName

explorerName is In parameter

Returns the size of the named Scene Explorer as Point2 value.

<boolean>SceneExplorerManager.SetExplorerSize <&String>explorerName <point2 by value>size

explorerName is In parameter

Sets the size of the named Scene Explorer to the given Point2 value.

Returns true on success, false otherwise.

<boolean>SceneExplorerManager.ConfigureExplorer <&String>explorerName <&String>configurationFile

explorerName is In parameter

configurationFile is In parameter

Configures the named Scene Explorer using the configuration file specified by the second argument.

Returns true on success, false otherwise.

<boolean>SceneExplorerManager.CreateADefaultExplorer <&String>explorerName

explorerName is In parameter

Creates a Scene Explorer with the given name using the default settings.

Returns true on success, false otherwise.

Scene Explorer Manager

<void>SceneExplorerManager.OpenManageInstancesDialog()

Opens the "Manage Scene Explorer" dialog.

<void>SceneExplorerManager.CloseManageInstancesDialog()

Closes the "Manage Scene Explorer" dialog.

<boolean>SceneExplorerManager.LoadExplorerConfiguration <&String>configurationFile

configurationFile is In parameter

Loads a previously saved Scene Explorer configuration from the specified configuration file.

Corresponds to pressing the "Load" button in the "Manage Scene Explorer" dialog and selecting the file to load.

Returns true on success, false otherwise.

<boolean>SceneExplorerManager.SaveExplorerConfiguration <&String>explorerName <&String>outputConfigurationFile

explorerName is In parameter

outputConfigurationFile is In parameter

Saves the configuration of the named Scene Explorer to the configuration file specified by the second argument.

Corresponds to pressing the "Save" button in the "Manage Scene Explorer" dialog with the named Scene Explorer selected and specifying the file to save to.

Returns true on success, false otherwise.

<boolean> SceneExplorerManager.DeleteExplorer <&String>explorerName

explorerName is In parameter

Deletes the Scene Explorer with the given name.

Corresponds to pressing the "Delete" button in the "Manage Scene Explorer" dialog with the named Scene Explorer selected.

Returns true on success, false otherwise.

<boolean>SceneExplorerManager.RenameExplorer <&String>oldExplorerName <&String>newExplorerName

oldExplorerName is In parameter

newExplorerName is In parameter

Renames the Scene Explorer with the name specified by the first argument to the name given by the second argument.

Corresponds to pressing the "Rename" button in the "Manage Scene Explorer" dialog with the named Scene Explorer selected and entering a new name.

Returns true on success, false otherwise.

Adding Custom Property Filters

<value>SceneExplorerManager.AddProperty <string>propertyName <value>getFunction <value>setFunction

Adds a new property filter to be displayed in the Scene Explorer.

The first argument is the name of the property to add.

The second argument is the function to call in order to get the value of the property.

The third argument is the function to call in order to set the value of the property.

Once defined, the new property filter will appear at the end of the Column Chooser.

<value>SceneExplorerManager.AddReadOnlyProperty <string>propertyName <value>getFunction

Adds a new read-only property filter to be displayed in the Scene Explorer.

The first argument is the property name.

The second argument is the function to call in order to get the value of the property.

Once defined, the new property filter will appear at the end of the Column Chooser.

<value>SceneExplorerManager.RemoveProperty <string>propertyName

Removes a previously added property by property name.

EXAMPLE USAGE:

--Define a getter function which returns the radius property

--if it exists or implicitly undefined when no such property

fn getRad theNode = (

if isProperty theNode "Radius" then theNode.Radius )

--Define a setter function which sets the radius property

--if it exists otherwise does nothing

fn setRad theNode theValue = (

if isProperty theNode "Radius" then theNode.Radius = theValue )

--Add a Property filter to the Scene Explorer Manager with the name

--"Radius" and the two functions as second and third argument

SceneExplorerManager.addProperty "Radius" getRad setRad

--Define a getter function which returns the class of the node

fn getClass theNode = (classof theNode)

--Add a Read-Only Property filter to the Scene Explorer Manager

--which can only get properties but cannot set them

SceneExplorerManager.addReadOnlyProperty "Class" getClass

Once evaluated, the new properties will appear at the end of the Column Chooser dialog:

Drag the new columns to a Scene Explorer to see the class of all scene nodes and the radius value of any scene node that has a .radius property:

To make these additional properties available to the Scene Explorer in future 3ds Max sessions, save the custom property filter definitions to a script file in the Scripts\Startup folder.

See also

Core Interfaces


Interface: SceneExposureControl

Interfaces > Core Interfaces > SceneExposureControl

This is a Core Interface providing access to the Scene Exposure Control.

Properties

SceneExposureControl.exposureControl : maxObject : Read|Write|Validated by Validator function

Get/Set the Exposure Control for the scene. Returns undefined if there is no plug-in registered.

See also

Automatic_Exposure_Control : MAXObject

Linear_Exposure_Control : ToneOperator

Logarithmic_Exposure_Control : ToneOperator

Pseudo_Color_Exposure_Control : ToneOperator

mr_Photographic_Exposure_Control : ToneOperator


Interface: SceneRadiosity

Interfaces > Core Interfaces > SceneRadiosity

This is a Core Interface providing access to the Advanced Lighting.panel in 3ds Max 5 and higher / Radiosity panel in Autodesk VIZ 4. It lets the user assign a new radiosity plug-in and open/close/minimize the panel.

Properties

SceneRadiosity.radiosity : maxObject : Read|Write|Validated by Validator function

Get/Set the radiosity plug-in. Returns undefined if there is no plug-in registered.

Methods

<void>SceneRadiosity.showPanel()

Opens the radiosity panel.

NOTE:

The radiosity panel is disabled from MAXScript when there are no radiosity plug-ins registered. In this case the SceneRadiosity.showPanel() function published method doesn't do anything.

<void>SceneRadiosity.closePanel()

Close the radiosity panel.

<void>SceneRadiosity.minimizePanel()

Minimize the radiosity panel.

See also

Light_Tracer : RadiosityEffect

Radiosity : RadiosityEffect

Interface: INodeGIProperties


Interface: sceneStateMgr

Interfaces > Core Interfaces > sceneStateMgr

This Interface provides access to the Scene State Manager feature in 3ds Max 8 and higher.

Interface: sceneStateMgr

Methods:

<integer>GetCount()

Returns the number of scene states.

<string>GetSceneState <index>index

Returns the name of the indexed scene state.

<index>FindSceneState <string>name

Returns the index of the named scene state.

<bool>Capture <string>name <bitArray by value>parts

Creates a scene state with the given name and the supplied array of parts. Returns true on success, false otherwise.

<bool>Restore <string>name <bitArray by value>parts

Restores the scene state with the given name using the supplied array of parts. Returns true on success, false otherwise.

<bool>Delete <string>name

Deletes the scene state with the given name. Returns true on success, false otherwise.

<bool>Rename <string>oldname <string>newname

Renames the scene state with the given old name to the new name. Returns true on success, false otherwise.

<bitArray by value>GetParts <string>name

Returns a bitarray containing the parts in the scene state with the given name. Returns true on success, false otherwise.

<integer>PartsCount()

Returns the number of parts as integer.

<index>MapPartToIndex <string>part

Returns the index of the supplied part name string.

<string>MapIndexToPart <index>index

Returns the name string of the indexed part.

<bool>CaptureAllParts <string>name

Captures all parts to a state with the given name. Returns true on success, false otherwise.

<bool>RestoreAllParts <string>name

Restores all parts to the given state. Returns true on success, false otherwise.

See also

Other Interfaces


Interface: SchematicViews

Interfaces > Core Interfaces > SchematicViews

The SchematicViews Interface provides access to properties and methods of the new Schematic View system in 3ds Max 6 and higher.

Properties:

SchematicViews.current : Interface : Read

Returns a SchematicView MixinInterface which gives access to properties and methods of the current Schematic View.

Methods:

<Interface>SchematicViews.getView <fpvalue>name_or_index

Returns a SchematicView MixinInterface to the named or indexed Schematic View.

<integer>SchematicViews.numViews()

Returns the number of existing Schematic Views.

<bool>SchematicViews.open <fpvalue>name_or_index

Opens the named or indexed Schematic View. If the name does not exist yet, opens a new Schematic View with the given name.

<bool>SchematicViews.close <fpvalue>name_or_index

Closes the named or indexed Schematic View. Returns True on success.

<bool>SchematicViews.delete <fpvalue>name_or_index

Deletes the named or indexed Schematic View. Returns True on success.

<bool>SchematicViews.isOpen <fpvalue>name_or_index

Returns True if the Schematic View specified by name or index is open.

<bool>SchematicViews.isCurrent <fpvalue>name_or_index

Returns True if the Schematic View specified by name or index is the current one.

<bool>SchematicViews.setCurrent <fpvalue>name_or_index

Makes the Schematic View specified by name or index the current one. Returns True on success.

<bool>SchematicViews.openLastView()

Opens the last Schematic View. Returns True on success.

See also

Interface: SchematicView


Interface: simpleFaceManager

Interfaces > Core Interfaces > simpleFaceManager

This Core Interface provides basic Per-Face data storage abilities. Available in 3ds Max 9 and higher.

Methods:

<Interface>simpleFaceManager.addChannel <object>object type:<enum> id:<DWORD array> name:<string>

object Validated by Validator function

type enums: {#integer|#index|#float|#boolean|#point2|#point3}

type default value: #integer

id default value: #()

id Validated by Validator function

name default value: undefined

Adds a new per-face data channel to the specified object of the given type using a user-defined ID and name.

The ID can be generated using the genClassID() method and has the same form as the class IDs of scripted plug-ins.

FOR EXAMPLE

obj = Plane length:60.0 width:60.0 widthsegs: 1 lengthsegs: 2

convertto obj Editable_Poly

idA = genClassID returnValue:true

channelA = simpleFaceManager.AddChannel obj type: #integer id:idA

channelA.name = "The Integer Channel"

channelA.SetValues #(5,2)

idB = genClassID returnValue:true

channelB = simpleFaceManager.AddChannel obj type: #float id:idB

channelB.name = "The Float Channel"

channelB.SetValues #(3.1459,7.236)

<void>simpleFaceManager.removeChannel <object>object <DWORD array>id

id Validated by Validator function

Removes the channel with the specified ID from the given object.

<Interface>simpleFaceManager.getChannel <object>object <DWORD array>id

object Validated by Validator function

id Validated by Validator function

Returns the simpleFaceChannel MixinInterface of the channel with the specified ID from the given object.

FOR EXAMPLE

--continuing from the previous example on this page:

theInt = simpleFaceManager.getChannel obj idA

<Interface by value array>simpleFaceManager.getChannels <object>object

object Validated by Validator function

Returns an array of simpleFaceChannel MixinInterface of all channels in the given object.

FOR EXAMPLE

--continuing from the previous example on this page:

SimpleFaceManager.getChannels obj

#(<MixinInterface:simpleFaceChannel>, <MixinInterface:simpleFaceChannel>)

Interface: simpleFaceChannel

This MixinInterface is exposed by the SimpleFaceData class and provides access to the Per-Face data in a specific channel. Available in 3ds Max 9 and higher.

Properties:

.name : string : Read|Write

Get/set the name of the data channel.

.id : DWORD by value array : Read

Get the unique ID of the channel.

.type : enum : Read

type enums: {#integer|#index|#float|#boolean|#point2|#point3}

Get the type of the data stored in the channel.

.numFaces : DWORD : Read

Get the number of faces or polygons in the channel.

FOR EXAMPLE

--continuing from the previous example on this page:

theInt = simpleFaceManager.getChannel obj idA

<MixinInterface:simpleFaceChannel>

theInt.name

"The Integer Channel"

theInt.type

#integer

theInt.numfaces

2

Methods:

<fpvalue by value>getValue <index>face

face Validated by Validator function

Get the value of the indexed face.

FOR EXAMPLE

--continuing from the previous example:

theInt.getValue 1

5

theInt.getValue 2

2

theInt.getValue 3

-- Runtime error: Invalid face index.

<boolean>setValue <index>face <value>value

face Validated by Validator function

value Validated by Validator function

Set the value of the indexed face.

FOR EXAMPLE

--continuing from the previous example:

theInt.setValue 1 6

true

<fpvalue by value>getValues()

Get all the values of the channel.

FOR EXAMPLE

--continuing from the previous example:

theInt.getValues()

#(6, 2)

<boolean>setValues <value>values

values Validated by Validator function

Set all the values of the channel to the values in the specified array.

FOR EXAMPLE

--continuing from the previous example:

theInt.setValues #(10,12)

true

theInt.getValues()

#(10, 12)

<fpvalue by value>getValueBySelection <bitArray>faces

faces Validated by Validator function

Get the values of the faces specified by the set bits of the bitArray argument. If all specified faces contain the same value, that value will be returned. If the specified faces contain different values, the return value will be undefined.

FOR EXAMPLE

--continuing from the previous example:

theInt.getValueBySelection #{1}

10

theInt.getValueBySelection #{1..2}

undefined

<boolean>setValueBySelection <bitArray>faces <value>value

faces Validated by Validator function

value Validated by Validator function

Set the value of all faces specified by the set bits of the bitArray argument to the same value specified in the second argument.

FOR EXAMPLE

--continuing from the previous example:

theInt.setValueBySelection #{1..2} 42

true

theInt.getValues()

#(42, 42)

theInt.getValueBySelection #{1..2} --now we can the value of both faces!

42

The Per-Face data will survive topology changes and class conversions. For example, if you would convert the plane from the above example to Editable Mesh, the channels will be preserved and each of the four faces in the new mesh will inherit the data from the respective polygons in the Editable Poly:

FOR EXAMPLE

convertToMesh obj

$Editable_Mesh:Plane01 @ [0.000000,0.000000,0.000000]

SimpleFaceManager.getChannels obj --check that all channels are still there

#(<MixinInterface:simpleFaceChannel>, <MixinInterface:simpleFaceChannel>)

theInt=(SimpleFaceManager.getChannels obj)[1] --get the first one

<MixinInterface:simpleFaceChannel>

theInt.numfaces --check the number of faces - now we have 4 triangles

4

theInt.getValues() --see that the original values were propagated

#(42, 42, 42, 42)

convertTo obj Editable_Poly --convert back to Editable Poly

$Editable_Poly:Plane01 @ [0.000000,0.000000,0.000000]

theInt.numfaces --the data has been consolidated

2

When converting from Editable Mesh to Editable Poly, multiple triangles with different per-face data could be consolidated into a single polygonal face. In this case, the LAST value of a face added to the polygon will be used.

FOR EXAMPLE

convertToMesh obj

$Editable_Mesh:Plane01 @ [0.000000,0.000000,0.000000]

theInt.numfaces --check the number of faces - now we have 4 triangles

4

theInt.setValues #(1,2,3,4) --set different values for the 4 triangles

true

convertTo obj Editable_Poly --convert to Editable Poly

$Editable_Poly:Plane01 @ [0.000000,0.000000,0.000000]

theInt.getValues() --get the consolidated data - it is #(2,4) and not #(1,3)

#(2,4)

When changing topology by tessellating existing faces, the new faces will inherit the values of the original face.

FOR EXAMPLE

polyop.tessellateByFace obj 1 --tessellate the first face into 4 new faces

OK

theInt.numfaces --check the total number of faces in the data channel

5

--note that because of the way Editable Poly updates polygon lists when

--changing topology, the previous face 2 becomes face 1,

--while the new 4 polygons from the tessellation have been given

--indices 2,3,4 and 5.

theInt.getValues() --get the new data:

#(4, 2, 2, 2, 2)


Interface: SkinUtils

Interfaces > Core Interfaces > SkinUtils

This Core Interface provides access to some Skin-related methods available in 3dsmax 6 and higher.

Methods:

<void>skinUtils.ExtractSkinData <node>node

Extracts the skin data from the specified node.

<void>skinUtils.ImportSkinData <node>targetNode <node>sourceNode

Transfers the skin data from the specified source node to the specified target node.

<matrix3 by value>skinUtils.GetBoneBindTM <node>skinNode <node>boneNode

Transfers the skin data from the specified source node to the specified target node.

<void>skinUtils.SetBoneBindTM <node>skinNode <node>boneNode <matrix3 by value>tm

Sets the Bone bind transformation for the specified skin and bone nodes to the supplied matrix3 value.

<matrix3 by value>skinUtils.GetMeshBindTM <node>skinNode

Returns the Mesh bind transformation of the specified skin node as a matrix3 value.

<void>skinUtils.SetMeshBindTM <node>skinNode <matrix3 by value>tm

Sets the Mesh bind transformation for the specified skin node to the supplied matrix3 value.

<matrix3 by value>skinUtils.GetBoneStretchTM <node>skinNode <node>boneNode

Returns the Bone bind transformation of the specified skin and bone nodes as a matrix3 value.

<void>skinUtils.SetBoneStretchTM <node>skinNode <node>boneNode <matrix3 by value>tm

Sets the Bone stretch transformation for the specified skin and bone nodes to the supplied matrix3 value.

<void>skinUtils.GrowSelection <node>node

Grows the existing selection.

<void>skinUtils.ShrinkSelection <node>node

Shrinks the existing selection.

<void>skinUtils.LoopSelection <node>node

Selects a loop based on the existing selection.

<void>skinUtils.RingSelection <node>node

Selects a ring based on the existing selection.

The following macroScripts implement the above functions as ActionItems. You can copy them into a new script, evaluate and customize your QuadMenus to have instant access to Skin Selection Grow, Shrink, Loop and Ring functions:

SCRIPTS

macroScript GrowSkinSel category:"SkinUtils"
(
on isVisible return

selection.count == 1 and classof (modPanel.getCurrentObject()) == Skin
on execute do skinUtils.GrowSelection $
)

macroScript ShrinkSkinSel category:"SkinUtils"
(
on isVisible return

selection.count == 1 and classof (modPanel.getCurrentObject()) == Skin
on execute do skinUtils.ShrinkSelection $
)

macroScript LoopSkinSel category:"SkinUtils"
(
on isVisible return

selection.count == 1 and classof (modPanel.getCurrentObject()) == Skin
on execute do skinUtils.LoopSelection $
)

macroScript RingSkinSel category:"SkinUtils"
(
on isVisible return

selection.count == 1 and classof (modPanel.getCurrentObject()) == Skin
on execute do skinUtils.RingSelection $
)

<void>skinUtils.ImportSkinDataNoDialog <boolean>matchByName <boolean>removeTargetPrefix <boolean>removeTargetSuffix <boolean>removeSourcePrefix <boolean>removeSourceSuffix <float>threshold <integer>interpolationType

Imports Skin data without displaying the dialog. Available in 3ds Max 8 and higher.

Just like in the Skin Utilities plugin in the UI, the source and the target objects should be selected.

If the matchByName parameter is set to true, the bones will be matched by name (equivalent to pressing the Match By Name button in the dialog). If false, the bones will be matched by index.

Arguments 2 to 5 correspond to the states of the Remove Prefix and Suffix checkboxes in the dialog.

The threshold argument corresponds to the Threshold value in the dialog. This is the nearest neighbor threshold.

The last argument corresponds to the selection of the Interpolation Type drop down list. Possible values are:

0 - Match By Vertex

1 - Match By Face

See also

Skin : Modifier

Interface: SkinPose

Bulge_Angle_Deformer : ReferenceTarget

Joint_Angle_Deformer : ReferenceTarget

Morph_Angle_Deformer : ReferenceTarget

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Interface: StatusPanel

Interfaces > Core Interfaces > StatusPanel

This Interface provides control over the visibility of the Status Panel. The Status Panel is the area at the bottom of the 3ds Max UI containing the Mini Listener, system prompt, selection lock, X,Y,Z values, time controls, keying and viewport navigation controls will be visible.

Interface: statusPanel

Properties:

StatusPanel.visible : boolean : Read|Write

Get/Set the visible state of the Status Panel. When set to true, the Status Panel will be visible. When set to false, the panel will be hidden.

Using the statusPanel interface’s .visible property together with the trackbar and time slider visibility controls, you can achieve a Super-Expert mode with just the viewports and the main menu displayed:

EXAMPLE

macroScript SuperExpertMode category:"MXS Help Examples"

(

--get the inverse of the curren visibility state of the time slider:

state = not(timeslider.isVisible())

--set the trackbar visiblity to the new value:

trackbar.visible = state

--set the time slider visiblity to the new value:

timeSlider.setVisible state

--if true, exit the expert mode, if false, engage it:

if state then cui.expertModeOff() else cui.expertModeOn()

--finally, set the status panel visibility:

statusPanel.visible = state

)

See also

Status Bar

Prompt Line

Coordinate Display

Progress Bar Display

Status Bar Buttons


Interface: SteeringWheelsOps

NEW in 3ds Max 2009: The SteeringWheelsOps Interface exposes the Steering Wheels viewport navigation feature's settings to MAXScript.

Interfaces > Core Interfaces > SteeringWheelsOps

Roll over and click a group of controls to jump to relevant properties:

Properties:

Display Options

SteeringWheelsOps.LargeWheelSize : integer : Read|Write

Get/set the Big Wheels Size value.

Values are in the range from 1 (Small) to 256 (Extra). Normal is 128.

SteeringWheelsOps.LargeWheelOpacityFactor : double : Read|Write

Get/set the Big Wheels Opacity value.

Values are in the range from 0.5d (25%) to 3.0d (100%).

1.0d corresponds to 50%.

2.0d corresponds to 75%.

SteeringWheelsOps.MiniWheelSize : integer : Read|Write

Get/set the Mini Wheels Size value.

Values are in the range from 1 (Small) to 256 (Extra).

64 corresponds to Normal.

128 corresponds to Large.

SteeringWheelsOps.MiniWheelOpacityFactor : double : Read|Write

Get/set the Mini Wheels Opacity value.

Values are in the range from 0.5d (25%) to 3.0d (100%).

1.0d corresponds to 50%.

2.0d corresponds to 75%.

SteeringWheelsOps.ShowHUDMessages : bool : Read|Write

Get/set the state of the "Show Tool Messages (Always ON for Basic Wheels)" checkbox.

SteeringWheelsOps.ShowToolTips : bool : Read|Write

Get/set the state of the "Show Tool Tips" checkbox.

SteeringWheelsOps.AlwaysShowWelcome : bool : Read|Write

Get/set the state of the "Always Show the Pinned Wheel on Start" checkbox.

SteeringWheelsOps.HaveShownWelcome : bool : Read|Write

Get/set whether the Welcome screen has been shown already.

Look Tool

SteeringWheelsOps.InvertVerticalAxis : bool : Read|Write

Get/set the state of the "Invert Vertical Axis" checkbox.

Walk Tool

SteeringWheelsOps.ConstrainWalk : bool : Read|Write

Get/set the state of the "Constrain Walk Movement Angle to Ground Plane"

SteeringWheelsOps.SpeedFactor : double : Read|Write

Get/set the Walk Tool's "Speed Factor" value.

Zoom Tool

SteeringWheelsOps.IncrementalZoom : bool : Read|Write

Get/set the state of the "Incremental Zoom-in" checkbox.

Orbit Tool

SteeringWheelsOps.PreserveSceneUp : bool : Read|Write

Get/set the state of the "Keep Scene Upright" checkbox. It controls whether to use the world Z axis as an up vector when orbiting using the Steering Wheel controls.

SteeringWheelsOps.SelectionSensitivity : bool : Read|Write

Get/set the state of the "Selection Sensitivity" checkbox.

Active

SteeringWheelsOps.IsActive : bool : Read|Write

Get/set the Steering Wheel active state. When set to true, the Steering Wheel will be displayed in the viewports. When set to false, the Steering Wheel will be disabled.

Methods:

<void>SteeringWheelsOps.StartSteeringWheelMode()

Calling this method enables the Steering Wheel mode.

<void>SteeringWheelsOps.StopSteeringWheelMode()

Calling this method disables the Steering Wheel mode.

<void>SteeringWheelsOps.MiniViewObjectWheel()

Calling this method switches the Mini Wheel to View Object mode.

<void>SteeringWheelsOps.MiniTourBuildingWheel()

Calling this method switches the Mini Wheel to Tour Building mode.

<void>SteeringWheelsOps.MiniFullNavWheel()

Calling this method switches the Mini Wheel to Full Navigation mode.

<void>SteeringWheelsOps.FullNavWheel()

Calling this method switches the Large Wheel to Full Navigation mode.

<void>SteeringWheelsOps.ViewObjectWheel()

Calling this method switches the Large Wheel to View Object mode.

<void>SteeringWheelsOps.TourBuildingWheel()

Calling this method switches the Large Wheel to Tour Building mode.

<void>SteeringWheelsOps.IncreaseWalkSpeed()

Calling this method increases the walk speed.

<void>SteeringWheelsOps.DecreaseWalkSpeed()

Calling this method decreases the walk speed.

<void>SteeringWheelsOps.RestoreCenter()

Calling this method restores the location of the Center.

<void>SteeringWheelsOps.SaveOptions()

Calling this method saves the Steering Wheels options.

<void>SteeringWheelsOps.ClearRewindHistory()

Calling this method clears the Rewind History.


Interface: styleMgr

Interfaces > Core Interfaces > styleMgr

Properties:

styleMgr.numInstances : integer : Read

Returns the number of instances as integer.

styleMgr.numCategories : integer : Read

Returns the number of categories as integer.

Methods:

<Interface>styleMgr.GetStyle <String >categName <String >styleName

categName is In parameter

styleName is In parameter

Returns an ADT_Style MixinInterface by the given category and name, both passed by reference.

<Interface>styleMgr.IsInstance <node>node

Returns an ADT_Style MixinInterface

<node>styleMgr.GetInstanceTop <node>node

Returns the top instance node of the given node

<integer>styleMgr.GetCategories <&Interface array>categories

categories is In parameter


Interface: SubstManager

Interfaces > Core Interfaces > SubstManager

For Internal use only.

Properties:

No properties or methods exposed.


Interface: timeSlider

Interfaces > Core Interfaces > timeSlider

The timeSlider Core Interface provides MAXScript access for the time slider display.

Methods:

<void>timeSlider.setVisible <boolean>visible

This method allows you to set the visibility flags of the time slider. This Setting is sticky across sessions and will be stored in the .ini file.

<boolean>visible: True to set the time slider visible, otherwise false.

<boolean>timeSlider.isVisible()

This method returns true if the time slider is visible, otherwise false.

See also Class ItimeSlider, in the SDK Help file accompanying this product.


Interface: tmGizmos

Interfaces > Core Interfaces > tmGizmos

The tmGizmos Core Interface provides access to the properties of the new Transform Gizmo introduced in 3ds Max 5.

Interface: tmGizmos

Properties:

tmGizmos.useGizmo : boolean : Read|Write

Check whether the gizmo is enabled / Enable the gizmo.

tmGizmos.size : integer : Read|Write

Get/Set the size of the gizmo

tmGizmos.useLabels : boolean : Read|Write

Get/Set the labels visibility.

tmGizmos.planeOpacity : float : Read|Write

Get/set the opacity value of the gizmo plane.

NOTE:

This is an advanced property accessible only though MAXScript.

tmGizmos.useCenterBox : boolean : Read|Write

Check whether the center box is enabled / Enable the center box.

NOTE:

This is an advanced property accessible only though MAXScript.

tmGizmos.usePlanes : boolean : Read|Write

Check whether planes are enabled / Enable the planes.

tmGizmos.movePlaneHandleSize : float : Read|Write

Get/set the plane handles’ size

tmGizmos.movePlaneHandleOffset : float : Read|Write

Get/set the plane handles’ offset

tmGizmos.centerBoxType : enum : Read|Write

centerBoxType enums: {#screen|#activeGrid}

Get/Set the type of the center box.

tmGizmos.freeRotate : boolean : Read|Write

Check whether free rotation mode is enabled / Enable free rotation mode.

tmGizmos.screenHandle : boolean : Read|Write

Check whether the screen handle is enabled / Enable the screen handle.

tmGizmos.uniformPlaneScaling : boolean : Read|Write

Check whether the uniform plane scaling mode is enabled / Enable the uniform plane scaling mode.

tmGizmos.uniformScaleHandleSize : float : Read|Write

Get/Set the size of the uniform scale handle

tmGizmos.scalePlaneHandleSize : float : Read|Write

Get/Set the size of the scale plane handle

tmGizmos.rotationMode : integer : Read|Write

Get/Set the rotation gizmo’s mode.

0 - "Linear Roll" mode - move the mouse along the tangents

1 - "Circular crank" mode - move the mouse around the center of the gizmo

2 - "Legacy R4" mode - old-style rotation

tmGizmos.showMiniTripod : boolean : Read|Write

Get/Set the visibility of the rotations gizmo’s mini-tripod. When set to true, a tripod will be displayed as axis reference.

tmGizmos.showPieSlice : boolean : Read|Write

Get/Set the visibility of the rotations gizmo’s pie-slice. When set to true, a pie-slice will be displayed as angle reference.

tmGizmos.showAngleData : boolean : Read|Write

Get/Set the visibility of the rotations gizmo’s angle value display. When set to true, a Point3 value will be displayed as angle reference above the gizmo.

tmGizmos.rotationPlanarThreshold : float : Read|Write

Get/Set the rotation planar threshold value.

tmGizmos.dragX : float : Read|Write

Get/Set the screen X coordinate of the rotation gizmo’s mouse click&drag position.

NOTE:

This property has been exposed for internal use only.

tmGizmos.dragY : float : Read|Write

Get/Set the screen Y coordinate of the rotation gizmo’s mouse click&drag position.

NOTE:

This property has been exposed for internal use only.

tmGizmos.vecX : float : Read|Write

Get/Set the X component of the rotation gizmo’s drag vector.

NOTE:

This property has been exposed for internal use only.

tmGizmos.vecY : float : Read|Write

Get/Set the Y component of the rotation gizmo’s drag vector.

NOTE:

This property has been exposed for internal use only.

The following properties have been exposed to MAXScript in 3ds Max 5.1:

tmGizmos.ShowMultipleTransformGizmos : boolean : Read|Write

Toggle Multiple Transform Gizmos display on/off. When set to true and in Use Pivot Point Center mode, multiple gizmos, one per object, will be displayed. When set to false, only one gizmo for all objects will be displayed. Corresponds to the Allow multiple gizmos checkbox under Customize>Preferences>Gizmos>Transform Gizmos.

tmGizmos.moveGizmoRelativeSize : float : Read|Write

Get/Set the Move gizmo’s relative size

tmGizmos.rotateGizmoRelativeSize : float : Read|Write

Get/Set the Rotate gizmo’s relative size

tmGizmos.scaleGizmoRelativeSize : float : Read|Write

Get/Set the Scale gizmo’s relative size

tmGizmos.intersectMode : boolean : Read|Write

Toggle Intersect Mode on/off. When set to true, Move and Rotate transformations will use Intersection mode. When set to false, Projection mode will be used. Corresponds to the radio buttons under Customize>Preferences>Gizmos>Move/Rotate Transforms.

tmGizmos.perpsectiveSensitivity : float : Read|Write

Get/Set the Perspective Sensitivity value. Corresponds to the Pers.Sens. value under Customize>Preferences>Gizmos>Move/Rotate Transforms

tmGizmos.rotationIncrement : float : Read|Write

Get/Set the Rotation Increment value. Corresponds to the Rotation Increment value under Customize>Preferences>Gizmos>Move/Rotate Transforms

tmGizmos.arcRotateSnapAngle : float : Read|Write

Get/Set the Arc Rotate Snap Angle value. Corresponds to the Viewport Arc Rotate Snap Angle value under Customize>Preferences>Gizmos>Move/Rotate Transforms


Interface: TrackSelectionSets

Interfaces > Core Interfaces > TrackSelectionSets

The TrackSelectionSets Core Interface provides access to the new Track Selection Sets functionality.

Properties:

TrackSelectionSets.count : integer : Read

Get the number of track selection sets.

Methods:

<boolean>TrackSelectionSets.create <string>name <maxObject by value array>tracks trackNames:<string by value array>

trackNames default value: #()

Creates a new track selection set with the given name out of the supplied tracks. Returns true on success.

EXAMPLE

trackSelectionSets.create "My Objects" #($Teapot01[4]) trackNames:#("My Teapot")

true

<boolean>TrackSelectionSets.delete <string>name

Deletes the named track selection set. Returns true on success.

EXAMPLE

trackSelectionSets.count

1

trackSelectionSets.delete "My Objects"

true

trackSelectionSets.count

0

<string>TrackSelectionSets.getName <index>index

Returns the name of the indexed track selection set.

EXAMPLE

trackSelectionSets.create "My Objects" #($Teapot01[4]) trackNames:#("My Teapot")

true

trackSelectionSets.count

1

trackSelectionSets.getName 1

"My Objects"

<void>TrackSelectionSets.setName <index>index <string>name

Sets a new name in the named track selection set.

EXAMPLE

trackSelectionSets.getName 1

"My Objects"

trackSelectionSets.setName 1 "Some New Name"

OK

trackSelectionSets.getName 1

"Some New Name"

<string>TrackSelectionSets.getCurrent <Interface>trackview

Returns the current track selection set in the supplied trackview.

<maxObject by value array>TrackSelectionSets.getTracks <string>name <&maxObject array>tracks trackNames:<&string array>

tracks is Out parameter

trackNames default value: #()

trackNames is Out parameter

Returns the tracks in the named track selection set.

EXAMPLE

--call the method to get the tracks passing variable names by reference

trackSelectionSets.getTracks "My Objects" &my_tracks trackNames:&my_names

OK

--check the by-reference variables for the return array values

my_tracks

#(Teapot)

my_names

#("My Teapot")

<boolean>TrackSelectionSets.add <string>name <maxObject by value array>tracks trackNames:<string by value array>

trackNames default value: #()

Adds the specified objects to the named track selection set. Returns true on success.

<boolean>TrackSelectionSets.remove <string>name <maxObject by value array>tracks

Removes the specified objects from the named track selection set. Returns true on success.

See also

Interface: trackviews


Interface: trackviews

Interfaces > Core Interfaces > trackviews

The trackviews Core Interface gives access to the Trackview.

It also provides control over the enhanced features of the new Function Curve / Dope Sheet editors introduced in 3ds Max 5.

Properties

trackviews.currentTrackView : Interface : Read

Returns a TrackView [ Mixin Interface ]to the current track view, or undefined when no current track view exists.

trackviews.current : Interface : Read

Returns a TrackView [ Mixin Interface ] to the current track view, or undefined when no current track view exists. Alias for .currentTrackView

See separate description of the TrackView interface later on this page

FOR EXAMPLE:

trackviews.currentTrackView

<MixinInterface:TrackView>

trackviews.lastUsedTrackViewName : string : Read

Returns the name of the last used track view as string

Methods

<Interface>trackviews.getTrackView <fpvalue>name or index

This method will get a TrackView [ Mixin Interface ] based on the trackview's index or name.

<Interface by value array>trackviews.getAllOpenTrackViews()

Returns an array of the TrackView [ Mixin Interfaces ] of all open trackviews.

<integer>trackviews.numTrackViews()

Returns the number of trackviews.

<boolean>trackviews.open <fpvalue>name or index [layoutName:<string>] [pos:<point2>] [width:<integer>] [height:<integer>] [dock:<enum>]

layoutName default value: ""

pos default value: [-1,-1]

width default value: -1

height default value: -1

dock enums: {#float|#top|#bottom|#canDockOnTop}

dock default value: #float

Open a trackview based on it's index or name.

If you supply a height and width argument, it only has effect the first time the track view is opened. After that the user defined size takes effect. This makes it possible to specify a size when scripting the opening of track view, but still allows users to change the size and have the new size remembered.

FOR EXAMPLE:

trackviews.open "name" layoutName:"layout name" pos:[6,100] width:800 height:400

<boolean>trackviews.close <fpvalue>name or index

Close a trackview based on it's index or name.

<void>trackviews.delete <fpvalue>name or index

Delete a trackview based on it's index or name.

<string>trackviews.getTrackViewName <index>index

Returns the name of the trackview window based on the index.

<boolean>trackviews.zoomSelected <string>name

Zooms to the selected object's track

<boolean>trackviews.zoomOn <string>name <maxObject>object <index>subNum

Returns True if successful and false otherwise.

<boolean>trackviews.setFilter <string>TrackviewName <name>filterName

Set the specified filter for the specified Trackview by name. Returns true if successful and false otherwise.

Possible filter names are:

#all -- set or clear all flags

#default -- set default view flags

#selectedObjects

#selectedTracks

#animatedTracks

#spacewarpBindings

#modifiedObjects

#transforms

#baseObjects

#positionX

#positionY

#positionZ

#positionW

#rotationX

#rotationY

#rotationZ

#scaleX

#scaleY

#scaleZ

#red

#green

#blue

#alpha

#controllerTypes

#noteTracks

#sound

#materialsMaps

#materialParameters

#visibilityTracks

#hideGeometry

#hideShapes

#hideLights

#hideCameras

#hideHelpers

#hideSpacewarps

#visibleObjects

#position

#rotation

#scale

#curveX

#curveY

#curveZ

#curveW

#staticValues

#hierarchy

#objects

#boneobjects

#keyableTracks

FOR EXAMPLE:

trackviews.current.setFilter #keyableTracks

When the #keyableTracks filter is turned on, only keyframe controllers will be displayed in track view. All other controllers will be skipped and not displayed.

This filter is off by default.

<boolean>trackviews.clearFilter <string>TrackviewName <name>filterName

Clears the specified filter from the named Trackview. Returns true if successful and false otherwise. filterName can be the one of the names listed as possible arguments of setFilter .

<fpvalue>trackviews.pickTrackDlg()

pickTrackDlg has variable number of arguments. This method brings up the Track View Pick dialog and returns a TrackViewPick value when the user selects a track and clicks "Ok", or undefined if the user clicks "Cancel". If the optional argument #multiple is passed, multiple tracks can be picked in the dialog and an array of TrackViewPick values is returned instead of single value.

<boolean>exists <fpvalue>name or index

Returns a boolean value indicating if the specified trackview exists or not. Available in 3ds Max 8 and higher.

<boolean>trackviews.isOpen <fpvalue>name or index

Returns a boolean value indicating if the specified trackview is open.

If the argument does not point at a valid trackview, a Runtime error will be thrown. To avoid this, you should first use the trackviews.exists() to make sure the requested Track View is valid.

FOR EXAMPLE:

trackviews.isopen "something"

-- Runtime error: No trackview was found with by that name

trackviews.isopen 99999

-- Runtime error: No trackview was found with that index

trackviews.iscurrent 99999

-- Runtime error: No trackview was found with that index

trackviews.exists "something"

false

trackviews.exists 1

false

trackviews.exists 0

false

trackviews.open "something" -- create a Track View

true

trackviews.exists "something"

true

trackviews.exists 1

true

<boolean>trackviews.openLastUsedTrackView()

Opens the current trackview if it has been closed.

<boolean>trackviews.isCurrent <fpvalue>name or index

Returns a boolean value indicating if the trackview is the last one used or not.

<boolean>trackviews.setCurrent <fpvalue>name or index

Sets the specified trackview to be the current one. Returns true if successful.

Mixin Interface: (trackviews.current)

Interface: TrackView

The TrackView [ Mixin Interface ] provides access to the features of the TrackView dialog. It is returned by the .current property of the trackviews Core Interface, as well as by several methods described earlier on this page.

Properties:

.ui : Interface : Read

Returns a ui [ Mixin Interface ] exposing features of the User Interface of the specified TrackView.

EXAMPLE:

trackviews.currentTrackView.ui

<MixinInterface:ui>

.modifySubTree : boolean : Read|Write

Get/Set the Modify SubTree state. When true, changes affect the children.

.modifyChildren : boolean : Read|Write

Alias for .modifySubTree

EXAMPLE:

trackviews.current.modifyChildren = true

.interactiveUpdate : boolean : Read|Write

Get/Set the Interactive Update state. When set to true, the viewports redraw interactively while keys are moved in the TrackView. If set to false, updates are suspended until mouse up.

EXAMPLE:

trackviews.current.interactiveUpdate = true

.syncTime : boolean : Read|Write

Get/Set the Synchronize Time mode. When set to true, the current frame is synchronized to the value at the mouse location during click and drag for most types of mouse operations, like moving keys, adding keys, selecting time, scaling time, scaling keys, inserting time, and drawing curves. Adjusting tangent handles does not sync to the frame of the handle. This mode also aids with drawing curves by giving visual feedback of what is being drawn.

EXAMPLE:

trackviews.current.syncTime = true

.freezeSelKeys : boolean : Read|Write

Get/Set freezing of selected keys.

.freezeNonSelCurves : boolean : Read|Write

Get/Set freezing of non-selected curves.

.showNonSelCurves : boolean : Read|Write

Get/Set visibility of non-selected curves.

.showTangents : enum : Read|Write

showTangents enums: { #none | #selected | #all }

Get/Set visibility of the specified tangent types.

EXAMPLE:

trackviews.current.showTangents = #none --hide all

trackviews.current.showTangents = #selected --show selected only

trackviews.current.showTangents = #all --show all

.showFrozenKeys : boolean : Read|Write

Get/Set visibility of frozen keys.

.useSoftSelect : boolean : Read|Write

Get/Set keys soft selection usage.

.softSelectRange : time : Read|Write

Get/Set keys soft selection range.

.softSelectFalloff : float : Read|Write

Get/Set keys soft selection falloff.

.autoExpandSelectedOnly : boolean : Read|Write

Get/Set the auto-expand tracks of selected objects mode

.autoExpandChildren : boolean : Read|Write

Get/Set the auto-expand children mode

.autoExpandTransforms : boolean : Read|Write

Get/Set the auto-expand transformation tracks mode

.autoExpandObjects : boolean : Read|Write

Get/Set the auto-expand objects mode

.autoExpandModifiers : boolean : Read|Write

Get/Set the auto-expand modifiers mode

.autoExpandMaterials : boolean : Read|Write

Get/Set the auto-expand materials mode

.autoExpandXYZ : boolean : Read|Write

Get/Set the auto-expand X,Y,Z sub-tracks mode

.autoSelectAnimated : boolean : Read|Write

Get/Set the auto-select animated tracks mode

.autoSelectPosition : boolean : Read|Write

Get/Set the auto-select position tracks mode

.autoSelectRotation : boolean : Read|Write

Get/Set the auto-select rotation tracks mode

.autoSelectScale : boolean : Read|Write

Get/Set the auto-select scale tracks mode

.autoSelectXYZ : boolean : Read|Write

Get/Set the auto-select X,Y,T sub-tracks mode

.autoScrollToRoot : boolean : Read|Write

Get/Set the auto-scroll to root mode

.autoScrollToSelected : boolean : Read|Write

Get/Set the auto-scroll to selected mode

.manualNavigation : boolean : Read|Write

Get/Set the manual navigation mode.

.rootTrack : maxObject : Read|Write

Get/Set the root track. Setting this property to a maxObject value will make the specified object the Root (World) node of the TrackView and thus limit display to tracks belonging to the new Root and its children.

.scaleValuesOrigin : float : Read|Write

Get/Set the value scaling origin. It is represented by a horizontal brown line when in Scale Values mode.

.editMode : enum : Read|Write

editMode enums: {#editKeys|#editTime|#editRanges|#positionRanges|#editFCurves}

Get/Set the Trackview edit mode.

Methods:

<string>getName()

Returns the name of the TrackView as string.

<void>setName <string>name

Sets the name of the TrackView to the specified string.

<integer>getNumTracks()

Returns the number of tracks in the TrackView.

<integer>numSelTracks()

Returns the number of selected tracks in the TrackView.

<boolean>canAssignController()

Returns true if a controller can be assigned to the current selection

<void>assignControllerDialog()

Opens the Assign Controller dialog.

<boolean>assignController <maxObject>controller

Assigns the specified controller to the currently selected tracks. Returns true on success.

<void>showControllerTypes <boolean>state

Enables/Disables the Controller Type display.

<void>expandTracks()

Expands the tracks of the Trackview.

<void>zoomSelected()

Zooms at the selected tracks.

<void>zoomOnTrack <maxObject>parent <index>subNum

Zooms at the indexed subAnim track of the specified object.

<maxObject>getTrack <index>index

Returns the indexed track.

<maxObject>getParent <index>index

Returns the parent of the indexed track.

<maxObject>getSelected <index>index

Returns the selected track of the indexed track.

<maxObject>getParentOfSelected <index>index

Returns the parent of the selected track of the indexed track.

<index>getSelectedSubNum <index>index

Returns the number of children of the selected track of the indexed track.

<index>getIndex <maxObject>object

Returns the index of the specified object.

<boolean>selectTrackByIndex <index>index <boolean>clearSelection

Selects the specified indexed track. If clearSelection is supplied as true, clears any previous selection. Returns true on success.

<boolean>selectTrack <maxObject>object <boolean>clearSelection

Selects the specified object. If clearSelection is supplied as true, clears any previous selection. Returns true on success.

<boolean>setFilter <name>FilterName

Sets the specified filter. Possible filter names are the same as for setFilter in the Interface: trackview section .

<boolean>clearFilter()

Clears the specified filter. Possible filter names are the same as for setFilter in the Interface: trackview section .

<void>setEditMode <enum>mode

mode enums: {#editKeys|#editTime|#editRanges|#positionRanges|#editFCurves}

Sets the Trackview edit mode.

<enum>getEditMode()

getEditMode enums: {#editKeys|#editTime|#editRanges|#positionRanges|#editFCurves}

Returns the Trackview edit mode.

<boolean>isCurrent()

Returns true if the Trackview is the current trackview.

<void>setCurrent()

Makes the Trackview current.

<void>openUtilityDialog()

Opens the Trackview Utility dialog.

<void>launchUtility <string>name

Launches the specified Utility.

<void>closeUtility <string>name

Closes the specified Utility.

<integer>utilityCount()

Returns the number of available Utilities.

<string>utilityName <index>index

Returns the name of the indexed Utility.

<void>setTangentType <enum>type [effect:<enum>]

type enums: {#smooth|#linear|#step|#fast|#slow|#custom|#flat}

effect enums: {#allSelKeys|#allKeys|#allKeysInSelTracks|#selKeysInSelTracks}

effect default value: #allSelKeys

Set the Tangent type of the specified keys to the specified type.

<void>setInTangentType <enum>type [effect:<enum>]

type enums: {#smooth|#linear|#step|#fast|#slow|#custom|#flat}

effect enums: {#allSelKeys|#allKeys|#allKeysInSelTracks|#selKeysInSelTracks}

effect default value: #allSelKeys

Set the InTangent type of the specified keys to the specified type.

<void>setOutTangentType <enum>type [effect:<enum>]

type enums: {#smooth|#linear|#step|#fast|#slow|#custom|#flat}

effect enums: {#allSelKeys|#allKeys|#allKeysInSelTracks|#selKeysInSelTracks}

effect default value: #allSelKeys

Set the OutTangent type of the specified keys to the specified type.

<void>restoreRootTrack()

Restore the root track.

<void>updateList()

Update the list.

Mixin Interface: (trackviews.current.ui)

Interface: ui

The ui [ Mixin Interface ] provides access to the TrackView’s User Interface settings. It is returned by the .ui property of the trackview MixinInterface.

Properties:

.hwnd : HWND : Read

.layoutName : string by value : Read

.menuBar : string by value : Read|Write

There are two customizable Quad menus in the Function Curve Editor:

.controllerQuadMenu : string by value : Read|Write

When set to an existing menu name, the controllerQuadMenu will pop up when right-clicking in the controller window.

.keyQuadMenu : string by value : Read|Write

When set to an existing menu name, the keyQuadMenu will pop up when clicking in the keys window.

EXAMPLE:

trackviews.current.ui.keyQuadMenu = "My Key Quad"

These menus get saved with the layout, so changing them and saving the layout will make them persistent. This allows the creation of different menu sets for different layouts.

.showMenuBar : bool : Read|Write

Get/set the visibility of the menu bar.

.showScrollBars : bool : Read|Write

Get/set the visibility of the scroll bars.

.showTrackWindow : bool : Read|Write

Get/set the visibility of the track window.

.showKeyWindow : bool : Read|Write

Get/set the visibility of the key window.

.showTimeRuler : bool : Read|Write

Get/set the visibility of the time ruler.

.showKeyableIcons : bool : Read|Write

When set to true, a Keyable icon will become visible next to the controllers. Clicking on the icon will toggle the keyable state which is used to determine if Set Key will set a key for the specific track. The showKeyableIcons state is saved with the Layout, so resaving the layout with the setting turned on will bring them back the next time the layout is used.

EXAMPLE:

trackviews.current.ui.showKeyableIcons = true

.showCustomIcons : bool : Read|Write

When set to true, the icons next to the tracks will be taken from the ClassIcons.dat file. This means that each object, modifier, controller plugin can have it's own unique icon.

EXAMPLE:

trackviews.current.ui.showCustomIcons = true

Methods:

<integer>toolbarCount()

Retruns the number of toolbars.

<bool>addToolbar <string>name

Adds a toolbars with the specified name.

<bool>deleteToolbar <fpvalue>name or index

Deletes a toolbars by its name or index.

<string>getToolbarName <index>index

Returns the name of the indexed toolbars.

<bool>isToolbarVisible <string>name

Returns the visibility of the named toolbar.

<void>showToolbar <string>name

Makes the named toolbar visible.

<void>hideToolbar <string>name

Hides the named toolbar.

<void>showAllToolbars()

Unhides all toolbars.

<void>hideAllToolbars()

Hides all toolbars.

<void>saveCurrentLayout()

Saves the current TrackView layout.

<void>saveLayout <string>name

Saves the TrackView layout under the specified name.

<void>loadLayout <string>name

Loads the TrackView layout with the specified name.

<integer>layoutCount()

Retruns the number of layouts.

<string>getLayoutName <index>index

Retruns the layout name of the indexed layout.

See also

Track View

Track View Pick Dialog

Interface: TrackSelectionSets


Interface: UIAccessor

Interfaces > Core Interfaces > UIAccessor

The UIAccessor Core Interface provides methods to collect data and interact with dialogs and popups in the 3ds Max User Interface. It can be used in conjunction with the Interface: DialogMonitorOPS to perform automated UI handling using a callback function.

Available in 3ds Max 9 and higher.

Methods:

<string>UIAccessor.GetWindowText <HWND>hwnd

Returns the caption of the window with the given handle.

<string>UIAccessor.GetWindowClassName <HWND>hwnd

Returns the window class name of the window with the given handle.

<integer>UIAccessor.GetWindowResourceID <HWND>hwnd

Returns the window resource ID of the window with the given handle.

<HWND by value array>UIAccessor.GetChildWindows <HWND>hwnd

Returns an array with the handles of all child windows of the window with the given handle. If a child window has child windows on its own, these will also be enumerated.

<HWND by value array>UIAccessor.GetPopupDialogs()

Returns a handles array of the pop up dialogs.

<HWND>UIAccessor.GetParentWindow <HWND>hwnd

Returns the parent window's handle of the window with the given handle.

<HWND>UIAccessor.GetFirstChildWindow <HWND>hwnd

Returns the handle of the first child of the window with the given handle.

<HWND>UIAccessor.GetPrevWindow <HWND>hwnd

Returns the handle of the previous sibling with the same parent as the window with the given handle.

<HWND>UIAccessor.GetNextWindow <HWND>hwnd

Returns the handle of the next sibling with the same parent as the window with the given handle.

<bool>UIAccessor.IsWindow <HWND>hwnd

Returns true if the UI element with the given handle is a window, false otherwise.

<string>UIAccessor.GetWindowDllFileName <HWND>hwnd

Returns the DLL file name of the window with the given handle.

<string>UIAccessor.GetWindowDllDescription <HWND>hwnd

Returns the DLL description string of the window with the given handle.

<void>UIAccessor.CloseDialog <HWND>hwnd

Closes the dialog with the given window handle.

<void>UIAccessor.PressDefaultButton()

Presses the default button in the dialog with the given handle.

<void>UIAccessor.PressButton <HWND>hwnd

Presses the button with the given handle.

<bool>UIAccessor.PressButtonByName <HWND>hwnd <string>name

Presses the button with the name equal to the second argument in the dialog with the handle given as the first argument.

<bool>UIAccessor.SetWindowText <HWND>hwnd <string>text

Sets the title text of the dialog with the given handle.

<bool>UIAccessor.SendMessageID <HWND>hwndDlg <enum>ID

ID enums: {#IDOK|#IDCANCEL|#IDABORT|#IDRETRY|#IDIGNORE|#IDYES|#IDNO|#IDCLOSE}

Sends the message ID given in the second argument to the window with the given handle.

<bool>UIAccessor.SendMessage <HWND>hwndDlg <integer>MessageID <integer>wParam <integer>lParam

Sends the integer message ID, wParam and lParam given in the second, third and fourth arguments to the window with the handle given as the first argument.

EXAMPLE

DialogMonitorOPS.unRegisterNotification id:#eyeInTheSky

fn dmnotification =

(

 WindowHandle = DialogMonitorOPS.GetWindowHandle()

 format "Dialog Window Handle: %\n" WindowHandle

 format "Dialog Name: %\n" (UIAccessor.GetWindowText WindowHandle)

 format "Window Class Name: %\n" (UIAccessor.GetWindowClassName WindowHandle)

 format "Window Resource ID: %\n" (UIAccessor.GetWindowResourceID WindowHandle)

 format "Is Window: %\n" (UIAccessor.isWindow WindowHandle)

 format "Window DLL Filename: %\n" (UIAccessor.GetWindowDllFileName WindowHandle)

 format "Window DLL Description: %\n" (UIAccessor.GetWindowDllDescription WindowHandle)

 UIAccessor.SetWindowText WindowHandle "All Your Windows Are Belong To Us"

 format "=====================\n"

 true

)

DialogMonitorOPS.RegisterNotification dmnotification id:#eyeInTheSky

DialogMonitorOPS.Enabled = true

DialogMonitorOPS.ShowNotification()

If you would evaluate the code above and open Main Menu > Customize > Customize User Interface, the output will look like this:

Dialog Window Handle: 3213306

Dialog Name:

Window Class Name: Menu

Window Resource ID: 0

Is Window: true

Window DLL Filename: C:\Program Files\Autodesk\3ds Max 2008\3dsmax.exe

Window DLL Description:

=====================

Dialog Window Handle: 2033898

Dialog Name:

Window Class Name: SysShadow

Window Resource ID: 0

Is Window: true

Window DLL Filename: C:\Program Files\Autodesk\3ds Max 2008\3dsmax.exe

Window DLL Description:

=====================

Dialog Window Handle: 3278842

Dialog Name: Customize User Interface

Window Class Name: Dialog

Window Resource ID: 0

Is Window: true

Window DLL Filename: C:\Program Files\Autodesk\3ds Max 2008\CustDlg.dll

Window DLL Description:

=====================

The first block returns info about the Customize Menu itself. A Menu does not have a Dialog Name but is also a form of a window.

The second block shows the shadow of the menu (if enabled in the MS Windows settings)

The third block shows the actual Customize User Interface dialog.

See also

Interface: DialogMonitorOPS


Interface: UtilityPanel

Interfaces > Core Interfaces > UtilityPanel

This Core Interface lets you open and close Utility Plug-ins in the Utilities Tab.

Methods:

<integer>UtilityPanel.OpenUtility <class>ClassName

Switches the control panel to the Utility Panel and opens the specified utility.

<integer>UtilityPanel.CloseUtility()

Closes a modal (bound to panel) utility. Does not close modeless utilities. If the Utilities tab is currently not displayed in the Command panel, the utility will still be closed. Returns true if successful, false if not.

EXAMPLE

--Open the MAXScript utility in the Utilities panel

UtilityPanel.OpenUtility MAXScript

True

--Close any utility currently open in the Utilities panel

UtilityPanel.CloseUtility()

OK

To get an array of the installed utility classes, use utilityplugin.classes

EXAMPLE

--Print the available utility classes to the Listener

print utilityplugin.classes

MAXScript

Surface_Approximation

Level_of_Detail

Asset_Browser

IFL_Manager

COM_DCOM_Server_Control

Camera_Tracker

Visual_MAXScript

Strokes

Lightscape_Materials

Follow_Bank

Resource_Collector

Polygon_Counter

RayFX

Dynamics

UVW_Remove

Camera_Match

Measure

Assign_Vertex_Colors

MAX_File_Finder

Motion_Capture

Shape_Check

Reset_XForm

Color_Clipboard

ASCII_Object_Output

Bitmap_Photometric_Path_Editor

Rescale_World_Units

collapse


Interface: ViewCubeOps

NEW in 3ds Max 2009: The ViewCubeOps Interface exposes the ViewCube viewport navigation tool's settings to MAXScript.

Interfaces > Core Interfaces > ViewCubeOps

Roll over and click a group of controls to jump to relevant properties:

Properties:

Display Options

ViewCubeOps.Visibility : bool : Read|Write

Get/set the ViewCube visibility. Corresponds to the "Show the ViewCube" option in the dialog.

ViewCubeOps.All3DViewportsDisplay : bool : Read|Write

Get/set whether to display the ViewCube in all views or only in the active view.

When set to true, the radio button will be set to "In all Views".

When false, it will be set to "Only in Active View".

ViewCubeOps.Size : integer : Read|Write

Get/set the item in the ViewCube Size drop-down list.

Possible values are:

0 - Large

1 - Normal

2 - Small

3 - Tiny

ViewCubeOps.MinOpacity : float : Read|Write

Get/set the inactive ViewCube opacity value. Default is 0.5 (50%). The value can be any floating point value between 0.0 and 1.0. Other than the drop-down list in the dialog, any value is allowed.

When Dragging on the ViewCube

ViewCubeOps.DragSnapping : bool : Read|Write

Get/set the state of the "Snap To Closest View" option.

When Clicking on the ViewCube

ViewCubeOps.FitToView : bool : Read|Write

Get/set the state of the "Fit-To-View on view change" option.

ViewCubeOps.AnimatedTransition : bool : Read|Write

Get/set the state of the "Use animated transitions when switching views" option.

ViewCubeOps.KeepSceneUp : bool : Read|Write

Get/set the state of the "Keep Scene Upright" option.

Compass

ViewCubeOps.DrawCompass : bool : Read|Write

Get/set the state of the "Show the Compass below the ViewCube" option.

ViewCubeOps.AngleOfNorth : float : Read|Write

Get/set the "Angle Of North (degrees)" value.

Methods:

<void>ViewCubeOps.GoHome()

Resets the active view to its Home state.

<void>ViewCubeOps.SetCurrentViewAsHome()

Sets the current view as the Home view.

<void>ViewCubeOps.SetCurrentViewAsFront()

Sets the current view as the Front view.

<void>ViewCubeOps.ResetFront()

Resets the Front view to the default Front view.

<void>ViewCubeOps.Orthographic()

Sets the active view to Orthographic mode.

<void>ViewCubeOps.Perspective()

Sets the active view to Perspective mode.

<void>ViewCubeOps.SaveOptions()

Saves the current settings.


Interface: visualMS

Interfaces > Core Interfaces > visualMS

The visualMS Core Interface exposes the Visual MAXScript editor.

Interface: visualMS

Methods:

<Interface>visualMS.createForm()

Creates a VMS instance that is initially hidden. Call the Visual MAXScript form object’s .Open method to display it. See visualMSForm [ Mixin Interface ] below.

EXAMPLE

MacroScript Launch_VMS

ButtonText:"Visual MAX Script Editor"

Category:"MAX Script"

internalCategory:"MAX Script"

Tooltip:"Visual MAX Script Editor"

(

vms = visualMS.CreateForm()

vms.Open()

)

<Interface>visualMS.createFormFromFile <filename>fileName

Creates a VMS instance from the given MAXScript file.

Mixin Interface: visualMS.createForm(...)

Interface: visualMSForm

Properties:

Methods:

<void><MixinInterface:visualMSForm>open()

Opens the Visual MAXScript Form.

<void><MixinInterface:visualMSForm>close()

Closes the Visual MAXScript Form.

<boolean><MixinInterface:visualMSForm>genScript <&string>script

script is In and Out parameter

Generates a script from the Form. Writes the generated script into the by-reference variable. Returns true on success.


Interface: walkThroughOps

Interfaces > Core Interfaces > walkThroughOps

The WalkThroughOps Core Interface provides access to the Walkthrough viewport navigation mode.

Interface: walkThroughOps

Properties:

walkThroughOps.isEnabled : bool : Read

Returns true if walkthrough mode is enabled, false otherwise.

walkThroughOps.isActive : bool : Read

Returns true if the walkthrough mode is active, false otherwise.

walkThroughOps.stepSize : float : Read|Write

Get/Set the step size value which controls the linear speed.

walkThroughOps.sensitivity : float : Read|Write

Get/Set the sensitivity value which controls the angular speed the higher the value, the faster the Pitch and Yaw.

walkThroughOps.invertVertical : bool : Read|Write

When set to true, the vertical axis will be inverted - moving the mouse up will Pitch the camera up, moving the mouse down will Pitch down. When set to false (default), moving the mouse pointer up will rotate the camera to look down and vice-versa.

walkThroughOps.lockVertical : bool : Read|Write

When set to true, no Pitch will be allowed. When set to false (default), looking up and down will be possible.

walkThroughOps.lockHorizontal : bool : Read|Write

When set to true, no Yaw will be allowed. When set to false (default), looking left and right will be possible.

walkThroughOps.accelerate : bool : Read|Write

When set to true, the linear speed will be adjusted relatively to the size of the scene. When false (default), the absolute step size will be used.

Methods:

<void>walkThroughOps.start()

Enables the walkthrough mode.

<void>walkThroughOps.stop()

Disables the walkthrough mode.

<void>walkThroughOps.level()

Aligns the view vector to be parallel to the XY world plane.

<void>walkThroughOps.resetStepSize()

Resets the Step Size to the default value.

See also

Other Interfaces


Interface: WorkingPivot

Interfaces > Core Interfaces > WorkingPivot

The WorkingPivot Core Interface exposes the Working Pivot custom coordinate system feature to MAXScript.

Available in 3ds Max 2008 and higher.

Interface: WorkingPivot

Properties:

WorkingPivot.EditMode : boolean : Read|Write

When set to true, enters Working Pivot Edit mode and allows you to place the working point interactively using an Axis_Helper object created internally by the feature.

When set to false, exits Working Pivot Editing and removes the Axis_Helper object from the scene.

Corresponds to toggling the "Edit Working Pivot" checkbutton in the Working Pivot rollout of the Hierarch Tab in the Command Panel.

WorkingPivot.UseMode : boolean : Read|Write

When set to true, enables the Use Working Pivot mode which switches the reference coordinate system to the matrix defined by the working pivot in Edit mode.

When set to false, Use Working Pivot mode is turned off and the reference coordinate system is switched back to the previous settings.

Corresponds to toggling the "Use Working Pivot" checkbutton in the Working Pivot rollout of the Hierarch Tab in the Command Panel.

WorkingPivot.AxisSize : float : Read|Write

Get/set the size of the Axis_Helper object used as Working Pivot.

The size value is either in world units or screen pixels depending on the .AxisConstantScreenSize property.

Not exposed to the 3ds Max GUI.

WorkingPivot.AxisDrawOnTop : boolean : Read|Write

Get/set the draw on top property of the Axis_Helper object used as Working Pivot.

When set to true, the Axis_Helper will be drawn on top of all other objects, avoiding being occluded by geometry in front of it.

When set to false, the Axis_Helper will respect the Z-order of objects in the scene and would be occluded by objects between it and the viewer.

Not exposed to the 3ds Max GUI.

WorkingPivot.AxisConstantScreenSize : boolean : Read|Write

Get/Set the constant screen size property of the Axis_Helper object used as Working Pivot.

When set to true, the size will be calculated in screen pixels and remain constant regardless of the distance to the object.

When set to false, the size will be in world units and the helper will become smaller with increasing distance from the viewer.

Methods:

<matrix3>WorkingPivot.getTM()

Calling this method returns the transformation matrix of the Working Pivot.

<void>WorkingPivot.setTM <matrix3>tm

Calling this method sets the transformation matrix of the Working Pivot to the given matrix3 value. This can be used to reposition to Working Pivot using MAXScript. All UI controls highlighted in blue in the above screenshot could be implemented using this method.

See also

Axis_Helper : Helper

Core Interfaces


Interface: XMLMaterial

Interfaces > Core Interfaces > XMLMaterial

The XMLMaterial Core Interface allows you to export a single material or an array of materials to XML format. Performs the same functions through MAXScript as the Material XML Exporter Utility which is not directly exposed.

Alias:

XmlMtlExporter

Properties:

XMLMaterial.bitmapURL : string : Read|Write

Get/Set the bitmap URL as string

XMLMaterial.thumbnails : bool : Read|Write

When set to True, thumbnails will be exported.

XMLMaterial.thumbnailURL : string : Read|Write

Get/Set the URL of the thumbnails as string

XMLMaterial.catalogFormat : bool : Read|Write

Enable/Disable catalog format

XMLMaterial.transformWithXSLT : bool : Read|Write

Enable XSLT transform

XMLMaterial.transformURL : string : Read|Write

Get/Set the transform URL

Methods:

<bool>XMLMaterial.export <material>mtl <filename>filename

Export the specified material to the supplied file name. Returns True on success, False otherwise.

<bool>XMLMaterial.exportArray <&material array>mtlArray <filename>filename

mtlArray is In and Out parameter

Export the specified array of material to the supplied file name. Returns True on success, False otherwise.


Node Interfaces

These are the MAXScript Node Interfaces. They provide access to methods and properties applicable to nodes.

IAssembly

INode

Interface: INodeBakeProjProperties

Interface: INodeBakeProperties

INodeGIProperties

INodeLayerProperties

INodeMentalRayProperties

SkinPose


Interface: IAssembly

This is a Node Interface providing access to the Assembly head and member related properties of a node.

Properties:

<node>.assemblyMember : boolean : Read|Write

Returns true if the node is an Assembly Member, false if it isn’t.

<node>.assemblyHead : boolean : Read|Write

Returns true if the node is an Assembly Head, false if it isn’t.

<node>.assemblyMemberOpen : boolean : Read|Write

Returns true if the node is a Member of an open Assembly, false is the Assembly is closed or the node is not a Member of an Assembly.

<node>.assemblyHeadOpen : boolean : Read|Write

Returns true if the node is a Head of an open Assembly, false if the Assembly is closed or the node is not a Head of an Assembly.

<node>.assemblyBBoxDisplay : boolean : Read|Write

Get/set the bounding box display.

EXAMPLE

-- find all top level assembly heads

for obj in objects do

if obj.assemblyHead and not obj.isAssemblyMember do

print obj.name

WARNING!

While these properties are Read/Write, setting these properties can result in unpredictable behavior!

Only set these properties if you really know what you are doing!

See also

Interface:AssemblyMgr

Node Interfaces


Interface: INode

This represents a Node Interface providing access to some properties and methods available in all nodes.

Properties

.vertexColorType : enum : Read|Write

vertexColorType enums: {#color|#illum|#alpha|#color_plus_illum|#soft_select|#map_channel}

Gets/Sets the vertex color display type.

.vertexColorMapChannel : integer : Read|Write

Gets/Set the map channel used for vertex colors when .vertexColorType is set to the new enum value #map_channel.

.posInParent : point3 : Read

Gets the node’s position relatively to its parent. When the parent is undefined (node is child of the world), returns the world position.

.rotInParent : point3 : Read

Gets the node’s rotation relatively to its parent.

.scaleInParent : point3 : Read

Gets the node’s scale relatively to its parent.

.scaleOrientInParent : quat : Read

Gets the node’s scale orientation relatively to its parent.

.boneEnable : boolean : Read|Write

Gets/Sets the node’s Bone property.

.posTaskWeight : float : Read|Write

Gets/Sets the the Bind Position Weight value under the Hierarchy > IK. Panel.

.rotTaskWeight : float : Read|Write

Gets/Sets the the Bind Orientation Weight value under the Hierarchy > IK. Panel.

.boneAutoAlign : boolean : Read|Write

Gets/Sets the the node’s AutoAlign Bone property. When turned off, the bone's pivot point will not align to its child object. The translation of a child bone will not be converted into rotation of the parent. Instead the child will be allowed to move away from the parent's X-axis.

NOTE:

Changing the state of this check box will not have an immediate visual effect on the skeleton. It only affects future behavior when bones are moved. This option is only available if Bone is off.

.boneFreezeLength : boolean : Read|Write

Gets/Sets the the node’s Freeze Length property. When turned on, the bone maintains its length. When turned off, the bone's length is based on the translation of its child bone. This option is available only if Auto-Align is on.

.boneScaleType : enum : Read|Write

boneScaleType enums: {#scale|#squash|#none}

Gets/Sets the the node’s Bone Scale Type property.

Scale: Lets the bone scale. The stretch happens along one axis.

Squash: Lets the bone squash. The bone gets fatter as it gets shorter, and thinner as it gets longer.

None: No stretch takes place.

.stretchTM : matrix3 by value : Read

Gets the the node’s Stretch Transformation Matrix. Normally, matrix concatenation occurs in the following manner:

objectTM = objectOffsetTM * stretchTM * nodeTM

So code that uses the objectTM will transparently inherit the effects of the stretchTM. However if you want the stretchTM included but not the object offset, this property will return the stretchTM alone. If the node is not a bone or has no stretching, this property will return the identity matrix.

.boneAxis : enum : Read|Write

boneAxis enums: {#X|#Y|#Z}

Gets/Sets the node’s Bone Axis.

.boneAxisFlip : boolean : Read|Write

Gets/Sets the node’s Bone Flip Axis option.

.primaryVisibility : boolean : Read|Write

Gets/Sets the node’s Visible to Camera option.

.secondaryVisibility : boolean : Read|Write

Gets/Sets the node’s Visible to Reflection/Refraction option.

.applyAtmospherics : boolean : Read|Write

Gets/Sets the node’s Apply Atmospherics option.

.showVertexColors : integer : Read|Write

Gets/Sets the node’s Show Vertex Colors option.

.shadeVertexColors : integer : Read|Write

Gets/Sets the node’s Shade Vertex Colors option.

.handle : DWORD : Read

Gets the node’s handle. It provides a unique identifier independent from the object’s name.

Methods:

<void>setBoneEnable <boolean>onOff <time>time

Enables/Dsiables the bone.

<onOff>

When turned on, the bone or object behaves as a bone. Turning this option off causes the node to stop behaving like a bone. There is no auto alignment or stretching. Note that turning this option on will not cause the object to immediately align or stretch. However future translations of children may cause rotation and stretching. Default=on for bone objects, off for other objects.

<time>

Specifies the time at which to calculate and store initial child position. This is usually used with the current time slider position. The time associated with the time slider can be queried and set using the sliderTime global variable. Time Control

<void>realignBoneToChild()

Rotates the node such that its X axis points at the average position of all children with the bone property turned on.

<void>resetBoneStretch()

Resets the initial child position used to compute the stretch factor to the current child position. This will cause the stretch factor to become equal to one. If it was previously not equal to one then the object would snap to its original unstretched state.

See also

Node Interfaces


Interface: INodeBakeProperties

This represents the Node Interface to the node’s Texture Baking properties.

Properties:

.bakeEnabled : boolean : Read|Write

Enables/Disables Texture Baking for the node.

.bakeChannel : integer : Read|Write

Gets/Sets the Texure Baking channel of the node.

.nDilations : integer : Read|Write

Gets/Sets the nDilation value of the node.

.flags : integer : Read|Write

Gets/Sets the Texture Baking flags.

.surfaceArea : float : Read|Write

Gets/Sets the Texture Baking Surface Area.

.areaScale : float : Read|Write

Gets/Sets the Texture Baking Area Scaling.

.activeOriginX : float : Read|Write

Gets/Sets the Texture Baking Active Origin X coordinate.

.activeOriginY : float : Read|Write

Gets/Sets the Texture Baking Active Origin Y coordinate.

.activeWidth : float : Read|Write

Gets/Sets the Texture Baking Active Width.

.activeHeight : float : Read|Write

Gets/Sets the Texture Baking Active Height.

Methods:

<boolean>addBakeElement <maxObject>element

Adds a Bake Element.

<boolean>removeBakeElement <maxObject>element

Removes a Bake Element.

<boolean>removeBakeElementByIndex <integer>elementIndex

Removes the indexed Bake Element.

<boolean>removeBakeElementByName <string>elementName

Removes the Bake Element specified by the name string.

<void>removeAllBakeElements()

Removes all BakeElements.

<integer>numBakeElements()

Returns the number of Bake Elements.

<maxObject>getBakeElement <integer>index

Returns the indexed Bake Element.

<integer>findByName <string>elementName

Returns the index of the named Bake Element .

<integer>renderWidth()

Returns the rendering width in pixels.

<integer>renderHeight()

Returns the rendering height in pixels.

<boolean>effectiveEnable()

Returns the enabled state.

<integer>nParams()

Returns the number of available parameters in the Bake Element.

The following methods provide indexed access to Bake Element parameters. Using these methods, a script can manipulate the state of specific Bake Element properties without knowledge of the classes of the separate Bake Elements.

<integer>numElementParams <maxObject>element

Returns the number of available parameters in the Bake Element.

<string>paramName <maxObject>element <integer>paramIndex

Returns the name of the indexed parameter in the Bake Element.

<integer>paramType <maxObject>element <integer>paramIndex

Returns the type of the indexed parameter in the Bake Element.

<fpvalue by value>paramValue <maxObject>element <integer>paramIndex

Returns the value of the indexed parameter in the Bake Element.

<void>setParamValue <maxObject>element <integer>paramIndex <fpvalue by value>paramValue

Sets the value of the indexed parameter in the Bake Element to the supplied value.

<fpvalue by value>paramValueMin <maxObject>element <index>paramIndex

Returns the min. value of the indexed parameter in the Bake Element. Available in 3ds Max 8 and higher.

<fpvalue by value>paramValueMax <maxObject>element <index>paramIndex

Returns the max. value of the indexed parameter in the Bake Element. Available in 3ds Max 8 and higher.

<integer>findParam <maxObject>element <string>paramName

Returns the index of the named parameter in the Bake Element.

EXAMPLE

-- create a new BlendMap Bake Element

be = BlendMap()

ReferenceTarget:BlendMap

-- create a new Box object and get its INodeBakeProperties interface

bx = Box()

bi = bx.INodeBakeProperties

<MixinInterface:INodeBakeProperties>

-- add the new BakeElement to the node

bi.addBakeElement be

true

-- get the number of available parameters

bi.numElementParams be

8

-- output the name, type and value of all 8 parameters

for i = 1 to 8 do format "% % %\n" (bi.paramName be i) (bi.paramType be i) (bi.paramValue be i)

Lighting 1 1

Shadows 0 1

Diffuse 0 1

Ambient 0 1

Specular 0 1

Self-Illum 0 1

Reflection 0 1

Refraction 0 1

OK

-- check the value of paramter 1 (Lighting) - 1 means True

bi.paramValue be 1

1

-- check the actual Lighting property – it is really True

be.Lighting

true

-- to change the Lighting to False, set the parameter value to 0

bi.setParamValue be 1 0

OK

-- check to see the new value

bi.paramValue be 1

0

-- check to see that the property of the BakeElement has changed...

be.Lighting

false

See also

Node Interfaces

Interface: BakeElementProperties

Bake Elements


Interface: INodeBakeProjProperties

Interface: INodeBakeProjProperties

Properties:

<node>.enabled : boolean : Read|Write

Enable/Disable Projection Baking for the node.

<node>.projectionMod : maxObject : Read|Write

Get/Set the Projection Modifier.

<node>.projectionModTarget : string : Read|Write

Get/Set the Projection Modifier Target.

<node>.cropAlpha : boolean : Read|Write

Get/Set whether Alpha will be cropped.

<node>.projSpace : enum : Read|Write

projSpace enums: {#raytrace|#uvw_match}

Get/Set the Projection Space.

<node>.normalSpace : enum : Read|Write

normalSpace enums:

{#world|#screen|#local|#tangent}

Get/Set the Normal Space.

<node>.tangentYDir : enum : Read|Write

tangentYDir enums: {#Y_Up|#Y_Down}

Get/Set the Y Tangent Direction.

<node>.tangentXDir : enum : Read|Write

tangentXDir enums: {#X_Right|#X_Left}

Get/Set the X Tangent Direction.

<node>.useCage : boolean : Read|Write

Get/Set whether to use the Cage.

<node>.rayOffset : float : Read|Write

Get/Set the Ray Offset value.

<node>.hitResolveMode : enum : Read|Write

hitResolveMode enums: {#closest|#furthest}

Get/Set the Hit Resolve Mode.

<node>.hitMatchMtlID : boolean : Read|Write

Get/Set whether to match the Material IDs when projecting.

<node>.hitWorkingModel : boolean : Read|Write

<node>.warnRayMiss : boolean : Read|Write

Get/Set whether to warn of missed ray hits.

<node>.rayMissColor : color : Read|Write

Get/Set the warn color for missed ray hits.

<node>.heightMapMin : float : Read|Write

Get/Set the HeightMap Min. Value.

<node>.heightMapMax : float : Read|Write

Get/Set the HeightMap Max. Value.

<node>.heightBufMin : float : Read|Write

<node>.heightBufMax : float : Read|Write

<node>.BakeObjectLevel : boolean : Read|Write

<node>.BakeSubObjLevels : boolean : Read|Write

<node>.useObjectBakeForMtl : boolean : Read|Write

<node>.proportionalOutput : boolean : Read|Write

<node>.subObjBakeChannel : integer : Read|Write

Methods:

<boolean><node>.removeBakeElementByIndex <index>elementIndex

Removes the indexed Bake Element.

<maxObject><node>.getBakeElement <index>index

Returns the indexed Bake Element.

<index><node>.findByName <string>elementName

Returns the index of the Bake Element with the supplied name.

<string><node>.paramName <maxObject>element <index>paramIndex

Returns the name of the indexed parameter in the supplied Bake Element.

<integer><node>.paramType <maxObject>element <index>paramIndex

Returns the type of the indexed parameter in the supplied Bake Element.

<integer><node>.paramValue <maxObject>element <index>paramIndex

Returns the value of the indexed parameter in the supplied Bake Element.

<void><node>.setParamValue <maxObject>element <index>paramIndex <integer>paramValue

Sets the value of the indexed parameter in the supplied Bake Element.

<index><node>.findParam <maxObject>element <string>paramName

Returns the index of the supplied parameter name in the supplied Bake Element.

See also

Node Interfaces

Projection : Modifier

Project_Mapping : ReferenceTarget

Project_Mapping_Holder : Modifier


Interface: INodeDisplayProperties

The INodeDisplayProperties Node Interface exposes the adaptive degradation node properties to MAXScript.

Available in 3ds Max 2008 and higher.

Interface: INodeDisplayProperties

Properties:

<node>.NeverDegrade : boolean : Read|Write

Get/set the Never Degrade node option.

When set to true, the node will not be considered by the adaptive degradation system.

When set to false, the node can be degraded if it matches the conditions set in the Adaptive Degradation dialog .

See also

Node Common Properties, Operators, and Methods

Adaptive Degradation Access


Interface: INodeGIProperties

This Node Interface exposes the node’s Global Illumination Properties. These properties correspond to the UI controls found in the Adv. Lighting tab of the Object Properties dialog in 3ds Max 5 and higher.

Roll over and click a UI Control to jump to related property's description:

Properties:

<node>.isGIExcluded : boolean : Read|Write

Corresponds to the Exclude from Radiosity Processing checkbox in the Object Properties > Adv. Lighting tab

NOTE:

Since hidden objects are NEVER considered by the radiosity processing, setting .isGIExcluded to false for hidden objects will have no practical effect on them - they will NOT be processed unless unhidden!

.GIByLayer : boolean : Read|Write

Corresponds to the By Layer / By Object checkbutton in the Object Properties > Adv. Lighting tab

Adv.Lighting General Properties

<node>.isGIOccluder : boolean : Read|Write

Corresponds to the Cast Shadows checkbox in the Object Properties > Adv. Lighting tab

<node>.isGIReceiver : boolean : Read|Write

Corresponds to the Receive Illumination checkbox in the Object Properties > Adv. Lighting tab

<node>.GIRayMult : float : Read|Write

Corresponds to the Num. Regathering Rays Multiplier value in the Object Properties > Adv. Lighting tab

Radiosity-only Properties

<node>.isGIDiffuse : boolean : Read|Write

Corresponds to the Diffuse (reflective & translucent) checkbox in the Object Properties > Adv. Lighting tab

<node>.isGISpecular : boolean : Read|Write

Corresponds to the Specular (reflective & translucent) checkbox in the Object Properties > Adv. Lighting tab

<node>.isGIExcludedFromRegather : boolean : Read|Write

Corresponds to the Exclude from Regathering checkbox in the Object Properties > Adv. Lighting tab

Object Subdivision Settings

<node>.GIUseGlobalMeshing : boolean : Read|Write

Corresponds to the Use Global Subdivision Settings checkbox in the Object Properties > Adv. Lighting tab

<node>.GIMeshingEnabled : boolean : Read|Write

Corresponds to the Subdivide checkbox in the Object Properties > Adv. Lighting tab

<node>.GIUseAdaptiveSubdivision : boolean : Read|Write

Corresponds to the Use Adaptive Subdivision checkbox in the Object Properties > Adv. Lighting tab. Available in 3ds Max 8 and higher.

Mesh Settings

<node>.GIMeshSize : worldUnits : Read|Write|Validated by Range: 0.01 to 1e+009

Corresponds to the Max.Mesh Size value in the Object Properties > Adv. Lighting tab

<node>.GIMinMeshSize : float : Read|Write

Corresponds to the Min.Mesh Size value in the Object Properties > Adv. Lighting tab. Available in 3ds Max 8 and higher.

<node>.GIContrastThreshold : float : Read|Write

Corresponds to the Contrast Threshold value in the Object Properties > Adv. Lighting tab. Available in 3ds Max 8 and higher.

<node>.GIInitialMeshSize : float : Read|Write

Corresponds to the Initial Mesh Size value in the Object Properties > Adv. Lighting tab. Available in 3ds Max 8 and higher.

<node>.nbGIRefineSteps : integer : Read|Write|Validated by Range: 0 to 65535

Corresponds to the Refine Iterations value in the Object Properties > Adv. Lighting tab

<node>.nbGIRefineStepsDone : integer : Read|Write|Validated by Range: 0 to 65535

Corresponds to the Iterations Done value in the Object Properties > Adv. Lighting tab

Light Object Radiosity Properties

<node>.storeIllumToMesh : boolean : Read|Write

Corresponds to the Store Direct Illumination in Mesh checkbox in the Object Properties > Adv. Lighting tab

EXAMPLE

--Create a box which is excluded from Radiosity Processing

b = box isGIExcluded:true

$Box:Box01 @ [0.000000,0.000000,0.000000]

--Include the box in Radiosity Processing again

b.isGIExcluded = false

false

--Uncheck the Receive Illumination property

b.isGIReceiver = false

false

See also

Node Interfaces

Interface: SceneRadiosity

General Node Properties


Interface: INodeLayerProperties

This represents the interface to the node’s Layer Properties. These properties correspond to UI controls found in different areas of the Object Properties dialog.

Properties:

<node>.layer : Interface : Read

Returns a LayerProperties Mixin Interface giving access to the object’s layer properties.

<node>.displayByLayer : boolean : Read|Write

Corresponds to the By Layer / By Object checkbutton in the Object Properties > General tab > Display Properties. When true, the layer’s Display Properties settings will be used. When false, the object’s Display Properties settings will be used instead.

<node>.renderByLayer : boolean : Read|Write

Corresponds to the By Layer / By Object checkbutton in the Object Properties > General tab > Rendering Control. When true, the layer’s Rendering Controls settings will be used. When false, the object’s Rendering Controls will be used instead.

<node>.motionByLayer : boolean : Read|Write

Corresponds to the By Layer / By Object checkbutton in the Object Properties > General tab > Motion Blur. When true, the layer’s Motion Blur settings will be used. When false, the object’s Motion Blur settings will be used instead.

<node>.colorByLayer : boolean : Read|Write

When true, the object will use the Layer’s color. When false, the object’s color will be used instead. This affects the Layer Color switch in the Layer Properties.

<node>.globalIlluminationByLayer : boolean : Read|Write

Corresponds to the By Layer / By Object checkbutton in the Object Properties > Adv. Lighting tab (Radiosity Tab in Autodesk VIZ). This is identical to the .GIByLayer property exposed by the INodeGIProperties Node Interface.

See also

Interface: LayerManager

Node Interfaces


Interface: INodeMentalRayProperties

This represents a Node Interface to the node’s mental ray properties. These properties correspond to the UI controls found in the mental ray tab of the Object Properties dialog. Available in 3ds Max 8 and higher.

Roll over and click a UI area to jump to its description:

Properties:

<node>.mr_displacementUseGlobalSettings : bool : Read|Write

Corresponds to the Use Global Settings checkbox in the Object Properties > mental ray tab > Displacement group of controls. When set to true, the global displacement settings will be used. When set to false, the following values will be used instead:

<node>.mr_displacementMethod : enum : Read|Write

mr_displacementMethod enums: { #Fine | #Fine_NoSmoothing }

Corresponds to the Smoothing (Turn OFF with Height Maps) checkbox in the Object Properties > mental ray tab > Displacement group of controls.

The values have the following effect:

#Fine - checked.

#Fine_NoSmoothing - unchecked.

<node>.mr_viewDependentDisplacement : bool : Read|Write

Corresponds to the View-Dependent checkbox in the Object Properties > mental ray tab > Displacement group of controls. When set to true and the Use Global Settings option is turned off, the displacement will be view-dependent.

<node>.mr_displacementEdgeLength : float : Read|Write

Corresponds to the Edge Length value in the Object Properties > mental ray tab > Displacement group of controls. When the Use Global Settings option is turned off, then if the View-Dependent option is turned on the edge length value will be taken in pixels. If the View-Dependent option if turned off, the edge length will be used as generic units.

<node>.mr_maxDisplace : float : Read|Write

Corresponds to the Max.Displace value in the Object Properties > mental ray tab > Displacement group of controls. When the Use Global Settings option is turned off, this value controls the maximum displacement for this object.

<node>.mr_displacementMaxLevel : integer : Read|Write

Corresponds to the Max.Level value in the Object Properties > mental ray tab > Displacement group of controls. When the Use Global Settings option is turned off, this value controls the maximum displacement levels for this object.

See also

Node Interfaces


Interface: INodeShadingProperties

The INodeShadingProperties Node Interface exposes the node-related viewport shading properties to MAXScript.

Only nodes whose base object is of Light superclass will effectively use these properties, but the property can be set in any node.

Available in 3ds Max 2008 and higher.

Interface: INodeShadingProperties

Properties:

INodeShadingProperties.ViewportIllumination : bool : Read|Write

When set to true (default), enables Viewport Illumination for the node, assuming the base object is a Light and the Viewport Shading mode is set to Best (SM3.0) - see Interface: IViewportShadingMgr and [ this dialog ] on how to enable the advanced shading modes. The Best mode depends on the graphics hardware supporting the SM3.0 shader model.

On hardware that supports only SM2.0, the Good mode performs old-style vertex lighting only and does not support per-pixel lighting.

EXAMPLE

IViewportShadingMgr.ShadingLimits = #Best --enable shadows

$Spot01.on = true --make sure the light is on

$Spot01.ViewportIllumination = true --display illumination

When set to false, Viewport Illumination is turned off for the node.

EXAMPLE

$Spot01.ViewportIllumination = false --display illumination

INodeShadingProperties.ViewportShadowCasting : bool : Read|Write

When set to true, enables Viewport Shadow Casting for the node, provided the base object is a Light and Shadow Casting is turned on in the light's base object using <light>.baseobject.castShadows = true. (Remember, .castShadows is also a node property and requires explicit access in the baseobject to affect the shadow casting of the light).

To see the shadows in the viewport, the Viewport Shading has to be set to Good (SM2.0) or Best (SM3.0) - see Interface: IViewportShadingMgr and [ this dialog ] on how to enable the advanced shading modes.

EXAMPLE

IViewportShadingMgr.ShadingLimits = #Best --enable shadows

$Spot01.baseobject.castshadows = true --enable shadows in Spot01

$Spot01.ViewportShadowCasting = true --display shadows of Spot01

When set to false (default), Viewport Shadow Casting is turned off for the node.

EXAMPLE

$Spot01.ViewportShadowCasting = false

INodeShadingProperties.LockedViewportIllumination : bool : Read|Write

When set to true, locks the Viewport Illumination for the node

When set to false (default), Viewport Illumination is unlocked for this node.

When the Interface: IViewportShadingMgr .AutoDisplaySelLights property is set to true, lights that are not selected will not illuminate the scene.

By setting the .LockedViewportIllumination property to true, a light node can be locked to keep on illuminating the scene even after it has been deselected.

See Interface: IViewportShadingMgr for methods to quickly lock and unlock multiple lights. The 3ds Max QuadMenus provide menu items to call these methods on the selected lights:

See also

Interface: IViewportShadingMgr

Viewport Lighting and Shadows Dialog


Interface: SkinPose

This is a Node Interface providing access to the general node posing capabilities.

It does not require a Skin modifier in order to be accessed.

Properties:

<node>.skinPos : point3 by value : Read|Write

Get/Set the value of the position part of the transformation pose.

<node>.skinRot : point3 by value : Read|Write

Get/Set the value of the rotation part of the transformation pose - Euler angle in position XYZ

<node>.skinScale : point3 by value : Read|Write

Get/Set the value of the scale part of the transformation pose - Point3 as scale factors x, y, and z

<node>.skinScaleOrient : quat by value : Read|Write

Get/Set the orientation of the scale factor axes

<node>.skinPosEnabled : bool : Read|Write

Check whether the pose position is enabled / Enable the pose position.

<node>.skinRotEnabled : bool : Read|Write

Check whether the pose rotation is enabled / Enable the pose rotation.

<node>.skinScaleEnabled : bool : Read|Write

Check whether the pose scale is enabled / Enable the pose scale.

<node>.skinPoseMode : bool : Read|Write

Check whether the node transformation is in pose mode / Enable the pose mode.

Methods:

<void><node>.setSkinPose()

Sets the state of all three non-animatied skin pose transforms to the animated normal pose

<void><node>.assumeSkinPose()

Sets the state of all three animatied normal pose transforms to the non-animated skin pose transforms.

See also

Node Interfaces

Skin : Modifier


NodeExposureInterface Struct Methods

The NodeExposureInterface structure provides methods to create a INodeExposureR Interface for a given node and get an existing interface from a node.

The Node Exposure Interface can be used to define the exposure of a scene node to various areas of the 3ds Max User Interface. By default, all scene nodes are visible to all areas of the 3ds Max UI, but by creating a Node Exposure Interface and changing the exposure settings in it, a node could be excluded from sub-systems like the Select By Name dialog, the Schematic View and the Track View.

Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

Methods:

<INodeExposureR Interface>NodeExposureInterface.Create <node>

Creates the node exposure interface if not already present, and returns the INodeExposureR Interface value.

<INodeExposureR Interface>NodeExposureInterface.Get <node>

Returns the node exposure interface if already created, otherwise returns 'undefined'

Both methods return a Function Published Interface value:

Interface: INodeExposureR

Methods:

<bool> <INodeExposureR>.isExposed <integer>ui

Returns true if the the node is exposed to the UI sub-system corresponding to the 0-based index.

Possible values for 'ui' are:

0 - SelectObjects (Select By Name dialog)

1 - SchematicView

2 - Maxscript -- currently unsupported

3 - Merge -- currently unsupported

4 - MergeAnimation -- currently unsupported

5 - Replace -- currently unsupported

6 - KeyEditor

7 - CurveEditor

8 - RangeEditor

As noted above, values 2 through 5 currently have no affect!

<void> <INodeExposureR>.SetExposedInAll <bool>state

This method sets all node exposures to the given Boolean value.

If the argument is false, the node will be excluded from all UI areas of exposure.

If the argument is true, the node will be exposed to all UI sub-systems.

<void> <INodeExposureR>.SetExposed <bool>state <integer>ui

This method sets the node exposure for the specific UI area defined by the second argument to the Boolean value defined by the first argument.

FOR EXAMPLE:

theNode = Sphere()

theInterface = NodeExposureInterface.Create theNode

theInterface.SetExposed false 0

will make the newly created sphere invisible to the Select By Name dialog.

<void> <INodeExposureR>.BakeExposure()

See 'Class INodeExposure' in the SDK help file for more information on this interface.


Other Interfaces

Interfaces

Interface: AssignVertexColors

Interface: BakeElementProperties

Interface: blockMgr

Interface: ChannelInfo

Interface: custAttribCollapseManager

Interface: FlowRaytraceInterface

Interface: FrameTagManager

Interface: ImageMotionBlur

Interface: InstanceMgr

Interface: LayerProperties

Interface: mental_ray_Preferences

Interface: MtlBrowserFilter_Manager

Interface: ParamCollectorOps

Interface: ProjectionIntersectorMgr

Interface: ProjectionRenderMgr

Interface: radiosityMeshOps

Interface: reactionMgr

Interface: RenderElementMgr

Interface: renderpresets

Interface: SkinUtils

Interface: styleMgr

Interface: SubstManager

Interface: thePainterInterface

Interface: Trackbar

Interface: XMLMaterial

Manipulator Interfaces:

simpleManip

gizmoShape

manipPlane

See also

Core Interfaces

Class and Object Inspector Functions

showInterfaces Inspector Function

GetInterfaces Interface Inspector

GetInterfaces Interface Inspector

showInterface Inspector Function


Interface: BakeElementProperties

The BakeElementProperties Interface is exposed by all Bake Element and provides access to their properties using indexed access.

Available in 3ds Max 2008 and higher.

See also the Interface: INodeBakeProperties interface.

Interface: BakeElementProperties

Properties:

.backgroundColor : fRGBA color by value : Read|Write

Get/Set the background color of the Bake Element. Default is (color 0 0 0 0).

Methods:

<integer>nParams()

Returns the number of parameters in the Bake Element.

<string>paramName <integer>paramIndex

Returns the name of the indexed parameters in the Bake Element.

<integer>paramType <integer>paramIndex

Returns the type of the indexed parameter in the Bake Element.

<integer>getParamValue <integer>paramIndex

Returns the value of the indexed parameters in the Bake Element.

<void>setParamValue <integer>paramIndex <integer>newValue

Sets the value of the indexed parameter in the Bake Element.

<fpvalue by value>getParamFPValue <integer>paramIndex

Returns the PFValue of the indexed parameter in the Bake Element.

<void>setParamFPValue <integer>paramIndex <fpvalue by value>newValue

Sets the value of the indexed parameter in the Bake Element.

<fpvalue by value>getParamFPValueMin <integer>paramIndex

Returns the minimum FPValue of the indexed parameter in the Bake Element.

<fpvalue by value>getParamFPValueMax <integer>paramIndex

Returns the maximum FPValue of the indexed parameter in the Bake Element.

<integer>findParam <string>paramName

Returns the index of the named parameter in the Bake Element.

FOR EXAMPLE

-- create a new BlendMap Bake Element

be = BlendMap()

ReferenceTarget:BlendMap

be.nParams()

8

for i = 1 to be.nParams() do

format "%: Type:% Value:% FPValue:% Min:% Max:%\n" \

i (be.paramName i) (be.ParamType i) (be.getParamValue i) \

(be.getParamFPValue i) (be.getParamFPValueMin i) \

(be.getParamFPValueMax i)

1: Type:Lighting Value:1 FPValue:1 Min:1 Max:-999999999

2: Type:Shadows Value:1 FPValue:1 Min:1 Max:-999999999

3: Type:Diffuse Value:1 FPValue:1 Min:1 Max:-999999999

4: Type:Ambient Value:1 FPValue:1 Min:1 Max:-999999999

5: Type:Specular Value:1 FPValue:1 Min:1 Max:-999999999

6: Type:Self-Illum Value:1 FPValue:1 Min:1 Max:-999999999

7: Type:Reflection Value:1 FPValue:1 Min:1 Max:-999999999

8: Type:Refraction Value:1 FPValue:1 Min:1 Max:-999999999

See also

Interface: INodeBakeProperties

Bake Elements


Interface: ImageMotionBlur

imageMotionBlur interfaces:

Interface: ImageMotionBlur

Properties

None

Methods

None

Actions

None


Interface: LayerProperties

LayerProperties is a MixinInterface providing access to a specific layer's properties. This interface is returned by some methods in the Interface: LayerManager core interface and the Interface: INodeLayerProperties node interface.

Interface: LayerProperties

Properties:

<LayerProperties>.on : boolean : Read|Write

Get/Set the Enabled state of the layer.

<LayerProperties>.lock : boolean : Read|Write

Get/Set the Locked state of the layer.

<LayerProperties>.current : boolean : Read|Write

Get/Set whether the layer is the Current layer.

NOTE:

Can only be set to true!

<LayerProperties>.wireColor : color by value : Read|Write

Get/Set the Wireframe Color of the layer.

<LayerProperties>.isGIExcluded : boolean : Read|Write

Get/Set the Exclude from Radiosity state of the layer.

<LayerProperties>.name : string : Read

Get the name of the layer. To set the name of the layer, please use the <LayerProperties>.setLayer() method described further on this page. This is necessary because MAXScript has to validate the new name - layer names must be unique!

<LayerProperties>.renderable : bool : Read|Write

Get/Set whether the objects on the layer are renderable.

<LayerProperties>.inheritVisibility : bool : Read|Write

Get/Set whether the objects on the layer inherit visibility from their parents.

<LayerProperties>.primaryVisibility : bool : Read|Write

Get/Set whether the objects on the layer are visible to camera

<LayerProperties>.secondaryVisibility : bool : Read|Write

Get/Set whether the objects on the layer are reflections

<LayerProperties>.receiveshadows : bool : Read|Write

Get/Set whether the objects on the layer receive shadows.

<LayerProperties>.castShadows : bool : Read|Write

Get/Set whether the objects on the layer cast shadows.

<LayerProperties>.applyAtmospherics : bool : Read|Write

Get/Set whether the objects on the layer can be occluded by atmospheric effects

<LayerProperties>.renderOccluded : bool : Read|Write

Get/Set whether the objects on the layer will render to RPF layers when occluded.

<LayerProperties>.ishidden : bool : Read|Write

Get/Set whether the objects on the layer are hidden.

<LayerProperties>.isfrozen : bool : Read|Write

Get/Set whether the objects on the layer are frozen.

<LayerProperties>.boxmode : bool : Read|Write

Get/Set whether the objects on the layer will be displayed in box mode.

<LayerProperties>.backfacecull : bool : Read|Write

Get/Set whether the objects on the layer will be displayed with culled backfaces.

<LayerProperties>.alledges : bool : Read|Write

Get/Set whether the objects on the layer will be displayed with all edges visible.

<LayerProperties>.vertexTicks : bool : Read|Write

Get/Set whether the objects on the layer will be displayed with vertices as ticks.

<LayerProperties>.showTrajectory : bool : Read|Write

Get/Set whether the objects on the layer will show trajectories

<LayerProperties>.xray : bool : Read|Write

Get/Set whether the objects on the layer will be displayed as See-Thru

<LayerProperties>.ignoreExtents : bool : Read|Write

Get/Set whether the extents of the objects on the layer will be ignored.

<LayerProperties>.showFrozenInGray : bool : Read|Write

Get/Set whether the objects on the layer will be displayed as grey when frozen.

<LayerProperties>.showVertexColors : bool : Read|Write

Get/Set whether the objects on the layer will be displayed with vertex colors.

<LayerProperties>.vertexColorsShaded : bool : Read|Write

Get/Set whether the objects on the layer will be displayed with shaded vertex colors.

<LayerProperties>.visibility : float : Read|Write

Get/Set whether the objects on the layer will be visible.

<LayerProperties>.imageMotionBlurMultiplier : float : Read|Write

Get/Set the Image Motion Blur Multiplier for objects on the layer

<LayerProperties>.motionBlurOn : bool : Read|Write

Get/Set whether the objects on the layer will render with Motion Blur.

<LayerProperties>.motionblur : enum : Read|Write

motionblur enums: {#none|#object|#image}

Get/Set the type of Motion Blur to be used when rendering objects of the layer

<LayerProperties>.display : enum : Read|Write

display enums: {#viewport|#boundingbox|#wireframe|#shaded}

Get/Set the display mode for all objects on the layer.

<LayerProperties>.INodeGIProperties : Interface : Read

The INodeGIProperties property returns a INodeGIProperties FPS interface giving access to the GI properties of the layer. See Interface: INodeGIProperties

<LayerProperties>.layerAsRefTarg : RefTarget : Read

Returns the layer as a ReferenceTarget.

NOTE:

The layer system operates exactly the opposite of what you would expect - the nodes reference the layer, rather than the layers referencing the node.

EXAMPLE

s=sphere() --Create a sphere, store in variable

$Sphere:Sphere01 @ [0.000000,0.000000,0.000000]

sphere() --Create another one

$Sphere:Sphere02 @ [0.000000,0.000000,0.000000]

layer = layermanager.getlayer 0 --get default Layer 0

<MixinInterface:LayerProperties>

layerRT = layer.layerAsRefTarg --get layer as RefTarget

ReferenceTarget:BaseLayer

refs.dependents layerRT --see the dependents

#($Sphere:Sphere02 @ [0.0,0.0,0.0], $Sphere:Sphere01 @ [0.0,0.0,0.0], ReferenceTarget:Animatable, ReferenceTarget:Animatable, ReferenceTarget:LayerManager, ReferenceTarget:Scene)

refs.dependson s

#(Controller:Position_Rotation_Scale, Sphere, ReferenceTarget:BaseLayer)

Methods:

<void>addnode <node>node

Adds the given node to the layer. See bottom of page for an example.

<void>select <boolean>OnOff

If the Boolean value is passed as true, selects all objects on the layer in the scene. If the argument is passed as false, deselects all objects on the layer.

<boolean>setname <string>name

Sets the name of the layer to the given string. Returns true on success.

NOTE:

Layer names must be unique, which is why a method is used to set the layer name - it can validate the supplied name before assigning it to the layer as shown in the following example.

EXAMPLE

--First reset 3ds Max to start in an empty scene, then execute:

layer1 = layermanager.getlayer 0 --get default Layer 0

<MixinInterface:LayerProperties>

layer1.setName "The One" --try to change the name

false --you cannot, the default layer is always called "0"

layer2 = layermanager.getlayer 1 --try to get Layer 1

undefined --there is no such layer yet.

layer2 = layermanager.newLayerFromName "Test" --let's create it

<MixinInterface:LayerProperties>

layer2.setName "Second Layer" --now we can rename it

true

layer3 = layermanager.newLayerFromName "Third" -- create another

<MixinInterface:LayerProperties>

layer3.setName "Second Layer" --try to give the same name as 2nd

false

layer3.setName "Third Layer" --it needs a unique name to work

true

<boolean>nodes <&node array>layerNodes

layerNodes is Out parameter

Returns true on success, and an array of all nodes on the layer in the by-reference Out parameter.

EXAMPLE

layer = layermanager.newLayerFromName "Spheres"

<MixinInterface:LayerProperties>

for i = 1 to 10 do (s = sphere(); layer.addNode s)

OK

layer.nodes &theNodes

true

theNodes

#($Sphere:Sphere10 @ [0.000000,0.000000,0.000000], $Sphere:Sphere09 @ [0.000000,0.000000,0.000000], $Sphere:Sphere08 @ [0.000000,0.000000,0.000000], $Sphere:Sphere07 @ [0.000000,0.000000,0.000000], $Sphere:Sphere06 @ [0.000000,0.000000,0.000000], $Sphere:Sphere05 @ [0.000000,0.000000,0.000000], $Sphere:Sphere04 @ [0.000000,0.000000,0.000000], $Sphere:Sphere03 @ [0.000000,0.000000,0.000000], $Sphere:Sphere02 @ [0.000000,0.000000,0.000000], $Sphere:Sphere01 @ [0.000000,0.000000,0.000000])

See also

Interface: INodeLayerProperties

Interface: INodeGIProperties

Interface: LayerManager


Interface: Module_Snooper_Interface

This Interface provides methods to query process memory and time usage.

Available in 3ds Max 9 and higher.

Methods:

<void>GraphMemoryInViewport()

Creates a graphical representation of the memory usage in the 3ds Max Scene using Boxes with names corresponding to the task names and size representing the amount of memory used.

<void>GetLargestAvailableHeapBlockSizes <&integer array>blockSizes numBlocks:<integer>

blockSizes is Out parameter

numBlocks default value: 1

Returns an array of the largest available memory blocks in bytes into the by-reference variable blockSizes. By default returns only the largest block.

If numBlocks is provided and is higher than 1, the respective number of memory blocks will be written to the array.

FOR EXAMPLE

Module_Snooper_Interface.GetLargestAvailableHeapBlockSizes &FreeBlocks

FreeBlocks

#(462422016)

Module_Snooper_Interface.GetLargestAvailableHeapBlockSizes &blocks numblocks:5

FreeBlocks

#(462422016, 255852544, 88080384, 87031808, 75497472)

<integer>GetProcessKernelTime()

Returns the 3dsmax.exe process' Kernel time in milliseconds.

<integer>GetProcessUserTime()

Returns the 3dsmax.exe process' User time in milliseconds.

<integer>GetProcessTotalTime()

Returns the 3dsmax.exe process' Total time in milliseconds. Corresponds to the sum of the Kernel and User time and to the CPU Time column in the Windows Task Manager.


Interface: RenderElementMgr

This interface exposes methods to access and manipulate the Render Elements list in the Render Scene Dialog. It is returned by the MaxOps.GetCurRenderElementMgr() method and cannot be created by MAXScript. See example at the bottom of this page.

RenderElementMgr interfaces:

Interface: RenderElementMgr

Methods:

<boolean>AddRenderElement <maxObject>element

Adds a specific element. Returns True if successful, False otherwise

<boolean>RemoveRenderElement <maxObject>element

Removes a specific element. Returns True is successful, False otherwise.

<void>RemoveAllRenderElements()

Removes all elements in the list.

<integer>NumRenderElements()

Returns number of elements in list

<maxObject>GetRenderElement <integer>index

Returns a specific element, index is 0 based.

<void>SetElementsActive <boolean>active

Sets a boolean indicating elements are active, ie. will be created during a render.

<boolean>GetElementsActive()

Gets a boolean indicating elements are active, ie. will be created during a render.

<void>SetDisplayElements <boolean>display

Sets boolean indicating elements will be displayed after they are created.

<boolean>GetDisplayElements()

Gets boolean indicating elements will be displayed after they are created.

<void>SetCombustionOutputEnabled <boolean>enabled

Enables or disables output to combustion .cws file.

<boolean>GetCombustionOutputEnabled()

Gets boolean indicating enabled output to combustion .cws file.

<void>SetCombustionOutputPath <filename>pathname

Sets the filename of the .cws file.

<filename>GetCombustionOutputPath()

Gets the filename of the .cws file.

<void>SetRenderElementFilename <integer>index <filename>filename

Set the output file name for the indexed render element to the specified filename string.

<filename>GetRenderElementFilename <integer>index

Get the output file name of the indexed render element.

EXAMPLE

-- set a list of render elements.

elementlist = #(specular, diffuse, self_illumination, reflection,refraction, shadowrenderelement, atmosphere, blend, z_depth, alpha, backgroundrenderelement)

re = maxOps.GetCurRenderElementMgr() -- get the current render element manager

re.removeallrenderelements() -- remove all renderelements

re.numrenderelements() -- get number of render elements

theManager = maxOps.GetRenderElementMgr #Production

theManager.numrenderelements()

rendoutputfilename = "c:\\test.tga"

-- adds all renderelements to be rendered.

for n in elementlist do

(

re.addrenderelement (n elementname:("foo_" + (n as string)))

format "\nAdded % renderelement" n

)

rendsavefile = true

setsilentmode true -- used to avoid error message when checking the filename of element

renderSceneDialog.open() -- open Render Dialog

-- get all render elements set and return name of render element and output filename

for n = 0 to (theManager.numrenderelements()- 1) do

(

el = re.getrenderelement n

format "\nGetting % render element" el.elementname

format "\nRender element outputfilename: %" (re.GetRenderElementFileName n)

)

See also

MaxOps Interface


Interface: SchematicView

Interfaces > MixinInterface > SchematicView

The SchematicView MixinInterface is returned by the getView() method and the .current property in the SchematicViews Interface and provides access to properties and methods of a specific existing Schematic View.

Interfaces:

Interface: SchematicView

EXAMPLE

SchematicViews.open "My Schematic View"

True

sv = schematicviews.current

<MixinInterface:SchematicView>

sv.syncSelection

True

sv.syncSelection = False

False

Properties:

<MixinInterface:SchematicView>.syncSelection : bool : Read|Write

Get/Set the Sync. Selection option state.

<MixinInterface:SchematicView>.alwaysArrange : bool : Read|Write

Get/Set the state of the Always Arrange option switch.

<MixinInterface:SchematicView>.showGrid : bool : Read|Write

Get/Set the visibility of the Grid.

<MixinInterface:SchematicView>.gridSnap : bool : Read|Write

Get/Set the state of the Grid Snap option.

<MixinInterface:SchematicView>.gridSpacing : integer : Read|Write

Get/Set the spacing of the Grid.

<MixinInterface:SchematicView>.showBackgroundImage : bool : Read|Write

Enable/Disable the display of the background image.

<MixinInterface:SchematicView>.backgroundImageLock : bool : Read|Write

Lock/Unlock the background image.

<MixinInterface:SchematicView>.syncSelectionType : enum : Read|Write

syncSelectionType enums: {#viewports|#everything}

Get/Set the Sync Selection Type.

<MixinInterface:SchematicView>.arrangeMethod : enum : Read|Write

arrangeMethod enums: {#stacked|#horiz|#vert}

Get/Set the Arrange Method Type.

<MixinInterface:SchematicView>.linkStyle : enum : Read|Write

linkStyle enums: {#bezier|#straight|#circuit|#none}

Get/Set the Link Style.

<MixinInterface:SchematicView>.moveChildren : bool : Read|Write

Get/Set whether children are moved with the parent.

<MixinInterface:SchematicView>.doubleBuffer : bool : Read|Write

Controls the state of "Double Buffer " checkbox in the the "Schematic View Preferences" dialog. When set to true (default), double-buffer technique will be used to redraw the Schematic View. When set to false, the display will flicker noticeably.

<MixinInterface:SchematicView>.panToNodes : bool : Read|Write

Controls the state of "Pan to Added Node " checkbox in the the "Schematic View Preferences" dialog.

<MixinInterface:SchematicView>.useWireframeColor : bool : Read|Write

Controls the state of the "Use Wireframe Color" checkbox in the "Schematic View Preferences" dialog. When set to True, the wireframe color will be used to display the node in Schematic View.

<MixinInterface:SchematicView>.zoomMousePoint : bool : Read|Write

Controls the state of "Zoom About Mouse" checkbox in the "Schematic View Preferences" dialog. When set to true, the zoom is performed with the mouse point as center.

<MixinInterface:SchematicView>.layoutWarning : bool : Read|Write

Controls the state of the "Display Layout Warning" checkbox in the "Schematic View Preferences" dialog.

<MixinInterface:SchematicView>.updateOnFocus : bool : Read|Write

Controls the state of the "Only Updates on Focus" checkbox in the "Schematic View Preferences" dialog.

<MixinInterface:SchematicView>.showTooltips : bool : Read|Write

Controls the state of "Show Tooltips" checkbox in the "Schematic View Preferences" dialog.

<MixinInterface:SchematicView>.snapFloaters : bool : Read|Write

Controls the state of "Snap Floaters" checkbox in the "Schematic View Preferences" dialog.

<MixinInterface:SchematicView>.relativeFloaters : bool : Read|Write

Controls the state of "Relative Floaters" checkbox in the "Schematic View Preferences" dialog.

<MixinInterface:SchematicView>.showShrink : bool : Read|Write

Get/Set the Shrink mode. This value is also being controlled by the Layout > Toggle Shrink option in the Schematic View menu.

Methods:

<string><MixinInterface:SchematicView>.getName()

Returns the name of the Schematic View.

<void><MixinInterface:SchematicView>.setName <string>name

Sets the name of the Schematic View to the specified string.

<integer><MixinInterface:SchematicView>.beginEdit()

Begins edit, increases the internal edit counter by one and returns it as integer. This prevents Schematic View from traversing the scene and generating new Schematic View Nodes. This guarantees that locally stored Schematic View Node IDs remain valid.

<integer><MixinInterface:SchematicView>.endEdit()

Ends edit, decreases the internal edit counter by one and returns it as integer. Failure to call endEdit() after the corresponding beginEdit() will prevent Schematic View from updating based on scene changes.

<void><MixinInterface:SchematicView>.updateView <bool>fullTraverse

Updates the Schematic View. When the parameter is set to true, the node hierarchy will be fully traversed.

<integer><MixinInterface:SchematicView>.getSVNodeID <fpvalue>anim

Returns the Schematic View Node ID for the supplied sub-anim.

FOR EXAMPLE:

resetMaxFile #noPrompt --reset the max scene

OK

teapot() --create a new teapot

$Teapot:Teapot01 @ [0.000000,0.000000,0.000000]

SchematicViews.open "Pots" --open a new Schematic View

True --yes, it worked!

--Get the ID of the Teapot node

SchematicViews.current.getSVNodeID $Teapot01

0 --it is ID 0

--Get the ID of the Visibility track of the Teapot node

SchematicViews.current.getSVNodeID $Teapot01[1]

-1 --no such SV node, returns -1

--Now get the ID of the Transformation track of the Teapot

SchematicViews.current.getSVNodeID $Teapot01[3]

1 --it is ID 1

--Get the ID of the Position track of the Teapot

SchematicViews.current.getSVNodeID $Teapot01[3][1]

2 --it is ID 1

--Get the ID of the Object track of the Teapot

SchematicViews.current.getSVNodeID $Teapot01[4]

11 --it is ID 1

<int by value array><MixinInterface:SchematicView>.getSVNodeIDTab <fpvalue>anim

Returns the Schematic View Node ID Tab as an array of integers. If anim is an instanced object, the array of Schematic View Node IDs corresponds to the Node IDs for that instanced object.

<maxObject><MixinInterface:SchematicView>.getSVNodeAnim <integer>svNodeID

Returns the sub-anim object corresponding to the specified Schematic View Node ID

FOR EXAMPLE:

resetMaxFile #noPrompt --reset the max scene

OK

teapot() --create a new teapot

$Teapot:Teapot01 @ [0.000000,0.000000,0.000000]

SchematicViews.open "Pots" --open a new Schematic View

True --yes, it worked!

--Get the object node of the Teapot by ID (see example above)

SchematicViews.current.getSVNodeAnim 0

$Teapot:Teapot01 @ [0.000000,0.000000,0.000000]

--Now get the sub-anim of the Transformation track of the Teapot

SchematicViews.current.getSVNodeAnim 1

Controller:Position_Rotation_Scale

--Get the sub-anim of the Position track of the Teapot

SchematicViews.current.getSVNodeAnim 2

Controller:Position_XYZ

--Get the sub-anim of the Object track of the Teapot

SchematicViews.current.getSVNodeAnim 11

Teapot

<string><MixinInterface:SchematicView>.getSVNodeName <integer>svNodeID

Returns the Schematic View Node Name by ID

FOR EXAMPLE:

resetMaxFile #noPrompt

OK

teapot()

$Teapot:Teapot01 @ [0.000000,0.000000,0.000000]

SchematicViews.open "Pots"

True

SchematicViews.current.getSVNodeName 0

"Teapot01"

SchematicViews.current.getSVNodeName 1

"Position/Rotation/Scale (Transform)"

SchematicViews.current.getSVNodeName 2

"Position XYZ (Position)"

SchematicViews.current.getSVNodeName 11

"Teapot (Object)"

<integer><MixinInterface:SchematicView>.getNumSVNodes()

Returns the number of Schematic View nodes as integer.

<bool><MixinInterface:SchematicView>.selectSVNode <integer>svNodeID [selectChildren:<bool>]

selectChildren default value: false

Selects the node by ID. If the optional selectChildren is set to true, also selects the children of the node. Returns true on success, false otherwise.

<bool><MixinInterface:SchematicView>.deselectSVNode <integer>svNodeID [selectChildren:<bool>]

selectChildren default value: false

Deselects the node by ID. If the optional selectChildren is set to true, also deselects the children of the node. Returns true on success, false otherwise.

<void><MixinInterface:SchematicView>.selectAll()

Selects all nodes in the Schematic View.

<void><MixinInterface:SchematicView>.deselectAll()

Deselects all nodes in the Schematic View.

<void><MixinInterface:SchematicView>.selectInvert()

Inverts the current selection in the Schematic View.

<bool><MixinInterface:SchematicView>.selectChildren [svNodeID:<integer>]

svNodeID default value: -1

Selects the children of all selected nodes. If the optional svNodeId is supplied and is not -1, only children of the specified node will be selected. Returns true on success, false otherwise.

<bool><MixinInterface:SchematicView>.deselectChildren svNodeID:<integer>

svNodeID default value: -1

Deselects the children of all selected nodes. If the optional svNodeId is supplied and is not -1, only children of the specified node will be deselected. The parent itself will not be deselected. Returns true on success, false otherwise.

<void><MixinInterface:SchematicView>.selectToScene()

Synchronizes the Schematic View selection to the Scene - Selects the scene nodes that are selected in Schematic View.

<void><MixinInterface:SchematicView>.selectFromScene()

Synchronizes the Schematic View selection from the Scene - Selects the Schematic View nodes that are selected in the scene.

<int by value array><MixinInterface:SchematicView>.getSelectedSVNodes()

Returns an array of svNodeID integers - one for every selected node.

<bool><MixinInterface:SchematicView>.isSelected <integer>svNodeID

Returns true if the node specified by ID is selected, false otherwise.

<integer><MixinInterface:SchematicView>.numChildren <integer>svNodeID

Returns the number of children nodes of the node specified by ID

<integer><MixinInterface:SchematicView>.getChildSVNodeID <integer>svNodeID <integer>childNum

Returns the svNodeID of the Nth child of the node specified by ID

<integer><MixinInterface:SchematicView>.numParents [svNodeID:<integer>]

svNodeID default value: -1

Returns the number of parents. If the optional svNodeID is specified as in not -1, the number of parent nodes of the node specified by ID will be returned.

<integer><MixinInterface:SchematicView>.getParentSVNodeID <integer>svNodeID <integer>parentNum

Returns the Nth parent's svNodeID of the child specified by ID.

<integer><MixinInterface:SchematicView>.getFocus()

Returns the svNodeID of the node that is in focus.

<bool><MixinInterface:SchematicView>.hide svNodeID:<integer>

svNodeID default value: -1

Hides all selected nodes and their children. If the optional svNodeID is supplied and is not -1, only the specified node and its children will be hidden.

<bool><MixinInterface:SchematicView>.unHide <integer>svNodeID

Unhides the node specified by ID. Returns true on success, false otherwise.

<bool><MixinInterface:SchematicView>.collapseSVNodes [svNodeID:<integer>]

svNodeID default value: -1

Collapses all selected nodes. If the optional svNodeID is supplied and is not -1, only the node specified by ID will be affected. Returns true on success, false otherwise.

<void><MixinInterface:SchematicView>.hideAll()

Hides all Schematic View nodes.

<void><MixinInterface:SchematicView>.showAll()

Unhides all Schematic View nodes.

<bool><MixinInterface:SchematicView>.expandSVNodes [svNodeID:<integer>]

svNodeID default value: -1

Expands all selected nodes. If the optional svNodeID is supplied and is not -1, only the node specified by ID will be affected. Returns true on success, false otherwise.

<bool><MixinInterface:SchematicView>.shrink [svNodeID:<integer>]

svNodeID default value: -1

Shrinks all selected nodes. If the optional svNodeID is supplied and is not -1, only the node specified by ID will be affected. Returns true on success, false otherwise.

<bool><MixinInterface:SchematicView>.unShrink [svNodeID:<integer>]

svNodeID default value: -1

Unshrinks all selected nodes. If the optional svNodeID is supplied and is not -1, only the node specified by ID will be affected. Returns true on success, false otherwise.

<void><MixinInterface:SchematicView>.unShrinkAll()

Expands all Schematic View nodes.

<bool><MixinInterface:SchematicView>.arrangeSVNode [svNodeID:<integer>]

svNodeID default value: -1

Arranges all selected nodes. If the optional svNodeID is supplied and is not -1, only the node specified by ID will be affected. Returns true on success, false otherwise.

<bool><MixinInterface:SchematicView>.arrangeChildren [svNodeID:<integer>]

svNodeID default value: -1

Arranges the children of all selected nodes. If the optional svNodeID is supplied and is not -1, only the node specified by ID will be affected. Returns true on success, false otherwise.

<bool><MixinInterface:SchematicView>.freeSVNode [svNodeID:<integer>]

svNodeID default value: -1

Frees all selected nodes. If the optional svNodeID is supplied and is not -1, only the node specified by ID will be affected. Returns true on success, false otherwise.

<void><MixinInterface:SchematicView>.freeAll()

Frees all Schematic View nodes.

<void><MixinInterface:SchematicView>.zoomExtents()

Zooms the Schematic View to fit all nodes.

<void><MixinInterface:SchematicView>.zoomSelectedExtents()

Zoom the Schematic View to fit the selected nodes.

<void><MixinInterface:SchematicView>.panToSelected()

Pans the Schematic View to the Selected Nodes without changing the Zoom factor.

<bool><MixinInterface:SchematicView>.zoomToSVNode <integer>svNodeID

Zooms the Schematic View to show the Schematic View Node specified by ID. Returns True on success.

<bool><MixinInterface:SchematicView>.panToSVNode <integer>svNodeID

Pans the Schematic View to show the Schematic View Node specified by ID. Returns True on success.

<filename><MixinInterface:SchematicView>.getBackgroundImageName()

Returns the background image name as filename.

<void><MixinInterface:SchematicView>.setBackgroundImageName <filename>name

Sets the background image name to the specified filename.

<void><MixinInterface:SchematicView>.addBookmark <string>name

Creates a new bookmark with the given name, storing the current state of the Schematic View.

<void><MixinInterface:SchematicView>.nextBookmark()

Goes to the next Bookmark.

<void><MixinInterface:SchematicView>.prevBookmark()

Goes to the previous Bookmark.

<bool><MixinInterface:SchematicView>.setSVNodePos <integer>svNodeID <bool>children <point2 by value>point

Sets the position of the Schematic View Node specified by ID to the supplied Point2 value. If the children parameter is set to True, the Children of the specified node will be repositioned, too. Returns True on success.

<point2 by value><MixinInterface:SchematicView>.getSVNodePos <integer>svNodeID

Returns the position of the Schematic View Node specified by ID as a Point2 value.

<bool><MixinInterface:SchematicView>.translateSVNode <integer>svNodeID <bool>children <point2 by value>point

Translates the Schematic View Node specified by ID by the supplied Point2 value. If the children parameter is set to True, the Children of the specified node will be repositioned, too. Returns True on success.

<bool><MixinInterface:SchematicView>.translateSelected <point2 by value>point

Translates the selected Schematic View Nodes by the supplied Point2 value.

<bool><MixinInterface:SchematicView>.canAssignController svNodeID:<integer>

svNodeID default value: -1

Returns True if a controller can be assigned to the Schematic View Node specified by ID.

<bool><MixinInterface:SchematicView>.showAssignControllerDialog svNodeID:<integer>

svNodeID default value: -1

Opens the Assign Controller Dialog for the Schematic View Node specified by ID. Returns True on success.

<bool><MixinInterface:SchematicView>.deleteSelected()

Deletes the selected Schematic View Nodes. Returns True on success.

<bool><MixinInterface:SchematicView>.showProperties [svNodeID:<integer>]

svNodeID default value: -1

Opens the Properties dialog for the Schematic View Node specified by ID. Returns True on success.

<float><MixinInterface:SchematicView>.getSVNodeWidth()

Returns the width of the Schematic View nodes.

<float><MixinInterface:SchematicView>.getSVNodeHeight()

Returns the height of the Schematic View nodes.

<bool><MixinInterface:SchematicView>.testSVNodeState <integer>svNodeID <enum>state

state enums: {#selected|#visible|#displayed|#inode|#localRoot|#animated|#instanced|#shrink|#freeMove|#freeMoveParent|#inactive}

Returns true if the node supplied by ID is in the specified state. #inactive tests for frozen or hidden nodes, #localRoot tests if the Schematic View Node is the root of a hierarchy (ie, no parents), #inode tests if the Schematic View Node is a Node object.

<maxObject><MixinInterface:SchematicView>.getSVNodeOwner <integer>svNodeID

Returns the scene object owning the Schematic View node supplied by ID

<integer><MixinInterface:SchematicView>.getSVNodeAnimID <integer>svNodeID

Returns the sub-anim ID of the Schematic View node supplied by ID

<void><MixinInterface:SchematicView>.doubleClickSVNode <integer>svNodeID

Performs a double-clik over the Schematic View node supplied by ID

<integer><MixinInterface:SchematicView>.getNumOutputRelationships <integer>svNodeID

Returns the number of output relationships of the Schematic View node supplied by ID

<enum><MixinInterface:SchematicView>.getOutputRelationshipType <integer>svNodeID <integer>relIndex

getOutputRelationshipType enums: {#unknown|#paramwire|#constraint|#light|#modifier|#controller)

Returns the type of the specified output relationship of the Schematic View node supplied by ID.

<integer><MixinInterface:SchematicView>.getOutputRelationshipSVNodeID <integer>svNodeID <integer>relIndex

Returns the Schematic View node ID of the specified output relationship of the Schematic View node supplied by ID.

<integer><MixinInterface:SchematicView>.getNumInputRelationships <integer>svNodeID

Returns the number of input relationships of the Schematic View node supplied by ID

<enum><MixinInterface:SchematicView>.getInputRelationshipType <integer>svNodeID <integer>relIndex

getInputRelationshipType enums: {#unknown|#paramwire|#constraint|#light|#modifier|#controller)

Returns the type of the specified intput relationship of the Schematic View node supplied by ID.

<integer><MixinInterface:SchematicView>.getInputRelationshipSVNodeID <integer>svNodeID <integer>relIndex

Returns the Schematic View node ID of the specified intput relationship of the Schematic View node supplied by ID.

<bool><MixinInterface:SchematicView>.canMakeSVNodeUnique <integer>svNodeID

Returns true if the Schematic View node supplied by ID can be made unique.

<bool><MixinInterface:SchematicView>.makeSVNodeUnique <integer>svNodeID

Makes the Schematic View node supplied by ID unique, returns true on success.

<bool><MixinInterface:SchematicView>.setShowRelationships <integer>svNodeID <bool>show

Controls the relationships display for the Schematic View node supplied by ID.

<bool><MixinInterface:SchematicView>.getShowRelationships <integer>svNodeID

Returns true if the relationships display for the Schematic View node supplied by ID is enabled, false otherwise.

<void><MixinInterface:SchematicView>.showPreferencesDialog()

Opens the Preferences dialog.

<void><MixinInterface:SchematicView>.showDisplayFloater <bool>show

Opens/closes the Preferences dialog. When the supplied parameter is true, the dialog will be opened, when false, it will be closed.

<void><MixinInterface:SchematicView>.showRelationshipDialog <bool>all

Opens the Relationships dialog. When the supplied parameter is true, all relationships will be shown.

<void><MixinInterface:SchematicView>.showInstancesDialog <bool>all

Opens the Instances dialog. When the supplied parameter is true, all instances will be shown.

<void><MixinInterface:SchematicView>.showObjectOccurrenceDialog()

Opens the Object Occurence dialog.

<void><MixinInterface:SchematicView>.showListViewDialog <&integer array>svNodes [title:<string>] [id:<integer>]

svNodes is In and Out parameter

title default value: undefined

id default value: 1

Opens the ListView dialog displaying the nodes specified by an array of ID passed by reference. The ID parameter is useful for enabling menu items specific to your custom List View content.

<void><MixinInterface:SchematicView>.hideListViewDialog()

Closes the ListView dialog.

<int by value array><MixinInterface:SchematicView>.getSelectedListViewSVNodes()

Returns the nodes currently selected in the ListView dialog.

<enum><MixinInterface:SchematicView>.getListViewDialogType()

getListViewDialogType enums: {#unknown|#relationship|#instance|#occurrence|#userDefined)

Returns the current type of the ListView dialog. #userDefined is returned for List Views created with the showListViewDialog method.

<integer><MixinInterface:SchematicView>.getListViewDialogID()

Returns the ID of the ListView dialog as integer.

<string><MixinInterface:SchematicView>.getListViewDialogTitle()

Returns the title of the ListView dialog as string.

<bool><MixinInterface:SchematicView>.setMode <enum>mode

mode enums: {#select|#connect|#paramwire|#pan|#zoom|#zoomregion}

Sets the current Schematic View mode. Returns True on success, False otherwise.

<enum><MixinInterface:SchematicView>.getMode()

getMode enums: {#select|#connect|#paramwire|#pan|#zoom|#zoomregion)

Returns the current Schematic View mode.

<bool><MixinInterface:SchematicView>.setLayoutMode <enum>mode

mode enums: {#reference|#hierarchy}

Sets the current Schematic View layout.

<enum><MixinInterface:SchematicView>.getLayoutMode()

getLayoutMode enums: {#reference|#hierarchy)

Returns the current Schematic View layout.

<bool><MixinInterface:SchematicView>.setDisplayFloaterFilter <enum>filter

filter enums: {#expand|#focus|#baseObjects|#modifierStack|#materials|#controllers|#controllersPos|#controllersRot|#controllersScale|#relConstraints|#relControllers|#relParamWires|#relLights|#relModifiers}

Sets the specified Display Floater Filter. Returns True on success, False otherwise.

<bool><MixinInterface:SchematicView>.clearDisplayFloaterFilter <enum>filter

filter enums: {#expand|#focus|#baseObjects|#modifierStack|#materials|#controllers|#controllersPos|#controllersRot|#controllersScale|#relConstraints|#relControllers|#relParamWires|#relLights|#relModifiers}

Clears the specified Display Floater Filter. Returns True on success, False otherwise.

<bool><MixinInterface:SchematicView>.testDisplayFloaterFilter <enum>filter

filter enums: {#expand|#focus|#baseObjects|#modifierStack|#materials|#controllers|#controllersPos|#controllersRot|#controllersScale|#relConstraints|#relControllers|#relParamWires|#relLights|#relModifiers}

Tests the state of the specified Display Floater Filter. Returns True if the Filter is set, False otherwise.

<bool><MixinInterface:SchematicView>.setIncludeFilter <enum>filter

filter enums: {#baseObjects|#modifierStack|#materials|#controllers|#staticValues|#masterPoint|#skinDetails|#selectedOnly|#visibleOnly|#animatedOnly|#geometryHide|#shapesHide|#lightsHide|#cameraHide|#helpersHide|#spacewarpsHide|#bonesHide}

Sets the specified Display Floater Include Filter. Returns True on success, False otherwise.

<bool><MixinInterface:SchematicView>.clearIncludeFilter <enum>filter

filter enums: {#baseObjects|#modifierStack|#materials|#controllers|#staticValues|#masterPoint|#skinDetails|#selectedOnly|#visibleOnly|#animatedOnly|#geometryHide|#shapesHide|#lightsHide|#cameraHide|#helpersHide|#spacewarpsHide|#bonesHide}

Clears the specified Display Floater Include Filter. Returns True on success, False otherwise.

<bool><MixinInterface:SchematicView>.testIncludeFilter <enum>filter

filter enums: {#baseObjects|#modifierStack|#materials|#controllers|#staticValues|#masterPoint|#skinDetails|#selectedOnly|#visibleOnly|#animatedOnly|#geometryHide|#shapesHide|#lightsHide|#cameraHide|#helpersHide|#spacewarpsHide|#bonesHide}

Tests the state of the specified Display Floater Include Filter. Returns True if the Include Filter is set, False otherwise.

<integer><MixinInterface:SchematicView>.getBaseSVNodeID <integer>

Returns the SVNodeID of the base SVNode (the INode)

<integer><MixinInterface:SchematicView>.getRootSVNodeID <integer>

Returns the SVNodeID of the local root for the SVNode

<Point2><MixinInterface:SchematicView>.screenToSV <Point2>

Converts a screen coordinate into schematic view coordinates

<Array of Integers><MixinInterface:SchematicView>.getSVNodeIDByPoint <Point2>

Will return an array of the graphnodes under the sv coordinate passed in as Point2

See also

Interface: SchematicViews

Schematic View Callbacks


PainterInterface : ReferenceTarget

The Painter Interface is a general API introduced in 3ds Max 5 providing tools for painting on meshes. The functions and properties are accessible through an interface called thePainterInterface.

Defining Custom Paint Tools Using the Painter Interface

PainterInterface Interfaces

Interface: thePainterInterface

Properties:

thePainterInterface.updateOnMouseUp : boolean : Read|Write

Get/Set the state of the "Update On Mouse Up" checkbox in the Painter Options dialog. When set to true, the Painter will update the stroke only when the mouse button is released.

thePainterInterface.treeDepth : integer : Read|Write|Validated by Range: 2 to 10

Get/Set the depth of the quad tree used for hit testing. The larger the value, the faster the interaction, but more memory will be consumed and it will take longer to build the tree.

thePainterInterface.minStr : float : Read|Write|Validated by Range: 0.0 to 1e+006

thePainterInterface.maxStr : float : Read|Write|Validated by Range: 0.0 to 1e+006

Get/Set the Min. and Max. Strength values. If no pressure device is available, only the Max Strength is used.

thePainterInterface.dragStrLimitMin : float : Read|Write

thePainterInterface.dragStrLimitMax : float : Read|Write

These two values limit the Strenght range when using ALT-SHIFT drag to adjust the value interactively in the viewport.

thePainterInterface.minSize : float : Read|Write|Validated by Range: 0.0 to 1e+006

thePainterInterface.maxSize : float : Read|Write|Validated by Range: 0.0 to 1e+006

Get/Set the Brush Min. and Max. Size values. If no pressure device is available, only the Max Size is used.

thePainterInterface.additiveMode : boolean : Read|Write

Get/Set the state of the "Additive" checkbox. When set to true, the painted values will add to the existing ones instead of overwriting them.

thePainterInterface.drawRing : boolean : Read|Write

Get/Set the display of the Brush Ring.

thePainterInterface.drawNormal : boolean : Read|Write

Get/Set the display of the Brush Normal vector.

thePainterInterface.drawTrace : boolean : Read|Write

Get/Set the display of the Brush Trace line.

thePainterInterface.normalScale : float : Read|Write

Get/Set the Normal Scale value.

thePainterInterface.marker : float : Read|Write

Get/Set the Marker value .

thePainterInterface.markerEnable : boolean : Read|Write

Enable/Disable the Marker.

thePainterInterface.pressureEnable : boolean : Read|Write

Enable/Disable Pressure Sensitivity for use with pressure tablets.

thePainterInterface.pressureAffects : integer : Read|Write|Validated by Range: 1 to 4

Get/Set the "Pressure Affects" option.

1 - None

2 - Strength

3 - Size

4 - Size and Strength

thePainterInterface.predefinedStrEnable : boolean : Read|Write

Enable/Disable Predefined Strength Pressure. When set to true, instead of using the tablet pressure or Max Strength value, a graph is used to determine strength based on its position in the stroke. To set up the graph, you can use the options dialog to set up the "predefined pressure" properties. The options dialog is available via thePainterInterface.paintOptions()

thePainterInterface.predefinedSizeEnable : boolean : Read|Write

Enable/Disable Predefined Size Pressure. When set to true, instead of using the tablet pressure or Max Size value, a graph is used to determine size based on its position in the stroke. To set up the graph, you can use the options dialog to set up the "predefined pressure" properties. The options dialog is available via thePainterInterface.paintOptions()

thePainterInterface.mirrorEnable : boolean : Read|Write

Enable/Disable the Mirror option.

thePainterInterface.mirrorAxis : integer : Read|Write|Validated by Range: 1 to 3

Get/Set the Mirror axis:

1 - X

2 - Y

3 - Z

thePainterInterface.mirrorOffset : float : Read|Write|Validated by Range: -1e+006 to 1e+006

Get/Set the Mirror offset value.

thePainterInterface.mirrorGizmoSize : float : Read|Write|Validated by Range: 0.0 to 1e+006

Get/Set the Mirror Gizmo size.

thePainterInterface.pointGatherEnable : boolean : Read|Write

Enable/Disable the Point Gathering mode.

thePainterInterface.buildNormals : boolean : Read|Write

Enable/Disable Normal building.

thePainterInterface.offMeshHitType : integer : Read|Write

Defines the hit type for painting outside the mesh or without a mesh.

0 - creates a plane based on your last hit point and normal. When using this type there must be a mesh to paint on.

1 - a zdepth into the screen, this creates a plane x units into your view that you can paint on. No mesh is required in this case.

2 - create a plane on a point in world space aligned to the current view. No mesh is required in this case.

thePainterInterface.offMeshHitZDepth : float : Read|Write

Defines the Z Depth to be used with offMeshHitType 1. (see above)

thePainterInterface.offMeshHitPos : point3 : Read|Write

Defines the world position to be used with offMeshHitType 2. (see above)

Methods:

<void>thePainterInterface.initializeNodes <integer>flags <node array>nodeList

Initializes the nodes for painting. NodeList is an array of the nodes to paint on. Flags is currently not used, you can use 0 as stand-in.

<integer>thePainterInterface.numberNodes()

Returns the number of registered nodes.

<node>thePainterInterface.getNode <integer>index

Returns the indexed node.

<void>thePainterInterface.updateMeshes <boolean>updatePointGather

Updates the meshes. When the updatePointGather is supplied as true, the point gather list will be updated, too.

<void>thePainterInterface.startPaintSession()

Starts a Paint Session.

<void>thePainterInterface.endPaintSession()

Ends the Paint Session.

<void>thePainterInterface.paintOptions()

Opens the Paint Options dialog.

<void>thePainterInterface.macroCallback <string>macroName <string>category

Used to registers macro callback scripts to control the painting. macroName is the path to the macroScript source, category is the category of the macroScript.

<boolean>thePainterInterface.inPaintMode()

Returns true when in painting mode, false when painting is not active.

<boolean>thePainterInterface.getIsHit <integer>tabIndex

Returns true when the indexed point was a hit.

<void>thePainterInterface.getHitPointData <&point3>localHit <&point3>localNormal <&point3>worldHit <&point3>worldNormal <&float>radius <&float>str <integer>tabIndex

localHit is In and Out parameter

localNormal is In and Out parameter

worldHit is In and Out parameter

worldNormal is In and Out parameter

radius is In and Out parameter

str is In and Out parameter

The method lets you retrieve the hit point data of the stroke:

localHit is the hit position in local space of the node that was hit

localNormal is the normal of the face that was hit in local space of the node that was hit

worldHit is the world space hit point

worldNormal is the world space normal of the hit face

radius is the radius of the brush at the time of the hit

str is the strength of the brush at the time of the hit

tabIndex is the index of the hit point that you want to get. If this value is 0 it will return the last hit point.

<void>thePainterInterface.getHitFaceData <&point3>bary <&integer>faceIndex <node>node <integer>tabIndex

bary is In and Out parameter

faceIndex is In and Out parameter

This function lets you retrieve the hit face data of the stroke. This is the face data that exists at the top of the stack.

bary - the barycentric coords of the face that was hit

faceIndex - the index of the face that was hit

node - the node that was hit

tabIndex - this is the index of the hit point that you want to get If this value is 0 it will return the last hit point

<void>thePainterInterface.getHitPressureData <&boolean>shift <&boolean>ctrl <&boolean>alt <&float>pressure <integer>tabIndex

shift is In and Out parameter

ctrl is In and Out parameter

alt is In and Out parameter

pressure is In and Out parameter

This returns the key state and pressure state of a stroke point

shift is the state of the Shift key

ctrl is the state of the Ctrl key

alt is the state of the Alt key

pressure is the pressure from pressure sensitive tablets

tabIndex is this is the index of the hit point that you want to get. If this value is 0 it will return the last hit point.

<void>thePainterInterface.getMirrorHitPointData <&point3>localMirrorHit <&point3>localMirrorNormal <&point3>worldMirrorHit <&point3>worldMirrorNormal <integer>tabIndex

localMirrorHit is In and Out parameter

localMirrorNormal is In and Out parameter

worldMirrorHit is In and Out parameter

worldMirrorNormal is In and Out parameter

The method lets you retrieve the mirror hit point data of the stroke:

localMirrorHit is the mirror hit in local space of the node that was hit

localMirrorNormal is the normal of the face that was hit in local space of the node that was hit

worldMirrorHit is the world space hit point

worldMirrorNormal is the world space normal of the hit face

tabIndex is the index of the mirror hit point that you want to get. If this value is 0 it will return the last hit point.

<point2>thePainterInterface.getHitMousePos <integer>tabIndex

Returns the mouse position of the indexed hit point in the stroke.

<integer>thePainterInterface.getHitTime <integer>tabIndex

Returns the time of the indexed hit point in the stroke.

<float>thePainterInterface.getHitDist <integer>tabIndex

Returns the distance of the indexed hit point in the stroke.

<point3>thePainterInterface.getHitVec <integer>tabIndex

Returns the vector of the indexed hit point in the stroke.

<integer>thePainterInterface.getHitCount()

Returns the number of hits in the stroke.

<node>thePainterInterface.getHitNode <index>sampleIndex

Returns the hit node of the supplied sample index.

<void>thePainterInterface.loadCustomPointGather <node>node <point3 array>pointList

Loads a custom point list for the specified node.

<bitArray>thePainterInterface.getPointGatherHits <node>node

Returns the hit list as bitArray.

<point3>thePainterInterface.getPointGatherPoint <node>node <integer>index

Returns the position of the indexed point from the specified node.

<float>thePainterInterface.getPointGatherStr <node>node <integer>index

Returns the indexed point’s Strength from the specified node.

<float>thePainterInterface.getPointGatherWeight <node>node <integer>index

Returns the indexed point’s Weight from the specified node.

<point3>thePainterInterface.getPointGatherNormal <node>node <integer>index

Returns the indexed point’s Normal vector from the specified node.

<void>thePainterInterface.clearStroke()

Clears the stroke.

<void>thePainterInterface.addToStroke <point2>pos <boolean>updatePointGather <boolean>updateViewPort

Adds a point to the stroke. When updatePointGather is supplied as true, the point will be included in the list. When updateViewPort is supplied as true, the point will be displayed in the viewport.

<boolean>thePainterInterface.getRandomHitOnPoint <integer>index

Returns a random hit on the specified point.

<boolean>thePainterInterface.getRandomHitAlongStroke <integer>index

Returns a random hit along the specified stroke.

<boolean>thePainterInterface.getTestHit <point2>Point

Returns true if there is a hit at the specified point, false otherwise.

<void>thePainterInterface.getCustomHitPointData <&point3>localHit <&point3>localNormal <&point3>worldHit <&point3>worldNormal <&float>str

localHit is In and Out parameter

localNormal is In and Out parameter

worldHit is In and Out parameter

worldNormal is In and Out parameter

str is In and Out parameter

The method lets you retrieve custom hit point data:

localHit is the hit position in local space

localNormal is the normal of the face that was hit in local space

worldHit is the world space hit point

worldNormal is the world space normal of the hit face

str is the strength of the brush at the time of the hit

<void>thePainterInterface.getCustomHitFaceData <&point3>bary <&integer>faceIndex <node>node

bary is In and Out parameter

faceIndex is In and Out parameter

This function lets you retrieve the custom hit face data.

bary - the barycentric coordinates of the face that was hit

faceIndex - the index of the face that was hit

node - the node that was hit

<boolean>thePainterInterface.isPointInside <point2>testPoint <point2 array>pointList

Returns true if the specified testPoint is inside the polygon defined by the pointList coordinates.

<point3>thePainterInterface.getMirrorCenter()

Returns the center of the mirror gizmo.

<void>thePainterInterface.ScriptFunctions <value>startStroke <value>paintStroke <value>endStroke <value>cancelStroke <value>systemEnd

Registers MAXScript functions to be called by the Painter’s callback system at the specified events. See Defining Custom Paint Tools Using the Painter Interface for more details.

<void>thePainterInterface.undoStart()

Causes the undo system to start recording. It must be paired with an undoAccept or undoCancel. Typically called in the start of a stroke function.

<void>thePainterInterface.undoAccept()

Accepts the current state of the undo record and puts it on the undo stack. Typically called in in the end stroke function

<void>thePainterInterface.undoCancel()

Cancels the current undo record and restores the system to the state before the undoStart. Typically called in the stroke cancel function.

See also

Defining Custom Paint Tools Using the Painter Interface


Trackbar Interface

The Trackbar Interface provides access to properties and methods of the trackbar. The trackbar interface can be retrieved using a function or property in maxOps interface :

trackBar_Interface = maxOps.trackBar

or

trackBar_Interface = maxOps.getTrackBar()

Mixin Interface: (maxOps.trackbar)

Interface: trackbar

Properties:

.visible : boolean : Read|Write

Displays or hides the trackbar

.filter : enum : Read|Write

filter enums: {#all|#TMOnly|#currentTM|#cbject|#mat}

Sets and gets the filter that determines which keys are displayed in the trackbar

.keyTransparency : integer : Read|Write

Sets/gets the key transparency value. Acceptable values range 0-255

.selKeyTransparency : integer : Read|Write

Sets/gets the selected key transparency value. Acceptable values range 0-255

.cursorTransparency : integer : Read|Write

Sets/gets the cursor transparency value. Acceptable values range 0-255

.affectChildren : boolean : Read|Write

Sets/gets the affect children mode.

NOTE:

The following properties require a redraw, but in some cases hiding and unhiding the trackbar gives a better result.

.showAudio : bool : Read|Write

Sets/gets whether or not the audio track is displayed in the trackbar

.showFrames : bool : Read|Write

Sets/gets whether or not frames are displayed in the trackbar

.showSelectionRange : bool : Read|Write

Sets/gets whether or not selection ranges are displayed in the trackbar

.showSnapToFrames : bool : Read|Write

Sets/gets whether or not keys are snapped to frames when moved

EXAMPLE

tbar = maxops.trackbar

tbar.showframes = false

tbar.redraw() -- Notice the result so far

tbar.visible = false

tbar.visible = true -- Notice the difference

Methods:

<void>redraw forceRedraw:<bool>

forceRedraw default value: false

Redraws the trackbar. If forceRedraw is set to true, the redraw will be forced.

<time>getNextKeyTime()

Gets the next key time. The "at time" context can be used to determine the starting point.

<time>getPreviousKeyTime()

Gets the previous key time. The "at time" context can be used to determine the starting point.

The following methods for Registering and Managing of Trackbar Key Filters were added to the interface in 3ds Max 7:

<index>registerFilter <value>callbackFilterFunction <value>callbackAdditionFunction <string>name <integer>id active:<boolean> stopTraversal:<boolean> active default value: false stopTraversal default value: true

Register a trackbar filter callback function.

The callbackFilterFunction is a MAXScript function which should expect 5 arguments in the form:

fn myCallbackFilterFunction theAnimatable theParent theSubAnimIndex theGrandParent theNode = (...)

theAnimatable: The first argument passed to the function will be the track whose controller's keys are to be filtered.

theParent: The second argument passed to the function will be the parent track of the track to be filtered.

theSubAnimIndex: The third argument passed to the function will be the sub-anim index of theAnimatable track inside theParent track,

theGrandParent: This fourth argument passed to the function will be the parent of theSubAnimIndex track. It is provided as an additional layer that is needed in case theParent argument is a ParamBlock2 or similar. For example, you may need to know that theGrandParent is a Bend Modifier and theSubAnimIndex is an index into the ParamBlock storage unit.

theNode: The fifth and last argument passed to the function will be the originating scene node whose subAnims are being traversed.

NOTE:

Either callbackFunction argument to TrackBar.RegisterFilter can be the value 'undefined'.

For a detailed explanation of the way the function is called and used, please see Exploring the Trackbar Filter Callback Functions

For sample filter functions, please see Trackbar Filter Callback Function Examples

<void>unRegisterFilter <index>index

Unregister the indexed filter function.

<integer>filterCount()

Returns the number of registered filter functions.

<int by value array>getFilterID <index>index

Returns the filter id of the indexed filter function.

<string by value>getFilterName <index>index

Returns the name of the indexed filter function as a string.

<boolean>isFilterActive <index>index

Returns true if the indexed filter is active, false otherwise.

<void>setFilterActive <index>index <bool>state

Sets the active state of the indexed filter to the supplied Boolean value.

See also

Interface: maxOps

Exploring the Trackbar Filter Callback Functions

Trackbar Filter Callback Function Examples


Interface: simpleManip

Interface: simpleManip

Properties

.mouseState : enum : Read

mouseState enums: {#mouseIdle|#mouseDragging|#mouseOverManip}

Methods

<void>clearGizmos()

This must be called at the beginning of the "updateGizmos" handler in order to clear the current gizmo cache.

<void>addGizmoMesh <mesh>mesh <integer>flags <point3>unselColor <point3>selColor

This creates a gizmo from a mesh (or geometry in 3ds Max lingo). The mesh can be any arbitrary 3ds Max mesh, and created with the tools in MAXScript for creating meshes. One convenient way to do this is to create an instance of a primitive and get the mesh from it.

The flags can be 0, or one or more of these value. If you want more than one flag to apply, then you add the values together.

<integer>flags: Use one of the following values:

0: gizmoDontDisplay

Tells the system to not display the gizmo. It will be hit-tested, but not displayed.

1: gizmoDontHitTest

Tells the system to not hit-test the gizmo. It will be displayed, but not hit-tested.

2: gizmoActiveViewportOnly

Tells the system to only display and hit-test this gizmo in the active viewport.

<void>addGizmoShape <Interface>gizmo <integer>flags <point3>unselColor <point3>selColor

This creates a gizmo from a shape object. The gizmoShape can be created using functions from the "manip" package, described below.

<integer>flags: Use one of the following values:

0: gizmoDontDisplay

Tells the system to not display the gizmo. It will be hit-tested, but not displayed.

1: gizmoDontHitTest

Tells the system to not hit-test the gizmo. It will be displayed, but not hit-tested.

2: gizmoActiveViewportOnly

Tells the system to only display and hit-test this gizmo in the active viewport.

3: gizmoUseScreenSpace

This tells the system to interpret the coordinates of the shape as device coordinates in the viewport, not as 3d values. The values are still specified as 3d points, but the "Z" coordinate is ignored.

4: gizmoUseRelativeScreenSpace

This is like gizmoUseScreenSpace, but the coordinates are specified as values from 0.0 to 1.0, and interpreted in each viewport as a percentage of the width or height of the viewport.

<void>addGizmoMarker <enum>marker <point3>position <integer>flags <point3>unselColor <point3>selColor

marker enums: {#point|#hollowBox|#plusSign|#asterisk|#xMarker|#bigBox|#circle|#triangle|#diamond|#smallHollowBox|#smallCircle|#smallTriangle|#smallDiamond|#dot|#smallDot}

The position is a point in 3d space, or 2d screen space. The flags are the same ones supported by addGizmoShape.

<point3>position : The position is a point in 3d space, or 2d screen space.

<integer>flags: Use one of the following values:

0: gizmoDontDisplay

Tells the system to not display the gizmo. It will be hit-tested, but not displayed.

1: gizmoDontHitTest

Tells the system to not hit-test the gizmo. It will be displayed, but not hit-tested.

2: gizmoActiveViewportOnly

Tells the system to only display and hit-test this gizmo in the active viewport.

3: gizmoUseScreenSpace

This tells the system to interpret the coordinates of the shape as device coordinates in the viewport, not as 3d values. The values are still specified as 3d points, but the "Z" coordinate is ignored.

4: gizmoUseRelativeScreenSpace

This is like gizmoUseScreenSpace, but the coordinates are specified as values from 0.0 to 1.0, and interpreted in each viewport as a percentage of the width or height of the viewport.

<void>addGizmoText <string>text <point3>position <integer>flags <point3>unselColor <point3>selColor

This creates a gizmo that is text on the screen. Note that text cannot be hit-tested or grabbed by the mouse. It is used for display purposes only.

<ray>getLocalViewRay <point2>m

This function takes a mouse position and returns the ray that passes through that mouse position in the direction of the view. It is returned in the local coordinates of the node that owns the manipulator target.

<void>updateGizmos <time>t <&string>toolTip

toolTip is In and Out parameter

See also

Scripted Manipulators

Interface: manip

Interface: simpleManip

Interface: gizmoShape

Interface: manipPlane

ConeAngle : helper

Plane_Angle : helper

Scripted Plug-ins

SliderManipulator : helper

uvwMappingHeightManip : helper

uvwMappingLengthManip : helper

uvwMappingUTileManip : helper

uvwMappingVTileManip : helper

uvwMappingWidthManip : helper


Interface: gizmoShape

Mixin Interface: manip.makeGizmoShape(...)

Interface: gizmoShape

This is a [ Mixin Interface ] exposing some methods of the Manipulator Gizmo Shape.

Methods:

<void><MixinInterface:gizmoShape>.startNewLine()

Starts a new line in the gizmo.

<void><MixinInterface:gizmoShape>addPoint <point3 by value>point

Adds a new point to the last line created.

<void><MixinInterface:gizmoShape>transform <matrix3 by value>point

Transforms the gizmo by the given matrix3 value.

See also

Scripted Manipulators

Interface: manip

Interface: simpleManip

Interface: manipPlane


Interface: manipPlane

This is a [ Mixin Interface ] returned by some properties of the manip Interface . It provides methods to get intersections with a manipulator plane.

Mixin Interface: (manip.msXYPlane)

Interface: manipPlane

Properties:

<MixinInterface:manipPlane>.normal : point3 by value : Read

Returns the normal of a plane.

<MixinInterface:manipPlane>.point : point3 by value : Read

Return the point that the plane passes through.

<MixinInterface:manipPlane>.planeConstant : float : Read

Return the value of the plane constant. This is the value of "D" in the equation that defines the plane:

Ax + By +Cz + D = 0

Methods:

<boolean><MixinInterface:manipPlane>.intersect <ray by value>ray <&point3>intersectionPoint

intersectionPoint is In and Out parameter

Intersects the given ray with the plane. Returns true on success. The intersection point is set in the "intersectionPoint" value passes by reference, which must be initialized to a Point3 value in advance.

<Interface><MixinInterface:manipPlane>.mostOrthogonal <ray by value>viewDir <Interface>plane

Returns the plane that is most orthogonal to the given ray. This means the plane that is most "square" to the view direction.

See also

Scripted Manipulators

Interface: manip

Interface: simpleManip

Interface: gizmoShape


MAXWrapper : Value

Value > MAXWrapper : Value

The MAXWrapper class is the superclass of all classes in MAXScript that represent 3ds Max objects, such as scene nodes, modifiers, materials, etc. MAXWrapper values contain references to the associated 3ds Max objects that allow it keep track of the object. This allows MAXScript to know when a 3ds Max object is transformed, deleted by the user, or its properties are changed.

The properties, operators, and methods that are common to all classes derived directly from the MAXWrapper class are described in MAXWrapper Common Properties, Operators, and Methods .

The following classes are derived directly from the MAXWrapper class. Other classes are derived from these classes, and inherit the properties and methods defined for the MAXWrapper class.

See also

Node

Modifier and SpacewarpModifier

Material

Atmospheric

Controllers

Render Effect

RenderElements

Bake Elements

BitmapIO Classes


MAXWrapper Common Properties, Operators, and Methods

Value > MAXWrapper : Value > MAXWrapper Derived Value

The following properties and methods are applicable to any value that is derived from MAXWrapper.

Properties

The following MAXWrapper value and class properties give you access to the plug-in category, such as Standard Primitives, Extended Primitives, or Particle Systems:

<MAXWrapperobject>.category Name, read-only

<maxclass>.category Name, read-only

<maxsuperclass>.categories Array, read-only

The category property returns a Name value containing the category. You can use it on either a 3ds Max object class, such as Line, Box, or Fog, or on an instance of any 3ds Max object class. For scene nodes, the category usually corresponds to one of the names in the drop down list in the Create panel. These are the categories such as #Standard_Primitives, #Compound_Objects, and #Particles_Only.

For modifiers, the category determines which group the modifier appears in the Configure Button Sets / Modifiers list. These are the categories such as #MAX_STANDARD, #MAX_EDIT, and #MAX_SURFACE.

For textures, the category determines which group the texture appears in the Material/Map Browser. These are the categories such as #2D (2D maps), #3D (3D maps), and #COMP (Compositors).

The categories property can be used on any of the 3ds Max object superclasses, such as Shape, GeometryClass, Helper, SpacewarpObject, TextureMap, or Modifier, to get a list of the available categories for that superclass, returned as an array of Names.

FOR EXAMPLE:

$line01.category -- returns #Splines

Gengon.category -- returns #Extended_Primitives

Shape.categories -- returns #(#Shape, #Splines, #NURBS_Curves)

<maxsuperclass>.classes Array, read-only

Returns an array of MAXClass values that belong to the MAXSuperClass. These MAXClass values can be used to create instances of the class.

FOR EXAMPLE:

--create an instance of each light class:

for aLight in light.classes do aLight()

<MAXWrapperobject>.classID

<maxclass>.classID

The classID property retrieves the internal 3ds Max Class ID of the MAXWrapper classes and objects.

The value returned is an array containing two numbers, PartA and PartB of the 3ds Max internal class ID.

For a MAXWrapper object, the value returned is the Class ID of the class the object is an instance of.

The combination of the PartA and PartB numbers is guaranteed to be unique for each class.

FOR EXAMPLE:

Box.classID -- returns #(16, 0)

b=box()

b.classID -- returns #(16, 0)

<MAXWrapperObject>.superClassID

<maxclass>.superClassID

Retrieves the 3ds Max superclass ID of the MAXWrapper classes and objects.

<maxclass>.creatable

Read-only Boolean property. Returns true if the class is flagged as being creatable. This property returning true does not guarantee that the class is really creatable.

<maxclass>.ispb2based

Read-only Boolean property. Returns true if the underlying class definition is a ClassDesc2, false if a ClassDesc. ClassDesc2 classes use ParamBlock2 , ClassDesc classes use ParamBlock (pre-3ds Max 3).

<maxclass>.localizedName

A read-only property which returns the localized name of the class.

Methods

copy <MAXWrapper_object>

The copy() function is implemented by all the 3ds Max objects available in MAXScript, such as scene objects, controllers, modifiers, materials, etc. You can use this function to make a clone of the source object, for example in situations where you want individual copies or you want to make a shared object unique.

FOR EXAMPLE:

addModifier $foo $baz.bend

will cause foo to share the bend modifier on baz, whereas:

addModifier $foo (copy $baz.bend)

will give foo a separate clone of the bend modifier on baz. Any changes to the bend modifier on foo will not affect baz and vice versa.

In the next example, we set up several objects all sharing a single rotation controller.

EXAMPLE:

c = bezier_rotation()

$foo.rotation.controller = c

$baz.rotation.controller = c

$bar.rotation.controller = c

To later make one of the controllers unique, you could do this:

$baz.rotation.controller = copy $baz.rotation.controller

When the MAXWrapper object is not a scene node, the copy is only created in MAXScript memory. When the MAXWrapper object is a scene node, a new scene node is created which is visible and accessible by the user in the 3ds Max viewports.

exprForMAXObject <MAXWrapper_object> [explicitNames:<boolean>]

Returns a string containing a MAXScript expression that will 'name' the specified MAXWrapper object using property access and indexes as needed.

FOR EXAMPLE:

If you have in variable m a bend modifier on a scene object named "foo", then:

exprForMAXObject m

would yield the string:

"$foo.bend"

When the explicitNames: option is set to true, explicit node names are returned. When set to false, selection relative names are returned. If not specified, the current Macro Recorder settings under Customize>Preferences>MAXScript tab>Code Generation are used.

This method is an exposure of an internal method used by the Macro Recorder. When the explicitNames: option is not specified, its output will vary depending on the Macro Recorder options.

MACRORECORDER EXAMPLE:

b=box()

$Box:Box02 @ [0.000000,0.000000,0.000000]

c=b.pos.controller

Controller:Bezier_Position

exprformaxobject c

"$Box02.pos.controller"

bm=bend()

Bend:Bend

addmodifier b bm

OK

exprformaxobject bm

"$Box02.modifiers[#Bend]"

Here, changing the Macro Recorder options from "Explicit scene object names" to "Selection-relative scene object names", yeilds:

exprformaxobject bm

"$.modifiers[#Bend]"

NOTE:

In some cases, the Macro Recorder generated code does not work as expected. One such case is the ambientColorController - exprForMaxObject() returns an invalid expression in this case:

exprForMaxObject ambientColorController

"Scene[#Environment].Ambient_Light.controller"

Possible workarounds to access the ambient color controller are

(getclassinstances scene)[1].Environment.Background_Color.controller

(getclassinstances RenderEnvironment)[1].Background_Color.controller

createInstance <maxclass> [keyarg1:v] [keyarg2:v] ...

This method is used to directly create the 'base objects' that you see in a Node (or any other object). The main use for this is to create temporary geometry base objects from which meshes will be extracted to help create the meshes for scripted geometry primitive plug-ins. The optional <keyargs> are the same base-object keyword arguments as can be supplied for the class constructor. These are typically the parameters of the base object.

FOR EXAMPLE:

b = createInstance Box length:10 height:40 width:20

creates an instance of a Box. This box will not appear in the 3ds Max viewports, as it is not a node. It only contains the geometry associated with the Box object. You can get at the mesh representation of these instanced objects with the mesh property, which yields a TriMesh value.

replaceInstances <old_MAXWrapper> <new_MAXWrapper> transferCAs:<bool>

Replaces all instances of the old MAXWrapper with the new MAXWrapper. Old and new MAXWrapper must have the same superclass.

If transferCAs is true, any custom attributes on the old_MAXWrapper are transferred to the new_MAXWrapper if there is at least one occurrence of transferring the reference.

References are not transferred for MAXWrapper values.

Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

WARNING:

Minimal error checking, use with extreme caution!

isValidObj <value>

Returns true if the value points to a MAX object (a MAXWrapper), and the MAX object has not been deleted.

NOTE:

In some cases the MAX object may have been deleted from the scene, but the object itself has not been deleted yet. This method will return true in this case.

getClassName <MAXWrapper>

Returns the class name of the MAXWrapper as a string value

Dependencies

An important internal mechanism in 3ds Max defines the dependency relationship between 3ds Max objects. For example, a material depends on its various maps, a path controller depends on its percent controller, a scene node depends on its base object, etc. The following method returns the MAXWrapper objects that depend on a specified MAXWrapper object.

refs.dependents <MAXWrapper_object> [immediateOnly:<boolean>]

Returns an array of the other 3ds Max MAXWrapper objects depend on the specified MAXWrapper object. The specified MAXWrapper object can be any MAXWrapper object, such as a scene node, controller, material, modifier, etc.

If the optional keyword immediateOnly is supplied and set to true, only the immediate dependents of the specified object will be returned.

FOR EXAMPLE:

refs.dependents $foo.material.diffuseMap

COULD RETURN

#(Material_#3, Material_#2, Map_#2:Noise, Material_#1)

which shows that the diffuseMap in $foo is referenced in material #1, material #2, material #3, and noise TextureMap #2.

The following example shows several objects being created, and sets up controllers on the objects which depend on other objects.

SCRIPT:

theSphere=sphere () -- create a sphere

theCone=cone radius1:0 radius2:20 -- create a cone

theHelix=helix height:100 pos:[100,100,0] -- create a helix

theCone.target=theSphere -- assign theSphere as target of theCone

-- a lookat controller is automatically

-- assigned to theCone

-- assign path controller to theSphere, path to follow is the helix

theSphere.position.controller=path path:theHelix

refs.dependents theSphere -- show dependents of the sphere

refs.dependents theCone -- show dependents of the cone

refs.dependents theHelix -- show dependents of the helix

OUTPUT:

$Sphere:Sphere02 @ [0,0,0] -- result line 1

$Cone:Cone02 @ [0,0,0] -- result line 2

$Helix:Helix02 @ [100,100,0] -- result line 3

$Sphere:Sphere02 @ [0,0,0] -- result line 4

Controller:Path -- result line 8

#(Controller:Look_At, $Cone:Cone02 @ [0,0,0]) -- result line 9

#() -- result line 10

-- following is output of line 11

#(Controller:Path, Controller:Position_Rotation_Scale, $Sphere:Sphere02 @ [0,0,0], Controller:Look_At, $Cone:Cone02 @ [0,0,0])

refs.dependsOn <MAXWrapper_object>

Returns an array of the other 3ds Max MAXWrapper objects that the specified MAXWrapper object directly depends on. The specified MAXWrapper object can be any MAXWrapper object, such as a scene node, controller, material, or modifier.

FOR EXAMPLE:

b = box()

refs.dependsOn b

RETURNS

#(Controller::Position_Rotation_Scale, Box)

This shows that the node directly depends on its transform controller and its base object. The node will also be indirectly dependent on the MAXWrapper objects that these objects depend on (the position, rotation, and scale controllers for the transform controller).

refs.dependson also returns the Custom Attributes of an object. In versions prior to 3ds Max 7, Custom Attributes were not considered by this method as technically they are not dependent on the object.

refs.dependencyLoopTest <MAXWrapper_object> <MAXWrapper_object>

Returns true if the two MAXWrapper objects would create a dependency loop, false otherwise.

FOR EXAMPLE:

a = box pos:[-100,0,0]

$Box:Box01 @ [-100.000000,0.000000,0.000000]

b = box pos:[100,0,0]

$Box:Box02 @ [100.000000,0.000000,0.000000]

a.material = standardMaterial()

Standardmaterial:Standard

refs.dependencyLoopTest a b

false

refs.dependencyLoopTest a a.material

true

refs.dependentNodes <MAXObject> firstOnly:<bool> baseObjectOnly:<bool>

Returns node(s) that are dependent on the specified MAXObject.

If firstOnly: is true, if no nodes are dependent on the specified MAXObject a value of 'undefined' is returned, otherwise a MAXNode value corresponding to the first dependent node found is returned.

If firstOnly: is false or not specified, the return value is always an array.

If baseObjectOnly: is true, only nodes where the MAXObject is the base object will be returned.

Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

notifyDependents <MAXObject> partID:<name> msg:<int> propogate:<bool>

Sends notification message to the dependents of the object.

Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

Valid partID values and their SDK equivalents are:

#topo | PART_TOPO
#geom | PART_GEOM
#texmap | PART_TEXMAP
#mtl | PART_MTL
#TM | PART_TM
#obj | PART_OBJ
#objectType | PART_OBJECT_TYPE
#select | PART_SELECT
#subSelType | PART_SUBSEL_TYPE
#display | PART_DISPLAY
#vertColor | PART_VERTCOLOR
#gfxData | PART_GFX_DATA
#dispApprox | PART_DISP_APPROX
#extension | PART_EXTENSION
#TMchannel | PART_TM_CHAN
#MTLChannel | PART_MTL_CHAN
#all | PART_ALL
#putInFG | PART_PUT_IN_FG

The default partID is #all.

The msg value corresponds to one of the REFMSG values specified in maxsdk\include\ref.h, and documented in the SDK Help file under topic "List of Reference Messages and the their PartID parameters". The default msg value is 0x050 (REFMSG_CHANGE), unless partID is #putInFG, in which case the default is 0x070 (REFMSG_FLAGDEPENDENTS).

If propogate: is true (the default), the messages are propagated to the dependents of the dependents, recursively.

This method is useful for notifying scripted controllers that a value used in the controller has changed.

FOR EXAMPLE, RUN:

global mySphereRadius = 10

s=sphere()

s.radius.controller = float_script()

s.radius.controller.script = "mySphereRadius"

NOW RUN:

mySphereRadius = 50

The viewport will not update to refect the change.

NOW RUN:

notifydependents s.radius.controller

The viewport updates to reflect that the dependents of the controller (the sphere base object and the node) have been notified that the controller has changed.

disableRefMsgs()

enableRefMsgs()

Disable/enable reference notification system. Must be paired.

Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

WARNING!

USE WITH EXTREME CAUTION!!!

See also

Access to MAXWrapper AppData

Nested Object Controller Functions

Nested Object Properties

Note Track Access


Access to MAXWrapper AppData

The AppData access methods give a simple form of access to the AppData capability in the 3ds Max SDK. The AppData mechanism provides a way for plug-ins to attach arbitrary data to any 3ds Max object in a scene, such as nodes, materials, modifiers, controllers, etc., that is permanently stored with that object in the 3ds Max scene file.

The following methods are used to read and store AppData for a MAXWrapper object:

setAppData <MAXWrapper_object> <integer_ID> <string>

Sets the AppData item of the given ID number on the given 3ds Max object to the <string> value. This creates a new item if needed or replaces the string contents if an item of that ID already exists.

getAppData <MAXWrapper_object> <integer_ID>

Returns the AppData item string of the given ID number from the given 3ds Max object. Returns the value undefined if the ID'd item is not present.

deleteAppData <MAXWrapper_object> <integer_ID>

Deletes the AppData item if the given ID number from the given 3ds Max object.

clearAllAppData <MAXWrapper_object>

Clears out all MAXScript-related AppData items from the given MAXWrapper object.

You can add as many AppData strings as you like to an object—you assign them each an integer identification number when they are first added and access them later using those IDs.

AppData strings can be attached to any MAXWrapper subclass instance, including scene nodes, modifiers, controllers, materials, atmospherics, etc.

NOTE:

The AppData is stored in the scene file only if its object is in the scene—if, for example, you create a material in MAXScript and do not assign it to any object or the material editor, it will not be saved in the scene file nor will its AppData.

If you want to associate certain AppData strings with the scene as a whole, it is recommended that you create a hidden dummy node with a unique name and attach the scene AppData to that node.

AppData in its full generality allows the C++ plug-in developer to store arbitrary binary data with an object. This is not directly possible with MAXScript, so the approach taken is to store and retrieve AppData text strings that can be built-up or parsed into complex MAXScript objects using a StringStream Value .

FOR EXAMPLE,

To store some numbers in an array on a scene node, you might do the following:

ss = StringStream ""

for v in data_values do print v to:ss

setAppData $foo 1 ss

and read them back after the scene has been saved and reloaded as follows:

ss = StringStream (getAppData $foo 1)

data_values = #()

while not eof ss do

append data_values (readValue ss)


Nested Object Controller Functions

Certain time and keyframe functions on controllers can be called on any 3ds Max object or collection of 3ds Max objects. If called in this way, they apply recursively to all the nested controllers within that object and on any on sub-objects and sub-controllers within those objects. In this way, they work in a manner similar to the object-level tracks in the 3ds Max Track View that allow you to manipulate keys and time for all the sub-objects and sub-controllers within them.

The time and controller functions that work this way are:

deleteTime

reverseTime

scaleTime

insertTime

setTimeRange

addNewKey

deleteKeys

selectKeys

deselectKeys

moveKeys

mapKeys

sortKeys

reduceKeys

addEaseCurve

deleteEaseCurve

setBeforeORT

setAfterORT

enableORTs

The above functions can be called on any 3ds Max object collection (such as a wild-card pathname or object set or array of objects ) and will recursively apply to all animation within those objects. For more information see Time and Key Functions on Object Hierarchies and Controller Time Functions .

FOR EXAMPLE,

insertTime $box01.xform 0f 10f

-- all keys after 0f in all controllers in the XForm modifier are moved by 10f

insertTime $box01 0f 10f

-- all keys after 0f in box01 are moved (transform, creation, modifiers)

selectKeys $box02.xform.gizmo.rotation.controller 0f 100f

-- selects keys in 0-100f. If controller is Euler, will select x, y and z keys

deleteTime $box* 10f 20f

-- delete time from frame 10 to frame 20 in all keys in all objects named $box* (works with—any pathname or array of objects)

insertTime $box03.children 0f 10f

-- inserts time in all controllers of all children of $box03

reduceKeys $box01.modifiers

-- applies key reductions to all controllers in all modifiers in $box01 (leaves—transform and creation parameters alone)


Nested Object Properties

Several of the properties on 3ds Max objects contain values that are themselves compound, for example <node>.pos yields a Point3, which itself contains x, y and z properties.

MAXScript provides a mechanism that lets you modify these nested properties on MAXWrapper objects in place such that assignment to them will affect that nested property on the 3ds Max object.

This mechanism depends on the nested property being accessed in one, cascaded property access.

FOR EXAMPLE,

$foo.pos.x += 23 -- move the node 23 units in x

$baz.rotation.angle *= 2 -- double the rotation

If you first get the intermediate value into some variable and then set the property on that value, the change will not be reflected in the original object, the connection is only maintained within a single cascaded property access.

FOR EXAMPLE,

p = $foo.pos -- get foo's position as a 'detached' point3

p.x += 23 -- set the x prop of that point, it doesn't know

-- about foo anymore, foo's pos is not changed

In this case, you would have to explicitly re-assign the free-standing point to $foo's position to affect $foo:

$foo.pos = p -- set foo's new position

In general, any property on a MAXWrapper object that is itself a foundation compound value such as a Point3 or Quat will yield a free-standing value when simply accessed and supports object sub-property assignment in cascaded property assignment.


Note Track Access

All MAXWrapper objects can have one or more note tracks assigned to them. These note tracks are visible in Track View as children of the MAXWrapper object. Note tracks provide a way for plug-ins to attach data to any 3ds Max object in a scene, such as nodes, materials, modifiers, controllers, etc., that is permanently stored with that object in the 3ds Max scene file. This data is stored in note keys, and a note track can contain any number of note keys.

The structure of note tracks is similar to the structure of key-able animation controllers. A note track is an instance of the class, and has a property called keys. The value returned by accessing the keys property is a MAXNoteKeyArray. The MAXNoteKeyArray contains the note keys. The keys themselves are accessed as if the MAXNoteKeyArray was an array.

See also

Notetrack Values

MAXNoteKeyArray Values

MAXNoteKey Values

Working with Note Tracks


Notetrack Values

The following methods are related to creating, adding, deleting Note tracks. See MAXNoteKeyArray Values and MAXNoteKey Values for information on accessing the contents of Note tracks.

Constructor

notetrack <name_string>

Creates a new, empty note track with the specified name. The name is only used to differentiate different note tracks in MAXScript but is not visible in 3ds Max.

Properties

<noteTrack>.keys MAXNoteKeyArray

Contains an array of note keys.

<noteTrack>.name String

Get/set the name of the note track.

Methods

getNoteKeyTime <notetrack> <index>

Returns the time of indexed note key.

getNoteKeyIndex < notetrack > <time>

Returns the index of the note key at the specified time.

Associated Methods

addNoteTrack <MAXWrapper_object> <NoteTrack>

Adds a new note track to the MAXWrapper object.

deleteNoteTrack <MAXWrapper_object> <NoteTrack>

Deletes specified note track from the MAXWrapper object.

hasNoteTracks <MAXWrapper_object>

Returns true if the MAXWrapper object has note tracks, false otherwise.

numNoteTracks <MAXWrapper_object>

Returns the number of note tracks applied to the MAXWrapper object as an integer.

getNoteTrack <MAXWrapper_object> <index_integer>

Returns the indexed note track applied to the MAXWrapper object. Index is 1-based.


MAXNoteKeyArray Values

A MAXNoteKeyArray represents all the note keys in a 3ds Max note track. See also MAXNoteKey Values and Notetrack Values . MAXNoteKeyArray values are mappable.

Constructors

<NoteTrack>.keys

The note key array can be constructed by accessing the keys property on the note track.

FOR EXAMPLE,

-- get first note track on controller:

nt=getNoteTrack $foo.position.controller 1

ntk=nt.keys -- note key array for note track

Properties

<NoteKeyArray>.count : Integer, read-only

Returns the number of objects in set

Operators

<NoteKeyArray>[<index_integer>]

Accesses member of collection. Indexes start at 1.

Methods

addNewNoteKey <NoteKeyArray> <time>

Adds a new note key to the note key array at the time specified. The value for the new note key is a null string. Returns the note key added.

deleteNoteKeys <NoteKeyArray> ( #allKeys | #selection )

Deletes note keys from the note key array according to the optional symbolic argument supplied.

#allKeys: deletes all keys in the note key array.

#selection: deletes the currently selected note keys

deleteNoteKey <NoteKeyArray> <index_integer>

Deletes the indexed note key. Key indexes are 1-based.

sortNoteKeys <NoteKeyArray>

Re-sorts note keys according to their times. Some MAXNoteKey operations can result in out of order note keys and this function must be called to correctly order note keys.

Associated Methods

getNoteKeyTime <notetrack> <index>

Returns the time of indexed note key.

getNoteKeyIndex < notetrack > <time>

Returns the index of the note key at the specified time.


MAXNoteKey Values

Note tracks store their notes as MAXNoteKey s. As seen by MAXScript, note keys are stored in a MAXNoteKeyArray. The MAXNoteKeyArray for a note track is accessed via the keys property of the note track.

For more information on MAXNoteKeyArrays, see MAXNoteKeyArray Values .

Constructor

addNewNoteKey <MAXNoteKeyArray> <time> [ #select ]

Adds a new note key to the note track at the time specified. The new note key is also selected in the track view if the #select optional argument is specified. The value for the new note key is a null string.

<MAXNoteKeyArray>[<index_integer>]

Properties

<MAXNoteKey>.time Time

Time value or number (interpreted as frames)

<MAXNoteKey>.selected Boolean

Specifies whether the key is selected. Read/write access.

<MAXNoteKey>.value String

String contained in the note key


Working with Note Tracks

Changing the time property of a note key may cause it to go out of time order relative to the other keys in the controller. You must call the sortKeys() function on the controller or associated MAXNoteKeyArray once all key time manipulations of this kind is complete so that animation will perform correctly.

FOR EXAMPLE,

s = sphere() -- create a sphere

$Sphere:Sphere02 @ [0.0,0.0,0.0]

ntp1 = NoteTrack "PosNT1" -- create a note track

Notetrack:PosNT1

ntp2 = NoteTrack "PosNT2" -- create another note track

Notetrack:PosNT2

-- apply first note track to sphere's pos controller:

addNoteTrack s.pos.controller ntp1

OK

-- apply second note track to sphere's pos controller:

addNoteTrack s.pos.controller ntp2

OK

-- check number of note tracks on pos controller:

numNoteTracks s.pos.controller

2

-- test to see if pos controller has note tracks:

hasNoteTracks s.pos.controller

true

-- add key to first note track, and select the key:

addNewNoteKey ntp1.keys 20 #select

#Note key(1 @ 20f)

-- add another key to first note track:

addNewNoteKey ntp1.keys 40

#Note key(2 @ 40f)

-- retrieve first note track on the pos controller:

n = getNoteTrack s.pos.controller 1

-- retrieve an instance of the note track key array

Notetrack:

nk=n.keys

#keys(20f, 40f)

-- set value for second note key:

nk[2].value = "Yo What's Up"

"Yo What's Up"

-- change the time for second note key. Now first key

nk[2].time = 10

10

nk[1].selected = true -- select the first note key

true

-- changed the time of the note keys, so re-sort:

sortNoteKeys nk

OK

nk.count -- check number of keys

2

nk -- display the note keys

#keys(10f, 20f)

-- To delete the note tracks and note keys:

deleteNoteKey nk 1 -- delete first note key

OK

deleteNoteKeys n.keys #allKeys -- delete all the note keys

OK

-- remove note track from pos controller:

deleteNoteTrack s.pos.controller ntp1

OK

-- remove note track from pos controller:

deleteNoteTrack s.pos.controller ntp2

OK


Node : MAXWrapper

Nodes represent 3ds Max scene objects such as geometry, cameras, shapes, etc. Each kind of 3ds Max scene object is represented by a class that inherits from Node.

The classes derived directly from the Node class are described in Node Subclasses . Other classes are derived from these classes, and inherit the properties and methods defined for the Node class.

The properties, operators, and methods that are common to all classes derived directly from the Node class are described in Node Common Properties, Operators, and Methods .

The Node class is derived from the MAXWrapper class, and inherits the properties and methods defined for that class. These properties and methods are described in MAXWrapper Common Properties, Operators, and Methods .


Node Common Properties, Operators, and Methods

Value > MAXWrapper > Node

The following properties and methods are applicable to any value that is derived from Node.

Constructors

<non_wild_card_pathname>

identifies a unique node in the scene

<objectset>[<integer>]

<wild_card_pathname>[<integer>]

n'th scene object in collection

<node_constructor> [ name: <string> ] \

[ prefix: <string> ] \

[ material: <material> ] \

[ target: <node> ] \

[ pos: <point3> ] \ -- default [0,0,0]

[ position: <point3> ] \ -- synonym for pos

[ rotation: <quat> ] \ -- default 0 rotation

[ scale: <point3> ] \ -- default 100% scale

[ pivot: <point3> ] \ -- default normal node pivot location

[ transform: <matrix3> ] \ -- default identity

[ isSelected: <boolean> ] \ -- default false

[ dir: <point3> ] -- set local z direction

The position and rotation values are relative to the current active grid if 'coordsys grid' is the current working coordinate system.

A <node_constructor> is one of the scene node classes listed in Node Subclasses , such as box, sphere, quadPatch, splineShape, etc.

FOR EXAMPLE:

b = box name:"foo" position:[10,10,10] height:20

All of the node constructors can take the above optional keyword arguments, along with any of general node properties or any of the properties for the particular node class as keyword arguments.

The name keyword can be used to specify the name for the created node. 3ds Max allows the same name to be used for more than one node.

The prefix keyword can be used in place of the name keyword argument to specify the start of the node name from which 3ds Max will generate a unique name by adding a series of digits, as it does when creating objects interactively.

FOR EXAMPLE:

for i in 1 to 100 do sphere prefix:"baz"

--creates 100 spheres, giving each a unique name

--beginning with "baz", such as $baz01, $baz02, $baz03, etc.

The material keyword can be used to apply the specified material to the created node.

The target keyword can be used to automatically apply a LookAt controller to the node's transform track, and set the specified node as the LookAt target.

The transformation arguments, pos, scale, rotation, and pivot, are applied to the new object in the order they are specified in the constructor call, so you can control transform order. The pos, scale, and rotation arguments are mutually exclusive with the transform argument which can be used as an alternative way to set the node's complete transform matrix in one go.

NOTE:

Exercise care if you specify the target keyword. When you specify a target object, 3ds Max stores with the target object the last object it was assigned as a target of. If you delete the target object, the behavior of 3ds Max is to also delete the object looking at it. If the target object is a targetobject class object, deleting an object looking at it will also delete the target object, even if another object is also looking at it.

The performance of iterating and indexing the 'selection' and '$' object sets has been substantially improved in 3ds Max 4. In versions prior 3ds Max 4, the whole scene was traversed looking for selected nodes when indexing, iterating or snapshotting into an array, causing big delays in large scenes. Now, the 'selection' object set uses direct access to the SDK explicit current selection set.

Properties

See General Node Properties and Node Transform Properties for details about the properties accessible on scene nodes.

Methods

Most node methods are automatically mapped over node collections.

IsValidNode <var>

Returns true if <var> is a node value, and the node has not been deleted. Otherwise, it returns false.

move <node> <point3> -- mapped

scale <node> <point3> -- mapped

rotate <node> <angle> <axis_point3> -- mapped -- angle in degrees

rotate <node> <quat> -- mapped

rotate <node> <eulerangles> -- mapped

all the transform operations operate in the current working coordinate system. See Context Expressions .

copy <node> -- mapped

reference <node> -- mapped

instance <node> -- mapped

All the clone operations can take any of the standard node creation optional keyword arguments which are applied after the node has been copied.

These functions clone all the original node's transform controllers and keys and the visibility controller and its keys if a visibility track has been assigned.

NOTE:

maxOps.cloneNodes is the preferred way to copy, instance, or reference nodes. Node interdependencies are retained, and more of the node properties are copied across.

snapshot <node> -- mapped

This function provides functionality similar to the SnapShot tool in 3ds Max. It generates a new node that contains a copy of the world-state mesh of the source <node> at the time that the snapshot is made. Any existing modifiers are collapsed out of the new node and the mesh snapshot accounts for any space warps currently applied. As with the clone methods (copy, reference and instance,) you can add any of the standard node creation keyword arguments, such as pos:, name:, etc.

The following example achieves an animation-based snapshot similar to the SnapShot tool in 3ds Max:

FOR EXAMPLE:

for t in 0 to 100 do at time t snapshot $foo

delete <node> -- mapped

Deletes the specified node(s).

instanceReplace <dest_node> <src_node> -- mapped

referenceReplace <dest_node> <src_node> -- mapped

Lets you turn existing nodes into instances and references to other nodes. You can use these, for example, to replace the geometry of one node with another, perhaps for implementing custom level-of-detail tools.

The <dest_node> is turned into an instance or reference to the <src_node>. As a new instance, existing geometry and modifiers are removed and replaced by the <src_node>'s, but all the node-related properties are kept, such as material, transform, visibility, name, etc. As a new reference, the base object for the <dest_node> becomes the world-state of the <src_node>, such that any changes to the src_node will affect the <dest_node>, but changes to the <dest_node> are local to it.

It is possible to develop a custom scripted version of the File/Replace function with these functions and the mergeMAXFile() function by temporarily changing the name of a node in the current scene, merging in that named node from another, making the first node an instance of the newly merged node with instanceReplace(), deleting the newly merged node and renaming the old node back again.

Both these functions are collection mapped, so you can make a selection of objects all instance or reference the same object,

FOR EXAMPLE:

instanceReplace $foo* $baz

--makes all the foo* objects be instances of baz's geometry

--and modifier stack.

areNodesInstances <node> <node>

Returns true if the two nodes are instances.

Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

FOR EXAMPLE:

InstanceMgr.GetInstances $ &rptInstances

trueInstances = for n in rptInstances where \

(areNodesInstances $ n) collect n

attachObjects <node1> <node2> [ move:<boolean> ]

Makes <node2> a child of <node1>. Resets the current location of <node2> to the location of <node1> unless move:false is specified.

getTMController <node>

Returns the transform controller for the node.

bindSpaceWarp <node> <spacewarp_node>

Binds the scene node to the space warp object scene node. Space warp bindings show up in the modifier stack and can be accessed like any other modifier. Use the deleteModifier() function to unbind objects from space warps. See Modifier and SpacewarpModifier for more information about working with the modifier stack.

getPolygonCount <node>

Returns a 2 element array containing the current number of faces for the node in the first element, and the current number of vertices for the node in the second element. The number of faces and vertices returned are the number that would be present if the node was converted to a mesh object.

isShapeObject <node>

Returns true if the node is a shape object, false otherwise

numSurfaces <node>

Returns the number of parametric surfaces in the object. At the current time, Loft objects are the only objects where more than one surface is present (ie. loft of a donut).

isSurfaceUVClosed <node> <surface_index_integer>

Returns a 2 element array indicating if the parametric surface is closed in the U and V dimensions (ie. a torus is closed in both U and V). Note that not all objects have this method implemented, and will return a default value of #(true, true).

getTransformAxis (<node>|undefined) <index>

Returns the transform axis of the indexed axis system of the node as a <matrix3> value. Normally a node just has 1 transform axis. In some cases (like being in the Local Reference Coordinate System, in object SO mode, and having multiple SO selected), multiple transform axes exist. If index > the number of transform axis, the transform for the first transform axis is returned.

If the first argument is the value 'undefined' (instead of a node), the viewport common axis is returned instead. If the Coordinate System Center (getCoordCenter()) is #local or the Reference Coordinate System (getRefCoordSys()) is #local, #parent, or #gimbal, the last calculated common axis is returned.

The transform returned by this method can be used in an "in coordsys" context and an "about" context to move, rotate, or scale an object about the current 3ds Max UI Reference Coordinate System and Center.

FOR EXAMPLE:

fn axisRotate obj rotation =

(

local axis

local objA = if classof obj == objectSet or classof obj == array then obj else #(obj)

if getCoordCenter() != #local then

(

axis = getTransformAxis objA[1] 0

for obj1 in objA do in coordsys axis about axis rotate obj1 rotation

)

else

(

for obj1 in objA do

(

axis = getTransformAxis obj1 0

in coordsys axis about axis rotate obj1 rotation

)

)

)

invalidateTM <node> -- mapped

Invalidates the node's transformation matrix cache.

invalidateTreeTM <node> -- mapped

Invalidates the node's transformation matrix cache and notify the node's subtree that the transformation matrix has changed.

The following MAXScript function can be used to force an update of an object whose transform is partially controlled by a scripted controller (such as a script controller on the position track):

FOR EXAMPLE:

mapped fn TMInvalidate obj =

 ( at time (currenttime-1) obj.transform

  nodeInvalRect obj

  invalidateTreeTM obj

  redrawViews()

 )

getNodeTM {<node> | <rootnode>}

Returns the transformation matrix of the given node or rootnode as a Matrix3 value. The rootnode may be the root node of an XRef Scene object. Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

invalidateWS <node> -- mapped

Invalidates the node's world space cache.

getNodeByName <string> exact:<bool> ignoreCase:<bool> all:<bool>

Returns first node with the specified name. If exact is false (default), the normal MAXScript node name comparisons are performed.

ignoreCase specifies whether the comparisons should be case sensitive or not. When set to true, non-case-sensitive comparison will be performed.

If all is true, an array of nodes with the specified name is returned.

Default is exact:false ignoreCase:true all:false

NOTE:

When Fast Node Name Lookup is on, case sensitive comparisons are done first, case insensitive comparisons (if enabled) are done second, and then inexact matching (if enabled). If Fast Node Name Lookup is off, the first node found that matches the conditions is returned. So if you have 2 nodes called "AA" and "aa", and you say: 'getnodebyname "AA"', if Fast Node Name Lookup is on you will always get node AA back. If Fast Node Name Lookup is off, you can get either node back because both nodes match the conditions.

EXAMPLE:

--If you have a scene with 3 nodes: "AA", "aa", and "B B":

$AA

$Box:AA @ [...]

$aa

$Teapot:aa @ [...]

$bb

Sphere:B B @ [...]

getnodebyname "AA" exact:true

$Box:AA @ [...]

getnodebyname "AA" exact:false

$Box:AA @ [...]

getnodebyname "AA" ignoreCase:true

$Box:AA @ [...]

getnodebyname "AA" ignoreCase:false

$Box:AA @ [...]

getnodebyname "Aa" exact:true

$Box:AA @ [...]

getnodebyname "Aa" exact:false

$Box:AA @ [...]

getnodebyname "Aa" ignoreCase:true

$Box:AA @ [...]

getnodebyname "Aa" ignoreCase:false

undefined

getnodebyname "aa" exact:true

$Teapot:aa @ [...]

getnodebyname "aa" exact:false

$Teapot:aa @ [...]

getnodebyname "B B" exact:true

$Sphere:B B @ [...]

getnodebyname "B_B" exact:true

undefined

getnodebyname "BB" exact:true

undefined

getnodebyname "B_B" exact:false

$Sphere:B B @ [...]

getnodebyname "BB" exact:false

$Sphere:B B @ [...]

getnodebyname "AA" all:true

#($Teapot:aa @ [...], $Box:AA @ [...])

snapshotAsMesh <node>

Returns world state of node as a <mesh> value.

getInheritanceFlags <node>

setInheritanceFlags <node> (#all | #none | <bitarray>) keepPos:<boolean> -- mapped

Get and set the inheritance flags for the specified node as an <bitarray>.

If a bit is on, the corresponding inheritance is turned on. The order of the bits is: #{POS_X,POS_Y,POS_Z,ROT_X,ROT_Y,ROT_Z,SCALE_X,SCALE_Y,SCALE_Z}

If keepPos:false is specified, the node may move when an inheritance is turned on or off.

getTransformLockFlags <node> -- mapped

setTransformLockFlags <node> (#all | #none | <bitarray>) -- mapped

Set and set the transform lock flags for the specified node as an <bitarray>.

If a bit is on, the corresponding transform lock is turned on. The order of the bits is: #{POS_X,POS_Y,POS_Z,ROT_X,ROT_Y,ROT_Z,SCALE_X,SCALE_Y,SCALE_Z}.

If #all is specified instead, all locks will be checked.

If #none is specified, all locks will be unchecked.

See How To ... Develop A Transform Lock Script for an example.

Render-Related Methods

getVisController <node>

Returns an instance of the node's visibility controller. Returns undefined if the node does not have a visibility track.

getInheritVisibility <node>

Returns true if the node inherits the visibility of its parent object (if any), false if not.

setInheritVisibility <node> <boolean>

Sets whether the node inherits the visibility of its parent object (if any). If <boolean> is true, node inherits visibility. If <boolean> is false the node does not inherit visibility.

getImageBlurMultController <node>

Returns the node's Image Motion Blur Multiplier controller. Returns undefined if not Image Motion Blur Multiplier controller has been assigned to the node.

setImageBlurMultiplier <node> <time> <number>

Sets the node's Image Motion Blur Multiplier value at the specified time to the specified value.

setImageBlurMultController <node> <controller>

Sets the node's Image Motion Blur Multiplier controller to the specified controller.

setMotBlur <node> <integer>

Sets which type of motion blur to use for node. If <integer> = 1, None. If <integer> = 2, Object Motion Blur. If <integer> = 3, Image Motion Blur.

setRenderable <node> <boolean>

Sets whether the node is renderable. If <boolean> is true, node is renderable. If <boolean> is false the node is not renderable.

getRenderID <node>

Returns the RenderID of the node. A value of 65535 is returned if the scene has not yet been rendered, or the node is not renderable. The RenderIDs of the nodes are output to the NODE_RENDER_ID g-buffer channel by the renderer.

setRenderID <node> <integer>

Sets the RenderID of the node to the specified value. This value is not "sticky" - it is not saved with the scene, and it will be replaced by the renderer when the next render occurs.

Group-Related Methods

group <node_collection> [ name:<string> ] [ prefix:<string> ] \

[ select:<boolean> ]

Makes a group of the given nodes and returns the group node. You can optionally specify the group name or group name prefix. Not specifying a name or specifying a group name prefix ensures that the group name assigned is unique. Specifying select:true selects the group after it is made.

FOR EXAMPLE:

group $box* name:"boxes" --makes a group of all box*'s named "boxes".

group selection --groups current selection.

ungroup <group_head_node> -- mapped

Ungroups one level of a group node.

FOR EXAMPLE:

ungroup $group01 --ungroups group $group01

explodeGroup <group_head_node> -- mapped

Ungroups all levels in a group node.

isGroupHead <node>

Returns true if node is group head, false otherwise.

isGroupMember <node>

Returns true if node is in a group, false otherwise.

isOpenGroupMember <node>

Returns true if <node> is a member of a group, and that group is open.

isOpenGroupHead <node>

Returns true if <node> is the head of a group, and that group is open.

setGroupOpen <group_head_node> <boolean>

Sets whether the group is set as open or closed. If <boolean> is true, the group is set as open. If <boolean> is false the group is closed.

WARNING!

Use the following methods with care!

You can place nodes in states that are impossible to accomplish using the 3ds Max user interface.

setGroupMember <node> <boolean>

Sets whether the node is a group member or not. If <boolean> is true, node is set as a group member. If <boolean> is false, and the node is a group member, the node is set as not being a group member and is unlinked from the group head.

NOTE:

If you set a node to be a group member using this method, you need to set the node to be a child of a group head. Otherwise, the node name is not shown in the Select By Name dialog.

FOR EXAMPLE:

setGroupHead $dummy01 true

append $group03.children $dummy01

setGroupHead <node> <boolean>

Sets whether the node is flagged as a group head or not. If <boolean> is true, node is flagged as a group head. If <boolean> is false, the node is set as not being a group head.

NOTE:

If you flag a node as a group head using this method, the node's mesh will not be displayed in the viewports, and its properties will not be shown in the Modify panel. If you flag a group head node as not being a group head using this method, you will not be able to Open or Explode the group via the Group menu command.

FOR EXAMPLE:

-- create a set of spheres, group them, and test group head and member of group

mySpheres=for i=1 to 5 collect sphere pos:(random [-100,-100,0] [100,100,0])

group MySpheres name:"MyGroup"

isGroupHead $MyGroup -- returns true

isGroupMember $sphere01 -- returns true

-- check to see if group is open. Open group and test member of group

isOpenGroupHead $MyGroup -- returns false

setGroupOpen $MyGroup true

isOpenGroupMember $sphere01 -- returns false

-- create a new set of spheres, append the group to the set, and then group them all

NewSpheres=for i=1 to 3 collect sphere pos:(random [-100,-100,0] [100,100,0])

append NewSpheres $MyGroup

group NewSpheres name:"BiggerGroup"

-- open the group head, test member of group, and then close the groups.

setGroupOpen $BiggerGroup true

isOpenGroupMember $MyGroup

setGroupOpen $MyGroup false

setGroupOpen $BiggerGroup false

Node Viewport State Methods

hide <node> -- mapped

Hides the specified node or node collection.

unhide <node> [doLayer:<boolean>] -- mapped

Unhides the specified node or node collection.

If the optional doLayer keyword is set to true and the node is in a layer that is hidden, the entire layer is unhidden. When false (the default), just the node is unhidden.

freeze <node> -- mapped

Freezes the specified node or node collection.

unfreeze <node> [doLayer:<boolean>] -- mapped

Unfreezes the specified node or node collection.

If the optional doLayer keyword is set to true and the node is in a layer that is frozen, the entire layer is unfrozen. When false (the default), just the node is unfrozen.

flagForeground <node> <boolean> -- mapped

Controls the disposition of scene nodes in the viewport foreground/background planes, so you can influence interactive performance on a node. Nodes placed in the foreground plane are redrawn individually and so interactive changes to them through spinners in scripted rollout panels are much faster.

The boolean argument puts the scene node(s) into the foreground plane if true, or into the background plane if false. You should be judicious in putting nodes in the foreground plane, because putting too many objects in the foreground plane reduces the foreground plane's effectiveness. Remember to unflag objects when you don't need to interactively control them any more.

getTrajectoryOn <node>

Returns true if Trajectory is shown for the node, false otherwise.

setTrajectoryOn <node> <boolean>

Sets whether Trajectory is shown for the node. If <boolean> is true, Trajectory is shown. If <boolean> is false, Trajectory is not shown.

isBoneOnly <node>

Returns true if the node's showLinksOnly property is true.

getCVertMode <node>

Returns true if node is displayed using vertex colors in shaded viewports, false otherwise.

setCVertMode <node> <boolean>

Sets whether to display the effect of assigned vertex colors for the node in shaded viewports. If <boolean> is true, node is displayed using vertex colors. If <boolean> is false, node is displayed using the material or wireframe color.

getShadeCVerts <node>

Returns true if the vertex color display for the node is shaded in the viewports, false otherwise.

setShadeCVerts <node> <boolean>

Sets whether the vertex color display for the node is shaded in the viewports. When true, the colors are unshaded and appear in their pure RGB values. When false, the colors appear like any other assigned color in the viewports.

Node Selection Methods

clearSelection()

clearNodeSelection [ redraw:<boolean> ]

Deselects all currently selected scene nodes. Scene is redrawn unless redraw:false is specified.

deselect <node> -- mapped

Deselects the given node(s).

FOR EXAMPLE:

deselect $box* --deselects all items whose names start with "box".

deselectNode <node>

Deselects a single node.

select <node> -- mapped

Deselects any currently selected objects and then selects the node(s) you specified.

selectMore <node> -- mapped

Adds the node(s) to the set of selected objects. If you want to build a set of selected objects from scratch in a loop, you can use clearSelection() to clear the selection before entering the loop, and use selectMore() in the loop to add objects to the set of selected objects.

Modifier Stack Related Methods

validModifier [ <node> | <objectset> | <group> ] <modifier | modifier_class>

Tests whether a particular modifier or modifier class may be added the given <node> or to all of the objects in the objectset or group. Returns true if so, false if not.

The validModifier() method operates exactly as does the Modify panel in determining modifier applicability. Any modifier that takes a deformable object will return true for all scene objects except Helpers. This corresponds to the Modify panel's behavior of allowing modifiers such as Bend, Taper, etc. to be applied to lights and cameras, space warp objects, etc., as well as geometry types like box, sphere, etc., but not helpers such as dummys or bones.

The validModifier() method will return true if an empty <objectset> is specified, or if a <group> is specified and the modifier is valid for all members of the group. In these cases, applying the modifier using the addModifier() method will fail, because the <objectset> is empty in the first case, or because the modifier cannot be applied to the dummy object that is the parent object of the objects in the group. You will need to test for these conditions in your script, or use the modPanel.addModToSelection() method described in Modify Panel .

addModifier <node> <modifier> [before:index] -- mapped

Applies the modifier to all instances of the node(s) to which the function is applied. The optional before: keyword argument can be used to insert the modifier into the node's modifier stack just before the indexed modifier, counting from the top of the stack.

Since 3ds Max 3, addModifier() does not preserve the sub-object selection that might be active in the modifier stack when adding the modifier. If you want to add a modifier and preserve the sub-object selection, use the modPanel.addModToSelection() method described in Modify Panel .

If <node> is a collection, an instance of the modifier is placed on each of the nodes in the collection. Unlike interactively applying a modifier to a selection, the position and size of each modifier instance's gizmo corresponds to position and size of the node the modifier instance is applied to. To apply a modifier to a collection in the same manner that 3ds Max applies modifiers, use the modPanel.addModToSelection() method described in Modify Panel .

Also see Modifier and SpacewarpModifier for more details.

deleteModifier <node> <modifier_or_index> -- mapped

Lets you delete modifiers from the modifier stack. Takes either a modifier value which is present on the <node> stack, or an index specifying the index of the modifier to delete, counting from the top of the stack.

collapseStack <node> -- mapped

Collapses the modifiers out of a stack, leaving a resultant editable base object corresponding to the class of the node(s) on top of their stack. If there are no modifiers in the stack when this is called, no action is taken. If you want to force an object to be an editable mesh, use the function convertToMesh().

Node Modifier Transform Context Methods

getModContextTM <node> <modifier>

Returns a Matrix3 value giving the modifier's context transform for the local coordinates used in modifier sub-object gizmos. Accessing the transform properties of a modifier sub-object such as a gizmo or a center in MAXScript yields values that are relative to that modifier's context transform, equivalent to the values shown in track view for those properties. If the modifier is not operating on a sub-object selection, such as a face or vertex selection, or if the modifier was interactively applied to an object selection, this context TM is the local coordinate space of the object itself. However, if the modifier is operating on either an object selection set or a sub-object selection, the context transform gives the position and orientation of that selection, and so you can use the getModContextTM() function to get the world-space transform properties of any of its sub-objects.

getModContextBBoxMin <node> <modifier>

getModContextBBoxMax <node> <modifier>

These functions complement the getModContextTM() function and can be used to derive the world-space coordinates of the bounding box of the modifier context. This can be used, for example, to determine the bounds of a modifier operating on a sub-selection or the bounds of an FFD lattice. This is particularly useful for scripting FFD control point placement, since these control points live in a 0-to-1 lattice space—the mod context bounding box gives the world space bounds of this lattice space allowing you to compute scaled lattice space coordinates from world coordinates. The functions return Point3 values for the minimum and maximum extents of the bounding box.

setModContextTM <node> <modifier> <matrix3>

Sets the modifier context transformation matrix of the specified modifier on the given node. Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

setModContextBBox <node> <modifier> <point3 min> <point3 max>

Sets the modifier context bounding box of the modifier on the given node to the specified minimum and maximum values. Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

See Modifier Sub-Object Transform Properties for examples of using the above methods.

Node Deformable Methods

isDeformable <node>

Returns true if the node's object is deformable. Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

WHAT ARE DEFORMABLE OBJECTS?

A deformable object is an object with points that can be modified. Internally, these points can be stored in any form the object wants. They are accessed through a virtual array interface with methods to get and set the 'i-th' point.

This abstraction layer allows 3ds Max to apply the same modifiers to the various Geometry classes like Editable Meshes, Editable Poly, Splines, Patches and Nurbs without specific knowledge of the internal structures of these classes. The modifier simply operates on points provided by the object via the virtual array interface methods, but these points could be vertices, Bezier spline knots and tangents, Patch knots and tangents and so on.

See the simpleMod Scripted Plugin for a scripted modifier that can operate on points in this manner by implementing the 'on map <index> <point> do' handler.

NOTE

While isDeformable might return true for some nodes, this does not necessarily mean that they can be deformed. For example, all legacy particle systems like Snow, Superspray and Blizzard return true but are not being affected by deformations, while all geometry primitives return false but can be deformed.

The method simply wraps the SDK method and returns the value provided by the object when asked wether it is deformable or not.

FOR EXAMPLE:

for g in geometryClass.classes do

(

 try

 (

  o = execute (g as string + "()")

  if isDeformable o then

   format "% is Deformable.\n" g

  else

   format "% is NOT Deformable.\n" g

 )catch(format "Failed To Create %\n" g)

)

numPoints <node>

Returns the number of deformable points for the node's object. Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

getPointPos <node> <index>

Returns the position of the indexed point for the node's object. Position is returned in current coordinate system. Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

Node Bounding Box Methods

nodeGetBoundingBox <node> <matrix3>

Returns a 2 element array containing the min and max points of the node's bounding box in coordinate system matrix3 as point3 values. Positions returned are always in the specified matrix3 coordinate system.

Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

FOR EXAMPLE:

--Create a teapot and a camera (turn on Orthographic Projection). Run:

bb= nodeGetBoundingBox $teapot01 $camera01.transform

in coordsys $camera01 point pos:bb[1]

in coordsys $camera01 point pos:bb[2]

--Note that this does not correct for the camera's FOV.

nodeLocalBoundingBox <node>

Returns a 2 element array containing the min and max points of the node's local bounding box. Positions returned are in the current coordinate system.

Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

FOR EXAMPLE:

--Create a teapot. Run:

bb= nodeLocalBoundingBox $teapot01

point pos:bb[1]

point pos:bb[2]

Node Conversion Methods

convertToMesh <node> -- mapped

This function converts appropriate scene object types into Editable Meshes. It is similar to collapseStack() in that it will remove all modifiers present, but unlike collapseStack() it will always replace the base object with an editable mesh version, even if there are no modifiers present.

convertToMesh() can be applied to any object that an Edit Mesh modifier can work on, such as geometry and shapes, but not helpers, space warps, lights, etc. If the object cannot be converted, the function returns undefined.

convertToSplineShape <node> -- mapped

Converts the given scene node to a SplineShape object. If the object cannot be converted (typically, if it is not a shape), the function returns undefined. Any modifiers present will be collapsed. The collapseStack() function can also be used as can the collapse button in the modifier stack dialog in 3ds Max; both generate a SplineShape, but will only do so if there is at least one modifier present.

canConvertTo <node> <class>

Allows you to test whether a given node is convertible into a given class. Returns true or false.

FOR EXAMPLE:

if canConvertTo $foo NURBSSurface then ...

The kinds of classes you can convert objects to are the generic editable forms including Mesh, SplineShape, NURBSCurve, NURBSSurface, etc.

convertTo <node> <class> -- mapped

This function is a general form of the existing specific conversion functions such as convertToMesh(), convertToSplineShape(), etc.

convertToSplineShape() can be written as:

FOR EXAMPLE:

convertTo $circle01 SplineShape

If the conversion is not supported, the function returns the value undefined.

convertToNURBSSurface <node> -- mapped

convertToNURBSCurve <node> -- mapped

These functions work on those primitive geometry and shape classes that support conversion to NURBS (such as boxes, spheres, circles, lines, etc.). If an object does not support conversion, the function returns undefined.

Node Utility Methods

isDeleted <MAXWrapper_object>

This function yields the result true if the object has been deleted and false if it still exists in the scene. Using the function only makes sense in situations where references to 3ds Max objects are held in variables or arrays or passed as parameters and you want to determine whether the object has been deleted from the scene. Performing an operation on a deleted 3ds Max object referenced in a variable or array otherwise generates an exception. Any kind of 3ds Max object can be tested in this way, scene objects, modifiers, controllers, materials, etc.

FOR EXAMPLE:

sel = selection as array -- snapshot selection

...

-- <one or more objects in the selection are deleted,

-- by the user or other scripts>

...

for obj in sel

where not isDeleted obj do

move obj [10,0,0]

When a node has been deleted,

<node> == undefined returns false

<node> != undefined returns true,

FOR EXAMPLE:

if mynode != undefined and not isdeleted myNode do ...

distance <node> <node>

Computes the distance between the pivot points of the two specified nodes.

intersectRay <node> <ray>

Computes the closest intersection of the ray and the surface of the given node. Returns another Ray which defines the position of intersection in 3D space and the surface normal direction vector at that point. The intersection test respects the face normals of the node, i.e. if a face's normal points away from the ray's source, an intersection test is not performed on that face. intersectRay() works if the world state of the node (the state of the node at the top of the node's stack) has a surface, such as an editable mesh, a Standard, Extended, or Compound Primitive, or a Patch or NURBS surface object. Splines and NURBS curves do not have a surface. Returns undefined if the ray doesn't intersect the node, the faces it does intersect point away from the ray's position, or the node does not have a surface.

intersectRayEx <node> <ray>

Takes a ray and computes the closest intersection to the surface of the given node. It returns an array with the following three elements.

  1. A Ray defining the position of intersection in 3-space and the surface normal direction vector at the point.

  2. The index of the face the ray intersects with

  3. The barycentric coordinates of the face that was hit.

This method only works if the world state of the node is a mesh, either because it started as an editable mesh or because it has modifiers applied that convert the node to a mesh. Unlike intersectRay(), this method will not work if the node is a Standard or Extended Primitive - the node's stack must evaluate to a mesh. The intersection test respects the face normals of the node, i.e. if a face's normal points away from the ray's source, an intersection test is not performed on that face. Returns undefined if the ray doesn't intersect the node, the faces it does intersect point away from the ray's position, or the node isn't a mesh.

WHAT ARE BARYCENTRIC COORDINATES?

Barycentric coordinates are the coordinates relative to the triangular face. The barycentric coordinates of a point p relative to a triangle describe that point as a weighted sum of the vertices of the triangle.

If the barycentric coordinates are b0, b1, and b2, then

p = b0*p0 + b1*p1 + b2*p2

where p0, p1, and p2 are the positions of the vertices of the triangle.

The Point3 returned by this method has the barycentric coordinate stored in its three component values. The coordinate is relative to the triangular face that was intersected.

Barycentric coordinates can also be used to interpolate any quantity whose value is known at the vertices of the triangle.

Following is an example of finding the UV coordinates at the intersection point:

FOR EXAMPLE:

s = sphere material:(standardMaterial diffuseMap:(checker()))

showTextureMap s.material s.material.diffuseMap on

--

-- Add a normal modifier to make the sphere into a mesh

addModifier s (normalModifier())

r = ray [-100,5,0] (s.center-[-100,5,0])

--

-- Get the Intersection details

arr = (intersectRayEx s r)

--

-- Create a dummy at the point of intersection

dummy pos:(arr[1]).pos

--

-- Get the texture face

tf = getTVFace s arr[2]

--

-- Get the UVW verts of the face

tv1 = getTVert s tf.x

tv2 = getTVert s tf.y

tv3 = getTVert s tf.z

--

-- Calculate the texture vertices at point of intersection from

-- the barycentric coordinates

tv = tv1*arr[3].x + tv2*arr[3].y + tv3*arr[3].z

--

-- Delete the modifier

deleteModifier s 1

intersectRayScene <ray>

Performs intersectRay on all nodes in the scene.

Returns an array of results, one entry per node hit, where each entry is a 2 element array containing the node and the intersectRay result for that node.

The intersection is performed for all geometry objects, including hidden ones.

Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

FOR EXAMPLE

(

local r = ray [0,0,0] [1,0,0] --define a ray along X

for i = 0 to 4 do --loop 5 times

(

 box pos:[i * 30, 0, 0] --create a box

)

local hits = intersectRayScene r --intersect with scene

print hits --Misses box 1 because ray originates inside the box

)

#($Box:Box02 @ [30.000000,0.000000,0.000000], (ray [17.5,0,0] [-1,0,0]))

#($Box:Box03 @ [60.000000,0.000000,0.000000], (ray [47.5,0,0] [-1,0,0]))

#($Box:Box04 @ [90.000000,0.000000,0.000000], (ray [77.5,0,0] [-1,0,0]))

#($Box:Box05 @ [120.000000,0.000000,0.000000], (ray [107.5,0,0] [-1,0,0]))

OK

intersects <node> <node>

Returns true if the bounding boxes of the two specified nodes overlap, or false if they do not overlap.

printStack <node>

Prints a representation of the current modifier stack for the given node.

Node User Properties

Roll over and click a tab to jump to related description:

getUserProp <node> <key_string>

Retrieves the node's user property with the given key as a string. <key_string> is either a String or a Name value. If the key does not exist, a value of undefined is returned.

setUserProp <node> <key_string> <value>

Sets the node's user property with the given key to the given value.

getUserPropBuffer <node>

Retrieves the entire user property buffer as a string containing all the user property settings. This is effectively the contents of the User Defined Properties box in the 3ds Max Object Properties dialog.

setUserPropBuffer <node> <string>

Sets the user property buffer to the given string.

See Node User-Defined Properties and Methods for more information on these methods.

Inverse Kinematics Methods

The following methods get and set the node's IK values as seen in the Hierarchy panel, Object Parameters rollout.

getRotTaskWeight <node>

Returns the rotation binding weight for the node.

setRotTaskWeight <node> <float>

Sets the rotation binding weight for the node.

getPosTaskWeight <node>

Returns the position binding weight for the node.

setPosTaskWeight <node> <float>

Sets the position binding weight for the node.

getTaskAxisState <node> <pos_or_rot_integer> <axis_integer>

Returns true or false to indicate if the specified axis is turned on for position or rotation binding. If an axis is turned off, the specified axis is no longer influenced by the follow object or the IK Controller Position end effector. <pos_or_rot_integer> sets whether the method returns the position state or the rotation state: 0 specifies position; 1 specifies rotation. <axis_integer> sets the axis to check: 0 specifies X, 1 specifies Y, 2 specifies Z.

setTaskAxisState <node> <pos_or_rot_integer> <axis_integer> <boolean>

Sets the axis state for position or rotation binding to the specified boolean value. See getTaskAxisState() for a description of the parameters.

mirrorIKConstraints <node> <axis_integer> <pos_or_rot_integer>

Mirrors the specified IK constraints on the specified node's transform controller about the specified axis. <axis_integer> specifies the axis of reflection: 0 for X, 1 for Y, 2 for Z. <pos_or_rot_integer> specifies which type of constraints are being mirrored: 0 for position, 1 for rotation.

nodeIKParamsChanged <node>

Call this method when one of the node level IK parameters has been changed.

OKToBindToNode <ik_node> <node>

Returns true if the <ik_node> can be bound to the <node> as a follow object, false otherwise. If the <ik_node> is not part of an IK system, this method always returns true. This method tests <node> to see if its transform is in any way already dependent on the IK system, and returns false if it is.

Miscellaneous Methods

classOf <node>

Returns the class of the world state of the node (the state of the node at the top of its stack). If no modifiers are applied to the base object, the class returned is the class of the base object. If modifiers are applied to the base object, the class returned is the class of the node as it exits the last modifier. For example, if you apply a Bend modifier to a Box, the Bend modifier converts the incoming Box primitive to a mesh, and the class returned by classOf is Editable_Mesh. You can get the class of the base object in all cases by using classOf <node>.baseObject.

isPointSelected <node> <point_index>

Returns true if the specified point is selected, false if not. The definition of a 'point' varies depending on the object type. For meshes, it is the mesh vertex. For a spline, it is the knot. For NURBS objects, it is the vertex or control point.

pointSelection <node> <point_index>

Returns a floating point weighted point selection if the object supports soft selections. Most object types just return 1.0 if the point is selected and 0.0 if not. Only NURBS and Editable Mesh objects currently support weighted point selection.

nodeInvalRect <node>

Invalidates the rectangle in the viewports that the node is occupying. Rectangles flagged as invalid will be update on the next screen redraw.

stopCreating <node>

This method stops the creation of the current object, if any. This method is primarily used to ensure that a NURBS objects is fully created, which it until the creation is stopped. This method will also deactivated any activated object create buttons in the Create panel.

Associated Methods

uniqueName <prefix>

Generates a unique scene node name from a prefix string by adding a series of digits, in the same manner the 3ds Max does as you create objects in the scene. This name is only guaranteed to be unique until the next scene node creation.

FOR EXAMPLE

$foo.name = uniqueName "foo"

See also

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods

General Node Properties

Node Transform Properties

Node User-Defined Properties and Methods

Nested Object Properties

Class and Object Inspector Functions

Dynamic Properties

Node Subclasses

NURBS Node Properties and Methods


General Node Properties

Roll over and click a UI Control to jump to related property's description:

All the properties listed here are accessible on any node subclass. Unless otherwise noted, these properties can not be animated.

<node>.name String default: varies

Get or set the scene object's name.

<node>.baseObject A subclass of Node default: varies

Access the base object in a scene node. This has relevance in nodes that have modifiers present that change the node type as it is processed up the stack. For example, a line with an extrude modifier starts out as a Shape and turns into an Editable Mesh at the top of the stack, its so-called world state. The baseObject property gives you access to the base object in the modifier stack. Because the classOf() function on scene node objects returns the class of the world state object (the top of the stack), you can use the baseObject property to determine the class of the original object used to create the node.

<node>.baseObject is writable since 3ds Max 5.1.

EXAMPLE

s=sphere()

b=box()

s.baseobject = b.baseobject

<node>.material Material default: undefined

Get or set the object's material.

<node>.parent Node default: undefined

Get or set the parent of the object. If the object is a top-level object, accessing the parent property will return undefined.

EXAMPLE

foo_mom = $foo.parent

$foo.parent = $baz

Setting this property has the effect of detaching <node> from its original parent and attaching it as a child of the specified node.

You can detach an object and make it a top-level object by assigning undefined to the parent property:

$foo.parent = undefined

<node>.children NodeChildrenArray default: undefined

This yields a special array subclass, NodeChildrenArray. See NodeChildrenArray Values . A NodeChildrenArray can be accessed using normal MAXScript array indexing and can be sequenced over in a for loop or with collection-mapped functions,

EXAMPLE

c = $foo.children[i]

move $foo.children [10,10,10]

for c in $baz.children do print c

You can get the number of children via the count property:

num_children = $foo.children.count

You cannot directly set a child by indexing into NodeChildrenArray, but you can append new children using the append() function and delete children using the deleteItem() function,

FOR EXAMPLE

$foo.children[$foo.children.count+1]=$baz -- does not work

append $foo.children $baz -- works

deleteItem $foo.children $baz -- removes $baz as child

The ordering of child indexes corresponds to the ordering shown in the 3ds Max hierarchy view, which is the order in which the children were added to the parent.

<node>.mesh TriMesh

For scene nodes or base objects that are Editable Mesh objects, or are convertable to Editable Mesh objects, this property yields a TriMesh containing a copy of the source object's mesh after any modifiers have been applied, but before any space warps have been applied. This property is read-only unless the scene node or base object is an Editable Mesh object, in which case the specified TriMesh replaces the base object. See Editable_Mesh : GeometryClass and TriMesh : Value for more information on TriMesh and Editable Mesh.

Target/LookAt Related Properties

<node>.isTarget Boolean default: false

Returns true if then node is the target of another object's LookAt controller, false if it is not. If the object is the automatically created target object of a light's or camera's LookAt controller, and you set this property to false, you can delete the target object without causing the light or target to be deleted.

<node>.lookAt Node default: undefined

Get a node that is looking at <node>, or set a node to look at <node>. This is the converse of the <node>.target property. If <node> is not the target of some object's LookAt controller, the value undefined is returned. If <node> is the target of more than one object, only one such object is returned. If this property is used to set <node> as the target of another object, a LookAt controller is automatically assigned to that object.

<node>.target Node default: undefined

Get or set the target node for <node>'s LookAt controller. Returns undefined if there is no target or the node does not have a LookAt controller. If this property is used to set an object as the target of <node>, a LookAt controller is automatically assigned to <node>. Exercise care if you assign a node to the target property. When you specify a target object, 3ds Max stores with the target object the last object it was assigned as a target of. If you delete the target object, the behavior of 3ds Max is to also delete the object looking at it. If the target object is a targetobject class object, deleting an object looking at it will also delete the target object, even if another object is also looking at it.

<node>.targetDistance Float default: undefined

Get or set the distance from the node to its target. Returns undefined if <node> does not have a target. Setting this property moves the target along the object-to-target vector to the distance specified.

FOR EXAMPLE

$spot01.targetDistance

$cam2.targetDistance = 100

Viewport Related Properties

<node>.isSelected Boolean default: false

Get or set whether the node is selected.

<node>.isHidden Boolean default: false

Get or set whether the node is flagged as hidden in the viewports. A node may be hidden even if this property is false. If the node is flagged as frozen and Hide Frozen Objects is on in the Hide rollout in the Display panel, the node will be hidden regardless of this property's value.

A node is hidden in the viewport if:

1. The node's hidden flag is set,

2. The node's layer hidden flag is set,

3. The node's category is hidden via Hide By Category, or

4. The node is frozen and Hide Frozen Objects is enabled

The node's isHidden property reflects a combination of conditions 1 and 2. The property returns true if either condition 1 or 2 is true. Setting the property to true sets the node's hidden flag. Setting the property to false clears both the node's and the node's layer's hidden flag.

Condition 2 can be handled by getting the node's layer and checking the layer's isHidden property using theNode.INodeLayerProperties.layer.isHidden

For handling Condition 3, see the hideByCategory structure added in 3ds Max 6.

Condition 4 can be handled by getting the node's frozen status using theNode.isFrozen and checking the maxOps.hideFrozenObjects property.

<node>.isNodeHidden Boolean default: false

The node's isNodeHidden property reflects only condition 1 listed above. The property returns true if the node's hidden flag is set, false if not. Setting the property sets only the node's hidden flag.

<node>.isHiddenInVpt Boolean default: false

This is a read-only property that returns true if any of the 4 conditions is true, that is, the node is hidden in the viewport for some reason.

<node>.isFrozen Boolean default: false

Get or set whether the node is frozen in the viewports.

A node is frozen in the viewport if:

1. The node's frozen flag is set, or

2. The node's layer frozen flag is set

The node's isFrozen property reflects a combination of conditions 1 and 2. The property returns true if either condition 1 or 2 is true. Setting the property to true sets the node's frozen flag. Setting the property to false clears both the node's and the node's layer's frozen flag.

Condition 2 can be handled by getting the node's layer and checking the layer's isFrozen property using theNode.INodeLayerProperties.layer.isFrozen

<node>.isNodeFrozen Boolean default: false

This property reflects only condition 1 described above. The property returns true if the node's frozen flag is set, false if not. Setting the property sets only the node's frozen flag.

<node>.xray Boolean default: false

Get or set whether the node is displayed in See Through mode in shaded viewports.

<node>.boxMode Boolean default: false

Get or set whether the node is displayed in box mode in the viewports.

<node>.allEdges Boolean default: false

Get or set whether all the node's edges are displayed in the viewports.

<node>.vertexTicks Boolean default: false

Get or set whether all the node's vertices will be displayed as ticks in the viewports.

<node>.backFaceCull Boolean default: false

Get or set whether the node's back faces are culled (not displayed) in the viewports.

<node>.showTrajectory Boolean default: false

Get or set whether the node's trajectory is displayed in the viewports.

<node>.ignoreExtents Boolean default: false

Get or set whether the extents of the node is ignored when performing a zoom extents.

node>.showFrozenInGray Boolean default:true

Get/Set whether the node will be displayed as gray when frozen.

<node>.wireColor Color default: random color

Get or set the node's wireframe color

<node>.showLinks Boolean default: false

Get or set whether to display a wireframe representation of the hierarchical link(s) from the node to its children.

<node>.showLinksOnly Boolean default: false

Get or set whether to display only the wireframe representation of the hierarchical link(s) for the node. Setting this property to true also sets showLinks to true.

<node>.showVertexColors Boolean default: false

Get or set whether to display the effect of assigned vertex colors for the node in shaded viewports.

Exposed by the INode Interface .

<node>.vertexColorType Name

vertexColorType enums: {#color|#illum|#alpha|#color_plus_illum}

Get/set the vertex color display type.

Exposed by the INode Interface .

FOR EXAMPLE

$Sphere01.vertexColorType = #illum

<node>.vertexColorsShaded Boolean default: false

Get or set whether the vertex color display for the node is shaded in the viewports. When true, the colors are unshaded and appear in their pure RGB values. When false, the colors appear like any other assigned color in the viewports.

<node>.isDependent Boolean default: false

Returns true if the node has its dependent flag set, otherwise returns false. A node is dependent in the sense of 3ds Max's Views/Show Dependencies mode. When the Modify panel is open, Show Dependencies will show all the nodes that are dependent on the current modifier or object being editing by highlighting them in green, and the dependent flag for the node is set. This property will always return false if the Modify panel is closed, or if Views/Show Dependencies is off. This property is read-only.

Layer Related Properties

<node>.displayByLayer Boolean default: true

When true, object visibility will be controlled by the Layer.

<node>.motionByLayer Boolean default: true

When true, Motion Blur will be controlled by the Layer.

<node>.renderByLayer Boolean default: true

When true, Rendering will be controlled by the Layer.

<node>.colorByLayer Boolean default: true

When true, the object will use the Layer's color. When false, the object's color will be used instead.

<node>.globalIlluminationByLayer Boolean default: true

When true, the advanced lighting inclusion/exclusion will be controlled by the layer.

Rendering Related Properties

<node>.visibility Boolean default: true -- animatable

This is a boolean property (unlike its value as a signed float in the 3ds Max Track View) - true or on denotes visible, false or off invisible. Animate this property to control an node's visibility at render-time,

FOR EXAMPLE

animate on

(

at time 0 $foo.visibility = on

at time 35 $foo.visibility = off

at time 57 $foo.visibility = on

)

By default, there is no controller assigned to the visibility track. Accessing the .controller property of the visibility track will throw an error. In order to be able to add keys and manipulate them, there must be a controller assigned. Animating the property as shown above will force 3ds Max to assign a controller automatically. You can also assign a controller manually to the .visibility property:

FOR EXAMPLE

--assigns a controller:

$foo.visibility = bezier_float()

--set the current value to semi-visible:

$foo.visibility.controller.value = 0.5

--animate the value to 0 on frame 100

animate on at time 100 $foo.visibility.controller.value = 0.0

The controller for this property is stored in the 1st subAnim of the node. You can also access this controller (if existing) as:

<node>[1].controller -- the visibility controller

You can also get a node's visibility controller using the getVisController() method.

<node>.renderable Boolean default: true

Get or set whether the node is renderable.

<node>.inheritVisibility Boolean default: true

Get or set whether the node inherits the visibility of its parent object (if any). This property parallels the Inherit Visibility property in an object's right-click Object Properties dialog.

<node>.primaryVisibility : boolean : Read|Write

Gets/Sets the node’s Visible to Camera option.

Exposed by the INode Interface .

<node>.secondaryVisibility : boolean : Read|Write

Gets/Sets the node’s Visible to Reflection/Refraction option.

Exposed by the INode Interface .

<node>.receiveShadows Boolean default: true

Get or set whether the node receives shadows when rendered. This property parallels the Receive Shadows property in an object's right-click Object Properties dialog.

<node>.castShadows Boolean default: true

Get or set whether the node casts shadows when rendered. This property parallels the Cast Shadows property in an object's right-click Object Properties dialog.

<node>.applyAtmospherics : boolean : Read|Write

Gets/Sets whether the node will be affected by atmospheric effects.

Exposed by the INode Interface .

<node>.renderOccluded Boolean default: false

Get or set whether to Render Occluded Objects behind the node. This property parallels the Render Occluded Objects property in an object's right-click Object Properties dialog.

<node>.gbufferChannel Integer default: 0

Get or set the node's g-buffer Object ID channel value. Valid object ID values in 3ds Max range from 0 to 65535. This property parallels the G-Buffer Object Channel property in an object's right-click Object Properties dialog.

Motion Blur

<node>.imageMotionBlurMultiplier Float default: 1.0 -- animatable

Get or set the node's image motion blur multiplier value. The controller for this property is stored in the 6th subAnim of the node. You can access this controller as:

<node>[6].controller -- the imageMotionBlurMultiplier controller

You can also get and set a node's imageMotionBlurMultiplier controller using the getImageBlurMultController() and setImageBlurMultController() methods.

<node>.motionBlurOn Boolean default: true

Get or set whether motion blur is enabled for the object. This property parallels the Motion Blur Enabled property in an object's right-click Object Properties dialog.

<node>.motionBlurOnController Controller default: undefined

Get or set the motion blur on/off controller used for the node.

<node>.motionBlur Name default: #none

Get or set the type of motion blur to be used for the node. Valid parameter values are: #none, #object, and #image. For backward compatibility, this property can also be set to false for none or true for object motion blur. This property parallels the Motion Blur type specified in an object's right-click Object Properties dialog.

mental ray Indirect Illumination Properties

Roll over and click a UI area to jump to its description:

<node>.generatecaustics Boolean default: false

Get or set whether the node generates caustics. Caustics are not supported by the 3ds Max scanline renderer.

<node>.rcvcaustics Boolean default: true

Get or set whether the node receives caustics. Caustics are not supported by the 3ds Max scanline renderer.

<node>.generateGlobalIllum Boolean default: false

Get or set whether the node generates global illumination. Global illumination is not supported by the 3ds Max scanline renderer.

<node>.rcvGlobalIllum Boolean default: true

Get or set whether the node receives global illumination. Global illumination is not supported by the 3ds Max scanline renderer.

See also Interface: INodeMentalRayProperties for access to the mental ray Displacement properties.


HideByCategory Properties and Methods

The following variables and methods are accessible through the hideByCategory structure:

Properties:

hideByCategory.geometry

Get/set whether Geometry objects are hidden. This includes Particle Systems but not Bones. Target Objects created using targetObject() but not assigned as lookAt target will also be affected by this category.

hideByCategory.shapes

Get/set whether Shapes are hidden.

hideByCategory.lights

Get/set whether Lights are hidden. Targets are of GeometryClass, but they will be hidden if used by a Light.

hideByCategory.cameras

Get/set whether Cameras are hidden. Targets are of GeometryClass, but they will be hidden if used by a Camera.

hideByCategory.helpers

Get/set whether Helpers are hidden. Targets are of GeometryClass, but they will be hidden if used by a Tape helper.

hideByCategory.spacewarps

Get/set whether Space Warps are hidden.

hideByCategory.particles

Get/set whether Particles are hidden. Particles are of GeometryClass, thus are being hidden by both this category and by the .geometry category. This includes all particle systems like Particle Flow and Legacy Particle Systems.

hideByCategory.bones

Get/set whether bones are hidden. Bones are geometrySuperclass, but are NOT being affected by the Geometry category because it would be counter-productive during rigging sessions.

Methods:

hideByCategory.all()

Set all Hide By Category categories as hidden.

hideByCategory.none()

Set all Hide By Category categories as not hidden.

See also

Node Common Properties, Operators, and Methods

General Node Properties


Node Transform Properties

Unless otherwise noted, the following transform properties are always interpreted with respect to the current working coordinate system as defined by the currently active coordsys context . The default coordsys is world. The pos, rotation, and scale properties of a node are aliases to the corresponding subcontroller for the node's transform controller. If the transform controller does not have one of these subcontrollers, accessing the corresponding node property will result in an "Unknown property" error message. For example, the LookAt controller does not have a Rotation subcontroller, and the IK controller does not have any subcontrollers. You can still access the transform values using the Matrix3 properties of the node's transform property, for example, objpos=obj.transform.translationpart.

<node>.transform : Matrix3 -- can read/write to. If written to,

: the Matrix3 value is decomposed into its

: position, rotation, and scale values, and these

: values are stored in the respective position,

: rotation, and scale controllers, if those

: controllers exist and can be written to.

<node>.pos : Point3 --can use .position synonym throughout

<node>.pos.controller : Controller --can use .track synonym throughout

<node>.pos.isAnimated : Boolean, read-only --true if position is animated

<node>.pos.keys : MAXKeyArray

<node>.pos.track : Controller --synonym of .pos.controller

<node>.rotation : Quat

<node>.rotation.x_rotation : Float --X rotation of node

<node>.rotation.y_rotation : Float --Y rotation of node

<node>.rotation.z_rotation : Float --Z rotation of node

<node>.rotation.controller : Controller --can use .track synonym throughout

<node>.rotation.isAnimated : Boolean, read-only --true if rotation is animated

<node>.rotation.keys : MAXKeyArray

<node>.rotation.track : Controller --synonym of .rotation.controller

<node>.scale : Point3 -- fraction

<node>.scale.controller : Controller --can use .track synonym throughout

<node>.scale.isAnimated : Boolean, read-only --true if scale is animated

<node>.scale.keys : MAXKeyArray

<node>.scale.track : Controller --synonym of .scale.controller

<node>.dir : Point3 -- local z-axis direction vector

Rotates node so that the node's Z axis points in the specified direction. The node is rotated around its Z axis such that the Y axis points as much as possible in the world -Z direction.

Getting and setting <node>.dir now respects the current coordinate system. Previously, this property was always in world coordinates.

<node>.max : Point3, read-only --max coordinates of node's bounding box

<node>.min : Point3, read-only --min coordinates of node's bounding box

<node>.center : Point3 -- coordinates of center of node's bounding box

<node>.transform : Matrix3 -- node's main transformation matrix

NOTE:

Rotation in the internal transformation matrices is left-handed in contradiction to the 3ds Max user interface and MAXScript. Take care when mixing rotation derived from these matrices and rotation used in rotation-related functions or from rotation properties.

<node>.pivot : Point3 -- node's pivot point position

<node>.objectOffsetPos : Point3

<node>.objectOffsetRot : Quat

<node>.objectOffsetScale : Point3

Node geometry's position, rotation, and scale offset from the pivot in world coordinates.

<node>.objectTransform : Matrix3, read-only

Node geometry's offset in world coordinates.

SCRIPT

-- Setting a node's rotation relative to world space without

-- messing with its position:

fn setNodeWorldRotation theNode theRot =

(

in coordsys (transmatrix theNode.transform.pos)

theNode.rotation = theRot

)

setNodeWorldRotation $ (eulerangles 45 45 0)

See also

Using Node Transform Properties


Align Pivot and Reset Transform Methods

The following methods provide access to the Align Pivot and Reset Transform functionality available in the Hierarchy tab and to the ResetXForm Utility functionality. Available in 3ds Max 6 and higher.

Methods:

ResetXForm <node> -- mapped method

Same as the Reset XForm utility in the Utilities tab - applies XForm modifier to node, stores the current transformations in the gizmo and resets the object transformations.

CenterPivot <node> -- mapped method

Same as Hierarchy/Pivot/Affect Pivot Only - Center to Object.

CenterObject <node> -- mapped method

Same as Hierarchy/Pivot/Affect Object Only - Center to Pivot.

WorldAlignPivot <node> -- mapped method

Same as Hierarchy/Pivot/Affect Pivot Only - Align to World.

WorldAlignObject <node> -- mapped method

Same as Hierarchy/Pivot/Affect Object Only - Align to World.

AlignPivot <node> -- mapped method

Same as Hierarchy/Pivot/Affect Pivot Only - Align to Object.

AlignObject <node> -- mapped method

Same as Hierarchy/Pivot/Affect Object Only - Align to Pivot.

AlignToParent <node> -- mapped method

Aligns the pivot to the node's parent's pivot, or to world if no parent.

ResetTransform <node> -- mapped method

Same as Hierarchy/Pivot/Reset Transform.

ResetScale <node> -- mapped method

Same as Hierarchy/Pivot/Reset Scale.

ResetPivot <node> -- mapped method

Same as Hierarchy/Pivot/Reset Pivot.

See also

Node Transform Properties

What Are Mapped Operations in MAXScript?


Using Node Transform Properties

This topic provides information on three transforms related to nodes—the Node Transform Matrix, the Object-Offset Transform Matrix, and the Object Transform Matrix. The Node and Object-Offset Transform Matrices are stored by 3ds Max. The Object Transform Matrix is derived from these two matrices. This topic also presents information on how these transforms are constructed and how they are used by 3ds Max, and how they can be accessed and manipulated in MAXScript.

The Pivot Point—The Node Transform Matrix

The transform center, or pivot point, is the location about which a rotation takes place, or to and from which a scale occurs. All nodes in 3ds Max have a pivot point. You can think of the pivot point as representing a node's local center and local coordinate system. The pivot point of a node is used for a number of purposes:

  • As the center for rotation and scaling.

  • Defines the transform origin for linked children.

  • Defines the joint location for Inverse Kinematics.

The thing that most users think of as the pivot point—graphically represented in 3ds Max by the axis tripod that is displayed when a node is selected and the coordinate system is set to local—is actually just a visual representation of the node's transform matrix.

The node's transform matrix is what is controlled by the transform controller that places the node in the scene. The transform controller controls the transform relative to the node's parent.

Construction of the Node Transform Matrix for the PRS Transform Controller

The PRS controller uses sub-controllers to create the final transform. There are three sub-controllers—one for Position, one for Rotation, and one for Scale. The PRS controller is passed the transform matrix of the node's parent. If the node has no parent, the matrix starts out as the identity matrix. The PRS controller first calls the position controller, then the rotation controller, then the scale controller. First the position controller pre-multiplies the input matrix is by the position value. If the matrix passed is the identity matrix, this is equivalent to setting the bottom row (the translation row) of the matrix. Next, the rotation controller pre-multiplies the matrix by the rotation value. Finally, the scale controller pre-multiplies the matrix by the scale value.

Some position controllers can actually apply more than just position to the matrix. For example, the Path Controller, when the Follow switch is active, actually applies some rotation to have the node remain tangent to the path it is following. Thus when the rotation controller receives the matrix, the matrix already has some rotation applied.

The matrix, after the position, rotation and scale controllers have updated it, becomes the Node Transform Matrix 3ds Max uses to position, rotate and scale nodes in the scene. Thus, the entire transform is:

Node Transform Matrix = Controller Scale * Controller Rotation *

Controller Position * Parent Transform Matrix

The Object-Offset Transform Matrix

The Object-Offset Transform Matrix provides an offset of the geometry of an object from its node.

One can see a node's pivot point graphically represented in 3ds Max by selecting a node, going to the Hierarchy branch of the Hierarchy panel, selecting the 'Pivot' button, and choosing either the 'Affect Pivot Only' or 'Affect Object Only' button. This displays a large axis tripod that shows the location and orientation of the node's pivot point. By choosing one of these buttons, and using the Move/Rotate/Scale toolbar controls, a user can manipulate the position of the geometry of the object independent of the pivot point. Or they may manipulate the pivot point independent of the geometry of the object.

The way the user is able to independently manipulate the pivot and the object is managed internally using the Object-Offset Transform Matrix. The Object-Offset Transform Matrix affects how the geometry of the object is related to the node. The Object-Offset Transform Matrix transforms the geometry of the object itself some amount from the node.

To understand how the Object-Offset Transform Matrix is used, consider the following example from the 3ds Max user interface. In the Hierarchy branch under 'Pivot', when the user has chosen the 'Affect Object Only' button they are free to move the geometry of the object around independent of the node. The pivot point does not move—only how the geometry of the object is oriented relative to the pivot. What is happening internally is that the Object-Offset Transform Matrix is being manipulated. This transform is simply an additional offset that is applied to the geometry of the object that is independent of the node. The Object-Offset Transform Matrix is not inherited by any child nodes.

As another example consider the use of the 'Affect Pivot Only' button. This mode lets the user move the pivot without affecting the position of the geometry of the object. When the user moves the pivot point, what is actually happening is the Node Transform Matrix is being altered (to re-orient the pivot point), then the Object-Offset Transform Matrix is adjusted to counter the node transform. This lets the geometry of the object stay in the same place while the pivot point moves around.

Construction of the Object-Offset Transform Matrix

The Object-Offset Transform Matrix consists of separate position, rotation and scale transforms. Like the Node Transform Matrix, these are applied by pre-multiplying position, then rotation, then scale. Thus the Object-Offset Transform Matrix is:

Object-Offset Transform Matrix = Offset Scale * Offset Rotation * Offset Position

Unlike the Node Transform Matrix, the Object-Offset Transform Matrix is not inherited by children of the node.

The Object Transform Matrix

The Object Transform Matrix is the transform matrix an object's geometry needs to be multiplied by to transform it into world space. This transform matrix includes the parent transform, the Node Transform, and the Object Offset Transform. Thus, the entire transform used to transform the points of any object is:

Object Transform Matrix = Object-Offset Transform Matrix * Node Transform Matrix

This matrix could be used, for example, if you have a mesh object and wanted to get the world space coordinate of one of its vertices. You could do this by taking the vertex coordinate in object space and multiplying it by the Object Transform Matrix.

Using the Node Transforms in MAXScript

The node transform properties are derived from and modify the values of the transform controllers associated with the node, they are not associated directly with the node's main transformation matrix. This has a number of consequences:

  1. Assigning to a transform property (such as pos or rotation) with animation enabled plants keyframes only in the associated controller. If you modify the node's transform matrix directly, keyframes are generated for all the transform controllers for that node.

  2. Rotation properties and in fact all rotation-related functions in MAXScript reflect the direction convention used in the 3ds Max user interface. This convention is the right-hand rule, namely, positive angles rotate counter-clockwise about positive axes. Internally, however, 3ds Max stores rotations in node matrices using the left-hand rule. It is important to remember this inversion when working directly with node transform matrices using the transform and objectTransform properties. You'll need to invert rotations (for example, by multiplying axes by [-1,-1,-1] or using the inverse() function on quaternions) when mixing them with 3ds Max and MAXScript standard rotations.

  3. Certain controllers, such as the path controller with bank or follow enabled, affect the rotation of a node by adjusting the node's transform matrix directly and this rotation is not reflected in rotation controller values. This means, in this example for instance, that bank and follow rotations are not directly accessible through the rotation property, you need to access them directly in the node's transformation matrix using something like:

    4. r = $foo.transform.rotationPart

    which returns a quaternion. Remember, however, that the 3ds Max rotation direction convention is not reflected when directly accessing a transform matrix, so to use this value in other rotation operations you would need to invert it:

    $baz.rotation = inverse r

    A node's transform property contains the Node Transform Matrix, and reflects the position, rotation, and scale of the node's pivot point. Accessing the pivot property will return the same value as the pos property. Setting the pivot property will move the pivot point location to the specified coordinates, however the node's geometry will not be moved.

    A node's objectoffsetpos, objectoffsetrot, and objectoffsetscale properties contain the component parts of the Object-Offset Transform Matrix. A node's objecttransform property contains the Object Transform Matrix. Since this matrix is a combination of the Node Transform and Object-Offset Transform Matrices, this property is read only. Note that these properties are always returned in the World coordinate system context.

    The following script shows the initial node transform properties for a 25x25x25 box created at [75,75,0], after moving the pivot point to [50,50,0], and after rotating only the pivot point 35 degrees about the Z axis. Also shown is the position of one of the box's vertices after each transform.

    SCRIPT

    fn DumpXForms obj =

    ( -- output node transform properties

    format "%:\t%\n" "transform" obj.transform

    format "%:\t%\n" "position " obj.pos

    format "%:\t%\n" "rotation " obj.rotation

    -- output node's pivot point location

    format "%:\t%\n" "pivot " obj.pivot

    -- output object offsets

    format "%:\t%\n" "objectoffsetpos " obj.objectoffsetpos

    format "%:\t%\n" "objectoffsetrot " obj.objectoffsetrot

    format "%:\t%\n" "objectoffsetscale" obj.objectoffsetscale

    -- output object transform

    format "%:\t%\n" "objecttransform " obj.objecttransform

    -- output vertex position in local and world coordinates

    format "%:\t%\n" "vert 1 (local) " (in coordsys local getvert obj 1)

    format "%:\t%\n" "vert 1 (world1) " (in coordsys world getvert obj 1)

    -- calculate and output vertex position in world coordinates

    local v_pos=(in coordsys local getvert obj 1)* obj.objecttransform

    format "%:\t%\n" "vert 1 (world2) " v_pos

    )

    -- define function for rotating only the pivot point

    fn RotatePivotOnly obj rotation= ( local rotValInv=inverse (rotation as quat)

    animate off in coordsys local obj.rotation*=RotValInv

    obj.objectoffsetrot*=RotValInv

    obj.objectoffsetpos*=RotValInv

    )

    --

    (

    b=box pos:[75,75,0] -- create a 25x25x25 box, vertex 1 at [62.5,62.5,0] (world)

    convertToMesh b -- convert box to mesh so we can access the vertex location

    DumpXForms b -- print transforms

    b.pivot=[50,50,0] -- move pivot only to [50,50,0]

    DumpXForms b -- print transforms

    RotatePivotOnly b (EulerAngles 0 0 35) -- rotate pivot only 35 degrees about local Z

    DumpXForms b -- print transforms

    )

    OUTPUT

    DumpXForms() -- function definition

    RotatePivotOnly() -- function definition

    transform: (matrix3 [1,0,0], [0,1,0], [0,0,1], [75,75,0]) -- initial transforms

    position : [75,75,0]

    rotation : (quat 0 0 0 1)

    pivot : [75,75,0]

    objectoffsetpos : [0,0,0]

    objectoffsetrot : (quat 0 0 0 1)

    objectoffsetscale: [1,1,1]

    objecttransform : (matrix3 [1,0,0], [0,1,0], [0,0,1], [75,75,0])

    vert 1 (local) : [-12.5,-12.5,0]

    vert 1 (world1) : [62.5,62.5,0]

    vert 1 (world2) : [62.5,62.5,0]

    transform: (matrix3 [1,0,0], [0,1,0], [0,0,1], [50,50,0]) -- transforms after move

    position : [50,50,0]

    rotation : (quat 0 0 0 1)

    pivot : [50,50,0]

    objectoffsetpos : [25,25,0]

    objectoffsetrot : (quat 0 0 0 1)

    objectoffsetscale: [1,1,1]

    objecttransform : (matrix3 [1,0,0], [0,1,0], [0,0,1], [75,75,0])

    vert 1 (local) : [-12.5,-12.5,0]

    vert 1 (world1) : [62.5,62.5,0]

    vert 1 (world2) : [62.5,62.5,0]

    transform: (matrix3 [0.819152,0.573576,0], [-0.573576,0.819152,0], [0,0,1], [50,50,0]) -- transforms after rotate

    position : [50,50,0]

    rotation : (quat 0 0 0.300706 0.953717)

    pivot : [50,50,0]

    objectoffsetpos : [34.8182,6.13939,0]

    objectoffsetrot : (quat 0 0 0.300706 0.953717)

    objectoffsetscale: [1,1,1]

    objecttransform : (matrix3 [1,0,0], [0,1,0], [0,0,1], [75,75,0])

    vert 1 (local) : [-12.5,-12.5,0]

    vert 1 (world1) : [62.5,62.5,0]

    vert 1 (world2) : [62.5,62.5,0]


Node User-Defined Properties and Methods

Roll over and click a tab to jump to related description:

The functions described in this topic give you access to scene object user properties, accessible in the 3ds Max user interface in the User Defined tab in the Object Properties Dialog.

There are two ways to access and set the user defined properties in the Object Properties dialog—either as one single string representing the entire contents or as key/property pairs in the form:

<key1> = <property1>

<key2> = <property2>

...

where the keys are identifiers (Name or String values) and the properties can be numbers, booleans (true/false) or text strings. There are two MAXScript methods for setting and getting individual keyed properties, and two methods that let you treat the property text as a single big string.

The <node> methods are:

getUserProp <node> <key_string>

Retrieves the node's user property with the given key as a string. <key_string> is either a String or a Name value. If the key does not exist, a value of undefined is returned.

setUserProp <node> <key_string> <value>

Sets the node's user property with the given key to the given value

getUserPropBuffer <node>

Retrieves the entire user property buffer as a string containing all the user property settings. This is effectively the contents of the User Defined Properties box in the 3ds Max Object Properties dialog

setUserPropBuffer <node> <string>

Sets the user property buffer to the given string.

NOTE:

In order to include new line characters in a multi-line User Property Buffer string, you have to use the combination \r\n (carriage return and new line). See String Literals for a list of control characters.

The following two example code fragments save and load user properties for objects in a scene.

The first code fragment creates a file and loops through all objects outputting for each the object name and user property buffer string. Note that the object name goes out in a form that will come back in (via a readValue()) as a direct reference to a scene object. Also, the user property string is output using print() so it will be in a quoted form to be read as one (long) string literal by a corresponding readValue().

EXAMPLE

-- create file and for all objects,

-- dump object name and user props

f = createFile "foo.dat"

for o in objects do

(

format "$%\n" o.name to:f -- output name in a pathname form

print (getUserPropBuffer o) to:f -- output buffer as a string literal

)

close f

The second code fragment reads in the file created by the first piece and applies the user properties to any same-named object in the current scene. Note that readValue() can read in pathnames ($<name>) and will yield either the named scene object or undefined if the named object is not in the scene. The readValue() function can also read in a multiline string literal in one pass.

EXAMPLE

-- open file and read in object names and

-- user properties to set

f = openFile "foo.dat"

while not eof f do

(

o = readValue f -- read object

if o != undefined then -- if present, read and set user prop string

setUserPropBuffer o (readValue f)

)

close f


Node Handles

A property has been added in 3ds Max 4 to a node’s interface called .handle. This can be used to get the unique node handle ID from the node.

id = $Box01.handle

Returns the unique id associated with the node

A method in the maxOps interface will return a node associated with a given handle.

node = maxOps.getNodeByHandle <number>

Returns the node associated with the id passed in.

NOTE:

It is safer to say $box01.inode.handle than $box01.handle. This is to prevent cases where the baseobject has property called handle, like a teapot, and you get that object’s handle instead of the node handle.

See also

MaxOps Interface


Node Subclasses

Value > MAXWrapper > Node > Subclasses

In the following node subclasses, the properties listed can all be specified as optional constructor keyword arguments with defaults as shown, along with the common keyword arguments for all node constructors, listed in Node : MAXWrapper .

The property listings show name, type and constructor default value.

The following list displays the 3ds Max node subclasses:

GeometryClass

Shape

Light

Camera

Helper

SpacewarpObject

System


GeometryClass : Node

Value > MAXWrapper > Node > GeometryClass

The following image maps and lists show the 3ds Max geometry class objects:

Standard Primitives

Box

Cone

Cylinder

Geosphere

Plane

Pyramid

Sphere

Teapot

Torus

Tube

Extended Primitives

Capsule

ChamferBox

ChamferCyl

C_Ext

Gengon

Hedra

Hose

L_Ext

OilTank

Prism

RingWave

Spindle

TargetObject

Torus_Knot

Compound Objects

BlobMesh

Boolean2

Conform

Connect

Loft

Mesher

Morph

ProBoolean & ProCutter

Scatter

ShapeMerge

Terrain

Particle Systems

Blizzard

PArray

PCloud

Snow

Spray

SuperSpray

Patch Grids

QuadPatch

TriPatch

NURBS Surfaces

NURBSSurf

Point_Surf

Dynamics Objects

Damper

Spring

Doors

BiFold

Pivot

SlidingDoor

Windows

Awning

Casement

Fixed

Pivoted

Projected

SlidingWindow

AEC Extended Objects

Foliage

Railing

Wall

Stairs

L_Type_Stair

Spiral_Stair

Straight_Stair

U_Type_Stair

Miscellaneous

LinkComposite

Host_Composite


GeometryClass Common Properties, Operators, and Methods

Value > MAXWrapper > Node > GeometryClass

The mesh operations underlying the Boolean Compound Object in 3ds Max are accessible in MAXScript. They appear as operators (+, -, *) that you can apply to any two scene objects that are convertible to meshes. These objects are all GeometryClass objects with the exception of the particle systems.

The operators are:

<node1> + <node2>

Returns the union of node1 and node2

<node1> - <node2>

Returns the subtraction of node2 from node1

<node1> * <node2>

Returns the intersection of node1 and node2

EXAMPLE

$foo - $baz

$sphere01 + $sphere02 + $sphere03 + $sphere04

The Boolean operators change the first operand to be the result of the operation and leave the second operand untouched. So, in the first example, the $foo node is changed to an Editable Mesh object containing the result of the difference operation. In the second example, $sphere01 is successively unioned with each of the other spheres - $sphere01 contains the compound result and the other spheres are left standing.

NOTE:

Unlike the Boolean compound object in 3ds Max, this operation destructively modifies the first operand - you cannot retrieve the original first operand after the Boolean operation is performed. You can effectively keep the first operand by using a copy function,

EXAMPLE

result = (copy $foo) - $baz

will put a modified copy of $foo into the variable result, leaving the original $foo unchanged.

GetTriMeshFaceCount <node>

Returns an array of two integers - the face count and the vertex count of the TriMesh on top of the modifier stack.


Geometry - Standard and Extended Objects

Value > MAXWrapper > Node > GeometryClass > Geometry - Standard and Extended

The following list displays the standard and extended objects in alphabetical order:

Box

Capsule

ChamferBox

ChamferCyl

Cone

Cylinder

C_Ext

Gengon

Geosphere

Hedra

L_Ext

OilTank

Plane

Prism

Pyramid

RingWave

Sphere

Spindle

TargetObject

Teapot

Torus

Torus_Knot

Tube


Box : GeometryClass

Box - superclass: GeometryClass; super-superclass:node - classID: #(16, 0)

Value > MAXWrapper > Node > GeometryClass > Box

Constructor

box ...

Properties

<Box>.length Float default: 25.0 -- animatable

Sets the length of the box object.

<Box>.width Float default: 25.0 -- animatable

Sets the width of the box object.

<Box>.height Float default: 25.0 -- animatable

Sets the height of the box object.

<Box>.lengthsegs Integer default: 1 -- animatable, alias: Length_Segments

Sets the number of divisions along the length of the object.

<Box>.widthsegs Integer default: 1 -- animatable, alias: Width_Segments

Sets the number of divisions along the width of the object.

<Box>.heightsegs Integer default: 1 -- animatable, alias: Height_Segments

Sets the number of divisions along the height of the object.

<Box>.mapcoords BooleanClass default: false

When on, generates coordinates for applying mapped materials to the box.

Interfaces:

Interface: realWorldMapSizeInterface

Properties:

.realWorldMapSize : boolean : Read|Write

Enables/disables the real-world map size option. Available in 3ds Max 8 and higher.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Capsule : GeometryClass

Capsule - superclass: GeometryClass; super-superclass:node - classID: #(1832744876, 2043230633)

Value > MAXWrapper > Node > GeometryClass > Capsule

Constructor

capsule ...

Properties

<Capsule>.radius Float default: 15.0 -- animatable

The radius of the capsule.

<Capsule>.height Float default: 25.0 -- animatable

The height of the capsule.

<Capsule>.heighttype Integer default: 1

Set what .height specifies:

0- Overall

1- Centers (not including domed caps)

<Capsule>.sides Integer default: 24 -- animatable

Sets the number of sides around the capsule. Higher numbers shade and render as true circles with Smooth on. Lower numbers create regular polygonal objects with Smooth off.

<Capsule>.heightsegs Integer default: 1 -- animatable; alias: height_segments

The number of divisions along the capsule's major axis.

<Capsule>.smooth BooleanClass default: true -- animatable

When on, blends the faces of the capsule, creating a smooth appearance in rendered views.

<Capsule>.smooth_on Integer default: 1 -- animatable

Smooth_on is an integer alias of smooth:

0- off

1- on

<Capsule>.sliceon BooleanClass default: false -- animatable

Turns on/off the Slice function.

<Capsule>.slice_on Integer default: 0 -- animatable

Slice_on is an integer alias of sliceon:

0- off

1- on

<Capsule>.slicefrom Float default: 0.0 -- animatable, angle; alias: slice_from

Sets the starting angle (on the local Z-axis) for slicing.

<Capsule>.sliceto Float default: 0.0 -- animatable, angle; alias: slice_to

Sets the angle (on the local Z-axis) to slice to.

<Capsule>.mapCoords BooleanClass default: false

When on, sets up the required coordinates for applying mapped materials to the capsule.

Interfaces:

Interface: realWorldMapSizeInterface

Properties:

.realWorldMapSize : boolean : Read|Write

Enables/disables the real-world map size option. Available in 3ds Max 8 and higher.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


ChamferBox : GeometryClass

ChamferBox - superclass: GeometryClass; super-superclass:node - classID: #(450314048, 1223298967)

Value > MAXWrapper > Node > GeometryClass > ChamferBox

Constructor

chamferBox ...

Properties

<ChamferBox>.length Float default: 0.1 -- animatable

The length of the object.

<ChamferBox>.width Float default: 0.1 -- animatable

The width of the object.

<ChamferBox>.height Float default: 0.1 -- animatable

The height of the object.

<ChamferBox>.smooth Integer default: 1

1 - enable smoothing 0 - disable smoothing.

<ChamferBox>.mapCoords Integer default: 1

1- enable mapping coordinates, 0 - disable mapping coordinates.

<ChamferBox>.Fillet Float default: 0.01 -- animatable

Slices off the edges of the chamferbox. The higher the number, the more filleted the chamferbox becomes.

<ChamferBox>.Length_Segments Integer default: 1 -- animatable

The number of divisions along the length of the object.

<ChamferBox>.Width_Segments Integer default: 1 -- animatable

The number of divisions along the width of the object.

<ChamferBox>.Height_Segments Integer default: 1 -- animatable

The number of divisions along the height of the object.

<ChamferBox>.Fillet_Segments Integer default: 3 -- animatable

The number of segments in the filleted edges of the box. Adding fillet segments increases the edge roundness.

Interfaces:

Interface: realWorldMapSizeInterface

Properties:

.realWorldMapSize : boolean : Read|Write

Enables/disables the real-world map size option. Available in 3ds Max 8 and higher.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


ChamferCyl : GeometryClass

ChamferCyl - superclass: GeometryClass; super-superclass:node - classID: #(2073711726, 564414113)

Value > MAXWrapper > Node > GeometryClass > ChamferCyl

Constructor

chamferCyl ...

Properties

<ChamferCyl>.radius Float default: 0.0 -- animatable

The radius of the chamfered cylinder.

<ChamferCyl>.height Float default: 0.0 -- animatable

The dimension along the central axis. Negative values create the chamfered cylinder below the construction plane.

<ChamferCyl>.Fillet Float default: 0.0 -- animatable

Slices off the edges of the chamfered cylinder. The higher the number, the more filleted the cylinder becomes.

<ChamferCyl>.Height_Segments Integer default: 1 -- animatable

The number of divisions along the corresponding axis.

<ChamferCyl>.Fillet_Segments Integer default: 1 -- animatable

The number of segments in the filleted edges of the box. Adding fillet segments curves the edges, producing a chamfered cylinder.

<ChamferCyl>.sides Integer default: 12 -- animatable

The number of sides around the chamfered cylinder. Higher numbers shade and render as true circles with Smooth on. Lower numbers create regular polygonal objects with Smooth off.

<ChamferCyl>.Cap_Segments Integer default: 1 -- animatable

The number of concentric divisions along the center of the chamfered cylinder's top and bottom

<ChamferCyl>.Smooth     Boolean default: true—animatable

When on, blends the faces of the chamfered cylinder, creating a smooth appearance in rendered views.

<ChamferCyl>.Smooth_On Integer default: 1 -- animatable

Integer alias for .smooth:

0- off

1- on

<ChamferCyl>.SliceOn     Boolean default: false -- animatable

Turn on/off the slice function.

<ChamferCyl>.Slice_On Integer default: 0 -- animatable

Integer alias for .slice_on:

0- off

1- on

<ChamferCyl>.Slice_From Float default: 0.0 -- animatable, angle

Sets the starting angle (on the local Z-axis) for slicing.

<ChamferCyl>.Slice_To Float default: 0.0 -- animatable, angle

Sets the angle (on the local Z-axis) to slice to.

<ChamferCyl>.mapCoords Integer default: 1

1- enable mapping coordinates, 0 - disable mapping coordinates.

Interfaces:

Interface: realWorldMapSizeInterface

Properties:

.realWorldMapSize : boolean : Read|Write

Enables/disables the real-world map size option. Available in 3ds Max 8 and higher.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Cone : GeometryClass

Cone - superclass: GeometryClass; super-superclass:node - classID: #(-1469307939, 0)

Value > MAXWrapper > Node > GeometryClass > Cone

Constructor

cone ...

Properties

<Cone>.radius1 Float default: 15.0 -- animatable, alias: Radius_1

The first radius of the cone.

<Cone>.radius2 Float default: 0.0 -- animatable, alias: Radius_2

The second radius of the cone.

<Cone>.height Float default: 25.0 -- animatable

Height along the central axis. Negative values create the cone below the construction plane.

<Cone>.heightsegs Integer default: 5 -- animatable, alias: Height_Segments

The number of divisions along the cone's major axis.

<Cone>.capsegs Integer default: 1 -- animatable, alias: Cap_Segments

The number of concentric divisions around the center of the cone's top and bottom.

<Cone>.sides Integer default: 24 -- animatable

The number of sides around the cone. Higher numbers shade and render as true circles with Smooth selected. Lower numbers create regular polygonal objects with Smooth off.

<Cone>.smooth Boolean default: true -- animatable

When on, blends the faces of the cone, creating a smooth appearance in rendered views.

<Cone>.slice Boolean default: false -- animatable, alias: sliceon

Turns on/off slice function.

<Cone>.Slice_On Integer default: 0

Integer alias for .slice:

0- off

1- on

<Cone>.sliceFrom Float default: 0.0 -- animatable, angle, alias: Slice_From

Sets the starting angle (on the local Z-axis) for slicing.

<Cone>.sliceTo Float default: 0.0 -- animatable, angle, alias: Slice_To

Sets the angle (on the local Z-axis) to slice to.

<Cone>.mapCoords BooleanClass default: false

When on, sets up required coordinates for applying mapped materials to the cone.

Interfaces:

Interface: realWorldMapSizeInterface

Properties:

.realWorldMapSize : boolean : Read|Write

Enables/disables the real-world map size option. Available in 3ds Max 8 and higher.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Cylinder : GeometryClass

Cylinder - superclass: GeometryClass; super-superclass:node - classID: #(18, 0)

Value > MAXWrapper > Node > GeometryClass > Cylinder

Constructor

cylinder ...

Properties

<Cylinder>.radius Float default: 15.0 -- animatable

The radius of the cylinder.

<Cylinder>.height Float default: 25.0 -- animatable

Height along the central axis. Negative values create the cylinder below the construction plane.

<Cylinder>.heightsegs Integer default: 1 -- animatable, alias: Height_Segments

The number of divisions along the cylinder's major axis.

<Cylinder>.capsegs Integer default: 1 -- animatable, alias: Cap_Segments

The number of concentric divisions around the center of the cylinder's top and bottom.

<Cylinder>.sides Integer default: 24 -- animatable

The number of sides around the cylinder. With Smooth on, higher numbers shade and render as true circles. With Smooth off, lower numbers create regular polygonal objects.

<Cylinder>.smooth Boolean default: true -- animatable

When on, the faces of the cylinder are blended together, creating a smooth appearance in rendered views.

<Cylinder>.slice Boolean default: false -- animatable, alias: sliceon

Turns on/off slice function.

<Cylinder>.Slice_On Integer default: 0

Integer alias for .slice:

0- off

1- on

<Cylinder>.sliceFrom Float default: 0.0 -- animatable, angle, alias: Slice_From

Sets the starting angle (on the local Z-axis) for slicing.

<Cylinder>.sliceTo Float default: 0.0 -- animatable, angle, alias: Slice_To

Sets the angle (on the local Z-axis) to slice to.

<Cylinder>.mapCoords Boolean default: false

When on, sets up the required coordinates for applying mapped materials to the cylinder.

Interfaces:

Interface: realWorldMapSizeInterface

Properties:

.realWorldMapSize : boolean : Read|Write

Enables/disables the real-world map size option. Available in 3ds Max 8 and higher.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


C_Ext : GeometryClass

C_Ext - superclass: GeometryClass; super-superclass:node - classID: #(867248205, 2062557197)

Value > MAXWrapper > Node > GeometryClass > C_Ext

Constructor

c_ext ...

Properties

<C_Ext>.Back_Length Float default: 0.0 -- animatable

Sets the length of the back edge.

<C_Ext>.Side_Length Float default: 0.0 -- animatable

Sets the length of the side edge.

<C_Ext>.Front_Length Float default: 0.0 -- animatable

Sets the length of the front edge.

<C_Ext>.Back_Width Float default: 0.0 -- animatable

Sets the width of the back edge.

<C_Ext>.Side_Width Float default: 0.0 -- animatable

Sets the width of the side edge.

<C_Ext>.Front_Width Float default: 0.0 -- animatable

Sets the width of the front edge.

<C_Ext>.height Float default: 0.0 -- animatable

Sets the overall height of the object.

<C_Ext>.mapCoords Integer default: 1

1- enable mapping coordinates, 0 - disable mapping coordinates.

<C_Ext>.Back_Segments Integer default: 1 -- animatable

The number of segments along the back edge of the object.

<C_Ext>.Side_Segments Integer default: 1 -- animatable

The number of segments along the side edge of the object.

<C_Ext>.Front_Segments Integer default: 1 -- animatable

The number of segments along the front edge of the object.

<C_Ext>.Width_Segments Integer default: 1 -- animatable

The number of segments along the width of the object.

<C_Ext>.Height_Segments Integer default: 1 -- animatable

The number of segments along the height of the object.

Interfaces:

Interface: realWorldMapSizeInterface

Properties:

.realWorldMapSize : boolean : Read|Write

Enables/disables the real-world map size option. Available in 3ds Max 8 and higher.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Gengon : GeometryClass

Gengon - superclass: GeometryClass; super-superclass:node - classID: #(1237277087, 905528747)

Value > MAXWrapper > Node > GeometryClass > Gengon

Constructor

gengon ...

Properties

<Gengon>.sides Integer default: 5 -- animatable

The number of sides around the gengon. Higher numbers shade and render as true circles with Smooth on. Lower numbers create regular polygonal objects with Smooth off.

<Gengon>.radius Float default: 0.0 -- animatable

The radius of the gengon.

<Gengon>.Fillet Float default: 0.0 -- animatable

The width of the fillet area.

<Gengon>.height Float default: 0.0 -- animatable

Height along the central axis. Negative values create the gengon below the construction plane.

<Gengon>.Side_Segments Integer default: 1 -- animatable

The number of divisions around the gengon.

<Gengon>.Height_Segments Integer default: 1 -- animatable

The number of divisions along the gengon's major axis.

<Gengon>.Fillet_Segments Integer default: 1 -- animatable

The number of divisions for the edge filleting. The higher this setting, the rounder the fillet appears.

<Gengon>.mapCoords Integer default: 1

  1. enable mapping coordinates, 0 - disable mapping coordinates.

<Gengon>.smooth Integer default: 0

1- enable smoothing, 0 - disable smoothing.

Interfaces:

Interface: realWorldMapSizeInterface

Properties:

.realWorldMapSize : boolean : Read|Write

Enables/disables the real-world map size option. Available in 3ds Max 8 and higher.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Geosphere : GeometryClass

GeoSphere - superclass: GeometryClass; super-superclass:node - classID: #(0, 32670)

Value > MAXWrapper > Node > GeometryClass > Geosphere

Constructor

geosphere ...

Properties

<GeoSphere>.creationMethod Integer default: 1 -- alias: Creation_Method

Sets the creation method:

0- Diameter (Draws a geosphere from edge to edge.)

1- Center (Draws a geosphere from the center out.)

<GeoSphere>.typeInPos Point3 default: [0,0,0]

The point3 position of the geosphere.

<GeoSphere>.typeInRadius Float default: 25.0

The radius of the geosphere.

<GeoSphere>.radius Float default: 25.0 -- animatable

The radius of the geosphere.

<GeoSphere>.segs Integer default: 4 -- animatable, alias: segments

The total number of faces in the geosphere. The number of faces in a geosphere is equal to the sides of the base polyhedron times the segments squared.

Lower segment values work best. Using the maximum segment value of 200 can generate up to 800,000 faces, impairing performance.

<GeoSphere>.baseType Integer default: 2 -- alias: Base_Type

Sets the type of basic geometry for the geosphere:

0- Tetra (Based on a four-sided tetrahedron. The triangular facets can vary in shape and size. The sphere can be divided into four equal segments.)

1- Octa (Based on an eight-sided octahedron. The triangular facets can vary in shape and size. The sphere can be divided into eight equal segments.)

2- Icosa (Based on a 20-sided icosahedron. The facets are all equally sized equilateral triangles. The sphere can be divided into any number of equal segments, based on multiples and divisions of 20 faces.)

<GeoSphere>.smooth Boolean default: true -- animatable

When on, applies smoothing groups to the surface of the sphere.

<GeoSphere>.hemisphere Boolean default: false -- animatable

When on, creates a half-sphere.

<GeoSphere>.baseToPivot Boolean default: false -- alias: Base_to_Pivot

Sets the pivot point location. When on, the pivot is at the bottom of the sphere. When off, the pivot is at the center of the sphere. This option has no effect when Hemisphere is on.

<GeoSphere>.mapCoords Boolean default: false -- alias: Generate_mapping_coords

When on, applies default mapping coordinates to the geosphere.

Interfaces:

Interface: realWorldMapSizeInterface

Properties:

.realWorldMapSize : boolean : Read|Write

Enables/disables the real-world map size option. Available in 3ds Max 8 and higher.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Hedra : GeometryClass

Hedra - superclass: GeometryClass; super-superclass:node - classID: #(-233021917, 0)

Value > MAXWrapper > Node > GeometryClass > Hedra

Constructor

hedra ...

Properties

<Hedra>.family Integer default: 0

Sets the type of polyhedron to create:

0- Tetra (Creates a tetrahedron)

1- Cube/Octa (Creates a cubic or octahedral polyhedron, depending on parameter settings.)

2- Dodec/Icos (Creates a dodecahedron or icosahedron, depending on parameter settings.)

3- Star1 (Creates a star-like polyhedra.)

4- Star2 (Creates a different star-like polyhedra.)

<Hedra>.p Float default: 0.0 -- animatable, alias: Q_Value

<Hedra>.q Float default: 0.0 -- animatable, alias: P_Value

Interrelated parameters that provide a two-way translation between the vertices and facets of a polyhedron. They share the following:

  • Range of possible values is 0.0 through 1.0.

  • The combined total of the P and Q values can be equal to or less than 1.0.

  • Extremes occur if either P or Q is set to 1.0; the other is automatically set to 0.0.

  • Midpoint occurs when both P and Q are 0.

In the simplest terms, P and Q change the geometry back and forth between vertices and facets. At the extreme settings for P and Q, one parameter represents all vertices, the other represents all facets. Intermediate settings are transition points, with the midpoint an even balance between the two parameters.

<Hedra>.scalep Float default: 1.0 -- animatable

Controls the axis of reflection for the p facet of a polyhedron.

<Hedra>.scaleq Float default: 1.0 -- animatable

Controls the axis of reflection for the q facet of a polyhedron.

<Hedra>.scaler Float default: 1.0 -- animatable

Controls the axis of reflection for the r facets of a polyhedron.

<Hedra>.P_Scale Float default: 100.0

Controls the axis of reflection for the p facet of a polyhedron.

<Hedra>.Q_Scale Float default: 100.0

Controls the axis of reflection for the q facet of a polyhedron.

<Hedra>.R_Scale Float default: 100.0

Controls the axis of reflection for the r facets of a polyhedron.

<Hedra>.vertices Integer default: 0   -- alias: vertType

Sets the internal geometry of each facet of the polyhedron:

0- Basic (Facets are not subdivided beyond the minimum.)

1- Center (Each facet is subdivided by placing an additional vertex at its center, with edges from each center point to the facet corners.)

2- Center & Sides (Each facet is subdivided by placing an additional vertex at its center, with edges from each center point to the facet corners, as well as to the center of each edge. Compared to Center, Center & Sides doubles the number of faces in the polyhedron.)

<Hedra>.radius Float default: 25.0 -- animatable

The radius of any polyhedron in current units.

<Hedra>.mapCoords Boolean default: false

When on, sets up required coordinates for applying mapped materials to the hedra.

NOTES:

The (scalep, scaleq, scaler) and (P_Scale, Q_Scale, R_Scale) sets of scale parameters are aliases of each other, except that the first set is stored as fractions, and the second set is stored as percentages. This second set of parameters are those shown in the command panels and in Track View.

In order to access the vertices property for hedra, you need to access the property via the baseobject property of the node. This is because vertices is also a property name for all nodes, and conflicts with the hedra's vertices property.

EXAMPLE

MyHedra.baseobject.vertices=1 -- set Vertices option to Center

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


L_Ext : GeometryClass

L_Ext - superclass: GeometryClass; super-superclass:node - classID: #(166148616, 141111399)

Value > MAXWrapper > Node > GeometryClass > L_Ext

Constructor

l_ext ...

Properties

<L_Ext>.Side_Length Float default: 0.0 -- animatable

The length of the side edge.

<L_Ext>.Front_Length Float default: 0.0 -- animatable

The length of the front edge.

<L_Ext>.Side_Width Float default: 0.0 -- animatable

The width of the side edge.

<L_Ext>.Front_Width Float default: 0.0 -- animatable

The width of the front edge.

<L_Ext>.height Float default: 0.0 -- animatable

The height of the object.

<L_Ext>.Side_Segments Integer default: 1 -- animatable

Number of segments along the side edge.

<L_Ext>.Front_Segments Integer default: 1 -- animatable

Number of segments along the front edge.

<L_Ext>.Width_Segments Integer default: 1 -- animatable

Number of segments along the width of the object.

<L_Ext>.Height_Segments Integer default: 1 -- animatable

Number of segments along the height of the object.

<L_Ext>.mapCoords Integer default: 1

1- enable mapping coordinates, 0 - disable mapping coordinates.

Interfaces:

Interface: realWorldMapSizeInterface

Properties:

.realWorldMapSize : boolean : Read|Write

Enables/disables the real-world map size option. Available in 3ds Max 8 and higher.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


OilTank : GeometryClass

OilTank - superclass: GeometryClass; super-superclass:node - classID: #(554591274, 586227448)

Value > MAXWrapper > Node > GeometryClass > OilTank

Constructor

oilTank ...

Properties

<OilTank>.radius Float default: 0.0 -- animatable

The radius of the oiltank.

<OilTank>.height Float default: 0.0 -- animatable

The height along the central axis. Negative values create the oiltank below the construction plane.

<OilTank>.Cap_Height Float default: 0.0 -- animatable

Sets the height of the convex caps. The minimum value is 2.5% of the Radius setting. The maximum value is the Radius setting, unless the absolute value of the Height setting is less than the double Radius setting, in which case cap height cannot exceed half of the absolute value of the Height setting.

<OilTank>.blend Float default: 0.0 -- animatable

When greater than 0, creates a bevel at the edge of the caps.

<OilTank>.sides Integer default: 12 -- animatable

Sets the number of sides around the oiltank. To create a smoothly rounded object, use a higher number of sides and turn Smooth on. To create an oiltank with flat sides, use a lower number of sides and turn Smooth off.

<OilTank>.Height_Segments Integer default: 1 -- animatable

Sets the number of divisions along the oiltank's major axis.

<OilTank>.Smooth_On Integer default: 1 -- animatable

Turn on/off smooth:

0- off

1- on

<OilTank>.Slice_On Integer default: 0 -- animatable

Turn on/off slice:

0- off

1- on

<OilTank>.Slice_From Float default: 0.0 -- animatable, angle

Sets the starting angle (on the local Z-axis) for slicing.

<OilTank>.Slice_To Float default: 0.0 -- animatable, angle

Sets the angle (on the local Z-axis) to slice to.

<OilTank>.mapCoords Integer default: 1

1- enable mapping coordinates, 0 - disable mapping coordinates.

Interfaces:

Interface: realWorldMapSizeInterface

Properties:

.realWorldMapSize : boolean : Read|Write

Enables/disables the real-world map size option. Available in 3ds Max 8 and higher.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Plane : GeometryClass

Plane - superclass: GeometryClass; super-superclass:node - classID: #(136257020, 2002153317)

Value > MAXWrapper > Node > GeometryClass > Plane

Constructor

plane ...

meshGrid ...

Properties

<Plane>.typeinCreationMethod Integer default: 0 -- alias: Creation_Method

Set the creation method:

0- Rectangle (Creates the plane primitive from one corner to the diagonally opposite corner, interactively setting different values for length and width.)

1- Square (Creates a square plane where length and width are equal.)

<Plane>.typeinPos Point3 default: [0,0,0]

Position of the plane in the World Space Coordinate system.

<Plane>.typeinLength Float default: 25.0

Length of the plane object.

<Plane>.typeinWidth Float default: 25.0

Width of the plane object.

<Plane>.length Float default: 25.0 -- animatable

Length of the plane object.

<Plane>.width Float default: 25.0 -- animatable

Width of the plane object.

<Plane>.lengthsegs Integer default: 4 -- animatable, alias: Length_Segments

Number of divisions along the length of the plane object.

<Plane>.widthsegs Integer default: 4 -- animatable, alias: Width_Segments

Number of divisions along the width of the plane object.

<Plane>.density Float default: 1.0 -- animatable

Specifies the factor by which the number of segments in both length and width are multiplied at render time.

<Plane>.renderScale Float default: 1.0 -- animatable, alias: Render_Scale

Specifies the factor by which both length and width are multiplied at render time. Scaling is performed from the center outward.

<Plane>.mapCoords Boolean default: false --alias: Mapping

When on, generates texture coordinates for applying mapped materials to the plane.

NOTES:

The renderScale property is a multiplier applied to the Plane's length and width property values at render time.

The density property is a multiplier applied to the Plane's lsegs and wsegs property values at render time.

Interfaces:

Interface: realWorldMapSizeInterface

Properties:

.realWorldMapSize : boolean : Read|Write

Enables/disables the real-world map size option. Available in 3ds Max 8 and higher.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Prism : GeometryClass

Prism - superclass: GeometryClass; super-superclass:node - classID: #(1668308908, 1545557311)

Value > MAXWrapper > Node > GeometryClass > Prism

Constructor

prism ...

Properties

<Prism>.side1Length Float default: 25.0 -- animatable, alias: Side_1_Length

Sets the length of triangle's first side.

<Prism>.side2Length Float default: 25.0 -- animatable, alias: Side_2_Length

Sets the length of triangle's second side.

<Prism>.side3Length Float default: 25.0 -- animatable, alias: Side_3_Length

Sets the length of triangle's third side.

<Prism>.height Float default: 10.0 -- animatable

The height of the prism's central axis.

<Prism>.side1Segs Integer default: 1 -- animatable, alias: Side_1_Segments

The number of divisions along the first side.

<Prism>.side2Segs Integer default: 1 -- animatable, alias: Side_2_Segments

The number of divisions along the second side.

<Prism>.side3Segs Integer default: 1 -- animatable, alias: Side_3_Segments

The number of divisions along the third side.

<Prism>.heightsegs Integer default: 1 -- animatable, alias: Height_Segments

The number of divisions along the central axis.

<Prism>.mapCoords Boolean default: false

When on, sets up the required coordinates for applying mapped materials to the prism.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Pyramid : GeometryClass

Pyramid - superclass: GeometryClass; super-superclass:node - classID: #(1992241546, 1274247952)

Value > MAXWrapper > Node > GeometryClass > Pyramid

Constructor

pyramid ...

Properties

<Pyramid>.width Float default: 25.0 -- animatable

The width of the pyramid.

<Pyramid>.depth Float default: 25.0 -- animatable

The depth of the pyramid.

<Pyramid>.height Float default: 25.0 -- animatable

The height of the pyramid.

<Pyramid>.widthsegs Integer default: 1 -- animatable, alias: Width_Segments

The number of divisions along the width of the pyramid.

<Pyramid>.depthSegs Integer default: 1 -- animatable, alias: Depth_Segments

The number of divisions along the depth of the pyramid.

<Pyramid>.heightsegs Integer default: 1 -- animatable, alias: Height_Segments

The number of divisions along the height of the pyramid.

<Pyramid>.mapCoords Boolean default: false

When on, sets up required coordinates for applying mapped materials to the pyramid.

Interfaces:

Interface: realWorldMapSizeInterface

Properties:

.realWorldMapSize : boolean : Read|Write

Enables/disables the real-world map size option. Available in 3ds Max 8 and higher.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


RingWave : GeometryClass

RingWave - superclass: GeometryClass; super-superclass:node - classID: #(686038884, 306926354)

Value > MAXWrapper > Node > GeometryClass > RingWave

Constructor

ringwave ...

Properties

NOTE:

Some of the properties can be entered using more than one syntax. They are listed together in the following list. Either syntax can be used, they are connected.

<RingWave>.'max diameter'     Float default: 500.0 -- animatable; alias: radius

The outside radius of the ringwave.

<RingWave>.'Radius Segs'      Integer default: 1 -- animatable; alias: radial_Segments

The segment count between the inner and outer surfaces in the direction of radius.

<RingWave>.'ring width'      Float default: 1.0 -- animatable; alias: Ring_Width

The mean ring width as measured inward from the outer radius.

<RingWave>.'ring segments'     Integer default: 200 -- animatable; alias: sides

The number of segments in the circumferential direction for both the inner, outer, and end (cap) surfaces.

<RingWave>.height Float default: 0.0 -- animatable

The height of the ringwave along its major axis.

<RingWave>.'Height Segs'      Integer default: 1 -- animatable; alias: Height_Segments

The number of segments in the direction of the height.

<RingWave>.Repeat Integer default: 2 -- animatable

Repeat = 0 - Cyclic Growth; 1 - Grow and Stay; 2 - No Growth

<RingWave>.'time on'       Integer default: 0 -- animatable; alias: Start_Time

The time where the ringwave appears, and begins to grow.

<RingWave>.'time growing'     Integer default: 9600 -- alias: Grow_Time

The time after .'time on' that the ringwave takes to reach full size.

<RingWave>.'display until'     Integer default: 16000 -- animatable; alias: End_Time

The time after which the ringwave disappears.

<RingWave>.'Outer Edge Breakup'   Boolean default: false -- alias: Outer_Edge_Breakup

Turns on breakup of the outer edge.

<RingWave>.'Major Cycles Outer'   Integer default: 1   -- alias: Outer_Edge_Major_Cycles

The number of major waves around the outer edge.

<RingWave>.'Major Cycle Flux Outer' Float default: 0.0  -- animatable; alias: Outer_Edge_Major_Flux

The size of the major waves, expressed as a percentage of the unmodulated width.

<RingWave>.'Major Cycle Flux Per Outer' Integer default: 16000 -- animatable; alias: Outer_Edge_Major_Crawl_Time

The time each major wave takes to move around the outer circumference of the RingWave.

<RingWave>.'Minor Cycles Outer'   Integer default: 1   -- alias: Outer_Edge_Minor_Cycles

The number of random-sized smaller waves in each major cycle.

<RingWave>.'Minor Cycle Flux Outer' Float default: 0.0 -- animatable; alias: Outer_Edge_Minor_Flux

The average size of the smaller waves, expressed as a percentage of the unmodulated width.

<RingWave>.'Minor Cycle Flux Per Outer' Integer default: -16000 -- animatable; alias: Outer_Edge_Minor_Crawl_Time

The time each minor wave takes to move across its respective major wave.

<RingWave>.'Inner Edge Breakup'   Boolean default: true  -- alias: Inner_Edge_Breakup

Turns on the breakup of the inner edge.

<RingWave>.'Major Cycles Inner'   Integer default: 11  -- alias: Inner_Edge_Major_Cycles

The number of major waves around the inner edge.

<RingWave>.'Major Cycle Flux Inner' Float default: 25.0 -- animatable; alias: Inner_Edge_Major_Flux

The size of the major waves, expressed as a percentage of the unmodulated width.

<RingWave>.'Major Cycle Flux Per Inner' Integer default: 19360 -- animatable; alias: Inner_Edge_Major_Crawl_Time

The time each major wave takes to move around the inner circumference of the RingWave.

<RingWave>.'Minor Cycles Inner'   Integer default: 29  -- alias: Inner_Edge_Minor_Cycles

The average size of the smaller waves, expressed as a percentage of the unmodulated width.

<RingWave>.'Minor Cycle Flux Inner' Float default: 10.0 -- animatable; alias: Inner_Edge_Minor_Flux

The average size of the smaller waves, expressed as a percentage of the unmodulated width.

<RingWave>.'Minor Cycle Flux Per Inner' Integer default: -4320 -- animatable; alias: Inner_Edge_Minor_Crawl_Time

The time each minor wave takes to move across its respective major wave.

<RingWave>.repeats        Integer default: 2 -- radio button number

The number of times the ringwave cycle repeats.

<RingWave>.'Mapping Coords'     Boolean default: false

When on, assigns mapping coordinates to the ringwave.

<RingWave>.Smoothing       Boolean default: false

When on, smooths the surface of the ringwave.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Sphere : GeometryClass

Sphere - superclass: GeometryClass; super-superclass:node - classID: #(17, 0)

Value > MAXWrapper > Node > GeometryClass > Sphere

Constructor

sphere ...

Properties

<Sphere>.radius Float default: 25.0 -- animatable

The radius of the sphere.

<Sphere>.segs Integer default: 16 -- animatable, alias: segments

The number of polygonal divisions for the sphere.

<Sphere>.smooth Boolean default: true -- animatable

When on, blends the faces of the sphere, creating a smooth appearance in rendered views.

<Sphere>.hemisphere Float default: 0.0 -- animatable

Increasing values progressively "cut off" the sphere, starting at the base, to create a partial sphere. Values range from 0.0 to 1.0. The default is 0.0, producing a full sphere. A setting of 0.5 produces a hemisphere, and 1.0 reduces the sphere to nothing.

<Sphere>.chop Integer default: 0

Sets whether the hemisphere is 'chopped' or 'squashed':

0- Chop (Reduces the number of vertices and faces in the sphere by "chopping" them out as the hemisphere is cut off.)

1- Squash (Maintains the number of vertices and faces in the original sphere, "squashing" the geometry into a smaller and smaller volume toward the top of the sphere. Since the geometry is maintained, you can use different versions of a squashed sphere for morph objects.)

<Sphere>.slice Boolean default: false

When on, uses the From and To angles to create a partial sphere. The effect is similar to lathing a semicircular shape fewer than 360 degrees.

<Sphere>.sliceFrom Float default: 0.0 -- animatable, angle, alias: Slice_From

The start angle (on the local Z-axis) for slicing.

<Sphere>.sliceTo Float default: 0.0 -- animatable, angle, alias: Slice_To

The stop angle (on the local Z-axis) for slicing.

<Sphere>.recenter Boolean default: false

When on, moves a sphere upward along its local Z axis so the pivot point is at its base. When off, the pivot point is on the construction plane at the center of the sphere.

<Sphere>.mapCoords Boolean default: false

When on, generates coordinates for applying mapped materials to the box.

Interfaces:

Interface: realWorldMapSizeInterface

Properties:

.realWorldMapSize : boolean : Read|Write

Enables/disables the real-world map size option. Available in 3ds Max 8 and higher.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Spindle : GeometryClass

Spindle - superclass: GeometryClass; super-superclass:node - classID: #(319493147, 78863102)

Value > MAXWrapper > Node > GeometryClass > Spindle

Constructor

spindle ...

Properties

<Spindle>.radius Float default: 0.0 -- animatable

The radius of the spindle.

<Spindle>.height Float default: 0.0 -- animatable

The height of the spindle, along the central axis. Negative values create the spindle below the construction plane.

<Spindle>.Cap_Height Float default: 0.0 -- animatable

The height of the conical caps. The minimum value is 0.1; the maximum value is ½ the absolute value of the Height setting.

<Spindle>.blend Float default: 0.0 -- animatable

When greater than 0, creates a bevel at the edge of the caps.

<Spindle>.sides Integer default: 12 -- animatable

The number of sides around the spindle. Higher numbers shade and render as true circles with Smooth on. Lower numbers create regular polygonal objects with Smooth off.

<Spindle>.Cap_Segments Integer default: 5 -- animatable

The number of concentric divisions along the center of the spindle's top and bottom.

<Spindle>.Height_Segments Integer default: 1 -- animatable

The number of divisions along the spindle's major axis.

<Spindle>.Smooth_On Integer default: 1 -- animatable

Turns on/off smooth:

0- off

1- on

<Spindle>.Slice_On Integer default: 0 -- animatable

Turn on/off slice:

0- off

1- on

<Spindle>.Slice_From Float default: 0.0 -- animatable, angle

The start angle (on the local Z-axis) for slicing.

<Spindle>.Slice_To Float default: 0.0 -- animatable, angle

The stop angle (on the local Z-axis) for slicing.

<Spindle>.mapCoords Integer default: 1

1- enable mapping coordinates, 0 - disable mapping coordinates.

Interfaces:

Interface: realWorldMapSizeInterface

Properties:

.realWorldMapSize : boolean : Read|Write

Enables/disables the real-world map size option. Available in 3ds Max 8 and higher.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


TargetObject : GeometryClass

Targetobject - superclass: GeometryClass; super-superclass:node - classID: #(4128, 0)

Value > MAXWrapper > Node > GeometryClass > TargetObject

The generic target for cameras, spotlights etc.

Constructor

targetObject ...

Properties

There are no additional properties for TargetObject.

NOTE:

In MAXScript, you must explicitly construct a target for those objects that need one.

FOR EXAMPLE:

c = targetCamera pos:[x,y,z] target:(targetObject pos:[xt, yt, zt])

WARNING!

For historical reasons, the TargetObject's superclass is GeometryClass, but
does not generate any actual geometry!

Since a taget object will be returned as part of the Lights or Cameras collections, it is important to filter the TargetObject out before performing any Light or Camera-specific operations!

FOR EXAMPLE:

for o in Lights where superclassof o != GeometryClass do

 o.on = not o.on

--The above will toggle all lights on/off, skipping the targets.

--The following code does the same by checking the class,

--then assigns a random color to the light:

for o in Lights where classof o != TargetObject do

 o.rgb = random black white

Similarly, when collecting geometry objects to perform mesh operations, the TagetObject should be explicitly filtered out to avoid errors due to its missing mesh,

FOR EXAMPLE:

for o in Geometry where classof o != TargetObject do

 format "% - Vertices: %\n" o.name o.mesh.numverts

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Teapot : GeometryClass

Teapot - superclass: GeometryClass; super-superclass:node - classID: #(-1397943341, -1397938471)

Value > MAXWrapper > Node > GeometryClass > Teapot

Constructor

teapot ...

Properties

<Teapot>.radius Float default: 25.0 -- animatable

The radius of the teapot.

<Teapot>.segs Integer default: 4 -- animatable, alias: segments

The number of divisions for the teapot or its individual parts.

<Teapot>.smooth Boolean default: true -- animatable

When on, blends faces of the teapot, creating a smooth appearance in rendered views.

<Teapot>.body Boolean default: true -- animatable

When on, the body of the teapot is included in the object.

<Teapot>.handle Boolean default: true -- animatable

When on, the handle of the teapot is included in the object.

<Teapot>.spout Boolean default: true -- animatable

When on, the spout of the teapot is included in the object.

<Teapot>.lid Boolean default: true -- animatable

When on, the lid of the teapot is included in the object.

<Teapot>.mapCoords Boolean default: false

When on, sets up required coordinates for applying mapped materials to the teapot.

Interfaces:

Interface: realWorldMapSizeInterface

Properties:

.realWorldMapSize : boolean : Read|Write

Enables/disables the real-world map size option. Available in 3ds Max 8 and higher.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Torus : GeometryClass

Torus - superclass: GeometryClass; super-superclass:node - classID: #(32, 0)

Value > MAXWrapper > Node > GeometryClass > Torus

Constructor

torus ..

Properties

<Torus>.segs Integer default: 24 -- animatable, alias: segments

The number of radial divisions around the torus. By reducing this number, you can create polygonal rings instead of circular ones.

<Torus>.radius1 Float default: 25.0 -- animatable, alias: Radius_1

The distance from the center of the torus to the center of the cross-sectional circle. This is the radius of the torus ring.

<Torus>.radius2 Float default: 10.0 -- animatable, alias: Radius_2

The radius of the cross-sectional circle.

<Torus>.tubeRotation Float default: 0.0 -- animatable, angle

The degree of rotation. Vertices are uniformly rotated about the circle running through the center of the torus ring. Positive and negative values for this setting "roll" the vertices in either direction over the surface of the torus.

<Torus>.tubeTwist Float default: 0.0 -- animatable, angle, alias: Twist

The degree of twist. Cross sections are progressively rotated about the circle running through the center of the torus. Beginning with twist, each successive cross section is rotated until the last one has the number of degrees specified.

<Torus>.sides Integer default: 12 -- animatable

The number of sides on the cross-sectional circle of the torus. By reducing this number, you can create prism-like cross sections instead of circular ones.

<Torus>.smooth Integer default: 0 -- animatable

Select the level of smoothing:

0- None (Turns off smoothing entirely, producing prism-like facets on the torus.)

1- Sides (Smoothes the edges between adjacent segments, producing smooth bands running around the torus.)

2- All (Produces complete smoothing on all surfaces of the torus.)

3- Segments (Smoothes each segment individually, producing ring-like segments along the torus.)

<Torus>.slice Boolean default: false—animatable

When on, creates a portion of a sliced torus rather than the entire 360 degrees.

<Torus>.sliceFrom Float default: 0.0 -- animatable, angle, alias: Slice_From

The angle where the torus slice begins.

<Torus>.sliceTo Float default: 0.0 -- animatable, angle, alias: Slice_To

The angle where the torus slice ends.

<Torus>.mapCoords Boolean default: false

When on, sets up required coordinates for applying mapped materials to the torus.

Interfaces:

Interface: realWorldMapSizeInterface

Properties:

.realWorldMapSize : boolean : Read|Write

Enables/disables the real-world map size option. Available in 3ds Max 8 and higher.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Torus_Knot: GeometryClass

Torus_Knot - superclass: GeometryClass; super-superclass:node - classID: #(1824, 0)

Value > MAXWrapper > Node > GeometryClass > Torus_Knot

Constructor

torus_knot ...

Properties

<Torus_Knot>.Base_Curve Integer default: 0

Select the base curve for the Torus Know object:

0- Knot (The torus interweaves itself.)

1- Circle (The base curve is a circle, resulting in a standard torus if parameters are left at their defaults.)

<Torus_Knot>.radius Float default: 0.0 -- animatable

The radius of the base curve.

<Torus_Knot>.segments Integer default: 120 -- animatable

The number of segments around the perimeter of the torus.

<Torus_Knot>.p Float default: 2.0 -- animatable

Describe up and around-the-center winding numbers.

<Torus_Knot>.q Float default: 3.0 -- animatable

Describe down and around-the-center winding numbers.

<Torus_Knot>.Warp_Count Float default: 0.0 -- animatable

The number of "points" in a star shape around the curve.

<Torus_Knot>.Warp_Height Float default: 0.0 -- animatable

The height of the "points" given as a percentage of the base curve radius.

<Torus_Knot>.radius2 Float default: 10.0 -- animatable

The radius of the cross section of the torus knot object.

<Torus_Knot>.sides Integer default: 12 -- animatable

The number of sides around the cross section.

<Torus_Knot>.Eccentricity Float default: 1.0 -- animatable

The ratio of the major to minor axes of the cross section. A value of 1 provides a circular cross section, while other values create elliptical cross sections.

<Torus_Knot>.Twist Float default: 0.0 -- animatable

The number of times the cross section twists around the base curve.

<Torus_Knot>.Lumps Float default: 0.0 -- animatable

The number of bulges in the torus knot.

<Torus_Knot>.Lump_Height Float default: 0.0 -- animatable

The height of the lumps, as a percentage of the radius of the cross section.

<Torus_Knot>.Lump_Offset Float default: 0.0 -- animatable, angle

The offset of the start of the lumps, measured in degrees. The purpose of this value is to animate the lumps around the torus.

<Torus_Knot>.smooth Integer default: 2

Set smoothing in the torus knot:

0- None (The torus knot is faceted.)

1- Sides (Smoothes only the adjacent sides of the torus knot.)

2- All (The torus knot is faceted.)

<Torus_Knot>.Gen_UV Integer default: 0

Turn on/off generate mapping coordinates

0- Off

1- On

<Torus_Knot>.U_Tile Float default: 1.0 -- animatable

Tile the mapping coordinates along U.

<Torus_Knot>.V_Tile Float default: 1.0 -- animatable

Tile the mapping coordinates along V.

<Torus_Knot>.U_Offset Float default: 0.0 -- animatable

Offset the mapping coordinates along U.

<Torus_Knot>.V_Offset Float default: 0.0 -- animatable

Offset the mapping coordinates along V.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Tube : GeometryClass

Tube - superclass: GeometryClass; super-superclass:node - classID: #(31521, 0)

Value > MAXWrapper > Node > GeometryClass > Tube

Constructor

tube ...

Properties

<Tube>.radius1 Float default: 25.0 -- animatable, alias: Radius_1

The first radius for the tube.

<Tube>.radius2 Float default: 20.0 -- animatable, alias: Radius_2

The second radius for the tube.

NOTE:

The larger radius specifies the outside radius of the tube, while the smaller specifies the inside radius.

<Tube>.height Float default: 50.0 -- animatable

The dimension along the central axis. Negative values create the tube below the construction plane.

<Tube>.heightsegs Integer default: 1 -- animatable, alias: Height_Segments

The number of divisions along the tube's major axis.

<Tube>.capsegs Integer default: 1 -- animatable, alias: Cap_Segments

The number of concentric divisions around the center of the tube's top and bottom.

<Tube>.sides Integer default: 24 -- animatable

The number of sides around the tube. Higher numbers shade and render as true circles with Smooth on. Lower numbers create regular polygonal objects with Smooth off.

<Tube>.smooth Boolean default: true -- animatable

When on, faces of the tube are blended together, creating a smooth appearance in rendered views.

<Tube>.slice Boolean default: false—animatable

Enables/Disables the Slice feature, which removes part of the tube's circumference.

<Tube>.Slice_On Integer default: 0

Integer alias of slice:

0- off

1- on

<Tube>.sliceFrom Float default: 0.0 -- animatable, angle, alias: Slice_From

The angle where the tube slice begins.

<Tube>.sliceTo Float default: 0.0 -- animatable, angle, alias: Slice_To

The angle where the tube slice ends.

<Tube>.mapCoords Boolean default: false

When on, sets up required coordinates for applying mapped materials to the tube.

Interfaces:

Interface: realWorldMapSizeInterface

Properties:

.realWorldMapSize : boolean : Read|Write

Enables/disables the real-world map size option. Available in 3ds Max 8 and higher.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Geometry - Dynamics Objects

The following list displays the dynamics objects:

Damper

Hose

Spring


Damper : GeometryClass

Damper - superclass: GeometryClass; super-superclass:node - classID: #(1185567612, 1898392048)

Value > MAXWrapper > Node > GeometryClass > Damper

Constructor

damper ...

Properties

<Damper>.End_Placement_Method Integer default: 1

Set binding method for damper:

0- Reference Objects (Choose this option when binding the damper to two objects.)

1- Free Spring (Choose this when using the damper as a simple object that's not bound to others or used in a dynamics simulation.)

<Damper>.Free_Damper_Height Float default: 2.0 -- animatable

The distance between the bottom center of the base and the top center of the piston when the damper is not bound.

<Damper>.Renderable_Spring Integer default: 1

Turn on/off renderability of the damper:

0- not renderable

1- renderable

<Damper>.Generate_Mapping_Coordinates Integer default: 0

Turn on/off mapping coordinates for the object:

0- off

1- on

<Damper>.Base_Stud_Diameter Float default: 0.5 -- animatable

The diameter of the base, or "mount" of the damper.

<Damper>.Base_Stud_Height Float default: 0.2 -- animatable

The height of the base.

<Damper>.Cylinder_Diameter Float default: 1.0 -- animatable

The diameter of the main housing of the damper.

<Damper>.Cylinder_Height Float default: 1.0 -- animatable

The height of the main housing.

<Damper>.Cylinder_Sides Integer default: 8 -- animatable

The number of sides of both the base and the main housing.

<Damper>.Cylinder_Fillet_1 Float default: 0.0 -- animatable

The size of the fillet on the lower edge of the main housing.

<Damper>.Cylinder_Fillet_1_Segments Integer default: 0 -- animatable

The number of segments for Fillet 1. The higher this setting, the rounder the fillet profile appears.

<Damper>.Cylinder_Fillet_2 Float default: 0.0 -- animatable

The size of the fillet on the upper edge of the main housing.

<Damper>.Cylinder_Fillet_2_Segments Integer default: 0 -- animatable

The number of segments for Fillet 2. The higher this setting, the rounder the fillet profile appears.

<Damper>.Inside_Diameter Float default: 0.0 -- animatable

The inside diameter of the main housing, which is actually a tube rather than a cylinder.

<Damper>.Smooth_Cylinder Integer default: 1

Turn on/off smoothing for the base and the main housing:

0- Off

1- On

<Damper>.Piston_Diameter Float default: 0.2 -- animatable

The diameter of the piston.

<Damper>.Piston_Height Float default: 1.0 -- animatable

The height of the piston.

<Damper>.Piston_Sides Integer default: 6 -- animatable

The number of sides in the piston.

<Damper>.Smooth_Piston Integer default: 1

Turn on/off smoothing for the piston:

0- Off

1- On

<Damper>.Enable_Boot Integer default: 0

Turn this on to add the boot to the damper:

0- Off

1- On

The boot is an optional component of the damper that's similar to the rubber "accordion" boot found on various types of dampers, such as shock absorbers. The boot acts like a bound dynamic object, in that one of its ends is bound to the main housing, while the other is bound to the piston. Thus, as the piston moves within the housing, the boot expands and contracts to follow.

<Damper>.Boot_Small_Diameter Float default: 0.25 -- animatable

The minimum diameter of the boot. This and the next parameter affect the depth of the accordion folds in the boot.

<Damper>.Boot_Large_Diameter Float default: 1.0 -- animatable

The maximum diameter of the boot.

<Damper>.Boot_Sides Integer default: 8 -- animatable

The number of sides making up the boot.

<Damper>.Boot_Folds Integer default: 4 -- animatable

The number of accordion folds (bulges) along the height of the boot.

<Damper>.Boot_Fold_Resolution Integer default: 4 -- animatable

The number of segments in each fold.

<Damper>.Boot_Stop_Diameter Float default: 0.4 -- animatable

The diameter of the stop, which is the ring at the top of the boot.

<Damper>.Boot_Stop_Height Float default: 0.2 -- animatable

The thickness (height) of the stop ring.

<Damper>.Boot_Stop_Setback Float default: 0.2 -- animatable

The distance of the stop ring from the top of the piston.

<Damper>.Boot_Stop_Fillet Float default: 0.0 -- animatable

The size of the fillet on the upper edge of the stop ring.

<Damper>.Boot_Stop_Fillet_Segements Integer default: 0 -- animatable

The number of segments the stop fillet. The higher this setting, the round the fillet profile appears.

<Damper>.Smooth_Boot Integer default: 1

Turn on/off smoothing for the boot:

0- Off

1- On

<Damper>.Dynamics_Object_Type Integer default: 0

Select which object is dynamic:

0- Damper (Select this option to use the damper object as a damper rather than an actuator.)

1- Actuator (Choose this when using the damper object as an Actuator.)

<Damper>.Drag Float default: 0.0 -- animatable

The force per unit linear speed.

<Damper>.Drag_Units Integer default: 0

Sets the units of drag:

0- Pounds per inch/second

1- Newtons per meter/second

<Damper>.Damper_Direction Integer default: 2

Set the directional operation of the damper:

0- Compression Only (The damper reacts only to compression forces.)

1- Extension Only (The damper reacts only to expansion forces.)

2- Both (The damper reacts to both compression and expansion forces.)

<Damper>.Force Float default: 0.0 -- animatable

The amount of force exerted between the two bound objects. Positive values push the objects apart, while negative values pull them together.

<Damper>.Force_Units Integer default: 0

Set the units of force:

0- Pounds

1- Newtons

NOTE:

The Reference End Point objects cannot be specified in MAXScript.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Hose - superclass: GeometryClass

Hose : GeometryClass

Hose - superclass: GeometryClass; super-superclass:node - 27:0 - classID: #(1777953373, 593249034)

Value > MAXWrapper > Node > GeometryClass > Hose

The Hose object is a flexible object that you can connect between two objects, whereupon it reacts to their movement. It's similar to Spring, but does not have dynamics properties. You can specify the overall diameter and length of the hose, the number of turns, and the diameter and shape of its "wire."

Constructor

Hose ...

Note: This class is not available in Autodesk VIZ.

Properties

<Hose>.End_Placement_Method Integer default: 1 -- integer

<Hose>.Generate_Mapping_Coordinates Integer default: 0 -- integer

Sets up required coordinates for applying mapped materials to the hose. Default=off.

<Hose>.Hose_Height Float default: 1.0 -- animatable; float

Use this field/spinner to set the straight-line height or length of the hose when it is not bound. This is not the actual length of the hose. Available only when Free Hose is chosen.

<Hose>.Segments_Along_Hose Integer default: 45 -- animatable; integer

The total number of segments in the hose's length. Increase this setting for a smooth profile when the hose is curved.

<Hose>.Smooth_Spring Integer default: 0 -- integer

Choose one of the following smoothing options:

All: The entire hose is smoothed.

Sides: Smoothing is applied along the length of the hose but not around its circumference.

None: No smoothing is applied.

Segments: Smoothing is applied only on the inner section of the hose.

<Hose>.Renderable_Hose Integer default: 1 -- integer

When on, the hose is rendered using the specified settings. When off, the hose is not rendered. Default=on.

<Hose>.Hose_Cross_Section_Type Integer default: 0 -- integer

Sets a circular cross-section.

Lets you specify different settings for width and depth.

Similar to Rectangular Hose, but rounds one side for a D-shaped cross-section.

<Hose>.Round_Hose_Diameter Float default: 0.2 -- animatable; float

The maximum width of the hose at the ends.

<Hose>.Round_Hose_Sides Integer default: 8 -- animatable; integer

The number of sides of the hose. A Sides setting of 3 gives a triangular cross-section; 4 gives a square cross-section; and 5 gives a pentagonal cross-section. Increase Sides for a circular cross-section.

<Hose>.Rectangular_Hose_Width Float default: 0.2 -- animatable; float

The width of the hose.

<Hose>.Rectangular_Hose_Depth Float default: 0.2 -- animatable; float

The height of the hose.

<Hose>.Rectangular_Hose_Fillet_Size Float default: 0.0 -- animatable; float

The amount by which the cross-section corners are rounded. For this to be visible, Fillet Segs must be set to 1 or higher. Default=0.

<Hose>.Rectangular_Hose_Fillet_Segs Integer default: 0 -- animatable; integer

The number of segments across each filleted corner. A Fillet Segs setting of 1 cuts the corner straight across; use higher settings for rounded corners. Default=0.

<Hose>.Rectangular_Hose_Section_Rotation Float default: 0.0 -- animatable; angle

The orientation of the hose along its long axis. Default=0.

<Hose>.D_Section_Hose_Width Float default: 0.2 -- animatable; float

The width of the hose.

<Hose>.D_Section_Hose_Depth Float default: 0.2 -- animatable; float

The height of the hose.

<Hose>.D_Section_Hose_Fillet_Size Float default: 0.0 -- animatable; float

The amount by which the two cross-section corners opposite the rounded side are rounded. For this to be visible, Fillet Segs must be set to 1 or higher. Default=0.

<Hose>.D_Section_Hose_Fillet_Segs Integer default: 0 -- animatable; integer

The number of segments across each filleted corner. A Fillet Segs setting of 1 cuts the corner straight across; use higher settings for rounded corners. Default=0.

<Hose>.D_Section_Hose_Round_Segs Integer default: 8 -- animatable; integer

The number of segments on the rounded side. Increase for a smoother profile. Default=4.

<Hose>.D_Section_Hose_Section_Rotation Float default: 0.0 -- animatable; angle

The orientation of the hose along its long axis. Default=0.

<Hose>.Flex_Section_Enabled Integer default: 1 -- integer

When on, lets you set the following four parameters for the central, flexible section of the hose. When off, the hose's diameter is uniform throughout its length.

<Hose>.Flex_Section_Start Float default: 10.0 -- animatable; percentage

The percentage of the hose length from the starting extremity of the hose at which the flex section begins. By default, the starting end of the hose is the end at which the object pivot appears. Default=10%.

<Hose>.Flex_Section_Stop Float default: 90.0 -- animatable; percentage

The percentage of the hose length from the end extremity of the hose at which the flex section begins. By default, the end extremity of the hose is opposite the end at which the object pivot appears. Default=90%.

<Hose>.Flex_Cycle_Count Integer default: 5 -- animatable; integer

The number of corrugations in the flex section. The number of visible cycles is limited by the number of segments; if Segments isn't high enough to support the number of cycles, then not all cycles will appear.

Tip: To set the appropriate number of segments, first set Cycles, and then increase Segments until the number of visible cycles stops changing.

<Hose>.Flex_Section_Diameter Float default: -20.0 -- animatable; percentage

The relative width of the "outside" parts of the cycles. At negative settings, these are smaller than the overall hose diameter. At positive settings, these are larger than the overall hose diameter. Default=-20%. Range=-50% to 500%.

<Hose>.Top_Tension Float default: 100.0 -- animatable; float

Determines the arc of the hose near the Top object. Lower the tension to decrease the arc, and raise the tension to increase the arc. Default=100.

<Hose>.Bottom_Tension Float default: 100.0 -- animatable; float

Determines the arc of the hose near the Bottom object. Lower the tension to decrease the arc, and raise the tension to increase the arc. Default=100.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Spring : GeometryClass

Spring - superclass: GeometryClass; super-superclass:node - classID: #(2074280090, 1991647118)

Value > MAXWrapper > Node > GeometryClass > Spring

Constructor

spring ...

Properties

<Spring>.End_Placement_Method Integer default: 1

Set the end placement method:

0- Reference Objects (Choose this when binding the spring to two objects.)

1- Free Spring (Choose this when using the spring as a simple object that's not bound to other objects or used in a dynamics simulation.)

<Spring>.Free_Spring_Height Float default: 1.0 -- animatable

The straight-line height or length of the spring when it is not bound. This is not the actual length of the spring's wire.

<Spring>.Diameter Float default: 1.0 -- animatable

The overall diameter of the spring, as measured at the center of the wire. (The diameter of the wire itself has no effect on this setting.)

<Spring>.Number_of_Turns Float default: 1.0 -- animatable

The number of full 360-degree turns in the spring.

<Spring>.Turn_Direction Integer default: 0

Sets the direction of the turns in the spring:

0- counterclockwise

1- clockwise

<Spring>.Segmentation_Method Integer default: 0

Sets the segmentation method of the springs:

0- Automatic Segments (Choose this option to force each turn of the spring to contains the same number of segments. Thus, if you increase the number of turns, the number of segments also increases.)

1- Manual Segments (When this option is chosen, length of the spring contains a fixed number of segments, no matter how many turns in the spring. Thus, as you increase the number of turns, you must manually increase the number of segments to maintain a smooth curve.)

<Spring>.Segments_Per_Turn Integer default: 16 -- animatable

The number of segments in each 360-degree turn of the spring.

<Spring>.Segments_Along_Turn Integer default: 16 -- animatable

The total number of manual segments in the spring.

<Spring>.Smooth_Spring Integer default: 0

Set smoothing method for spring:

0- All (All surfaces are smoothed.)

1- None (No smoothing is applied.)

2- Sides (Smoothing runs along the length of the wire, but not around its perimeter.)

3- Segments (Smoothing runs around the perimeter of the wire, but not along its length.)

<Damper>.Renderable_Spring Integer default: 1

When on, the object appears in the rendering; when off, the object does not appear:

0- Not renderable

1- Renderable

<Spring>.Wi r e Integer default: 0 -- animatable

Set the shape of the wire:

0- Round

1- Rectangular

2- D-Section

<Spring>.Generate_Mapping_Coordinates Integer default: 0

Turn on/off generate texture coordinates

0- Off

1- On

<Spring>.Round_Wire_Diameter Float default: 0.2 -- animatable

The diameter of the wire.

<Spring>.Round_Wire_Side_Count Integer default: 6 -- animatable

The number of sides that make up the cross section of the round wire.

<Spring>.Rectangular_Wire_Width Float default: 0.2 -- animatable

Determines the width of the rectangular cross section.

<Spring>.Rectangular_Wire_Depth Float default: 0.2 -- animatable

Determines the depth of the rectangular cross section.

<Spring>.Rectangular_Wire_Fillet_Size Float default: 0.0 -- animatable

When combined with .Rectangular_Fillet_Sides, this lets you fillet (round) the corners of the cross section.

<Spring>.Rectangular_Fillet_Sides Integer default: 0 -- animatable

The number of segments in the fillet.

<Spring>.Rectangular_Wire_Rotation_Angle Float default: 0.0 -- animatable, angle

Rotates the angle of the cross section along the entire length of the spring.

<Spring>.D_Section_Wire_Width Float default: 0.2 -- animatable

Determines the width of the cross section.

<Spring>.D_Section_Wire_Depth Float default: 0.2 -- animatable

Determines the depth of the cross section.

<Spring>.D_Section_Round_Sides Integer default: 4 -- animatable

The number of segments that make up the rounded side of the D-shape.

<Spring>.D_Section_Wire_Fillet_Size Float default: 0.0 -- animatable

When combined with .D_Section_Wire_Fillet_Sides, this lets you fillet (round) the corners of the cross section.

<Spring>.D_Section_Wire_Fillet_Sides Integer default: 0 -- animatable

The number of segments in the fillet.

<Spring>.D_Section_Wire_Rotation_Angle Float default: 0.0 -- animatable, angle

Rotates the angle of the cross section along the entire length of the spring.

<Spring>.Dynamics_Spring_Free_Height Float default: 1.0 -- animatable

Specifies the height (or length) at which the spring is "relaxed" and therefore contributes no force—either compression or extension.

<Spring>.Dynamics_K_Constant_Value Float default: 1.0 -- animatable

The amount of force exerted per unit change in length with respect to the Relaxed Hgt value. This could also be described as the measure of force-per-units-change in length as compared to the Relaxed Length.

<Spring>.Dynamics_K_Constant_Units Integer default: 0

Sets the Units for the K constant:

0- Pounds per inch

1- Newtons per meter

<Spring>.Dynamics_Spring_Direction Integer default: 0

Lets you specify the type of force you want the spring to exert. While most springs actually provide both compression and extension force, if your simulation requires only one, you can save calculation time by using one instead of both.

0- Compression Only (This type of spring provides only expansive force when its length is shorter than the specified Free Length.)

1- Extension Only (Provides contractive force when its length is greater than the specified Free Length.)

2- Both (Provides both expansive and contractive force, depending on the variation from Relaxed Hgt.)

<Spring>.Generate_Texture_Coordinates Integer default: 1

Turn on/off generate texture coordinates:

0- Off

1- On

NOTE:

The Reference End Point objects cannot be specified in MAXScript.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Geometry - Compound Objects

The following is the list of the compound objects:

BlobMesh

Boolean2

Conform

Connect

Loft

Mesher

Morph

ProBoolean & ProCutter

Scatter

ShapeMerge

Terrain

OldBoolean


OldBoolean : GeometryClass

Constructor

OldBoolean compound objects are not constructable by MAXScript. Boolean objects created in previous versions of 3ds Max use this class when they are loaded, and then the OldBoolean object is automatically converted to the new Boolean2 class. See Boolean2 for a constructable boolean object.


Boolean2 : GeometryClass

Boolean2 - superclass: GeometryClass; super-superclass:node - classID: #(1373327151, 475622170)

Value > MAXWrapper > Node > GeometryClass > Boolean2

Constructor

boolObj.createBooleanObject <operand_A> [ <operand_B> <add_method> <mat_method> ]

Creates a Boolean2 object using node <operand_A> and an optional node <operand_B>. <add_method> specifies how <operand_B> is to be used as follows:

1 - instance, operand is an instance of the original node

2 - reference, operand is a reference to original node

3 - copy, operand is a copy of original node

4 - move, original node should be deleted

<mat_method> specifies how the materials of the two operands are to be handled as follows:

1 - combines materials without changing them or the ID's

2 - matches ID's to materials, then combines materials

3 - matches materials to ID's, then combines them

4 - discards original material, uses new node's instead

5 - discards new node's material, uses original

Properties

The following properties are available only after the boolean2 object has been created. The values shown for the properties are those for a boolean2 object created from two spheres. The operand transforms are in the local coordinate system of the boolean2 object.

<bool_obj>.Sphere02 SubAnim default: SubAnim:Sphere02

<bool_obj>.Operand_A_Transform SubAnim default: SubAnim:Operand_A_Transform

<bool_obj>.Sphere01 SubAnim default: SubAnim:Sphere01

<bool_obj>.Operand_B_Transform SubAnim default: SubAnim:Operand_B_Transform

Methods

boolObj.setOperandB <bool_obj> <operand_B> <add_method> <mat_method>

sets operand B. The values for <add_method> and <mat_method> are describe above.

boolObj.getOperandSel <bool_obj> <integer>

boolObj.setOperandSel <bool_obj> <integer> <boolean>

these methods get and set whether operand_A and operand_B are selected in the Operands list. <integer> = 1 - operand_A, 2 - operand_B

boolObj.getBoolOp <bool_obj>

boolObj.setBoolOp <bool_obj> <integer>

these methods get and set the boolean Operation Type. Valid values are:

1 - Union

2 - Intersection

3 - Subtraction (A-B)

4 - Subtraction (B-A)

5 - Cut

boolObj.getBoolCutType <bool_obj>

boolObj.setBoolCutType <bool_obj> <integer>

these methods get and set the boolean Cut Type. The value for this property only has an effect if the Operation Type is Cut. The Cut Types are:

1 - Refine

2 - Split

3 - Remove Inside

4 - Remove Outside

boolObj.getDisplayResult <bool_obj>

boolObj.setDisplayResult <bool_obj> <boolean>

these methods get and set whether Results or Operands are displayed. If true, Result is displayed. If false, Operands are displayed.

boolObj.getShowHiddenOps <bool_obj>

boolObj.setShowHiddenOps <bool_obj> <boolean>

these methods get and set whether Results + Hidden Operands are displayed. If true, Results + Hidden Operands are displayed. If false, the Results or Operands as specified using boolObj.SetDisplayResult() are displayed.

boolObj.getUpdateMode <bool_obj>

boolObj.setUpdateMode <bool_obj> <integer>

these methods get and set the Update mode as follows:

1 - Always

2 - When Rendering

3 - Manually

boolObj.getOptimize <bool_obj>

boolObj.setOptimize <bool_obj> <boolean>

these methods get and set whether vertices are to be welded on the boolean result

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


BlobMesh : GeometyClass

BlobMesh - superclass: GeometryClass; super-superclass:node - 12:0 - classID: #(1823519629, 1465620393)

Value > MAXWrapper > Node > GeometryClass > BlobMesh

The BlobMesh Compound Object Class lets you create Instances which turn any geometry object or ParticleFlow particle system into a Metaball system.

Constructor:

BlobMesh ...

Properties:

<BlobMesh>.size Float default: 20.0 -- animatable; world units

Get/Set the Size of the Metaballs

<BlobMesh>.tension Float default: 1.0 -- animatable; float

Get/Set the Surface Tension of the Metaballs

<BlobMesh>.render Float default: 3.0 -- animatable; world units

Get/Set the Render Coarseness value.

<BlobMesh>.viewport Float default: 6.0 -- animatable; world units

Get/Set the Render Coarseness value.

<BlobMesh>.relativeCourseness BooleanClass default: false -- boolean; Courseness

Enable/Disable Relative Coarseness.

<BlobMesh>.nodeList ArrayParameter default: #() -- node array; Node_List; SubAnim

Get/Set the List of the nodes to create Metaballs from.

<BlobMesh>.useSoftSelection BooleanClass default: false -- boolean; Use_Soft_Selection

When set to True, incoming Soft Selection will be used to affect the Metaballs generation .

<BlobMesh>.minSize Float default: 10.0 -- animatable; world units; Min_Size

Get/Set the Min. Size value.

<BlobMesh>.largeDataSetOptimization BooleanClass default: false -- boolean; Large_Data_Set_Optimization

Toggle Optimization for large data sets.

<BlobMesh>.useAllPFEvents BooleanClass default: true -- boolean; Use_All_PF_Events

When set to True, particles from all Particle Flow Events will be used to create Metaballs.

<BlobMesh>.pfEventList ArrayParameter default: #() -- node array; PF_Event_List; SubAnim

Get/Set the list of Particle Flow events.

<BlobMesh>.offInView BooleanClass default: false -- boolean; Off_In_View

When set to True, the resulting metaball mesh will not be displayed in the viewport.

BlobMesh interfaces:

Interface: blobMeshOps

Methods:

<void>addBlob <node>node

node - the node to be added as a blob

This adds a node to the metaball system

<void>removeBlob <node>node

node the node to be removed

This lets you remove a node from the metaball system

<void>addPFBlob <node>node

node the PF Event node to be added

This adds a PF Event node to the metaball system

<void>removePFBlob <node>node

node the PF Event node to be removed

This removes a PF Event node to the metaball system

<void>pick()

This equivalent to pushing the Pick button in the UI

<void>add()

This equivalent to pushing the Add button in the UI

<void>addPF()

This equivalent to pushing the Add button in the PF Rollout UI

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Conform : GeometryClass

Conform - superclass: GeometryClass; super-superclass:node - classID: #(447821655, 305552280)

Value > MAXWrapper > Node > GeometryClass > Conform

Constructor

Conform compound objects are not constructable by MAXScript.

Properties

<Conform>.Projection_Distance Float default: 1.0 -- animatable

The distance a vertex in the Wrapper object will move from its original location if it does not intersect the Wrap-To object.

<Conform>.Standoff_Distance Float default: 1.0 -- animatable

The distance maintained between the vertex of the Wrapper object and the surface of the Wrap-To object

The following properties are available only after the conform object has been created. The values shown for the properties are those for a conform object created from two spheres. The operand transforms are in the local coordinate system of the conform object.

<Conform>.S_Sphere02 SubAnim default: SubAnim:S_Sphere02

<Conform>.Operand_A_Transform SubAnim default: SubAnim:Operand_A_Transform

<Conform>.D_Sphere01 SubAnim default: SubAnim:D_Sphere01

<Conform>.Operand_B_Transform SubAnim default: SubAnim:Operand_B_Transform

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Connect : GeometryClass

Connect - superclass: GeometryClass; super-superclass:node - classID: #(1112963990, 1318853357)

Value > MAXWrapper > Node > GeometryClass > Connect

Constructor

Connect compound objects are not constructable by MAXScript.

Properties

<Connect>.segments Integer default: 0 -- animatable

The number of segments in the connecting bridge.

<Connect>.tension Float default: 0.5 -- animatable

Controls the curvature in the connecting bridge. A value of 0 provides no curvature, while higher values create curves that attempt to more smoothly match the surface normals on either end of the connecting bridge.

The following properties are available only after the connect object has been created. The values shown for the properties are those for a connect object created from two spheres. Similar SubAnims would be created if additions operands were used. The operand transforms are in the local coordinate system of the connect object.

<Connect>.Op_0__Sphere02 SubAnim default: SubAnim:Op_0__Sphere02

<Connect>.Op_0_Transform SubAnim default: SubAnim:Op_0_Transform

<Connect>.Op_1__Sphere01 SubAnim default: SubAnim:Op_1__Sphere01

<Connect>.Op_1_Transform SubAnim default: SubAnim:Op_1_Transform

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Loft : GeometryClass

Loft - superclass: GeometryClass; super-superclass:node - classID: #(6553, 0)

Value > MAXWrapper > Node > GeometryClass > Loft

Constructor

Loft compound objects are not constructable by MAXScript.

Properties

<Loft>.Def_Scale_X SubAnim default: SubAnim:Def_Scale_X

<Loft>.Def_Scale_Y SubAnim default: SubAnim:Def_Scale_Y

<Loft>.Def_Twist SubAnim default: SubAnim:Def_Twist

<Loft>.Def_Teeter_X SubAnim default: SubAnim:Def_Teeter_X

<Loft>.Def_Teeter_Y SubAnim default: SubAnim:Def_Teeter_Y

<Loft>.Def_Bevel SubAnim default: SubAnim:Def_Bevel

<Loft>.Def_Fit_X SubAnim default: SubAnim:Def_Fit_X

<Loft>.Def_Fit_Y SubAnim default: SubAnim:Def_Fit_Y

These SubAnims contain the deformation curves of the loft object. You cannot create or access points in these curves unless the point is animated. In this case, you can access the animated point position as a SubAnim of the property.

The following properties are available only after the loft object has been created. The values shown for the properties are those for a loft object created from an ellipse (the path) and a circle (the shape).

<loft>.ellipse SubAnim default: SubAnim:Ellipse

<Loft>.circle SubAnim default: SubAnim:Circle

These SubAnims contain the parameters of the path and shape objects, respectively. If multiple shapes are used in a loft, each of these shape objects will have a corresponding SubAnim.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Mesher - superclass: GeometryClass

Mesher - superclass: GeometryClass; super-superclass:node - 8:0 - classID: #(998877, 32670)

Value > MAXWrapper > Node > GeometryClass > Mesher

Constructor

Mesher ...

particleMesher ...

The Mesher compound object converts procedural objects to mesh objects on a per-frame basis so that you can apply modifiers such as Bend or UVW Map. It can be used with any type of object, but is designed primarily to work with particle systems. Mesher is also useful for low-overhead instancing of objects with complex modifier stacks.

Properties

<Mesher>.pick UndefinedClass default: undefined -- node

Click this button and then select the object to be instanced by the Mesher object. After doing so, the name of the instanced object appears on the button.

<Mesher>.renderTimeOnly Boolean default: false -- boolean

When on, the Mesher mesh does not appear in the viewports, but only when you render the scene. Default=off.

<Mesher>.extranodes ArrayParameter default: #() -- node array

<Mesher>.time Float default: 0.0 -- float

The number of frames ahead of or behind the original particle system that the Mesher's particle system will run. Default=0.

<Mesher>.radius Float default: 10.0 -- float

<Mesher>.useCustomBounds Boolean default: false -- boolean; Use_Custom_Bounds

When on, Mesher replaces the dynamic bounding box derived from the particle system and modifier with a static bounding box of the user's choice.

<Mesher>.boundsMin Point3 default: [1,1,1] -- point3; BoundsA

<Mesher>.boundsMax Point3 default: [-1,-1,-1] -- point3; BoundsB

The coordinates of the opposite corners of the custom bounding box.

<Mesher>.useAllPFEvents BooleanClass default: true -- boolean; Use_All_PF_Events

When set to true, all Particle Flow events will be used. When false, only events on the .pfEventList will be used.

<Mesher>.pfEventList ArrayParameter default: #() -- node array; PF_Events

When useAllPFEvents is set to false, only the Particle Flow events specified in this property will be used.


Morph : GeometryClass

Morph - superclass: GeometryClass; super-superclass:node - classID: #(4129, 0)

Value > MAXWrapper > Node > GeometryClass > Morph

Constructor

createMorphObject <source_node>

Modification of Morph objects, including setting the morph keys and adding morph targets, is performed using methods associated with the Morph controller. See MorphController for a description of these methods.

Properties

The following properties are available only after the morph object has been created. The values shown for the properties are those for a morph object created from three spheres.

<Morph>.M_Sphere01 SubAnim default: SubAnim:M_Sphere01

<Morph>.M_Sphere02 SubAnim default: SubAnim:M_Sphere02

<Morph>.M_Sphere03 SubAnim default: SubAnim:M_Sphere03

<Morph>.Morph Barycentric_Morph_Controller default: Controller:Barycentric_Morph_Controller

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Scatter : GeometryClass

Scatter - superclass: GeometryClass; super-superclass:node - classID: #(1545869245, 1141180772)

Value > MAXWrapper > Node > GeometryClass > Scatter

Constructor

Scatter compounds are not constructable by MAXScript.

Properties

<Scatter>.Duplicates Integer default: 1 -- animatable

The number of scattered duplicates of the source object.

<Scatter>.Base_Scale Float default: 100.0 -- animatable, percentage

Alters the scale of the source object, affecting each duplicate identically. This scale occurs before any other transforms.

<Scatter>.Vertex_Chaos Float default: 0.0 -- animatable

Applies a random perturbation to the vertices of the source object.

<Scatter>.Animation_Offset Time default: 0f -- animatable

The number of frames by which each source object duplicate's animation is offset from the previous duplicate.

<Scatter>.x_rotation Float default: 0.0 -- animatable

The maximum random rotational offset you want about the local X-axis of each duplicate.

<Scatter>.y_rotation Float default: 0.0 -- animatable

The maximum random rotational offset you want about the local Y-axis of each duplicate.

<Scatter>.z_rotation Float default: 0.0 -- animatable

The maximum random rotational offset you want about the local Z-axis of each duplicate.

<Scatter>.X_Translation Float default: 0.0 -- animatable

The maximum random movement you want along the X-axis of each duplicate.

<Scatter>.Y_Translation Float default: 0.0 -- animatable

The maximum random movement you want along the Y-axis of each duplicate.

<Scatter>.Z_Translation Float default: 0.0 -- animatable

The maximum random movement you want along the Z-axis of each duplicate.

<Scatter>.A_Translation_on_Face Float default: 0.0 -- animatable

The first barycentric coordinate on the surface of the face, upon which duplicates are translated.

<Scatter>.B_Translation_on_Face Float default: 0.0 -- animatable

The second barycentric coordinate on the surface of the face, upon which duplicates are translated.

<Scatter>.N_Translation_on_Face Float default: 0.0 -- animatable

The offset along the normal of the face, upon which duplicates are translated.

<Scatter>.Local_X_Scaling Float default: 0.0 -- animatable

The percent of random scaling along the X-axis of each duplicate.

<Scatter>.Local_Y_Scaling Float default: 0.0 -- animatable

The percent of random scaling along the X-axis of each duplicate.

<Scatter>.Local_Z_Scaling Float default: 0.0 -- animatable

The percent of random scaling along the X-axis of each duplicate.

The following properties are available only after the Scatter object has been created. The values shown for the properties are those for a Scatter object created from two boxes. The operand transforms are in the local coordinate system of the Scatter object.

<Scatter>.S_Box04 SubAnim default: SubAnim:S_Box04

<Scatter>.Operand_A_Transform SubAnim default: SubAnim:Operand_A_Transform

<Scatter>.D_Box05 SubAnim default: SubAnim:D_Box05

<Scatter>.Operand_B_Transform SubAnim default: SubAnim:Operand_B_Transform

NOTE:

Many properties associated with Scatter are not accessible to MAXScript.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


ShapeMerge : GeometryClass

ShapeMerge - superclass: GeometryClass; super-superclass:node - classID: #(1787264003, 1737781638)

Value > MAXWrapper > Node > GeometryClass > ShapeMerge

Constructor

ShapeMerge compound objects are not constructable by MAXScript.

Properties

<ShapeMerge>.Operation_Type Integer default: 1

Set the shapemerge operation type:

0- Cookie Cutter (Cuts the shape out of the mesh object's surface.)

1- Merge (Merges the shape with the surface of the mesh object.)

<ShapeMerge>.Remove_Interior_Exterior Integer default: 0

Reverses the effect of Cookie Cutter or Merge. With the Cookie Cutter option, the effect is obvious. When Invert is off, the shape is a hole in the mesh object. When Invert is on, the shape is solid and the mesh is missing. When you're using Merge, Invert reverses the sub-object mesh selection.

0- Invert OFF

1- Invert ON

<ShapeMerge>.Output_Sub_Mesh_Selection Integer default: 0

Sets which selection level is output:

0- None (Outputs the full object.)

1- Vertex (Outputs the vertices defined by the spline of the shape.)

2- Edge (Outputs the edge of the merged shape.)

3- Face (Outputs the faces within the merged shape.)

The following properties are available only after the ShapeMerge object has been created. The values shown for the properties are those for a ShapeMerge object created from a sphere and a circle. SubAnims similar to the Circle01 SubAnim would be created if additions operands were used. The operand transforms are in the local coordinate system of the ShapeMerge object.

<ShapeMerge>.mesh__sphere01 SubAnim default: SubAnim:Mesh__Sphere01

<ShapeMerge>.mesh_transform SubAnim default: SubAnim:Mesh_Transform

<ShapeMerge>.shape_1__circle01 SubAnim default: SubAnim:Shape_1__Circle01

<ShapeMerge>.shape_1_transform SubAnim default: SubAnim:Shape_1_Transform

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Terrain : GeometryClass

Terrain - superclass: GeometryClass; super-superclass:node - classID: #(914240495, 130049804)

Value > MAXWrapper > Node > GeometryClass > Terrain

Constructor

Terrain ...

Properties

<Terrain>.Form Integer default: 1

Set the terrain form:

0- Graded Surface (Creates a graded surface of the mesh over the contours.)

1- Graded Solid (Creates a graded surface with skirts around the sides and a bottom surface. This represents a solid that is visible from every direction.)

2- Layered Solid (Creates a "wedding cake" or laminated solid similar to cardboard architectural models.)

<Terrain>.stitchBorder Boolean default: false

Turn on/off stitch border.

<Terrain>.retriangulate Boolean default: false

Turn on/off retriangulate.

<Terrain>.display Integer default: 0

Select the type of display for the terrain object:

0- Terrain (Displays only the triangulated mesh over the contour line data.)

1- Contours (Displays only the contour line data of the terrain object.)

2- Both (Displays both the triangulated mesh and the contour line data of the terrain object.)

<Terrain>.update Integer default: 0

Set update settings for the terrain object:

0- Always (Updates the terrain object immediately when you change an operand, including the original object of an instanced or referenced operand.)

1- When Rendering (Updates the terrain object when you render the scene or when you force an update. With this option, viewports won't show current geometry unless you.)

2- Manually (Updates the terrain object when you force an update.)

<Terrain>.numOps Integer default: 0

The number of contour operands. Read-only.

<Terrain>.horizSimplification Integer default: 0

horizSimplification = 0 - No Simplification; 1 - Use ½ of Points; 2 - Use ¼ of Points; 3 - Interpolate Points * 2; 4 - Interpolate Points * 4

<Terrain>.vertSimplification Integer default: 0

vertSimplification = 0 - No Simplification; Use ½ of Lines; 2 - Use ¼ of Lines

The following properties are available only after the terrain object has been created. The values shown for the properties are those for a terrain object created from three circles. The operand transforms are in the local coordinate system of the terrain object.

<Terrain>.Op_0__Circle01 SubAnim default: SubAnim:Op_0__Circle01

<Terrain>.Op_0_Transform SubAnim default: SubAnim:Op_0_Transform

<Terrain>.Op_1__Circle02 SubAnim default: SubAnim:Op_1__Circle02

<Terrain>.Op_1_Transform SubAnim default: SubAnim:Op_1_Transform

<Terrain>.Op_2__Circle03 SubAnim default: SubAnim:Op_2__Circle03

<Terrain>.Op_2_Transform SubAnim default: SubAnim:Op_2_Transform

Methods

terrainOps.addOperand <terrain> <node>

Appends a node as a contour operand to the terrain.

NOTE:

This is done in 'Move' mode, so the the supplied node is deleted after the addition. To simulate other modes, use appropriate MAXScript functions.

EXAMPLE

terrainOps.addOperand $terrain01 (instance $line03)

terrainOps.deleteOperand <terrain> <index_integer>

Deletes the indexed operand, index_integer is 1-based.

terrainOps.getOperand <terrain> <index_integer>

Returns the indexed contour operand as a 3ds Max base object (not a node), index_integer is 1-based.

terrainOps.getOperandTM <terrain> <index_integer>

Returns the indexed operand's local transformation matrix as a Matrix3 value. This transformation matrix is relative to the terrain's node transformation matrix.

terrainOps.setOperandTM <terrain> <index_integer> <matrix3>

Sets the indexed operand's local transformation matrix. This transformation matrix is relative to the terrain's node transformation matrix.

terrainOps.update <terrain>

Forces a terrain update for those in manual update mode.

NOTE:

The above methods are defined in the Landform DLL and so will only be present if the Landform DLL has been loaded. In installations set up with delayed plugin loading enabled, this will happen automatically if there are any existing terrain objects in the scene or a terrain object is created in the user interface or via MAXScript.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Geometry - Doors and Windows

The following lists display the doors and windows AEC objects:

Doors

BiFold

Pivot

SlidingDoor

Windows

Awning

Casement

Fixed

Pivoted

Projected

SlidingWindow

See also

Geometry - AEC Extended Objects

Geometry - Stairs


Awning : GeometryClass

Awning - superclass: GeometryClass; super-superclass:node - 11:0 - classID: #(623989466, 470630555)

Value > MAXWrapper > Node > GeometryClass > Awning

This class is available again in 3ds Max 6 and higher. It was not available in 3ds Max 4 and 5.

Constructor

awning ...

Properties

<Awning>.height Float default: 0.0 -- animatable; float

Get/Set the height of the window.

<Awning>.width Float default: 0.0 -- animatable; float

Get/Set the width of the window.

<Awning>.depth Float default: 0.0 -- animatable; float

Get/Set the depth of the window.

<Awning>.Horizontal_Frame_Width Float default: 2.0 -- animatable; float

Get/Set the width of the horizontal frame of the window.

<Awning>.Vertical_Frame_Width Float default: 2.0 -- animatable; float

Get/Set the width of the vertical frame of the window.

<Awning>.Frame_Thickness Float default: 0.5 -- animatable; float

Get/Set the thickness of the window's frame.

<Awning>.Glazing_Thickness Float default: 0.25 -- animatable; float

Get/Set the thickness of the window's glasing.

<Awning>.Rail_Width Float default: 1.0 -- animatable; float

Get/Set the width of the rail.

<Awning>.Number_of_Panels Integer default: 1 -- integer

Get/Set the number of panels.

<Awning>.Percent_Open Integer default: 0 -- animatable; integer

Get/Set the percentage value defining the open state of the window.

<Awning>.Generate_Mapping_Coords Boolean default: false -- boolean

Enable/Disable mapping coordinates generation.

Interfaces:

Interface: realWorldMapSizeInterface

Properties:

.realWorldMapSize : boolean : Read|Write

Enables/disables the real-world map size option. Available in 3ds Max 8 and higher.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


BiFold : GeometryClass

BiFold - superclass: GeometryClass; super-superclass:node - 26:0 - classID: #(1614050899, 1271618516)

Value > MAXWrapper > Node > GeometryClass > BiFold

This class is available again in 3ds Max 6 and higher. It was not available in 3ds Max 4 and 5.

Constructor

bifold ...

Properties

<BiFold>.height Float default: 0.0 -- animatable; float

Get/Set the height of the door.

<BiFold>.open Float default: 0.0 -- animatable; float

Get/Set the percentage value defining the open state of the window.

<BiFold>.width Float default: 0.0 -- animatable; float

Get/Set the width of the door.

<BiFold>.depth Float default: 0.0 -- animatable; float

Get/Set the depth of the door.

<BiFold>.Generate_Mapping_Coords BooleanClass default: false -- boolean

Enable/Disable mapping coordinates generation.

<BiFold>.Double_Doors Integer default: 0 -- integer

Controls the state of the Double Doors checkbox in the "Parameters" rollout. Possible values are:

0 - off

1 - on

<BiFold>.Flip_Swing BooleanClass default: false -- boolean

When set to true, flips the door's swing.

<BiFold>.Flip_Hinge BooleanClass default: false -- boolean

When set to true, flips the door's hinge when Double_Doors is set to 0.

<BiFold>.Create_Frame BooleanClass default: true -- boolean

<BiFold>.Frame_Width Float default: 2.0 -- animatable; float

<BiFold>.Frame_Depth Float default: 1.0 -- animatable; float

<BiFold>.Door_Offset Float default: 0.0 -- animatable; float

<BiFold>.Leaf_Thickness Float default: 2.0 -- animatable; float

<BiFold>.Stiles_Top_Rail Float default: 4.0 -- animatable; float

<BiFold>.Bottom_Rail Float default: 12.0 -- animatable; float

<BiFold>.Number_of_Panels_Horizontally Integer default: 1 -- integer

<BiFold>.Number_of_Panels_Vertically Integer default: 1 -- integer

<BiFold>.Muntin Float default: 2.0 -- animatable; float

<BiFold>.Panel_Type Integer default: 1 -- integer

<BiFold>.Glass_Thickness Float default: 0.25 -- animatable; float

<BiFold>.Bevel_Angle Float default: 45.0 -- animatable; float

<BiFold>.Panel_Thickness_1 Float default: 0.25 -- animatable; float

<BiFold>.Panel_Thickness_2 Float default: 0.5 -- animatable; float

<BiFold>.Panel_Middle_Thickness Float default: 0.25 -- animatable; float

<BiFold>.Panel_Width_1 Float default: 1.0 -- animatable; float

<BiFold>.Panel_Width_2 Float default: 0.5 -- animatable; float

Interfaces:

Interface: realWorldMapSizeInterface

Properties:

.realWorldMapSize : boolean : Read|Write

Enables/disables the real-world map size option. Available in 3ds Max 8 and higher.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Casement : GeometryClass

Casement - superclass: GeometryClass; super-superclass:node - 12:0 - classID: #(1902665597, 1593788199)

Value > MAXWrapper > Node > GeometryClass > Casement

This class is available again in 3ds Max 6 and higher. It was not available in 3ds Max 4 and 5.

Constructor

casement ...

Properties

<Casement>.height Float default: 0.0 -- animatable; float

Get/set the height.

<Casement>.width Float default: 0.0 -- animatable; float

Get/set the width.

<Casement>.depth Float default: 0.0 -- animatable; float

Get/set the depth.

<Casement>.Horizontal_Frame_Width Float default: 2.0 -- animatable; float

Get/set the horizontal frame width.

<Casement>.Vertical_Frame_Width Float default: 2.0 -- animatable; float

Get/set the vertical frame width.

<Casement>.Frame_Thickness Float default: 0.5 -- animatable; float

Get/set the frame thickness.

<Casement>.Glazing_Thickness Float default: 0.25 -- animatable; float

Get/set the glazing thickness.

<Casement>.Percent_Open Integer default: 0 -- animatable; integer

Get/set the open percentage value.

<Casement>.Generate_Mapping_Coords BooleanClass default: false -- boolean

Enable/disable the generation of mapping coordinates.

<Casement>.Panel_Width Float default: 1.0 -- animatable; float

Get/set the panel width.

<Casement>.Number_of_Casements Integer default: 1 -- integer

Get/set the number of casements.

Possible values are:

1 - One

2 - Two

<Casement>.Opens_to_Inside BooleanClass default: false -- boolean

When set to true, the opening direction will be inversed.

Interfaces:

Interface: realWorldMapSizeInterface

Properties:

.realWorldMapSize : boolean : Read|Write

Enables/disables the real-world map size option. Available in 3ds Max 8 and higher.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Fixed : GeometryClass

Fixed - superclass: GeometryClass; super-superclass:node - 12:0 - classID: #(1944206695, 1350573867)

Value > MAXWrapper > Node > GeometryClass > Fixed

This class is available again in 3ds Max 6 and higher. It was not available in 3ds Max 4 and 5.

Constructor

fixed ...

Properties

<Fixed>.height Float default: 0.0 -- animatable

<Fixed>.width Float default: 0.0 -- animatable

<Fixed>.depth Float default: 0.0 -- animatable

<Fixed>.Horizontal_Frame_Width Float default: 2.0 -- animatable

<Fixed>.Vertical_Frame_Width Float default: 2.0 -- animatable

<Fixed>.Frame_Thickness Float default: 0.5 -- animatable

<Fixed>.Glazing_Thickness Float default: 0.25 -- animatable

<Fixed>.Rail_Width Float default: 1.0 -- animatable

<Fixed>.Number_of_Panels_Horizontally Integer default: 1

<Fixed>.Number_of_Panels_Vertically Integer default: 1

<Fixed>.Chamfered_Profile Boolean default: false

<Fixed>.Generate_Mapping_Coords Boolean default: false

Interfaces:

Interface: realWorldMapSizeInterface

Properties:

.realWorldMapSize : boolean : Read|Write

Enables/disables the real-world map size option. Available in 3ds Max 8 and higher.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Pivot : GeometryClass

pivot - superclass: GeometryClass; super-superclass:node - classID: #(691407584, 431947838)

Value > MAXWrapper > Node > GeometryClass > Pivot

This class is available again in 3ds Max 6 and higher. It was not available in 3ds Max 4 and 5.

Constructor

pivot ...

Properties

<pivot>.height Float default: 0.0 -- animatable; float

<pivot>.width Float default: 0.0 -- animatable; float

<pivot>.depth Float default: 0.0 -- animatable; float

<pivot>.Generate_Mapping_Coords BooleanClass default: false -- Boolean

<pivot>.Double_Doors Integer default: 0 -- integer

Double_Doors = 0 - false; 1 - true

<pivot>.Flip_Swing BooleanClass default: false -- Boolean

<pivot>.Flip_Hinge BooleanClass default: false -- Boolean

<pivot>.Create_Frame BooleanClass default: true -- Boolean

<pivot>.Frame_Width Float default: 2.0 -- animatable; float

<pivot>.Frame_Depth Float default: 1.0 -- animatable; float

<pivot>.Door_Offset Float default: 0.0 -- animatable; float

<pivot>.Leaf_Thickness Float default: 2.0 -- animatable; float

<pivot>.Stiles_Top_Rail Float default: 4.0 -- animatable; float

<pivot>.Bottom_Rail Float default: 12.0 -- animatable; float

<pivot>.Number_of_Panels_Horizontally Integer default: 1 -- integer

<pivot>.Number_of_Panels_Vertically Integer default: 1 -- integer

<pivot>.Muntin Float default: 2.0 -- animatable; float

<pivot>.Panel_Type Integer default: 1 -- integer

Panel_Type = 0 - None; 1 - Glass; 2 - Beveled

<pivot>.Glass_Thickness Float default: 0.25 -- animatable; float

<pivot>.Bevel_Angle Float default: 45.0 -- animatable; float

<pivot>.Panel_Thickness_1 Float default: 0.25 -- animatable; float

<pivot>.Panel_Thickness_2 Float default: 0.5 -- animatable; float

<pivot>.Panel_Middle_Thickness Float default: 0.25 -- animatable; float

<pivot>.Panel_Width_1 Float default: 1.0 -- animatable; float

<pivot>.Panel_Width_2 Float default: 0.5 -- animatable; float

<pivot>.Open__degrees Float default: 0.0 -- animatable; float

Interfaces:

Interface: realWorldMapSizeInterface

Properties:

.realWorldMapSize : boolean : Read|Write

Enables/disables the real-world map size option. Available in 3ds Max 8 and higher.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Pivoted : GeometryClass

Pivoted - superclass: GeometryClass; super-superclass:node - classID: #(730876186, 176978291)

Value > MAXWrapper > Node > GeometryClass > Pivoted

This class is available again in 3ds Max 6 and higher. It was not available in 3ds Max 4 and 5.

Constructor

pivoted ...

Properties

<Pivoted>.height Float default: 0.0 -- animatable

<Pivoted>.width Float default: 0.0 -- animatable

<Pivoted>.depth Float default: 0.0 -- animatable

<Pivoted>.Horizontal_Frame_Width Float default: 2.0 -- animatable

<Pivoted>.Vertical_Frame_Width Float default: 2.0 -- animatable

<Pivoted>.Frame_Thickness Float default: 0.5 -- animatable

<Pivoted>.Glazing_Thickness Float default: 0.25 -- animatable

<Pivoted>.Rail_Width Float default: 1.0 -- animatable

<Pivoted>.Vertical_Rotation Boolean default: false

<Pivoted>.Percent_Open Integer default: 0 -- animatable

<Pivoted>.Generate_Mapping_Coords Boolean default: false

Interfaces:

Interface: realWorldMapSizeInterface

Properties:

.realWorldMapSize : boolean : Read|Write

Enables/disables the real-world map size option. Available in 3ds Max 8 and higher.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Projected : GeometryClass

projected - superclass: GeometryClass; super-superclass:node - classID: #(513221680, 870926367)

Value > MAXWrapper > Node > GeometryClass > Projected

This class is available again in 3ds Max 6 and higher. It was not available in 3ds Max 4 and 5.

Constructor

projected ...

Properties

<projected>.height Float default: 0.0 -- animatable; float

<projected>.width Float default: 0.0 -- animatable; float

<projected>.depth Float default: 0.0 -- animatable; float

<projected>.Horizontal_Frame_Width Float default: 2.0 -- animatable; float

<projected>.Vertical_Frame_Width Float default: 2.0 -- animatable; float

<projected>.Frame_Thickness Float default: 0.5 -- animatable; float

<projected>.Glazing_Thickness Float default: 0.25 -- animatable; float

<projected>.Rail_Width Float default: 1.0 -- animatable; float

<projected>.Percent_Open Integer default: 0 -- animatable; integer

<projected>.Generate_Mapping_Coords BooleanClass default: false -- Boolean

<projected>.Middle_Height Float default: 0.0 -- animatable; float

<projected>.Bottom_Height Float default: 0.0 -- animatable; float

Interfaces:

Interface: realWorldMapSizeInterface

Properties:

.realWorldMapSize : boolean : Read|Write

Enables/disables the real-world map size option. Available in 3ds Max 8 and higher.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


SlidingDoor : GeometryClass

SlidingDoor - superclass: GeometryClass; super-superclass:node - 26:0 - classID: #(1906994710, 2100569636)

Value > MAXWrapper > Node > GeometryClass > SlidingDoor

This class is available again in 3ds Max 6 and higher. It was not available in 3ds Max 4 and 5.

Constructor

slidingDoor ...

Properties

<SlidingDoor>.height Float default: 0.0 -- animatable; float

<SlidingDoor>.open Float default: 0.0 -- animatable; float

<SlidingDoor>.width Float default: 0.0 -- animatable; float

<SlidingDoor>.depth Float default: 0.0 -- animatable; float

<SlidingDoor>.Generate_Mapping_Coords BooleanClass default: false -- Boolean

<SlidingDoor>.Double_Doors Integer default: 0 -- integer

<SlidingDoor>.Flip_Swing BooleanClass default: false -- Boolean

<SlidingDoor>.Flip_Hinge BooleanClass default: false -- Boolean

<SlidingDoor>.Create_Frame BooleanClass default: true -- Boolean

<SlidingDoor>.Frame_Width Float default: 2.0 -- animatable; float

<SlidingDoor>.Frame_Depth Float default: 1.0 -- animatable; float

<SlidingDoor>.Door_Offset Float default: 0.0 -- animatable; float

<SlidingDoor>.Leaf_Thickness Float default: 2.0 -- animatable; float

<SlidingDoor>.Stiles_Top_Rail Float default: 4.0 -- animatable; float

<SlidingDoor>.Bottom_Rail Float default: 12.0 -- animatable; float

<SlidingDoor>.Number_of_Panels_Horizontally Integer default: 1 -- integer

<SlidingDoor>.Number_of_Panels_Vertically Integer default: 1 -- integer

<SlidingDoor>.Muntin Float default: 4.0 -- animatable; float

<SlidingDoor>.Panel_Type Integer default: 1 -- integer

<SlidingDoor>.Glass_Thickness Float default: 0.25 -- animatable; float

<SlidingDoor>.Bevel_Angle Float default: 45.0 -- animatable; float

<SlidingDoor>.Panel_Thickness_1 Float default: 0.25 -- animatable; float

<SlidingDoor>.Panel_Thickness_2 Float default: 0.5 -- animatable; float

<SlidingDoor>.Panel_Middle_Thickness Float default: 0.25 -- animatable; float

<SlidingDoor>.Panel_Width_1 Float default: 1.0 -- animatable; float

<SlidingDoor>.Panel_Width_2 Float default: 0.5 -- animatable; float

Interfaces:

Interface: realWorldMapSizeInterface

Properties:

.realWorldMapSize : boolean : Read|Write

Enables/disables the real-world map size option. Available in 3ds Max 8 and higher.

NOTE:

The Double_Doors property is not used by SlidingDoor.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


SlidingWindow : GeometryClass

SlidingWindow - superclass: GeometryClass; super-superclass:node - 14:0 - classID: #(1945855340, 1755450066)

Value > MAXWrapper > Node > GeometryClass > SlidingWindow

This class is available again in 3ds Max 6 and higher. It was not available in 3ds Max 4 and 5.

Constructor

slidingWindow ...

Properties

<SlidingWindow>.height Float default: 0.0 -- animatable; float

<SlidingWindow>.width Float default: 0.0 -- animatable; float

<SlidingWindow>.depth Float default: 0.0 -- animatable; float

<SlidingWindow>.Horizontal_Frame_Width Float default: 2.0 -- animatable; float

<SlidingWindow>.Vertical_Frame_Width Float default: 2.0 -- animatable; float

<SlidingWindow>.Frame_Thickness Float default: 0.5 -- animatable; float

<SlidingWindow>.Glazing_Thickness Float default: 0.25 -- animatable; float

<SlidingWindow>.Rail_Width Float default: 1.0 -- animatable; float

<SlidingWindow>.Percent_Open Integer default: 0 -- animatable; integer

<SlidingWindow>.Generate_Mapping_Coords BooleanClass default: false -- Boolean

<SlidingWindow>.Number_of_Panels_Horizontally Integer default: 1 -- integer

<SlidingWindow>.Number_of_Panels_Vertically Integer default: 1 -- integer

<SlidingWindow>.Chamfered_Profile BooleanClass default: false -- Boolean

<SlidingWindow>.Hung BooleanClass default: true -- Boolean

Interfaces:

Interface: realWorldMapSizeInterface

Properties:

.realWorldMapSize : boolean : Read|Write

Enables/disables the real-world map size option. Available in 3ds Max 8 and higher.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Geometry - AEC Extended Objects

Value > MAXWrapper > Node > GeometryClass > AEC Extended Objects

The following list displays the AEC Extended objects available in Autodesk VIZ, 3ds Max 6 and higher:

Foliage

Railing

Wall

See also

Geometry - Stairs

Geometry - Doors and Windows


Foliage : GeometryClass

Foliage - GeometryClass

Foliage - superclass: GeometryClass; super-superclass:node - 13:0 - classID: #(1318725889, 1104771162)

Value > MAXWrapper > Node > GeometryClass > Foliage

This class was previously available in Autodesk VIZ and is now available in 3ds Max 6 and higher.

Constructor

foliage ...

Properties

<Foliage>.height Float default: 1.0 -- animatable; float

<Foliage>.seed Integer default: 1272847 -- integer

<Foliage>.Density Float default: 1.0 -- animatable; float

<Foliage>.Pruning Float default: 0.0 -- animatable; float

<Foliage>.CanopyMode Integer default: 0 -- integer

<Foliage>.GenUV BooleanClass default: true -- animatable; Boolean

<Foliage>.ShowTrunk BooleanClass default: true -- animatable; Boolean

<Foliage>.ShowBranches BooleanClass default: true -- animatable; Boolean

<Foliage>.ShowLeaves BooleanClass default: true -- animatable; Boolean

<Foliage>.ShowFruit BooleanClass default: true -- animatable; Boolean

<Foliage>.ShowFlowers BooleanClass default: true -- animatable; Boolean

<Foliage>.ShowRoots BooleanClass default: true -- animatable; Boolean

<Foliage>.LevelOfDetail Integer default: 2 -- animatable; integer

NOTE:

While you can create a Foliage object in MAXScript, you cannot specify the plant type, so the Generic Tree plant type is always created.

See also

FoliagetextureMap : TextureMap

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Railing : GeometryClass

Railing - GeometryClass

Railing - superclass: GeometryClass; super-superclass:node - 37:0 - classID: #(2112369932, 2115246037)

Value > MAXWrapper > Node > GeometryClass > Railing

This class was previously available in Autodesk VIZ and is now available in 3ds Max 6 and higher.

Constructor

railing ...

Properties

<Railing>.Top_Rail_Depth Float default: 4.0 -- animatable; float

<Railing>.Top_Rail_Width Float default: 3.0 -- animatable; float

<Railing>.Top_surface_of_Top_Rail_Height Float default: 42.0 -- animatable; float

<Railing>.Railing_Length Float default: 0.0 -- animatable; float

<Railing>.Top_Rail_Profile Integer default: 2 -- integer

Top_Rail_Profile = 0 - (none); 1 - Round; 2 - Square

<Railing>.Lower_Rail_Depth Float default: 2.0 -- animatable; float

<Railing>.Lower_Rail_Width Float default: 1.0 -- animatable; float

<Railing>.Lowest_Rail_Height Float default: 0.0 -- animatable; float

<Railing>.Lower_Rail_Spacing Float default: 0.0 -- animatable; float

<Railing>.Number_of_Lower_Rails Integer default: 1 -- integer

<Railing>.Lower_Rail_Profile Integer default: 2 -- integer

Lower_Rail_Profile = 0 - (none); 1 - Round; 2 - Square

<Railing>.Post_Depth Float default: 2.0 -- animatable; float

<Railing>.Post_Width Float default: 2.0 -- animatable; float

<Railing>.First_Post_Offset Float default: 1.0 -- animatable; float

<Railing>.Post_Spacing Float default: 0.0 -- animatable; float

<Railing>.Number_of_Posts Integer default: 2 -- integer

<Railing>.Posts_oriented_with_curved_Railing BooleanClass default: true -- Boolean

<Railing>.Post_Extension_beyond_bottom_of_Top_Rail Float default: 0.0 -- animatable; float

<Railing>.Post_Profile Integer default: 2 -- integer

<Railing>.Fencing_Type Integer default: 1 -- integer

Fencing_Type = 0 - (none); 1 - Pickets; 2 - Solid Fill

<Railing>.Picket_Depth Float default: 1.0 -- animatable; float

<Railing>.Picket_Width Float default: 1.0 -- animatable; float

<Railing>.First_Picket_Offset Float default: 0.0 -- animatable; float

<Railing>.Picket_Spacing Float default: 0.0 -- animatable; float

<Railing>.Number_of_Pickets_between_each_pair_of_Posts Integer default: 2 -- integer

<Railing>.Pickets_oriented_with_curved_Railing BooleanClass default: true -- Boolean

<Railing>.Picket_Profile Integer default: 2 -- integer

Picket_Profile = 0 - Round; 1 - Square

<Railing>.Picket_Extension_beyond_bottom_of_Top_Rail Float default: 0.0 -- animatable; float

<Railing>.Picket_Bottom_Offset Float default: 0.0 -- animatable; float

<Railing>.Fill_Thickness Float default: 0.25 -- animatable; float

<Railing>.Fill_Top_Offset Float default: 0.0 -- animatable; float

<Railing>.Fill_Bottom_Offset Float default: 0.0 -- animatable; float

<Railing>.Fill_Left_Offset Float default: 0.0 -- animatable; float

<Railing>.Fill_Right_Offset Float default: 0.0 -- animatable; float

<Railing>.Texture_Mapped BooleanClass default: false -- Boolean

<Railing>.Number_of_segments_between_each_pair_of_Posts Integer default: 1 -- integer

<Railing>.Respect_Path_Corners_in_rails BooleanClass default: false -- Boolean

Interfaces:

Interface: realWorldMapSizeInterface

Properties:

.realWorldMapSize : boolean : Read|Write

Enables/disables the real-world map size option. Available in 3ds Max 8 and higher.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Wall : GeometryClass

Wall - superclass: GeometryClass; super-superclass:node - classID: #(-2015787020, -1099137454)

Value > MAXWrapper > Node > GeometryClass > Wall

This class was previously available in Autodesk VIZ and is now available in 3ds Max 6 and higher.

Constructor

Wall ...

Properties

<Wall>.Generate_Mapping_Coords Integer default: 1 -- integer

When set to 1 (default), mapping coordinates will be generated procedurally. When set to 0, no mapping coordinates will be generated.

<Wall>.height Float default: 96.0 -- float

The height of the wall in units, assuming that 1 Unit is one Inch by default.

<Wall>.Justification Integer default: 1 -- integer

Defines the wall justification:

1 - Left

2 - Center

3 - Right

<Wall>.width Float default: 5.0 -- float

The width of the wall.

Interfaces:

Interface: realWorldMapSizeInterface

Properties:

.realWorldMapSize : boolean : Read|Write

Enables/disables the real-world map size option. Available in 3ds Max 8 and higher.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


mr_Proxy : GeometryClass

mr_Proxy - superclass: GeometryClass; super-superclass:node - 18:0 - classID: #(771832789, 331352827)

Value > MAXWrapper > Node > GeometryClass > mr_Proxy

NEW in 3ds Max 2009: The mr_Proxy Geometry Object allows the saving of geometry to file to be used by mental ray directly from disk during rendering. This allows the rendering of very complex scenes using mental ray without keeping the actually geometry in the 3ds Max scene.

Constructor:

mr_proxy ...
mental_ray_Proxy ...

Properties:

Source Object

<mr_Proxy>.SrcGeometry UndefinedClass default: undefined -- node; Source_Geometry

Get/set the Source Geometry object.

<mr_Proxy>.Write BooleanClass default: false -- boolean; Transient_Write_Flag

Set the write flag to true to save the proxy file. Equivalent to pressing the "Write Object To File..." button.

Proxy File

<mr_Proxy>.fileName UndefinedClass default: undefined -- filename; File_Name;

Get the proxy file name.

<mr_Proxy>.Scale Float default: 1.0 -- animatable; float

Get/Set the Scale value.

Display

<mr_Proxy>.Points Integer default: 128 -- integer; Points_to_display

Get/Set the number of Vertices to show in the viewport.

<mr_Proxy>.TrianglesUI Integer default: 0 -- integer; Transient_Triangle_Count

Get the number of triangles stored in the proxy file as shown in the UI.

<mr_Proxy>.ShowPointCloud BooleanClass default: true -- boolean; Show_Point_Cloud

Get/set the state of the Show Point Cloud checkbox.

<mr_Proxy>.ShowBBox BooleanClass default: false -- boolean; Show_Bounding_Box

Get/set the state of the Show Bounding Box checkbox.

Animation Support

<mr_Proxy>.Animated BooleanClass default: false -- boolean; Animation

Get/Set the Animation Support > On Frame checkbox state.

<mr_Proxy>.AnimFrames Integer default: 50 -- integer; Animation_Frame_Count

Get/Set the Animation Support > On Frame value.

<mr_Proxy>.AnimSpeed Float default: 1.0 -- float; Animation_Speed

Get/Set the Animation Speed value.

<mr_Proxy>.AnimOffset Integer default: 0 -- animatable; integer; Animation_Frame_Offset

Get/Set the Animation Offset value.

<mr_Proxy>.AnimPingPong BooleanClass default: false -- boolean; Ping_Pong_Replay

Get/Set the state of the Ping-Pong Replay checkbox.

Internal Properties

<mr_Proxy>.Flags Integer default: 0 -- integer

Internal flags.

Write Object To File Dialog

<mr_Proxy>.SaveSingleObjectPreview BooleanClass default: true -- boolean; Exclude_other_objects_when_generating_Preview

Get/set the state of the Exclude Other Objects checkbox.

<mr_Proxy>.SaveAutoView BooleanClass default: true -- boolean; The__Preview__image_is_automatically_zoomed_such_that_the_object_is_centered_and_fills_the_image

Get/set the state of the Automatic Zoom Extents checkbox.

mrProxy Interfaces

Interface: mrProxyInterface

Methods:

<bool>writeProxyDlg <node>node replace:<bool>

replace default value: false

Opens the mr Proxy Creation dialog (see screenshot above) in preparation to save the specified node. Timing and preview generation options have to be selected manually using the dialog and the creation will start with pressing the OK button.

When replace: is true, the proxy will be aligned to the source and the source will be deleted automatically, effectively replacing the source with the proxy.

When replace: is false (default), the proxy will remain at its original location and the source will not be deleted.

<void>writeProxy <node>node <filename>fileName zoom:<bool> single:<bool> replace:<bool> animation:<bool> start:<integer> end:<integer>

zoom default value: true

single default value: true

replace default value: false

animation default value: false

start default value: 0

end default value: 0

Writes the specified node to the given filename without using the mr Proxy Creation dialog.

When zoom: is true (default), the saved node's preview thumbnail will be zoomed in automatically.

When zoom: is false, the current view will be used without zooming extents.

When single: is true (default), only the source will be rendered in the preview. This corresponds to the "Include only Source object in Preview" option in the mrProxy creation dialog and the corresponding .SaveSingleObjectPreview property described above.

When single: is false, only the source will be rendered in the preview. This

When replace: is true, the proxy will be aligned to the source and the source will be deleted automatically, effectively replacing the source with the proxy.

When replace: is false (default), the proxy will remain at its original location and the source will not be deleted.

When animation: is false (default), only the current frame will be written to disk.

When animation: is true and the start: and end: parameters are not specified, the current animation segment will be saved using one file per frame. When animation: is true and both the start and end parameters are specified, the used-defined range will be used instead. If only one of the start: and end: parameters is supplied, no files will be written.

EXAMPLES:

--The following code saves a box to a custom file name

--on the current frame and replaces the source

--with the proxy, effectively deleting the box and moving

--the proxy to its position:

theProxy = mrProxy()

theBox = Box pos:[10,20,30] lengthsegs:10 widthsegs:10

theProxy.writeProxy theBox "c:\\temp\\box01_.mib" replace:true

--The following saves the existing Teapot01 using

--one file per frame of the whole animation segment

--to the file name already specified in the existing

--mrProxy01 object:

$mrProxy01.writeProxy $Teapot01 $mrProxy.filename animation:true


Geometry - Stairs

Value > MAXWrapper > Node > GeometryClass > Stairs

The following list displays the Stair objects accessible in Autodesk VIZ, 3ds Max 6 and higher:

L_Type_Stair

Spiral_Stair

Straight_Stair

U_Type_Stair

See also

Geometry - AEC Extended Objects

Geometry - Doors and Windows


L_Type_Stair : GeometryClass

L_Type_Stair - superclass: GeometryClass; super-superclass:node - 33:0 - classID: #(1911496588, 1819754015)

Value > MAXWrapper > Node > GeometryClass > L_Type_Stair

This class was previously available in Autodesk VIZ and is now available in 3ds Max 6 and higher.

Constructors:

L_Type_Stair ...

LTypeStair ...

Properties

<L_Type_Stair>.angle Float default: 90.0 -- animatable; float

Get/Set the angle between the two parts of the stair.

<L_Type_Stair>.CarriageContext Integer default: 18 -- integer

Get/Set the carriage configuration control value. Some possible values are:

0 - First carriage on the left side at user-defined internal offset, specified number of carriages repeat at user-defined spacing starting from it.

1 - First carriage on the left side without offset, second carriage on the right side without offset, if CarriageCount is greater than 2, additional carriages spread evently between the first two ignorring spacing settings.

2 - Variable number of carriages spread evenly within the stair's limits based on the CarriageSpace value and CarriageSpacingType settings.

3 - First carriage on the left side without offset, user-defined number of carriages starting from the first one, placed at user-defined CarriageSpace respecting CarriageSpacingType settings.

4 - First carriage on the left side without offset but respecting CarriageSpacingType, second carriage on the right side respecting the CarriageExtOffs value. If CarriageCount is greater than 2, additional carriages spread evently between the two ignorring spacing settings.

5 - First carriage on the right side respecting CarriageExtOffs value, other carriages starting from it at CarriageSpace distance respecting CarriageSpacingType.

6 - First carriage on the left side respecting CarriageIntOffs value, other carriages starting from it respecting CarriageCount, CarriageSpace and CarriageSpacingType. Allows for carriages outside of the stair's limits when using too high values.

7 - First carriage on the left respecting CarriageIntOffs value, second carriage on the right side ignorring CarriageExtOffs value, other carriages based on CarriageCount value spead evenly between the first two respecting CarriageSpacingType but ignorring CarriageSpace.

8, 9 - First carriage on the left side respecting CarriageIntOffs value, other carriages at CarriageSpace distance starting from it respecting CarriageSpacingType (axis to axis or side to side).

10 - First carriage on the left side, second carriage on the right side, third and more carriages spread relatively to the middle of the stair, ignorring CarriageSpacingType.

11 - First carriage on the left side, second carriage at user-defined CarriageSpace distance from it respecting CarriageSpacingType (inner side to inner side or outer side to inner side).

12 - First carriage on the left side, second carriage in the middle of the stair, more carriages spread relatively to the middle of the stair, respecting CarriageSpacingType.

13 - First carriage on the right side, more carriages following at user-defined CarriageSpace distance, only appear when within the stair's limits, respect CarriageSpacingType (outer side to outer side or inner side to outer side).

14,16,17 - First carriage on the left side respecting CarriageIntOffs value, other carriages at CarriageSpace distance starting from it respecting CarriageSpacingType (axis to axis or side to side).

15 - First carriage on the left side respecting CarriageIntOffs value. When two or more carriages, first on the right side, second in the middle. When three or more, first on the right side, other carriages spread evenly around the middle of the stair ignorring CarriageSpace, respecting CarriageSpacingType.

18 - First carriage in the middle of the stair, when more than one, spread symmetrically to the middle of the stair, respecting CarriageSpacingType.

<L_Type_Stair>.CarriageCount Integer default: 1 -- animatable; integer

Get/Set the number of carriages.

<L_Type_Stair>.CarriageExtOffs Float default: 3.0 -- animatable; float

Get/Set the carriage's external offset.

<L_Type_Stair>.CarriageHeight Float default: 8.0 -- animatable; float

Get/Set the carriage height. Corresponds to the "Depth" value in the "Carriage" rollout.

<L_Type_Stair>.CarriageIntOffs Float default: 3.0 -- animatable; float

Get/Set the carriage's inside offset.

<L_Type_Stair>.CarriageSpace Float default: 10.0 -- animatable; float

Get/Set the spacing between carriages.

<L_Type_Stair>.CarriageSpacingType Integer default: 0 -- integer

Get/Set the carriage spacing type. Possible values are:

0 - spacing is measured from axis to side

1 - spacing is measured from axis to axis

<L_Type_Stair>.CarriageSpringFloor Integer default: 1 -- animatable; integer

Controls the state of the "Spring from Floor" checkbox in the "Carriage" rollout. Possible values are

0 - off

1 - on

<L_Type_Stair>.CarriageWidth Float default: 3.0 -- animatable; float

Get/Set the carriage width.

<L_Type_Stair>.GenerateCarriage Integer default: 1 -- animatable; integer

Controls the state of the "Carriage" checkbox in the "Parameters" rollout, "Generate Geometry" group. Possible values are

0 - don't generate Carriage

1 - generate Carriage

<L_Type_Stair>.GenerateInsideRailing Integer default: 0 -- integer

Controls the state of the "Handrail - Left" checkbox in the "Parameters" rollout, "Generate Geometry" group. Possible values are

0 - don't generate Inside Railing

1 - generate Inside Railing

<L_Type_Stair>.GenerateMapping Integer default: 0 -- integer

Controls the state of the "Generate maping Coords." checkbox in the "Parameters" rollout. Possible values are

0 - off

1 - on

<L_Type_Stair>.GenerateOutsideRailing Integer default: 0 -- integer

Controls the state of the "Handrail - Left" checkbox in the "Parameters" rollout, "Generate Geometry" group. Possible values are

0 - don't generate Outside Railing

1 - generate Outside Railing

<L_Type_Stair>.GenerateStringers Integer default: 0 -- animatable; integer

Controls the state of the "Stringers" checkbox in the "Parameters" rollout, "Generate Geometry" group. Possible values are

0 - don't generate Stringers

1 - generate Stringers

<L_Type_Stair>.length Float default: 0.0 -- animatable; float

Get/Set the length of the first part of the stair.

<L_Type_Stair>.length2 Float default: 0.0 -- animatable; float

Get/Set the length of the second part of the stair.

<L_Type_Stair>.RailingHeight Float default: 42.0 -- animatable; float

Get/Set the height of the railing.

<L_Type_Stair>.RailingOffs Float default: 2.0 -- animatable; float

Get/Set the offset of the railing.

<L_Type_Stair>.RailingRadius Float default: 1.0 -- animatable; float

Get/Set the radius of the railing.

<L_Type_Stair>.RailingSegments Integer default: 3 -- animatable; integer

Get/Set the number of segments of the railing.

<L_Type_Stair>.StepCount Integer default: 12 -- animatable; integer

Get/Set the number of steps.

<L_Type_Stair>.StepDepth Float default: 0.0 -- animatable; float

Get/Set the depth of the steps when StepDepth_X is set to 1.

<L_Type_Stair>.StepDepth_X Integer default: 0 -- integer

Enable/Disable the use of the custom StepDepth value. Possible values are:

0 - off

1 - on

<L_Type_Stair>.StepHeight Float default: 0.0 -- animatable; float

Get/Set the height of the steps.

<L_Type_Stair>.StepThickness Float default: 2.0 -- animatable; float

Get/Set the thickness of the steps.

<L_Type_Stair>.StepType Integer default: 0 -- integer

Get/Set the step type. Possible values are

0 - Open

1 - Closed

2 - Box

<L_Type_Stair>.Stepwidth Float default: 39.0 -- animatable; float

Get/Set the width of the steps.

<L_Type_Stair>.StringerDepth Float default: 6.0 -- animatable; float

Get/Set the depth of the stringer.

<L_Type_Stair>.StringerOffset Float default: 1.0 -- animatable; float

Get/Set the offset of the stringer.

<L_Type_Stair>.StringerSpringFloor Integer default: 1 -- animatable; integer

Controls the state of the "Spring from Floor" checkbox in the "Stringers" rollout. Possible values are

0 - off

1 - on

<L_Type_Stair>.StringerWidth Float default: 1.0 -- animatable; float

Get/Set the width of the stringer.

<L_Type_Stair>.UpperOffset Float default: 0.0 -- animatable; float

Get/Set the offset of the upper part from the lower part.

Interfaces:

Interface: realWorldMapSizeInterface

Properties:

.realWorldMapSize : boolean : Read|Write

Enables/disables the real-world map size option. Available in 3ds Max 8 and higher.

See also

Geometry - Stairs

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Spiral_Stair : GeometryClass

Spiral_Stair - superclass: GeometryClass; super-superclass:node - 40:1 - classID: #(1486695442, 1030831817)

Value > MAXWrapper > Node > GeometryClass > Spiral_Stair

This class was previously available in Autodesk VIZ and is now available in 3ds Max 6 and higher.

Constructor

Spiral_Stair ...

Properties

<Spiral_Stair>.CarriageContext Integer default: 18 -- integer

Get/Set the carriage configuration control value. Some possible values are:

0 - First carriage at the inner side at user-defined internal offset, specified number of carriages repeat at user-defined spacing starting from it.

1 - First carriage at inner side without offset, second carriage at outer side without offset, if CarriageCount is greater than 2, additional carriages spread evently between the two ignorring spacing settings.

2 - Variable number of carriages spread evenly based on the CarriageSpace value and CarriageSpacingType settings.

3 - First carriage at inner side without offset, user-defined number of carriages starting from the first one, placed at user-defined CarriageSpace respecting CarriageSpacingType settings.

4 - First carriage at inner side without offset but respecting CarriageSpacingType, second carriage at outer side respecting the CarriageExtOffs value. If CarriageCount is greater than 2, additional carriages spread evently between the two ignorring spacing settings.

5 - First carriage at outer side respecting CarriageExtOffs value, other carriages starting from it at CarriageSpace distance respecting CarriageSpacingType.

6 - First carriage at inner side respecting CarriageIntOffs value, other carriages starting from it respecting CarriageCount, CarriageSpace and CarriageSpacingType. Allows for carriages outside of the actual stair when using too high values.

7 - First carriage at inner side respecting CarriageIntOffs value, second carriage at outer side ignorring CarriageExtOffs value, other carriages based on CarriageCount value spead evenly between the two respecting CarriageSpacingType but ignorring CarriageSpace.

8, 9 - First carriage at inner side respecting CarriageIntOffs value, other carriages at CarriageSpace distance starting from it respecting CarriageSpacingType (axis to axis or side to side).

10 - First carriage at the inner side, second carriage at the outer side, third and more carriages spread relatively to the middle of the stair, ignorring CarriageSpacingType.

11 - First carriage at the inner side, second carriage at user-defined CarriageSpace distance from it respecting CarriageSpacingType (inner side to inner side or outer side to inner side).

12 - First carriage at the inner side, second carriage in the middle of the stair, more carriages spread relatively to the middle of the stair, respecting CarriageSpacingType.

13 - First carriage at the outer side, more carriages following at user-defined CarriageSpace distance, only appear when inside the stair area, respect CarriageSpacingType (outer side to outer side or inner side to outer side).

14,16,17 - First carriage at inner side respecting CarriageIntOffs value, other carriages at CarriageSpace distance starting from it respecting CarriageSpacingType (axis to axis or side to side).

15 - First carriage at inner side respecting CarriageIntOffs value. When two or more carriages, first at the outer side, second at the middle. When three or more, first at outer side, other carriages spread evenly around the middle of the stair ignorring CarriageSpace, respecting CarriageSpacingType.

18 - First carriage in the middle of the stair, when more than one, spread symmetrically to the middle of the stair, respecting CarriageSpacingType.

<Spiral_Stair>.CarriageCount Integer default: 1 -- animatable; integer

Get/Set the number of carriages. Usage depends on the current CarriageContext value.

<Spiral_Stair>.CarriageExtOffs Float default: 3.0 -- animatable; float

Get/Set the carriage's external offset. Usage depends on the current CarriageContext value.

<Spiral_Stair>.CarriageHeight Float default: 8.0 -- animatable; float

Get/Set the carriage height. Corresponds to the "Depth" value in the "Carriage" rollout.

<Spiral_Stair>.CarriageIntOffs Float default: 3.0 -- animatable; float

Get/Set the carriage's internal offset. Usage depends on the current CarriageContext value.

<Spiral_Stair>.CarriageSpace Float default: 10.0 -- animatable; float

Get/Set the spacing between carriages. Usage depends on the current CarriageContext value.

<Spiral_Stair>.CarriageSpacingType Integer default: 0 -- integer

Get/Set the carriage spacing type. Possible values are 0 and 1 and effect vary depending on the .CarriageContext value.

<Spiral_Stair>.CarriageSpringFloor Integer default: 1 -- animatable; integer

Controls the state of the "Spring from Floor" checkbox in the "Carriage" rollout. Possible values are

0 - off

1 - on

<Spiral_Stair>.CarriageWidth Float default: 3.0 -- animatable; float

Get/Set the carriage width.

<Spiral_Stair>.CenterPoleHeight Float default: 0.0 -- animatable; float

Get/Set the center pole height.

<Spiral_Stair>.CenterPoleHeight_X Integer default: 0 -- integer

Enable / Disable the usage of the CenterPoleheight value. Possible values are

0 - don't use CenterPoleHeight

1 - use CenterPoleHeight

<Spiral_Stair>.CenterPoleRadius Float default: 10.0 -- animatable; float

Get/Set the center pole radius.

<Spiral_Stair>.CenterPoleSegments Integer default: 16 -- animatable; integer

Get/Set the number of center pole segments..

<Spiral_Stair>.direction Integer default: 0 -- animatable; integer

Get/Set the rotation direction. Possible values are

0 - CCW

1 - CW

<Spiral_Stair>.GenerateCarriage Integer default: 1 -- animatable; integer

Controls the state of the "Carriage" checkbox in the "Parameters" rollout, "Generate Geometry" group. Possible values are

0 - don't generate Carriage

1 - generate Carriage

<Spiral_Stair>.GenerateCenterPole Integer default: 0 -- animatable; integer

Controls the state of the "Center Pole" checkbox in the "Parameters" rollout, "Generate Geometry" group. Possible values are

0 - don't generate Center Pole

1 - generate Center Pole

<Spiral_Stair>.GenerateInsideRailing Integer default: 0 -- integer

Controls the state of the "Handrail - Inside" checkbox in the "Parameters" rollout, "Generate Geometry" group. Possible values are

0 - don't generate Inside Railing

1 - generate Inside Railing

<Spiral_Stair>.GenerateMapping Integer default: 0 -- integer

Controls the state of the "Generate maping Coords." checkbox in the "Parameters" rollout. Possible values are

0 - off

1 - on

<Spiral_Stair>.GenerateOutsideRailing Integer default: 0 -- integer

Controls the state of the "Handrail - Outside" checkbox in the "Parameters" rollout, "Generate Geometry" group. Possible values are

0 - don't generate Outside Railing

1 - generate Outside Railing

<Spiral_Stair>.GenerateStringers Integer default: 0 -- animatable; integer

Controls the state of the "Stringers" checkbox in the "Parameters" rollout, "Generate Geometry" group. Possible values are

0 - don't generate Stringers

1 - generate Stringers

<Spiral_Stair>.radius Float default: 0.0 -- animatable; float

Get/Set the radius of the stair.

<Spiral_Stair>.RailingHeight Float default: 42.0 -- animatable; float

Get/Set the height of the railing.

<Spiral_Stair>.RailingOffs Float default: 2.0 -- animatable; float

Get/Set the offset of the railing.

<Spiral_Stair>.RailingRadius Float default: 1.0 -- animatable; float

Get/Set the radius of the railing.

<Spiral_Stair>.RailingSegments Integer default: 3 -- animatable; integer

Get/Set the number of segments of the railing.

<Spiral_Stair>.Revolutions Float default: 0.75 -- animatable; float

Get/Set the number of revolutions

<Spiral_Stair>.StepCount Integer default: 12 -- animatable; integer

Get/Set the number of steps.

<Spiral_Stair>.StepDepth Float default: 0.0 -- animatable; float

Get/Set the depth of the steps when StepDepth_X is set to 1.

<Spiral_Stair>.StepDepth_X Integer default: 0 -- integer

Enable/Disable the use of the custom StepDepth value. Possible values are:

0 - off

1 - on

<Spiral_Stair>.StepHeight Float default: 0.0 -- animatable; float

Get/Set the height of the steps.

<Spiral_Stair>.StepSegments Integer default: 0 -- animatable; integer

Get/Set the number of step segments.

<Spiral_Stair>.StepSegments_X Integer default: 0 -- integer

Enable/Disable the use of the StepSegments value. Possible values are:

0 - off

1 - on

<Spiral_Stair>.StepThickness Float default: 2.0 -- animatable; float

Get/Set the thickness of the steps.

<Spiral_Stair>.StepType Integer default: 0 -- integer

Get/Set the step type. Possible values are

0 - Open

1 - Closed

2 - Box

<Spiral_Stair>.Stepwidth Float default: 39.0 -- animatable; float

Get/Set the width of the steps.

<Spiral_Stair>.StringerDepth Float default: 6.0 -- animatable; float

Get/Set the depth of the stringer.

<Spiral_Stair>.StringerOffset Float default: 1.0 -- animatable; float

Get/Set the offset of the stringer.

<Spiral_Stair>.StringerSpringFloor Integer default: 1 -- animatable; integer

Controls the state of the "Spring from Floor" checkbox in the "Stringers" rollout. Possible values are

0 - off

1 - on

<Spiral_Stair>.StringerWidth Float default: 1.0 -- animatable; float

Get/Set the width of the stringer.

Interfaces:

Interface: realWorldMapSizeInterface

Properties:

.realWorldMapSize : boolean : Read|Write

Enables/disables the real-world map size option. Available in 3ds Max 8 and higher.

See also

Geometry - Stairs

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Straight_Stair : GeometryClass

Straight_Stair - superclass: GeometryClass; super-superclass:node - 31:1 - classID: #(745091873, 1673400585)

Value > MAXWrapper > Node > GeometryClass > Straight_Stair

This class was previously available in Autodesk VIZ and is now available in 3ds Max 6 and higher.

Constructor:

Straight_Stair ...

Properties:

<Straight_Stair>.CarriageContext Integer default: 18 -- integer

Get/Set the carriage configuration control value. Some possible values are:

0 - First carriage on the left side at user-defined internal offset, specified number of carriages repeat at user-defined spacing starting from it.

1 - First carriage on the left side without offset, second carriage on the right side without offset, if CarriageCount is greater than 2, additional carriages spread evently between the first two ignorring spacing settings.

2 - Variable number of carriages spread evenly within the stair's limits based on the CarriageSpace value and CarriageSpacingType settings.

3 - First carriage on the left side without offset, user-defined number of carriages starting from the first one, placed at user-defined CarriageSpace respecting CarriageSpacingType settings.

4 - First carriage on the left side without offset but respecting CarriageSpacingType, second carriage on the right side respecting the CarriageExtOffs value. If CarriageCount is greater than 2, additional carriages spread evently between the two ignorring spacing settings.

5 - First carriage on the right side respecting CarriageExtOffs value, other carriages starting from it at CarriageSpace distance respecting CarriageSpacingType.

6 - First carriage on the left side respecting CarriageIntOffs value, other carriages starting from it respecting CarriageCount, CarriageSpace and CarriageSpacingType. Allows for carriages outside of the stair's limits when using too high values.

7 - First carriage on the left respecting CarriageIntOffs value, second carriage on the right side ignorring CarriageExtOffs value, other carriages based on CarriageCount value spead evenly between the first two respecting CarriageSpacingType but ignorring CarriageSpace.

8, 9 - First carriage on the left side respecting CarriageIntOffs value, other carriages at CarriageSpace distance starting from it respecting CarriageSpacingType (axis to axis or side to side).

10 - First carriage on the left side, second carriage on the right side, third and more carriages spread relatively to the middle of the stair, ignorring CarriageSpacingType.

11 - First carriage on the left side, second carriage at user-defined CarriageSpace distance from it respecting CarriageSpacingType (inner side to inner side or outer side to inner side).

12 - First carriage on the left side, second carriage in the middle of the stair, more carriages spread relatively to the middle of the stair, respecting CarriageSpacingType.

13 - First carriage on the right side, more carriages following at user-defined CarriageSpace distance, only appear when within the stair's limits, respect CarriageSpacingType (outer side to outer side or inner side to outer side).

14,16,17 - First carriage on the left side respecting CarriageIntOffs value, other carriages at CarriageSpace distance starting from it respecting CarriageSpacingType (axis to axis or side to side).

15 - First carriage on the left side respecting CarriageIntOffs value. When two or more carriages, first on the right side, second in the middle. When three or more, first on the right side, other carriages spread evenly around the middle of the stair ignorring CarriageSpace, respecting CarriageSpacingType.

18 - First carriage in the middle of the stair, when more than one, spread symmetrically to the middle of the stair, respecting CarriageSpacingType.

<Straight_Stair>.CarriageCount Integer default: 1 -- animatable; integer

Get/Set the number of carriages. Usage depends on the current CarriageContext value.

<Straight_Stair>.CarriageExtOffs Float default: 3.0 -- animatable; float

Get/Set the carriage's external offset. Usage depends on the current CarriageContext value.

<Straight_Stair>.CarriageHeight Float default: 8.0 -- animatable; float

Get/Set the carriage height. Corresponds to the "Depth" value in the "Carriage" rollout.

<Straight_Stair>.CarriageIntOffs Float default: 3.0 -- animatable; float

Get/Set the carriage's internal offset. Usage depends on the current CarriageContext value.

<Straight_Stair>.CarriageSpace Float default: 10.0 -- animatable; float

Get/Set the spacing between carriages. Usage depends on the current CarriageContext value.

<Straight_Stair>.CarriageSpacingType Integer default: 0 -- integer

Get/Set the carriage spacing type. Possible values are 0 and 1 and effect vary depending on the .CarriageContext value.

<Straight_Stair>.CarriageSpringFloor Integer default: 1 -- animatable; integer

Controls the state of the "Spring from Floor" checkbox in the "Carriage" rollout. Possible values are

0 - off

1 - on

<Straight_Stair>.CarriageWidth Float default: 3.0 -- animatable; float

Get/Set the carriage width.

<Straight_Stair>.GenerateCarriage Integer default: 1 -- animatable; integer

Controls the state of the "Carriage" checkbox in the "Parameters" rollout, "Generate Geometry" group. Possible values are

0 - don't generate Carriage

1 - generate Carriage

<Straight_Stair>.GenerateInsideRailing Integer default: 0 -- integer

Controls the state of the "Handrail - Left" checkbox in the "Parameters" rollout, "Generate Geometry" group. Possible values are

0 - don't generate Inside Railing

1 - generate Inside Railing

<Straight_Stair>.GenerateMapping Integer default: 0 -- integer

Controls the state of the "Generate maping Coords." checkbox in the "Parameters" rollout. Possible values are

0 - off

1 - on

<Straight_Stair>.GenerateOutsideRailing Integer default: 0 -- integer

Controls the state of the "Handrail - Right" checkbox in the "Parameters" rollout, "Generate Geometry" group. Possible values are

0 - don't generate Outside Railing

1 - generate Outside Railing

<Straight_Stair>.GenerateStringers Integer default: 0 -- animatable; integer

Controls the state of the "Stringers" checkbox in the "Parameters" rollout, "Generate Geometry" group. Possible values are

0 - don't generate Stringers

1 - generate Stringers

<Straight_Stair>.length Float default: 0.0 -- animatable; float

Get/Set the length of the stair.

<Straight_Stair>.RailingHeight Float default: 42.0 -- animatable; float

Get/Set the height of the railing.

<Straight_Stair>.RailingOffs Float default: 2.0 -- animatable; float

Get/Set the offset of the railing.

<Straight_Stair>.RailingRadius Float default: 1.0 -- animatable; float

Get/Set the radius of the railing.

<Straight_Stair>.RailingSegments Integer default: 3 -- animatable; integer

Get/Set the number of segments of the railing.

<Straight_Stair>.StepCount Integer default: 12 -- animatable; integer

Get/Set the number of steps.

<Straight_Stair>.StepDepth Float default: 0.0 -- animatable; float

Get/Set the depth of the steps when StepDepth_X is set to 1.

<Straight_Stair>.StepDepth_X Integer default: 0 -- integer

Enable/Disable the use of the custom StepDepth value. Possible values are:

0 - off

1 - on

<Straight_Stair>.StepHeight Float default: 0.0 -- animatable; float

Get/Set the height of the steps.

<Straight_Stair>.StepThickness Float default: 2.0 -- animatable; float

Get/Set the thickness of the steps.

<Straight_Stair>.StepType Integer default: 0 -- integer

Get/Set the step type. Possible values are

0 - Open

1 - Closed

2 - Box

<Straight_Stair>.Stepwidth Float default: 1.0 -- animatable; float

Get/Set the width of the steps.

<Straight_Stair>.StringerDepth Float default: 6.0 -- animatable; float

Get/Set the depth of the stringer.

<Straight_Stair>.StringerOffset Float default: 1.0 -- animatable; float

Get/Set the offset of the stringer.

<Straight_Stair>.StringerSpringFloor Integer default: 1 -- animatable; integer

Controls the state of the "Spring from Floor" checkbox in the "Stringers" rollout. Possible values are

0 - off

1 - on

<Straight_Stair>.StringerWidth Float default: 1.0 -- animatable; float

Get/Set the width of the stringer.

Interfaces:

Interface: realWorldMapSizeInterface

Properties:

.realWorldMapSize : boolean : Read|Write

Enables/disables the real-world map size option. Available in 3ds Max 8 and higher.

See also

Geometry - Stairs

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


U_Type_Stair : GeometryClass

U_Type_Stair - superclass: GeometryClass; super-superclass:node - 34:1 - classID: #(1565943580, 539380971)

Value > MAXWrapper > Node > GeometryClass > U_Type_Stair

This class was previously available in Autodesk VIZ and is now available in 3ds Max 6 and higher.

Constructors:

U_Type_Stair ...

UTypeStair ...

Properties:

<U_Type_Stair>.CarriageContext Integer default: 18 -- integer

Get/Set the carriage configuration control value. Some possible values are:

0 - First carriage on the left side at user-defined internal offset, specified number of carriages repeat at user-defined spacing starting from it.

1 - First carriage on the left side without offset, second carriage on the right side without offset, if CarriageCount is greater than 2, additional carriages spread evently between the first two ignorring spacing settings.

2 - Variable number of carriages spread evenly within the stair's limits based on the CarriageSpace value and CarriageSpacingType settings.

3 - First carriage on the left side without offset, user-defined number of carriages starting from the first one, placed at user-defined CarriageSpace respecting CarriageSpacingType settings.

4 - First carriage on the left side without offset but respecting CarriageSpacingType, second carriage on the right side respecting the CarriageExtOffs value. If CarriageCount is greater than 2, additional carriages spread evently between the two ignorring spacing settings.

5 - First carriage on the right side respecting CarriageExtOffs value, other carriages starting from it at CarriageSpace distance respecting CarriageSpacingType.

6 - First carriage on the left side respecting CarriageIntOffs value, other carriages starting from it respecting CarriageCount, CarriageSpace and CarriageSpacingType. Allows for carriages outside of the stair's limits when using too high values.

7 - First carriage on the left respecting CarriageIntOffs value, second carriage on the right side ignorring CarriageExtOffs value, other carriages based on CarriageCount value spead evenly between the first two respecting CarriageSpacingType but ignorring CarriageSpace.

8, 9 - First carriage on the left side respecting CarriageIntOffs value, other carriages at CarriageSpace distance starting from it respecting CarriageSpacingType (axis to axis or side to side).

10 - First carriage on the left side, second carriage on the right side, third and more carriages spread relatively to the middle of the stair, ignorring CarriageSpacingType.

11 - First carriage on the left side, second carriage at user-defined CarriageSpace distance from it respecting CarriageSpacingType (inner side to inner side or outer side to inner side).

12 - First carriage on the left side, second carriage in the middle of the stair, more carriages spread relatively to the middle of the stair, respecting CarriageSpacingType.

13 - First carriage on the right side, more carriages following at user-defined CarriageSpace distance, only appear when within the stair's limits, respect CarriageSpacingType (outer side to outer side or inner side to outer side).

14,16,17 - First carriage on the left side respecting CarriageIntOffs value, other carriages at CarriageSpace distance starting from it respecting CarriageSpacingType (axis to axis or side to side).

15 - First carriage on the left side respecting CarriageIntOffs value. When two or more carriages, first on the right side, second in the middle. When three or more, first on the right side, other carriages spread evenly around the middle of the stair ignorring CarriageSpace, respecting CarriageSpacingType.

18 - First carriage in the middle of the stair, when more than one, spread symmetrically to the middle of the stair, respecting CarriageSpacingType.

<U_Type_Stair>.CarriageCount Integer default: 1 -- animatable; integer

Get/Set the number of carriages. Usage depends on the current CarriageContext value.

<U_Type_Stair>.CarriageExtOffs Float default: 3.0 -- animatable; float

Get/Set the carriage's external offset. Usage depends on the current CarriageContext value.

<U_Type_Stair>.CarriageHeight Float default: 8.0 -- animatable; float

Get/Set the carriage height. Corresponds to the "Depth" value in the "Carriage" rollout.

<U_Type_Stair>.CarriageIntOffs Float default: 3.0 -- animatable; float

Get/Set the carriage's internal offset. Usage depends on the current CarriageContext value.

<U_Type_Stair>.CarriageSpace Float default: 10.0 -- animatable; float

Get/Set the spacing between carriages. Usage depends on the current CarriageContext value.

<U_Type_Stair>.CarriageSpacingType Integer default: 0 -- integer

Get/Set the carriage spacing type. Possible values are 0 and 1 and effect vary depending on the .CarriageContext value.

<U_Type_Stair>.CarriageSpringFloor Integer default: 1 -- animatable; integer

Controls the state of the "Spring from Floor" checkbox in the "Carriage" rollout. Possible values are

0 - off

1 - on

<U_Type_Stair>.CarriageWidth Float default: 3.0 -- animatable; float

Get/Set the carriage width.

<U_Type_Stair>.direction Integer default: 1 -- animatable; integer

Get/Set the direction.

<U_Type_Stair>.GenerateCarriage Integer default: 1 -- animatable; integer

Controls the state of the "Carriage" checkbox in the "Parameters" rollout, "Generate Geometry" group. Possible values are

0 - don't generate Carriage

1 - generate Carriage

<U_Type_Stair>.GenerateInsideRailing Integer default: 0 -- integer

Controls the state of the "Handrail - Left" checkbox in the "Parameters" rollout, "Generate Geometry" group. Possible values are

0 - don't generate Inside Railing

1 - generate Inside Railing

<U_Type_Stair>.GenerateMapping Integer default: 0 -- integer

Controls the state of the "Generate maping Coords." checkbox in the "Parameters" rollout. Possible values are

0 - off

1 - on

<U_Type_Stair>.GenerateOutsideRailing Integer default: 0 -- integer

Controls the state of the "Handrail - Right" checkbox in the "Parameters" rollout, "Generate Geometry" group. Possible values are

0 - don't generate Outside Railing

1 - generate Outside Railing

<U_Type_Stair>.GenerateStringers Integer default: 0 -- animatable; integer

Controls the state of the "Stringers" checkbox in the "Parameters" rollout, "Generate Geometry" group. Possible values are

0 - don't generate Stringers

1 - generate Stringers

<U_Type_Stair>.length Float default: 0.0 -- animatable; float

Get/Set the length of the first part of the stair.

<U_Type_Stair>.length2 Float default: 0.0 -- animatable; float

Get/Set the length of the second part of the stair.

<U_Type_Stair>.RailingHeight Float default: 42.0 -- animatable; float

Get/Set the height of the railing.

<U_Type_Stair>.RailingOffs Float default: 2.0 -- animatable; float

Get/Set the offset of the railing.

<U_Type_Stair>.RailingRadius Float default: 1.0 -- animatable; float

Get/Set the radius of the railing.

<U_Type_Stair>.RailingSegments Integer default: 3 -- animatable; integer

Get/Set the number of segments of the railing.

<U_Type_Stair>.StepCount Integer default: 12 -- animatable; integer

Get/Set the number of steps.

<U_Type_Stair>.StepDepth Float default: 0.0 -- animatable; float

Get/Set the depth of the steps when StepDepth_X is set to 1.

<U_Type_Stair>.StepDepth_X Integer default: 0 -- integer

Enable/Disable the use of the custom StepDepth value. Possible values are:

0 - off

1 - on

<U_Type_Stair>.StepHeight Float default: 0.0 -- animatable; float

Get/Set the height of the steps.

<U_Type_Stair>.StepThickness Float default: 2.0 -- animatable; float

Get/Set the thickness of the steps.

<U_Type_Stair>.StepType Integer default: 0 -- integer

Get/Set the step type. Possible values are

0 - Open

1 - Closed

2 - Box

<U_Type_Stair>.Stepwidth Float default: 39.0 -- animatable; float

Get/Set the width of the steps.

<U_Type_Stair>.StringerDepth Float default: 6.0 -- animatable; float

Get/Set the depth of the stringer.

<U_Type_Stair>.StringerOffset Float default: 1.0 -- animatable; float

Get/Set the offset of the stringer.

<U_Type_Stair>.StringerSpringFloor Integer default: 1 -- animatable; integer

Controls the state of the "Spring from Floor" checkbox in the "Stringers" rollout. Possible values are

0 - off

1 - on

<U_Type_Stair>.StringerWidth Float default: 1.0 -- animatable; float

Get/Set the width of the stringer.

<U_Type_Stair>.UpperOffset Float default: 0.0 -- animatable; float

Get/Set the offset of the upper part from the lower part.

Interfaces:

Interface: realWorldMapSizeInterface

Properties:

.realWorldMapSize : boolean : Read|Write

Enables/disables the real-world map size option. Available in 3ds Max 8 and higher.

See also

Geometry - Stairs

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Geometry - Patch Objects

Value > MAXWrapper > Node > GeometryClass > Patch Objects

The following list contains the Patch Geometry Objects:

QuadPatch

TriPatch


QuadPatch : GeometryClass

quadPatch - superclass: GeometryClass; super-superclass:node - 5:0 - classID: #(4208, 0)

Value > MAXWrapper > Node > GeometryClass > QuadPatch

Constructor

quadpatch ...

Properties

<QuadPatch>.length Float default: 25.0 -- animatable

The patch length.

<QuadPatch>.width Float default: 25.0 -- animatable

The patch width.

<QuadPatch>.lengthsegs Integer default: 1 -- animatable, alias: Length_Segments

The number of facets along the length of the grid.

<QuadPatch>.mapCoords Boolean default: false

When on, applies mapping coordinates to the grid.

<QuadPatch>.widthsegs Integer default: 1 -- animatable, alias: Width_Segments

The number of facets along the width of the grid.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


TriPatch : GeometryClass

triPatch - superclass: GeometryClass; super-superclass:node - 3:0 - classID: #(8191, 0)

Value > MAXWrapper > Node > GeometryClass > TriPatch

Constructor

TriPatch ...

Properties

<TriPatch>.length Float default: 25.0 -- animatable

The length of the patch.

<TriPatch>.width Float default: 25.0 -- animatable

The width of the patch.

<TriPatch>.mapCoords Boolean default: false

When on, applies mapping coordinates to the grid.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Geometry - Particle Systems

Value > MAXWrapper > Node > GeometryClass > Particle Systems

The following list displays the 3ds Max legacy particle system objects:

Blizzard

PArray

PCloud

Snow

Spray

SuperSpray

For GeometryClass information regarding Particle Flow, please see

PF_Source : GeometryClass


Particle System Common Properties, Operators, and Methods

Value > MAXWrapper > Node > GeometryClass > Particle Systems

Five <node> functions work with the legacy particle system objects in 3ds Max to allow you to get or set individual particle information. These functions return or set information about particles at the time set by the current 'at time' context clause, or the current time slider if there is not time context active.

NOTE:

The Particle Flow system in 3ds Max 6 and higher provides extensive MAXScript access. For Particle Flow-relared MAXScript methods, see Particle Flow and MAXScript

A quick note about how the legacy particle systems in 3ds Max work will help you use these functions. The particle system keeps an array of particles big enough to hold all those alive at any one time. Each particle is identified by an index in this array. When one dies, it may be 'born' again sometime later and appear to be a different particle. Over the course of an animation, the same 'particle' may live and die many times as its indexed slot in the array gets re-used. Some of the functions described below use this index to identify particles, so you can have a situation where the 'same' particle (by index) becomes a new particle in the animation as its slot gets re-used. The way you can check this is by looking at the 'age' of the particle - if it cycles around to zero (or a lower number depending on time resolution), you know it has become a 'new' particle. If a particle is actually not alive at a given time, for example at the beginning of an animation or when you set up an 'explosive' emission, the functions below that get position, velocity and age return undefined. This tells you that the particle is not currently alive.

These are the particle system functions:

particleCount <particlesys_node>

Returns the number of current particle slots in the system as an integer. This value is the number of particles that are to be drawn to the viewports unless the scene is currently being rendered. If the scene is being rendered, the number returned can be either the render count or the viewport count, depending on whether the particle system has been evaluated for rendering or not.

particleSize <particlesys_node>

Returns the size of the particles in the system as float. This is set in the particle system parameter rollout - there is one size for all particles in a particle system. If you are using these functions to attach objects to particles, you can of course, make the individual objects any size you want.

particlePos <particlesys_node> <particle_index_integer>

Returns the position coordinate of the indexed particle at the current time as a point3. Indexes are 1-based. The coordinate returned is in the current working coordinate system. Returns undefined if the particle is not alive at the current time.

particleVelocity <particlesys_node> <particle_index_integer>

Returns the current velocity vector for the indexed particle as a point3. The vector returned is rotated into the current working coordinate system. Returns undefined if the particle is not alive at the current time.

particleAge <particlesys_node> <particle_index_integer>

Returns the current age of the indexed particle as a time value, relative to when it was last born. Remember, particles get recycled and you can detect this by looking at the age value cycling round. Returns undefined if the particle is not alive at the current time.

particleLife <particlesys_node> <particle_index_integer>

Returns the life of the particle -- the length of time the particle will be 'alive'. Returns undefined if the particle is not alive at the current time.

Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

particleCenter <particlesys_node> <particle_index_integer>

Returns a value indicating where the particle geometry (mesh) lies in relation to the particle position. Returns undefined if the particle is not alive at the current time.

This is used by Particle Motion Blur for example. It gets the point in world space of the point it is shading, the size of the particle from ParticleSize(), and the position of the mesh from ParticleCenter(). Given this information, it can know where the point is, and it makes the head and the tail more transparent.

Return Values:

PARTCENTER_HEAD - The particle geometry lies behind the particle position.

PARTCENTER_CENTER - The particle geometry is centered around particle position.

PARTCENTER_TAIL - The particle geometry lies in front of the particle position.

Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

particleSize2 <particlesys_node> <particle_index_integer>

Returns the world space size of the specified particle. Returns undefined if the particle is not alive at the current time.

Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.


Blizzard : GeometryClass

Blizzard - superclass: GeometryClass; super-superclass:node - classID: #(1479869773, 1447772397)

Value > MAXWrapper > Node > GeometryClass > Particle Systems > Blizzard

Constructor

blizzard ...

Properties

Basic Parameters

<Blizzard>.Emitter_Width Float default: 0.0 -- animatable

The width of the emitter icon.

<Blizzard>.Emitter_Length Float default: 0.0 -- animatable

The width of the emitter icon.

<Blizzard>.emitterHidden Boolean default: false

When on, hides the emitter in viewports. When off, the emitter is displayed in viewports. The emitter is never rendered.

<Blizzard>.viewType Integer default: 0

Set the display icon for particles in the viewport:

0- Dots (Displays the particles as dots.)

1- Ticks (Displays the particles as crosses.)

2- Mesh (Displays the particles as mesh objects. This results in slower viewport redraws.)

3- Bbox (For instanced geometry only, this displays each instanced particle, whether a single object, a hierarchy, or a group, as a bounding box.)

<Blizzard>.viewPercent Float default: 10.0 -- percentage, alias: Percentage_Displayed

Sets the percentage of particles displayed in the viewport.

Particle Generation

<Blizzard>.quantityMethod Integer default: 0

Set the method by which the number of particles is determined over time:

0- Use Rate (Specifies a fixed number of particles emitted per frame.)

1- Use Total (Specifies a total number of particles formed over the life of the system.)

Tip: Generally, Use Rate is best for a continuous flow of particles, like a trail of pixie dust, while Use Total is better for bursts of particles over a short period of time.

<Blizzard>.Birth_Rate Integer default: 10 -- animatable

The number of particles emitted per frame.

<Blizzard>.Total_Number Integer default: 100

The total number of particles to be emitted.

<Blizzard>.speed Float default: 10.0 -- animatable

The velocity of the particle at birth, along the normal, in units traveled per frame.

<Blizzard>.Speed_Variation Float default: 0.0 -- animatable, percentage

Percentage of variation to the speed of emission for each particle.

<Blizzard>.tumble Float default: 0.0 -- animatable

Amount of random rotation of the particles.

<Blizzard>.Tumble_Rate Float default: 0.0 -- animatable

Speed at which the particles rotate.

<Blizzard>.Emitter_Start Time default: 0f

The frame at which particles begin to exist in the scene.

<Blizzard>.Emitter_Stop Time default: 30f

The last frame at which particles are emitted.

<Blizzard>.Display_Until Time default: 100f

Time at which all particles will disappear, regardless of other settings.

<Blizzard>.life Time default: 30f -- animatable

The lifespan of each particle from the time of creation.

<Blizzard>.Life_Variation Time default: 0f -- animatable

The number of frames by which the life of each particle can vary from the norm.

<Blizzard>.subsampleCreationTime Boolean default: false

When on, enables the addition of a time offset to the equations of motion that prevents puffing in time.

<Blizzard>.subsampleEmitterTranslation Boolean default: true

If the object-based emitter is moving in space, particles are created at integral times at positions along the geometry's path between renderable positions. This prevents puffing in space.

<Blizzard>.subsampleEmitterRotation Boolean default: true

If the emitter is rotating, turn this on to avoid puffing and produce smooth spiral effects.

<Blizzard>.size Float default: 1.0 -- animatable

The target size for all particles in the system.

<Blizzard>.Size_Variation Float default: 0.0 -- animatable, percentage

The percentage by which the size of each particle may vary from the norm.

<Blizzard>.Growth_Time Time default: 10f

The number of intervals over which the particle grows from being very small (0.1a system constant) to the Size value.

<Blizzard>.Fade_Time Time default: 10f

The number of intervals over which the particle will shrink to 1/10th its Size setting prior to its death.

<Blizzard>.seed Integer default: 0 -- alias: Random_Seed

By changing the Seed value, you achieve different results using otherwise identical particle settings.

Particle Type

<Blizzard>.particleType Integer default: 0

The type of particle emitted:

0- Standard Particle (Uses one of several standard particle types, such as triangle, cube, tetra, and so on.)

1- MetaParticles (Uses Metaball particles. These are particle systems in which the individual particles blend together in blobs or streams.)

2- Instanced Geometry (Generates particles that are instances of either an object, a linked hierarchy of objects, or a group.)

<Blizzard>.standardParticle Integer default: 0

standardParticle = 0 - Triangle; 1 - Cube; 2 - Special; 3 - Facing; 4 - Constant; 5 - Tetra; 6 - SixPoint; 7 - Sphere

<Blizzard>.Metaparticle_Tension Float default: 1.0 -- animatable

Determines the tightness of the particles, with regard to their tendency to blend with other particles. The higher the Tension, the harder the blobs, and the harder it is for them to merge.

<Blizzard>.Metaparticle_Tension_Variation Float default: 0.0 -- animatable, percentage

The percent of variation of the Tension effect.

<Blizzard>.metaballRenderCoarsness Float default: 0.5 -- alias: Metaparticle_Coarseness

The coarseness for metaparticles in the rendered scene.

<Blizzard>.metaballViewCoarsness Float default: 1.0

The coarseness for the viewport display.

<Blizzard>.metaballAutoCoarsness Boolean default: true

When this is on, the rendering coarseness is automatically set, based on the size of the particles, and the viewport coarseness is set to about twice that of the rendering coarseness.

<Blizzard>.Bubble_Amplitude Integer default: 0

Turns on/off One Connected Blob.

0- Off

1- On

<Blizzard>.instancingObject Node default: undefined

The object which is instanced.

<Blizzard>.instanceSubTree Boolean default: false

Turn this on when you want to include the linked children of the picked object in the particle. If the picked object is a group, all children of the group are included.

<Blizzard>.instanceKeyOffsetType Integer default: 0

Set the animation offset keying:

0- None (Each particle duplicates the timing of the original object. As a result, the animation of all particles will be identically timed.)

1- Birth (The firstborn particle is an instance of the current animation of the source object at the moment of that particle's birth. Each subsequent particle then use the same start time for the animation.)

2- Random (This option is the same as None when Frame Offset is set to 0. Otherwise, each particle is born using the same animation as the source object at the time of birth, but with a random offset of frames, based on the .instanceFrameOffset value.)

<Blizzard>.instanceFrameOffset Integer default: 0 -- alias: Animation_Offset_Amount

The property value is the UI value times the number of ticks per frame. The number of ticks per frame is accessible via the ticksPerFrame system global variable.

<Blizzard>.mappingType Integer default: 0

Specifies how a mapped material affects the particles:

0- Time (Maps particles over time.)

1- Distance (Maps particles over a distance.)

2- Emitter Fit Planar (Maps particles at birth, based on their point of emission from the rectangular Blizzard emitter icon. The UV range of the mapped material runs from 0 to 1 over the width and length of the emitter.)

<Blizzard>.Mapping_Time_Base Time default: 30f -- animatable

The number of frames from the birth of the particle that it takes to complete one mapping of the particle.

<Blizzard>.Mapping_Distance_Base Float default: 100.0 -- animatable

The distance, in units, from the birth of the particle that it takes to complete one mapping of the particle.

<Blizzard>.materialSource Integer default: 0

Updates the material carried by the particle system, using the source specified:

0- Icon (The particles use the material currently assigned to the particle system icon.)

1- Instanced Geometry (The particles use the material assigned to the instanced geometry.)

Rotation and Collision

<Blizzard>.Spin_Time Time default: 30f -- animatable

The number of frames for one rotation of a particle. If set to 0, no rotation takes place.

<Blizzard>.Spin_Time_Variation Float default: 0.0 -- animatable, percentage

The percent of variation of the Spin Time.

<Blizzard>.Spin_Phase Float default: 0.0 -- animatable, angle

The initial particle rotation, in degrees.

<Blizzard>.Spin_Phase_Variation Float default: 0.0 -- animatable, percentage

The percent of variation of the Phase.

<Blizzard>.spinAxisType Integer default: 0

The spin axis for the particles:

0- Random (The spin axis for each of the particles is random.)

1- User Defined (Uses a vector defined in the three X, Y, and Z spin vector values.)

<Blizzard>.X_Spin_Vector Float default: 1.0 -- animatable

Spin vector of the X-axis.

<Blizzard>.Y_Spin_Vector Float default: 0.0 -- animatable

Spin vector of the Y-axis.

<Blizzard>.Z_Spin_Vector Float default: 0.0 -- animatable

Spin vector of the Z-axis.

<Blizzard>.Spin_Axis_Variation Float default: 0.0 -- animatable, angle

The amount, in degrees, by which the spin axis of each particle may vary from the specified X Axis, Y Axis, and Z Axis settings.

<Blizzard>.Interparticle_Collisions_On Integer default: 0

Turn on/off interparticle collisions:

0- Off

1- On

<Blizzard>.Interparticle_Collision_Steps Integer default: 2

The number of intervals per rendering interval, during which an inter-particle collision test is conducted. The higher the value, the more accurate the simulation, but the slower the simulation will run.

<Blizzard>.Interparticle_Collision_Bounce Float default: 100.0 -- animatable, percentage

The degree to which speed is recovered after a collision.

<Blizzard>.Interparticle_Collision_Bounce_Variation Float default: 0.0 -- animatable, percentage

The percentage of random variation of the Bounce value, applied to the particles.

Object Motion Inheritance

<Blizzard>.motionInfluence Float default: 100.0 -- animatable, alias: Object_Motion_Inheritance

The percent of particles that inherit the motion of the object-based emitter at the moment of particle formation.

<Blizzard>.motionMultiplier Float default: 1.0 -- animatable, alias: Object_Motion_Multiplier

Modifies the amount by which the emitter motion affects the particle motion. This can be a positive or negative number.

<Blizzard>.motionVariation Float default: 0.0 -- animatable, percentage; alias: Object_Motion_Multiplier_Variation

Percentage of variation of the Multiplier value.

Particle Spawn

<Blizzard>.spawnType Integer default: 0

Determines what happens to particles at either collision or death:

0- None (Particles act as they normally would. That is, upon collision, they either bounce or stick, depending on Particle Bounce settings in the deflector, and on death they disappear.)

1- Die After Collision (Particles disappear when they strike a deflector to which they're bound, such as the SDeflector.)

2- Spawn on Collision (Spawn effects take place upon collision with a bound deflector.)

3- Spawn on Death (Spawn effects take place at the end of each particle's life.)

4- Spawn Trails (Particles are spawned from existing particles at each frame of that particle's life.)

<Blizzard>.Die__X_frames_after_collision Time default: 0f -- animatable

The life, in frames, that the particle will persist after the collision. Setting this to 0 (the default) causes particles to vanish immediately after the collision.

<Blizzard>.Die__X_frames_after_collision_variation Float default: 0.0 -- animatable, percentage

Varies the Persist value of each particle, when Persist is greater than 0. This lets you "feather" the dying off of the particle density.

<Blizzard>.Spawn_Affects Integer default: 100

The percentage of particles that will spawn. Reducing this reduces the number of particles that produce spawned particles.

<Blizzard>.Spawn_Multiplier_Variation Float default: 0.0 -- percentage

Percentage range by which the Multiplier value will vary, frame by frame.

<Blizzard>.Spawn_Direction_Chaos Float default: 0.0 -- animatable

The amount by which the direction of the spawned particle can vary from the direction of the parent particle. A setting of 0 means no variance. A setting of 100 causes the spawned particle to travel in any random direction. A setting of 50 causes the spawned particle to deviate from its parent's path by up to 90 degrees.

<Blizzard>.Spawn_Speed_Chaos Float default: 0.0 -- animatable

The range of a percentage of change in the speed of the spawned particle relative to its parent. A value of 0 means no change.

<Blizzard>.spawnSpeedType Integer default: 0

Sets the type of speed applied to spawn particles:

0- Slow (Applies the .spawn_Speed_Chaos value randomly to slow the speed of the spawned particles.)

1- Fast (Randomly speeds up particles based on the .spawn_Speed_Chaos value.)

2- Both (Some particles speed up, while others slow down, based on the .spawn_Speed_Chaos value.)

<Blizzard>.spawnInheritVelocity Boolean default: false

When on, spawned particles inherit the speed of their parents, in addition to the effect of the .spawn_Speed_Chaos value.

<Blizzard>.spawnSpeedFixed Boolean default: false

When on, uses the .spawn_Speed_Chaos value as a set value, rather than as a range applied randomly to each particle.

<Blizzard>.lifespanValueQueue Array default: #()

lifespanValueQueue is an array of integers which correspond to lifespan values for each spawned generation of particles.

<Blizzard>.objectMutationQueue Array default: #()

objectMutationQueue is an array of nodes which correspond to instanced-object particle types. Each generation of spawning will use the next node as its object type.

See also

Particle System Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


PArray : GeometryClass

PArray - superclass: GeometryClass; super-superclass:node - classID: #(238822837, 278730329)

Value > MAXWrapper > Node > GeometryClass > Particle Systems > PArray

Constructor

parray ...

Properties

Basic Parameters

<PArray>.emitter Node default: undefined

The object which acts as an emitter.

<PArray>.formation Integer default: 0 -- alias: Emitter_Distribution

Set the emitter distribution type:

0- Over Entire Surface (Emits particles randomly over the entire surface of the object-based emitter.)

1- Along Visible Edges (Emits particles randomly from the visible edges of the object.)

2- At All Vertices (Emits particles from the vertices of the object.)

3- At Distinct Points (Places a specified number of emitter points randomly over the surface of the object.)

4- At Face Centers (Emits particles from the center of each triangular face.)

<PArray>.numDistinctPoints Integer default: 20 -- alias: Number_of_Emitters

The number of emitter points used when At Distinct Points is chosen.

<PArray>.Use_Selected_Subobjects Integer default: 0 -- animatable

With mesh-based emitters, this limits the source of the particle stream to the sub-object selection passed up the modifier stack in the object-based emitter.

0- Off

1- On

<PArray>.iconsize Float default: 20.0 -- alias: Emitter_Width

The width of the emitter icon.

<PArray>.iconHidden Boolean default: false

When on, hides the emitter in viewports. When off, the emitter is displayed in viewports. The emitter is never rendered.

<PArray>.viewType Integer default: 0

Set the display icon for particles in the viewport:

0- Dots (Displays the particles as dots.)

1- Ticks (Displays the particles as crosses.)

2- Mesh (Displays the particles as mesh objects. This results in slower viewport redraws.)

3- Bbox (For instanced geometry only, this displays each instanced particle, whether a single object, a hierarchy, or a group, as a bounding box.)

<PArray>.viewPercent Float default: 10.0 -- percentage, alias: Percentage_Displayed

The percentage of particles displayed in the viewport.

Particle Generation

<PArray>.quantityMethod Integer default: 0

Set the method by which the number of particles is determined over time:

0- Use Rate (Specifies a fixed number of particles emitted per frame.)

1- Use Total (Specifies a total number of particles formed over the life of the system.)

Tip: Generally, Use Rate is best for a continuous flow of particles, like a trail of pixie dust, while Use Total is better for bursts of particles over a short period of time.

<PArray>.Birth_Rate Integer default: 10 -- animatable

The number of particles emitted per frame.

<PArray>.Total_Number Integer default: 100

The total number of particles to be emitted.

<PArray>.speed Float default: 10.0 -- animatable

The velocity of the particle at birth, along the normal, in units traveled per frame.

<PArray>.Speed_Variation Float default: 0.0 -- animatable, percentage

Percentage of variation to the speed of emission for each particle.

<PArray>.Divergence_Angle Float default: 10.0 -- animatable, angle

Applies an angular degree of variation by which each particle's velocity can vary from the emitter normal.

<PArray>.Emitter_Start Time default: 0f

The frame at which particles begin to exist in the scene.

<PArray>.Emitter_Stop Time default: 30f

The last frame at which particles are emitted.

<PArray>.Display_Until Time default: 100f

Time at which all particles will disappear, regardless of other settings.

<PArray>.life Time default: 30f -- animatable

The lifespan of each particle from the time of creation.

<PArray>.Life_Variation Time default: 0f -- animatable

The number of frames by which the life of each particle can vary from the norm.

<PArray>.subsampleCreationTime Boolean default: false

When on, enables the addition of a time offset to the equations of motion that prevents puffing in time.

<PArray>.subsampleEmitterTranslation Boolean default: true

If the object-based emitter is moving in space, particles are created at integral times at positions along the geometry's path between renderable positions. This prevents puffing in space.

<PArray>.subsampleEmitterRotation Boolean default: true

If the emitter is rotating, turn this on to avoid puffing and produce smooth spiral effects.

<PArray>.size Float default: 1.0 -- animatable

The target size for all particles in the system.

<PArray>.Size_Variation Float default: 0.0 -- animatable, percentage

The percentage by which the size of each particle may vary from the norm.

<PArray>.Growth_Time Time default: 10f

The number of intervals over which the particle grows from being very small (0.1a system constant) to the Size value.

<PArray>.Fade_Time Time default: 10f

The number of intervals over which the particle will shrink to 1/10th its Size setting prior to its death.

<PArray>.seed Integer default: 0 -- alias: Random_Seed

By changing the Seed value, you achieve different results using otherwise identical particle settings.

Particle Type

<PArray>.particleType Integer default: 0

The type of particle emitted:

0- Standard Particle (Uses one of several standard particle types, such as triangle, cube, tetra, and so on.)

1- MetaParticles (Uses Metaball particles. These are particle systems in which the individual particles blend together in blobs or streams.)

2- Object Fragments (Creates particles out of fragments of an object.)

3- Instanced Geometry (Generates particles that are instances of either an object, a linked hierarchy of objects, or a group.)

<PArray>.standardParticle Integer default: 0

Set the type of particle used when standard particles is selected:

0- Triangle (Renders each particle as a triangle. Use Triangle particles with noise opacity for steam or smoke.)

1- Cube (Renders each particle as a cube.)

2- Special (Each particle consists of three intersecting 2D squares. These are effective when you use a face-map material, optionally along with an opacity map, to create the effect of a three-dimensional particle.)

3- Facing (Renders each particle as a square that always faces the view. Use with an appropriate opacity map for bubbles or snowflakes.)

4- Constant (Provides a particle that remains the same size, in pixels, specified by the size value. This size never changes, regardless of its distance from the camera. Note that this particle type can only be displayed in the viewports as a dot or a tick. If you turn on this option while Mesh is selected, the viewport display is automatically switched to Ticks.)

5- Tetra (Renders each particle as a mapped tetrahedron, whose tail points toward the normal vector of the emission, and whose head points away. Use Tetra particles for raindrops or sparks.)

6- SixPoint (Renders each particle as a six-pointed, two-dimensional star.)

7- Sphere (Renders each particle as a sphere.)

<PArray>.Metaparticle_Tension Float default: 1.0 -- animatable

Determines the tightness of the particles, with regard to their tendency to blend with other particles. The higher the Tension, the harder the blobs, and the harder it is for them to merge.

<PArray>.Metaparticle_Tension_Variation Float default: 0.0 -- animatable, percentage

The percent of variation of the Tension effect.

<PArray>.metaballRenderCoarsness Float default: 0.5 -- alias: Metaparticle_Coarseness

The coarseness for metaparticles in the rendered scene.

<PArray>.metaballViewCoarsness Float default: 1.0

The coarseness for the viewport display.

<PArray>.metaballAutoCoarsness Boolean default: true

When this is on, the rendering coarseness is automatically set, based on the size of the particles, and the viewport coarseness is set to about twice that of the rendering coarseness.

<PArray>.fragmentMethod Integer default: 0

Method for object fragment particles:

0- All Faces (Each face of the object becomes a particle. This results in triangular particles.)

1- Number of Chunks (The object breaks into irregular fragments.)

2- Smoothing Angle (The fragments are broken based on the angles between face normals, as specified in the fragSmoothingAngle value. Generally, the higher the value, the fewer the number of fragments.)

<PArray>.Fragment_Thickness Float default: 1.0

Sets the thickness of the fragments. At 0, the fragments are single-sided with no thickness. When greater than 0, the fragments are extruded, at fragmentation time, by the amount specified. The outer and inner surfaces of the fragment use identical smoothing, which is picked up from the object-based emitter. The edges of the fragments are not smoothed.

<PArray>.fragChunkMinimum Integer default: 100 -- alias: Fragment_Count

Determines a number of "seed" faces in the geometry. Each seed face collects connecting faces surrounding it until all available faces are exhausted. Any leftover faces become unique particles, thus increasing the minimum number of fragments.

<PArray>.fragSmoothingAngle Float default: 0.0

Sets the amount of smoothing angle.

<PArray>.instancingObject Node default: undefined

The object which is instanced.

<PArray>.instanceSubTree Boolean default: false

Turn this on when you want to include the linked children of the picked object in the particle. If the picked object is a group, all children of the group are included.

<PArray>.instanceKeyOffsetType Integer default: 0

Set the animation offset keying:

0- None (Each particle duplicates the timing of the original object. As a result, the animation of all particles will be identically timed.)

1- Birth (The firstborn particle is an instance of the current animation of the source object at the moment of that particle's birth. Each subsequent particle then use the same start time for the animation.)

2- Random (This option is the same as None when Frame Offset is set to 0. Otherwise, each particle is born using the same animation as the source object at the time of birth, but with a random offset of frames, based on the .instanceFrameOffset value.)

<PArray>.instanceFrameOffset Integer default: 0 -- alias: Animation_Offset_Amount

The property value is the UI value times the number of ticks per frame. The number of ticks per frame is accessible via the ticksPerFrame system global variable.

<PArray>.mappingType Integer default: 0

Specifies how a mapped material affects the particles:

0- Time (Maps particles over time.)

1- Distance (Maps particles over a distance.)

<PArray>.Mapping_Time_Base Time default: 30f -- animatable

The number of frames from the birth of the particle that it takes to complete one mapping of the particle.

<PArray>.Mapping_Distance_Base Float default: 100.0 -- animatable

The distance, in units, from the birth of the particle that it takes to complete one mapping of the particle.

<PArray>.materialSource Integer default: 0

Updates the material carried by the particle system, using the source specified:

0- Icon (The particles use the material currently assigned to the particle system icon.)

1- Picked Emitter (The particles use the material assigned to the distribution object.)

2- Instanced Geometry (The particles use the material assigned to the instanced geometry.)

<PArray>.fragOutsideMatID Integer default: 0

Specifies which face ID number is assigned to the outside faces of the fragments. This defaults to 0, which is not a valid ID number, forcing the outside of the particle fragments to use whatever material is currently assigned to the associated faces. Thus, if your distribution object already has several submaterials assigned to its outer faces, these materials are retained by using ID 0. If you want a single, specific submaterial, you can assign it by changing this value.

<PArray>.fragEdgeMatID Integer default: 2

Specifies which submaterial ID number is assigned to the edges of the fragments.

<PArray>.fragBackMatID Integer default: 3

Specifies which submaterial ID number is assigned to the back sides of the fragments.

Rotation and Collision

<PArray>.Spin_Time Time default: 0f -- animatable

The number of frames for one rotation of a particle. If set to 0, no rotation takes place.

<PArray>.Spin_Time_Variation Float default: 0.0 -- animatable, percentage

The percent of variation of the Spin Time.

<PArray>.Spin_Phase Float default: 0.0 -- animatable, angle

The initial particle rotation, in degrees.

<PArray>.Spin_Phase_Variation Float default: 0.0 -- animatable, percentage

The percent of variation of the Phase.

<PArray>.spinAxisType Integer default: 0

The spin axis for the particles:

0- Random (The spin axis for each of the particles is random.)

1- Direction of Travel/Mblur (Rotates the particles about a vector formed by the direction in which they're moving.)

2- User Defined (Uses a vector defined in the three X, Y, and Z spin vector values.)

<PArray>.Blur_Stretch Integer default: 0 -- animatable

When greater than 0, the particles stretch along the travel axis, depending on their speed. Specifically, the Stretch value specifies the percent of their length per each unit of the Speed setting (in the Particle Motion group). Thus, if you set Stretch to 2 while Speed is set at 10, the particles are stretched 20 percent longer than their original size along the axis of their travel. This value is only available when you choose Direction of Travel/Mblur.

<PArray>.X_Spin_Vector Float default: 1.0 -- animatable

Spin vector of the X-axis.

<PArray>.Y_Spin_Vector Float default: 0.0 -- animatable

Spin vector of the Y-axis.

<PArray>.Z_Spin_Vector Float default: 0.0 -- animatable

Spin vector of the Z-axis.

<PArray>.Spin_Axis_Variation Float default: 0.0 -- animatable, angle

The amount, in degrees, by which the spin axis of each particle may vary from the specified X Axis, Y Axis, and Z Axis settings.

<PArray>.Interparticle_Collisions_On Integer default: 0

Turn on/off interparticle collisions:

0- Off

1- On

<PArray>.Interparticle_Collision_Steps Integer default: 2

The number of intervals per rendering interval, during which an inter-particle collision test is conducted. The higher the value, the more accurate the simulation, but the slower the simulation will run.

<PArray>.Interparticle_Collision_Bounce Float default: 100.0 -- animatable, percentage

The degree to which speed is recovered after a collision.

<PArray>.Interparticle_Collision_Bounce_Variation Float default: 0.0 -- animatable, percentage

The percentage of random variation of the Bounce value, applied to the particles.

Object Motion Inheritance

<PArray>.motionInfluence Float default: 100.0 -- animatable, alias: Object_Motion_Inheritance

The percent of particles that inherit the motion of the object-based emitter at the moment of particle formation.

<PArray>.motionMultiplier Float default: 1.0 -- animatable, alias: Object_Motion_Multiplier

Modifies the amount by which the emitter motion affects the particle motion. This can be a positive or negative number.

<PArray>.motionVariation Float default: 0.0 -- animatable, percentage; alias: Object_Motion_Multiplier_Variation

Percentage of variation of the Multiplier value.

Bubble Motion

<PArray>.Bubble_Amplitude Float default: 0.0 -- animatable

The distance the particle moves off its usual velocity vector as it travels.

<PArray>.Bubble_Amplitude_Variation Float default: 0.0 -- animatable, percentage

The percent of Amplitude variation applied to each particle.

<PArray>.Bubble_Period Time default: 100000f -- animatable

The cycle time for one complete oscillation of a particle through the bubble "wave". A recommended value might be 20-30 intervals.

<PArray>.Bubble_Period_Variation Float default: 0.0 -- animatable, percentage

The percent of Period variation for each particle.

<PArray>.Bubble_Phase Float default: 0.0 -- animatable, angle

The initial displacement of the bubble pattern along the vector.

<PArray>.Bubble_Phase_Variation Float default: 0.0 -- animatable, percentage

The percent of Phase variation for each particle.

Particle Spawn

<PArray>.spawnType Integer default: 0

Determines what happens to particles at either collision or death:

0- None (Particles act as they normally would. That is, upon collision, they either bounce or stick, depending on Particle Bounce settings in the deflector, and on death they disappear.)

1- Die After Collision (Particles disappear when they strike a deflector to which they're bound, such as the SDeflector.)

2- Spawn on Collision (Spawn effects take place upon collision with a bound deflector.)

3- Spawn on Death (Spawn effects take place at the end of each particle's life.)

4- Spawn Trails (Particles are spawned from existing particles at each frame of that particle's life.)

<PArray>.Die__X_frames_after_collision Time default: 0f -- animatable

The life, in frames, that the particle will persist after the collision. Setting this to 0 (the default) causes particles to vanish immediately after the collision.

<PArray>.Die__X_frames_after_collision_variation Float default: 0.0 -- animatable, percentage

Varies the Persist value of each particle, when Persist is greater than 0. This lets you "feather" the dying off of the particle density.

<PArray>.Spawn_Generations Integer default: 1

The number of spawns beyond the original particle generation. For example, if this is set to 1, and you're spawning at death, one spawning will occur beyond the original lifespan of each particle.

<PArray>.Spawn_Affects Integer default: 100

The percentage of particles that will spawn. Reducing this reduces the number of particles that produce spawned particles.

<PArray>.Spawn_Multiplier Integer default: 1

Multiplies the number of particles spawned at each spawning event.

<PArray>.Spawn_Multiplier_Variation Float default: 0.0 -- percentage

Percentage range by which the Multiplier value will vary, frame by frame.

<PArray>.Spawn_Direction_Chaos Float default: 0.0 -- animatable, percentage

The amount by which the direction of the spawned particle can vary from the direction of the parent particle. A setting of 0 means no variance. A setting of 100 causes the spawned particle to travel in any random direction. A setting of 50 causes the spawned particle to deviate from its parent's path by up to 90 degrees.

<PArray>.Spawn_Speed_Chaos Float default: 0.0 -- animatable

Random percentage range of scaling of the spawned particles relative to their parents, and dependent on the options below.

<PArray>.spawnSpeedType Integer default: 0

Sets the type of speed applied to spawn particles:

0- Slow (Applies the .spawn_Speed_Chaos value randomly to slow the speed of the spawned particles.)

1- Fast (Randomly speeds up particles based on the .spawn_Speed_Chaos value.)

2- Both (Some particles speed up, while others slow down, based on the .spawn_Speed_Chaos value.)

<PArray>.spawnInheritVelocity Boolean default: false

When on, spawned particles inherit the speed of their parents, in addition to the effect of the .spawn_Speed_Chaos value.

<PArray>.spawnSpeedFixed Boolean default: false

When on, uses the .spawn_Speed_Chaos value as a set value, rather than as a range applied randomly to each particle.

<PArray>.Spawn_Scale_Chaos Float default: 0.0 -- animatable

The range of a percentage of change in the speed of the spawned particle relative to its parent. A value of 0 means no change.

<PArray>.spawnScaleType Integer default: 0

The type of speed scaling for the spawned particles:

0- Slow (Applies the speed factor randomly to slow the speed of the spawned particles.)

1- Fast (Randomly speeds up particles based on the speed factor.)

2- Both (Some particles speed up, while others slow down, based on the speed factor.)

<PArray>.spawnScaleFixed Boolean default: false

When on, uses the .spawn_Scale_Chaos value as a set value, rather than as a range applied randomly to each particle.

<PArray>.lifespanValueQueue Array default: #()

lifespanValueQueue is an array of integers which correspond to lifespan values for each spawned generation of particles.

<PArray>.Spawn_Lifespan Integer default: 0

Value that sets initial lifespan of spawned particles.

<PArray>.objectMutationQueue Array default: #()

objectMutationQueue is an array of nodes which correspond to instanced-object particle types. Each generation of spawning will use the next node as its object type.

See also

Particle System Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


PCloud : GeometryClass

PCloud - superclass: GeometryClass; super-superclass:node - classID: #(470760751, 808520441)

Value > MAXWrapper > Node > GeometryClass > Particle Systems > PCloud

Constructor

pcloud ...

Properties

Basic Parameters

<PCloud>.emitter Node default: undefined

The object which acts as an emitter.

<PCloud>.formation Integer default: 0

Set the emitter formation:

0- Box Emitter

1- Sphere Emitter

2- Cylinder Emitter

3- Object-based Emitter

<PCloud>.Emitter_Rad_Len Float default: 0.0 -- animatable

The radius of a spherical or cylindrical icon, and the length of a box icon.

<PCloud>.Emitter_Width Float default: 0.0 -- animatable

The width of a box emitter.

<PCloud>.Emitter_Height Float default: 0.0 -- animatable

The height of a box or cylindrical emitter.

<PCloud>.emitterHidden Boolean default: false

Hides the emitter in the viewport, when on.

NOTE:

The emitter is never rendered.

<PCloud>.viewType Integer default: 0

Set the display icon for particles in the viewport:

0- Dots (Displays the particles as dots.)

1- Ticks (Displays the particles as crosses.)

2- Mesh (Displays the particles as mesh objects. This results in slower viewport redraws.)

3- Bbox (For instanced geometry only, this displays each instanced particle, whether a single object, a hierarchy, or a group, as a bounding box.)

<PCloud>.viewPercent Float default: 10.0 -- percentage, alias: Percentage_Displayed

The percentage of particles displayed in the viewport.

Particle Generation

<PCloud>.quantityMethod Integer default: 0

Set the method by which the number of particles is determined over time:

0- Use Rate (Specifies a fixed number of particles emitted per frame.)

1- Use Total (Specifies a total number of particles formed over the life of the system.)

TIP

Generally, Use Rate is best for a continuous flow of particles, like a trail of pixie dust, while Use Total is better for bursts of particles over a short period of time.

<PCloud>.Birth_Rate Integer default: 10 -- animatable

The number of particles emitted per frame.

<PCloud>.Total_Number Integer default: 100

The total number of particles to be emitted.

<PCloud>.speed Float default: 0.0 -- animatable

The velocity of the particle at birth, along the normal, in units traveled per frame.

<PCloud>.Speed_Variation Float default: 0.0 -- animatable, percentage

Percentage of variation to the speed of emission for each particle.

<PCloud>.motionType Integer default: 0

Set the particle's motionType

0- Random Direction (This option emits particles in random directions.)

1- Enter Vector (The direction of the particles is determined by a vector defined by the three X, Y, and Z vectors.)

2- Reference Object (Emits particles in the direction of the local Z axis of a specified object.)

<PCloud>.Direction_Vector_X Float default: 1.0 -- animatable

The particle direction vectors for the X-axis.

<PCloud>.Direction_Vector_Y Float default: 0.0 -- animatable

The particle direction vectors for the Y-axis.

<PCloud>.Direction_Vector_Z Float default: 0.0 -- animatable

The particle direction vectors for the Z-axis.

<PCloud>.motionReferenceObject Node default: undefined

The object used as the reference object.

<PCloud>.directionVariation Float default: 0.0 -- animatable, percentage, alias: Speed_Direction_Variation

Percentage of variation to the direction when you choose either the Direction Vector or Reference Object option.

<PCloud>.Emitter_Start Time default: 0f

The frame at which particles begin to exist in the scene.

<PCloud>.Emitter_Stop Time default: 0f

The last frame at which particles are emitted.

<PCloud>.Display_Until Time default: 100f

Time at which all particles will disappear, regardless of other settings.

<PCloud>.life Time default: 101f -- animatable

The lifespan of each particle from the time of creation.

<PCloud>.Life_Variation Time default: 0f -- animatable

The number of frames by which the life of each particle can vary from the norm.

<PCloud>.size Float default: 1.0 -- animatable

The target size for all particles in the system.

<PCloud>.Size_Variation Float default: 0.0 -- animatable, percentage

The percentage by which the size of each particle may vary from the norm.

<PCloud>.Growth_Time Time default: 0f

The number of intervals over which the particle grows from being very small (0.1a system constant) to the Size value.

<PCloud>.Fade_Time Time default: 0f

The number of intervals over which the particle will shrink to 1/10th its Size setting prior to its death.

<PCloud>.seed Integer default: 0 -- alias: Random_Seed

By changing the Seed value, you achieve different results using otherwise identical particle settings.

Particle Type

<PCloud>.particleType Integer default: 0

The type of particle emitted:

0- Standard Particle (Uses one of several standard particle types, such as triangle, cube, tetra, and so on.)

1- MetaParticles (Uses Metaball particles. These are particle systems in which the individual particles blend together in blobs or streams.)

2- Instanced Geometry (Generates particles that are instances of either an object, a linked hierarchy of objects, or a group.)

<PCloud>.standardParticle Integer default: 0

Set the type of particle used when standard particles is selected:

0- Triangle (Renders each particle as a triangle. Use Triangle particles with noise opacity for steam or smoke.)

1- Cube (Renders each particle as a cube.)

2- Special (Each particle consists of three intersecting 2D squares. These are effective when you use a face-map material, optionally along with an opacity map, to create the effect of a three-dimensional particle.)

3- Facing (Renders each particle as a square that always faces the view. Use with an appropriate opacity map for bubbles or snowflakes.)

4- Constant (Provides a particle that remains the same size, in pixels, specified by the size value. This size never changes, regardless of its distance from the camera. Note that this particle type can only be displayed in the viewports as a dot or a tick. If you turn on this option while Mesh is selected, the viewport display is automatically switched to Ticks.)

5- Tetra (Renders each particle as a mapped tetrahedron, whose tail points toward the normal vector of the emission, and whose head points away. Use Tetra particles for raindrops or sparks.)

6- SixPoint (Renders each particle as a six-pointed, two-dimensional star.)

7- Sphere (Renders each particle as a sphere.)

<PCloud>.Metaparticle_Tension Float default: 1.0 -- animatable

Determines the tightness of the particles, with regard to their tendency to blend with other particles. The higher the Tension, the harder the blobs, and the harder it is for them to merge.

<PCloud>.Metaparticle_Tension_Variation Float default: 0.0 -- animatable, percentage

The percent of variation of the Tension effect.

<PCloud>.metaballRenderCoarsness Float default: 0.5 -- alias: Metaparticle_Coarseness

The coarseness for metaparticles in the rendered scene.

<PCloud>.metaballViewCoarsness Float default: 1.0

The coarseness for the viewport display.

<PCloud>.metaballAutoCoarsness Boolean default: true

When this is on, the rendering coarseness is automatically set, based on the size of the particles, and the viewport coarseness is set to about twice that of the rendering coarseness.

<PCloud>.instancingObject Node default: undefined

The object which is instanced.

<PCloud>.instanceSubTree Boolean default: false

Turn this on when you want to include the linked children of the picked object in the particle. If the picked object is a group, all children of the group are included.

<PCloud>.instanceKeyOffsetType Integer default: 0

Set the animation offset keying:

0- None (Each particle duplicates the timing of the original object. As a result, the animation of all particles will be identically timed.)

1- Birth (The firstborn particle is an instance of the current animation of the source object at the moment of that particle's birth. Each subsequent particle then use the same start time for the animation.)

2- Random (This option is the same as None when Frame Offset is set to 0. Otherwise, each particle is born using the same animation as the source object at the time of birth, but with a random offset of frames, based on the .instanceFrameOffset value.)

<PCloud>.instanceFrameOffset Integer default: 0 -- alias: Animation_Offset_Amount

The property value is the UI value times the number of ticks per frame. The number of ticks per frame is accessible via the ticksPerFrame system global variable.

<PCloud>.mappingType Integer default: 0

Specifies how a mapped material affects the particles:

0- Time (Maps particles over time.)

1- Distance (Maps particles over a distance.)

<PCloud>.Mapping_Time_Base Time default: 30f -- animatable

The number of frames from the birth of the particle that it takes to complete one mapping of the particle.

<PCloud>.Mapping_Distance_Base Float default: 100.0 -- animatable

The distance, in units, from the birth of the particle that it takes to complete one mapping of the particle.

<PCloud>.materialSource Integer default: 0

Updates the material carried by the particle system, using the source specified:

0- Icon (The particles use the material currently assigned to the particle system icon.)

1- Instanced Geometry (The particles use the material assigned to the instanced geometry.)

Rotation and Collision

<PCloud>.Spin_Time Time default: 0f—animatable

The number of frames for one rotation of a particle. If set to 0, no rotation takes place.

<PCloud>.Spin_Time_Variation Float default: 0.0 -- animatable, percentage

The percent of variation of the Spin Time.

<PCloud>.Spin_Phase Float default: 0.0 -- animatable, angle

The initial particle rotation, in degrees.

<PCloud>.Spin_Phase_Variation Float default: 0.0 -- animatable, percentage

The percent of variation of the Phase.

<PCloud>.spinAxisType Integer default: 0

The spin axis for the particles:

0- Random (The spin axis for each of the particles is random.)

1- Direction of Travel/Mblur (Rotates the particles about a vector formed by the direction in which they're moving.)

2- User Defined (Uses a vector defined in the three X, Y, and Z spin vector values.)

<PCloud>.Blur_Stretch Integer default: 0 -- animatable

When greater than 0, the particles stretch along the travel axis, depending on their speed. Specifically, the Stretch value specifies the percent of their length per each unit of the Speed setting (in the Particle Motion group). Thus, if you set Stretch to 2 while Speed is set at 10, the particles are stretched 20 percent longer than their original size along the axis of their travel. This value is only available when you choose Direction of Travel/Mblur.

<PCloud>.X_Spin_Vector Float default: 1.0 -- animatable

Spin vector of the X-axis.

<PCloud>.Y_Spin_Vector Float default: 0.0 -- animatable

Spin vector of the Y-axis.

<PCloud>.Z_Spin_Vector Float default: 0.0 -- animatable

Spin vector of the Z-axis.

<PCloud>.Spin_Axis_Variation Float default: 0.0 -- animatable, angle

The amount, in degrees, by which the spin axis of each particle may vary from the specified X Axis, Y Axis, and Z Axis settings.

<PCloud>.Interparticle_Collisions_On Integer default: 0

Turn on/off interparticle collisions:

0- Off

1- On

<PCloud>.Interparticle_Collision_Steps Integer default: 2

The number of intervals per rendering interval, during which an inter-particle collision test is conducted. The higher the value, the more accurate the simulation, but the slower the simulation will run.

<PCloud>.Interparticle_Collision_Bounce Float default: 100.0 -- animatable, percentage

The degree to which speed is recovered after a collision.

<PCloud>.Interparticle_Collision_Bounce_Variation Float default: 0.0 -- animatable, percentage

The percentage of random variation of the Bounce value, applied to the particles.

Object Motion Inheritance

<PCloud>.motionInfluence Float default: 100.0 -- animatable, alias: Object_Motion_Inheritance

The percent of particles that inherit the motion of the object-based emitter at the moment of particle formation.

<PCloud>.motionMultiplier Float default: 1.0 -- animatable, alias: Object_Motion_Multiplier

Modifies the amount by which the emitter motion affects the particle motion. This can be a positive or negative number.

<PCloud>.motionVariation Float default: 0.0 -- animatable, percentage; alias: Object_Motion_Multiplier_Variation

Percentage of variation of the Multiplier value.

Bubble Motion

<PCloud>.Bubble_Amplitude Float default: 0.0 -- animatable

The distance the particle moves off its usual velocity vector as it travels.

<PCloud>.Bubble_Amplitude_Variation Float default: 0.0 -- animatable, percentage

The percent of Amplitude variation applied to each particle.

<PCloud>.Bubble_Period Time default: 100000f—animatable

The cycle time for one complete oscillation of a particle through the bubble "wave". A recommended value might be 20-30 intervals.

<PCloud>.Bubble_Period_Variation Float default: 0.0 -- animatable, percentage

The percent of Period variation for each particle.

<PCloud>.Bubble_Phase Float default: 0.0 -- animatable, angle

The initial displacement of the bubble pattern along the vector.

<PCloud>.Bubble_Phase_Variation Float default: 0.0 -- animatable, percentage

The percent of Phase variation for each particle.

Particle Spawn

<PCloud>.spawnType Integer default: 0

Determines what happens to particles at either collision or death:

0- None (Particles act as they normally would. That is, upon collision, they either bounce or stick, depending on Particle Bounce settings in the deflector, and on death they disappear.)

1- Die After Collision (Particles disappear when they strike a deflector to which they're bound, such as the SDeflector.)

2- Spawn on Collision (Spawn effects take place upon collision with a bound deflector.)

3- Spawn on Death (Spawn effects take place at the end of each particle's life.)

4- Spawn Trails (Particles are spawned from existing particles at each frame of that particle's life.)

<PCloud>.Die__X_frames_after_collision Time default: 0f -- animatable

The life, in frames, that the particle will persist after the collision. Setting this to 0 (the default) causes particles to vanish immediately after the collision.

<PCloud>.Die__X_frames_after_collision_variation Float default: 0.0 -- animatable, percentage

Varies the Persist value of each particle, when Persist is greater than 0. This lets you "feather" the dying off of the particle density.

<PCloud>.Spawn_Generations Integer default: 1

The number of spawns beyond the original particle generation. For example, if this is set to 1, and you're spawning at death, one spawning will occur beyond the original lifespan of each particle.

<PCloud>.Spawn_Multiplier Integer default: 1

Multiplies the number of particles spawned at each spawning event.

<PCloud>.Spawn_Direction_Chaos Float default: 0.0 -- animatable, percentage

The amount by which the direction of the spawned particle can vary from the direction of the parent particle. A setting of 0 means no variance. A setting of 100 causes the spawned particle to travel in any random direction. A setting of 50 causes the spawned particle to deviate from its parent's path by up to 90 degrees.

<PCloud>.Spawn_Speed_Chaos Float default: 0.0 -- animatable

Random percentage range of scaling of the spawned particles relative to their parents, and dependent on the options below.

<PCloud>.spawnSpeedType Integer default: 0

Sets the type of speed applied to spawn particles:

0- Slow (Applies the .spawn_Speed_Chaos value randomly to slow the speed of the spawned particles.)

1- Fast (Randomly speeds up particles based on the .spawn_Speed_Chaos value.)

2- Both (Some particles speed up, while others slow down, based on the .spawn_Speed_Chaos value.)

<PCloud>.spawnInheritVelocity Boolean default: false

When on, spawned particles inherit the speed of their parents, in addition to the effect of the .spawn_Speed_Chaos value.

<PCloud>.spawnSpeedFixed Boolean default: false

When on, uses the .spawn_Speed_Chaos value as a set value, rather than as a range applied randomly to each particle.

<PCloud>.Spawn_Scale_Chaos Float default: 0.0 -- animatable

The range of a percentage of change in the speed of the spawned particle relative to its parent. A value of 0 means no change.

<PCloud>.spawnScaleType Integer default: 0

The type of speed scaling for the spawned particles:

0- Slow (Applies the speed factor randomly to slow the speed of the spawned particles.)

1- Fast (Randomly speeds up particles based on the speed factor.)

2- Both (Some particles speed up, while others slow down, based on the speed factor.)

<PCloud>.spawnScaleFixed Boolean default: false

When on, uses the .spawn_Scale_Chaos value as a set value, rather than as a range applied randomly to each particle.

<PCloud>.lifespanValueQueue Array default: #()

lifespanValueQueue is an array of integers which correspond to lifespan values for each spawned generation of particles.

<PCloud>.Spawn_Lifespan Integer default: 0

Value that sets initial lifespan of spawned particles.

<PCloud>.objectMutationQueue Array default: #()

objectMutationQueue is an array of nodes which correspond to instanced-object particle types. Each generation of spawning will use the next node as its object type.

See also

Particle System Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Snow : GeometryClass

Snow - superclass: GeometryClass; super-superclass:node - classID: #(-1680467295, 0)

Value > MAXWrapper > Node > GeometryClass > Particle Systems > Snow

Constructor

snow ...

Properties

<Snow>.viewportcount Integer default: 100

Maximum number of particles displayed in viewports at any given frame.

<Snow>.rendercount Integer default: 100

Maximum number of particles that can appear in a single frame when you render it.

<Snow>.flakesize Float default: 2.0 -- animatable, alias: Flake_Size

Size of a particle in the active units.

<Snow>.speed Float default: 10.0 -- animatable

Initial velocity of each particle as it leaves the emitter. Particles travel at this speed unless they are affected by a particle system space warp.

<Snow>.variation Float default: 2.0 -- animatable

Varies the initial speed and direction of particles. The greater the Variation, the broader the area of snowfall.

<Snow>.tumble Float default: 0.0 -- animatable

Amount of random rotation for snowflake particles. This parameter can range from 0 to 1. At 0, flakes do not rotate; at 1, they rotate the most. The axis of rotation is generated randomly for each particle.

<Snow>.tumblescale Float default: 1.0 -- animatable, alias: Tumble_Rate

Speed at which snowflakes rotate. The greater the Tumble Rate, the faster the rotation.

<Snow>.display Integer default: 0

Set how particles are displayed in viewports:

0- Flakes (star-shaped snowflakes)

1- Dots

2- Ticks

<Snow>.render Integer default: 0

Set how particles are rendered:

0- Six Point (Each particle is rendered as a six-pointed star. Each side of the star is a face to which you can assign a material.)

1- Triangle (Each particle is rendered as a triangle. Only one side of the triangle is a face to which you can assign a material.)

2- Facing (Particles are rendered as square faces whose width and height equal Flake Size. Facing particles are provided especially for use with material maps.)

<Snow>.start Time default: 0f -- alias: starttime

Number of the first frame where particles appear.

<Snow>.lifetime Time default: 30f -- alias: life

The lifetime of a particle, in number of frames.

<Snow>.birthrate Time default: 0f -- animatable, alias: Birth_Rate

The number of new particles born per frame. If this is less than or equal to the maximum sustainable rate, the particle system generates an even flow of particles. If it is greater than the maximum rate, the particle system generates particles in bursts.

<Snow>.constant Boolean default: true

When on, Birth Rate is unavailable and the birth rate used equals the maximum sustainable rate. When off, Birth Rate is available. Turning Constant off does not mean that the birth rate varies automatically; the birth rate remains constant unless you animate the Birth Rate parameter.

<Snow>.emitterwidth Float default: 25.0 -- animatable, alias: width

The width of the emitter.

<Snow>.emitterheight Float default: 25.0 -- animatable, alias: length

The height of the emitter.

<Snow>.hideemitter Boolean default: false

When on, the emitter is hidden in the viewports.

NOTE:

The emitter is never rendered.

See also

Particle System Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Spray : GeometryClass

Spray - superclass: GeometryClass; super-superclass:node - classID: #(-1680467296, 0)

Value > MAXWrapper > Node > GeometryClass > Particle Systems > Spray

Constructor

spray ...

Properties

<Spray>.viewportcount Integer default: 100

Maximum number of particles displayed in viewports at any given frame.

<Spray>.rendercount Integer default: 100

Maximum number of particles that can appear in a single frame when you render it.

<Spray>.dropsize Float default: 2.0 -- animatable, alias: Drop_Size

Size of a particle in the active units.

<Spray>.speed Float default: 10.0 -- animatable

Initial velocity of each particle as it leaves the emitter. Particles travel at this speed unless they are affected by a particle system space warp.

<Spray>.variation Float default: 2.0 -- animatable

Varies the initial speed and direction of particles. The greater the Variation, the broader the area of snowfall.

<Spray>.display Integer default: 0

Set how particles are displayed in viewports:

0- Drops (streaks)

1- Dots

2- Ticks

<Spray>.render Integer default: 0

Set how particles are rendered:

0- Tetrahedron (Particles are rendered as long tetrahedrons, with the length you specify in the Drop Size parameter. Tetrahedron is the default setting for rendering. It provides a basic simulation of water drops.)

1- Facing (Particles are rendered as square faces whose width and height equal Drop Size. Facing particles are provided especially for use with material maps.)

<Spray>.start Time default: 0f -- alias: starttime

Number of the first frame where particles appear.

<Spray>.lifetime Time default: 30f -- animatable, alias: life

The lifetime of a particle, in number of frames.

<Spray>.birthrate Time default: 0f -- animatable, alias: Birth_Rate

The number of new particles born per frame. If this is less than or equal to the maximum sustainable rate, the particle system generates an even flow of particles. If it is greater than the maximum rate, the particle system generates particles in bursts.

<Spray>.constant Boolean default: true

When on, Birth Rate is unavailable and the birth rate used equals the maximum sustainable rate. When off, Birth Rate is available. Turning Constant off does not mean that the birth rate varies automatically; the birth rate remains constant unless you animate the Birth Rate parameter.

<Spray>.emitterheight Float default: 25.0 -- animatable, alias: length

The height of the emitter.

<Spray>.emitterwidth Float default: 25.0 -- animatable, alias: width

The width of the emitter.

<Spray>.hideemitter Boolean default: false

When on, the emitter is hidden in the viewports.

NOTE:

The emitter is never rendered.

See also

Particle System Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


SuperSpray : GeometryClass

SuperSpray - superclass: GeometryClass; super-superclass:node - classID: #(1962414563, 570129239)

Value > MAXWrapper > Node > GeometryClass > Particle Systems > SuperSpray

Constructor

superSpray ...

Properties

Basic Parameters

<SuperSpray>.Off_Axis Float default: 0.0 -- animatable, angle

Affects the angle of the particle stream off the Z axis (along the plane of the X axis).

<SuperSpray>.Axis_Spread Float default: 0.0 -- animatable, angle

Affects the spread of the particles away from the emission vector (along the plane of the X axis).

<SuperSpray>.Off_Plane Float default: 0.0 -- animatable, angle

Affects the angle of emission about the Z axis. This has no effect if Off_Axis is set to 0.

<SuperSpray>.Plane_Spread Float default: 0.0 -- animatable, angle

Affects the spread of the particles about the Off_Plane axis. This has no effect if Off_Axis is set to 0.

<SuperSpray>.iconsize Float default: 20.0 -- alias: Emitter_Width

Size of the emitter icon.

<SuperSpray>.iconHidden Boolean default: false

When on, hides the emitter in viewports. When off, the emitter is displayed in viewports. The emitter is never rendered.

<SuperSpray>.viewType Integer default: 0

Set the display icon for particles in the viewport:

0- Dots (Displays the particles as dots.)

1- Ticks (Displays the particles as crosses.)

2- Mesh (Displays the particles as mesh objects. This results in slower viewport redraws.)

3- Bbox (For instanced geometry only, this displays each instanced particle, whether a single object, a hierarchy, or a group, as a bounding box.)

<SuperSpray>.viewPercent Float default: 10.0 -- percentage, alias: Percentage_Displayed

The percentage of particles displayed in the viewport.

Particle Generation

<SuperSpray>.quantityMethod Integer default: 0

Set the method by which the number of particles is determined over time:

0- Use Rate (Specifies a fixed number of particles emitted per frame.)

1- Use Total (Specifies a total number of particles formed over the life of the system.)

TIP

Generally, Use Rate is best for a continuous flow of particles, like a trail of pixie dust, while Use Total is better for bursts of particles over a short period of time.

<SuperSpray>.Birth_Rate Integer default: 10 -- animatable

The number of particles emitted per frame.

<SuperSpray>.Total_Number Integer default: 100

The total number of particles to be emitted.

<SuperSpray>.speed Float default: 10.0 -- animatable

The velocity of the particle at birth, along the normal, in units traveled per frame.

<SuperSpray>.Speed_Variation Float default: 0.0 -- animatable, percentage

Percentage of variation to the speed of emission for each particle.

<SuperSpray>.Emitter_Start Time default: 0f

The frame at which particles begin to exist in the scene.

<SuperSpray>.Emitter_Stop Time default: 30f

The last frame at which particles are emitted.

<SuperSpray>.Display_Until Time default: 100f

Time at which all particles will disappear, regardless of other settings.

<SuperSpray>.life Time default: 30f -- animatable

The lifespan of each particle from the time of creation.

<SuperSpray>.Life_Variation Time default: 0f -- animatable

The number of frames by which the life of each particle can vary from the norm.

<SuperSpray>.subsampleCreationTime Boolean default: false

When on, enables the addition of a time offset to the equations of motion that prevents puffing in time.

<SuperSpray>.subsampleEmitterTranslation Boolean default: true

If the object-based emitter is moving in space, particles are created at integral times at positions along the geometry's path between renderable positions. This prevents puffing in space.

<SuperSpray>.subsampleEmitterRotation Boolean default: true

If the emitter is rotating, turn this on to avoid puffing and produce smooth spiral effects.

<SuperSpray>.size Float default: 1.0 -- animatable

The target size for all particles in the system.

<SuperSpray>.Size_Variation Float default: 0.0 -- animatable, percentage

The percentage by which the size of each particle may vary from the norm.

<SuperSpray>.Growth_Time Time default: 10f

The number of intervals over which the particle grows from being very small (0.1a system constant) to the Size value.

<SuperSpray>.Fade_Time Time default: 10f

The number of intervals over which the particle will shrink to 1/10th its Size setting prior to its death.

<SuperSpray>.seed Integer default: 0 -- alias: Random_Seed

By changing the Seed value, you achieve different results using otherwise identical particle settings.

Particle Type

<SuperSpray>.particleType Integer default: 0

The type of particle emitted:

0- Standard Particle (Uses one of several standard particle types, such as triangle, cube, tetra, and so on.)

1- MetaParticles (Uses Metaball particles. These are particle systems in which the individual particles blend together in blobs or streams.)

2- Instanced Geometry (Generates particles that are instances of either an object, a linked hierarchy of objects, or a group.)

<SuperSpray>.standardParticle Integer default: 0

Set the type of particle used when standard particles is selected:

0- Triangle (Renders each particle as a triangle. Use Triangle particles with noise opacity for steam or smoke.)

1- Cube (Renders each particle as a cube.)

2- Special (Each particle consists of three intersecting 2D squares. These are effective when you use a face-map material, optionally along with an opacity map, to create the effect of a three-dimensional particle.)

3- Facing (Renders each particle as a square that always faces the view. Use with an appropriate opacity map for bubbles or snowflakes.)

4- Constant (Provides a particle that remains the same size, in pixels, specified by the size value. This size never changes, regardless of its distance from the camera. Note that this particle type can only be displayed in the viewports as a dot or a tick. If you turn on this option while Mesh is selected, the viewport display is automatically switched to Ticks.)

5- Tetra (Renders each particle as a mapped tetrahedron, whose tail points toward the normal vector of the emission, and whose head points away. Use Tetra particles for raindrops or sparks.)

6- SixPoint (Renders each particle as a six-pointed, two-dimensional star.)

7- Sphere (Renders each particle as a sphere.)

<SuperSpray>.Metaparticle_Tension Float default: 1.0 -- animatable

Determines the tightness of the particles, with regard to their tendency to blend with other particles. The higher the Tension, the harder the blobs, and the harder it is for them to merge.

<SuperSpray>.Metaparticle_Tension_Variation Float default: 0.0 -- animatable, percentage

The percent of variation of the Tension effect.

<SuperSpray>.metaballRenderCoarsness Float default: 0.5 -- alias: Metaparticle_Coarseness

The coarseness for metaparticles in the rendered scene.

<SuperSpray>.metaballViewCoarsness Float default: 1.0

The coarseness for the viewport display.

<SuperSpray>.metaballAutoCoarsness Boolean default: true

When this is on, the rendering coarseness is automatically set, based on the size of the particles, and the viewport coarseness is set to about twice that of the rendering coarseness.

<SuperSpray>.instancingObject Node default: undefined

The object which is instanced.

<SuperSpray>.instanceSubTree Boolean default: false

Turn this on when you want to include the linked children of the picked object in the particle. If the picked object is a group, all children of the group are included.

<SuperSpray>.instanceKeyOffsetType Integer default: 0

Set the animation offset keying:

0- None (Each particle duplicates the timing of the original object. As a result, the animation of all particles will be identically timed.)

1- Birth (The firstborn particle is an instance of the current animation of the source object at the moment of that particle's birth. Each subsequent particle then use the same start time for the animation.)

2- Random (This option is the same as None when Frame Offset is set to 0. Otherwise, each particle is born using the same animation as the source object at the time of birth, but with a random offset of frames, based on the .instanceFrameOffset value.)

<SuperSpray>.instanceFrameOffset Integer default: 0 -- alias: Animation_Offset_Amount

The property value is the UI value times the number of ticks per frame. The number of ticks per frame is accessible via the ticksPerFrame system global variable.

<SuperSpray>.mappingType Integer default: 0

Specifies how a mapped material affects the particles:

0- Time (Maps particles over time.)

1- Distance (Maps particles over a distance.)

<SuperSpray>.Mapping_Time_Base Time default: 30f -- animatable

The number of frames from the birth of the particle that it takes to complete one mapping of the particle.

<SuperSpray>.Mapping_Distance_Base Float default: 100.0 -- animatable

The distance, in units, from the birth of the particle that it takes to complete one mapping of the particle.

Rotation and Collision

<SuperSpray>.Spin_Time Time default: 30f -- animatable

The number of frames for one rotation of a particle. If set to 0, no rotation takes place.

<SuperSpray>.Spin_Time_Variation Float default: 0.0 -- animatable, percentage

The percent of variation of the Spin Time.

<SuperSpray>.Spin_Phase Float default: 0.0 -- animatable, angle

The initial particle rotation, in degrees.

<SuperSpray>.Spin_Phase_Variation Float default: 0.0 -- animatable, percentage

The percent of variation of the Phase.

<SuperSpray>.spinAxisType Integer default: 0

The spin axis for the particles:

0- Random (The spin axis for each of the particles is random.)

1- Direction of Travel/Mblur (Rotates the particles about a vector formed by the direction in which they're moving.)

2- User Defined (Uses a vector defined in the three X, Y, and Z spin vector values.)

<SuperSpray>.Blur_Stretch Integer default: 0 -- animatable

When greater than 0, the particles stretch along the travel axis, depending on their speed. Specifically, the Stretch value specifies the percent of their length per each unit of the Speed setting (in the Particle Motion group). Thus, if you set Stretch to 2 while Speed is set at 10, the particles are stretched 20 percent longer than their original size along the axis of their travel. This value is only available when you choose Direction of Travel/Mblur.

<SuperSpray>.X_Spin_Vector Float default: 1.0 -- animatable

Spin vector of the X-axis.

<SuperSpray>.Y_Spin_Vector Float default: 0.0 -- animatable

Spin vector of the Y-axis.

<SuperSpray>.Z_Spin_Vector Float default: 0.0 -- animatable

Spin vector of the Z-axis.

<SuperSpray>.Spin_Axis_Variation Float default: 0.0 -- animatable, angle

The amount, in degrees, by which the spin axis of each particle may vary from the specified X Axis, Y Axis, and Z Axis settings.

<SuperSpray>.Interparticle_Collisions_On Integer default: 0

Turn on/off interparticle collisions:

0- Off

1- On

<SuperSpray>.Interparticle_Collision_Steps Integer default: 2

The number of intervals per rendering interval, during which an inter-particle collision test is conducted. The higher the value, the more accurate the simulation, but the slower the simulation will run.

<SuperSpray>.Interparticle_Collision_Bounce Float default: 100.0 -- animatable, percentage

The degree to which speed is recovered after a collision.

<SuperSpray>.Interparticle_Collision_Bounce_Variation Float default: 0.0 -- animatable, percentage

The percentage of random variation of the Bounce value, applied to the particles.

Object Motion Inheritance

<SuperSpray>.motionInfluence Float default: 100.0 -- animatable, alias: Object_Motion_Inheritance

The percent of particles that inherit the motion of the object-based emitter at the moment of particle formation.

<SuperSpray>.motionMultiplier Float default: 1.0 -- animatable, alias: Object_Motion_Multiplier

Modifies the amount by which the emitter motion affects the particle motion. This can be a positive or negative number.

<SuperSpray>.motionVariation Float default: 0.0 -- animatable, percentage; alias: Object_Motion_Multiplier_Variation

Percentage of variation of the Multiplier value.

Bubble Motion

<SuperSpray>.Bubble_Amplitude Float default: 0.0 -- animatable

The distance the particle moves off its usual velocity vector as it travels.

<SuperSpray>.Bubble_Amplitude_Variation Float default: 0.0 -- animatable, percentage

The percent of Amplitude variation applied to each particle.

<SuperSpray>.Bubble_Period Time default: 100000f—animatable

The cycle time for one complete oscillation of a particle through the bubble "wave". A recommended value might be 20-30 intervals.

<SuperSpray>.Bubble_Period_Variation Float default: 0.0 -- animatable, percentage

The percent of Period variation for each particle.

<SuperSpray>.Bubble_Phase Float default: 0.0 -- animatable, angle

The initial displacement of the bubble pattern along the vector.

<SuperSpray>.Bubble_Phase_Variation Float default: 0.0 -- animatable, percentage

The percent of Phase variation for each particle.

Particle Spawn

<SuperSpray>.spawnType Integer default: 0

Determines what happens to particles at either collision or death:

0- None (Particles act as they normally would. That is, upon collision, they either bounce or stick, depending on Particle Bounce settings in the deflector, and on death they disappear.)

1- Die After Collision (Particles disappear when they strike a deflector to which they're bound, such as the SDeflector.)

2- Spawn on Collision (Spawn effects take place upon collision with a bound deflector.)

3- Spawn on Death (Spawn effects take place at the end of each particle's life.)

4- Spawn Trails (Particles are spawned from existing particles at each frame of that particle's life.)

<SuperSpray>.Die__X_frames_after_collision Time default: 0f -- animatable

The life, in frames, that the particle will persist after the collision. Setting this to 0 (the default) causes particles to vanish immediately after the collision.

<SuperSpray>.Die__X_frames_after_collision_variation Float default: 0.0 -- animatable, percentage

Varies the Persist value of each particle, when Persist is greater than 0. This lets you "feather" the dying off of the particle density.

<SuperSpray>.Spawn_Affects Integer default: 100

The percentage of particles that will spawn. Reducing this reduces the number of particles that produce spawned particles.

<SuperSpray>.Spawn_Multiplier_Variation Float default: 0.0 -- percentage

Percentage range by which the Multiplier value will vary, frame by frame.

<SuperSpray>.Spawn_Direction_Chaos Float default: 0.0 -- animatable, percentage

The amount by which the direction of the spawned particle can vary from the direction of the parent particle. A setting of 0 means no variance. A setting of 100 causes the spawned particle to travel in any random direction. A setting of 50 causes the spawned particle to deviate from its parent's path by up to 90 degrees.

<SuperSpray>.Spawn_Speed_Chaos Float default: 0.0 -- animatable

Random percentage range of scaling of the spawned particles relative to their parents, and dependent on the options below.

<SuperSpray>.spawnSpeedType Integer default: 0

Sets the type of speed applied to spawn particles:

0- Slow (Applies the .spawn_Speed_Chaos value randomly to slow the speed of the spawned particles.)

0- Fast (Randomly speeds up particles based on the .spawn_Speed_Chaos value.)

1- Both (Some particles speed up, while others slow down, based on the .spawn_Speed_Chaos value.)

<SuperSpray>.spawnInheritVelocity Boolean default: false

When on, spawned particles inherit the speed of their parents, in addition to the effect of the .spawn_Speed_Chaos value.

<SuperSpray>.spawnSpeedFixed Boolean default: false

When on, uses the .spawn_Speed_Chaos value as a set value, rather than as a range applied randomly to each particle.

<SuperSpray>.Spawn_Scale_Chaos Float default: 0.0 -- animatable

The range of a percentage of change in the speed of the spawned particle relative to its parent. A value of 0 means no change.

<SuperSpray>.spawnScaleType Integer default: 0

The type of speed scaling for the spawned particles:

0- Slow (Applies the speed factor randomly to slow the speed of the spawned particles.)

1- Fast (Randomly speeds up particles based on the speed factor.)

2- Both (Some particles speed up, while others slow down, based on the speed factor.)

<SuperSpray>.spawnScaleFixed Boolean default: false

When on, uses the .spawn_Scale_Chaos value as a set value, rather than as a range applied randomly to each particle.

<SuperSpray>.lifespanValueQueue Array default: #()

lifespanValueQueue is an array of integers which correspond to lifespan values for each spawned generation of particles.

<SuperSpray>.objectMutationQueue Array default: #()

objectMutationQueue is an array of nodes which correspond to instanced-object particle types. Each generation of spawning will use the next node as its object type.

See also

Particle System Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Geometry - NURBS Objects

Value > MAXWrapper > Node > GeometryClass > NURBS

The following list displays the NURBS objects:

NURBSSurf

Point_Surf


NURBSSurf : GeometryClass

Value > MAXWrapper > Node > GeometryClass > NURBS > NURBSSurf

NURBSSurfs are NURBS surface objects defined by CVs (control vertices). All NURBS objects are created through the special NURBS descriptor classes (see Working with NURBS ) and the NURBSSurf class is used typically in object class testing with the classOf() function. Scene objects created as NURBSSurf objects in the 3ds Max user interface have the class NURBSSurf.

Constructor

NURBSNode <nurbs_set> ...

See Creating New NURBS Objects for details.

Properties

Properties for NURBSSurf objects are accessed through a NURBSSet descriptor object. See Working with NURBS for more details.

See also

NURBS Node Properties and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Point_Surf : GeometryClass

Value > MAXWrapper > Node > GeometryClass > NURBS > Point_Surf

Point_Surfs are NURBS surface objects defined by interpolated points. All NURBS objects are created through the special NURBS descriptor classes (see Working with NURBS ) and the Point_Surf class is used typically in object class testing with the classOf() function. Scene objects created as Point Surface objects in the 3ds Max user interface have the class Point_Surf.

Constructor

NURBSNode <nurbs_set> ...

See Creating New NURBS Objects for details.

Properties

<Point_Surf>.thickness Float  default: 1.0 -- animatable

Rendered thickness of the surface.

<Point_Surf>.sides  Integer  default: 12 -- animatable

Rendered sides of the surface.

<Point_Surf>.angle  Float  default: 0.0 -- animatable

The rotational position of the cross-section in the renderer.

Other properties for Point Surfaces are accessed through a NURBSSet descriptor object. See Working with NURBS for more details.

See also

NURBS Node Properties and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


BoneGeometry : GeometryClass

BoneGeometry : GeometryClass {28bf6e8d,2ecca840}

Value > MAXWrapper > Node > GeometryClass > BoneGeometry

Constructors

Class instances not creatable by MAXScript

Aliases

BoneGeometry...

BoneObj...

Properties

<BoneGeometry>.width : world units

Get/set the width of the bone.

<BoneGeometry>.height : world units

Get/set the height of the bone.

<BoneGeometry>.taper : percentage

Get/set the taper of the bone.

<BoneGeometry>.length : float

Get/set the length of the bone.

<BoneGeometry>.sidefins (Side_Fins) : boolean

Toggle side fins on and off.

<BoneGeometry>.sidefinssize (Side_Fins_Size) : world units

Get/set the size of the side fins in world units.

<BoneGeometry>.sidefinsstarttaper (Side_Fins_Start_Taper) : percentage

Get/set the start taper value of the side fins as a percentage of the size.

<BoneGeometry>.sidefinsendtaper (Side_Fins_End_Taper) : percentage

Get/set the end taper value of the side fins as a percentage of the size.

<BoneGeometry>.frontfin (Front_Fin) : boolean

Toggle front fin on and off.

<BoneGeometry>.frontfinsize (Front_Fin_Size) : world units

Get/set the size of the front fin.

<BoneGeometry>.frontfinstarttaper (Front_Fin_Start_Taper) : percentage

Get/set the start taper of the front fin as a percentage of the size.

<BoneGeometry>.frontfinendtaper (Front_Fin_End_Taper) : percentage

Get/set the end taper of the front fin as a percentage of the size.

<BoneGeometry>.backfin (Back_Fin) : boolean

Toggle back fin on and off.

<BoneGeometry>.backfinsize (Back_Fin_Size) : world units

Get/set the size of the back fin.

<BoneGeometry>.backfinstarttaper (Back_Fin_Start_Taper) : percentage

Get/set the start taper of the back fin as a percentage of the size.

<BoneGeometry>.backfinendtaper (Back_Fin_End_Taper) : percentage

Get/set the end taper of the back fin as a percentage of the size.

<BoneGeometry>.genmap (Generate_Mapping_Coords) : boolean

Toggle mapping coordinates generation on and off.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


PolymorphicGeom : GeometryClass

PolymorphicGeom : GeometryClass {50406508,b995f5e}

Used by the DWG Import.

Class instances not creatable by MAXScript

Properties:

.render_thickness : float

Get/Set the render thickness.

.render_sides : integer

Get/Set the number of sides to render.

.render_angle : float

Get/Set the rotation angle of the circular cross-section when rendering.

.render_width : float

Get/Set the width of the cross-section when rendering.

.render_length : float

Get/Set the length of the cross-section when rendering.

.render_angle2 : float

Get/Set the rotation angle of the rectanglular cross-section when rendering.

.render_threshold : angle

Get/Set the auto-smooth threshold when rendering.


LinkBlockInstance : GeometryClass

LinkBlockInstance : GeometryClass {79a07eb2,78d975fb}

Used by the DWG Import/ File Link.

Class instances not creatable by MAXScript

Alias:

LinkBlockInstanceshape

Properties:

.render_thickness : float

Get/Set the render thickness.

.render_sides : integer

Get/Set the number of sides to render.

.render_angle : float

Get/Set the rotation angle of the circular cross-section when rendering.

.render_width : float

Get/Set the width of the cross-section when rendering.

.render_length : float

Get/Set the length of the cross-section when rendering.

.render_angle2 : float

Get/Set the rotation angle of the rectanglular cross-section when rendering.

.render_threshold : angle

Get/Set the auto-smooth threshold when rendering.


LinkBlockInstanceshape : shape

LinkBlockInstanceshape : shape {79a07eb2,78d975fb}

Used by the DWG Import/ File Link. Available in 3ds Max 8 and higher.

Class instances not creatable by MAXScript

Properties:

.render_thickness : float

Get/Set the render thickness.

.render_sides : integer

Get/Set the number of sides to render.

.render_angle : float

Get/Set the rotation angle of the circular cross-section when rendering.

.render_width : float

Get/Set the width of the cross-section when rendering.

.render_length : float

Get/Set the length of the cross-section when rendering.

.render_angle2 : float

Get/Set the rotation angle of the rectanglular cross-section when rendering.

.render_threshold : angle

Get/Set the auto-smooth threshold when rendering.


LinkLeaf : GeometryClass

LinkLeaf : GeometryClass {6a7f22b7,29061061}

Used by the DWG Import/ File Link.

Class instances not creatable by MAXScript

Alias:

LinkLeafshape

Properties:

.render_thickness : float

Get/Set the render thickness.

.render_sides : integer

Get/Set the number of sides to render.

.render_angle : float

Get/Set the rotation angle of the circular cross-section when rendering.

.render_width : float

Get/Set the width of the cross-section when rendering.

.render_length : float

Get/Set the length of the cross-section when rendering.

.render_angle2 : float

Get/Set the rotation angle of the rectanglular cross-section when rendering.

.render_threshold : angle

Get/Set the auto-smooth threshold when rendering.


Shape : Node

Value > MAXWrapper > Node > GeometryClass > Shape

The following image maps and lists show the 3ds Max shape class objects:

Splines

Arc

Circle

Donut

Ellipse

Helix

Line

NGon

Rectangle

Section

Star

Text

Extended Splines

Angle : Shape

Channel : Shape

Tee : Shape

WalledRectangle : Shape

WideFlange : Shape

NURBS Curves

CV_Curve

Point_Curve


Shape Common Properties, Operators, and Methods

Value > MAXWrapper > Node > GeometryClass > Shape

General Methods

numKnots <shape> [ <spline_index_integer> ]

Returns the number of knots (also known vertices or control points) in the indexed spline as an integer. If the spline index is not specified, returns the number of knots in the entire shape.

FOR EXAMPLE:

y = donut()

numKnots y

Interpolation Methods

There are a number of interpolation functions that operate on shape scene objects. They provide capabilities such as stepping along a curve within a shape getting coordinates on the curve, getting curve lengths or determining the closest point on a curve to a given coordinate. These are useful for placing cloned objects along a curve or keeping a set of objects in formation near a 'spine' curve as it animates, etc.

The interpolators all take a shape scene object (for example, a line), an optional curve number in case there are several curves in the shape, defaulting to 1, and a parameter in the range 0.0 to 1.0, that specifies a spot on the curve as a proportion along its length. There are two types of interpolator provided:

  • One interpolator matches the 3ds Max Path controller in which the percentage along the path is not uniform, but weighted by the vertex spacing. This simple interpolation is interpolating based on parameter space. If a spline has 4 segments, the first segment is parameter values 0-0.25, the second 0.25-0.5, the third 0.5-0.75 and the fourth 0.75-1.0. This is regardless of the length of each segment.

  • Another interpolator that gives you a uniform interpolation along the length of the curve. This interpolation normalizes the parameter space to distance along the length of a spline. So parameter space 0 is the start, 1.0 is the end and 0.5 is halfway along the actual length of the curve.

The non-uniform Path interpolator in 3ds Max gives rise to the varying velocity of a path-animated object when the path has unevenly spaced control points. The arc-length interpolators provided here give a uniform placing along the curve no matter how uneven the control point placement. The advantage of the Path interpolator is that it is computationally much more efficient than a uniform arc-length interpolator. The length interpolator uses some caches to speed it up, but you have to help manage them in the way described below.

The optional steps: keyword argument for the methods listed below lets you specify the integration steps. The default steps value is 5 times the curve's 3ds Max unit length, which usually is more than enough. For example, if a curve has a length of 100 3ds Max units, the default step size would be 500. The interpolation algorithm has an accuracy of no better than + or - (1/steps) 3ds Max units. These methods employ a cache to speed up their operation in the common case where you step gradually along a single curve. The cache remembers the state for the last point on the curve and picks up there if you call again on the same curve at the same animation time. This can exponentially speed up interpolation processing. However, MAXScript does not have a way of knowing if you've edited the curve from one call to the next, so you have to be sure to reset the cache with the resetLengthInterp() method if the user can edit the curve between calls in your code.

All coordinates are in the current coordinate system.

pathInterp <shape> [ <curve_num> ] <parameter>

Return a point3 coordinate on the numbered curve (defaults to 1) corresponding to the parameter value (0.0 to 1.0) that matches the 3ds Max Path controller percentage (vertex-based) interpolation.

lengthInterp <shape> [ <curve_num> ] <parameter> [ steps:<integer> ]

Return a point3 coordinate on the numbered curve (defaults to 1) corresponding to the parameter value (0.0 to 1.0) that is that fraction along the curve's total length.

resetLengthInterp()

Clear length interpolation cache. Use this if the curve you are length-interpolating along might have been edited between calls.

curveLength <shape> [ <curve_num> ]

Return the arc length of the numbered curve. This length does not reflect any transform level scaling performed on the shape.

pathTangent <shape> [ <curve_num> ] <parameter>

Return the tangent direction vector at the 3ds Max Path (vertex-based) interpolated point along the specified curve. You can use this function, for example, to set an object's direction to follow the curve.

lengthTangent <shape> [ <curve_num> ] <parameter> [ steps:<integer> ]

Return the tangent direction vector at the arc-length-interpolated point along the specified curve. You can use this function to set an object's direction to follow the curve.

nearestPathParam <shape> [ <curve_num> ] <point3> [ steps:<integer> ]

Return the interpolation parameter value (0.0 to 1.0) corresponding to the point along the curve that is closest to the given <point3> coordinate. The parameter is given as a 3ds Max Path (vertex-based) interpolation parameter value. You can then use pathInterp with this value to find the nearest point's coordinates, or use one of the following functions for converting between arc-length parameters and 3ds Max Path percentage parameters.

pathToLengthParam <shape> [ <curve_num> ] <parameter> [ steps:<integer> ]

Return the uniform arc-length length parameter corresponding to the given 3ds Max Path (vertex-based) parameter for this curve.

lengthToPathParam <shape> [ <curve_num> ] <parameter> [ steps:<integer> ]

Return the 3ds Max Path (vertex-based) parameter corresponding to the given uniform arc-length parameter for this curve.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Shapes - Splines

Value > MAXWrapper > Node > GeometryClass > Shape > SplineShape

The following list shows the 3ds Max spline shape class objects:

Arc

Circle

Donut

Ellipse

Helix

Line

NGon

Rectangle

Section

Star

Text

See also

Shapes - Extended

Spline Shape Common Properties, Operators, and Methods

Shape Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Spline Shape Common Properties, Operators, and Methods

Value > MAXWrapper > Node > GeometryClass > Shape > SplineShape

The following methods apply to all spline shape objects.

Properties

None

Methods

applyOffset <spline_shape_node> <offset_float>

For each spline in the shape, makes a copy of the spline, offset on all sides to the distance in units specified by offset_float. If a spline is open, the resulting spline and its outline will make a single closed spline. Negative offset_float values create an offset spline to the left of the spline (as the spline is drawn from its start to its finish). The spline_shape_node is converted to a SplineShape (Editable Spline) if it is not already a SplineShape.

measureOffset <spline_shape_node> <point3>

Returns a Float value whose absolute value is the distance from point3 to the closest point on a spline in the shape. The sign of the value is positive if the point3 position is to the left of the spline (as the spline is drawn from its start to its finish). The value returned by this method can usually be used as the offset_float parameter in applyOffset() to have an offset spline pass through the point3 position. If the closest point on a spline in the shape is an endpoint of an open spline, the offset spline will not pass through the point3 position.

trimextend <fixed_node_array> <alterable_node_array> \

[trim: <boolean> ] [extend: <boolean>] [infinite: <boolean>] \

[project: #view | #3D | #grid]

NOTE:

THIS FEATURE IS CURRENTLY BROKEN.

See also

Shape Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Arc : Shape

Arc - superclass: shape; super-superclass:node - classID: #(6550, 0)

Value > MAXWrapper > Node > GeometryClass > Shape > Arc

Constructor

arc ...

Properties

Parameters Rollout

<Arc>.radius       Float default: 25.0 -- animatable

The arc radius.

<Arc>.from       Float default: 45.0 -- animatable

Location of the start point as an angle measured from the local positive X axis.

<Arc>.to       Float default: 135.0 -- animatable

Location of the end point as an angle measured from the local positive X axis.

<Arc>.pie       Boolean default: false

When on, creates a closed spline in the form of a pie. The start point and end point are connected to the center with straight segments.

<Arc>.reverse      Boolean  default: false

When on, the direction of the arc spline is reversed, and the first vertex is placed at the opposite end of an open arc. As long as the shape remains an original shape (and not an editable spline), you can switch its direction by toggling reverse. Once the arc is converted to an editable spline, you can use Reverse at the Spline sub-object level to reverse direction.

Interpolation Rollout

<Arc>.steps       Integer default: 6

Number of divisions between each vertex.

<Arc>.optimize       Boolean default: true

When on, removes unneeded steps from straight segments in the spline.

<Arc>.adaptive       Boolean default: false

When on, sets the number of steps for each segment to produce a smooth curve. Straight segments always receive 0 steps.

Rendering Rollout

<Arc>.render_renderable BooleanClass default: false -- boolean; renderable

Toggles the "Enable in Renderer" checkbox on and off. When set to true, the spline will be rendered by the production renderer. Available in 3ds Max 8 and higher.

<Arc>.render_displayRenderMesh BooleanClass default: false -- boolean; displayRenderMesh

Toggles the "Enable In Viewport" checkbox on and off. When set to true, the mesh will be displayed in the viewports. Available in 3ds Max 8 and higher.

<Arc>.render_useViewportSettings BooleanClass default: false -- boolean; useViewportSettings

Toggles the "Use Viewport Settings" checkbox on and off. When set to true, the mesh displayed in the viewport will use the Viewport settings. When false, the Renderer settings will be used for the viewport mesh, too. Available in 3ds Max 8 and higher.

<Arc>.render_mapcoords BooleanClass default: false -- boolean; mapcoords

Toggles mapping coordinates generation on and off. The U coordinate wraps once around the thickness of the spline; the V coordinate is mapped once along the length of the spline. Available in 3ds Max 8 and higher.

<Arc>.realWorldMapSize BooleanClass default: false -- boolean

Toggles the real-world map size option on and off. Available in 3ds Max 8 and higher.

<Arc>.render_displayRenderSettings BooleanClass default: true -- boolean; displayRenderSettings

Toggles the state of the Viewport/Renderer radio buttons. When set to true, the Renderer settings will be displayed in the rollout. When false, the Viewport settings will be shown instead. Available in 3ds Max 8 and higher.

<Arc>.render_rectangular BooleanClass default: false -- boolean

When set to true, enables the Rectangular cross-section mode to be used in the renderer. When false (default), enables the Radial cross-section mode. Corresponds to the Radial/Rectangular radio buttons in the UI in Renderer mode. Available in 3ds Max 8 and higher.

<Arc>.render_viewport_rectangular BooleanClass default: false -- boolean

When set to true, enables the Rectangular cross-section mode to be used in the viewports. When false (default), enables the Radial cross-section mode. Corresponds to the Radial/Rectangular radio buttons in the UI in Viewport mode. Available in 3ds Max 8 and higher.

Renderer - Radial Cross-Section

<Arc>.render_thickness Float default: 1.0 -- animatable; thickness

Get/Set the diameter of the Radial renderable spline mesh. Available in 3ds Max 8 and higher.

<Arc>.render_sides Integer default: 12 -- animatable; sides

Get/Set the number of sides for the spline mesh in the renderer. A value of 4 will give you a square cross section, for example. Available in 3ds Max 8 and higher.

<Arc>.render_angle Float default: 0.0 -- animatable; angle

Get/Set the rotational position of the Radial cross-section in the renderer. Available in 3ds Max 8 and higher.

Renderer - Rectangular Cross-Section

<Arc>.render_length Float default: 6.0 -- animatable

Get/Set the length of the Rectangular renderable spline mesh. Available in 3ds Max 8 and higher.

<Arc>.render_width Float default: 2.0 -- animatable

Get/Set the width of the Rectangular renderable spline mesh. Available in 3ds Max 8 and higher.

<Arc>.render_angle2 Float default: 0.0 -- animatable

Get/Set rotational position of the Radial cross-section in the renderer. Available in 3ds Max 8 and higher.

<Arc>.render_aspect_locked BooleanClass default: false -- boolean

Controls the state of the Aspect Lock checkbutton. When set to true, changing the Width will affect the Height and vice-versa, preserving the aspect at the time the lock was engaged. Available in 3ds Max 8 and higher.

Viewport - Radial Cross-Section

<Arc>.render_viewport_thickness Float default: 1.0 -- float; viewport_thickness

Get/Set the diameter of the Radial renderable spline mesh in the viewport. Available in 3ds Max 8 and higher.

<Arc>.render_viewport_sides Integer default: 12 -- integer; viewport_sides

Gets/Sets the number of sides for the Radial spline mesh in the viewports. A value of 4 will give you a square cross section, for example. Available in 3ds Max 8 and higher.

<Arc>.render_viewport_angle Float default: 0.0 -- float; viewport_angle

Gets/Sets the rotational position of the cross-section in the viewports. Available in 3ds Max 8 and higher.

Viewport - Rectangular Cross-Section

<Arc>.render_viewport_length Float default: 6.0 -- float

Get/Set the length of the Rectangular spline mesh in the viewports. Available in 3ds Max 8 and higher.

<Arc>.render_viewport_width Float default: 2.0 -- float

Get/Set the width of the Rectangular spline mesh in the viewports. Available in 3ds Max 8 and higher.

<Arc>.render_viewport_angle2 Float default: 0.0 -- float

Get/Set rotational position of the Rectangular cross-section in the viewports. Available in 3ds Max 8 and higher.

<Arc>.render_viewport_aspect_locked BooleanClass default: false -- boolean

Controls the state of the Aspect Lock checkbutton. When set to true, changing the Width will affect the Height and vice-versa, preserving the aspect at the time the lock was engaged. Available in 3ds Max 8 and higher.

Auto Smooth

<Arc>.render_auto_smooth BooleanClass default: true -- boolean

Controls the state of the Auto Smooth checkbox. When set to true, auto smoothing will be enabled. Available in 3ds Max 8 and higher.

<Arc>.render_threshold Float default: 40.0 -- animatable;

Get/set the Auto Smooth Threshold value. Available in 3ds Max 8 and higher.

See also

Spline Shape Common Properties, Operators, and Methods

Shape Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Circle : Shape

Circle - superclass: shape; super-superclass:node - classID: #(6553, 0)

Value > MAXWrapper > Node > GeometryClass > Shape > Circle

Constructor

circle ...

Properties

Parameters Rollout

<Circle>.radius       Float default: 25.0 -- animatable

The radius of the circle.

Interpolation Rollout

<Circle>.steps       Integer default: 6

The number of divisions between each vertex.

<Circle>.optimize       Boolean default: true

When on, removes unneeded steps from straight segments in the spline.

<Circle>.adaptive       Boolean default: false

When on, adaptive sets the number of steps for each spline to produce a smooth curve. Straight segments always receive 0 steps.

Rendering Rollout

<Circle>.render_renderable BooleanClass default: false -- boolean; renderable

Toggles the "Enable in Renderer" checkbox on and off. Available in 3ds Max 8 and higher.

<Circle>.render_displayRenderMesh BooleanClass default: false -- boolean; displayRenderMesh

Toggles the "Enable In Viewport" checkbox on and off. When set to true, the mesh will be displayed in the viewports. Available in 3ds Max 8 and higher.

<Circle>.render_useViewportSettings BooleanClass default: false -- boolean; useViewportSettings

Toggles the "Use Viewport Settings" checkbox on and off. When set to true, the mesh displayed in the viewport will use the Viewport settings. When false, the Renderer settings will be used for the viewport mesh, too. Available in 3ds Max 8 and higher.

<Circle>.render_mapcoords BooleanClass default: false -- boolean; mapcoords

Toggles mapping coordinates generation on and off. The U coordinate wraps once around the thickness of the spline; the V coordinate is mapped once along the length of the spline. Available in 3ds Max 8 and higher.

<Circle>.realWorldMapSize BooleanClass default: false -- boolean

Toggles the real-world map size option on and off. Available in 3ds Max 8 and higher.

<Circle>.render_displayRenderSettings BooleanClass default: true -- boolean; displayRenderSettings

Toggles the state of the Viewport/Renderer radio buttons. When set to true, the Renderer settings will be displayed in the rollout. When false, the Viewport settings will be shown instead. Available in 3ds Max 8 and higher.

<Circle>.render_rectangular BooleanClass default: false -- boolean

When set to true, enables the Rectangular cross-section mode to be used in the renderer. When false (default), enables the Radial cross-section mode. Corresponds to the Radial/Rectangular radio buttons in the UI in Renderer mode. Available in 3ds Max 8 and higher.

<Circle>.render_viewport_rectangular BooleanClass default: false -- boolean

When set to true, enables the Rectangular cross-section mode to be used in the viewports. When false (default), enables the Radial cross-section mode. Corresponds to the Radial/Rectangular radio buttons in the UI in Viewport mode. Available in 3ds Max 8 and higher.

Renderer - Radial Cross-Section

<Circle>.render_thickness Float default: 1.0 -- animatable; thickness

Get/Set the diameter of the Radial renderable spline mesh. Available in 3ds Max 8 and higher.

<Circle>.render_sides Integer default: 12 -- animatable; sides

Get/Set the number of sides for the spline mesh in the renderer. A value of 4 will give you a square cross section, for example. Available in 3ds Max 8 and higher.

<Circle>.render_angle Float default: 0.0 -- animatable; angle

Get/Set the rotational position of the Radial cross-section in the renderer. Available in 3ds Max 8 and higher.

Renderer - Rectangular Cross-Section

<Circle>.render_length Float default: 6.0 -- animatable

Get/Set the length of the Rectangular renderable spline mesh. Available in 3ds Max 8 and higher.

<Circle>.render_width Float default: 2.0 -- animatable

Get/Set the width of the Rectangular renderable spline mesh. Available in 3ds Max 8 and higher.

<Circle>.render_angle2 Float default: 0.0 -- animatable

Get/Set rotational position of the Radial cross-section in the renderer. Available in 3ds Max 8 and higher.

<Circle>.render_aspect_locked BooleanClass default: false -- boolean

Controls the state of the Aspect Lock checkbutton. When set to true, changing the Width will affect the Height and vice-versa, preserving the aspect at the time the lock was engaged. Available in 3ds Max 8 and higher.

Viewport - Radial Cross-Section

<Circle>.render_viewport_thickness Float default: 1.0 -- float; viewport_thickness

Get/Set the diameter of the Radial renderable spline mesh in the viewport. Available in 3ds Max 8 and higher.

<Circle>.render_viewport_sides Integer default: 12 -- integer; viewport_sides

Gets/Sets the number of sides for the Radial spline mesh in the viewports. A value of 4 will give you a square cross section, for example. Available in 3ds Max 8 and higher.

<Circle>.render_viewport_angle Float default: 0.0 -- float; viewport_angle

Gets/Sets the rotational position of the cross-section in the viewports. Available in 3ds Max 8 and higher.

Viewport - Rectangular Cross-Section

<Circle>.render_viewport_length Float default: 6.0 -- float

Get/Set the length of the Rectangular spline mesh in the viewports. Available in 3ds Max 8 and higher.

<Circle>.render_viewport_width Float default: 2.0 -- float

Get/Set the width of the Rectangular spline mesh in the viewports. Available in 3ds Max 8 and higher.

<Circle>.render_viewport_angle2 Float default: 0.0 -- float

Get/Set rotational position of the Rectangular cross-section in the viewports. Available in 3ds Max 8 and higher.

<Circle>.render_viewport_aspect_locked BooleanClass default: false -- boolean

Controls the state of the Aspect Lock checkbutton. When set to true, changing the Width will affect the Height and vice-versa, preserving the aspect at the time the lock was engaged. Available in 3ds Max 8 and higher.

Auto Smooth

<Circle>.render_auto_smooth BooleanClass default: true -- boolean

Controls the state of the Auto Smooth checkbox. When set to true, auto smoothing will be enabled. Available in 3ds Max 8 and higher.

<Circle>.render_threshold Float default: 40.0 -- animatable;

Get/set the Auto Smooth Threshold value. Available in 3ds Max 8 and higher.

See also

Spline Shape Common Properties, Operators, and Methods

Shape Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Donut : Shape

Donut - superclass: shape; super-superclass:node - classID: #(4192, 0)

Value > MAXWrapper > Node > GeometryClass > Shape > Donut

Constructor

donut ...

Properties

Parameters Rollout

<Donut>.radius1       Float default: 35.0 -- animatable

Sets the radius of the first circle.

<Donut>.radius2       Float default: 25.0 -- animatable

Sets the radius of the second circle.

Interpolation Rollout

<Donut>.steps       Integer default: 6

The number of divisions between each vertex.

<Donut>.optimize       Boolean default: true

When on, removes unneeded steps from straight segments in the spline

<Donut>.adaptive       Boolean default: false

When on, adaptive sets the number of steps for each spline to produce a smooth curve. Straight segments always receive 0 steps.

Rendering Rollout

<Donut>.render_renderable BooleanClass default: false -- boolean; renderable

Toggles the "Enable in Renderer" checkbox on and off. Available in 3ds Max 8 and higher.

<Donut>.render_displayRenderMesh BooleanClass default: false -- boolean; displayRenderMesh

Toggles the "Enable In Viewport" checkbox on and off. When set to true, the mesh will be displayed in the viewports. Available in 3ds Max 8 and higher.

<Donut>.render_useViewportSettings BooleanClass default: false -- boolean; useViewportSettings

Toggles the "Use Viewport Settings" checkbox on and off. When set to true, the mesh displayed in the viewport will use the Viewport settings. When false, the Renderer settings will be used for the viewport mesh, too. Available in 3ds Max 8 and higher.

<Donut>.render_mapcoords BooleanClass default: false -- boolean; mapcoords

Toggles mapping coordinates generation on and off. The U coordinate wraps once around the thickness of the spline; the V coordinate is mapped once along the length of the spline. Available in 3ds Max 8 and higher.

<Donut>.realWorldMapSize BooleanClass default: false -- boolean

Toggles the real-world map size option on and off. Available in 3ds Max 8 and higher.

<Donut>.render_displayRenderSettings BooleanClass default: true -- boolean; displayRenderSettings

Toggles the state of the Viewport/Renderer radio buttons. When set to true, the Renderer settings will be displayed in the rollout. When false, the Viewport settings will be shown instead. Available in 3ds Max 8 and higher.

<Donut>.render_rectangular BooleanClass default: false -- boolean

When set to true, enables the Rectangular cross-section mode to be used in the renderer. When false (default), enables the Radial cross-section mode. Corresponds to the Radial/Rectangular radio buttons in the UI in Renderer mode. Available in 3ds Max 8 and higher.

<Donut>.render_viewport_rectangular BooleanClass default: false -- boolean

When set to true, enables the Rectangular cross-section mode to be used in the viewports. When false (default), enables the Radial cross-section mode. Corresponds to the Radial/Rectangular radio buttons in the UI in Viewport mode. Available in 3ds Max 8 and higher.

Renderer - Radial Cross-Section

<Donut>.render_thickness Float default: 1.0 -- animatable; thickness

Get/Set the diameter of the Radial renderable spline mesh. Available in 3ds Max 8 and higher.

<Donut>.render_sides Integer default: 12 -- animatable; sides

Get/Set the number of sides for the spline mesh in the renderer. A value of 4 will give you a square cross section, for example. Available in 3ds Max 8 and higher.

<Donut>.render_angle Float default: 0.0 -- animatable; angle

Get/Set the rotational position of the Radial cross-section in the renderer. Available in 3ds Max 8 and higher.

Renderer - Rectangular Cross-Section

<Donut>.render_length Float default: 6.0 -- animatable

Get/Set the length of the Rectangular renderable spline mesh. Available in 3ds Max 8 and higher.

<Donut>.render_width Float default: 2.0 -- animatable

Get/Set the width of the Rectangular renderable spline mesh. Available in 3ds Max 8 and higher.

<Donut>.render_angle2 Float default: 0.0 -- animatable

Get/Set rotational position of the Radial cross-section in the renderer. Available in 3ds Max 8 and higher.

<Donut>.render_aspect_locked BooleanClass default: false -- boolean

Controls the state of the Aspect Lock checkbutton. When set to true, changing the Width will affect the Height and vice-versa, preserving the aspect at the time the lock was engaged. Available in 3ds Max 8 and higher.

Viewport - Radial Cross-Section

<Donut>.render_viewport_thickness Float default: 1.0 -- float; viewport_thickness

Get/Set the diameter of the Radial renderable spline mesh in the viewport. Available in 3ds Max 8 and higher.

<Donut>.render_viewport_sides Integer default: 12 -- integer; viewport_sides

Gets/Sets the number of sides for the Radial spline mesh in the viewports. A value of 4 will give you a square cross section, for example. Available in 3ds Max 8 and higher.

<Donut>.render_viewport_angle Float default: 0.0 -- float; viewport_angle

Gets/Sets the rotational position of the cross-section in the viewports. Available in 3ds Max 8 and higher.

Viewport - Rectangular Cross-Section

<Donut>.render_viewport_length Float default: 6.0 -- float

Get/Set the length of the Rectangular spline mesh in the viewports. Available in 3ds Max 8 and higher.

<Donut>.render_viewport_width Float default: 2.0 -- float

Get/Set the width of the Rectangular spline mesh in the viewports. Available in 3ds Max 8 and higher.

<Donut>.render_viewport_angle2 Float default: 0.0 -- float

Get/Set rotational position of the Rectangular cross-section in the viewports. Available in 3ds Max 8 and higher.

<Donut>.render_viewport_aspect_locked BooleanClass default: false -- boolean

Controls the state of the Aspect Lock checkbutton. When set to true, changing the Width will affect the Height and vice-versa, preserving the aspect at the time the lock was engaged. Available in 3ds Max 8 and higher.

Auto Smooth

<Donut>.render_auto_smooth BooleanClass default: true -- boolean

Controls the state of the Auto Smooth checkbox. When set to true, auto smoothing will be enabled. Available in 3ds Max 8 and higher.

<Donut>.render_threshold Float default: 40.0 -- animatable;

Get/set the Auto Smooth Threshold value. Available in 3ds Max 8 and higher.

See also

Spline Shape Common Properties, Operators, and Methods

Shape Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Ellipse : Shape

Ellipse - superclass: shape; super-superclass:node - classID: #(4247, 0)

Value > MAXWrapper > Node > GeometryClass > Shape >Ellipse

Constructor

ellipse ...

Properties

Parameters Rollout

<Ellipse>.length     Float default: 25.0 -- animatable

The size of the Ellipse along the local Y axis.

<Ellipse>.width      Float default: 35.0 -- animatable

The size of the Ellipse local X axis.

Interpolation Rollout

<Ellipse>.steps      Integer default: 6

The number of divisions between each vertex.

<Ellipse>.optimize      Boolean default: true

When on, removes unneeded steps from straight segments in the spline.

<Ellipse>.adaptive      Boolean default: false

When on, Adaptive sets the number of steps for each spline to produce a smooth curve. Straight segments always receive 0 steps.

Rendering Rollout

<Ellipse>.render_renderable BooleanClass default: false -- boolean; renderable

Toggles the "Enable in Renderer" checkbox on and off. Available in 3ds Max 8 and higher.

<Ellipse>.render_displayRenderMesh BooleanClass default: false -- boolean; displayRenderMesh

Toggles the "Enable In Viewport" checkbox on and off. When set to true, the mesh will be displayed in the viewports. Available in 3ds Max 8 and higher.

<Ellipse>.render_useViewportSettings BooleanClass default: false -- boolean; useViewportSettings

Toggles the "Use Viewport Settings" checkbox on and off. When set to true, the mesh displayed in the viewport will use the Viewport settings. When false, the Renderer settings will be used for the viewport mesh, too. Available in 3ds Max 8 and higher.

<Ellipse>.render_mapcoords BooleanClass default: false -- boolean; mapcoords

Toggles mapping coordinates generation on and off. The U coordinate wraps once around the thickness of the spline; the V coordinate is mapped once along the length of the spline. Available in 3ds Max 8 and higher.

<Ellipse>.realWorldMapSize BooleanClass default: false -- boolean

Toggles the real-world map size option on and off. Available in 3ds Max 8 and higher.

<Ellipse>.render_displayRenderSettings BooleanClass default: true -- boolean; displayRenderSettings

Toggles the state of the Viewport/Renderer radio buttons. When set to true, the Renderer settings will be displayed in the rollout. When false, the Viewport settings will be shown instead. Available in 3ds Max 8 and higher.

<Ellipse>.render_rectangular BooleanClass default: false -- boolean

When set to true, enables the Rectangular cross-section mode to be used in the renderer. When false (default), enables the Radial cross-section mode. Corresponds to the Radial/Rectangular radio buttons in the UI in Renderer mode. Available in 3ds Max 8 and higher.

<Ellipse>.render_viewport_rectangular BooleanClass default: false -- boolean

When set to true, enables the Rectangular cross-section mode to be used in the viewports. When false (default), enables the Radial cross-section mode. Corresponds to the Radial/Rectangular radio buttons in the UI in Viewport mode. Available in 3ds Max 8 and higher.

Renderer - Radial Cross-Section

<Ellipse>.render_thickness Float default: 1.0 -- animatable; thickness

Get/Set the diameter of the Radial renderable spline mesh. Available in 3ds Max 8 and higher.

<Ellipse>.render_sides Integer default: 12 -- animatable; sides

Get/Set the number of sides for the spline mesh in the renderer. A value of 4 will give you a square cross section, for example. Available in 3ds Max 8 and higher.

<Ellipse>.render_angle Float default: 0.0 -- animatable; angle

Get/Set the rotational position of the Radial cross-section in the renderer. Available in 3ds Max 8 and higher.

Renderer - Rectangular Cross-Section

<Ellipse>.render_length Float default: 6.0 -- animatable

Get/Set the length of the Rectangular renderable spline mesh. Available in 3ds Max 8 and higher.

<Ellipse>.render_width Float default: 2.0 -- animatable

Get/Set the width of the Rectangular renderable spline mesh. Available in 3ds Max 8 and higher.

<Ellipse>.render_angle2 Float default: 0.0 -- animatable

Get/Set rotational position of the Radial cross-section in the renderer. Available in 3ds Max 8 and higher.

<Ellipse>.render_aspect_locked BooleanClass default: false -- boolean

Controls the state of the Aspect Lock checkbutton. When set to true, changing the Width will affect the Height and vice-versa, preserving the aspect at the time the lock was engaged. Available in 3ds Max 8 and higher.

Viewport - Radial Cross-Section

<Ellipse>.render_viewport_thickness Float default: 1.0 -- float; viewport_thickness

Get/Set the diameter of the Radial renderable spline mesh in the viewport. Available in 3ds Max 8 and higher.

<Ellipse>.render_viewport_sides Integer default: 12 -- integer; viewport_sides

Gets/Sets the number of sides for the Radial spline mesh in the viewports. A value of 4 will give you a square cross section, for example. Available in 3ds Max 8 and higher.

<Ellipse>.render_viewport_angle Float default: 0.0 -- float; viewport_angle

Gets/Sets the rotational position of the cross-section in the viewports. Available in 3ds Max 8 and higher.

Viewport - Rectangular Cross-Section

<Ellipse>.render_viewport_length Float default: 6.0 -- float

Get/Set the length of the Rectangular spline mesh in the viewports. Available in 3ds Max 8 and higher.

<Ellipse>.render_viewport_width Float default: 2.0 -- float

Get/Set the width of the Rectangular spline mesh in the viewports. Available in 3ds Max 8 and higher.

<Ellipse>.render_viewport_angle2 Float default: 0.0 -- float

Get/Set rotational position of the Rectangular cross-section in the viewports. Available in 3ds Max 8 and higher.

<Ellipse>.render_viewport_aspect_locked BooleanClass default: false -- boolean

Controls the state of the Aspect Lock checkbutton. When set to true, changing the Width will affect the Height and vice-versa, preserving the aspect at the time the lock was engaged. Available in 3ds Max 8 and higher.

Auto Smooth

<Ellipse>.render_auto_smooth BooleanClass default: true -- boolean

Controls the state of the Auto Smooth checkbox. When set to true, auto smoothing will be enabled. Available in 3ds Max 8 and higher.

<Ellipse>.render_threshold Float default: 40.0 -- animatable;

Get/set the Auto Smooth Threshold value. Available in 3ds Max 8 and higher.

See also

Spline Shape Common Properties, Operators, and Methods

Shape Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Helix : Shape

Helix - superclass: shape; super-superclass:node - classID: #(6548, 0)

Value > MAXWrapper > Node > GeometryClass > Shape >Helix

Constructor

helix ...

Properties

Parameters Rollout

<Helix>.radius1     Float default: 35.0 -- animatable

The radius for the Helix start.

<Helix>.radius2     Float default: 15.0 -- animatable

The radius for the Helix end.

<Helix>.height     Float default: 25.0 -- animatable

The height of the Helix.

<Helix>.turns     Float default: 2.0 -- animatable

The number of turns the Helix makes between its start and end points.

<Helix>.bias     Float default: 0.0 -- animatable

Forces the turns to accumulate at one end of the helix. A bias of -1.0 forces the turns towards the start of the helix, a bias of 0.0 evenly distributes the turns between the ends, and a bias of 1.0 forces the turns towards the end of the helix.

<Helix>.direction     Integer default: 0

Set the direction the helix turns:

0- Clockwise

1- Counterclockwise

Rendering Rollout

<Helix>.render_renderable BooleanClass default: false -- boolean; renderable

Toggles the "Enable in Renderer" checkbox on and off. Available in 3ds Max 8 and higher.

<Helix>.render_displayRenderMesh BooleanClass default: false -- boolean; displayRenderMesh

Toggles the "Enable In Viewport" checkbox on and off. When set to true, the mesh will be displayed in the viewports. Available in 3ds Max 8 and higher.

<Helix>.render_useViewportSettings BooleanClass default: false -- boolean; useViewportSettings

Toggles the "Use Viewport Settings" checkbox on and off. When set to true, the mesh displayed in the viewport will use the Viewport settings. When false, the Renderer settings will be used for the viewport mesh, too. Available in 3ds Max 8 and higher.

<Helix>.render_mapcoords BooleanClass default: false -- boolean; mapcoords

Toggles mapping coordinates generation on and off. The U coordinate wraps once around the thickness of the spline; the V coordinate is mapped once along the length of the spline. Available in 3ds Max 8 and higher.

<Helix>.realWorldMapSize BooleanClass default: false -- boolean

Toggles the real-world map size option on and off. Available in 3ds Max 8 and higher.

<Helix>.render_displayRenderSettings BooleanClass default: true -- boolean; displayRenderSettings

Toggles the state of the Viewport/Renderer radio buttons. When set to true, the Renderer settings will be displayed in the rollout. When false, the Viewport settings will be shown instead. Available in 3ds Max 8 and higher.

<Helix>.render_rectangular BooleanClass default: false -- boolean

When set to true, enables the Rectangular cross-section mode to be used in the renderer. When false (default), enables the Radial cross-section mode. Corresponds to the Radial/Rectangular radio buttons in the UI in Renderer mode. Available in 3ds Max 8 and higher.

<Helix>.render_viewport_rectangular BooleanClass default: false -- boolean

When set to true, enables the Rectangular cross-section mode to be used in the viewports. When false (default), enables the Radial cross-section mode. Corresponds to the Radial/Rectangular radio buttons in the UI in Viewport mode. Available in 3ds Max 8 and higher.

Renderer - Radial Cross-Section

<Helix>.render_thickness Float default: 1.0 -- animatable; thickness

Get/Set the diameter of the Radial renderable spline mesh. Available in 3ds Max 8 and higher.

<Helix>.render_sides Integer default: 12 -- animatable; sides

Get/Set the number of sides for the spline mesh in the renderer. A value of 4 will give you a square cross section, for example. Available in 3ds Max 8 and higher.

<Helix>.render_angle Float default: 0.0 -- animatable; angle

Get/Set the rotational position of the Radial cross-section in the renderer. Available in 3ds Max 8 and higher.

Renderer - Rectangular Cross-Section

<Helix>.render_length Float default: 6.0 -- animatable

Get/Set the length of the Rectangular renderable spline mesh. Available in 3ds Max 8 and higher.

<Helix>.render_width Float default: 2.0 -- animatable

Get/Set the width of the Rectangular renderable spline mesh. Available in 3ds Max 8 and higher.

<Helix>.render_angle2 Float default: 0.0 -- animatable

Get/Set rotational position of the Radial cross-section in the renderer. Available in 3ds Max 8 and higher.

<Helix>.render_aspect_locked BooleanClass default: false -- boolean

Controls the state of the Aspect Lock checkbutton. When set to true, changing the Width will affect the Height and vice-versa, preserving the aspect at the time the lock was engaged. Available in 3ds Max 8 and higher.

Viewport - Radial Cross-Section

<Helix>.render_viewport_thickness Float default: 1.0 -- float; viewport_thickness

Get/Set the diameter of the Radial renderable spline mesh in the viewport. Available in 3ds Max 8 and higher.

<Helix>.render_viewport_sides Integer default: 12 -- integer; viewport_sides

Gets/Sets the number of sides for the Radial spline mesh in the viewports. A value of 4 will give you a square cross section, for example. Available in 3ds Max 8 and higher.

<Helix>.render_viewport_angle Float default: 0.0 -- float; viewport_angle

Gets/Sets the rotational position of the cross-section in the viewports. Available in 3ds Max 8 and higher.

Viewport - Rectangular Cross-Section

<Helix>.render_viewport_length Float default: 6.0 -- float

Get/Set the length of the Rectangular spline mesh in the viewports. Available in 3ds Max 8 and higher.

<Helix>.render_viewport_width Float default: 2.0 -- float

Get/Set the width of the Rectangular spline mesh in the viewports. Available in 3ds Max 8 and higher.

<Helix>.render_viewport_angle2 Float default: 0.0 -- float

Get/Set rotational position of the Rectangular cross-section in the viewports. Available in 3ds Max 8 and higher.

<Helix>.render_viewport_aspect_locked BooleanClass default: false -- boolean

Controls the state of the Aspect Lock checkbutton. When set to true, changing the Width will affect the Height and vice-versa, preserving the aspect at the time the lock was engaged. Available in 3ds Max 8 and higher.

Auto Smooth

<Helix>.render_auto_smooth BooleanClass default: true -- boolean

Controls the state of the Auto Smooth checkbox. When set to true, auto smoothing will be enabled. Available in 3ds Max 8 and higher.

<Helix>.render_threshold Float default: 40.0 -- animatable;

Get/set the Auto Smooth Threshold value. Available in 3ds Max 8 and higher.

See also

Spline Shape Common Properties, Operators, and Methods

Shape Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Line : Shape

line - superclass: shape; super-superclass:node - classID: #(4160, 0)

Value > MAXWrapper > Node > GeometryClass > Shape >Line

Constructor

line ...

Properties

Interpolation Rollout

<Line>.steps      Integer default: 6

The number of divisions between each vertex.

<Line>.optimize      Boolean default: true

When on, removes unneeded steps from straight segments in the spline.

<Line>.adaptive      Boolean default: false

When on, adaptive sets the number of steps for each spline to produce a smooth curve. Straight segments always receive 0 steps.

Rendering Rollout

<Line>.render_renderable BooleanClass default: false -- boolean; renderable

Toggles the "Enable in Renderer" checkbox on and off. Available in 3ds Max 8 and higher.

<Line>.render_displayRenderMesh BooleanClass default: false -- boolean; displayRenderMesh

Toggles the "Enable In Viewport" checkbox on and off. When set to true, the mesh will be displayed in the viewports. Available in 3ds Max 8 and higher.

<Line>.render_useViewportSettings BooleanClass default: false -- boolean; useViewportSettings

Toggles the "Use Viewport Settings" checkbox on and off. When set to true, the mesh displayed in the viewport will use the Viewport settings. When false, the Renderer settings will be used for the viewport mesh, too. Available in 3ds Max 8 and higher.

<Line>.render_mapcoords BooleanClass default: false -- boolean; mapcoords

Toggles mapping coordinates generation on and off. The U coordinate wraps once around the thickness of the spline; the V coordinate is mapped once along the length of the spline. Available in 3ds Max 8 and higher.

<Line>.realWorldMapSize BooleanClass default: false -- boolean

Toggles the real-world map size option on and off. Available in 3ds Max 8 and higher.

<Line>.render_displayRenderSettings BooleanClass default: true -- boolean; displayRenderSettings

Toggles the state of the Viewport/Renderer radio buttons. When set to true, the Renderer settings will be displayed in the rollout. When false, the Viewport settings will be shown instead. Available in 3ds Max 8 and higher.

<Line>.render_rectangular BooleanClass default: false -- boolean

When set to true, enables the Rectangular cross-section mode to be used in the renderer. When false (default), enables the Radial cross-section mode. Corresponds to the Radial/Rectangular radio buttons in the UI in Renderer mode. Available in 3ds Max 8 and higher.

<Line>.render_viewport_rectangular BooleanClass default: false -- boolean

When set to true, enables the Rectangular cross-section mode to be used in the viewports. When false (default), enables the Radial cross-section mode. Corresponds to the Radial/Rectangular radio buttons in the UI in Viewport mode. Available in 3ds Max 8 and higher.

Renderer - Radial Cross-Section

<Line>.render_thickness Float default: 1.0 -- animatable; thickness

Get/Set the diameter of the Radial renderable spline mesh. Available in 3ds Max 8 and higher.

<Line>.render_sides Integer default: 12 -- animatable; sides

Get/Set the number of sides for the spline mesh in the renderer. A value of 4 will give you a square cross section, for example. Available in 3ds Max 8 and higher.

<Line>.render_angle Float default: 0.0 -- animatable; angle

Get/Set the rotational position of the Radial cross-section in the renderer. Available in 3ds Max 8 and higher.

Renderer - Rectangular Cross-Section

<Line>.render_length Float default: 6.0 -- animatable

Get/Set the length of the Rectangular renderable spline mesh. Available in 3ds Max 8 and higher.

<Line>.render_width Float default: 2.0 -- animatable

Get/Set the width of the Rectangular renderable spline mesh. Available in 3ds Max 8 and higher.

<Line>.render_angle2 Float default: 0.0 -- animatable

Get/Set rotational position of the Radial cross-section in the renderer. Available in 3ds Max 8 and higher.

<Line>.render_aspect_locked BooleanClass default: false -- boolean

Controls the state of the Aspect Lock checkbutton. When set to true, changing the Width will affect the Height and vice-versa, preserving the aspect at the time the lock was engaged. Available in 3ds Max 8 and higher.

Viewport - Radial Cross-Section

<Line>.render_viewport_thickness Float default: 1.0 -- float; viewport_thickness

Get/Set the diameter of the Radial renderable spline mesh in the viewport. Available in 3ds Max 8 and higher.

<Line>.render_viewport_sides Integer default: 12 -- integer; viewport_sides

Gets/Sets the number of sides for the Radial spline mesh in the viewports. A value of 4 will give you a square cross section, for example. Available in 3ds Max 8 and higher.

<Line>.render_viewport_angle Float default: 0.0 -- float; viewport_angle

Gets/Sets the rotational position of the cross-section in the viewports. Available in 3ds Max 8 and higher.

Viewport - Rectangular Cross-Section

<Line>.render_viewport_length Float default: 6.0 -- float

Get/Set the length of the Rectangular spline mesh in the viewports. Available in 3ds Max 8 and higher.

<Line>.render_viewport_width Float default: 2.0 -- float

Get/Set the width of the Rectangular spline mesh in the viewports. Available in 3ds Max 8 and higher.

<Line>.render_viewport_angle2 Float default: 0.0 -- float

Get/Set rotational position of the Rectangular cross-section in the viewports. Available in 3ds Max 8 and higher.

<Line>.render_viewport_aspect_locked BooleanClass default: false -- boolean

Controls the state of the Aspect Lock checkbutton. When set to true, changing the Width will affect the Height and vice-versa, preserving the aspect at the time the lock was engaged. Available in 3ds Max 8 and higher.

Auto Smooth

<Line>.render_auto_smooth BooleanClass default: true -- boolean

Controls the state of the Auto Smooth checkbox. When set to true, auto smoothing will be enabled. Available in 3ds Max 8 and higher.

<Line>.render_threshold Float default: 40.0 -- animatable;

Get/set the Auto Smooth Threshold value. Available in 3ds Max 8 and higher.

NOTE:

The Line shape is equivalent to a SplineShape shape.

All the properties and methods associated with SplineShape are also valid on a Line shape.

These properties and methods are described in SplineShape : Shape .

See also

Spline Shape Common Properties, Operators, and Methods

Shape Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


NGon : Shape

Ngon - superclass: shape; super-superclass:node - classID: #(4176, 0)

Value > MAXWrapper > Node > GeometryClass > Shape > NGon

Constructor

ngon ...

Properties

Parameters Rollout

<NGon>.radius    Float default: 25.0 -- animatable

The NGon radius.

<NGon>.scribe    Integer default: 0

Sets whether the NGon is:

0- Circumscribed (Radius is measured from the center to the sides of the NGon)

1- Inscribed (Radius is measured from the center to the corners of the NGon)

<NGon>.nSides    Integer default: 6 -- animatable

Number of sides and vertices used by the NGon.

<NGon>.corner_Radius    Float default: 0.0 -- animatable

Degree of rounding to apply to the corners of the NGon. A setting of 0 specifies a standard unrounded corner.

<NGon>.circular    Boolean default: true -- animatable

When on, specifies a circular NGon.

Interpolation Rollout

<NGon>.steps      Integer default: 6

The number of divisions between each vertex.

<NGon>.optimize      Boolean default: true

When on, removes unneeded steps from straight segments in the spline.

<NGon>.adaptive      Boolean default: false

When on, adaptive sets the number of steps for each spline to produce a smooth curve. Straight segments always receive 0 steps.

Rendering Rollout

<NGon>.render_renderable BooleanClass default: false -- boolean; renderable

Toggles the "Enable in Renderer" checkbox on and off. Available in 3ds Max 8 and higher.

<NGon>.render_displayRenderMesh BooleanClass default: false -- boolean; displayRenderMesh

Toggles the "Enable In Viewport" checkbox on and off. When set to true, the mesh will be displayed in the viewports. Available in 3ds Max 8 and higher.

<NGon>.render_useViewportSettings BooleanClass default: false -- boolean; useViewportSettings

Toggles the "Use Viewport Settings" checkbox on and off. When set to true, the mesh displayed in the viewport will use the Viewport settings. When false, the Renderer settings will be used for the viewport mesh, too. Available in 3ds Max 8 and higher.

<NGon>.render_mapcoords BooleanClass default: false -- boolean; mapcoords

Toggles mapping coordinates generation on and off. The U coordinate wraps once around the thickness of the spline; the V coordinate is mapped once along the length of the spline. Available in 3ds Max 8 and higher.

<NGon>.realWorldMapSize BooleanClass default: false -- boolean

Toggles the real-world map size option on and off. Available in 3ds Max 8 and higher.

<NGon>.render_displayRenderSettings BooleanClass default: true -- boolean; displayRenderSettings

Toggles the state of the Viewport/Renderer radio buttons. When set to true, the Renderer settings will be displayed in the rollout. When false, the Viewport settings will be shown instead. Available in 3ds Max 8 and higher.

<NGon>.render_rectangular BooleanClass default: false -- boolean

When set to true, enables the Rectangular cross-section mode to be used in the renderer. When false (default), enables the Radial cross-section mode. Corresponds to the Radial/Rectangular radio buttons in the UI in Renderer mode. Available in 3ds Max 8 and higher.

<NGon>.render_viewport_rectangular BooleanClass default: false -- boolean

When set to true, enables the Rectangular cross-section mode to be used in the viewports. When false (default), enables the Radial cross-section mode. Corresponds to the Radial/Rectangular radio buttons in the UI in Viewport mode. Available in 3ds Max 8 and higher.

Renderer - Radial Cross-Section

<NGon>.render_thickness Float default: 1.0 -- animatable; thickness

Get/Set the diameter of the Radial renderable spline mesh. Available in 3ds Max 8 and higher.

<NGon>.render_sides Integer default: 12 -- animatable; sides

Get/Set the number of sides for the spline mesh in the renderer. A value of 4 will give you a square cross section, for example. Available in 3ds Max 8 and higher.

<NGon>.render_angle Float default: 0.0 -- animatable; angle

Get/Set the rotational position of the Radial cross-section in the renderer. Available in 3ds Max 8 and higher.

Renderer - Rectangular Cross-Section

<NGon>.render_length Float default: 6.0 -- animatable

Get/Set the length of the Rectangular renderable spline mesh. Available in 3ds Max 8 and higher.

<NGon>.render_width Float default: 2.0 -- animatable

Get/Set the width of the Rectangular renderable spline mesh. Available in 3ds Max 8 and higher.

<NGon>.render_angle2 Float default: 0.0 -- animatable

Get/Set rotational position of the Radial cross-section in the renderer. Available in 3ds Max 8 and higher.

<NGon>.render_aspect_locked BooleanClass default: false -- boolean

Controls the state of the Aspect Lock checkbutton. When set to true, changing the Width will affect the Height and vice-versa, preserving the aspect at the time the lock was engaged. Available in 3ds Max 8 and higher.

Viewport - Radial Cross-Section

<NGon>.render_viewport_thickness Float default: 1.0 -- float; viewport_thickness

Get/Set the diameter of the Radial renderable spline mesh in the viewport. Available in 3ds Max 8 and higher.

<NGon>.render_viewport_sides Integer default: 12 -- integer; viewport_sides

Gets/Sets the number of sides for the Radial spline mesh in the viewports. A value of 4 will give you a square cross section, for example. Available in 3ds Max 8 and higher.

<NGon>.render_viewport_angle Float default: 0.0 -- float; viewport_angle

Gets/Sets the rotational position of the cross-section in the viewports. Available in 3ds Max 8 and higher.

Viewport - Rectangular Cross-Section

<NGon>.render_viewport_length Float default: 6.0 -- float

Get/Set the length of the Rectangular spline mesh in the viewports. Available in 3ds Max 8 and higher.

<NGon>.render_viewport_width Float default: 2.0 -- float

Get/Set the width of the Rectangular spline mesh in the viewports. Available in 3ds Max 8 and higher.

<NGon>.render_viewport_angle2 Float default: 0.0 -- float

Get/Set rotational position of the Rectangular cross-section in the viewports. Available in 3ds Max 8 and higher.

<NGon>.render_viewport_aspect_locked BooleanClass default: false -- boolean

Controls the state of the Aspect Lock checkbutton. When set to true, changing the Width will affect the Height and vice-versa, preserving the aspect at the time the lock was engaged. Available in 3ds Max 8 and higher.

Auto Smooth

<NGon>.render_auto_smooth BooleanClass default: true -- boolean

Controls the state of the Auto Smooth checkbox. When set to true, auto smoothing will be enabled. Available in 3ds Max 8 and higher.

<NGon>.render_threshold Float default: 40.0 -- animatable;

Get/set the Auto Smooth Threshold value. Available in 3ds Max 8 and higher.

See also

Spline Shape Common Properties, Operators, and Methods

Shape Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Rectangle : Shape

Rectangle - superclass: shape; super-superclass:node - classID: #(4197, 0)

Value > MAXWrapper > Node > GeometryClass > Shape > Rectangle

Constructor

rectangle ...

Properties

Parameters Rollout

<Rectangle>.length  Float default: 10.0 -- animatable

The size of the rectangle along the local Y axis.

<Rectangle>.width  Float default: 25.0 -- animatable

The size of the rectangle along the local X axis.

<Rectangle>.Corner_Radius  Float default: 0.0 -- animatable; alias: cornerRadius

Creates rounded corners. When set to 0, the rectangle contains 90-degree corners.

Interpolation Rollout

<Rectangle>.steps     Integer default: 6

The number of divisions between each vertex.

<Rectangle>.optimize     Boolean default: true

When on, removes unneeded steps from straight segments in the spline.

<Rectangle>.adaptive     Boolean default: false

When on, adaptive sets the number of steps for each spline to produce a smooth curve. Straight segments always receive 0 steps.

Rendering Rollout

<Rectangle>.render_renderable BooleanClass default: false -- boolean; renderable

Toggles the "Enable in Renderer" checkbox on and off. Available in 3ds Max 8 and higher.

<Rectangle>.render_displayRenderMesh BooleanClass default: false -- boolean; displayRenderMesh

Toggles the "Enable In Viewport" checkbox on and off. When set to true, the mesh will be displayed in the viewports. Available in 3ds Max 8 and higher.

<Rectangle>.render_useViewportSettings BooleanClass default: false -- boolean; useViewportSettings

Toggles the "Use Viewport Settings" checkbox on and off. When set to true, the mesh displayed in the viewport will use the Viewport settings. When false, the Renderer settings will be used for the viewport mesh, too. Available in 3ds Max 8 and higher.

<Rectangle>.render_mapcoords BooleanClass default: false -- boolean; mapcoords

Toggles mapping coordinates generation on and off. The U coordinate wraps once around the thickness of the spline; the V coordinate is mapped once along the length of the spline. Available in 3ds Max 8 and higher.

<Rectangle>.realWorldMapSize BooleanClass default: false -- boolean

Toggles the real-world map size option on and off. Available in 3ds Max 8 and higher.

<Rectangle>.render_displayRenderSettings BooleanClass default: true -- boolean; displayRenderSettings

Toggles the state of the Viewport/Renderer radio buttons. When set to true, the Renderer settings will be displayed in the rollout. When false, the Viewport settings will be shown instead. Available in 3ds Max 8 and higher.

<Rectangle>.render_rectangular BooleanClass default: false -- boolean

When set to true, enables the Rectangular cross-section mode to be used in the renderer. When false (default), enables the Radial cross-section mode. Corresponds to the Radial/Rectangular radio buttons in the UI in Renderer mode. Available in 3ds Max 8 and higher.

<Rectangle>.render_viewport_rectangular BooleanClass default: false -- boolean

When set to true, enables the Rectangular cross-section mode to be used in the viewports. When false (default), enables the Radial cross-section mode. Corresponds to the Radial/Rectangular radio buttons in the UI in Viewport mode. Available in 3ds Max 8 and higher.

Renderer - Radial Cross-Section

<Rectangle>.render_thickness Float default: 1.0 -- animatable; thickness

Get/Set the diameter of the Radial renderable spline mesh. Available in 3ds Max 8 and higher.

<Rectangle>.render_sides Integer default: 12 -- animatable; sides

Get/Set the number of sides for the spline mesh in the renderer. A value of 4 will give you a square cross section, for example. Available in 3ds Max 8 and higher.

<Rectangle>.render_angle Float default: 0.0 -- animatable; angle

Get/Set the rotational position of the Radial cross-section in the renderer. Available in 3ds Max 8 and higher.

Renderer - Rectangular Cross-Section

<Rectangle>.render_length Float default: 6.0 -- animatable

Get/Set the length of the Rectangular renderable spline mesh. Available in 3ds Max 8 and higher.

<Rectangle>.render_width Float default: 2.0 -- animatable

Get/Set the width of the Rectangular renderable spline mesh. Available in 3ds Max 8 and higher.

<Rectangle>.render_angle2 Float default: 0.0 -- animatable

Get/Set rotational position of the Radial cross-section in the renderer. Available in 3ds Max 8 and higher.

<Rectangle>.render_aspect_locked BooleanClass default: false -- boolean

Controls the state of the Aspect Lock checkbutton. When set to true, changing the Width will affect the Height and vice-versa, preserving the aspect at the time the lock was engaged. Available in 3ds Max 8 and higher.

Viewport - Radial Cross-Section

<Rectangle>.render_viewport_thickness Float default: 1.0 -- float; viewport_thickness

Get/Set the diameter of the Radial renderable spline mesh in the viewport. Available in 3ds Max 8 and higher.

<Rectangle>.render_viewport_sides Integer default: 12 -- integer; viewport_sides

Gets/Sets the number of sides for the Radial spline mesh in the viewports. A value of 4 will give you a square cross section, for example. Available in 3ds Max 8 and higher.

<Rectangle>.render_viewport_angle Float default: 0.0 -- float; viewport_angle

Gets/Sets the rotational position of the cross-section in the viewports. Available in 3ds Max 8 and higher.

Viewport - Rectangular Cross-Section

<Rectangle>.render_viewport_length Float default: 6.0 -- float

Get/Set the length of the Rectangular spline mesh in the viewports. Available in 3ds Max 8 and higher.

<Rectangle>.render_viewport_width Float default: 2.0 -- float

Get/Set the width of the Rectangular spline mesh in the viewports. Available in 3ds Max 8 and higher.

<Rectangle>.render_viewport_angle2 Float default: 0.0 -- float

Get/Set rotational position of the Rectangular cross-section in the viewports. Available in 3ds Max 8 and higher.

<Rectangle>.render_viewport_aspect_locked BooleanClass default: false -- boolean

Controls the state of the Aspect Lock checkbutton. When set to true, changing the Width will affect the Height and vice-versa, preserving the aspect at the time the lock was engaged. Available in 3ds Max 8 and higher.

Auto Smooth

<Rectangle>.render_auto_smooth BooleanClass default: true -- boolean

Controls the state of the Auto Smooth checkbox. When set to true, auto smoothing will be enabled. Available in 3ds Max 8 and higher.

<Rectangle>.render_threshold Float default: 40.0 -- animatable;

Get/set the Auto Smooth Threshold value. Available in 3ds Max 8 and higher.

See also

Spline Shape Common Properties, Operators, and Methods

Shape Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


section - superclass: shape

Section : Shape

section - superclass: shape; super-superclass:node - 13:0 - classID: #(549004141, 1725569194)

Value > MAXWrapper > Node > GeometryClass > Shape >Section

Constructor

section ...

Properties

Section Size Rollout

<section>.length Float default: 0.0 -- animatable

The length of the displayed section rectangle.

<section>.width Float default: 0.0 -- animatable

The width of the displayed section rectangle.

KNOWN PROBLEMS AND WORKAROUNDS:

Sometimes, the Section shape might not be able to properly collapse to a SplineShape. This only happens when a Section shape is created inside a loop and is being converted to a SplineShape.

To collapse to a SplineShape, a viewport redraw must be performed after the Section shape is created.

An example of creating contour lines from an object is shown below:

EXAMPLE

meshSelected = sphere() -- object to create contours of

minZ = meshSelected.min.z -- get min and max Z positions

maxZ = meshSelected.max.z

numLevels = 10 -- the number of contours

delta = (maxZ - minZ) / (numLevels + 1) -- the number of steps

for currentZ = minZ to maxZ by delta do -- start loop...

(

s = section pos:[0, 0, currentZ] -- create Section

max views redraw -- this line is needed to get around the problem

convertToSplineShape s -- convert Section to SplineShape

s.renderable = true -- set to renderable

)

See also

Spline Shape Common Properties, Operators, and Methods

Shape Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Star : Shape

Star - superclass: shape; super-superclass:node - classID: #(6549, 0)

Value > MAXWrapper > Node > GeometryClass > Shape > Star

Constructor

star ...

Properties

Parameters Rollout

<Star>.radius1  Float default: 25.0 -- alias: Radius_1

The radius of the inner vertices of the star.

<Star>.radius2  Float default: 12.0 -- alias: Radius_2

The radius of the outer vertices of the star.

<Star>.points  Integer default: 6 -- alias: numPoints

The number of points on the star. The valid range is from 3 to 100.

NOTE:

In order to access the points property for Star, you need to access the property via the baseobject property of the node. This is because points is also a property name for all nodes, and conflicts with the Star's points property.

FOR EXAMPLE:

MyStar.baseobject.points=10 -- set number of Star points to 10

<Star>.distort  Float default: 0.0 -- alias: Distortion

Rotates the outer vertices about the center of the star. This produces a saw-tooth affect.

<Star>.fillet1      Float   default: 0.0

Rounds the inner vertices (the valleys) of the star.

<Star>.fillet2      Float   default: 0.0

Rounds the outer vertices (the points) of the star.

Interpolation Rollout

<Star>.steps     Integer default: 6

The number of divisions between each vertex.

<Star>.optimize     Boolean default: true

When on, removes unneeded steps from straight segments in the spline.

<Star>.adaptive     Boolean default: false

When on, adaptive sets the number of steps for each spline to produce a smooth curve. Straight segments always receive 0 steps.

Rendering Rollout

<Star>.render_renderable BooleanClass default: false -- boolean; renderable

Toggles the "Enable in Renderer" checkbox on and off. Available in 3ds Max 8 and higher.

<Star>.render_displayRenderMesh BooleanClass default: false -- boolean; displayRenderMesh

Toggles the "Enable In Viewport" checkbox on and off. When set to true, the mesh will be displayed in the viewports. Available in 3ds Max 8 and higher.

<Star>.render_useViewportSettings BooleanClass default: false -- boolean; useViewportSettings

Toggles the "Use Viewport Settings" checkbox on and off. When set to true, the mesh displayed in the viewport will use the Viewport settings. When false, the Renderer settings will be used for the viewport mesh, too. Available in 3ds Max 8 and higher.

<Star>.render_mapcoords BooleanClass default: false -- boolean; mapcoords

Toggles mapping coordinates generation on and off. The U coordinate wraps once around the thickness of the spline; the V coordinate is mapped once along the length of the spline. Available in 3ds Max 8 and higher.

<Star>.realWorldMapSize BooleanClass default: false -- boolean

Toggles the real-world map size option on and off. Available in 3ds Max 8 and higher.

<Star>.render_displayRenderSettings BooleanClass default: true -- boolean; displayRenderSettings

Toggles the state of the Viewport/Renderer radio buttons. When set to true, the Renderer settings will be displayed in the rollout. When false, the Viewport settings will be shown instead. Available in 3ds Max 8 and higher.

<Star>.render_rectangular BooleanClass default: false -- boolean

When set to true, enables the Rectangular cross-section mode to be used in the renderer. When false (default), enables the Radial cross-section mode. Corresponds to the Radial/Rectangular radio buttons in the UI in Renderer mode. Available in 3ds Max 8 and higher.

<Star>.render_viewport_rectangular BooleanClass default: false -- boolean

When set to true, enables the Rectangular cross-section mode to be used in the viewports. When false (default), enables the Radial cross-section mode. Corresponds to the Radial/Rectangular radio buttons in the UI in Viewport mode. Available in 3ds Max 8 and higher.

Renderer - Radial Cross-Section

<Star>.render_thickness Float default: 1.0 -- animatable; thickness

Get/Set the diameter of the Radial renderable spline mesh. Available in 3ds Max 8 and higher.

<Star>.render_sides Integer default: 12 -- animatable; sides

Get/Set the number of sides for the spline mesh in the renderer. A value of 4 will give you a square cross section, for example. Available in 3ds Max 8 and higher.

<Star>.render_angle Float default: 0.0 -- animatable; angle

Get/Set the rotational position of the Radial cross-section in the renderer. Available in 3ds Max 8 and higher.

Renderer - Rectangular Cross-Section

<Star>.render_length Float default: 6.0 -- animatable

Get/Set the length of the Rectangular renderable spline mesh. Available in 3ds Max 8 and higher.

<Star>.render_width Float default: 2.0 -- animatable

Get/Set the width of the Rectangular renderable spline mesh. Available in 3ds Max 8 and higher.

<Star>.render_angle2 Float default: 0.0 -- animatable

Get/Set rotational position of the Radial cross-section in the renderer. Available in 3ds Max 8 and higher.

<Star>.render_aspect_locked BooleanClass default: false -- boolean

Controls the state of the Aspect Lock checkbutton. When set to true, changing the Width will affect the Height and vice-versa, preserving the aspect at the time the lock was engaged. Available in 3ds Max 8 and higher.

Viewport - Radial Cross-Section

<Star>.render_viewport_thickness Float default: 1.0 -- float; viewport_thickness

Get/Set the diameter of the Radial renderable spline mesh in the viewport. Available in 3ds Max 8 and higher.

<Star>.render_viewport_sides Integer default: 12 -- integer; viewport_sides

Gets/Sets the number of sides for the Radial spline mesh in the viewports. A value of 4 will give you a square cross section, for example. Available in 3ds Max 8 and higher.

<Star>.render_viewport_angle Float default: 0.0 -- float; viewport_angle

Gets/Sets the rotational position of the cross-section in the viewports. Available in 3ds Max 8 and higher.

Viewport - Rectangular Cross-Section

<Star>.render_viewport_length Float default: 6.0 -- float

Get/Set the length of the Rectangular spline mesh in the viewports. Available in 3ds Max 8 and higher.

<Star>.render_viewport_width Float default: 2.0 -- float

Get/Set the width of the Rectangular spline mesh in the viewports. Available in 3ds Max 8 and higher.

<Star>.render_viewport_angle2 Float default: 0.0 -- float

Get/Set rotational position of the Rectangular cross-section in the viewports. Available in 3ds Max 8 and higher.

<Star>.render_viewport_aspect_locked BooleanClass default: false -- boolean

Controls the state of the Aspect Lock checkbutton. When set to true, changing the Width will affect the Height and vice-versa, preserving the aspect at the time the lock was engaged. Available in 3ds Max 8 and higher.

Auto Smooth

<Star>.render_auto_smooth BooleanClass default: true -- boolean

Controls the state of the Auto Smooth checkbox. When set to true, auto smoothing will be enabled. Available in 3ds Max 8 and higher.

<Star>.render_threshold Float default: 40.0 -- animatable;

Get/set the Auto Smooth Threshold value. Available in 3ds Max 8 and higher.

See also

Spline Shape Common Properties, Operators, and Methods

Shape Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Text : Shape

text - superclass: shape; super-superclass:node - classID: #(6547, 0)

Value > MAXWrapper > Node > GeometryClass > Shape > Text

Constructor

text ...

Properties

Parameters Rollout

<text>.font    String default: "Arial"

Choose from a list of all fonts available to 3ds Max.

<text>.italic    Boolean default: false

Turn on/off italicized text.

<text>.underline    Boolean default: false

Turn on/off underlined text.

<text>.alignment     Integer  default: 1

Sets the alignment of text:

1- Align Left (Aligns text to the left side of its bounding box.)

2- Center (Aligns text to the center of its bounding box.)

3- Align Right (Aligns text to the right side of its bounding box.)

4- Justify (Spaces all lines of text to fill the extents of the bounding box.)

<text>.size    Float default: 100.0 -- animatable

Te text height where the height measuring method is defined by the active font.

<text>.kerning    Float default: 0.0 -- animatable

The kerning (the distance between letters).

<text>.leading    Float default: 0.0 -- animatable

The leading (the distance between lines).

<text>.text    String default: "3ds Max Text"

The text displayed in the viewport.

Interpolation Rollout

<text>.steps     Integer default: 6

The number of divisions between each vertex.

<text>.optimize     Boolean default: true

When on, removes unneeded steps from straight segments in the spline.

<text>.adaptive     Boolean default: false

When on, adaptive sets the number of steps for each spline to produce a smooth curve. Straight segments always receive 0 steps.

Rendering Rollout

<text>.render_renderable BooleanClass default: false -- boolean; renderable

Toggles the "Enable in Renderer" checkbox on and off. Available in 3ds Max 8 and higher.

<text>.render_displayRenderMesh BooleanClass default: false -- boolean; displayRenderMesh

Toggles the "Enable In Viewport" checkbox on and off. When set to true, the mesh will be displayed in the viewports. Available in 3ds Max 8 and higher.

<text>.render_useViewportSettings BooleanClass default: false -- boolean; useViewportSettings

Toggles the "Use Viewport Settings" checkbox on and off. When set to true, the mesh displayed in the viewport will use the Viewport settings. When false, the Renderer settings will be used for the viewport mesh, too. Available in 3ds Max 8 and higher.

<text>.render_mapcoords BooleanClass default: false -- boolean; mapcoords

Toggles mapping coordinates generation on and off. The U coordinate wraps once around the thickness of the spline; the V coordinate is mapped once along the length of the spline. Available in 3ds Max 8 and higher.

<text>.realWorldMapSize BooleanClass default: false -- boolean

Toggles the real-world map size option on and off. Available in 3ds Max 8 and higher.

<text>.render_displayRenderSettings BooleanClass default: true -- boolean; displayRenderSettings

Toggles the state of the Viewport/Renderer radio buttons. When set to true, the Renderer settings will be displayed in the rollout. When false, the Viewport settings will be shown instead. Available in 3ds Max 8 and higher.

<text>.render_rectangular BooleanClass default: false -- boolean

When set to true, enables the Rectangular cross-section mode to be used in the renderer. When false (default), enables the Radial cross-section mode. Corresponds to the Radial/Rectangular radio buttons in the UI in Renderer mode. Available in 3ds Max 8 and higher.

<text>.render_viewport_rectangular BooleanClass default: false -- boolean

When set to true, enables the Rectangular cross-section mode to be used in the viewports. When false (default), enables the Radial cross-section mode. Corresponds to the Radial/Rectangular radio buttons in the UI in Viewport mode. Available in 3ds Max 8 and higher.

Renderer - Radial Cross-Section

<text>.render_thickness Float default: 1.0 -- animatable; thickness

Get/Set the diameter of the Radial renderable spline mesh. Available in 3ds Max 8 and higher.

<text>.render_sides Integer default: 12 -- animatable; sides

Get/Set the number of sides for the spline mesh in the renderer. A value of 4 will give you a square cross section, for example. Available in 3ds Max 8 and higher.

<text>.render_angle Float default: 0.0 -- animatable; angle

Get/Set the rotational position of the Radial cross-section in the renderer. Available in 3ds Max 8 and higher.

Renderer - Rectangular Cross-Section

<text>.render_length Float default: 6.0 -- animatable

Get/Set the length of the Rectangular renderable spline mesh. Available in 3ds Max 8 and higher.

<text>.render_width Float default: 2.0 -- animatable

Get/Set the width of the Rectangular renderable spline mesh. Available in 3ds Max 8 and higher.

<text>.render_angle2 Float default: 0.0 -- animatable

Get/Set rotational position of the Radial cross-section in the renderer. Available in 3ds Max 8 and higher.

<text>.render_aspect_locked BooleanClass default: false -- boolean

Controls the state of the Aspect Lock checkbutton. When set to true, changing the Width will affect the Height and vice-versa, preserving the aspect at the time the lock was engaged. Available in 3ds Max 8 and higher.

Viewport - Radial Cross-Section

<text>.render_viewport_thickness Float default: 1.0 -- float; viewport_thickness

Get/Set the diameter of the Radial renderable spline mesh in the viewport. Available in 3ds Max 8 and higher.

<text>.render_viewport_sides Integer default: 12 -- integer; viewport_sides

Gets/Sets the number of sides for the Radial spline mesh in the viewports. A value of 4 will give you a square cross section, for example. Available in 3ds Max 8 and higher.

<text>.render_viewport_angle Float default: 0.0 -- float; viewport_angle

Gets/Sets the rotational position of the cross-section in the viewports. Available in 3ds Max 8 and higher.

Viewport - Rectangular Cross-Section

<text>.render_viewport_length Float default: 6.0 -- float

Get/Set the length of the Rectangular spline mesh in the viewports. Available in 3ds Max 8 and higher.

<text>.render_viewport_width Float default: 2.0 -- float

Get/Set the width of the Rectangular spline mesh in the viewports. Available in 3ds Max 8 and higher.

<text>.render_viewport_angle2 Float default: 0.0 -- float

Get/Set rotational position of the Rectangular cross-section in the viewports. Available in 3ds Max 8 and higher.

<text>.render_viewport_aspect_locked BooleanClass default: false -- boolean

Controls the state of the Aspect Lock checkbutton. When set to true, changing the Width will affect the Height and vice-versa, preserving the aspect at the time the lock was engaged. Available in 3ds Max 8 and higher.

Auto Smooth

<text>.render_auto_smooth BooleanClass default: true -- boolean

Controls the state of the Auto Smooth checkbox. When set to true, auto smoothing will be enabled. Available in 3ds Max 8 and higher.

<text>.render_threshold Float default: 40.0 -- animatable;

Get/set the Auto Smooth Threshold value. Available in 3ds Max 8 and higher.

NOTES:

The Manual Update property is not accessible to MAXScript in 3ds Max.

In Autodesk VIZ, the default value for property .text is "VIZ Text"

See also

MAXScript FAQ: How do I change the text in a Text Shape dynamically?

Spline Shape Common Properties, Operators, and Methods

Shape Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Shapes - Extended

Value > MAXWrapper > Node > GeometryClass > Shape > Shapes Ext.

The following list shows the 3ds Max shape class objects available in the "Extended Splines" category of the Create tab>Shapes in 3ds Max 8 and higher:

Angle : Shape

Channel : Shape

Tee : Shape

WalledRectangle : Shape

WideFlange : Shape

See also

Shapes - Splines

Spline Shape Common Properties, Operators, and Methods

Shape Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Angle : Shape

angle - superclass: shape; super-superclass:node - 47:7 - classID: #(-1826262992, 0)

Value > MAXWrapper > Node > GeometryClass > Shape > Angle

The Angle Shape is available in 3ds Max 8 and higher under Create>Shapes>"Extended Splines" and provides an "L" like shape.

Constructor

angle ...

Properties

Parameters Rollout

<angle>.angle_length Float default: 0.0 -- animatable; float; Length

Get/set the Length of the Angle shape.

<angle>.angle_width Float default: 0.0 -- animatable; float; Width

Get/set the Width of the Angle shape.

<angle>.angle_thickness Float default: 0.0 -- animatable; float; Thickness

Get/set the Thickness of the Angle shape.

<angle>.angle_syncCornerFillets BooleanClass default: true -- boolean; Constant_Thickness

Controls whether the corners will be synchronized or not. When set to true, the .angle_radius2 property will not be used, instead a synch. value based on .angle_radius will be generated automatically to keep the fillets synchronized.

<angle>.angle_radius Float default: 0.0 -- animatable; float; CornerRadius1

Get/set the Corner Radius 1 value.

<angle>.angle_radius2 Float default: 0.0 -- animatable; float; CornerRadius2

Get/set the Corner Radius 2 value.

<angle>.angle_EdgeFillet Float default: 0.0 -- animatable; float; EdgeRadii

Get/set the Edge Radii value.

Interpolation Rollout

<angle>.steps Integer default: 6 -- integer

Get/set the Steps value. This controls the number of subdivisions between two vertices.

<angle>.optimize BooleanClass default: true -- boolean

Enable/Disable the Optimize option. When set to true, removes unneeded steps from straight segments in the spline.

<angle>.adaptive BooleanClass default: false -- boolean

Enable/Disable the Adaptive option. When true, sets the number of steps for each segment to produce a smooth curve. Straight segments always receive 0 steps.

Creation Method Rollout

<angle>.typeIn_creationMethod BooleanClass default: false -- boolean; Creation_Method

Controls the creation method when using the Keyboard Entry controls. Possible values are:

false: Edge

true: Center

Keyboard Entry Rollout

<angle>.typeIn_x Float default: 0.0 -- float; X

Get/set the X type-in value.

<angle>.typeIn_y Float default: 0.0 -- float; Y

Get/set the Y type-in value.

<angle>.typeIn_z Float default: 0.0 -- float; Z

Get/set the Z type-in value.

<angle>.typeIn_Length Float default: 0.0 -- float; TypeInLength

Get/set the Length type-in value.

<angle>.typeIn_Width Float default: 0.0 -- float; TypeInWidth

Get/set the Width type-in value.

<angle>.typeIn_Thickness Float default: 0.0 -- float; TypeInThickness

Get/set the Thickness type-in value.

<angle>.typeIn_Radius Float default: 0.0 -- float; TypeInRadius

Get/set the Corner Radius 1 type-in value.

<angle>.typeIn_Radius2 Float default: 0.0 -- float; TypeInRadius2

Get/set the Corner Radius 2 type-in value.

<angle>.typeIn_EdgeFillet Float default: 0.0 -- float; EdgeRadii

Get/set the Edge Radii type-in value.

Rendering Rollout

<angle>.render_renderable BooleanClass default: false -- boolean; renderable

Controls the state of the "Enable in Renderer" checkbox. When set to true, the spline will be rendered by the production renderer.

<angle>.render_displayRenderMesh BooleanClass default: false -- boolean; displayRenderMesh

Controls the state of the "Enable In Viewport" checkbox. When set to true, the spline's mesh will be displayed in the viewports.

<angle>.render_useViewportSettings BooleanClass default: false -- boolean; useViewportSettings

Controls the state of the "Use Viewport Settings" checkbox. When set to true, the mesh displayed in the viewport will use the Viewport settings. When false, the Renderer settings will be used for the viewport mesh, too.

<angle>.render_mapcoords BooleanClass default: false -- boolean; mapcoords

Toggles mapping coordinates generation on and off. The U coordinate wraps once around the thickness of the spline; the V coordinate is mapped once along the length of the spline.

<angle>.realWorldMapSize BooleanClass default: false -- boolean

Toggles the real-world map size option on and off.

<angle>.render_rectangular BooleanClass default: false -- boolean

When set to true, enables the Rectangular cross-section mode to be used in the renderer. When false (default), enables the Radial cross-section mode. Corresponds to the Radial/Rectangular radio buttons in the UI in Renderer mode.

<angle>.render_displayRenderSettings BooleanClass default: true -- boolean; displayRenderSettings

Toggles the state of the Viewport/Renderer radio buttons. When set to true, the Renderer settings will be displayed in the rollout. When false, the Viewport settings will be shown instead.

<angle>.render_viewport_rectangular BooleanClass default: false -- boolean

When set to true, enables the Rectangular cross-section mode to be used in the viewports. When false (default), enables the Radial cross-section mode. Corresponds to the Radial/Rectangular radio buttons in the UI in Viewport mode.

Renderer - Radial Cross-Section

<angle>.render_thickness Float default: 1.0 -- animatable

<angle>.thickness Float default: 1.0 -- animatable; float

Get/Set the diameter of the Radial renderable spline mesh.

<angle>.render_sides Integer default: 12 -- animatable

<angle>.sides Integer default: 3 -- integer

Get/Set the number of sides for the spline mesh in the renderer. A value of 4 will give you a square cross section, for example.

<angle>.render_angle Float default: 0.0 -- animatable

<angle>.angle Float default: 0.0 -- float

Get/Set the rotational position of the Radial cross-section in the renderer.

Renderer - Rectangular Cross-Section

<angle>.render_length Float default: 6.0 -- animatable

Get/Set the length of the Rectangular renderable spline mesh.

<angle>.render_width Float default: 2.0 -- animatable

Get/Set the width of the Rectangular renderable spline mesh.

<angle>.render_angle2 Float default: 0.0 -- animatable

Get/Set rotational position of the Rectangular cross-section in the renderer.

<angle>.render_aspect_locked BooleanClass default: false -- boolean

Controls the state of the Aspect Lock checkbutton. When set to true, changing the Width will affect the Height and vice-versa, preserving the aspect at the time the lock was engaged.

Viewport - Radial Cross-Section

<angle>.render_viewport_angle Float default: 0.0 -- float; viewport_angle

Get/Set the diameter of the Radial renderable spline mesh in the viewport.

<angle>.render_viewport_sides Integer default: 12 -- integer; viewport_sides

Gets/Sets the number of sides for the Radial spline mesh in the viewports. A value of 4 will give you a square cross section, for example.

<angle>.render_viewport_thickness Float default: 1.0 -- float; viewport_thickness

Gets/Sets the rotational position of the cross-section in the viewports.

Viewport - Rectangular Cross-Section

<angle>.render_viewport_length Float default: 6.0 -- float

Get/Set the length of the Rectangular spline mesh in the viewports.

<angle>.render_viewport_width Float default: 2.0 -- float

Get/Set the width of the Rectangular spline mesh in the viewports.

<angle>.render_viewport_angle2 Float default: 0.0 -- float

Get/Set rotational position of the Rectangular cross-section in the viewports.

<angle>.render_viewport_aspect_locked BooleanClass default: false -- boolean

Controls the state of the Aspect Lock checkbutton. When set to true, changing the Width will affect the Height and vice-versa, preserving the aspect at the time the lock was engaged.

Auto Smooth

<angle>.render_auto_smooth BooleanClass default: true -- boolean

Controls the state of the Auto Smooth checkbox. When set to true, auto smoothing will be enabled.

<angle>.render_threshold Float default: 40.0 -- animatable;

Get/Set auto smoothing angle threshold.

See also

Shapes - Extended

Shapes - Splines

Spline Shape Common Properties, Operators, and Methods

Shape Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Channel : Shape

channel - superclass: shape; super-superclass:node - 45:7 - classID: #(2109476502, 0)

Value > MAXWrapper > Node > GeometryClass > Shape > Channel

The Channel Shape is available in 3ds Max 8 and higher under Create>Shapes>"Extended Splines" and provides an "U"-like shape.

Constructor

channel ...

Properties

Parameters Rollout

<channel>.channel_length Float default: 0.0 -- animatable; float; Length

Get/set the Length of the Channel shape.

<channel>.channel_width Float default: 0.0 -- animatable; float; Width

Get/set the Width of the Channel shape.

<channel>.channel_thickness Float default: 0.0 -- animatable; float; Thickness

Get/set the Thickness of the Channel shape.

<channel>.channel_syncCornerFillets BooleanClass default: true -- boolean; Constant_Thickness

Controls whether the corners will be synchronized or not. When set to true, the .angle_radius2 property will not be used, instead a synch. value based on .angle_radius will be generated automatically to keep the fillets synchronized.

<channel>.channel_radius Float default: 0.0 -- animatable; float; CornerRadius1

Get/set the Corner Radius 1 of the Channel shape.

<channel>.channel_radius2 Float default: 0.0 -- animatable; float; CornerRadius2

Get/set the Corner Radius 2 of the Channel shape.

Interpolation Rollout

<channel>.steps Integer default: 6 -- integer

Get/set the Steps value. This controls the number of subdivisions between two vertices.

<channel>.optimize BooleanClass default: true -- boolean

Enable/Disable the Optimize option. When set to true, removes unneeded steps from straight segments in the spline.

<channel>.adaptive BooleanClass default: false -- boolean

Enable/Disable the Adaptive option. When true, sets the number of steps for each segment to produce a smooth curve. Straight segments always receive 0 steps.

Creation Method Rollout

<channel>.typeIn_creationMethod BooleanClass default: false -- boolean; Creation_Method

Controls the creation method when using the Keyboard Entry controls. Possible values are:

false: Edge

true: Center

Keyboard Entry Rollout

<channel>.typeIn_x Float default: 0.0 -- float; X

Get/set the X type-in value.

<channel>.typeIn_y Float default: 0.0 -- float; Y

Get/set the Y type-in value.

<channel>.typeIn_z Float default: 0.0 -- float; Z

Get/set the Z type-in value.

<channel>.typeIn_Length Float default: 0.0 -- float; TypeInLength

Get/set the Length type-in value.

<channel>.typeIn_Width Float default: 0.0 -- float; TypeInWidth

Get/set the Width type-in value.

<channel>.typeIn_Thickness Float default: 0.0 -- float; TypeInThickness

Get/set the Thickness type-in value.

<channel>.typeIn_Radius Float default: 0.0 -- float; TypeInRadius

Get/set the Corner Radius type-in value.

<channel>.typeIn_Radius2 Float default: 0.0 -- float; TypeInRadius2

Get/set the Corner Radius 2 type-in value.

Rendering Rollout

<channel>.render_renderable BooleanClass default: false -- boolean; renderable

Controls the state of the "Enable in Renderer" checkbox. When set to true, the spline will be rendered by the production renderer.

<channel>.render_displayRenderMesh BooleanClass default: false -- boolean; displayRenderMesh

Controls the state of the "Enable In Viewport" checkbox. When set to true, the spline's mesh will be displayed in the viewports.

<channel>.render_useViewportSettings BooleanClass default: false -- boolean; useViewportSettings

Controls the state of the "Use Viewport Settings" checkbox. When set to true, the mesh displayed in the viewport will use the Viewport settings. When false, the Renderer settings will be used for the viewport mesh, too.

<channel>.render_mapcoords BooleanClass default: false -- boolean; mapcoords

Toggles mapping coordinates generation on and off. The U coordinate wraps once around the thickness of the spline; the V coordinate is mapped once along the length of the spline.

<channel>.realWorldMapSize BooleanClass default: false -- boolean

Toggles the real-world map size option on and off.

<channel>.render_displayRenderSettings BooleanClass default: true -- boolean; displayRenderSettings

Toggles the state of the Viewport/Renderer radio buttons. When set to true, the Renderer settings will be displayed in the rollout. When false, the Viewport settings will be shown instead.

<channel>.render_rectangular BooleanClass default: false -- boolean

When set to true, enables the Rectangular cross-section mode to be used in the renderer. When false (default), enables the Radial cross-section mode. Corresponds to the Radial/Rectangular radio buttons in the UI in Renderer mode.

<channel>.render_viewport_rectangular BooleanClass default: false -- boolean

When set to true, enables the Rectangular cross-section mode to be used in the viewports. When false (default), enables the Radial cross-section mode. Corresponds to the Radial/Rectangular radio buttons in the UI in Viewport mode.

Renderer - Radial Cross-Section

<channel>.render_thickness Float default: 1.0 -- animatable

<channel>.thickness Float default: 1.0 -- animatable; float

Get/Set the diameter of the Radial renderable spline mesh.

<channel>.render_sides Integer default: 12 -- animatable

<channel>.sides Integer default: 3 -- integer

Get/Set the number of sides for the spline mesh in the renderer. A value of 4 will give you a square cross section, for example.

<channel>.render_angle Float default: 0.0 -- animatable

<channel>.angle Float default: 0.0 -- float

Get/Set the rotational position of the Radial cross-section in the renderer.

Renderer - Rectangular Cross-Section

<channel>.render_length Float default: 6.0 -- animatable

Get/Set the length of the Rectangular renderable spline mesh.

<channel>.render_width Float default: 2.0 -- animatable

Get/Set the width of the Rectangular renderable spline mesh.

<channel>.render_angle2 Float default: 0.0 -- animatable

Get/Set rotational position of the Rectangular cross-section in the renderer.

<channel>.render_aspect_locked BooleanClass default: false -- boolean

Controls the state of the Aspect Lock checkbutton. When set to true, changing the Width will affect the Height and vice-versa, preserving the aspect at the time the lock was engaged.

Viewport - Radial Cross-Section

<channel>.render_viewport_angle Float default: 0.0 -- float; viewport_angle

Get/Set the diameter of the Radial renderable spline mesh in the viewport.

<channel>.render_viewport_sides Integer default: 12 -- integer; viewport_sides

Gets/Sets the number of sides for the Radial spline mesh in the viewports. A value of 4 will give you a square cross section, for example.

<channel>.render_viewport_thickness Float default: 1.0 -- float; viewport_thickness

Gets/Sets the rotational position of the cross-section in the viewports.

Viewport - Rectangular Cross-Section

<channel>.render_viewport_length Float default: 6.0 -- float

Get/Set the length of the Rectangular spline mesh in the viewports.

<channel>.render_viewport_width Float default: 2.0 -- float

Get/Set the width of the Rectangular spline mesh in the viewports.

<channel>.render_viewport_angle2 Float default: 0.0 -- float

Get/Set rotational position of the Rectangular cross-section in the viewports.

<channel>.render_viewport_aspect_locked BooleanClass default: false -- boolean

Controls the state of the Aspect Lock checkbutton. When set to true, changing the Width will affect the Height and vice-versa, preserving the aspect at the time the lock was engaged.

Auto Smooth

<channel>.render_auto_smooth BooleanClass default: true -- boolean

Controls the state of the Auto Smooth checkbox. When set to true, auto smoothing will be enabled.

<channel>.render_threshold Float default: 40.0 -- animatable

Get/Set auto smoothing angle threshold.

See also

Shapes - Extended

Shapes - Splines

Spline Shape Common Properties, Operators, and Methods

Shape Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Tee : Shape

Tee - superclass: shape; super-superclass:node - 42:7 - classID: #(-85272820, 0)

Value > MAXWrapper > Node > GeometryClass > Shape > Tee

The Tee Shape is available in 3ds Max 8 and higher under Create>Shapes>"Extended Splines" and provides an "T" like shape.

Constructor

Tee ...

Properties

Parameters Rollout

<Tee>.tee_length Float default: 0.0 -- animatable; float; Length

Get/set the Length of the Tee shape.

<Tee>.tee_width Float default: 0.0 -- animatable; float; Width

Get/set the Width of the Tee shape.

<Tee>.tee_thickness Float default: 0.0 -- animatable; float; Thickness

Get/set the Thickness of the Tee shape.

<Tee>.tee_radius Float default: 0.0 -- animatable; float; CornerRadius

Get/set the Corner Radius of the Tee shape.

Interpolation Rollout

<Tee>.steps Integer default: 6 -- integer

Get/set the Steps value. This controls the number of subdivisions between two vertices.

<Tee>.optimize BooleanClass default: true -- boolean

Enable/Disable the Optimize option. When set to true, removes unneeded steps from straight segments in the spline.

<Tee>.adaptive BooleanClass default: false -- boolean

Enable/Disable the Adaptive option. When true, sets the number of steps for each segment to produce a smooth curve. Straight segments always receive 0 steps.

Creation Method Rollout

<Tee>.typeIn_creationMethod BooleanClass default: false -- boolean; Creation_Method

Controls the creation method when using the Keyboard Entry controls. Possible values are:

false: Edge

true: Center

Keyboard Entry Rollout

<Tee>.typeIn_x Float default: 0.0 -- float; X

Get/set the X type-in value.

<Tee>.typeIn_y Float default: 0.0 -- float; Y

Get/set the Y type-in value.

<Tee>.typeIn_z Float default: 0.0 -- float; Z

Get/set the Z type-in value.

<Tee>.typeIn_Length Float default: 0.0 -- float; TypeInLength

Get/set the Length type-in value.

<Tee>.typeIn_Width Float default: 0.0 -- float; TypeInWidth

Get/set the Width type-in value.

<Tee>.typeIn_Thickness Float default: 0.0 -- float; TypeInThickness

Get/set the Thickness type-in value.

<Tee>.typeIn_Radius Float default: 0.0 -- float; TypeInRadius

Get/set the Corner Radius type-in value.

Rendering Rollout

<Tee>.render_renderable BooleanClass default: false -- boolean; renderable

Controls the state of the "Enable in Renderer" checkbox. When set to true, the spline will be rendered by the production renderer.

<Tee>.render_displayRenderMesh BooleanClass default: false -- boolean; displayRenderMesh

Controls the state of the "Enable In Viewport" checkbox. When set to true, the spline's mesh will be displayed in the viewports.

<Tee>.render_useViewportSettings BooleanClass default: false -- boolean; useViewportSettings

Controls the state of the "Use Viewport Settings" checkbox. When set to true, the mesh displayed in the viewport will use the Viewport settings. When false, the Renderer settings will be used for the viewport mesh, too.

<Tee>.render_mapcoords BooleanClass default: false -- boolean; mapcoords

Toggles mapping coordinates generation on and off. The U coordinate wraps once around the thickness of the spline; the V coordinate is mapped once along the length of the spline.

<Tee>.render_displayRenderSettings BooleanClass default: true -- boolean; displayRenderSettings

Toggles the state of the Viewport/Renderer radio buttons. When set to true, the Renderer settings will be displayed in the rollout. When false, the Viewport settings will be shown instead.

<Tee>.realWorldMapSize BooleanClass default: false -- boolean

Toggles the real-world map size option on and off.

<Tee>.render_rectangular BooleanClass default: false -- boolean

When set to true, enables the Rectangular cross-section mode to be used in the renderer. When false (default), enables the Radial cross-section mode. Corresponds to the Radial/Rectangular radio buttons in the UI in Renderer mode.

<Tee>.render_viewport_rectangular BooleanClass default: false -- boolean

When set to true, enables the Rectangular cross-section mode to be used in the viewports. When false (default), enables the Radial cross-section mode. Corresponds to the Radial/Rectangular radio buttons in the UI in Viewport mode.

Renderer - Radial Cross-Section

<Tee>.render_thickness Float default: 1.0 -- animatable

<Tee>.thickness Float default: 1.0 -- animatable; float

Get/Set the diameter of the Radial renderable spline mesh.

<Tee>.render_sides Integer default: 12 -- animatable

<Tee>.sides Integer default: 3 -- integer

Get/Set the number of sides for the spline mesh in the renderer. A value of 4 will give you a square cross section, for example.

<Tee>.render_angle Float default: 0.0 -- animatable

<Tee>.angle Float default: 0.0 -- float

Get/Set the rotational position of the Radial cross-section in the renderer.

Renderer - Rectangular Cross-Section

<Tee>.render_length Float default: 6.0 -- animatable

Get/Set the length of the Rectangular renderable spline mesh.

<Tee>.render_width Float default: 2.0 -- animatable

Get/Set the width of the Rectangular renderable spline mesh.

<Tee>.render_angle2 Float default: 0.0 -- animatable

Get/Set rotational position of the Rectangular cross-section in the renderer.

<Tee>.render_aspect_locked BooleanClass default: false -- boolean

Controls the state of the Aspect Lock checkbutton. When set to true, changing the Width will affect the Height and vice-versa, preserving the aspect at the time the lock was engaged.

Viewport - Radial Cross-Section

<Tee>.render_viewport_angle Float default: 0.0 -- float; viewport_angle

Get/Set the diameter of the Radial renderable spline mesh in the viewport.

<Tee>.render_viewport_sides Integer default: 12 -- integer; viewport_sides

Gets/Sets the number of sides for the Radial spline mesh in the viewports. A value of 4 will give you a square cross section, for example.

<Tee>.render_viewport_thickness Float default: 1.0 -- float; viewport_thickness

Gets/Sets the rotational position of the cross-section in the viewports.

Viewport - Rectangular Cross-Section

<Tee>.render_viewport_length Float default: 6.0 -- float

Get/Set the length of the Rectangular spline mesh in the viewports.

<Tee>.render_viewport_width Float default: 2.0 -- float

Get/Set the width of the Rectangular spline mesh in the viewports.

<Tee>.render_viewport_angle2 Float default: 0.0 -- float

Get/Set rotational position of the Rectangular cross-section in the viewports.

<Tee>.render_viewport_aspect_locked BooleanClass default: false -- boolean

Controls the state of the Aspect Lock checkbutton. When set to true, changing the Width will affect the Height and vice-versa, preserving the aspect at the time the lock was engaged.

Auto Smooth

<Tee>.render_auto_smooth BooleanClass default: true -- boolean

Controls the state of the Auto Smooth checkbox. When set to true, auto smoothing will be enabled.

<Tee>.render_threshold Float default: 40.0 -- animatable;

Get/Set auto smoothing angle threshold.

See also

Shapes - Extended

Shapes - Splines

Spline Shape Common Properties, Operators, and Methods

Shape Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


WalledRectangle : Shape

WalledRectangle - superclass: shape; super-superclass:node - 45:7 - classID: #(-658508180, 0)

Value > MAXWrapper > Node > GeometryClass > Shape > WalledRectangle

The WalledRectrangle Shape is available in 3ds Max 8 and higher under Create>Shapes>"Extended Splines" and provides a double rectangle shape.

Constructor

WalledRectangle ...

Properties

Parameters Rollout

<WalledRectangle>.wrect_length Float default: 0.0 -- animatable; float; Length

Get/set the Length of the Walled Rectangle shape.

<WalledRectangle>.wrect_width Float default: 0.0 -- animatable; float; Width

Get/set the Width of the Walled Rectangle shape.

<WalledRectangle>.wrect_thickness Float default: 0.0 -- animatable; float; Thickness

Get/set the Thickness of the Walled Rectangle shape.

<WalledRectangle>.wrect_syncCornerFillets BooleanClass default: true -- boolean; Constant_Thickness

Controls whether the corners will be synchronized or not. When set to true, the .angle_radius2 property will not be used, instead a synch. value based on .angle_radius will be generated automatically to keep the fillets synchronized.

<WalledRectangle>.wrect_radius Float default: 0.0 -- animatable; float; CornerRadius1

Get/set the Corner Radius 1 of the Channel shape.

<WalledRectangle>.wrect_radius2 Float default: 0.0 -- animatable; float; CornerRadius2

Get/set the Corner Radius 2 of the Channel shape.

Interpolation Rollout

<WalledRectangle>.steps Integer default: 6 -- integer

Get/set the Steps value. This controls the number of subdivisions between two vertices.

<WalledRectangle>.optimize BooleanClass default: true -- boolean

Enable/Disable the Optimize option. When set to true, removes unneeded steps from straight segments in the spline.

<WalledRectangle>.adaptive BooleanClass default: false -- boolean

Enable/Disable the Adaptive option. When true, sets the number of steps for each segment to produce a smooth curve. Straight segments always receive 0 steps.

Creation Method Rollout

<WalledRectangle>.typeIn_creationMethod BooleanClass default: false -- boolean; Creation_Method

Controls the creation method when using the Keyboard Entry controls. Possible values are:

false: Edge

true: Center

Keyboard Entry Rollout

<WalledRectangle>.typeIn_x Float default: 0.0 -- float; X

Get/set the X type-in value.

<WalledRectangle>.typeIn_y Float default: 0.0 -- float; Y

Get/set the Y type-in value.

<WalledRectangle>.typeIn_z Float default: 0.0 -- float; Z

Get/set the Z type-in value.

<WalledRectangle>.typeIn_Length Float default: 0.0 -- float; TypeInLength

Get/set the Length type-in value.

<WalledRectangle>.typeIn_Width Float default: 0.0 -- float; TypeInWidth

Get/set the Width type-in value.

<WalledRectangle>.typeIn_Thickness Float default: 0.0 -- float; TypeInThickness

Get/set the Thickness type-in value.

<WalledRectangle>.typeIn_Radius Float default: 0.0 -- float; TypeInRadius

Get/set the Corner Radius type-in value.

<WalledRectangle>.typeIn_Radius2 Float default: 0.0 -- float; TypeInRadius2

Get/set the Corner Radius 2 type-in value.

Rendering Rollout

<WalledRectangle>.render_renderable BooleanClass default: false -- boolean; renderable

Controls the state of the "Enable in Renderer" checkbox. When set to true, the spline will be rendered by the production renderer.

<WalledRectangle>.render_displayRenderMesh BooleanClass default: false -- boolean; displayRenderMesh

Controls the state of the "Enable In Viewport" checkbox. When set to true, the spline's mesh will be displayed in the viewports.

<WalledRectangle>.render_useViewportSettings BooleanClass default: false -- boolean; useViewportSettings

Controls the state of the "Use Viewport Settings" checkbox. When set to true, the mesh displayed in the viewport will use the Viewport settings. When false, the Renderer settings will be used for the viewport mesh, too.

<WalledRectangle>.render_mapcoords BooleanClass default: false -- boolean; mapcoords

Toggles mapping coordinates generation on and off. The U coordinate wraps once around the thickness of the spline; the V coordinate is mapped once along the length of the spline.

<WalledRectangle>.realWorldMapSize BooleanClass default: false -- boolean

Toggles the real-world map size option on and off.

<WalledRectangle>.render_displayRenderSettings BooleanClass default: true -- boolean; displayRenderSettings

Toggles the state of the Viewport/Renderer radio buttons. When set to true, the Renderer settings will be displayed in the rollout. When false, the Viewport settings will be shown instead.

<WalledRectangle>.render_rectangular BooleanClass default: false -- boolean

When set to true, enables the Rectangular cross-section mode to be used in the renderer. When false (default), enables the Radial cross-section mode. Corresponds to the Radial/Rectangular radio buttons in the UI in Renderer mode.

<WalledRectangle>.render_viewport_rectangular BooleanClass default: false -- boolean

When set to true, enables the Rectangular cross-section mode to be used in the viewports. When false (default), enables the Radial cross-section mode. Corresponds to the Radial/Rectangular radio buttons in the UI in Viewport mode.

Renderer - Radial Cross-Section

<WalledRectangle>.render_thickness Float default: 1.0 -- animatable

<WalledRectangle>.thickness Float default: 1.0 -- float

Get/Set the diameter of the Radial renderable spline mesh.

<WalledRectangle>.render_sides Integer default: 12 -- animatable

<WalledRectangle>.sides Integer default: 3 -- integer

Get/Set the number of sides for the spline mesh in the renderer. A value of 4 will give you a square cross section, for example.

<WalledRectangle>.render_angle Float default: 0.0 -- animatable

<WalledRectangle>.angle Float default: 0.0 -- float

Get/Set the rotational position of the Radial cross-section in the renderer.

Renderer - Rectangular Cross-Section

<WalledRectangle>.render_length Float default: 6.0 -- animatable

Get/Set the length of the Rectangular renderable spline mesh.

<WalledRectangle>.render_width Float default: 2.0 -- animatable

Get/Set the width of the Rectangular renderable spline mesh.

<WalledRectangle>.render_angle2 Float default: 0.0 -- animatable

Get/Set rotational position of the Rectangular cross-section in the renderer.

<WalledRectangle>.render_aspect_locked BooleanClass default: false -- boolean

Controls the state of the Aspect Lock checkbutton. When set to true, changing the Width will affect the Height and vice-versa, preserving the aspect at the time the lock was engaged.

Viewport - Radial Cross-Section

<WalledRectangle>.render_viewport_angle Float default: 0.0 -- float; viewport_angle

Get/Set the diameter of the Radial renderable spline mesh in the viewport.

<WalledRectangle>.render_viewport_sides Integer default: 12 -- integer; viewport_sides

Gets/Sets the number of sides for the Radial spline mesh in the viewports. A value of 4 will give you a square cross section, for example.

<WalledRectangle>.render_viewport_thickness Float default: 1.0 -- float; viewport_thickness

Gets/Sets the rotational position of the cross-section in the viewports.

Viewport - Rectangular Cross-Section

<WalledRectangle>.render_viewport_length Float default: 6.0 -- float

Get/Set the length of the Rectangular spline mesh in the viewports.

<WalledRectangle>.render_viewport_width Float default: 2.0 -- float

Get/Set the width of the Rectangular spline mesh in the viewports.

<WalledRectangle>.render_viewport_angle2 Float default: 0.0 -- float

Get/Set rotational position of the Rectangular cross-section in the viewports.

<WalledRectangle>.render_viewport_aspect_locked BooleanClass default: false -- boolean

Controls the state of the Aspect Lock checkbutton. When set to true, changing the Width will affect the Height and vice-versa, preserving the aspect at the time the lock was engaged.

Auto Smooth

<channel>.render_auto_smooth BooleanClass default: true -- boolean

Controls the state of the Auto Smooth checkbox. When set to true, auto smoothing will be enabled.

<WalledRectangle>.render_threshold Float default: 40.0 -- animatable

Get/Set auto smoothing angle threshold.

See also

Shapes - Extended

Shapes - Splines

Spline Shape Common Properties, Operators, and Methods

Shape Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


WideFlange : Shape

WideFlange - superclass: shape; super-superclass:node - 42:7 - classID: #(-1565053194, 0)

Value > MAXWrapper > Node > GeometryClass > Shape > WideFlange

The WideFlange Shape is available in 3ds Max 8 and higher under Create>Shapes>"Extended Splines" and provides an "H"-like shape.

Constructor

WideFlange ...

Properties

Parameters Rollout

<WideFlange>.wide_flange_length Float default: 0.0 -- animatable; float; Length

Get/set the Length of the Wide Flange shape.

<WideFlange>.wide_flange_width Float default: 0.0 -- animatable; float; Width

Get/set the Width of the Wide Flange shape.

<WideFlange>.wide_flange_thickness Float default: 0.0 -- animatable; float; Thickness

Get/set the Thickness of the Wide Flange shape.

<WideFlange>.wide_flange_radius Float default: 0.0 -- animatable; float; CornerRadius

Get/set the Radius of the Wide Flange shape.

Interpolation Rollout

<WideFlange>.steps Integer default: 6 -- integer

Get/set the Steps value. This controls the number of subdivisions between two vertices.

<WideFlange>.optimize BooleanClass default: true -- boolean

Enable/Disable the Optimize option. When set to true, removes unneeded steps from straight segments in the spline.

<WideFlange>.adaptive BooleanClass default: false -- boolean

Enable/Disable the Adaptive option. When true, sets the number of steps for each segment to produce a smooth curve. Straight segments always receive 0 steps.

Creation Method Rollout

<WideFlange>.typeIn_creationMethod BooleanClass default: false -- boolean; Creation_Method

Controls the creation method when using the Keyboard Entry controls. Possible values are:

false: Edge

true: Center

Keyboard Entry Rollout

<WideFlange>.typeIn_x Float default: 0.0 -- float; X

Get/set the X type-in value.

<WideFlange>.typeIn_y Float default: 0.0 -- float; Y

Get/set the Y type-in value.

<WideFlange>.typeIn_z Float default: 0.0 -- float; Z

Get/set the Z type-in value.

<WideFlange>.typeIn_Length Float default: 0.0 -- float; TypeInLength

Get/set the Length type-in value.

<WideFlange>.typeIn_Width Float default: 0.0 -- float; TypeInWidth

Get/set the Width type-in value.

<WideFlange>.typeIn_Thickness Float default: 0.0 -- float; TypeInThickness

Get/set the Thickness type-in value.

<WideFlange>.typeIn_Radius Float default: 0.0 -- float; TypeInRadius

Get/set the Corner Radius type-in value.

Rendering Rollout

<WideFlange>.render_renderable BooleanClass default: false -- boolean; renderable

Controls the state of the "Enable in Renderer" checkbox. When set to true, the spline will be rendered by the production renderer.

<WideFlange>.render_displayRenderMesh BooleanClass default: false -- boolean; displayRenderMesh

Controls the state of the "Enable In Viewport" checkbox. When set to true, the spline's mesh will be displayed in the viewports.

<WideFlange>.render_useViewportSettings BooleanClass default: false -- boolean; useViewportSettings

Controls the state of the "Use Viewport Settings" checkbox. When set to true, the mesh displayed in the viewport will use the Viewport settings. When false, the Renderer settings will be used for the viewport mesh, too.

<WideFlange>.render_mapcoords BooleanClass default: false -- boolean; mapcoords

Toggles mapping coordinates generation on and off. The U coordinate wraps once around the thickness of the spline; the V coordinate is mapped once along the length of the spline.

<WideFlange>.realWorldMapSize BooleanClass default: false -- boolean

Toggles the real-world map size option on and off.

<WideFlange>.render_displayRenderSettings BooleanClass default: true -- boolean; displayRenderSettings

Toggles the state of the Viewport/Renderer radio buttons. When set to true, the Renderer settings will be displayed in the rollout. When false, the Viewport settings will be shown instead.

<WideFlange>.render_rectangular BooleanClass default: false -- boolean

When set to true, enables the Rectangular cross-section mode to be used in the renderer. When false (default), enables the Radial cross-section mode. Corresponds to the Radial/Rectangular radio buttons in the UI in Renderer mode.

<WideFlange>.render_viewport_rectangular BooleanClass default: false -- boolean

When set to true, enables the Rectangular cross-section mode to be used in the viewports. When false (default), enables the Radial cross-section mode. Corresponds to the Radial/Rectangular radio buttons in the UI in Viewport mode.

Renderer - Radial Cross-Section

<WideFlange>.render_thickness Float default: 1.0 -- animatable

<WideFlange>.thickness Float default: 1.0 -- float

Get/Set the diameter of the Radial renderable spline mesh.

<WideFlange>.render_sides Integer default: 12 -- animatable

<WideFlange>.sides Integer default: 3 -- integer

Get/Set the number of sides for the spline mesh in the renderer. A value of 4 will give you a square cross section, for example.

<WideFlange>.render_angle Float default: 0.0 -- animatable

<WideFlange>.angle Float default: 0.0 -- float

Get/Set the rotational position of the Radial cross-section in the renderer.

Renderer - Rectangular Cross-Section

<WideFlange>.render_width Float default: 2.0 -- animatable

Get/Set the length of the Rectangular renderable spline mesh.

<WideFlange>.render_length Float default: 6.0 -- animatable

Get/Set the width of the Rectangular renderable spline mesh.

<WideFlange>.render_angle2 Float default: 0.0 -- animatable

Get/Set rotational position of the Rectangular cross-section in the renderer.

<WideFlange>.render_aspect_locked BooleanClass default: false -- boolean

Controls the state of the Aspect Lock checkbutton. When set to true, changing the Width will affect the Height and vice-versa, preserving the aspect at the time the lock was engaged.

Viewport - Radial Cross-Section

<WideFlange>.render_viewport_angle Float default: 0.0 -- float; viewport_angle

Get/Set the diameter of the Radial renderable spline mesh in the viewport.

<WideFlange>.render_viewport_sides Integer default: 12 -- integer; viewport_sides

Gets/Sets the number of sides for the Radial spline mesh in the viewports. A value of 4 will give you a square cross section, for example.

<WideFlange>.render_viewport_thickness Float default: 1.0 -- float; viewport_thickness

Gets/Sets the rotational position of the cross-section in the viewports.

Viewport - Rectangular Cross-Section

<WideFlange>.render_viewport_length Float default: 6.0 -- float

Get/Set the length of the Rectangular spline mesh in the viewports.

<WideFlange>.render_viewport_width Float default: 2.0 -- float

Get/Set the width of the Rectangular spline mesh in the viewports.

<WideFlange>.render_viewport_angle2 Float default: 0.0 -- float

Get/Set rotational position of the Rectangular cross-section in the viewports.

<WideFlange>.render_viewport_aspect_locked BooleanClass default: false -- boolean

Controls the state of the Aspect Lock checkbutton. When set to true, changing the Width will affect the Height and vice-versa, preserving the aspect at the time the lock was engaged.

Auto Smooth

<WideFlange>.render_auto_smooth BooleanClass default: true -- boolean

Controls the state of the Auto Smooth checkbox. When set to true, auto smoothing will be enabled.

<WideFlange>.render_threshold Float default: 40.0 -- animatable; Controller Scaling: (1 : 57.2958); WeirdScaled (1.0)

Get/Set auto smoothing angle threshold.

See also

Shapes - Extended

Shapes - Splines

Spline Shape Common Properties, Operators, and Methods

Shape Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Shapes - NURBS Curves

Value > MAXWrapper > Node > GeometryClass > Shape > NURBS Curves

The following list shows the 3ds Max NURBS Curves shape class objects:

CV_Curve

Point_Curve


CV_Curve : Shape

Value > MAXWrapper > Node > GeometryClass > Shape > CV_Curve

CV_Curves are NURBS curve objects defined by CVs (control vertices). All NURBS objects are created through the special NURBS descriptor classes (see Working with NURBS ) and the CV_Curve class is used typically in object class testing with the classOf() function. Scene objects created as CV Curve shape objects in the 3ds Max user interface have the class CV_Curve.

Constructor

NURBSNode <nurbs_set> ...

See Creating New NURBS Objects for details.

Properties

<CV_Curve>.angle     Float   default: 0.0 -- animatable

The rotational position of the cross-section in the renderer.

<CV_Curve>.thickness     Float default: 1.0 -- animatable

Diameter of the rendered curve.

<CV_Curve>.sides     Float   default: 12.0 -- animatable

Sets the number of sides for the curve mesh in the renderer. A value of 4 will give you a square cross section, for example.

<CV_Curve>.renderable     Boolean   default: true

When on, the curve is displayed in the rendered scene.

<CV_Curve>.mapCoords     Boolean   default: false

Turn this on to apply mapping coordinates. The U coordinate wraps once around the thickness of the curve; the V coordinate is mapped once along the length of the curve.

Additional Properties for CV curves are accessed through a NURBSSet descriptor object. See Working with NURBS for more details.

See also

Shape Common Properties, Operators, and Methods

NURBS Node Properties and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Point_Curve : Shape

Value > MAXWrapper > Node > GeometryClass > Shape > Point_Curve

Point_Curves are NURBS curve objects defined by interpolated points. All NURBS objects are created through the special NURBS descriptor classes (see Working with NURBS ) and the Point_Curve class is used typically in object class testing with the classOf() function. Scene objects created as Point Curve shape objects in the 3ds Max user interface have the class Point_Curve.

Constructor

NURBSNode <nurbs_set> ...

See Creating New NURBS Objects for details.

Properties

<Point_Curve>.angle   Float   default: 0.0 -- animatable

The rotational position of the cross-section in the renderer.

<Point_Curve>.thickness   Float default: 1.0 -- animatable

Diameter of the rendered curve.

<Point_Curve>.sides   Float   default: 12.0 -- animatable

Sets the number of sides for the curve mesh in the renderer. A value of 4 will give you a square cross section, for example.

<Point_Curve>.renderable     Boolean   default: true

When on, the curve is displayed in the rendered scene.

<Point_Curve>.mapCoords     Boolean   default: false

Turn this on to apply mapping coordinates. The U coordinate wraps once around the thickness of the NURBS curve; the V coordinate is mapped once along the length of the curve.

Additional properties for point curves are accessed through a NURBSSet descriptor object. See Working with NURBS for more details.

See also

Shape Common Properties, Operators, and Methods

NURBS Node Properties and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


CV_Surf : GeometryClass

CV_Surf : GeometryClass {76a11646,12a821fa}

Value > MAXWrapper > Node > GeometryClass > CV_Surf

Constructor

Class instances not creatable by MAXScript

Properties

.render_thickness : float

.render_sides : integer

.render_angle : float

.render_width : float

.render_length : float

.render_angle2 : float

.render_threshold : angle


Point_Curveshape : shape

Point_Curveshape : shape {76a11646,12a82142}

Value > MAXWrapper > Node > GeometryClass > Shape > Point_Curveshape

Constructor

Class instances not creatable by MAXScript

Properties

.render_thickness : float

.render_sides : integer

.render_angle : float

.render_width : float

.render_length : float

.render_angle2 : float

.render_threshold : angle


Point_SurfGeometry : GeometryClass

Point_SurfGeometry : GeometryClass {76a11646,badbeef}

Value > MAXWrapper > Node > GeometryClass > Point_SurfGeometry

Constructor

Class instances not creatable by MAXScript

Properties

.render_thickness : float

.render_sides : integer

.render_angle : float

.render_width : float

.render_length : float

.render_angle2 : float

.render_threshold : angle


LinearShape : Shape

LinearShape : shape {aa,0}

Value > MAXWrapper > Node > GeometryClass > Shape >LinearShape

Constructor

Class instances not creatable by MAXScript

Properties

.render_thickness : float

Get/Set the diameter of the Radial renderable spline mesh. Available in 3ds Max 8 and higher.

.render_sides : integer

Get/Set the number of sides for the renderable spline mesh. Available in 3ds Max 8 and higher.

.render_angle : float

Get/Set the rotational position of the Radial cross-section in the renderer. Available in 3ds Max 8 and higher.

.render_width : float

Get/Set the width of the Rectangular renderable spline mesh. Available in 3ds Max 8 and higher.

.render_length : float

Get/Set the length of the Rectangular renderable spline mesh. Available in 3ds Max 8 and higher.

.render_angle2 : float

Get/Set rotational position of the Radial cross-section in the renderer. Available in 3ds Max 8 and higher.

.render_threshold : angle

Get/set the Auto Smooth Threshold value. Available in 3ds Max 8 and higher.

NOTE:

In 3ds Max releases prior to version 8, the properties .thickness, .sides and .angle were exposed. These properties have been retired in 3ds Max 8.


Arcshape : shape

Arcshape : shape {1997,0}

Used by the DWG Import/File Link. Available in 3ds Max 8 and higher.

Class instances not creatable by MAXScript

Properties:

.render_thickness : float

Get/Set the render thickness.

.render_sides : integer

Get/Set the number of sides to render.

.render_angle : float

Get/Set the rotation angle of the circular cross-section when rendering.

.render_width : float

Get/Set the width of the cross-section when rendering.

.render_length : float

Get/Set the length of the cross-section when rendering.

.render_angle2 : float

Get/Set the rotation angle of the rectanglular cross-section when rendering.

.render_threshold : angle

Get/Set the auto-smooth threshold when rendering.


CV_Curveshape : shape

CV_Curveshape : shape {76a11646,12a82144}

Used by the DWG Import/File Link. Available in 3ds Max 8 and higher.

Class instances not creatable by MAXScript

Properties:

.render_thickness : float

Get/Set the render thickness.

.render_sides : integer

Get/Set the number of sides to render.

.render_angle : float

Get/Set the rotation angle of the circular cross-section when rendering.

.render_width : float

Get/Set the width of the cross-section when rendering.

.render_length : float

Get/Set the length of the cross-section when rendering.

.render_angle2 : float

Get/Set the rotation angle of the rectanglular cross-section when rendering.

.render_threshold : angle

Get/Set the auto-smooth threshold when rendering.


HalfRound : Shape

HalfRound : shape {1997,0}

Used by the Sweep modifier . Available in 3ds Max 8 and higher.

Class instances not creatable by MAXScript

Properties:

Parameters Rollout

<HalfRound>.radius

Get/Set the outer radius.

Interpolation Rollout

<HalfRound>.steps

Get/Set the number of interpolation steps.

<HalfRound>.optimize

Get/Set the state of the Optimize checkbox.

<HalfRound>.adaptive

Get/Set the state of the Adaptive checkbox.

Rendering Rollout

<HalfRound>.render_renderable

<HalfRound>.baseobject.renderable

Toggles the "Enable In Renderer" checkbox on and off. When set to true, the mesh will be displayed in the production renderer.

<HalfRound>.displayRenderMesh

<HalfRound>.render_displayRenderMesh

Toggles the "Enable In Viewport" checkbox on and off. When set to true, the mesh will be displayed in the viewports.

<HalfRound>.useViewportSettings

<HalfRound>.render_useViewportSettings

Toggles the "Use Viewport Settings" checkbox on and off. When set to true, the mesh displayed in the viewport will use the Viewport settings. When false, the Renderer settings will be used for the viewport mesh, too.

<HalfRound>.mapcoords

<HalfRound>.render_mapcoords

Toggles mapping coordinates generation on and off. The U coordinate wraps once around the thickness of the spline; the V coordinate is mapped once along the length of the spline.

<HalfRound>.realWorldMapSize

Toggles the real-world map size option on and off.

<HalfRound>.displayRenderSettings

<HalfRound>.render_displayRenderSettings

Toggles the state of the Viewport/Renderer radio buttons. When set to true, the Renderer settings will be displayed in the rollout. When false, the Viewport settings will be shown instead.

<HalfRound>.render_rectangular

When set to true, enables the Rectangular cross-section mode to be used in the renderer. When false (default), enables the Radial cross-section mode. Corresponds to the Radial/Rectangular radio buttons in the UI in Renderer mode.

<HalfRound>.render_viewport_rectangular

When set to true, enables the Rectangular cross-section mode to be used in the viewports. When false (default), enables the Radial cross-section mode. Corresponds to the Radial/Rectangular radio buttons in the UI in Viewport mode.

Renderer - Radial Cross-Section

<HalfRound>.thickness

Get/Set the thickness of the renderer radial cross-section.

<HalfRound>.sides

Get/Set the number of sides in the renderer radial cross-section.

<HalfRound>.angle

Get/Set the rotational position of the renderer radial cross-section.

Renderer - Rectangular Cross-Section

<HalfRound>.render_aspect_locked

Controls the state of the Aspect Lock checkbutton. When set to true, changing the Width will affect the Height and vice-versa, preserving the aspect at the time the lock was engaged.

Viewport - Radial Cross-Section

<HalfRound>.viewport_thickness

<HalfRound>.render_viewport_thickness

Get/Set the diameter of the Radial renderable spline mesh in the viewport.

<HalfRound>.viewport_sides

<HalfRound>.render_viewport_sides

Gets/Sets the number of sides for the Radial spline mesh in the viewports. A value of 4 will give you a square cross section, for example.

<HalfRound>.viewport_angle

<HalfRound>.render_viewport_angle

Gets/Sets the rotational position of the cross-section in the viewports.

Viewport - Rectangular Cross-Section

<HalfRound>.render_viewport_length

Get/Set the length of the Rectangular spline mesh in the viewports.

<HalfRound>.render_viewport_width

Get/Set the width of the Rectangular spline mesh in the viewports.

<HalfRound>.render_viewport_angle2

Get/Set rotational position of the Rectangular cross-section in the viewports.

<HalfRound>.render_viewport_aspect_locked

Controls the state of the Aspect Lock checkbutton. When set to true, changing the Width will affect the Height and vice-versa, preserving the aspect at the time the lock was engaged.

Auto Smooth

<HalfRound>.render_auto_smooth

Controls the state of the Auto Smooth checkbox. When set to true, auto smoothing will be enabled.


Pipe : Shape

Pipe : shape {199a,0}

Used by the Sweep modifier . Available in 3ds Max 8 and higher.

Class instances not creatable by MAXScript

Most of the renderable shape properties documented below are not really necessary as the shape is being used mainly as cross-section in the Sweep modifier. It is technically possible to get the 7th cross-section instance from a Sweep modifier and assign to another scene node to get a working Pipe shape in the viewport and the Modifier panel though. Some cross-section properties like Auto-Smooth Threshold for example have not been exposed.

Properties:

Parameters Rollout

<Pipe>.radius

Get/Set the outer radius of the pipe.

<Pipe>.pipe_thickness

Get/Set the thickness of the pipe.

Interpolation Rollout

<Pipe>.steps

Get/Set the number of interpolation steps.

<Pipe>.optimize

Get/Set the state of the Optimize checkbox.

<Pipe>.adaptive

Get/Set the state of the Adaptive checkbox.

Rendering Rollout

<Pipe>.render_renderable

<Pipe>.baseobject.renderable

Toggles the "Enable In Renderer" checkbox on and off. When set to true, the mesh will be displayed in the production renderer.

<Pipe>.displayRenderMesh

<Pipe>.render_displayRenderMesh

Toggles the "Enable In Viewport" checkbox on and off. When set to true, the mesh will be displayed in the viewports.

<Pipe>.useViewportSettings

<Pipe>.render_useViewportSettings

Toggles the "Use Viewport Settings" checkbox on and off. When set to true, the mesh displayed in the viewport will use the Viewport settings. When false, the Renderer settings will be used for the viewport mesh, too.

<Pipe>.mapcoords

<Pipe>.render_mapcoords

Toggles mapping coordinates generation on and off. The U coordinate wraps once around the thickness of the spline; the V coordinate is mapped once along the length of the spline.

<Pipe>.realWorldMapSize

Toggles the real-world map size option on and off.

<Pipe>.displayRenderSettings

<Pipe>.render_displayRenderSettings

Toggles the state of the Viewport/Renderer radio buttons. When set to true, the Renderer settings will be displayed in the rollout. When false, the Viewport settings will be shown instead.

<Pipe>.render_rectangular

When set to true, enables the Rectangular cross-section mode to be used in the renderer. When false (default), enables the Radial cross-section mode. Corresponds to the Radial/Rectangular radio buttons in the UI in Renderer mode.

<Pipe>.render_viewport_rectangular

When set to true, enables the Rectangular cross-section mode to be used in the viewports. When false (default), enables the Radial cross-section mode. Corresponds to the Radial/Rectangular radio buttons in the UI in Viewport mode.

Renderer - Radial Cross-Section

<Pipe>.thickness

Get/Set the thickness of the renderer radial cross-section.

<Pipe>.sides

Get/Set the number of sides in the renderer radial cross-section.

<Pipe>.angle

Get/Set the rotational position of the renderer radial cross-section.

Renderer - Rectangular Cross-Section

<Pipe>.render_aspect_locked

Controls the state of the Aspect Lock checkbutton. When set to true, changing the Width will affect the Height and vice-versa, preserving the aspect at the time the lock was engaged.

Viewport - Radial Cross-Section

<Pipe>.viewport_thickness

<Pipe>.render_viewport_thickness

Get/Set the diameter of the Radial renderable spline mesh in the viewport.

<Pipe>.viewport_sides

<Pipe>.render_viewport_sides

Gets/Sets the number of sides for the Radial spline mesh in the viewports. A value of 4 will give you a square cross section, for example.

<Pipe>.viewport_angle

<Pipe>.render_viewport_angle

Gets/Sets the rotational position of the cross-section in the viewports.

Viewport - Rectangular Cross-Section

<Pipe>.render_viewport_length

Get/Set the length of the Rectangular spline mesh in the viewports.

<Pipe>.render_viewport_width

Get/Set the width of the Rectangular spline mesh in the viewports.

<Pipe>.render_viewport_angle2

Get/Set rotational position of the Rectangular cross-section in the viewports.

<Pipe>.render_viewport_aspect_locked

Controls the state of the Aspect Lock checkbutton. When set to true, changing the Width will affect the Height and vice-versa, preserving the aspect at the time the lock was engaged.

Auto Smooth

<Pipe>.render_auto_smooth

Controls the state of the Auto Smooth checkbox. When set to true, auto smoothing will be enabled.


QuarterRound : Shape

QuarterRound : shape {1998,0}

Used by the Sweep modifier . Available in 3ds Max 8 and higher.

Class instances not creatable by MAXScript

Properties:

Parameters Rollout

<QuarterRound>.radius

Get/Set the outer radius.

Interpolation Rollout

<QuarterRound>.steps

Get/Set the number of interpolation steps.

<QuarterRound>.optimize

Get/Set the state of the Optimize checkbox.

<QuarterRound>.adaptive

Get/Set the state of the Adaptive checkbox.

Rendering Rollout

<QuarterRound>.render_renderable

<QuarterRound>.baseobject.renderable

Toggles the "Enable In Renderer" checkbox on and off. When set to true, the mesh will be displayed in the production renderer.

<QuarterRound>.displayRenderMesh

<QuarterRound>.render_displayRenderMesh

Toggles the "Enable In Viewport" checkbox on and off. When set to true, the mesh will be displayed in the viewports.

<QuarterRound>.useViewportSettings

<QuarterRound>.render_useViewportSettings

Toggles the "Use Viewport Settings" checkbox on and off. When set to true, the mesh displayed in the viewport will use the Viewport settings. When false, the Renderer settings will be used for the viewport mesh, too.

<QuarterRound>.mapcoords

<QuarterRound>.render_mapcoords

Toggles mapping coordinates generation on and off. The U coordinate wraps once around the thickness of the spline; the V coordinate is mapped once along the length of the spline.

<QuarterRound>.realWorldMapSize

Toggles the real-world map size option on and off.

<QuarterRound>.displayRenderSettings

<QuarterRound>.render_displayRenderSettings

Toggles the state of the Viewport/Renderer radio buttons. When set to true, the Renderer settings will be displayed in the rollout. When false, the Viewport settings will be shown instead.

<QuarterRound>.render_rectangular

When set to true, enables the Rectangular cross-section mode to be used in the renderer. When false (default), enables the Radial cross-section mode. Corresponds to the Radial/Rectangular radio buttons in the UI in Renderer mode.

<QuarterRound>.render_viewport_rectangular

When set to true, enables the Rectangular cross-section mode to be used in the viewports. When false (default), enables the Radial cross-section mode. Corresponds to the Radial/Rectangular radio buttons in the UI in Viewport mode.

Renderer - Radial Cross-Section

<QuarterRound>.thickness

Get/Set the thickness of the renderer radial cross-section.

<QuarterRound>.sides

Get/Set the number of sides in the renderer radial cross-section.

<QuarterRound>.angle

Get/Set the rotational position of the renderer radial cross-section.

Renderer - Rectangular Cross-Section

<QuarterRound>.render_aspect_locked

Controls the state of the Aspect Lock checkbutton. When set to true, changing the Width will affect the Height and vice-versa, preserving the aspect at the time the lock was engaged.

Viewport - Radial Cross-Section

<QuarterRound>.viewport_thickness

<QuarterRound>.render_viewport_thickness

Get/Set the diameter of the Radial renderable spline mesh in the viewport.

<QuarterRound>.viewport_sides

<QuarterRound>.render_viewport_sides

Gets/Sets the number of sides for the Radial spline mesh in the viewports. A value of 4 will give you a square cross section, for example.

<QuarterRound>.viewport_angle

<QuarterRound>.render_viewport_angle

Gets/Sets the rotational position of the cross-section in the viewports.

Viewport - Rectangular Cross-Section

<QuarterRound>.render_viewport_length

Get/Set the length of the Rectangular spline mesh in the viewports.

<QuarterRound>.render_viewport_width

Get/Set the width of the Rectangular spline mesh in the viewports.

<QuarterRound>.render_viewport_angle2

Get/Set rotational position of the Rectangular cross-section in the viewports.

<QuarterRound>.render_viewport_aspect_locked

Controls the state of the Aspect Lock checkbutton. When set to true, changing the Width will affect the Height and vice-versa, preserving the aspect at the time the lock was engaged.

Auto Smooth

<QuarterRound>.render_auto_smooth

Controls the state of the Auto Smooth checkbox. When set to true, auto smoothing will be enabled.


PolymorphicGeomshape : shape

PolymorphicGeomshape : shape {50406508,b995f5e}

Used by the DWG Import/File Link.

Class instances not creatable by MAXScript

Properties:

.render_thickness : float

Get/Set the render thickness.

.render_sides : integer

Get/Set the number of sides to render.

.render_angle : float

Get/Set the rotation angle of the circular cross-section when rendering.

.render_width : float

Get/Set the width of the cross-section when rendering.

.render_length : float

Get/Set the length of the cross-section when rendering.

.render_angle2 : float

Get/Set the rotation angle of the rectanglular cross-section when rendering.

.render_threshold : angle

Get/Set the auto-smooth threshold when rendering.


StPathClass : shape

StPathClass : shape {dc3000c,65772051}

Used by the DWG Import.

Class instances not creatable by MAXScript

Properties:

.angle : float

.thickness : float

.sides : integer

.render_thickness : float

.render_sides : integer

.render_angle : float

.render_width : float

.render_length : float

.render_angle2 : float

.render_threshold : angle


Light : Node

Value > MAXWrapper > Node > Light

The following clickable image maps and lists show the 3ds Max light class objects:

Standard Lights

DirectionalLight

FreeSpot

OmniLight

Skylight

TargetSpot

TargetDirectionalLight

Photometric Lights

Target_Light

Free_Light

mr_Sky_Portal

Lights Not in Create Panel

Free_Area

Free_Cylinder

Free_Disc

Free_Sphere

Free_Linear

Target_Area

Target_Cylinder

Target_Disc

Target_Sphere

Target_Linear

IES_Sky

IES_Sun

mr_Sky

mr_Sun

See also

Light Common Properties, Operators, and Methods

Photmetric Lights Common Properties, Operators, and Methods


Photometric Light Classes

NEW in 3ds Max 2009: The Photometric Lights have been redesigned in 3ds Max 2009 to simplify the creation and conversion between types, as well as extended to support more options, preview Web Distribution and more.

Internally, 3ds Max 2009 exposes a multitude of Photometric Light Classes with unique ClassIDs. Some of these classes including the Point, Line and Area Lights (both Free and Targeted) provide backwards compatibility with Photometric Lights from previous versions.

In the 3ds Max Command Panel, the creation has been reduced to only two basic types - Target Light and Free Light which can be converted into all other types via the "Shape/Area Shadows" rollout. The old "Area" type is now called "Rectangle" to distinguish between the various area light shapes that are now available.

Several new Area Light types - Disc, Sphere and Cylinder have been added. Class instances of these light classes can be created directly by MAXScript or indirectly by setting a light's .type property to #Free_Disc, #Target_Disc, #Free_Sphere, #Target_Sphere, #Free_Cylinder or #Target_Cylinder.

Also note that the User Interface of all Photometric Lights exposes a checkbox called "Targeted". Changing the state of this checkbox using the mouse will implicitly convert the class of the object between #Target_* and #Free_* types. This property cannot be set directly with MAXScript, instead, the .type property has to be set to the desired #Free_* or #Target_* type.

The table below lists all available Photometric Light types.

Type | Class | ClassID | New in 3ds Max 2009
FREE TYPES |  |  |
#Free_Point | Free_Light | #(842489804, 184704240) | No
#Free_Line | Free_Linear | #(2015392769, 897523032) | No
#Free_Rectangle | Free_Area | #(911244690, 274340423) | No
#Free_Disc | Free_Disc | #(1540123970, 206521102) | Yes
#Free_Sphere | Free_Sphere | #(2091464066, 448490290) | Yes
#Free_Cylinder | Free_Cylinder | #(1190540515, 171080367) | Yes
TARGETED TYPES |  |  |
#Target_Point | Target_Light | #(1703759767, 1926054489) | No
#Target_Line | Target_Linear | #(1158113413, 1081676873) | No
#Target_Rectangle | Target_Area | #(1903775645, 1890472690) | No
#Target_Disc | Target_Disc | #(947069768, 538400947) | Yes
#Target_Sphere | Target_Sphere | #(872184553, 1413692869) | Yes
#Target_Cylinder | Target_Cylinder | #(2089507600, 1272135302) | Yes

All these light classes share the same Photometric Lights Common Properties, Operators, and Methods , thus their respective documentation pages contain no properties. There are some slight differences in the allowed ranges of a few common parameters, for example the Sphere and Cylinder lights support only a .distribution value of 0, while all other types support a range from 0 to 3. These specifics have been noted explicitly where applicable.


Photometric Lights Common Properties, Operators, and Methods

Value > MAXWrapper > Node > Photometric Lights > Common Properties and Methods

NEW in 3ds Max 2009: All Photometric Lights share the same set of properties. Every Photometric Light type can be freely switched to any other type. See the .type property in the LightProperties interface .

See Photometric Light Classes for details.

Properties:

General Parameters Rollout

Light Properties

<Photometric_Light>.on Boolean default: true -- boolean

Toggle light emission on and off.

<Photometric_Light>.targetDistance Float default: 240.0 -- animatable; float; Target_Distance

Get/set the distance to the light's target.

Shadows

<Photometric_Light>.castShadows BooleanClass default: false -- boolean; Cast_Shadows

Toggle shadow casting on and off.

<Photometric_Light>.useGlobalShadowSettings BooleanClass default: false -- boolean; Use_Global_Params

When set to true, the shadow generator will use the global shadow settings. When set to false, the local settings will be used.

<Photometric_Light>.shadowGenerator shadowMap default: shadowMap:shadowMap -- value; SubAnim

Get/Set the Shadow Generator as class instance.

Exposed by the LightProperties Interface .

<Photometric_Light>.shadowGeneratorByName String default: "Shadow Map" -- value

Get/Set the Shadow Generator by name.

Exposed by the LightProperties Interface .

<Photometric_Light>.raytracedShadows BooleanClass default: false -- value

Get/Set use of raytraced shadows. Exposed by the LightProperties Interface .

NOTE:

This property should not be used in 3ds Max 5 and higher. Please use the .shadowGenerator property to assign a shadow generator.

The property is exposed for backwards compatibility only. In versions prior to 3ds Max 5, the only possible shadow generator types were Shadow Maps and Raytraced Shadows. Setting this property will switch the shadow generator internally. Currently, the number of possible shadow generators is much higher (including 3rd party plug-ins), so this property is obsolete.

Include/Exclude Lists

<Photometric_Light>.excludeList Array default: #() -- value

Get/Set the exclusion list as an array on objects. When setting the value, the Include/Exlude option will be set to Exclude.

Exposed by the LightProperties Interface .

<Photometric_Light>.includeList UndefinedClass default: undefined -- value; !error setting value!

Get/Set an array of objects to be included in the illumination by the light. When setting the value, the Include/Exlude option will be set to Include.

Exposed by the LightProperties Interface .

Light Distribution (Type)

<Photometric_Light>.distribution Integer default: 0 -- value

Get/Set the distribution type.

Possible values are:

0 - Uniform Sphereical

1 - Spotlight (not valid for Sphere and Cylinder types)

2 - Uniform Hemispherical (not valid for Sphere and Cylinder types)

3 - Photometric Web File (not valid for Sphere and Cylinder types)

Exposed by the LightProperties Interface .

Intensity/Color/Attenuation Rollout

Color

<Photometric_Light>.color Color default: (color 265.933 250.885 263.562) -- color by value

The RGB Color of the light. Alias for .rgb and .Light_Color.

Exposed by the LightProperties Interface .

<Photometric_Light>.useKelvin BooleanClass default: false -- boolean; Use_Kelvin

Get/set the state of the Kelvin/Color radio button. When set to true, the color temperature in Kelvin will be used. When false, the RGB Color will be used instead.

<Photometric_Light>.kelvin Float default: 3600.0 -- animatable; float

Get/set the color temperature in Kelvin.

<Photometric_Light>.rgbFilter Color default: (color 255 255 255) -- animatable; RGB color; Filter_Color; Controller Scaling: ([1,1,1] : (color 255 255 255)) )

Get/set the Filter Color.

Intensity

<Photometric_Light>.intensityType Integer default: 1 -- integer; Intensity_Type

Get/set the Intensity type.

Possible values are:

0 - lm

1 - cd

2 - lx at

<Photometric_Light>.intensity Float default: 1500.0 -- animatable; float

Get/set the Intensity value.

<Photometric_Light>.intensityAt Float default: 39.3701 -- float; Intensity_At

Get/Set the Distance at which the intensity is measured when .intensityType is set to 2 - lx at.

<Photometric_Light>.flux Float default: 0.0 -- float

Set the Light Intensity in lm.

<Photometric_Light>.originalFlux Float default: 0.0 -- float

<Photometric_Light>.originalIntensity Float default: 0.0 -- float; Shape_Area_Shadows

Dimming

<Photometric_Light>.useMultiplier BooleanClass default: false -- boolean; Use_Dimmer

Get/set the state of the Dimming checkbox.

<Photometric_Light>.Multiplier Float default: 100.0 -- animatable; float

Get/set the Dimming multiplier value in percent.

<Photometric_Light>.shiftColorWhenDimming BooleanClass default: false -- boolean; Shift_Color_When_Dimming

Get/set the state of the "Incandescent lamp color shift when dimming" checkbox.

Far Attenuation

<Photometric_Light>.useFarAttenuation BooleanClass default: false -- boolean; Use_Far_Attenuation

Get/set the state of the Use Far Attenuation checkbox.

<Photometric_Light>.displayFarAttenuationGizmo BooleanClass default: false -- boolean; Display_Far_Attenuation_Gizmo

Get/set the state of the Show Far Attenuation checkbox.

<Photometric_Light>.startFarAttenuation Float default: 80.0 -- animatable; worldUnits; Start_Far_Attenuation

Get/set the Start Far Attenuation value.

<Photometric_Light>.endFarAttenuation Float default: 200.0 -- animatable; worldUnits; Vertical_Circle_Facing_Photometric_Horizontal

Get/set the End Far Attenuation value.

Shape / Area Shadows Rollout

<Photometric_Light>.type Name default: #Free_Point -- value

Get/Set the Type of the Photometric Light.

Possible values are:

#Free_Point

#Free_Line

#Free_Rectangle

#Free_Disc

#Free_Sphere

#Free_Cylinder

#Target_Point

#Target_Line

#Target_Rectangle

#Target_Disc

#Target_Sphere

#Target_Cylinder

Exposed by LightProperties Interface .

<Photometric_Light>.light_length Float default: 122.0 -- animatable; worldUnits

Get/set the length of the area light where applicable.

<Photometric_Light>.light_width Float default: 61.0 -- animatable; worldUnits

Get/set the width of the area light where applicable.

<Photometric_Area>.light_radius Float default: 13.0 -- animatable; worldUnits

Get/set the radius of the area light where applicable.

<Photometric_Light>.length Float default: 122.0 -- float

Get/set the length of the Area light.

<Photometric_Light>.width Float default: 61.0 -- float

Get/set the width of the Area light.

Distribution (Spotlight) Rollout

<Photometric_Light>.showCone BooleanClass default: false -- boolean; Cone_Display

Get/set the state of the "Cone visible in viewport when unselected" checkbox.

<Photometric_Light>.hotSpot Float default: 30.0 -- animatable; float; Beam_Angle

Get/set the Hotspot/Beam angle. Used only when .distribution is set to 1 - Spotlight.

<Photometric_Light>.falloff Float default: 60.0 -- animatable; float; Field_Angle

Get/set the Hotspot/Beam angle. Used only when .distribution is set to 1 - Spotlight.

Distribution (Photometric File) Rollout

<Photometric_Light>.webFile String default: "" -- filename; Web_Filename

The Web file used when .distribution is set to 0 - Web.

<Photometric_Light>.xRotation Float default: 0.0 -- float; X_Rotation

The Photometric Web X rotation value. Used only when .distribution is set to 0 - Web.

<Photometric_Light>.yRotation Float default: 0.0 -- float; Y_Rotation

The Photometric Web Y rotation value. Used only when .distribution is set to 0 - Web.

<Photometric_Light>.zRotation Float default: 0.0 -- float; Z_Rotation

The Photometric Web Z rotation value. Used only when .distribution is set to 0 - Web.

Shadow Parameters Rollout

Object Shadows

<Photometric_Light>.shadowColor Color default: (color 0 0 0) -- animatable; RGB color; Shadow_Color; Controller Scaling: ([1,1,1] : (color 255 255 255))

Get/set the shadow color value.

<Photometric_Light>.shadowMultiplier Float default: 1.0 -- animatable; float; Shadow_Density

Get/set the Shadow Density value.

<Photometric_Light>.shadowColorMapEnable BooleanClass default: false -- boolean; Use_Shadow_Color_Map

Get/set the state of the Shadow Map enable checkbox.

<Photometric_Light>.shadowProjectorMap UndefinedClass default: undefined -- texturemap; Shadow_Projector_Map

Get/set the Shadow Projector Map.

<Photometric_Light>.lightAffectsShadow BooleanClass default: false -- boolean; Light_Affects_Shadow

Get/set the state of the "Light Affects Shadow Color" checkbox.

Atmospheric Shadows

<Photometric_Light>.atmosShadows BooleanClass default: false -- boolean; Atmospheric_Shadows_On

Toggle atmosphere shadows on/off.

<Photometric_Light>.atmosColorAmt Float default: 100.0 -- animatable; float; Atmospheric_Color_Amount

Get/Set the atmosphere shadows color value.

<Photometric_Light>.atmosOpacity Float default: 100.0 -- animatable; float; Atmospheric_Opacity

Get/Set the atmosphere shadows opacity value.

Advanced Effects Rollout

<Photometric_Light>.contrast Float default: 0.0 -- animatable; float; Light_Contrast

Get/Set the Light Contrast value.

<Photometric_Light>.softenDiffuseEdge Float default: 0.0 -- animatable; float; Diffuse_Soften

Get/Set the Soften Diff. Edge value.

<Photometric_Light>.affectDiffuse BooleanClass default: true -- boolean; Affect_Diffuse

When true, the light affects the diffuse color.

<Photometric_Light>.affectSpecular BooleanClass default: true -- boolean; Affect_Diffuse

When true, the light affects the specular color.

<Photometric_Light>.ambientOnly BooleanClass default: false -- boolean; Ambient_Only

When set to true, the light affects the Ambient color only.

<Photometric_Light>.projector BooleanClass default: false -- boolean

Toggle the projector map on/off.

<Photometric_Light>.projectorMap UndefinedClass default: undefined -- texturemap; Projector_Map

Get/Set the projector map.

The following interface is explosed by all Photometric Lights:

Interface: LightProperties

Properties:

.type : value : Read|Write

Get/Set the Type of the Photometric Light.

Possible values are:

#Free_Point

#Free_Line

#Free_Rectangle

#Free_Disc

#Free_Sphere

#Free_Cylinder

#Target_Point

#Target_Line

#Target_Rectangle

#Target_Disc

#Target_Sphere

#Target_Cylinder

.distribution : value : Read|Write

Get/Set the distribution type.

Possible values are:

0 - Uniform Sphereical

1 - Spotlight (not valid for Sphere and Cylinder types)

2 - Uniform Hemispherical (not valid for Sphere and Cylinder types)

3 - Photometric Web File (not valid for Sphere and Cylinder types)

.excludeList : value : Read|Write

Get/Set the exclusion list as an array on objects. When setting the value, the Include/Exlude option will be set to Exclude.

.includeList : value : Read|Write

Get/Set an array of objects to be included in the illumination by the light. When setting the value, the Include/Exlude option will be set to Include.

.shadowGenerator : value : Read|Write

Get/Set the Shadow Generator as class instance.

.shadowGeneratorByName : value : Read|Write

Get/Set the Shadow Generator by name.

.raytracedShadows : value : Read|Write

Get/Set use of raytraced shadows.

NOTE:

This property should not be used in 3ds Max 5 and higher. Please use the .shadowGenerator property to assign a shadow generator.

The property is exposed for backwards compatibility only. In versions prior to 3ds Max 5, the only possible shadow generator types were Shadow Maps and Raytraced Shadows. Setting this property will switch the shadow generator internally. Currently, the number of possible shadow generators is much higher (including 3rd party plug-ins), so this property is obsolete.

.color : color by value : Read|Write

Get/Set the color.

.enabled : bool : Read|Write

Get/Set the enabled state.

See also

Photometric Light Classes

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Free_Area : Light

Free_Area - superclass: light; super-superclass:node - classID: #(911244690, 274340423)

Value > MAXWrapper > Node > Light > Free_Area

Constructor

Free_Area ...

Free_Recrangle ...

NEW in 3ds Max 2009: Since 3ds Max 2009, any Photometric Light can be turned into a Free_Area light by setting its .type property to #Free_Rectangle. See Photometric Light Classes for details.

Properties

See Photometric Lights Common Properties, Operators, and Methods

See also

Photometric Light Classes

Photometric Lights Common Properties, Operators and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Free_Cylinder : Light

Free_Cylinder - superclass: light; super-superclass:node - 63:14 - classID: #(1190540515, 171080367)

Value > MAXWrapper > Node > Light > Free_Cylinder

Constructor

Free_Cylinder ...

NEW in 3ds Max 2009: Since 3ds Max 2009, any Photometric Light can be turned into a Free_Cylinder light by setting its .type property to #Free_Cylinder. See Photometric Light Classes for details.

Properties

See Photometric Lights Common Properties, Operators, and Methods

See also

Photometric Light Classes

Photometric Lights Common Properties, Operators and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Free_Disc : Light

Free_Disc - superclass: light; super-superclass:node - 63:14 - classID: #(1540123970, 206521102)

Value > MAXWrapper > Node > Light > Free_Disc

Constructor

Free_Disc ...

NEW in 3ds Max 2009: Since 3ds Max 2009, any Photometric Light can be turned into a Free_Disc light by setting its .type property to #Free_Disc. See Photometric Light Classes for details.

Properties

See Photometric Lights Common Properties, Operators, and Methods

See also

Photometric Light Classes

Photometric Lights Common Properties, Operators and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Free_Linear : Light

Free_Linear - superclass: light; super-superclass:node - classID: #(2015392769, 897523032)

Value > MAXWrapper > Node > Light > Free_Linear

Constructor

Free_Linear ...

NEW in 3ds Max 2009: Since 3ds Max 2009, any Photometric Light can be turned into a Free_Linear light by setting its .type property to #Free_Linear. See Photometric Light Classes for details.

Properties

See Photometric Lights Common Properties, Operators, and Methods

See also

Photometric Light Classes

Photometric Lights Common Properties, Operators and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Free_Point : Light

Free_Light : Light

Free_Light - superclass: light; super-superclass:node - classID: #(842489804, 184704240)

Value > MAXWrapper > Node > Light > Free_Light

Constructor

Free_Light ...
Free_Point ...

NEW in 3ds Max 2009: Since 3ds Max 2009, any Photometric Light can be turned into a Free_Light light by setting its .type property to #Free_Point. See Photometric Light Classes for details.

In versions prior to 3ds Max 2009, the class with the same ClassID was called Free_Point. The name is still available as Constructor alias.

Properties

See Photometric Lights Common Properties, Operators, and Methods

See also

Photometric Light Classes

Photometric Lights Common Properties, Operators and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Free_Sphere : Light

Free_Sphere - superclass: light; super-superclass:node - 63:14 - classID: #(2091464066, 448490290)

Value > MAXWrapper > Node > Light > Free_Sphere

Constructor

Free_Sphere ...

NEW in 3ds Max 2009: Since 3ds Max 2009, any Photometric Light can be turned into a Free_Sphere light by setting its .type property to #Free_Sphere. See Photometric Light Classes for details.

Properties

See Photometric Lights Common Properties, Operators, and Methods

See also

Photometric Light Classes

Photometric Lights Common Properties, Operators and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


IES_Sky : Light

IES_Sky - superclass: light; super-superclass:node - classID: #(1260657425, 1692947069)

Value > MAXWrapper > Node > Light > IES_Sky

Instances of the IES_Sky light class are used to simulate natural sky light.

Constructor

IES_Sky...

IesSkyLight...

Properties

<IES_Sky>.multiplier Float default: 1.0 -- animatable; float

The light multiplier controls the intensity of the skylight.

<IES_Sky>.color Color default: (color 242.25 242.25 255) -- animatable

Gets/Sets the sky color

<IES_Sky>.on Boolean default: true -- boolean

Gets/Sets the enabled state of the light.

<IES_Sky>.sky_cover Float default: 0.0 -- animatable; float

Determines how much light is scattered through the sky. 0.0 is Clear, 1.0 is Cloudy.

<IES_Sky>.enabled Boolean default: true -- alias for on

Gets/Sets the enabled state of the light.

<IES_Sky>.rgb Color default: (color 255 255 255) -- animatable; alias for color

Gets/Sets the sky color

<IES_Sky>.rays_per_sample Integer default: 20 -- animatable; integer

Gets/Sets the number of rays per sample

<IES_Sky>.ray_bias Float default: 0.005 -- animatable; float

Gets/Sets the ray bias

<IES_Sky>.castShadows BooleanClass default: false -- animatable; Boolean; Cast_Shadows

Enable/Disable shadow casting.

IES_Sky interfaces:

Interface: NaturalLightClass

Properties:

Methods:

<boolean>isSun()

Returns true if the list is a Sun light. In the case of IES_Sky, it will return false.

<boolean>isSky()

Returns true if the list is a Sky light. In the case of IES_Sky, it will return true.

Actions:

See also

IES_Sun : Light

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


IES_Sun : Light

IES_Sun - superclass: light; super-superclass:node - classID: #(603881295, 114241513)

Value > MAXWrapper > Node > Light > IES_Sun

Instances of the IES_Sun class are used to simulate natural sunlight.

NOTE:

Instances of this class are usually created in the 3ds Max UI as part of the Daylight System .

Constructor

IES_Sun...

freeIesSun...

Properties

<IES_Sun>.absoluteMapBias Boolean default: false -- animatable; boolean; Absolute_Bias

Enable/Disable the Absolute Shadow Map Bias.

<IES_Sun>.affectDiffuse Boolean default: true -- boolean; Affect_Diffuse

Get/Set the state of the Diffuse checkbox under Advanced Effects > Affect Surfaces

<IES_Sun>.affectSpecular Boolean default: true -- boolean; Affect_Specular

Get/Set the state of the Specular checkbox under Advanced Effects > Affect Surfaces

<IES_Sun>.atmosColorAmt Float default: 100.0 -- animatable; percentage; Atmosphere_Color_Amount

Get/Set the Shadow Amount value under Shadow Parameters > Atmosphere Shadows. Controls how much of the atmosphere color is blended with the shadow color.

<IES_Sun>.atmosOpacity Float default: 100.0 -- animatable; percentage; Atmosphere_Opacity

Get/Set the Opacity value under Shadow Parameters > Atmosphere Shadows

<IES_Sun>.atmosShadows Boolean default: false -- boolean; Atmosphere_Shadows

Enable/Disable the On checkbox under Shadow Parameters > Atmosphere Shadows.

<IES_Sun>.castShadows Boolean default: false -- boolean; Cast_Shadows

Enable/Disable the Shadow Casting.

<IES_Sun>.contrast Float default: 0.0 -- animatable; percentage

Get/Set the Contrast value under Advanced Effects > Affect Surfaces

<IES_Sun>.hasTarget Boolean default: true -- boolean; Has_Target

Get/Set the Target option. When set to true, the Sun will have target.

<IES_Sun>.mapbias Float default: 1.0 -- animatable; float; Map_Bias

Get/Set the Shadow Map Bias.

<IES_Sun>.mapsize Integer default: 512 -- animatable; integer; Map_Size

Get/Set the Shadow Map Size.

<IES_Sun>.multiplier Float default: 80000.0 -- animatable; float

Get/Set the Light Intensity value.

<IES_Sun>.on Boolean default: true -- boolean

Enable/Disable the Light.

<IES_Sun>.rgb Color default: (color 255 242.25 229.5) -- animatable; RGB color

Get/Set the Light Color.

<IES_Sun>.samplerange Float default: 4.0 -- animatable; float; Map_Range

Get/Set the Shadow Map Sample Range.

<IES_Sun>.shadowMultiplier Float default: 1.0 -- animatable; float; Shadow_Density

Get/Set the Shadow Density value.

<IES_Sun>.softenDiffuseEdge Float default: 50.0 -- animatable; percentage; Diffuse_Soften

Get/Set the Soften Diffuse Edge. Increasing the value of Soften Diffuse Edge softens the edge between the diffuse and ambient portions of a surface. This helps eliminate edges that can appear on a surface under certain circumstances.

<IES_Sun>.targetDistance Float default: 240.0 -- animatable; float; Target_Distance

Get/Set the Target Distance.

<IES_Sun>.twoSidedShadows Boolean default: false -- boolean

Get/Set the Two Sided Shadows option. When on, backfaces are not ignored when calculating shadows. Objects seen from the inside are not lit by lights from the outside. This costs a bit more render time. When off, backfaces are ignored. Rendering is quicker, but outside lights illuminate object interiors.

<IES_Sun>.useGlobalShadowSettings BooleanClass default: false -- boolean; Use_Global_Shadow_Settings

When set to true, the global shadow settings will be used.

IES_Sun interfaces:

Interface: NaturalLightClass

Properties:

Methods:

<boolean>isSun()

Returns true if the list is a Sun light. In the case of IES_Sun, it will return true.

<boolean>isSky()

Returns true if the list is a Sky light. In the case of IES_Sun, it will return false.

EXAMPLE:

sun = freeIesSun()

sun.NaturalLightClass.isSun()

true

sun.isSky() -- can be called without explicitly giving the interface name

false

See also

IES_Sky : Light

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Target_Area : Light

Target_Area - superclass: light; super-superclass:node - classID: #(1903775645, 1890472690)

Value > MAXWrapper > Node > Light > Photometric > Target_Area

Constructor

Target_Area ...

Target_Rectangle ...

NEW in 3ds Max 2009: Since 3ds Max 2009, any Photometric Light can be turned into a Target_Area light by setting its .type property to #Target_Rectangle. See Photometric Light Classes for details.

Properties

See Photometric Lights Common Properties, Operators, and Methods

See also

Photometric Light Classes

Photometric Lights Common Properties, Operators and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Target_Cylinder : Light

Target_Cylinder - superclass: light; super-superclass:node - 63:14 - classID: #(2089507600, 1272135302)

Value > MAXWrapper > Node > Light > Photometric > Target_Cylinder

Constructor

Target_Cylinder ...

NEW in 3ds Max 2009: Since 3ds Max 2009, any Photometric Light can be turned into a Target_Area light by setting its .type property to #Target_Cylinder. See Photometric Light Classes for details.

Properties

See Photometric Lights Common Properties, Operators, and Methods

See also

Photometric Light Classes

Photometric Lights Common Properties, Operators and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Target_Disc : Light

Target_Disc - superclass: light; super-superclass:node - 63:14 - classID: #(947069768, 538400947)

Value > MAXWrapper > Node > Light > Photometric > Target_Disc

Constructor

Target_Disc ...

NEW in 3ds Max 2009: Since 3ds Max 2009, any Photometric Light can be turned into a Target_Area light by setting its .type property to #Target_Disc. See Photometric Light Classes for details.

Properties

See Photometric Lights Common Properties, Operators, and Methods

See also

Photometric Light Classes

Photometric Lights Common Properties, Operators and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Target_Linear : Light

Target_Linear - superclass: light; super-superclass:node - classID: #(1158113413, 1081676873)

Value > MAXWrapper > Node > Light > Photometric > Target_Linear

Constructor

Target_Linear ...

Target_Light ...

NEW in 3ds Max 2009: Since 3ds Max 2009, any Photometric Light can be turned into a Target_Linear light by setting its .type property to #Target_Linear. See Photometric Light Classes for details.

Properties

See Photometric Lights Common Properties, Operators, and Methods

See also

Photometric Light Classes

Photometric Lights Common Properties, Operators and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Target_Point : Light

Target_Light : Light

Target_Light - superclass: light; super-superclass:node - classID: #(1703759767, 1926054489)

Value > MAXWrapper > Node > Light > Photometric > Target_Light

Constructor

Taget_Light ...
Target_Point ...

NEW in 3ds Max 2009: Since 3ds Max 2009, any Photometric Light can be turned into a Target_Light light by setting its .type property to #Target_Point. See Photometric Light Classes for details.

Prior to 3ds Max 2009, the class with the same ClassID was called Target_Point. The name is still available as Constructor alias.

Properties

See Photometric Lights Common Properties, Operators, and Methods

See also

Photometric Light Classes

Photometric Lights Common Properties, Operators and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Target_Sphere : Light

Target_Sphere - superclass: light; super-superclass:node - 63:14 - classID: #(872184553, 1413692869)

Value > MAXWrapper > Node > Light > Photometric > Target_Sphere

Constructor

Target_Sphere ...

NEW in 3ds Max 2009: Since 3ds Max 2009, any Photometric Light can be turned into a Target_Area light by setting its .type property to #Target_Sphere. See Photometric Light Classes for details.

Properties

See Photometric Lights Common Properties, Operators, and Methods

See also

Photometric Light Classes

Photometric Lights Common Properties, Operators and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


mr_Sky : light

mr_Sky - superclass: light; super-superclass:node - 11:0 - classID: #(653144912, 2040224598)

Value > MAXWrapper > Node > Light > mr_Sky

The mr_Sky Photometric light provides physically-based skylight illumination, esp. in conjunction with the mr_Physical_Sky : textureMap environment shader and mr_Sun : Light

Available in 3ds Max 9 and higher.

Constructor

mr_Sky...

mrPhysSkyLight...

Properties

mr Sky - Parameters

<mr_Sky>.on BooleanClass default: true -- boolean

<mr_Sky>.enabled BooleanClass default: true -- alias for on

Get/set the state of the On (Enabled) checkbox.

<mr_Sky>.multiplier Float default: 1.0 -- animatable; float

Get/set the Multiplier value.

<mr_Sky>.GroundColor Color default: (color 51 51 51) -- animatable; fRGBA color; Ground_Color; Controller Scaling: ([1,1,1,1] : (color 255 255 255));

Get/set the Ground Color value.

mr Sky - Haze

<mr_Sky>.Haze Float default: 0.0 -- animatable; float

Get/set the Haze value.

Perez Parameters

<mr_Sky>.PerezDiffuseHorizIlluminanceUI Float default: 10000.0 -- float; Perez_Diffuse_Horiz__Illuminance

NEW in 3ds Max 2009: Get/set the Diffuse Horizontal Illuminance value exposed in the UI.

<mr_Sky>.PerezDirectNormalIlluminanceUI Float default: 10000.0 -- float; Perez_Direct_Normal_Illuminance_UI

NEW in 3ds Max 2009: Get/set the Direct Normal Illuminance value exposed in the UI.

<mr_Sky>.PerezDirectNormalIlluminance Float default: 10000.0 -- float; Perez_Direct_Normal_Illuminance

NEW in 3ds Max 2009: Get/set the internal Direct Normal Illuminance value.

<mr_Sky>.Perez_Dew_Point_Temp Float default: 0.0 -- float; Dew_Point_Temp

NEW in 3ds Max 2009: Get/set the internal Dew Point Temperature value.

<mr_Sky>.PerezDiffuseHorizIlluminance Float default: 10000.0 -- float; Perez_Diffuse_Horiz__Illuminance

NEW in 3ds Max 2009

<mr_Sky>.PerezDiffuseHorizIrradiance Float default: 10000.0 -- float; Perez_Diffuse_Horiz__Irradiance

NEW in 3ds Max 2009: Get/set the internal Diffuse Horizontal Irradiance value.

<mr_Sky>.PerezDirectNormalIrradiance Float default: 10000.0 -- float; Perez_Direct_Normal_Irradiacne

NEW in 3ds Max 2009: Get/set the internal Direct Normal Irradiance value.

mr Sky - CIE Parameters

<mr_Sky>.CIEDiffuseHorizIlluminance Float default: 10000.0 -- float; CIE_Diffuse_Horiz__Illuminance

NEW in 3ds Max 2009: Get/set the CIE Diffuse Horizontal Illuminance value.

<mr_Sky>.CIEDiffuseHorizIlluminanceUI Float default: 10000.0 -- float; CIE_Diffuse_Horiz__Illuminance_UI

NEW in 3ds Max 2009: Get/set the CIE Diffuse Horizontal Illuminance UI value.

<mr_Sky>.CIEDirectNormalIlluminance Float default: 10000.0 -- float; CIE_Direct_Normal_Illuminance

NEW in 3ds Max 2009: Get/set the CIE Direct Normal Illuminance value.

<mr_Sky>.CIEDirectNormalIlluminanceUI Float default: 10000.0 -- float; CIE_Direct_Normal_Illuminance_UI

NEW in 3ds Max 2009: Get/set the CIE Direct Normal Illuminance UI value.

<mr_Sky>.CIEModel Integer default: 0 -- integer; CIE_Model

NEW in 3ds Max 2009: Get/set the CIE Model drop-down list index.

Possible values are:

0 - Overcast sky

1 - Clear sky

mr Sky - Advanced Parameters

<mr_Sky>.HorizonHeight Float default: 0.0 -- animatable; float; Saturation

Get/set the Horizon Height value.

<mr_Sky>.HorizonBlur Float default: 0.1 -- animatable; float; Horizon_Blur

Get/set the Horizon Blur value.

<mr_Sky>.NightColor Color default: (color 0 0 0) -- animatable; fRGBA color; Night_Color; Controller Scaling: ([1,1,1,1] : (color 255 255 255));

Get/set the Night Color value.

<mr_Sky>.Redness Float default: 0.0 -- animatable; float

Get/set the Red/Blue Tint value.

<mr_Sky>.Saturation Float default: 1.0 -- animatable; float

Get/set the Saturation value.

<mr_Sky>.UseAerialPerspective BooleanClass default: true -- boolean; Use_Aerial_Perspective

Get/set the state of the Aerial Perspective checkbox.

<mr_Sky>.AerialPerspective Float default: 393701.0 -- animatable; float; Aerial_Perspective

Get/set the Aerial Perspective value.

mr_Sky interfaces:

Interface: NaturalLightClass

Methods:

<boolean>isSun()

<boolean>isSky()


mr_Sun : Light

mr_Sun - superclass: light; super-superclass:node - 27:10 - classID: #(1901083579, 635572516)

Value > MAXWrapper > Node > Light > mr_Sun

The mr_Sun Photometric light provides physically-based sunlight, esp. in conjunction with the mr_Sun : Light and the mr_Physical_Sky : textureMap environment shader.

Available in 3ds Max 9 and higher.

Constructor

mr_Sun...

mentalraySun...

Properties

mr Sub - Basic Parameters

<mr_Sun>.on BooleanClass default: true -- boolean

<mr_Sun>.enabled BooleanClass default: true -- boolean

Get/set the state of the "On" checkbox.

<mr_Sun>.skymult Float default: 1.0 -- animatable; float; Multiplier

Get/set the "Multiplier" value.

<mr_Sun>.hasTarget BooleanClass default: true -- boolean; Has_Target

Get/set the state of the "Targeted" checkbox.

<mr_Sun>.castShadows BooleanClass default: true -- boolean; Cast_Shadows

Get/set the state of the Shadows "On" checkbox.

<mr_Sun>.shadowSoftness Float default: 1.0 -- animatable; float; Shadow_Softness

Get/set the Shadow "Softness" value.

<mr_Sun>.shadowSamples Integer default: 8 -- integer; Shadow_Samples

Get/set the "Softness Samples" value.

<mr_Sun>.inherit BooleanClass default: true -- boolean; Inherit_from_mr_Sky

Get/set the state of the "Inherit from mr Sky" checkbox.

<mr_Sun>.redblueshift Float default: 0.0 -- animatable; float; Redness

Get/set the "Red/Blue Tint" value.

<mr_Sun>.Saturation Float default: 1.0 -- animatable; float

Get/set the "Saturation" value.

mr Sun - Photons

<mr_Sun>.usephotontarget BooleanClass default: false -- boolean; Use_Photon_Target

Get/set the state of the "Use Photon Target" checkbox.

<mr_Sun>.photontarget Float default: 0.0 -- animatable; float; Photon_Target

Get/set the Photon Target Radius value.

mr Sun - Properties not exposed to the UI

<mr_Sun>.color Color default: (color 255 242.25 229.5) -- color by value

<mr_Sun>.rgb Color default: (color 255 242.25 229.5) -- animatable; RGB color

Get/set the Sun Color.

<mr_Sun>.multiplier Float default: 1.0 -- animatable; float; intensity

Get/set the multiplier value.

<mr_Sun>.targetDistance Float default: 240.0 -- animatable; float; Target_Distance

Get/set the target distance.

<mr_Sun>.includeList UndefinedClass default: undefined -- value;

Get/set the Include List.

<mr_Sun>.excludeList Array default: #() -- value

Get/set the Exclude List.

<mr_Sun>.Haze Float default: 1.0 -- animatable; float

Get/set the Haze value.

<mr_Sun>.HorizonHeight Float default: 0.0 -- animatable; float; Horizon_Height

Get/set the Horizontal Height value.

<mr_Sun>.shadowGenerator raytraceShadow default: raytraceShadow:raytraceShadow -- value; SubAnim

Get/set the shadow generator class instance.

<mr_Sun>.shadowGeneratorByName String default: "Ray Traced Shadows" -- value

Get/set the shadow generator by name.

<mr_Sun>.raytracedShadows BooleanClass default: true -- value

Get/set whether to use Raytraced Shadows. This property is obsolete and exposed for backwards compatibility only.

<mr_Sun>.maxDepth Integer default: 7 -- animatable; integer; Max_Quadtree_Depth

Get/set the max. Depth of Raytraced shadows QuadTree.

<mr_Sun>.raytraceBias Float default: 0.2 -- animatable; float; Bias

Get/set the Bias of the raytraced shadows.

<mr_Sun>.twoSidedShadows BooleanClass default: false -- boolean

Get/set whether to calculate two-sided shadows.

<mr_Sun>.useGlobalShadowSettings BooleanClass default: false -- boolean; Use_Global_Shadow_Settings

Get/set whether to use the Global shadow settings.

mr_Sun interfaces:

Interface: NaturalLightClass

Methods:

<boolean>isSun()

<boolean>isSky()

Interface: LightProperties

Properties:

.excludeList : value : Read|Write

.includeList : value : Read|Write

.shadowGenerator : value : Read|Write

.shadowGeneratorByName : value : Read|Write

.raytracedShadows : value : Read|Write

.color : color by value : Read|Write

.enabled : bool : Read|Write


Light Common Properties, Operators, and Methods

Value > MAXWrapper > Node > Light

The following properties apply only to the 3ds Max light types: DirectionalLight, FreeSpot, OmniLight, TargetSpot and TargetDirectionalLight.

<light>.type Name default: #freeDirect

the valid type values are:

#omni

#freeSpot

#targetSpot

#freeDirect

#targetDirect

<light>.enabled Boolean default: true -- alias: on

Turns the light on and off. When on, shading and rendering use the light to illuminate the scene. When off, the light is not used in shading or rendering.

<light>.excludeList Array default: #()

Objects in this array are excluded from the effects of the light.

<light>.includeList Array default: undefined

Objects in this array receive the effects of the light.

NOTE:

Setting includelist or excludelist sets the other to undefined.

<light>.inclExclType      Integer   default: 3

Select the type of object in the Include/Exclude list:

1- Illumination

2- Shadow Casting

3- Both

<light>.castShadows Boolean default: false

When on, the light will cast shadows on objects.

NOTE:

In 3ds Max, all node-level properties are searched before base-object-level properties. If a base-object property has the same name as a node-level property, you need to search in the base object for the base object property. You should use <light>.baseObject.castShadows instead,

FOR EXAMPLE:

$Omni01.baseObject.castShadows = false

<light>.rgb Color default: (color 180 180 180) -- animatable, alias: color

The red, green, and blue components of the light's color.

<light>.hsv Point3 default: [0,0,180]

Hue, Saturation, and Value color of light.

<light>.hue Integer default: 0

Hue component of hsv.

<light>.saturation Integer default: 0

Saturation component of hsv.

<light>.value Integer default: 180

Value component of hsv.

<light>.multiplier Float default: 1.0 -- animatable

Amplifies the power of the light by a positive or negative amount.

<light>.contrast Float default: 0.0 -- animatable

Adjusts the contrast between the diffuse and ambient areas of the surface. Leave this set to 0 for normal contrast. Increase the value to increase the contrast for special effects: for example, the harsh light of outer space.

<light>.softenDiffuseEdge Float default: 0.0 -- animatable, alias: Diffuse_Soften

Increasing the value of Soften Diffuse Edge softens the edge between the diffuse and ambient portions of a surface. This helps eliminate edges that can appear on a surface under certain circumstances.

<light>.affectDiffuse Boolean default: true

When on, the light affects the diffuse properties of an object's surface. When off, the light has no effect on the diffuse surface.

<light>.affectSpecular Boolean default: true

When on, the light affects the specular properties of an object's surface. When off, the light has no effect on the specular properties.

<light>.ambientOnly Boolean default: false

When on, the light affects only the ambient component of the illumination.

<light>.projector Boolean default: false

Turn on to project projectorMap.

<light>.projectorMap TextureMap default: undefined

Assigning a TextureMap to projectorMap causes a new subAnim named Projection_Map to be created for the light. This subAnim contains the properties of the TextureMap. You can set the property to undefined to remove the map.

NOTE:

Assigning a Projector TextureMap adds a subAnim to the properties list. The properties of the subAnim are the properties of the TextureMap.

<light>.useShadowProjectorMap   Boolean   default: false

When on, the light will project a map.

<light>.nearAttenStart Float default: 0.0 -- alias: animatable, alias: Attenuation_Near_Start

The distance at which the light begins to fade in.

<light>.nearAttenEnd Float default: 40.0 -- alias: animatable, alias: Attenuation_Near_End

The distance at which the light reaches its full value.

<light>.useNearAtten Boolean default: false

Enables/Disables near attenuation for the light.

<light>.showNearAtten Boolean default: false

When on, displays the near attenuation range settings in viewports. For spotlights, attenuation ranges appear as lens-shaped sections of the cone. For directional lights, the ranges appear as circular sections of the cone. For omni lights and spot or directional lights with Overshoot turned on, the ranges appear as spheres.

<light>.farAttenStart Float default: 80.0 -- animatable, alias: Attenuation_Far_Start

The distance at which the light begins to fade out.

<light>.farAttenEnd Float default: 200.0 -- animatable, alias: Attenuation_Far_End

The distance at which the light has faded to zero.

<light>.useFarAtten Boolean default: false

Enables/Disables far attenuation for the light.

<light>.showFarAtten Boolean default: false

Displays the far attenuation range settings in viewports. For spotlights, attenuation ranges appear as lens-shaped sections of the cone. For directional lights, the ranges appear as circular sections of the cone. For omni lights and spot or directional lights with Overshoot turned on, the ranges appear as spheres.

<light>.attenDecay Integer default: 1

The type of decay to use:

1- None (Applies no decay. The light maintains full strength from its source to infinity, unless you turn on far attenuation.)

2- Inverse (Applies inverse decay. The formula is luminance=R0/R, where R0 is the radial source of the light if no attenuation is used, or the Near End value of the light if Attenuation is used. R is the radial distance of the illuminated surface from R0.)

3- Inverse Square (Applies inverse-square decay. The formula for this is (R0/R)2. This is actually the "real-world" decay of light, but you might find it too dim in the world of computer graphics.)

<light>.DecayRadius Float default: 40.0 -- animatable, alias: Decay_Falloff

The distance over which the decay occurs.

<light>.useGlobalShadowSettings Boolean default: false

Turn on to use global settings for shadows cast by this light. Turn off to enable individual control of the shadows.

<light>.raytracedShadows Boolean default: false

NOTE:

This property should not be used in 3ds Max 5 and higher. Please use the .shadowGenerator property described below to assign a shadow generator to the light.

In versions prior to 3ds Max 5, this property controlled the raytraced shadows generator usage. When true, a raytraceShadow class instance was assigned automatically. When false, a shadowMap class instance was assigned automatically.

<light>.shadowGenerator shadowMap default: shadowMap:shadowMap -- SubAnim

The shadow generator class used by the light. Can be a shadowMap , raytraceShadow , Adv__Ray_traced or Area_Shadows class instance. See also MAXScript FAQ: How do I change the Shadow type of a Light?

EXAMPLE

--assign shadow map shadows to the light Omni01:

$Omni01.shadowGenerator = shadowMap()

-- assign ractraced shadows to light Omni02:

$Omni02.shadowGenerator = raytraceShadow()

<light>.ShadowColor Color default: (color 0 0 0) -- animatable, alias: Shadow_Color

The color of shadows cast by this light.

<light>.shadowMultiplier Float default: 1.0 -- animatable, alias: Shadow_Density

Controls the density of the shadow. Lower values make the shadow more transparent.

<light>.shadowProjectorMap TextureMap default: undefined

Assigning a TextureMap to shadowProjectorMap causes a new subAnim named Shadow_Projection_Map to be created for the light. This subAnim contains the properties of the TextureMap. You can set the property to undefined to remove the map.

<light>.twoSidedShadows Boolean default: true

When on, backfaces are not ignored when calculating shadows. Objects seen from the inside are not lit by lights from the outside. This costs a bit more render time. When off, backfaces are ignored. Rendering is quicker, but outside lights illuminate object interiors.

<light>.lightAffectsShadow Boolean default: false

When on, blends the light's color with the shadow color (or shadow colors, if the shadow is mapped).

<light>.atmosShadows Boolean default: true

When on, atmospheric effects cast shadows as the light passes through them.

<light>.atmosOpacity Float default: 100.0 -- animatable, percentage, alias: Atmosphere_Opacity

Adjusts the opacity of the shadows. This value is a percentage.

<light>.atmosColorAmt Float default: 100.0 -- animatable, percentage, alias: Atmosphere_Color_Amount

Adjusts the amount that the atmosphere's color is blended with the shadow color.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


DirectionalLight : Light

Directionallight - superclass: light; super-superclass:node - classID: #(4115, 0)

Value > MAXWrapper > Node > Light > DirectionalLight

Constructor

directionalLight ...

Properties

<DirectionalLight>.aspect Float default: 1.0 -- animatable, alias: Aspect_Ratio

The aspect ratio for the rectangular light beam.

<DirectionalLight>.falloff Float default: 45.0 -- animatable

The size of a light's falloff. The Falloff value is measured in 3ds Max units.

<DirectionalLight>.showCone Boolean default: false

Turns display of the cone on or off.

<DirectionalLight>.hotspot Float default: 43.0 -- animatable

The size of a light's cone. The Hotspot value is measured in 3ds Max units.

<DirectionalLight>.overShoot Boolean default: false

When overshoot is on, the light casts light in all directions. However, projections and shadows occur only within its falloff cone.

<DirectionalLight>.coneShape Integer default: 1 -- alias: lightShape

The shape of the falloff and hotspot areas:

1- Circle

2- Rectangle

See also

Light Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


FreeSpot : Light

freeSpot - superclass: light; super-superclass:node - classID: #(4116, 0)

Value > MAXWrapper > Node > Light > FreeSpot

Constructor

freeSpot ...

Properties

<Freespot>.aspect Float default: 1.0 -- animatable, alias: Aspect_Ratio

The aspect ratio for the rectangular light beam.

<Freespot>.falloff Float default: 45.0 -- animatable

The angle of a light's falloff. The Falloff value is measured in degrees.

<Freespot>.showCone Boolean default: false

Turns display of the cone on or off.

<Freespot>.hotspot Float default: 43.0 -- animatable

The angle of a light's cone. The Hotspot value is measured in degrees.

<Freespot>.overShoot Boolean default: false

When on, the light casts light in all directions. However, projections and shadows occur only within its falloff cone.

<Freespot>.coneShape Integer default: 1 -- alias: lightShape

The shape of the falloff and hotspot areas:

1- Circle

2- Rectangle

See also

Light Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


OmniLight : Light

Omnilight - superclass: light; super-superclass:node - classID: #(4113, 0)

Value > MAXWrapper > Node > Light > OmniLight

Constructor

omniLight ...

Properties

There are no additional properties for OmniLight.

See also

Light Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Skylight : Light

Skylight - superclass: light; super-superclass:node - classID: #(2079724664, 1378764549)

Value > MAXWrapper > Node > Light > Skylight

The Skylight is a Natural light used to simulate outdoor illumination.

Constructor

Skylight...

TexSkyLight...

Properties

<Skylight>.multiplier Float default: 1.0 -- animatable; float

The light multiplier controls the intensity of the skylight.

<Skylight>.color Color default: (color 242.25 242.25 255) -- animatable

The sky color used by mode 1

<Skylight>.on Boolean default: true -- boolean

Toggle the light on and off.

<Skylight>.sky_color_map TextureMap default: undefined -- texmap

The map used to define the color of the sky

<Skylight>.sky_color_map_on Boolean default: true -- animatable; boolean

Toggle the color map usage on/off.

<Skylight>.sky_color_map_amt Float default: 100.0 -- animatable; float

Sets the opacity of the map. When it is 0, only the Sky Color is used. When it is 100, only the map is used.

<Skylight>.sky_mode Integer default: 1 -- integer; Skylight_Mode

Controls the sky mode:

0 - Use Scene Environment

1 - Sky Color

<Skylight>.enabled Boolean default: true -- alias for on

Toggle the light on and off.

<Skylight>.rgb Color default: (color 255 255 255) -- animatable; alias for color

The sky color used by mode 1

<Skylight>.rays_per_sample Integer default: 20 -- animatable; integer

Get/Set the number of rays per sample

<Skylight>.ray_bias Float default: 0.005 -- animatable; float

Get/Set the rays bias value

<Skylight>.castShadows BooleanClass default: false -- animatable; boolean; Cast_Shadows

Toggle shadow casting on/off.

Skylight interfaces:

Interface: NaturalLightClass

Properties:

Methods:

<boolean>isSun()

Returns true if the light is a Sun light. In the case of Skylight, it will return false.

<boolean>isSky()

Returns true if the light is a Sky light. In the case of Skylight, it will return true.

See also

Texture_Sky

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


TargetDirectionalLight : Light

TargetDirectionalLight - superclass: light; super-superclass:node - classID: #(4117, 0)

Value > MAXWrapper > Node > Light > TargetDirectionalLight

Constructor

targetDirectionalLight ...

Properties

<TargetDirectionallight>.aspect Float default: 1.0 -- animatable, alias: Aspect_Ratio

The aspect ratio for the rectangular light beam.

<TargetDirectionallight>.falloff Float default: 45.0 -- animatable

The angle of a light's falloff. The Falloff value is measured in degrees.

<TargetDirectionallight>.showCone Boolean default: false

Turns display of the cone on or off.

<TargetDirectionallight>.hotspot Float default: 43.0 -- animatable

The angle of a light's cone. The Hotspot value is measured in degrees.

<TargetDirectionallight>.overShoot Boolean default: false

When on, the light casts light in all directions. However, projections and shadows occur only within its falloff cone.

<TargetDirectionallight>.coneShape Integer default: 1 -- alias: lightShape

The shape of the falloff and hotspot areas:

1- Circle

2- Rectangle

NOTES:

In MAXScript, you must explicitly construct a target for those objects that need one.

FOR EXAMPLE:

c = TargetDirectionallight pos:[x,y,z] target:(targetObject pos:[xt,yt,zt])

Note that the name of the target isn't derived from the name of the object being created. The above example creates a Target Spot ($Direct01) and target ($Target01). If you create the Target Direct in the UI, the target name would be $Direct01.Target.

See additional notes under TargetObject : GeometryClass

See also

Light Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


TargetSpot : Light

targetSpot - superclass: light; super-superclass:node - classID: #(4114, 0)

Value > MAXWrapper > Node > Light > TargetSpot

Constructor

targetSpot ...

Properties

<Targetspot>.aspect Float default: 1.0 -- animatable, alias: Aspect_Ratio

The aspect ratio for the rectangular light beam.

<Targetspot>.falloff Float default: 45.0 -- animatable

The angle of a light's falloff. The Falloff value is measured in degrees.

<Targetspot>.showCone Boolean default: false

Turns display of the cone on or off.

<Targetspot>.hotspot Float default: 43.0 -- animatable

The angle of a light's cone. The Hotspot value is measured in degrees.

<Targetspot>.overShoot Boolean default: false

When on, the light casts light in all directions. However, projections and shadows occur only within its falloff cone.

<Targetspot>.coneShape Integer default: 1 -- alias: lightShape

The shape of the falloff and hotspot areas:

1- Circle

2- Rectangle

NOTES:

In MAXScript, you must explicitly construct a target for those objects that need one.

FOR EXAMPLE:

c = Targetspot pos:[x,y,z] target:(targetObject pos:[xt,yt,zt])

Note that the name of the target isn't derived from the name of the object being created. The above example creates a Target Spot ($Spot01) and target ($Target01). If you create the Target spot in the UI, the target name would be $Direct01.Target.

See additional notes under TargetObject : GeometryClass

See also

Light Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Texture_Sky : Light

Texture_Sky - superclass: light; super-superclass:node - classID: #(2079724664, 1378764549)

Value > MAXWrapper > Node > Light > Texture_Sky

NOTE:

In 3ds Max 5 and higher, this light is implemented by the Skylight class. The Texture_Sky class was initially implemented in Autodesk VIZ.

Constructor

Texture_Sky ...

Properties

<Texture_Sky>.on Boolean default: true -- boolean

Toggle the light on and off.

<Texture_Sky>.enabled Boolean default: true -- alias for on

Toggle the light on and off.

<Texture_Sky>.multiplier Float default: 1.0 -- animatable; float

The light multiplier controls the intensity of the skylight.

<Texture_Sky>.sky_mode Integer default: 1 -- integer; Skylight_Mode

Controls the sky mode:

0 - Use Scene Environment

1 - Sky Color

<Texture_Sky>.color Color default: (color 242.25 242.25 255) -- animatable; RGB color

The sky color used by mode 1

<Texture_Sky>.rgb Color default: (color 255 255 255) -- animatable; alias for color

The sky color used by mode 1

<Texture_Sky>.affectDiffuse Boolean default: true -- animatable; boolean; Affect_Diffuse

Corresponds to the Diffuse Illumination checkbox in the UI. When set to true, Light is reflected in all directions, with the most intense light emitting at a right angle to the skylight.

<Texture_Sky>.affectSpecular Boolean default: false -- animatable; boolean; Affect_Specular

Corresponds to the Specular Illumination checkbox in the UI. Light is reflected in one direction at an angle equal to the angle at which the rays arrive at the surface of the skylight.

<Texture_Sky>.castShadows Boolean default: true -- animatable; boolean; Cast_Shadows

Toggle shadow casting on / off.

<Texture_Sky>.exponent Float default: 30.0 -- animatable; float; Specular_Exponent

Controls the amount of sampling of specular surfaces. Higher value increase quality but reduce speed.

<Texture_Sky>.sky_color_map_on Boolean default: true -- animatable; boolean

Toggle the color map usage on/off.

<Texture_Sky>.sky_color_map_amt Float default: 100.0 -- animatable; float

Sets the opacity of the map. When it is 0, only the Sky Color is used. When it is 100, only the map is used.

<Texture_Sky>.sky_color_map UndefinedClass default: undefined -- texmap

The map used to define the color of the sky

<Texture_Sky>.rays_per_sample Integer default: 4 -- animatable; integer

The number of rays used to calculate the skylight falling on a point

<Texture_Sky>.ray_bias Float default: 0.01 -- animatable; float

The closest distance at which objects can cast shadows on a point.

<Texture_Sky>.rayengine Ray_Engine default: ReferenceTarget:Ray_Engine

The Ray engine used by the light.

Texture_Sky interfaces:

Interface: NaturalLightClass

Properties:

Methods:

<boolean>isSun()

<boolean>isSky()

Actions:

See also

Skylight

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Camera : Node

Value > MAXWrapper > Node > Camera

The following list displays the camera objects:

Standard Cameras

FreeCamera

TargetCamera

See also

Camera Common Properties, Operators, and Methods


Camera Common Properties, Operators, and Methods

Value > MAXWrapper > Node > Camera

Properties

The following properties apply to all camera types:

<camera>.fov Float default: 45.0 -- animatable, angle

Determines how wide an area the camera views. This is the horizontal Field Of View.

<camera>.curFOV Float default: 45.0 -- float

Returns the current Field Of View, respecting the fovType value described below. Available in 3ds Max 8 and higher.

<camera>.fovType Integer default: 1 -- integer

Sets the current Field Of View type. Changes the flyout next to the FOV spinner in the Camera's UI. Available in 3ds Max 8 and higher.

Possible values are:

1 - Horizontal

2 - Vertical

3 - Diagonal

<camera>.orthoProjection Boolean default: false

When on, the camera view looks just like a User view. When off, the camera view is the standard perspective-like view.

<camera>.type Name default: #free

The type of camera:

#free - Free Camera (Target view can be set in any direction)

#target - Target Camera (Camera will always align view with target object)

<camera>.showCone Boolean default: false

Displays the cone (actually a pyramid) defined by a camera's field of view. The cone appears in the other viewports but does not appear in a camera viewport.

<camera>.showHorizon Boolean default: false

Displays the horizon line. A dark gray line appears at the level of the horizon in the camera's viewport.

<camera>.nearrange Float default: 0.0 -- animatable; alias: Near_Env_Range

The near range for atmospheric effects.

<camera>.farrange Float default: 1000.0 -- animatable; alias: Far_Env_Range

The far range for atmospheric effects.

<camera>.clipManually Boolean default: false

Turn on to define clipping planes. When Clip Manually is off, geometry closer to the camera than 3 units is not displayed.

<camera>.nearclip Float default: 1.0 -- animatable, alias: near_clip

Objects closer than the near clipping plane are invisible to the camera.

<camera>.farclip Float default: 1000.0 -- animatable, alias: far_clip

Objects farther than the far clipping plane are invisible to the camera.

<camera>.showRanges Boolean default: false

When on, displays yellow rectangles within the camera's cone to show the Near and Far range settings.

<camera>.targetDistance Float default: 160.0 -- animatable, alias: Target_Distance

Sets a point to use as an invisible target.

<camera>.mpassEnabled Boolean default: false -- boolean; MultiPass_Effect_Enabled

Enable/Disable the MultiPass Camera Effect.

<camera>.mpassRenderPerPass Boolean default: false -- boolean; MPEffect___Render_Effects_Per_Pass

Enable/Disable the Render Per Pass option.

<camera>.multipass_effect SubAnim default: SubAnim:MultiPass_Effect -- SubAnim

<camera>.mpassEffect Depth_of_FieldMPassCamEffect default: Depth_of_FieldMPassCamEffect:Depth_of_FieldMPassCamEffect -- SubAnim

Get/Set the MultiPass Camera Effect. See MPassCamEffect objects for details.
To preview a MultiPass Camera Effect in the viewport, see the maxOps.displayActiveCameraViewWithMultiPassEffect Method

FOR EXAMPLE:

$Camera01.mpassEffect = Motion_BlurMPassCamEffect()

$Camera01.mpassEffect.disableAntialiasing = true

NOTE:

The .fov property value is the horizontal FOV in degrees.

The Vertical and Diagonal FOV and Lens values are based on the horizontal FOV and the current renderer Aperture Width.

See the new properties and functions added to 3ds Max 8 providing access to the FOV type and current value.

You can also use the following MAXScript function to calculate the Vertical FOV from the Horizontal FOV:

FUNCTION:

fn GetCamVFOV theCamera =

(

local r_aspect=(renderWidth as float)/renderHeight

2.0*atan(tan(theCamera.fov/2.0)/r_aspect)

)

The CameraFOV Structure:

The CameraFOV structure available in 3ds Max 8 and higher provides a set of functions related to Camera Field Of View conversion:

<float>cameraFOV.FOVtoMM <float fov>

Converts the supplied horizontal FOV to lens MM.

<float>cameraFOV.MMtoFOV <float mm>

Converts the supplied lens MM to horizontal FOV

<float>cameraFOV.CurFOVtoFOV <camera> <float cfov>

Converts the FOV in the camera's current FOV direction to horizontal FOV.
See also the new camera properties .fovType and .curFOV providing access to the FOV type flyout and the current value defined by the state of the flyout.

<float>cameraFOV.FOVtoCurFOV <camera> <float fov>

Converts the horizontal FOV to the FOV in the camera's current FOV direction.
See also the new camera properties .fovType and .curFOV providing access to the FOV type flyout and the current value defined by the state of the flyout.

EXAMPLE

c = freecamera()

$Free_Camera:Camera01 @ [0.000000,0.000000,0.000000]

cameraFOV

#Struct:cameraFOV(

FOVtoMM:<fn>,

CurFOVtoFOV:<fn>,

FOVtoCurFOV:<fn>,

MMtoFOV:<fn>)

cameraFOV.FOVtoMM 45 --convert horizontal FOV of 45 degrees into mm

43.4558

cameraFOV.MMtoFOV 43.4558 --convert 43.4558 mm back to degrees

45

c.fovType = 3 --set the FOV type to diagonal

3

cameraFOV.CurFOVtoFOV c 54.7473 --convert diagonal to horizontal FOV

45

cameraFOV.FOVtoCurFOV c 45 --convert 45 deg. horizontal to diagonal FOV

54.7473

c.curFOV --current FOV type, in this case 3=diagonal

54.7473

c.fov --this is ALWAYS the horizontal FOV!

45

c.fovType = 1 --set current FOV to 1=horizontal

1

c.curFOV --the current FOV is now horizontal

45

c.fov --this must return the same as current, as both are horizontal

45

Simulating Zoom Extents All

The following script changes the fov of specified camera to simulate a "zoom extents all" for the camera.

EXAMPLE

fn ZE_Cam cam objs =

(

local max2, fov, asp, v -- declare local variables

-- define a function that returns the maximum value

-- of a set of values in an array

fn maxof vals = (local v=vals[1]; for v1 in vals do (if v1 > v do v=v1);v)

fov=0 -- initialize the fov value

asp=(renderWidth as float)/renderHeight -- calculate the renderer's image aspect ratio

in coordsys cam -- work in coordinate system of the camera

(

for obj in objs where obj != cam do -- loop across all objects except the camera

(

if obj.min.z >=0 do continue -- if object is behind camera, skip it

-- get max value of the object's bounding box, correcting for the image aspect ratio

-- in the y values

v = maxof #((abs obj.max.x),(abs obj.min.x),(abs (obj.max.y*asp)),(abs (obj.min.y*asp)))

fov = maxof #(fov,(2*atan(-v/obj.min.z))) -- increase fov if needed

)

)

cam.fov=fov -- set the camera's fov to the new fov value

)

-- test bed --

cam=$camera01 -- specify the camera to "zoom extent all" on

ZE_Cam cam $* -- call the function, passing the camera and an object set containing all objects

See also

Depth_of_FieldMPassCamEffect : MPassCamEffect

Motion_BlurMPassCamEffect : MPassCamEffect

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


FreeCamera : Camera

Value > MAXWrapper > Node > Camera > FreeCamera

Constructor

freeCamera ...

Properties

There are no additional properties for FreeCamera.

See Camera Common Properties, Operators, and Methods for common properties of all cameras.

NOTE:

In 3ds Max, all node-level properties are searched before base-object-level properties. If a base-object property has the same name as a node-level property, you need to search in the base object for the base object property.

This affects the following properties of freeCamera:

<freeCamera>.baseObject.targetDistance

Get/Set the target distance of the Free Camera.

Every node in 3ds Max has a node property .targetDistance which contains the distance to an eventual target the node is looking at using a LookAt controller. (you can assign a node to the .lookAt property and the controller will be assigned automatically).

Thus, a Free Camera has such a node property but it is set to undefined, and a baseobject property with the same name which contains the actual target distance value shown in the User Interface. If the Free Camera gets converted to a Target camera, the node-level property will be displayed in the User Interface and should be accessed via MAXScript.

See also

Camera Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


TargetCamera : Camera

Value > MAXWrapper > Node > Camera > TargetCamera

Constructor

targetCamera ...

Properties

There are no additional properties for TargetCamera.

See Camera Common Properties, Operators, and Methods for common properties of all cameras.

See also

Camera Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Helper : Node

Value > MAXWrapper > Node > Helper

The following image maps and lists show the helper objects:

Standard

Compass

Crowd

Delegate

Dummy

ExposeTm

Grid

Point

Protractor

Tape

Bone

Atmospheric

BoxGizmo

CylGizmo

SphereGizmo

Camera Match

CamPoint

reactor

A_Dashpot

Carwheel

CLCollection

CSolver

DMCollection

Fracture

Hinge

L_Dashpot

Motorhelper

Planehelper

Point_Point

Point_Path

Prismatic

Ragdoll

RBCollection

RPCollection

SBCollection

Springhelper

Toy_Car

Windhelper

Assembly Heads

Luminaire

Manipulators

Cone_Angle

Plane_Angle

sliderManipulator

Particle Flow

SpeedByIcon

Find_Target

VRML97

Anchor

AudioClip

Background

Billboard

FogHelper

InlineHelper

LODHelper

NavInfo

ProxSensor

Sound

TouchSensor

TimeSensor

Internal Non-Creatable Manipulators

Falloff_Manipulator

Hotspot_Manip

IK_Spline_End_Twist_Manip

IK_Spline_Start_Twist_Manip

IK_Swivel_Manip

Position_Manip

Reactor_Angle_Manip

Rotation_Value

Slider_Manip

uvwMappingHeightManip

uvwMappingLengthManip

uvwMappingUTileManip

uvwMappingVTileManip

uvwMappingWidthManip

Miscellaneous

Axis_Helper

LinkOriginPtHelper

Substitute_Object


Helper - Standard

Value > MAXWrapper > Node > Helper

The following list shows the standard helper objects:

Standard

Compass

Crowd

Delegate

Dummy

ExposeTm

Grid

Point

Protractor

Tape

Bone


Bone : Helper

Bone - superclass: helper; super-superclass:node - 0:0 - classID: #(9069504, 0)

Value > MAXWrapper > Node > Helper > Bone

Constructor

bone ...

Properties

There are no additional properties for Bone.

NOTE:

The Bone helper object was used by 3ds Max prior to 3ds Max 4 to represent the nodes in a Bones system.

In 3ds Max 4 and higher, it is not possible to create a Bones system using IK controllers on the Bones' nodes.

You can create a hierarchy of Bone helper objects which use the standard PRS transform controller for each node.

FOR EXAMPLE:

b0 = bone pos:[x,y,z]

in b0 b1 = bone pos:[x1,y1,z1]

in b1 b2 = bone pos:[x2,y2,z2]

in b2 b3 = bone pos:[x3,y3,z3]

You can rearrange bone hierarchies using the parent property.

When a hierarchy of Bone helper objects is built, the showLinks and showLinksOnly properties are automatically set to true.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Compass : Helper

Compass - superclass: helper; super-superclass:node - classID: #(1761681026, 90319629)

Value > MAXWrapper > Node > Helper > Compass

Constructor

compass ...

Properties

There are no additional properties for Compass.

NOTE:

The Show Compass Rose and Radius properties are not accessible to MAXScript in 3ds Max.

See also

Daylight : System

Sunlight : System

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Dummy, Helper

Dummy : Helper

Dummy - superclass: helper; super-superclass:node - classID: #(8872500, 0)

Value > MAXWrapper > Node > Helper > Dummy

Constructor

dummy ...

Properties

<Dummy>.boxsize Point3 default: [10,10,10]

Icon size.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


ExposeTm : Helper

ExposeTm - Superclass:Helper; super-superclass:node - classID: #(-2071764533, -1858289533)

Value > MAXWrapper > Node > Helper > ExposeTm

This Helper object can be used to extract position and rotation data from any scene nodes to be used as input for scripted controllers, wire controllers etc. It simplifies significantly the creation of custom animation rigs.

Constructor:

exposeTM ...

ExposeTransform ...

Properties:

Display

.size : world units

Get/Set the size of the helper in world units.

.centermarker (Center_Marker) : boolean

When set to true, displays a small X marker at the center of the helper.

.axistripod (Axis_Tripod) : boolean

When set to true, displays a tripod axis indicating the position and orientation of the helper. The axis remains visible when the helper is no longer selected.

.cross : boolean

When set to true, displays an axis-aligned cross.

.box : boolean

When set to true, displays a small box at the center of the helper.

.constantscreensize (Constant_Screen_Size) : boolean

When set to true, keeps the size of the helper constant, regardless of how much you zoom in or out.

.drawontop (Draw_On_Top) : boolean

When set to true, the helper object draws lines with the Z buffer turned off (which usually causes it to appear in front of other objects).

.displayExposedVals (Display_Exposed) : boolean

When set to true, the exposed values will be displayed.

Exposed Nodes

.exposeNode (Expose_Node) : node

Get/Set the node whose Transformations should be exposed.

.localReferenceNode (Local_Reference_Node) : node

Get/Set the local reference node to be used for relative values calculation.

.useParent (Use_Parent_Ref) : boolean

When set to true, the parent node of the .exposeNode will be used as the reference node. If there is no parent node, the World is the parent of the .exposeNode.

When set to false, the explicitly specified .localReferenceNode will be used as the reference node.

Rotation Options

.eulerXOrder (Euler_X_Order) : integer

.eulerYOrder (Euler_Y_Order) : integer

.eulerZOrder (Euler_Z_Order) : integer

.stripNUScale (Strip_Non_Uniform_Scale) : boolean

When set to true, non-uniform scale values will be stripped from the transformation matrix before the values are calculated. When set to false, non-uniform scaling will affect the exposed values.

Local and World Euler Rotation

.localEuler (Local_Euler_Rotation) : point3

Returns the local rotation as Point3 Euler Angles value.

.localEulerX (Local_Euler_X) : angle

Returns the local Euler X rotation value.

.localEulerY (Local_Euler_Y) : angle

Returns the local Euler Y rotation value.

.localEulerZ (Local_Euler_Z) : angle

Returns the local Euler Z rotation value.

.worldEuler (World_Euler_Rotation) : point3

Returns the world rotation as Point3 Euler Angles value.

.worldEulerX (World_Euler_X) : angle

Returns the world Euler X rotation value.

.worldEulerY (World_Euler_Y) : angle

Returns the world Euler Y rotation value.

.worldEulerZ (World_Euler_Z) : angle

Returns the world Euler Z rotation value.

Local and World Position

.localPosition (Local_Position) : point3

Returns the local position as Point3 value.

.localPositionX (Local_Position_X) : world units

Returns the X component of the local position.

.localpositionY (Local_Position_Y) : world units

Returns the Y component of the local position.

.localPositionZ (Local_Position_Z) : world units

Returns the Z component of the local position.

.worldPosition (World_Position) : point3

Returns the world position as Point3 value.

.worldPositionX (World_Position_X) : world units

Returns the X component of the world position.

.worldPositionY (World_Position_Y) : world units

Returns the Y component of the world position.

.worldPositionZ (World_Position_Z) : world units

Returns the Z component of the world position.

Bounding Box

.worldBoundingBoxSize (World_Bounding_Box_Size) : point3

Returns the size of the world-oriented bounding box as a Point3 value.

.worldBoundingBoxWidth (World_Bounding_Box_Width) : float

Returns the X component of the size of the world-oriented bounding box.

.worldBoundingBoxLength (World_Bounding_Box_Length) : float

Returns the Y component of the size of the world-oriented bounding box.

.worldBoundingBoxHeight (World_Bounding_Box_Height) : float

Returns the Z component of the size of the world-oriented bounding box.

Timing

.timeOffset (Time_Offset) : time

Get/Set the time offset value. When the .useTimeOffset property is set to true, the values returned by the ExposeTM Helper will be calculated at a time which is offset from the current time by the .timeOffset value.

.useTimeOffset (Use_Time_Offset) : boolean

Enable/Disable the use of the .timeOffset value.

Distance and Angle

.distance : float

Returns the distance to the Reference node. If the reference node is set to Parent and there is no parent, this effectively returns the distance to the World origin.

.angle : angle

Returns the angle.

See also

Point : Helper

Parameter Wiring


Grid : Helper

grid - superclass: helper; super-superclass:node - 3:0 - classID: #(8208, 0)

Value > MAXWrapper > Node > Helper > Grid

Constructor

grid ...

Properties

<grid>.length Float default: 50.0 -- animatable

Length of the grid.

<grid>.width Float default: 50.0 -- animatable

Width of the grid.

<grid>.grid Float default: 10.0 -- animatable

The size of the smallest square in the visible grid.

NOTE:

The Active Color and Display properties are not accessible to MAXScript in 3ds Max.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


LightMeter : Helper

LightMeter - superclass: helper; super-superclass:node - 9:0 - classID: #(-2088554037, -1774534477)

Value > MAXWrapper > Node > Helper > LightMeter

NEW in 3ds Max 2009 Design: The LightMeter Helper allows the generation of lighting analysis data on a custom grid in world space. It works in conjunction with the Lighting_Analysis_Overlay : RenderEffect

NOTE:

This feature is exposed in 3ds Max Design only.

Scenes saved from 3ds Max Design will open and render correctly in 3ds Max, but you cannot construct class instances via MAXScript in 3ds Max.

3ds Max Design Constructor:

LightMeter ...

3ds Max Constructor:

Class Instances not creatable in 3ds Max

Roll over and click a group of controls to jump to relevant properties:

Properties:

Parameters

<LightMeter>.active BooleanClass default: true -- Boolean

Get/set the state of the On checkbox.

Dimensions

<LightMeter>.length Float default: 1.0 -- animatable; worldUnits

Get/set the Length of the LightMeter.

<LightMeter>.width Float default: 1.0 -- animatable; worldUnits

Get/set the Width of the LightMeter.

<LightMeter>.length_segs Integer default: 3 -- integer

Get/set the Length Segments of the LightMeter.

<LightMeter>.width_segs Integer default: 3 -- integer

Get/set the Width Segments of the LightMeter.

Display

<LightMeter>.showOrientation BooleanClass default: true -- boolean; Show_Orientation

Get/set the state of the Show Orientation checkbox.

<LightMeter>.showPsuedoColor BooleanClass default: true -- boolean; Show_Pseudo_Color

Get/set the state of the Show Pseudo Color checkbox.

<LightMeter>.showViewportText BooleanClass default: true -- boolean; Show_Viewport_Text

Get/set the state of the Show Viewport Text checkbox.

Values To Display

<LightMeter>.valuesToDisplay Integer default: 0 -- integer; Values_To_Display

Get/set the selection of the Values To Display radio buttons list.

Possible values are:

0 - Total Illuminance (default)

1 - Direct Illuminance

2 - Indirect Illuminance

3 - Daylight Factor

LightMeter interfaces:

Interface: lightMeterInterface

Methods:

<bool>GetIlluminance <time>time <index>index <&float>illuminance

illuminance is In and Out parameter

Gets the Total Illuminance at the given time and indexed point into the by-reference third parameter. Returns true on success, false on failure.

<bool>GetDirectIlluminance <time>time <index>index <&float>directIlluminance

directIlluminance is In and Out parameter

Gets the Direct Illuminance at the given time and indexed point into the by-reference third parameter. Returns true on success, false on failure.

<bool>GetIndirectIlluminance <time>time <index>index <&float>indirectIlluminance

indirectIlluminance is In and Out parameter

Gets the Indirect Illuminance at the given time and indexed point into the by-reference third parameter. Returns true on success, false on failure.

<bool>GetDaylightFactor <time>time <index>index <&float>daylightFactor

daylightFactor is In and Out parameter

Gets the Daylight Factor at the given time and indexed point into the by-reference third parameter. Returns true on success, false on failure.

<bool>GetMeterTransform <time>time <index>index <&matrix3>transform

transform is In and Out parameter

Gets the LightMeter Transformation Matrix at the given time and indexed point into the by-reference third parameter. Returns true on success, false on failure.

<bool>GetLocalMeterPosition <index>index <&point3>position

position is In and Out parameter

Gets the Local Position of the indexed point into the by-reference second parameter. Returns true on success, false on failure.

See also

Lighting Analysis and Daylight Simulation Tools


Point : Helper

Point - superclass: helper; super-superclass:node - classID: #(8211, 0)

Value > MAXWrapper > Node > Helper > Point

Constructor

point ...

PointHelperObj ...

Properties

<Point>.size Float default: 20.0 -- animatable; float

Sets the size for the point object. Use this to minimize the point object, or increase its size to aid in locating it. Default=20.

<Point>.centermarker Boolean default: false -- animatable; boolean; Center_Marker

Displays a small X marker at the center of the point object.

<Point>.axistripod Boolean default: false -- animatable; boolean; Axis_Tripod

Displays a tripod axis indicating the position and orientation of the point object. The axis remains visible when the point object is no longer selected.

<Point>.cross Boolean default: true -- animatable; boolean

Displays an axis-aligned cross.

<Point>.box Boolean default: false -- animatable; boolean

Displays a small box at the center of the point object.

<Point>.constantscreensize Boolean default: false -- animatable; boolean; Constant_Screen_Size

Keeps the size of the point object constant, regardless of how much you zoom in or out.

<Point>.drawontop Boolean default: false -- animatable; boolean; Draw_On_Top

When this is on, the point helper object draws lines with the Z buffer turned off (which usually causes it to appear in front of other objects).

<Point>.axisLength Float default: 20.0

Sets the length of the tripod axis.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Protractor : Helper

Protractor - superclass: helper; super-superclass:node - classID: #(8212, 0)

Value > MAXWrapper > Node > Helper > Protractor

Constructor

protractor ...

Properties

There are no additional properties for Protractor.

NOTE:

There is not a way to set the Protractor reference objects using MAXScript in 3ds Max.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Tape : Helper

Tape - superclass: helper; super-superclass:node - classID: #(8209, 0)

Value > MAXWrapper > Node > Helper > Tape

Constructor

tape ...

Properties

<Tape>.length Float default: 50.0 -- animatable

Length of the tape object.

NOTES:

To construct a tape, you have to create its target node first (using the targetObject constructor), and then construct the tape giving it the target:

tape pos:p target:(targetObject pos:q)

The length property shows the tape length set in the 3ds Max user interface, not the true distance from the tape to its target. The following function can be used to return this distance:

fn getTapeDist TapeObj = distance TapeObj TapeObj.target

getTapeDist $tape01

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Cone_Angle - superclass: helper

Cone_Angle : helper

Cone_Angle - superclass: helper; super-superclass:node - 6:0 - classID: #(629233518, 624568848)

Value > MAXWrapper > Node > Helper > ( Manipulators ) > Cone_Angle

Constructor

Cone_Angle ...

ConeAngleManip ...

Note: This class is not available in Autodesk VIZ.

Properties:

<Cone_Angle>.Origin Point3 default: [0,0,0] -- point3

<Cone_Angle>.Direction Point3 default: [0,0,-1] -- point3

<Cone_Angle>.Angle Float default: 15.0 -- animatable; angle

The initial angle of the manipulator.

<Cone_Angle>.Distance Float default: 0.0 -- float

The length of the manipulator, in 3ds Max units. Default=the distance of mouse drag when the manipulator was created.

<Cone_Angle>.UseSquare Boolean default: false -- boolean; Use_Square

When on, the base of the cone is square or rectangular, rather than circular. Default=off.

<Cone_Angle>.Aspect Float default: 1.0 -- float

When Use Square is on, adjusts the aspect ratio of the rectangular cone base. Default=1.0.

See also

Scripted Manipulators

Plane_Angle : helper

Scripted Plug-ins

sliderManipulator : helper


Plane_Angle - superclass: helper

Plane_Angle : helper

Plane_Angle - superclass: helper; super-superclass:node - 6:0 - classID: #(635524970, 561654288)

Value > MAXWrapper > Node > Helper > Plane_Angle

Constructors

Plane_Angle ...

PlaneAngleManip ...

Note: This class is not available in Autodesk VIZ.

Properties

<Plane_Angle>.Origin Point3 default: [0,0,0] -- point3

Get/set the origin of the manipulator.

<Plane_Angle>.NormalVec Point3 default: [0,0,1] -- point3; Normal_Vector

Get/set the normal vector of the manipulator plane.

<Plane_Angle>.UpVec Point3 default: [0,1,0] -- point3; Up_Vector

Get/set the up vector of the manipulator.

<Plane_Angle>.Angle Float default: 0.0 -- animatable; angle

The angle of the manipulator, from 0.0 to 360.0 (both values are perpendicular in the Y axis of the viewport where you created the manipulator, unless you have rotated the manipulator object). Default=0.0.

<Plane_Angle>.Distance Float default: 0.0 -- float

The length of the manipulator, in 3ds Max units. Default=the distance of mouse drag when the manipulator was created.

<Plane_Angle>.Size Float default: 1.0 -- float

The size of the manipulator's handle, in 3ds Max units. Default=1.0.

See also

Scripted Manipulators

Interface: manip

ConeAngle - superclass: helper

Scripted Plug-ins

sliderManipulator - superclass: helper


sliderManipulator - superclass: helper

sliderManipulator : helper

sliderManipulator - superclass: helper; super-superclass:node - 10:0 - classID: #(1205540079, 1318803856)

Value > MAXWrapper > Node > Helper > sliderManipulator

Constructor

sliderManipulator ...

Properties

<sliderManipulator>.value Float default: 0.0 -- animatable; float

The value of the slider, based on the position of the slidable triangle. Default=0.0.

<sliderManipulator>.minVal Float default: 0.0 -- animatable; float

The minimum possible value of the slider. Default=0.0.

<sliderManipulator>.maxVal Float default: 100.0 -- animatable; float

The maximum possible value of the slider. Default=100.0.

When the minimum is 0.0 and the maximum is 100.0, the slider Value can represent a percentage.

<sliderManipulator>.xPos Float default: 0.0 -- float

The slider's X location in the active viewport. Default=Viewport X location you clicked when you created the slider.

<sliderManipulator>.yPos Float default: 0.0 -- float

The slider's Y location in the active viewport. Default=Viewport Y location you clicked when you created the slider.

<sliderManipulator>.width Float default: 100.0 -- float

The slider's width, in 3ds Max units. Default=100.0.

<sliderManipulator>.hide Boolean default: false -- boolean

When on, hides all of the slider except for the label and the move and show/hide components. Default=off.

<sliderManipulator>.sldName String default: "" -- string

The slider label that appears in viewports. Default=none.

<sliderManipulator>.snapToggle Boolean default: true -- boolean

When on, the slider "snaps" to incremental values. When off, Default=on.

<sliderManipulator>.snapVal Float default: 0.01 -- float

The increment used by the slider when Snap is on. Default=0.01.

See also

Interface: manip

Scripted Manipulators

ConeAngle : helper

Plane_Angle : helper

radiusManip : helper

Scripted Plug-ins


Falloff_Manipulator : helper

Falloff_Manipulator - superclass: helper; super-superclass:Node - classID: #(629233518, 624568849)

Value > MAXWrapper > Node > Helper > Falloff_Manipulator

Constructor

Class instances not creatable by MAXScript

Aliases

Falloff_Manipulator

FalloffManip

Properties

There are no properties exposed by this class


Hotspot_Manip : helper

Hotspot_Manipulator - superclass: helper; super-superclass:Node

Value > MAXWrapper > Node > Helper > Hotspot_Manip

Constructor

Class instances not creatable by MAXScript

Aliases

Hotspot_Manip

HotspotManip

Properties

There are no properties exposed by this class


IK_Spline_End_Twist_Manip : helper

IK_Spline_End_Twist_Manip - superclass: helper; super-superclass:Node - classID: #(231040242, 807623636)

Value > MAXWrapper > Node > Helper > IK_Spline_End_Twist_Manip

Constructor

Class instances not creatable by MAXScript

Aliases

IK_Spline_End_Twist_Manip

IKEndSpTwistManip

Properties

There are no properties exposed by this class


IK_Spline_Start_Twist_Manip : helper

IK_Spline_Start_Twist_Manip - superclass: helper; super-superclass:Node - classID: #(1920737055, 1419121089)

Value > MAXWrapper > Node > Helper > IK_Spline_Start_Twist_Manip

Constructor

Class instances not creatable by MAXScript

Aliases

IK_Spline_Start_Twist_Manip

IKStartSpTwistManip

Properties

There are no properties exposed by this class


IK_Swivel_Manip : helper

IK_Swivel_Manip - superclass: helper; super-superclass:Node - classID: #(629233518, -1242924519)

Value > MAXWrapper > Node > Helper > IK_Swivel_Manip

Constructor

Class instances not creatable by MAXScript

Aliases

IK_Swivel_Manip

IKSwivelManip

Properties

There are no properties exposed by this class


Position_Manip : helper

Position_Manip - superclass: helper; super-superclass:Node - classID: #(1748251057, 921255140)

Value > MAXWrapper > Node > Helper > Position_Manip

Constructor

Class instances not creatable by MAXScript

Aliases

Position_Manip

PositionManip

Properties

<Position_Manip>.position : point3

<Position_Manip>.radius : float


radiusManip : helper

radiusManip - superclass: helper; super-superclass:Node - classID: #(1677328454, 66496883)

Value > MAXWrapper > Node > Helper > radiusManip

Constructor

Class instances not creatable by MAXScript

radiusManip interfaces:

Interface: simpleManip

Properties

.mouseState : enum : Read

mouseState enums: {#mouseIdle|#mouseDragging|#mouseOverManip}

Methods

<void>clearGizmos()

This must be called at the beginning of the "updateGizmos" handler in order to clear the current gizmo cache.

<void>addGizmoMesh <mesh>mesh <integer>flags <point3>unselColor <point3>selColor

This creates a gizmo from a mesh (or geometry in 3ds Max lingo). The mesh can be any arbitrary 3ds Max mesh, and created with the tools in MAXScript for creating meshes. One convenient way to do this is to create an instance of a primitive and get the mesh from it.

The flags can be 0, or one or more of these value. If you want more than one flag to apply, then you add the values together.

<integer>flags: Use one of the following values:

0: gizmoDontDisplay

Tells the system to not display the gizmo. It will be hit-tested, but not displayed.

1: gizmoDontHitTest

Tells the system to not hit-test the gizmo. It will be displayed, but not hit-tested.

2: gizmoActiveViewportOnly

Tells the system to only display and hit-test this gizmo in the active viewport.

<void>addGizmoShape <Interface>gizmo <integer>flags <point3>unselColor <point3>selColor

This creates a gizmo from a shape object. The gizmoShape can be created using functions from the "manip" package, described below.

<integer>flags: Use one of the following values:

0: gizmoDontDisplay

Tells the system to not display the gizmo. It will be hit-tested, but not displayed.

1: gizmoDontHitTest

Tells the system to not hit-test the gizmo. It will be displayed, but not hit-tested.

2: gizmoActiveViewportOnly

Tells the system to only display and hit-test this gizmo in the active viewport.

3: gizmoUseScreenSpace

This tells the system to interpret the coordinates of the shape as device coordinates in the viewport, not as 3d values. The values are still specified as 3d points, but the "Z" coordinate is ignored.

4: gizmoUseRelativeScreenSpace

This is like gizmoUseScreenSpace, but the coordinates are specified as values from 0.0 to 1.0, and interpreted in each viewport as a percentage of the width or height of the viewport.

<void>addGizmoMarker <enum>marker <point3>position <integer>flags <point3>unselColor <point3>selColor

marker enums: {#point|#hollowBox|#plusSign|#asterisk|#xMarker|#bigBox|#circle|#triangle|#diamond|#smallHollowBox|#smallCircle|#smallTriangle|#smallDiamond|#dot|#smallDot}

The position is a point in 3d space, or 2d screen space. The flags are the same ones supported by addGizmoShape.

<point3>position : The position is a point in 3d space, or 2d screen space.

<integer>flags: Use one of the following values:

0: gizmoDontDisplay

Tells the system to not display the gizmo. It will be hit-tested, but not displayed.

1: gizmoDontHitTest

Tells the system to not hit-test the gizmo. It will be displayed, but not hit-tested.

2: gizmoActiveViewportOnly

Tells the system to only display and hit-test this gizmo in the active viewport.

3: gizmoUseScreenSpace

This tells the system to interpret the coordinates of the shape as device coordinates in the viewport, not as 3d values. The values are still specified as 3d points, but the "Z" coordinate is ignored.

4: gizmoUseRelativeScreenSpace

This is like gizmoUseScreenSpace, but the coordinates are specified as values from 0.0 to 1.0, and interpreted in each viewport as a percentage of the width or height of the viewport.

<void>addGizmoText <string>text <point3>position <integer>flags <point3>unselColor <point3>selColor

This creates a gizmo that is text on the screen. Note that text cannot be hit-tested or grabbed by the mouse. It is used for display purposes only.

<ray>getLocalViewRay <point2>m

This function takes a mouse position and returns the ray that passes through that mouse position in the direction of the view. It is returned in the local coordinates of the node that owns the manipulator target.

<void>updateGizmos <time>t <&string>toolTip

toolTip is In and Out parameter

See also

ConeAngle : helper

Plane_Angle : helper


Reactor_Angle_Manip : helper

Reactor_Angle_Manip - superclass: helper; super-superclass:Node - classID: #(1289429949, 1283806608)

Value > MAXWrapper > Node > Helper > Reactor_Angle_Manip

Constructor

Class instances not creatable by MAXScript

Aliases

Reactor_Angle_Manip

ReactorAngleManip

Properties

There are no properties exposed by this class


Rotation_Value : helper

Rotation_Value - superclass: helper; super-superclass:Node - classID: #(1105491873, 1812809939)

Value > MAXWrapper > Node > Helper > Rotation_Value

Constructor

Class instances not creatable by MAXScript

Aliases

Rotation_Value

PositionValueManip

Properties

<Rotation_Value>.value (Position) : point3 array

<Rotation_Value>.radius : float array

<Rotation_Value>.state (Position) : point3 array


Slider_Manip : helper

Slider_Manip - superclass: helper; super-superclass:Node - classID: #(531720148, 1676367892)

Value > MAXWrapper > Node > Helper > Slider_Manip

Constructor

Class instances not creatable by MAXScript

Aliases

Slider_Manip

SliderManip

Properties

<Slider_Manip>.value : float

<Slider_Manip>.min (Minimum) : float

<Slider_Manip>.max (Maximum) : float

<Slider_Manip>.xPos (X_Position) : float

<Slider_Manip>.yPos (Y_Position) : float

<Slider_Manip>.width : float

<Slider_Manip>.hide : boolean

<Slider_Manip>.name : string


uvwMappingHeightManip : helper

uvwMappingHeightManip - superclass: helper; super-superclass:Node

Value > MAXWrapper > Node > Helper > uvwMappingHeightManip

Constructor

Class instances not creatable by MAXScript

uvwMappingHeightManip interfaces:

Interface: simpleManip

See also

uvwMappingLengthManip : helper

uvwMappingUTileManip : helper

uvwMappingVTileManip : helper

uvwMappingWidthManip : helper


uvwMappingLengthManip : helper

uvwMappingLengthManip - superclass: helper; super-superclass:Node

Value > MAXWrapper > Node > Helper > uvwMappingLengthManip

Constructor

Class instances not creatable by MAXScript

uvwMappingLengthManip interfaces:

Interface: simpleManip

See also

uvwMappingHeightManip : helper

uvwMappingUTileManip : helper

uvwMappingVTileManip : helper

uvwMappingWidthManip : helper


uvwMappingUTileManip : helper

uvwMappingUTileManip - superclass: helper; super-superclass:Node

Value > MAXWrapper > Node > Helper > uvwMappingUTileManip

Constructor

Class instances not creatable by MAXScript

uvwMappingUTileManip interfaces:

Interface: simpleManip

See also

uvwMappingHeightManip : helper

uvwMappingLengthManip : helper

uvwMappingVTileManip : helper

uvwMappingWidthManip : helper


uvwMappingVTileManip : helper

uvwMappingVTileManip - superclass: helper; super-superclass:Node

Value > MAXWrapper > Node > Helper > uvwMappingUTileManip

Constructor

Class instances not creatable by MAXScript

uvwMappingVTileManip interfaces:

Interface: simpleManip

See also

uvwMappingHeightManip : helper

uvwMappingLengthManip : helper

uvwMappingUTileManip : helper

uvwMappingWidthManip : helper


uvwMappingWidthManip : helper

uvwMappingWidthManip - superclass: helper; super-superclass:Node

Value > MAXWrapper > Node > Helper > uvwMappingWidthManip

Constructor

Class instances not creatable by MAXScript

uvwMappingWidthManip interfaces:

Interface: simpleManip

See also

uvwMappingHeightManip : helper

uvwMappingLengthManip : helper

uvwMappingUTileManip : helper

uvwMappingVTileManip : helper


Helper - Atmospheric

Value > MAXWrapper > Node > Helper > Atmospheric

The following list shows the atmospheric helper objects:

Atmospheric

BoxGizmo

CylGizmo

SphereGizmo


BoxGizmo : Helper

BoxGizmo - superclass: helper; super-superclass:node - classID: #(1002641668, 1742163657)

Value > MAXWrapper > Node > Helper > BoxGizmo

Constructor

boxGizmo ...

Properties

<BoxGizmo>.length Float default: 0.0 -- animatable

Length of the box gizmo.

<BoxGizmo>.width Float default: 0.0 -- animatable

Width of the box gizmo.

<BoxGizmo>.height Float default: 0.0 -- animatable

Height of the box gizmo.

<BoxGizmo>.seed Integer default: 0 -- alias: parameter

Base value used to generate the atmospheric effect. Each apparatus in the scene should have a different seed. If more than one apparatus uses the same seed and same atmospheric effect, they will produce nearly identical results.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


CylGizmo : Helper

CylGizmo - superclass: helper; super-superclass:node - classID: #(1002641668, 1742163656)

Value > MAXWrapper > Node > Helper > CylGizmo

Constructor

cylGizmo ...

Properties

<CylGizmo>.radius Float default: 0.0 -- animatable

Radius of cylinder gizmo object.

<CylGizmo>.height Float default: 0.0 -- animatable

Height of cylinder gizmo object.

<CylGizmo>.seed Integer default: 0 -- alias: parameter

Base value used to generate the atmospheric effect. Each apparatus in the scene should have a different seed. If more than one apparatus uses the same seed and same atmospheric effect, they will produce nearly identical results.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


SphereGizmo : Helper

SphereGizmo - superclass: helper; super-superclass:node - classID: #(1002641668, 1742163655)

Value > MAXWrapper > Node > Helper > SphereGizmo

Constructor

sphereGizmo ...

Properties

<SphereGizmo>.radius Float default: 0.0 -- animatable

Radius of sphere gizmo object.

<SphereGizmo>.hemisphere Integer default: 0

When turned on, the bottom half of the SphereGizmo is discarded, creating a hemisphere:

0- Off

1- On

<SphereGizmo>.seed Integer default: 0

Base value used to generate the atmospheric effect. Each apparatus in the scene should have a different seed. If more than one apparatus uses the same seed and same atmospheric effect, they will produce nearly identical results.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Helper - Camera Match

Value > MAXWrapper > Node > Helper > Camera Match

The following list shows the camera match helper objects:

CamPoint


CamPoint : Helper

CamPoint - superclass: helper; super-superclass:node - classID: #(1354694840, 287257764)

Value > MAXWrapper > Node > Helper > CamPoint

Constructor

camPoint ...

Properties

<CamPoint>.showAxis Boolean default: true

When on, an axis tripod is displayed with the camera point object.

<CamPoint>.axisLength Float default: 20.0

The length of the axis tripod.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Helper - VRML 1.0/VRBL

Value > MAXWrapper > Node > Helper > VRML

NOTE:

Support for VRML 1.0 / VRBL has been discontinued.

The following list shows the VRML 1.0/VRBL helper objects:

Inline

LOD

VRML_VRBL


Inline : Helper

Inline - superclass: helper; super-superclass:node - classID: #(-1397930649, 0)

Value > MAXWrapper > Node > Helper > VRML1.0 > Inline

NOTE:

Support for VRML 1.0 / VRBL has been discontinued.

Constructor

inline ...

Properties

There are no additional properties for Inline.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


LOD : Helper

LOD - superclass: helper; super-superclass:node - classID: #(-1397935018, 0)

Value > MAXWrapper > Node > Helper > VRML1.0 > LOD

NOTE:

Support for VRML 1.0 / VRBL has been discontinued.

Constructor

lod ...

Properties

There are no additional properties for LOD.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


VRML_VRBL : Helper

Value > MAXWrapper > Node > Helper > VRML1.0 > VRML_VRBL

NOTE:

Support for VRML 1.0 / VRBL has been discontinued.

Constructor

vrml_vrbl ...

Properties

There are no additional properties for VRML_VRBL.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Helper - VRML97

Value > MAXWrapper > Node > Helper > VRML97

The following list shows the VRML97 helper objects:

VRML97

Anchor

AudioClip

Background

Billboard

FogHelper

InlineHelper

LODHelper

NavInfo

ProxSensor

Sound

TouchSensor

TimeSensor


Anchor : Helper

Anchor - superclass: helper; super-superclass:node - classID: #(2129998914, -268255945)

Value > MAXWrapper > Node > Helper > VRML97 > Anchor

Constructor

anchor ...

Properties

There are no additional properties for Anchor.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


AudioClip : Helper

AudioClip - superclass: helper; super-superclass:node - classID: #(-1489161150, -82453587)

Value > MAXWrapper > Node > Helper > VRML97 > AudioClip

Constructor

audioClip ...

Properties

There are no additional properties for AudioClip.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Background : Helper

Background - superclass: helper; super-superclass:node - classID: #(-1403177918, 263969709)

Value > MAXWrapper > Node > Helper > VRML97 > Background

Constructor

background ...

Properties

There are no additional properties for Background.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Billboard : Helper

Billboard - superclass: helper; super-superclass:node - classID: #(-1413663678, 263969709)

Value > MAXWrapper > Node > Helper > VRML97 > Billboard

Constructor

billboard ...

Properties

There are no additional properties for Billboard.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


FogHelper : Helper

FogHelper - superclass: helper; super-superclass:node - classID: #(-1397935038, 256039853)

Value > MAXWrapper > Node > Helper > VRML97 > FogHelper

Constructor

fogHelper ...

Properties

There are no additional properties for FogHelper.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


InlineHelper : Helper

Value > MAXWrapper > Node > Helper > VRML97 > InlineHelper

Constructor

inlineHelper ...

Properties

There are no additional properties for InlineHelper.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


LODHelper : Helper

Value > MAXWrapper > Node > Helper > VRML97 > LODHelper

Constructor

lodHelper ...

Properties

There are no additional properties for LODHelper.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


NavInfo : Helper

NavInfo - superclass: helper; super-superclass:node - classID: #(-1397935038, 251714477)

Value > MAXWrapper > Node > Helper > VRML97 > NavInfo

Constructor

navInfo ...

Properties

There are no additional properties for NavInfo.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


ProxSensor : Helper

Value > MAXWrapper > Node > Helper > VRML97 > ProxSensor

Constructor

proxSensor ...

Properties

There are no additional properties for ProxSensor.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Sound : Helper

Sound - superclass: helper; super-superclass:node - classID: #(180954178, 260300461)

Value > MAXWrapper > Node > Helper > VRML97 > Sound

Constructor

sound ...

Properties

There are no additional properties for Sound.

Variables

WAVsound.filename

Get/set Sound track filename as <string>. There currently is not a way to perform and Remove Sound via MAXScript

WAVsound.start

Get/set Sound track range start time as <time>.

WAVsound.end

A read only variable to get the Sound track range end time as a <time> value.

WAVsound.mute

Get/set whether Sound track is active as <boolean>.

WAVsound.isPlaying

A read only variable that returns whether the Sound track is currently playing as a <boolean> value.

Methods

WAVsound.scrub <interval>

Plays back the specified time interval of the Sound track.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


TimeSensor : Helper

TimeSensor - superclass: helper; super-superclass:node - classID: #(-1397935038, 15731629)

Value > MAXWrapper > Node > Helper > VRML97 > TimeSensor

Constructor

timeSensor ...

Properties

There are no additional properties for TimeSensor.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


TouchSensor : Helper

TouchSensor - superclass: helper; super-superclass:node - classID: #(1945777218, -268255827)

Value > MAXWrapper > Node > Helper > VRML97 > TouchSensor

Constructor

touchSensor ...

Properties

There are no additional properties for TouchSensor.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Character : Helper

Character - superclass: helper; super-superclass:node - classID: #(1124291732, 592653174)

Value > MAXWrapper > Node > Helper > Character

Instances of this class are typically used by CharacterAssembly .

Constructor

Class instances are not creatable by MAXScript in 3ds Max 5.

This class is not available in Autodesk VIZ.

Aliases

Character

CharacterHelper

Properties

<Character>.size Float default: 10.0 -- animatable; float

Controls the size of the character assembly icon

See also

CharacterAssembly Helper

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


CharacterAssembly : Helper

CharacterAssembly - superclass: helper; super-superclass:node - classID: #(-876649472, -1986750208)

Value > MAXWrapper > Node > Helper > CharacterAssembly

Instances of this class provides the controls, UI and icon for the Character Assembly creation.

Constructor

characterAssembly ...

CharacterAssembly objects are typically created using the assemblyMgr.assemble method.

FOR EXAMPLE

fn createCharacter nodes =

(

local chr

animate off

(

chr = assemblyMgr.assemble nodes name:(uniqueName "Character") classDesc:CharacterAssembly

chr.assemblyBBoxDisplay = false

chr.wirecolor = (colorMan.getColor #chr_color)*255

)

chr

)

b=box pos:[100,0,0]

s=sphere()

createCharacter #(b,s)

Properties

<CharacterAssembly>.character SubAnim default: SubAnim:CharacterHelper -- SubAnim

References the Character Helper object used. Read-only.

<CharacterAssembly>.characterID Integer default: 132833 -- integer

The ID of the character.

<CharacterAssembly>.displayRes Integer default: 3 -- abimatable; radio button number

Get/set the radio button state controlling the display of the character elements specified in the Assembly for Full Resolution display and Low Resolution display.

<CharacterAssembly>.iconSize Integer default: 10 -- integer

Controls the icon size.

CharacterAssembly interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

Interface: assemblyMgr

Character Helper

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


DaylightAssemblyHead : Helper

DaylightAssemblyHead - superclass: Helper; super-superclass: Node - classID: #(1243508203, 835157335)

Constructor

Class instances not creatable by MAXScript.

See Interface: DaylightSystemFactory2 for a method to construct a Daylight System.

Properties

<DaylightAssemblyHead>.sun Max_object

Get/set the Sun object used in the Assembly. Setting this property to undefined will set the Daylight system to "No Sunlight" mode.

<DaylightAssemblyHead>.sky Max_object

Contains the Sky object used in the Assembly. Setting this property to undefined will set the Daylight system to "No Skylight" mode.

<DaylightAssemblyHead>.manual Integer default:0

The property controls the way the Daylight_Slave_Controller calculates the position of the Daylight. Corresponds to the Manual/Date,Time and Location radio buttons in the UI. The accepted values are:

0 - Date,Time and Location

1 - Manual

2 - Weather file [image] NEW in 3ds Max 2009

<DaylightAssemblyHead>.weatherFileName Filename

NEW in 3ds Max 2009: Get/set the weather file name.

DaylightAssemblyHead interfaces:

Interface: IDaylightSystem

Methods:

<object>GetSun()

NEW in 3ds Max 2009: Returns the light objects used as Sun in the Assembly.

<object>SetSun <class>sunClass

NEW in 3ds Max 2009: Sets the Sun objects in the Assembly to an instance of the given class. Other than the .sun property documented above, this method expects a class of the light object and not an instance of a light class.

Possible classes are:

DirectionalLight - corresponds to Standard entry in the Daylight System UI

IES_Sun

mr_Sun

<object>GetSky()

NEW in 3ds Max 2009: Returns the light object used as Sky in the Assembly.

<object>SetSky <class>skyClass

NEW in 3ds Max 2009: Sets the Sky objects in the Assembly to an instance of the given class. Other than the .sky property documented above, this method expects a class of the light object and not an instance of a light class.

Possible classes are:

IES_Sky

mr_Sky

Skylight

<integer>GetDaylightControlType()

NEW in 3ds Max 2009: Returns the Daylight Control Type.

Possible values are:

0 - Date,Time and Location

1 - Manual

2 - Weather File

<void>SetDaylightControlType <integer>type

NEW in 3ds Max 2009: Sets the Daylight Control Type.

Possible values are:

0 - Date,Time and Location

1 - Manual

2 - Weather File

<String>GetLocation()

NEW in 3ds Max 2009: Returns the location as string.

<void>GetAltitudeAzimuth <time>time <&float>altitude <&float>azimuth

altitude is In and Out parameter

azimuth is In and Out parameter

NEW in 3ds Max 2009: Returns the altitude and azimuth values corresponding to the time given as first argument into the by-reference variables given by the second and third argument.

<filename>GetWeatherFileName()

NEW in 3ds Max 2009: Returns the filename of the weather file.

<void>OpenWeatherFileDlg()

NEW in 3ds Max 2009: Opens the Weather File dialog. The Daylight Control Type must be set to 2 - Weather file for the dialog to open.

<void>MatchTimeLine()

NEW in 3ds Max 2009: Matches the time line.

<void>LoadWeatherFile <filename>file

NEW in 3ds Max 2009: Loads the given weather file.

<void>SetWeatherFileFilterAnimated <boolean>animated

NEW in 3ds Max 2009: Sets weather to filter animated data from the Weather file. Default is false.

<boolean>GetWeatherFileFilterAnimated()

NEW in 3ds Max 2009: Returns weather animated data from the Weather file will be filtered.

<void>SetWeatherFileSpecificTimeAndDate <&point3>timeOfDay <&point3>date

timeOfDay is In and Out parameter

date is In and Out parameter

NEW in 3ds Max 2009: Sets specific time and date for the weather file using the two Point3 by-reference arguments.

The three components of the timeOfDay argument specify hours, minutes and seconds.

The three components of the date argument specify the day, month and year.

<void>GetWeatherFileSpecificTimeAndDate <&point3>timeOfDay <&point3>date

timeOfDay is In and Out parameter

date is In and Out parameter

NEW in 3ds Max 2009: Gets the specific time and date for the date file into the two Point3 by-reference arguments.

The three components of the timeOfDay argument specify hours, minutes and seconds.

The three components of the date argument specify the day, month and year.

EXAMPLE

aTime = point3 0 0 0

[0,0,0]

aDate = point3 0 0 0

[0,0,0]

$Daylight01.GetWeatherFileSpecificTimeAndDate &aTime &aDate

OK

aTime

[12,0,0]

aDate

[1,1,2007]

<void>SetWeatherFileAnimStartTimeAndDate <&point3>timeOfDay <&point3>date

timeOfDay is In and Out parameter

date is In and Out parameter

NEW in 3ds Max 2009: Sets the weather file animation start time and date using the two Point3 by-reference arguments.

The three components of the timeOfDay argument specify hours, minutes and seconds.

The three components of the date argument specify the day, month and year.

<void>GetWeatherFileAnimStartTimeAndDate <&point3>timeOfDay <&point3>date

timeOfDay is In and Out parameter

date is In and Out parameter

NEW in 3ds Max 2009: Gets the weather file animation start time and date into the two Point3 by-reference arguments.

The three components of the timeOfDay argument specify hours, minutes and seconds.

The three components of the date argument specify the day, month and year.

<void>SetWeatherFileAnimEndTimeAndDate <&point3>timeOfDay <&point3>date

timeOfDay is In and Out parameter

date is In and Out parameter

NEW in 3ds Max 2009: Sets the weather file animation end time and date using the two Point3 by-reference arguments.

The three components of the timeOfDay argument specify hours, minutes and seconds.

The three components of the date argument specify the day, month and year.

<void>GetWeatherFileAnimEndTimeAndDate <&point3>timeOfDay <&point3>date

timeOfDay is In and Out parameter

date is In and Out parameter

NEW in 3ds Max 2009: Gets the weather file animation end time and date into the two Point3 by-reference arguments.

The three components of the timeOfDay argument specify hours, minutes and seconds.

The three components of the date argument specify the day, month and year.

<void>SetWeatherFileSkipHours <boolean>skipHours <integer>startHour <integer>endHour

NEW in 3ds Max 2009: Sets the weather file skip hours, start hour and end hour values.

<void>GetWeatherFileSkipHours <&boolean>skipHours <&integer>startHour <&integer>endHour

skipHours is In and Out parameter

startHour is In and Out parameter

endHour is In and Out parameter

NEW in 3ds Max 2009: Gets the weather file skip hours, start hour and end hour values into the three by-reference arguments.

<void>SetWeatherFileSkipWeekend <boolean>skipWeekend

NEW in 3ds Max 2009: Sets the weather file to skip weekends.

<boolean>GetWeatherFileSkipWeekend()

NEW in 3ds Max 2009: Gets the state of the weather file's skip weekends option.

<void>SetWeatherFileSkipFramePer <integer>framePer

NEW in 3ds Max 2009: Sets the index of the weather file skip period drop-down list.

Possible values are:

0 - Period

1 - Day

2 - Week

3 - Month

4 - Season

<integer>GetWeatherFileSkipFramePer()

NEW in 3ds Max 2009: Gets the index of the weather file skip period drop-down list.

Possible values are:

0 - Period

1 - Day

2 - Week

3 - Month

4 - Season

See also

Daylight : System

Interface: DaylightSystemFactory2


Luminaire : Helper

Luminaire - superclass: helper; super-superclass:node - classID: #(1125598736, 365390639)

Value > MAXWrapper > Node > Helper > Luminaire

This class was available but not constructable in 3ds Max 5. It is fully available in 3ds Max 6 and higher.

Constructor

luminaire ...

LuminaireHelper ...

Properties

<Luminaire>.Dimmer Float default: 100.0 -- animatable; float

The Dimmer value of the Luminaire Helper. It is provided as a UI value to be wired to the Multiplier values of the lights in the light fixture and has no other function on itself.

<Luminaire>.FilterColor Color default: (color 255 255 255) -- animatable; RGB color

The Filter Color of the Luminaire Helper. It is provided as a UI value to be wired to the filter colors of the lights in the light fixture and has no other function on itself.

Luminaire interfaces:

Interface: ILuminaire

Properties:

.Dimmer : float : Read|Write

.FilterColor : RGBA color : Read|Write

NOTES FOR 3DS MAX 5

Luminaire class instances were not creatable in 3ds Max 5, they were only creatable in Autodesk VIZ. Luminaire class instances saved in Autodesk VIZ would load and function properly in 3ds Max 5 though.

It was possible to "unhide" the Luminaire Helper object in 3ds Max 5 by creating a scripted Luminaire object that extends the hidden one, and declaring the scripted one as "visible":

plugin helper MyLuminaire

name:"MyLuminaire"

category:"Assembly Heads"

classID:#(0x7463471e, 0x35cb7b96)

extends:Luminaire

invisible:false

replaceUI:false

version:1

(

)

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Substitute_Object : helper

Substitute_Object : helper {654e4d50,70291e2d}

Used by the DWG Import.

Class instances not creatable by MAXScript

Alias:

SubstituteObject

Properties:

.displayIcon : Boolean

Get/Set the icon display state.

.iconSize : world units

Get/Set the icon size in world units.

See also

Substitute_Manager: UtilityPlugin


Axis_Helper : Helper

Axis_Helper : helper {132a7b67,2ae35b04}

The Axis_Helper is an internal helper object used by the Working Pivot feature to display an Axis Tripod in the scene and allow quick transformations in its coordinate space.

It is not creatable by MAXScript, but is accessible when created by the Working Pivot feature.

Available in 3ds Max 2008 and higher.

Constructor

Class instances not creatable by MAXScript!

Aliases:

Axis_Helper

AxisHelperObj

Properties:

<AxisHelper>.size (Axis_Size) : worldUnits

Get/Set the size of the Axis Helper.

See also

Interface: WorkingPivot


Access to the node bone properties and methods

There are several properties and methods accessible on scene nodes that correspond to the Bone parameters and functions in the node properties dialog. These properties and methods are exposed by the INode Node Interface.

Interface : INode

Properties:

<node>.boneEnable

boolean, read-only, see <node>.setBoneEnable for the set method.

<node>.boneAutoAlign

boolean

When turned off, the bone's pivot point will not align to its child object. The translation of a child bone will not be converted into rotation of the parent. Instead the child will be allowed to move away from the parent's X-axis.

NOTE:

Changing the state of this check box will not have an immediate visual effect on the skeleton. It only affects future behavior when bones are moved. This option is only available if Bone is off.

<node>.boneFreezeLength

boolean

When turned on, the bone maintains its length. When turned off, the bone's length is based on the translation of its child bone. This option is available only if Auto-Align is on.

<node>.boneScaleType

one of #scale, #squash, or #none

None: No stretch takes place.

Scale: Lets the bone scale. The stretch happens along one axis.

Squash: Lets the bone squash. The bone gets fatter as it gets shorter, and thinner as it gets longer.

<node>.stretchTM

matrix3, read-only.

Normally, matrix concatenation occurs in the following manner:

objectTM = objectOffsetTM * stretchTM * nodeTM

So code that uses the objectTM will transparently inherit the effects of the stretchTM. However if you want the stretchTM included but not the object offset, this property will return the stretchTM alone. If the node is not a bone or has no stretching, this property will return the identity matrix.

Methods

<node>.setBoneEnable <onOff_boolean> <initial-time_time>

Sets the Bone enable on or off.

<onOff boolean>

When turned on, the bone or object behaves as a bone. Turning this option off causes the node to stop behaving like a bone. There is no auto alignment or stretching. Note that turning this option on will not cause the object to immediately align or stretch. However future translations of children may cause rotation and stretching. Default=on for bone objects, off for other objects.

<initial-time time>

Specifies the time at which to calculate and store initial child position. This is usually used with the current time slider position. The time associated with the time slider can be queried and set using the sliderTime global variable. Time Control

NOTE:

A very good macroscript example to review, which uses .setBoneEnable, can be found in your 3ds Max directory at: \ui\macroscripts\Macro_Bones.mcr.

<node>.realignBoneToChild()

Rotates the node such that its X axis points at the average position of all children with the bone property turned on.

<node>.resetBoneStretch()

Resets the initial child position used to compute the stretch factor to the current child position. This will cause the stretch factor to become equal to one. If it was previously not equal to one then the object would snap to its original unstretched state.

See also

Interface : INode

Node Common Properties, Operators, and Methods

Bone Creation

Bone : Helper

Skin : Modifier

Bones : System

Interface: BoneSys


Bone Creation

The following function published interface allows the creation of bones via MAXScript.

Interface: BoneSys

See also

Bones : System

Core Interfaces

Node Common Properties, Operators, and Methods

Bone Creation

Bone : Helper

Skin : Modifier

Access to the New Node Bone Properties and Methods


System : Node

Value > MAXWrapper > Node > System

System objects are not creatable by MAXScript.

Once a system object in created in 3ds Max, various properties associated with the system are accessible by MAXScript.

Standard Systems

Bones

RingArray

Sunlight

Daylight

Biped


Bones : System

Value > MAXWrapper > Node > System > Bones

Bones system objects are not creatable by MAXScript.

In versions prior to 3ds Max 4, a Bones system was comprised of the Bone Helper objects, a master IK controller, and slave IK controllers. The slave IK controllers are used as the transform controller for all nodes in the IK system, and the master IK controller controls the individual slave IK controllers. The methods associated with the IK controller are described in IK_ControllerMatrix3Controller : Matrix3Controller .

Since 3ds Max 4, the Bones system uses BoneGeometry : GeometryClass objects instead of helpers, allowing for fins that can better represent the size and mass of the skeleton.


Sunlight : System

Value > MAXWrapper > Node > System > Sunlight

Sunlight system objects are not creatable by MAXScript.

A Sunlight system is comprised of a Compass Helper object and a TargetDirectionalLight object. The TargetDirectionalLight's transform is controlled by a set of float controllers, which are sub-controllers of a non-accessible position controller (a Sunlight_Slave_Controller position controller). These float controllers can be accessed as subAnims of the TargetDirectionalLight node.

These float controllers, and their subAnim index number, are:

Solar_Time - subAnim[3]

Solar_Date - subAnim[4]

Latitude - subAnim[5]

Longitude - subAnim[6]

Orbital_Scale - subAnim[7]

FOR EXAMPLE,

if node $Sun01 is the light for a Sunlight system, the Solar_Time controller can be accessed as:

solarTimeCont=$Sun01[3].object

See also

Compass : Helper

TargetDirectionalLight : Light


Daylight : System

Value > MAXWrapper > Node > System > Daylight

Daylight system objects are not creatable by MAXScript.

A Daylight system is comprised of a Compass Helper object and an Assembly containing an IES_Sun and an IES_Sky object using a DaylightAssemblyHead . The Light objects can be accessed as properties of the Assembly Head.

The Assembly's transform is controlled by a set of controllers, which are sub-controllers of a

Sunlight_Daylight_Slave_Controller

controller. To access the controller, create a Daylight system using the Create>Systems tab in the UI and use:

$Daylight01.controller

Controller:Sunlight_Daylight_Slave_Controller

<Daylight_Slave_Controller>.solar_time Float -- subAnim[3]

The solar time expressed as an integer value of seconds since midnight. To calculate the hours, minutes and seconds, you can use the following function:

SCRIPT:

fn TimeFromSolarTime solar_time =

(

hrs = int(solar_time/3600.0) -- full hours in the solar_time value

min = int((solar_time - hrs*3600.0)/60.0) -- full minutes in the difference between the full time and the full hours

sec = int(solar_time - hrs*3600.0 - min*60.0 + 0.5) -- full seconds in the rest of the value

#(hrs,min,sec) -- return the result as a 3 elements array

)

<Daylight_Slave_Controller>.solar_date Float -- subAnim[4]

The solar date expressed as an integer representing the days offset from today.

<Daylight_Slave_Controller>.latitude Float -- subAnim[5]

The viewer location's latitude

<Daylight_Slave_Controller>.longitude Float -- subAnim[6]

The viewer location's longitude

<Daylight_Slave_Controller>.orbital_scale Float -- subAnim[7]

The Orbital scale controls the distance of the Assembly from the Compass Helper.

<Daylight_Slave_Controller>.sky_cover Float -- subAnim[8]

The Sky cover value, 0.0 means Clear, 1.0 means Cloudy.

<Daylight_Slave_Controller>.manual_position Transform -- subAnim[9]

Contains a PRS Controller to hold the manual transforms.

<Daylight_Slave_Controller>.manual_intensity Float -- subAnim[10]

Set the intensity when in manual mode.

See also

Compass : Helper

IES_Sky : Light

IES_Sun : Light

DaylightAssemblyHead : Helper

Interface: DaylightSystemFactory2


RingArray : System

Note: This class is not available in Autodesk VIZ.

Value > MAXWrapper > Node > System > RingArray

RingArray system objects are not creatable by MAXScript.

A RingArray system is comprised of a Dummy Helper object, a variable number of Box objects, a master controller, and Slave_Control controllers. The Slave_Control controllers are used as the transform controller for all Boxes in the RingArray system, and the master controller controls the individual Slave_Control controllers. The methods associated with the Slave_Control controller are described in Slave_Controller : Matrix3Controller .

An Interface

See also

Interface: RingArray


SpacewarpObject : Node

Value > MAXWrapper > Node > SpacewarpObject

The following image maps and lists show the Space Warp objects:

Forces

Drag

Gravity

Motor

Path_Follow

PBomb

Push

SpaceDisplace

Vortex

Wind

Deflectors

Deflector

PDynaFlect

POmniFlect

SDeflector

SDynaFlect

SOmniFlect

UDeflector

UDynaFlect

UOmniFlect

Geometric/Deformable

Bomb

Conform

SpaceDisplace

SpaceFFDBox

SpaceFFDCyl

SpaceRipple

SpaceWave

Modifier-Based

SpaceBend

SpaceNoise

SpaceSkew

SpaceStretch

SpaceTaper

SpaceTwist

Partices & Dynamics

Vector_Field


Spacewarp - Geometric/Deformable

Value > MAXWrapper > Node > SpacewarpObject > Geometric/Deformable

The following list shows the geometric/deformable space warp objects:

Bomb

Conform

SpaceDisplace

SpaceFFDBox

SpaceFFDCyl

SpaceRipple

SpaceWave


Bomb : SpacewarpObject

Bomb - superclass: SpacewarpObject; super-superclass:node - classID: #(994866, 0)

Value > MAXWrapper > Node > SpacewarpObject > Geometric/Deformable > Bomb

Constructor

bomb ...

Properties

<Bomb>.strength Float default: 1.0 -- animatable

The power of the bomb. Larger values make the particles fly farther. The closer an object is to the bomb, the greater the effect of the bomb.

<Bomb>.spin Float default: 0.0 -- animatable

The rate at which fragments rotate, in revolutions per second.

<Bomb>.falloff Float default: 100.0 -- animatable

The distance from the bomb, in world units, of the effect of the bomb. Fragments past this distance are not affected by the Strength and Spin settings, but are affected by the Gravity setting.

<Bomb>.fallOffEnable Boolean default: false

Turn on to use the Falloff setting. The falloff range appears as a yellow, tri-hooped sphere.

<Bomb>.minFragmentSize Integer default: 1

The minimum number of faces per fragment to be randomly generated by the "explosion".

<Bomb>.maxFragmentSize Integer default: 1

The maximum number of faces per fragment to be randomly generated by the "explosion".

<Bomb>.Gravity Float default: 1.0 -- animatable

The acceleration due to gravity. Note that gravity is always in the direction of the world Z axis. You can have negative gravity.

<Bomb>.chaos Float default: 0.0 -- animatable

Adds random variation to the explosion to make it less uniform. A setting of 0.0 is totally uniform; 1.0 is a realistic setting. A value greater than 1.0 makes the explosion extra chaotic.

<Bomb>.detonation Time default: 5f

The frame at which the bomb goes off. Bound objects are unaffected before this time.

<Bomb>.seed Integer default: 0

Change to alter randomly generated numbers in the bomb. You can achieve a different bomb effect by changing Seed while maintaining the other settings.

Associated Methods

bindSpaceWarp <node> <bomb_node>

Associated Binding Modifier

BombBinding

This modifier is automatically created by the bindSpaceWarp() method, and is not otherwise creatable by MAXScript. There are no properties associated with this binding modifier.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


ConformSpaceWarp : SpacewarpObject

ConformSpaceWarp - superclass: SpacewarpObject; super-superclass:node - classID: #(1038158332, 1077350422)

Value > MAXWrapper > Node > SpacewarpObject > Geometric/Deformable > ConformSpaceWarp

Constructor

conformSpaceWarp ...

Properties

<ConformSpaceWarp>.Projection_Distance Float default: 0.0 -- animatable

The distance a vertex in the bound object moves from its original location if it does not intersect the target object.

<ConformSpaceWarp>.Standoff_Distance Float default: 1.0 -- animatable

The distance maintained between the vertex and the surface of the target object.

<ConformSpaceWarp>.Selected_Verts Integer default: 0 -- animatable

When on, only the sub-object selection of vertices on the Stack are pushed. When off, all vertices in the object are pushed regardless of the Stack selection:

0- Off

1- On

<ConformSpaceWarp>.Icon_Size Float default: 0.0

The size of the icon.

NOTE:

There is not a way to set the Wrap To Object using MAXScript in 3ds Max.

Associated Methods

bindSpaceWarp <node> <conformSpaceWarp_node>

Associated Binding Modifier

SpaceConform

This modifier is automatically created by the bindSpaceWarp() method, and is not otherwise creatable by MAXScript. There are no properties associated with this binding modifier.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


SpaceDisplace : SpacewarpObject

Spacedisplace - superclass: SpacewarpObject; super-superclass:node - classID: #(938560, 0)

Value > MAXWrapper > Node > SpacewarpObject > Geometric/Deformable > SpaceDisplace

Constructor

spaceDisplace ...

Properties

<Spacedisplace>.strength Float default: 0.0 -- animatable

When set to 0.0, the Displace warp has no effect. Values greater than 0.0 displace object geometry or particles away from the position of the Displace space warp object. Values less than 0.0 displace geometry toward the warp.

<Spacedisplace>.decay Float default: 0.0 -- animatable

By default, the Displace warp has the same strength throughout world space. Increasing Decay causes displacement strength to diminish as distance increases from the position of the Displace warp object.

<Spacedisplace>.lumCenterEnable Boolean default: false

Turn on/off use of the luminance center.

<Spacedisplace>.lumCenter Float default: 0.5 -- animatable

By default, the Displace space warp centers the luminance by using medium (50%) gray as the zero displacement value. Gray values greater than 128 displace in the outward direction (away from the Displace warp object) and gray values less than 128 displace in the inward direction (toward the Displace warp object).

<Spacedisplace>.bitmap Bitmap default: undefined

Bitmap assigned to use for displacement.

<Spacedisplace>.map TextureMap default: undefined

Texture map assigned to use for displacement.

<Spacedisplace>.blur Float default: 0.0 -- animatable

Increase this value to blur or soften the effect of the bitmapped displacement.

<Spacedisplace>.maptype Integer default: 0

The map projection type:

0- Planar (Projects the map from a single plane.)

1- Cylindrical (Projects the map as if it were wrapped around the cylinder.)

2- Spherical (Projects the map from a sphere, with singularities at the top and bottom of the sphere, where the bitmap edges meet at the sphere's poles.)

3- Shrink Wrap (Truncates the corners of the map and joins them all at a single pole, creating one singularity.)

<Spacedisplace>.length Float default: 1.0 -- animatable

The length of the bounding box on the space warp gizmo.

<Spacedisplace>.width Float default: 1.0 -- animatable

The width of the bounding box on the space warp gizmo.

<Spacedisplace>.height Float default: 1.0 -- animatable

The height of the bounding box on the space warp gizmo.

<Spacedisplace>.U_Flip Boolean default: false

When on, reverses the orientation of the map along the U-axis.

<Spacedisplace>.U_Tile Float default: 1.0 -- animatable

The number of times the map repeats along the U-axis.

<Spacedisplace>.V_Flip Boolean default: false

When on, reverses the orientation of the map along the V-axis.

<Spacedisplace>.V_Tile Float default: 1.0 -- animatable

The number of times the map repeats along the U-axis.

<Spacedisplace>.W_Flip Boolean default: false

When on, reverses the orientation of the map along the W-axis.

<Spacedisplace>.W_Tile Float default: 1.0 -- animatable

The number of times the map repeats along the U-axis.

The following properties are defined for SpaceDisplace, but are not used:

<Spacedisplace>.axis Integer default: 0

<Spacedisplace>.cap Boolean default: false

<Spacedisplace>.useMap Boolean default: false

<Spacedisplace>.applyMap Boolean default: false

Associated Methods

bindSpaceWarp <node> <spaceDisplace_node>

Associated Binding Modifier

DisplaceBinding

This modifier is automatically created by the bindSpaceWarp() method, and is not otherwise creatable by MAXScript. There are no properties associated with this binding modifier.

NOTE:

When a TextureMap is assigned to map, a Displacement_Map subAnim is added to the parameters. The parameters of the subAnim correspond to the TextureMap properties.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


SpaceFFDBox : SpacewarpObject

SpaceFFDBox - superclass: SpacewarpObject; super-superclass:node - classID: #(1743405235, -25546556)

Value > MAXWrapper > Node > SpacewarpObject > Geometric/Deformable > SpaceFFDBox

Constructor

spaceFFDBox ...

Properties

<SpaceFFDBox>.length Float default: 0.0 -- animatable

Sets the length of the lattice.

<SpaceFFDBox>.width Float default: 0.0 -- animatable

Sets the width of the lattice.

<SpaceFFDBox>.height Float default: 0.0 -- animatable

Sets the length of the lattice.

<SpaceFFDBox>.dispLattice Boolean default: true -- alias: Lattice

When turned on, lines are drawn connecting the control points to make a grid.

<SpaceFFDBox>.dispSource Boolean default: false -- alias: Source_Volume

When on, the control points and lattice are displayed in their unmodified state.

<SpaceFFDBox>.deformType Integer default: 0

Specifies which vertices are affected by the FFD:

0- Only In Volume (Only vertices that lie inside the source volume are deformed. Vertices outside the source volume are not affected.)

1- All Vertices (All vertices are deformed regardless of whether they lie inside or outside the source volume, depending on the .falloff value.)

<SpaceFFDBox>.falloff Float default: 0.0 -- animatable

The distance from the lattice that the FFD effect will decrease to zero. When this value is set to 0, it's effectively turned off, and there is no falloff; that is, all vertices are affected regardless of their distance from the lattice. The units of the Falloff parameter are specified relative to the size of the lattice: A falloff of 1 means that the effect will go to 0 for points that are a lattice width/length/height away from the lattice (depending on which side they are on).

<SpaceFFDBox>.tension Float default: 25.0 -- animatable

Sets the tension of the deformation splines.

<SpaceFFDBox>.continuity Float default: 25.0 -- animatable

Sets the continuity of the deformation splines.

Associated Methods

bindSpaceWarp <node> <spaceFFDBox_node>

Associated Binding Modifier

FFD_Binding

This modifier is automatically created by the bindSpaceWarp() method, and is not otherwise creatable by MAXScript. There are no properties associated with this binding modifier.

NOTES:

The number of control points in a SpaceFFDBox created by MAXScript is always 4x4x4.

There is no method for assigning controllers to the FFD control points, nor is there a method for assigning the number or accessing the number of Length, Width, and Height points using MAXScript in 3ds Max.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods

See also Class and Object Inspector Functions and Scripting Vertex and Control Point Animation for details on accessing the control points in an FFD.


SpaceFFDCyl : SpacewarpObject

SpaceFFDCyl - superclass: SpacewarpObject; super-superclass:node - classID: #(-96010050, -1142402991)

Value > MAXWrapper > Node > SpacewarpObject > Geometric/Deformable > SpaceFFDCyl

Constructor

spaceFFDCyl ...

Properties

<SpaceFFDCyl>.radius Float default: 0.0 -- animatable

Sets the radius of the lattice.

<SpaceFFDCyl>.height Float default: 0.0 -- animatable

Sets the height of the lattice.

<SpaceFFDCyl>.dispLattice Boolean default: true -- alias: Lattice

When on, lines are drawn connecting the control points to make a grid.

<SpaceFFDCyl>.dispSource Boolean default: false -- alias: Source_Volume

When on, the control points and lattice are displayed in their unmodified state.

<SpaceFFDCyl>.deformType Integer default: 0

Specifies which vertices are affected by the FFD:

0- Only In Volume (Only vertices that lie inside the source volume are deformed. Vertices outside the source volume are not affected.)

1- All Vertices (All vertices are deformed regardless of whether they lie inside or outside the source volume, depending on the .falloff value.)

<SpaceFFDCyl>.falloff Float default: 0.0 -- animatable

The distance from the lattice that the FFD effect will decrease to zero. When this spinner is set to 0, it's effectively turned off, and there is no falloff; that is, all vertices are affected regardless of their distance from the lattice. The units of the Falloff parameter are specified relative to the size of the lattice: A falloff of 1 means that the effect will go to 0 for points that are a lattice width/length/height away from the lattice (depending on which side they are on).

<SpaceFFDCyl>.tension Float default: 25.0 -- animatable

Sets the tension of the deformation splines.

<SpaceFFDCyl>.continuity Float default: 25.0 -- animatable

Sets the continuity of the deformation splines.

Associated Methods

bindSpaceWarp <node> <spaceFFDCyl_node>

Associated Binding Modifier

FFD_Binding

This modifier is automatically created by the bindSpaceWarp() method, and is not otherwise creatable by MAXScript. There are no properties associated with this binding modifier.

NOTES:

The number of control points in a SpaceFFDCyl is always 4x8x4.

There is no method for assigning controllers to the FFD control points, nor is there a method for assigning the number or accessing the number of Side, Radial, and Height points using MAXScript in 3ds Max.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods

See also Class and Object Inspector Functions and Scripting Vertex and Control Point Animation for details on accessing the control points in an FFD.


SpaceRipple : SpacewarpObject

Spaceripple - superclass: SpacewarpObject; super-superclass:node - classID: #(48, 0)

Value > MAXWrapper > Node > SpacewarpObject > Geometric/Deformable > SpaceRipple

Constructor

spaceRipple ...

Properties

<Spaceripple>.amplitude1 Float default: 5.0 -- animatable, alias: Amplitude_1

Ripple amplitude along the ripple warp object's local X axis. Amplitude is expressed in active units.

<Spaceripple>.amplitude2 Float default: 5.0 -- animatable, alias: Amplitude_2

Ripple amplitude along the ripple warp object's local Y axis. Amplitude is expressed in active units.

<Spaceripple>.wavelength Float default: 25.0 -- animatable, alias: Wave_Length

The length of each wave, in active units.

<Spaceripple>.phase Float default: 0.0 -- animatable

Offsets the phase of the wave from its origin at the ripple object's center. Whole values have no effect; only fractional values do. Animating this parameter makes the ripple appear to travel through space.

<Spaceripple>.decay Float default: 0.0 -- animatable

When set to 0.0, the ripple has the same amplitude or amplitudes throughout world space. Increasing the Decay value causes amplitude to diminish as distance increases from the position of the ripple warp object.

<Spaceripple>.circles Integer default: 10

The number of circles in the ripple icon.

<Spaceripple>.segments Integer default: 16

The number of segments (pie slices) in the ripple icon.

<Spaceripple>.divisions Integer default: 4

Adjusts the size of the ripple icon without altering the ripple effect as scaling would.

Associated Methods

bindSpaceWarp <node> <spaceRipple_node>

Associated Binding Modifier and Properties

RippleBinding

This modifier is automatically created by the bindSpaceWarp() method, and is not otherwise creatable by MAXScript. The following property is associated with this binding modifier:

<RippleBinding>.Flexibility Float default: 1.0

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


SpaceWave : SpacewarpObject

Spacewave - superclass: SpacewarpObject; super-superclass:node - classID: #(53, 0)

Value > MAXWrapper > Node > SpacewarpObject > Geometric/Deformable > SpaceRipple

Constructor

spaceWave ...

Properties

<Spacewave>.amplitude1 Float default: 5.0 -- animatable, alias: Amplitude_1

Wave amplitude along the wave warp object's local X axis.

<Spacewave>.amplitude2 Float default: 5.0 -- animatable, alias: Amplitude_2

Wave amplitude along the wave warp object's local Y axis.

<Spacewave>.wavelength Float default: 25.0 -- animatable, alias: Wave_Length

The length of each wave along the wave's local Y axis, in active units.

<Spacewave>.phase Float default: 0.0 -- animatable

Offsets the phase of the wave from its origin at the wave object's center. Whole values have no effect; only fractional values do. Animating this parameter makes the wave appear to travel through space.

<Spacewave>.decay Float default: 0.0 -- animatable

When set to 0.0, the wave has the same amplitude or amplitudes throughout world space. Increasing the Decay value causes amplitude to diminish as distance increases from the position of the wave warp object.

<Spacewave>.circles Integer default: 4

The number of side segments along the wave object's local X dimension.

<Spacewave>.segments Integer default: 20

The number of segments along the wave object's local Y dimension.

<Spacewave>.divisions Integer default: 10

Adjusts the size of the wave icon without altering the wave effect as scaling would.

Associated Methods

bindSpaceWarp <node> <spaceWave_node>

Associated Binding Modifier and Properties

WaveBinding

This modifier is automatically created by the bindSpaceWarp() method, and is not otherwise creatable by MAXScript. The following property is associated with this binding modifier:

<WaveBinding>.Flexibility Float default: 1.0

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Spacewarp - Particles and Dynamics

Value > MAXWrapper > Node > SpacewarpObject > Particles and Dynamics

The following list shows the particles and dynamics space warp objects:

Gravity

Motor

PBomb

Push

Vector

Wind


Drag - superclass: SpacewarpObject

Drag : SpacewarpObject

Drag - superclass: SpacewarpObject; super-superclass:node - 29:0 - classID: #(1173650369, 674975258)

Value > MAXWrapper > Node > SpacewarpObject > Drag

The Drag space warp is a particle motion damper that reduces particle velocity by a specified amount within a specified range. The damping can be applied linearly, spherically, or cylindrically. Drag is useful for simulating wind resistance, transfers into dense media (like water), impacts with force fields, and other, similar situations.

With each damping type, you can control the damping effect along several vectors. The damping is also affected by particle system settings, such as speed.

Constructor

Drag ...

Note: This class is not available in Autodesk VIZ.

Properties:

<Drag>.'time on' Integer default: 0 -- integer; Time_On

The frame numbers at which the space warp becomes active and becomes inactive.

<Drag>.'time off' Integer default: 16000 -- animatable; integer; Time_Off

The frame numbers at which the space warp becomes active and becomes inactive.

<Drag>.symmetry Integer default: 0 -- radio button number; Damping_Symmetry

This group lets you choose Linear Damping, Spherical Damping, or Cylindrical Damping, plus a set of parameters for each.

<Drag>.dampingx Float default: 5.0 -- animatable; percentage; X_Damping

Specifies the percentage of particle motion along the local Drag space warp axis that's affected by the damping.

<Drag>.rangex Float default: 100.0 -- animatable; float; X_Range

Sets the thickness of the "range plane," or the infinite plane perpendicular to the specified axis. Takes effect only when Unlimited Range is turned off.

<Drag>.falloffx Float default: 1000.0 -- animatable; float; X_Falloff

Specifies the distance beyond the X, Y, or Z Range within which Linear Damping is applied. Damping is strongest at the Range distance, decreases linearly out to the limit of the Falloff, and has no effect beyond that. While Falloff is effected only beyond the Range, it is measured from the center of the icon, and always has a minimum value equal to the Range value. Takes effect only when Unlimited Range is turned off.

<Drag>.dampingy Float default: 5.0 -- animatable; percentage; Y_Damping

Specifies the percentage of particle motion along the local Drag space warp axis that's affected by the damping.

<Drag>.rangey Float default: 100.0 -- animatable; float; Y_Range

Sets the thickness of the "range plane," or the infinite plane perpendicular to the specified axis. Takes effect only when Unlimited Range is turned off.

<Drag>.falloffy Float default: 1000.0 -- animatable; float; Y_Falloff

Specifies the distance beyond the X, Y, or Z Range within which Linear Damping is applied. Damping is strongest at the Range distance, decreases linearly out to the limit of the Falloff, and has no effect beyond that. While Falloff is effected only beyond the Range, it is measured from the center of the icon, and always has a minimum value equal to the Range value. Takes effect only when Unlimited Range is turned off.

<Drag>.dampingz Float default: 5.0 -- animatable; percentage; Z_Damping

Specifies the percentage of particle motion along the local Drag space warp axis that's affected by the damping.

<Drag>.rangez Float default: 100.0 -- animatable; float; Z_Range

Sets the thickness of the "range plane," or the infinite plane perpendicular to the specified axis. Takes effect only when Unlimited Range is turned off.

<Drag>.falloffz Float default: 1000.0 -- animatable; float; Z_Falloff

Specifies the distance beyond the X, Y, or Z Range within which Linear Damping is applied. Damping is strongest at the Range distance, decreases linearly out to the limit of the Falloff, and has no effect beyond that. While Falloff is effected only beyond the Range, it is measured from the center of the icon, and always has a minimum value equal to the Range value. Takes effect only when Unlimited Range is turned off.

<Drag>.dampingr Float default: 5.0 -- animatable; percentage; Radial_Damping

Radial specifies the percentage of particle motion toward or away from the center of the Drag icon that's affected by the damping. Tangential specifies the percentage of particle motion across the body of the Drag icon that's affected by the damping.

<Drag>.ranger Float default: 100.0 -- animatable; float; Radial_Range

Specifies the distance from the center of the Drag icon, in system units, within which damping is in full effect. Takes effect only when Unlimited Range is turned off.

<Drag>.falloffr Float default: 1000.0 -- animatable; float; Radial_Falloff

Specifies the distance beyond the Radial/Tangential Range within which Linear Damping is applied. Damping is strongest at the Range distance, decreases linearly out to the limit of the Falloff, and has no effect beyond that. While Falloff is effected only beyond the Range, it is measured from the center of the icon, and always has a minimum value equal to the Range value. Takes effect only when Unlimited Range is turned off.

<Drag>.dampinggc Float default: 5.0 -- animatable; percentage; Tangential_Damping

Radial specifies the percentage of particle motion toward or away from the center of the Drag icon that's affected by the damping. Tangential specifies the percentage of particle motion across the body of the Drag icon that's affected by the damping.

<Drag>.rangegc Float default: 100.0 -- animatable; float; Tangential_Range

Specifies the distance from the center of the Drag icon, in system units, within which damping is in full effect. Takes effect only when Unlimited Range is turned off.

<Drag>.falloffgc Float default: 1000.0 -- animatable; float; Tangential_Falloff

Specifies the distance beyond the Radial/Tangential Range within which Linear Damping is applied. Damping is strongest at the Range distance, decreases linearly out to the limit of the Falloff, and has no effect beyond that. While Falloff is effected only beyond the Range, it is measured from the center of the icon, and always has a minimum value equal to the Range value. Takes effect only when Unlimited Range is turned off.

<Drag>.dampingrc Float default: 5.0 -- animatable; percentage; Radial_Damping

Damping controls the percentage of particle motion toward or away from the center of the circular portion of the icon (Radial), across the radial vector (Tangential), or along the length of the icon's long axis (Axial) that's affected by the damping, on a per-frame basis.

<Drag>.rangerc Float default: 100.0 -- animatable; float; Radial_Range

Specifies the distance from the center of the Drag icon, in system units, within which Radial and Axial damping are in full effect. Range also specifies the thickness of the infinite plane that governs the range of Axial damping. Takes effect only when Unlimited Range is turned off.

<Drag>.falloffrc Float default: 1000.0 -- animatable; float; Radial_Falloff

Specifies the distance beyond the Radial/Tangential/Axial Range within which Linear Damping is applied. Damping is strongest at the Range distance, decreases linearly out to the limit of the Falloff, and has no effect beyond that. While Falloff is effected only beyond the Range, it is measured from the center of the icon, and always has a minimum value equal to the Range value. Takes effect only when Unlimited Range is turned off.

<Drag>.dampingc Float default: 5.0 -- animatable; percentage; Tangential_Damping

Damping controls the percentage of particle motion toward or away from the center of the circular portion of the icon (Radial), across the radial vector (Tangential), or along the length of the icon's long axis (Axial) that's affected by the damping, on a per-frame basis.

<Drag>.rangec Float default: 100.0 -- animatable; float; Tangential_Range

Specifies the distance from the center of the Drag icon, in system units, within which Radial and Axial damping are in full effect. Range also specifies the thickness of the infinite plane that governs the range of Axial damping. Takes effect only when Unlimited Range is turned off.

<Drag>.falloffc Float default: 1000.0 -- animatable; float; Tangential_Falloff

Specifies the distance beyond the Radial/Tangential/Axial Range within which Linear Damping is applied. Damping is strongest at the Range distance, decreases linearly out to the limit of the Falloff, and has no effect beyond that. While Falloff is effected only beyond the Range, it is measured from the center of the icon, and always has a minimum value equal to the Range value. Takes effect only when Unlimited Range is turned off.

<Drag>.dampingax Float default: 5.0 -- animatable; percentage; Axial_Damping

Damping controls the percentage of particle motion toward or away from the center of the circular portion of the icon (Radial), across the radial vector (Tangential), or along the length of the icon's long axis (Axial) that's affected by the damping, on a per-frame basis.

<Drag>.rangeax Float default: 100.0 -- animatable; float; Axial_Range

Specifies the distance from the center of the Drag icon, in system units, within which Radial and Axial damping are in full effect. Range also specifies the thickness of the infinite plane that governs the range of Axial damping. Takes effect only when Unlimited Range is turned off.

<Drag>.falloffax Float default: 1000.0 -- animatable; float; Axial_Falloff

Specifies the distance beyond the Radial/Tangential/Axial Range within which Linear Damping is applied. Damping is strongest at the Range distance, decreases linearly out to the limit of the Falloff, and has no effect beyond that. While Falloff is effected only beyond the Range, it is measured from the center of the icon, and always has a minimum value equal to the Range value. Takes effect only when Unlimited Range is turned off.

<Drag>.rangeless Boolean default: true -- boolean; Unlimited_Range

<Drag>.iconsize Float default: 10.0 -- float; Icon_Size

Specifies the size of the icon.

See also

Modifier and SpacewarpModifier Types


Gravity : SpacewarpObject

gravity - superclass: SpacewarpObject; super-superclass:node - classID: #(938556, 0)

Value > MAXWrapper > Node > SpacewarpObject > Particles and Dynamics > Gravity

Constructor

gravity ...

Properties

<Gravity>.strength  Float default: 1.0 -- animatable

Increasing Strength increases the effect of gravity; that is, how objects move in relation to the Gravity icon's direction arrow. Strength less than 0.0 creates negative gravity, which repels particles moving in the same direction and attracts particles moving in the opposite direction. When Strength is set to 0.0, the Gravity space warp has no effect.

<Gravity>.decay  Float default: 0.0 -- animatable

When Decay is set to 0.0, the Gravity space warp has the same strength throughout world space. Increasing the Decay value causes gravity strength to diminish as distance increases from the position of the gravity warp object.

<Gravity>.gravitytype Integer default: 0

Set the type of gravity effect:

0- Planar

1- Spherical

<Gravity>.showRange   Boolean  default: false

When on, and when the decay value is greater than 0.0, icons in the viewports indicate the range at which the force of gravity is half the maximum value.

<Gravity>.iconsize  Float default: 10.0 -- animatable

Size of the Gravity warp object icon, in active units. You set the initial size when you drag to create the Gravity object. This value does not change the gravity effect.

<Gravity>.hoopson   Boolean default: true

When on, and when the decay value is greater than 0.0, icons in the viewports indicate the range at which the force of gravity is half the maximum value. For the Planar option, the indicators are two planes; for use the Spherical option, the indicator is a double-hooped sphere.

Associated Methods

bindSpaceWarp <node> <gravity_node>

Associated Binding Modifier

GravityBinding

This modifier is automatically created by the bindSpaceWarp() method, and is not otherwise creatable by MAXScript. There are no properties associated with this binding modifier.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Motor, SpacewarpObject

Motor : SpacewarpObject

Motor - superclass: SpacewarpObject; super-superclass:node - classID: #(1661476074, 533023195)

Value > MAXWrapper > Node > SpacewarpObject > Particles and Dynamics > Motor

Constructor

motor ...

Properties

<Motor>.On_Time Time default: 0f

The frame at which the motor effect begins.

<Motor>.Off_Time Time default: 30f

The frame at which the motor effect ends.

<Motor>.Basic_Torque Float default: 1.0 -- animatable

The amount of force exerted by the space warp.

<Motor>.units Integer default: 0

The unit of measure for the basic torque setting:

0- Newton-meters

1- Pound-feet

2- Pound-inches

<Motor>.Feedback_On Integer default: 0

When on, the force varies depending on the speed of the affected objects relative to the specified Target Speed. When off, the force remains constant, regardless of the speed of the affected objects:

0- Off

1- On

<Motor>.Reversible Integer default: 0

When on, if the object's speed exceeds the Target Speed setting, the force is reversed:

0- Off

1- On

<Motor>.Target_Revs Float default: 100.0 -- animatable

The maximum revolutions before the feedback takes effect.

<Motor>.Revs_Units Integer default: 1

The unit of measure for the target revolutions:

0- RPH

1- RPM

2- RPS

<Motor>.Control_Gain Float default: 50.0 -- animatable

Specifies how quickly the force adjusts to approaching the target speed. If set to 100%, the correction is immediate. If set lower, a slower and "looser" response occurs.

<Motor>.Enable_Variation Integer default: 0

Turn on to enable the variations:

0- Off

1- On

<Motor>.Variation_Period_1 Time default: 0.625f

The time over which the noise variation makes a full cycle.

<Motor>.Amplitude_1 Float default: 100.0 -- animatable

The strength of the variation (in percent).

<Motor>.Variation_Phase_1 Float default: 0.0 -- animatable, angle

Offsets the variation pattern.

<Motor>.Variation_Period_2 Time default: 0.625f

Provides an additional variation pattern to increase the noise.

<Motor>.Amplitude_2 Float default: 100.0 -- animatable

The strength of the variation of the second wave in (percent).

<Motor>.Variation_Phase_2 Float default: 0.0 -- animatable, angle

Offsets the variation pattern of the second wave.

<Motor>.Range_Enable Integer default: 0

When on, limits the range of the effect to a sphere, displayed as a tri-hooped sphere. The effect falls off increasingly as the particles near the boundary of the sphere.

0- Off

1- On

<Motor>.Range_Value Float default: 1000.0 -- animatable

The radius of the range of the effect, in units.

<Motor>.Icon_Size Float default: 0.0

The size of the Motor icon. This is for display purposes only, and does not alter the Motor effect.

Associated Methods

bindSpaceWarp <node> <motor_node>

Associated Binding Modifier

MotorMod

This modifier is automatically created by the bindSpaceWarp() method, and is not otherwise creatable by MAXScript. There are no properties associated with this binding modifier.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


PBomb : SpacewarpObject

PBomb - superclass: SpacewarpObject; super-superclass:node - classID: #(1277169139, 439646839)

Value > MAXWrapper > Node > SpacewarpObject > Particles and Dynamics > PBomb

Constructor

PBomb ...

Properties

<PBomb>.symmetry Integer default: 0

The shape, or pattern of the blast effect:

0- Spherical (The blast force radiates outward from the PBomb icon in all directions. The icon looks like a spherical anarchist's bomb.)

1- Cylindrical (The blast force radiates outward from and normal to the central axis, or core of the cylindrical icon. The icon looks like a stick of dynamite with a fuse.)

2- Planar (The blast force radiates both up and down, perpendicular to the plane of the planar icon. The icon looks like a plane with arrows pointing up and down along the direction of the blast force.)

<PBomb>.chaos Float default: 10.0 -- percentage

The blast forces vary for each particle or each frame, an effect similar to Brownian motion, with a rate of change in the direction of force equal to the rendering interval rate.

<PBomb>.Start_Time Time default: 30f

The frame number at which the impulse forces are first applied to the particles.

<PBomb>.Lasts_For Time default: 1f

The number of frames, beyond the first, over which the forces are applied. This value should typically be a small number, such as between 0 and 3.

<PBomb>.strength Float default: 1.0 -- animatable

The change in velocity along the blast vector, in units per frame. Increasing Strength increases the speed with which the particles are blown away from the bomb icon.

<PBomb>.Decay_Type Integer default: 1

Sets the decay type:

0- Unlimited Range (The effects of the bomb icon reach all bound particles throughout the scene. This option ignores the Range setting, which specifies the distance of the PBomb effect.)

1- Linear (The impulse forces decay linearly between the full Strength setting to a value of 0 at the specified Range setting.)

2- Exponential (The impulse forces decay exponentially between the full Strength setting to a value of 0 at the specified Range setting.)

<PBomb>.range Float default: 1000.0 -- animatable

The maximum distance, in units, over which the PBomb icon affects the bound particle system. If the Range is large enough to reach only a portion of the particle system, only that part of the system is affected.

<PBomb>.Icon_Size Float default: 0.0

The overall size of the PBomb icon.

Associated Methods

bindSpaceWarp <node> <pbomb_node>

Associated Binding Modifier

PBombMod

This modifier is automatically created by the bindSpaceWarp() method, and is not otherwise creatable by MAXScript. There are no properties associated with this binding modifier.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


PushSpaceWarp : SpacewarpObject

PushSpaceWarp - superclass: SpacewarpObject; super-superclass:node - classID: #(1028471973, 992097679)

Value > MAXWrapper > Node > SpacewarpObject > Particles and Dynamics > PushSpaceWarp

Constructor

pushSpaceWarp ...

Properties

<PushSpaceWarp>.On_Time Time default: 0f

The frame in which the space warp begins its effect.

<PushSpaceWarp>.Off_Time Time default: 30f

The frame in which the space warp ends its effect.

<PushSpaceWarp>.Basic_Force Float default: 1.0 -- animatable

The amount of force exerted by the space warp.

<PushSpaceWarp>.units Integer default: 0

The unit of force used by the basic force:

0- Newtons

1- Pounds

<PushSpaceWarp>.Feedback_On Integer default: 0

When on, the force varies depending on the speed of the affected objects relative to the specified Target Speed. When off, the force remains constant, regardless of the speed of the affected objects:

0- Off

1- On

<PushSpaceWarp>.Reversible Integer default: 0

When on, if the object's speed exceeds the Target Speed setting, the force is reversed

0- Off

1- On

<PushSpaceWarp>.Target_Speed Float default: 100.0 -- animatable

The maximum speed in units per frame before the Feedback takes effect.

<PushSpaceWarp>.Control_Gain Float default: 50.0 -- animatable

Specifies how quickly the force adjusts to approaching the target speed. If set to 100 percent, the correction is immediate. If set lower, a slower and "looser" response occurs.

<PushSpaceWarp>.Enable_Variation Integer default: 0

Turn on/off variations:

0- Off

1- On

<PushSpaceWarp>.Variation_Period_1 Time default: 0.625f—animatable

The time over which the noise variation makes a full cycle.

<PushSpaceWarp>.Amplitude_1 Float default: 100.0 -- animatable

The strength of the variation (in percent).

<PushSpaceWarp>.Variation_Phase_1 Float default: 0.0 -- animatable, angle

Offsets the variation pattern.

<PushSpaceWarp>.Variation_Period_2 Time default: 0.625f—animatable

Provides an additional variation pattern (a second wave) to increase the noise.

<PushSpaceWarp>.Amplitude_2 Float default: 100.0 -- animatable

The strength of the variation of the second wave (in percent).

<PushSpaceWarp>.Variation_Phase_2 Float default: 0.0 -- animatable, angle

Offsets the variation pattern of the second wave

<PushSpaceWarp>.Range_Enable Integer default: 0

When on, limits the range of the effect to a sphere, displayed as a tri-hooped sphere. The effect falls off increasingly as the particles near the boundary of the sphere.

0- Off

1- On

<PushSpaceWarp>.Range_Value Float default: 1000.0 -- animatable

The radius of the range of the effect, in units.

<PushSpaceWarp>.Icon_Size Float default: 0.0

The size of the Push icon. This is for display purposes only, and does not alter the Push effect.

Associated Methods

bindSpaceWarp <node> <pushSpaceWarp_node>

Associated Binding Modifier

PushMod

This modifier is automatically created by the bindSpaceWarp() method, and is not otherwise creatable by MAXScript. There are no properties associated with this binding modifier.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


UDynaDeflector - superclass: SpacewarpObject

UDynaDeflector : SpacewarpObject

UDynaDeflector - superclass: SpacewarpObject; super-superclass - classID: #(1750561194, 1736524989)

Value > MAXWrapper > SpacewarpObject > UDynaDeflector

Constructor

UDynaDeflector ...

Note: This class is not available in Autodesk VIZ.

Properties

<UDynaDeflector>.timeOn Integer default: 0f -- animatable; time; Time_On

Get/Set the time the deflector is enabled.

<UDynaDeflector>.timeOff Integer default: 100f -- animatable; time; Time_Off

Get/Set the time the deflector is disabled.

<UDynaDeflector>.affects Float default: 100.0 -- animatable; percentage; Reflects

Get/Set the "Reflects %" value.

<UDynaDeflector>.bounce Float default: 1.0 -- animatable; float

Get/Set the bounce factor. When set to 1.0 (default), the particle or dynamic object will retain its velocity magnitude. Values below 1.0 will result in velocity loss.

<UDynaDeflector>.bouncevar Float default: 0.0 -- animatable; percentage; Bounce_Variation

Get/Set the bounce variation.

<UDynaDeflector>.chaos Float default: 0.0 -- animatable; percentage

Get/Set the chaos value which controls the variation of the reflection vector. When set to 0, every particle will follow the reflection rule perfectly.

<UDynaDeflector>.friction Float default: 0.0 -- animatable; percentage

Get/Set the friction value. When higher than 0, tangential motion of a particle or dynamic object relatively to the deflector's surface will result in velocity loss.

<UDynaDeflector>.inheritVelocity Float default: 1.0 -- animatable; float; Velocity_Inheritance

Get/Set the velocity inheritance value.

<UDynaDeflector>.radius Float default: 0.0 -- animatable; float; Icon_Size

Get/Set the icon size. Note that the default is 0, so creating via MAXScript will not show a visible object in the viewport unless this property is modified.

<UDynaDeflector>.mass Float default: 1.0 -- animatable; float; Particle_Mass

Get/Set the mass value.

<UDynaDeflector>.massUnits Integer default: 0 -- radio button number; Particle_Mass_Units

Get/Set the mass units. Possible values are:

0 - gram (default)

1 - Kg

2 - Lbm


Vortex - superclass: SpacewarpObject

Vortex : SpacewarpObject

Vortex - superclass: SpacewarpObject; super-superclass:node - 19:0 - classID: #(217851359, 1867456353)

Value > MAXWrapper > SpacewarpObject > Vortex

The Vortex space warp applies a force to particle systems, spinning them through a whirling vortex, and then moving them down a long, thin spout or vortex well. Vortex is useful for creating black holes, whirlpools, tornadoes, and other funnel-type objects.

The space warp settings let you control the vortex shape, the well characteristics, and rate and range of particle capture. The shape of the vortex is also affected by particle system settings, such as speed.

Constructor

Vortex ...

Note: This class is not available in Autodesk VIZ.

Properties

<Vortex>.'time on' Integer default: 0 -- integer; Time_On

The frame numbers at which the space warp becomes active and becomes inactive.

<Vortex>.'time off' Integer default: 16000 -- animatable; integer; Time_Off

The frame numbers at which the space warp becomes active and becomes inactive.

<Vortex>.axialstrength Float default: 0.1 -- animatable; float; Axial_Drop_Strength

Specifies how quickly particles move in the direction of the drop axis.

<Vortex>.axialrange Float default: 100.0 -- animatable; float; Axial_Range

The distance from the center of the Vortex icon, in system units, at which Axial Damping has its full effect. Takes effect only when Unlimited Range is turned off.

<Vortex>.axialfalloff Float default: 1000.0 -- animatable; float; Axial_Falloff

Specifies the distance beyond the Axial Range within which Axial Damping is applied. Axial Damping is strongest at the Range distance, decreases linearly out to the limit of the Axial Falloff, and has no effect beyond that. Takes effect only when Unlimited Range is turned off.

<Vortex>.axialdamping Float default: 5.0 -- animatable; percentage; Axial_Damping

Controls the degree to which particle motion parallel to the drop axis is restrained per frame. Default=5.0. Range=0 to 100.

For subtle effects, use values of less than 10%. For more overt effects, try using higher values that increase to 100% over the course of a few frames.

<Vortex>.rotationstrength Float default: 0.5 -- animatable; float; Orbital_Speed_Strength

Specifies how quickly the particles rotate.

<Vortex>.rotationrange Float default: 100.0 -- animatable; float; Orbital_Range

The distance from the center of the Vortex icon, in system units, at which Orbital Damping has its full effect. Takes effect only when Unlimited Range is turned off.

<Vortex>.rotationfalloff Float default: 1000.0 -- animatable; float; Orbital_Falloff

Specifies the distance beyond the Orbital Range within which Orbital Damping is applied. Orbital Damping is strongest at the Range distance, decreases linearly out to the limit of the Orbital Falloff, and has no effect beyond that. Takes effect only when Unlimited Range is turned off.

<Vortex>.rotationdamping Float default: 5.0 -- animatable; percentage; Orbital_Damping

Controls the degree to which orbital particle motion is restrained per frame. Smaller values produce a wide spiral, while larger values produce a thin spiral. Default=5.0. Range=0 to 100.

<Vortex>.radialstrength Float default: 0.5 -- animatable; float; Radial_Pull_Strength

Specifies the distance from the drop axis at which the particles rotate.

<Vortex>.radialrange Float default: 100.0 -- animatable; float; Radial_Range

The distance from the center of the Vortex icon, in system units, at which Radial Damping has its full effect. Takes effect only when Unlimited Range is turned off.

<Vortex>.radialfalloff Float default: 1000.0 -- animatable; float; Radial_Falloff

Specifies the distance beyond the Radial Range within which Radial Damping is applied. Radial Damping is strongest at the Range distance, decreases linearly out to the limit of the Radial Falloff, and has no effect beyond that. Takes effect only when Unlimited Range is turned off.

<Vortex>.radialdamping Float default: 5.0 -- animatable; percentage; Radial_Damping

Controls the degree to which Radial Pull is restrained per frame. Default=5.0. Range=0 to 100.

<Vortex>.taperstrength Float default: 100.0 -- animatable; float; Taper_Length

Controls the shape of the vortex. Low values create a vortex with a wide, flared mouth, while high values create a vortex with nearly vertical sides. Default=100. Range=1.0 to 4.0.

<Vortex>.tapershape Float default: 1.0 -- animatable; float; Taper_Curve

Controls the length of the vortex, as well as its shape. Lower settings give you a "tighter" vortex, while higher settings give you a "looser" vortex. Default=100.

<Vortex>.direction Integer default: 0 -- radio button number

Determines whether particles rotate clockwise or counterclockwise.

<Vortex>.rangeless Boolean default: true -- boolean; Unlimited_Range

When on, Vortex exerts full damping strength over an unlimited range. When off, the Range and Falloff settings take effect.

<Vortex>.iconsize Float default: 10.0 -- float; Icon_Size

Specifies the size of the icon.

EXAMPLE

Vortex 'time on':0 'time off':16000 axialstrength:0.1 axialrange:100 axialfalloff:1000 axialdamping:5 rotationstrength:0.5 rotationrange:100 rotationfalloff:1000 rotationdamping:5 radialstrength:0.5 radialrange:100 radialfalloff:1000 radialdamping:5 taperstrength:100 tapershape:1 direction:0 rangeless:on pos:[32.5437,-58.2321,0] isSelected:on iconSize:25.8103

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Wind : SpacewarpObject

Wind - superclass: SpacewarpObject; super-superclass:node - classID: #(938558, 0)

Value > MAXWrapper > Node > SpacewarpObject > Particles and Dynamics > Wind

Constructor

wind ...

Properties

<Wind>.strength Float default: 1.0 -- animatable

Increasing Strength increases the wind effect. Strength less than 0.0 creates a suction. It repels particles moving in the same direction and attracts particles moving in the opposite direction. When Strength is 0.0, the Wind warp has no effect.

<Wind>.decay Float default: 1.0 -- animatable

When Decay is set to 0.0, the Wind warp has the same strength throughout world space. Increasing the Decay value causes wind strength to diminish as distance increases from the position of the Wind warp object.

<Wind>.windtype Integer default: 0; Wind_Type

Sets the type of wind:

0- Planar

1- Spherical

<Wind>.turbulence Float default: 1.0 -- animatable

Causes particles to change course randomly as the wind blows them. The greater the value, the greater the turbulence effect.

<Wind>.frequency Float default: 1.0 -- animatable

When set greater than 0.0, causes turbulence to vary periodically over time. This subtle effect is probably not visible unless your bound particle system generates a large number of particles.

<Wind>.scale Float default: 0.0 -- animatable

Scales the turbulence effect. When Scale is small, turbulence is smoother and more regular. As Scale increases, turbulence grows more irregular and wild.

NOTE:

The .scale property name collides with the node-level .scale property. In order to access the Wind Space Warp's Scale property, you should use <Wind>.baseobject.scale instead.

<Wind>.showRange   Boolean default: false

When on, and when the decay value is greater than zero, icons appear in the viewports that represent the range at which the force of wind is half the maximum value.

<Wind>.iconsize Float default: 10.0 -- animatable; Icon_Size

Size of the Wind warp object icon, in active units.

<Wind>.hoopson   Boolean default: false; Hoops_On

When turned on, icons appear in the viewports that represent the range at which the force of wind is half the maximum value. When you use the Planar option, the indicators are two planes; when you use the Spherical option, the indicator is a double-hooped sphere.

Associated Methods

bindSpaceWarp <node> <wind_node>

Associated Binding Modifier

WindBinding

This modifier is automatically created by the bindSpaceWarp() method, and is not otherwise creatable by MAXScript. There are no properties associated with this binding modifier.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Spacewarp - Modifier-Based

Value > MAXWrapper > Node > SpacewarpObject > Modifier-Based

The following list shows the Modifier-Based space warp objects:

SpaceBend

SpaceNoise

SpaceSkew

SpaceStretch

SpaceTaper

SpaceTwist


SpaceBend : SpacewarpObject

SpaceBend - superclass: SpacewarpObject; super-superclass:node - classID: #(16, 1)

Value > MAXWrapper > Node > SpacewarpObject > Modifier-Based > SpaceBend

Constructor

spaceBend ...

bendModWSM ...

Properties

<SpaceBend>.length Float default: 0.0 -- animatable

The length of the warp object.

<SpaceBend>.width Float default: 0.0 -- animatable

The width of the warp object.

<SpaceBend>.height Float default: 0.0 -- animatable

The height of the warp object.

<SpaceBend>.decay Float default: 0.0 -- animatable

When is set to 0, there is no decay, and the space warp affects its bound object regardless of its distance from the object. When you increase the decay, the effect on the bound object falls off exponentially.

<SpaceBend>.angle Float default: 0.0

The angle to bend from the vertical plane.

<SpaceBend>.direction Float default: 0.0

The direction of the bend relative to the horizontal plane.

<SpaceBend>.lowerlimit Float default: 0.0

The lower boundary in world units from the bend center point beyond which the bend no longer affects geometry.

<SpaceBend>.upperlimit Float default: 0.0

The upper boundary in world units from the bend center point beyond which the bend no longer affects geometry.

Associated Methods

bindSpaceWarp <node> <spaceBend_node>

Associated Binding Modifier

SimpleOSMToWSMMod

This modifier is automatically created by the bindSpaceWarp() method, and is not otherwise creatable by MAXScript. There are no properties associated with this binding modifier.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


SpaceNoise : SpacewarpObject

SpaceNoise - superclass: SpacewarpObject; super-superclass:node - classID: #(-107499228, 1)

Value > MAXWrapper > Node > SpacewarpObject > Modifier-Based > SpaceNoise

Constructor

spaceNoise ...

Properties

<SpaceNoise>.length Float default: 0.0 -- animatable

The length of the warp object.

<SpaceNoise>.width Float default: 0.0 -- animatable

The width of the warp object.

<SpaceNoise>.height Float default: 0.0 -- animatable

The height of the warp object.

<SpaceNoise>.decay Float default: 0.0 -- animatable

When is set to 0, there is no decay, and the space warp affects its bound object regardless of its distance from the object. When you increase the decay, the effect on the bound object falls off exponentially.

<SpaceNoise>.seed Integer default: 0 -- animatable

Generates a random start point from the number you set. Especially useful in creating terrain, because each setting can produce a different configuration.

<SpaceNoise>.scale Float default: 100 -- animatable

The size of the noise effect (not strength). Larger values produce smoother noise, lower values more jagged noise.

<SpaceNoise>.fractal Integer default: 0 -- animatable

When on, produces a fractal effect based on current settings:

0- Off

1- On

<SpaceNoise>.Rough Float default: 0.0 -- animatable

Determines the extent of fractal variation. Lower values are less rough than higher values.

<SpaceNoise>.iterations Float default: 6.0 -- animatable

The number of iterations (or octaves) used by the fractal function. Fewer iterations use less fractal energy and generate a smoother effect. An iteration of 1.0 is the same as turning Fractal off.

<SpaceNoise>.phase Integer default: 0 -- animatable

Shifts the start and end points of the underlying wave.

<SpaceNoise>.strength Point3 default: [0,0,0] -- animatable

The strength of the noise effect along each of three axes. Enter a value for at least one of these axes to produce a noise effect.

NOTES:

Since scale is a property for all nodes, a name conflict exists between the scale property for nodes and the scale property for SpaceNoise. To access the SpaceNoise scale property, you need to access this property as a property of a node's baseObject property.

FOR EXAMPLE:

sn=spaceNoise()

sn.baseObject.scale=150

The Animate Noise property is not accessible using MAXScript in 3ds Max

Associated Methods

bindSpaceWarp <node> <spaceNoise_node>

Associated Binding Modifier

SimpleOSMToWSMMod

This modifier is automatically created by the bindSpaceWarp() method, and is not otherwise creatable by MAXScript. There are no properties associated with this binding modifier.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


SpaceSkew : SpacewarpObject

SpaceSkew - superclass: SpacewarpObject; super-superclass:node - classID: #(1866252970, 1)

Value > MAXWrapper > Node > SpacewarpObject > Modifier-Based > SpaceSkew

Constructor

spaceSkew ...

Properties

<SpaceSkew>.length Float default: 0.0 -- animatable

The length of the warp object.

<SpaceSkew>.width Float default: 0.0 -- animatable

The width of the warp object.

<SpaceSkew>.height Float default: 0.0 -- animatable

The height of the warp object.

<SpaceSkew>.decay Float default: 0.0 -- animatable

When is set to 0, there is no decay, and the space warp affects its bound object regardless of its distance from the object. When you increase the decay, the effect on the bound object falls off exponentially.

<SpaceSkew>.amount Float default: 0.0 -- animatable

The angle to skew from the vertical plane.

<SpaceSkew>.direction Float default: 0.0 -- animatable

The direction of the skew relative to the horizontal plane.

<SpaceSkew>.Lower_Limit Float default: 0.0 -- animatable

The lower limit boundaries in world units from the skew center point, beyond which the skew no longer affects the geometry.

<SpaceSkew>.Upper_Limit Float default: 0.0 -- animatable

The upper limit boundaries in world units from the skew center point, beyond which the skew no longer affects the geometry.

Associated Methods

bindSpaceWarp <node> <spaceSkew_node>

Associated Binding Modifier

SimpleOSMToWSMMod

This modifier is automatically created by the bindSpaceWarp() method, and is not otherwise creatable by MAXScript. There are no properties associated with this binding modifier.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


SpaceStretch : SpacewarpObject

SpaceStretch - superclass: SpacewarpObject; super-superclass:node - classID: #(65712, -1728155230)

Value > MAXWrapper > Node > SpacewarpObject > Modifier-Based > SpaceStretch

Constructor

spaceStretch ...

Properties

<SpaceStretch>.length Float default: 0.0 -- animatable

The length of the warp object.

<SpaceStretch>.width Float default: 0.0 -- animatable

The width of the warp object.

<SpaceStretch>.height Float default: 0.0 -- animatable

The height of the warp object.

<SpaceStretch>.decay Float default: 0.0 -- animatable

When is set to 0, there is no decay, and the space warp affects its bound object regardless of its distance from the object. When you increase the decay, the effect on the bound object falls off exponentially.

<SpaceStretch>.Stretch Float default: 0.0 -- animatable

The base scale factor for all three axes. The scale factor derived from the Stretch value varies according to the sign of the value:

Positive stretch values define a scale factor equal to Stretch+1. For example, a stretch value of 1.5 yields a scale factor of 1.5+1=2.5, or 250 percent.

Negative stretch values define a scale factor equal to -1/(Stretch-1). For example, a stretch value of -1.5 yields a scale factor of -1/(-1.5-1)=0.4, or 40 percent.

<SpaceStretch>.Amplify Float default: 0.0 -- animatable

The scale factor applied to the minor axes. Amplify generates a multiplier using the same technique as stretch. The multiplier is then applied to the Stretch value before the scale factor for the minor axes is calculated.

<SpaceStretch>.from Float default: 0.0 -- animatable

The boundary of the stretch effect along the negative Stretch Axis. The Lower Limit can be 0 or any negative number.

<SpaceStretch>.to Float default: 0.0 -- animatable

The boundary of the stretch effect along the positive Stretch Axis. The Upper Limit can be 0 or any positive number.

Associated Methods

bindSpaceWarp <node> <spaceStretch_node>

Associated Binding Modifier

SimpleOSMToWSMMod

This modifier is automatically created by the bindSpaceWarp() method, and is not otherwise creatable by MAXScript. There are no properties associated with this binding modifier.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


SpaceTaper : SpacewarpObject

SpaceTaper - superclass: SpacewarpObject; super-superclass:node - classID: #(32, 1)

Value > MAXWrapper > Node > SpacewarpObject > Modifier-Based > SpaceTaper

Constructor

spaceTaper ...

Properties

<SpaceTaper>.length Float default: 0.0 -- animatable

The length of the warp object.

<SpaceTaper>.width Float default: 0.0 -- animatable

The width of the warp object.

<SpaceTaper>.height Float default: 0.0 -- animatable

The height of the warp object.

<SpaceTaper>.decay Float default: 0.0 -- animatable

When is set to 0, there is no decay, and the space warp affects its bound object regardless of its distance from the object. When you increase the decay, the effect on the bound object falls off exponentially.

<SpaceTaper>.amount Float default: 0.0 -- animatable

The extent to which the ends are scaled. Amount is a relative value with a maximum of 10.

<SpaceTaper>.curvature Float default: 0.0 -- animatable

Applies a curvature to the sides of the Taper gizmo, thus affecting the shape of the tapered object. Positive values produce an outward curve along the tapered sides, negative values an inward curve. At 0, the sides are unchanged.

<SpaceTaper>.symmetry Integer default: 0

When on, produces a symmetrical taper around the primary axis. A taper is always symmetrical around the effect axis:

0- Off

1- On

<SpaceTaper>.Lower_Limit Float default: 0.0 -- animatable

The lower limit boundaries in world units from the taper center point, beyond which the taper no longer affects the geometry.

<SpaceTaper>.Upper_Limit Float default: 0.0 -- animatable

The upper limit boundaries in world units from the taper center point, beyond which the taper no longer affects the geometry.

Associated Methods

bindSpaceWarp <node> <spaceTaper_node>

Associated Binding Modifier

SimpleOSMToWSMMod

This modifier is automatically created by the bindSpaceWarp() method, and is not otherwise creatable by MAXScript. There are no properties associated with this binding modifier.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


SpaceTwist : SpacewarpObject

SpaceTwist - superclass: SpacewarpObject; super-superclass:node - classID: #(144, 2)

Value > MAXWrapper > Node > SpacewarpObject > Modifier-Based > SpaceTwist

Constructor

spaceTwist ...

Properties

<SpaceTwist>.length Float default: 0.0 -- animatable

The length of the warp object.

<SpaceTwist>.width Float default: 0.0 -- animatable

The width of the warp object.

<SpaceTwist>.height Float default: 0.0 -- animatable

The height of the warp object.

<SpaceTwist>.decay Float default: 0.0 -- animatable

When is set to 0, there is no decay, and the space warp affects its bound object regardless of its distance from the object. When you increase the decay, the effect on the bound object falls off exponentially.

<SpaceTwist>.angle Float default: 0.0 -- animatable

The amount of twist around the vertical axis.

<SpaceTwist>.bias Float default: 0.0 -- animatable

Causes the twist rotation to bunch up at either end of the object. When the parameter is negative, the object twists closer to the gizmo center. When the value is positive, the object twists more away from the gizmo center. When the parameter is 0, the twisting is uniform.

<SpaceTwist>.Lower_Limit Float default: 0.0 -- animatable

The lower limit for the twist effect.

<SpaceTwist>.Upper_Limit Float default: 0.0 -- animatable

The upper limit for the twist effect.

Associated Methods

bindSpaceWarp <node> <spaceTwist_node>

Associated Binding Modifier

SimpleOSMToWSMMod

This modifier is automatically created by the bindSpaceWarp() method, and is not otherwise creatable by MAXScript. There are no properties associated with this binding modifier.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


PDynaFlect : SpacewarpObject

PDynaFlect - superclass: SpacewarpObject; super-superclass:node - classID: #(11824263, 1055795908)

Value > MAXWrapper > Node > SpacewarpObject > Dynamics Interface > PDynaFlect

Constructor

PDynaFlect ...

Properties

<PDynaFlect>.affects Float default: 100.0 -- animatable; percentage; Reflects

Specifies the percentage of particles to be reflected by the PDynaFlect.

<PDynaFlect>.bounce Float default: 1.0 -- animatable; float

This multiplier specifies how much of the initial speed of the particle is maintained after collision with the PDynaFlect.

<PDynaFlect>.bounceVar Float default: 0.0 -- animatable; percentage; Bounce_Variation

Specifies the variation of Bounce applied to the range of particles.

<PDynaFlect>.chaos Float default: 0.0 -- animatable; percentage

Applies a random variation to the bounce angle.

<PDynaFlect>.friction Float default: 0.0 -- animatable; percentage

Specify the friction.

<PDynaFlect>.height Float default: 0.0 -- animatable; float

Specify the height of the PDynaFlect icon. This is for display purposes only and does not influence the deflector effect.

<PDynaFlect>.inheritVelocity Float default: 1.0 -- animatable; float; Velocity_Inheritance

Determines how much of a moving PDynaFlect's speed is applied to reflected or refracted particles.

<PDynaFlect>.mass Float default: 1.0 -- animatable; float; Particle_Mass

Specifies the mass based on the chosen unit.

<PDynaFlect>.massUnits Integer default: 0 -- radio button number; Particle_Mass_Units

Sets the mass unit for particles:

0- Gram

1- Kilogram

2- Pound

<PDynaFlect>.timeOff Time default: 100f -- animatable; time; Time_Off

Specifies the frame at which the deflection ends.

<PDynaFlect>.timeOn Time default: 0f -- animatable; time; Time_On

Specifies the frame at which the deflection begins.

<PDynaFlect>.width Float default: 0.0 -- animatable; float

Specify the width of the PDynaFlect icon. This is for display purposes only and does not influence the deflector effect.

Associated Methods

bindSpaceWarp <node> <PDynaFlect_node>

Associated Binding Modifier

PDynaFlectMod

This modifier is automatically created by the bindSpaceWarp() method, and is not otherwise creatable by MAXScript. There are no properties associated with this binding modifier.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


SDynaFlect : SpacewarpObject

SDynaFlect - superclass: SpacewarpObject; super-superclass:node - classID: #(1147744028, 332006682)

Value > MAXWrapper > Node > SpacewarpObject > Dynamics Interface > SDynaFlect

Constructor

SDynaFlect ...

SDynaFlector ...

Properties

<SDynaFlect>.affects Float default: 100.0 -- animatable; percentage; Reflects

The percentage of particles to be reflected by the PDynaFlect.

<SDynaFlect>.bounce Float default: 1.0 -- animatable; float

Multiplier that specifies how much of the initial speed of the particle is maintained after collision with the SDynaFlect.

<SDynaFlect>.bounceVar Float default: 0.0 -- animatable; percentage; Bounce_Variation

The variation of Bounce applied to the range of particles.

<SDynaFlect>.chaos Float default: 0.0 -- animatable; percentage

Applies a random variation to the bounce angle.

<SDynaFlect>.friction Float default: 0.0 -- animatable; percentage

When set to 0.0 (the default), the surface of the deflector is treated as frictionless, and there's no change in the particle behavior. As the friction value increases, particles begin to rebound at incorrect angles and with greater speed.

<SDynaFlect>.inheritVelocity Float default: 1.0 -- animatable; float; Velocity_Inheritance

Determines how much of a moving PDynaFlect's speed is applied to reflected or refracted particles.

<SDynaFlect>.mass Float default: 1.0 -- animatable; float; Particle_Mass

The mass based on the chosen unit.

<SDynaFlect>.massUnits Integer default: 0 -- radio button number; Particle_Mass_Units

The unit to use for particle mass values:

0- Gram

1- Kilogram

2- Pound

<SDynaFlect>.radius Float default: 0.0 -- animatable; float

Radius of the SdynaFlect icon. This setting also alters the effect of the deflection, because particles bounce off the perimeter of the icon.

<SDynaFlect>.timeOff Time default: 100f -- animatable; time; Time_Off

The time at which the deflection ends.

<SDynaFlect>.timeOn Time default: 0f -- animatable; time; Time_On

The time at which the deflection begins.

Associated Methods

bindSpaceWarp <node> <SDynaFlect_node>

Associated Binding Modifier

SDynaFlectMod

This modifier is automatically created by the bindSpaceWarp() method, and is not otherwise creatable by MAXScript. There are no properties associated with this binding modifier.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


UDynaFlect : SpacewarpObject

UDynaFlect - superclass: SpacewarpObject; super-superclass:node - classID: #(1750561194, 1736524989)

Value > MAXWrapper > Node > SpacewarpObject > Dynamics Interface > UDynaFlect

Constructor

UDynaFlect ...

UDynaFlector ...

Properties

<UDynaFlect>.affects Float default: 100.0 -- animatable; percentage; Reflects

The percentage of particles to be reflected by the UDynaFlect.

<UDynaFlect>.bounce Float default: 1.0 -- animatable; float

This multiplier specifies how much of the initial speed of the particle is maintained after collision with the UDynaFlect.

<UDynaFlect>.bounceVar Float default: 0.0 -- animatable; percentage; Bounce_Variation

The variation of Bounce applied to the range of particles.

<UDynaFlect>.chaos Float default: 0.0 -- animatable; percentage

Applies a random variation to the bounce angle.

<UDynaFlect>.friction Float default: 0.0 -- animatable; percentage

When set to 0.0 (the default) the surface of the deflector is treated as frictionless, and there's no change in particle behavior. As Friction increases, particles begin to rebound at incorrect angles and with greater speed.

<UDynaFlect>.inheritVelocity Float default: 1.0 -- animatable; float; Velocity_Inheritance

Determines how much of a moving UDynaFlect's speed is applied to reflected or refracted particles.

<UDynaFlect>.mass Float default: 1.0 -- animatable; float; Particle_Mass

The mass value of the particle.

<UDynaFlect>.massUnits Integer default: 0 -- radio button number; Particle_Mass_Units

Sets the unit of mass to use:

0- Gram

1- Kilogram

2- Pound

<UDynaFlect>.radius Float default: 0.0 -- animatable; float; Icon_Size

The size of the UDynaFlect icon.

<UDynaFlect>.timeOff Time default: 100f -- animatable; time; Time_Off

Time at which the deflector turns off.

<UDynaFlect>.timeOn Time default: 0f -- animatable; time; Time_On

Time at which the deflector turns on.

Associated Methods

bindSpaceWarp <node> <UDynaFlect_node>

Associated Binding Modifier

UDynaFlectMod

This modifier is automatically created by the bindSpaceWarp() method, and is not otherwise creatable by MAXScript. There are no properties associated with this binding modifier.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Spacewarp - Particles Only

Value > MAXWrapper > Node > SpacewarpObject > Particles Only

The following list shows the Particles Only space warp objects:

Deflector

Path_Follow

POmniFlect

SDeflector

SOmniFlect

UDeflector

UOmniFlect


Deflector : SpacewarpObject

Deflector - superclass: SpacewarpObject; super-superclass:node - classID: #(938562, 0)

Value > MAXWrapper > Node > SpacewarpObject > Particles Only > Deflector

Constructor

deflector ...

Properties

<Deflector>.bounce   Float default: 1.0 -- animatable

Controls the speed at which particles bounce off the deflector. At a setting of 1.0, particles bounce off the deflector at the same speed they struck it. At 0.0, particles do not bounce at all. At values between 0.0 and 1.0, particles bounce off the deflector at a speed reduced from their initial speed. At values greater than 1.0, particles bounce off the deflector at a speed greater than their initial speed.

<Deflector>.width   Float default: 10.0 -- animatable

The deflector's width.

<Deflector>.length   Float default: 10.0 -- animatable

The deflector's length.

<Deflector>.variation  Float default: 0.0 -- animatable

The bounce variation.

<Deflector>.chaos  Float default: 0.0 -- animatable

Angle variation after bounce.

<Deflector>.friction  Float default: 0.0 -- animatable

Amount of friction applied to particle.

<Deflector>.inheritVelocity Float default: 0.0 -- animatable

Percentage of deflector's motion inherited by the particle.

Associated Methods

bindSpaceWarp <particlesys_node> <deflector_node>

Associated Binding Modifier

DeflectorBinding

This modifier is automatically created by the bindSpaceWarp() method, and is not otherwise creatable by MAXScript. There are no properties associated with this binding modifier.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Path_Follow : SpacewarpObject

Path_Follow - superclass: SpacewarpObject; super-superclass:node - classID: #(2058894005, 1578972349)

Value > MAXWrapper > Node > SpacewarpObject > Particles Only > Path_Follow

Constructor

path_Follow ...

Properties

<Path_Follow>.Range_Limited Integer default: 1

When off, the range of influence of the space warp is limited to the value set in .range_value. When on, the space warp influences all bound particles in the scene, regardless of their distance from the path object.

0- Off

1- On

<Path_Follow>.Range_Value Float default: 100.0 -- animatable

The range of influence when Unlimited Range is off. This is the distance between the path object and the particle system. The position of the Path Follow space warp's icon is ignored.

<Path_Follow>.Spline_Follow_Type Integer default: 1

Set the follow type:

0- Along Offset Splines (The distance between the particle system and the path alter the effect of the particle motion. If the first vertex of the spline is at the birthplace of the particle, the particle follows the spline path. If you move the path away from the particle system, the particles are affected by the offset.)

1- Along Parallel Splines (Particles follow a copy of the selected path, parallel to the particle system. In this mode, the position of the path relative to the particle system does not matter. The orientation of the path, however, affects the particle stream.)

<Path_Follow>.Constant_Speed Integer default: 0

When on, all particles travel at the same speed:

0- Off

1- On

<Path_Follow>.Tangent_Chaos Float default: 0.0 -- percentage

Causes particles to converge or diverge toward the path over time, or to simultaneously converge and diverge. You specify the effect by choosing Converge, Diverge, or Both (see following). This provides a tapering effect over the length of the path.

<Path_Follow>.Tang_Chaos_Var Float default: 0.0

The amount by which .tangent_chaos can vary for each particle.

<Path_Follow>.Tangent_Dir Integer default: 0

Set behavior of tangent chaos:

0- Converge (When .tangent_chaos is greater than 0, the particles move in toward the path as they follow the path. The effect is that the stream tapers from larger to smaller over time.

1- Diverge (Provides the opposite effect of Converge. The particles diverge from the path over time.)

2- Both (Splits the particle stream, causing some particles to converge and others to diverge.)

<Path_Follow>.Spiral_Chaos Float default: 0.0

The number of turns by which particles spiral about the path. In conjunction with .tangent_chaos, alters the diameter of the spiral.

<Path_Follow>.Spiral_Chaos_Var Float default: 0.0

The amount by which each particle can vary from the Spiral value.

<Path_Follow>.Spiral_Dir Integer default: 0

The direction of spiraling behavior:

0- Clockwise

1- Counterclockwise

2- Bidirectional (The stream is splits so that particles spiral in both directions.)

<Path_Follow>.Start_Time Time default: 0f

The frame at which Path Follow begins to influence the particles.

<Path_Follow>.Travel_Time Time default: 30f

The time each particle takes to traverse the path.

<Path_Follow>.Travel_Var Float default: 0.0 -- percentage

The amount by which each particle's travel time can vary.

<Path_Follow>.Stop_Time Time default: 100f

The frame at which Path Follow releases the particles and no longer influences them.

<Path_Follow>.Icon_Size Float default: 0.0

The size of the Path Follow icon. Does not alter the Path Follow effect.

NOTE:

There is not a way to select the Path shape object using MAXScript in 3ds Max.

The Seed parameter in not accessible using MAXScript in 3ds Max.

Associated Methods

bindSpaceWarp <particlesys_node> <path_Follow_node>

Associated Binding Modifier

PathFollowMod

This modifier is automatically created by the bindSpaceWarp() method, and is not otherwise creatable by MAXScript. There are no properties associated with this binding modifier.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


POmniFlect : SpacewarpObject

POmniFlect - superclass: SpacewarpObject; super-superclass:node - classID: #(1318347405, 1313044340)

Value > MAXWrapper > Node > SpacewarpObject > Particles Only > POmniFlect

Constructor

POmniFlect ...

Properties

<POmniFlect>.deceleration    Float default: 1.0 -- animatable

Sets the deceleration of particles.

<POmniFlect>.'decel var'     Float default: 0.0 -- animatable; percentage

Affects the variation in deceleration of particles.

<POmniFlect>.friction      Float default: 0.0 -- animatable; percentage

When set to 0.0 (the default), the surface of the deflector is treated as frictionless, and there's no change in the particle behavior. As the friction value increases, particles begin to rebound at incorrect angles and with greater speed.

<POmniFlect>.'time on'     Integer default: 0   -- animatable; alias: time_on

The frame at which the deflection begins.

<POmniFlect>.'time off'     Integer default: 16000 -- animatable; alias: time_off

The frame at which the deflection ends.

<POmniFlect>.affects      Float default: 10000.0 -- animatable; alias: reflects

The percentage of particles to be reflected by the POmniFlect.

<POmniFlect>.bounce Float default: 1.0 -- animatable

This multiplier specifies how much of the initial speed of the particle is maintained after collision with the POmniFlect.

<POmniFlect>.bouncevar     Float default: 0.0 -- animatable; alias: bounce_variation

The variation of Bounce applied to the range of particles.

<POmniFlect>.chaos Float default: 0.0 -- animatable

Applies a random variation to the bounce angle. When set to 0.0 (no chaos), all particles bounce off the POmniFlect surface perfectly (like banking pool balls). A non-zero setting causes the deflected particles to scatter.

<POmniFlect>.Refracts Float default: 100.0 -- animatable

The percentage of particles not already reflected that will be refracted by the POmniFlect.

<POmniFlect>.'pass velocity'   Float default: 1.0 -- animatable; alias: pass_velocity

Sets how much of a particle's initial speed is maintained after passing through the POmniFlect. The default setting of 1 retains the initial speed is retained, so there's no change. A setting of 0.5 reduces the speed by half.

<POmniFlect>.'passvel var'    Float default: 0.0 -- animatable; percentage; alias: Pass_Velocity_Variation

Variation of Pass Velocity applied to the range of particles.

<POmniFlect>.refraction     Float default: 50.0 -- animatable; percentage; alias: distortion

Controls the angle of refraction. A value of 0 means there's no refraction. A value of 100% sets the angle of the particles to be parallel with the POmniFlect surface. A value of -100% sets the angle perpendicular to the surface. The Distortion effect is reversed when particles strike the POmniFlect from the back side.

<POmniFlect>.'refraction var'   Float default: 0.0 -- animatable; percentage; alias: distortion_variation

Range of variation of the Distortion effect.

<POmniFlect>.Diffusion Float default: 0.0 -- animatable, percentage

Applies a diffusion effect to the refraction by randomly modifying each particle's Distortion angle by the Diffusion angle. This effectively scatters the particles into a hollow cone.

<POmniFlect>.'diffusion var'   Float default: 0.0 -- animatable; percentage; alias: diffusion_variation

Range of variation of the Diffusion value.

<POmniFlect>.inheritVelocity   Float default: 1.0 -- animatable; alias: velocity_inheritance

Determines how much of a moving POmniFlect's speed is applied to reflected or refracted particles.

<POmniFlect>.spawn       Float default: 100.0 -- animatable; percentage; alias: spawn_percentage

The percentage of particles that can use spawn effects.

<POmniFlect>.Pass_Velocity Float default: 1.0 -- animatable

How much of the particle's initial speed is maintained after passing through the POmniFlect.

<POmniFlect>.Pass_Velocity_Variation Float default: 0.0 -- animatable, percentage

The variation of the Pass Velocity setting applied to the range of particles.

<POmniFlect>.width Float default: 0.0 -- animatable

The width of the POmniFlect icon. This is for display purposes only and does not influence the deflector effect.

<POmniFlect>.height Float default: 0.0 -- animatable

The height of the POmniFlect icon. This is for display purposes only and does not influence the deflector effect.

NOTES:

getPropnames() and showProperties() show two sets of parameters called Pass_Velocity and Pass_Velocity_Variation. The first set is for Refraction, the second for Spawn Effects Only groups. Due to this sharing of property names, you cannot access the Spawn Effects Only Pass_Velocity and Pass_Velocity_Variation using their property names. You can access the value assigned to these parameters, and their controller if assigned, as subAnims 17 and 18 of the base object.

Associated Methods

bindSpaceWarp <particlesys_node> <POmniFlect_node>

Associated Binding Modifier

POmniFlectMod

This modifier is automatically created by the bindSpaceWarp() method, and is not otherwise creatable by MAXScript. There are no properties associated with this binding modifier.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


SDeflector : SpacewarpObject

SDeflector - superclass: SpacewarpObject; super-superclass:node - classID: #(1824336029, 1072653910)

Value > MAXWrapper > Node > SpacewarpObject > Particles Only > SDeflector

Constructor

sdeflector ...

Properties

<SDeflector>.friction     Float default: 0.0 -- animatable

When set to 0.0 (the default), the surface of the deflector is treated as frictionless, and there's no change in the particle behavior. As the friction value increases, particles begin to rebound at incorrect angles and with greater speed.

<SDeflector>.bounce Float default: 1.0 -- animatable

Determines the speed with which particles bounce off the deflector. At 1.0, the particles bounce at the same speed as they approach. At 0, they don't deflect at all.

<SDeflector>.bouncevar    Float default: 0.0 -- animatable

The amount by which each particle can vary from the Bounce setting.

<SDeflector>.chaos Float default: 0.0 -- animatable

The amount of variation from the perfect angle of reflection (found when Chaos is set to 0.0). 100% induces a variation in reflection angle of up to 90 degrees

<SDeflector>.inheritVelocity Float default: 1.0 -- animatable; alias: velocity_inheritance

When the value is greater than 0, the motion of the deflector affects particles as well as the other settings. For example, to animate the SDeflector passing through a passive array of particles, turn up this value to affect the particles.

<SDeflector>.radius Float default: 0.0 -- animatable

The diameter of the SDeflector icon. This setting also alters the effect of the deflection, because particles bounce off the perimeter of the icon.

Associated Methods

bindSpaceWarp <particlesys_node> <sdeflector_node>

Associated Binding Modifier

SDeflectMod

This modifier is automatically created by the bindSpaceWarp() method, and is not otherwise creatable by MAXScript. There are no properties associated with this binding modifier.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


SOmniFlect : SpacewarpObject

SOmniFlect - superclass: SpacewarpObject; super-superclass:node - classID: #(1700857802, 522734191)

Value > MAXWrapper > Node > SpacewarpObject > Particles Only > SOmniFlect

Constructor

SOmniFlect ...

Properties

<SOmniFlect>.'time on'    Integer default: 0 -- animatable; alias: time_on

Time at which the deflection starts.

<SOmniFlect>.'time off'    Integer default: 16000 -- animatable; alias: time_off

Time at which the deflection ends.

<SOmniFlect>.affects     Float default: 100.0 -- animatable, percentage; alias: reflects

The percentage of particles to be reflected by the SOmniFlect.

<SOmniFlect>.bounce Float   default: 1.0 -- animatable

This is a multiplier that specifies how much of the initial speed of the particle is maintained after collision with the SOmniFlect. Using the default setting of 1.0 causes the particle to rebound with the same speed as it collides. A real-world effect would usually be less than 1.0. For a "flubber" effect, set greater than 1.0.

<SOmniFlect>.bouncevar    Float default: 0.0 -- animatable, percentage; alias: bounce_variation

The variation of Bounce applied to the range of particles.

<SOmniFlect>.chaos Float   default: 0.0 -- animatable

Applies a random variation to the bounce angle. When set to 0.0 (no chaos), all particles bounce off the SOmniFlect surface perfectly (like banking pool balls). A non-zero setting causes the deflected particles to scatter.

<SOmniFlect>.Refracts Float   default: 100.0 -- animatable, percentage

The percentage of particles not already reflected that will be refracted by the SOmniFlect.

<SOmniFlect>.'pass velocity' Float default: 1.0 -- animatable; alias: pass_velocity

Defines how much of a particle's initial speed is maintained after passing through the SOmniFlect. The default setting of 1 retains the initial speed is retained, so there's no change. A setting of 0.5 reduces the speed by half.

<SOmniFlect>.'passvel var'   Float default: 0.0 -- animatable; percentage; alias: pass_velocity_variation

Variation of the Pass Velocity setting applied to the range of particles.

<SOmniFlect>.refraction    Float default: 50.0 -- animatable; percentage; alias: distortion

Controls the angle of refraction. A value of 0 means there's no refraction. A value of 100% sets the angle of the particles to be parallel with the SOmniFlect surface. A value of -100% sets the angle perpendicular to the surface. The Distortion effect is reversed when particles strike the SOmniFlect from the back side.

<SOmniFlect>.'refraction var' Float default: 0.0 -- animatable; percentage; alias: distortion_variation

Range of variation of the Distortion effect.

<SOmniFlect>.Diffusion Float   default: 0.0 -- animatable, percentage

Applies a diffusion effect to the refraction by randomly modifying each particle's Distortion angle by the Diffusion angle. This effectively scatters the particles into a hollow cone.

<SOmniFlect>.'diffusion var' Float default: 0.0 -- animatable; percentage; alias: diffusion_variation

Range of variation of the Diffusion value.

<SOmniFlect>.inheritVelocity Float default: 1.0 -- animatable; alias: velocity_inheritance

Determines how much of a moving SOmniFlect's speed is applied to reflected or refracted particles.

<SOmniFlect>.deceleration   Float default: 1.0 -- animatable

Sets the deceleration of particles.

<SOmniFlect>.'decel var'    Float default: 0.0 -- animatable; percentage

Sets the variation in deceleration of particles.

<SOmniFlect>.spawn      Float default: 100.0 -- animatable; percentage; alias: spawn_percentage

The percentage of particles that can use spawn effects.

<SOmniFlect>.friction     Float default: 0.0 -- animatable; percentage

When set to 0.0 (the default), the surface of the deflector is treated as frictionless, and there's no change in the particle behavior. As the friction value increases, particles begin to rebound at incorrect angles and with greater speed.

<SOmniFlect>.radius Float   default: 0.0 -- animatable

The radius of the SomniFlect icon.

NOTE:

getPropnames() and showProperties() show two sets of parameters called Pass_Velocity and Pass_Velocity_Variation. The first set is for Refraction, the second for Spawn Effects Only groups. Due to this sharing of property names, you cannot access the Spawn Effects Only Pass_Velocity and Pass_Velocity_Variation using their property names. You can access the value assigned to these parameters, and their controller if assigned, as subAnims 17 and 18 of the base object.

Associated Methods

bindSpaceWarp <particlesys_node> <SOmniFlect_node>

Associated Binding Modifier

SOmniFlectMod

This modifier is automatically created by the bindSpaceWarp() method, and is not otherwise creatable by MAXScript. There are no properties associated with this binding modifier.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


UDeflector : SpacewarpObject

UDeflector - superclass: SpacewarpObject; super-superclass:node - classID: #(675904360, 0)

Value > MAXWrapper > Node > SpacewarpObject > Particles Only > UDeflector

Constructor

uDeflector ...

Properties

<UDeflector>.bounce Float default: 1.0 -- animatable

The speed with which particles bounce off the deflector. At 1.0, the particles bounce at the same speed as they approach. At 0, they don't deflect at all.

<UDeflector>.bouncevar    Float default: 0.0 -- animatable

The amount by which each particle can vary from the Bounce setting.

<UDeflector>.chaos Float default: 0.0 -- animatable

The amount of variation from the perfect angle of reflection (found when Chaos is set to 0.0). 100% induces a variation in reflection angle of up to 90 degrees.

<UDeflector>.Friction Float default: 0.0 -- animatable, percentage

Determines the amount of tangential "stick" at the surface as particles bounce off the deflector.

<UDeflector>.inheritVelocity Float default: 1.0 -- animatable; alias: velocity_inheritance

When greater than 0, the motion of the deflector affects particles as well as the other settings. For example, to animate the SDeflector passing through a passive array of particles, increase this value to affect the particles.

<UDeflector>.radius     Float default: 0.0 -- animatable; alias: icon_size

The size of the Udeflector icon.

NOTE:

There is no way to set the Deflector object using MAXScript.

Associated Methods

bindSpaceWarp <particlesys_node> <uDeflector_node>

Associated Binding Modifier

UDeflectorMod

This modifier is automatically created by the bindSpaceWarp() method, and is not otherwise creatable by MAXScript. There are no properties associated with this binding modifier.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


UOmniFlect : SpacewarpObject

UOmniFlect - superclass: SpacewarpObject; super-superclass:node - classID: #(436029718, 1434415577)

Value > MAXWrapper > Node > SpacewarpObject > Particles Only > UOmniFlect

Constructor

UOmniFlect ...

Properties

<UOmniFlect>.'time on'     Integer default: 0 -- animatable; alias: time_on

Time at which deflection starts.

<UOmniFlect>.'time off'     Integer default: 16000 -- animatable; alias: time_off

Time at which deflection ends.

<UOmniFlect>.affects      Float default: 10000.0 -- animatable; percentage; alias: reflects

Percentage of particles to be reflected by the UOmniFlect.

<UOmniFlect>.bounce Float default: 1.0 -- animatable

This multiplier specifies how much of the initial speed of the particle is maintained after collision with the UOmniFlect.

<UOmniFlect>.bouncevar     Float default: 0.0 -- animatable; percentage; alias: bounce_variation

Specifies the variation of Bounce applied to the range of particles.

<UOmniFlect>.chaos Float default: 0.0 -- animatable

Applies a random variation to the bounce angle. When set to 0.0 (no chaos), all particles bounce off the UOmniFlect surface perfectly (like banking pool balls). A non-zero setting causes the deflected particles to scatter.

<UOmniFlect>.Refracts Float default: 100.0 -- animatable, percentage

Specifies the percentage of particles not already reflected that will be refracted by the UOmniFlect.

<UOmniFlect>.'pass velocity'   Float default: 1.0 -- animatable; alias: pass_velocity

Specifies how much of a particle's initial speed is maintained after passing through the UOmniFlect.

<UOmniFlect>.'passvel var'    Float default: 0.0 -- animatable; percentage; alias: pass_velocity_variation

Specifies the variation of Pass Velocity applied to the range of particles.

<UOmniFlect>.refraction     Float default: 50.0 -- animatable; percentage; alias: distortion

Controls the angle of refraction. A value of 0 means there's no refraction. A value of 100% sets the angle of the particles to be parallel with the UOmniFlect surface. A value of -100% sets the angle perpendicular to the surface. The Distortion effect is reversed when particles strike the UOmniFlect from the back side.

<UOmniFlect>.'refraction var' Float default: 0.0 -- animatable; percentage; alias: distortion_variation

Specifies a range of variation of the Distortion effect.

<UOmniFlect>.Diffusion Float default: 0.0 -- animatable, percentage

Applies a diffusion effect to the refraction by randomly modifying each particle's Distortion angle by the Diffusion angle. This effectively scatters the particles into a hollow cone.

<UOmniFlect>.'diffusion var'   Float default: 0.0 -- animatable; percentage; alias: diffusion_variation

Specifies a range of variation of the Diffusion value.

<UOmniFlect>.Friction Float default: 0.0 -- animatable

When set to 0.0 (the default), the surface of the deflector is treated as frictionless, and there's no change in the particle behavior. As the Friction value increases, particles begin to rebound at incorrect angles and with greater speed.

<UOmniFlect>.inheritVelocity   Float default: 1.0 -- animatable; alias: velocity_inheritance

Determines how much of a moving UOmniFlect's speed is applied to reflected or refracted particles.

<UOmniFlect>.deceleration    Float default: 1.0 -- animatable

The deceleration value for the particles.

<UOmniFlect>.'decel var'     Float default: 0.0 -- animatable; percentage

The range of variation in decelerations values.

<UOmniFlect>.spawn       Float default: 100.0 -- animatable; percentage; alias: spawn_percentage

Specifies the percentage of particles that can use spawn effects

<UOmniFlect>.Pass_Velocity Float default: 1.0 -- animatable

Specifies how much of the particle's initial speed is maintained after passing through the UOmniFlect.

<UOmniFlect>.Pass_Velocity_Variation Float default: 0.0 -- animatable, percentage

Specifies the variation of the Pass Velocity setting applied to the range of particles.

<UOmniFlect>.radius      Float default: 0.0 -- animatable; alias: icon_size

The size of the UOmniFlect icon.

NOTE:

getPropnames() and showProperties() show two sets of parameters called Pass_Velocity and Pass_Velocity_Variation. The first set is for Refraction, the second for Spawn Effects Only groups. Due to this sharing of property names, you cannot access the Spawn Effects Only Pass_Velocity and Pass_Velocity_Variation using their property names. You can access the value assigned to these parameters, and their controller if assigned, as subAnims 17 and 18 of the base object.

Associated Methods

bindSpaceWarp <particlesys_node> <UOmniFlect_node>

Associated Binding Modifier

UOmniFlectMod

This modifier is automatically created by the bindSpaceWarp() method, and is not otherwise creatable by MAXScript. There are no properties associated with this binding modifier.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


XRef Objects

Interface: objXRefs

Function published interface for Xref Objects.

Interface: objXRefMgr

XRef Objects Manager Interface. Available in 3ds Max 8 and higher.

XRefObject : Node

XRef Objects Node, extended in 3ds Max 8 with new Properties and Interfaces.

XRefAtmosWrapper

Xref Atmospherics Wrapper. Available in 3ds Max 8 and higher.

XRef_Material : Material

Xref Material. Available in 3ds Max 8 and higher.

Explicit References prior to 3ds Max 8

A file being xref'd that has a script controller whose script has explicit references ($sphere01, etc.) to objects in the incoming xref file have a potential problem for the script writer. The problem is, the objects in the xref file are invisible to MAXScript, and so a script will fail. This is actually a general problem with xrefs, you cannot have scripts of any kind in the file (scripts controllers, param wires, callback scripts, etc.) that depend on explicit scene object references.

The persistent global solution is the only one that is viable in 3ds Max prior to version 8. There are two general solutions: 1) associate an owning-scene context with controller scripts, etc., when they come in via xref and use that to anchor pathname searches and other scene-relative references, and 2) have an accessible 'evaluation context' for controllers sent as part of the GetValue() call, so we can know what object's parameter the current GetValue() call is being made for and can therefore get rid of many of the uses of explicit pathnames in the scripts.

MAXScript now fully loads any persistent globals in xref'd and merged files, but does NOT make them persistent in the current scene. As an example of a setup showing how this can be used, imagine a file with 3 spheres that will be xref'd. You need to establish persistent globals for all the scene objects to be referrenced in controller scripts, like this:

persistent global s1 = $sphere01, s2 = $sphere02, s3 = $sphere03

this has to be run sometime while the to-be-xrefed scene is the currently open scene. Then in the controller scripts, you'd say something like:

global s1, s2

dependsOn s1 s2

(s1.pos + s2.pos) / 2

Note that this example uses 'global' and not 'persistent global'. You don't have to make the variables persistent for the "host" scene referencing the XRefs.

Explicit References in 3ds Max 8 and higher

The redesigned script and expression controllers in 3ds Max 8 solve the problem described above, since the node references stored in ParamBlock2 can be resolved successfully.

See also

XRef Files

XRefScene Values

XRefObject : Node

XRef_Material : Material

XRefAtmosWrapper

Interface: objXRefMgr

Interface: objXRefs


XRefObject : Node

An XRefObject value represents an XRef object in 3ds Max. An XRefObject value is returned when the xrefs.addNewXRefObject() function is called. There are two objects associated with an XRef object in 3ds Max - the non-proxy object and the proxy object. The proxy object is typically a lower resolution object that is used as a standin for the non-proxy object in the viewports.

Constructor

xrefs.addNewXRefObject < filename > { < objectname > | < objectname_array >} [#proxy] modifiers:{ #xref | #merge | #drop } manipulators: { #xref | #merge }

Loads the specified node object from the specified scene file as an XRef object. The case of objectname_string must match the object's name in the scene file.

If an array of object names is specified, the return value will be an array of the XRef'ed objects. Note that if a manipulator's name is specified in the array, and manipulator:#merge is specified, the merged manipulator is not included in the result array since it isn't an XRef Object.

If #proxy is specified, the node object is loaded as the proxy object, otherwise it is loaded as the non-proxy object.

The XRefObject is always loaded at world center.

References between XRef objects brought in as a single operation are maintained, so that if you have a object parameter controlled by a manipulator, and you XRef in both the object and the manipulator, the manipulator will still control the object's parameter.

Modifiers:

#xref - XRef Object contains any modifiers on object (default)

#merge - XRef Object contains base object, any modifiers on object are

applied to the XRef Object

#drop - XRef Object contains base object, any modifiers on object are dropped

Manipulators:

#xref - bring manipulator in as an xref

#merge - bring in manipulator as a manipulator

In 3ds Max 6 and higher, xrefs.addNewXRefObject returns undefined when the argument is a file with DRF extension.

Properties

<XRefObject>.proxyFileName String default: varies

The file name of the proxy object.

<XRefObject>.fileName String default: varies

The file name of the non-proxy object.

<XRefObject>.currentFileName String default: varies

The file name of the non-proxy object if the useProxy property is false, the file name of the proxy object if the useProxy property is true.

<XRefObject>.objectName String default: varies

The name of the proxy object.

<XRefObject>.proxyObjectName String default: varies

The name of the non-proxy object.

<XRefObject>.currentObjectName String default: varies

The name of the non-proxy object if the useProxy property is false, the name of the proxy object if the useProxy property is true.

<XRefObject>.useProxy Boolean default: varies

If true, the proxy object will be displayed in the viewports, otherwise the non-proxy object will be displayed. If the XRef object is added to the scene using the xrefs.addNewXRefObject() method, this parameters default value will be true if #proxy is specified, false otherwise.

<XRefObject>.renderProxy Boolean default: false

If true, the proxy object will be rendered, otherwise the non-proxy object will be rendered.

<XRefObject>.updateMaterial Boolean default: false

If true, sets the Update Material option on.

<XRefObject>.ignoreAnimation Boolean default: false

If true, sets the Ignore Animation option on.

<XRefObject>.actualBaseObject -- read-only

Returns the actual base object of the referenced object as opposed to the base object of the XRefObject. If 'Use Proxy' is turned on for the XRefObject, the proxy base object is returned if a proxy object is defined, otherwise a value of 'undefined' is returned. Available in 3ds Max 8 and higher.

Methods

updateXRef <XRefObject>

Reloads the XRef object.

The following XRefObject interfaces are available in 3ds Max 8 and higher:

XRefObject interfaces:

Interface: IXRefItem

Properties:

.srcFileName : filename : Read

Contains the source file name. Read-only.

.srcItemName : string : Read

Contains the name of the source item. Read-only.

.xrefRecord : Interface : Read

Contains the XRef record Interface. Read-only.

.unresolved : bool : Read

Contains true if the XRef is unresolved, false otherwise. Read-only.

.nested : bool : Read

Contains true if the XRef is nested, false otherwise. Read-only.

Methods:

<maxObject>GetSrcItem resolveNested:<bool>

resolveNested default value: false

Returns the source item object of the XRef Object. If the object is being referenced from nested files (in other words, the object is referenced from a Max file containing an XRef of the object from another file instead of the actual object) and resolveNested is set to true, nested XRef files will be resolved.

<DWORD>GetParentItems <&maxObject array>parentItems

parentItems is Out parameter

Returns an array of parent items in the by-reference Out parameter.

<DWORD>GetRootItems <&maxObject array>rootItems

rootItems is Out parameter

Returns an array of root items in the by-reference Out parameter.

<DWORD>GetChildItems <&maxObject array>childItems

childItems is Out parameter

Returns an array of child items in the by-reference Out parameter.

<void>GetNodes <&node array>xrefNodes

xrefNodes is Out parameter

Returns an array of XRef nodes in the by-reference Out parameter.

Interface: IXRefProxy

Properties:

.proxyFileName : filename : Read

Contains the proxy file name. Read-only.

.proxyItemName : string : Read

Contains the proxy item name. Read-only.

.proxyRecord : Interface : Read

Contains the proxy record Interface. Read-only.

.displayProxy : bool : Read|Write

When set to true, the proxy will be used in the viewport.

.renderProxy : bool : Read|Write

When set to true, the proxy will be used by the production renderer.

Interface: IXRefObject

Properties:

.activeFileName : filename : Read

Contains the active file name. Read-only.

.activeObjName : string : Read

Contains the active object name. Read-only.

.activeRecord : Interface : Read

Contains the active record Interface. Read-only.

Methods:

<maxObject>GetSourceObject <bool>resolveNestedXRef modifiers:<&maxObject array>

modifiers default value: #()

modifiers is Out parameter

Returns the source object. The optional modifiers: by-reference parameter will return the array of modifiers applied to the source object.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


XRef_Material : Material

XRef_Material - superclass: material; super-superclass:MAXWrapper - 5:5 - classID: #(657198411, 1126842699)

Instances of this class are used to XRef materials from external .MAX files. Available in 3ds Max 8 and higher.

Constructors:

XRef_Material ...

XRefmaterial ...

Properties:

<XRef_Material>.nested BooleanClass default: false -- bool;

Contains true if the XRef material is nested, false otherwise. Read-only.

<XRef_Material>.srcFileName UndefinedClass default: undefined -- filename;

Contains the source file name. Read-only.

<XRef_Material>.srcItemName UndefinedClass default: undefined -- string;

Contains the name of the source item. Read-only.

<XRef_Material>.unresolved BooleanClass default: true -- bool;

Contains true if the XRef is unresolved, false otherwise. Read-only.

<XRef_Material>.xrefRecord UndefinedClass default: undefined -- Interface;

Contains the XRef record Interface. Read-only.

XRef_Material interfaces:

Interface: IXRefItem

Properties:

Interface: IXRefItem

Properties:

.srcFileName : filename : Read

Contains the source file name. Read-only.

.srcItemName : string : Read

Contains the name of the source item. Read-only.

.xrefRecord : Interface : Read

Contains the XRef record Interface. Read-only.

.unresolved : bool : Read

Contains true if the XRef is unresolved, false otherwise. Read-only.

.nested : bool : Read

Contains true if the XRef is nested, false otherwise. Read-only.

Methods:

<maxObject>GetSrcItem resolveNested:<bool>

resolveNested default value: false

Returns the source item object of the XRef Material. If the object is being referenced from nested files (in other words, the object is referenced from a Max file containing an XRef of the object from another file instead of the actual object) and resolveNested is set to true, nested XRef files will be resolved.

<DWORD>GetParentItems <&maxObject array>parentItems

parentItems is Out parameter

Returns an array of parent items in the by-reference Out parameter.

<DWORD>GetRootItems <&maxObject array>rootItems

rootItems is Out parameter

Returns an array of root items in the by-reference Out parameter.

<DWORD>GetChildItems <&maxObject array>childItems

childItems is Out parameter

Returns an array of child items in the by-reference Out parameter.

<void>GetNodes <&node array>xrefNodes

xrefNodes is Out parameter

Returns an array of XRef nodes in the by-reference Out parameter.

Interface: IXRefMaterial

Methods:

<material>GetSourceMaterial <bool>resolveNestedXRef

Returns the source material object. If resolveNestedXRef is set to true, nested XRef files will be resolved.


XRefAtmosWrapper

Instances of this class are used to XRef atmospheric effects from external .MAX files. Available in 3ds Max 8 and higher.

Class instances not creatable by MAXScript

XRefAtmosWrapper interfaces:

Interface: IXRefItem

Properties:

.srcFileName : filename : Read

Contains the source file name. Read-only.

.srcItemName : string : Read

Contains the name of the source item. Read-only.

.xrefRecord : Interface : Read

Contains the XRef record Interface. Read-only.

.unresolved : bool : Read

Contains true if the XRef is unresolved, false otherwise. Read-only.

.nested : bool : Read

Contains true if the XRef is nested, false otherwise. Read-only.

Methods:

<maxObject>GetSrcItem resolveNested:<bool>

resolveNested default value: false

Returns the source item object of the XRef Object. If the object is being referenced from nested files (in other words, the object is referenced from a Max file containing an XRef of the object from another file instead of the actual object) and resolveNested is set to true, nested XRef files will be resolved.

<DWORD>GetParentItems <&maxObject array>parentItems

parentItems is Out parameter

Returns an array of parent items in the by-reference Out parameter.

<DWORD>GetRootItems <&maxObject array>rootItems

rootItems is Out parameter

Returns an array of root items in the by-reference Out parameter.

<DWORD>GetChildItems <&maxObject array>childItems

childItems is Out parameter

Returns an array of child items in the by-reference Out parameter.

<void>GetNodes <&node array>xrefNodes

xrefNodes is Out parameter

Returns an array of XRef nodes in the by-reference Out parameter.

Interface: IXRefProxy

Properties:

.proxyFileName : filename : Read

Contains the proxy file name. Read-only.

.proxyItemName : string : Read

Contains the proxy item name. Read-only.

.proxyRecord : Interface : Read

Contains the proxy record Interface. Read-only.

.displayProxy : bool : Read|Write

When set to true, the proxy will be used in the viewport.

.renderProxy : bool : Read|Write

When set to true, the proxy will be used by the production renderer.

Interface: IXRefAtmospheric

Methods:

<maxObject>GetSourceAtmospheric <bool>resolveNestedXRef

Returns the source atmospheric object. If resolveNestedXRef is set to true, nested XRef files will be resolved.


XRefScene Values

An XRefScene value represents an XRef Scene object in 3ds Max. An XRefScene value is returned when the xrefs.addNewXRefFile() and xrefs.getXRefFile() functions are called.

XRef Scene objects can be nested. For example, scene file A can contain an XRef Scene object specifying XRef file B, and XRef file B can contain an XRef Scene object specifying XRef file C (eg: A xrefs B, and B xrefs C). To provide access to the nested XRef scene objects, the applicable XRefScene methods provide an optional root keyword parameter. If this argument is provided then these methods act on the root node of the specified XRefScene value, otherwise they act on root node of the current scene. To get to C from A, you load A and do something like:

EXAMPLE

bXref = xrefs.getXRefFile 1 -- taken from root node of current scene

cXref = xrefs.getXRefFile 1 root:bXref -- taken from root of bXref

cRoot = cXref.tree   -- to get root of C

NOTE:

Scenes with a script controller whose script has explicit references ($sphere01, etc.) to objects in an incoming xref scene have a problem where the objects in the xref scene are invisible to MAXScript, and so the script will fail. This is actually a general problem with xrefs, you cannot have scripts of any kind in the xref scene (scripts controllers, param wires, callback scripts, etc.) that depend on explicit scene object references.

This problem has been solved in 3ds Max 8 and higher where scripted controllers store references using parameter blocks and can resolve them within nested xrefs.

Constructor

xrefs.addNewXRefFile <filename_string> [ #noLoad ] [root:<XRefScene>]

Adds a new XRef Scene object and returns a XRefScene value. If #noLoad is not specified, the XRef Scene file is loaded immediately and the scene updated. If #noLoad is specified, the scene is not updated until the user requests it. Use the updateXRef() method to load the XRef Scene object.

If root:<XRefScene> is specified, the XRef Scene object is treated in the current file during the current session as if it was an XRef Scene object in the file corresponding to the XRefScene value specified. If the specified root XRef Scene object is reloaded, either because the current scene was saved and then reloaded, or because updateXRef() was executed on the root XRef Scene object, the XRef Scene object is deleted from the scene.

xrefs.addNewXRefFile does not return an error when passed a DRF file - it will return a value different from undefined, and the xref-ed DRF file will appear in red, meaning that there is a "problem" with it. This behaviour is the same as if the user would have opened a DRF file in the File Xref Scene | Add dialog after choosing the All Files filter (*.*)

xrefs.getXRefFile <index> [root:<XRefScene>]

If root is not specified, returns the XRefScene value corresponding to the indexed XRef Scene object in the XRef Scenes dialog. If the root:<XRefScene> is specified, the XRefScene value corresponding to a nested XRef Scene object within the XRefScene's XRef Scene object is returned. The index is 1-based, and corresponds to the order of the XRef Scene objects listed in the XRef Scenes dialog. You can use the xrefs.getXRefFileCount() method to determine the number of XRef Scene objects in the scene.

xrefs.addNewXRefObject <filename string> <object name>

Adds a new XRef Scene Object using the given MAX file name and object name and returns the new object if successful or undefined if the filename and/or the object name is not found.

Properties

<XRefScene>.filename String default: varies

The file name of the XRef Scene object. If you change this property to a new scene file name, the objects in the specified file are displayed, replacing the objects from the initial scene file.

<XRefScene>.tree Node

The root node of the XRef Scene object. This is a read-only property. You can access the children objects in an XRef Scene object using this property.

FOR EXAMPLE:

aXref=xrefs.getXRefFile 1 -- returns first XRef Scene object

aXref.tree.children -- objects in the XRef Scene object,

-- for example, may return:

-- #children($Box01, $Box02)

aXref.tree.children[1].width -- returns width value of $Box01

<XRefScene>.parent Node default: undefined

The parent of the XRef Scene object. By default this is undefined but can be set to any node in the scene.

<XRefScene>.autoUpdate Boolean default: false

If true, automatic XRef file updating is on.

<XRefScene>.boxDisp Boolean default: false

If true, all nodes the in the XRef Scene object are displayed in Box display mode.

<XRefScene>.hidden Boolean default: false

If true, the XRef Scene object is hidden.

<XRefScene>.disabled Boolean default: false

If true, the XRef Scene object is disabled.

<XRefScene>.ignoreLights Boolean default: false

If true, the lights in the XRef Scene object will not be displayed.

<XRefScene>.ignoreCameras Boolean default: false

If true, the cameras in the XRef Scene object will not be displayed.

<XRefScene>.ignoreShapes Boolean default: false

If true, the shapes in the XRef Scene object will not be displayed.

<XRefScene>.ignoreHelpers Boolean default: false

If true, the helpers in the XRef Scene object will not be displayed.

<XRefScene>.ignoreAnimation Boolean default: false

If true, any animation in the XRef Scene object will be ignored.

Methods

delete <XRefScene>

Deletes the XRef Scene object.

merge <XRefScene>

Merges the nodes in the XRef Scene object into the scene and deletes the XRef Scene object.

updateXRef <XRefScene>

Tries to reload the XRef Scene object. Returns true if the operation is successful, false otherwise.

flagChanged <XRefScene>

This method indicates that the specified XRef Scene object has been changed and should be updated. Use the xrefs.updateChangedXRefs() method to update the changed XRef Scene objects.

Associated Methods

xrefs.getXRefFileCount [root:<XRefScene>]

If root is not specified, returns the total number of top-level XRef Scene objects in the scene. If the root:<XRefScene> is specified, the total number of XRef Scene objects in the nested XRef file within the XRefScene's XRef file is returned.

xrefs.deleteAllXRefs [root:<XRefScene>]

If root is not specified, deletes all XRef Scene objects. If the root:<XRefScene> is specified, only the specified XRefScene's XRef Scene object, and its nested XRef Scene objects, are deleted.

xrefs.updateChangedXRefs [#noRedraw] [root:<XRefScene>]

If root is not specified, updates all XRef Scene objects flagged as changed. If the root:<XRefScene> is specified, only the specified XRefScene's XRef Scene objects flagged as changed are updated. If #noRedraw is specified, the viewports won't be updated after the XRef Scene objects are loaded. Returns true if the XRef Scene objects were loaded okay, otherwise false.

xrefs.findUnresolvedXRefs [root:<XRefScene>]

If root is not specified, returns an array of file name strings for all the unresolved XRef Scene objects. If the root:<XRefScene> is specified, only the unresolved XRef Scene objects within the specified XRefScene's XRef Scene object are returned.

xrefs.attemptUnresolvedXRefs [root:<XRefScene>]

If root is not specified, tries to load any XRef Scene objects that are currently unresolved. If the root:<XRefScene> is specified, only the unresolved XRef Scene objects within the specified XRefScene's XRef Scene object are loaded.


Editable Meshes, Splines, and Patches

Editable Meshes, Splines, Patches and Polys

The following topics describe the MAXScript access to Editable Meshes, Splines, Patches and Editable Polys

Editable_Mesh and TriMesh

SplineShape

Patch

Editable_Poly


Editable_Mesh : GeometryClass and TriMesh : Value

Editable_Mesh is the class of node objects that are the result of collapsing a modifier stack to an editable mesh object. Many of the mesh operations in MAXScript that modify meshes will only work on Editable_Mesh scene nodes.

The TriMesh class is a MAXScript value wrapper for the low-level 3ds Max SDK Mesh class used extensively in mesh-based objects and modifiers in 3ds Max. Meshes hold the actual vertex and face arrays, and so on, in a triangular mesh. For example, an Editable_Mesh object contains an instance of a Mesh. The prime purpose of the TriMesh class is to allow scripted primitive object plug-ins to access and build the Mesh object inside geometry objects. This class has a large range of mesh manipulation and construction functions, corresponding to the low-level mesh operations on Editable Mesh scene nodes.

The properties and methods described in this topic are applicable to both Editable_Mesh objects and TriMesh values are signified by a value type of <mesh>. The properties and methods applicable to just TriMesh values are signified by a value type of <trimesh>.

WARNING!

Meshes created by MAXScript are triMesh values.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods

Class and Object Inspector Functions

Scripting Vertex and Control Point Animation

NOTES:

Only the update() function updates the mesh's internal caches and images in 3ds Max viewports. This is because updates can be computationally expensive and you don't want them performed on every function call. However, you must make sure you do call the update() function after a series of changes and before the mesh is to be worked on in 3ds Max or by other functions in MAXScript.

Coordinates are given in the MAXScript working coordinate system.

If the update() function is called on an object that is selected and currently open in the Modify panel, it will drop the current selection in order to avoid a potential crash in 3ds Max, which at the moment, does not support scripted changes to an object open in the Modify panel.

If you are creating or modifying a mesh, and have not yet run update() on the mesh, 3ds Max will crash if you minimize and then maximize the 3ds Max window. This is because an only partially created mesh is created, and the internal 3ds Max mesh structure is left in an unstable state.

Constructors (Editable_Mesh)

editable_mesh...

Creates an empty mesh.

mesh [ length:<integer> ] [ width:<integer> ] \

[ lengthsegs:<integer> ] [ widthsegs:<integer> ]

Creates a flat rectangular mesh with the given size and number of segments. The default length and width are 50, the default number of segments is 5.

mesh [ numverts:<number> ] [ numfaces:<number> ]

Creates a mesh of the given geometry but with no topology (i.e., no faces or edges). You have to individually place the vertices and create the faces from the vertices. The default number of vertices and faces are 36 and 50, respectively.

mesh [ mesh:<TriMesh> ]

Creates a mesh using the specified TriMesh value as the mesh source.

mesh vertices:<array_of_point3s> \

faces:<array_of_point3s> \

[ materialIDs:<array_of_integers> ] \

[ tverts:<array_of_point3s> ]

Creates a mesh from an array of vertices and faces. Each Point3 value in the vertices array specifies the position of the vertex in the current coordinate system. Each Point3 value in the faces array specifies the 3 vertex indices that form the face. The materialIDs array specifies the material ID to be assigned to each face.

Each Point3 value in the tverts array specifies the UVW coordinates of the texture vertices. See Texture Mapping in the methods section for more information on texture vertices.

An example of construction a mesh using this form of the constructor is:

EXAMPLE

mesh vertices:#([0,0,0],[10,0,0],[0,10,0],[10,10,0]) \

faces:#([1,2,3],[2,4,3]) materialIDS:#(1,2)

NOTE:

The optional tverts array feature is currently broken. The texture vertices are set correctly, but no texture faces are built internally. Until this gets fixed, you can work around by building the texture faces yourself:

WORKAROUND EXAMPLE:

mnode = mesh vertices:#([0,0,0],[10,0,0],[0,10,0],[10,10,0]) tverts:#([0,0,0],[10,0,0],[0,10,0],[10,10,0]) faces:#([1,2,3],[2,4,3])

mmesh = mnode.mesh

buildTVFaces mmesh

for i = 1 to mmesh.numfaces do (setTVFace mmesh i (getFace mmesh i))

collapseStack <node> -- mapped

Collapses the object space modifiers out of a stack, leaving a resultant base object corresponding to the evaluation result on top of the node(s)' stack. This means that the result will be Editable_Mesh only if the result on top of the stack is Editable_Mesh. Some modifiers convert the object class implicitly, for example a Box with MeshSmooth on top will collapse to Editable_Poly because MeshSmooth implicitly converts the incoming geometry to polygons. Adding a MeshSelect or a TurnToMesh modifier on top of the MeshSmooth modifier and then calling collapseStack() will results in an Editable_Mesh base object.

EXAMPLE

b = box() --create a box

$Box:Box01 @ [0.000000,0.000000,0.000000]

addModifier b (MeshSmooth()) --add meshSmooth modifier

OK

classof b --check the class - it was turned into Polygons!

PolyMeshObject

collapseStack b --collapse the stack of the box

OK

classof b --the result is Editable_Poly

Editable_Poly

addModifier b (Turn_To_Mesh()) --now add Turn To Mesh modifier

OK

classof b --the class is now Editable_Mesh and not Editable_Poly!

Editable_mesh

collapseStack b --collapse the stack

OK

classof b --as expected, the result is an Editable_Mesh!

Editable_mesh

If there are no object space modifiers in the stack when this is called, no action is taken. So, if you want to force an object to be an editable mesh (for example, for the mesh operation listed below), you can apply a null modifier and then collapse the stack:

EXAMPLE

b = box() --create a box

$Box:Box03 @ [0.000000,0.000000,0.000000]

collapseStack b --try to collapse the stack

OK

classof b --it is still a box - nothing to collapse!

Box

addModifier b (meshSelect()) --add a MeshSelect modifier

OK

collapseStack b --try to collapse the stack again

OK

classof b --this time it worked!

Editable_mesh

collapseStack() does not collapse the effect of any world space modifiers (including bindings to Space Warps). The world space modifiers remain on the object's stack. To collapse an object with world space modifiers to a mesh use the snapshot() method.

snapshot <node> -- mapped

This function provides functionality similar to the SnapShot tool in 3ds Max. It generates a new node that contains a copy of the world-state mesh of the source <node> at the time that the snapshot is made. Any existing modifiers are collapsed out of the new node and the mesh snapshot accounts for any space warps currently applied.

convertToMesh <node> -- mapped

Converts appropriate scene object types into Editable Meshes. It is similar to collapseStack() in that it will remove all object space modifiers present, but unlike collapseStack() it will always replace the base object with an editable mesh version, even if there are no modifiers present.

It can be applied to any object that an Edit Mesh modifier can work on, such as geometry and shapes, but not helpers, space warps, lights, etc.

convertTo <node> [ TriMeshGeometry | Mesh ] -- mapped

Converts appropriate scene object types into Editable Meshes. Operates in an identical manner to convertToMesh().

Constructors (TriMesh)

TriMesh()

Creates an empty TriMesh. Use the methods listed below to build the mesh.

<node>.mesh

Extracts a copy of a node's world state if it is convertible to a mesh.

<editable_mesh_baseobject>.mesh

Extracts a copy of base object's mesh.

<trimesh>.mesh

Extracts a copy of another TriMesh's mesh.

NOTE:

GeometryClass boolean operations also create editable_mesh objects.

Operators

The following operators perform boolean operations on meshes. These operations destructively modify the first operand mesh to contain the boolean result, as do the same boolean <node> operations.

<mesh> + <mesh> -- union

<mesh> - <mesh> -- difference

<mesh> * <mesh> -- intersection

Properties

<mesh>.numverts Integer

Get or set the number of vertices. When setting the number of vertices using the numVerts property or the setNumVerts method, the new vertices are initialized to [0.,0.,0.]

<mesh>.numfaces Integer

Get or set the number of faces

In versions prior 3ds Max 7, the user was responsible for re-initializing the mesh to make it valid before calling update. In 3ds Max 7 and higher, the re-initializing is performed automatically when setting the .numfaces value or calling the setNumFaces function.

NOTE:

$.numfaces=300

--is now equivalent to

setNumFaces $ 300 false

--The false argument means to not keep the existing topology

For all new faces, the following occurs:

  • Smoothing group set to 1

  • Vertices are set to [1,1,1] (1-based, if # verts is 0 at update, you will crash. It is expected at this point)

  • Material ID is set to 1 (1-based)

  • For each map channel in use:

    • the map face verts are set to [1,1,1]

    • if keep is false, the number of map verts is set to 1 its verts are set to [1,1,1] (1-based)

<mesh>.numtverts Integer

Get or set the number of texture vertices. When setting the number of texture vertices using the numTVerts property or setNumTVerts method, the new verts are initialized to [0.,0.,0.]

<mesh>.numcpvverts Integer

Get or set the number of color-per-vertex vertices. When setting the number of CPV vertices using the numCPTVerts property or setNumCPVVerts method, the new verts are initialized to [0.,0.,0.]

<mesh>.mesh TriMesh

Reading this property yields a copy of the mesh, taken from after any modifiers are applied, but before any space warps are applied. Assigning to this property sets the mesh to the TriMesh value given. You can use this property, along with copy() and the <node_or_baseobject>.mesh property to build a TriMesh from other objects' meshes.

NOTE:

The following properties are not applicable to TriMeshes:

<mesh>.selectedVerts VertexArray

Get the currently selected vertices of the Editable_Mesh object. See VertexSelection Values .

<mesh>.verts VertexArray

Get all of the vertices of the Editable_Mesh object. See VertexSelection Values .

<mesh>.selectedFaces FaceArray

Get the currently selected faces of the Editable_Mesh object. See FaceSelection Values .

<mesh>.Faces FaceArray

Get all of the faces of the Editable_Mesh object. See FaceSelection Values .

<mesh>.selectedEdges EdgeArray

Get the currently selected edges of the Editable_Mesh object. See EdgeSelection Values .

<mesh>.Edges EdgeArray

Get all of the edges of the Editable_Mesh object. See EdgeSelection Values .

<mesh>.displacementMapping Boolean

Get or set whether to perform displacement mapping for the Editable_Mesh object. There is no corresponding user interface element for this property.

<mesh>.subdivisionDisplacement Boolean

Get or set whether to perform subdivision displacement for the Editable_Mesh object. This property corresponds to the Subdivision Displacement checkbox in the Surface Properties rollout.

<mesh>.splitMesh Boolean

Get or set whether to split the mesh during subdivision displacement. This property corresponds to the Split Mesh checkbox in the Surface Properties rollout. Setting this property will enable subdivisionDisplacement if it is set to false.

You can both read and assign to the above properties with the exception of the properties that return a VertexSelection, FaceSelection, or EdgeSelection. If you assign numbers to them to add room for more vertices or faces, the mesh will lose all current topology/geometry (i.e., vertices, faces, and edges), assuming you want to rebuild it from scratch. If you want to retain the current topology/geometry, use the setNumVerts(), setNumTVerts() and setNumFaces() methods described below.

Up to N vertex coordinates are available as properties on Editable_Mesh objects, where N is the number of vertices in the mesh. A vertex is available as a property once a controller has been assigned to the vertex. Controllers can be assigned to vertices using the animateVertex() method described in Scripting Vertex and Control Point Animation . For example, if a sphere object is collapsed to an Editable_Mesh, and some of its vertices are animated, the properties for the vertices would be similar to:

$Sphere01.vertex_209 Point3 value: [7.9,-40.0,0.0] -- animatable

$Sphere01.vertex_210 Point3 value: [-7.8,-39.3,-7.9] -- animatable

$Sphere01.vertex_211 Point3 value: [0.0,-40.0,-7.9] -- animatable

Methods

The following methods operate on the base object in a node if no object space modifiers are present. If object space modifiers are present, the mesh get operations access the world-state mesh, after the object space modifiers have been applied. The mesh set operations only work on base object Editable Meshes and signal an error if there are object space modifiers present, informing you that the mesh is not changeable when modifiers are present. You can convert objects to Editable Meshes with the collapseStack(), snapshot(), and convertToMesh() methods. If there are no object space modifiers present, both get and set operations work on the base editable mesh object.

Because the mesh get operations require a mesh, the combination of base object and modifiers must yield a mesh at the top of the modifier stack. This excludes combinations such as Patch base-objects and deformer modifiers such as bend and twist, because they pass a patch object, not a mesh up the stack. Applying an Edit Mesh modifier always forces the world-state object to be a mesh.

If world space modifiers are present, the mesh get operations access the world-state mesh, after any object space modifiers have been applied, but before the world space modifiers have been applied. Currently you can not access the position of vertices as affected by world space modifiers. The mesh set operations will work if only world space modifiers are applied to the object. Setting a vertices position in such a case will set it's position before the world space modifiers have been applied. You can create a new mesh object using the snapshot() method which accounts for the effects of world space modifiers.

The update() method makes any scripted changes to a base object mesh visible to 3ds Max and you must call this function at some point after modifying a mesh so that 3ds Max sees a valid mesh. Because this update can be a compute-intensive operation, it is made available as a separate function so you perform many changes on a mesh and then invoke the update just once to signal all the changes to 3ds Max.

All vertex and face indexes start at 1, following the other indexing conventions in MAXScript. All coordinates used are relative to the current working coordinate system.

General Methods

update <mesh> [ geometry:<boolean> ] [ topology:<boolean> ] \

[ normals:<boolean> ] -- mapped

The three optional keyword arguments provide control over the kind of updating done to the mesh. If the geometry: argument is true, the geometry cache is rebuilt (normals and edge list) and the mesh's bounding box is invalidated. If the topology: argument is true, the edge and strip databases will be rebuilt. If normals: is true, the face normals are computed. All flags default to true, so that a simple call to update() causes a complete reconstruction of all the caches.

attach <mesh> <node>

Corresponds to the mesh attach function in the Editable Mesh Modify panel allowing you to construct a mesh by adding complete objects to it. Extracts the mesh from <node> (first converting to a mesh if need), adds it to <mesh> which must be an Editable Mesh object and then deletes <node>. The materials and material IDs in <node> are merged into <node> using the default settings for the attach operation in the Editable Mesh Modify panel. This method is not applicable to TriMeshes.

meshop.attach {<target_editable_mesh_node> | <target_mesh>} \

{<source_node> | <source_mesh>} \

targetNode:<node=unsupplied> \

sourceNode:<node=unsupplied> \

attachMat:<{#neither | #MatToID | #IDToMat}=#neither> \

condenseMat:<boolean=true> \

deleteSourceNode:<boolean=true>

Attaches the source mesh to the target mesh. If the target or source is specified as a mesh rather than a node, the mesh is attached using the local coordinate system of the mesh, and no material correction is performed. To get around this, if the target or source is a mesh, the corresponding targetNode or sourceNode named parameter is checked to see if a node is specified and, if it is, the transform and material for that node is used. If the source or target is specified as a node, the corresponding targetNode or sourceNode named parameter is not checked. The attachMat and condenseMat options correspond to the attach options in editable mesh.

condenseMat is applicable only if attachMat:#IDToMat is specified. If deleteSourceNode:false is not specified, and the source was specified as a node, or as a mesh and a sourceNode was specified, the source node is deleted after the attach.

EXAMPLE

meshop.attach $.baseobject $sphere02 targetNode:$

meshop.attach $box01 $box02 attachMat:#IDToMat \

condenseMat:true deleteSourceNode:false

meshop.getUIParam <mesh> <param_name>

meshop.getUIParam <node> [ <modifier_or_index> ] <param_name>

meshop.setUIParam <mesh> <param_name> { <float> | <boolean> }

meshop.setUIParam <node> [ <modifier_or_index> ] <param_name> { <number> | <boolean> }

Get/set a user-interface value. The optional <modifier_or_index> identifies the Edit Mesh modifier on the given scene object to set the parameter value for. These methods are UI-dependent, and require that the specified editable mesh or Edit Mesh modifier be currently displayed in the Modify panel. The valid param_name values, their meaning, and parameter value type are:

#SelByVert Selection - By Vertex (boolean)

#IgBack   Selection - Ignore Backfacing (boolean)

#IgnoreVis  Selection - Ignore Visibile Edges (boolean)

#PolyThresh Selection - Planar Threshold (number)

#SoftSel  Soft Selection - Use Soft Selection (boolean)

#SSUseEDist Soft Selection - Edge Distance (boolean)

#SSEDist Soft Selection - Edge Distance (number) [note: if value hasn't been changed, returns a value of 0]

#SSBack Soft Selection - Ignore Backfacing (boolean) [note: this is the inverse of the UI element]

#Falloff  Soft Selection - Falloff (number)

#Pinch  Soft Selection - Pinch (number)

#Bubble Soft Selection - Bubble (number)

#WeldDist Weld - Distance (number)

#WeldBoxSize Weld - Box Size in Pixels (number)

#ExtrudeType Extrude/Chamfer (boolean) [note: true - Group; false - Local]

#ShowVNormals Show Vertex Normals (boolean)

#ShowFNormals Show Face Normals (boolean)

#NormalSize Normal Scale (number)

Further Mesh-Related Topics:

Vertex Methods

Vertex Methods (meshop struct)

Vertex Data Methods (meshop struct)

Edge Methods

Edge Methods (meshop struct)

Face Methods

Face Methods (meshop struct)

Mesh Methods (meshop struct)

Mapping Methods - General (meshop struct)

Texture Vertex Methods

Color-Per-Vertex Methods

Subdivision Displacement Surface Properties Methods

Editable Mesh UI Property Methods (meshop struct)

Editable Mesh Modify Panel Command Modes and Operations (meshOps struct)


Mesh Vertex Methods

The following methods provide basic access the to Mesh vertices and vertex normals.

Methods:

Mesh Vertex Access:

getNumVerts <mesh>

Returns number of vertices as an integer, equivalent to using <mesh>.numverts.

setNumVerts <mesh> <vert_index_integer> [ <boolean> ]

Set the number of vertices as specified. If the optional boolean argument is true, the existing topology remains intact. If it is false or left off, the topology is lost.

When setting the number of vertices using the numVerts property or the setNumVerts method, the new vertices are initialized to [0.,0.,0.]

getVert <mesh> <vert_index_integer>

Returns the position (in the current working coordinate system) of the indexed vertex as a point3

setVert <mesh> <vert_index_integer> ( <point3> | <float> <float> <float> )

Sets the position coordinates of the indexed vertex as a point3 value, or 3 floats - X,Y,Z

WARNING!

This low-level mesh method does NOT handle creation of vertex animation, even if the vertices have been prepared using animateVertex theMesh #all and the method is called within an animate on context!

To operate on animated meshes, use the meshop.setVert() method instead.

EXAMPLE

obj = sphere() --create a Sphere

convertToMesh obj --collapse to EditableMesh

for v = 1 to getNumVerts obj do --loop through all vertices

(

vert = getVert obj v --get the v-th vertex

vert.z = 0.0 --change the Z coordinate to 0.0

setVert obj v vert --assign back to the v-th vertex

)

update obj --update the mesh - the sphere should be flattened

deleteVert <mesh> <vert_index_integer>

Deletes the indexed vertex from the mesh and all faces that share the vertex. Renumbers vertices and faces to account for the deletions. Also adjusts face vertex indexes as necessary.

EXAMPLE

p = plane() --create a Plane

convertToMesh p --collapse to Editable_Mesh

deleteVert p 13 --delete vertex 13 (the middle vertex)

update p --update the mesh

Mesh Vertex Normal

getNormal <mesh> <vert_index_integer>

Returns the normal at the indexed vertex's position as a point3. The normal is based on the faces that use the vertex and the smoothing groups assigned to those faces.

EXAMPLE

obj = geosphere() --create a GeoSphere

convertToMesh obj --collapse to Editable_Mesh

--Count backwards from the last vertex to the first.

--This is necessary because we intend to delete vertices

--and this will renumber the remaining ones. Counting backwards

--ensures the renumbering does not affect the loop:

for v = obj.numVerts to 1 by -1 do

(

--get the vertex normal and get the dot product with the +Z vector

--If the result is less than the specified threshold,

--then delete the vertex the normal belongs to

if dot (getNormal obj v) [0,0,1] <= -0.25 do deleteVert obj v

)

update obj --update the mesh

setNormal <mesh> <vert_index_integer> <point3>

Sets the indexed vertex's normal vector

Mesh Vertex Selection:

getVertSelection <node> [ <modifier_or_index> ] [ name:<name> ]

getVertSelection <mesh>

Returns the current vertex selection set, or the specified named selection set if the optional name: parameter is specified, as a BitArray. The optional <modifier_or_index> identifies the Edit Mesh or Mesh Select modifier on the given scene object from which the selection BitArray is obtained.

FOR EXAMPLE

getVertSelection $foo $foo.modifiers[3]

If the optional <modifier_or_index> argument is not supplied, the <node> must be an Editable Mesh object and the selection is taken from the top of the modifier stack. If <modifier_or_index> is supplied, it must be either a modifier on the node or a number. If it is a modifier, it must be either an Edit Mesh or a Mesh Select modifier. If it is a number, it is used as an index into the Edit Mesh/Select Modifiers on the <node> starting from the top of the stack.

NOTES:

The index does not count any other types of modifier present! So, an index of 1 will always get the selection currently active at the top of the stack.

The function returns a BitArray with bits set for the 1-based indices of the currently selected vertices, or the vertices specified by the named selection set, in the object by the given modifier.

FOR EXAMPLE

getVertSelection $foo $foo.modifiers[3]

RETURNS

#{2..5,9,25..27}

This is a snapshot of the selection—the BitArray doesn't change automatically as you make different selections. Further, it reflects the current vertex selection whether or not the modifier is in vertex sub-object selection mode (this selection is remembered and re-established whenever you go back into vertex subobject mode). So, for example, if you select some vertices then click out of vertex subobject mode, the whole object rather than the selection is passed up the stack to the next modifier, but getVertSelection() returns the selected vertices at the time the subobject mode was exited.

You might use the modifiers modifier array accessing scheme here if you've got many edit mesh modifiers with non-unique names. You can also use a constructed string as an index into the modifiers array,

FOR EXAMPLE

$foo.modifiers["edit mesh" + i as string]

assuming the variable 'i' had some indexing value and the names were set up thusly. '+' on strings concatenates.

To access the selection from the EditableMesh base object when there are modifiers present on the stack, you should access the TriMesh value of the base object,

FOR EXAMPLE

getVertSelection $foo.baseobject.mesh

setVertSelection <node> [<modifier_or_index>] ( <sel_bitarray> | <sel_array> ) [name:<name>] [keep:<boolean>]

setVertSelection <mesh> ( <sel_bitarray> | <sel_array> ) [keep:<boolean>]

Sets the vertex selections in an Editable Mesh base object, Mesh Select modifier, Edit Mesh Modifier, or TriMesh. This mirrors the selection getting method above.

The <modifier_or_index> argument is interpreted as for the get- form above, except that only the Mesh Select modifier is supported for set operations.

FOR EXAMPLE

setVertSelection $foo #{1..4,100..102}

setFaceSelection $foo (getFaceSelection $baz) keep:true

If the optional name: argument is specified, the vertices in the specified named selection set in the Editable Mesh or Mesh Select modifier are selected. If the name: argument is not specified, the selection index argument gives the indexes of the sub-object items to be selected as either a BitArray or an array of integers. If the optional keep: keyword argument is false or not supplied, any current selection will be replaced by the new one. If the keep: keyword argument is true, the new selection is added to the current selection. The name: argument is not applicable to TriMeshes.

Use the mesh update() function after making a group of selection changes in order to make them visible to any modifiers on the object.

averageSelVertCenter <node>

Returns the average position (center) of the selected vertices in the given mesh as a Point3. If the object is not a mesh this method returns undefined. If no vertices are selected in the mesh, a value of [0,0,0] is returned. This method is not applicable to TriMeshes.

averageSelVertNormal <node>

Returns the normalized average of the normals of the selected vertices in the given mesh as a Point3. If the given node is not a mesh, it returns undefined. If no vertices are selected in the mesh, or the averaged normal is [0,0,0], a value of [1,0,0] is returned. This method is not applicable to TriMeshes.

The vertex normals used in this method do not consider smoothing group data of the faces that use the vertex.

See also:

Vertex Methods (meshop struct)

Vertex Data Methods (meshop struct)

Texture Vertex Methods

Color-Per-Vertex Methods

For more mesh-related methods, see

Editable Mesh - Topics Index

Editable_Mesh : GeometryClass and TriMesh : Value


Meshop Vertex Methods

The following methods provide advanced access to the Mesh vertices and vertex normals.

Methods:

meshop.breakVerts <Mesh mesh> <vertlist>

For each vertex in <vertlist>, N-1 new vertices are created at the same location, where N is the number of faces using that vertex. Each of these faces will use one of these vertices.

meshop.chamferVerts <Mesh mesh> <vertlist> <float amount>

Chamfers the specified vertices by the specified amount.

EXAMPLE:

obj = plane()

convertToMesh obj

max modify mode

select obj

subObjectLevel = 1

meshop.chamferVerts obj #{13} 3.5

meshop.cloneVerts <Mesh mesh> <vertlist>

Clones the specified vertices.

meshop.deleteIsoVerts <Mesh mesh>

Deletes all vertices not used by a face.

meshop.deleteVerts <Mesh mesh> <vertlist>

Deletes the specified vertices.

meshop.detachVerts <Mesh mesh> <vertlist> delete:<boolean=true> asMesh:<boolean=false>

Detaches the faces used by the specified vertices.

If delete: is true, the faces are deleted after being detached.

If delete: is false, the faces are not deleted.

If asMesh: is true, the faces are detached and returned as a Mesh value.

If asMesh: is false, the faces are detached as an element in the mesh and a value of OK is returned.

meshop.getHiddenVerts <Mesh mesh>

Returns a bitarray of size=(#vertices in mesh) with bits set for all vertices that are hidden.

meshop.setHiddenVerts <Mesh mesh> <vertlist>

Sets the specified vertices as hidden, and non-specified vertices as visible.

EXAMPLE:

obj = plane() --create a plane

convertToMesh obj --convert to Editable_Mesh

--Hide half the vertices

meshop.setHiddenVerts obj #{1..(obj.numverts/2)}

update obj --update the mesh

max modify mode --change to modify mode

select obj --select the plane

subObjectLevel = 1 --switch to vertex level to see the result

meshop.getIsoVerts <Mesh mesh>

Returns a bitarray of size=(#vertices in mesh) with bits set for all vertices that are not used by a face.

EXAMPLE:

obj = plane() --create a plane

$Plane:Plane01 @ [0.000000,0.000000,0.000000]

convertToMesh obj --collapse to Editable_Mesh

$Editable_Mesh:Plane01 @ [0.000000,0.000000,0.000000]

meshop.getIsoVerts obj --Get isolated vertices - none!

#{}

--Delete the 8 faces in the middle of the plane,

--leaving the middle isolated vertex undeleted

meshop.deleteFaces obj #{11..14,19..22} delIsoVerts:false

OK

update obj --update the mesh

OK

meshop.getIsoVerts obj --check the isolated vertices - #13!

#{13}

meshop.getNumVerts <Mesh mesh>

Returns the number of vertices in the mesh.

meshop.setNumVerts <Mesh mesh> <int>

Sets the number of vertices in the mesh. Any new vertices are created at [0,0,0] in the mesh's local coordinate system.

meshop.getVert <Mesh mesh> <int vertIndex> node:<node=unsupplied>

Returns the position of the specified vertex. If <mesh> is a node, or if <mesh> is an Editable Mesh or a Mesh value and node: is specified, the position returned is in the current coordinate system context. If <mesh> is an Editable Mesh or a Mesh value and node: is not specified, the return value is in the mesh's local coordinate system.

meshop.setVert <Mesh mesh> <vertlist> {<point3 pos> | <point3 pos_array>} node:<node=unsupplied>

Moves the specified vertices to the specified position. If <mesh> is a node, or if <mesh> is an Editable Mesh or a Mesh value and node: is specified, the position is in the current coordinate system context. If <mesh> is an Editable Mesh or a Mesh value and node: is not specified, the position is in the mesh's local coordinate system.

The positions can be optionally specified as array. In that case, the number of values in pos_array must match the number of vertices specified in vertlist.

If executed in an animation on context or with the AutoKey button checked, animation keys will be created for the vertices of an Editable Mesh. This is not the case with the original setVert() vertex method available since 3ds Max 2.

Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

NOTE:

It is very important to pass the <vertlist> argument as a bitArray value and not as an array. Passing the argument as an array will cause a significant performance hit (orders of magnitude!)

This applies to all methods operating on sub-object lists.

meshop.getVertexAngles <Mesh mesh> <vertlist>

This method calculates, for each vertex, the sum of the angles of this vertex's corner in each face it's on. So for instance, a point lying in the middle of a grid would always have vertex angle 2*Pi (6.28319 radians, equal to 360 degrees), whereas a corner of a box would only have 3.0/2*Pi (4.71239 radians, equal to 270 degrees). Returns an array of size=(#vertices in mesh). The array element for any vertices not specified in <vertlist> will contain the value 0.

meshop.getVertsByColor <Mesh mesh> <color color> <float red_thresh> <float green_thresh> <float blue_thresh> channel:<int=0>

Returns the vertices whose vertex color is within the color range as a <bitarray>. The range values should be in the range of 0 to 255.

meshop.getVertsByColor <Mesh mesh> <point3 uvw> <Float u_thresh> <Float v_thresh> <Float w_thresh> channel:<int=0>

Returns the vertices whose vertex UVW is within the UVW range as a <bitarray>. The range values should be in the range of 0 to 1.

meshop.makeVertsPlanar <Mesh mesh> <vertlist>

Moves the specified vertices so that they are planar.

meshop.minVertexDistanceFrom <Mesh mesh> <int vertIndex> <vertlist>

Returns the minimal distance from <vertIndex> to the vertices specified in <vertlist>.

meshop.minVertexDistancesFrom <Mesh mesh> <vertlist> <int iterations>

This function computes distances from selected vertices (as indicated by <vertlist>) to non-selected ones along edge paths. Returns an array of size=(#vertices in mesh). Each element in this array is set to -1 if there is no selection. Otherwise, selected vertices have an array element value of 0; non-selected vertices that are <iterations> or fewer edges away from a selected vertex are assigned the shortest edge-path distance to a selected vertex; and non-selected vertices that are more than <iterations> edges away are set to -1. If <iterations> is 0, the distances are computed from each vertex to the nearest selected vertex, regardless of topology. This is a VERY EXPENSIVE ALGORITHM, which takes almost 4 times as long for twice as many vertices. If <iterations> is non-zero, it represents the number of edges one should "travel" in trying to find the nearest selected vertex—this means that it only takes twice as long for twice as many verts. (This is like the Edge Distance parameter in EMesh's Soft Selection dialog.)

meshop.moveVert <Mesh mesh> <vertlist> {<point3 offset> | <point3 offset_array>} node:<node=unsupplied> useSoftSel:<bool>

Moves the specified vertices by <offset>.

If <mesh> is a node, or if <mesh> is an Editable Mesh or a Mesh value and node: is specified, the offset is in the current coordinate system context.

If <mesh> is an Editable Mesh or a Mesh value and node: is not specified, the offset is in the mesh's local coordinate system.

In 3ds Max 2008 and higher, this method allows the position to be specified as array. In that case, the number of values in pos_array must match the number of verts specified in vertlist. This feature was previously available in the [ AVG ] Avguard Extensions.

If useSoftSel: is true, and the mesh's soft selection data channel is present, the specified offsets are multiplied by the vertex's soft selection value.

NOTE:

It is very important to pass the <vertlist> argument as a bitArray value and not as an array. Passing the argument as an array will cause a significant performance hit (orders of magnitude!)

This applies to all methods operating on sub-object lists.

meshop.moveVertsToPlane <Mesh mesh> <vertlist> <point3 normal> <float offset> node:<node=unsupplied>

Moves the specified vertices into the specified plane. The target plane is defined as all points which, when DotProd'd with N, return the specified offset.

All vertices are moved along the normal vector N.

If <mesh> is a node, or if <mesh> is an Editable Mesh or a Mesh value and node: is specified, the normal is in the current coordinate system context.

If <mesh> is an Editable Mesh or a Mesh value and node: is not specified, the normal is in the mesh's local coordinate system.

EXAMPLE:

obj = sphere() --create a sphere

convertToMesh obj --convert to Editable_mesh

normal = getNormal obj 10 --get the normal of vertex 10

--move all vertices of the mesh to the plane defined by the normal

--vector with an offset of 0.0 (don't offset):

meshop.moveVertsToPlane obj #{1..obj.numverts} normal 0.0

update obj --update the mesh

meshop.setVertColor <Mesh mesh> <int mapChannel> <vertlist> <Color color>

Sets the vertex color for the specified vertices in the specified <mapChannel>.

meshop.weldVertsByThreshold <Mesh mesh> <vertlist> <float threshold>

Welds the specified vertices that are within the threshold distance.

meshop.weldVerts

Renamed to meshOp.weldVertSet

meshop.weldVertSet <Mesh mesh> <vertlist> weldpoint:<point3=unsupplied> node:<node=unsupplied>

Welds the specified vertices.

If weldpoint: is specified, the resulting vertex is positioned at the supplied point.

If weldpoint: is not specified, the resulting vertex is positioned at the average location of the specified vertices.

If <mesh> is a node, or if <mesh> is an Editable Mesh or a Mesh value and node: is specified, the position is in the current coordinate system context.

If <mesh> is an Editable Mesh or a Mesh value and node: is not specified, the position is in the mesh's local coordinate system.

See also:

Mesh Vertex Methods

Vertex Data Methods (meshop struct)

Texture Vertex Methods

Color-Per-Vertex Methods

For more mesh-related methods, see

Editable Mesh - Topics Index

Editable_Mesh : GeometryClass and TriMesh : Value


Meshop_Vertex_Data_Methods

The following methods provide access to the Vertex Data channels.

Methods:

meshop.setNumVDataChannels <Mesh mesh> <Integer count> [keep:<boolean=false>]

Sets the number of vertex data channels available. The number of vertex data channels can be set from 0 to 100. The first ten channels are for internal use only.

If keep: is false or not specified, the old channel data is discarded.

If true, the old channel data is retained after the resize.

The predefined channels are:

channel 1: Soft Selection

channel 2 Vertex weights (for NURMS MeshSmooth)

channel 3 Vertex Alpha values

channel 4 Cornering values for subdivision use

meshop.getNumVDataChannels <Mesh mesh>

Returns the number of vertex data channels available as an <integer>.

meshop.setVDataChannelSupport <Mesh mesh> <Integer vdChannel> <Boolean support>

Sets whether the specified vertex data channel is supported or not.

If <support> is true, and the channel support state is currently false, a new vertex data array of the same size as the number of vertices in the mesh is allocated.

If <support> is false, and the channel support state is currently  true, the existing vertex data channel array is deallocated.

If <support> and the current channel support state are both the same, no action is performed.

setNumVDataChannels() is automatically called if the specified vertex data channel is not available. vdChannel index values are 1-based, with channels 1 and 2 being the Vertex Soft Selection and Vertex Weight channels.

meshop.getVDataChannelSupport <Mesh mesh> <Integer vdChannel>

Returns whether the specified vertex data channel is supported.

meshop.getVDataValue <Mesh mesh> <Integer vdChannel> <Integer vert_index>

Returns the floating point data value associated with vertex vert_index in vertex data channel vdChannel as a <float>.

meshop.setVDataValue <Mesh mesh> <Integer vdChannel> <Integer vert_index> <Float value>

Sets the floating point data value associated with vertex vert_index in vertex data channel vdChannel.

meshop.freeVData <Mesh mesh> <Integer vdChannel>

Deallocates the existing vertex data channel array and turns off the vertex data channel support state.

Data methods - Vertex selection weight channel (Channel 1)

meshop.getVSelectWeight <Mesh mesh> <int vertIndex>

Returns the Vertex Selection Weight data value for the specified vertex.

meshop.setVSelectWeight <Mesh mesh> <vertlist> <float weight>

Sets the Vertex Selection Weight data value for the specified vertex.

meshop.resetVSelectWeights <Mesh mesh>

Sets the Vertex Selection Weight data value to 1.0 for all vertices.

meshop.supportVSelectWeights <Mesh mesh>

Enables support of the Vertex Selection Weight channel.

meshop.freeVSelectWeights <Mesh mesh>

Deletes (deallocates) the Vertex Selection Weight data array.

Data methods - Vertex weight channel (Channel 2)

meshop.getVertWeight <Mesh mesh> <int vertIndex>

Returns the Vertex Weight data value for the specified vertex.

meshop.setVertWeight <Mesh mesh> <vertlist> <float weight>

Sets the Vertex Weight data value for the specified vertex.

meshop.resetVertWeights <Mesh mesh>

Sets the Vertex Weight data value to 1.0 for all vertices.

meshop.supportVertWeights <Mesh mesh>

Enables support of the Vertex Weight channel.

meshop.freeVertWeights <Mesh mesh>

Deletes (deallocates) the Vertex Weight data array.

Data methods - Vertex Alpha channel (Channel 3)

meshop.getVAlpha <Mesh mesh> <int vertIndex>

Returns the Vertex Alpha data value for the specified vertex.

meshop.setVAlpha <Mesh mesh> <vertlist> <float alpha>

Sets the Vertex Alpha data value for the specified vertex.

meshop.resetVAlphas <Mesh mesh>

Sets the Vertex Alpha data value to 1.0 for all vertices.

meshop.supportVAlphas <Mesh mesh>

Enables support of the Vertex Alpha channel.

meshop.freeVAlphas <Mesh mesh>

Deletes (deallocates) the Vertex Alpha data array.

Data methods - Vertex corner channel (Channel 4)

meshop.getVertCorner <Mesh mesh> <int vertIndex>

Returns the Vertex Corner data value for the specified vertex.

meshop.setVertCorner <Mesh mesh> <vertlist> <float weight>

Sets the Vertex Corner data value for the specified vertex.

meshop.resetVertCorners <Mesh mesh>

Sets the Vertex Corner data value to 0.0 for all vertices.

meshop.supportVertCorners <Mesh mesh>

Enables support of the Vertex Corner channel.

meshop.freeVertCorners <Mesh mesh>

Deletes (deallocates) the Vertex Corner data array.

See also:

Vertex Methods

Vertex Methods (meshop struct)

Texture Vertex Methods

Color-Per-Vertex Methods

For more mesh-related methods, see

Editable Mesh - Topics Index

Editable_Mesh : GeometryClass and TriMesh : Value


Mesh Edge Methods

The following methods provide basic access to the mesh edges.

Methods:

getEdgeVis <mesh> <face_index_integer> <edge_index_integer>

Returns the edge visibility for given edge (1,2,3) on indexed face as a boolean.

setEdgeVis <mesh> <face_index_integer> <edge_index_integer> <boolean>

Sets the edge visibility for given edge (1,2,3) on indexed face.

getEdgeSelection <node> [ <modifier_or_index> ] [ name:<name> ]

getEdgeSelection <mesh>

Retrieves the edge selection set, or the specified named selection set if the optional name: parameter is specified, as a BitArray. See the getVertSelection() method for more information.

setEdgeSelection <node> [ <modifier_or_index> ] ( <sel_bitarray> | <sel_array> ) [ name:<name> ] [ keep:<boolean> ]

setEdgeSelection <mesh> ( <sel_bitarray> | <sel_array> ) [ keep:<boolean> ]

Sets the edge selections in an Editable Mesh base object, Mesh Select modifier, Edit Mesh Modifier, or TriMesh. This mirrors the selection getting method above. See the setVertSelection() method for more information.

deselectHiddenEdges <mesh>

Deselects the hidden edges in the mesh. This method is not applicable to TriMeshes.

NOTE:

3ds Max defines an edge as the edge of a face. In any mesh object, the number of edges is 3 times the number of faces. A face has 3 vertices, and the face edges connect these vertices. Edges 1, 2, and 3 are the edges between vertices 1 and 2, 2 and 3, and 3 and 1, respectively. The first edge in a mesh is edge 1 on face 1, and the last edge is edge 3 on the last face. The following script selects all of the visible edges in the specified mesh:

EXAMPLE:

obj = convertToMesh (Sphere()) -- Create a Sphere, turn to EMesh

obj.allEdges = true -- Show all edges

select obj -- Select the mesh

max modify mode -- Switch to Modify panel

subObjectLevel = 2 -- Set Sub-Object level to Edge

edgeSelSet=#() -- Init. an Array

for face = 1 to obj.numfaces do -- Go through all faces

for edge = 1 to 3 do -- And for every of the 3 edges

if (getedgevis obj face edge) do -- If the visibility is true,

append edgeSelSet (((face-1)*3)+edge) --collect the edge

setedgeselection obj edgeSelSet -- Select all visible edges

The following function returns the indices of the 2 vertices that define an edge as a Point2 value. The two arguments to the function are an editable mesh node or TriMesh value and the edge index. A value of undefined is returned if the first argument isn't an editable mesh node or TriMesh value, or if the edge index is out of range.

FUNCTION

fn edgeVerts theObj theEdge =

(

if not (classof theObj == Editable_mesh or classof theObj == triMesh) do

return undefined

if theEdge < 1 or theEdge > (theObj.numfaces*3) do

return undefined

local theFace = ((theEdge-1)/3)+1

local theVerts = getFace theObj theFace

case ((mod (theEdge-1) 3) as integer) of

(

0: point2 theVerts.x theVerts.y

1: point2 theVerts.y theVerts.z

2: point2 theVerts.z theVerts.x

)

)

See also:

Edge Methods (meshop struct)

For more mesh-related methods, see

Editable Mesh - Topics Index

Editable_Mesh : GeometryClass and TriMesh : Value


Meshop Edge Methods

The following methods provide advanced access to the mesh edges.

Methods:

meshop.chamferEdges <Mesh mesh> <edgelist> <float amount>

Chamfers the specified edges by the specified amount.

EXAMPLE

obj = Box()

convertToMesh obj

meshop.chamferEdges obj #{7,8,11,14,17} 5

update obj

meshop.cloneEdges <Mesh mesh> <edgelist>

Clones the specified edges.

meshop.collapseEdges <Mesh mesh> <edgelist>

Collapses the specified edges.

EXAMPLE

obj = Box()

convertToMesh obj

meshop.collapseEdges obj #{14,17}

update obj

meshop.deleteEdges <Mesh mesh> <edgelist> delIsoVerts:<boolean=true>

Deletes the specified edges. If <delIsoVerts> is true, any isolated vertices are deleted.

meshop.divideEdge <Mesh mesh> <int edgeIndex> <float edgef> visDiag1:<boolean=false> visDiag2:<boolean=false> fixNeighbors:<boolean=true> split:<boolean=false>

Divides the specified edge at a fractional distance of <edgef> along its length.

visDiag1: and visDiag2: specify whether each of the two new edges will be visible.

If fixNeighbors: is true, the face on the other side of this edge, that is, the "reverse face", should be divided as well to prevent the introduction of a seam.

If split: is true, separate vertices for the two halves of the edge will be created, splitting the mesh open along the diagonal(s).

EXAMPLE

obj = Box() --create a Box

convertToMesh obj --collapse to EMesh

meshop.divideEdge obj 5 0.33 --divide bottom edge at 1/3

meshop.divideEdge obj 5 0.5 --divide remaining 2/3 at half -> 2 * 1/3

update obj --update the mesh

obj.vertexTicks = True --show the vertices

obj.allEdges=True --show all edges

meshop.divideEdges <Mesh mesh> <edgelist>

Divides all the specified edges in half, creating new points and subdividing faces.

EXAMPLE

obj = Box() --create a Box

convertToMesh obj --collapse to EMesh

meshop.divideEdges obj #{5,7,14,17} --divide edges

update obj --update the mesh

obj.vertexTicks = True --show the vertices

obj.allEdges=True --show all edges

meshop.edgeTessellate <Mesh mesh> <facelist> <float tension>

Tessellates the specified edges. This algorithm is exactly the one used in the Tessellate modifier, when operating on Faces and Edge SO elements.

<tension> specifies the tension for the edge tessellation. This value should be fairly small, between 0 and .5, and corresponds to the value in the Tessellate, Edit Mesh, or Editable Mesh UI's divided by 400.

EXAMPLE

obj = Box() --create a Box

convertToMesh obj --collapse to EMesh

meshop.EdgeTessellate obj #{5,6} 0.0 --tessellate faces based on edges

update obj --update the mesh

meshop.extrudeEdges <Mesh mesh> <edgelist> <float height> \

dir:<{<point3 dir> | #independent | #common}=#independent> \

node:<node=unsupplied>

Creates new edges corresponding to the specified edges, and then moves the new edges by <height>.

The direction the edges are moved is determined by <dir>. If <dir> is a point3 value, the edges will be moved in that direction. (If <mesh> is a node, or if <mesh> is an Editable Mesh or a Mesh value and node: is specified, the direction is in the current coordinate system context. If <mesh> is an Editable Mesh or a Mesh value and node: is not specified, the direction is in the mesh's local coordinate system.)

If dir:#independent is specified, the edges are moved based on the normals of the faces using the edge.

If dir:#common is specified, the edges are moved based on the normals of the face clusters using the edge.

EXAMPLE

obj = Box() --create a Box

convertToMesh obj --collapse to EMesh

meshop.extrudeEdges obj #{5,7,14,17} 10.0 --extrude edges

update obj --update the mesh

addmodifier obj (normalmodifier unify:true) --unify normals

addmodifier obj (smooth auto:true) --auto-smooth

convertToMesh obj --collapse to EMesh

meshop.getEdgesUsingVert <Mesh mesh> <vertlist>

Returns a bitarray of size=(#edges in mesh) with bits set for all edges that use the specified vertices.

SCRIPT

macroScript Vert2EdgeSel category:"MXS Help"

(

--make sure a single EMesh object is selected

on isEnabled return

selection.count == 1 and classof selection[1] == Editable_Mesh

on execute do

(

obj = selection[1] --get selected object

vertsSel = getVertSelection obj --get selected Verts

--get Edges of selected Verts:

edgeSel = meshop.getEdgesUsingVert obj vertsSel

setEdgeSelection obj edgeSel --select the edges

max modify mode --switch to Modify panel

subObjectLevel =2 --set Edge SO level

)

)--end macro

meshop.getOpenEdges <Mesh mesh>

Returns a bitarray of size=(#edges in mesh) with bits set for all edges that are used by a single face.

SCRIPT

macroScript SelOpenEdges category:"MXS Help"

(

--make sure a single EMesh object is selected

on isEnabled return

selection.count == 1 and classof selection[1] == Editable_Mesh

on execute do

(

obj = selection[1] --get selected object

max modify mode --switch to Modify panel

subObjectLevel =2 --set Edge SO level

openEdges = meshop.getOpenEdges obj --get open edges

setEdgeSelection obj openEdges --select the open edges

)

)--end macro

meshop.turnEdge <Mesh mesh> <int edgeIndex>

Turns the specified edge. Only works on edges that have a face on both sides. These two faces are considered as a quad, where this edge is the diagonal, and remapped so that the diagonal flows the other way, between the vertices that were opposite this edge on each face.

meshop.getVertsUsingEdge <Mesh mesh> <edgelist>

Returns a bitarray of size=(#vertices in mesh) with bits set for all vertices that are used by the specified edges.

SCRIPT

macroScript Edge2VertSel category:"MXS Help"

(

--make sure a single EMesh object is selected

on isEnabled return

selection.count == 1 and classof selection[1] == Editable_Mesh

on execute do

(

obj = selection[1] --get selected object

edgeSel = getEdgeSelection obj --get selected Edges

--get Verts of selected Edges:

vertsSel = meshop.getVertsUsingEdge obj edgeSel

setVertSelection obj vertsSel --select the Verts

max modify mode --switch to Modify panel

subObjectLevel =1 --set Vertex SO level

)--end on

)--end macro

meshop.getFacesUsingEdge <Mesh mesh> <edgelist>

Returns a bitarray of size=(#faces in mesh) with bits set for all faces that use the specified edges.

SCRIPT

macroScript Edge2FaceSel category:"MXS Help"

(

--make sure a single EMesh object is selected

on isEnabled return

selection.count == 1 and classof selection[1] == Editable_Mesh

on execute do

(

obj = selection[1] --get selected object

edgeSel = getEdgeSelection obj --get selected Edges

--get Faces of selected Edges:

faceSel = meshop.getFacesUsingEdge obj edgeSel

setFaceSelection obj faceSel --select the Faces

max modify mode --switch to Modify panel

subObjectLevel =3 --set Face SO level

)--end on

)--end macro

meshop.getPolysUsingEdge <Mesh mesh> <edgelist> ignoreVisEdges:<boolean=false> threshhold:<float=45.>

Returns a bitarray of size equal to the number of faces in mesh with bits set for all faces that are in 'polygons' containing the specified edges. The definition of a polygon is all faces sharing invisible edges with edge angles below the threshhold angle. The default threshhold angle is 45 degrees. If ignoreVisEdges: is set to true, the edge visibility is ignored but the threshhold is still relevant.

SCRIPT

macroScript Edge2PolySel category:"MXS Help"

(

--make sure a single EMesh object is selected

on isEnabled return

selection.count == 1 and classof selection[1] == Editable_Mesh

on execute do

(

obj = selection[1] --get selected object

edgeSel = getEdgeSelection obj --get selected Edges

--get Polygons of selected Edges:

faceSel = meshop.getPolysUsingEdge obj edgeSel

setFaceSelection obj faceSel --select the Faces

max modify mode --switch to Modify panel

subObjectLevel =4 --set Polygon SO level

)--end on

)--end macro

meshop.getEdgesReverseEdge <Mesh mesh> <edgelist>

Returns a bitarray of size=(#edges in mesh) with bits set for all additional edges that use the same vertices as the specified edges. These are edges on the adjacent faces.

EXAMPLE

Plane length:100 width:100 isSelected:on

convertTo $ TriMeshGeometry

max modify mode

subobjectLevel = 1

select $.verts[13]

-- get edges that use vertex 13

edges = meshop.getEdgesUsingVert $ (getVertSelection $)

-- select the vertices used by those edges

$.selectedVerts = meshop.getVertsUsingEdge $ edges

update $

-- not what we wanted, really want all vertices

-- "surrounding" vertex 13

faces = meshop.getPolysUsingVert $ 13

$.selectedVerts = meshop.getVertsUsingFace $ faces

update $

-- or ...

faces = meshop.getFacesUsingVert $ #(13)

edges = meshop.getEdgesUsingFace $ faces

-- turn off all visible edges

for e in edges do edges[e]=not (getEdgeVis $ (1+(e-1)/3)(1+mod (e-1) 3))

-- get the edges on the adjacent faces that are the "reverse" of these edges

-- "OR" that bitarray with the initial edges bitarray

edges = (meshop.getEdgesReverseEdge $ edges) + edges

-- get the faces that use the edges, and "OR" that bitarray with the initial

-- face bitarray

faces = (meshop.getFacesUsingEdge $ edges) + faces

$.selectedVerts = meshop.getVertsUsingFace $ faces

update $

meshop.autoEdge <Mesh mesh> <edgelist> <float threshold> \

type:<{#SetClear | #Set | #Clear}=#SetClear>

Sets/clears the edge visibility for the specified edges based on the threshold angle.

NOTE:

For an edge to be autoEdged, both it and the "reverse" edge on the face sharing the same vertices must be specified in the edge specification.

See also:

Edge Methods

For more mesh-related methods, see

Editable Mesh - Topics Index

Editable_Mesh : GeometryClass and TriMesh : Value


Mesh Face Methods

The following methods provide basic access to the mesh faces.

Methods:

getNumFaces <mesh>

Returns number of faces as an integer, equivalent to using <mesh>.numfaces

setNumFaces <mesh> <face_index_integer> [ <boolean> ]

Set the number of faces as specified. If the optional boolean argument is true, the existing topology remains intact. If it is false or left off, the topology is lost.

For all new faces, the following occurs:

  • Smoothing group set to 1

  • Vertices are set to [1,1,1] (1-based, if # verts is 0 at update, you will crash. It is expected at this point)

  • Material ID is set to 1 (1-based)

  • For each map channel in use:

    • the map face verts are set to [1,1,1]

    • if keep is false, the number of map verts is set to 1 its verts are set to [1,1,1] (1-based)

getFace <mesh> <face_index_integer>

Returns the face vertex indexes for the indexed face as a point3. Each component of the point3 value contains a vertex index.

setFace <mesh> <face_index_integer> <vert_indices_point3>

Sets the face vertex indexes for the indexed face from a point3.

setFace <mesh> <face_index_integer> <vert_index_integer> \

<vert_index_integer> <vert_index_integer>

Sets the face vertex indexes for the indexed face from 3 vertex indexes.

deleteFace <mesh> <face_index_integer>

Deletes indexed face from the mesh. Renumbers faces accordingly.

collapseFace <mesh> <face_index_integer>

Deletes indexed face from the mesh, welding its 3 vertices together at the center of the original face. Renumbers faces accordingly.

getFaceNormal <mesh> <face_index_integer>

Returns the normal of the indexed face as a point3.

setFaceNormal <mesh> <face_index_integer> <point3>

Sets the indexed face's normal vector. As soon as you run update() on the mesh, this value is overwritten.

getFaceMatID <mesh> <face_index_integer>

Returns the indexed face's material ID as an integer.

setFaceMatID <mesh> <face_index_integer> <integer>

Sets the indexed face's material ID.

getFaceSmoothGroup <mesh> <face_index_integer>

Returns the indexed face's smoothing groups as a 32-bit integer. There are 32 possible smoothing groups. Each bit in the returned value corresponds to a smoothing group. If a bit is turned on, the face is part of that smoothing group. You can retrieve the list of smoothing groups for a face as a BitArray using the following function:

SCRIPT

fn getFaceSmoothGroupB obj face =

(

local sgroup_val=getFaceSmoothGroup obj face

local sg_bitarray=#{}

if sgroup_val < 0 do

(

sg_bitarray[32]=true

sgroup_val -= 2^31

)

for i = 1 to 31 do

(

sg_bitarray[i]= (mod sgroup_val 2 > .5)

sgroup_val /= 2

)

sg_bitarray

)

setFaceSmoothGroup <mesh> <face_index_integer> <smoothing_group_integer>

Sets the indexed face's smoothing groups. If you have a face's desired smoothing groups as a BitArray, you could set the face's smoothing group data using the following function:

SCRIPT

fn setFaceSmoothGroupB obj face sg_bitarray =

(

local sgroup_val=0

for i in sg_bitarray do sgroup_val += 2^(i-1)

setFaceSmoothGroup obj face sgroup_val

update obj

)

getFaceSelection <node> [ <modifier_or_index> ] [ name:<name> ]

getFaceSelection <mesh>

Retrieves the face selection set, or the specified named selection set if the optional name: parameter is specified, as a BitArray. See the getVertSelection() method for more information.

setFaceSelection <node> [ <modifier_or_index> ] \

( <sel_bitarray> | <sel_array> ) \

[ name:<name> ] [ keep:<boolean> ]

setFaceSelection <mesh> ( <sel_bitarray> | <sel_array> ) \

[ keep:<boolean> ]

Sets the face selections in an Editable Mesh base object, Mesh Select modifier, Edit Mesh modifier, or TriMesh. This mirrors the selection getting method above. See the setVertSelection() method for more information.

deselectHiddenFaces <mesh>

deselects the hidden faces in the mesh. This method is not applicable to TriMeshes.

extrudeFace <mesh> ( <index> | <bitarray> | <integer_array> | #selection )

<amount> <scale> [ dir:(<point3> | #common | #independent ) ]

Provides capabilities equivalent to the Extrude Face modifier. This function works only on Editable Mesh nodes. The second argument defines which faces to extrude, either a single face index, a BitArray of face indexes, an integer array of face indexes, or the name literal #selection meaning the current face selection in the Editable Mesh. The <amount> argument specifies the extrude distance and the <scale> specifies a % amount to scale each face cluster.

If the optional dir: keyword argument is not specified, face clusters are extruded by moving their vertices independently along the average normal at each vertex, as does the Extrude Face modifier. If it is specified, it can be a point3 giving a direction vector in which all vertices are moved, or it can be the value #independent which is the same as the default direction, or it can be the value #common which extrudes face clusters along the average normal of all the face normals in each cluster. #common is equivalent to the Group Normal option in EditableMesh, and #independent is equivalent to the Local Normal option.

EXAMPLE

s=sphere()

convertToMesh s

extrudeface s #{1..16} 10 100 dir:#independent

update s

See also:

Face Methods (meshop struct)

Mesh Methods (meshop struct)

For more mesh-related methods, see

Editable Mesh - Topics Index

Editable_Mesh : GeometryClass and TriMesh : Value


Meshop Face Methods

The following methods provide advanced access to the mesh faces.

Methods:

meshop.bevelFaces <Mesh mesh> <facelist> <float height> <float outline> dir:<{<point3 dir> | #independent | #common}=#independent> node:<node=unsupplied>

Moves the specified faces by <height> and outlines them by <outline>.

NOTE:

This method does not correspond to the Bevel functionality in the EditableMesh UI. It moves and outlines faces without creating new faces. See meshop.ExtrudeFaces further on this page for the corresonding method that creates new beveled faces.

The direction the faces are moved is determined by <dir>.

If dir is a point3 value, the faces will be moved in that direction.

(If <mesh> is a node, or if <mesh> is an Editable Mesh or a Mesh value and node: is specified, the direction is in the current coordinate system context. If <mesh> is an Editable Mesh or a Mesh value and node: is not specified, the direction is in the mesh's local coordinate system.)

If dir:#independent is specified, the faces are moved based on the individual face normals.

If dir:#common is specified, the faces are moved based on the face cluster normals.

meshop.cloneFaces <Mesh mesh> <facelist>

Clones the specified faces.

EXAMPLE

obj = geosphere() --create a GeoSphere

convertToMesh obj --collapse to EditableMesh

--Clone half of the faces - they get selected automatically:

meshop.cloneFaces obj #{1..obj.numfaces/2}

--Offset the selected Faces at 20 units along their local normals

meshop.bevelFaces obj (getFaceSelection obj) 20 0 dir:#independent

update obj --update the mesh

meshop.collapseFaces <Mesh mesh> <facelist>

Collapses the specified faces.

EXAMPLE

obj = geosphere() --create a GeoSphere

convertToMesh obj --collapse to EditableMesh

--Collapse half the faces:

meshop.collapseFaces obj #{1..obj.numfaces/2}

update obj --update the mesh

meshop.deleteFaces <Mesh mesh> <facelist> delIsoVerts:<boolean=true>

Deletes the specified faces. If delIsoVerts: is true, any isolated vertices are deleted.

EXAMPLE

obj = geosphere() --create a GeoSphere

convertToMesh obj --collapse to EditableMesh

--Delete all faces in the mesh but leave the vertices:

meshop.deleteFaces obj #{1..obj.numfaces} delIsoVerts:false

update obj --update the mesh

max modify mode --switch to modify mode

select obj --select the mesh

SubObjectLevel = 1 --switch to vertex level to see the vertices

meshop.detachFaces <Mesh mesh> <facelist> delete:<boolean=true> asMesh:<boolean=false>

Detaches the specified faces.

If delete: is true, the faces are deleted after being detached. If delete: is false, the faces are not deleted.

If asMesh: is true, the faces are detached and returned as a Mesh value. If asMesh: is false, the faces are detached as an element in the mesh and a value of OK is returned.

EXAMPLE

--Let's detach faces as element inside the original mesh:

obj = geosphere pos:[100,0,0] --create a GeoSphere

convertToMesh obj --collapse to EditableMesh

--Detach half of the faces as element, delete the original faces

meshop.detachFaces obj #{1..obj.numfaces/2} delete:true

update obj --update the mesh

--In this example, the same mesh will be detached as a separate object

obj = geosphere pos:[0,0,0] --create another GeoSphere

convertToMesh obj --collapse to EditableMesh

-- Detach the faces as Mesh and

-- get the resulting TriMesh in a variable:

newMesh = meshop.detachFaces obj #{1..obj.numfaces/2} delete:true asMesh:true

update obj --update the mesh

emesh = Editable_mesh() --create an empty Editable_mesh

emesh.mesh = newMesh --assign the detached faces to the new mesh

update emesh --update the mesh

meshop.divideFace <Mesh mesh> <int faceIndex> baryCoord:<point3=unsupplied>

Divides the specified face.

If baryCoord: is specified, the new vertex will be created at the corresponding position.

If baryCoord is not specified, the new vertex will be created at the center of the face.

See also Barycentric Coordinates

EXAMPLE

obj = plane() --create a plane

convertToMesh obj --collapse to Editable_Mesh

--Loop backwards through all original faces.

--This will ignore any new faces added to the face array

for f = obj.numfaces to 1 by -1 do

meshop.divideFace obj f barycoord:[0.1,0.1,0.5] --divide the face

update obj --update the mesh

meshop.divideFaceByEdges <Mesh mesh> <int faceIndex> <int edge1Index> <float edge1f> <int edge2Index> <float edge2f> fixNeighbors:<boolean=true> split:<boolean=false>

Divides the specifed face. New vertices are created on the specified edges at the specified fractional distance along their length.

If fixNeighbors: is true, the face on the other side of the edges, that is, the "reverse faces", should be divided as well to prevent the introduction of a seam.

If split: is true, separate vertices for the two halves of the edges will be created, splitting the mesh open along the diagonal(s).

EXAMPLE

obj = plane lengthsegs:1 widthsegs:1 --create a simple plane of 2 faces

convertToMesh obj --collapse to Editable_mesh

obj.allEdges = true --show all edges

--Divide face 1 connecting edges 2 and 3 at 0.25 resp. 0.75 along

--their length. This gives a new edge parallel to edge 1

meshop.divideFaceByEdges obj 1 2 0.25 3 0.75

update obj --update the mesh

meshop.divideFaces <Mesh mesh> <facelist>

Divides the specified faces, with new vertices created at the center of the faces.

EXAMPLE

--The following code does the same as Tessellate in Face-Center mode

obj = plane() --create a plane

convertToMesh obj --collapse to Editable_Mesh

--Divide all faces by placing a new vertex at the face center:

meshop.divideFaces obj #{1..obj.numfaces}

update obj --update the mesh

meshop.explodeAllFaces <Mesh mesh> <float threshold>

"Explodes" the mesh into separate elements.

<threshold> specifies the angle between faces that indicates whether they should be in the same or different element.

WARNING!

The float threshold parameter is currently expected in radians!

EXAMPLE

obj = geosphere() --create a GeoSphere

convertToMesh obj --collapse to EditableMesh

--Explode all faces in the mesh to elements, disregarding the angle:

meshop.explodeAllFaces obj 0

update obj --update the mesh

meshop.explodeFaces <Mesh mesh> <facelist> <float threshold>

"Explodes" the specified faces into separate elements.

<threshold> specifies the angle between faces that indicates whether they should be in the same or different element.

EXAMPLE

obj = geosphere() --create a GeoSphere

convertToMesh obj --collapse to EditableMesh

--Explode half of the faces regardless the angle

meshop.explodeFaces obj #{1..obj.numfaces/2} 0

--Move the exploded faces (selected by the explodeFaces method)

--along their normals at 10 units without outline:

meshop.bevelFaces obj (getFaceSelection obj) 10 0 dir:#independent

update obj --update the mesh

meshop.extrudeFaces <Mesh mesh> <facelist> <float height> <float outline> dir:<{<point3 dir> | #independent | #common}=#independent> node:<node=unsupplied>

Creates new faces corresponding to the specified faces, and then moves the new faces by <height> and outlines them by <outline>.

The direction the faces are moved is determined by dir.

If dir: is a point3 value, the faces will be moved in that direction.

(If <mesh> is a node, or if <mesh> is an Editable Mesh or a Mesh value and node: is specified, the direction is in the current coordinate system context. If <mesh> is an Editable Mesh or a Mesh value and node: is not specified, the direction is in the mesh's local coordinate system.)

If dir:#independent is specified, the faces are moved based on the individual face normals.

If dir:#common is specified, the faces are moved based on the face cluster normals.

EXAMPLE

obj = geosphere() --create a GeoSphere

convertToMesh obj --collapse to Editable_Mesh

--Loop from half the face count back to 1.

--Since ExtrudeFaces creates new faces, counting backwards

--ensures the loop will go only through the original faces:

for f = obj.numfaces/2 to 1 by -1 do

meshop.extrudeFaces obj #{f} 5.0 -1.0 --extrude the single face

update obj --update the mesh

meshop.getBaryCoords <Mesh mesh> <int faceIndex> <point3 pos> node:<node=unsupplied>

The barycentric coordinates of the specified point in the plane of the specified face, relative to the face. If <mesh> is a node, or if <mesh> is an Editable Mesh or a Mesh value and node: is specified, the position is in the current coordinate system context. If <mesh> is an Editable Mesh or a Mesh value and node: is not specified, the position is in the mesh's local coordinate system.

meshop.getElementsUsingFace <Mesh mesh> <facelist> fence:<facelist=unsupplied>

Returns a bitarray of size=(#faces in mesh) with bits set for all faces in elements where at least one face in the element is specified in <facelist>. If fence: is specified, its faces are considered as barriers to the element and are not processed.

meshop.getFaceCenter <Mesh mesh> <int faceIndex> node:<node=unsupplied>

Returns the face center of the specified face. If <mesh> is a node, or if <mesh> is an Editable Mesh or a Mesh value and node: is specified, the position is in the current coordinate system context. If <mesh> is an Editable Mesh or a Mesh value and node: is not specified, the position is in the mesh's local coordinate system.

meshop.getFaceRNormals <Mesh mesh> <int faceIndex> node:<node=unsupplied>

Returns a three element array of the render normals for the face's three vertices. If <mesh> is a node, or if <mesh> is an Editable Mesh or a Mesh value and node: is specified, the position is in the current coordinate system context. If <mesh> is an Editable Mesh or a Mesh value and node: is not specified, the position is in the mesh's local coordinate system.

meshop.getFacesUsingVert <Mesh mesh> <vertlist>

Returns a bitarray of size=(#faces in mesh) with bits set for all faces that use the specified vertices.

EXAMPLE

obj = Sphere() --create a Sphere

convertToMesh obj --collapse to EditableMesh

--Get the faces used by the first vertex (north pole)

verts = meshop.getFacesUsingVert obj #{1}

--Add the faces used by the last vertex (south pole)

verts += meshop.getFacesUsingVert obj #{obj.numverts}

--Select the faces used by both pole vertices

setFaceSelection obj verts

update obj --update the mesh

max modify mode --switch to modify mode

select obj --select the mesh

subObjectLevel = 3 --switch to face sub-object level

SCRIPT

macroScript Vert2FaceSel category:"MXS Help"

(

--make sure a single EMesh object is selected

on isEnabled return

selection.count == 1 and classof selection[1] == Editable_Mesh

on execute do

(

obj = selection[1] --get selected object

vertSel = getVertSelection obj --get selected Vertices

--get Faces of selected Verts:

faceSel = meshop.getFacesUsingVert obj vertSel

setFaceSelection obj vertsSel --select the Faces

update obj --update the mesh

max modify mode --switch to Modify panel

subObjectLevel =3 --set Face SO level

)

)--end macro

meshop.getHiddenFaces <Mesh mesh>

Returns a bitarray of size=(#faces in mesh) with bits set for all faces that are hidden.

meshop.getNumFaces <Mesh mesh>

Returns the number of faces in the mesh.

meshop.getVertsUsedOnlyByFaces <Mesh mesh> <facelist>

Returns a bitarray of size=(#vertices in mesh) with bits set for all vertices used by the specified faces.

meshop.makeFacesPlanar <Mesh mesh> <facelist>

Moves the specified faces so that they are planar.

EXAMPLE

obj = sphere()

convertToMesh obj

--make the faces of the top half of the sphere planar:

meshop.makeFacesPlanar obj #{1..obj.numfaces/2.0}

update obj

meshop.removeDegenerateFaces <Mesh mesh>

Deletes any degenerate faces in the mesh. A degenerate face has two or more equal vertex indices.

meshop.removeIllegalFaces <Mesh mesh>

Deletes any illegal faces in the mesh. An illegal face has one or more vertex indices that are out of range.

meshop.setHiddenFaces <Mesh mesh> <facelist>

Sets the specified faces as hidden, and non-specified faces as visible.

meshop.setNumFaces <Mesh mesh> <int>

Sets the number of faces in the mesh.

meshop.getVertsUsingFace <Mesh mesh> <facelist>

Returns a bitarray of size=(#vertices in mesh) with bits set for all vertices that are used by the specified faces.

SCRIPT

macroScript Face2VertSel category:"MXS Help"

(

--make sure a single EMesh object is selected

on isEnabled return

selection.count == 1 and classof selection[1] == Editable_Mesh

on execute do

(

obj = selection[1] --get selected object

faceSel = getFaceSelection obj --get selected Faces

--get Verts of selected Faces:

vertsSel = meshop.getVertsUsedFace obj faceSel

setVertSelection obj vertsSel --select the Verts

update obj --update the mesh

max modify mode --switch to Modify panel

subObjectLevel =1 --set Vertex SO level

)

)--end macro

meshop.getEdgesUsingFace <Mesh mesh> <facelist>

Returns a bitarray of size=(#edges in mesh) with bits set for all edges that are used by the specified faces.

SCRIPT

macroScript Face2EdgeSel category:"MXS Help"

(

--make sure a single EMesh object is selected

on isEnabled return

selection.count == 1 and classof selection[1] == Editable_Mesh

on execute do

(

obj = selection[1] --get selected object

faceSel = getFaceSelection obj --get selected Faces

--get Edges of selected Faces:

edgeSel = meshop.getEdgesUsingFace obj faceSel

setEdgeSelection obj edgeSel --select the edges

update obj --update the mesh

max modify mode --switch to Modify panel

subObjectLevel =2 --set Edge SO level

)

)--end macro

meshop.getPolysUsingFace <Mesh mesh> <facelist> \ ignoreVisEdges:<boolean=false> \

threshhold:<float=45.>

Returns a bitarray of size=(#faces in mesh) with bits set for all faces that are in 'polygons' containing the specified faces. The definition of a polygon is all faces sharing invisible edges with edge angles below the threshhold angle. The default threshhold angle is 45 degrees. If ignoreVisEdges: is set to true, the edge visibility is ignored but the threshhold is still relevant.

meshop.autoSmooth <Mesh mesh> <facelist> <float threshold>

Smooths the specified faces based on the threshold angle.

FOR EXAMPLE

obj = geosphere() --create a GeoSphere

convertToMesh obj --collapse to EditableMesh

--Smooth half of the faces:

meshop.autoSmooth obj #{obj.numfaces/2..obj.numfaces} 0.0

update obj --update the mesh

meshop.unifyNormals <Mesh mesh> <facelist>

Unifies the normals of the specified faces.

meshop.flipNormals <Mesh mesh> <facelist>

Flips the normal of the specified faces.

FOR EXAMPLE

obj = sphere() --create a Sphere

convertToMesh obj --collapse to EditableMesh

--Flip the normals of the top half of the faces:

meshop.flipNormals obj #{1..obj.numfaces/2}

update obj --update the mesh

<float>meshop.getFaceArea <Mesh mesh> <facelist>

Returns the area of the specified faces as a float.

FOR EXAMPLE

--Select all faces with area smaller than 20.0

obj = sphere radius:20 --create a Sphere

convertToMesh obj --collapse to EditableMesh

faceSel = #() --init. an array

--Loop through all faces in the mesh,

--compare the face area to the threshold and

--append the face to the array to be selected

for f = 1 to obj.numfaces do

if meshop.getFaceArea obj #{f} < 20.0 then

append faceSel f

setFaceSelection obj faceSel --select all collected faces

update obj --update the mesh

max modify mode --switch to modify mode

select obj --select the mesh

subObjectLevel = 3 --switch to face sub-object level

See also:

Face Methods

Mesh Methods (meshop struct)

For more mesh-related methods, see

Editable Mesh - Topics Index

Editable_Mesh : GeometryClass and TriMesh : Value


Mesh Methods

The following methods provide advanced access to the Mesh, affecting multiple faces at a time.

Methods:

meshop.createPolygon <Mesh mesh> <vertIndex array> smGroup:<int=0> matID:<int=1>

Creates a set of faces using the specified vertices. The order of the vertices in the faces is the order in the vertex array. The polygon may be nonconvex, but should be (roughly) coplanar.

smGroup: and matID: specify the smoothing group data and material ID number assigned to the new faces.

NOTE:

It is possible to build a mesh polygon by polygon using multiple meshop.createPolygon calls. In such case, an undo record containing a copy of the complete mesh would be created internally for every single polygon created which in turn can lead to problems. To avoid this, it is advisable to enclose the polygon creating code in an undo off context. If the undo of the object creation itself is necessary, the undo can be enabled in an additional context.

FOR EXAMPLE

vertArray = #();

vertArray.count=5800

for i = 1 to 5800 do

vertArray[i]=random [-100,-100,-100] [100,100,100]

faceArray=#()

faceArray.count=11300

for i = 1 to 11300 do

faceArray[i]=random [1,1,1] [5800,5800,5800]

undo on -- Turn ON Undo for mesh object creation

(

mm = mesh numverts:5800 numfaces:11300

undo off -- Turn OFF Undo for polygon creation

(

for i = 1 to 5800 do

meshop.setvert mm i vertArray[i]

for i = 1 to 11299 do

meshop.createPolygon mm #(faceArray[i].x,faceArray[i].y,faceArray[i].z)

) --End Undo OFF for polygon creation

meshop.createPolygon mm #(faceArray[11300].x,faceArray[11300].y,faceArray[11300].z)

update mm

) -- End Undo ON for mesh object creation

meshop.cut <Mesh mesh> <int edge1Index> <float edge1f> <int edge2Index> <float edge2f> <point3 normal> fixNeighbors:<boolean=true> split:<boolean=true> node:<node=unsupplied>

Cuts the mesh from a point on one edge to a point on another, along a line drawn by looking at the mesh from a particular viewpoint.

<edge1Index> specifies the edge that the cut starts on.

<edge1f> specifies the fractional distance along the edge to start the cut from.

<edge2Index> specifies the edge that the cut ends on.

<edge2f> specifies the fractional distance along the edge to finish the cut on.

<normal> specifies the direction of view. The cut will take place on this "side" of the mesh, in the plane formed by this vector and the direction from the start to the end.

If fixNeighbors: is true, the faces on the other side of each end of the cut should be split to prevent splits at the ends. If split: is true, the cut will split the mesh apart. If false, the cut will just refine the mesh by adding geometry. If <mesh> is a node, or if <mesh> is an Editable Mesh or a Mesh value and node: is specified, the normal is in the current coordinate system context. If <mesh> is an Editable Mesh or a Mesh value and node: is not specified, the normal is in the mesh's local coordinate system.

meshop.getPolysUsingVert <Mesh mesh> <vertlist> ignoreVisEdges:<boolean=false> threshhold:<float=45.>

Returns a bitarray of size=(#faces in mesh) with bits set for all faces that are in 'polygons' containing the specified vertices. The definition of a polygon is all faces sharing invisible edges with edge angles below the threshhold angle. The default threshhold angle is 45 degrees. If ignoreVisEdges is set to true, the edge visibility is ignored but the threshhold is still relevant.

meshop.optimize <Mesh mesh> <float normalThreshold> <float edgeThreshold> <float bias> <float maxEdge> saveMatBoundries:<boolean=true> saveSmoothBoundries:<boolean=true> autoEdge:<boolean=true>

Reduces the mesh in complexity by reducing the number of faces based on a surface normal threshold. Adjacent faces whose difference in surface normal angle falls below <normalThreshold> will be collapsed into a single triangle. If autoEdge: is true, when the angle between adjacent surface normals is less than <edgeThreshold> the edge will be invisible. When optimizing mesh objects, as the optimization increases, you can get lots of long skinny 'degenerate' triangles (that cause rendering artifacts). Increasing <bias> keeps triangles from becoming degenerate. The range of values is from 0 to 1 (where 0 turns bias off). Values close to 1 reduce the amount of optimization in favor of maintaining equilateral triangles. A <maxEdge> value > 0 will prevent the optimize function from creating edges longer than this value. If this parameter is <=0 no limit is placed on the length of the edges. If saveMatBoundries: is true, faces won't be collapsed across a material boundary. If saveSmoothBoundries: is true, faces won't be collapsed across a dissimilar smoothing group boundary.

meshop.slice <Mesh mesh> <facelist> <point3 normal> <float offset> separate:<boolean=false> delete:<boolean=false> node:<node=unsupplied>

Slices the mesh along the specified slicing plane. The slicing plane is defined as all points which, when DotProd'd with <normal>, return <offset>. <normal> should be normalized.

separate: specifies whether the slice should separate the mesh into two separate elements (true) or just refine the existing mesh by splitting faces (false).

delete: specifies whether the slice should remove the portion of the mesh "below" the slicing plane, where "below" is defined as the area where DotProd (p,<normal>) - <offset> < 0. If delete: is true, separate: is ignored. If <mesh> is a node, or if <mesh> is an Editable Mesh or a Mesh value and <node> is specified, the normal is in the current coordinate system context. If <mesh> is an Editable Mesh or a Mesh value and node: is not specified, the normal is in the mesh's local coordinate system.

copy <trimesh>

Yields a copy of the source TriMesh.

delete <trimesh>

Clears out the TriMesh's geometry and topology, effectively freeing its memory.

NOTE:

The following method is not applicable to TriMeshes:

animateVertex <mesh> <vertex_spec>

Applies controllers to the specified vertices of the Editable_Mesh, where <vertex_spec> is one of:

<integer_index>

<integer_index_array>

#all

By assigning controllers to the vertices, the vertices are added to the Master subAnim and appear as animatables in the Track View, allowing further scripting of the vertices.

FOR EXAMPLE,

animateVertex $Sphere01 #all

The vertices to be animated are specified by index number or with the keyword #all to animate all vertices.

See also Class and Object Inspector Functions and Scripting Vertex and Control Point Animation for details on accessing the Editable_Mesh vertices. The controller values assigned to the vertices is in object space. See Using Node Transform Properties for information on converting between world space to object space.

The setMesh() method enables bulk changes to a mesh via arrays of vertices, faces, tverts, etc. setMesh() has the following forms:

setMesh <mesh> [ numverts:<integer> ] \

[ numfaces:<integer> ]

Resets the mesh to the given geometry but with no topology (i.e., no faces or edges). Any current mesh data is lost. You have to individually place the vertices and create the faces from the vertices. The default number of vertices and faces are 36 and 50, respectively.

setMesh <mesh> [ vertices:<array_of_point3s> ] \

[ faces:<array_of_point3s> ] \

[ materialIDs:<array_of_integers> ] \

[ tverts:<array_of_point3s> ]

Resets the mesh based on the given arrays. Only those portions of the mesh that are specified are reset. For example, if only the vertices: parameter is specified, the existing face data is retained. Each Point3 value in the vertices array specifies the position of the vertex in the current coordinate system. Each Point3 value in the faces array specifies the 3 vertex indices that form the face. The materialIDs array specifies the material ID to be assigned to each face. Each Point3 value in the tverts array specifies the UVW coordinates of the texture vertices. See Texture Mapping in the methods section for more information on texture vertices.

setMesh <mesh> [ length:<integer> ] \

[ width:<integer> ] \

[ lengthsegs:<integer> ] \

[ widthhsegs:<integer> ]

Resets the mesh with a flat rectangular mesh with the given size and number of segments. The default length and width are 50, the default number of segments is 5.

setMesh <mesh> <trimesh>

Sets the mesh to a copy of the source TriMesh.

See also:

Face Methods

Meshop Face Methods

For more mesh-related methods, see

Editable Mesh - Topics Index

Editable_Mesh : GeometryClass and TriMesh : Value


Meshop General Mapping Methods

The following methods provide general access to the Mapping channels, the mapping vertices and faces.

Methods:

meshop.deleteIsoMapVertsAll <Mesh mesh>

For all mapping channels, deletes all mapping vertices that are not used by a mapping face.

meshop.freeMapChannel <Mesh mesh> <int mapChannel>

Deletes the map vertex and face arrays for the specified channel, and sets their count to 0.

meshop.getMapFacesUsingMapVert <Mesh mesh> <int mapChannel> <mapVertlist>

Returns a bitarray of size=(#map faces for channel in mesh) with bits set for all map faces that use the specified map vertices.

See splitMeshByUVElements script in the FAQ for example usage.

meshop.getMapVertsUsingMapFace <Mesh mesh> <int mapChannel> <mapFacelist>

Returns a bitarray of size=(#map vertices for channel in mesh) with bits set for all map vertices that use the specified map faces.

See splitMeshByUVElements script in the FAQ for example usage.

meshop.setFaceAlpha <Mesh mesh> <int mapChannel> <facelist> <float alpha>

For the specified map channel, sets the map vertex color to value between 0 (transparent) and 1 (opaque) for the map vertices used by the map faces associated with the specified faces.

meshop.setFaceColor <Mesh mesh> <int mapChannel> <facelist> <color color>

For the specified map channel, sets the map vertex color to <color> for the map vertices used by the map faces associated with the specified faces.

meshop.setVertAlpha <Mesh mesh> <int mapChannel> <vertlist> <float alpha>

For the specified map channel, sets the map vertex color to a value between 0 (transparent) and 1 (opaque) for the map vertices associated with the specified mesh vertices.

See Accessing the Viewport Vertex Alpha Values for some more details.

meshop.setVertColor <Mesh mesh> <int mapChannel> <vertlist> <color color>

For the specified map channel, sets the map vertex color to <color> for the specified map vertices.

meshop.setNumMaps <Mesh mesh> <int count> keep:<boolean=false>

Sets the number of map channels available. The number of map channels can be set from 2 to 100. Map channels 1 and 2 are the Vertex Color and default Texture Map channels. If keep: is false, the old mapping information is discarded. If true, the old mapping information is retained after the resize.

meshop.getNumMaps <Mesh mesh>

Returns the number of map channels available as an integer.

meshop.setMapSupport <Mesh mesh> <Integer mapChannel> <Boolean support>

Sets whether the specified mapping channel is supported or not. If support is true, and the channel support state is currently false, a new map face array of the same size as the number of faces in the mesh is allocated, but no map vertex array is allocated. If support is false, and the channel support state is currently true, existing map channel face and vertex arrays are deallocated. If support and the current channel support state are both the same, no action is performed. SetNumMaps() is automatically called if the specified map channel is not available.

mapChannel index values are 0-based, with Map channels 0 and 1 being the Vertex Color and default Texture Map channels.

meshop.getMapSupport <Mesh mesh> <Integer mapChannel>

Returns whether the specified map channel is supported. This signifies that a map face array is present, but not necessarily a map vertex array.

meshop.setNumMapVerts <Mesh mesh> <Integer mapChannel> <Integer count> keep:<boolean=FALSE>

Sets the number of vertices for the map channel, initializing the map vertex array. If keep: is false or not specified, the old map vertex information is discarded. If true, the old map vertex information is retained after the resize.

meshop.getNumMapVerts <Mesh mesh> <Integer mapChannel>

Returns the number of vertices for the map channel as an <integer>.

meshop.setNumMapFaces <Mesh mesh> <Integer mapChannel> <Integer count> keep:<boolean=false> keepCount:<int=0>

Sets the number of faces for the map channel. If keep: is false or not specified, the old map face information is discarded. If true, the old map face information from the number of faces specified by keepCount: is retained after the resize. Dangerous to use with map channels 0 and 1, so miminum mapChannel value is 2.

meshop.getNumMapFaces <Mesh mesh> <Integer mapChannel>

Returns the number of faces for the map channel as an <integer>.

meshop.setMapVert <Mesh mesh> <Integer mapChannel> <Integer index> <Point3 xyz>

Sets the coordinates of the specified map vertex.

See Accessing the Viewport Vertex Alpha Values for some more details.

meshop.getMapVert <Mesh mesh> <Integer mapChannel> <Integer index>

Returns the coordinates of the specified map vertex as a <point3>.

See Accessing the Viewport Vertex Alpha Values for some more details.

meshop.setMapFace <Mesh mesh> <Integer mapChannel> <Integer index> <Point3 face>

Sets the map vertices for the specified map face.

meshop.getMapFace <Mesh mesh> <Integer mapChannel> <Integer index>

Returns the vertices of the specified map face as a <point3>.

meshop.makeMapPlanar <Mesh mesh> <Integer mapChannel>

Applies a simple planar mapping to the specified channel. This is done by copying the mesh topology and vertex locations into the map, resizing the face and vertex arrays if necessary.

meshop.getIsoMapVerts <Mesh mesh> <Integer mapChannel>

Returns a <bitarray> with a bit set for each isolated map vertex (unrefereced by any map face) for the specified channel.

meshop.deleteMapVertSet <Mesh mesh> <Integer mapChannel> {<BitArray set> | <Integer index> | <integer array>}

Deletes the specified map vertices. Returns a <bitarray> with a bit set for each map face that used one of the deleted map vertices. Normally, you should delete or modify the map faces using the map vertices before deleting the map vertices, as after the vertex deletion you can't tell which vertex on a face was a vertex that was deleted.

meshop.freeMapVerts <Mesh mesh> <Integer mapChannel>

Deallocates the map vertex array and sets the number of map vertices to 0.

meshop.freeMapFaces <Mesh mesh> <Integer mapChannel>

Deallocates the map face array and sets the number of map faces to 0.

meshop.applyUVWMap <TriMesh mesh>

{#planar | #cylindrical | #spherical | #ball | #box> | #face} \

utile:<float=1.0> vtile:<float=1.0> wtile:<float=1.0>

uflip:<boolean=false> vflip:<boolean=false> wflip:<boolean=false>

cap:<boolean=true> tm:<Matrix3=identity matrix> channel:<int=1>

Applies the specified mapping type to the mapping channel.

utile/vtile/wtile - Number of tiles in the U/V/W directions.

uflip/vflip/wflip - U/V/W are mirrored if true.

cap - used with #cylindrical. If true, then any face normal that is pointing more vertically than horizontally will be mapped using planar coordinates.

tm - defines the mapping space. As each point is mapped, it is multiplied by this matrix, and then it is mapped.

channel - the mapping channel the mapping is applied to, defaults to channel 1.

meshop.buildMapFaces <Mesh mesh> <Integer mapChannel> <Boolean keep>

Sets the number of map faces to the number of mesh faces, retaining existing mapping data if keep is true. Deletes any map vertices that are not used by the map faces.

meshop.defaultMapFaces <Mesh mesh> <Integer mapChannel>

Sets the number of map faces to the number of mesh faces, and the number of map vertices to the number of mesh vertices. The map face vertices are set to the same vertex index as the corresponding mesh face vertices (i.e., there will be a 1-to-1 correspondence between map faces/vertices and the mesh faces/vertices). The map vertex UVW coordinates are set to the normalized (0 to 1) position of the corresponding mesh vertex in the mesh's bounding box.

Mapping methods - Color per vertex channel (Channel 0)

meshop.getNumCPVVerts <Mesh mesh>

Returns the number of Color Per Vertex mapping channel vertices.

meshop.setNumCPVVerts <Mesh mesh> <int>

Sets the number of Color Per Vertex mapping channel vertices.

Mapping methods - Default texture mapping channel (Channel 1)

meshop.getNumTVerts <Mesh mesh>

Returns the number of Default Texture mapping channel vertices.

meshop.setNumTVerts <Mesh mesh> <int>

Sets the number of Default Texture mapping channel vertices.

See also:

Mesh Texture Vertex Methods

Mesh Color-Per-Vertex Methods

Understanding Texture Coordinates and Vertex Colors

For more mesh-related methods, see

Editable Mesh - Topics Index

Editable_Mesh : GeometryClass and TriMesh : Value


Mesh Texture Vertex Methods

The following methods provide basic access to the legacy UVW channel.

HISTORY NOTE:

In 3ds Max 2, there were only two mapping channels, with channel 1 being the original texture channel of 3ds Max 1. For generalized access to all map channels, you should consider using the methods described in Meshop General Mapping Methods

Methods:

getNumTVerts <mesh>

Returns number of texture vertices as an integer, equivalent to using <mesh>.numtverts

setNumTVerts <mesh> <number> [ <boolean> ]

Sets the number of texture vertices as specified. If the optional boolean argument is true, the existing topology remains intact. If it is false or not supplied, the topology is lost.

When setting the number of texture vertices using the numTVerts property or setNumTVerts method, the new verts are initialized to [0.,0.,0.]

getTVert <mesh> <tvert_index_integer>

Returns the UVW coordinates of the indexed texture vertex

setTVert <mesh> <tvert_index_integer> ( <point3> | <x> <y> <z> )

Sets the UVW coordinates of the indexed texture vertex as a point3 value, or 3 floats - U,V,W

getTVFace <mesh> <face_index_integer>

setTVFace <mesh> <face_index_integer> <vert_indices_point3>

setTVFace <mesh> <face_index_integer> <tvert_index_integer> \

<tvert_index_integer> <tvert_index_integer>

The getTVFace() and setTVFace() functions mirror the getFace() and setFace() functions and are used to specify texture mapping topology in terms of texture vertices. You can set up and access texture vertices with the getTVert(), setTVert(), getNumTVerts(), and setNumTVerts() functions described above.

buildTVFaces <mesh> [ <boolean> ]

The buildTVFaces() function only needs to be called on meshes you are adding texture vertices to yourself to create the internal texture face array. Meshes that 3ds Max applies mapping coordinates to maintain the TVFace array automatically. This is not done automatically when you add texture vertices to meshes yourself so you need to call buildTVFaces() explicitly whenever you change the texture vertex count, and before you construct the texture faces. If the optional boolean argument is true, the existing texture mapping remains intact. If it is false or not supplied, the existing texture mapping is lost (all texture faces are rebuilt, with all three vertices of the texture face using texture vertex 1).

numMapsUsed <mesh>

Returns the an upper limit on the number of texture map channels used by the given node. This is at least 1+(highest channel in use). This method is used so a script that does something to all map channels doesn't always have to do it to every channel up to 99 (the highest possible texture map channel), but rather only to this value. This method is not applicable to TriMeshes.

NOTES:

The mesh class contains a list of texture vertices which are completely independent of the regular vertices in the mesh. There is no correlation between the number of vertices in a mesh and the number of texture vertices. In addition to the texture vertices there are also texture faces. There needs to be one texture face for every regular face in the mesh.

Each texture face has three indices into the texture vertex array. The coordinates of a texture vertex are UVW coordinates, and are accessed as Point3 values. The 3 components are U, V, and W, and each component value is in the range of 0 to 1. An example script for creating planar texture mapping on an object is shown in Working with Editable Meshes .

A detailed explanation of the way texture and color-per-vertex data is used can be found in the topic Understanding Texture Coordinates and Vertex Colors

The texture vertex methods do not support multiple mapping channels. Use the respective General Meshop Mapping Methods instead.

See also:

Meshop General Mapping Methods

Mesh Color-Per-Vertex Methods

Understanding Texture Coordinates and Vertex Colors

For more mesh-related methods, see

Editable Mesh - Topics Index

Editable_Mesh : GeometryClass and TriMesh : Value


Mesh Color-Per-Vertex Methods

The following methods provide basic access to the Color Per Vertex channel.

HISTORY NOTE:

In 3ds Max 2, there were only two mapping channels, with channel 0 being used to store either color information or a second texture coordinates channel.

For generalized access to all map channels, you should consider using the methods described in Meshop General Mapping Methods

For legacy methods providing access only to the Texture Channel 1, see also

Mesh Texture Vertex Methods

Methods:

getNumCPVVerts <mesh>

Returns number of color-per-vertex vertices as an integer, equivalent to using <node>.numcpvverts

setNumCPVVerts <mesh> <integer> [ <boolean> ]

Sets the number of c-p-v vertices. If the optional boolean argument is true, the existing topology remains intact. If it is false or not supplied, the topology is lost.

When setting the number of CPV vertices using the numCPTVerts property or setNumCPVVerts method, the new verts are initialized to [0.,0.,0.]

buildVCFaces <mesh> [ <boolean> ]

Builds the c-p-v face array after you have set the c-p-v vertex count. If the optional boolean argument is true, the existing topology remains intact. If it is false or not supplied, the topology is lost.

defaultVCFaces <mesh>

Sets the number of c-p-v vertices and c-p-v faces to match exactly the current mesh's geometry and topology and calls buildVCFaces()

getVertColor <mesh> <CPVvert_index_integer>

Returns the color of the indexed c-p-v vertex as a color

setVertColor <mesh> <CPVvert_index_integer> <color>

Sets the color of the indexed c-p-v vertex

getVCFace <mesh> <CPVface_index_integer>

Returns the topology for the indexed c-p-v face as a point3 containing 3 c-p-v vertex indexes

setVCFace <mesh> <CPVface_index_integer> <CPVvert_indices_point3>

Sets the indexed c-p-v face topology from a point3 containing 3 c-p-v vertex indexes

setVCFace <mesh> <CPVface_index_integer> <CPVvert_index_integer> \

<CPVvert_index_integer> <CPVvert_index_integer>

Sets the indexed c-p-v face topology from 3 c-p-v vertex index number arguments

The c-p-v vertex and face indexes are 1-based as with other mesh indexes in MAXScript. Remember that you need to call update() on the mesh after making changes to it for the changes to be reflected in the scene.

NOTE:

The mesh class contains a list of color vertices which are completely independent of the regular vertices in the mesh. There is no correlation between the number of vertices in a mesh and the number of color vertices. In addition to the color vertices there are also color faces. There needs to be one color face for every regular face in the mesh. For details, see Understanding Texture Coordinates and Vertex Colors topic.

Each color face has three indices into the color vertex array. The coordinates of a color vertex are RGB coordinates, and are accessed as Color values.

The techniques for building and accessing color vertices and faces is virtually identical to the techniques for building and accessing texture vertices and faces. An example script for creating planar texture mapping on an object is shown in Working with Editable Meshes .

See also:

Meshop General Mapping Methods

Mesh Texture Vertex Methods

Understanding Texture Coordinates and Vertex Colors

For more mesh-related methods, see

Editable Mesh - Topics Index

Editable_Mesh : GeometryClass and TriMesh : Value


Mesh Subdivision Displacement Methods

The following methods set the Subdivision Displacement Surface Properties for a mesh object. These methods are not applicable to TriMeshes.

Methods:

setSplitMesh <mesh> <boolean>

Turns on or off split mesh subdivision displacement for the mesh. Calling this function will enable subdivisionDisplacement if it is set to false.

getSplitMesh <mesh>

Returns true if split mesh subdivision displacement is turned on for the mesh, false otherwise.

setSubdivisionDisplacement <mesh> <boolean>

Turns on or off subdivision displacement for the mesh.

getSubdivisionDisplacement <mesh>

Returns true if subdivision displacement is turned on for the mesh, false if off.

displacementToPreset <mesh> ( #low | #medium | #high )

Sets the mesh subdivision parameters to the specified preset value set.

setDisplacementMapping <mesh> <boolean>

Turns on or off whether to perform displacement mapping for the mesh. There is no corresponding user interface element for this method.

getDisplacementMapping <mesh>

Returns true if displacement mapping is turned on for the mesh, false if off.

See also:

Editable Mesh - Topics Index

Editable_Mesh : GeometryClass and TriMesh : Value


Meshop Editable_Mesh UI property methods

PLEASE NOTE:

All methods above are applicable on editable mesh only!

Methods:

meshop.getAffectBackfacing <Mesh mesh>

Returns the state of the Affect Backfacing checkbox in the Soft Selection rollout.

meshop.setAffectBackfacing <Mesh mesh> <boolean>

Sets the state of the Affect Backfacing checkbox in the Soft Selection rollout.

meshop.getBubble <Mesh mesh>

Returns the Bubble value in the Soft Selection rollout.

meshop.setBubble <Mesh mesh> <float>

Sets the Bubble value in the Soft Selection rollout.

meshop.getDisplacementMapping <Mesh mesh>

meshop.setDisplacementMapping <Mesh mesh> <boolean>

meshop.getExtrusionType <Mesh mesh>

Returns the Extrusion type:

1 - Group

2 - Local

meshop.setExtrusionType <Mesh mesh> <int>

Sets the Extrusion type:

1 - Group

2 - Local

meshop.getFalloff <Mesh mesh>

Returns the Falloff value in the Soft Selection rollout.

meshop.setFalloff <Mesh mesh> <float>

Sets the Falloff value in the Soft Selection rollout.

meshop.getIgnoreBackfacing <Mesh mesh>

Returns the state of the Ignore Backfacing checkbox in the Selection rollout.

meshop.setIgnoreBackfacing <Mesh mesh> <boolean>

Sets the state of the Ignore Backfacing checkbox in the Selection rollout.

meshop.getIgnoreVisEdges <Mesh mesh>

Returns the state of the Ignore Visible Edges checkbox in the Selection rollout.

meshop.setIgnoreVisEdges <Mesh mesh> <boolean>

Sets the state of the Ignore Visible Edges checkbox in the Selection rollout.

meshop.getNormalSize <Mesh mesh>

Returns the Scale value used for Normal display in the Selection rollout.

meshop.setNormalSize <Mesh mesh> <float>

Sets the Scale value used for Normal display in the Selection rollout.

meshop.getPinch <Mesh mesh>

Returns the Pinch value in the Soft Selection rollout.

meshop.setPinch <Mesh mesh> <float>

Sets the Pinch value in the Soft Selection rollout.

meshop.getPlanarThreshold <Mesh mesh>

Returns the Planar Thresh. value in the Selection rollout.

meshop.setPlanarThreshold <Mesh mesh> <float>

Sets the Planar Thresh. value in the Selection rollout.

meshop.getSelByVertex <Mesh mesh>

Returns the state of the By Vertex checkbox in the Selection rollout.

meshop.setSelByVertex <Mesh mesh> <boolean>

Sets the state of the By Vertex checkbox in the Selection rollout.

meshop.getShowFNormals <Mesh mesh>

Returns the state of the Show Normals checkbox in the Selection rollout when in Face, Polygon or Element Sub-Object Mode.

meshop.setShowFNormals <Mesh mesh> <boolean>

Sets the state of the Show Normals checkbox in the Selection rollout when in Face, Polygon or Element Sub-Object Mode.

meshop.getShowVNormals <Mesh mesh>

Returns the state of the Show Normals checkbox in the Selection rollout when in Vertex Sub-Object Mode.

meshop.setShowVNormals <Mesh mesh> <boolean>

Returns the state of the Show Normals checkbox in the Selection rollout when in Vertex Sub-Object Mode.

meshop.getSoftSel <Mesh mesh>

Returns the state of the Use Soft Selection checkbox in the Soft Selection rollout.

meshop.setSoftSel <Mesh mesh> <boolean>

Sets the state of the Use Soft Selection checkbox in the Soft Selection rollout.

meshop.getSplitMesh <Mesh mesh>

Returns the state of the Split Mesh checkbox in the Surface Properties rollout when in Object mode.

meshop.setSplitMesh <Mesh mesh> <boolean>

Sets the state of the Split Mesh checkbox in the Surface Properties rollout when in Object mode.

meshop.getSSEdgeDist <Mesh mesh>

Returns the Soft Selection Edge Distance value.

meshop.setSSEdgeDist <Mesh mesh> <int>

Sets the Soft Selection Edge Distance value.

meshop.getSSUseEdgeDist <Mesh mesh>

Returns the state of the Soft Selection Edge Distance checkbox.

meshop.setSSUseEdgeDist <Mesh mesh> <boolean>

Sets the state of the Soft Selection Edge Distance checkbox.

meshop.getSubdivisionAngle <Mesh mesh>

Returns the Subdivision Angle value.

meshop.setSubdivisionAngle <Mesh mesh> <float>

Sets the Subdivision Angle value.

meshop.getSubdivisionDisplacement <Mesh mesh>

Returns the state of the Subdivision Displacement checkbox.

meshop.setSubdivisionDisplacement <Mesh mesh> <boolean>

Sets the state of the Subdivision Displacement checkbox.

meshop.getSubdivisionDistance <Mesh mesh>

Returns the Subdivision Distance value.

meshop.setSubdivisionDistance <Mesh mesh> <float>

Sets the Subdivision Distance value.

meshop.getSubdivisionEdge <Mesh mesh>

Returns the Subdivision Edge value.

meshop.setSubdivisionEdge <Mesh mesh> <float>

Set the Subdivision Edge value.

meshop.getSubdivisionMaxLevels <Mesh mesh>

Returns the Maximum Subdivision Levels value found under Advanced Properties... dialog of the Subdivision Properties rollout.

meshop.setSubdivisionMaxLevels <Mesh mesh> <int>

Sets the Maximum Subdivision Levels value found under Advanced Properties... dialog of the Subdivision Properties rollout.

meshop.getSubdivisionMaxTriangles <Mesh mesh>

Returns the Maximum Number of Triangles value found under Advanced Properties... dialog of the Subdivision Properties rollout.

meshop.setSubdivisionMaxTriangles <Mesh mesh> <int>

Sets the Maximum Number of Triangles value found under Advanced Properties... dialog of the Subdivision Properties rollout.

meshop.getSubdivisionMethod <Mesh mesh>

Returns the Subdivision Method. It can be one of the following: #regular, #spatial, #curvature, #spatialAndCurvature

meshop.setSubdivisionMethod <Mesh mesh> {#regular | #spatial | #curvature | #spatialAndCurvature}

Sets the Subdivision Method.

meshop.getSubdivisionMinLevels <Mesh mesh>

Returns the Minimum Subdivision Levels value found under Advanced Properties... dialog of the Subdivision Properties rollout.

meshop.setSubdivisionMinLevels <Mesh mesh> <int>

Sets the Minimum Subdivision Levels value found under Advanced Properties... dialog of the Subdivision Properties rollout.

meshop.getSubdivisionSteps <Mesh mesh>

Returns the Subdivision Steps value.

meshop.setSubdivisionSteps <Mesh mesh> <int>

Sets the Subdivision Steps value.

meshop.getSubdivisionStyle <Mesh mesh>

Returns the Subdivision Style. It can be one of the following: #tree, #grid, #delaunay

meshop.setSubdivisionStyle <Mesh mesh> {#tree | #grid | #delaunay}

Sets the Subdivision Style.

meshop.getSubdivisionView <Mesh mesh>

Returns the state of the View-Dependent checkbox in the Surface Properties.

meshop.setSubdivisionView <Mesh mesh> <boolean>

Set the state of the View-Dependent checkbox in the Surface Properties.

meshop.getWeldPixels <Mesh mesh>

Returns the Target Weld pixels value.

meshop.setWeldPixels <Mesh mesh> <int>

Sets the Target Weld pixels value.

meshop.getWeldThreshold <Mesh mesh>

Returns the Weld Selected Threshold value.

meshop.setWeldThreshold <Mesh mesh> <float>

Sets the Weld Selected Threshold value.

PLEASE NOTE:

All methods above are applicable on editable mesh only!

See also:

Editable_Mesh : GeometryClass and TriMesh : Value


Editable_Mesh Modify Panel Command Modes and Operations

A suite of methods provide the ability for a script to invoke Editable Mesh and Edit Mesh Modify panel modes and operations, corresponding to buttons available at various mesh sub-object levels. These methods reside in the meshOps global structure. These methods effectively "push the button" in the 3ds Max Modify panel. In order to use these methods, the node must be selected and the Modify panel open. In the description of these methods, the first argument <editable_mesh_node_or_modifier> should be interpreted as either an Editable Mesh node where the modifier stack level is at the base object, or an Edit Mesh modifier where the modifier stack level is at the Edit Mesh. In all cases, the following methods work at the current sub-object level, but only if that level is appropriate for the invoked operation.

PLEASE NOTE:

This page describes the meshOps structure related to controlling the Modify Panel command modes and operations.

For methods directly manipulating vertex , edge and face data, please see the meshOp structure and the Editable_Mesh : GeometryClass and TriMesh : Value topic!

If you have made scripted changes to the mesh you must call the update() method on the mesh before calling these methods. You do not need to call update() after just calling one of these methods, as 3ds Max will take care of updating the mesh.

The following methods invoke one of the 'user-interaction' button operations in the Editable Mesh Modify panel, acting on the currently selected sub-objects. These methods highlight the corresponding button in the Edit Geometry rollout and start the operation, at which point the user interactively completes the operation. These methods return after starting the operation, and before the user completes the operation, so care should be taken to ensure that your script does not interfere with the operation. Invoking any of these methods is the same as clicking on the associated button in the Modify panel. Calling a method when the operation is already in effect (either due to a user action or a MAXScript command) causes the operation to be terminated and the highlight is removed from the button.

meshOps.startAttach <editable_mesh_node_or_modifier>

Enters "Attach" command mode - valid in Vertex, Face, Polygon, and Element Sub-Object levels, and when not in Sub-Object mode.

meshOps.startBevel <editable_mesh_node_or_modifier>

Enters "Bevel" command mode - valid in Edge, Face, Polygon, and Element Sub-Object levels.

meshOps.startChamfer <editable_mesh_node_or_modifier>

Enters "Chamfer" command mode - valid in Vertex and Edge Sub-Object levels.

meshOps.startCreate <editable_mesh_node_or_modifier>

Enters "Create" command mode, valid in Vertex, Face, Polygon, and Element Sub-Object levels.

meshOps.startCut <editable_mesh_node_or_modifier>

Enters "Cut" command mode - valid in Edge, Face, Polygon, and Element Sub-Object levels.

meshOps.startDivide <editable_mesh_node_or_modifier>

Divides selected edges into 2 edges, for selected face into 3 faces - valid in Edge, Face, Polygon, and Element Sub-Object levels.

meshOps.startExtrude <editable_mesh_node_or_modifier>

Enters "Extrude" command mode - valid in Face, Polygon, and Element Sub-Object levels.

meshOps.startFlipNormalMode <editable_mesh_node_or_modifier>

Enters "Flip Normal" command mode - valid in Face, Polygon, and Element Sub-Object levels.

meshOps.startSlicePlane <editable_mesh_node_or_modifier>

Enters "Slice Plane" command mode - valid in all Sub-Object levels, and when not in Sub-Object mode.

meshOps.startTurn <editable_mesh_node_or_modifier>

Enters "Turn" command mode - valid in Edge Sub-Object level.

meshOps.startWeldTarget <editable_mesh_node_or_modifier>

Enters "Weld Target" command mode - valid in Vertex Sub-Object level.

The following methods invoke one of the 'instantaneous' button operations in the Editable Mesh Modify panel, acting on the currently selected sub-objects:

meshOps.autoEdge <editable_mesh_node_or_modifier>

Automatically sets the edge visibility on the selected sub-objects - valid in Edge Sub-Object level.

meshOps.break <editable_mesh_node_or_modifier>

Creates a new vertex for each face attached to the selected sub-objects - valid in Vertex Sub-Object level.

meshOps.collapse <editable_mesh_node_or_modifier>

Collapses the selected sub-objects - valid in Vertex, Edge, Face, Polygon, and Element Sub-Object levels.

meshOps.createShapeFromEdges <editable_mesh_node_or_modifier>

Displays Create Shape dialog allowing the user to specify an object name, shape type, and whether to ignore hidden edges. Valid in Edge Sub-Object level.

meshOps.delete <editable_mesh_node_or_modifier>

Deletes the selected sub-objects - valid in Vertex, Face, Polygon, and Element Sub-Object levels.

meshOps.detach <editable_mesh_node_or_modifier>

Displays Detach dialog allowing the user to specify an object name or to detach as element, and whether to clone the selected subobjects. Valid in Vertex, Face, Polygon, and Element Sub-Object levels.

meshOps.explode <editable_mesh_node_or_modifier>

Displays Explode to Objects dialog allowing the user to specify an object name. Explodes the selected faces into multiple elements or objects based on the angles of its edges. Valid in Vertex, Face, Polygon, and Element Sub-Object levels.

meshOps.flipNormal <editable_mesh_node_or_modifier>

Flips the normal of the selected faces - valid in Face, Polygon, and Element Sub-Object levels.

meshOps.gridAlign <editable_mesh_node_or_modifier>

Aligns the selected sub-objects to the construction plane - valid in Vertex, Edge, Face, Polygon, and Element Sub-Object levels.

meshOps.hide <editable_mesh_node_or_modifier>

Hides the selected sub-objects - valid in Vertex, Face, Polygon, and Element Sub-Object levels.

meshOps.invisibleEdge <editable_mesh_node_or_modifier>

Sets selected edges invisible. Valid in Vertex Sub-Object level.

meshOps.makePlanar <editable_mesh_node_or_modifier>

Forces all selected sub-objects to become coplanar - valid in Vertex, Edge, Face, Polygon, and Element Sub-Object levels.

meshOps.removeIsolatedVerts <editable_mesh_node_or_modifier>

Deletes all isolated vertices in the object regardless of the current selection.

meshOps.selectOpenEdges <editable_mesh_node_or_modifier>

Selects all edges with only one face. Valid in Edge Sub-Object level.

meshOps.slice <editable_mesh_node_or_modifier>

Subdivides edges and faces based on Slice Plane. meshOps.startSlicePlane() must be called to enter the "Slice Plane" command mode before slice is valid. Valid in all Sub-Object levels, and when not in Sub-Object mode.

meshOps.tessellate <editable_mesh_node_or_modifier>

Tessellates the selected sub-objects - valid in Face, Polygon, and Element Sub-Object levels.

meshOps.unhideAll <editable_mesh_node_or_modifier>

Unhides the hidden sub-objects at the current Sub-Object level - valid in Vertex, Face, Polygon, and Element Sub-Object levels.

meshOps.unifyNormal <editable_mesh_node_or_modifier>

Unifies the normals of the selected faces - valid in Face, Polygon, and Element Sub-Object levels.

meshOps.viewAlign <editable_mesh_node_or_modifier>

Aligns all selected sub-objects to the 0,0,0 plane of the active viewport - valid in Vertex, Edge, Face, Polygon, and Element Sub-Object levels.

meshOps.visibleEdge <editable_mesh_node_or_modifier>

Sets selected edges visible. Valid in Edge Sub-Object level.

meshOps.weld <editable_mesh_node_or_modifier>

Welds the selected vertices - valid in Vertex Sub-Object level.

The meshOps methods depend on the Modify panel being open and the desired object, either an Editable Mesh base object or Edit Mesh modifier, being currently open in the panel. The meshOps methods do not perform any operation if these conditions aren't met. You will need to use MAXScript functions like max modify mode or setCommandPanelTaskMode mode:#modify to open the Modify panel, select <obj> to select the object, subObjectLevel = <n> to set the Sub-Object level, and modPanel.setCurrentObject <obj_or_modifier> to establish the right context for the new functions to operate. For example:

EXAMPLE

s=sphere() -- create a sphere

ConvertToMesh s -- convert to an Editable Mesh

s.selectedfaces=#{1..112} -- select half the faces

max modify mode -- open the Modify panel

select s -- select the sphere

modPanel.setCurrentObject s -- set modifier stack to the base object

-- (not really needed in this example)

subObjectLevel = 4 -- set Sub-Object level to polygon

meshOps.startExtrude s -- start the face extrude command mode,

-- highlighting its button in the Edit

-- Geometry rollout, at which point the

-- user interactively performs the extrude.

ANOTHER EXAMPLE IS

meshOps.Hide (modPanel.getCurrentObject())

which would invoke the Hide button operation on the current object open in the Modify panel if it was an Edit Mesh modifier or Editable Mesh base object.

See also

Working with Editable Meshes

Understanding Texture Coordinates and Vertex Colors


Working with Editable Meshes

Flipping Face Normals

The following function flips the face normal for all faces in the specified mesh object.

EXAMPLE

fn FlipObjNormal obj =

(

for f =1 to obj.numFaces do --for each face in the mesh

(

verts=getface obj f -- get its 3 vertices as a point3

local tmp=verts.x -- swap the first and third vertices

verts.x=verts.z -- which flips the normal

verts.z=tmp -- (right-hand rule), and

setface obj f verts -- store the new vertex order for the face

)

update obj -- update object so 3ds Max sees the changes

)

Texture Vertices and Faces

The following script is an example of working with texture vertices and faces.

SCRIPT

-- function to apply planar mapping to an object

-- direction parameter specifies the axis the mapping is

-- perpendicular to, and can have a value of #x, #y, or #z

--

fn ApplyPlanarMap obj direction =

( local oldcoordsys, normalize_pos

-- in this case, the number of texture vertices is equal to the

-- number of mesh vertices

obj.numtverts=obj.numverts

-- build the texture vertex faces

buildTVFaces obj

-- operate in objects coordinate space. Save original coord system so we

-- can restore later.

oldcoordsys=set coordsys local

-- for each vertex in mesh, get it's position and normalize the position

-- to a range of [0,0,0] to [1,1,1]. This is the planar UVW space.

for v = 1 to obj.numverts do

( normalize_pos=((getvert obj v)-obj.min)/(obj.max-obj.min)

-- flip around position component values based on which direction the

-- planar mapping is perpendicular to

case direction of

(#x:( tmp=normalize_pos.x

normalize_pos.x=normalize_pos.y

normalize_pos.y=normalize_pos.z

normalize_pos.z=tmp

)

#y:( tmp=normalize_pos.y

normalize_pos.y=normalize_pos.z

normalize_pos.z=tmp

)

)

-- set the corresponding texture vertex "position"

settvert obj v normalize_pos

)

-- done "positioning" the texture vertices. Build the texture faces.

-- since in this case there is a 1-to-1 correspondence between mesh and

-- texture vertices, the vertex indices for a mesh face are also the

-- texture vertex indices for the texture faces.

for f = 1 to obj.numfaces do

setTVFace obj f (getface obj f)

-- all done. reset the coordinate system

set coordsys oldcoordsys

-- update the mesh so 3ds Max sees the changes

update obj

)

--

-- test bed. Create a sphere, apply a material, set the diffuse map

-- to a 2x3 tiled checker map, turn on viewport display of the

-- checker texture map, and call the ApplyPlanarMap function

--

g=geosphere()

convertToMesh g

g.material=standard()

g.material.maps[2]=checker()

g.material.maps[2].coordinates.u_tiling=2

g.material.maps[2].coordinates.v_tiling=3

showTextureMap g.material g.material.maps[2] true

ApplyPlanarMap g #x

OUTPUT:

ApplyPlanarMap() -- output of function declaration lines 5 to 45

$GeoSphere:GeoSphere02 @ [0.0,0.0,0.0] -- output line 51

$Editable_Mesh:GeoSphere02 @ [0.0,0.0,0.0] -- output line 52

Standard:Standard -- output line 53

Checker:Checker -- output line 54

2 -- output line 55

3 -- output line 56

OK -- output line 57

OK -- output line 58

See also

Editable_Mesh : GeometryClass and TriMesh : Value


Understanding Texture Coordinates

Understanding Texture Coordinates and Vertex Colors

In 3ds Max, texture and vertex color information is stored in so-called texture vertices resp. color vertices. They build a mesh which also has texture faces resp. colorPreVertex faces referencing these vertices. This matter often leads to misunderstandings and requires a detailed explanation:

Mesh Vertices and Faces

Mesh vertices are Point3 values representing points in three-dimensional space, labeled X, Y and Z. Mesh faces reference 3 of these points to define a surface in space. There can be any number of faces referencing the same vertex. For example, the pole of a Sphere is shared by a large number of faces.

Texture Vertices and Faces

Texture vertices are Point3 values representing points in texture space – U, V and W. Since bitmap textures are two-dimensional, the W value is often not used, but it is always stored. The U and V values correspond to a location in the bitmap plane, in other words, to a pixel in the bitmap. This means that the coordinates tell the mesh which pixel of the image should appear at a certain point of the actual mesh.

In the case of 3D procedural textures, all 3 values can be used to define a point inside the texture space. Texture faces connect these vertices and build a separate mesh which represents the object in texture space. Each texture face references 3 vertices. There can be any number of texture faces referencing the same texture vertex.

Color Vertices and Faces

Color vertices are Point3 values representing points in color space – R, G and B. If you imagine a cube with side of 1 unit where Red goes along the local X axis, Green along the Y and Blue along the Z axis, the lower left corner would be 0.0,0.0,0.0 completely black, the opposite corner would be 1.0,1.0,1.0 completely white, and each point inside the cube would stand for any of the colors that can be represented by a Point3 value with components between 0.0 and 1.0.

Color vertices are basically a variation of texture vertices. Historically, early versions of 3ds Max could use either two texture channels or one texture and one color channel. (in other words, the one texture channel could be used in two different ways). Thus, ColorPerVertex faces are used to connect the Color Vertices to a separate mesh just like in the case of texture coordinates.

But how do they fit together?

It is very important to note that

A - There can be more or less texture and color vertices than there are mesh vertices

B – There are always exactly as many mesh faces as there are texture and color faces!

So there is no one-to-one correspondence between mesh vertices and texture and color vertices. You cannot take vertex number 10 from the mesh and expect that texture vertex 10 will store the information about its texturing or color vertex 10 would define its vertex color.

As mentioned in B , the number of faces is always identical. Not only this, the indices of the mesh and texture resp. color faces have a one-to-one correspondence! If face 5 has 3 mesh vertices you are interested in, their corresponding texture vertices will be the 3 vertices referenced by the texture face number 5.

This is the key to access to texture and color information in 3ds Max!

Finding the corresponding vertices

In order to find out which texture vertex corresponds to a mesh vertex, you have to do the following:

1. Take the index of the mesh vertex.

2. Find out which faces reference the index of the face.

3. Note the number of the vertex (1st, 2nd or 3rd - .x, .y or .z) inside each face.

4. For each face referencing the vertex, get the texture face with the same index.

5. Get the index of the respective texture vertex from the face - 1st, 2nd or 3rd / .x, .y or .z

6. The vertex you got corresonds to the mesh vertex we started with.

7. Repeat steps 3 to 6 for all faces found.

Same applies to color vertices.

Why so complicated?

Historically, Autodesk 3D Studio for DOS supported only one texture vertex per mesh vertex and no color vertices. This means there was a simple one-to-one correspondence between mesh and texture vertices, but this also led to problems still visible in the .3DS file format.

Let's take a look at a textured Sphere. Spherical mapping coordinates mean that the horizontal row of texels running through the middle of the mapped image is applied to the equator, all top texels meet together at the north pole, and the bottom texels meet at the south pole of the sphere. At the pole, there is only one vertex, but there are a large number of faces using it, and a large number of texels that should meet there. In the case of the .3DS style texture coordinates, only one texture vertex would be allowed at the pole. This would lead to a severe distortion around the pole.

In 3ds Max, each face indexing the pole vertex has a texture face counterpart referencing a different texture vertex pointing at a different texel of the texture. The image gets wrapped around correctly and there are no artifacts near the pole.

Same applies to the seam where the texels of the left and right side of the image meet. The underlying mesh vertices should be able to reference two different texels – one for each side of the seam. In .3DS, only one value could be stored. In 3ds Max, both values can be referenced through the corresponding texture faces.

You can visualize this by creating a Sphere with texture coordinates and exporting to .3DS without preserving the texture coordinates. The number of texture vertices will be reduced to fit the old format. Read back the .3DS file, apply the same material to both objects (original Sphere and imported mesh) and compare the mapping:

What does the Preserve Max Texure Coordinates checkbox in the 3DS Exporter do? It duplicates the mesh vertices to achieve the one-to-one correspondence required by the .3DS format. This means that the pole vertex of a sphere will be split into multiple vertices, one for each face referencing it and using a different texture vertex. While this will preserve the coordinates, it destroys part of the mesh smoothing as there can be no smoothing between elements not sharing common vertices/edges. (see left sphere on the image)

Color Vertices At Work

The above thoughts are more or less valid for Vertex Colors except they cannot be exported to .3DS at all. But there are some interesting implications.

Let's take the Sphere again and apply Vertex Colors to it. Other than the texture vertices, the pole vertex will most probably require only one single color – despite the fact there are multiple faces sharing the pole vertex, there is only one vertex normal used when calculating lighting. This means that all faces could reuse the same value.

Now let's do the same with a Box. There are multiple faces sharing each corner vertex. The difference to a Sphere is that each side of the Box has its own normal since the Box is flat-shaded. This also means that the lighting is calculated differently for each side, but is stored in the same vertex. Just like with texture vertices, we need more than one color vertex in order to achieve the flat look. Reusing a single color value for all sides of the Box would make the shading smooth!

Many game engines still support just one color vertex per mesh vertex. Using MAXScript, it is possible to develop a utility to reduce the numbers and achieve a one-to-one correspondence, but at cost of a overly smooth look with no flat shading.

Another interesting example – let's say you have a Teapot and want to paint it all Red. While you could store a single color vertex for each mesh vertex or even more, it would be possible to create a single color vertex and reference it in each of the 3 vertex indices of each color face! Changing this single color vertex value would change the vertex color of the complete object instantly!

Note that using the Unwrap_UVW modifier, it is possible to animate the values of texture and color vertices over time! Remembering that the 3 values correspond to the Red, Green and Blue channel, you could move a vertex in the Unwrap Editor around in the XY plane and thus control its RG color, while using the third value spinner to move up / down along the Blue axis. Placing a Red-Green gradient as Editor background image (black in the lower left corner, red in the lower right corner, green in the upper left corner, yellow in the upper right corner) would give you a visual editor for animated vertex colors!

See also

Mesh Vertex Methods

Mesh Texture Vertex Methods

Mesh Color-Per-Vertex Methods

General Meshop Mapping Methods


Accessing the Viewport Vertex Alpha Values

3ds Max supports 100 map channels that can be used for storing mapping coordinates.

Historically,

3ds Max 1.0 supported only one texture channel which is currently Channel 1.

3ds Max 2.0 added support for a second channel which could be used either for texture coordinates or for storing vertex colors. Currently it is stored as Channel 0.

3ds Max 3.0 increased the number of channels to 100. The channels are numbered from 1 to 99 plus the already mentioned Vertex Colors Channel 0.

All these Channels can be accessed by the Unwrap_UVW, by the Maps in the Material Editor etc. The channels support map vertices and faces connecting them. For details, you can see Understanding Texture Coordinates . For related methods, see General Meshop Mapping Methods

3ds Max 4.0 added support for Alpha in the Viewports. This new internal channel has been given the index –2.

In addition, 3ds Max 4.0 introduced 100 user data channels with indices from 1 to 100. These channels can be used to store arbitrary Point3 data per vertex, for example special data for game models that can be exported to game engines. They do not have face arrays, only vertex data arrays. For related methods, see Meshop Vertex Data Methods

WARNING!

Mapping channels and Vertex Data channels are not the same thing!

While the User Data Channel 3 is dedicated to Alpha values, it is unrelated to the Viewport Vertex Alpha channel which is the internal map channel with index –2.

In the following example we will create a sphere with 4 segments (only 6 vertices) and access its Viewport Alpha values. You can try and increase the number of sphere segments to get more vertices anytime.

EXAMPLE

s = sphere segs:4 --create a sphere

convertToMesh s --collapse to Editable Mesh

s.showVertexColors = true --enable Vertex Colors in Viewport

s.vertexColorType = #alpha --set Vertex Color type to Alpha

--Read the number of mesh vertices

mesh_verts = s.numverts

--Set the map vertices for the first and last mesh vertex to black

--Note that this access will automatically enable channel –2 and

--build its internal vertex and face arrays.

meshop.setVertAlpha s -2 #(1, mesh_verts) 0.0

--Read the number of map vertices in Channel –2

--Since the channel –2 is now enabled, you will get a valid result.

--Evaluating this line BEFORE the previous one would lead to

--an error message telling you Channel –2 is not enabled...

map_verts = meshop.getNumMapVerts s –2

--Go through all map vertices except the first and last and change

--their Alpha value to a non-greyscale color using direct access

--to the Mapping Channel -2

for i = 2 to map_verts-1 do

 meshop.setMapVert s -2 i [i*0.1,i*0.05,1.0-i*0.1]

--Update the mesh:

update s

--Go through all map vertices and print their values by

--reading directly from Channel -2

for i = 1 to map_verts do  format "Map Vertex % = %\n" i (meshop.getMapVert s -2 i)

RESULTS:

$Sphere:Sphere01 @ [0.000000,0.000000,0.000000]

$Editable_Mesh:Sphere01 @ [0.000000,0.000000,0.000000]

true

#Alpha

6

OK

6

OK

OK

Map Vertex 1 = [0,0,0]

Map Vertex 2 = [0.2,0.1,0.8]

Map Vertex 3 = [0.3,0.15,0.7]

Map Vertex 4 = [0.4,0.2,0.6]

Map Vertex 5 = [0.5,0.25,0.5]

Map Vertex 6 = [0,0,0]

OK

OK

NOTES:

The array #(1, mesh_verts) specifies the Mesh Vertex Indices and not the Map Vertex indices! The meshop.setVertAlpha will find all corresponding Map Vertices in the channel and affect them all without the need to look for them!

On the other hand, the index supplied to meshop.setMapVert is the Map Vertex index and not the Mesh Index as in the case of meshop.setVertAlpha. If there are more Map Vertices corresponding to a single Mesh Vertex, you would have to find them all and read their values separately. In this simple case though, there are 6 Mesh Vertices and corresponding 6 Map Vertices, so the indices are the same.

meshop.getMapVert reads the actually stored value from a specific Map Vertex which is always a Point3 value.

As you see from the example, you can use meshop.setMapVert to set the value of Map Vertices in the Alpha Channel –2 to a color which will be displayed as color in the viewport! The Alpha Channel –2 is just a regular mapping channel used in a similar way to the Vertex Color Channel 0.

meshop.setVertAlpha lets the user set all Point3 components to single value at once for all Map Vertices related to the supplied array of Mesh Vertices. This ensures the Alpha channel contains a greyscale value and not an RGB value and shields the user from additional work to provide Point3 values and find out which Map Vertices to affect.

The reason there is NO meshop.getVertAlpha counterpart is that a single Mesh Vertex could have any number of corresponding Map Vertices, all with possibly different values, and all values having 3, possible different, components. It would be difficult to return meaningful values for a group of Mesh Vertices, each with multiple results and multiple Point3 components.

Using meshop.getMapVerts, you will always get the exact Point3 value for the exact Map Vertex of interest, and will be able to use it the way you want.

See also

General Meshop Mapping Methods

Understanding Texture Coordinates


SplineShape : Shape

splineShape - superclass: Shape; super-superclass:Node - classID: #(10, 0)

Value > MAXWrapper > Node > GeometryClass > Shape > SplineShape

Roll over and click a Rollout to jump to its description

SplineShapes are the general editable versions of all the shape objects, in the same way that Editable Meshes relate to geometry objects. They are the objects that a shape is converted to when you apply an Edit Spline modifier and the result of collapsing a modifier stack on a shape base object. MAXScript lets you construct SplineShapes from scratch, add individual curves (splines) and controls points (knots) or modify an existing shape by converting it to a SplineShape and using the methods listed below.

Constructors:

splineShape ...

convertToSplineShape <shape>

For practical examples of creating and modifying spline shapes, see also

MAXScript FAQ: How do I create a line between two points?

How To ... Flatten a SplineShape

How To ... Draw a Freehand Spline

NOTES:

You must convert existing shapes to SplineShapes (Editable Splines) in order to operate on them with the methods listed in this topic. Use the convertToSplineShape() function to do this.

Only the updateShape() function updates the shape's internal caches and images in 3ds Max viewports. This is because updates can be computationally expensive and you don't want them performed on every function call. However, you must make sure you do call the updateShape() function after a series of changes and before the shape is to be worked on in 3ds Max or by other functions in MAXScript.

The in and out vectors for Bezier control points are given as vector handle coordinates, not as true vectors as the names suggests.

Coordinates are given in the MAXScript working coordinate system - this is important to note if you are familiar with the corresponding SDK spline functions which always work in object-local coordinates.

If the updateShape() function is called on an object that is selected and currently open in the Modify panel, it will drop the current selection in order to avoid a potential crash in 3ds Max, which at the moment, does not support scripted changes to an object open in the Modify panel

If you are creating or modifying a spline object, and have not yet run updateShape() on the spline, 3ds Max will crash if you minimize and then maximize the 3ds Max window. This is because an only partially created spline is created, and the internal 3ds Max spline structure is left in an unstable state

Properties

Rendering Rollout

Roll over and click a Rollout or Group of controls to jump to its description

Properties:

<SplineShape>.render_renderable BooleanClass default: false -- boolean; renderable

Toggles the "Enable in Renderer" checkbox on and off. Available in 3ds Max 8 and higher.

<SplineShape>.render_displayRenderMesh BooleanClass default: false -- boolean; displayRenderMesh

Toggles the "Enable In Viewport" checkbox on and off. When set to true, the mesh will be displayed in the viewports. Available in 3ds Max 8 and higher.

<SplineShape>.render_useViewportSettings BooleanClass default: false -- boolean; useViewportSettings

Toggles the "Use Viewport Settings" checkbox on and off. When set to true, the mesh displayed in the viewport will use the Viewport settings. When false, the Renderer settings will be used for the viewport mesh, too. Available in 3ds Max 8 and higher.

<SplineShape>.render_mapcoords BooleanClass default: false -- boolean; mapcoords

Toggles mapping coordinates generation on and off. The U coordinate wraps once around the thickness of the spline; the V coordinate is mapped once along the length of the spline. Available in 3ds Max 8 and higher.

<SplineShape>.realWorldMapSize BooleanClass default: false -- boolean

Toggles the real-world map size option on and off. Available in 3ds Max 8 and higher.

<SplineShape>.render_displayRenderSettings BooleanClass default: true -- boolean; displayRenderSettings

Toggles the state of the Viewport/Renderer radio buttons. When set to true, the Renderer settings will be displayed in the rollout. When false, the Viewport settings will be shown instead. Available in 3ds Max 8 and higher.

<SplineShape>.render_rectangular BooleanClass default: false -- boolean

When set to true, enables the Rectangular cross-section mode to be used in the renderer. When false (default), enables the Radial cross-section mode. Corresponds to the Radial/Rectangular radio buttons in the UI in Renderer mode. Available in 3ds Max 8 and higher.

<SplineShape>.render_viewport_rectangular BooleanClass default: false -- boolean

When set to true, enables the Rectangular cross-section mode to be used in the viewports. When false (default), enables the Radial cross-section mode. Corresponds to the Radial/Rectangular radio buttons in the UI in Viewport mode. Available in 3ds Max 8 and higher.

Renderer - Radial Cross-Section

Properties:

<SplineShape>.render_thickness Float default: 1.0 -- animatable; thickness

Get/Set the diameter of the Radial renderable spline mesh. Available in 3ds Max 8 and higher.

<SplineShape>.render_sides Integer default: 12 -- animatable; sides

Get/Set the number of sides for the spline mesh in the renderer. A value of 4 will give you a square cross section, for example. Available in 3ds Max 8 and higher.

<SplineShape>.render_angle Float default: 0.0 -- animatable; angle

Get/Set the rotational position of the Radial cross-section in the renderer. Available in 3ds Max 8 and higher.

Renderer - Rectangular Cross-Section

Properties:

<SplineShape>.render_length Float default: 6.0 -- animatable

Get/Set the length of the Rectangular renderable spline mesh. Available in 3ds Max 8 and higher.

<SplineShape>.render_width Float default: 2.0 -- animatable

Get/Set the width of the Rectangular renderable spline mesh. Available in 3ds Max 8 and higher.

<SplineShape>.render_angle2 Float default: 0.0 -- animatable

Get/Set rotational position of the Radial cross-section in the renderer. Available in 3ds Max 8 and higher.

<SplineShape>.render_aspect_locked BooleanClass default: false -- boolean

Controls the state of the Aspect Lock checkbutton. When set to true, changing the Width will affect the Height and vice-versa, preserving the aspect at the time the lock was engaged. Available in 3ds Max 8 and higher.

Viewport - Radial Cross-Section

Properties:

<SplineShape>.render_viewport_thickness Float default: 1.0 -- float; viewport_thickness

Get/Set the diameter of the Radial renderable spline mesh in the viewport. Available in 3ds Max 8 and higher.

<SplineShape>.render_viewport_sides Integer default: 12 -- integer; viewport_sides

Gets/Sets the number of sides for the Radial spline mesh in the viewports. A value of 4 will give you a square cross section, for example. Available in 3ds Max 8 and higher.

<SplineShape>.render_viewport_angle Float default: 0.0 -- float; viewport_angle

Gets/Sets the rotational position of the cross-section in the viewports. Available in 3ds Max 8 and higher.

Viewport - Rectangular Cross-Section

Properties:

<SplineShape>.render_viewport_length Float default: 6.0 -- float

Get/Set the length of the Rectangular spline mesh in the viewports. Available in 3ds Max 8 and higher.

<SplineShape>.render_viewport_width Float default: 2.0 -- float

Get/Set the width of the Rectangular spline mesh in the viewports. Available in 3ds Max 8 and higher.

<SplineShape>.render_viewport_angle2 Float default: 0.0 -- float

Get/Set rotational position of the Rectangular cross-section in the viewports. Available in 3ds Max 8 and higher.

<SplineShape>.render_viewport_aspect_locked BooleanClass default: false -- boolean

Controls the state of the Aspect Lock checkbutton. When set to true, changing the Width will affect the Height and vice-versa, preserving the aspect at the time the lock was engaged. Available in 3ds Max 8 and higher.

Auto Smooth

Properties:

<SplineShape>.render_auto_smooth BooleanClass default: true -- boolean

Controls the state of the Auto Smooth checkbox. When set to true, auto smoothing will be enabled. Available in 3ds Max 8 and higher.

<SplineShape>.render_threshold Float default: 40.0 -- animatable;

Get/set the Auto Smooth Threshold value. Available in 3ds Max 8 and higher.

Up to 3*N vertex and tangent coordinates are available as properties, where N is the number of vertices in the SplineShape. A vertex and its tangents are available as properties once a controller has been assigned to the vertex. Controllers can be assigned to vertices using the animateVertex() method described in Scripting Vertex and Control Point Animation . For example, if a circle object is collapsed to a SplineShape, and some of its vertices are animated, the properties for the vertices and tangents would be similar to:

$Circle01.Spline_1___InVec_1 Point3 value: [-75,33,0] -- animatable

$Circle01.Spline_1___Vertex_1 Point3 value: [-75,33,0] -- animatable

$Circle01.Spline_1___OutVec_1 Point3 value: [-50,0,0] -- animatable

$Circle01.Spline_1___InVec_2 Point3 value: [-20,-33,0] -- animatable

$Circle01.Spline_1___Vertex_2 Point3 value: [7,-66,0] -- animatable

$Circle01.Spline_1___OutVec_2 Point3 value: [32,-95,0] -- animatable

Interpolation Rollout

Roll over and click a Rollout or Group of controls to jump to its description

Properties:

<splineshape>.steps Integer default: 6 -- integer

Controls the Interpolation Steps in the Interpolation rollout.

<splineshape>.optimize Boolean default: true -- boolean

Controls the state of the Optimize checkbox in the Interpolation rollout.

<splineshape>.adaptive Boolean default: false -- boolean

Controls the state of the Adaptive checkbox in the Interpolation rollout.

Selection Rollout

Roll over and click a Rollout to jump to its description

No Related Properties or Method exposed to MAXScript.

Soft Selection Rollout

Roll over and click a Rollout to jump to its description

No Related Properties or Method exposed to MAXScript.

Geometry Rollout

Roll over and click a Rollout or Group of controls to jump to its description

Create, Break, Attach

Methods:

splineOps.startCreateLine <editable_spline_or_line_node_or_modifier>

Enters "Create Line" command mode - valid in all Sub-Object levels, and when not in Sub-Object mode.

See Editable Spline Modify Panel Command Modes and Operations for full list of UI-related methods.

splineOps.startBreak <editable_spline_or_line_node_or_modifier>

Enters "Break" command mode - valid in Vertex and Segment Sub-Object levels.

See Editable Spline Modify Panel Command Modes and Operations for full list of UI-related methods.

splineOps.startAttach <editable_spline_or_line_node_or_modifier>

Enters "Attach" command mode - valid in all Sub-Object levels, and when not in Sub-Object mode.

See Editable Spline Modify Panel Command Modes and Operations for full list of UI-related methods.

splineOps.attachMultiple <editable_spline_or_line_node_or_modifier>

Displays Attach Multiple dialog allowing the user to select multiple shapes to attach. Valid in all Sub-Object levels, and when not in Sub-Object mode.

See Editable Spline Modify Panel Command Modes and Operations for full list of UI-related methods.

Refine

Methods:

splineOps.startRefine <editable_spline_or_line_node_or_modifier>

Enters "Refine" command mode - valid in Vertex and Segment Sub-Object levels. This method does not turn off the Connect checkbox, so it is effectively the same as the startRefineConnect() method.

See Editable Spline Modify Panel Command Modes and Operations for full list of UI-related methods.

splineOps.startRefineConnect <editable_spline_or_line_node_or_modifier>

Enters "Refine" command mode - valid in Vertex and Segment Sub-Object levels. This method does not turn on the Connect checkbox, so it is effectively the same as the startRefine() method.

See Editable Spline Modify Panel Command Modes and Operations for full list of UI-related methods.

Weld, Connect, Insert, Make First, Fuse, Reverse, Cycle

Methods:

splineOps.weld <editable_spline_or_line_node_or_modifier>

Welds the selected vertices - valid in Vertex Sub-Object level.

See also related methods in Shape Methods - Weld

See Editable Spline Modify Panel Command Modes and Operations for full list of UI-related methods.

splineOps.startConnect <editable_spline_or_line_node_or_modifier>

Enters "Connect" command mode - valid in Vertex Sub-Object level.

See Editable Spline Modify Panel Command Modes and Operations for full list of UI-related methods.

splineOps.startInsert <editable_spline_or_line_node_or_modifier>

Enters "Insert" command mode - valid in all Sub-Object levels, and when not in Sub-Object mode.

See Editable Spline Modify Panel Command Modes and Operations for full list of UI-related methods.

splineOps.makeFirst <editable_spline_or_line_node_or_modifier>

Makes the selected vertices the first vertex in the spline- valid in Vertex Sub-Object level.

See Editable Spline Modify Panel Command Modes and Operations for full list of UI-related methods.

splineOps.fuse <editable_spline_or_line_node_or_modifier>

Fuses the selected vertices. Valid in Vertex Sub-Object level.

See Editable Spline Modify Panel Command Modes and Operations for full list of UI-related methods.

splineOps.reverse <editable_spline_or_line_node_or_modifier>

Reverses the order of vertices in the selected splines - valid in Spline Sub-Object level.

See Editable Spline Modify Panel Command Modes and Operations for full list of UI-related methods.

splineOps.cycle <editable_spline_or_line_node_or_modifier>

Cycles through the vertices of the spline, selecting each vertex. At least one vertex must be selected before calling this method, or no vertex is selected. If more than one vertex is selected when this method is called, the first vertex of the first shape is selected. Valid in Vertex Sub-Object level.

See Editable Spline Modify Panel Command Modes and Operations for full list of UI-related methods.

CrossInsert, Fillet, Chamfer, Outline

Methods:

splineOps.startCrossInsert <editable_spline_or_line_node_or_modifier>

Enters "CrossInsert" command mode - valid in Vertex Sub-Object level.

See Editable Spline Modify Panel Command Modes and Operations for full list of UI-related methods.

splineOps.startFillet <editable_spline_or_line_node_or_modifier>

Enters "Fillet" command mode - valid in Vertex Sub-Object level.

See Editable Spline Modify Panel Command Modes and Operations for full list of UI-related methods.

splineOps.startChamfer <editable_spline_or_line_node_or_modifier>

Enters "Chamfer" command mode - valid in Vertex Sub-Object level.

See Editable Spline Modify Panel Command Modes and Operations for full list of UI-related methods.

splineOps.startOutline <editable_spline_or_line_node_or_modifier>

Enters "Outline" command mode - valid in Spline Sub-Object level.

See Editable Spline Modify Panel Command Modes and Operations for full list of UI-related methods.

Boolean

Methods:

splineOps.startUnion <editable_spline_or_line_node_or_modifier>

Enters "Boolean Union" command mode - valid in Spline Sub-Object level. Only 1 closed spline must be selected to enter this command mode.

See Editable Spline Modify Panel Command Modes and Operations for full list of UI-related methods.

splineOps.startSubtract <editable_spline_or_line_node_or_modifier>

Enters "Boolean Subtract" command mode - valid in Spline Sub-Object level. Only 1 closed spline must be selected to enter this command mode.

See Editable Spline Modify Panel Command Modes and Operations for full list of UI-related methods.

splineOps.intersect <editable_spline_or_line_node_or_modifier>

Enters "Boolean Intersect" command mode - valid in Spline Sub-Object level. Only 1 closed spline must be selected to enter this command mode.

See Editable Spline Modify Panel Command Modes and Operations for full list of UI-related methods.

Mirror

Methods:

splineOps.mirrorHoriz <editable_spline_or_line_node_or_modifier>

Mirrors the selected splines horizontally - valid in Spline Sub-Object level.

See Editable Spline Modify Panel Command Modes and Operations for full list of UI-related methods.

splineOps.mirrorVert <editable_spline_or_line_node_or_modifier>

Mirrors the selected splines vertically - valid in Spline Sub-Object level.

See Editable Spline Modify Panel Command Modes and Operations for full list of UI-related methods.

splineOps.mirrorBoth <editable_spline_or_line_node_or_modifier>

Mirrors the selected splines horizontally and vertically - valid in Spline Sub-Object level.

See Editable Spline Modify Panel Command Modes and Operations for full list of UI-related methods.

Trip, Extend

Methods:

splineOps.startTrim <editable_spline_or_line_node_or_modifier>

Enters "Trim" command mode - valid in Spline Sub-Object level.

See Editable Spline Modify Panel Command Modes and Operations for full list of UI-related methods.

splineOps.startExtend <editable_spline_or_line_node_or_modifier>

Enters "Extend" command mode - valid in Spline Sub-Object level.

See Editable Spline Modify Panel Command Modes and Operations for full list of UI-related methods.

Copy, Paste Tangent

Methods:

splineOps.startCopyTangent <editable_spline_or_line_node_or_modifier>

Enters "Copy Tangent" command mode - valid in Vertex Sub-Object level.

See Editable Spline Modify Panel Command Modes and Operations for full list of UI-related methods.

splineOps.startPasteTangent <editable_spline_or_line_node_or_modifier>

Enters "Paste Tangent" command mode - valid in Vertex Sub-Object level.

See Editable Spline Modify Panel Command Modes and Operations for full list of UI-related methods.

Hide, Unhide

Methods:

splineOps.hide <editable_spline_or_line_node_or_modifier>

Hides the selected sub-objects - valid in all Sub-Object levels.

See Editable Spline Modify Panel Command Modes and Operations for full list of UI-related methods.

splineOps.unhideAll <editable_spline_or_line_node_or_modifier>

Unhides all hidden sub-objects -valid in all Sub-Object levels, and when not in Sub-Object mode.

See also related methods in Shape Methods - Hide, Unhide

See Editable Spline Modify Panel Command Modes and Operations for full list of UI-related methods.

Bind, Unbind

splineOps.startBind <editable_spline_or_line_node_or_modifier>

Enters "Bind" command mode - valid in Vertex Sub-Object level.

See Editable Spline Modify Panel Command Modes and Operations for full list of UI-related methods.

splineOps.unbind <editable_spline_or_line_node_or_modifier>

Unbinds the selected vertices - valid in Vertex Sub-Object level.

See also related methods in Shape Methods - Bind, Unbind

See Editable Spline Modify Panel Command Modes and Operations for full list of UI-related methods.

Delete, Close

splineOps.delete <editable_spline_or_line_node_or_modifier>

Deletes the selected sub-objects - valid in all Sub-Object levels.

See Editable Spline Modify Panel Command Modes and Operations for full list of UI-related methods.

splineOps.close <editable_spline_or_line_node_or_modifier>

Closes the selected splines - valid in Spline Sub-Object level.

See Editable Spline Modify Panel Command Modes and Operations for full list of UI-related methods.

Divide, Detach, Explode

splineOps.divide <editable_spline_or_line_node_or_modifier>

Divides the selected segments - valid in Segment Sub-Object level.

See Editable Spline Modify Panel Command Modes and Operations for full list of UI-related methods.

splineOps.detach <editable_spline_or_line_node_or_modifier>

Displays Detach dialog allowing the user to specify an object name. Valid in all Sub-Object levels.

See Editable Spline Modify Panel Command Modes and Operations for full list of UI-related methods.

splineOps.explode <editable_spline_or_line_node_or_modifier>

Explodes the each segment in the selected splines into separate splines or objects. Valid in Spline Sub-Object level.

See Editable Spline Modify Panel Command Modes and Operations for full list of UI-related methods.

Surface Properties Rollout

Roll over and click a Rollout to jump to its description

Methods:

splineOps.selectByID <editable_spline_or_line_node_or_modifier>

Presses the Select ID button

See also related method in Shape Methods - MaterialID

See Editable Spline Modify Panel Command Modes and Operations for full list of UI-related methods.

Methods

Shape Methods

updateShape <shape>

Updates the shape's internal caches and viewport display to account for all the changes made by other functions in this kit. This update must be done before 3ds Max or any other code tries to work with a modified shape object.

The updateShape() function makes any scripted changes to a base object spline shape propagate into the bottom of any modifier stack that is present. Note that there is no check to warn you that modifications such as topology changes might invalidate modifiers already in the stack. This is equivalent to opening and modifying the base object in a Modify panel, ignoring its warnings about invalidating the object.

resetShape <shape>

Clears all the spline curves out of a shape

numSplines <shape>

Returns the number of spline curves in the shape as an integer. Equivalent to <shape>.numSplines.

setFirstSpline <shape> <spline_index_integer>

Rolls the order of the splines in a shape around so that the numbered spline is the first spline in the shape. This is useful when working with multi-spline shapes in the Lofter and some other modifiers such as Surface Tools which are sensitive to spline order.

Weld

addAndWeld <to_shape> <from_shape> <weldthreshold_float>

Add the splines from one spline shape to the specified bezier shape. The weld threshold will weld the endpoints of the new splines onto endpoints of existing ones if they are within the distance specified.

Bind and Unbind

bindKnot <shape> <isEnd_boolean> <splineId_integer> \

<segIndex_integer> <splineSegId_integer>

Binds the first or end knot of a spline to the midpoint of the specified segment. A bind acts as a constraint, it constrains the first point or the end point of a spline to the mid point of a segment. If <isEnd_boolean> is true the end knot of the spline is bound, otherwise the first knot is bound. <splineId_integer> specifies the index of the spline the first/end knot to bind belongs to, <segIndex_integer> specifies the index of the segment to bind to, and <splineSegId_integer> specifies the index of the spline the bind to segment belongs to.

unBindKnot <shape> <spline_index_integer> <isEnd_boolean>

Unbinds the specified end/first knot of the given spline

updateBindList <shape>

Called when the topology changes to update the bind list, for example when knots are deleted from bound spline or the spline bound to.

Hide and Unhide

hideselectedsplines <shape>

Hides the selected splines in the shape.

hideselectedsegments <shape>

Hides the selected segments in the shape.

hideselectedverts <shape>

Hides the segments attached to the selected knots in the shape.

unhidesegments <shape>

Unhides all segments in the shape.

Material ID

materialID <shape> <spline_index_integer> <segment_index_integer>

Returns the material id for the given segment of the given shape object.

Vertex Animation

animateVertex <shape> <vertex_spec>

Applies controllers to the specified vertices and tangents of the splineshape, where <vertex_spec> is one of:

<integer_index>

<integer_index_array>

#all

By assigning controllers to the vertices and tangents, the vertices and tangents are added to the Master subAnim and appear as animatables in the Track View, allowing further scripting of the vertices and tangents.

FOR EXAMPLE

animateVertex $Circle01 #all

The vertices to be animated are specified by index number or with the keyword #all to animate all vertices.

See also Class and Object Inspector Functions and Scripting Vertex and Control Point Animation for details on accessing the splineshape vertices and tangents. The controller values assigned to the vertices and tangent handles is in object space. See Using Node Transform Properties for information on converting between world space to object space.

For examples of creating and modifying spline shapes, see also

MAXScript FAQ: How do I create a line between two points?

How To ... Flatten a SplineShape

How To ... Draw a Freehand Spline

Spline Methods

addNewSpline <shape>

Adds a new spline curve to the spline shape and returns an integer reflecting the spline index of the newly added spline curve. Individual spline curves are given index numbers starting at 1. The addNewSpline() function adds new spline curves to the end of the list of curves in a shape.

getSplineSelection <shape>

Returns the indices of the selected splines in the shape as an array of integers.

setSplineSelection <shape> <spline_index_array> [ keep:<boolean> ]

Selects the splines specified by <spline_index_array> in the specified shape. <spline_index_array> is an array of integers specifying the spline indices. Splines already selected are de-selected unless keep:true is specified.

deleteSpline <shape> <spline_index_integer>

Deletes the indexed spline curve from the shape. The remaining curves are renumbered to account for the deletion.

numSegments <shape> <spline_index_integer>

Returns the number of line segments in the indexed spline as an integer. This is the same as the number of knots for closed splines and 1 less for open splines.

numKnots <shape> [ <spline_index_integer> ]

Returns the number of knots (also known vertices or control points) in the indexed spline as an integer. If the spline index is not specified, returns the number of knots in the entire shape.

isClosed <shape> <spline_index_integer>

returns true if the indexed spline is closed, false if it is open.

close <shape> <spline_index_integer>

closes the indexed spline.

open <shape> <spline_index_integer>

opens the indexed spline between its last and first knots.

reverse <shape> <spline_index_integer>

reverses the order of the knots in the indexed spline.

setFirstKnot <shape> <spline_index_integer> <knot_index_integer>

rolls the order of the knots in the indexed spline around so that the specified knot becomes the first knot in the spline.

weldSpline <splineShape node> <tolerance>

Welds the selected knots in the specified splineShape that are within the specified tolerance.

Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

EXAMPLE:

(

local sp = splineShape()

addnewSpline sp

addKnot sp 1 #corner #line [20,10,0]

addKnot sp 1 #corner #line [-20,11,0]

addKnot sp 1 #corner #line [-20,-11,0]

addKnot sp 1 #corner #line [20,-10,0]

close sp 1

updateShape sp

select sp

subobjectlevel = 1

setKnotSelection sp 1 #(1,4) keep:false -- Select the right most knots

weldSpline sp 21.0

local knotCount = numknots sp

if (knotCount != 3) do

throw ("Spline should have 3 knots, found " + (knotCount as string))

)

getSegLengths <splineShape> <spline_index> [cum:<boolean>] \

[byVertex:<boolean>] [numArcSteps:<integer>]

Returns array of segment lengths or vertex distances by spline fraction and length, and total spline length. Double precision calculations, very accurate. If cum:true, results are cumulative, otherwise they are relative. If byVertex:true results are per vertex, otherwise per segment.

Defaults: cum:false byVertex:false numArcSteps:100

subdivideSegment <splineShape> <spline_index> <seg_index> <divisions>

Divides the segment into the specified number of divisions. Double precision calculations, very accurate.

interpCurve3D <splineShape> <spline_index> <param_float> [pathParam:<boolean>]

Returns a <point3> coordinate on the indexed curve. If pathParam:false, param is the fraction of the spline length, otherwise it is a segment-based (path) fraction. Default is pathParam:false

tangentCurve3D <splineShape> <spline_index> <param_float> [pathParam:<boolean>]

Returns a <point3> tangent on the indexed curve. If pathParam:false, param is the fraction of the spline length, otherwise it is a segment-based (path) fraction. Default is pathParam:false

findPathSegAndParam <shape> <curve_num> <param>

Returns a point2 value containing the segment and segment fraction for the specified vertex-interpolated spline parameter.

The first and second arguments specify the shape and the spline within the shape to interpolate, the third argument is the parameter to interpolate.

Passing a parameter of 0.5 with a 10 segments spline for example will always return a point2 value containing either [6,0.0] (or very close to 0) or [5,1.0] because the middle of a 10 segments spline using vertex interpolation is always the vertex between the 5th and the 6th segment.

See notes below for discussion of interpolation methods.

Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

findLengthSegAndParam <shape> <curve_num> <param>

Returns a point2 value containing the segment and segment fraction for the specified length-interpolated spline parameter.

The first and second arguments specify the shape and the spline within the shape to interpolate, the third argument is the parameter to interpolate. In contrast to findPathSegAndParam, this method takes the actual length of the segments into account, normalizing the complete lenth between 0.0 and 1.0 and then interpolating along the length, so a parameter of 0.5 with a 10 segments spline will always return the segment and parameter within the segment that lies in the exact middle of the spline's length, varying based on the actual segment lengths / vertex distribution witin the spline.

See notes below.

Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

VERTEX AND LENGTH INTERPOLATION METHODS:

There are two methods to interpolate a position along the spline - vertex interpolation and length interpolation.

When using vertex interpolation (a.k.a. path interpolation), the spline is seen as a number of segments where each segment between two vertices is as a normalized space from 0.0 to 1.0. The distance between the two vertices of a segment is ignored during the interpolation, which means that if the lengths of the segments are different, interpolating linearly along the spline would result in varying speed.

You can visualize this on a Path Constraint with Constant Velocity unchecked where the object is moving faster between two vertices when the segment between them is longer. (see image below)

When using length interpolation, the whole spline length is normalized, so a parameter of 0.5 will be exactly in the middle of the spline regardless of the segments' lengths. The speed of a point interpolated along the spline using a parameter that changes linearly between 0.0 and 1.0 will remain constant along the whole spline even if the vertex placement is irregular.

This can be demonstrated when checking the Constant Velocity checkbox in the Path Constraint which enables length interpolation:

On this screenshot, the top object is a SplineShape with varying segment length and ten segments.

The middle object is a copy of the same shape used as a path by a Point Helper. The Constant Velocity checkbox was unchecked in the Path Constraint, causing it to use vertex interpolation. For 100 frames, it divided the shape in ten segments and placed ten samples on each segment, resulting in varying speed dependent on the length of the segment.

The bottom object is a copy of the same shape used as a path by another Point Helper, but this time Constant Velocity is turned on, causing it to use length interpolation. You can see clearly that the samples are evenly spaces along the full length of the shape, disregarding the distances between the vertices defining the segments.

The time slider was set of frame 50 - the length interpolation at the bottom places the point helper exactly at the middle of the path shape, while the vertex interpolation places it exactly on the vertex between the 5th and the 6th segment.

EXAMPLE:

(
local sp = splineShape()
addnewSpline sp
for i = 0 to 10 do
(
addknot sp 1 #smooth #curve [i*10, i*i, i*10]

)
updateShape sp
for i = 0.0 to 1.0 by 0.05 do
(
local pt1 = findPathSegAndParam sp 1 i

local pt2 = findLengthSegAndParam sp 1 i

format "% : % \t %\n" i pt2 pt1

)
)

OUTPUT:

0.0 : [1,0]   [1,0]

0.05 : [1,0.633532]   [1,0.5]

0.1 : [2,0.261918]   [1,1]

0.15 : [2,0.883245]   [2,0.5]

0.2 : [3,0.486351]   [2,1]

0.25 : [4,0.0810387]   [3,0.5]

0.3 : [4,0.650404]   [3,1]

0.35 : [5,0.206902]   [4,0.5]

0.4 : [5,0.74293]   [5,2.98023e-007]

0.45 : [6,0.261026]   [5,0.5]

0.5 : [6,0.762596]   [6,5.96046e-007]

0.55 : [7,0.246405]   [6,0.500001]

0.6 : [7,0.714253]   [7,5.96046e-007]

0.65 : [8,0.16969]   [7,0.500001]

0.7 : [8,0.605653]   [8,5.96046e-007]

0.75 : [9,0.0387986]   [8,0.500001]

0.8 : [9,0.445251]   [9,5.96046e-007]

0.85 : [9,0.851703]   [9,0.500001]

0.9 : [10,0.241028]   [10,5.96046e-007]

0.95 : [10,0.620515]   [10,0.500001]

1.0 : [10,1]   [10,0.999999]

OK

The vertex interpolation at the right side hits more or less precisely the start or end vertex and the center of each of the 10 segments because we are stepping with 1/20th per iteration, while the length interpolation takes into account the actual length of all segments and moves smoothly along the spline.

interpBezier3D <splineShape> <spline_index> <segment_index> <param_float> pathParam:<boolean>

Returns a point3 coordinate for the segment and segment fraction on the indexed curve. If pathParam:false, param is the fraction of the segment length, otherwise it is a segment-based (path) fraction. Default is pathParam:false

Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

tangentBezier3D <splineShape> <spline_index> <segment_index> <param_float> pathParam:<boolean>

Returns a point3 tangent for the segment and segment fraction on the indexed curve. If pathParam:false, param is the fraction of the segment length, otherwise it is a segment-based (path) fraction. Default is pathParam:false

Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

EXAMPLE:

(

local sp = splineShape()

addnewSpline sp

for i = 1 to 100 by 10 do

(

addknot sp 1 #smooth #curve [i, (i*i / 100.0), i]

)

updateShape sp

sp.wirecolor = color 255 0 0

local count = numknots sp - 1

for i = 1 to count do

(

local pathp = true

local pt = interpBezier3D sp 1 i 0.50 pathParam:pathp

local tn = tangentBezier3D sp 1 i 0.50 pathParam:pathp

local sr = splineShape()

addnewSpline sr

addknot sr 1 #corner #line pt

addknot sr 1 #corner #line (pt + (tn * 30))

updateShape sr

sr.wirecolor = blue

)

)

RESULT:

For examples of creating and modifying spline shapes, see also

MAXScript FAQ: How do I create a line between two points?

How To ... Flatten a SplineShape

How To ... Draw a Freehand Spline

Segment Methods

getSegmentType <shape> <spline_index_integer> <seg_index_integer>

Gets the segment type of the indexed segment in the indexed spline

setSegmentType <shape> <spline_index_integer> \

<seg_index_integer> \

( #curve | #line )

Sets the segment type of the indexed segment in the indexed spline

refineSegment <shape> <spline_index_integer> \

<seg_index_integer> \

<seg_interp_param_float>

Adds a new knot to the indexed segment of the indexed curve at a place along the indexed segment corresponding to the given segment interpolation parameter. This value is a float in the range 0.0 to 1.0, specifying a proportion along the segment. The new knot coordinates and in-vector and out-vector are automatically computed to maintain the segment's existing curvature. This is the primitive used by the refine function in the Edit Spline modifier.

You can use the MAXScript spline path interpolation functions to derive segment parameters given that a curve's path interpolation parameter is divided evenly among the segments in a curve.

Given a path interpolation parameter u in a spline of m segments, the target segment is:

n = (m*u) as integer + 1

and the segment parameter is:

f = (u-(n-1)/m)*m

which can be refactored to the following which will reduce roundoff error in the calculation:

f = u*m-n+1

The refineSegment() function returns the index of the newly inserted knot.

EXAMPLE:

s = splineShape() --create a spline shape

addNewSpline s --add a spline to it

addKnot s 1 #corner #line [0,0,0] --add a knot at origin

addKnot s 1 #smooth #curve [100,0,0] --add a knot @100 units along X

addKnot s 1 #corner #line [200,100,0] --add a third knot

updateShape s --update the shape

s.vertexTicks = true --enable vertex ticks

--We have two segments and three knots now.

refineSegment s 1 1 0.3 --divide the first segment at 30/70% ratio

updateShape s --update the shape to see the result

--Since our first segment was 100 units long, the vertex is exactly

--at 30 units from the origin, just as expected:

--now we have 3 segments - the original second segment is not third

refineSegment s 1 3 0.5 -- let's divide it in two equal parts

updateShape s --update the shape to see the result

--Because the segment is curved, the knot is not at equal distances

--to the two other knots along a straight line, but the

--distances ALONG THE CURVED SEGMENT are equal:

refineSegment s 1 4 0.8 -- divide the new last segment at 80/20 ratio

updateShape s --and update the shape to see the result:

getSegSelection <shape> <spline_index_integer>

Returns the indices of the selected segments in the specified shape spline as an array of integers.

setSegSelection <shape> <spline_index_integer> \

<segment_index_array> \

[ keep: <boolean> ]

Selects the segments specified by <segment_index_array> in the specified shape spline. <segment_index_array> is an array of integers specifying the segment indices. Segments already selected are de-selected unless keep:true is specified.

setMaterialID <splineShape> <spline_index> <seg_index> <matID>

Sets the material ID of the specified spline segment.

getMaterialID <splineShape> <spline_index> <seg_index>

Gets the material ID of the specified spline segment.

For examples of creating and modifying spline shapes, see also

MAXScript FAQ: How do I create a line between two points?

How To ... Flatten a SplineShape

How To ... Draw a Freehand Spline

Knot Methods

addKnot <shape> <spline_index_integer> \

( #smooth | #corner | #bezier | #bezierCorner ) \

( #curve | #line ) <position_point3> \

[invec_point3 outvec_point3] \

[where_integer]

Adds a new knot (control point) to the indexed spline and returns an integer reflecting the index of the newly added knot. The 3rd argument specifies the type of the knot, the 4th specifies the type of the segment leaving the knot. The 5th specifies the coordinates for the new point (given in the current working coordinate system). If the knot type is bezier or bezierCorner, you must give the in-vector and out-vector handle coordinates as the 6th and 7th arguments. In the same way as splines are indexed in a shape, knots are indexed in a spline. The optional last argument lets you specify where in the knot order the new knot is to be inserted, defaulting to the end of the spline if you leave this argument off.

deleteKnot <shape> <spline_index_integer> <knot_index_integer>

Deletes the indexed knot in the indexed spline. The remaining knots are renumbered to account for the deletion.

getKnotType <shape> <spline_index_integer> <knot_index_integer>

Returns the knot type of the indexed knot in the indexed spline. The value is one of the names #smooth, #corner, #bezier, or #bezierCorner.

setKnotType <shape> <spline_index_integer> <knot_index_integer> \

(#smooth | #corner | #bezier | #bezierCorner )

Sets the knot type of the indexed knot in the indexed spline. This is equivalent to the right-mouse-button change you can make to spline control-points using the Edit Spline modifier in 3ds Max.

getKnotPoint <shape> <spline_index_integer> <knot_index_integer>

Retrieves the coordinates of the indexed knot as a point3 in the current working coordinate system.

setKnotPoint <shape> <spline_index_integer> <knot_index_integer> <point3>

Sets the coordinates of the indexed knot in the indexed spline. Coordinates are given in the current working coordinate system.

getInVec <shape> <spline_index_integer> <knot_index_integer>

Retrieves the coordinates of the in-vector handle for the indexed knot as a point3 in the current working coordinate system.

setInVec <shape> <spline_index_integer> <knot_index_integer> <point3>

Sets the coordinates of the in-vector handle of the indexed knot. Coordinates are given in the current working coordinate system.

getOutVec <shape> <spline_index_integer> <knot_index_integer>

Retrieves the coordinates of the out-vector handle for the indexed knot as a point3 in the current working coordinate system.

setOutVec <shape> <spline_index_integer> <knot_index_integer> <point3>

Sets the coordinates of the out-vector handle of the indexed knot. Coordinates are given in the current working coordinate system.

getKnotSelection <shape> <spline_index_integer>

Returns the indices of the selected knots in the specified shape spline as an array of integers.

setKnotSelection <shape> <spline_index_integer> <knot_index_array> [keep: <boolean> ]

Selects the knots specified by <knot_index_array> in the specified shape spline. <knot_index_array> is an array of integers specifying the knot indices. Knots already selected are de-selected unless keep:true is specified.

For examples of creating and modifying spline shapes, see also

MAXScript FAQ: How do I create a line between two points?

How To ... Flatten a SplineShape

How To ... Draw a Freehand Spline

See also

Shape Common Properties, Operators, and Methods

Spline Shape Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods

Class and Object Inspector Functions

Scripting Vertex and Control Point Animation

Editable Spline Modify Panel Command Modes and Operations


Editable Spline Modify Panel Command Modes and Operations

A suite of methods provide the ability for a script to invoke Editable Spline, Line, and Edit Spline Modify panel modes and operations, corresponding to buttons available at various shape sub-object levels. These methods reside in the splineOps global structure. These methods effectively "push the button" in the Modify panel. In order to use these methods, the node must be selected and the Modify panel open. In the description of these methods, the first argument <editable_spline_or_line_node_or_modifier> should be interpreted as either an Editable Spline or Line node where the modifier stack level is at the base object, or an Edit Spline modifier where the modifier stack level is at the Edit Spline. In all cases, the following methods work at the current sub-object level, but only if that level is appropriate for the invoked operation.

If you have made scripted changes to the shape you must call the updateShape() method on the mesh before calling these methods. You do not need to call updateShape() after just calling one of these methods, as 3ds Max will take care of updating the shape.

The following methods invoke one of the 'user-interaction' button operations in the Editable Spline Modify panel, acting on the currently selected sub-objects. These methods highlight the corresponding button in the Geometry rollout and start the operation, at which point the user interactively completes the operation. These methods return after starting the operation, and before the user completes the operation, so care should be taken to ensure that your script does not interfere with the operation. Invoking any of these methods is the same as clicking on the associated button in the Modify panel. Calling a method when the operation is already in effect (either due to a user action or a MAXScript command) causes the operation to be terminated and the highlight is removed from the button.

splineOps.startUnion <editable_spline_or_line_node_or_modifier>

Enters "Boolean Union" command mode - valid in Spline Sub-Object level. Only 1 closed spline must be selected to enter this command mode.

splineOps.startSubtract <editable_spline_or_line_node_or_modifier>

Enters "Boolean Subtract" command mode - valid in Spline Sub-Object level. Only 1 closed spline must be selected to enter this command mode.

splineOps.intersect <editable_spline_or_line_node_or_modifier>

Enters "Boolean Intersect" command mode - valid in Spline Sub-Object level. Only 1 closed spline must be selected to enter this command mode.

splineOps.startAttach <editable_spline_or_line_node_or_modifier>

Enters "Attach" command mode - valid in all Sub-Object levels, and when not in Sub-Object mode.

splineOps.startBind <editable_spline_or_line_node_or_modifier>

Enters "Bind" command mode - valid in Vertex Sub-Object level.

splineOps.startBreak <editable_spline_or_line_node_or_modifier>

Enters "Break" command mode - valid in Vertex and Segment Sub-Object levels.

splineOps.startChamfer <editable_spline_or_line_node_or_modifier>

Enters "Chamfer" command mode - valid in Vertex Sub-Object level.

splineOps.startConnect <editable_spline_or_line_node_or_modifier>

Enters "Connect" command mode - valid in Vertex Sub-Object level.

splineOps.startCreateLine <editable_spline_or_line_node_or_modifier>

Enters "Create Line" command mode - valid in all Sub-Object levels, and when not in Sub-Object mode.

splineOps.startCrossInsert <editable_spline_or_line_node_or_modifier>

Enters "CrossInsert" command mode - valid in Vertex Sub-Object level.

splineOps.startExtend <editable_spline_or_line_node_or_modifier>

Enters "Extend" command mode - valid in Spline Sub-Object level.

splineOps.startFillet <editable_spline_or_line_node_or_modifier>

Enters "Fillet" command mode - valid in Vertex Sub-Object level.

splineOps.startInsert <editable_spline_or_line_node_or_modifier>

Enters "Insert" command mode - valid in all Sub-Object levels, and when not in Sub-Object mode.

splineOps.startOutline <editable_spline_or_line_node_or_modifier>

Enters "Outline" command mode - valid in Spline Sub-Object level.

splineOps.startRefine <editable_spline_or_line_node_or_modifier>

Enters "Refine" command mode - valid in Vertex and Segment Sub-Object levels. This method does not turn off the Connect checkbox, so it is effectively the same as the startRefineConnect() method.

splineOps.startRefineConnect <editable_spline_or_line_node_or_modifier>

Enters "Refine" command mode - valid in Vertex and Segment Sub-Object levels. This method does not turn on the Connect checkbox, so it is effectively the same as the startRefine() method.

splineOps.startTrim <editable_spline_or_line_node_or_modifier>

Enters "Trim" command mode - valid in Spline Sub-Object level.

splineOps.startCopyTangent <editable_spline_or_line_node_or_modifier>

Enters "Copy Tangent" command mode - valid in Vertex Sub-Object level.

splineOps.startPasteTangent <editable_spline_or_line_node_or_modifier>

Enters "Paste Tangent" command mode - valid in Vertex Sub-Object level.

The following methods invoke one of the 'instantaneous' button operations in the Editable Shape Modify panel, acting on the currently selected sub-objects:

splineOps.attachMultiple <editable_spline_or_line_node_or_modifier>

Displays Attach Multiple dialog allowing the user to select multiple shapes to attach. Valid in all Sub-Object levels, and when not in Sub-Object mode.

splineOps.close <editable_spline_or_line_node_or_modifier>

Closes the selected splines - valid in Spline Sub-Object level.

splineOps.cycle <editable_spline_or_line_node_or_modifier>

Cycles through the vertices of the spline, selecting each vertex. At least one vertex must be selected before calling this method, or no vertex is selected. If more than one vertex is selected when this method is called, the first vertex of the first shape is selected. Valid in Vertex Sub-Object level.

splineOps.delete <editable_spline_or_line_node_or_modifier>

Deletes the selected sub-objects - valid in all Sub-Object levels.

splineOps.detach <editable_spline_or_line_node_or_modifier>

Displays Detach dialog allowing the user to specify an object name. Valid in all Sub-Object levels.

splineOps.divide <editable_spline_or_line_node_or_modifier>

Divides the selected segments - valid in Segment Sub-Object level.

splineOps.explode <editable_spline_or_line_node_or_modifier>

Explodes the each segment in the selected splines into separate splines or objects. Valid in Spline Sub-Object level.

splineOps.fuse <editable_spline_or_line_node_or_modifier>

Fuses the selected vertices. Valid in Vertex Sub-Object level.

splineOps.hide <editable_spline_or_line_node_or_modifier>

Hides the selected sub-objects - valid in all Sub-Object levels.

splineOps.makeFirst <editable_spline_or_line_node_or_modifier>

Makes the selected vertices the first vertex in the spline- valid in Vertex Sub-Object level.

splineOps.mirrorBoth <editable_spline_or_line_node_or_modifier>

Mirrors the selected splines horizontally and vertically - valid in Spline Sub-Object level.

splineOps.mirrorHoriz <editable_spline_or_line_node_or_modifier>

Mirrors the selected splines horizontally - valid in Spline Sub-Object level.

splineOps.mirrorVert <editable_spline_or_line_node_or_modifier>

Mirrors the selected splines vertically - valid in Spline Sub-Object level.

splineOps.reverse <editable_spline_or_line_node_or_modifier>

Reverses the order of vertices in the selected splines - valid in Spline Sub-Object level.

splineOps.selectByID <editable_spline_or_line_node_or_modifier>

Presses the Select ID button

splineOps.unbind <editable_spline_or_line_node_or_modifier>

Unbinds the selected vertices - valid in Vertex Sub-Object level.

splineOps.unhideAll <editable_spline_or_line_node_or_modifier>

Unhides all hidden sub-objects -valid in all Sub-Object levels, and when not in Sub-Object mode.

splineOps.weld <editable_spline_or_line_node_or_modifier>

Welds the selected vertices - valid in Vertex Sub-Object level.

See also

SplineShape : Shape

How To ... Flatten a SplineShape

How To ... Draw a Freehand Spline


Passing SplineShape Knot Selections Up The Stack

When setting a Knot selection using the setKnotSelection method, you are always affecting the base object - the EditableSpline at the bottom of the stack. It is not directly possible to set the sub-object vertex selection of a specific Edit_Spline modifier using this method. The selection flows up the stack through any existing Edit_Spline modifiers and changes the sub-object selections of all of them.

In the following example, the script has to select a single vertex at the end of a SplineShape and link it to an object using a Linked XForm modifier. Then the other vertex on the other end of the SplineShape has to be linked to a different object using a second Linked XForm modifier. In result, moving either object should stretch the spline between the two objects similar to a rope.

Obviously, trying to set the vertex selection for both ends will fail because the second selection would flow through the whole stack and overwrite the first selection, resulting in both Linked XForm modifiers affecting the same vertex.

To avoid this, we have to do two things - we will apply the modifiers from top to bottom instead of adding them on top of each-other, and we will use a SplineSelect modifier as a "selection blocker" to stop the second sub-object selection from overwriting the first one.

SCRIPT

resetMaxFile #noPrompt
theSphere1= sphere()
theSphere1.pos = [-100,0,0]
theSphere2= sphere()
theSphere2.pos = [100,0,0]

theShape = splineShape()
addnewSpline theShape
addKnot theShape 1 #corner #line [-100,0,0]
addKnot theShape 1 #corner #line [100,0,0]
updateShape theShape

max modify mode --switch to modify panel
select theShape --select the spline

es1 = edit_spline name:"First ES" --create 1st Edit_Spline
addmodifier theShape es1 --add to the TOP of the stack
subobjectLevel = 1 --vertex level...

setKnotSelection theShape 1 #(1) --select first vertex in BASE OBJECT
LX1 = Linked_XForm name:"First XForm" --Add Linked XForm
modPanel.addModToSelection LX1 --Add to the sub-selection
LX1.Control = $Sphere01 --Set control

sselect = splineselect name:"Blocker" --Add a SplineSelect to stop the flow
addmodifier theShape sselect before:2 --Add it BEFORE the first Edit_Spline!
--Note: Since modifiers are always counted from top to bottom,
--having 2 modifiers on top will place the new modifier before them
--when using "before:2"

es2 = edit_spline name:"Second ES" --Create second Edit_Spline
addmodifier theShape es2 before:3 --Add it BEFORE the SlineSelect "Blocker"
modPanel.setCurrentObject es2 --Set the Modifier stack to it
subobjectLevel = 1 --vertex SO level
setKnotSelection theShape 1 #(2) --select second vertex

--Note that at this point, the selection will flow up until it
--hits the SplineSelect modifier which is set to Object Level and does
--not let the selection pass beyond that point. This preserves
--the selection of vertex 1 in the top Edit_Spline and sets the
--selection in the bottom one to vertex 2.

LX2 = Linked_XForm name:"Second XForm" --create new Linked XForm
modPanel.addModToSelection LX2 --Add on top of the current selection
LX2.Control = $Sphere02 --set second control


Patches

A patch function package containing a large number of functions for creating, modifying and accessing patch objects has been introduced in 3ds Max 4. The sub-object selection system in MAXScript has also been extended to cover patch objects.

  • The Editable Patch object in MAX was called 'Patch' in MAXScript. It has been renamed to 'Editable_Patch' to be consistent with Editable_Mesh and Editable_Poly, and to allow the new patch function package to be named 'patch'.

  • The MAXScript sub-object selection system has been extended to work with Editable Patch objects. This means that all the MAXScript VertexSelection, FaceSelection, and EdgeSelection properties and operations now work with patch objects. The 'face' sub-object selections in this system correspond to the 'patch' sub-object level when applied to patches.

  • The Patch functions. All the functions in this package take either a scene node containing an Editable Patch object or an Editable Patch base object as the first argument. QuadPatch and TriPatch objects need to be converted to Editable Patches for the Patch functions to be applicable. For example, when using the convertTo $foo Editable_Patch.

To create a patch object from scratch, create an Editable_Patch scene object to create an empty patch object and use the geometry & topology creations functions below to fill the patch out, then use the patch.update() function to complete construction.

NOTE:

Any set of changes to a patch object using the following functions do not fully take effect until the patch.update() function is called on it. This makes construction substantially more efficient, but can leave a patch in an unstable state if the script that contains the changing code finishes before calling patch.update on it, which may result in a MAX crash.

Functions:

The following functions are used to get and set the overall geometry of the patch. Supply keep:true to the setNumXXX functions for them to retain existing vertex/vector/patch/edge data, defaults to false, which cleans out the geometry.

The functions are largely direct calls to the methods of the same name on the MAX SDK class PatchMesh. See the SDK Help file Advanced Topic "Working with Patches", and the documentation for the main Patch system classes for more detailed info.

<integer>patch.getNumVerts <obj>

patch.setNumVerts <obj> <num> [keep:<boolean>]

<integer>patch.getNumVecs <obj>

patch.setNumVecs <obj> <num> [keep:<boolean>]

<integer>patch.getNumPatches <obj>

patch.setNumPatches <obj> <num> [keep:<boolean>]

<integer>patch.getNumEdges <obj>

patch.setNumEdges <obj> <num> [keep:<boolean>]

The following functions get and set individual vertex and vector handle locations. The vertex and vector coordinates are interpreted in MAXScript's current working coordinate context.

NOTE:

Consistent with the rest of MAXScript, all vertex/patch/vector/edge indexes start numbering at 1.

<point3>patch.getVert <obj> <index>

patch.setVert <obj> <index> <point3>

<point3> patch.getVec <obj> <index>

patch.setVec <obj> <index> <point3>

The following two functions are the main mechanism for creating individual patches in the patch mesh:

patch.makeQuadPatch <obj> <index> <va> <vab> <vba> <vb> <vbc> <vcb> <vc> <vcd> <vdc> <vd> <vda> <vad> <i1> <i2> <i3> <i4> <sm>

where:

index = The index of the patch to create (0> = index < numPatches).

va = The first vertex.

vab = Vector ab.

vba = Vector ba.

vb = The second vertex.

vbc = Vector bc.

vcb = Vector cb.

vc = The third vertex.

vcd = Vector cd.

vdc = Vector dc.

vd = The fourth vertex.

vda = Vector da.

vad = Vector ad.

i1 = Interior 1.

i2 = Interior 2.

i3 = Interior 3.

i4 = Interior 4.

sm = The smoothing group mask

patch.makeTriPatch <obj> <index> <va> <vab> <vba> <vb> <vbc> <vcb> <vc> <vca> <vac> <i1> <i2> <i3> <sm>

where:

index = The index of the patch to create (0> = index < numPatches).

va = The first vertex.

vab = Vector ab.

vba = Vector ba.

vb = The second vertex.

vbc = Vector bc.

vcb = Vector cb.

vc = The third vertex.

vca = Vector ca.

vac = Vector ac.

i1 = Interior 1.

i2 = Interior 2.

i3 = Interior 3.

sm = The smoothing group mask

The following function forces all the geometry and topology caches to be rebuilt, change notifications to be sent and a screen redraw request to be flagged.

You must call this function after making any changes to a path object before exiting the script making the changes otherwise and invalid patch may bepassed to MAX possibly causing a crash. The patch.update() function is similar in function and purpose to the update() function in mesh object scripting.

patch.update <obj>

The following functions give access to the topology of an existing patch object. They return either indexes or arrays of indexes of the sub-objects requested.

getVertVecs() returns an array of the vectors coming out of the specified vertex.

<integer_array> patch.getVertVecs <obj> <index>

<integer_array> patch.getVertPatches <obj> <index>

<integer_array> patch.getVertEdges <obj> <index>

<integer> patch.getVecVert <obj> <index>

<integer_array> patch.getVecPatches <obj> <index>

<integer> patch.getEdgeVert1 <obj> <index>

<integer> patch.getEdgeVert2 <obj> <index>

<integer> patch.getEdgeVec12 <obj> <index>

<integer> patch.getEdgeVec21 <obj> <index>

The following functions access and manipulate the texture mapping information in the patch object:

<integer>patch.getNumMaps <obj>

patch.setNumMaps <obj> <num> [keep:<bool>]

<boolean>patch.getMapSupport <obj> <map_chan>

patch.setMapSupport <obj> <map_chan> [init:<boolean>]

<integer>patch.getNumMapVerts <obj> <map_index>

patch.setNumMapVerts <obj> <map_chan> <num> [keep:<boolean>]

<point3>patch.getMapVert <obj> <map_chan> <index>

patch.setMapVert <obj> <map_chan> <index> <point3>

<index_array> patch.getMapPatch <obj> <map_chan> <index>

patch.setMapPatch <obj> <map_chan> <index> <index_array>

patch.maxMapChannels <obj>

patch.setNumMapPatches <obj> <map_chan> <num> [keep:<boolean>]

The following functions get and set the material ID for the patch object as a whole or for individual patches:

<integer> patch.getMtlID <obj>

patch.setMtlID <obj> <mtl_id>

<integer> patch.getPatchMtlID <obj> <index>

patch.setPatchMtlID <obj> <patch_index> <mtl_id>

The following functions access and control viewport and renderer tessellation and visibility:

patch.setMeshSteps <obj> <steps>

patch.getMeshSteps <obj>

patch.setMeshStepsRender <obj> <steps>

patch.getMeshStepsRender <obj>

patch.setShowInterior <obj> <bool>

patch.getShowInterior <obj>

patch.setAdaptive <obj> <bool>

patch.getAdaptive <obj>

The following functions access topology info for the specified sub-object:

<integer_array> patch.getEd ges <obj> <v1> [<v2>]

<integer_array> patch.getPatches <obj> <v1> [<v2>]

<integer_array> patch.getVectors <obj> <vert>

The following function transforms all the vertices and vectors in the patch object by the given matrix. This transform happens in object local space.

patch.transform <obj> <matrix3>

The following functions perform various high-level operations on a patch object:

patch.weldVerts <obj> <threshold> <weldIdentical_bool> <startVert>

patch.weld2Verts <obj> <v1> <v2>

patch.weldEdges <obj>

patch.deletePatchParts <obj> <del_vert_bitarray> <del_patches_bitarray>

patch.clonePatchParts <obj> <patch_bit_array>

patch.subdivideEdges <obj> <propagate>

patch.subdividePatches <obj> <propagate>

patch.addTriPatch <obj>

patch.addQuadPatch <obj>

The following functions get and manipulate surface normal information. Again, normal vectors are given in MAXScript's current working coordinate context.

patch.patchNormal <obj> <patch>

patch.edgeNormal <obj> <edge>

patch.updatePatchNormals <obj>

patch.flipPatchNormal <obj> <patch>

patch.unifyNormals <obj>

patch.autoSmooth <obj> <angle> <useSel_bool> <preventIndirectSmoothing_bool>

The following functions access and change the vertex and interior vertex types:

patch.changeVertType <obj> <vert> #corner|#coplanar

patch.getVertType <obj> <vert> -> #corner or #coplanar

patch.changePatchInteriorType <obj> <patch> #automatic|#manual

patch.getPatchInteriorType <obj> <patch> -> #automatic or #manual

The following function returns the current mesh tessellation for the patch object:

<mesh value> patch.getMesh <obj>

The following functions are used to interpolate individual patch surfaces. A tri-patch interpolation takes u,v,w barycentric coordinates. A quad-patch takes u and c parameters. In both cases, the point returns is given in the current MAXScript working coordinate context.

<point3> patch.interpTriPatch <obj> <patch> <u> <v> <w>

<point3> patch.interpQuadPatch <obj> <patch> <u> <v>

SubObject Selection

The following methods require a selection to operate on. Using them with out selection will give no results.

subDivideEdges:

Quadpatch lengthsegs:1 widthsegs:1 length:100 width:100 isSelected:on

convertTo $ Editable_Patch

$.selectededges = #{1}

patch.subdivideEdges $ false

patch.update $

subdividePatches:

Quadpatch lengthsegs:1 widthsegs:1 length:100 width:100 isSelected:on

convertTo $ Editable_Patch

$.selectedfaces = #{1}

patch.subdividePatches $ false

patch.update $

addTriPatch/addQuadPatch:

Quadpatch lengthsegs:1 widthsegs:1 length:100 width:100 isSelected:on

convertTo $ Editable_Patch

$.selectededges = #{1}

patch.addTriPatch $

patch.update $

$.selectededges = #{3}

patch.addQuadPatch $

patch.update $

See also

Patch_Select - superclass: modifier

Patch : GeometryClass


Patch : GeometryClass

Patches are the general editable versions of all the patch objects, in the same way that Editable Meshes relate to geometry objects. They are the objects that a patch is converted to when you apply an Edit Patch modifier and the result of collapsing a modifier stack on a patch base object. While MAXScript lets you construct patches, there are no properties or methods for accessing or modifying the sub-objects (vertices, edges, and patches) within the patch object.

Constructor

Quadpatch ...

Tripatch ...

To create a Patch scene object from scratch, you call the Patch constructor function,

FOR EXAMPLE

Quadpatch pos:[10,10,10] name:"foo"

This creates an empty patch.

convertTo <node> Editable_Patch -- mapped

Converts the given scene node to a Patch object. If the object cannot be converted (typically, if it is not a geometry object), the function returns undefined. Any modifiers present will be collapsed. The collapseStack() function can also be used as can the collapse button in the modifier stack dialog in 3ds Max; both generate a Patch, but will only do so if there is at least one modifier present.

Properties

A control vertex and its tangents are available as properties once a controller has been assigned to the control vertex. The number of tangents for a control vertex is the number of edges associated with the control vertex. Controllers can not be assigned to the control vertices using MAXScript. If a TriPatch object is collapsed to Editable_Patch and some of its control vertices are animated, the properties for the control vertices and tangents would be similar to:

$TriPatch01.Vertex_1 Point3 value: [-21.5,-6.4,0] -- animatable

$TriPatch01.Vertex_1_Vector_1 Point3 value: [-21.5,-2.1,0] -- animatable

$TriPatch01.Vertex_1_Vector_2 Point3 value: [-7.1,-6.4,0] -- animatable

$TriPatch01.Vertex_2 Point3 value: [21.5,-6.4,0] -- animatable

$TriPatch01.Vertex_2_Vector_1 Point3 value: [7.1,-6.4,0] -- animatable

$TriPatch01.Vertex_2_Vector_2 Point3 value: [7.1,-2.1,0] -- animatable

See also Class and Object Inspector Functions for details on accessing the patch vertices and tangents. The controller values assigned to the vertices and tangent handles is in object space. See Using Node Transform Properties for information on converting between world space to object space.

Methods

getPatchSteps <editable_patch_node>

Returns the number of steps the patch uses in the viewports, and reflects the View Steps spinner in the Modify panel.

setPatchSteps <editable_patch_node> <integer>

Sets the number of View Steps used by the editable patch object to the specified value.

Editable Patch Modify Panel Command Modes and Operations

A suite of methods provide the ability for a script to invoke Editable Patch and Edit Mesh Modify panel modes and operations, corresponding to buttons available at various mesh sub-object levels. These methods reside in the patchOps global structure. These methods effectively "push the button" in the Modify panel. In order to use these methods, the node must be selected and the Modify panel open. In the description of these methods, the first argument <editable_patch_node_or_modifier> should be interpreted as either an Editable Patch node where the modifier stack level is at the base object, or an Edit Patch modifier where the modifier stack level is at the Edit Patch. In all cases, the following methods work at the current sub-object level, but only if that level is appropriate for the invoked operation.

The follow methods invoke one of the 'user-interaction' button operations in the Editable Patch Modify panel, acting on the currently selected sub-objects. These methods highlight the corresponding button in the Geometry rollout and start the operation, at which point the user interactively completes the operation. These methods return after starting the operation, and before the user completes the operation, so care should be taken to ensure that your script does not interfere with the operation. Invoking any of these methods is the same as clicking on the associated button in the Modify panel. Calling a method when the operation is already in effect (either due to a user action or a MAXScript command) causes the operation to be terminated and the highlight is removed from the button.

patchOps.startAttach <editable_patch_node_or_modifier>

Enters "Attach" command mode - valid in all Sub-Object levels, and when not in Sub-Object mode.

patchOps.startBevel <editable_patch_node_or_modifier>

Enters "Bevel" command mode - valid in Patch Sub-Object level.

patchOps.startBind <editable_patch_node_or_modifier>

Enters "Bind" command mode - valid in Vertex Sub-Object level.

patchOps.startCreate <editable_patch_node_or_modifier>

Enters "Create" command mode - valid in Vertex, Patch, and Element Sub-Object levels.

patchOps.startExtrude <editable_patch_node_or_modifier>

Enters "Extrude" command mode - valid in Patch Sub-Object level.

patchOps.startFlipNormalMode <editable_patch_node_or_modifier>

Enters "Flip Normal" command mode - valid in Patch and Element Sub-Object levels.

patchOps.startWeldTarget <editable_patch_node_or_modifier>

Enters "Weld Target" command mode - valid in Vertex Sub-Object level.

The following methods invoke one of the 'instantaneous' button operations in the Editable Patch Modify panel, acting on the currently selected sub-objects:

patchOps.addTri <editable_patch_node_or_modifier>

Adds a TriPatch to the selected edge - valid in Edge Sub-Object level.

patchOps.addQuad <editable_patch_node_or_modifier>

Adds a QuadPatch to the selected edge - valid in Edge Sub-Object level.

patchOps.break <editable_patch_node_or_modifier>

Creates a new vertex for each patch attached to the selected sub-objects - valid in Vertex and Edge Sub-Object levels.

patchOps.clearAllSG <editable_patch_node_or_modifier>

Clears the smoothing groups on the currently selected patches - valid in Face, Polygon, and Element Sub-Object levels.

patchOps.createShapeFromEdges <editable_patch_node_or_modifier>

Displays Create Shape dialog allowing the user to specify an object name for the shape to create from the selected edges. Valid in Edge Sub-Object level.

patchOps.delete <editable_patch_node_or_modifier>

Deletes the selected sub-objects - valid in all Sub-Object levels.

patchOps.detach <editable_patch_node_or_modifier>

Displays Detach dialog allowing the user to specify an object name. Valid in Patch Sub-Object level.

patchOps.flipNormal <editable_patch_node_or_modifier>

Flips the normal of the selected patches - valid in Patch and Element Sub-Object levels.

patchOps.hide <editable_patch_node_or_modifier>

Hides the selected sub-objects - valid in all Sub-Object levels.

patchOps.selectByID <editable_patch_node_or_modifier>

Display a Select By Material ID dialog and choose patches with the specified material ID - valid in Patch and Element Sub-Object levels.

patchOps.selectBySG <editable_patch_node_or_modifier>

Display a Select By Smooth Groups dialog and choose patches with the specified smoothing groupd IDs - valid in Patch and Element Sub-Object levels.

patchOps.selectOpenEdges <editable_patch_node_or_modifier>

Selects all edges with only one patch. Valid in Edge Sub-Object level.

patchOps.subdivide <editable_patch_node_or_modifier>

Divides the selected sub-objects - valid in Edge and Patch Sub-Object levels.

patchOps.unbind <editable_patch_node_or_modifier>

Unbinds the selected vertices - valid in Vertex Sub-Object level.

patchOps.unifyNormal <editable_patch_node_or_modifier>

Unifies the normals of the selected patches - valid in Patch and Element Sub-Object levels.

patchOps.unhideAll <editable_patch_node_or_modifier>

Unhides all hidden sub-objects -valid in all Sub-Object levels, and when not in Sub-Object mode.

patchOps.weld <editable_patch_node_or_modifier>

Welds the selected vertices - valid in Vertex Sub-Object level.

The following methods are available in 3ds Max 6 and higher:

patchOps.growSelection <editable_patch_node_or_modifier>

Grows the selection - valid in all Sub-Object levels except for Handle.

patchOps.shrinkSelection <editable_patch_node_or_modifier>

Shrink the selection - valid in all Sub-Object levels except for Handle.

patchOps.selectEdgeRing <editable_patch_node_or_modifier>

Select a ring of edges - valid in Edge Sub-Object level.

patchOps.selectEdgeLoop <editable_patch_node_or_modifier>

Select a loop of edges - valid in Edge Sub-Object level.

patchOps.patchSmooth <editable_patch_node_or_modifier>

Smooth the patch by avergaing the Handles.

patchOps.toggleShadedFaces <editable_patch_node_or_modifier>

Toggle shaded faces

There is also a patch structure containing a large number of functions for creating, modifying and accessing patch objects.

The following function is used to get the type of the patch.

patch.getPatchType < patch_object >

Returns #triPatch, #quadPatch, #undefPatch, or 'undefined'. A value of #undefPatch may be returned by third-party-defined patch object. A value of 'undefined' will be returned if the internal patch type is not in the list of defined values.

Get and set the overall geometry of the patch

Set keep:true to the setNumXXX functions for them to retain existing vertex/vector/patch/edge data. This value defaults to false, which cleans out the geometry

patch.getNumVerts <obj>

Returns the number of vertices as integer value

patch.setNumVerts <obj> <num> [keep:<boolean>]

Sets the number of vertices to the integer value

patch.getNumVecs <obj>

Returns the number of vectors as integer value

patch.setNumVecs <obj> <num> [keep:<boolean>]

Sets the number of vectors to the integer value

patch.getNumPatches <obj>

Returns the number of patches as integer value

patch.setNumPatches <obj> <num> [keep:<boolean>]

Sets the number of patches to the integer value

patch.getNumEdges <obj>

Returns the number of edges as integer value

patch.setNumEdges <obj> <num> [keep:<boolean>]

Sets the number of edges to the integer value

Get and set individual vertex and vector handle locations

The vertex and vector coordinates are interpreted in MAXScript's current working coordinate context. Consistent with the rest of MAXScript, all vertex/patch/vector/edge indexes start numbering at 1.

patch.getVert <obj> <index>

Returns the indexed vertex as Point3 value

patch.setVert <obj> <index> <point3>

Sets the indexed vertex to the Point3 value

patch.getVec <obj> <index>

Returns the indexed vector as Point3 value

patch.setVec <obj> <index> <point3>

Sets the indexed vector to the Point3 value

Creating individual patches in the patch mesh

patch.makeQuadPatch <obj> <index> <va> <vab> <vba> <vb> <vbc> <vcb> <vc> <vcd> <vdc> <vd> <vda> <vad> <i1> <i2> <i3> <i4> <sm>

where:

index = The index of the patch to create (0> = index < numPatches).

va = The first vertex.

vab = Vector ab.

vba = Vector ba.

vb = The second vertex.

vbc = Vector bc.

vcb = Vector cb.

vc = The third vertex.

vcd = Vector cd.

vdc = Vector dc.

vd = The fourth vertex.

vda = Vector da.

vad = Vector ad.

i1 = Interior 1.

i2 = Interior 2.

i3 = Interior 3.

i4 = Interior 4.

sm = The smoothing group mask

patch.makeTriPatch <obj> <index> <va> <vab> <vba> <vb> <vbc> <vcb> <vc> <vca> <vac> <i1> <i2> <i3> <sm>

where:

index = The index of the patch to create (0> = index < numPatches).

va = The first vertex.

vab = Vector ab.

vba = Vector ba.

vb = The second vertex.

vbc = Vector bc.

vcb = Vector cb.

vc = The third vertex.

vca = Vector ca.

vac = Vector ac.

i1 = Interior 1.

i2 = Interior 2.

i3 = Interior 3.

sm = The smoothing group mask

Update a Patch object:

patch.update <obj>

Forces all geometry and topology caches to be rebuilt, change notifications to be sent and a screen redraw request to be flagged

You must call this function after making any changes to a path object, before exiting the script. If you make the changes otherwise, an invalid patch may be passed to MAX, possibly causing a crash. The patch.update() function is similar in function and purpose to the update() function in mesh object scripting.

Accessing the topology of an existing patch object:

They return either indexes or arrays of indexes of the sub-objects requested. For example, getVertVecs() returns an array of the vectors coming out of the specified vertex.

patch.getVertVecs <obj> <index> -> integer_array

patch.getVertPatches <obj> <index> -> integer_array

patch.getVertEdges <obj> <index> -> integer_array

patch.getVecVert <obj> <index> -> integer

patch.getVecPatches <obj> <index> -> integer_array

patch.getEdgeVert1 <obj> <index> -> integer

patch.getEdgeVert2 <obj> <index> -> integer

patch.getEdgeVec12 <obj> <index> -> integer

patch.getEdgeVec21 <obj> <index> -> integer

Accessing and manipulating the texture mapping information

patch.setNumMaps <obj> <num> [keep:<bool>]

patch.getNumMaps <obj> -> integer

patch.setMapSupport <obj> <map_chan> [init:<boolean>]

patch.getMapSupport <obj> <map_chan> -> boolean

patch.maxMapChannels <obj>

patch.setNumMapVerts <obj> <map_chan> <num> [keep:<boolean>]

patch.getNumMapVerts <obj> <map_index>

patch.setNumMapPatches <obj> <map_chan> <num> [keep:<boolean>]

patch.getMapVert <obj> <map_chan> <index>

patch.setMapVert <obj> <map_chan> <index> <point3>

patch.getMapPatch <obj> <map_chan> <index>

patch.setMapPatch <obj> <map_chan> <index> <index_array>

Getting and setting the material ID of the whole object or individual patches

patch.getPatchMtlID <obj> <index> -> integer

patch.setPatchMtlID <obj> <patch_index> <mtl_id>

NOTE:

The material ID value returned by patch.getPatchMtlID and set by patch.setPatchMtlID are now 1-based. The material ID value was 0-based in 3ds Max 4.

Accessing and controlling viewport and renderer tesselation and visibility

patch.setMeshSteps <obj> <steps>

patch.getMeshSteps <obj>

patch.setMeshStepsRender <obj> <steps>

patch.getMeshStepsRender <obj>

patch.setShowInterior <obj> <bool>

patch.getShowInterior <obj>

patch.setAdaptive <obj> <bool>

patch.getAdaptive <obj>

Accessing topology info for the specified sub-object

patch.getEdges <obj> <v1> [<v2>] -> integer_array

patch.getPatches <obj> <v1> [<v2>] -> integer_array

patch.getVectors <obj> <vert> -> integer_array

Transforming all vertices and vectors in the patch object by the given matrix

patch.transform <obj> <matrix3>

This transform happens in object local space.

Performing various high-level operations on a patch object

patch.weldVerts <obj> <threshold> <weldIdentical_bool> <startVert>

patch.weld2Verts <obj> <v1> <v2>

patch.weldEdges <obj>

patch.deletePatchParts <obj> <del_vert_bitarray> <del_patches_bitarray>

patch.clonePatchParts <obj> <patch_bit_array>

patch.subdivideEdges <obj> <propogate>

patch.subdividePatches <obj> <propogate>

patch.addTriPatch <obj>

patch.addQuadPatch <obj>

etting and manipulating surface normal information

patch.patchNormal <obj> <patch>

patch.edgeNormal <obj> <edge>

patch.updatePatchNormals <obj>

patch.flipPatchNormal <obj> <patch>

patch.unifyNormals <obj>

patch.autoSmooth <obj> <angle> <useSel_bool> <preventIndirectSmoothing_bool>

Normal vectors are given in MAXScript's current working coordinate context.

ccessing and changing the vertex and interior vertex types

patch.changeVertType <obj> <vert> #corner|#coplanar

patch.getVertType <obj> <vert> -> #corner or #coplanar

patch.changePatchInteriorType <obj> <patch> #automatic|#manual

patch.getPatchInteriorType <obj> <patch> -> #automatic or #manual

Accessing the current mesh tesselation for the patch object

patch.getMesh <obj> -> mesh value

Interpolating individual patch surfaces

patch.interpTriPatch <obj> <patch> <u> <v> <w> -> point3

patch.interpQuadPatch <obj> <patch> <u> <v> -> point3

A tri-patch interpolation takes u,v,w barycentric coordinates . A quad-patch takes u and c parameters. In both cases, the point returns is given in the current MAXScript working coordinate context.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods

Class and Object Inspector Functions

Scripting Vertex and Control Point Animation


Editable_Poly: GeometryClass

Editable_Poly - superclass: GeometryClass; super-superclass:node - classID: #(469250957, 422535320)

Editable_Poly is the general editable version of all the editable poly objects, in the same way that Editable meshes relate to geometry objects. They are the class of node objects that are the result of collapsing a modifier stack to an Editable Poly object.

Constructor

Class instances not creatable by MAXScript.

NOTE:

While Editable_Poly class instances cannot be created directly by MAXScript, geometry objects of other classes can be converted to Editable_Poly.

EXAMPLE

ep = editable_mesh name:(uniquename "EPoly") --create an empty EMesh

convertTo ep (Editable_Poly) --convert to Editable_Poly

Alias

EditablePolyMesh

Editable_Poly Topics:

Editable_Poly Properties

Editable_Poly Methods

Editable_Poly Geometry Methods (polyOp struct)

Editable_Poly Mapping Methods(polyOp struct)

Interface: EditablePoly


Editable_Poly Properties

Roll over and click a Rollout to jump to its description

Selection Rollout

Roll over and click a Rollout or Control to jump to its description

Selection Properties

<Editable_Poly>.selByVertex Boolean default: false -- boolean; Select_By_Vertex

Get/Set the By Vertex checkbox in the Selection rollout.

<Editable_Poly>.ignoreBackfacing Boolean default: false -- boolean; Ignore_Backfacing_in_Selections

Get/Set the state of the Ignore Backfacing checkbox in the Selection rollout.

<Editable_Poly>.selectByAngle BooleanClass default: false -- boolean; Select_by_Angle

Get/set the state of the By Angle checkbox.

<Editable_Poly>.selectAngle Float default: 45.0 -- angle; Selection_Angle

Get/Set the By Angle value.

<Editable_Poly>.ringEdgeSel Integer default: 0 -- integer; Ring_Sel

Get/Set the Edge Ring value. Available in 3ds Max 8 and higher.

<Editable_Poly>.loopEdgeSel Integer default: 0 -- integer; Loop_Sel

Get/Set the Edge Loop value. Available in 3ds Max 8 and higher.

Preview Selection

<Editable_Poly>.selectMode Integer default: 0 -- integer; Select_Mode

Get/Set the Preview Selection Mode in 3ds Max 2008 and higher.

Possible values are:

0 - Off

1 - SubObj

2 - Multi

Soft Selection Rollout

Roll over and click a Rollout or Control to jump to its description

Soft Selection Properties

<Editable_Poly>.useSoftSel Boolean default: false -- boolean; Use_Soft_Selection

Get/Set the state of the "Use Soft Selection" checkbox in the Soft Selection rollout.

<Editable_Poly>.ssUseEdgeDist Boolean default: false -- boolean; Use_Edge_Distance

Get/Set the state of the Edge Distance checkbox in the Soft Selection rollout.

<Editable_Poly>.ssEdgeDist Integer default: 1 -- integer; Edge_Distance

Get/Set the Edge Distance value in the Soft Selection rollout

<Editable_Poly>.affectBackfacing Boolean default: true -- boolean; Affect_Backfacing

Get/Set the state of the Affect Backfacing checkbox in the Soft Selection rollout.

<Editable_Poly>.falloff Float default: 20.0 -- animatable; world units

Get/Set the Falloff value in the Soft Selection rollout.

<Editable_Poly>.pinch Float default: 0.0 -- animatable; world units

Get/Set the Pinch value in the Soft Selection rollout.

<Editable_Poly>.bubble Float default: 0.0 -- animatable; world units

Get/Set the Bubble value in the Soft Selection rollout.

Paint Soft Selection

<Editable_Poly>.lockSoftSel BooleanClass default: false -- boolean; Lock_Soft_Selection

Get/Set the state of the Lock Soft Selection checkbox. When locked, the soft selection will not be recalculated dynamically based on the existing "hard" selection and will allow for custom soft selection values to be painted using a brush.

<Editable_Poly>.paintSelSize Float default: 10.0 -- world units; Brush_Size

Get/Set the Size of the Soft Selection brush.

<Editable_Poly>.paintSelStrength Float default: 1.0 -- float; Brush_Strength

Get/Set the Strength of the Soft Selection brush.

<Editable_Poly>.paintSelValue Float default: 1.0 -- float; Selection_Value

Get/Set the Soft Selection Value to be painted with.

Edit Vertices Rollout

Roll over and click a Rollout or Control to jump to its description

Remove Vertex

No related properties exposed.

For methods related to removing vertices, see

EditablePoly Interface - Remove

EditablePoly Interface - UI Commands - buttonOp #Remove method

Break Vertex

<Editable_Poly>.vertexBreak Float default: 0.0 -- worldUnits; Vertex_Break

Get/Set the Vertex Break value. Available in 3ds Max 8 and higher.

For methods related to breaking vertices, see

EditablePoly Methods - Break / Divide / Split

EditablePoly Interface - Break / Split / Divide

EditablePoly Interface - UI Commands - buttonOp #BreakVertex method

Vertex Extrude/Chamfer Values

<Editable_Poly>.vertexChamfer Float default: 1.0 -- world units; Vertex_Chamfer_Amount

Get/Set the Vertex Chamfer Amount value.

<Editable_Poly>.vertexChamferOpen BooleanClass default: false -- boolean; Open_Chamfer

Get/Set the state of the "Open" checkbox in the Vertex Chamfer options dialog. When set to true, the new polygons created by the Chamfer operation will be removed, leaving an opening.

Available in 3ds Max 8 and higher.

<Editable_Poly>.vertexExtrudeHeight Float default: 10.0 -- world units; Vertex_Extrude_Height

Get/Set the Vertex Extrusion Height value

<Editable_Poly>.vertexExtrudeWidth Float default: 3.0 -- float; Vertex_Extrude_Width

Get/Set the vertex extrusion Base Width value

For methods related to extruding and chamfering vertices, see

EditablePoly Interface - Chamfer

EditablePoly Interface - UI Commands - buttonOp #Chamfer method

Weld

<Editable_Poly>.weldPixels Integer default: 4 -- integer; Weld_Pixel_Threshold

Get/Set the Target Weld Pixel Threshold value.

<Editable_Poly>.weldThreshold Float default: 0.1 -- world units; Vertex_Weld_Threshold

Get/Set the Weld Threshold value.

For methods related to welding vertices, see

EditablePoly Interface - Weld

EditablePoly Interface - UI Commands - buttonOp #WeldSelected method

Connect

No related properties exposed.

For methods related to connecting vertices, see

EditablePoly Interfac - Connect

EditablePoly Interface - UI Commands - buttonOp #ConnectVertices method

EditablePoly Interface - Preview Mode - previewBegin #ConnectVertices and popupDialog #ConnectVertices methods

Remove Isolated Vertices

No related properties exposed.

For methods related to removing isolated vertices, see

EditablePoly Interface - Delete

EditablePoly Interface - UI Commands - buttonOp #ConnectVertices method

EditablePoly Interface - Preview Mode - previewBegin #ConnectVertices and popupDialog #ConnectVertices methods

Remove Unused Map Vertices

No related properties exposed.

For methods related to removing unused map vertices, see

EditablePoly Interface - Delete

Vertex Weight

No related properties or methods exposed.

Edit Edges Rollout

Roll over and click a Rollout or Control to jump to its description

Insert Vertex In Edge

No related properties exposed.

For methods related to inserting vertices in edges, see

EditablePoly Interface - Insert Vertex

Remove

No related properties exposed.

For methods related to removing edges, see

EditablePoly Interface - Remove

Split

No related properties exposed.

For methods related to splitting edges, see

polyOp Methods - Break/Divide/Split

EditablePoly Interface - Break/Split/Divide

Edge Chamfer/Extrude Values

<Editable_Poly>.edgeChamfer Float default: 1.0 -- world units; Edge_Chamfer

Get/Set the Edge Chamfer Amount value.

<Editable_Poly>.edgeChamferOpen BooleanClass default: false -- boolean; Open_Chamfer

Get/Set the state of the "Open" checkbox in the Edge Chamfer options dialog. When set to true, the new polygons created by the Chamfer operation will be removed, leaving an opening. Available in 3ds Max 8 and higher.

<Editable_Poly>.edgeExtrudeHeight Float default: 10.0 -- world units; Edge_Extrude_Height

Get/Set the Edge Extrusion Height value

<Editable_Poly>.edgeExtrudeWidth Float default: 3.0 -- float; Edge_Extrude_Width

Get/Set the edge extrusion Base Width value

<Editable_Poly>.edgeWeldThreshold Float default: 0.1 -- world units; Edge_Weld_Threshold

Get/Set the edge weld threshold value

<Editable_Poly>.edgeChamferSegments Integer default: 1 -- integer; Edge_Chamfer_Segments

Get/Set the Edge Chamfer Segments amount. Adding Segments to the Edge Chamfer effectively performs an Edge Fillet, rounding the edge. Available in 3ds Max 2008 and higher.

For related methods, see

polyOp Methods - Extrude/Bevel/Chamfer

Weld

No related properties exposed.

For methods related to welding, see

polyOp Methods - Weld

EditablePoly Interface - Weld

Bridge

No related properties exposed.

For methods related to bridging edges, see

EditablePoly Interface - Bridge

Connect

<Editable_Poly>.connectEdgeSegments Integer default: 1 -- integer; Connect_Edge_Segments

Get/Set the default Connect Edge Segments value.

<Editable_Poly>.connectEdgePinch Integer default: 0 -- integer; Connect_Edge_Pinch

Get/Set the Pinch value in the Edge Connect options dialog. Available in 3ds Max 8 and higher.

<Editable_Poly>.connectEdgeSlide Integer default: 0 -- integer; Connect_Edge_Slide

Get/Set the Slide value in the Edge Connect options dialog. Available in 3ds Max 8 and higher.

For methods related to connecting edges, see

EditablePoly Interface - Connect

EditablePoly Interface - UI Commands - buttonOp #ConnectEdges method

Create Shape From Selection

No related properties exposed.

For methods related to creating Shape from selected edges, see

polyOp Methods - Create Shape From Edges

EditablePoly Interface - Create Shape From Edges

Edit Triangulation / Turn Edge

No related properties exposed.

For methods related to editing triangulation, see

EditablePoly Interface - Triangulation

Edit Borders Rollout

Roll over and click a Rollout or Control to jump to its description

Extrude/Chamfer

See Extrude/Chamfer Edges .

Insert Vertex

No related properties exposed.

For methods related to inserting vertices in borders, see

EditablePoly Interface - Insert Vertex

Cap

No related properties exposed.

For methods related to capping borders, see

EditablePoly Interface - Create - capHoles method

EditablePoly Interface - UI Commands - buttonOp #Cap method

EditablePoly Interface - Preview Mode - previewBegin #Cap and popupDialog #Cap methods

Bridge

No related properties exposed.

For methods related to bridging edges, see

EditablePoly Interface - Bridge

Connect

See Connect Edges .

Create Shape From Selection

No related properties exposed.

For methods related to creating Shape from selected edges, see

polyOp Methods - Create Shape From Edges

EditablePoly Interface - Create Shape From Edges

Edit Triangulation / Turn Edge

No related properties exposed.

For methods related to editing triangulation, see

EditablePoly Interface - Triangulation

Edit Polygons Rollout

Roll over and click a Rollout or Control to jump to its description

Insert Vertex

No related properties exposed.

For methods related to inserting vertices, see

EditablePoly Interface - Insert Vertex

Extrude

<Editable_Poly>.extrusionType Integer default: 0 -- integer; Type_of_Extrusion

Get/Set the Extrusion Type in the Extrude dialog

0 - Group

1 - Local Normal

2 - by Polygon

<Editable_Poly>.faceExtrudeHeight Float default: 10.0 -- world units; Face_Extrude_Height

Get/Set the Face Extrusion Height value

For methods related to extruding faces, see

EditablePoly Interface - Extrude Faces

Outline

<Editable_Poly>.outlineAmount Float default: -1.0 -- world units; Outline_Amount

Get/Set the Outline Amount value.

For methods related to outlining, see

EditablePoly Interface - Outline

EditablePoly Interface - UI Commands - buttonOp #Outline method

Bevel

<Editable_Poly>.bevelHeight Float default: 10.0 -- world units; Bevel_Height

Get/Set the Bevel Extrusion Height value

<Editable_Poly>.bevelOutline Float default: -1.0 -- world units; Bevel_Outline

Get/Set the Bevel Outline value.

<Editable_Poly>.bevelType Integer default: 0 -- integer; Type_of_Bevel

Get/Set the Extrusion Type in the Bevel dialog

0 - Group

1 - Local Normal

2 - by Polygon

For related methods, see

EditablePoly Interface - Bevel

EditablePoly Interface - UI Commands - buttonOp #Bevel method

Inset

<Editable_Poly>.insetAmount Float default: 1.0 -- world units; Inset_amount

Get/Set the Inset Amount value.

<Editable_Poly>.insetType Integer default: 0 -- integer; Inset_Type

Get/Set the Inset Type:

0 - Group

1 - By Polygon

For related methods, see

EditablePoly Interface - UI Commands - buttonOp #Inset method

Bridge

<Editable_Poly>.bridgeSelected Integer default: 1 -- integer; Bridge_Selected

Get/Set the state of the Bridge mode radio button.

Possible values are:

0 - Use Specific Polygons/Edges

1 - Use Polygon/Edge Selection (default)

<Editable_Poly>.bridgeSegments Integer default: 1 -- animatable; integer; Bridge_Segments

Get/Set the number of Bridge Segments.

<Editable_Poly>.bridgeTaper Float default: 0.0 -- animatable; float; Bridge_Taper

Get/Set the Bridge Polygons > Taper value

<Editable_Poly>.bridgeBias Float default: 0.0 -- animatable; float; Bridge_Bias

Get/Set the Bridge Polygons > Bias value.

<Editable_Poly>.bridgeSmoothThreshold Float default: 45.0 -- animatable; angle; Bridge_Smooth_Threshold;

Get/Set the Bridge Polygons > Smooth and Bridge Edges > Smooth Threshold value.

<Editable_Poly>.bridgeTarget1 Integer default: 0 -- integer; Bridge_Target_1

Get/Set the index of the Polygon 1 / Edge 1.

<Editable_Poly>.bridgeTwist1 Integer default: 0 -- integer; Bridge_Twist_1

Get/Set the first Twist value in Bridge Polygon mode.

<Editable_Poly>.bridgeTarget2 Integer default: 0 -- integer; Bridge_Target_2

Get/Set the index of the Polygon 2 / Edge 2.

<Editable_Poly>.bridgeTwist2 Integer default: 0 -- integer; Bridge_Twist_2

Get/Set the second Twist value in Bridge Polygon mode.

<Editable_Poly>.bridgeReverseTriangle Integer default: 0 -- integer; Reverse_Triangle

Get/Set the state of the Reverse Triangulation checkbox.

Available in 3ds Max 8 and higher.

Possible values are

0 - disabled

1 - enabled

<Editable_Poly>.bridgeAdjacentAngle Float default: 45.0 -- angle; Bridge_Adjacent

Get/Set the Bridge Edges > Bridge Adjacent value.

Available in 3ds Max 8 and higher.

For related methods, see

EditablePoly Interface - Bridge

Flip

No related properties exposed.

For methods related to flipping face normals, see

polyOp Methods - Triangulation

EditablePoly Interface - Triangulation

Hinge From Edge

<Editable_Poly>.hinge Integer default: 0 -- index

Get/Set the Hinge Edge index

<Editable_Poly>.hingeAngle Float default: 30.0 -- angle; Hinge_From_Edge_Angle

Get/Set the Hinge Angle value.

<Editable_Poly>.hingeSegments Integer default: 1 -- integer; Hinge_From_Edge_Segments

Get/Set the Hinge Segment value.

For related methods, see

EditablePoly Interface - UI Commands - buttonOp #HingeFromEdge method

Extrude Along Spline

<Editable_Poly>.extrudeAlongSplineAlign Boolean default: false -- boolean; Extrude_Along_Spline_Align

Get/Set the state of the Align To Face Normal checkbox in the Extrude Along Spline dialog.

<Editable_Poly>.extrudeAlongSplineNode UndefinedClass default: undefined -- node; Extrude_Along_Spline_Node

Get/Set the spline node for the Extrude Along Spline.

<Editable_Poly>.extrudeAlongSplineRotation Float default: 0.0 -- angle; Extrude_Along_Spline_Rotation

Get/Set the rotation value in the Extrude Along Spline dialog.

<Editable_Poly>.extrudeAlongSplineSegments Integer default: 6 -- integer; Extrude_Along_Spline_Segments

Get/Set the number of segments value in the Extrude Along Spline dialog.

<Editable_Poly>.extrudeAlongSplineTaper Float default: 0.0 -- float; Extrude_Along_Spline_Taper_Amount

Get/Set the taper amount in the Extrude Along Spline dialog.

<Editable_Poly>.extrudeAlongSplineTaperCurve Float default: 0.0 -- float; Extrude_Along_Spline_Taper_Curve

Get/Set the taper curve value in the Extrude Along Spline dialog.

<Editable_Poly>.extrudeAlongSplineTwist Float default: 0.0 -- angle; Extrude_Along_Spline_Twist

Get/Set the twist value in the Extrude Along Spline dialog.

For related methods, see

EditablePoly Interface - Extrude Faces

EditablePoly Interface - UI Commands - buttonOp #ExtrudeAlongSpline method

Edit Triangulation

No related properties exposed.

For methods related to editing triangulation, see

polyOp Methods - Triangulation

EditablePoly Interface - Triangulation

Edit Geometry Rollout

Roll over and click a Rollout or Control to jump to its description

Repeat Last

No related properties exposed.

For methods related to repeating last operation, see

EditablePoly Interface - Repeat Last Operation

Constraints

<Editable_Poly>.constrainType Integer default: 0 -- integer; Vertex_Constraint_Type

Get/Set the Edit Geometry > Constraints radio buttons selection.

Possible values are:

0 - None

1 - Edge

2 - Face

3 - Normal

Preserve UVs

<Editable_Poly>.preserveUVs BooleanClass default: false -- boolean; Preserve_UVs

Enable/Disable the Preserver UVs mode.

Available in 3ds Max 7 and higher.

Create

No related properties exposed.

For methods related to creating vertices, edges and faces, see

polyOp Methods - Create

EditablePoly Interface - Create

Collapse

No related properties exposed.

For methods related to collapsing vertices, edges and faces, see

polyOp Methods -Collapse

EditablePoly Interface - Collapse

Attach and Detach

No related properties exposed.

For methods related to attaching and detaching geometry, see

polyOp Methods - Attach

polyOp Methods - Detach

EditablePoly Interface - Attach/Detach

Cut and Slice

<Editable_Poly>.split Boolean default: false -- boolean

Get/Set the state of Split checkbox.

<Editable_Poly>.cutEndCoords Point3 default: [0,0,0] -- point3; Cut_End_Coordinates

Get/Set the Cut End Coordinates

<Editable_Poly>.cutNormal Point3 default: [0,0,0] -- point3; Cut_Normal_Direction

Get/Set the Cut Normal Vector

<Editable_Poly>.cutStartCoords Point3 default: [0,0,0] -- point3; Cut_Start_Coordinates

Get/Set the Cut Start Coordinates

<Editable_Poly>.cutStartIndex Integer default: 1 -- index; Cut_Start_Index

Get/Set the index of the Cut Start Vertex

<Editable_Poly>.cutStartLevel Integer default: 1 -- integer; Cut_Start_SO_Level

Get/Set the Cut Start Sub-Object Level

For methods related to slicing geometry, see

polyOp Methods- Slice Plane

EditablePoly Interface - Slice

EditablePoly Interface - Slice Plane

MeshSmooth Values

<Editable_Poly>.smoothness Float default: 1.0 -- float

Get/Set the Viewport Smoothness value in the Subdivision Surface rollout.

<Editable_Poly>.separateByMaterial Boolean default: false -- boolean; Separate_by_Material_ID

Get/Set the Separate By Materials checkbox in the Edit Geometry rollout > MSmooth option > MeshSmooth Selection dialog.

<Editable_Poly>.separateBySmoothing Boolean default: false -- boolean; Separate_by_Smoothing_Groups

Get/Set the Separate By Smoothing checkbox in the Edit Geometry rollout > MSmooth option > MeshSmooth Selection dialog.

For related methods see

EditablePoly Interface - Subdivide

Tessellate Values

<Editable_Poly>.tesselateBy Integer default: 0 -- integer; Tessellate_By

Get/Set the Tessellation type.

Possible values are:

0 - Edge

1 - Face

<Editable_Poly>.tessTension Float default: 0.0 -- float; Tessellation_Tension

Get/Set the Tessellation Tension.

For related methods see

EditablePoly Interface - Subdivide

Make Planar

No related properties exposed.

For methods related to making geometry planar, see

polyOp Methods - Make Planar

EditablePoly Interface - Make Planar

Relax

<Editable_Poly>.relaxAmount Float default: 0.5 -- animatable; float; Relax_Amount

Get/Set the Relax Amount value.

<Editable_Poly>.relaxHoldBoundaryPoints BooleanClass default: true -- boolean; Relax_Hold_Boundary_Points

Enable/Disable the "Hold Boundary Points" option.

<Editable_Poly>.relaxHoldOuterPoints BooleanClass default: false -- boolean; Relax_Hold_Outer_Points

Enable/Disable the "Hold Outer Points" option.

<Editable_Poly>.relaxIterations Integer default: 1 -- animatable; integer; Relax_Iterations

Get/Set the number of Relax Iterations.

For related methods see

EditablePoly Interface - Relax

Hide/Unhide

No related properties exposed.

For methods related to hiding and unhiding vertices and faces, see

polyOp Methods - Get/Set Hidden

EditablePoly Interface - Hide/Unhide

Copy/Paste Named Selection Sets

No related properties exposed.

For methods related to copying and pasting named selection sets, see

EditablePoly Interface - Copy/Paste Named Selection Sets

Delete Isolated Vertices

<Editable_Poly>.deleteIsolatedVerts BooleanClass default: true -- boolean; Delete_Isolated_Vertices

Get/Set the state of the Delete Isolated Vertices checkbox.

Available in 3ds Max 7 and higher.

For related methods see

EditablePoly Interface - Delete

Fully Interactive

<Editable_Poly>.fullyInteractive BooleanClass default: true -- boolean; Fully_Interactive

Get/Set the state of the Full Interactivity checkbox.

Edit Elements Rollout

Roll over and click a Rollout or Control to jump to its description

Insert Vertex

No related properties exposed.

For methods related to inserting vertices, see

EditablePoly Interface - Insert Vertex

Flip

No related properties exposed.

For methods related to flipping normals, see

polyOp Methods - Triangulation

EditablePoly Interface - Triangulation

Edit Triangulation

No related properties exposed.

For methods related to editing triangulation, see

polyOp Methods - Triangulation

EditablePoly Interface - Triangulation

Vertex Properties Rollout

Roll over and click a Rollout or Control to jump to its description

Select Vertices By

<Editable_Poly>.vertSelectBy Integer default: 0 -- integer; Select_Vertex_By

Get/Set the state of the Select Vertices By radio buttons.

Possible values are:

0 - Color

1 - Illumination

<Editable_Poly>.vertSelectionRedRange Integer default: 10 -- integer; Select_by_color__Red_Range

Get/Set the Red color value of the Range in the Vertex Properties rollout.

<Editable_Poly>.vertSelectionGreenRange Integer default: 10 -- integer; Select_by_color__Green_Range

Get/Set the Green color value of the Range in the Vertex Properties rollout.

<Editable_Poly>.vertSelectionBlueRange Integer default: 10 -- integer; Select_by_color__Blue_Range

Get/Set the Blue color value of the Range in the Vertex Properties rollout.

<Editable_Poly>.vertSelectionColor Color default: (color 255 255 255) -- RGB color; Vertex_Selection_Color

Get/Set the color value of the Range in the Vertex Properties rollout.

Polygon Material IDs Rollout

Roll over and click a Rollout or Control to jump to its description

Set ID

No related properties exposed.

For methods related to setting the Face Material ID, see

polyOp Methods - Face Material IDs

EditablePoly Interface - Get/Set Data

Select ID

No related properties exposed.

For methods related to selecting Faces by Material ID, see

EditablePoly Interface - UI Commands - buttonOp #SelectByMaterialID method

EditablePoly Interface - Preview Mode - previewBegin #SelectByMaterialID and popupDialog #SelectByMaterialID methods

Polygon: Smoothing Groups Rollout

Roll over and click a Rollout to jump to its description

Smoothing Groups

<Editable_Poly>.autoSmoothThreshold Float default: 45.0 -- angle; Autosmooth_angle_threshold

Get/Set the Autosmooth Threshold value in the Polygon Properties rollout > Smoothing Groups group.

Polygon Vertex Colors Rollout

Roll over and click a Rollout to jump to its description

Subdivision Surface Rollout

Roll over and click a Rollout or Control group to jump to its description

Options

<Editable_Poly>.subdivSmoothing Boolean default: true -- boolean; Smooth_Subdivision_Result

Get/Set the state of the Smooth Result checkbox in the Subdivision Surface rollout.

<Editable_Poly>.surfSubdivide Boolean default: false -- boolean; Subdivide_Surface

Get/Set the state of the Use NURMS Subdivisions checkbox in the Subdivision Surface rollout.

<Editable_Poly>.isolineDisplay Boolean  default: true ; Isoline_Display

Get/Set the Isoline Display state.

<Editable_Poly>.showCage Boolean default: true -- boolean; Show_Cage

Get/Set the state of the Show Cage checkbox in the Subdivision Surface rollout.

<Editable_Poly>.CageColor Point3 default: [1,0.588235,0] -- point3; Cage_Color

Get/Set the Cage color.

Available in 3ds Max 8 and higher.

<Editable_Poly>.selectedCageColor Point3 default: [0.94902,0.85098,0] -- point3; Selected_Cage_Color

Get/Set the Selected Cage color.

Available in 3ds Max 8 and higher.

Display Group

<Editable_Poly>.iterations Integer default: 0 -- animatable; integer

Get/Set the Subdivision Surface rollout > Display group > Iterations value.

<Editable_Poly>.surfaceSmoothness Float default: 1.0 -- animatable; float; Surface_Smoothness

Get/set the Subdivision Surface rollout > Display group > Smoothness value.

<Editable_Poly>.useRenderIterations Boolean default: false -- boolean; Use_Render_Iterations

Get/Set the state of the Render Iterations checkbox in the Subdivision Surface rollout.

Render Group

<Editable_Poly>.renderIterations Integer default: 0 -- animatable; integer; Render_Iterations

Get/Set the Subdivision Surface Render Iterations value.

<Editable_Poly>.useRenderSmoothness Boolean default: false -- boolean; Use_Render_Smoothness

Get/Set the state of the Render Smoothness checkbox in the Subdivision Surface rollout.

<Editable_Poly>.renderSmoothness Float default: 1.0 -- animatable; float; Render_Smoothness

Get/Set the Subdivision Surface rollout > Render group > Smoothness value.

Separate By Group

<Editable_Poly>.sepByMats Boolean default: false -- boolean; Separate_by_Material_ID

Get/Set the Separate By Materials checkbox in the Subdivision Surface rollout.

<Editable_Poly>.sepBySmGroups Boolean default: false -- boolean; Separate_by_Smoothing_Groups

Get/Set the Separate By Smoothing checkbox in the Subdivision Surface rollout.

Update Options Group

<Editable_Poly>.update Integer default: 0 -- integer; Update_Type

Get/Set the Update Options state:

0 - Always

1 - When Rendering

2 - Manually

Subdivision Displacement Rollout

Roll over and click a Rollout to jump to its description

<Editable_Poly>.displaceAngle Float default: 10.0 -- animatable; angle; Displacement_Angle

Get/Set the Displace Angle

<Editable_Poly>.displaceDistance Float default: 20.0 -- animatable; float; Displacement_Distance

Get/Set the Displace Distance

<Editable_Poly>.displaceEdge Float default: 20.0 -- animatable; float; Displacement_Edge

Get/Set the Displace Edge

<Editable_Poly>.displaceMaxLevels Integer default: 2 -- integer; Displacement_Max_Levels

Get/Set the Displace Max Levels

<Editable_Poly>.displaceMaxTris Integer default: 20000 -- integer; Displacement_Max_Triangles

Get/Set the Displace Max Triangles

<Editable_Poly>.displaceMethod Integer default: 3 -- integer; Displacement_Method

Get/Set the Displace Method.

Possible values are:

0 - Regular

1 - Spatial

2 - Curvature

3 - Spatial and Curvature (default)

<Editable_Poly>.displaceMinLevels Integer default: 0 -- integer; Displacement_Min_Levels

Get/Set the Displace Min Levels

<Editable_Poly>.displaceSplitMesh Boolean default: true -- boolean; Displacement_Split_Mesh

Get/Set the state of the Split Mesh checkbox in the Subdivision Displacement rollout.

<Editable_Poly>.displaceSteps Integer default: 2 -- animatable; integer; Displacement_Steps

Get/Set the Displace Steps value

<Editable_Poly>.displaceStyle Integer default: 1 -- integer; Displacement_Style

Get/Set the Displacement Style under Subdivision Displacement > Advanced Parameters

0 - Grid

1 - Tree

2 - Delaunay

<Editable_Poly>.useSubdivisionDisplacement Boolean default: false -- boolean; Use_Displacement_Subdivision

Get/Set the state of the "Subdivision Displacement" checkbox in the Subdivision Displacement rollout.

<Editable_Poly>.viewDependent Boolean default: false -- boolean; View_Dependent

Get/Set the state of the View Dependent checkbox in the Subdivision Displacement rollout.

Paint Deformation Rollout

Roll over and click a Rollout to jump to its description

<Editable_Poly>.paintDeformAxis Integer default: 1 -- integer; Push_Pull_Direction

Get/Set the state of the Push/Pull Direction radio buttons in the Paint Deformation rollout.

Possible values are:

1 - Original Normals

2 - Deformed Normals

3 - Transform Axis : X

4 - Transform Axis : Y

5 - Transform Axis : Z

<Editable_Poly>.paintDeformSize Float default: 20.0 -- world units; Deformation_Size

Get/Set the Size of the PaintDeform brush.

<Editable_Poly>.paintDeformStrength Float default: 1.0 -- float; Deformation_Strength

Get/Set the Strength of the PaintDeform brush.

<Editable_Poly>.paintDeformValue Float default: 10.0 -- float; Deformation_Value

Get/Set the Value to be painted with.


Editable_Poly Mapping Methods

The following methods are specific to mapping

WARNING!

All channels are 0-based!

polyop.setNumMaps <Poly poly> <int count> keep:<boolean=true>

Sets the number of map channels available. The number of map channels can be set from 0 to 100. Map channels 1 and 2 are the Vertex Color and default Texture Map channels. If <keep> is false, the old mapping information is discarded. If true, the old mapping information is retained after the resize.

polyop.getNumMaps <Poly poly>

Returns the number of map channels available as an <integer>.

polyop.setMapSupport <Poly poly> <int mapChannel> <Boolean support>

Sets whether the specified mapping channel is supported or not. If <support> is true, and the channel support state is currently false, a new map face array of the same size as the number of faces in the mesh is allocated, but no map vertex array is allocated. If <support> is false, and the channel support state is currently true, existing map channel face and vertex arrays are deallocated. If <support> and the current channel support state are both the same, no action is performed. SetNumMaps() is automatically called if the specified map channel is not available. <mapChannel> index values are 0-based, with Map channels 0 and 1 being the Vertex Color and default Texture Map channels.

This method was previously broken but was fixed in 3ds Max 2008.

polyop.getMapSupport <Poly poly> <int mapChannel>

Returns whether the specified map channel is supported. This signifies that a map face array is present, but not necessarily a map vertex array.

polyop.setNumMapVerts <Poly poly> <int mapChannel> <int count> keep:<boolean=false>

Sets the number of vertices for the map channel, initializing the map vertex array. If <keep> is false, the old map vertex information is discarded. If true, the old map vertex information is retained after the resize.

polyop.getNumMapVerts <Poly poly> <int mapChannel>

Returns the number of vertices for the map channel as an <integer>.

polyop.setNumMapFaces <Poly poly> <int mapChannel> <int count> keep:<boolean=false>

Sets the number of faces for the map channel. If keep is false, the old map face information is discarded. If true, the old map face information is retained after the resize. Dangerous to use with map channels 0 and 1.

polyop.getNumMapFaces <Poly poly> <int mapChannel>

Returns the number of faces for the map channel as an <integer>.

polyop.setMapVert <Poly poly> <int mapChannel> <int index> <Point3 uvw>

Sets the coordinates of the specified map vertex.

polyop.getMapVert <Poly poly> <int mapChannel> <int index>

Returns the coordinates of the specified map vertex as a <point3>.

polyop.setMapFace <Poly poly> <int mapChannel> <int map face index> <map vertex array>

Sets the map vertices for the specified map face.

polyop.getMapFace <Poly poly> <int mapChannel> <int index>

Returns the vertex indices of the specified map face as an array.

polyop.defaultMapFaces <Poly poly> <int mapChannel>

Allocates and initializes a basic planar map, or a white map for the vertex color hannel.

polyop.applyUVWMap <Poly poly> \

<#planar | #cylindrical | #spherical | #ball | #box> | <#face> \

utile:<float=1.0> vtile:<float=1.0> wtile:<float=1.0> \

uflip:<boolean=false> vflip:<boolean=false> wflip:<boolean=false> \

cap:<boolean=true> tm:<Matrix3=identity matrix> channel:<integer=1>

Applies the specified mapping type to the mapping channel.

utile/vtile/wtile - Number of tiles in the U/V/W directions.

uflip/vflip/wflip - U/V/W are mirrored if true.

cap - used with #cylindrical. If true, then any face normal that is pointing more vertically than horizontally will be mapped using planar coordinates.

tm - defines the mapping space. As each point is mapped, it is multiplied by this matrix, and then it is mapped.

channel - the mapping channel the mapping is applied to, defaults to channel 1.

Vertex Colors

polyop.getVertsByColor <Poly poly> <Color color> <Float red_thresh> \

<Float green_thresh> <Float blue_thresh> \

channel:<int=0>

Returns the vertices whose vertex color is within the color range as a <bitarray>. The range values should be in the range of 0 to 255.

polyop.getVertsByColor <Poly poly> <Point3 uvw> <Float u_thresh> \

<Float v_thresh> <Float w_thresh> channel:<int=0>

Returns the vertices whose UVW is within the UVW range as a <bitarray>. The range values should be in the range of 0 to 1.

polyop.setVertColor <Poly poly> <int mapChannel> <vertlist> <Color color>

Sets the vertex color for the specified vertices in the specified <mapChannel>.

polyop.SetFaceColor <Poly poly> <int mapChannel> <facelist> <Color color>

Sets the vertex color for the vertices used by the specified faces in the specified <mapChannel>.

VData Channels

polyop.setNumVDataChannels <Poly poly> <int count> keep:<boolean=true>

Sets the number of vertex data channels available. The number of vertex data channels can be set from 0 to 100.

If <keep> is false, the old channel data is discarded. If true, the old channel data is retained after the resize. The first ten channels for Discreet's use only.

channel 1: Soft Selection

channel 2: Vertex weights (for NURMS MeshSmooth)

channel 3: Vertex Alpha values

channel 4: Cornering values for subdivision use

polyop.getNumVDataChannels <Poly poly>

Returns the number of vertex data channels available as an <integer>.

polyop.setVDataChannelSupport <Poly poly> <int vdChannel> <boolean support>

Sets whether the specified vertex data channel is supported or not. <vdChannel> index values are 1-based, The first ten channels for Discreet's use only.

channel 1: Soft Selection

channel 2: Vertex weights (for NURMS MeshSmooth)

channel 3: Vertex Alpha values

channel 4: Cornering values for subdivision use

polyop.getVDataChannelSupport <Poly poly> <int vdChannel>

Returns whether the specified vertex data channel is supported.

polyop.getVDataValue <Poly poly> <int vdChannel> <int vertex_index>

Returns the floating point data value associated with vertex vertex_index in vertex data channel <vdChannel> as a <float>.

polyop.setVDataValue <Poly poly> <int vdChannel> <vertlist> <float>

Sets the floating point data value associated with the specified vertices in vertex data channel <vdChannel>.

polyop.freeVData <Poly poly> <int vdChannel>

polyop.resetVData <Poly poly> <int vdChannel>

Deallocates the existing vertex data channel and turns off the vertex data channel support state. These methods do the exact same thing.

EData Channels

polyop.setNumEDataChannels <Poly poly> <int count> keep:<boolean=true>

Sets the number of edge data channels available. The number of edge data channels can be set from 0 to 10.

If <keep> is false, the old channel data is discarded. If true, the old channel data is retained after the resize. The first two channels for Discreet's use only.

channel 1: edge knot data

channel 2: edge crease data

polyop.getNumEDataChannels <Poly poly>

Returns the number of edge data channels available as an <integer>.

polyop.setEDataChannelSupport <Poly poly> <int edChannel> <Boolean support>

Sets whether the specified edge data channel is supported or not. <edChannel> index values are 1-based, the first two channels for Discreet's use only.

channel 1: edge knot data

channel 2: edge crease data

polyop.getEDataChannelSupport <Poly poly> <int edChannel>

Returns whether the specified edge data channel is supported.

polyop.getEDataValue <Poly poly> <int edChannel> <int edge_index>

Returns the floating point data value associated with edge edge_index in edge data channel <edChannel> as a <float>.

polyop.setEDataValue <Poly poly> <int edChannel> <edgelist> <float>

Sets the floating point data value associated with the specified edges in edge data channel <edChannel>.

polyop.freeEData <Poly poly> <int edChannel>

resetEData <Poly poly> <int edChannel>

Deallocates the existing edge data channel and turns off the edge data channel support state. These methods do the exact same thing.


Editable_Poly Methods

Editable Poly Modify Panel Command Modes and Operations

A suite of methods provide the ability for a script to invoke Editable Poly Modify panel modes and operations, corresponding to buttons available at various sub-object levels. These methods reside in the polyOp and polyOps global structures. These methods effectively "push the button" in the Modify panel. In order to use these methods, the node must be selected and the Modify panel open. In the description of these methods, the first argument <editable_poly_node_or_modifier> should be interpreted as either an Editable Poly node where the modifier stack level is at the base object, or an Edit Poly modifier where the modifier stack level is at the Edit Poly. In all cases, the following methods work at the current sub-object level, but only if that level is appropriate for the invoked operation.

The follow methods invoke one of the 'user-interaction' button operations in the Editable Poly Modify panel, acting on the currently selected sub-objects. These methods highlight the corresponding button in the Geometry rollout and start the operation, at which point the user interactively completes the operation. These methods return after starting the operation, and before the user completes the operation, so care should be taken to ensure that your script does not interfere with the operation. Invoking any of these methods is the same as clicking on the associated button in the Modify panel. Calling a method when the operation is already in effect (either due to a user action or a MAXScript command) causes the operation to be terminated and the highlight is removed from the button.

Many of the polyOp methods take as an argument <vertlist>, <facelist>, or <edgelist>. These arguments specify the sub object (SO) elements to operate on. These arguments can be specified as:

#all - all SO elements of that type

#selection - the current SO selection of that type

#none - none of the SO elements of that type

An array of integers, where each integer value specifies a SO element index

A bitarray, where each bit specifies a SO element index

A value convertable to an integer that specifies a SO element index

A VertexSelection, EdgeSelection, or FaceSelection value. The value type must match the specified SO type.

All polyOp methods take as an argument <poly>, the poly to operate on. This argument can be either a node value where the base object of the node is an Editable Poly, or the Editable Poly base object.

Editable polys can have "dead" vertices, edges, and faces. These are SO elements that have been deleted from the poly, but have not yet been removed from the corresponding lists of SO elements. SO elements may be marked as dead in the process of performing certain operations on the poly, but the SO element lists are normally collapsed (that is, all dead SO elements removed) at the end of the operation. Thus, normally there should not be any dead SO elements present in the poly. If you flag a SO element as dead using one of the polyOp methods, you should also call collapseDeadStructs to collapse the SO element lists.

Other than methods that get/set SO element flags, dead SO elements are normally ignored by the polyOp methods. If a method returns a value other than OK, takes a single SO element index, and that SO element is dead, a value of UNDEFINED is normally returned.

Get/Set Selection

polyop.getVertSelection <Poly poly>

Returns the current vertex selection as a bitarray

polyop.setVertSelection <Poly poly> <vertlist>

Sets the current vertex selection based on <vertlist>

polyop.getEdgeSelection <Poly poly>

Returns the current edge selection as a bitarray

polyop.setEdgeSelection <Poly poly> <edgelist>

Sets the current edge selection based on <vertlist>

polyop.getFaceSelection <Poly poly>

Returns the current face selection as a bitarray

polyop.setFaceSelection <Poly poly> <facelist>

Sets the current face selection based on <facelist>

Get By Flag

polyop.getVertsByFlag <Poly poly> <int flag> mask:<int maskflag>

Each vertex in a poly contains a 32 bit flag variable. This method returns a bitarray of the vertices that have specific bits in this flag variable set, where the bits being tested are based on a combination of <flag> and <maskflag>.

The default value for <maskflag> is 0.

Internally, if <maskflag> is 0 then <maskflag> is set to the <flag> value, otherwise <flag> is set to the bitwise-AND of <flag> and <maskflag>. Bit 2 of <maskflag> is then set, which prevents dead vertices from being included in the resulting bitarray unless this bit was set in <mask>. Each bit in the resulting bitarray is set if the bitwise-AND of the flag variable and <maskflag> is equal to the bitwise-AND of <flag> and <maskflag>.

The vertex level flags are:

bit 1: vertex is selected

bit 2: vertex is dead

bit 3: reserved

bit 4: indicates the vertex faces "backwards" in the current viewport

bit 5-24: reserved

bit 25-32: available for general use

EXAMPLE

theObj = plane isSelected:true

convertto theObj editable_poly

nVerts = theObj.numverts

bit30 = bit.set 0 30 true

bit31 = bit.set 0 31 true

bit32 = bit.set 0 32 true

-- set a bit on first 3/4 or so verts

(

flagsToSet = bit30

flagsToMask = 0

vertexSet = #{1..(3*nVerts/4)}

theObj.setVertexFlags vertexSet flagsToSet flagMask:flagsToMask generateUndoRecord:true

ok

)

-- and another on middle block

(

flagsToSet = bit31

flagsToMask = 0

vertexSet = #{(nVerts/3)..(nVerts-4)}

theObj.setVertexFlags vertexSet flagsToSet flagMask:flagsToMask generateUndoRecord:true

ok

)

-- set a bit on last 2 verts

(

flagsToSet = bit32

flagsToMask = 0

vertexSet = #{(nVerts-2)..nVerts}

theObj.setVertexFlags vertexSet flagsToSet flagMask:flagsToMask generateUndoRecord:true

ok

)

(

-- get verts with bit30, 31, 32 set

format "30: %\n" (polyOp.getVertsByFlag theObj bit30)

format "31: %\n" (polyOp.getVertsByFlag theObj bit31)

format "32: %\n" (polyOp.getVertsByFlag theObj bit32)

-- get verts with bit30 set, but not bit31

format "30 and !31: %\n" (polyOp.getVertsByFlag theObj bit30 mask:(bit30+bit31))

-- get verts with bit31 not set, doesn't matter what the <flag>

-- value is as long as it's not bit31

format "!31: %\n" (polyOp.getVertsByFlag theObj bit30 mask:(bit31))

-- get verts with bit30 and bit31 set

format "30 and 31: %\n" (polyOp.getVertsByFlag theObj (bit30+bit31))

-- get verts with neither bit31 or bit32 set, doesn't matter what

-- the <flag> value is as long as it's not bit31 or bit32

format "!(31 or 32): %\n" (polyOp.getVertsByFlag theObj bit30 mask:(bit31+bit32))

)

polyop.getVertFlags <Poly poly> <int vert>

Returns the flags bits for the vertex as an integer.

polyop.setVertFlags <Poly poly> <vertlist> <int flag> mask:<int=0> undoable:<boolean=false>

Sets the flag bits on the specified vertices to the bits in <flag>. If mask is specified, the bits set in the mask value are cleared for all vertices in the poly prior to setting flag bits on the specified vertices. If undoable:true is specified, this operation is undoable. If bits 1 or 2 of <flag> are set (selected and dead flag bits), this operation is always undoable.

EXAMPLE

p=convertToPoly (plane())

p.selectedVerts = #{10..20}

i=1 -- selected bit

j=bit.set 0 30 true -- bit 30 set

oldflags = for k = 1 to p.numverts collect polyop.getVertFlags p k

theSet=#{5..15}

polyop.setvertflags p theSet j mask:i

for k = 1 to p.numverts do

(

nf=polyop.getVertFlags p k

format "% : % : %\n" k nf oldflags[k]

oldflags[k]=nf

)

j=bit.set 0 1 true -- bit 1 set

polyop.setvertflags p theSet j

for k = 1 to p.numverts do

(

nf=polyop.getVertFlags p k

format "% : % : %\n" k nf oldflags[k]

)

polyop.getEdgesByFlag <Poly poly> <int flag> mask:<int maskflag>

Each edge in a poly contains a 32 bit flag variable. This method returns a bitarray of the edges that have specific bits in this flag variable set, where the bits being tested are based on a combination of <flag> and <maskflag>.

The default value for <maskflag> is 0.

Internally, if <maskflag> is 0 then <maskflag> is set to the <flag> value, otherwise <flag> is set to the bitwise-AND of <flag> and <maskflag>. Bit 2 of <maskflag> is then set, which prevents dead edges from being included in the resulting bitarray unless this bit was set in <mask>. Each bit in the resulting bitarray is set if the bitwise-AND of the flag variable and <maskflag> is equal to the bitwise-AND of <flag> and <maskflag>.

The edge level flags are:

bit 1: edge is selected

bit 2: edge is dead

bit 3: reserved

bit 4: indicates the vertex faces "backwards" in the current viewport

bit 5-24: reserved

bit 25-32: available for general use

polyop.getEdgeFlags <Poly poly> <int edge>

Returns the flags bits for the edge as an integer.

polyop.setEdgeFlags <Poly poly> <edgelist> <int flag> mask:<int=0> undoable:<boolean=false>

Sets the flag bits on the specified edges to the bits in <flag>. If mask is specified, the bits set in the mask value are cleared for all edges in the poly prior to setting flag bits on the specified edges. If undoable:true is specified, this operation is undoable. If bits 1 or 2 of <flag> are set (selected and dead flag bits), this operation is always undoable.

polyop.getFacesByFlag <Poly poly> <int flag> mask:<int maskflag>

Each face in a poly contains a 32 bit flag variable. This method returns a bitarray of the faces that have specific bits in this flag variable set, where the bits being tested are based on a combination of <flag> and <maskflag>.

The default value for <maskflag> is 0.

Internally, if <maskflag> is 0 then <maskflag> is set to the <flag> value, otherwise <flag> is set to the bitwise-AND of <flag> and <maskflag>. Bit 2 of <maskflag> is then set, which prevents dead faces from being included in the resulting bitarray unless this bit was set in <mask>. Each bit in the resulting bitarray is set if the bitwise-AND of the flag variable and <maskflag> is equal to the bitwise-AND of <flag> and <maskflag>.

The face level flags are:

bit 1: face is selected

bit 2: face is dead

bit 3: reserved

bit 4: indicates the vertex faces "backwards" in the current viewport

bit 5-24: reserved

bit 25-32: available for general use

polyop.getFaceFlags <Poly poly> <int face>

Returns the flags bits for the face as an integer.

polyop.setFaceFlags <Poly poly> <facelist> <int flag> mask:<int=0> undoable:<boolean=false>

Sets the flag bits on the specified faces to the bits in <flag>. If mask is specified, the bits set in the mask value are cleared for all faces in the poly prior to setting flag bits on the specified faces. If undoable:true is specified, this operation is undoable. If bits 1 or 2 of <flag> are set (selected and dead flag bits), this operation is always undoable.

Get Count

polyop.getNumVerts <Poly poly>

Returns the number of vertices in the poly. Includes any dead vertices.

polyop.getNumEdges <Poly poly>

Returns the number of edges in the poly. Includes any dead edges.

polyop.getNumFaces <Poly poly>

Returns the number of faces in the poly. Includes any dead faces.

Get/Set Hidden

polyop.getHiddenVerts <Poly poly>

Bits in the result bitarray are set if the corresponding vertex is hidden.

polyop.setHiddenVerts <Poly poly> <vertlist>

Hides the corresponding vertices in the poly

polyop.getHiddenFaces <Poly poly>

Bits in the result bitarray are set if the corresponding face is hidden.

polyop.setHiddenFaces <Poly poly> <facelist>

Hides the corresponding faces in the poly

polyop.unHideAllFaces <Poly poly>

Unhides all faces in the poly.

polyop.unHideAllVerts <Poly poly>

Unhides all vertices in the poly.

Edge Visibility

polyop.getEdgeVis <Poly poly> <int edge>

Returns true if the specified edge is visible, false otherwise.

polyop.setEdgeVis <Poly poly> <edgelist> <boolean>

Sets the visibility of the specified edges.

Open Edges

polyop.getOpenEdges <Poly poly>

Bits in the result bitarray are set if the corresponding edge is open (used by only 1 ace).

polyop.getBorderFromEdge <Poly poly> <int edge>

Bits in the result bitarray are set for open edges in the poly that are connected via open edges to the specified edge.

All one-sided edges in polys can be grouped into chains, end to end, that represent boundaries of the poly. For instance, in a box with one side deleted, all the one-sided edges are part of the chain that goes around the hole. If the specified edge isn't open, the resulting bitarray is empty.

Get By Face

polyop.getFaceVerts <Poly poly> <int face>

Returns the face's vertices as an array. The order of the vertices in the array corresponds to the order of the vertices in the face.

polyop.getFaceEdges <Poly poly> <int face>

Returns the face's edges as an array. The order of the edges in the array corresponds to the order of the edges in the face.

polyop.getFaceDeg <Poly poly> <int face>

Returns the number of vertices in the specified face.

Get By Edge

polyop.getEdgeVerts <Poly poly> <int edge>

Returns the edge's vertices as a 2 element array.

polyop.getEdgeFaces <Poly poly> <int edge>

Returns the faces using the specified edge. Normally a 1 element (open edge) or 2 element array.

Get Dead Elements

polyop.getDeadVerts <Poly poly>

Returns the current dead vertices selection as a bitarray. Normally this will return an empty bitarray.

polyop.getDeadEdges <Poly poly>

Returns the current dead edges selection as a bitarray. Normally this will return an empty bitarray.

polyop.getDeadFaces <Poly poly>

Returns the current dead faces selection as a bitarray. Normally this will return an empty bitarray.

polyop.GetHasDeadStructs <Poly poly>

Bit 1 in the return value is set if the poly has any dead vertices, bit 2 if any dead edges, and bit 3 if any dead faces.

He is dead, Jim

polyop.isFaceDead <Poly poly> <int face>

Returns true if the specified face is dead.

polyop.isEdgeDead <Poly poly> <int edge>

Returns true if the specified edge is dead.

polyop.isVertDead <Poly poly> <int vert>

Returns true if the specified vertex is dead.

polyop.CollapseDeadStructs <Poly poly>

Removes all dead SO elements from the poly.

Face Material IDs

polyop.getFaceMatID <Poly poly> <int face>

Returns the material ID assigned to the face

polyop.setFaceMatID <Poly poly> <facelist> <int MatID>

Assigns the material ID to the face

Manipulate Vertex

polyop.getVert <Poly poly> <int vertex> node:<node=unsupplied>

Returns the position of the specified vertex. If <poly> is a node, or if <poly> is an Editable Poly and <node> is specified, the position returned is in the current coordinate system context. If <poly> is an Editable Poly and <node> is not specified, the return value is in the poly's local coordinate system.

polyop.setVert <Poly poly> <vertlist> {<point3 pos> | <point3 pos_array>} node:<node=unsupplied>

Sets the position of the specified vertices.

If <poly> is a node, or if <poly> is an Editable Poly and <node> is specified, the position is in the current coordinate system context.

If <poly> is an Editable Poly and <node> is not specified, the position is in the poly's local coordinate system.

In 3ds Max 2008 and higher, this method allows the position to be specified as array. In that case, the number of values in pos_array must match the number of vertices specified in vertlist. This feature was previously part of the [ AVG ] Avguard Extensions.

polyop.moveVert <Poly poly> <vertlist> {<point3 offset> | <point3 offset_array>} node:<node> useSoftSel:<bool>

Moves the specified vertices by <offset>.

If <poly> is a node, or if <poly> is an Editable Poly and <node> is specified, the offset is in the current coordinate system context.

If <poly> is an Editable Poly and <node> is not specified, the offset is in the poly's local coordinate system.

In 3ds Max 2008 and higher, this method allows the position to be specified as array. In that case, the number of values in pos_array must match the number of vertices specified in vertlist. This feature was previously part of the [ AVG ] Avguard Extensions.

If useSoftSel: is true, and the mesh's soft selection data channel is present, the specified offsets are multiplied by the vertex's soft selection value.

NOTE:

It is very important to pass the <vertlist> argument as a bitArray value and not as an array. Passing the argument as an array will cause a significant performance hit (orders of magnitude!)

This applies to all methods operating on sub-object lists.

Fill In Mesh

polyop.isMeshFilledIn <Poly poly>

Returns true if all topological links, such as the list of edges, are complete for the poly.

polyop.fillInMesh <Poly poly>

Recomputes the internal MNEdges and MNFace::edg, MNVert::edg, and MNVert::fac lists based on the information in the MNFace::vtx lists.

Get A Using B

polyop.getEdgesUsingVert <Poly poly> <vertlist>

Bits in the result bitarray are set if the corresponding edge uses one of the vertices in <vertlist>.

polyop.getFacesUsingVert <Poly poly> <vertlist>

Bits in the result bitarray are set if the corresponding face uses one of the vertices in <vertlist>.

polyop.getVertsUsingEdge <Poly poly> <edgelist>

Bits in the result bitarray are set if the corresponding vertex uses one of the edges in <edgelist>.

polyop.getFacesUsingEdge <Poly poly> <edgelist>

Bits in the result bitarray are set if the corresponding face uses one of the edges in <edgelist>.

polyop.getVertsUsingFace <Poly poly> <facelist>

Bits in the result bitarray are set if the corresponding vertex uses one of the faces in <facelist>.

polyop.getEdgesUsingFace <Poly poly> <facelist>

Bits in the result bitarray are set if the corresponding edge uses one of the faces in <facelist>.

polyop.getElementsUsingFace <Poly poly> <facelist> fence:<fence_facelist>

Bits in the result bitarray are set for all faces in the same "element", or connected component, with faces in <facelist>.

If <fence_facelist> is specified, those faces will be considered "walls" for this processing and will not be evaluated. That is, if face i is specified in <facelist>, and a ring of faces around it is specified in <fence_facelist>, the algorithm will stop at that ring.

polyop.getVertsUsedOnlyByFaces <Poly poly> <facelist>

Bits in the result bitarray are set if the corresponding vertex is only used by faces in <edgelist>.

Get Face Center, Normal and Area

polyop.getFaceCenter <Poly poly> <int face> node:<node=unsupplied>

Returns the center of the face by taking the average of all its vertices. If <poly> is a node, or if <poly> is an Editable Poly and <node> is specified, the position returned is in the current coordinate system context. If <poly> is an Editable Poly and <node> is not specified, the return value is in the poly's local coordinate system.

polyop.getSafeFaceCenter <Poly poly> <int face> node:<node=unsupplied>

Returns the "safe" center of the face, if possible. For non-convex faces, the average point found using getFaceCenter is unsuitable for some applications because it can lie outside the face completely, or in a region where it cannot see all the face's vertices (i.e., line segments from the center to the corner pass outside of the face.). If a safe center cannot be found, a value of UNDEFINED is returned.

This routine provides a better solution in some cases by finding the center of the convex hull of the face. The convex hull is defined as the region in a face with a clear line-of-sight to all the corners. Some faces, such as the top face in an extruded letter M, have an empty convex hull, in which case this routine fails and merely provides the regular center given by ComputeCenter.

If <poly> is a node, or if <poly> is an Editable Poly and <node> is specified, the position returned is in the current coordinate system context. If <poly> is an Editable Poly and <node> is not specified, the return value is in the poly's local coordinate system.

polyop.getFaceNormal <Poly poly> <int face> node:<node=unsupplied>

Returns the face normal of the face. If <poly> is a node, or if <poly> is an Editable Poly and <node> is specified, the direction vector returned is in the current coordinate system context. If <poly> is an Editable Poly and <node> is not specified, the return value is in the poly's local coordinate system.

polyop.getFaceArea <Poly poly> <int face>

Returns the area of the specified face.

Attach

polyop.attach <Poly poly> <source> targetNode:<node=unsupplied> sourceNode:<node=unsupplied>

Attaches <source>, converted to a polymesh if necessary, to <poly>. If <source> or <poly> is not a node value, the corresponding targetNode or sourceNode must be specified. The source node is deleted after the attach is performed.

Delete

polyop.deleteVerts <Poly poly> <vertlist>

Deletes the specified vertices.

polyop.deleteFaces <Poly poly> <facelist> delIsoVerts:<boolean=true>

Deletes the specified faces. If <delIsoVerts> is true, any vertices that are no longer used by faces are also deleted.

polyop.deleteEdges <Poly poly> <edgelist> delIsoVerts:<boolean=true>

Deletes the specified edges. If <delIsoVerts> is true, any vertices that are no longer used by edges are also deleted.

The behavior of the methods PolyOp.deleteEdges, PolyOp.deleteVerts and PolyOp.deleteFaces changed in 3ds Max 5. Now when using these methods, all sub-object elements that use the deleted elements are also deleted. What used to be the (internal) Delete method is now the (internal) Remove method. This new method isn't exposed through the polyOp structure, so you will need to work through the EditablePoly interface, Remove method .

An example replacement function which will work in both version 4 and higher is:

EXAMPLE

fn polyop_deleteEdges obj which delIsoVerts:=

(

if (MaxVersion())[1] >= 5000 then

(

local bit30 = bit.set 0 30 true

polyop.setEdgeFlags obj which bit30

obj.EditablePoly.remove selLevel:#edge flag:bit30

if delIsoVerts == true do polyop.deleteIsoVerts obj

)

else

polyop.deleteEdges obj which delIsoVerts:delIsoVerts

)

polyop.deleteIsoVerts <Poly poly>

Deletes any vertices not used by any faces.

Weld

polyop.weldVertsByThreshold <Poly poly> <vertlist>

Welds the specified vertices that are within the threshold distance. The threshold distance is a property (weldThreshold) of the editable poly. Only vertices on a border can be welded.

polyop.weldVerts <Poly poly> <int vert1> <int vert2> <point3 location> node:<node=unsupplied>

Welds the two specified vertices, with the resulting vertex positioned at the specified location. Only vertices on a border can be welded.

If <poly> is a node, or if <poly> is an Editable Poly and <node> is specified, the location is in the current coordinate system context.

If <poly> is an Editable Poly and <node> is not specified, the location is in the poly's local coordinate system.

polyop.weldEdgesByThreshold <Poly poly> <edgelist>

Welds the vertices associated with the specified edges that are within the threshold distance. The threshold distance is a property (weldThreshold) of the editable poly. Only vertices on a border can be welded.

polyop.weldEdges <Poly poly> <int edge1> <int edge2>

Welds the vertices associated with the specified edges. Only vertices on a border can be welded.

Create

polyop.createVert <Poly poly> <point3 pos> node:<node=unsupplied>

Creates a vertex as the specified position. If <poly> is a node, or if <poly> is an Editable Poly and <node> is specified, the position is in the current coordinate system context. If <poly> is an Editable Poly and <node> is not specified, the position is in the poly's local coordinate system. Returns the index of the created vertex or undefined if no vertex was created.

polyop.createEdge <Poly poly> <int vert1> <int vert2>

Creates an edge using the two specified vertices. The vertices must be used by a common face. Returns the index of the created edge or undefined if no edge was created.

polyop.createPolygon <Poly poly> <vertex array>

Creates a face using the specified vertices. The order of the vertices in the face is the order in the vertex array. For each successive vertex pair, at most 1 edge may exist between the vertices, and that edge must not go from the first to second vertex. The default triangulation for a face with the specified number of vertices is used; if the face is not convex, this triangulation may be inappropriate.

If this is the case, call retriangulate() on this face after it's created. This returns the index of the created face or undefined if no face was created.

Auto-Smooth

polyop.autoSmooth <Poly poly>

Performs an auto smooth of the poly. The face smoothing threshold angle is a property (autoSmoothThreshold) of the editable poly.

Triangulation

polyop.flipNormals <Poly poly> <facelist>

Flips the normal of the specified faces.

polyop.retriangulate <Poly poly> <facelist>

Retriangulates the specified faces.

polyop.setDiagonal <Poly poly> <int face> <int face_vert1> <int face_vert2>

Sets a diagonal of the face between the two vertices. The face must have a degree greater than 3 and the two vertices must not be connected by an edge.

Subdivisions

polyop.forceSubdivision <Poly poly>

Forces an update of the surface subdivision at the next viewport redraw. Use when NURMS Subdivision is on and Update Options is Manually.

polyop.meshSmoothByVert <Poly poly> <vertlist>

Smooths the faces associated with the specified vertices. Uses the smoothness, separateBySmoothing, and separateByMaterial properties of the editable poly.

polyop.meshSmoothByFace <Poly poly> <facelist>

Smooths the specified faces. Uses the smoothness, separateBySmoothing, and separateByMaterial properties of the editable poly.

polyop.meshSmoothByEdge <Poly poly> <edgelist>

Smooths the faces associated with the specified edges. Uses the smoothness, separateBySmoothing, and separateByMaterial properties of the editable poly.

Face Smoothing Groups

polyop.setFaceSmoothGroup <Poly poly> <facelist> <int smoothing_group> add:<boolean=false>

Sets the smoothing groups for the specified faces. The state of each bit in <smoothing_group> specifies whether the face belongs to the corresponding smoothing group. If <add> is true, <smoothing_group> is added to the existing smoothing group data specified for each face. If false, the existing smoothing group data is overwritten.

polyop.getFaceSmoothGroup <Poly poly> <int face>

Returns the smoothing group data for the specified face as an integer. The state of each bit in the result specifies whether the face belongs to the corresponding smoothing group.

Break/Divide/Split

polyop.breakVerts <Poly poly> <vertlist>

For each vertex in <vertlist>, N-1 new vertices are created at the same location, where N is the number of faces using that vertex. Each of these faces will use one of these vertices.

polyop.divideEdge <Poly poly> <int edge> <float fraction>

Divides the specified edge at the specified fractional distance along the edge. The return value is the index of the new vertex or undefined if no vertex was created.

polyop.divideFace <Poly poly> <int face> <point3 pos> node:<node=unsupplied>

Divides the specified face, with the new vertex being created at the closest point on the face to the specified position. If the specified position is outside the face, the vertex will be created at the center of the face. If <poly> is a node, or if <poly> is an Editable Poly and <node> is specified, the position is in the current coordinate system context. If <poly> is an Editable Poly and <node> is not specified, the position is in the poly's local coordinate system. Returns the index of the created vertex.

polyop.splitEdges <Poly poly> <edgelist>

Splits the specified edges at their middle.

Collapse

polyop.collapseVerts <Poly poly> <vertlist>

Collapses each cluster of vertices in the specificed vertices to a single vertex. A vertex cluster is a set of vertices that are directly connected to one another.

polyop.collapseFaces <Poly poly> <facelist>

Collapses the vertices associated with each cluster of faces in the specificed faces to a single vertex. A face cluster is a set of faces that are directly connected to one another.

polyop.collapseEdges <Poly poly> <edgelist>

Collapses the vertices associated with each cluster of edges in the specificed edges to a single vertex. An edge cluster is a set of edges that are directly connected to one another.

Propagate Flags

polyop.propagateFlags <Poly poly> <toSOLevel> <toFlag_int> <fromSOLevel> <fromFlag_int> ampersand:<boolean=false> set:<boolean=true> undoable:<boolean=true>

where toSOLevel/fromSOLevel = {#object | #vertex | #edge | #face}

Propogates component flags. For each <fromSOLevel> element that has flag <fromFlag_int> set, the <toSOLevel> elements that use or are used by the element will have their internal flag variable bits set based on <toFlag_int>. Only the bits corresponding to the bits that are set in <toFlag_int> are affected. If <ampersand> is false, and <fromFlag_int> has more than one bit set, the <fromSOLevel> elements will be tested to see if they have any of the corresponding bits set. If true, the <fromSOLevel> components elements be tested to see if they have all the corresponding bits set. If <set> is true, the <toSOLevel> elements have flags <toFlag_int> set. If false, these flags will be cleared instead.

If <undoable> is true, the operation in undoable, otherwise it is not. If bits 1 or 2 of <toFlag_int> are set (selected and dead flag bits), this operation is always undoable. Returns the number of <fromSOLevel> elements that tested positive for the <fromFlag_int> flags.

Tessellate

polyop.tessellateByVert <Poly poly> <vertlist>

Tessellates the faces used by the specified vertices. Uses the tesselateBy and tessTension properties of the editable poly.

polyop.tessellateByFace <Poly poly> <facelist>

Tessellates the specified faces. Uses the tesselateBy and tessTension properties of the editable poly.

polyop.tessellateByEdge <Poly poly> <edgelist>

Tessellates the faces used by the specified edges. Uses the tesselateBy and tessTension properties of the editable poly.

polyop.detachFaces <Poly poly> <facelist> \

delete:<boolean=true> asNode:<boolean=false> \

name:<string="Object01"> node:<node=unsupplied>

Detaches the specified faces. If <delete> is true, the faces are deleted after being detached. If <delete> is false, the faces are not deleted. If <asNode> is true, the faces are detached as a separate node. If <asNode> is false, the faces are detached as an element in the poly. If <asNode> is true, <name> specifies the name of the new node. If <asNode> is true and <poly> is an Editable Poly (not a node), <node> must be specified. Returns true if the operation was successful.

SCRIPT

--The following script explodes an EditablePoly object to elements,

--each polygon becomes one element

macroScript PolyToElements category:"Help_Examples"

(

on isEnabled return

selection.count == 1 and classof selection[1].baseobject == Editable_Poly

on execute do

(

obj = selection[1]

for p = polyop.getNumFaces obj to 1 by -1 do

polyOp.detachFaces obj #{p}

)

)

Detach

polyop.detachEdges <Poly poly> <edgelist> delete:<boolean=true> \

asNode:<boolean=false> name:<string="Object01"> node:<node=unsupplied>

Detaches the faces used by the specified edges. If <delete> is true, the faces are deleted after being detached. If <delete> is false, the faces are not deleted. If <asNode> is true, the faces are detached as a separate node. If <asNode> is false, the faces are detached as an element in the poly. If <asNode> is true, <name> specifies the name of the new node. If <asNode> is true and <poly> is an Editable Poly (not a node), <node> must be specified. Returns true if the operation was successful.

polyop.detachVerts <Poly poly> <vertlist> delete:<boolean=true> \

asNode:<boolean=false> name:<string="Object01"> node:<node=unsupplied>

Detaches the faces used by the specified vertices. If <delete> is true, the faces are deleted after being detached. If <delete> is false, the faces are not deleted. If <asNode> is true, the faces are detached as a separate node. If <asNode> is false, the faces are detached as an element in the poly. If <asNode> is true, <name> specifies the name of the new node. If <asNode> is true and <poly> is an Editable Poly (not a node), <node> must be specified. Returns true if the operation was successful.

Slice Plane

polyop.resetSlicePlane <Poly poly>

Resets the slice plane.

polyop.getSlicePlane <Poly poly> size:<&size_float_var> node:<node=unsupplied>

Returns the location and direction of the slice plane as a Ray value. If <size> is specified, the size of the slice plane is returned in the referenced variable. If <poly> is a node, or if <poly> is an Editable Poly and <node> is specified, the ray returned is in the current coordinate system context. If <poly> is an Editable Poly and <node> is not specified, the return value is in the poly's local coordinate system.

polyop.setSlicePlane <Poly poly> <ray plane_and_dir> <float size> \

node:<node=unsupplied>

Sets the slice plane to the location and direction as specified by <plane_and_dir>, and the size as specified by <size>. If <poly> is a node, or if <poly> is an Editable Poly and <node> is specified, the ray is in the current coordinate system context. If <poly> is an Editable Poly and <node> is not specified, the ray is in the poly's local coordinate system.

polyop.slice <Poly poly> <facelist> <ray plane_and_dir> \

node:<node=unsupplied>

Slices the poly based on the plane and direction as specified by <plane_and_dir>. If <poly> is a node, or if <poly> is an Editable Poly and <node> is specified, the ray is in the current coordinate system context. If <poly> is an Editable Poly and <node> is not specified, the ray is in the poly's local coordinate system. Uses the split property of the editable poly. Returns true if the slice was successful.

polyop.inSlicePlaneMode <Poly poly>

Returns true if the editable poly is in slice mode, false otherwise.

Cut

polyop.cutVert <Poly poly> <int start_vert> <point3 destination> \

<point3 projdir> node:<node=unsupplied>

If <poly> is a node, or if <poly> is an Editable Poly and <node> is specified, destination and projdir are in the current coordinate system context. If <poly> is an Editable Poly and <node> is not specified, destination and projdir are in the poly's local coordinate system.

Returns the index of the new vertex if created, or undefined if no vertex was created.

polyop.cutFace <Poly poly> <int face> <point3 start> <point3 destination> \

<point3 projdir> node:<node=unsupplied>

If <poly> is a node, or if <poly> is an Editable Poly and <node> is specified, start, destination, and projdir are in the current coordinate system context. If <poly> is an Editable Poly and <node> is not specified, start, destination, and projdir are in the poly's local coordinate system.

Returns the index of the new vertex if created, or undefined if no vertex was created.

polyop.cutEdge <Poly poly> <int edge1> <float prop1> <int edge2> \

<float prop2> <point3 projdir> node:<node=unsupplied>

If <poly> is a node, or if <poly> is an Editable Poly and <node> is specified, projdir is in the current coordinate system context. If <poly> is an Editable Poly and <node> is not specified, projdir is in the poly's local coordinate system.

Returns the index of the new vertex if created, or undefined if no vertex was created.

Cap Holes

polyop.capHolesByVert <Poly poly> <vertlist>

Finds any borders that use one or more of the specified vertices, and builds faces to cap the holes. Returns true if one or more holes were capped.

polyop.capHolesByFace <Poly poly> <facelist>

Finds any borders that use one or more of the vertices associated with the specified faces, and builds faces to cap the holes. Returns true if one or more holes were capped.

polyop.capHolesByEdge <Poly poly> <edgelist>

Finds any borders that use one or more of the vertices associated with the specified edges, and builds faces to cap the holes. Returns true if one or more holes were capped.

Make Planar

polyop.makeVertsPlanar <Poly poly> <vertlist>

Moves the specified vertices so that they are planar.

polyop.moveVertsToPlane <Poly poly> \

<vertlist> \

<Point3 planeNormal> \

<float planeOffset> \

node:<node>

Moves the specified vertices into the specified plane. The target plane is defined as all points which, when DotProducted with N, return offset. All vertices are moved along the normal vector N.

polyop.makeEdgesPlanar <Poly poly> <edgelist>

Moves the vertices associated with the specified edges so that they are planar.

polyop.moveEdgesToPlane <Poly poly> \

<edgelist> \

<Point3 planeNormal> \

<float planeOffset> \

node:<node=unsupplied>

Moves the vertices associated with the specified edges into the specified plane. The target plane is defined as all points which, when DotProd'd with N, return offset. All vertices are moved along the normal vector N.

polyop.makeFacesPlanar <Poly poly> <facelist>

Moves the vertices associated with the specified faces so that they are planar.

polyop.moveFacesToPlane <Poly poly> <facelist> <Point3 planeNormal>

<float planeOffset> node:<node=unsupplied>

Moves the vertices associated with the specified faces into the specified plane. The target plane is defined as all points which, when DotProd'd with N, return offset. All vertices are moved along the normal vector N.

Create Shape From Edges

polyop.createShape <Poly poly> <edgelist> \

smooth:<boolean=false> name:<string="Shape01"> node:<node=unsupplied>

Creates a shape node from the specified edges. If <smooth> is true, the shape is created as a smooth curve. The name of the new node is specified by <name>. If <poly> is an Editable Poly (not a node), <node> must be specified.

Extude/Bevel/Chamfer

polyop.extrudeFaces <Poly poly> <facelist> <float amount>

Extrudes the specified faces by the specified amount. Uses the extrustionType property of the Editable Poly.

polyop.bevelFaces <Poly poly> <facelist> <float height> <float outline>

Bevels the specified faces. Extrudes the specified faces the specified height, and then scales the new top faces by <outline>. Uses the extrustionType property of the Editable Poly.

polyop.chamferVerts <Poly poly> <vertlist> <float amount>

Chamfers the specified vertices by the specified amount.

polyop.chamferEdges <Poly poly> <edgelist> <float amount>

Chamfers the specified edges by the specified amount.

Editable_Poly Topics:

Editable_Poly: GeometryClass

Editable_Poly Properties

Editable_Poly Methods

Editable_Poly Mapping Methods(polyOp struct)

Interface: EditablePoly


Interface: EditablePoly

The EditablePoly Interface has been added to the Editable_Poly class in 3ds Max 5

Editable_Poly interfaces:

Interface: EditablePoly

Methods:

Hide/Unhide

<bool><EditablePoly>.Hide <enum>mnSelLevel [flags:<DWORD>]

mnSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}

flags default value: 1

Hide the sub-objects defined by flags in the specified sub-object level. Returns true on success.

See polyOp.getVertsByFlag , polyOp.getEdgesByFlag and polyOp.getFacesByFlag for descriptions of the flag bits.

<bool><EditablePoly>.unhideAll <enum>mnSelLevel

mnSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}

Unhide the specified sub-object level. The modify panel does not have to be in the same sub-object level for this method to have effect. Returns true on success.

EXAMPLE

p = convertToPoly(Plane()) --create a plane, convert to EPoly

polyop.setFaceSelection p #{1,2} --select the first two polygons

p.Hide #Face --hide the two polygons

sleep 1 --wait a second

p.UnHideAll #Face  --unhide all hidden faces again

Copy/Paste Named Selection Sets

<void><EditablePoly>.EditablePoly.namedSelCopy <string>Name

Copy selection to the given name.

<void><EditablePoly>.namedSelPaste <bool>useRenameDialog

Paste named selection. When useRenameDialog is supplied as true, enables the Rename Dialog.

Create

<index>createVertex <point3>point [pointInLocalCoords:<bool>] [select:<bool>]

pointInLocalCoords default value: true

select default value: false

Create a new vertex with the specified coordinates. If the optional pointInLocalCoords argument is true, the coordinates are taken in local space. If the optional select argument is true, the new vertex will be selected after creation. Returns the index of the new vertex.

<index><EditablePoly>.createEdge <index>vertex1 <index>vertex2 [select:<bool>]

select default value: false

Create a new edge between the two specified vertices. If the optional select argument is true, the new edge will be selected after creation. Returns the index of the new edge.

EXAMPLE

p = convertToPoly(Plane()) --create a plane, convert to EPoly

p.createEdge 1 7 --create edge between vertices 1 and 7

<index><EditablePoly>.createFace <index array>vertexArray [select:<bool>]

select default value: false

Creates a new face using the specified array of vertices. If the optional select argument is true, the new face will be selected after creation. Returns the index of the new face.

EXAMPLE

p = convertToPoly(Plane())    --create a plane, convert to EPoly

polyop.DeleteFaces p #(1)    --delete the first polygon

p.createFace #(1,6,5)  --create a new polygon on its place

<bool><EditablePoly>.capHoles <enum>mnSelLevel [flags:<DWORD>]

mnSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}

flags default value: 1

Create new faces to cap open edge loops. Acquire open edge loop defining the hole using the msSelLevel enums. Returns true on success.

See polyOp.getVertsByFlag , polyOp.getEdgesByFlag and polyOp.getFacesByFlag for descriptions of the flag bits.

EXAMPLE

p = convertToPoly(Plane()) --create a plane, convert to EPoly

polyop.DeleteFaces p #(6) --delete a polygon

--select all polygons surrounding the deleted one

polyop.SetFaceSelection p #(1,2,3,5,6,8,9,10)

select p --select the plane

max modify mode --switch to Modify panel

subObjectLevel = 4 --go to Face level to see the selection

p.capHoles #Face --cap the hole using the selection

Delete

<bool><EditablePoly>.delete <enum>mnSelLevel [flags:<DWORD>] [deleteIsoVerts:<bool>]

mnSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}

flags default value: 1

deleteIsoVerts default value: true

Delete the sub-objects in the specified sub-object level. Returns true on success.

See polyOp.getVertsByFlag , polyOp.getEdgesByFlag and polyOp.getFacesByFlag for descriptions of the flag bits.

<bool><EditablePoly>.deleteIsoVerts()

Delete isolated vertices. Returns true on success.

<bool><EditablePoly>.DeleteIsoMapVerts()

Delete the isolated vertices. Returns true on success.

Attach/Detach

<void><EditablePoly>.attach <node>nodeToAttach <node>myNode

Attach a node to the Editable_Poly object. The additional node provides the transformation of the node to be attached. You can use the nodeToAttach as myNode to use its own transforms.

EXAMPLE

p = convertToPoly(Plane()) --create a plane, convert to EPoly

s = sphere radius:5 --create a sphere primitive

p.attach s s --attach sphere to EPoly

p = convertToPoly(Plane()) --create a plane, convert to EPoly

b = Box() --create a box primitive

b.rotation = eulerangles 45 45 0 --rotate the box

t = teapot radius:5 --create a teapot primitive

p.attach t b --attach teapot to EPoly using the box's transformation

<bool><EditablePoly>.detachToElement <enum>mnSelLevel [flags:<DWORD>] [keepOriginal:<bool>]

mnSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}

flags default value: 1

keepOriginal default value: false

Detach the sub-objects defined by flags in the specified sub-object level to element. Returns true on success.

See polyOp.getVertsByFlag , polyOp.getEdgesByFlag and polyOp.getFacesByFlag for descriptions of the flag bits.

EXAMPLE

p = convertToPoly(Plane()) --create a plane, convert to EPoly

polyop.SetFaceSelection p #(6) --select polygon 6

--Detach the selected polygon to element, keeping the original:

p.detachToElement #Face keepOriginal:true

Break/Split/Divide

<bool><EditablePoly>.breakVerts <DWORD>vertFlags

Break the vertices defined by edgeFlags. See polyOp.getEdgesByFlag for descriptions of the flag bits.

<bool><EditablePoly>.splitEdges edgeFlags:<DWORD>

edgeFlags default value: 1

Split the edges defined by edgeFlags. See polyOp.getEdgesByFlag for descriptions of the flag bits.

<index><EditablePoly>.divideEdge <index>edgeID <float>proportion [select:<bool>]

select default value: false

Divides the specified edge using the proportions for placement control. Returns the index of the new vertex. If select is true, the new vertex will be selected.

<index><EditablePoly>.divideFace <index>faceID <&float array>vertexCoefficients [select:<bool>]

vertexCoefficients is In and Out parameter

select default value: false

Divides the specified polygon using the vertexCoefficients to place the new edges. Returns the index of the new vertex. If select is true, the new vertex will be selected.

Insert Vertex

<index><EditablePoly>.insertVertexInFace <index>faceID <&float array>vertexCoefficients [select:<bool>]

vertexCoefficients is In and Out parameter

select default value: false

Insert a vertex inside the specified polygon. Returns the index of the new vertex.

EXAMPLE

p = convertToPoly(Plane()) --create a plane, convert to Epoly

--Insert new vertex in the middle of polygon 6.

--new_vert will contain the index of the newly created vertex:

new_vert = p.insertVertexInFace 6 #(0.5,0.0,0.5)

<index><EditablePoly>.insertVertexInEdge <index>edgeID <float>proportion [select:<bool>]

select default value: false

Inserts a vertex in the specified edge using the proportions for placement control. Returns the index of the new vertex. If select is true, the new vertex will be selected.

EXAMPLE

p = convertToPoly(Plane())    --create a plane, convert to Epoly

--Insert new vertex and split edge 17 at 1/3 of its edge.

--new_vert will contain the index of the newly created vertex:

new_vert = p.insertVertexInEdge 17 0.3

polyOp.setVertSelection #{new_vert} --select the new vertex

select p --select the plane

max modify mode --switch to modify panel

subObjectLevel = 1 --go to Vertex level and check it out

Collapse

<bool><EditablePoly>.collapse <enum>mnSelLevel [flags:<DWORD>]

mnSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}

flags default value: 1

Collapses the sub-objects defined by flags in the specified sub-object level. Returns true on success.

See polyOp.getVertsByFlag , polyOp.getEdgesByFlag and polyOp.getFacesByFlag for descriptions of the flag bits.

EXAMPLE

p = convertToPoly(Plane()) --create a plane, convert to Epoly

polyop.setVertSelection p #{7,8,12,13} --select some vertices

p.EditablePoly.collapse #Vertex --collapse the selected vertices

Extrude Faces

<void><EditablePoly>.extrudeFaces <float>amount [faceFlags:<DWORD>]

faceFlags default value: 1

Extrudes the polygons defined by faceFlags by the specified amount. By default uses flag 1 which means selected polygons.

See polyOp.getFacesByFlag for descriptions of the flag bits.

SAMPLE SCRIPT

--create a skyscraper-like structure through random extrusions

p = convertToPoly(Plane()) --create a plane, convert to Epoly

for i = 1 to 50 do --repeat 50 times

(

polyop.setFaceSelection p #{(random 1 16)} --select a random polygon

p.extrudeFaces 5.0 --extrude the selection

)

<bool><EditablePoly>.ExtrudeAlongSpline faceFlag:<DWORD>

faceFlag default value: 1

Extrude along spline the polygons defined by the flags. Returns true on success.

See polyOp.getFacesByFlag for descriptions of the flag bits.

<bool><EditablePoly>.HingeFromEdge faceFlag:<DWORD>

faceFlag default value: 1

Hinge from edge the polygons defined by the flags. Returns true on success.

See polyOp.getFacesByFlag for descriptions of the flag bits.

Bevel

<void><EditablePoly>.bevelFaces <float>height <float>outline [faceFlags:<DWORD>]

faceFlags default value: 1

Bevels the polygons defined by faceFlags using the specified amount and outline values. By default uses flag 1 which means selected polygons.

See polyOp.getFacesByFlag for descriptions of the flag bits.

EXAMPLE

--create a futuristic skyline through random bevels

p = convertToPoly(Plane()) --create a plane, convert to Epoly

for i = 1 to 50 do --repeat 50 times

(

polyop.setFaceSelection p #{(random 1 16)} --select a random polygon

p.bevelFaces 5.0 (random 0.0 -1.0) --randomly bevel the selection

)

Chamfer

<void><EditablePoly>.chamferVertices <float>amount open:<bool>

open default value: false

Chamfer the selected vertices using the specified amount.

If the optional open: keyword is supplied and set to true, the new faces generated by the chamfer operation will be removed, leaving an opening. Available in 3ds Max 8 and higher.

EXAMPLE

p = convertToPoly(Plane()) --create a plane, convert to Epoly

polyop.setVertSelection p #{1,5,21,25} --select the corner vertices

p.EditablePoly.chamferVertices 5.0 --chamfer the selection

<void><EditablePoly>.chamferEdges <float>amount open:<bool>

open default value: false

Chamfers the selected edges using the specified amount.

If the optional open: keyword is supplied and set to true, the new faces generated by the chamfer operation will be removed, leaving an opening. Available in 3ds Max 8 and higher.

EXAMPLE

p = convertToPoly(Plane()) --create a plane, convert to Epoly

polyop.setEdgeSelection p #{7,10} --select two side edges

p.EditablePoly.chamferEdges 5.0 --chamfer the selection

Bridge

<bool><EditablePoly>.Bridge selLevel:<enum> flag:<DWORD>

selLevel enums: {#Object|#Vertex|#Edge|#Border|#Face|#Element|#CurrentLevel}

selLevel default value: #CurrentLevel

flag default value: 1

Creates a bridge using the specified selection level and flags. Returns true on success, false otherwise.

NOTE:

There are a number of Properties controlling the result of the the Bridge method. See Editable Poly Properties - Bridge

EXAMPLE

b = box() --create a box

b.heightsegs = b.widthsegs = b.lengthsegs = 5 --set segments to 5

convertToPoly(b) --convert to Editable Poly

--select the central faces on both sides of the box:

polyOp.setFaceSelection b #{57..59, 62..64, 67..69, 107..109, 112..114, 117..119}

b.bridgeSegments = 5 --set the bridge segments property to 5

b.bridge selLevel:#Face --bridge the selected polygons

<bool><EditablePoly>.ReadyToBridgeFlagged selLevel:<enum> flag:<DWORD>

selLevel enums: {#Object|#Vertex|#Edge|#Border|#Face|#Element|#CurrentLevel}

selLevel default value: #CurrentLevel

flag default value: 1

Returns true if the specified selection level and flags are ready to be bridged, false otherwise.

Relax

<bool><EditablePoly>.Relax selLevel:<enum> flag:<DWORD>

selLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}

selLevel default value: #CurrentLevel

flag default value: 1

Relaxes the vertices using the specified selection level and flags. Returns true on success, false otherwise.

NOTE:

There are a number of Properties controlling the result of the the Relax method. See Editable Poly Properties - Relax for details.

EXAMPLE

b = box() --create a box

b.heightsegs = b.widthsegs = b.lengthsegs = 5 --set segments to 5

convertToPoly(b) --convert to Editable Poly

b.relaxAmount = 1.5 --set the relax amount property to 1.5

b.relax selLevel:#Object --relax the whole mesh

b2 = box() --create another box

b2.heightsegs = b2.widthsegs = b2.lengthsegs = 5 --set segments to 5

convertToPoly(b2) --convert to Editable Poly

b2.relaxAmount = -1.5 --set the relax amount property to -1.5

b2.pos = [40,0,0] --place the box 40 units from the first one

b2.relax selLevel:#Object --relax the whole mesh

Slice

<bool><EditablePoly>.slice <point3>slicePlaneNormal <point3>slicePlaneCenter [flaggedFacesOnly:<bool>] [faceFlags:<DWORD>]

flaggedFacesOnly default value: false

faceFlags default value: 1

Slices using a slice plane defined by the normal vector and center. Both values are specified in local coordinates.

When flaggedFacesOnly is set to true, only polygons specified by faceFlags will be affected (by default flag is 1, in other words, selected polygons). Operates by default on the whole EditablePoly object. Returns true on success.

See polyOp.getFacesByFlag for descriptions of the flag bits.

EXAMPLE

--create a box, convert to Epoly

p = convertToPoly(Box())

--slice using a diagonal plane at height 10

p.slice [0,1,1] [0,0,10]

--select a side polygon

polyop.setFaceSelection p #{3}

--slice the selected polygon only using a horizontal plane at height 15

p.slice [0,0,1] [0,0,15] flaggedFacesOnly:true

<bool>inSlicePlaneMode()

Returns true if the EditablePoly is in slice plane mode.

Cut

<index><EditablePoly>.cutVertices <index>startVertex <point3>endPosition <point3>viewDirection

Cut using a plane defined by the start vertex, the specified point and the view direction.

<index><EditablePoly>.cutEdges <index>startEdge <float>startProportion <index>endEdge <float>endProportion <point3>viewDirection

Cut using a plane defined by the point specified by the two edges and proportions and the view direction.

<index><EditablePoly>.cutFaces <index>startFace <point3>startPosition <point3>endPosition <point3>viewDirection

Cut using a plane defined by the point specified by the two face positions and the view direction.

Weld

<bool><EditablePoly>.weldVerts <index>vertex1 <index>vertex2 <point3>destinationPoint

Weld the two specified vertices and move the resulting vertex to the specified position. Returns true on success.

<bool><EditablePoly>.weldEdges <index>edge1 <index>edge2

Weld the two specified edges. Returns true on success.

<bool><EditablePoly>.weldFlaggedVertices [vertexFlags:<DWORD>]

vertexFlags default value: 1

Weld the vertices defined by the supplied flags. Returns true on success.

See polyOp.getVertsByFlag for descriptions of the flag bits.

<bool><EditablePoly>.weldFlaggedEdges [edgeFlags:<DWORD>]

edgeFlags default value: 1

Weld the edges defined by the supplied flags. Returns true on success.

See polyOp.getEdgesByFlag for descriptions of the flag bits.

Create Shape from edges

<bool><EditablePoly>.createShape <string>shapeName <bool>curved <node>myNode edgeFlags:<DWORD>

edgeFlags default value: 1

Create a shape from the edges defined by the supplied flags. Returns true on success.

See polyOp.getEdgesByFlag for descriptions of the flag bits.

Make Planar

<bool><EditablePoly>.makePlanar <enum>mnSelLevel [flags:<DWORD>]

mnSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}

flags default value: 1

Make the sub-objects defined by flags in the specified sub-object level planar. Returns true on success.

See polyOp.getVertsByFlag , polyOp.getEdgesByFlag and polyOp.getFacesByFlag for descriptions of the flag bits.

<bool><EditablePoly>.moveToPlane <point3>planeNormal <float>planeOffset <enum>mnSelLevel flags:<DWORD>

mnSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}

flags default value: 1

Move the sub-objects defined by flags in the specified sub-object level to the specified plane. Returns true on success.

See polyOp.getVertsByFlag , polyOp.getEdgesByFlag and polyOp.getFacesByFlag for descriptions of the flag bits.

EXAMPLE

p = convertToPoly(Plane()) --create a plane, convert to Epoly

polyop.setVertSelection p #{7,8,12,13} --select some vertices

p.movetoplane [0,0,1] 5.0 #Vertex --move 5.0 units along +Z

<bool><EditablePoly>.alignToGrid <enum>mnSelLevel [flags:<DWORD>]

mnSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}

flags default value: 1

Align the sub-objects defined by flags in the specified sub-object level to the active grid. Returns true on success.

See polyOp.getVertsByFlag , polyOp.getEdgesByFlag and polyOp.getFacesByFlag for descriptions of the flag bits.

EXAMPLE

p = convertToPoly(Box()) --create a Box, convert to Epoly

polyop.setVertSelection p #{5,6} --select two top vertices

select p --select the EPoly

p.AlignToGrid #Vertex --align vertices to current grid

<bool><EditablePoly>.alignToView <enum>mnSelLevel [flags:<DWORD>]

mnSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}

flags default value: 1

Align the sub-objects defined by flags in the specified sub-object level to the active view. Returns true on success.

See polyOp.getVertsByFlag , polyOp.getEdgesByFlag and polyOp.getFacesByFlag for descriptions of the flag bits.

EXAMPLE

p = convertToPoly(Plane()) --create a plane, convert to Epoly

polyop.setVertSelection p #{7,8,12,13} --select some vertices

p.EditablePoly.alignToView #Vertex --align to current view

<bool><EditablePoly>.MakePlanarIn <enum>axis selLevel:<enum> flag:<DWORD>

axis enums: {#X|#Y|#Z}

selLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}

selLevel default value: #CurrentLevel

flag default value: 1

Makes the elements in the given sub-level specified by the flag bits planar relatively to the specified axis.

See polyOp.getVertsByFlag , polyOp.getEdgesByFlag and polyOp.getFacesByFlag for descriptions of the flag bits.

Subdivide

<bool><EditablePoly>.meshSmooth <enum>mnSelLevel flags:<DWORD>

mnSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}

flags default value: 1

Apply MeshSmooth the sub-objects defined by flags in the specified sub-object level. Returns true on success.

See polyOp.getVertsByFlag , polyOp.getEdgesByFlag and polyOp.getFacesByFlag for descriptions of the flag bits.

EXAMPLE

p = convertToPoly(Box()) --create a Box, convert to Epoly

polyop.setVertSelection p #{1} --select a vertex

--apply meshSmooth 3 times to the selected vertex:

for i = 1 to 3 do p.meshSmooth #Vertex

<bool><EditablePoly>.tessellate <enum>mnSelLevel flags:<DWORD>

mnSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}

flags default value: 1

Tessellate the sub-objects defined by flags in the specified sub-object level. Returns true on success.

EXAMPLE

p = convertToPoly(Box()) --create a Box, convert to Epoly

polyop.setVertSelection p #{1} --select a vertex

--apply tessellate 3 times to the selected vertex:

for i = 1 to 3 do p.tessellate #Vertex

<void><EditablePoly>.forceSubdivision()

Force subdivision.

Triangulation

<void><EditablePoly>.setDiagonal <index>face <index>corner1 <index>corner2

Set a diagonal in the specided face from corner1 to corner2.

<bool><EditablePoly>.retriangulate <DWORD>faceFlags

Retriangulate the faces defined by faceFlags. Returns true on success.

See polyOp.getFacesByFlag for descriptions of the flag bits.

<bool><EditablePoly>.TurnDiagonal <index>face <index>diagonal

Turn the indexed diagonal of the indexed face.

<bool><EditablePoly>.flipNormals <DWORD>faceFlags

Flip the normals of the faces defined by faceFlags. Returns true on success.

See polyOp.getFacesByFlag for descriptions of the flag bits.

Select Faces By...

<void><EditablePoly>.selectByMaterial <index>materialID [clearCurrentSelection:<bool>]

clearCurrentSelection default value: true

Select the faces with the specified materialID. If the optional clearCurrentSelection is set to false, the existing selection will be kept.

<void><EditablePoly>.selectBySmoothGroup <DWORD>smoothingGroups [clearCurrentSelection:<bool>]

clearCurrentSelection default value: true

Select the faces with the specified smoothing groups. If the optional clearCurrentSelection is set to false, the existing selection will be kept.

<void><EditablePoly>.autosmooth()

Generate smoothing groups automatically based on face angles.

UI Commands

<void><EditablePoly>.buttonOp <enum>buttonOpID

buttonOpID enums: {

#GrowSelection | #ShrinkSelection | #SelectEdgeLoop

| #SelectEdgeRing | #HideSelection | #HideUnselected

| #UnhideAll | #NamedSelectionCopy | #NamedSelectionPaste

| #Cap | #Delete | #Remove

| #Detach | #AttachList | #SplitEdges

| #BreakVertex | #Collapse | #ResetSlicePlane

| #Slice | #WeldSelected | #CreateShape

| #MakePlanar | #AlignGrid | #AlignView

| #RemoveIsoVerts | #MeshSmooth | #Tessellate

| #Update | #SelectByVertexColor | #Retriangulate

| #FlipNormals | #SelectByMatID | #SelectBySmoothingGroups

| #Autosmooth | #ClearSmoothingGroups| #Extrude

| #Bevel | #Inset | #Outline

| #ExtrudeAlongSpline | #HingeFromEdge | #ConnectEdges

| #ConnectVertices | #Chamfer | #Cut

| #RemoveIsoMapVerts | #ToggleShadedFaces

| #MakePlanarInX | #MakePlanarInY |#MakePlanarInZ }

Presses the specified Editable_Poly UI button.

EXAMPLE

p = convertToPoly(Plane()) --create a Box, convert to Epoly

polyop.setFaceSelection p #{6} --select a single polygon

select p --select the object

max modify mode --go to modify panel

subobjectlevel = 4 --go to polygon sub-object level

p.ButtonOp #GrowSelection --grow the selection

<void><EditablePoly>.toggleCommandMode <enum>commandModeID

commandModeID enums: {

#CreateVertex | #CreateEdge | #CreateFace

| #DivideEdge | #DivideFace | #ExtrudeVertex

| #ExtrudeEdge | #ExtrudeFace | #ChamferVertex

| #ChamferEdge | #Bevel | #SlicePlane

| #CutVertex | #CutEdge | #CutFace

| #Weld | #EditTriangulation | #InsetFace

| #QuickSlice | #HingeFromEdge | #PickLiftEdge

| #OutlineFace }

Presses the specified Editable_Poly UI button to enter a command mode.

<void><EditablePoly>.enterPickMode <enum>pickModeID

pickModeID enums: {#Attach|#PickShape}

Presses the button to enter the specified pick mode.

<void><EditablePoly>.exitCommandModes()

Exits any active command mode.

Get/Set By Flag

<bool><EditablePoly>.getVerticesByFlag <&bitArray>vertexSet <DWORD>flagsRequested [flagMask:<DWORD>]

vertexSet is In and Out parameter

flagMask default value: 0

Returns true on success.

Each vertex in a poly contains a 32 bit flag variable. This method returns a by-reference bitarray of the vertices that have specific bits in this flag variable set, where the bits being tested are based on a combination of <flagsRequested> and <flagMask>.

Internally, if <flagMask> is 0 then <flagMask> is set to the <flagsRequested> value, otherwise <flagsRequested> is set to the bitwise-AND of <flagsRequested> and <flagMask>. Bit 2 of <flagMask> is then set, which prevents dead vertices from being included in the resulting bitarray unless this bit was set in <flagMask>. Each bit in the resulting bitarray is set if the bitwise-AND of the flag variable and <flagMask> is equal to the bitwise-AND of <flagsRequested> and <flagMask>.

See polyOp.getVertsByFlag for descriptions of the flag bits.

EXAMPLE

my_array= #{} --define an empty bitarray

b = bit.Set 0 1 true --set the first bit to true

--now call the function and supply the empty array as

--In parameter by reference and the flag bit to filter out

$.getVerticesByFlag &my_array b

--Now look at the content of the bitarray -

--it will contain the vertices that have their first flag bit set

--(bit 1 stands for selected, so it will contain the vertex selection)

print my_array

<bool><EditablePoly>.getEdgesByFlag <&bitArray>edgeSet <DWORD>flagsRequested [flagMask:<DWORD>]

edgeSet is In and Out parameter

flagMask default value: 0

Get all edges whose flag bits are set to the ones supplied by flagsRequested. Returns true on success.

Each edge contains a 32 bit flag variable. This method returns a by-reference bitarray of the edges that have specific bits in this flag variable set, where the bits being tested are based on a combination of <flagsRequested> and <flagMask>.

Internally, if <flagMask> is 0 then <flagMask> is set to the <flagsRequested> value, otherwise <flagsRequested> is set to the bitwise-AND of <flagsRequested> and <flagMask>. Bit 2 of <flagMask> is then set, which prevents dead edges from being included in the resulting bitarray unless this bit was set in <flagMask>. Each bit in the resulting bitarray is set if the bitwise-AND of the flag variable and <flagMask> is equal to the bitwise-AND of <flagsRequested> and <flagMask>.

See polyOp.getEdgesByFlag for descriptions of the flag bits.

EXAMPLE

my_array= #{}    --define an empty bitarray

b = bit.Set 0 1 true  --set the first bit to true

--now call the function and supply the empty array as

--In parameter by reference and the flag bit to filter out

$.getEdgesByFlag &my_array b

--Now look at the content of the bitarray:

--it will contain the edges that have their first flag bit set

--(bit 1 stands for selected, so it will contain the edge selection)

print my_array

<bool><EditablePoly>.getFacesByFlag <&bitArray>faceSet <DWORD>flagsRequested [flagMask:<DWORD>]

faceSet is In and Out parameter

flagMask default value: 0

Returns true on success.

Each face contains a 32 bit flag variable. This method returns a by-reference bitarray of the faces that have specific bits in this flag variable set, where the bits being tested are based on a combination of <flagsRequested> and <flagMask>.

Internally, if <flagMask> is 0 then <flagMask> is set to the <flagsRequested> value, otherwise <flagsRequested> is set to the bitwise-AND of <flagsRequested> and <flagMask>. Bit 2 of <flagMask> is then set, which prevents dead faces from being included in the resulting bitarray unless this bit was set in <flagMask>. Each bit in the resulting bitarray is set if the bitwise-AND of the flag variable and <flagMask> is equal to the bitwise-AND of <flagsRequested> and <flagMask>.

See polyOp.getFacesByFlag for descriptions of the flag bits.

EXAMPLE

my_array= #{}    --define an empty bitarray

b = bit.Set 0 1 true  --set the first bit to true

--now call the function and supply the empty array as

--In parameter by reference and the flag bit to filter out

$.getFacesByFlag &my_array b

--Now look at the content of the bitarray:

--it will contain the faces that have their first flag bit set

--(bit 1 stands for selected, so it will contain the face selection)

print my_array

<void><EditablePoly>.setVertexFlags <&bitArray>vertexSet <DWORD>flagsToSet [flagMask:<DWORD>] generateUndoRecord:<bool>

vertexSet is In and Out parameter

flagMask default value: 0

Set the flag bits of the vertices supplied by the vertexSet bitarray to the bits supplied by flagsToSet.

See polyOp.getVertsByFlag for descriptions of the flag bits.

EXAMPLE

p = convertToPoly(Plane())  --create a plane, convert to Epoly

my_array= #{1,2,3,4}    --define an bitarray with some bits set

b = bit.Set 0 1 true    --set the first bit to true

--now call the function and supply the array as

--In parameter by reference and the flag bit to get

p.setVertexFlags &my_array b

--Since flag bit 1 stands for selected, the above will basically select

--the first 4 vertices in the EditablePoly by setting the

--corresponding flag bits. So let's take a look:

select p       --select the plane

max modify mode     --go to modify panel

subObjectLevel = 1   --set sub-object level to vertex -

--the first 4 vertices should be selected

<void><EditablePoly>.setEdgeFlags <&bitArray>edgeSet <DWORD>flagsToSet [flagMask:<DWORD>] generateUndoRecord:<bool>

edgeSet is In and Out parameter

flagMask default value: 0

Set the flag bits of the edges supplied by the edgeSet bitarray to the bits supplied by flagsToSet.

See polyOp.getEdgesByFlag for descriptions of the flag bits.

EXAMPLE

p = convertToPoly(Plane())  --create a plane, convert to Epoly

my_array= #{1,2,3,4}    --define an bitarray with some bits set

b = bit.Set 0 1 true    --set the first bit to true

--now call the function and supply the array as

--In parameter by reference and the flag bit to get

p.setEdgeFlags &my_array b

--Since flag bit 1 stands for selected, the above will basically select

--the first 4 vertices in the EditablePoly by setting the

--corresponding flag bits. So let's take a look:

select p       --select the plane

max modify mode     --go to modify panel

subObjectLevel = 2   --set sub-object level to edge -

--the first 4 edges should be selected

<void><EditablePoly>.setFaceFlags <&bitArray>faceSet <DWORD>flagsToSet [flagMask:<DWORD>] generateUndoRecord:<bool>

faceSet is In and Out parameter

flagMask default value: 0

Set the flag bits of the faces supplied by the faceSet bitarray to the bits supplied by flagsToSet.

See polyOp.getFacesByFlag for descriptions of the flag bits.

EXAMPLE

p = convertToPoly(Plane())  --create a plane, convert to Epoly

my_array= #{1,2,3,4}    --define an bitarray with some bits set

b = bit.Set 0 1 true    --set the first bit to true

--now call the function and supply the array as

--In parameter by reference and the flag bit to get

p.setFaceFlags &my_array b

--Since flag bit 1 stands for selected, the above will basically select

--the first 4 vertices in the EditablePoly by setting the

--corresponding flag bits. So let's take a look:

select p       --select the plane

max modify mode     --go to modify panel

subObjectLevel = 4   --set sub-object level to face -

--the first 4 faces should be selected

Slice Plane

<void><EditablePoly>.resetSlicePlane()

Reset the slice plane transformations to their defaults.

<void><EditablePoly>.getSlicePlane <&point3>planeNormal <&point3>planeCenter <*float>planeSize

planeNormal is In and Out parameter

planeCenter is In and Out parameter

planeSize is In and Out parameter

Get the orientation, center and size of the slice plane.

EXAMPLE

--Define variables to hold the Out parameters:

plane_normal = Point3 0 0 0

plane_center = Point3 0 0 0

plane_size = 1.0

--Call the function and supply the variables by reference as In parameters

$.getSlicePlane &plane_normal &plane_center &plane_size

--The variables will now contain the actual values of the slice plane:

plane_normal

plane_center

plane_size

<void><EditablePoly>.setSlicePlane <&point3>planeNormal <&point3>planeCenter <float>planeSize

planeNormal is In and Out parameter

planeCenter is In and Out parameter

Set the orientation, center and size of the slice plane.

EXAMPLE

--Define variables to hold the In parameters:

plane_normal = Point3 0 1 0

plane_center = Point3 5 5 6

--Call the function and supply the variables by reference as In parameters

$.setSlicePlane &plane_normal &plane_center 20.0

--The slice plane transforms should have changed

Get/Set Data

<float><EditablePoly>.getVertexData <integer>vertexDataChannel <*integer>numberSelected <*bool>uniformData [vertexFlags:<DWORD>]

numberSelected is In and Out parameter

uniformData is In and Out parameter

vertexFlags default value: 1

Get the vertex data stored in the specified vertexDataChannel. The number of vertices with stored values in this channel will be written to the passed by reference variable numberSelected. If all vertices contain the same value, the passed by reference boolean variable uniformData will contain true, otherwise false. If vertexFlags is specified, only values from the flagged vertices will be read. Returns the value stored in the first vertex encountered (e.g. the vertex with lower index)

See polyOp.getVertsByFlag for descriptions of the flag bits.

<float><EditablePoly>.getEdgeData <integer>edgeDataChannel <*integer>numberSelected <*bool>uniformData [edgeFlags:<DWORD>]

numberSelected is In and Out parameter

uniformData is In and Out parameter

edgeFlags default value: 1

Get the edge data stored in the specified edgeDataChannel. The number of edges with stored values in this channel will be written to the passed by reference variable numberSelected. If all edges contain the same value, the passed by reference boolean variable uniformData will contain true, otherwise false. If edgeFlags is specified, only values from the flagged edges will be read. Returns the value of the first edge encountered (e.g. the edge with lower index)

See polyOp.getEdgesByFlag for descriptions of the flag bits.

<void><EditablePoly>.setVertexData <integer>vertexDataChannel <float>value vertexFlags:<DWORD>

vertexFlags default value: 1

Set the vertex data stored in the specified vertexDataChannel to the provided value. If vertexFlags is specified, only flagged vertices will be affected.

See polyOp.getVertsByFlag for descriptions of the flag bits.

<void><EditablePoly>.setEdgeData <integer>edgeDataChannel <float>value [edgeFlags:<DWORD>]

edgeFlags default value: 1

Set the edge data stored in the specified edgeDataChannel to the provided value. If edgeFlags is specified, only flagged edges will be affected.

See polyOp.getEdgesByFlag for descriptions of the flag bits.

EXAMPLE

p = convertToPoly(Plane())

$Editable_Poly:Plane01 @ [0.000000,0.000000,0.000000]

polyop.setVertSelection p #{1,2} --select vertices 1 and 2

OK

numsel = 1 --define a variable to pass by reference

1 --it will contain the number of vertices

uniform = false --define a boolean var. for uniformity

false --will be true when values are uniform

p.getVertexData 1 &numsel &uniform --check default values

1.0    --default value returned is 1.0

numsel --look at the selection number again

2 --two vertices were encountered

uniform --check the uniformity

true --both vertices had the same value

p.setVertexData 1 100.0 --now change values to 100.0

OK

p.getVertexData 1 &numsel &uniform --and read it back

100.0 --the value has changed!

numsel --look at the selection number again

2 --still two vertices encountered

uniform --check the uniformity

true --both vertices still have the same value

polyop.setVertSelection p #{3} --select vertex 3 alone

OK

p.setVertexData 1 200.0 --change value to 200.0

OK

p.getVertexData 1 &numsel &uniform --get the value

200.0 --it is 200.0 as desired

polyop.setVertSelection p #{1,2,3} --select all 3 vertices

OK

p.getVertexData 1 &numsel &uniform --get all 3 values

100.0 --result is 100.0 because vert.1 is the first encountered

numsel --check how many vertices have been selected

3 --we selected 3 and there were actually 3

uniform --were the values uniform?

false --we have two 100.0 and one 200.0 value, not uniform

<void><EditablePoly>.resetVertexData <integer>vertexDataChannel

Reset the vertex data stored in the specified vertexDataChannel.

<void><EditablePoly>.resetEdgeData <integer>edgeDataChannel

Reset the vertex data stored in the specified edgeDataChannel.

<void><EditablePoly>.beginModifyPerData <enum>mnSelLevel <integer>dataChannel

mnSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}

Puts the EditablePoly object into ModifyPerData state. This makes all changes to the specified sub-object level and dataChannel conditional. At the end of the data changes, endModifyPerData has to be called with a boolean parameter to commit or discard the changes.

<bool><EditablePoly>.inModifyPerData()

Returns true if the object is currently in ModfyPerData state.

<void><EditablePoly>.endModifyPerData <bool>success

Exits the ModifyPerData state. If true is supplied for success, the changes will be commited. If false is supplied for success, the changes will be discarded. See also beginModifyPerData.

EXAMPLE

p = convertToPoly(Plane())

$Editable_Poly:Plane01 @ [0.000000,0.000000,0.000000]

polyop.setVertSelection p #{1,2} --select vertices 1 and 2

OK

numsel = 1 --define a variable to pass by reference

1 --it will contain the number of vertices

uniform = false --define a boolean var. for uniformity

false --will be true when values are uniform

p.getVertexData 1 &numsel &uniform --check default values

1.0    --default value returned is 1.0

p.beginModifyPerData #vertex 1 --begin Modify Data state

OK

p.setVertexData 1 100.0 --change values to 100.0

OK

p.endModifyPerData false --end Modify state, say it failed

OK

p.getVertexData 1 &numsel &uniform --check the value

1.0 --the value has NOT changed!

p.beginModifyPerData #vertex 1 --again Modify Data state

OK

p.setVertexData 1 100.0 --change values to 100.0

OK

p.endModifyPerData true --end Modify state with success!

OK

p.getVertexData 1 &numsel &uniform --check the value

100.0 --the value has changed as we notified success!

<index><EditablePoly>.getMaterialIndex <*bool>determined

determined is In and Out parameter

Returns the material ID.

<void><EditablePoly>.setMaterialIndex <index>index <DWORD>faceFlags

Set the material ID of the faces specified by the supplied flags.

<void><EditablePoly>.getSmoothingGroups <DWORD>faceFlag <*DWORD>anyFaces <*DWORD>allFaces

anyFaces is In and Out parameter

allFaces is In and Out parameter

Get the smoothing groups of the specified faces.

<void><EditablePoly>.setSmoothingGroups <DWORD>bitValues <DWORD>bitMask <DWORD>faceFlags

Set the smoothing groups of the specified faces.

<void><EditablePoly>.collapseDeadStructures()

Collapses all dead structures.

<integer><EditablePoly>.propogateComponentFlags <enum>mnSelLevelTo <DWORD>flagSetTo <enum>mnSelLevelFrom <DWORD>flagTestFrom [allBitsMustMatch:<bool>] [set:<bool>] [undoable:<bool>]

mnSelLevelTo enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}

mnSelLevelFrom enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}

allBitsMustMatch default value: false

set default value: true

undoable default value: false

See polyOp.getVertsByFlag , polyOp.getEdgesByFlag and polyOp.getFacesByFlag for descriptions of the flag bits.

Preview Mode

<void><EditablePoly>.PreviewBegin <enum>previewOperation

previewOperation enums: {

#GrowSelection | #ShrinkSelection | #SelectEdgeLoop

| #SelectEdgeRing | #HideSelection | #HideUnselected

| UnhideAll | #NamedSelectionCopy | #NamedSelectionPaste

| #Cap | #Delete | #Remove

| #Detach | #AttachList | #SplitEdges

| #BreakVertex | #Collapse | #ResetSlicePlane

| #Slice | #WeldSelected | #CreateShape

| #MakePlanar | #AlignGrid | #AlignView

| #RemoveIsoVerts | #MeshSmooth | #Tessellate

| #Update | #SelectByVertexColor | #Retriangulate

| #FlipNormals | #SelectByMatID | #SelectBySmoothingGroups

| #Autosmooth | #ClearSmoothingGroups | #Extrude

| #Bevel | #Inset | #Outline

| #ExtrudeAlongSpline | #HingeFromEdge | #ConnectEdges

| #ConnectVertices | #Chamfer | #Cut

| #RemoveIsoMapVerts | #ToggleShadedFaces

| #MakePlanarInX | #MakePlanarInY |#MakePlanarInZ}

Preview the specified operation. Lets you create interactive dialogs for manipulating sub-object selections in realtime.

EXAMPLE

--The following script creates a plane and a small menu to interactively

--extrude selected polygons.

p = convertToPoly(Plane())     --create a plane, turn to Epoly.

select p --select the plane

max modify mode --enter Modify panel

subobjectlevel = 4 --set Sub-Object mode to Polygon

rollout extrude_faces "Extrude" --define a rollout

(

button try_it "Preview" across:3 --a button to start a new extrusion

button cancel_it "Cancel" --a button to cancel preview

button accept_it "Accept" --a button to accept the extrusion

on cancel_it pressed do p.previewCancel() --cancel

on accept_it pressed do p.previewAccept() --accept

on try_it pressed do p.previewBegin #Extrude --begin again

)

createDialog extrude_faces 200 30 --create a dialog with the rollout

--Run the script, select some polygons, press Preview

--and watch them extrude interactively.

--Press Accept if you like the result, press Cancel to discard.

--Press Preview again for next extrusion etc.

<void><EditablePoly>.PreviewCancel()

Cancel the interactive preview.

<void><EditablePoly>.PreviewAccept()

Accept the interactive preview results.

<void><EditablePoly>.PreviewInvalidate()

Invalidates the preview results.

<bool><EditablePoly>.PreviewOn()

Enables preview mode.

<void><EditablePoly>.PreviewSetDragging <bool>dragging

Enables/Disables preview dragging.

<bool><EditablePoly>.PreviewGetDragging()

Returns true if preview dragging is enabled, false otherwise.

<bool><EditablePoly>.PopupDialog <enum>popupOperation

popupOperation enums:

{ #GrowSelection | #ShrinkSelection | #SelectEdgeLoop

| #SelectEdgeRing | #HideSelection | #HideUnselected

| #UnhideAll | #NamedSelectionCopy | #NamedSelectionPaste

| #Cap | #Delete | #Remove

| #Detach | #AttachList | #SplitEdges

| #BreakVertex | #Collapse | #ResetSlicePlane

| #Slice | #WeldSelected | #CreateShape

| #MakePlanar | #AlignGrid | #AlignView

| #RemoveIsoVerts | #MeshSmooth | #Tessellate

| #Update | #SelectByVertexColor | #Retriangulate

| #FlipNormals | #SelectByMatID | #SelectBySmoothingGroups

| #Autosmooth | #ClearSmoothingGroups | #Extrude

| #Bevel | #Inset | #Outline

| #ExtrudeAlongSpline | #HingeFromEdge | #ConnectEdges

| #ConnectVertices | #Chamfer | #Cut

| #RemoveIsoMapVerts | #ToggleShadedFaces

| #MakePlanarInX | #MakePlanarInY |#MakePlanarInZ }

Push the popup dialog's button for the specified interactive operation.

<void><EditablePoly>.ClosePopupDialog()

Close the popup dialog

Repeat Last Operation

<void><EditablePoly>.RepeatLastOperation()

Repeat the last operation in the current sub-object level.

Convert Selection

<void><EditablePoly>.GrowSelection selLevel:<enum>

selLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}

selLevel default value: #CurrentLevel

Grow the selection in the specified sub-object level.

<void><EditablePoly>.ShrinkSelection selLevel:<enum>

selLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}

selLevel default value: #CurrentLevel

Shrink the selection in the specified sub-object level.

<integer><EditablePoly>.ConvertSelection <enum>fromSelLevel <enum>toSelLevel [requireAll:<bool>]

fromSelLevel enums: {#Object|#Vertex|#Edge|#Border|#Face|#Element|#CurrentLevel}

toSelLevel enums: {#Object|#Vertex|#Edge|#Border|#Face|#Element|#CurrentLevel}

requireAll default value: false

Convert the selection from the specified source sub-object level to the specified target sub-object level. Returns the number of selected target sub-object elements.

<void><EditablePoly>.SelectBorder()

Select the borders containing the currently selected edges.

<void><EditablePoly>.SelectElement()

Select the elements containing the currently selected faces.

<void><EditablePoly>.SelectEdgeLoop()

Select the edge loops containing the currently selected edges.

<void><EditablePoly>.SelectEdgeRing()

Select the edge rings using the currently selected edges.

<void><EditablePoly>.setRingShift <integer>RingShiftValue <bool>MoveOnly <bool>Add

Moves the Ring selection. Available in 3ds Max 8 and higher.

RingShiftValue is the quantity of edges to shift. If MoveOnly is true, the selected edges will be moved, If Add is true and MoveOnly is true, newly selected edges will be added to the current selection. If MoveOnly is true and Add is false, newly selected edges will be removed to the current selection.

<void><EditablePoly>.setLoopShift <integer>LoopShiftValue <bool>MoveOnly <bool>Add

Moves the Loop selection. Available in 3ds Max 8 and higher.

LoopShiftValue is the quantity of edges to shift. If MoveOnly is true, the selected edges will be moved, If Add is true and MoveOnly is true, newly selected edges will be added to the current selection. If MoveOnly is true and Add is false, newly selected edges will be removed to the current selection.

<integer><EditablePoly>.ConvertSelectionToBorder <enum>fromSelLevel <enum>toSelLevel

fromSelLevel enums: {#Object|#Vertex|#Edge|#Border|#Face|#Element|#CurrentLevel}

toSelLevel enums: {#Object|#Vertex|#Edge|#Border|#Face|#Element|#CurrentLevel}

Converts the current selection to border selection. The first argument represent the sub-object type to convert from, the second one represents the sub-object type to convert to. Available in 3ds Max 8 and higher.

Remove

<bool><EditablePoly>.Remove selLevel:<enum> flag:<DWORD>

selLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}

selLevel default value: #CurrentLevel

flag default value: 1

Remove the sub-objects defined by flags from the specified sub-object level. Returns true on success.

See polyOp.getVertsByFlag , polyOp.getEdgesByFlag and polyOp.getFacesByFlag for descriptions of the flag bits.

EXAMPLE

p = convertToPoly(Plane()) --create a Plane, convert to Epoly

polyop.setVertSelection p #{13} --select a vertex

p.EditablePoly.Remove selLevel:#Vertex

p = convertToPoly(Plane()) --create a Plane, convert to Epoly

polyop.setVertSelection p #{13} --select a vertex

select p --select object

subobjectlevel = 1 --change to vertex level

p.Remove () --remove the current selection

Outline

<bool><EditablePoly>.Outline [faceFlag:<DWORD>]

faceFlag default value: 1

Outline the polygons defined by the flags. Returns true on success.

See polyOp.getFacesByFlag for descriptions of the flag bits.

Connect

<bool><EditablePoly>.ConnectEdges edgeFlag:<DWORD>

edgeFlag default value: 1

Connect the edges defined by the flags. Returns true on success.

See polyOp.getEdgesByFlag for descriptions of the flag bits.

<bool><EditablePoly>.ConnectVertices vertexFlag:<DWORD>

vertexFlag default value: 1

Connect the vertices defined by the flags. Returns true on success.

See polyOp.getVertsByFlag for descriptions of the flag bits.

Toggle Shaded Faces

<void><EditablePoly>.ToggleShadedFaces()

Toggles shaded polygons.

Get/Set Selections

<enum><EditablePoly>.GetEPolySelLevel()

GetEPolySelLevel enums: {#Object|#Vertex|#Edge|#Border|#Face|#Element|#CurrentLevel}

Returns the EditablePoly selection level set in the Modify panel.

<enum><EditablePoly>.GetMeshSelLevel()

GetMeshSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}

Returns the mesh selection level, this means the sub-object that can be selected in the current sub-object level. Edge and Border sub-object levels both return #Edge, Polygon and Element sub-object levels both return #Face.

<bitArray><EditablePoly>.GetSelection <enum>selectionLevel

selectionLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}

Returns the selection from the specified sub-object level as bitarray

<void><EditablePoly>.SetSelection <enum>selectionLevel <bitArray>selection

selectionLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}

Set the selection in the specified sub-object level using a bitarray.

EXAMPLE:

p = convertToPoly(Plane()) --create a Plane, convert to Epoly

p.SetSelection #Face #{1,2,3} --select polygons 1,2 and 3

p.SetSelection #Vertex #{1,2,3} --select vertices 1,2 and 3

Get Vertex

<integer><EditablePoly>.GetNumVertices()

Returns the number of vertices in the EditablePoly.

EXAMPLE:

p = convertToPoly(Plane()) --create a Plane, convert to Epoly

num_vert = p.GetNumVertices() --num_vert will contain 25

<point3><EditablePoly>.GetVertex <index>vertexID

Returns the coordinates of the vertex with the specified index.

EXAMPLE:

p = convertToPoly(Plane()) --create a Plane, convert to Epoly

--loop through all vertices in the plane and print

--the coordinates of each one of them:

for i = 1 to p.GetNumVertices() do

print (p.GetVertex i)

<integer><EditablePoly>.GetVertexFaceCount <index>vertexID

Returns the coordinates of the vertex with the specified index.

EXAMPLE:

p = convertToPoly(Plane())    --create a Plane, convert to Epoly

--loop through all vertices in the plane and print the number

--of polygons that are using each of them:

for i = 1 to p.GetNumVertices() do

print (p.GetVertexFaceCount i)

<index><EditablePoly>.GetVertexFace <index>vertexID <index>face

Returns the face index of the Nth polygon sharing the specified vertex (where N is between 1 and the number of polygons using the vertex). If the face argument is higher than the number of polygon sharing the vertex, the function will return 0.

EXAMPLE:

p = convertToPoly(Plane()) --create a Plane, convert to Epoly

--Print the indices of all faces sharing vertex 13 in the plane.

for i = 1 to (p.EditablePoly.GetVertexFaceCount 13) do

print (p.EditablePoly.GetVertexFace 13 i)

<integer><EditablePoly>.GetVertexEdgeCount <index>vertexID

Returns the number of edges sharing the specified vertex.

EXAMPLE:

p = convertToPoly(Plane()) --create a Plane, convert to Epoly

p.GetVertexEdgeCount 1 --returns 2 for a corner vertex

p.GetVertexEdgeCount 2 --returns 3 for a side vertex

p.GetVertexEdgeCount 13 --returns 4 for an inside vertex

<index><EditablePoly>.GetVertexEdge <index>vertexID <index>edge

Returns the edge index of the Nth edge sharing the specified vertex. (where N is between 1 and the number of edges sharing the vertex). If the edge argument is higher than the number of edges sharing the vertex, the function will return 0.

EXAMPLE:

p = convertToPoly(Plane()) --create a Plane, convert to Epoly

--Print the indices of all edges sharing vertex 13 in the plane.

for i = 1 to (p.GetVertexEdgeCount 13) do

print (p.GetEdgeFace 13 i)

Get Edge

<integer><EditablePoly>.GetNumEdges()

Returns the number of edges in the EditablePoly.

EXAMPLE:

p = convertToPoly(Plane())    --create a Plane, convert to Epoly

num_edges = p.GetNumEdges()  --num_edges will contain 40

<index><EditablePoly>.GetEdgeVertex <index>edgeID <index>end

Returns the vertex index used by the specified edge. Since an edge has two vertices, the end argument is needed to define which of the two vertices of the edge to get.

EXAMPLE:

p = convertToPoly(Plane())    --create a Plane, convert to Epoly

p.GetEdgeVertex 1 1 --returns vertex 6

p.GetEdgeVertex 1 2 --returns vertex 1

p.GetEdgeVertex 4 1 --returns vertex 1

p.GetEdgeVertex 4 2 --returns vertex 2

<index><EditablePoly>.GetEdgeFace <index>edgeID <index>side

Returns the face index used by the specified edge. Since an edge can have two faces, the side argument is needed to define which of the two possible faces to get.

EXAMPLE:

p = convertToPoly(Plane()) --create a Plane, convert to Epoly

p.GetEdgeFace 18 1 --returns face 6

p.GetEdgeFace 18 2 --returns face 7

p.GetEdgeFace 4 1 --returns face 1

p.GetEdgeFace 4 2 --returns 0 as there is no second face

Get Face

<integer><EditablePoly>.GetNumFaces()

Returns the number of faces in the EditablePoly.

EXAMPLE:

p = convertToPoly(Plane()) --create a Plane, convert to Epoly

num_faces = p.GetNumFaces() --num_faces will contain 16

<integer><EditablePoly>.GetFaceDegree <index>faceID

Returns the number of corners of the specified polygon. 3 means triangle, 4 means quad etc.

EXAMPLE:

p = convertToPoly(Plane())     --create a Plane, convert to Epoly

p.setSelection #Vertex #{13} --select the middle vertex

p.GetFaceDegree 1   -- degree of the corner face is 4

p.Remove selLevel:#Vertex --remove the middle vertex

p.GetFaceDegree 6   -- degree of the middle face is 8

<index><EditablePoly>.GetFaceVertex <index>faceID <index>corner

Returns the vertex index of the Nth vertex used by the specified face. (where N is between 1 and the number of face corners). If the corner argument is higher than the number of face corners, the function will return 0.

EXAMPLE:

p = convertToPoly(Plane()) --create a Plane, convert to Epoly

p.GetFaceVertex 1 1 --returns face 6

p.GetFaceVertex 1 2 --returns face 1

p.GetFaceVertex 1 3 --returns face 2

p.GetFaceVertex 1 4 --returns face 7

p.GetFaceVertex 1 5 --returns 0, there is no fifth corner

<index><EditablePoly>.GetFaceEdge <index>faceID <index>side

Returns the vertex index of the Nth vertex used by the specified face. (where N is between 1 and the number of face corners). If the corner argument is higher than the number of face corners, the function will return 0.

EXAMPLE:

p = convertToPoly(Plane()) --create a Plane, convert to Epoly

p.GetFaceEdge 1 1 --returns edge 1

p.GetFaceEdge 1 2 --returns edge 4

p.GetFaceEdge 1 3 --returns edge 3

p.GetFaceEdge 1 4 --returns edge 2

p.GetFaceEdge 1 5 --returns 0, there is no fifth edge

<index><EditablePoly>.GetFaceMaterial <index>faceID

Returns the material ID of the specified face. If the face index is higher than the number of faces in the EditablePoly, the function will return 1.

<DWORD><EditablePoly>.GetFaceSmoothingGroups <index>faceID

Returns the Smoothing Groups of the specified face. If the face index is higher than the number of faces in the EditablePoly, the function will return 0.

Get Map Channel

<integer><EditablePoly>.GetNumMapChannels()

Returns the number of mapping channels in the EditablePoly.

<bool><EditablePoly>.GetMapChannelActive <integer>mapChannel

Returns true if the specified mapping channel is active, false if not. If the mapChannel argument is higher than the number of available mapping channels, the function will return false.

<integer><EditablePoly>.GetNumMapVertices <integer>mapChannel

Returns the number of texture vertices in the specified mapping channel. Returns 0 if the mapChannel argument is higher than the number of available mapping channels.

<point3><EditablePoly>.GetMapVertex <integer>mapChannel <index>vertexID

Returns the value of the specified texture verticex in the specified mapping channel. Returns [0,0,0] if the mapChannel argument is higher than the number of available mapping channels or the vertex index is higher than the number of texture vertices.

<integer><EditablePoly>.GetMapFaceVertex <integer>mapChannel <index>faceID <index>corner

Returns the texture vertex index of the Nth texture vertex used by the specified face. (where N is between 1 and the number of face corners). If the corner argument is higher than the number of face corners, the function will return -1.


Modifier : MAXWrapper and SpacewarpModifier : MAXWrapper

The Modifier and SpacewarpModifier families of classes can be created and added to an object’s modifier stack using the addModifier() or modPanel.addModToSelection() methods. Unless otherwise noted, the term modifier will be used to mean members of either class.

By making a single modifier and adding it to several objects, you are sharing the modifier between the objects, as you would by applying a modifier to a selection of objects in the 3ds Max user interface. The constructors in the following classes can take any of the listed properties as optional keyword arguments with the defaults as shown.

Existing modifiers can be accessed in two ways:

  • As a property access on a <node>. When you access a property on a <node> scene object, such as its name or position, or length, MAXScript will also consider modifiers on the object to be properties, for example:

$box1.heightsegs -- get creation parameter

$box1.twist -- get the twist modifier

$box1.twist.angle -- the twist’s angle

You can then access modifier properties as subproperties on the modifier as shown. If the modifier name has spaces in it, you can use the ‘_’ as space convention that pathnames use, like this:

$box1.uvw_map -- to get the ‘UVW Map’ modifier

  • This will work in simple situations, but there may be several modifiers with the same name, or a modifier with the same name as a creation parameter (which is always looked for first). In this situation you can use the modifier array mechanism, which yields an array of modifiers you can index into:

$box1.modifiers -- get modifier array

$box1.modifiers[3] -- get the 3rd down the list

$box1.modifiers[#twist] -- get the one named "twist"

$box1.modifiers["ffd 4x4x4"] -- get the FFD

As you can see from the examples, you can use both name literals and strings to index modifiers by name in the table, so this is a way to get at modifiers with characters you cannot use in a MAXScript property name.

The ordering is as you would see in the Modify panel, numbered starting at 1 from top-to-bottom.

The classes derived directly from the Modifier and SpacewarpModifier classes are described in Modifier and SpacewarpModifier Types .

The properties, operators, and methods that are common to all classes derived directly from the Modifier and SpacewarpModifier classes are described in Modifier Common Properties, Operators, and Methods .

The Modifier and SpacewarpModifier classes are derived from the MAXWrapper class, and inherits the properties and methods defined for that class. These properties and methods are described in MAXWrapper Common Properties, Operators, and Methods .


Modifier Common Properties, Operators, and Methods

Properties

All modifiers have the following properties:

<modifier>.name : string

get and set modifier name

<modifier>.enabled : boolean

<modifier>.enabledInViews : boolean

lets you control the modifier’s enabled/disabled state. These are read/write properties that let you determine and set the enabled state of the given modifier,

FOR EXAMPLE

$foo.modifiers[2].enabled = false -- turn off 2nd modifier

The enabledInViews property controls viewport display, enabled controls both viewport and rendered display.

<modifier>.enabledInRenders : boolean

Get/Set whether the modifier is enabled in renders. When set to true, the modifier is enabled in renders, when false it is disabled.

Associated Methods

The modifier stack on a scene node can be manipulated using the following <node> methods:

validModifier ( <node> | <objectset>) (<modifier | <modifier_class>)

Tests whether a particular modifier or modifier class may be added the given <node> or <objectset>. Returns true if so, false if not.

The validModifier() method operates exactly as does the Modify panel in determining modifier applicability. Any modifier that takes a deformable object will return true for all scene objects except Helpers. This corresponds to the Modify panel’s behavior of allowing modifiers such as Bend, Taper, etc. to be applied to lights and cameras, space warp objects, etc., as well as geometry types like box, sphere, etc., but not helpers such as dummys or bones.

It is recommended that classes be used in RCMenus and macroScripts using validModifier() to reduce resource usage.

EXAMPLE

if validModifier $ Edit_Mesh then ...

instead of

if validModifier $ (Edit_Mesh()) then ...

The MAXScript isValidModifier function will check if it has been passed a modifier that doesn't exist at runtime. It returns false in this case. It uses the ClassEntry to determine the InputType() of the modifier.

addModifier <node> <modifier> [before:index] -- mapped

adds the modifier to all instances of the node to which the function is applied. The optional before: keyword argument can be used to insert the modifier into the node’s modifier stack just before the indexed modifier, counting from the top of the stack. The added modifier will apply to any appropriate active sub-object selection in the node only if the node is currently selected and open in the Modify panel at the desired sub-object level. You can use the 3ds Max System global variable, subObjectLevel to test and set the level for the object currently open in the Modify panel.

EXAMPLE

max modify mode -- open mod panel

select $box01 -- select box01 into mod panel

subObjectLevel = 3 -- subobject level to Face

addModifier $box01 (ffd_2x2x2()) -- add FFD mod to those faces

If the before: keyword argument would place a modifier in an invalid position in the stack, the modifier will be placed at the nearest valid position. For example, if you tried to place a SpacewarpModifier class object below a Modifier class object, the SpacewarpModifier object would be placed below any SpacewarpModifier objects, and above any Modifier objects.

If <node> is a collection, an instance of the modifier is placed on each of the nodes in the collection. Unlike interactively applying a modifier to a selection, the position and size of each modifier instance’s gizmo corresponds to position and size of the node the modifier instance is applied to. To apply a modifier to a collection in the same manner that 3ds Max applies modifiers, use the modPanel.addModToSelection() described in Modify Panel .

A limitation of the addModifier() function is that it cannot generally apply modifiers to sub-object selections, and so it disables any current sub-object levels. To apply a modifier to a sub-object selection in the same manner that 3ds Max applies modifiers, use the modPanel.addModToSelection(). This function correctly observes the currently selected sub-object level in the Modify panel.

deleteModifier <node> <modifier_or_index>

lets you delete modifiers from the modifier stack. Takes either a modifier value present on the <node> stack, or an index specifying the index of the modifier to delete, counting from the top of the stack.

collapseStack <node> -- mapped

collapses the modifiers out of a stack, leaving the appropriate resultant editable base class, such as Editable Mesh, Editable Spline, NURBS Surface, etc., as the base object of the node. If there are no modifiers in the stack when this is called, no action is taken. If you want to force a stack collapse or conversion to editable base class form, use one of the node conversion functions, such as convertToMesh(),convertToSplineShape(), etc. See the methods section in Node Common Properties, Operators, and Methods for more details.

getModContextTM <node> <modifier>

Returns a Matrix3 value giving the modifier’s context transform for the local coordinates used in modifier sub-object gizmos. Accessing the transform properties of a modifier sub-object such as a gizmo or a center in MAXScript yields values that are relative to that modifier’s context transform, equivalent to the values shown in track view for those properties. If the modifier is not operating on a sub-object selection, such as a face or vertex selection, or if the modifier was interactively applied to an object selection, this context TM is the local coordinate space of the object itself. However, if the modifier is operating on either an object selection set or a sub-object selection, the context transform gives the position and orientation of that selection, and so you can use getModContextTM() to get the world-space transform properties of any of its sub-objects.

getModContextBBoxMin <node> <modifier>

getModContextBBoxMax <node> <modifier>

These functions complement the getModContextTM() function and can be used to derive the world-space coordinates of the bounding box of the modifier context. This can be used, for example, to determine the bounds of a modifier operating on a sub-selection or the bounds of an FFD lattice. This is particularly useful for scripting FFD control point placement, since these control points live in a 0-to-1 lattice space—the mod context bounding box gives the world space bounds of this lattice space allowing you to compute scaled lattice space coordinates from world coordinates. The functions return Point3 values for the minimum and maximum extents of the bounding box.

See also

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods

Modifier Sub-Object Transform Properties


Modifier Sub-Object Transform Properties

In MAXScript, the values of modifier sub-object transform properties, such as centers and gizmo position, rotation and scale, are not given in the current working coordinate system, but rather are typically in the coordinate system of the object to which it is applied. This is in contrast to scene node transform properties. The values given are exactly as would be seen in the sub-object’s corresponding track view or as might be referenced in an Expression controller track variable for that sub-object property. To convert from local to world coordinates, you multiply the local coordinates by the node’s objecttransform matrix. To convert from world to local coordinates, you multiple the world coordinates by the inverse of the node’s objecttransform matrix.

FOR EXAMPLE

obj=box pos:[10,20,30]

addModifier obj (affect_region())

objTM=obj.objecttransform

modTM=getModContextTM obj obj.affect_region

-- calculate world coordinates of end point

obj.affect_region.end_point * (inverse modTM) * objTM

-- set end point at world coordinates [20,20,0]

obj.affect_region.end_point = [20,20,0] * modTM * (inverse objTM)

FFD Control Points

FFD control point sub-object properties are also accessible but have several special considerations. The control points properties are named as they appear in the track view, subject to the MAXScript convention of using ‘_’ underscores for spaces, so

FOR EXAMPLE

$foo.ffd_2x2x2.control_point_1

$baz.ffd_3x3x3.control_point_32 = [1,2,3]

There are two special considerations when accessing FFD control points. First, you can only access control points that have ALREADY been animated by hand, or by using the animateVertex() or the animateAll() MAXScript functions (see Scripting Vertex and Control Point Animation ). The FFD doesn’t actually create accessible control points until you do this, a behavior that shows up in the track view in normal 3ds Max use - you cannot actually place control point keyframes in the track view until you’ve animated the control point.

Second, control point coordinates are in FFD lattice space. This is a normalized space, with [0,0,0] at the lower left-hand corner (at control_point_1) and [1,1,1] at the opposite corner of the FFD lattice, so you have to be careful about computing and scaling correct coordinates when you set them. This is also reflected in the track view for FFD control points in normal 3ds Max use - if you look at their values in a keyframe property dialog or a function graph, they are in this normalized lattice space, not world-space coordinates. You’d have to work in this space also if you tried to use expression controllers to control FFDs. The modifier utility functions getModContextBBoxMin() and getModContextBBoxMin() can be used to determine the world-space bounds of an FFD lattice allowing you to compute scaled lattice space coordinates from world coordinates. See details on these functions in Modifier Common Properties, Operators, and Methods .

An example of accessing and converting coordinate systems for FFD control points is shown in the following script:

FOR EXAMPLE

b=box pos:[10,20,0]

ffd=ffdbox()

addModifier b ffd

animateVertex ffd 64

cp64posL=ffd.control_point_64

objTM=b.objecttransform

modTM=(getModContextTM b ffd)*ffd.lattice_transform.value

modBBMin=getModContextBBoxMin b ffd

modBBMax=getModContextBBoxMax b ffd

cp64posW=(modBBMin+(cp64posL*(modBBMax-modBBMin)) * (inverse modTM) * objTM


Modifier and SpacewarpModifier Types

The following list shows the 3ds Max Modifier and SpacewarpModifier class objects:

Modifiers

Selection Modifiers
 | FFD_Select Mesh_Select NSurf_Sel Patch_Select Poly_Select SplineSelect VolumeSelect
Animation Modifiers
 | Flex Melt Morpher Linked_XForm PatchDeform PathDeform Skin Skin_Morph Skin_Wrap Skin_Wrap_Patch SpacePatchDeform SpacePathDeform SpaceSurfDeform Spline_IK_Control SurfDeform
Cache Modifiers
 | Point_Cache Point_CacheSpacewarpModifier
Conversion Modifiers
 | Turn_to_Mesh Turn_to_Patch Turn_to_Poly
Free Form Deformation Modifiers
 | FFDBox FFDCyl FFD_2x2x2 FFD_3x3x3 FFD_4x4x4
UV Mapping Modifiers
 | CameraMap MapScaler MapScalerSpacewarpModifier Projection Select_By_Channel SpaceCameraMap Surface_Mapper Unwrap_UVW UVW_Mapping_Add UVW_Mapping_Clear UVW_Mapping_Paste UVWMap UVW_XForm
Mesh Editing Modifiers
 | Bevel Bevel_Profile Cap_Holes DeleteMesh Edit_Mesh Edit_Normals Edit_Poly Extrude Face_Extrude MultiRes NormalModifier Optimize Smooth STL_Check Symmetry Tesselate Vertex_Colors Vertex_Weld VertexPaint
Parametric Modifiers
 | Affect_Region Bend Displace Lattice Mirror Noise Preserve Push Relax Ripple Shell Skew SliceModifier Spherify Squeeze Stretch Substitute Taper Twist Wave XForm
Patch and Spline Editing Modifiers
 | CrossSection DeletePatch DeleteSpline Edit_Patch Edit_Spline Fillet_Chamfer Lathe NCurve_Sel Normalize_Spl Renderable_Spline Surface Sweep Trim_Extend
Radiosity Modifiers
 | Subdivide SubdivideSpacewarpModifier LS_Mesh LS_Colors
Subdivision Modifiers
 | HSDS_Modifier MeshSmooth TurboSmooth
Surface Modifiers
 | Disp_Approx Displace_Mesh Displace_NURBS Material MaterialByElement

SpacewarpModifier

The SpacewarpModifier classes are separated into two groups. The first group are those classes that bind a node to a SpaceWarp node. The SpacewarpModifier classes in this group are not directly created in MAXScript, but are rather created and applied to a node using the bindSpaceWarp() method.

The second group are those SpacewarpModifier classes that are created and applied to a node like any other modifier. They are called WorldSpaceModifiers (WSM) and are listed alongside with the Object Space Modifiers earlier on this page.

Spacewarp Binding SpacewarpModifiers

SimpleOSMToWSMMod

BombBinding

DeflectorBinding

DisplaceBinding

FFD_Binding

GravityBinding

MotorMod

PathFollowMod

PBombMod

PDynaFlectMod

POmniFlectMod

PushMod

RippleBinding

SDeflectMod

SDynaFlectMod

SOmniFlectMod

SpaceConform

UDeflectorMod

UDynaFlectMod

UOmniFlectMod

WaveBinding

WindBinding

See also

SpacewarpObject : Node


CamPerspCorrect : Modifier

CamPerspCorrect - superclass: modifier; super-superclass:MAXWrapper - 3:1 - classID: #(-439128320, 1577154749)

Value > MAXWrapper > Modifier > CamPerspCorrect

Camera perspective correction modifier used to obtain 2-point perspective effect. Based on the Skew modifier.

Constructor:

CamPerspCorrect...

Properties:

<CamPerspCorrect>.paramPerspectCorrectAmount Float default: 0.0 -- animatable; float

Get/Set the correction amount.

<CamPerspCorrect>.paramPerspectCorrectDir Float default: 90.0 -- animatable; float

Get/Set the correction direction

<CamPerspCorrect>.skew Skew default: Skew:Skew -- SubAnim

The Skew modifier used to perform the effect - see below:

CamPerspCorrect.skew - superclass: modifier; super-superclass:MAXWrapper - 8:2 - classID: #(1866252970, 0)

<CamPerspCorrect.skew>.axis Integer default: 3 -- radio button number

<CamPerspCorrect.skew>.direction Float default: 1.0 -- animatable; float

<CamPerspCorrect.skew>.limit BooleanClass default: false -- Boolean

<CamPerspCorrect.skew>.upperlimit Float default: 0.0 -- animatable; float

<CamPerspCorrect.skew>.lowerlimit Float default: 0.0 -- animatable; float

<CamPerspCorrect.skew>.amount Float default: 1.0 -- animatable; float

<CamPerspCorrect.skew>.center Point3 default: [0,0,0] -- animatable; point3

<CamPerspCorrect.skew>.gizmo SubAnim default: SubAnim:Gizmo -- transform; SubAnim

CamPerspCorrect.skew.gizmo - superclass: MAXObject; super-superclass:Value - 3:3 - classID: #(8197, 0)

<CamPerspCorrect.skew.gizmo>.position Point3 default: [0,0,0] -- animatable; point3

<CamPerspCorrect.skew.gizmo>.rotation Quat default: (quat 0 0 0 1) -- animatable; quat

<CamPerspCorrect.skew.gizmo>.scale Point3 default: [1,1,1] -- animatable; point3

Interfaces

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

Skew : Modifier

Modifier Sub-Object Transform Properties

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


EmptyModifier : Modifier

EmptyModifier - superclass: modifier; super-superclass:MAXWrapper - 0:0 - classID: #(1664468770, -2032486656)

Value > MAXWrapper > Modifier > EmptyModifier

This modifier provides a stand-in for adding Custom Attributes to the Modifier Stack. It has no properties or methods. It replaces the old implementation which had an unnecessary gizmo. The original EmptyModifier has been renamed to EmptyModifier_Old and is kept for backwards compatibility (see below).

Properties:

No properties exposed.

EmptyModifier_Old - superclass: modifier; super-superclass:MAXWrapper - 3:2 - classID: #(1664468769, -2032486656)

Properties:

<EmptyModifier_Old>.center UndefinedClass default: undefined -- point3

<EmptyModifier_Old>.gizmo SubAnim default: SubAnim:Gizmo -- transform; !error setting value!; SubAnim

EmptyModifier_Old.gizmo - superclass: MAXObject; super-superclass:Value - 3:3 - classID: #(8197, 0)

<EmptyModifier_Old.gizmo>.position Point3 default: [0,0,0] -- animatable; point3

<EmptyModifier_Old.gizmo>.rotation Quat default: (quat 0 0 0 1) -- animatable; quat

<EmptyModifier_Old.gizmo>.scale Point3 default: [1,1,1] -- animatable; point3

<EmptyModifier_Old>.myparam String default: "Add Custom Attributes Here" -- string


Flex : Modifier

Flex - superclass: modifier; super-superclass:MAXWrapper - classID: #(-568876209, -1975393616)

Value > MAXWrapper > Modifier > Flex

Constructor

flex ...

NOTE:

This class is not available in Autodesk VIZ.

Properties

<Flex>.flex Float default: 1.0 -- animatable

Sets the amount of flex and bend. Larger values increase the effect. Range=0 to 1000.

<Flex>.strength Float default: 3.0 -- animatable

Sets the spring strength. A value of 100 is rigid. Range=0 to 100.

<Flex>.sway Float default: 7.0 -- animatable

Sets the time for the object to come to rest. Lower values increase the time for the object to come to rest. Range=0 to 100.

<Flex>.chase   Boolean   default: true

Turns chase springs on/off.

<Flex>.center   Boolean  default: true

Turns the use of weights on/off.

<Flex>.solver   Integer  default: 0

The type of solver that will be used:

0- Euler Solver

1- Mid-point solver

2- Runnge Kutta

The higher the solver number, the more accurate/stable it is, and the slower it will run.

<Flex>.samples   Integer  default: 5 -- animatable

The number of samples per frame that the solver will use. The higher the number, the more accurate and stable; at the cost of a slower system.

<Flex>.stretch   Float   default: 5.0 -- animatable

This parameter slaves to the stretch strength/sway fields. It is normalized then copied to the strength/sway fields to prevent the system from becoming unstable.

<Flex>.stiffness Float   default: 0.1 -- animatable

This parameter slaves to the torque strength/sway fields. It is normalized then copied to the strength/sway fields to prevent the system from becoming unstable.

<Flex>.paintStrength Float default: 0.1

Sets the amount of weight that the brush leaves on the mesh. Higher values leave more weight. Range=-1 to 1.

<Flex>.paintRadius Float default: 36.0

Set the size of the brush in world units. Range=.001 to 99999.

<Flex>.paintFeather Float default: 0.7

Set the hardness of the brush. A value of 1 is soft. Range=-1 to 1.

<Flex>.absolute Boolean default: false

Turn on to change the value of the Vertex Weight parameter to assign absolute weights to the selected vertices. Turn off to add or remove weight based on the vertices current weight.

<Flex>.forceNode ArrayParameter default: #() --array containing Force Nodes; alias: Force_Nodes

Assigns force effect to particle space warps identified in an array.

<Flex>.colliderNode ArrayParameter default: #() -- node array

Array contains a list of collider objects that flex will use.

<Flex>.referenceFrame Integer default: 0 -- alias: Reference_Frame

Flex will start computing at this frame.

<Flex>.endFrame   Integer  default: 100

Flex will stop computing after this time.

<Flex>.enableEndFrame Boolean  default: false

Turns the end frame on/off.

<Flex>.affectAll Boolean  default: false

Forces flex to ignore any selection in the stack, causing it to flex the entire object.

<Flex>.enableAdvanceSprings Boolean default: false

Enables the advance spring fields. When this is off, the Stretch and Torque parameters are slaved to the Stretch and Stiffness parameters.

<Flex>.stretchStrength Float   default: 0.2 -- animatable

Controls the strength of stretch springs.

<Flex>.stretchSway Float   default: 0.2 -- animatable

Controls the sway of stretch springs.

<Flex>.torqueStrength Float   default: 0.2 -- animatable

Controls the strength of torque springs.

<Flex>.torqueSway Float   default: 0.2 -- animatable

Controls the sway of torque springs.

<Flex>.holdLength Boolean  default: false

Turns on/off the hold length parameter.

<Flex>.holdLengthPercent Float  default: 25.0

The maximum percentage the spring can stretch/squash.

<Flex>.addMode Integer  default: 0

Flag to determine how springs will be added:

0- Single spring across selected vertices

1- Edge Springs

2- Edge Springs across only selected vertices

3- Hold Springs

4- Hold Springs across only selected vertices

<Flex>.displaySprings Boolean  default: false

Turns on/off the display of spring when in sub-object mode.

<Flex>.holdRadius Float   default: 50.0

The maximum distance that will be looked around when the hold springs are added.

<Flex>.extraStrength ArrayParameter default: #(0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2) -- float array

Control the strength of extra springs (those that belong to a group other than 0 [stretch] or 1 [torque]).

<Flex>.extraSway ArrayParameter default: #(0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2) -- float array

Control the sway of extra springs (those that belong to a group other than 0 [stretch] or 1 [torque]).

<Flex>.lazyEval Boolean  default: false

Turns on/off lazy evaluation, which causes the system to be reevaluated less at the expense of a less accurate display.

<Flex>.springColors ArrayParameter default: #([0,0,1], [0.909091,0,0], [0.818182,0,0], [0.727273,0,0], [0.636364,0,0], [0.545455,0,0], [0.454545,0,0], [0.363636,0,0], [0.272727,0,0], [0.181818,0,0], [0.0909091,0,0], [0,0,0]) -- point3 array

The colors for the springs for each group.

<Flex>.customSpringDisplay ArrayParameter default: #(true, true, true, true, true, true, true, true, true, true, true, true) -- bool array

This boolean array lets you turn on/off the display of the spring group.

<Flex>.createSpringDepth Integer  default: 2

The number of times the system is recursed when using create soft body.

<Flex>.createSpringMult Float  default: 2.0

The amount the flex effect is multiplied after each recursion when using create soft body.

The following property is defined by Flex, but is not used:

<Flex>.paintBackface Boolean default: true

Flex interfaces:

Interface: flexOps

Methods

flexOps.Paint <flex>

Presses the paint button in the flex interface.

flexOps.SetReference <flex>

Presses the Set Reference button in the flex interface.

flexOps.Reset <flex>

Presses the Reset button in the flex interface.

flexOps.AddForce <flex> <force>

Adds a force to the force list.

force (node) - The force to be added to the force list.

flexOps.RemoveForce <flex> <force>

Removes a force to the force list.

force (integer) - The index of the force to be removed. If this index = -1 then the selected force will be removed.

flexOps.NumberVertices <flex>

Returns and integer containing the number of points in the system.

flexOps.SelectVertices <flex> <sel> <update>

Selects the vertices passed in sel.

Sel (bitarray) - The bitarray that holds the selection.

Update (boolean) - Determines whether the viewports get updated.

flexOps.GetSelectedVertices <flex>

Returns bitarray containing the current selected vertices.

flexOps.GetVertexWeight <flex> <index>

Returns the weight of a specific vertex.

index (integer) - The index of the vertex you want to get the weight of.

flexOps.SetVertexWeight <flex> <Index_tab> <values_tab>

Sets the weight of vertices. These tables should be the same size.

index_tab (integer table) - A table of indices of the vertex you want to set the weight of.

values_tab (float table) - A table of values containing the weights.

flexOps.SetEdgeList <flex> <sel> <update>

Sets the edges to sel.

Sel (bitarray) - The bitarray that holds the edge selection.

Update (boolean) - Determines whether the viewports get updated.

flexOps.GetEdgeList <flex>

Returns bitarray containing the current edge selection list.

flexOps.AddSpringFromSelection <flex> <flag> <addDupes>

This creates one spring between 2 selected vertices that belong to a group.

flag (integer) - The group that this spring will belong to.

addDupes (boolean) - Will add duplicates if true.

flexOps.addSpring <flex> <a> <b> <flag> <addDupes>

This creates a spring between the 2 specified vertices.

a (integer) - Index of vertex of the start of the spring.

b (integer) - Index of the vertex of the end of the spring.

flag (integer) - Group springs belongs to (0 to12).

addDupes (boolean) - When true, if there is a duplicate spring it will be added.

flexOps.removeAllSprings <flex>

Removes all the springs the in the system.

flexOps.addSpringButton <flex>

Equivalent of hitting the Add Spring button in the user interface.

flexOps.RemoveSpringButton <flex>

Equivalent of hitting the Remove Spring button in the user interface.

flexOps.optionsButton <flex>

Equivalent of hitting the Options button in the user interface.

flexOps.createSimpleSoftButton <flex>

Equivalent of hitting the Create Simple Soft Bodies button in the user interface.

flexOps.RemoveSpringByEnd <flex> <a>

This removes all springs that are connected to a vertex.

a (integer) - The vertex index to be checked.

flexOps.removeSpringByEnds <flex> <a> <b>

This removes all springs that are connected to both vertex a and b.

a (integer) - First vertex index.

b (integer) - Second vertex index.

flexOps.removeSpringByIndex <flex> <index>

Remove a spring from the list which is at index in the spring list.

index (integer) - Index of the spring.

flexOps.numberSprings <flex>

Returns the number of springs in the system

flexOps.getSpringGroup <flex> <index>

Returns the group that the spring belongs to.

index (integer) - Index of the spring you want to examine.

flexOps.setSpringGroup <flex> <index> <group>

Sets the spring’s groups.

index (integer) - Index of the spring.

group (integer) - The group number (0-12).

flexOps.getSpringLength <flex> <index>

Gets the rest length of a particular spring.

index (integer) - Index of the spring that you want to examine.

flexOps.setSpringLength <flex> <index> <length>

Sets the rest length of a particular spring.

index (integer) - Index of the spring that you want to examine.

length (float) - The rest length of the spring.

flexOps.getIndex <flex> <a> <b>

Returns the index of a spring that uses vertex a and b.

a (integer) - Index of the start vertex of the spring.

b (integer) - Index of the start end of the spring.

FlexOps Methods

flexOps.GetNumberVertices <Flex>

Returns the number of vertices in the object the Flex modifier is applied to.

flexOps.GetVertexWeight <Flex> <vertex_index_integer>

Returns the weight of the specified vertex.

flexOps.SelectVertices <Flex> (<vertex_index_integer> | <index_integer_array> | <bitarray>)

Selects the specified vertices. Clears any previously selected vertices.

flexOps.isEdgeVertex <Flex> <vertex_index_integer>

Returns 0 if the specified vertex is not an edge vertex, 1 if it is an edge vertex.

flexOps.ClearEdgeVertices <Flex> (<vertex_index_integer> | <index_integer_array>)

Sets the specified vertices to not be edge vertices.

flexOps.SetEdgeVertices <Flex> (<vertex_index_integer> | <index_integer_array>)

Sets the specified vertices to be edge vertices.

flexOps.SetVertexWeights <Flex> (<vertex_index_integer> | <index_integer_array>) (<weight_integer> | <weight_integer_array>)

Assigns the specified weights to the specified vertices. If the vertices and weights are specified as arrays, the arrays must be of equal size.

NOTES:

If deferred plug-in loading is enabled, an instance of the Flex modifier must be created before these methods will be visible. This is because these methods are defined in the Flex modifier plug-in.

You can't add deflectors to Flex through MAXScript.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Linked_XForm : Modifier

Linked_XForm - superclass: modifier; super-superclass:MAXWrapper - classID: #(806195, 0)

Value > MAXWrapper > Modifier > Linked_XForm

Constructor

linked_xform ...

LinkedXForm ...

NOTE:

Linked_Xform class instances are not creatable by MAXScript in Autodesk VIZ

Properties

<Linked_XForm>.backTransform BooleanClass default: true -- boolean; Back_Transform

Get/Set the state of the Back Transform checkbox.

<Linked_xform>.Control Node default: undefined

Object that the vertices are linked to. When transformed, the vertices follow.

NOTE:

In 3ds Max 4.2, an FPS interface was added to the Linked XForm modifier to expose a 'control' property, and the PB2 'control' property was hidden from MAXScript. Setting the control node with MAXScript now updates the internal offset matrices. Results can be unpredictable if the modifier is applied to multiple nodes since you aren't sure which of the nodes will be used when calculating the internal matrices.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Melt : Modifier

Melt - superclass: modifier; super-superclass:MAXWrapper - classID: #(919621541, 1342646195)

Value > MAXWrapper > Modifier > Melt

Constructor

melt ...

NOTE:

This class is not available in Autodesk VIZ.

Properties

<Melt>.Melt_Amount Float default: 0.0 -- animatable

The extent of the "decay", or melting effect applied to the gizmo, thus affecting the object.

<Melt>.Spread Float default: 19.0 -- animatable

Specifies how much the object and melt will spread as the Amount value increases. It’s basically a "bulge" along a flat plane.

<Melt>.Solidity_Preset Integer default: 0

The relative height of the center of the melted object. Less-solid substances like jelly tend to settle more in the center as they melt. This group provides several presets for different types of substances, as well as a Custom spinner for setting your own solidity:

0- Ice (The default Solidity setting.)

1- Glass (Uses a high Solidity setting to simulate glass.)

2- Jelly (Causes a significant drooping effect in the center.)

3- Custom (Sets any solidity between 0.2 and 30.0.)

<Melt>.Solidity_Custom_Value Float default: 1.0 -- animatable

Custom solidity value.

<Melt>.axis Integer default: 0

The axis (local to the object) on which the melt will occur. Note that this axis is local to the Melt gizmo and not related to the selected entity.

0- Z

1- Y

2- X

<Melt>.Negative_Axis Integer default: 0

Normally, the melt occurs from the positive direction toward the negative along a given axis. Turn on Flip Axis to reverse this direction.

0- Don’t Flip Axis

1- Flip Axis

<Melt>.center SubAnim default: SubAnim:Center -- point3; SubAnim

Get the center of the melt gizmo.

NOTE:

In releases prior to 3ds Max 5, this property was exposed as a Point3 value.

<Melt>.gizmo SubAnim

At this sub-object level, you can transform and animate the gizmo like any other object, altering the effect of the Melt modifier.

<Melt.gizmo>.position Point3 default: [0,0,0] -- animatable

The position of the gizmo. Translating the gizmo translates its center an equal distance.

<Melt.gizmo>.rotation Quat default: (quat 0 0 0 1) -- animatable

The rotation of the gizmo. Rotating the gizmo takes place with respect to its center.

<Melt.gizmo>.scale Point3 default: [1,1,1] -- animatable

The scaling of the gizmo. Scaling the gizmo takes place with respect to its center.

The following properties are defined by Melt, but are not used:

<Melt>.cut_Off__obsolete Float default: 0.0 -- animatable

<Melt>.Confine_To_Gizmo Integer default: 0

See also

Modifier Sub-Object Transform Properties

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Morpher : Modifier

Morpher - superclass: modifier; super-superclass:MAXWrapper - classID: #(398157908, -1513381213)

Value > MAXWrapper > Modifier > Morpher

Constructor

Morpher ...

NOTE:

This class is not available in Autodesk VIZ.

Properties

<Morpher>.Spinner_Minimum Float default: 0.0

The minimum limit.

<Morpher>.Spinner_Maximum Float default: 100.0

The maximum limit.

<Morpher>.Use_Limits Integer default: 1 -- Integer

Enable/disable limits.

<Morpher>.Use_Selection Integer default: 0

Turn on to limit morphing to vertices selected in a modifier below the Morpher modifier in the modifier stack.

<Morpher>.Value_Increments Integer default: 1

<Morpher>.Autoload_of_targets Integer default: 0

Turn this on to allow animated targets to be updated dynamically by the Morpher modifier.

The following methods provide enhanced access to the Morpher modifier.

Methods

<boolean>IsValidMorpherMod <Modifier_class>Modifier

Returns true when the supplied modifier is a valid Morpher modifier, false otherwise.

<boolean>WM3_MC_BuildFromNode <Morpher_Class>Morpher <integer>channel_index <geometry_class>target_object

Adds the object as target to the specified channel of the specified morpher modifier. Returns true on success.

EXAMPLE

WM3_MC_BuildFromNode $Teapot01.morpher 1 $Teapot02

true

<boolean>WM3_MC_Delete <Morpher_Class>Morpher <integer>channel_index

Deletes the target from the specified channel of the specified morpher modifier. Returns true on success.

EXAMPLE

WM3_MC_Delete $Teapot01.morpher 1

true

<float>WM3_MC_GetLimitMAX <Morpher_Class>Morpher <integer>channel_index

Returns the max. limit of the specified channel of the specified morpher modifier.

EXAMPLE

WM3_MC_GetLimitMAX $Teapot01.morpher 1

100.0

<float>WM3_MC_GetLimitMIN <Morpher_Class>Morpher <integer>channel_index

Returns the min. limit of the specified channel of the specified morpher modifier.

EXAMPLE

WM3_MC_GetLimitMIN $Teapot01.morpher 1

0.0

<float>WM3_MC_GetMemUse <Morpher_Class>Morpher <integer>channel_index

Returns the memory usage in bytes of the specified channel of the specified morpher modifier.

EXAMPLE

WM3_MC_GetMemUse $Teapot01.morpher 1

10600.0

<Point3>WM3_MC_GetMorphPoint <Morpher_Class>Morpher <integer>channel_index <integer>index

Returns the position of the indexed morph point (vertex) of the specified channel in the specified morpher modifier.

<float>WM3_MC_GetMorphWeight <Morpher_Class>Morpher <integer>channel_index <integer>index

Returns the weight of the indexed morph point (vertex) of the specified channel in the specified morpher modifier.

<string>WM3_MC_GetName <Morpher_Class>Morpher <integer>channel_index

Returns the name of the specified channel of the specified morpher modifier.

<node>WM3_MC_GetTarget <Morpher_Class>Morpher <integer>channel_index

Returns the target object of the specified channel of the specified morpher modifier.

<boolean>WM3_MC_GetUseLimits <Morpher_Class>Morpher <integer>channel_index

Returns true if the specified channel of the specified morpher modifier uses the limits, false otherwise.

<boolean>WM3_MC_GetUseVertexSel <Morpher_Class>Morpher <integer>channel_index

Returns true if the specified channel of the specified morpher modifier uses the vertex selection, false otherwise.

<float>WM3_MC_GetValue <Morpher_Class>Morpher <integer>channel_index

Returns the value of the specified channel of the specified morpher modifier.

<boolean>WM3_MC_HasData <Morpher_Class>Morpher <integer>channel_index

Returns true when the specified channel of the specified morpher modifier has target data, false otherwise.

<boolean>WM3_MC_HasTarget <Morpher_Class>Morpher <integer>channel_index

Returns true when the specified channel of the specified morpher modifier has a target object assigned, false otherwise.

<boolean>WM3_MC_IsActive <Morpher_Class>Morpher <integer>channel_index

Returns true when the specified channel of the specified morpher modifier is active, false otherwise.

<boolean>WM3_MC_IsValid <Morpher_Class>Morpher <integer>channel_index

Returns true when the specified channel of the specified morpher modifier is valid, false otherwise.

<integer>WM3_MC_NumMPts <Morpher_Class>Morpher <integer>channel_index

Returns the number of morph points (vertices) in the specified channel of the specified morpher modifier.

<integer>WM3_MC_NumPts <Morpher_Class>Morpher <integer>channel_index

Returns the total number of points (vertices) in the specified channel of the specified morpher modifier.

<boolean>WM3_MC_Rebuild <Morpher_Class>Morpher <integer>channel_index

Rebuilds the target in the specified channel of the specified morpher modifier. Returns true on success.

<boolean>WM3_MC_SetActive <Morpher_Class>Morpher <integer>channel_index <boolean>active_state

Acivates/Deactivates the specified channel of the specified morpher modifier. Returns true on success.

<boolean>WM3_MC_SetLimitMAX <Morpher_Class>Morpher <integer>channel_index <float>max_limit

Sets the max. limit for the specified channel of the specified morpher modifier. Returns true on success.

<boolean>WM3_MC_SetLimitMIN <Morpher_Class>Morpher <integer>channel_index <float>min_limit

Sets the min. limit for the specified channel of the specified morpher modifier. Returns true on success.

<boolean>WM3_MC_SetName <Morpher_Class>Morpher <integer>channel_index <string>new_name

Sets the name of the specified channel of the specified morpher modifier. Returns true on success.

<boolean>WM3_MC_SetUseLimits <Morpher_Class>Morpher <integer>channel_index <boolean>use_limits

Activates limit usage for the specified channel of the specified morpher modifier. Returns true on success.

<boolean>WM3_MC_SetUseVertexSel <Morpher_Class>Morpher <integer>channel_index <boolean>use_vert_sel

Activates vertex selection usage for the specified channel of the specified morpher modifier. Returns true on success.

<boolean>WM3_MC_SetValue <Morpher_Class>Morpher <integer>channel_index <float>new_value

Sets the value of the specified channel of the specified morpher modifier. Returns true on success.

<boolean>WM3_RebuildInternalCache <Morpher_Class>Morpher

Rebuilds the internal cache of the specified morpher modifier. Returns true on success.

<boolean>WM3_RefreshChannelListUI <Morpher_Class>Morpher

Refreshes the channel list of the specified morpher modifier. Returns true on success.

<boolean>WM3_RefreshChannelParamsUI <Morpher_Class>Morpher

Refreshes the channel parameters of the specified morpher modifier. Returns true on success.

<boolean>WM3_SetChannelPos <Morpher_Class>Morpher <Integer>new_pos

Scrolls the morpher UI to the specified channel. Returns true on success.

<boolean>WM3_SetChannelSel <Morpher_Class>Morpher <Integer>new_sel

Selects the specified channel of the specified morpher modifier. Returns true on success.

The following methods were added in 3ds Max 8:

WM3_MoveMorph <Morpher_Class>Morpher <Integer>old_pos <Integer>new_pos

Moves the indexed morph channel to the specified channel, leaving the old channel Empty and overwriting the new channel if not empty. Available in 3ds Max 8 and higher.

EXAMPLE

WM3_MoveMorph $Teapot01.morpher 1 10 --moves channel 1 to channel 10.

OK

WM3_SwapMorph <Morpher_Class>Morpher <Integer>first_pos <Integer>second_pos

Swaps the morph channels, preserving both channels. Either of the two channels can be empty. Available in 3ds Max 8 and higher.

EXAMPLE

WM3_SwapMorph $Teapot01.morpher 1 10 --moves channel 1 to channel 10 and channel 10 to channel 1.

OK

WM3_DeleteProgressiveMorphNode <Morpher_Class>Morpher <Integer>morph_channel <Integer>prog_morph_index

Deletes the specified progressive morph from the given morph channel. Available in 3ds Max 8 and higher.

EXAMPLE

--deletes the second progressive morph of channel one.

WM3_DeleteProgressiveMorphNode $Teapot01.morpher 1 2

OK

--if the channel is empty, returns false:

WM3_DeleteProgressiveMorphNode $Teapot01.morpher 100 1

false

WM3_AddProgressiveMorphNode <Morpher_Class>Morpher <Integer>morph_channel <Node>morph_target

Adds a progressive morph to the given morph channel. Available in 3ds Max 8 and higher.

EXAMPLE

--adds the node Teapot02 as progressive morph target of channel one.

WM3_AddProgressiveMorphNode $Teapot01.morpher 1 $Teapot02

OK

--if the node is invalid, returns false - in this case, cannot add itself:

WM3_AddProgressiveMorphNode $Teapot01.morpher 1 $Teapot01

false

WM3_GetProgressiveMorphNode <Morpher_Class>Morpher <Integer>morph_channel <Integer>prog_morph_index

Returns the progressive morph node with the given index from the specified morph channel. Available in 3ds Max 8 and higher.

EXAMPLE

--gets the second progressive morph target from channel one:

WM3_GetProgressiveMorphNode $Teapot01.morpher 1 2

$Ediable_Mesh:Teapot01 @ [0.0,0.0,0.0]

--if there is no such index or the channel is empty, returns undefined

WM3_GetProgressiveMorphNode $Teapot01.morpher 1 10

undefined

WM3_SetProgressiveMorphWeight <Morpher_Class>Morpher <Integer>morph_channel <Node>prog_morph_node <Float>weight

Sets the progressive morph weight for the target node in the specified morph channel to the supplied floating point value. Available in 3ds Max 8 and higher.

NOTE:

The value will NOT be converted implicitly from Integer to Float if supplied as Integer. Always provide a floating point value!

EXAMPLE

--sets the weight of Teapot02 in channel one to 25.0:

WM3_GetProgressiveMorphNode $Teapot01.morpher 1 $Teapot02 25.0

OK

WM3_GetProgressiveMorphWeight <Morpher_Class>Morpher <Integer>morph_channel <Node>prog_morph_node

Gets the progressive morph weight for the target node in the specified morph channel. Available in 3ds Max 8 and higher.

WM3_SetProgressiveMorphTension <Morpher_Class>Morpher <Integer>morph_channel <Float>tension

Sets the progressive morph tension of the specified morph channel to the supplied floating point value. Available in 3ds Max 8 and higher.

EXAMPLE

--sets the progressive morph tension of channel one to 0.3:

WM3_GetProgressiveMorphNode $Teapot01.morpher 1 0.3

OK

WM3_GetProgressiveMorphTension <Morpher_Class>Morpher <Integer>morph_channel

Gets the progressive morph tension of the specified morph channel as floating point value. Available in 3ds Max 8 and higher.

EXAMPLE

--gets the progressive morph tension of channel one:

WM3_GetProgressiveMorphNode $Teapot01.morpher 1

0.3

WM3_NumberOfProgressiveMorphs <Morpher_Class>Morpher <Integer>morph_channel

Returns the number of progressive morphs in the specified morph channel as integer. Available in 3ds Max 8 and higher.

WM3_CreateMarker <Morpher_Class>Morpher <Integer>morph_channel <String>marker_name

Creates a new marker with the given name in the specified morph channel. Available in 3ds Max 8 and higher.

WM3_NumberOfMarkers <Morpher_Class>Morpher

Returns the number of markers in the morph modifier as integer. Available in 3ds Max 8 and higher.

WM3_SetMarkerData <Morpher_Class>Morpher <Integer>marker_index <Integer>morph_channel <String>marker_name

Sets the marker data. Available in 3ds Max 8 and higher.

WM3_GetMarkerName <Morpher_Class>Morpher <Integer>marker_index

Returns the name of the indexed marker. Available in 3ds Max 8 and higher.

WM3_GetMarkerIndex <Morpher_Class>Morpher <Integer>marker_index

Returns the index of the indexed marker. Returns false if the index is out of range. Available in 3ds Max 8 and higher.

WM3_SetCurrentMarker <Morpher_Class>Morpher <Integer>marker_index

Sets the current marker to the indexed marker. Available in 3ds Max 8 and higher.

WM3_GetCurrentMarker <Morpher_Class>Morpher

Returns the index of the current marker. Available in 3ds Max 8 and higher.

WM3_DeleteMarker <Morpher_Class>Morpher <Integer>marker_index

Deletes the indexed marker. Available in 3ds Max 8 and higher.

See also

How To ... Enhance the Morpher Modifier With Floating Controls

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Paste_Skin_Weights: Modifier

Class instances not creatable by MAXScript

Alias:

PasteSkinWeights

Properties:

No properties or methods exposed.


PatchDeform : Modifier

PatchDeform - superclass: modifier; super-superclass:MAXWrapper - classID: #(1697653668, 1924755289)

Value > MAXWrapper > Modifier > PatchDeform

Constructor

PatchDeform ...

Properties

<PatchDeform>.U_Percent Float default: 50.0 -- animatable, percentage

Moves the object along the U (horizontal) axis of the gizmo patch, based on a percentage of the U distance. This defaults to a setting of 50 percent, which places the object at the center of the gizmo patch. A setting of 0 percent places the object at the left edge of the gizmo patch, as seen from the viewport where the patch was created.

<PatchDeform>.U_Stretch Float default: 1.0 -- animatable

Scales the object along the U (horizontal) axis of the gizmo patch.

<PatchDeform>.V_Percent Float default: 50.0 -- animatable, percentage

Moves the object along the V (vertical) axis of the gizmo patch, based on a percentage of the V distance. A setting of 0 percent places the object at the bottom of the gizmo patch.

<PatchDeform>.V_Stretch Float default: 1.0 -- animatable

Scales the object along the V (vertical) axis of the gizmo patch.

<PatchDeform>.rotation Float default: 0.0 -- animatable, angle

Rotates the modified object with respect to the gizmo patch.

<PatchDeform>.Plane_to_Patch_Deform Integer default: 0

Choose a two-axis plane of the object to make parallel with the XY plane of the gizmo patch:

0- XY

1- YZ

2- ZX

<PatchDeform>.Flip_deformation_axis Integer default: 0

When on, reverses the gizmo direction.

0- Don’t flip

1- Flip

<PatchDeform>.gizmo SubAnim

At this sub-object level, you can transform and animate the gizmo like any other object, altering the effect of the modifier. The PatchDeform gizmo is a representation of the deforming patch object, so transforming it determines which part of the patch affects the modified object.

<PatchDeform.gizmo>.position Point3 default: [0,0,0] -- animatable

The position of the patchdeform gizmo.

<PatchDeform.gizmo>.rotation Quat default: (quat 0 0 0 1) -- animatable

The rotation of the patchdeform gizmo.

<PatchDeform.gizmo>.scale Point3 default: [1,1,1] -- animatable

The scale of the patchdeform gizmo.

NOTE:

There is no way to specify the patch to deform to using MAXScript.

See also

Modifier Sub-Object Transform Properties

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


PathDeform : Modifier

PathDeform - superclass: modifier; super-superclass:MAXWrapper - classID: #(2135386771, 731264007)

Value > MAXWrapper > Modifier > PathDeform

Constructor

PathDeform ...

Properties

<PathDeform>.path Node default: undefined

The selected path object.

<PathDeform>.Percent_along_path Float default: 0.0 -- animatable, percentage

Moves the object along the gizmo path based on a percentage of the path length.

<PathDeform>.Stretch Float default: 1.0 -- animatable

Scales the object along the gizmo path, using the object’s pivot point as the base of the scale.

<PathDeform>.rotation Float default: 0.0 -- animatable, angle

Rotates the object about the gizmo path.

<PathDeform>.Twist Float default: 0.0 -- animatable, angle

Twists the object about the path. The twist angle is based on the rotation of one end of the overall length of the path. Typically, the deformed object takes up only a portion of the path, so the effect can be subtle.

<PathDeform>.axis Integer default: 2

The axus if the gizmo object which is aligned with the corresponding local axis of the path object:

0- X

1- Y

2- Z

<PathDeform>.Flip_deformation_axis Integer default: 0

When on, reverses the gizmo path 180 degrees about the specified axis.

0- Don’t flip

1- Flip

<PathDeform>.gizmo SubAnim

At this sub-object level, you can transform and animate the gizmo like any other object, altering the effect of the modifier. The PathDeform gizmo is a representation of the deforming path object, so transforming it determines which part of the path affects the modified object.

<PathDeform.Gizmo>.position Point3 default: [0,0,0] -- animatable

The position of the pathdeform gizmo.

<PathDeform.Gizmo>.rotation Quat default: (quat 0 0 0 1) -- animatable

The rotation of the pathdeform gizmo.

<PathDeform.Gizmo>.scale Point3 default: [1,1,1] -- animatable

The scale of the pathdeform gizmo.

See also

SpacePathDeform : SpacewarpModifier

Modifier Sub-Object Transform Properties

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Point_Cache - superclass: modifier

Point_Cache : Modifier

Point_Cache - superclass: modifier; super-superclass:MAXWrapper - 7:0 - classID: #(655302627, 61950361)

Value > MAXWrapper > Modifier > Point_Cache

In 3ds Max 9, the PointCache Modifier has been replaced with a version of the PointCache2 modifier previously available as a free plug-in. Its cache format has also been adapted to allow interchangeability with the new PointCache in Autodesk Maya for easier animation transfer between the two applications.

The documentation of the old PointCache Modifier in versions prior to 3ds Max 9 is provided at the bottom of this page for users developing scripts for earlier versions of 3ds Max.

Constructors

Point_Cache ...

PointCache ...

Note: This class is not available in Autodesk VIZ.

Properties

<Point_Cache>.fileName String default: "" -- filename

Get/set the cache file name.

Record

<Point_Cache>.fileCount Integer default: 0 -- integer; File_Count

Get/Set the state of the file count radio buttons.

Possible values are:

0 - One File

1 - One File Per Frame

Available in 3ds Max 2008 and higher.

<Point_Cache>.recordStart Float default: 0.0 -- float; Record_Start

Get/Set the cache record start time in Frames.

<Point_Cache>.recordEnd Float default: 100.0 -- float; Record_End

Get/Set the cache record end time in Frames.

<Point_Cache>.sampleRate Float default: 1.0 -- float; Sample_Rate

Get/Set the cache sample rate in samples per frame.

Load Type

<Point_Cache>.loadType Integer default: 0 -- integer; Load_Type

Get/Set the Load Type mode when using the Point Cache on a local workstation. Possible values are:

0 - Stream - Keeps the cache file open for fast access, but only loads a single frame at a time to conserve memory.

1 - Per-Sample - Opens the cache file, reads a single frame, and then immediately closes the file. This is slower than the stream load type, but is useful if you have many users reading/writing the same set of cache files since the cache files won't be locked open as you read from them.

2 - Pre-Load - Loads the entire cache file into RAM for very fast access, and then closes the file. Specifically useful for networks, or when a few caches are used by many objects in one scene (in which case, turning this on will prevent each object from thrashing the disk on playback). Be conservative in using this, as it can eat up RAM fast (though if one cache file is used by several objects, the cache will only be loaded into RAM once).
See the pointCacheMan.GetUsedMemory() method for more info.

<Point_Cache>.loadTypeSlave Integer default: 1 -- integer; Load_Type_Slave

Get/Set the Load Type mode when using the Point Cache on a network slave. Possible values are:

1 - Per-Sample

2 - Pre-Load

Playback Options

<Point_Cache>.strength Float default: 1.0 -- animatable; float

Get/Set the cache Strength. Default is 1.0. Lower values will influence the mesh less than the vertex positions stored in the cache file. Higher values will exaggerate the animation.

<Point_Cache>.relativeOffset BooleanClass default: false -- boolean; Relative_Offset

Get/Set the state of the Relative Offset option.

When true, only the differences from the first frame of the cache are used to distort the current object. If you would record a cache, set this option to true, add another modifier below the cache and modify the mesh, the recorded deformations will be added on top of the new deformations. Similarly, if the original recorded modifiers are still enabled, the object will get a double deformation.

When false, the point positions in the cache file explicitly set the point positions of the current object, overriding any additional deformations below the cache.

<Point_Cache>.applyToWholeObject BooleanClass default: true -- boolean; Apply_To_Whole_Object

Get/Set the state of the Apply to Whole Object option.

Playback Type

<Point_Cache>.playbackType Integer default: 0 -- integer; Playback_Type

Get/Set the Playback type. Possible values are:

0 - Original Range - This will always play back the cache over the range it was originally recorded (so the animation will always be the same as the original).

1 - Custom Start - This will play back the cache from a custom start time, but the animation length/playback speed will be the same as the original animation).

2 - Custom Range - This allows you to set a start and end frames that the current cache plays back within. Using a range that is smaller than the original record range will play the cache back faster, a larger range plays the cache back slower.

3 - Playback Graph - Allows you to animate which cache frame is played at any given time.
For example, if you record a cache from frame 0 to 100, set this parameter to 0 at frame 0, and animate it to 100 at frame 100. The function curve of this parameter in trackview shows how the cache is played back. Animating this lets you do interesting effects like slowing a cache down over time, or ping pong the cache playback, etc.

<Point_Cache>.playbackStart Float default: 0.0 -- float; Playback_Start

Get/Set the Playback Start value.

<Point_Cache>.playbackEnd Float default: 100.0 -- float; Playback_End

Get/Set the Playback End value.

<Point_Cache>.playbackFrame Float default: 0.0 -- animatable; float; Playback_Frame

Get/Set the Playback Frame. This value can be keyframes to control the playback when in Playback Graph mode.

<Point_Cache>.clampGraph BooleanClass default: false -- boolean; Clamp_Graph

Get/Set the state of the Clamp Graph option. It controls what gets loaded when the playback graph frame is out of the original recorded range.
For example if the playback frame is set to 105, but the original cache was recorded from 0 to 100. With clampGraph set to true, the loaded frame will be 100. When set to false, the cache will "wrap around" and load frame 5.
This way, you can loop caches more easily. In the example above, you could simply have a two key playback graph. Key 1 would be at frame 0 with a value of 0, and key 2 would be at frame 100 with a value of 100. Then you would set the out-of-range type for the graph to "linear extrapolate", and the cache would smoothly loop back to the beginning at frame 101.

The following properties are not exposed to the UI and are not fully supported:

<Point_Cache>.applyMeshToSpline BooleanClass default: false -- boolean; Apply_To_Spline

This option is not exposed to the UI. It should not be used.

<Point_Cache>.forceUncPath BooleanClass default: true -- boolean; Force_UNC_Path

Get/Set whether to force the cache path to UNC path or not. This option is not exposed to the UI.

<Point_Cache>.interpolationType Integer default: 0 -- integer; Interpolation_Type

This option is not exposed to the UI. It should not be used.

<Point_Cache>.playbackORTafter Integer default: 0 -- integer; Playback_Out_Of_Range_After

This option is not exposed to the UI.

<Point_Cache>.playbackORTbefore Integer default: 0 -- integer; Playback_Out_Of_Range_Before

This option is not exposed to the UI.

<Point_Cache>.preLoadCache BooleanClass default: false -- boolean; PreLoad_Cache

Get/Set whether to preload the cache when the scene is loaded. This option is not exposed to the UI.

PointCacheMan Struct

pointCacheMan.GetMemoryUsed()

Returns the memory used by Point Caches in the scene.

cacheOps Struct

cacheOps.DisableBelow <PointCacheModifier>

Disables all modifiers below the Point Cache modifier.

cacheOps.EnableBelow <PointCacheModifier>

Enables all modifiers below the Point Cache modifier.

cacheOps.RecordCache <PointCacheModifier>

Records the cache data of the given Point Cache modifier to disk.

cacheOps.Reload <PointCacheModifier>

Reloads the cache data of the given Point Cache modifier from disk.

cacheOps.Unload <PointCacheModifier>

Unloads the cache data of the given Point Cache modifier from memory.

Old Definition Prior To 3ds Max 9

Point_Cache : Modifier

Point_Cache - superclass: modifier; super-superclass:MAXWrapper - 7:0 - classID: #(567311073, 1221790700)

This is a simple point caching system. It lets you store modifier animation to a disk file that records only changes in vertex positions, and then play back the animation using the information in the disk file instead of the modifier keyframes. It caches the points of an object across time and then reads them from the disk on play back. It is useful when you have large intricate stacks that you want to speed up or modifiers such as flex that you want to bake.

This modifier sacrifices memory for speed, it stores 3 caches of the points to allow for fast reading from the disk. You can instance this modifier but the instances must have the same number of points, otherwise the results will be inconsistent. This also only records point position, it does not store mapping, topology changes etc. It also cannot deal with animated topology changes.

Constructors

Point_Cache ...

PointCache ...

Note: This class is not available in Autodesk VIZ.

Properties

<Point_Cache>.time Float default: 0.0 -- float

<Point_Cache>.start_time Float default: 0.0 -- float

The frame number at which the cached animation starts playing back. Using decimal fractions lets you start at a sub-frame setting when using a Frame:Ticks time display. Default=0.0.

Sets the first frame for recording the vertex animation.

<Point_Cache>.end_time Float default: 100.0 -- float

Sets the last frame for recording the vertex animation.

<Point_Cache>.samples Integer default: 1 -- integer

<Point_Cache>.cache_file Filename default: undefined -- string

Loads a vertex animation from a cache file on disk into the Point Cache modifier. If number of vertices in the cache file does not match the number of vertices in the object, a warning appears, but no error occurs.

<Point_Cache>.relativeOffset Boolean default: false -- boolean; Relative_Offset

Makes the Strength setting available. This enables offsetting the animated vertex positions relative to their positions as recorded. Default=off.

Note: When you turn on Use Relative Offsets and play back a cached animation with the modifiers turned on, the cached vertex positions are calculated relative to their positions as calculated by the modifiers. For example, if you record a Bend animation to a cache file, and then play it back with both Use Relative Offsets and the Bend modifier turned on and Strength=1.0, all vertex positions are doubled, resulting in exaggerated motion.

<Point_Cache>.strength Float default: 1.0 -- animatable; float

Affects the motion relative to the original animation. Available only when Use Relative Offsets is turned on. Default=1.0. Range=-10.0 to 10.0.

At 1.0, the animation plays back the same as recorded. With strengths between 0 and 1, the animation is relatively restrained. At strengths greater than 1, the animation is exaggerated. With negative Strength settings, the motion is reversed.

Point Cache Interfaces:

Interface: pointCache

Methods

<void>record()

Stores the vertex animation to a disk file. Call Record to activate the Save Points dialog, which lets you specify a path and file name for the cache file. Click OK to record the file, and then load it into the Point Cache modifier, ready for playback.

<void>setCache()

Loads a vertex animation from a cache file on disk into the Point Cache modifier. If number of vertices in the cache file does not match the number of vertices in the object, a warning appears, but no error occurs.

<void>enableMods()

Turns on all stack modifiers below the Point Cache modifier. Use this when you want to change modifier settings.

<void>disableMods()

Turns off all the object's stack modifiers below Point Cache so that only the cached vertex animation appears when you play back the animation.

WSM component of Point Cache.

Point_CacheSpaceWarpModifier

NOTE:

The WSM version is identical to the local space version except it records points in World Space and exists higher in the stack.

See also

Point_CacheSpacewarpModifier - superclass: SpacewarpModifier


Skin : Modifier

Skin - superclass: modifier; super-superclass:MAXWrapper - classID: #(9815843, 87654)

Value > MAXWrapper > Modifier > Skin

Constructor

Skin ...

NOTE:

This class is not available in Autodesk VIZ.

Properties

<Skin>.Effect    Float  default: 0.0

Absolute weight of selected vertices.

<Skin>.filter_vertices  Boolean default: false

Turn vertex selection on/off.

<Skin>.filter_cross_sections Boolean default: true

Turn cross-section selection on/off.

<Skin>.filter_envelopes Boolean default: true

Turn envelope selection on/off.

<Skin>.draw_all_envelopes Boolean default: false

When turned on, displays all envelopes. When off, only the selected envelopes are displayed.

<Skin>.draw_vertices   Boolean default: true

Turn on/off the display of weighted vertices.

<Skin>.ref_frame   Integer default: 0

Sets the frame where the bones and the mesh are in a reference position.

<Skin>.paint_radius   Float default: 24.0

Sets the brush radius.

<Skin>.paint_feather   Float default: 0.7

Sets the brush falloff.

<Skin>.cross_radius   Float default: 10.0

Scales the selected envelope cross-section.

<Skin>.always_deform   Boolean default: true

Always deforms the skin when the bones are moved. The Animate button does not have to be turned on to move bones and deform the skin.

<Skin>.paint_str   Float default: 0.1

Sets the brush strength.

<Skin>.localSquash   Array default: #() -- float array

Amount of squash applied to each bone.

<Skin>.initialSquash   Array default: #() -- float array

Array containing initial squash values for a bone.

<Skin>.initialStaticEnvelope Boolean default: false

When turned on, an initial static envelope size is used when a bone is added. When off, the initial envelope size is determined by the object bounding box.

<Skin>.initialInnerEnvelopePercent Float default: 0.75

The multiplier used to find the inner cross-section size when initialStaticEnvelope is false.

<Skin>.initialOuterEnvelopePercent Float default: 3.5

The multiplier used to find the outer cross-section size when initialStaticEnvelope is false.

<Skin>.initialEnvelopeInner Float default: 10.0

The inner cross-section size when initialStaticEnvelope is true.

<Skin>.initialEnvelopeOuter Float default: 50.0

The outer cross-section size when initialStaticEnvelope is true.

<Skin>.draw_all_gizmos  Boolean default: true

Turn on/off the display off all gizmos.

<Skin>.draw_all_vertices Boolean default: false

Turns on/off the display of all vertices as small dots.

<Skin>.shadeweights   Boolean default: true

Turn on/off display of weighted vertices using vertex colors.

<Skin>.envelopesAlwaysOnTop Boolean default: true

Turn on/off display of envelopes on top of the mesh.

<Skin>.crossSectionsAlwaysOnTop Boolean default: true

Turn on/off display of cross-sections on top of the mesh.

<Skin>.rigid_vertices   Boolean default: false

When turned on, a single vertex can only be affected by one bone.

<Skin>.rigid_handles   Boolean default: false

When turned on, all handles have the same weights as the knot that owns them.

<Skin>.fast_update   Boolean default: false

When turned on, the system uses only rigid vertices for the viewport display.

<Skin>.gizmos    Array default: #() -- max object array

Array containing all gizmos assigned to skin.

The following properties have been added to the skin modifier in 3ds Max 5

<Skin>.backTransform Boolean default: true -- boolean; Back_Transform_Verts

Get/Set the state of the "Back Transform Vertices" checkbox in the Advanced Parameters rollout

<Skin>.bone_Limit Integer default: 20 -- integer

Get/Set the value of the "Bone Affect Limit" control in the Advanced Parameters rollout

<Skin>.debugMode Boolean default: true -- boolean

Get/Set the Debug mode for the modifier. Not exposed to the UI, for internal use only. When enabled, data will be output to the Listener window which may be useful for tracking bugs.

<Skin>.shortenBoneNames Boolean default: true -- boolean; Shorten_Bone_Names

Get/Set the Shorten Bone Names mode state. When set to true, bone names longer than the width of the bone list will be shortened by adding "..." in the middle of the name and displaying only the start and end characters.

<Skin>.showNoEnvelopes Boolean default: false -- boolean; Shade_Weights

Get/Set the state of the "Show No Envelopes" checkbox in the Display rollout

<Skin>.updateOnMouseUp Boolean default: false -- boolean; Update_On_Mouse_Up

Get/Set the state of the "Update on mouse up" checkbox in the Advanced Parameters rollout

<Skin>.wt_activeVertexSet Integer default: 0 -- integer; Active_Vertex_Set

Get/Set the index of the Active Vertex Set drop-down list in the Weight Table dialog.

0 - All Vertices

1 - Selected Vertices

2 - Selected Bone

<Skin>.wt_affectSelected Boolean default: false -- boolean; Affect_Selected

Get/Set the Weight Table Affect Selected mode. When set to true, the "Affect Selected" option will be selected in the drop-down list in the Weight Table dialog. When false, "Affect All Verts" will be selected instead. To see the drop-down list, Options>Show Global should be checked.

<Skin>.wt_attribLabelHeight Integer default: 1 -- integer; Attrib_Label_Height

Get/Set the Weight Table Height of the attribute labels.

<Skin>.wt_dragLeftRightMode Boolean default: true -- boolean; Drag_Left_Right_Mode

Get/Set the Weight Table Drag direction mode. When set to true, dragging the mouse left-right will increase/decrease the value. When false, dragging up/down will change the value.

<Skin>.wt_flipUI Boolean default: false -- boolean; Flip_UI

Get/Set the Weight Table UI Flip mode. When set to true, the bone names will be displayed at the left side. When false, the bone names will be displayed on top.

<Skin>.wt_fontSize Integer default: 14 -- integer; FontSize

Get/Set the Weight Table font size.

<Skin>.wt_markerColor Color default: (color 255 0 255) -- Marker_Color

Get/Set the Weight Table marker color.

<Skin>.wt_markerType Integer default: 6 -- integer; Marker_Type

Get/Set the Weight Table marker type.

<Skin>.wt_precision Float default: 0.01 -- float; Precision

Get/Set the Weight Table precision when dragging a field.

<Skin>.wt_shortenLabels Boolean default: true -- boolean; Shortern_Labels

When set to true, the Weight Table labels will be shortened.

<Skin>.wt_showAffectedBones Boolean default: false -- boolean; Show_Affected_Bones

Get/Set the Show Affected Bones mode state. When enabled, it will filter out any bones that do not have any influence on the currently displayed vertices.

<Skin>.wt_showAttributes Boolean default: true -- boolean; Show_Attributes

Get/Set the Show Attributes mode state. Corresponds to the item in the Weight Table’s Options menu. When set to true will show the vertex attribute in the window, when set to false will remove the vertex attribute from the window.

<Skin>.wt_showCopyPasteUI Boolean default: true -- boolean; Show_Copy_and_Paste_UI

Controls the visibility of the Copy and Paste buttons in the Weight Table UI.

<Skin>.wt_showExclusions Boolean default: false -- boolean; Show_Exclusions

Gets/Sets the visibility of the exclusion toggle boxes. Corresponds to the item in the Weight Table’s Options menu.

<Skin>.wt_showGlobal Boolean default: false -- boolean; Show_Global

Get/Set the Show Global mode state. Corresponds to the item in the Weight Table’s Options menu. When set to true the global fields will be shown. When set to false, the global fields will be hidden.

<Skin>.wt_showLocks Boolean default: false -- boolean; Show_Locks

Gets/Sets the visibility of the Locks toggle boxes. Corresponds to the item in the Weight Table’s Options menu.

<Skin>.wt_showMarker Boolean default: true -- boolean; Show_Weight_Table_Marker

Controls the marker visibility in the viewport for the selected vertices in the Weight Table.

<Skin>.wt_showMenu Boolean default: true -- boolean; Show_Menu

Controls the menu visibility. Takes effect after re-opening the Weight Table.

<Skin>.wt_showOptionsUI Boolean default: false -- boolean; Show_Options_UI

Controls the Options panel visibility of the Weight Table dialog. This is not exposed to the standard UI.

<Skin>.wt_showSetUI Boolean default: false -- boolean; Show_Set_Sets_UI

Controls the Vertex Selection sets panel visibility of the Weight Table dialog.

<Skin>.wt_tableY Integer default: 10 -- integer; Top_Border

Controls the Y position of the top of the Weight Table. In other words it defines the height of the additional options panel on top of the Weight Table dialog.

<Skin>.wt_updateOnMouseUp Boolean default: false -- boolean; Update_On_Mouse_Up

Controls the state of the "Update On Mouse Up" item the Weight Table’s Options menu. When set to true, the viewport and stack will be updated only when the mouse is released.

<Skin>.wt_winHeight Integer default: 500 -- integer; Height

Get/set the Weight Table’s window height. Setting takes effect after re-opening the Weight Table.

<Skin>.wt_winWidth Integer default: 800 -- integer; Width

Get/set the Weight Table’s window width. Setting takes effect after re-opening the Weight Table.

<Skin>.wt_winXPos Integer default: 0 -- integer; Xpos

Get/set the Weight Table’s window horizontal position in pixels relatively to the upper left corner of the Windows desktop. Setting takes effect after re-opening the Weight Table.

<Skin>.wt_winYPos Integer default: 0 -- integer; YPos

Get/set the Weight Table’s window vertical position in pixels relatively to the upper left corner of the Windows desktop. Setting takes effect after re-opening the Weight Table.

The following properties have been added to the Skin modifier in 3ds Max 6

<Skin>.mirrorPlane Integer default: 0 -- integer; Mirror_Plane

Get/Set the mirror plane axis. Possible values are:

0 - X (default)

1 - Y

2 - Z

<Skin>.mirrorOffset Float default: 0.0 -- float; Mirror_Offset

Get/Set the mirror offset value.

<Skin>.mirrorUseInitialTM BooleanClass default: true -- boolean; Use_Initial_TM

When set to true, the mirror will use the initial transformation matrix.

<Skin>.mirrorEnabled BooleanClass default: false -- boolean; Mirror_Enabled

When set to true, mirror mode will be enabled. Corresponds to the "Mirror Mode" checkbutton in the Skin Modifier's UI.

<Skin>.mirrorThreshold Float default: 0.5 -- float; Mirror_Threshold

Get/Set the mirror treshold value.

<Skin>.mirrorProjection Integer default: 0 -- integer; Mirror_Projection

Get/Set the mirror projection mode. Possible values are:

0 - Default Display

1 - Positive Direction

2 - Negative Direction

3 - None

<Skin>.manualUpdate BooleanClass default: false -- boolean; Manual_Update

Controls the state of the "Manual Update" checkbox in the Skin Modifier's UI, "Mirror Parameters" rollout.

<Skin>.mirrorFast BooleanClass default: true -- boolean; Fast_Engine

When set to false, disables the fast mirror mode.

<Skin>.ignoreBoneScale BooleanClass default: false -- boolean; Ignore_Bone_Scale

Controls the state of the "Ignore Bone Scale" checkbox in the "Advanced Parameters" rollout of the Skin Modifier's UI.

<Skin>.rightJustifyBoneText BooleanClass default: true -- boolean; Right_Justify_Bone_Names

When set to true (default), bone text in the Weight Table dialog will be right-justified.

The following property has been added to 3ds Max 6 but is not officially supported.

Use at your own risk:

<Skin>.paintBlendMode BooleanClass default:false

Lets you paint Skin weights in Blend mode when set to true.

The following properties have been added to the Skin modifier in 3ds Max 8

<Skin>.selectElement BooleanClass default: false -- boolean; Select_Element

Get/Set the state of the Select Element checkbox in the Select group of controls in the Parameters rollout.

<Skin>.backFaceCull BooleanClass default: true -- boolean; Backface_Cull

Get/Set the state of the Backface Cull Vertices checkbox in the Select group of controls in the Parameters rollout.

<Skin>.colorAllWeights BooleanClass default: false -- boolean; Shade_Weights

Get/Set the state of the Color All Weights checkbox in the Display rollout.

<Skin>.showHiddenVertices BooleanClass default: false -- boolean; Show_Hidden_Vertices

Get/Set the state of the Show Hidden vertices checkbox in the Display rollout.

<Skin>.animatableEnvelopes BooleanClass default: false -- boolean; Animatable_Envelopes

Get/Set the state of the Animatable Envelopes checkbox in the Advanced Parameters rollout.

<Skin>.weightAllVertices BooleanClass default: true -- boolean; Weight_All_Vertices

Get/Set the state of the Weight All vertices checkbox in the Advanced Parameters rollout.

<Skin>.clearZeroLimit Float default: 0.0 -- float; Clear_Zero_Weights_Limit

Get/Set the Remove Zero Limit value in the Advanced Parameters rollout.

<Skin>.weightColors ArrayParameter default: #([0.9,0,0], [0,0.9,0], [0,0,0.9], [0.9,0.9,0], [0,0.9,0.9], [0.9,0,0.9], [0.49,0,0], [0,0.49,0], [0,0,0.49], [0.49,0.49,0], [0,0.49,0.49], [0.9,0.49,0], [0,0.49,0.9], [0.49,0.9,0], [0,0.9,0.49], [0.49,0,0.49], [0.9,0,0.49], [0.49,0,0.9], [0.49,0.49,0.9], [0.9,0.49,0.49], [0.9,0.49,0.9], ...) -- point3 array; Weight_Colors

Get/Set the colors to be used to display the weights.

<Skin>.weightTool_scale Float default: 0.95 -- float; Scale

Get/Set the Weight Tool's scale value.

<Skin>.weightTool_tolerance Float default: 0.1 -- float; Tolerance

Get/Set the Weight Tool's tolerance value.

<Skin>.weightTool_weight Float default: 0.5 -- float; Weight

Get/Set the Weight Tool's weight value.

Methods

The following methods require that the Skin modifier be the displayed modifier in the Modify panel, and that the Modify panel is active.

skinOps.addbone <Skin> <Bone_node> <Update_integer>

Adds a bone to the current system.

For Update_integer, - 1 forces a complete update and redraw, 0 does not update the system. This allows you to add a bunch of bones to a system and then update once at the end.

skinOps.addBoneFromViewEnd <Skin>

Ends the addBoneFromViewStart command mode.

skinOps.addBoneFromViewStart <Skin>

Puts you in a command mode where you can select bones from the viewport by clicking on them. You can exit this mode by right clicking or calling addBoneFromViewEnd.

skinOps.addCrossSection <Skin> <BoneID_integer> <U_float> <InnerRadius_float> <OuterRadius_float>

Adds a cross section to the bone whose index matches BoneID_integer. U_float, which ranges from 0.0-1.0, defines where along the bone to add the cross-section.

skinOps.addCrossSection <Skin> <U_float>

Adds a cross section to the current selected bone. The inner and outer radii are computed based on the neighboring cross sections. U_float, which ranges from 0.0-1.0, defines where along the bone to add the cross-section.

skinOps.addCrossSection <Skin> <U_float> <InnerRadius_float> <OuterRadius_float>

Adds a cross section to the current selected bone. U_float, which ranges from 0.0-1.0, defines where along the bone to add the cross-section.

skinOps.bakeSelectedVerts <Skin>

Bake the selected vertices.

skinOps.buttonAdd <Skin>

Presses the add bone button.

skinOps.buttonAddCrossSection <Skin>

Presses the add cross section button.

skinOps.buttonAddGizmo <Skin>

Presses the add gizmo button in the gizmo rollout.

skinOps.buttonCopyGizmo <Skin>

Presses the copy gizmo button in the gizmo rollout.

skinOps.buttonExclude <Skin>

Presses the exclude vertices button.

skinOps.buttonInclude <Skin>

Presses the include vertices button.

skinOps.buttonPaint <Skin>

Presses the paint button.

skinOps.buttonPasteGizmo <Skin>

Presses the paste gizmo button in the gizmo rollout.

skinOps.buttonRemove <Skin>

Presses the remove bone button.

skinOps.buttonRemoveCrossSection <Skin>

Presses the remove cross section button.

skinOps.buttonRemoveGizmo <Skin>

Presses the remove gizmo button in the gizmo rollout.

skinOps.buttonSelectExcluded <Skin>

Presses the select excluded vertices button.

skinOps.buttonWeightTable <Skin>

Brings up the Skin Weight Table for the specified modifier.

skinOps.copySelectedBone <Skin>

Copies current selected bone properties to the copy buffer.

skinOps.enableGizmo <Skin> <GizmoID_integer> <Enable_bool>

Enables/disables the gizmo type whose index equals GizmoID_integer.

skinOps.GetBoneName <Skin> <bone_integer> <nameflag_index>

Returns the name of the indexed bone as a string. where nameflag_index can be 0 or 1. If nameflag_index = 0 the node that holds the transform for this bone is returned; = 1 the name that exists in the list box is returned. If a Bones system is used for the Skin bones, the transform for a bone is held by its parent.

skinOps.getBonePropEnvelopeVisible <Skin> <BoneID_integer>

Returns the bone visibility parameter of the bone. 0 is invisible, 1 is visible.

skinOps.getBonePropFalloff <Skin> <BoneID_integer>

Returns the falloff parameter of the bone.

1 - linear

2 - sinual

3 - fast out

4 - slow out

skinOps.getBonePropRelative <Skin> <BoneID_integer>

Gets the relative property of the bone. It returns 1 if relative or 0 is absolute.

skinOps.GetCrossSectionU <Skin> <BoneID_integer> <CrossSectionID_integer>

Gets the U value from the specified bone and cross section

skinOps.getCurrentSelectGizmoType <Skin>

Returns the current selected gizmo type.

skinOps.GetEndPoint <Skin> <BoneID_integer>

Returns a point3 which is the end point of the bone.

skinOps.GetInnerRadius <Skin> <bone_integer> <CrossSectionID_integer>

Returns the inner cross section radius for the specified bone and cross section.

skinOps.GetNumberBones <Skin>

Returns the number of bones in the system.

skinOps.getNumberCrossSections <Skin> <bone_integer>

Returns the number of cross sections for the specified bone.

skinOps.getNumberOfGizmos <Skin>

Returns the number of gizmos.

skinOps.getNumberOfGizmoTypes <Skin>

Returns the number of gizmo types.

skinOps.GetNumberVertices <Skin>

Returns the number of vertices for the object the Skin modifier is applied to.

skinOps.GetOuterRadius <Skin> <bone_integer> <CrossSectionID_integer>

Returns the outer cross section radius for the specified bone and cross section.

skinOps.GetSelectedBone <Skin>

Returns the index of the current selected bone in the Bone list.

skinOps.getSelectedBonePropEnvelopeVisible <Skin>

Returns the bone visibility parameter of the current selected bone. 0 is invisible, 1 is visible.

skinOps.getSelectedBonePropFalloff <Skin>

Returns the falloff parameter of the current selected bone:

1 - linear

2 - sinual

3 - fast out

4 - slow out

skinOps.getSelectedBonePropRelative <Skin>

Gets the relative property of the current selected bone. It returns 1 if relative or 0 is absolute.

skinOps.getSelectedGizmo <Skin>

Returns the current selected gizmo.

skinOps.GetStartPoint <Skin> <BoneID_integer>

Returns a point3 which is the start point of the bone.

skinOps.GetVertexWeight <Skin> <vertex_integer> <vertex_bone_integer>

Returns the influence of the Nth bone affecting the specified vertex.

skinOps.GetVertexWeightBoneID <Skin> <vertex_integer> <vertex_bone_integer>

Returns the system bone index of the Nth bone affecting the specified vertex.

skinOps.GetVertexWeightCount <Skin> <vertex_integer>

Returns the number of bones influencing the specified vertex.

skinOps.Invalidate <Skin> <integer>

Invalidates the Skin’s internal cache, forcing it to recompute all the data. The integer parameter is not used, but should be passed when calling the method.

skinOps.isBoneSelected <Skin> <BoneID_integer>

Returns 1 if the bone is selected, otherwise 0.

skinOps.isRigidHandle <Skin> <handle_integer>

Returns true if the handle is rigid, false otherwise.

skinOps.isRigidVertex <Skin> <vertex_integer>

Returns true if the vertex is rigid, false otherwise. A rigid vertex will only be weighted to one bone.

skinOps.isUnNormalizeVertex <Skin> <vertex_integer>

Returns true if the vertex is unnormalized, false if it is normalized. A normalized vertex’ weights will sum up to 1.

skinOps.IsVertexModified <Skin> <vertex_integer>

Returns 1 if the vertex has been modified, 0 if it has not been modified. A modified vertex is vertex that has been weighted by hand or painting, an unmodified vertex weight depends solely on the envelopes.

skinOps.IsVertexSelected <Skin> <vertex_integer>

Returns 1 if the vertex is selected, 0 if it is not selected.

skinOps.loadEnvelope <Skin> [<filename_string>]

If the optional filename_string is supplied, loads the envelopes from the file supplied. If not, opens the load envelopes dialog.

skinOps.loadEnvelopeAsASCII <Skin>

Loads the envelopes to the file supplied

skinOps.multiRemove <Skin>

Brings up a list box where the user can delete multiple bones instead of one at a time.

skinOps.paintOptionsButton <Skin>

Presses the Paint Options button and opens the Paint Options dialog.

EXAMPLE

skinOps.paintOptionsButton $.skin

skinOps.paintWeightsButton <Skin>

Presses the Weights button and enters the Paint Weights mode.

skinOps.pasteToAllBones <Skin>

Pastes the copy buffer to all the bones.

skinOps.pasteToBone <Skin> <BoneID_int>

Pastes the copy buffer to bone id supplied.

skinOps.pasteToSelectedBone <Skin>

Pastes the copy buffer to the current selected bone.

skinOps.removebone <Skin>

Removes the current selected bone from the bones system.

skinOps.removebone <Skin> <BoneID_integer>

Removes the BoneID from the bones system.

skinOps.RemoveCrossSection $<Skin>

Removes the current selected cross section from the current selected bone.

skinOps.RemoveCrossSection <Skin> <BoneID_integer> <CrossSectionID_integer>

Removes a particular cross-section from a particular bone.

skinOps.ReplaceVertexWeights <Skin> <vertex_integer> \

( <vertex_bone_integer> | <vertex_bone_array> ) \

( <weight_float> | <weight_array> )

Sets the influence of the specified bone(s) to the specified vertex. Any influence weights for the bone(s) that are not specified are erased. If the bones and weights are specified as arrays, the arrays must be of the same size.

skinOps.resetAllBones <Skin>

Resets all bones.

skinOps.resetSelectedBone <Skin>

Resets the current selected bone.

skinOps.resetSelectedVerts <Skin>

Resets the current selected vertices.

skinOps.rigidHandle <Skin> <handle_integer>

Sets the specified handle as rigid. A rigid handle vertex will have the same weight as the knot that owns it.

skinOps.rigidVertex <Skin> <vertex_integer>

Sets the specified vertex as rigid. A rigid vertex will only be weighted to one bone.

skinOps.saveEnvelope <Skin> [<filename_string>]

If the optional filename_string is not supplied, opens the save envelopes dialog. If the optional filename_string is supplied, saves the envelopes to the file supplied.

skinOps.saveEnvelopeAsASCII <Skin> [<filename_string>]

If the optional filename_string is not supplied, opens the save envelopes dialog. If the optional filename_string is supplied, saves the envelopes to the file supplied as ASCII text file.

skinOps.SelectBone <Skin> <bone_integer>

Selects the specified bone in the Bone list.

skinOps.selectCrossSection <Skin> <CrossSectionID_integer> <Inner_Outer_integer>

Selects a cross section on the current selected bone.

For Inner_Outer_integer, 0 is the inner envelope 1 is the outer envelope.

skinOps.selectEndPoint <Skin>

Selects the start point of the envelope the current selected bone.

skinOps.selectGizmo <Skin> <gizmoID_int>

Desc - this function selects the gizmo who index equals gizmoID.

skinOps.selectGizmoType <Skin> <gizmoTypeID_int>

Selects the gizmo type whose index equals gizmoTypeID.

skinOps.selectNextBone <Skin>

Selects the next bone in the bone list.

skinOps.selectPreviousBone <Skin>

Selects the next bone in the bone list.

skinOps.selectStartPoint <Skin>

Selects the end point of the envelope of the current selected bone.

skinOps.SelectVertices <Skin> \

( <vertex_integer> | <vertex_array > | <<vertex_bitarray> )

Selects the specified vertices.

skinOps.setBonePropEnvelopeVisible <Skin> <BoneID_integer> <Visible_integer>

Sets the bone visibility parameter of the bone whose index matches BoneID_integer.

For Visible_integer, 0 is visible, 1 is invisible when not selected.

skinOps.setBonePropFalloff <Skin> <BoneID_integer> <Falloff_integer>

Sets the falloff parameter of the bone.

For Faloff_integer, the fall off of the bone is:

1 - linear

2 - sinual

3 - fast out

4 - slow out

skinOps.setBonePropRelative <Skin> <BoneID_integer> <Relative_integer>

Sets the relative property of the bone whose index matches BoneID_integer.

For Relative_integer, 0 is absolute and 1 is relative.

skinOps.SetCrossSectionU <Skin> <BoneID_integer> <CrossSectionID_integer> <U_float>

Sets the U value from the specified bone and cross section.

skinOps.SetEndPoint <Skin> <BoneID_integer> <EndPointPos_point3>

Sets the end point of the specified bone.

skinOps.SetInnerRadius <Skin> \

<bone_integer> <CrossSectionID_integer> <Radius_float>

Sets the inner cross section radius for the specified bone and cross section.

skinOps.SetOuterRadius <Skin> \

<bone_integer> <CrossSectionID_integer> <Radius_float>

Sets the outer cross section radius for the specified bone and cross section.

skinOps.setSelectedBonePropEnvelopeVisible <Skin> <Visible_integer>

Sets the bone visibility parameter of the current selected bone.

For Visible_integer, 0 = visible, 1 = invisible when not selected

skinOps.setSelectedBonePropFalloff <Skin> <Falloff_integer>

Sets the falloff parameter of the current selected bone.

The falloff_integer sets the fall off of the bone:

1 - linear

2 - sinual

3 - fast out

4 - slow out

skinOps.setSelectedBonePropRelative <Skin> <Relative_integer>

Sets the relative property of the current selected bone.

For relative_integer, 0 is relative mode, 1 is absolute mode.

skinOps.SetStartPoint <Skin> <BoneID_integer> <EndPointPos_point3>

Sets the start point of the specified bone

skinOps.SetVertexWeights <Skin> <vertex_integer> \

( <vertex_bone_integer> | <vertex_bone_array> ) \

( <weight_float> | <weight_array> )

Sets the influence of the specified bone(s) to the specified vertex. Any influence weights for the bone(s) that are not specified are retained. If the bones and weights are specified as arrays, the arrays must be of the same size.

skinOps.unNormalizeVertex <Skin> <vertex_integer> <boolean>

Unnormalizes the specified vertex. A normalized vertex’ weights will sum up to 1.

skinOps.ZoomToBone <Skin> <All_boolean>

Zooms the active or all views to the selected bone. If All_boolean is true, then all views are zoomed.

skinOps.ZoomToGizmo <Skin> <All_boolean>

Zooms the active or all views to the selected gizmo. If All_boolean is true, then all views are zoomed.

skinOps.pasteAllBones <SkinModifier> <Bool>

This method will paste all bones across the mirror plane going in the direction defined by the Bool parameter - if true, it pastes from blue to green, otherwise from green to blue.

skinOps.pasteAllVerts <SkinModifier> <Bool>

This method will paste all vertices across the mirror plane going in the direction defined by the Bool parameter - if true, it pastes from blue to green, otherwise from green to blue.

skinOps.SetWeight <Skin> <weight_float>

Sets the weight of the selected vertices in the specified Skin modifier to the given floating point weight value.

skinOps.WeightTool <Skin>

Opens the Weight Tool of the specified Skin modifier.

skinOps.isWeightToolOpen <Skin>

Returns 1 if the Weight Tool of the specified Skin modifier is open, 0 if it is closed.

skinOps.closeWeightTool <Skin>

Closes the Weight Tool of the specified Skin modifier if it is already open.

NOTE:

If deferred plug-in loading is enabled, an instance of the Skin modifier must be created before these methods will be visible. This is because these methods are defined in the Skin modifier plug-in.

Related Interfaces

Interface: SkinPose

Interface: SkinUtils

See also

Bulge_Angle_Deformer : ReferenceTarget

Joint_Angle_Deformer : ReferenceTarget

Morph_Angle_Deformer : ReferenceTarget

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Skin_Morph : Modifier

Skin_Morph - superclass: modifier; super-superclass:MAXWrapper - 32:0 - classID: #(2060490561, 1770267731)

Value > MAXWrapper > Modifier > Skin_Morph

Constructors

Skin_Morph ...

MorphByBone ...

Properties

Parameters Rollout

<Skin_Morph>.bones ArrayParameter default: #() -- node array; Bone_Nodes; SubAnim

Get/set the bones array.

Selection Rollout

<Skin_Morph>.useSoftSelection BooleanClass default: false -- boolean; Use_Soft_Selection

Get/set the state of the Use Soft Selection checkbox.

<Skin_Morph>.selectionRadius Float default: 10.0 -- float; Selection_Radius

Get/set the Soft Selection Radius value.

<Skin_Morph>.useEdgeLimit BooleanClass default: false -- boolean; Use_Edge_Limit

Get/set the state of the Edge Limit checbox.

<Skin_Morph>.edgeLimit Integer default: 10 -- integer; Edge_Limit

Get/set the Soft Selection Edge Limit value.

<Skin_Morph>.falloffGraphs ArrayParameter default: #() -- max object array; Falloff_Graphs; SubAnim

<Skin_Morph>.softSelectionGraph CurveControl default: ReferenceTarget:Animatable -- max object; Soft_Selection_Graph; SubAnim

Accesses the Soft Selection Curve Control .

Skin_Morph.softSelectionGraph - superclass: ReferenceMaker; super-superclass:MAXWrapper - 1:1 - classID: #(341333875, 1211792847)

<Skin_Morph.softSelectionGraph>.curve_1 SubAnim default: SubAnim:Curve_1 -- SubAnim Skin_Morph.softSelectionGraph.curve_1 : MAXObject ;

Accesses the curve in the Soft Selection Curve Control .

<Skin_Morph>.targetNodes ArrayParameter default: #() -- node array; Node_List; SubAnim

Get/set the External Mesh Target nodes array.

Local Properties Rollout

<Skin_Morph>.enabled BooleanClass default: true -- boolean

Get/set the state of the Enabled checkbox.

<Skin_Morph>.MorphName String default: "Morph 0" -- string

Get/set the name of the Morph.

<Skin_Morph>.influenceAngle Float default: 90.0 -- float; Influence

Get/set the Influence Angle value.

<Skin_Morph>.falloff Integer default: 0 -- integer

Get/set the Falloff drop-down list selection. Possible values are:

0 - Linear

1 - Sinual

2 - Fast

3 - Slow

4 - Custom Falloff

<Skin_Morph>.jointType Integer default: 0 -- integer; Joint_Type

Get/set the Joint Type drop-down list selection. Possible values are:

0 - Ball Joint

1 - Planar Joint

<Skin_Morph>.reloadSelected BooleanClass default: false -- boolean; Only_Reload_Selected_Vertices

Get/set the state of the "Reload only selected verts" checkbox.

Copy and Paste Rollout

<Skin_Morph>.showMirrorPlane BooleanClass default: false -- boolean; Show_Mirror_Plane

Get/set the state of the Show Mirror Plane checkbox.

<Skin_Morph>.previewBone BooleanClass default: false -- boolean; Preview_Bones

Get/set the state of the Preview Bone checkbox.

<Skin_Morph>.previewVerts BooleanClass default: false -- boolean; Preview_Verts

Get/set the state of the Preview Vertices checkbox.

<Skin_Morph>.mirrorPlane Integer default: 0 -- integer; Mirror_Plane

Get/set the Mirror Plane axis. Possible values are:

0 - X

1 - Y

2 - Z

<Skin_Morph>.mirrorOffset Float default: 0.0 -- float; Mirror_Offset

Get/set the Mirror Offset value.

<Skin_Morph>.mirrorThreshold Float default: 1.0 -- float; Mirror_Threshold

Get/set the Mirror Threshold value.

Options Rollout

<Skin_Morph>.safemode BooleanClass default: true -- boolean; Safe_Mode

Get/set the state of the Beginner Mode checkbox.

<Skin_Morph>.showDriverBone BooleanClass default: true -- boolean; Show_Driver_Bone

Get/set the state of the Show Driver Bone checkbox.

<Skin_Morph>.showMorphBone BooleanClass default: true -- boolean; Show_Morph_Bone

Get/set the state of the Show Morph Bone checkbox.

<Skin_Morph>.showCurrentAngle BooleanClass default: true -- boolean; Show_Current_Angle

Get/set the state of the Show Current Angle checkbox.

<Skin_Morph>.showEdges BooleanClass default: true -- boolean; Show_Edges

Get/set the state of the Show Edges checkbox.

<Skin_Morph>.matrixSize Float default: 10.0 -- float; Matrix_Size

Get/set the matrix size value.

<Skin_Morph>.boneSize Float default: 1.0 -- float; Bone_Size

Get/set the bones size value.

Additional Options not exposed to the UI

<Skin_Morph>.showLimitAngle BooleanClass default: false -- boolean; Show_Limit_Angle

When set to true, shows the Limit Angle in the viewport.

<Skin_Morph>.showDeltas BooleanClass default: true -- boolean; Show_Deltas

When set to true, shows the Deltas in the viewport.

<Skin_Morph>.showX BooleanClass default: true -- boolean; Show_X

<Skin_Morph>.showY BooleanClass default: true -- boolean; Show_Y<Skin_Morph>.showZ BooleanClass default: true -- boolean; Show_Z

Skin_Morph interfaces:

Interface: skinMorphOps

Methods:

<void>addBone <node>node

Adds the specified bone to the Bones list under Parameters.

<void>removeBone <node>node

Removes the specified bone from the Bones list under Parameters.

<void>selectBone <node>node <string>morphName

Selects the specified bone from the specified morph.

<void>selectVertices <node>node <bitArray>sel

Selects the vertices of the specified node using the specified bitArray.

<boolean>isSelectedVertex <node>node <integer>vertexIndex

Returns true if the indexed vertex of the specified node is selected

Selection Rollout

<void>resetSelectionGraph()

Resets the Soft Selection graph. Corresponds to pressing the Reset Graph button in the Selection rollout.

<void>ring()

Corresponds to pressing the Ring button in the Selection rollout.

<void>loop()

Corresponds to pressing the Loop button in the Selection rollout.

<void>shrink()

Corresponds to pressing the Shrink button in the Selection rollout.

<void>grow()

Corresponds to pressing the Grow button in the Selection rollout.

Local Properties Rollout

<void>createMorph <node>node

Corresponds to pressing the Create Morph button.

<void>removeMorph <node>node <string>morphName

Corresponds to pressing the Delete Morph button.

<void>editMorph <boolean>edit

Corresponds to pressing the Edit button.

<void>clearSelectedVertices()

Corresponds to pressing the Clear Verts button.

<void>resetOrientation <node>node <string>morphName

Affects the specified node and morph. Corresponds to pressing the Reset Orient. button with the corresponding morph and node selected.

<void>deleteSelectedVertices()

Corresponds to pressing the Remove Verts button.

<void>editFalloffGraph <node>node <string>morphName

Corresponds to pressing the G button next to the Falloff drop-down list when in Custom Falloff mode for the specified node and morph. Opens a Custom Falloff curve editor.

EXAMPLE

$Cylinder01.modifiers[1].editFalloffGraph $Bone01 "Morph 0"

--Cylinder01 is the node the Skin_Morph is assigned to

--Bone01 is the bone node

--"Morph 0" is the name of the morph

<void>setExternalNode <node>morphnode <string>morphName <node>externalnode

Sets the external Mesh for the specified node and morph to the supplied externalNode. Corresponds to using the External Mesh button.

<void>reloadTarget <node>node <string>morphName

Corresponds to pressing the Reload Target button for the specified node and morph.

Copy and Paste Rollout

<void>mirrorPaste <node>node

Corresponds to pressing the Paste Mirror button for the specified node.

Transformation Methods

<void>moveVerts <point3>vec

Moves the selected vertices by the specified vector.

<void>transformVerts <matrix3>tmMotion <matrix3>tmToLocalSpace

Transforms the vertices iusing the given matrices.

<matrix3>boneGetInitialNodeTM <node>node

Returns the initial node transformation matrix of the specified bone node.

<void>boneSetInitialNodeTM <node>node <matrix3>tm

Sets the initial node transformation matrix of the specified bone node to the supplied matrix value.

<matrix3>boneGetInitialObjectTM <node>node

Returns the initial object transformation matrix of the specified bone node.

<void>boneSetInitialObjectTM <node>node <matrix3>tm

Sets the initial object transformation matrix of the specified bone node to the supplied matrix value.

<matrix3>boneGetInitialParentTM <node>node

Returns the initial parent transformation matrix of the specified bone node.

<void>boneSetInitialParentTM <node>node <matrix3>tm

Sets the initial parent transformation matrix of the specified bone node to the supplied matrix value.

Additional Controls

<integer>numberOfBones()

Returns the number of bones in the modifier as integer.

<integer>boneGetNumberOfMorphs <node>node

Returns the number of morphs for the specified bone node.

<string>boneGetMorphName <node>node <integer>index

Returns the name of the indexed morph of the specified bone node.

<void>boneSetMorphName <node>node <integer>index <string>name

Sets the name of the indexed morph of the specified bone node to the given string.

<float>boneGetMorphAngle <node>node <integer>index

Returns the morph angle of the indexed morph of the specified bone node.

<void>boneSetMorphAngle <node>node <integer>index <float>angle

Sets the morph angle of the indexed morph of the specified bone node to the given angle.

<matrix3>boneGetMorphTM <node>node <integer>index

Returns the morph transformation matrix of the indexed morph of the specified bone node.

<void>boneSetMorphTM <node>node <integer>index <matrix3>tm

Sets the morph transformation matrix of the indexed morph of the specified bone node to the given matrix3 value.

<matrix3>boneGetMorphParentTM <node>node <integer>index

Returns the morph's parent transformation matrix of the indexed morph of the specified bone node.

<void>boneSetMorphParentTM <node>node <integer>index <matrix3>tm

Sets the morph's parent transformation matrix of the indexed morph of the specified bone node to the given matrix3 value.

<boolean>boneGetMorphIsDead <node>node <integer>index

Returns true if the indexed morph of the specified bone node is dead, false otherwise.

<void>boneSetMorphSetDead <node>node <integer>index <boolean>dead

Sets the dead state of indexed morph of the specified bone node to the given boolean value.

<boolean>boneGetMorphNumPoints <node>node <integer>index

Returns the number of points of the indexed morph of the specified bone node.

<void>boneSetMorphNumPoints <node>node <integer>index <integer>numPoints

Sets the number of points of the indexed morph of the specified bone node to the given integer value.

<integer>boneGetMorphVertID <node>node <integer>morphIndex <integer>ithVertIndex

Returns the Vertex ID of the indexed morph of the specified bone node as integer.

<void>boneSetMorphVertID <node>node <integer>morphIndex <integer>ithVertIndex <integer>index

Sets the Vertex ID of the indexed morph of the specified bone node to the given integer value.

<point3>boneGetMorphVec <node>node <integer>morphIndex <integer>ithVertIndex

Returns the Morph Vector of the indexed morph of the specified bone node as Point3 value

<void>boneSetMorphVec <node>node <integer>morphIndex <integer>ithVertIndex <point3>vec

Sets the Morph Vector of the indexed morph of the specified bone node to the given Point3 value

<point3>boneGetMorphVecInParentSpace <node>node <integer>morphIndex <integer>ithVertIndex

Returns the Morph Vector in parent space of the indexed morph of the specified bone node as Point3 value

<void>boneSetMorphVecInParentSpace <node>node <integer>morphIndex <integer>ithVertIndex <point3>vec

Sets the Morph Vector in parent space of the indexed morph of the specified bone node to the given Point3 value

<point3>boneGetMorphBasePoint <node>node <integer>morphIndex <integer>ithVertIndex

Returns the Base Point of the indexed morph of the specified bone node as Point3 value

<void>boneSetMorphBasePoint <node>node <integer>morphIndex <integer>ithVertIndex <point3>point

Sets the Base Point of the indexed morph of the specified bone node to the given Point3 value

<node>boneGetMorphOwner <node>node <integer>morphIndex <integer>ithVertIndex

Returns the owner node of the indexed vertex in the indexed morph of the specified bone node

<void>boneSetMorphOwner <node>node <integer>morphIndex <integer>ithVertIndex <node>node

Sets the owner of the indexed vertex in the indexed morph of the specified bone node to the given node.

<integer>boneGetMorphFalloff <node>node <integer>morphIndex

Returns the falloff of the indexed morph of the specified bone node

<void>boneSetMorphFalloff <node>node <integer>morphIndex <integer>falloff

Sets the falloff of the indexed morph of the specified bone node

<float>getWeight <node>node <string>morphName

Returns the Weigth of the indexed morph of the specified bone node

<boolean>boneGetMorphEnabled <node>node <integer>morphIndex

Returns the Enabled state of the indexed morph of the specified bone node

<void>boneSetMorphEnabled <node>node <integer>morphIndex <boolean>enabled

Sets the Enabled state of the indexed morph of the specified bone node to the given boolean value.

<void>update()

Forces an update of the Skin_Morph modifier.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Skin_Wrap : Modifier

Skin_Wrap - superclass: modifier; super-superclass:MAXWrapper - 17:0 - classID: #(582466825, 1731904975)

Value > MAXWrapper > Modifier > Skin_Wrap

The Skin_Wrap modifier lets you transfer deformations from one mesh to another, typically from low-resolution proxy mesh to a high-resolution final mesh.

Constructor

Skin_Wrap ...

MeshDeformPW ...

Properties

Parameters Rollout

<Skin_Wrap>.meshList ArrayParameter default: #() -- node array

Get/Set the mesh list nodes array. Corresponds to the node list in the Parameters rollout.

<Skin_Wrap>.mesh UndefinedClass default: undefined -- node

<Skin_Wrap>.engine Integer default: 1 -- integer

Get/Set the Deformation Engine drop-down list selection. Possible values are:

0 - Face Deformation

1 - Vertex Deformation (default)

<Skin_Wrap>.falloff Float default: 1.0 -- float

Get/Set the Falloff value.

<Skin_Wrap>.Distance Float default: 1.2 -- float

Get/Set the "Distance Infl." value.

<Skin_Wrap>.faceLimit Integer default: 3 -- integer; Face_Limit

Get/Set the "Face Limit" value.

<Skin_Wrap>.blend BooleanClass default: false -- boolean; Blend_To_Base_Mesh

Get/Set the state of the "Blend To Base Mesh" checkbox.

<Skin_Wrap>.blendDistance Float default: 5.0 -- float; Blend_Distance

Get/Set the Blend Distance value.

<Skin_Wrap>.threshold Float default: 5.0 -- float

Get/Set the Threshold value.

<Skin_Wrap>.weightAllVerts BooleanClass default: false -- boolean; Weight_All_Verts

Get/Set the state of the "Weight All Points" checkbox.

Advanced Parameters Rollout

<Skin_Wrap>.showMirrorData BooleanClass default: false -- boolean; Show_Mirror_Data

Get/Set the state of the "Show Mirror Data" checkbox.

<Skin_Wrap>.mirrorPlane Integer default: 0 -- integer; Mirror_Plane

Get/Set the selection of the " Mirror Plane" radio buttons. Possible values are:

0 - X

1 - Y

2 - Z

<Skin_Wrap>.mirrorOffset Float default: 0.0 -- float; Mirror_Offset

Get/Set the "Mirror Offset" value.

<Skin_Wrap>.mirrorThreshold Float default: 0.5 -- float; Mirror_Threshold

Get/Set the "Mirror Threshold" value.

Display Parameters Rollout

<Skin_Wrap>.showLoops BooleanClass default: true -- boolean; Show_Loops

Get/Set the state of the "Display Loops" checkbox.

<Skin_Wrap>.showAxis BooleanClass default: true -- boolean; Show_Axis

Get/Set the state of the "Display Axis" checkbox.

<Skin_Wrap>.showFaceLimit BooleanClass default: true -- boolean; Show_Face_Limit

Get/Set the state of the "Display Face Limit" checkbox.

<Skin_Wrap>.showUnassignedVerts BooleanClass default: false -- boolean; Show_Unassigned_Verts

Get/Set the state of the "Display Unassigned Points" checkbox.

<Skin_Wrap>.showVerts BooleanClass default: true -- boolean; Show_Verts

Get/Set the state of the "Display Control Verts" checkbox.

Skin_Wrap interfaces:

Interface: meshDeformOps

Methods:

Parameters Rollout

<void>reset()

Resest both the Strength and Scale values of the selected control vertices. Corresponds to pressing the "Reset" button.

<void>setLocalStr <float>str

Sets the local strength of the selected control vertices to the specified float value. Affects the value represented by the Local Str. spinner in the Parameters rollout.

<void>setLocalScale <index>axis <float>scale

Sets the local scale of the selected control vertices along the indexed axis to the specified float value.

Possible axis values are

1 - X

2 - Y

3 - Z

Affects the values represented by the Local X, Local Y and Local Z spinners in the Parameters rollout.

<void>ConvertToSkin <boolean>silent

Corresponds to pressing the "Convert To Skin" button.

Advanced Parameters Rollout

<void>mirrorSelectedControlPoints()

Mirrors the selected control vertices. Corresponds to pressing the "Mirror Selected" button.

<void>bakeControlPoint()

Bakes the control vertices. Corresponds to pressing the "Bake Control Verts" button.

<void>retrieveControlPoint()

Retrieves the control vertices. Corresponds to pressing the "Retrieve Control Verts" button.

Control Vertex Access Methods

<bitArray>getSelectedVertices <index>wrapNodeIndex

Returns a bitarray containing the selected vertices affected by the indexed wrap node.

<void>setSelectVertices <index>wrapNodeIndex <bitArray>sel <boolean>update

Sets the vertex selection for the indexed wrap node to the given bitarray. If the update argument is false, no update will be performed.

<integer>getNumberOfControlPoints <index>wrapNodeIndex

Returns the number of control vertices of the indexed wrap node.

<point3>getControlPointScale <index>wrapNodeIndex <index>index

Returns the control vertex scale of the indexed vertex of the indexed wrap node as a point3 value.

<void>setControlPointScale <index>wrapNodeIndex <index>index <point3>scale

Sets the control vertex scale of the indexed vertex of the indexed wrap node to the given point3 value.

<float>getControlPointStr <index>wrapNodeIndex <index>index

Returns the control vertex strength of the indexed vertex of the indexed wrap node as a float value.

<void>setControlPointStr <index>wrapNodeIndex <index>index <float>str

Sets the control vertex strength of the indexed vertex of the indexed wrap node to the given float value.

<matrix3>getControlPointInitialTM <index>wrapNodeIndex <index>index

Returns the initial transformation matrix of the indexed control vertex in the indexed wrap node as a matrix3 value.

<matrix3>getControlPointCurrentTM <index>wrapNodeIndex <index>index

Returns the current transformation matrix of the indexed control vertex in the indexed wrap node as a matrix3 value.

<float>getControlPointDist <index>wrapNodeIndex <index>index

Returns the indexed control vertex' distance in the indexed wrap node as a float value.

<integer>getControlPointXVert <index>wrapNodeIndex <index>index

Returns the transformed vertex index of the indexed control vertex in the indexed wrap node as an integer value.

<void>OutputVertexData <node>node <integer>vertexIndex

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Skin_Wrap_Patch : Modifier

Skin_Wrap_Patch - superclass: modifier; super-superclass:MAXWrapper - 2:0 - classID: #(582466825, 1731904958)

Value > MAXWrapper > Modifier > Skin_Wrap_Patch

This modifier lets you deform a mesh using an Editable Patch as the control cage.

Constructor

Skin_Wrap_Patch ...

Properties

<Skin_Wrap_Patch>.patch UndefinedClass default: undefined -- node

Get/Set the Editable Patch node the copy the deformations from.

<Skin_Wrap_Patch>.sampleRate Integer default: 100 -- integer; Sample_Rate

Get/Set the Sample Rate value.

Skin_Wrap_Patch Interfaces:

Interface: patchDeformOps

Methods:

<void>resample()

Corresponds to pressing the Resample button.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Spline_IK_Control : Modifier

Spline_IK_Control - superclass: modifier; super-superclass:MAXWrapper - classID: #(99892132, 1442747141)

Value > MAXWrapper > Modifier > Spline_IK_Control

The Spline_IK_Control modifier provides a way for controlling spline knots using Point helpers. It is used mainly in conjunction with the Spline IK Solver.

Constructor

Spline_IK_Control ...

Properties

<Spline_IK_Control>.box Boolean default: true -- animatable; boolean

Controls the display of Box Helpers.

<Spline_IK_Control>.helper_size Float default: 20.0 -- animatable; float

Gets/sets the size of the Helpers.

<Spline_IK_Control>.constantscreensize Boolean default: false -- animatable; boolean; Const_Screen_Size

Controls the constant screen size display of Helpers.

<Spline_IK_Control>.drawontop Boolean default: true -- animatable; boolean; Draw_On_Top

Controls the drawing of Helpers on top of the scene.

<Spline_IK_Control>.helper_axistripod Boolean default: false -- animatable; boolean; Axis_Tripod

Controls the display of the Helpers’ Axis Tripod.

<Spline_IK_Control>.helper_centermarker Boolean default: false -- animatable; boolean; Center_Marker

Controls the display of Helpers’ Center Markers .

<Spline_IK_Control>.helper_cross Boolean default: false -- animatable; boolean; Cross

Controls the display of the Helpers’ Crosses.

<Spline_IK_Control>.helper_list ArrayParameter default: #() -- node array; ; SubAnim

Gets/sets the list of Helpers used by the modifier to control the spline’s knots.

<Spline_IK_Control>.linkTypes Integer default: 0 -- integer; Link_Types

Gets/sets the linking mode:

0 - Link All In Hierarchy

1 - Link All to Root

2 - No Linking

Spline_IK_Control interfaces:

Interface: modifiers

Methods:

<integer>getHelperCount()

Returns the number of helpers in the Spline_IK_Control Modifier.

<integer>getKnotCount()

Returns the number of knots in the control Spline.

<boolean>linkToRoot()

Sets the "Link All To Root" mode in the Modifier. Returns true on success.

<boolean>linkInHierarchy()

Sets the "Link All In Hierarchy" mode in the Modifier. Returns true on success.

<boolean>noLinking()

Sets the "No Linking" mode in the Modifier. Returns true on success.

<boolean>createHelper <integer>knotCount

Creates helpers for the specified number of knots. Returns true on success.

See also

Point : Helper

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


SurfDeform : Modifier

SurfDeform - superclass: modifier; super-superclass:MAXWrapper - classID: #(1950247845, 1970939916)

Value > MAXWrapper > Modifier > SurfDeform

Constructor

surfDeform ...

NOTE:

This class is not available in Autodesk VIZ.

Properties

<SurfDeform>.surface Node default: undefined

The surface used to apply deformation.

<SurfDeform>.U_Percent Float default: 50.0 -- animatable, percentage

Moves the object along the U (horizontal) axis of the gizmo patch, based on a percentage of the U distance. This defaults to a setting of 50 percent, which places the object at the center of the gizmo patch. A setting of 0 percent places the object at the left edge of the gizmo patch, as seen from the viewport where the patch was created.

<SurfDeform>.U_Stretch Float default: 1.0 -- animatable

Scales the object along the U (horizontal) axis of the gizmo patch.

<SurfDeform>.V_Percent Float default: 50.0 -- animatable, percentage

Moves the object along the V (vertical) axis of the gizmo patch, based on a percentage of the V distance. A setting of 0 percent places the object at the bottom of the gizmo patch.

<SurfDeform>.V_Stretch Float default: 1.0 -- animatable

Scales the object along the V (vertical) axis of the gizmo patch.

<SurfDeform>.rotation Float default: 0.0 -- animatable, angle

Rotates the modified object with respect to the gizmo patch.

<SurfDeform>.Plane_to_Patch_Deform Integer default: 0

Choose a two-axis plane of the object to make parallel with the XY plane of the gizmo patch:

0- XY

1- YZ

2- ZX

<SurfDeform>.Flip_deformation_axis Integer default: 0

When on, reverses the gizmo direction.

0- Don’t flip

1- Flip

<SurfDeform>.gizmo SubAnim

At this sub-object level, you can transform and animate the gizmo like any other object, altering the effect of the modifier. The PatchDeform gizmo is a representation of the deforming patch object, so transforming it determines which part of the patch affects the modified object.

<SurfDeform.Gizmo>.position Point3 default: [0,0,0] -- animatable

The position of the surfdeform gizmo.

<SurfDeform.Gizmo>.rotation Quat default: (quat 0 0 0 1) -- animatable

The rotation of the surfdeform gizmo.

<SurfDeform.Gizmo>.scale Point3 default: [1,1,1] -- animatable

The scale of the surfdeform gizmo.

See also

Modifier Sub-Object Transform Properties

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Turn_to_Mesh - superclass: modifier

Turn_to_Mesh : Modifier

Turn_to_Mesh - superclass: modifier; super-superclass:MAXWrapper - 4:0 - classID: #(1549488375, 1614380193)

Value > MAXWrapper > Modifier > Turn_to_Mesh

Constructor

Turn_to_Mesh ...

Properties

<Turn_to_Mesh>.useInvisibleEdges Boolean default: true -- animatable; boolean; Use_Invisible_Edges

When on, uses invisible edges to represent polygons. When off, produces a completely triangulated mesh with all visible edges. Default=on.

<Turn_to_Mesh>.selectionConversion Integer default: 0 -- integer; Selection_Conversion

Controls the conversion of sub-object selections when converting incoming geometry to Mesh. Corresponds to the Sub-Object Selection radio buttons.

Possible values are:

0 - Preserve

1 - Clear

2 - Invert

<Turn_to_Mesh>.useSoftSelection Boolean default: true -- boolean; Use_Soft_Selection

When set to true, incoming soft selection will be preserved. For example, if Use Soft Selection is on when you select vertices on an editable poly, and you apply Turn To Mesh with Include Soft Selection on, then the same soft selection will apply to the mesh vertices. Default=on.

WARNING!

Be aware that when Include Soft Selection is on, bound vertices can turn to meshe s.

<Turn_to_Mesh>.selectionLevel Integer default: 0 -- integer; Selection_Level

0: From Pipeline. Uses the equivalent of whatever the input object uses. (Patch level becomes face level, and so on.). For example, if you create a box, convert it to an editable patch in patch mode and apply a Turn To Mesh modifier to it, 3ds Max passes a sub-object selection in patch mode up the stack. The Turn To Mesh modifier takes the sub-object patch selection into account and selects the mesh faces that derive from the patch selection.

1: Object. Uses object as the selection level for passing up the rest of the stack.

2: Edge. Uses edge as the sub-object selection level for passing up the rest of the stack.

3: Vertex. Uses vertex as the sub-object selection level for passing up the rest of the stack.

4: Face. Uses face as the sub-object selection level for passing up the rest of the stack.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Turn_to_Patch - superclass: modifier

Turn_to_Patch : Modifier

Turn_to_Patch - superclass: modifier; super-superclass:MAXWrapper - 4:0 - classID: #(1011577041, 590161861)

Value > MAXWrapper > Modifier > Turn_to_Patch

The Turn_To_Patch modifier lets you apply object conversions in the modifier stack. Using the Turn To Patch modifier, you can fine-tune the conversion process such as turning quads into quad patches.

NOTE:

Converting from one object type to another causes a complete caching in the modifier stack. When you have large objects in your scene, this can take up a lot of space. For example, an object that starts as a mesh, converts to a patch, and then back to a mesh takes 3 times as much space as a mesh which just has ordinary modifiers like Bend or UVW Map applied.

Constructor

Turn_to_Patch ...

ConvertToPatch ...

Properties

<Turn_to_Patch>.quadsToQuads Boolean default: true -- animatable; boolean; Quads_to_Quad_Patches

Turns quad faces in meshes or polymeshes into quad patches.

NOTE:

When you turn this option off, 3ds Max triangulates quads when the Turn To Patch modifier is applied to a patch object.

<Turn_to_Patch>.selectionConversion Integer default: 0 -- integer; Selection_Conversion

<Turn_to_Patch>.useSoftSelection Integer default: 1 -- integer; Use_Soft_Selection

Affects the action of sub-object Move, Rotate, and Scale functions. When these are on, 3ds Max applies a spline curve deformation to unselected vertices surrounding the transformed selected sub-object. This provides a magnet-like effect, with a sphere of influence around the transformation. Use this when you want to preserve the soft selection from beneath. For example, if Use Soft Selection is on when you select vertices on an editable poly, and you apply Turn To Mesh with Include Soft Selection on, then the same soft selection will apply to the mesh vertices. Default=on.

For more information, see Soft Selection Rollout.

IMPORTANT:

Be aware that when Include Soft Selection is on, bound vertices can turn to meshe s.

<Turn_to_Patch>.selectionLevel Integer default: 0 -- integer; Selection_Level

0: From Pipeline: Uses the equivalent of whatever the input object uses. (Patch level becomes face level, and so on.). For example, if you create a box, convert it to an editable mesh in face mode and apply a Turn To Patch modifier to it, 3ds Max passes a sub-object selection in patch mode up the stack. The Turn To Patch modifier takes the sub-object face selection into account and selects the patches that derive from the face selection.

1: Object: Uses object as the selection level for passing up the rest of the stack.

2: Edge: Uses edge as the sub-object selection level for passing up the rest of the stack.

3: Vertex: Uses vertex as the sub-object selection level for passing up the rest of the stack.

4: Patch: Uses patch as the sub-object selection level for passing up the rest of the stack.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Turn_to_Poly - superclass: modifier

Turn_to_Poly : Modifier

Turn_to_Poly - superclass: modifier; super-superclass:MAXWrapper - 9:0 - classID: #(793333328, 1547135298)

Value > MAXWrapper > Modifier > Turn_to_Poly

Constructor

Turn_to_Poly ...

Properties:

<Turn_to_Poly>.keepConvex Boolean default: false -- animatable; boolean; Keep_Convex

Does not join across edges if the resulting polygon would not be convex. "Convex" means that you can connect any two points in the polygon with a line that doesn't go outside the polygon. A polygon is not convex if you can draw a line between vertices and that line lays outside of the polygon.

Problems that can occur with non-convex polygons include the fact that changes in the geometry of the input object can result in a different topology for the Turn To Poly result. For instance, in a box, if you drag one of the top corners across the middle of the top face, the box becomes non-convex. Turn To Poly would then see this as two triangles instead of one quad, and the number of points in the result would change.

<Turn_to_Poly>.limitPolySize Boolean default: false -- animatable; boolean; Limit_Polygon_Size

Limits the number of sides to a polygon so that the surface is better defined. For example, you might want to produce a polymesh of triangles and quads, or one composed of all triangles, rather than joining together more than two triangles into pentagons, hexagons, and so on.

<Turn_to_Poly>.maxPolySize Integer default: 4 -- animatable; integer; Max_Polygon_Size

The maximum number of sides to a polygon.

<Turn_to_Poly>.requirePlanar Boolean default: false -- animatable; boolean; Require_Planar_Polygons

Creates polygons composed of flat planes. Does not join faces together across an edge if the edge has a sharper angle than the threshold listed.

<Turn_to_Poly>.planarThresh Float default: 15.0 -- animatable; angle; Planar_Threshold

Controls the threshold of the angle between polygonal planes.

<Turn_to_Poly>.removeMidEdgeVertices Boolean default: true -- boolean; Remove_Mid_Edge_Vertices

When set to true (default), vertices in the middle of an edge will be removed automatically.

<Turn_to_Poly>.selectionConversion Integer default: 0 -- integer; Selection_Conversion

Controls the sub-object selection conversion when turning the incoming geometry to poly. Possible values are:

0 - Preserve (default) - the selection is preserved

1 - Clear - the selection is removed.

2 - Invert - the selection will be inverted. Thus, this mode can be used for procedural inversion of sub-object selections.

<Turn_to_Poly>.useSoftSelection Boolean default: true -- boolean; Use_Soft_Selection

Affects the action of sub-object Move, Rotate, and Scale functions. When these are on, 3ds Max applies a spline curve deformation to unselected vertices surrounding the transformed selected sub-object. This provides a magnet-like effect, with a sphere of influence around the transformation. Use this when you want to preserve the soft selection from beneath. For example, if Use Soft Selection is on when you select vertices on an editable mesh, and you apply Turn To Poly with Include Soft Selection on, then the same soft selection will apply to the polymesh vertices. Default=on.

For more information, see Soft Selection Rollout

<Turn_to_Poly>.selectionLevel Integer default: 0 -- integer; Selection_Level

These options set the sub-object selection level for passing up the rest of the stack.

0: From Pipeline. Uses the equivalent of whatever the input object uses. (Patch level becomes face level, and so on.). For example, if you create a box, convert it to an editable mesh in face mode and apply a Turn To Poly modifier to it, 3ds Max passes a sub-object selection in face mode up the stack. The Turn To Poly modifier takes the sub-object face selection into account and selects the polygons that derive from the face selection.

1: Object. Uses object as the selection level for passing up the rest of the stack.

2: Edge. Uses edge as the sub-object selection level for passing up the rest of the stack.

3: Vertex. Uses vertex as the sub-object selection level for passing up the rest of the stack.

4: Face. Uses face as the sub-object selection level for passing up the rest of the stack.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


FFD_Box : Modifier

FFDBox - superclass: modifier; super-superclass:MAXWrapper - classID: #(-1967952699, -2099773836)

Value > MAXWrapper > Modifier > FFDBox

Constructor

ffdBox ...

Properties

<FFDBox>.dispLattice Boolean default: true -- alias: Lattice

Draws lines connecting the control points to make a grid.

<FFDBox>.dispSource Boolean default: false—alias: Source_Volume

Displays the control points and lattice in their unmodified state.

<FFDBox>.deformType Integer default: 0

deformType = 0 - Only In Volume; 1 - All Vertices

<FFDBox>.falloff Float default: 0.0 -- animatable

Determines the distance from the lattice that the FFD effect will decrease to zero.

<FFDBox>.tension Float default: 25.0 -- animatable

Adjusts the tension of the deformation splines.

<FFDBox>.continuity Float default: 25.0 -- animatable

Adjusts the continuity of the deformation splines.

<FFDBox>.inPoints Boolean default: true -- alias: Inside_Points

Only control points inside the object are affected by Conform to Shape.

<FFDBox>.outPoints Boolean default: true -- alias: Outside_Points

Only control points outside the object are affected by Conform to Shape.

<FFDBox>.offset Float default: 0.05 -- animatable

The distance by which control points affected by Conform to Shape are offset from the object surface.

<FFDBox>.lattice_transform SubAnim

<FFDBox.lattice_transform>.position Point3 default: [0,0,0] -- animatable

<FFDBox.lattice_transform>.rotation Quat default: (quat 0 0 0 1) -- animatable

<FFDBox.lattice_transform>.scale Point3 default: [1,1,1] -- animatable

Methods

conformToShape <FFDBox>

conforms the control points of the FFD to the node the FFD is applied to. If an instance of the FFD modifier has been applied to more than one object, no action is performed.

resetLattice <FFDBox>

resets the control points of the FFD to their default positions.

getDimensions <FFDBox>

setDimensions <FFDBox> <Point3>

Get and set the number of control points for the FFDBox modifier. The first component value in the Point3 specifies the number of Width control points, the second the number of Length control points, and the third the number of Height control points. The minimum value for each component value is 2.

animateVertex <FFDBox> <control_point_spec>

Applies controllers to the specified control points of the FFD modifier, where <control_point_spec> is one of:

<integer_index>

<integer_index_array>

#all

By assigning controllers to the control points, the control points are added to the Master subAnim and appear as animatables in the Track View, allowing further scripting of the control points.

EXAMPLE

animateVertex $box01.modifier[1] #all

The control points to be animated are specified by index number or with the keyword #all to animate all control points.

See also Class and Object Inspector Functions and Scripting Vertex and Control Point Animation for details on accessing the control points in an FFD and Modifier Sub-Object Transform Properties for details on the coordinate system used for FFD control points.

animateAll <FFDBox>

Applies controllers to all control points of the FFD modifier.

NOTE:

The default number of control points in a FFDBox created by MAXScript is 4x4x4.

See also

Modifier Sub-Object Transform Properties

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods

Class and Object Inspector Functions

Scripting Vertex and Control Point Animation

Modifier Sub-Object Transform Properties


FFD_Cyl : Modifier

FFDCyl - superclass: modifier; super-superclass:MAXWrapper - classID: #(-1728873885, 1073650634)

Value > MAXWrapper > Modifier > FFDCyl

Constructor

ffdCyl ...

Properties

<FFDCyl>.dispLattice Boolean default: true -- alias: Lattice

Draws lines connecting the control points to make a grid.

<FFDCyl>.dispSource Boolean default: false—alias: Source_Volume

Displays the control points and lattice in their unmodified state.

<FFDCyl>.deformType Integer default: 0

Deform type:

0- Only In Volume (Deforms vertices that lie inside the source volume. Vertices outside the source volume are not affected.)

1- All Vertices (Deforms all vertices regardless of whether they lie inside or outside the source volume depending on the value in the Falloff spinner. The deformation outside the volume is a continuous extrapolation of the deformation inside the volume. Note that the deformation can be extreme for points far away from the source lattice.)

<FFDCyl>.falloff Float default: 0.0 -- animatable

Determines the distance from the lattice that the FFD effect will decrease to zero.

<FFDCyl>.tension Float default: 25.0 -- animatable

Adjusts the tension of the deformation splines.

<FFDCyl>.continuity Float default: 25.0 -- animatable

Adjusts the continuity of the deformation splines.

<FFDCyl>.inPoints Boolean default: true -- alias: Inside_Points

Only control points inside the object are affected by Conform to Shape.

<FFDCyl>.outPoints Boolean default: true -- alias: Outside_Points

Only control points outside the object are affected by Conform to Shape.

<FFDCyl>.offset Float default: 0.05 -- animatable

The distance by which control points affected by Conform to Shape are offset from the object surface.

<FFDCyl>.lattice_transform SubAnim

<FFDCyl.lattice_transform>.position Point3 default: [0,0,0] -- animatable

<FFDCyl.lattice_transform>.rotation Quat default: (quat 0 0 0 1) -- animatable

<FFDCyl.lattice_transform>.scale Point3 default: [1,1,1] -- animatable

Methods

conformToShape <FFDCyl>

conforms the control points of the FFD to the node the FFD is applied to. If an instance of the FFD modifier has been applied to more than one object, no action is performed.

resetLattice <FFDCyl>

resets the control points of the FFD to their default positions.

getDimensions <FFDCyl>

setDimensions <FFDCyl> <Point3>

sets the number of control points for the FFDCyl modifier. The first component value in the Point3 specifies the number of Side control points, the second the number of Radial control points, and the third the number of Height control points. The minimum component values are 6, 2, and 2, respectively.

animateVertex <FFDCyl> <control_point_spec>

Applies controllers to the specified control points of the FFD modifier, where <control_point_spec> is one of:

<integer_index>

<integer_index_array>

#all

By assigning controllers to the control points, the control points are added to the Master subAnim and appear as animatables in the Track View, allowing further scripting of the control points.

EXAMPLE

animateVertex $box01.modifier[1] #all

The control points to be animated are specified by index number or with the keyword #all to animate all control points.

See also Class and Object Inspector Functions and Scripting Vertex and Control Point Animation for details on accessing the control points in an FFD and Modifier Sub-Object Transform Properties for details on the coordinate system used for FFD control points.

animateAll <FFDCyl>

Applies controllers to all control points of the FFD modifier.

NOTE:

The default number of control points in a FFDCyl created by MAXScript is always 4x6x4.

See also

Modifier Sub-Object Transform Properties

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods

Class and Object Inspector Functions

Scripting Vertex and Control Point Animation

Modifier Sub-Object Transform Properties


FFD_2x2x2 : Modifier

FFD_2x2x2 - superclass: modifier; super-superclass:MAXWrapper - classID: #(556946838, 751897552)

Value > MAXWrapper > Modifier > FFD_2x2x2

Constructor

ffd_2x2x2 ...

FFD2x2x2 ...

Properties

<FFD_2x2x2>.dispLattice Boolean default: true -- alias: Lattice

Draws lines connecting the control points to make a grid.

<FFD_2x2x2>.dispSource Boolean default: false—alias: Source_Volume

Displays the control points and lattice in their unmodified state.

<FFD_2x2x2>.deformType Integer default: 0

Deform type:

0- Only In Volume (Deforms vertices that lie inside the source volume. Vertices outside the source volume are not affected.)

1- All Vertices (Deforms all vertices, regardless of whether they lie inside or outside the source volume.)

<FFD_2x2x2>.inPoints Boolean default: true -- alias: Inside_Points

Only control points inside the object are affected by Conform to Shape.

<FFD_2x2x2>.outPoints Boolean default: true -- alias: Outside_Points

Only control points outside the object are affected by Conform to Shape.

<FFD_2x2x2>.offset Float default: 0.05 -- animatable

The distance by which control points affected by Conform to Shape are offset from the object surface.

<FFD_2x2x2>.lattice_transform SubAnim

<FFD_2x2x2.lattice_transform>.position Point3 default: [0,0,0] -- animatable

<FFD_2x2x2.lattice_transform>.rotation Quat default: (quat 0 0 0 1) -- animatable

<FFD_2x2x2.lattice_transform>.scale Point3 default: [1,1,1] -- animatable

NOTE:

The Falloff, Tension, and Continuity parameters are not accessible by MAXScript.

Methods

conformToShape <FFD_2x2x2>

conforms the control points of the FFD to the node the FFD is applied to. If an instance of the FFD modifier has been applied to more than one object, no action is performed.

resetLattice <FFD_2x2x2>

resets the control points of the FFD to their default positions.

animateVertex <FFD_2x2x2> <control_point_spec>

Applies controllers to the specified control points of the FFD modifier, where <control_point_spec> is one of:

<integer_index>

<integer_index_array>

#all

By assigning controllers to the control points, the control points are added to the Master subAnim and appear as animatables in the Track View, allowing further scripting of the control points.

EXAMPLE

animateVertex $box01.modifier[1] #all

The control points to be animated are specified by index number or with the keyword #all to animate all control points.

See also Class and Object Inspector Functions and Scripting Vertex and Control Point Animation for details on accessing the control points in an FFD and Modifier Sub-Object Transform Properties for details on the coordinate system used for FFD control points.

animateAll <FFD_2x2x2>

Applies controllers to all control points of the FFD modifier.

See also

Modifier Sub-Object Transform Properties

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods

Class and Object Inspector Functions

Scripting Vertex and Control Point Animation

Modifier Sub-Object Transform Properties


FFD_3x3x3 : Modifier

FFD_3x3x3 - superclass: modifier; super-superclass:MAXWrapper - classID: #(556946838, 751897561)

Value > MAXWrapper > Modifier > FFD_3x3x3

Constructor

ffd_3x3x3 ...

FFD3x3x3 ...

Properties

<FFD_3x3x3>.dispLattice Boolean default: true -- alias: Lattice

Draws lines connecting the control points to make a grid.

<FFD_3x3x3>.dispSource Boolean default: false—alias: Source_Volume

Displays the control points and lattice in their unmodified state.

<FFD_3x3x3>.deformType Integer default: 0

Deform type:

0- Only In Volume (Deforms vertices that lie inside the source volume.)

1- All Vertices (Deforms all vertices, regardless of whether they lie inside or outside the source volume.)

<FFD_3x3x3>.inPoints Boolean default: true -- alias: Inside_Points

Only control points inside the object are affected by Conform to Shape.

<FFD_3x3x3>.outPoints Boolean default: true -- alias: Outside_Points

Only control points outside the object are affected by Conform to Shape.

<FFD_3x3x3>.offset Float default: 0.05 -- animatable

The distance by which control points affected by Conform to Shape are offset from the object surface.

<FFD_3x3x3>.lattice_transform SubAnim

<FFD_3x3x3.lattice_transform>.position Point3 default: [0,0,0] -- animatable

<FFD_3x3x3.lattice_transform>.rotation Quat default: (quat 0 0 0 1) -- animatable

<FFD_2x2x2.lattice_transform>.scale Point3 default: [1,1,1] -- animatable

NOTE:

The Falloff, Tension, and Continuity parameters are not accessible by MAXScript.

Methods

conformToShape <FFD_3x3x3>

conforms the control points of the FFD to the node the FFD is applied to. If an instance of the FFD modifier has been applied to more than one object, no action is performed.

resetLattice <FFDBox>

resets the control points of the FFD to their default positions.

animateVertex <FFD_3x3x3> <control_point_spec>

Applies controllers to the specified control points of the FFD modifier, where <control_point_spec> is one of:

<integer_index>

<integer_index_array>

#all

By assigning controllers to the control points, the control points are added to the Master subAnim and appear as animatables in the Track View, allowing further scripting of the control points.

EXAMPLE

animateVertex $box01.modifier[1] #all

The control points to be animated are specified by index number or with the keyword #all to animate all control points.

See also Class and Object Inspector Functions and Scripting Vertex and Control Point Animation for details on accessing the control points in an FFD and Modifier Sub-Object Transform Properties for details on the coordinate system used for FFD control points.

animateAll <FFD_3x3x3>

Applies controllers to all control points of the FFD modifier.

See also

Modifier Sub-Object Transform Properties

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods

Class and Object Inspector Functions

Scripting Vertex and Control Point Animation

Modifier Sub-Object Transform Properties


FFD_4x4x4 : Modifier

FFD_4x4x4 - superclass: modifier; super-superclass:MAXWrapper - classID: #(556946838, 751897560)

Value > MAXWrapper > Modifier > FFD_4x4x4

Constructor

ffd_4x4x4 ...

FFD4x4x4 ...

Properties

<FFD_4x4x4>.dispLattice Boolean default: true -- alias: Lattice

Draws lines connecting the control points to make a grid.

<FFD_4x4x4>.dispSource Boolean default: false—alias: Source_Volume

Displays the control points and lattice in their unmodified state.

<FFD_4x4x4>.deformType Integer default: 0

Deform type:

0- Only In Volume (Deforms vertices that lie inside the source volume.)

1- All Vertices (Deforms all vertices, regardless of whether they lie inside or outside the source volume.)

<FFD_4x4x4>.inPoints Boolean default: true -- alias: Inside_Points

Only control points inside the object are affected by Conform to Shape.

<FFD_4x4x4>.outPoints Boolean default: true -- alias: Outside_Points

Only control points outside the object are affected by Conform to Shape.

<FFD_4x4x4>.offset Float default: 0.05 -- animatable

The distance by which control points affected by Conform to Shape are offset from the object surface.

<FFD_4x4x4>.lattice_transform SubAnim

<FFD_4x4x4.lattice_transform>.position Point3 default: [0,0,0] -- animatable

<FFD_4x4x4.lattice_transform>.rota t ion Quat default: (quat 0 0 0 1) -- animatable

<FFD_4x4x4.lattice_transform>.scale Point3 default: [1,1,1] -- animatable

NOTE:

The Falloff, Tension, and Continuity parameters are not accessible by MAXScript.

Methods

conformToShape <FFD_4x4x4>

conforms the control points of the FFD to the node the FFD is applied to. If an instance of the FFD modifier has been applied to more than one object, no action is performed.

resetLattice <FFDBox>

resets the control points of the FFD to their default positions.

animateVertex <FFD_4x4x4> <control_point_spec>

Applies controllers to the specified control points of the FFD modifier, where <control_point_spec> is one of:

<integer_index>

<integer_index_array>

#all

By assigning controllers to the control points, the control points are added to the Master subAnim and appear as animatables in the Track View, allowing further scripting of the control points.

EXAMPLE

animateVertex $box01.modifier[1] #all

The control points to be animated are specified by index number or with the keyword #all to animate all control points.

See also Class and Object Inspector Functions and Scripting Vertex and Control Point Animation for details on accessing the control points in an FFD and Modifier Sub-Object Transform Properties for details on the coordinate system used for FFD control points.

animateAll <FFD_4x4x4>

Applies controllers to all control points of the FFD modifier.

See also

Modifier Sub-Object Transform Properties

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods

Class and Object Inspector Functions

Scripting Vertex and Control Point Animation

Modifier Sub-Object Transform Properties


FFD_Select : Modifier

FFD_Select - superclass: modifier; super-superclass:MAXWrapper - classID: #(811567668, 1151265921)

Value > MAXWrapper > Modifier > FFD_Select

Constructor

ffd_select ...

NOTE:

This class is not available in Autodesk VIZ.

Properties

There are no additional properties for FFD_Select.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Bevel : Modifier

Bevel - superclass: modifier; super-superclass:MAXWrapper - classID: #(4119, 32670)

Value > MAXWrapper > Modifier > Bevel

Constructor

Bevel ...

Properties

<Bevel>.Cap_Bottom Integer default: 1

When on, caps the end with the lowest local Z value (bottom) of the object. When turned off, the bottom is open.

0- Off

1- On

<Bevel>.Cap_Top Integer default: 1

When on, caps the end with the highest local Z value (top) of the object. When turned off, the end is left open.

0- Off

1- On

<Bevel>.Cap_Type Integer default: 0

Sets cap type:

0- Morph (Creates cap faces suitable for morphing.)

1- Grid (Creates cap faces in a grid pattern. This cap type deforms and renders better than morph capping.)

<Bevel>.Side_Type Integer default: 0

Side type:

0- Linear Sides (Segment interpolation between levels follows a straight line.)

1- Curved Sides (Segment interpolation between levels follows a Bezier curve.)

<Bevel>.segments Integer default: 1 -- animatable

The number of intermediate segments between each level.

<Bevel>.Smooth_Levels Integer default: 0

Controls whether smoothing groups are applied to the sides of a beveled object. Caps always use a different smoothing group than the sides. When turned on, smoothing groups are applied to the sides, and the sides appear rounded. When turned off, smoothing groups are not applied, and the sides appear as flat bevels.

0- Off

1- On

<Bevel>.Produce_Mapping_Coords Integer default: 0

When turned on, mapping coordinates are applied to the beveled object.

0- Off

1- On

<Bevel>.Keep_Lines_From_Crossing Integer default: 0

When on, this prevents outlines from crossing over themselves. This is accomplished by inserting extra vertices in the outline and replacing sharp corners with a flat line segment.

0- Off

1- On

<Bevel>.Separation_Between_Lines Float default: 1.0 -- animatable

The distance to be maintained between edges.

<Bevel>.Starting_Outline Float default: 0.0 -- animatable

The distance the outline is offset from the original shape. A non-zero setting changes the original shape’s size. Positive values make the outline larger and negative values make the outline smaller.

<Bevel>.Level_1_Height Float default: 0.0 -- animatable

The distance of Level 1 above the Start level.

<Bevel>.Level_1_Outline Float default: 0.0 -- animatable

The distance to offset the Level 1 outline from the Start Outline.

<Bevel>.Use_Level_2 Integer default: 0

Adds a level after Level 1 when on.

0- Off

1- On

<Bevel>.Level_2_Height Float default: 0.0 -- animatable

The distance above Level 1.

<Bevel>.Level_2_Outline Float default: 0.0 -- animatable

The offset distance of the Level 2 outline from Level 1.

<Bevel>.Use_Level_3 Integer default: 0

Adds a level after the previous level. If Level 2 is not on, Level 3 is added after Level 1.

0- Off

1- On

<Bevel>.Level_3_Height Float default: 0.0 -- animatable

The distance above the previous level.

<Bevel>.Level_3_Outline Float default: 0.0 -- animatable

The offset distance of Level 3 from the previous level.

Interfaces:

Interface: realWorldMapSizeInterface

Properties:

.realWorldMapSize : boolean : Read|Write

Enables/disables the real-world map size option. Available in 3ds Max 8 and higher.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Bevel_Profile : Modifier

Bevel_Profile - superclass: modifier; super-superclass:MAXWrapper - classID: #(2051146448, 295048994)

Value > MAXWrapper > Modifier > Bevel_Profile

Constructor

Bevel_Profile ...

Properties

<Bevel_Profile>.Produce_Mapping_Coords Integer default: 0

When on, assigns UV coordinates.

0- Off

1- On

<Bevel_Profile>.Cap_Bottom Integer default: 1

When on, caps the end with the lowest local Z value (bottom) of the object. When turned off, the bottom is open.

0- Off

1- On

<Bevel_Profile>.Cap_Top Integer default: 1

When on, caps the end with the highest local Z value (top) of the object. When turned off, the end is left open.

0- Off

1- On

<Bevel_Profile>.Cap_Type Integer default: 0

Cap type:

0- Morph (Selects a deterministic method of capping that provides the same number of vertices for morphing between objects.)

1- Grid (Creates gridded caps that are better for cap deformations.)

<Bevel_Profile>.Keep_Lines_From_Crossing Integer default: 0

When on, prevents beveled surfaces from self intersecting. This requires more processor calculation and can be time-consuming in complex geometry.

0- Off

1- On

<Bevel_Profile>.Separation_Between_Lines Float default: 1.0 -- animatable

The distance that sides should be kept apart to prevent intersections.

<Bevel_Profile>.profile_gizmo SubAnim

You can move, scale, and rotate the gizmo to alter the effect of the bevel profile modifier on the object.

<Bevel_Profile.Profile_Gizmo>.position Point3 default: [0,0,0] -- animatable

The position of the profile gizmo.

<Bevel_Profile.Profile_Gizmo>.rotation Quat default: (quat 0 0 0 1) -- animatable

The rotation of the profile gizmo.

<Bevel_Profile.Profile_Gizmo>.scale Point3 default: [1,1,1] -- animatable

The scale of the profile gizmo.

NOTE:

There is no way to set the Profile shape using MAXScript in 3ds Max.

Interfaces:

Interface: realWorldMapSizeInterface

Properties:

.realWorldMapSize : boolean : Read|Write

Enables/disables the real-world map size option. Available in 3ds Max 8 and higher.

See also

Modifier Sub-Object Transform Properties

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Cap_Holes : Modifier

Cap_Holes - superclass: modifier; super-superclass:MAXWrapper - classID: #(1191845242, 1402297393)

Value > MAXWrapper > Modifier > Cap_Holes

Constructor

cap_holes ...

Properties

<Cap_Holes>.Smooth_New_Faces Integer default: 1

When on, assigns the same smoothing group number to all new faces. If possible, this will be a smoothing group number not used elsewhere in the object.

0- Off

1- On

<Cap_Holes>.Smooth_With_Old_Faces Integer default: 0

Smoothes new triangular faces using the smoothing groups from bordering old faces. This smoothes only one level in from the perimeter of the border of the hole, so you might need to use both this and the Smooth New Faces option to properly smooth a large hole.

0- Off

1- On

<Cap_Holes>.Make_All_New_Edges_Visible Integer default: 0

When on, makes all of the edges visible in the new faces.

0- Off

1- On

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


DeleteMesh : Modifier

DeleteMesh - superclass: modifier; super-superclass:MAXWrapper - classID: #(-131666431, 0)

Value > MAXWrapper > Modifier > DeleteMesh

Constructor

deleteMesh ...

Properties

There are no additional properties for DeleteMesh.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Edit_Mesh : Modifier

Edit_Mesh - superclass: modifier; super-superclass:MAXWrapper - classID: #(80, 0)

Value > MAXWrapper > Modifier > Edit_Mesh

Constructor

edit_mesh ...

Properties

There are no additional properties for Edit_Mesh.

See the getVertSelection(), getFaceSelection(), and getEdgeSelection() functions in Editable_Mesh for information about accessing the current selections in the Edit_Mesh modifier.

See the Editable Mesh Modify Panel Command Modes and Operations section in Editable_Mesh for information on invoking the various Edit_Mesh operations.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Edit_Normals : Modifier

Edit_Normals - superclass: modifier; super-superclass:MAXWrapper - classID: #(1252338403, 902438110)

Value > MAXWrapper > Modifier > Edit_Normals

Description and Notes:

The Edit_Normals modifier lets the user edit the normal vectors used for realtime rendering of Editable Poly objects.

In 3ds Max 5, only PolyObjects supported edited normals. If you did anything that converted the Edit_Normals result into a non-PolyObject (such as a "Convert to Patch" or a "Mesh Select"), you would lose the normals.

This has been changed in 3ds Max 6 and higher where edited normals are supported by TriMeshes.

Any modifiers that change topology will remove the normals. This includes MeshSmooth, Tessellate, Slice, Mirror, Symmetry, Face Extrude, and Vertex Weld. Note that this also means that the Normal modifier (used to flip face orientations) will not support the edited normals. Since Turn to Poly can be used to modify face topology, it also strips off the edited normals.

All compound objects strip off the edited normals from their operands.

Because of its many topological operations, Editable Poly does not support the edited normals. If you collapse the stack, you'll lose the normals. If you want to collapse to EPoly but keep the normals, consider using "Collapse To" the modifier below Edit Normals.

All deformation and map modifiers will preserve the normals. For instance if you apply a Bend, the normals should be bent along with the geometry. Map modifiers (like UVW Unwrap) will not affect the normals at all.

A few geometric modifiers will not fully support the edited normals. They will not strip them away, but neither will they correctly deform any explicit normals. Modifiers in this category include Push and Relax.

The Smooth modifier should correctly modify any non-specified normals, while not changing the specified and explicit normals.

Edit_Normals is like Mesh Select or Poly Select in the following way: If you create a box, apply an Edit_Normals, change some normals, and then apply a second Edit_Normals modifier, the top Edit_Normals will "inherit" the user-specified normals from the pipeline. But after that, the top Edit_Normals will ignore any changes to the original Edit_Normals modifier just like Mesh Select will ignore any changes to the selection coming up the pipe.

There are three categories of normals in the Edit_Normals modifier.

Unspecified - these are the usual normals that are computed from smoothing groups. All normals are unspecified by default.

Specified - these are normals that are intended for use by particular corners of particular faces, without regard to smoothing groups. Specified normals are not set to explicit values - they ignore smoothing groups, but they're still based on the face normals of the faces that use them.

Explicit - these are normals that are set to particular values. All explicit normals are also considered to be specified.

Constructor

Edit_Normals ...

editNormals ...

Properties

<Edit_Normals>.displayLength Float default: 10.0 -- world units; Display_Length

Get/set the length of the normals displayed in the viewport.

<Edit_Normals>.ignoreBackfacing Boolean default: false -- boolean; Ignore_Backfacing

Get/set the Ignore Backfacing option.

<Edit_Normals>.selectBy Integer default: 0 -- integer; Select_By

Set the selection options.

0 - Select By Normal

1 - Select By Vertex

2 - Select By Edge

3 - Select By Face

<Edit_Normals>.showHandles Boolean default: false -- boolean; Show_Handles

When set to true, the modifier displays handles at the ends of the normals.

Edit_Normals interfaces:

Interface: EditNormalsMod

Properties:

.SelLevel : enum : Read|Write

SelLevel enums: {#Object|#Normal|#Vertex|#Edge|#Face}

Gets/Sets the selection level.

Methods:

<bool>Move <&point3>offset

offset is In and Out parameter

Moves the selected normals by the specified offset. Returns true on success.

<bool>Rotate <&quat>rotation

rotation is In and Out parameter

Rotates the selected normals by the specified quaternion value. Returns true on success.

<bool>Break [selection:<bitArray>] [node:<node>] [toAverage:<bool>]

selection default value: undefined

node default value: undefined

toAverage default value: false

Breaks the current selection. Returns true on success.

When the same modifier is applied to multiple nodes, specifying the optional node: parameter will limit the method to this single node only.

node:<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

<bool>Unify [selection:<bitArray>] [node:<node>] [toAverage:<bool>]

selection default value: undefined

node default value: undefined

toAverage default value: false

Unifies the current selection. Returns true on success.

node:<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

<bool>Average [useThresh:<bool>] [threshold:<float>] [selection:<bitArray>] [node:<node>]

useThresh default value: false

threshold default value: 0.0

selection default value: undefined

node default value: undefined

<bool>AverageGlobal [useThresh:<bool>] [threshold:<float>]

useThresh default value: false

threshold default value: 0.0

Average normals with optional threshold.

<bool>AverageTwo <node>node1 <index>normalID1 <node>node2 <index>normalID2

Average two normals from two different nodes.

<bool>Reset [selection:<bitArray>] [node:<node>]

selection default value: undefined

node default value: undefined

Resets the current selection. Returns true on success.

node:<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

<bool>Specify [selection:<bitArray>] [node:<node>]

selection default value: undefined

node default value: undefined

Makes the normals of the current selection Specified. Returns true on success.

node:<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

<bool>MakeExplicit [selection:<bitArray>] [node:<node>]

selection default value: undefined

node default value: undefined

Makes the normals of the current selection Explicit. Returns true on success.

When the same modifier is applied to multiple nodes, specifying the optional node: parameter will limit the method to this single node only.

<bool>Copy <index>normalID [node:<node>]

node default value: undefined

Copies the indexed normal to clipboard. Returns true on success.

node:<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

<bool>Paste selection:<bitArray> [node:<node>]

selection default value: undefined

node default value: undefined

Pastes the copied normal to the current selection. Returns true on success.

node:<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

NOTE:

While Copy can accept just one normal, Paste can apply the single copied value to any number of selected normals.

<bitArray>GetSelection [node:<node>]

node default value: undefined

Returns the currently selected normals as bitArray.

node:<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

<bool>SetSelection <&bitArray>newSelection node:<node>

newSelection is In and Out parameter

node default value: undefined

Sets the currently selected normals using the supplied bitArray.

<bool>Select <&bitArray>newSelection [invert:<bool>] [select:<bool>] [node:<node>]

newSelection is In and Out parameter

invert default value: false

select default value: true

node default value: undefined

Selects the normals specified by the bitArray. This method does not clear any existing selections.

When the optional invert: parameter is set to true, the specified normals’ selection state will be inverted.

When the optional select: parameter is set to false, the specified normals will be deselected. When set to true or not supplied, the normals will be selected.

node:<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

<void>ConvertVertexSelection <&bitArray>vertexSelection <&bitArray>normalSelection [node:<node>]

vertexSelection is In and Out parameter

normalSelection is In and Out parameter

node default value: undefined

Two bitArrays are passed by reference as In and Out parameters. The first bitArray defines the vertices to convert from. After calling the method the second bitArray will contain the normals shared by the specified vertices.

node:<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

EXAMPLE

--create a Box, convert to EPoly, add Edit_Normals modifier

my_verts = #{1} --define a bitArray specifying vertex 1

my_normals = #{} --define an empty bitArray to store the result

--call the method with the two bitArrays passed by-reference:

$Box01.Edit_Normals.ConvertVertexSelection &my_verts &my_normals

my_normals --now take a look at the bitArray

#{1, 9, 22} --it will contain the normal indices used by vertex 1

<void>ConvertEdgeSelection <&bitArray>edgeSelection <&bitArray>normalSelection [node:<node>]

edgeSelection is In and Out parameter

normalSelection is In and Out parameter

node default value: undefined

Two bitArrays are passed by reference as In and Out parameters. The first bitArray defines the edges to convert from. After calling the method, the second bitArray will contain the normals shared by the specified edges.

When the same modifier is applied to multiple nodes, specifying the optional node: parameter will limit the method to this single node only.

<void>ConvertFaceSelection <&bitArray>faceSelection <&bitArray>normalSelection [node:<node>]

faceSelection is In and Out parameter

normalSelection is In and Out parameter

node default value: undefined

Two bitArrays are passed by reference as In and Out parameters. The first bitArray defines the faces to convert from. After calling the method, the second bitArray will contain the normals shared by the specified faces.

node:<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

<integer>GetNumNormals [node:<node>]

node default value: undefined

Returns the number of normals.

node:<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

<point3>GetNormal <index>normalIndex [node:<node>]

node default value: undefined

Returns the specified indexed normal.

node:<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

<void>SetNormal <index>normalIndex <&point3>normalValue [node:<node>]

normalValue is In and Out parameter

node default value: undefined

Sets the value of the specified indexed normal.

node:<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

<bool>GetNormalExplicit <index>normalIndex [node:<node>]

node default value: undefined

Returns true if the specified indexed normal is Explicit, false otherwise.

node:<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

<void>SetNormalExplicit <index>normalIndex [explicit:<bool>] [node:<node>]

explicit default value: true

node default value: undefined

Sets the Explicit state of specified indexed normal. When the optional parameter explicit: is set to false, removes the explicit state and makes the normal Specified. When set to true or not supplied, makes the normal explicit.

node:<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

<integer>GetNumFaces [node:<node>]

node default value: undefined

Returns the number of faces.

node:<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

<integer>GetFaceDegree <index>face [node:<node>]

node default value: undefined

Returns the number of corners of the specified indexed face.

node:<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

<index>GetNormalID <index>face <index>corner [node:<node>]

node default value: undefined

Returns the normal ID of the specified corner of the specified indexed face.

node:<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

<void>SetNormalID <index>face <index>corner <index>normalID [node:<node>]

node default value: undefined

Sets the normal ID of the specified corner of the specified indexed face.

node:<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

<bool>GetFaceNormalSpecified <index>face <index>corner [node:<node>]

node default value: undefined

Returns true if the normal of the indexed corner of the specified indexed face is Specified, false otherwise.

node:<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

<void>SetFaceNormalSpecified <index>face <index>corner [specified:<bool>] [node:<node>]

specified default value: true

node default value: undefined

Sets the normal of the specified corner of the indexed face to Specified. If the optional specified: parameter is true or nor supplied, sets the Specified state of the normal. If the optional specified: parameter is set to false, resets the Specified state.

node:<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

<integer>GetNumVertices [node:<node>]

node default value: undefined

Returns the number of vertices.

node:<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

<index>GetVertexID <index>face <index>corner [node:<node>]

node default value: undefined

Returns the vertex index of the specified corner of the indexed face.

node:<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

<point3>GetVertex <index>vertexID [node:<node>]

node default value: undefined

Returns the position of the specified vertex.

node:<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

<integer>GetNumEdges [node:<node>]

node default value: undefined

Returns the number of edges.

node:<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

<index>GetEdgeID <index>face <index>side [node:<node>]

node default value: undefined

Returns the index of the edge at the specified side of the indexed face.

node:<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

<index>GetFaceEdgeSide <index>face <index>edge [node:<node>]

node default value: undefined

Returns the side index of the specified edge and face. Obviously, the edge must be used by the face to get a side index.

node:<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

<index>GetEdgeVertex <index>edge <index>end [node:<node>]

node default value: undefined

Returns the index of the vertex at the specified end of the specified indexed edge.

node:<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

<index>GetEdgeFace <index>edge <index>side [node:<node>]

node default value: undefined

Returns the index of the face using the specified edge and the specified side.

node:<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

<index>GetEdgeNormal <index>edge <index>end <index>side [node:<node>]

node default value: undefined

Returns the normal at the specified end of the indexed edge.

node:<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

<void>RebuildNormals [node:<node>]

node default value: undefined

Rebuilds the normals.

node:<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

<void>RecomputeNormals [node:<node>]

node default value: undefined

Recomputes the normals.

node:<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Edit_Poly : Modifier

Edit_Poly - superclass: modifier; super-superclass:MAXWrapper - classID: #(2041212445, 1906341303)

Value > MAXWrapper > Modifier > Edit_Poly

Constructor:

Edit_Poly ...

EditPolyMod ...

Properties:

Edit Poly Mode

<Edit_Poly>.animationMode Integer default: 0 -- integer; Animation_Mode

Get/Set the state of the Model/Animation radio buttons in the Edit Poly Mode rollout.

Possible values are:

0 - Model

1 - Animate

<Edit_Poly>.currentOperation Integer default: 0 -- integer; Edit_Type

Get/set the current editing operation of the modifier.

Possible values are:

1 | Hide Vertex | 2 | Hide Polygon | 3 | Unhide Vertices
4 | Unhide Polygons | 5 | Hide Unselected Vertices | 6 | Hide Unselected Polygons
7 |  | 8 |  | 9 | Cap Holes
10 | Delete Vertex | 11 | Delete Polygon | 12 | Detach Vertex
13 | Detach Polygon | 14 | Split Edge | 15 | Break Vertex
16 | Collapse Vertex | 17 | Collapse Edge | 18 | Collapse Polygon
19 |  | 20 | Slice | 21 | Slice Polygon
22 | Weld Vertex | 23 | Weld Edge | 24 |
25 | Make Planar | 26 | Remove Isolated Vertices | 27 | MeshSmooth
28 | Tessellate | 29 | Retriangulate | 30 | Flip Normals
31 | Flip Normals | 32 | Bevel Polygon | 33 | Chamfer Vertex
34 | Chamfer Edge | 35 | Cut | 36 |
37 |  | 38 | Inset Polygon | 39 | Extrude Vertex
40 | Extrude Edge | 41 | Extrude Polygon | 42 | Extrude Along Spline
43 | Connect Edge | 44 | Connect Vertex | 45 | Hinge From Edge
46 |  | 47 |  | 48 | Remove Unused Map Verts
49 | Remove Vertex | 50 | Remove Edge | 51 | Outline Polygon
52 |  | 53 | Transform | 54 | Delete Edge
55 |  | 56 | Create | 57 | Align
58 | Attach | 59 | Target Weld Vertex | 60 | Target Weld Edge
61 | EditTriangulation | 62 | Create Edge | 63 | Clone Vertex
64 | Clone Edge | 65 | Clone Face | 66 | Insert Vertex In Edge
67 | Insert Vertex In Poly | 68 | Auto Smooth | 69 | Set Smoothing Groups
70 | Set Material ID | 71 |  | 72 |
73 |  | 74 | Bridge Border | 75 | Bridge Polygon
76 | Make Planar in X | 77 | Make Planar in Y | 78 | Make Planar in Z
79 | Turn Edge | 80 | Relax | 81 | Paint Deformations
82 | Bridge Edge | 83 |  | 84 |

<Edit_Poly>.worldToObjectTransform Matrix3 default: (matrix3 [1,0,0] [0,1,0] [0,0,1] [0,0,0]) -- matrix3; World_to_Object_Transform

<Edit_Poly>.showCage BooleanClass default: false -- boolean; Show_Cage

Get/Set the state of the Show Cage checkbox in the Edit Poly Mode rollout.

<Edit_Poly>.CageColor Point3 default: [1,0.588235,0] -- point3; Cage_Color

Get/Set the Cage color. Available in 3ds Max 8 and higher.

<Edit_Poly>.selectedCageColor Point3 default: [0.94902,0.85098,0] -- point3; Selected_Cage_Color

Get/Set the Selected Cage color. Available in 3ds Max 8 and higher.

Selection

<Edit_Poly>.useStackSelection BooleanClass default: false -- boolean; Use_Stack_Selection

Get/Set the state of the Use Stack Selection checkbox in the Selection rollout. When checked, the incoming stack selection will be used instead of the modifier's sub-object selection.

<Edit_Poly>.selectByVertex BooleanClass default: false -- boolean; Select_By_Vertex

<Edit_Poly>.ignoreBackfacing BooleanClass default: false -- boolean; Ignore_Backfacing

Get/Set the state of the Ignore Backfacing checkbox in the Selection rollout.

<Edit_Poly>.selectByAngle BooleanClass default: false -- boolean; Select_by_Angle

Get/Set the state of the Select By Angle checkbox in the Selection rollout.

<Edit_Poly>.selectAngle Float default: 45.0 -- angle; Selection_Angle

Get/Set the Select Angle value in the Selection rollout.

<Edit_Poly>.loopEdgeSel Integer default: 0 -- integer; Edge_Loop

Get/Set the Edge Loop value. Available in 3ds Max 8 and higher.

<Edit_Poly>.ringEdgeSel Integer default: 0 -- integer; Edge_Ring

Get/Set the Edge Ring value. Available in 3ds Max 8 and higher.

<Edit_Poly>.selectMode Integer default: 0 -- integer; Select_Mode

Get/Set the Edit Poly Selection Mode . Available in 3ds Max 2008 and higher.

Possible values are:

0 - Off

1 - Sub-Object

2 - Multi

Soft Selection

<Edit_Poly>.useSoftSel BooleanClass default: false -- boolean; Use_Soft_Selection

Get/Set the state of the "Use Soft Selection" checkbox in the Soft Selection rollout.

<Edit_Poly>.ssUseEdgeDist BooleanClass default: false -- boolean; Use_Edge_Distance

Get/Set the state of the Edge Distance checkbox in the Soft Selection rollout

<Edit_Poly>.ssEdgeDist Integer default: 1 -- integer; Edge_Distance

Get/Set the Edge Distance in the Soft Selection rollout

<Edit_Poly>.affectBackfacing BooleanClass default: true -- boolean; Affect_Backfacing

Get/Set the Affect Backfacing checkbox state in the Soft Selection rollout.

<Edit_Poly>.falloff Float default: 20.0 -- animatable; world units

Get/Set the Falloff value in the Soft Selection rollout.

<Edit_Poly>.pinch Float default: 0.0 -- animatable; float

Get/Set the Pinch value in the Soft Selection rollout.

<Edit_Poly>.bubble Float default: 0.0 -- animatable; float

Get/Set the Bubble value in the Soft Selection rollout.

<Edit_Poly>.lockSoftSel BooleanClass default: false -- boolean; Lock_Soft_Selection

Get/Set the state of the Lock Soft Selection checkbox in the Soft Selection rollout. When enabled, the soft selection will not be recalculated automatically and can be defined using the Paint Soft Selection tools.

<Edit_Poly>.paintSelValue Float default: 1.0 -- float; Selection_Value

Get/Set the Selection Value in the Paint Soft Selection group of controls in the Soft Selection rollout. Controls the selection value that will be applied to the vertices by the paint brush.

<Edit_Poly>.paintSelSize Float default: 10.0 -- world units; Brush_Size

Get/Set the size of the paint selection brush.

<Edit_Poly>.paintSelStrength Float default: 1.0 -- float; Brush_Strength

Get/Set the strength of the paint selection brush.

Edit Vertices/Edges/Borders/Polygons/Elements

Extrude Vertex/Edge/Face

<Edit_Poly>.extrudeEdgeHeight Float default: 0.0 -- animatable; world units; Edge_Extrude_Height

Get/Set the edge extrusion height value.

<Edit_Poly>.extrudeEdgeWidth Float default: 0.0 -- animatable; world units; Edge_Extrude_Width

Get/Set the edge extrusion width value.

<Edit_Poly>.extrudeFaceHeight Float default: 0.0 -- animatable; world units; Polygon_Extrude_Height

Get/Set the face extrusion height value.

<Edit_Poly>.extrudeFaceType Integer default: 0 -- integer; Type_of_Extrusion

Get/Set the radio button state controlling the face extrusion type.

Possible values are:

0 - Group

1 - Local Normal

2 - By Polygon

<Edit_Poly>.extrudeVertexHeight Float default: 0.0 -- animatable; world units; Vertex_Extrude_Height

Get/Set the vertex extrusion height value.

<Edit_Poly>.extrudeVertexWidth Float default: 0.0 -- animatable; world units; Vertex_Extrude_Width

Get/Set the vertex extrusion width value.

Related Methods:

To press the Extrude button, see the #ExtrudeVertex, #ExtrudeEdge and #ExtrudeFace operations in EditPolyMod Interface - Operation Methods

Weld

<Edit_Poly>.weldEdgeThreshold Float default: 0.1 -- animatable; world units; Edge_Weld_Threshold

Get/Set the Weld Edge Threshold value

<Edit_Poly>.weldVertexThreshold Float default: 0.1 -- animatable; world units; Vertex_Weld_Threshold

Get/Set the Weld Vertex Threshold value

Related Methods:

To press the Weld button, see the #WeldVertex and #WeldEdge operations in EditPolyMod Interface - Operation Methods

See also EditPolyMod Interface - Weld Methods

Chamfer

<Edit_Poly>.chamferEdgeAmount Float default: 1.0 -- animatable; world units; Edge_Chamfer_Amount

Get/Set the Edge Chamfer amount.

<Edit_Poly>.chamferEdgeOpen BooleanClass default: false -- boolean; Open_Chamfer

Get/Set the state of the "Open" checkbox in the Edge Chamfer options dialog. When set to true, the new polygons created by the Chamfer operation will be removed, leaving an opening. Available in 3ds Max 8 and higher.

<Edit_Poly>.chamferVertexAmount Float default: 0.0 -- animatable; world units; Vertex_Chamfer_Amount

Get/Set the Vertex Chamfer amount.

<Edit_Poly>.chamferVertexOpen BooleanClass default: false -- boolean; Open_Chamfer

Get/Set the state of the "Open" checkbox in the Vertex Chamfer options dialog. When set to true, the new polygons created by the Chamfer operation will be removed, leaving an opening. Available in 3ds Max 8 and higher.

<Edit_Poly>.edgeChamferSegments Integer default: 1 -- integer; Edge_Chamfer_Segments

Get/Set the Edge Chamfer Segments amount. Adding Segments to the Edge Chamfer effectively performs an Edge Fillet, rounding the edge. Available in 3ds Max 2008 and higher.

Related Methods:

To press the Chamfer button, see the #ChamferVertex and #ChamferEdge operations in EditPolyMod Interface - Operation Methods

Connect

<Edit_Poly>.connectEdgeSegments Integer default: 1 -- animatable; integer; Connect_Edge_Segments

Get/Set the default Connect Edge Segments value.

<Edit_Poly>.connectEdgePinch Integer default: 0 -- animatable; integer; Connect_Edge_Pinch

Get/Set the Pinch value in the Edge Connect options dialog. Available in 3ds Max 8 and higher.

<Edit_Poly>.connectEdgeSlide Integer default: 0 -- animatable; integer; Connect_Edge_Slide

Get/Set the Slide value in the Edge Connect options dialog. Available in 3ds Max 8 and higher.

Related Methods:

To press the Connect button, see the #ConnectVertices and #ConnectEdges operations in EditPolyMod Interface - Operation Methods

Outline

<Edit_Poly>.outlineAmount Float default: 0.0 -- animatable; world units; Outline_Amount

Get/Set the outline amount value.

Related Methods:

To press the Outline button, see the #Outline operation in EditPolyMod Interface - Operation Methods

Bevel

<Edit_Poly>.bevelHeight Float default: 0.0 -- animatable; world units; Bevel_Height

Get/Set the Bevel Extrusion Height value

<Edit_Poly>.bevelOutline Float default: 0.0 -- animatable; world units; Bevel_Outline

Get/Set the Bevel Outline value.

<Edit_Poly>.bevelType Integer default: 0 -- integer; Bevel_Type

Get/Set the Extrusion Type in the Bevel dialog

0 - Group

1 - Local Normal

2 - by Polygon

Related Methods:

To press the Bevel button, see the #Bevel operation in EditPolyMod Interface - Operation Methods

Inset

<Edit_Poly>.insetAmount Float default: 0.0 -- animatable; world units; Inset_amount

Get/Set the Inset Amount value.

<Edit_Poly>.insetType Integer default: 0 -- integer; Inset_Type

Get/Set the Inset Type:

0 - Group

1 - By Polygon

Related Methods:

To press the Inset button, see the #Inset operation in EditPolyMod Interface - Operation Methods

Bridge

<Edit_Poly>.bridgeSelected Integer default: 1 -- integer; Bridge_Selected

Get/Set the state of the radio buttons in the Bridge dialog.

Possible values are:

0 - Use Specific Polygons

1 - Use Polygon Selection

<Edit_Poly>.bridgeSegments Integer default: 1 -- animatable; integer; Bridge_Segments

Get/Set the number of Bridge segments.

<Edit_Poly>.bridgeTaper Float default: 0.0 -- animatable; float; Bridge_Taper

Get/Set the Bridge Taper value.

<Edit_Poly>.bridgeBias Float default: 0.0 -- animatable; float; Bridge_Bias

Get/Set the Bridge Bias value.

<Edit_Poly>.bridgeSmoothThreshold Float default: 45.0 -- animatable; angle; Bridge_Smoothing_Threshold;

Get/Set the Bridge Smooth Threshold.

<Edit_Poly>.bridgeTarget1 Integer default: 0 -- integer; Bridge_Target_1

Get/Set the index of the Bridge's first Target Polygon.

<Edit_Poly>.bridgeTarget2 Integer default: 0 -- integer; Bridge_Target_2

Get/Set the index of the Bridge's second Target Polygon.

<Edit_Poly>.bridgeTwist1 Integer default: 0 -- integer; Bridge_Twist_1

Get/Set the first Twist value.

<Edit_Poly>.bridgeTwist2 Integer default: 0 -- integer; Bridge_Twist_2

Get/Set the second Twist value.

<Edit_Poly>.bridgeEdgeAdjacent Float default: 45.0 -- animatable; angle; Bridge_Adjacent

Get/Set the Bridge Adjacent value. Available in 3ds Max 8 and higher.

<Edit_Poly>.bridgeReverseTriangle Integer default: 0 -- integer; Reverse_Triangles

Get/Set the state of the Reverse Triangulation checkbox. Available in 3ds Max 8 and higher.

Possible values are

0 - disabled

1 - enabled

Related Methods:

To press the Bridge button, see the #BridgeBorder and #BridgePolygon operations and #PickBridgeTarget1 and #PickBridgeTarget2 command modes in EditPolyMod Interface - Operation Methods

See also EditPolyMod Interface - Bridge Methods

Hinge

<Edit_Poly>.hingeAngle Float default: 0.0 -- animatable; angle; Hinge_From_Edge_Angle

Get/Set the Hinge Angle value.

<Edit_Poly>.hingeBase Point3 default: [0,0,0] -- animatable; point3; Hinge_from_Edge_Base

<Edit_Poly>.hingeDirection Point3 default: [1,0,0] -- animatable; point3; Hinge_from_Edge_Direction

<Edit_Poly>.hingeSegments Integer default: 1 -- animatable; integer; Hinge_From_Edge_Segments

Get/Set the Hinge Segment value.

Related Methods:

To press the Hinge button, see the #HingeFromEdge operation and the #HingeFromEdge and #PickHinge command modes in EditPolyMod Interface - Operation Methods

Extrude Along Spline

<Edit_Poly>.extrudeAlongSplineAlign BooleanClass default: true -- animatable; boolean; Extrude_Along_Spline_Align

Get/Set the state of the Align To Face Normal checkbox in the Extrude Along Spline dialog.

<Edit_Poly>.extrudeAlongSplineNode UndefinedClass default: undefined -- node; Extrude_Along_Spline_Node

Get/Set the spline node for the Extrude Along Spline.

<Edit_Poly>.extrudeAlongSplineRotation Float default: 0.0 -- animatable; angle; Extrude_Along_Spline_Rotation;

Get/Set the rotation value in the Extrude Along Spline dialog.

<Edit_Poly>.extrudeAlongSplineSegments Integer default: 6 -- animatable; integer; Extrude_Along_Spline_Segments

Get/Set the number of segments value in the Extrude Along Spline dialog.

<Edit_Poly>.extrudeAlongSplineTaper Float default: 0.0 -- animatable; float; Extrude_Along_Spline_Taper_Amount

Get/Set the taper amount in the Extrude Along Spline dialog.

<Edit_Poly>.extrudeAlongSplineTaperCurve Float default: 0.0 -- animatable; float; Extrude_Along_Spline_Taper_Curve

Get/Set the taper curve value in the Extrude Along Spline dialog.

<Edit_Poly>.extrudeAlongSplineTwist Float default: 0.0 -- animatable; angle; Extrude_Along_Spline_Twist

Get/Set the twist value in the Extrude Along Spline dialog.

Related Methods:

To press the Extrude Along Spline button, see the #ExtrudeAlongSpline operation in EditPolyMod Interface - Operation Methods

Remove Vertex/Edge

No properties related to this feature are exposed. To press the Remove button, see the #RemoveVertex and #RemoveEdge operations in EditPolyMod Interface - Operation Methods

Break Vertex

No properties related to this feature are exposed. To press the Break button, see the #BreakVertex operation in EditPolyMod Interface - Operation Methods

Split Edge

No properties related to this feature are exposed. To press the Split button, see the #SplitEdges operation in EditPolyMod Interface - Operation Methods

Flip Face/Element

No properties related to this feature are exposed. To press the Flip button, see the #FlipFace and #FlipElement operations in EditPolyMod Interface - Operation Methods

Insert Vertex in Edge/Face

No properties related to this feature are exposed. To press the Insert Vertex button, see the #InsertVertexInEdge and #InsertVertexInFace operations in EditPolyMod Interface - Operation Methods

Remove Isolated Vertices

No properties related to this feature are exposed. To press the Remove Isolated Vertices / Remove Unused Map Verts buttons, see the #RemoveIsoVerts and #RemoveIsoMapVerts operations in EditPolyMod Interface - Operation Methods

Edit Geometry

Constraints

<Edit_Poly>.constrainType Integer default: 0 -- integer; Vertex_Constraint_Type

Get/Set the Vertex Constraint type.

Valid values are:

0 - None

1 - Edge

2 - Face

3 - Normal

Preserve UVs

<Edit_Poly>.preserveUVs BooleanClass default: false -- boolean; Preserve_UVs

Get/Set the state of the Preserve UVs checkbox. When set to true, moving sub-object elements will not affect the texture coordinates.

Related Methods:

For related methods, see EditPolyMod Interface - PreserveMap Methods

Relax dialog

<Edit_Poly>.relaxAmount Float default: 0.5 -- animatable; float; Amount

Get/Set the relax Amount.

<Edit_Poly>.relaxIterations Integer default: 1 -- animatable; integer; Iterations

Get/Set the relax Iterations value.

<Edit_Poly>.relaxHoldBoundaryPoints BooleanClass default: true -- boolean; Hold_Boundary_Points

Get/Set the state of the Hold Boundary Points checkbox.

<Edit_Poly>.relaxHoldOuterPoints BooleanClass default: false -- boolean; Hold_Outer_Points

Get/Set the state of the Hold Outer Points checkbox.

Related Methods:

To press the Relax button, see the #Relax operation in EditPolyMod Interface - Operation Methods

Slice Plane

<Edit_Poly>.slice_plane SubAnim default: SubAnim:Slice_Plane -- transform; SubAnim

Edit_Poly.slice_plane - superclass: MAXObject; super-superclass:Value - 3:3 - classID: #(8197, 0)

<Edit_Poly.slice_plane>.position Point3 default: [0,0,0] -- animatable; point3

Get/Set the position of the slice plane.

<Edit_Poly.slice_plane>.rotation Quat default: (quat 0 0 0 1) -- animatable; quat

Get/Set the rotation of the slice plane.

<Edit_Poly.slice_plane>.scale Point3 default: [1,1,1] -- animatable; point3

Get/Set the scale of the slice plane.

<Edit_Poly>.split BooleanClass default: false -- boolean

Get/Set the state of the Split option.

Related Methods:

To perform Slicing operations, see the #ResetSlicePlane, #Slice and #SliceSelectedFaces operations and the #SlicePlane command mode in EditPolyMod Interface - Operation Methods

See also the EditPolyMod Interface - Slice Methods

Align Plane

<Edit_Poly>.alignPlaneNormal Point3 default: [0,0,0] -- animatable; point3; Align_Plane_Normal

Get/Set the normal vector of the align plane.

<Edit_Poly>.alignPlaneOffset Float default: 0.0 -- animatable; float; Align_Plane_Offset

Get/Set the offset of the align plane.

<Edit_Poly>.alignType Integer default: 0 -- integer; Align_Type

Get/Set the type of the align plane.

Related Methods:

To perform the Align operation, see the #Align operation in EditPolyMod Interface - Operation Methods

MeshSmooth

<Edit_Poly>.smoothness Float default: 1.0 -- float

Get/Set the Viewport Smoothness value in the Subdivision Surface rollout.

<Edit_Poly>.separateByMaterial BooleanClass default: false -- boolean; Separate_by_Material_ID

Get/Set the Separate By Materials checkbox in the Subdivision Surface rollout.

<Edit_Poly>.separateBySmoothing BooleanClass default: false -- boolean; Separate_by_Smoothing_Groups

Get/Set the Separate By Smoothing checkbox in the Subdivision Surface rollout.

Related Methods:

To perform the Align operation, see the #MeshSmooth operation in EditPolyMod Interface - Operation Methods

Tessellate

<Edit_Poly>.tessellateByFace Integer default: 0 -- animatable; integer; Tessellate_By

Get/Set the Tessellation type:

0 - Edge

1 - Face

<Edit_Poly>.tessTension Float default: 0.0 -- animatable; float; Tessellation_Tension

Get/Set the Tessellation Tension

Related Methods:

To perform the Align operation, see the #Tessellate operation in EditPolyMod Interface - Operation Methods

Delete Isolated Vertices

<Edit_Poly>.deleteIsolatedVerts BooleanClass default: true -- boolean; Delete_Isolated_Vertices

Get/Set the state of the Delete Isolated Vertices checkbox.

Collapse

No properties related to this feature are exposed. To press the Collapse button, see the #CollapseVertex, #CollapseEdge and #CollapseFace operations in EditPolyMod Interface - Operation Methods

Hide/Unhide

No properties related to this feature are exposed. To press the Hide/Unhide buttons, see the #HideVertex, #HideFace, #HideUnselectedVertex, #HideUnselectedFace, #UnhideAllVertex and #UnhideAllFace operations in EditPolyMod Interface - Operation Methods

Copy/Paste Named Selection Sets

No properties related to this feature are exposed. To press the Copy/Paste buttons, see the #NamedSelectionCopy and #NamedSelectionPaste operations in EditPolyMod Interface - Operation Methods

Make Planar

No properties related to this feature are exposed. To press the Make Planar buttons, see the #MakePlanar, #MakePlanarInX, #MakePlanarInY and #MakePlanarInZ operations in EditPolyMod Interface - Operation Methods

Polygon Material IDs

<Edit_Poly>.materialIDToSet Integer default: 0 -- animatable; integer; Material_ID_to_Set

Get/Set the material ID value to set for the selected faces.

<Edit_Poly>.selectByMaterialID Integer default: 0 -- integer; Select_By_Material_ID

Get/Set the ID to use in the Select By Material ID feature.

<Edit_Poly>.selectByMaterialClear BooleanClass default: false -- boolean; Select_By_Material_Clear

Get/Set the Clear checkbox state in the Select By Material ID feature. When set to true, the previous selection will be cleared before new faces are selected.

Related Methods:

To press the Select ID button, see the #SelectByMaterial operation in EditPolyMod Interface - Operation Methods

Polygon Smoothing Groups

<Edit_Poly>.smoothingGroupsToSet Integer default: 0 -- integer; Smoothing_Groups_to_Set

Get/Set the smoothing group to set.

NOTE:

The value is a long integer where each of the 32 bits stands for a smoothing group to be set. The first bit is 2^0, the second is 2^1 and so on, the last bit is 2^31. To calculate the integer to assign to this property, calculate the sum of all the bits to be set.

For example, to set bit 20, you would set the value to 2^(20-1) = 524288.

To set smoothing groups 1, 5 and 17, you need to add
2^(1-1) + 2^(5-1) + 2^(17-1) = 65553

<Edit_Poly>.smoothingGroupsToClear Integer default: 0 -- integer; Smoothing_Groups_to_Clear

Get/Set the smoothing groups to clear. The value is a long integer where each of the 32 bits stands for a smoothing group to be cleared. See previous property for an example.

<Edit_Poly>.selectBySmoothingGroup Integer default: 0 -- integer; Select_By_Smoothing_Group

Get/Set the smoothing groups to select by.

<Edit_Poly>.selectBySmoothingGroupClear BooleanClass default: false -- boolean; Select_By_Smoothing_Group_Clear

Get/Set the Clear checkbox state in the Select By Smooth Group dialog. When set to true, the previous selection will be cleared before new faces are selected.

<Edit_Poly>.autoSmoothThreshold Float default: 45.0 -- animatable; angle; Autosmooth_Threshold

Get/Set the auto-smoothing threshold angle. The angle between the normals of two neighbor faces will be compared to the threshold. If below the threshold, the two faces will be automatically assigned the same smoothing group, causing smooth shading across the common edge.

Related Methods:

See the #SelectBySmooth, #AutoSmooth and #SetSmooth operations in EditPolyMod Interface - Operation Methods

Paint Deformation

<Edit_Poly>.paintDeformAxis Integer default: 1 -- integer; Push_Pull_Direction

Get/Set the state of the Push/Pull Direction radio buttons in the Paint Deformation rollout.

Possible values are:

1 - Original Normals

2 - Deformed Normals

3 - Transform Axis : X

4 - Transform Axis : Y

5 - Transform Axis : Z

<Edit_Poly>.paintDeformValue Float default: 10.0 -- float; Deformation_Value

Get/Set the Value applied by the Paint Deform brush.

<Edit_Poly>.paintDeformSize Float default: 10.0 -- world units; Deformation_Size

Get/Set the Size of the Paint Deform brush.

<Edit_Poly>.paintDeformStrength Float default: 1.0 -- float; Deformation_Strength

Get/Set the Strength of the Paint Deform brush.

Other Properties

<Edit_Poly>.breakDistance Float default: 0.0 -- animatable; float; Amount

Get/Set the break distance value. Available in 3ds Max 8 and higher.

<Edit_Poly>.remveEdgeCtrlKey BooleanClass default: false -- boolean; Remove_Edge_Control_Key

Get/Set the remove edge control key option state. Available in 3ds Max 8 and higher.

Edit_Poly Interfaces:

Interface: EditPolyMod

NOTES:

The EditPolyMod Interface is a [ Mixin Interface ] exposed by the Edit_Poly modifier.

You can call the methods listed below by accessing the Interface as stand-alone, passing the Edit_Poly modifier as first argument before all other arguments.

Thus, you could say

EditPolyMod.GetSelection $Box01.modifiers[#Edit_Poly] #Vertex

--or shorter,

EditPolyMod.GetSelection $Box01.Edit_Poly #Vertex

You can also call the methods listed below as methods exposed by the Edit_Poly modifier itself because MAXScript will search both the modifier and all its Interfaces for the method name.

Thus, instead of saying something like

$Box01.modifiers[#Edit_Poly].EditPolyMod.GetSelection #Vertex

--or

$Box01.Edit_Poly.EditPolyMod.GetSelection #Vertex

you could say either

$Box01.modifiers[#Edit_Poly].GetSelection #Vertex

--or

$Box01.Edit_Poly.GetSelection #Vertex

The stand-alone interface access is typically orders of magnitude faster than the alternative method!

Methods:

Selection Methods

<enum>GetEPolySelLevel()

GetEPolySelLevel enums: {#Object|#Vertex|#Edge|#Border|#Face|#Element|#CurrentLevel}

Returns the EditPoly selection level.

<enum>GetMeshSelLevel()

GetMeshSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}

Returns the Mesh selection level.

When the Edit Poly selection level is set to #Border, the Mesh selection level is returned as #Edge.

When the Edit Poly selection level is set to #Element, the Mesh selection level is returned as #Face.

<void>SetEPolySelLevel <enum>selectionLevel

selectionLevel enums: {#Object|#Vertex|#Edge|#Border|#Face|#Element|#CurrentLevel}

Sets the EditPoly selection level.

<integer>ConvertSelection <enum>fromLevel <enum>toLevel requireAll:<bool>

fromLevel enums: {#Object|#Vertex|#Edge|#Border|#Face|#Element|#CurrentLevel}

toLevel enums: {#Object|#Vertex|#Edge|#Border|#Face|#Element|#CurrentLevel}

requireAll default value: false

Converts the selection from the fromLevel into the toLevel. If requireAll: is set to true, all source subelements shared by a target subelement must be selected for the target subelement to be selected. For example, a polygon will only be selected if all its vertices are selected, a vertex will be selected only if all polygons that share it are selected etc.

<bitArray>GetSelection <enum>meshSelLevel node:<node>

meshSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}

node default value: undefined

Returns the specified selection as bitArray value.

If node: is supplied, returns the selection from the modifier instance assigned to the specified node.

<bool>SetSelection <enum>meshSelLevel <&bitArray>newSelection node:<node>

meshSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}

newSelection is In and Out parameter

node default value: undefined

Sets the specified selection using the supplied bitArray.

If node: is supplied, uses the modifier instance assigned to the specified node.

<bool>Select <enum>meshSelLevel <&bitArray>newSelection invert:<bool> select:<bool> node:<node>

meshSelLevel enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}

newSelection is In and Out parameter

invert default value: false

select default value: true

node default value: undefined

Adds the bitArray passed by reference to the sub-object selection at the specified sub-object level. The modifier must be displayed in the command panel and must be in the requested sub-object mode for the selection to be set correctly.

If the optional invert: keyword is supplied and set to true, the selected state of the specified sub-objects will be inverted - if they were selected they will be deselected and vice-versa. If false or not supplied, they will become selected or remain selected if they were selected already.

If the optional select: keyword is supplied and set to false, the specified sub-objects will be deselected if they were already selected, or remain deselected if they were not selected. If true or not supplied, they will be selected if they were previously not or remain selected if they were already selected.

If the modifier is instanced across multiple nodes and the optional node: keyword is supplied, the method will use the specified node.

EXAMPLE:

--Create a box with 10x10x10 segments:

b = box width:100 length:100 height:100 heightsegs:10 widthsegs:10 lengthsegs:10

ep = Edit_Poly() --create an Edit_Poly modifier

addModifier b ep --add the Edit_Poly modifier to the box

max modify mode --switch to Modify tab of Command panel

modPanel.setCurrentObject ep --set the Edit_Poly as the current level

subObjectLevel = 3 --switch to Border level

--Now print the selection level using stand-alone interface access:

format "Selection Level Is: %\n" (EditPolyMod.GetEPolySelLevel ep)

--Now print the Mesh selection level using interface access via the modifier:

format "Mesh Selection Level Is: %\n" (ep.EditPolyMod.GetMeshSelLevel())

subObjectLevel = 4 --switch to Face level

--Select a whole side of the box - last 100 polygons. Call the method

--without explicitly specifying the EditPolyMod interface - still works:

ep.Select #Face #{501..600}

ep.convertSelection #Face #Edge --convert the face selection to edge selection

subObjectLevel = 2 --switch to edge mode to see the result

OUTPUT:

$Box:Box01 @ [0.000000,0.000000,0.000000]

Edit_Poly:Edit Poly

OK

OK

OK

3

Selection Level Is: #Border

OK

Mesh Selection Level Is: #edge

OK

4

true

220

2

<void>MoveSelection <&point3>amount parent:<&matrix3> axis:<&matrix3> localOrigin:<boolean>

amount is In parameter

parent default value: (matrix3 [1,0,0] [0,1,0] [0,0,1] [0,0,0])

parent is In parameter

axis default value: (matrix3 [1,0,0] [0,1,0] [0,0,1] [0,0,0])

axis is In parameter

localOrigin default value: false

Moves the current selection by the specified Point3 value.

If parent: is specified, its local coordinate system is used.

If axis: is specified, it is used as a custom coordinate system.

If localOrigin: is specified, the translation will be using the selection's local transformation center as the origin.

<void>RotateSelection <&quat>amount parent:<&matrix3> axis:<&matrix3> localOrigin:<boolean>

amount is In parameter

parent default value: (matrix3 [1,0,0] [0,1,0] [0,0,1] [0,0,0])

parent is In parameter

axis default value: (matrix3 [1,0,0] [0,1,0] [0,0,1] [0,0,0])

axis is In parameter

localOrigin default value: false

Rotates the current selection by the specified quaternion value.

If parent: is specified, its local coordinate system is used.

If axis: is specified, it is used as a custom coordinate system.

If localOrigin: is specified, the rotation is about the selection's local transformation center.

<void>ScaleSelection <&point3>amount parent:<&matrix3> axis:<&matrix3> localOrigin:<boolean>

amount is In parameter

parent default value: (matrix3 [1,0,0] [0,1,0] [0,0,1] [0,0,0])

parent is In parameter

axis default value: (matrix3 [1,0,0] [0,1,0] [0,0,1] [0,0,0])

axis is In parameter

localOrigin default value: false

Scales the current selection by the specified Point3 value.

If parent: is specified, its local coordinate system is used.

If axis: is specified, it is used as a custom coordinate system.

If localOrigin: is specified, the scaling is about the selection's local transformation center.

<void>RingSelect <integer>RingValue <bool>MoveOnly <bool>Add

Moves the Ring selection. Available in 3ds Max 8 and higher.

RingValue is the quantity of edges to shift.

If MoveOnly is true, the selected edges will be moved,

If Add is true and MoveOnly is true, newly selected edges will be added to the current selection.

If MoveOnly is true and Add is false, newly selected edges will be removed from the current selection.

EXAMPLE:

p = plane width:100 length:100 widthsegs:10 lengthsegs:10 --create a plane

ep = Edit_Poly()--create an Edit_Poly modifier

addModifier p ep --add modifier to the plane

max modify mode --switch to modify mode

select p --select the plane

subObjectLevel = 2 --switch to Edge mode

ep.select #Edge #{1} --select first edge

ep.ButtonOp #SelectEdgeLoop --select Loop using the first edge

ep.RingSelect 3 true false --shift the selection by 3

Shifting one or all edge loops by 3 using all possible argument combinations:

MoveOnly | Add | Result:
true | false |
true | false |
true | true |
true | true |
false | true |
false | true |
false | false |
false | false |

<void>LoopSelect <integer>LoopValue <bool>MoveOnly <bool>Add

Moves the Loop selection. Available in 3ds Max 8 and higher.

LoopValue is the quantity of edges to shift.

If MoveOnly is true, the selected edges will be moved,

If Add is true and MoveOnly is true, newly selected edges will be added to the current selection.

If MoveOnly is true and Add is false, newly selected edges will be removed from the current selection.

<integer>ConvertSelectionToBorder <enum>fromLevel <enum>toLevel

fromLevel enums: {#Object|#Vertex|#Edge|#Border|#Face|#Element|#CurrentLevel}

toLevel enums: {#Object|#Vertex|#Edge|#Border|#Face|#Element|#CurrentLevel}

Converts the current selection to border selection. The first argument represent the sub-object type to convert from, the second one represents the sub-object type to convert to.

Available in 3ds Max 8 and higher.

EXAMPLE:

p = plane width:100 length:100 widthsegs:10 lengthsegs:10 --create a plane

ep = Edit_Poly()--create an Edit_Poly modifier

addModifier p ep --add modifier to the plane

max modify mode --switch to modify mode

select p --select the plane

subObjectLevel = 4 --switch to face SO level

editPolyMod.select ep #Face #{12,13,14,23,33} --select some faces

editPolyMod.ConvertSelectionToBorder ep #Face #Edge --convert to edge selection

subObjectLevel = 2 --switch to edge SO level to see the result:

Operation Methods

<enum>GetOperation()

GetOperation enums: { #GrowSelection | #ShrinkSelection | #SelectEdgeLoop | #SelectEdgeRing | #GetStackSelection | #HideVertex | #HideFace | #HideUnselectedVertex | #HideUnselectedFace | #UnhideAllVertex | #UnhideAllFace | #NamedSelectionCopy | #NamedSelectionPaste | #Cap | #DeleteVertex | #DeleteFace | #RemoveVertex | #RemoveEdge | #DetachVertex | #DetachFace | #SplitEdges | #BreakVertex | #CollapseVertex | #CollapseEdge | #CollapseFace | #ResetSlicePlane | #Slice | #SliceSelectedFaces | #Cut | #WeldVertex | #WeldEdge | #CreateShape | #MakePlanar | #MakePlanarInX | #MakePlanarInY | #MakePlanarInZ | #Align | #Relax | #MeshSmooth | #Tessellate | #Retriangulate | #FlipFace | #FlipElement | #ExtrudeVertex | #ExtrudeEdge | #ExtrudeFace | #Bevel | #Inset | #Outline | #ExtrudeAlongSpline | #HingeFromEdge | #ConnectVertices | #ConnectEdges | #ChamferVertex | #ChamferEdge | #RemoveIsoVerts | #RemoveIsoMapVerts | #ToggleShadedFaces | #TransformVertex | #TransformEdge | #TransformFace | #Create | #Attach | #TargetWeldVertex | #TargetWeldEdge | #EditTriangulation | #TurnEdge | #CreateEdge | #CloneVertex | #CloneEdge | #CloneFace | #InsertVertexInEdge | #InsertVertexInFace | #Autosmooth | #SetSmooth | #SetMaterial | #SelectBySmooth | #SelectByMaterial | #BridgeBorder | #BridgePolygon | #DeleteEdge }

Returns the current EditPoly Operation.

<void>SetOperation <enum>operation

operation enums: { #GrowSelection | #ShrinkSelection | #SelectEdgeLoop | #SelectEdgeRing | #GetStackSelection | #HideVertex | #HideFace | #HideUnselectedVertex | #HideUnselectedFace | #UnhideAllVertex | #UnhideAllFace | #NamedSelectionCopy | #NamedSelectionPaste | #Cap | #DeleteVertex | #DeleteFace | #RemoveVertex | #RemoveEdge | #DetachVertex | #DetachFace | #SplitEdges | #BreakVertex | #CollapseVertex | #CollapseEdge | #CollapseFace | #ResetSlicePlane | #Slice | #SliceSelectedFaces | #Cut | #WeldVertex | #WeldEdge | #CreateShape | #MakePlanar | #MakePlanarInX | #MakePlanarInY | #MakePlanarInZ | #Align | #Relax | #MeshSmooth | #Tessellate | #Retriangulate | #FlipFace | #FlipElement | #ExtrudeVertex | #ExtrudeEdge | #ExtrudeFace | #Bevel | #Inset | #Outline | #ExtrudeAlongSpline | #HingeFromEdge | #ConnectVertices | #ConnectEdges | #ChamferVertex | #ChamferEdge | #RemoveIsoVerts | #RemoveIsoMapVerts | #ToggleShadedFaces | #TransformVertex | #TransformEdge | #TransformFace | #Create | #Attach | #TargetWeldVertex | #TargetWeldEdge | #EditTriangulation | #TurnEdge | #CreateEdge | #CloneVertex | #CloneEdge | #CloneFace | #InsertVertexInEdge | #InsertVertexInFace | #Autosmooth | #SetSmooth | #SetMaterial | #SelectBySmooth | #SelectByMaterial | #BridgeBorder | #BridgePolygon | #DeleteEdge }

Puts the Edit Poly modifier into the specified Operation mode.

<void>PopupDialog <enum>operation

operation enums: {#GrowSelection | #ShrinkSelection | #SelectEdgeLoop | #SelectEdgeRing | #GetStackSelection | #HideVertex | #HideFace | #HideUnselectedVertex | #HideUnselectedFace | #UnhideAllVertex | #UnhideAllFace | #NamedSelectionCopy | #NamedSelectionPaste | #Cap | #DeleteVertex | #DeleteFace | #RemoveVertex | #RemoveEdge | #DetachVertex | #DetachFace | #SplitEdges | #BreakVertex | #CollapseVertex | #CollapseEdge | #CollapseFace | #ResetSlicePlane | #Slice | #SliceSelectedFaces | #Cut | #WeldVertex | #WeldEdge | #CreateShape | #MakePlanar | #MakePlanarInX | #MakePlanarInY | #MakePlanarInZ | #Align | #Relax | #MeshSmooth | #Tessellate | #Retriangulate | #FlipFace | #FlipElement | #ExtrudeVertex | #ExtrudeEdge | #ExtrudeFace | #Bevel | #Inset | #Outline | #ExtrudeAlongSpline | #HingeFromEdge | #ConnectVertices | #ConnectEdges | #ChamferVertex | #ChamferEdge | #RemoveIsoVerts | #RemoveIsoMapVerts | #ToggleShadedFaces | #TransformVertex | #TransformEdge | #TransformFace | #Create | #Attach | #TargetWeldVertex | #TargetWeldEdge | #EditTriangulation | #TurnEdge | #CreateEdge | #CloneVertex | #CloneEdge | #CloneFace | #InsertVertexInEdge | #InsertVertexInFace | #Autosmooth | #SetSmooth | #SetMaterial | #SelectBySmooth | #SelectByMaterial | #BridgeBorder | #BridgePolygon | #DeleteEdge }

Opens the corresponding pop-up dialog.

<void>ButtonOp <enum>operation

operation enums: {#GrowSelection | #ShrinkSelection | #SelectEdgeLoop | #SelectEdgeRing | #GetStackSelection | #HideVertex | #HideFace | #HideUnselectedVertex | #HideUnselectedFace | #UnhideAllVertex | #UnhideAllFace | #NamedSelectionCopy | #NamedSelectionPaste | #Cap | #DeleteVertex | #DeleteFace | #RemoveVertex | #RemoveEdge | #DetachVertex | #DetachFace | #SplitEdges | #BreakVertex | #CollapseVertex | #CollapseEdge | #CollapseFace | #ResetSlicePlane | #Slice | #SliceSelectedFaces | #Cut | #WeldVertex | #WeldEdge | #CreateShape | #MakePlanar | #MakePlanarInX | #MakePlanarInY | #MakePlanarInZ | #Align | #Relax | #MeshSmooth | #Tessellate | #Retriangulate | #FlipFace | #FlipElement | #ExtrudeVertex | #ExtrudeEdge | #ExtrudeFace | #Bevel | #Inset | #Outline | #ExtrudeAlongSpline | #HingeFromEdge | #ConnectVertices | #ConnectEdges | #ChamferVertex | #ChamferEdge | #RemoveIsoVerts | #RemoveIsoMapVerts | #ToggleShadedFaces | #TransformVertex | #TransformEdge | #TransformFace | #Create | #Attach | #TargetWeldVertex | #TargetWeldEdge | #EditTriangulation | #TurnEdge | #CreateEdge | #CloneVertex | #CloneEdge | #CloneFace | #InsertVertexInEdge | #InsertVertexInFace | #Autosmooth | #SetSmooth | #SetMaterial | #SelectBySmooth | #SelectByMaterial | #BridgeBorder | #BridgePolygon | #DeleteEdge }

Presses the corresponding User Interface button.

<void>Commit()

Corresponds to pressing the Commit button in the User Interface. Commits the edits.

<void>CommitUnlessAnimating()

Pressed the Commit button in the User Interface unless the modifier is in animation mode.

<void>CommitAndRepeat()

Pressed the Commit button and repeats the last operation

<void>Cancel()

Corresponds to pressing the Cancel button, rejects all changes in the current operation.

<void>ToggleCommandMode <enum>commandMode

commandMode enums: {#CreateVertex | #CreateEdge | #CreateFace | #DivideEdge | #DivideFace | #ExtrudeVertex | #ExtrudeEdge | #ExtrudeFace | #ChamferVertex | #ChamferEdge | #Bevel | #InsetFace | #OutlineFace | #SlicePlane | #Cut | #Weld | #EditTriangulation | #TurnEdge | #QuickSlice | #HingeFromEdge | #PickHinge | #BridgeBorder | #BridgePolygon | #PickBridgeTarget1 | #PickBridgeTarget2}

Toggles the specified command mode. Enables if disabled, disables if enabled.

<void>EnterCommandMode <enum>commandMode

commandMode enums: {#CreateVertex | #CreateEdge | #CreateFace | #DivideEdge | #DivideFace | #ExtrudeVertex | #ExtrudeEdge | #ExtrudeFace | #ChamferVertex | #ChamferEdge | #Bevel | #InsetFace | #OutlineFace | #SlicePlane | #Cut | #Weld | #EditTriangulation | #TurnEdge | #QuickSlice | #HingeFromEdge | #PickHinge | #BridgeBorder | #BridgePolygon | #PickBridgeTarget1 | #PickBridgeTarget2}

Enables the specified command mode.

<void>EnterPickMode <enum>commandMode

commandMode enums: {#Attach|#PickShape}

Enters the specified pick mode.

<enum>GetCommandMode()

GetCommandMode enums: {#CreateVertex | #CreateEdge | #CreateFace | #DivideEdge | #DivideFace | #ExtrudeVertex | #ExtrudeEdge | #ExtrudeFace | #ChamferVertex | #ChamferEdge | #Bevel | #InsetFace | #OutlineFace | #SlicePlane | #Cut | #Weld | #EditTriangulation | #TurnEdge | #QuickSlice | #HingeFromEdge | #PickHinge | #BridgeBorder | #BridgePolygon | #PickBridgeTarget1 | #PickBridgeTarget2}

Returns the current command mode. Returns -1 if no mode is enabled.

<enum>GetPickMode()

GetPickMode enums: {#Attach|#PickShape}

Returns the current pick mode. Returns -1 if no mode is enabled.

<void>RepeatLastOperation()

Corresponds to pressing the Repeat Last button in the Edit Geometry rollout. Repeats the last operation.

<bool>ShowOperationDialog()

Shows the operation dialog. Available in 3ds Max 8 and higher.

<bool>ShowingOperationDialog()

Returns true if the modifier is showing an operation dialog, false otherwise. Available in 3ds Max 8 and higher.

<void>CloseOperationDialog()

Closes the operation dialog. Available in 3ds Max 8 and higher.

Topology Editing Methods

Slice Methods

<void>MoveSlicePlane <&point3>amount parent:<&matrix3> axis:<&matrix3>

amount is In parameter

parent default value: (matrix3 [1,0,0] [0,1,0] [0,0,1] [0,0,0])

parent is In parameter

axis default value: (matrix3 [1,0,0] [0,1,0] [0,0,1] [0,0,0])

axis is In parameter

Moves the slice plane by the specified Point3 value. If parent is specified, its local coordinate system is used. If axis is specified, it is used as a custom coordinate system.

<void>RotateSlicePlane <&quat>amount parent:<&matrix3> axis:<&matrix3> localOrigin:<boolean>

amount is In parameter

parent default value: (matrix3 [1,0,0] [0,1,0] [0,0,1] [0,0,0])

parent is In parameter

axis default value: (matrix3 [1,0,0] [0,1,0] [0,0,1] [0,0,0])

axis is In parameter

localOrigin default value: false

Rotates the slice plane by the specified quaternion value. If parent is specified, its local coordinate system is used. If axis is specified, it is used as a custom coordinate system. If localOrigin is specified, the rotation is about the slice plane's local transformation center.

<void>ScaleSlicePlane <&point3>amount parent:<&matrix3> axis:<&matrix3> localOrigin:<boolean>

amount is In parameter

parent default value: (matrix3 [1,0,0] [0,1,0] [0,0,1] [0,0,0])

parent is In parameter

axis default value: (matrix3 [1,0,0] [0,1,0] [0,0,1] [0,0,0])

axis is In parameter

localOrigin default value: false

Scales the slice plane by the specified Point3 value. If parent is specified, its local coordinate system is used. If axis is specified, it is used as a custom coordinate system. If localOrigin is specified, the scaling is about the slice plane's local transformation center.

<bool>InSlicePlaneMode()

Returns true if the Edit Poly modifier is in slice plane mode, false otherwise.

<void>ResetSlicePlane()

Resets the slice plane.

<matrix3 by value>GetSlicePlaneTM()

GetSlicePlaneTM - no automatic redraw after invoked

Returns the transformation matrix of the slice plane.

<void>SetSlicePlane <&point3>planeNormal <&point3>planeCenter

planeNormal is In parameter

planeCenter is In parameter

Sets the slice plane orientation using the supplied normal vector and plane center.

<void>GetSlicePlane <&point3>planeNormal <&point3>planeCenter

planeNormal is Out parameter

planeCenter is Out parameter

Returns the normal vector and plane center of the slice plane by writing into the supplied by-reference arguments.

<bool>InSlice()

Returns true if the modifier is in Slice mode, false otherwise. Available in 3ds Max 8 and higher.

Create Methods

<index>CreateVertex <point3>point node:<node>

node default value: undefined

Creates a new vertex at the specified point. Returns the index of the new vertex.

<index>CreateFace <index array>vertices node:<node>

node default value: undefined

Creates a new face from the supplied array of indices. Returns the index of the new face.

<index>CreateEdge <index>vertex1 <index>vertex2 node:<node>

node default value: undefined

Creates an edge between the two supplied vertex indices. Returns the index of the new edge.

Edit Tringulation Methods

<void>SetDiagonal <index>vertex1 <index>vertex2 node:<node>

node default value: undefined

Sets the diagonal between vertex1 and vertex2. This method can be used to manually adjust triangulation.

Cut Methods

<void>StartCut <enum>level <index>index <point3>point <point3>normal node:<node>

level enums: {#Object|#Vertex|#Edge|#Face|#CurrentLevel}

node default value: undefined

Enters Cut mode at the specified sub-object level.

<void>SetCutEnd <point3>endPoint node:<node>

node default value: undefined

Sets the cut end to the specified point in object space. If the optional node parameter is provided, the point will be taken in its object space. This can be useful when the modifier is instanced across multiple nodes. Available in 3ds Max 8 and higher.

<index>GetLastCutEnd()

Returns the index of the last cut end. Available in 3ds Max 8 and higher.

<void>ClearLastCutEnd()

Clears the last cut end. Available in 3ds Max 8 and higher.

<void>CutCancel node:<node>

node default value: undefined

Cencels the cut. Available in 3ds Max 8 and higher.

Weld Methods

<void>WeldVertices <index>vertex1 <index>vertex2 node:<node>

node default value: undefined

Welds the two specified vertices.

<void>WeldEdges <index>edge1 <index>edge2 node:<node>

node default value: undefined

Welds the two specified edges.

Bridge Methods

<void>BridgeBorders <index>edge1 <index>edge2 node:<node>

node default value: undefined

Bridges the two specified edges.

<void>BridgePolygons <index>poly1 <index>poly2 node:<node>

node default value: undefined

Bridges the two specified polygons.

<void>BridgeEdges <index>edge1 <index>edge2 node:<node>

node default value: undefined

Bridges the two specified edges. Available in 3ds Max 8 and higher.

<node>GetBridgeNode()

Returns the Bridge node.

<void>SetBridgeNode <node>node

Sets the Bridge node.

Divide Methods

<index>DivideEdge <index>edgeID <float>proportion node:<node>

node default value: undefined

Divides the specified edge into two edges with the given proportions. Available in 3ds Max 8 and higher.

<index>DivideFace <index>faceID <float array>vertexCoefficients node:<node>

node default value: undefined

Divides the specified face using the supplied array of vertex coefficients. Available in 3ds Max 8 and higher.

Preserve Map Methods

<bool>GetPreserveMap <integer>mapChannel

Returns the Preserve UVs state for the specified map channel.

<void>SetPreserveMap <integer>mapChannel <bool>preserve

Sets the Preserve UVs state for the specified map channel to the supplied boolean value.

Attach / Detach Methods

<void>Attach <node>nodeToAttach editPolyNode:<node>

editPolyNode default value: undefined

Attaches the specified node.

<void>AttachList <&node array>nodesToAttach editPolyNode:<node>

nodesToAttach is In parameter

editPolyNode default value: undefined

Attaches the specified nodes.

<void>DetachToObject <&TSTR>newObjectName

newObjectName is In and Out parameter

Detaches the selected sub-object selection to a new object with the specified name.

Create Shape Methods

<void>CreateShape <&TSTR>newShapeName

newShapeName is In and Out parameter

Creates a shape with the given name from the selected edges.

Geometry Data Methods

<integer>GetNumVertices node:<node>

node default value: undefined

Returns the number of vertices in the Edit_Poly.

<point3 by value>GetVertex <index>vertexID node:<node>

node default value: undefined

Returns the vertex with the specified index.

<integer>GetVertexFaceCount <index>vertexID node:<node>

node default value: undefined

Returns the number of faces sharing the specified indexed vertex.

<index>GetVertexFace <index>vertexID <index>face node:<node>

node default value: undefined

Returns the indexed faces sharing the specified indexed vertex.

<integer>GetVertexEdgeCount <index>vertexID node:<node>

node default value: undefined

Returns the number of edges sharing the specified indexed vertex.

<index>GetVertexEdge <index>vertexID <index>edge node:<node>

node default value: undefined

Returns the indexed edge sharing the specified indexed vertex.

<integer>GetNumEdges node:<node>

node default value: undefined

Returns the number of edges.

<index>GetEdgeVertex <index>edgeID <index>end node:<node>

node default value: undefined

Returns the indexed vertex shared by the specified edge.

<index>GetEdgeFace <index>edgeID <index>side node:<node>

node default value: undefined

Returns the indexed face shared by the specified edge.

<integer>GetNumFaces node:<node>

node default value: undefined

Returns the number of faces.

<integer>GetFaceDegree <index>faceID node:<node>

node default value: undefined

Returns the number of sides (edges / vertices) of the indexed face. A value of 3 means a triangular face, a value of 4 meas a quad face etc.

<index>GetFaceVertex <index>faceID <index>corner node:<node>

node default value: undefined

Returns the vertex used at the specified indexed corner of the given indexed face.

<index>GetFaceEdge <index>faceID <index>side node:<node>

node default value: undefined

Returns the edge used at the specified indexed side of the given indexed face.

<index>GetFaceMaterial <index>faceID node:<node>

node default value: undefined

Returns the Material ID of the indexed face.

<DWORD>GetFaceSmoothingGroups <index>faceID node:<node>

node default value: undefined

Returns the Smoothing group of the indexed face. Smoothing groups are stored in long integers where the 32 bits correspond to the states of the 32 smoothing groups.

<integer>GetNumMapChannels node:<node>

node default value: undefined

Returns the number of mapping channels.

<bool>GetMapChannelActive <integer>mapChannel node:<node>

node default value: undefined

Returns true if the supplied mapping channel is active, false otherwise.

<integer>GetNumMapVertices <integer>mapChannel node:<node>

node default value: undefined

Returns the number of map vertices in the specified mapping channel.

<point3 by value>GetMapVertex <integer>mapChannel <index>vertexID node:<node>

node default value: undefined

Returns the indexed map vertex from the specified mapping channel.

<index>GetMapFaceVert <integer>mapChannel <index>faceID <index>corner node:<node>

node default value: undefined

Returns the indexed corner vertex of the indexed face from the specified mapping channel.

Other Methods

<void>RefreshScreen()

Redraws the screen to update changes. Available in 3ds Max 8 and higher.

<void>SetPrimaryNode <node>node

Sets the primary node. An Edit Poly modifier can be assigned as instance to any number of nodes. This method specifies which is the primary one.

<node>GetPrimaryNode()

Returns the primary node. Available in 3ds Max 8 and higher.

<matrix3 by value>GetNodeTM node:<node>

node default value: undefined

Returns the Node Transformation Matrix. Available in 3ds Max 8 and higher.

<void>List node:<node>

node default value: undefined

<void>LocalDataChanged <DWORD>parts

Available in 3ds Max 8 and higher.

See also

Editable_Poly: GeometryClass

Editable Poly - Topics Index

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Extrude : Modifier

Extrude - superclass: modifier; super-superclass:MAXWrapper - classID: #(160, 0)

Value > MAXWrapper > Modifier > Extrude

Constructor

Extrude ...

Properties

<Extrude>.amount Float default: 25.0 -- animatable

The depth of the extrusion.

<Extrude>.segs Integer default: 1 -- animatable, alias: segments

The number of segments that will be created in the extruded object.

<Extrude>.capStart Boolean default: true

When on, generates a flat surface over the start of the extruded object.

<Extrude>.capEnd Boolean default: true

When on, generates a flat surface over the end of the extruded object.

<Extrude>.capType Integer default: 0

Cap type:

0- Morph (Arranges cap faces in a predictable, repeatable pattern, which is necessary for creating morph targets. Morph capping can generate long, thin faces that don’t render or deform as well as grid capping. Use morph capping primarily if you’re extruding multiple morph targets.)

1- Grid (Arranges cap faces in a square grid trimmed at the shape boundaries. This method produces a surface of evenly sized faces that can be deformed easily by other modifiers. When you choose the Grid capping option, the grid lines are hidden edges rather than visible edges.)

<Extrude>.output Integer default: 1

Set the output:

0- Patch (Produces an object that you can collapse to a patch object.)

1- Mesh (Produces an object that you can collapse to a mesh object.)

2- NURBS (Produces an object that you can collapse to a NURBS surface.)

<Extrude>.matIDs Boolean default: true

When on, assigns different material IDs to the sides and the caps of the extruded object. Specifically, the sides receive ID 3, and the caps receive IDs 1 and 2.

<Extrude>.useShapeIDs Boolean default: false

When on, the software uses the material ID values assigned to segments in the modified object.

<Extrude>.smooth Boolean default: true

When on, applies smoothing to the extruded shape.

<Extrude>.mapCoords Boolean default: false

Creates the extruded object with mapping coordinates already applied. When Generate Mapping Coordinates is turned on, additional mapping coordinates are applied to the end caps placing a single 1 x 1 tile on each cap.

<Extrude>.realWorldMapSize BooleanClass default: false -- boolean

Enables/disables the real-world map size option. Available in 3ds Max 8 and higher.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Face_Extrude : Modifier

Face_Extrude - superclass: modifier; super-superclass:MAXWrapper - classID: #(801330, 0)

Value > MAXWrapper > Modifier > Face_Extrude

Constructor

face_extrude ...

Properties

<Face_Extrude>.amount Float default: 0.0 -- animatable

The extent of the extrusion.

<Face_Extrude>.scale Float default: 100.0 -- animatable

Scales each cluster of selected faces independently about its center.

<Face_Extrude>.extrude_center Point3 default: [0,0,0] -- animatable; alias: extrudeFromCenter

Extrudes each vertex radially from the point.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


LS_Mesh : Modifier

LS_Mesh - superclass: modifier; super-superclass:MAXWrapper - classID: #(822551368, 601177968)

Value > MAXWrapper > Modifier > LS_Mesh

Constructor

LS_Mesh ...

lsMesh ...

Properties

<LS_Mesh>.depth Integer default: 0 -- integer

Limit the depth that the mesh modifier will descend the Lightscape refinement when .limitDepth is set to true.

<LS_Mesh>.limitDepth Boolean default: true -- boolean; Limit_Depth

When true, the .depth property is used to limit the depth that the mesh modifier will descend the Lightscape refinement. When false, the mesh modifier will descend to the bottom of the refinement. The default is to limit the subdivision to the original mesh.

<LS_Mesh>.limitSize Boolean default: false -- boolean; Limit_Size

When true, the .size property is used to limit the size of polygons that are refined. When false, the mesh modifier will refine polygons of any size.

<LS_Mesh>.size Float default: 19.685 -- float

Length in the current view units. Polygons smaller than this size squared will not be refined by the modifier when .limitSize is set to true.

NOTES:

The LS_Mesh Spacewarp Modifier is only applicable to objects of the LightscapeMesh class imported from Lightscape using the Lightscape Solution File Importer.

When a Lightscape scene is imported, the mesh produced by Lightscape doesn’t contain the refinements that Lightscape introduced to improve the lighting. This information is kept and used by the Lightscape Radiosity Material while rendering. This modifier will add these refinements to the Lightscape mesh. In conjunction with the Lightscape vertex color modifier , this modifier can be used to produce meshes suitable for game engines.

The refinement stored in a Lightscape mesh is hierarchical. When a polygon is refined it is broken into four smaller polygons. These polygons can then be refined further. A polygon in the refinement has a depth from the original polygon, which is the number of refinements needed to get from the original polygon to the polygon in question.

The modifier allows you to reduce the number of polygons in the result by limiting the depth to which the modifier will descend and by limiting the size of polygons that will be refined. When both limits are active, a polygon will be refined when both criteria are met.

If the modifier is applied to a Lightscape mesh in Face sub-object selection mode, only the selected faces will be refined.

See also

LS_Colors Spacewarp Modifier

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


MultiRes - superclass: modifier

MultiRes : Modifier

MultiRes - superclass: modifier; super-superclass:MAXWrapper - 11:0 - classID: #(1788759147, 1229407453)

Value > MAXWrapper > Modifier > MultiRes

The MultiRes modifier reduces the memory overhead needed to render models by decreasing the number of vertices and polygons. This is useful not only within 3ds Max but for game and Web content creators who export models for use outside of 3ds Max. MultiRes offers several advantages over the Optimize modifier, including faster operation and the ability to specify reduction as an exact percentage or vertex count.

Constructors

MultiRes ...

MrmMod ...

Properties

<MultiRes>.vertexCount Integer default: 0 -- integer; Vertex_Count

The total number of vertices in the modified object. Use this control to set the maximum number of vertices in the output mesh. Adjusting this setting alters the Percent value as well.

<MultiRes>.vertexPercent Float default: 100.0 -- animatable; float; Vertex_Percentage

The modified object's vertex count as a percentage of the overall number of vertices in the original mesh. Adjusting this setting alters the Count value as well.

Note: After you type in a specific percentage, such as 30, you might find that the software changes the value to a slightly lower one, such as 29.971. This is due to the relationship between the overall number of vertices in the model and the percentage calculation. It is not a bug, but simply the closest solution to your request.

<MultiRes>.mergeVertex Boolean default: false -- boolean; Vertex_Merging

When on, lets MultiRes merge vertices between discrete elements in a model.

For example, if you apply MultiRes to a teapot, which comprises four separate elements, and turn on Vertex Merging, as you adjust the vertex resolution, the separate components will meld together into one contiguous lower-resolution object.

To control Vertex Merging, you can set a Merge Threshold. This value determines the 3ds Max unit distance within which to merge elements.

<MultiRes>.mergeThreshold Float default: 0.0 -- float; Threshold

This spinner value sets the maximum distance in 3ds Max units between vertices in order for those vertices to be considered for merging. Once this threshold is achieved, then the vertices between elements will be welded together as the mesh is reduced in complexity.

Note: To eliminate only coincident vertices, set Merge Threshold to 0.0. This is similar to the Weld Vertex function.

<MultiRes>.mergeWithinMesh Boolean default: false -- boolean; Merge_Within

When on, MultiRes merges the boundaries of adjacent elements and vertices within elements. Many objects can contain multiple groups of vertices that don't share connectivity. A simple example of this is the Teapot object. It comprises four different elements: the body, the handle, the spout, and the lid. Normally, MultiRes optimizes each discrete element in a mesh on its own.

The default behavior of the Vertex Merging option is to merge vertices between elements. Turning on Within Mesh? causes vertices within elements to be merged as well.

<MultiRes>.BoundaryMetric Boolean default: false -- boolean; Boundary_Metric

When on, MultiRes preserves materials assigned to the selected model. The material boundaries defined by Material IDs are retained as long as possible, and are the last to be eliminated at low vertex counts. Default=off.

<MultiRes>.baseVertices Boolean default: false -- boolean; Maintain_Base_Vertices

When on, overrides the MultiRes optimization algorithms and preserves any vertices selected at the MultiRes Vertex sub-object level as "critical" ones. Use this feature to retain critical features of an object or character such as its fingers or claws, or other geometry that might become unrecognizable if reduced too severely.

To select vertices for use with this option, use the MultiRes Vertex sub-object level. To access this level, first go to the modifier stack display and click the plus-sign icon next to the MultiRes modifier. This opens up its hierarchy, which consists of the single Vertex sub-object level. Next, click the Vertex entry. The MultiRes vertices appear on the mesh as blue dots. You can select these using any standard interactive method, but you cannot transform them.

Important: After selecting MultiRes sub-object vertices with Maintain Base Vertices turned on, re-generate the mesh before changing the vertex resolution.

In the following illustration, the clown started out as a high-resolution mesh. All of the MultiRes vertices in the right half were selected, Maintain Base Vertices was turned on, and then the vertices were reduced.

<MultiRes>.multiVertNorm Boolean default: true -- boolean; Multiple_Normals_Per_Vertex

When on, lets MultiRes assign multiple normals for each vertex. By default, MultiRes generates a single normal per vertex.

If multiple normals are generated, they are applied as the vertex resolution is decreased and increased.

When the Multiple Normals Per Vertex option is checked, the MultiRes modifier generates normal updates when the geometry surrounding a vertex changes. You must specify a crease angle in degrees (0.0 - 180.0). The crease angle is the angle between the face normals. It is used to decide when a normal should be shared across an edge between two faces.

For example, in a plane defined as a mesh grid of 10 x 10 faces, any two adjacent faces have a crease angle of zero. In a cube, adjacent faces have a crease angle of 90 degrees. In general, crease angles approaching 0 yield smoother shading. Crease angles approaching 180 yield more visible corners.

<MultiRes>.creaseAngle Float default: 75.0 -- float; Crease_Angle

The value of the crease necessary in order to generate multiple normals. Available only when Multiple Normals Per Vertex is on.

The optimal crease angle depends on the model; set it interactively and check the viewport and rendered images for shading effects. While use of multiple normals per vertex enables more accurate shading, it can require more internal data.

<MultiRes>.reqGenerate Boolean default: false -- boolean; Generate

Setting this property to true (or even false) will generate the optimization data.

NOTES:

When you first apply MultiRes to an object, it must initialize its mesh-optimizing algorithm - you are prompted by the modifier to "Generate when ready". Without the optimization data generated, you cannot change the mesh resolution.

When working with complex meshes, the initial analysis may take a little while. During this time, MultiRes displays the hourglass cursor to indicate it is working. To cancel this process, press ESC.

<MultiRes>.resetParams Boolean default: false -- boolean; Reset

Setting this property to true (or false) will reset the User Interface to default values.

EXAMPLE

modPanel.addModToSelection(MultiRes())

$.modifiers[#MultiRes].vertexCount = 482

$.modifiers[#MultiRes].vertexPercent = 100

$.modifiers[#MultiRes].vertexPercent = 99

$.modifiers[#MultiRes].vertexCount = 476

$.modifiers[#MultiRes].vertexPercent = 98.7552

$.modifiers[#MultiRes].mergeVertex = on

$.modifiers[#MultiRes].mergeThreshold = 0.01

$.modifiers[#MultiRes].mergeWithinMesh = on

$.modifiers[#MultiRes].boundaryMetric = on

$.modifiers[#MultiRes].baseVertices = on

$.modifiers[#MultiRes].creaseAngle = 75.75

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


NormalModifier : Modifier

Normalmodifier - superclass: modifier; super-superclass:MAXWrapper - classID: #(1017364, 0)

Value > MAXWrapper > Modifier > NormalModifier

Constructor

normalModifier ...

Properties

<Normalmodifier>.unify Boolean default: false

When on, unifies the normals of an object by flipping the normals so that they all point in the same direction, usually outward.

<Normalmodifier>.flip Boolean default: false

When on, reverses the direction of all the surface normals of the faces of the selected object or objects.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Optimize : Modifier

optimize - superclass: modifier; super-superclass:MAXWrapper - classID: #(806193, 0)

Value > MAXWrapper > Modifier > Optimize

Constructor

optimize ...

Properties

<optimize>.renderLOD Integer default: 0

You can store two different optimization settings for the renderer, in two separate levels; L1 & L2. Set the level of display for the default scanline renderer:

0- L1

1- L2

<optimize>.viewLOD Integer default: 0

You can store two different optimization settings for the viewport, in two separate levels; L1 & L2. Set the level of display for the viewport:

0- L1

1- L2

<optimize>.facethreshold1 Float default: 4.0 -- animatable, angle, alias: Face_Threshold_L1

The threshold angle used to determine which faces are collapsed. Low values produce less optimization but better approximations of the original shape. Higher values improve optimization, but are more likely to result in faces that render poorly.

<optimize>.edgethreshold1 Float default: 1.0 -- animatable, angle, alias: Edge_Threshold_L1

Sets a different threshold angle for open edges (those that bound only one face). A low value preserves open edges. At the same time you can apply a high face threshold to get good optimization.

<optimize>.bias1 Float default: 0.1 -- animatable, alias: Bias_L1

Helps eliminate the skinny or degenerate triangles that occur during optimization, which can cause rendering artifacts. Higher values keeps triangles from becoming degenerate. The default of 0.1 is enough to eliminate the skinniest triangles.

<optimize>.MaxEdgeLength1 Float default: 0.0 -- animatable, alias: Max_Edge_Length_1

The maximum length, beyond which an edge cannot be stretched when optimized. When MaxEdgeLength1 is 0, it has no effect. Any value greater than 0 specifies the maximum length of the edges.

<optimize>.preservemat1 Boolean default: false

When on, prevents face collapse across material boundaries.

<optimize>.preservesmooth1 Boolean default: false

When turned on, allows only faces that share at least one smoothing group to collapse.

<optimize>.facethreshold2 Float default: 4.0 -- animatable, angle, alias: Face_Threshold_L2

The threshold angle used to determine which faces are collapsed. Low values produce less optimization but better approximations of the original shape. Higher values improve optimization, but are more likely to result in faces that render poorly.

<optimize>.edgethreshold2 Float default: 1.0 -- animatable, angle, alias: Edge_Threshold_L2

Sets a different threshold angle for open edges (those that bound only one face). A low value preserves open edges. At the same time you can apply a high face threshold to get good optimization.

<optimize>.bias2 Float default: 0.1 -- animatable, alias: Bias_L2

Helps eliminate the skinny or degenerate triangles that occur during optimization, which can cause rendering artifacts. Higher values keeps triangles from becoming degenerate. The default of 0.1 is enough to eliminate the skinniest triangles.

<optimize>.MaxEdgeLength2 Float default: 0.0 -- animatable, alias: Max_Edge_Length_2

The maximum length, beyond which an edge cannot be stretched when optimized. When MaxEdgeLength2 is 0, it has no effect. Any value greater than 0 specifies the maximum length of the edges.

<optimize>.preservemat2 Boolean default: false

When on, prevents face collapse across material boundaries.

<optimize>.preservesmooth2 Boolean default: false

When turned on, allows only faces that share at least one smoothing group to collapse.

<optimize>.manualUpdate  Boolean default: false

When on, enables the Update button. When turned off, Optimize works as it does by default, updating the viewport display dynamically.

<optimize>.autoedge Boolean default: false

When on, turns edges on and off following optimization. Turns on any open edges. Turns off any edges between faces whose normals are within the face threshold; such edges beyond the threshold are not turned on.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Smooth : Modifier

smooth - superclass: modifier; super-superclass:MAXWrapper - classID: #(1017363, 0)

Value > MAXWrapper > Modifier > Smooth

Constructor

smooth ...

smoothModifier ...

Properties

<smooth>.autosmooth Boolean default: false

When on, the object is auto-smoothed using the threshold value. Auto Smooth sets the smoothing groups based on the angle between faces. Any two adjacent faces are put in the same smoothing group if the angle between their normals is less than the threshold angle.

<smooth>.preventIndirect Boolean default: false

Turn on to prevent smoothing "leaks" when using Auto Smooth. If you apply Auto Smooth to an object, and portions of that object that should not be smoothed become smoothed, then turn on Prevent Indirect Smoothing to see if it corrects the problem.

<smooth>.threshold Float default: 30.0 -- animatable, angle

The threshold angle in degrees. Any two adjacent faces are put in the same smoothing group if the angle between their normals is less than the threshold angle.

<SmoothModifier>.smoothingBits Integer default: 0

The smoothing group assigned to the selected face.

NOTE:

See Editable_Mesh , Face Methods for a description of the smoothing group integer value

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Sweep : Modifier

sweep - superclass: modifier; super-superclass:MAXWrapper - 18:0 - classID: #(636209254, 529015311)

Value > MAXWrapper > Modifier > Sweep

The Sweep Modifier can be used to turn a spline shape into a mesh with a custom cross-section, providing both built-in and user-defined cross-section shape options. Available in 3ds Max 8 and higher.

Constructor

Sweep ...

Properties

Section Type Rollout

<sweep>.AssignCSType Integer default: 2 -- radiobtnIndex; AssignCustomSectionType

Get/set the Custom Section Type > mode radio buttons' state.

Possible values are:

0 - Move

1 - Copy

2 - Instance (default)

3 - Reference

<sweep>.CurrentBuiltInShape Integer default: 1 -- integer; Current_Built_In_Shape

Get/set the Build-in Section type. The available shapes are not hard-coded, but can be extended by editing the file \plugcfg\sweep.ini and adding up to 100 custom shape classes.

Current pre-defined values are:

1 - Angle

2 - Bar

3 - Channel

4 - Cylinder

5 - Half Round

6 - Pipe

7 - Quarter Round

8 - Tee

9 - Tube

10 - Wide Flange

<sweep>.CustomShape Integer default: 0 -- integer; Custom_Shape

Get/set the state of the Use Built-In Selection / Use Custom Section radio buttons. When set to 1, the Custom Section will be active. When 0, the pre-defined Section will be active.

<sweep>.CustomShapeName UndefinedClass default: undefined -- string; Custom_Shape_Name;

Contains the name of the Custom Section object, or undefined if no custom cross-section has been picked yet.

<sweep>.Shapes ArrayParameter default: #(undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, ...) -- maxObject array; SubAnim

This is an array of 100 elements and is used to store the cross-section shapes.

All elements but the first one are read-only.

Elements 2 to 100 are used to store the class instances defined by the Build-in types controlled by the .CurrentBuiltInShape property and the "Build-in section" drop-down list.

In the beginning, element 2 is assigned an instance of the class defined by the first (default) cross-section in the \plugcfg\sweep.ini file (Angle by default). Selecting other elements from the list or setting .CurrentBuiltInShape to other values than 1 will create new shape class instances and store them in the respective CurrentBuiltInShape+1 elements of the array.

You can assign a new class instance of any shape to the first element of the array in order to make it available as custom shape when the .CustomShape property is set to 1.

FOR EXAMPLE

theShape = circle radius:100 --create a circle

theMod = sweep() --create a sweep modifier

addModifier theShape theMod --add the sweep to the circle

--Assing an instance of class Helix to first element of the shapes array:

theMod.shapes[1] = Helix()

theMod.customShape = 1 --enable the use of the custom shape

Sweep Parameters

<sweep>.MirrorXZPlane BooleanClass default: false -- boolean; Mirror_On_XZ_Plane

Get/set the state of the Mirror on XZ plane option.

<sweep>.MirrorXYPlane BooleanClass default: false -- boolean; Mirror_On_XY_Plane

Get/set the state of the Mirror on XY plane option.

<sweep>.XOffset Float default: 0.0 -- animatable; float; X_Offset

Get/set the X Offset value. Controls the offset of the cross-section from the path along the cross-section's X axis.

<sweep>.YOffset Float default: 0.0 -- animatable; float; Y_Offset

Get/set the Y Offset value. Controls the offset of the cross-section from the path along the cross-section's Y axis.

<sweep>.Angle Float default: 0.0 -- animatable; angle;

Get/set the Angle value. Controls the rotation of the cross-shape around the axis of the path.

<sweep>.SmoothSection BooleanClass default: true -- boolean; Smooth_Section

Get/set the state of the Smooth Section option. When set to true, assign the same smoothing group to all faces generated for a single segment of the base (path) shape, resulting in smoothing along the cross-section.

<sweep>.SmoothPath BooleanClass default: true -- boolean; Smooth_Path

Get/set the state of the Smooth Path option. When set to true, assign the same smoothing group to all faces generated for a single segment of the cross-section shape for all base (path) shape's segments, resulting in smoothing along the base shape.

<sweep>.PivotAlignment Integer default: -1 -- integer; Pivot_Alignment

Get/set the Pivot Alignment option. Corresponds to the group of 9 checkbuttons.

Possible values are:

0 - Upper Left Corner

1 - Left

2 - Bottom Left Corner

3 - Up

4 - Center

5 - Bottom

6 - Upper Right Corner

7 - Right

8 - Bottom Right Corner

-1 or any value higher than 8 - Default, no alignment

<sweep>.Banking BooleanClass default: true -- boolean

Get/set the state of the Banking option.

<sweep>.UnionIntersections BooleanClass default: false -- boolean; Union_Intersections

Get/set the state of the Union Intersection option.

<sweep>.GenerateMappingCoords BooleanClass default: false -- boolean; Generate_Mapping_Coords

Get/set the state of the Gen.Mapping Coordinates option. When set to true, mapping coordinates will be generated where U goes around the cross-section and V goes along the base spline, same as with the Renderable Spline option in regular shapes.

<sweep>.UsePhysicalScaleUV BooleanClass default: false -- boolean; Real_World_Map_Size

Get/set the state of the Real-World Map Size option.

<sweep>.GenMatIDs BooleanClass default: true -- boolean; Generate_Material_IDs

Get/set the state of the Generate Material IDs option.

<sweep>.UsePathIDs BooleanClass default: false -- boolean; Use_Path_IDs

Get/set the state of the Use Section IDs option.

<sweep>.UseSectionIDs BooleanClass default: true -- boolean; Use_Shape_IDs

Get/set the state of the Use Path IDs option.

sweep Interfaces:

Interface: sweepInterface

Methods:

<void>pickCustomSection()

Corresponds to pressing the Pick button in the "Custom Section Types" group of controls of the "Section Type" rollout.

<void>mergeCustomSection()

Corresponds to pressing the Merge From File button in the "Custom Section Types" group of controls of the "Section Type" rollout.

<void>extractCustomSection()

Corresponds to pressing the Extract button in the "Custom Section Types" group of controls of the "Section Type" rollout.

<void>alignPivot()

Corresponds to pressing the Align Pivot button in the "Sweep Parameters" group of controls of the "Section Type" rollout.

Parameters and Interpolation Rollouts

NOTE:

To provide the built-in cross-section, the Sweep modifier creates class instances of the respective shape classes and stores these class instances in the .Shapes array.

The properties displayed in the Parameters and Interpolation rollouts are taken from the ParamBlock of the class instance generated for the cross-section.

The corresponding shape classes used for the built-in cross-sections are:

Angle - Angle : Shape

Bar - Rectangle : Shape

Channel - Channel : Shape

Cylinder - Circle : Shape

Half Round - HalfRound : Shape

Pipe - Pipe : Shape

Quarter Round - QuarterRound : Shape

Tee - Tee : Shape

Tube - WalledRectangle : Shape

Wide Flange - WideFlange : Shape

The cross-section object can be accessed as the 4th indexed subAnim of the sweep modifier,

FOR EXAMPLE

theMod = sweep()

sweep:Sweep

theShape = Circle radius:100

$Circle:Circle01 @ [0.000000,0.000000,0.000000]

addModifier theShape theMod

OK

classof theMod[4].object

Angle

theMod[4].angle_width = 50 --set any property available in Angle Shape...

50

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


STL_Check : Modifier

STL_Check - superclass: modifier; super-superclass:MAXWrapper - classID: #(1120886685, 800331681)

Value > MAXWrapper > Modifier > STL_Check

Constructor

STL_Check ...

Properties

<STL_Check>.Selection_Type Integer default: 4

Selects incorrect geometry specific to the following settings:

0- Open Edge (Checks for open edges.)

1- Double Face (Checks for faces that share the same 3D space.)

2- Spike (Checks for spikes, which are isolated faces that share only one edge with the object.)

3- Multiple Edge (Checks for faces that share more than one edge.)

4- Everything (Checks for all of the above.)

<STL_Check>.Select_Faces Integer default: 1

These options specify the level of incorrect geometry that’s selected, based on the settings for the selection_type value:

0- Don’t Select (When on, STL Check doesn’t select any part of objects in error.)

1- Select Edges (When on, STL Check marks the edges of faces in error by selecting them. The selection of erroneous edges is visible in viewports.)

2- Select Faces (When on, STL Check marks the faces of any object in error by selecting them. The selection of erroneous faces is visible in viewports.)

<STL_Check>.Check_Now Integer default: 0

Turn on to perform the STL check. For complex objects, expect a pause between the time you turn this on, and the time you see the reported errors in the Status group.

0- Off

1- On

<STL_Check>.Change_MatID Integer default: 1

When on, STL Check also marks faces in error by assigning them a unique material ID.

0- Off

1- On

<STL_Check>.Material_ID Integer default: 2

The material ID that STL Check assigns to faces in error.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Subdivide : Modifier

subdivide - superclass: modifier; super-superclass:MAXWrapper - classID: #(283338281, 240408334)

Value > MAXWrapper > Modifier > Subdivide

The Subdivide Modifier provides procedural means for subdividing polygons for radiosity processing.

Constructor

subdivide ...

Properties

<subdivide>.manualUpdate Integer default: 1 -- integer; Manual_Update

Get/Set the Update mode of the modifier:

0 - Manual

1 - Automatic

2 - Render

<subdivide>.showAllTriangles Boolean default: true -- boolean; Show_All_Triangles

Get/Set the state of the "Display Subdivisions" checkbox. Controls whether to display the subdivision in the viewport or not.

<subdivide>.size Float default: 39.3701 -- animatable; world units

Get/Set the Subdivision Size value.

See also

SubdivideSpacewarpModifier : SpacewarpModifier

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Symmetry : Modifier

symmetry - superclass: modifier; super-superclass:MAXWrapper - classID: #(763260971, 199498350)

Value > MAXWrapper > Modifier > Symmetry

The Symmetry modifier slices, mirrors, and welds along a symmetry plane, giving a procedural way to do symmetric modeling. Symmetry accepts TriObjects or PolyObjects, and does not respect subobject level or current selection.

Constructor

symmetry ...

NOTE:

This class is not available in Autodesk VIZ.

Properties

<symmetry>.axis Integer default: 0 -- integer

Specify the symmetry axis:

0 - X Axis

1 - Y Axis

2 - Z Axis

<symmetry>.flip Boolean default: false -- boolean

When set to true, uses the other half of the object as the source for symmetry.

<symmetry>.slice Integer default: 1 -- integer

When set to 1, slices the source geometry along the mirror plane and deletes the one half.

<symmetry>.weld Integer default: 1 -- integer; Weld_Seam

When set to 1, welds the vertices of the source and mirrored halves together.

<symmetry>.threshold Float default: 0.1 -- animatable; float

The welding threshold - vertices closer than the threshold value will be welded.

<symmetry>.mirror SubAnim default: SubAnim:Mirror -- transform; SubAnim

Controls the transformation of the Mirror gizmo

<symmetry.mirror>.position Point3 default: [0,0,0] -- animatable

The position of the Mirror gizmo.

<symmetry.mirror>.rotation Quat default: (quat 0 0 0 1) -- animatable

The rotation of the Mirror gizmo.

<symmetry.mirror>.scale Point3 default: [1,1,1] -- animatable

The scale of the Mirror gizmo.

<symmetry.mirror>.value Matrix3 default: (matrix3 [1,0,0] [0,1,0] [0,0,1] [0,0,0]) -- animatable

The complete matrix3 transformation value of the Mirror gizmo.

See also

Vertex_Weld : Modifier

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Tessellate : Modifier

Tessellate - superclass: modifier; super-superclass:MAXWrapper - classID: #(-1548587022, 0)

Value > MAXWrapper > Modifier > Tessellate

Constructor

Tessellate ...

Properties

<Tessellate>.tension Float default: 2500.0 -- animatable, percentage

Determines if the new faces are flat, concave, or convex after Edge tessellation. A positive value rounds faces by pushing vertices outward. A negative value creates concave faces by pulling vertices inward. A setting of 0 keeps the faces flat.

NOTE:

The tension value is 100 times the value shown in the 3ds Max user interface.

<tessellate>.faceType Integer default: 0

The faceType mode corresponding to the Operate On option in the UI:

0 - Operate on Faces

1 - Operate on Polygons

<tessellate>.type Integer default: 0

The tessellation type:

0 - Edge

1 - Face-Center

<tessellate>.iterations Integer default: 0

The number of tessellation iterations. Note that while the UI limits the number of iterations to 4, you can set higher values via MAXScript.

<tessellate>.updateWhen Integer default: 0

The update mode:

0 - Always

1 - When Rendering

2 - Manually

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


VertexPaint : Modifier

VertexPaint - superclass: modifier; super-superclass:MAXWrapper - 12:0 - classID: #(2126202437, 2078409803)

Value > MAXWrapper > Modifier > VertexPaint

The original VertexPaint Class from older 3ds Max versions has been renamed to OldVertexPaint in 3ds Max 6. The new implementation has exactly the same class name but a different classID and completely replaces the old one.

NOTE:

This modifier is not creatable in Autodesk VIZ.

Constructors:

vertexPaint ...

PaintLayerMod...

Properties:

<VertexPaint>.ignoreBackfacing BooleanClass default: false -- boolean; Ignore_Backfacing

Get/Set the ignore backfacing option.

<VertexPaint>.mapChannel Integer default: 0 -- integer; Map_Channel

Get/Set the Map Channel.

<VertexPaint>.layerMode String default: "Normal" -- string; Layer_Mode

Get/Set the Layer Mode.

<VertexPaint>.layerOpacity Float default: 100.0 -- animatable; float; Layer_Opacity

Get/Set the Layer Opacity.

<VertexPaint>.layerIsolated BooleanClass default: false -- boolean; Layer_Isolated

Get/Set the Layer Isolated mode. Corresponds to the "Ignore Underlying Color" option in the UI.

<VertexPaint>.surviveCondense BooleanClass default: false -- boolean; Survive_Condense

Get/Set the Survive Condense mode. Corresponds to the "Preserve Layer" option in the UI.

<VertexPaint>.lightingModel Integer default: 1 -- integer; Lighting_Model

Get/Set the Lighting model. Possible values are:

  1. - Lighting

  2. - Shaded

  3. - Diffuse

<VertexPaint>.colorBy Integer default: 0 -- integer; Color_By

Get/Set the Color Assignment mode. Possible values are:

  1. - Color By Face

  2. - Color By Vertex

<VertexPaint>.castShadows BooleanClass default: false -- boolean; Cast_Shadows

Get/Set the Cast Shadows option state. Corresponds to the "Calculate Shadows" option in the UI.

<VertexPaint>.useMaps BooleanClass default: false -- boolean; Use_Maps

Get/Set the Use Maps option state. Corresponds to the "Use Maps" option in the UI.

<VertexPaint>.useRadiosity BooleanClass default: false -- boolean; Use_Radiosity

Get/Set the Use Radiosity option state. Corresponds to the "Use Radiosity" option in the UI.

<VertexPaint>.radiosityOnly BooleanClass default: false -- boolean; Radiosity_Only

Get/Set the Radiosity Only option state. Corresponds to the "Radiosity Only" option in the UI.

<VertexPaint>.radiosityOption Integer default: 0 -- integer; Lighting_Model

Get/Set the Radiosity Lighting Model index.

Below is the original definition of the old VertexPaint Modifier:

OldVertexPaint : Modifier

OldVertexPaint - superclass: modifier; super-superclass:MAXWrapper - classID: #(1715171243, 1945400197)

NOTE:

This modifier is not creatable in Autodesk VIZ.

Class instances not creatable in 3ds Max 6 and higher.

See also

Vertex_Paint_Floater : ReferenceTarget

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Vertex_Colors : Modifier

Vertex_Color - superclass: textureMap; super-superclass:material - classID: #(9652305, 0)

Value > MAXWrapper > Modifier > Vertex_Colors

Constructor

The Vertex_Colors modifier is not creatable by MAXScript.
It can only be created using the Assign Vertex Colors utility.

Properties

There are no additional properties for Vertex_Colors.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Vertex_Weld : Modifier

Vertex_Weld - superclass: modifier; super-superclass:MAXWrapper - classID: #(1888496096, 754583485)

Value > MAXWrapper > Modifier > Vertex_Weld

Vertex_Weld is a procedural weld modifier. It merges incoming vertices that are inside a user-defined threshold.

Constructor

Vertex_Weld ...

vertexWeld ...

Properties

<Vertex_Weld>.threshold Float default: 0.1 -- animatable; float

Get/Set the threshold. Vertex_Weld welds vertices that are closer than the threshold value. When the distance between two vertices is greater than the threshold, they will not be affected.

See also

Symmetry : modifier

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Affect_Region : Modifier

Affect_Region - superclass: modifier; super-superclass:MAXWrapper - classID: #(806450, 0)

Value > MAXWrapper > Modifier > Affect_Region

Constructor

affect_region ...

Properties

<Affect_Region>.falloff Float default: 20.0 -- animatable

Distance in current units from the center to the edge of a sphere defining the affected region. Use higher falloff settings to achieve more gradual slopes, depending on the scale of your geometry.

<Affect_Region>.Pinch Float default: 0.0 -- animatable

Raises and lowers the top point of the curve along the vertical axis. Sets the relative "pointedness" of the region. When negative, a crater is produced instead of a point. At a setting of 0, Pinch produces a smooth transition across this axis.

<Affect_Region>.Bubble Float default: 0.0 -- animatable

Expands and contracts the curve along the vertical axis. Sets the relative "fullness" of the region. Limited by Pinch, which sets a fixed starting point for Bubble. A setting of 0 for Pinch and 1.0 for Bubble produces a maximum smooth bulge. Negative values for Bubble move the bottom of the curve below the surface, creating a "valley" around the base of the region.

<Affect_Region>.ignoreBackfacing  Boolean default: off

When on, affects only those vertices whose face normals are in the same general direction as the gizmo arrow. When turned off, all vertices in the Falloff group are affected.

<Affect_Region>.start_point Point3 default: [0,0,0] -- animatable

The starting point for the application of the affect region.

<Affect_Region>.end_point Point3 default: [0,0,25] - animatable

The end point for application of the affect region.

Methods

AffectRegionVal <distance> <falloff> <pinch> <bubble>

The standard affect region function, based on a distance and the three affect region parameters (same as the editable mesh). This function is a cubic curve which returns 1 at distance 0, 0 if distance is greater than falloff, and other values for distance between 0 and falloff.

See also

Modifier Sub-Object Transform Properties

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Bend : Modifier

Bend - superclass: modifier; super-superclass:MAXWrapper - classID: #(16, 0)

Value > MAXWrapper > Modifier > Bend

Constructor

Bend ...

BendMod ...

Properties

<Bend>.angle Float default: 0.0 -- animatable

The angle to bend from the vertical plane.

<Bend>.direction Float default: 0.0 -- animatable

The direction of the bend relative to the horizontal plane.

<Bend>.axis Integer default: 2

Specifies the axis to be bent. Note that this axis is local to the Bend gizmo and not related to the selected entity:

0- X

1- Y

2- Z

<Bend>.limit Boolean default: false

When on, applies limit constraints to the bend effect.

<Bend>.upperlimit Float default: 0.0 -- animatable, alias: Upper_Limit

The upper boundary in world units from the bend center point beyond which the bend no longer affects geometry.

<Bend>.lowerlimit Float default: 0.0 -- animatable, alias: Lower_Limit

The lower boundary in world units from the bend center point beyond which the bend no longer affects geometry.

<Bend>.center Point3 default: [0,0,0] -- animatable

You can translate and animate the center, altering the Bend gizmo’s shape, and thus the shape of the bent object.

<Bend>.gizmo SubAnim

You can transform and animate the gizmo like any other object, altering the effect of the Bend modifier.

<Bend.gizmo>.position Point3 default: [0,0,0] -- animatable

The position of the gizmo object. Translating the gizmo translates its center an equal distance.

<Bend.gizmo>.rotation Quat default: (quat 0 0 0 1) -- animatable

The rotation of the gizmo object. Rotating the gizmo takes place with respect to its center.

<Bend.gizmo>.scale Point3 default: [1,1,1] -- animatable

The scaling of the gizmo object. Scaling the gizmo takes place with respect to its center.

See also

Modifier Sub-Object Transform Properties

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Displace : Modifier

Displace - superclass: modifier; super-superclass:MAXWrapper - classID: #(806194, 0)

Value > MAXWrapper > Modifier > Displace

Constructor

displace ...

Properties

<Displace>.strength Float default: 0.0 -- animatable

When set to 0.0, Displace has no effect. Values greater than 0.0 displace object geometry or particles away from the position of the gizmo. Values less than 0.0 displace geometry toward the gizmo.

<Displace>.decay Float default: 0.0 -- animatable

Varies the displacement strength with distance. By default, Displace has the same strength throughout world space. Increasing Decay causes the displacement strength to diminish as distance increases from the position of the Displace gizmo. This has the effect of concentrating the force field near the gizmo, similar to the field around a magnet repelling its opposite charge.

<Displace>.lumCenterEnable Boolean default: false

When on, the software uses .center to determine which level of gray Displace uses as the zero displacement value.

<Displace>.center Float default: 0.5 -- animatable, alias: lumCenter

By default, Displace centers the luminance by using medium (50 percent) gray as the zero displacement value. Gray values greater than 128 displace in the outward direction (away from the Displace gizmo) and gray values less than 128 displace in the inward direction (toward the Displace gizmo). This value adjusts the default. With a Planar projection, the displaced geometry is repositioned above or below the Planar gizmo.

<Displace>.bitmap Bitmap default: undefined

This bitmap is used for displacement.

<Displace>.map TextureMap default: undefined

This texture map is used for displacement.

<Displace>.blur Float default: 0.0 -- animatable

Blurs or softens the effect of the bitmapped displacement by increasing the value.

<Displace>.maptype Integer default: 0

Type of map projection:

0- Planar (Projects the map from a single plane.)

1- Cylindrical (Projects the map as if it were wrapped around the cylinder.)

2- Spherical (Projects the map from a sphere, with singularities at the top and bottom of the sphere where the bitmap edges meet at the sphere’s poles.)

3- Shrink Wrap (Projects the map from a sphere, as Spherical does, but truncates the corners of the map and joins them all at a single pole, creating only one singularity at the bottom.)

<Displace>.cap Boolean default: false

When on, a copy of the map is projected from the ends of the cylinder.

<Displace>.length Float default: 1.0 -- animatable

The length of the displace gizmo’s bounding box.

<Displace>.width Float default: 1.0 -- animatable

The width of the displace gizmo’s bounding box.

<Displace>.height Float default: 1.0 -- animatable

The height of the displace gizmo’s bounding box.

Height has no effect on Planar mapping.

<Displace>.U_Tile Float default: 1.0 -- animatable

The number of times the bitmap repeats along the U-axis.

<Displace>.U_Flip Boolean default: false

When on, reverses the orientation of the map along the U-axis.

<Displace>.V_Tile Float default: 1.0 -- animatable

The number of times the bitmap repeats along the V-axis.

<Displace>.V_Flip Boolean default: false

When on, reverses the orientation of the map along the V-axis.

<Displace>.W_Tile Float default: 1.0 -- animatable

The number of times the bitmap repeats along the W-axis.

<Displace>.W_Flip Boolean default: false

When on, reverses the orientation of the map along the W-axis.

<Displace>.useMap Boolean default: false

When on, has Displace use the UV mapping set earlier in the stack. This has no effect if the object is not mapped.

<Displace>.applyMap Boolean default: false

When on, applies the Displace UV mapping to the bound object. This lets you apply material maps to the object using the same mapping coordinates as the modifier.

<Displace>.Map_or_Vertex_Color Integer default: 0

Specifies whether to apply the displacement projection to a mapping channel or a vertex color channel:

0- Map Channel

1- Vertex Color Channel

<Displace>.Map_Channel Integer default: 1

The map channel to use for displacement projection.

<Displace>.axis Integer default: 2

Flips the alignment of the mapping gizmo along one of its three axes:

0- X

1- Y

2- Z

<Displace>.gizmo SubAnim

You can move, scale, and rotate the gizmo to alter the effect of the displacement modifier on the object.

<Displace.Gizmo>.position Point3 default: [0,0,0] -- animatable

The position of the displace gizmo.

<Displace.Gizmo>.rotation Quat default: (quat 0 0 -1 0) -- animatable

The rotation of the displace gizmo.

<Displace.Gizmo>.scale Point3 default: [1,1,1] -- animatable

The scaling of the displace gizmo.

NOTE:

The Gizmo property is not present until the Displace modifier has been applied to a node.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Lattice : Modifier

Lattice - superclass: modifier; super-superclass:MAXWrapper - classID: #(344011425, 785989660)

Value > MAXWrapper > Modifier > Lattice

Constructor

Lattice ...

Properties

<Lattice>.Strut_Radius Float default: 2.0 -- animatable

The radius of the struts.

<Lattice>.Strut_Segments Integer default: 1 -- animatable

The number of segments along the struts. Increase this value when you need to deform or distort the struts with subsequent modifiers.

<Lattice>.Strut_Sides Integer default: 4 -- animatable

The number of sides around the perimeter of the struts.

<Lattice>.Joint_Radius Float default: 5.0 -- animatable

The radius of the joints.

<Lattice>.Joint_Segs Integer default: 1 -- animatable

The number of segments in the joints. The more segments, the more spherical the joints’ shape.

NOTES:

The Geometry, Struts Material ID, Struts Ignore Hidden Edges, Struts End Caps, Struts Smooth, Joints Base Type, Joints Material ID, Joints Smooth, and Mapping Coordinates parameters are not accessible by MAXScript.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Mirror : Modifier

Mirror - superclass: modifier; super-superclass:MAXWrapper - classID: #(-275600772, 1360772725)

Value > MAXWrapper > Modifier > Mirror

Constructor

Mirror ...

Properties

<Mirror>.mirror_axis Integer default: 0

The axis or axes about which the mirroring takes place:

0- X

1- Y

2- Z

3- XY

4- YZ

5- ZX

<Mirror>.Mirror_Offset Float default: 0.0 -- animatable

The offset, in units, from the mirror axis.

<Mirror>.copy Boolean default: false

When on, copies the geometry rather than simply mirroring it.

<Mirror>.mirror_center SubAnim

Represents the axis of the mirror effect. You can move, rotate or scale the gizmo to affect the mirroring.

<Mirror.Mirror_Center>.position Point3 default: [0,0,0] -- animatable

The position of the mirror center.

<Mirror.Mirror_Center>.rotation Quat default: (quat 0 0 0 1) -- animatable

The rotation of the mirror center.

<Mirror.Mirror_Center>.scale Point3 default: [1,1,1] -- animatable

The scaling of the mirror center.

See also

Modifier Sub-Object Transform Properties

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


NoiseModifier : Modifier

Noisemodifier - superclass: modifier; super-superclass:MAXWrapper - classID: #(-107499228, 0)

Value > MAXWrapper > Modifier > NoiseModifier

Constructor

Noisemodifier ...

Properties

<Noisemodifier>.seed Integer default: 0 -- animatable

A random start point is generated from the number you set.

<Noisemodifier>.scale Float default: 100.0 -- animatable

The size of the noise effect (not strength). Larger values produce smoother noise, lower values more jagged noise.

<Noisemodifier>.fractal Boolean default: false -- animatable

When on, produces a fractal effect based on current settings.

<Noisemodifier>.roughness Float default: 0.0 -- animatable, alias: rough

The extent of fractal variation. Lower values are less rough than higher values.

<Noisemodifier>.iterations Float default: 6.0 -- animatable

The number of iterations (or octaves) used by the fractal function. Fewer iterations use less fractal energy and generate a smoother effect. An iteration of 1.0 is the same as turning .fractal off.

<Noisemodifier>.strength Point3 default: [0,0,0] -- animatable

The strength of the noise effect along each of three axes. Enter a value for at least one of these axes to produce a noise effect.

<Noisemodifier>.animate Boolean default: false

Enables/disables animation playback.

<Noisemodifier>.frequency Float default: 0.25

The speed of the noise effect. Higher frequencies make the noise quiver faster. Lower frequencies produce a smoother and more gentle noise.

<Noisemodifier>.phase Time default: 0f -- animatable

Shifts the start and end points of the underlying wave.

<Noisemodifier>.center Point3 default: [0,0,0] -- animatable

You can move, rotate, or scale the center sub-object to affect the noise. You can also animate the sub-object transforms.

<Noisemodifier>.gizmo SubAnim

You can move, rotate, or scale the gizmo sub-object to affect the noise. You can also animate the sub-object transforms.

<Noisemodifier.gizmo>.position Point3 default: [0,0,0] -- animatable

The position of the gizmo.

<Noisemodifier.gizmo>.rotation Quat default: (quat 0 0 0 1) -- animatable

The rotation of the gizmo.

<Noisemodifier.gizmo>.scale Point3 default: [1,1,1] -- animatable

The scaling of the gizmo.

See also

Modifier Sub-Object Transform Properties

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Preserve : Modifier

Preserve - superclass: modifier; super-superclass:MAXWrapper - classID: #(1220812801, 1925976151)

Value > MAXWrapper > Modifier > Preserve

Constructor

Preserve ...

Properties

<Preserve>.iterations Integer default: 25 -- animatable

The number of calculations toward the solution. The higher this number, the closer the object comes to matching the original object and the slower the process. When this is set to zero, the original object has no effect, as if the Preserve modifier were never applied.

<Preserve>.Edge_Length_Weight Float default: 1.0 -- animatable

The relative importance of the edge length.

<Preserve>.Face_Angle_Weight Float default: 0.3 -- animatable

The relative importance of the face angle.

<Preserve>.Volume_Weight Float default: 0.3 -- animatable

The relative importance of the volume.

<Preserve>.Apply_To_Whole_Mesh Integer default: 0

When on, applies Preserve to the entire object, regardless of the selection passed from previous levels of the stack:

0- Off

1- On

<Preserve>.Selected_Verts_Only Integer default: 0

When on, uses previous sub-object vertex selections. Note that it doesn’t matter if the Vertex sub-object level is active in a previous stack item. As long as vertices have been selected, Preserve will use that selection.

0- Off

1- On

<Preserve>.Invert_Selection Integer default: 0

When on, inverts the selection passed up the stack.

0- Off

1- On

NOTE:

There is no way to specify the "Original" object using MAXScript.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Push : Modifier

Push - superclass: modifier; super-superclass:MAXWrapper - classID: #(102250285, 1739393759)

Value > MAXWrapper > Modifier > Push

Constructor

push ...

Properties

<Push>.Push_Value Float default: 0.0 -- animatable

The distance in world units by which vertices are moved with respect to the object center. Use a positive value to move vertices outward, or a negative value to move vertices inward.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Relax : Modifier

Relax - superclass: modifier; super-superclass:MAXWrapper - classID: #(100, 32670)

Value > MAXWrapper > Modifier > Relax

Constructor

Relax ...

Properties

<Relax>.iterations Integer default: 1 -- animatable

The number of times Relax is repeated. Each iteration recalculates average vertex locations based on the result of the previous iteration.

<Relax>.Relax_Value Float default: 0.5 -- animatable

The distance a vertex moves as a percentage of the distance between a vertex and the average location of its neighbors.

<Relax>.Keep_Boundary_Pts_Fixed Integer default: 1

When on, vertices at the edge of open meshes do not relax.

0- Off

1- On

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Ripple : Modifier

Ripple - superclass: modifier; super-superclass:MAXWrapper - classID: #(69, 0)

Value > MAXWrapper > Modifier > Ripple

Constructor

Ripple ...

Properties

<Ripple>.amplitude1 Float default: 5.0 -- animatable, alias: Amplitude_1

The amplitude of the first ripple.

<Ripple>.amplitude2 Float default: 5.0 -- animatable, alias: Amplitude_2

The amplitude of the second ripple, which is perpendicular to the first ripple.

<Ripple>.wavelength Float default: 25.0 -- animatable, alias: Wave_Length

The distance between the peaks of the wave. The greater the length, the smoother and more shallow the ripple for a given amplitude.

<Ripple>.phase Float default: 0.0 -- animatable

Shifts the ripple pattern over the object. Positive numbers move the pattern inward, while negative numbers move it outward.

<Ripple>.decay Float default: 0.0 -- animatable

Limits the effect of the wave generated from its center. A default decay of zero means that the wave will generate infinitely from its center. Increasing the decay value reduces the distance over which the wave is generated.

<Ripple>.center Point3 default: [0,0,0] -- animatable

At this sub-object level, you can translate and animate the center of the ripple effect, and thus the shape and positions of the ripples.

<Ripple>.gizmo SubAnim

At this sub-object level, you can transform and animate the gizmo like any other object, altering the effect of the Ripple modifier. Translating the gizmo translates its center an equal distance. Rotating and scaling the gizmo takes place with respect to its center.

<Ripple.gizmo>.position Point3 default: [0,0,0] -- animatable

The poosition of the ripple gizmo.

<Ripple.gizmo>.rotation Quat default: (quat 0 0 0 1) -- animatable

The rotation of the ripple gizmo.

<Ripple.gizmo>.scale Point3 default: [1,1,1] -- animatable

The scale of the ripple gizmo.

See also

Modifier Sub-Object Transform Properties

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Shell : Modifier

Shell - superclass: modifier; super-superclass:MAXWrapper - 21:0 - classID: #(1000020502, 1837426896)

Value > MAXWrapper > Modifier > Shell

The Shell modifier extrude the geometry surface procedurally, giving it thickness.

Constructor

Shell ...

Properties

<Shell>.innerAmount Float default: 0.0 -- animatable; world units; Inner_Amount

Get/Set the inner extrusion amount.

<Shell>.outerAmount Float default: 1.0 -- animatable; world units; Outer_Amount

Get/Set the outer extrusion amount.

<Shell>.overrideMatID BooleanClass default: false -- boolean; Override_MatID

When set to true, the Shell modifier will override the incoming Material IDs.

<Shell>.matID Integer default: 1 -- animatable; integer; Mat_ID

Get/Set the Materail ID.

<Shell>.overrideSmoothingGroup BooleanClass default: false -- boolean; Override_Smoothing_Group

When set to true, the Shell modifier will override the incoming Smoothing groups.

<Shell>.smoothGroup Integer default: 0 -- animatable; integer; Smooth_Group

Get/Set the Smoothing Group.

<Shell>.edgeMapping Integer default: 0 -- integer; Edge_Mapping

Get/Set the Edge Mapping mode. Possible values are:

0 - Copy

1 - None

2 - Strip

3 - Interpolate

<Shell>.tvOffset Float default: 0.05 -- animatable; float; TV_Offset

Get/Set the TV Offset value.

<Shell>.overrideInnerMatID BooleanClass default: false -- boolean; Override_Inner_MatID

When set to true, the Shell modifier will override the inner Material ID.

<Shell>.matInnerID Integer default: 1 -- animatable; integer; Inner_MatID

Get/Set the custom inner Materail ID.

<Shell>.selectEdgeFaces BooleanClass default: false -- boolean; Select_Edges_Faces

When set to true, the Shell modifier will select the edge faces.

<Shell>.selectInnerFaces BooleanClass default: false -- boolean; Select_Inner_Faces

When set to true, the Shell modifier will select the inner faces.

<Shell>.segments Integer default: 1 -- animatable; integer

Get/Set the number of segments.

<Shell>.straightenCorners BooleanClass default: false -- boolean; Straighten_Corners

When set to true, the Shell modifier will straighten the corners.

<Shell>.autoSmooth BooleanClass default: true -- boolean; Auto_Smooth

When set to true, the Shell modifier will auto-smooth the resulting mesh.

<Shell>.autoSmoothAngle Float default: 45.0 -- animatable; float; Smooth_Group

Get/Set the Auto-Smoothing angle.

<Shell>.selectOuterFaces BooleanClass default: false -- boolean; Select_Outer_Faces

When set to true, the Shell modifier will select the outer faces.

<Shell>.overrideOuterMatID BooleanClass default: false -- boolean; Override_Outer_MatID

When set to true, the Shell modifier will override the Outer Material IDs.

<Shell>.matOuterID Integer default: 3 -- animatable; integer; Outer_MatID

Get/Set the custom Outer Material ID.

<Shell>.bevel BooleanClass default: false -- boolean

When set to true, the Shell modifier will Bevel the edges based on the control shape assigned to the .bevelShape property.

<Shell>.bevelShape UndefinedClass default: undefined -- node; Bevel_Shape

Get/Set the bevel control shape.

See also

Modifier Sub-Object Transform Properties

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Skew : Modifier

Skew - superclass: modifier; super-superclass:MAXWrapper - classID: #(1866252970, 0)

Value > MAXWrapper > Modifier > Skew

Constructor

Skew ...

Properties

<Skew>.amount Float default: 25.0 -- animatable

The angle to skew from the vertical plane.

<Skew>.direction Float default: 0.0 -- animatable

The direction of the skew relative to the horizontal plane.

<Skew>.axis Integer default: 2

The axis that will be skewed:

0- X

1- Y

2- Z

<Skew>.limit Boolean default: false

When on, applies limit constraints to the Skew modifier.

<Skew>.upperlimit Float default: 0.0 -- animatable, alias: Upper_Limit

The upper limit boundaries in world units from the skew center point, beyond which the skew no longer affects the geometry.

<Skew>.lowerlimit Float default: 0.0 -- animatable, alias: Lower_Limit

The lower limit boundaries in world units from the skew center point, beyond which the skew no longer affects the geometry.

<Skew>.center Point3 default: [0,0,0] -- animatable

At this sub-object level, you can translate and animate the center of the Skew effect.

<Skew>.gizmo SubAnim

At this sub-object level, you can transform and animate the gizmo like any other object, altering the effect of the Skew modifier. Translating the gizmo translates its center an equal distance. Rotating and scaling the gizmo takes place with respect to its center.

<Skew.Gizmo>.position Point3 default: [0,0,0] -- animatable

The position of the skew gizmo.

<Skew.Gizmo>.rotation Quat default: (quat 0 0 0 1) -- animatable

The rotation of the skew gizmo.

<Skew.Gizmo>.scale Point3 default: [1,1,1] -- animatable

The scale of the skew gizmo.

See also

Modifier Sub-Object Transform Properties

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


SliceModifier : Modifier

sliceModifier - superclass: modifier; super-superclass:MAXWrapper - classID: #(775373310, 309340855)

Value > MAXWrapper > Modifier > Slice_Modifier

Constructor

sliceModifier ...

Properties

<sliceModifier>.Slice_Type Integer default: 0

Defines how the slice plane will affect the geometry to which it has been applied:

0- Refine Mesh (Adds new vertices and edges along the intersection of the geometry with the slicing plane. Faces cut by the plane are subdivided into new faces.)

1- Split Mesh (Adds a double set of vertices and edges along the plane boundary producing two separate meshes (one on either side of the slice plane), which you can modify differently if desired. Use this to break a mesh in two.)

2- Remove Top (Deletes all the faces and vertices above the Slice Plane.)

3- Remove Bottom (Deletes all the faces and vertices below the Slice Plane.)

<sliceModifier>.Faces___Polygons_Toggle Integer default: 1

Specifies how the slice handles quads and other polygons:

0- Operate on Face (Treats the selection set as a set of triangular faces, slicing each one in turn.)

1- Operate on Polygon (Treats the selection set as polygonal facets based on visible edges. Hidden edges within a polygon are recomputed to give the best result for the whole polygons.)

<sliceModifier>.slice_plane SubAnim

At this sub-object level, you can transform and animate the gizmo like any other object to determine where the slice occurs. Scaling the gizmo has no effect, because its extents are effectively infinite. If you need to limit the extent of the slice, use it on a sub-object selection set of faces, rather than on the entire object.

<sliceModifier.Slice_Plane>.position Point3 default: [0,0,0] -- animatable

The position of the slice plane object.

<sliceModifier.Slice_Plane>.rotation Quat default: (quat 0 0 0 1) -- animatable

The rotation of the slice plane object.

<sliceModifier.Slice_Plane>.scale Point3 default: [1,1,1] -- animatable

The scale of the slice plane object.

See also

Modifier Sub-Object Transform Properties

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Spherify : Modifier

Spherify - superclass: modifier; super-superclass:MAXWrapper - classID: #(-568876210, -1975393632)

Value > MAXWrapper > Modifier > Spherify

Constructor

spherify ...

Properties

<Spherify>.percent Float default: 100.0 -- animatable

The percentage of spherical distortion to apply to an object.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Squeeze : Modifier

Squeeze - superclass: modifier; super-superclass:MAXWrapper - classID: #(299181989, 978405796)

Value > MAXWrapper > Modifier > Squeeze

Constructor

Squeeze ...

Properties

<Squeeze>.Bulge_Amount Float default: 0.0 -- animatable

The magnitude of the bulging effect. Higher values effectively elongate the object and cause the ends to curve outward.

<Squeeze>.Bulge_Curviture Float default: 2.0 -- animatable

The degree of curvature on the bulging ends. You can use this to control whether the bulge is smooth or pointy.

<Squeeze>.Squeeze_Amount Float default: 0.0 -- animatable

The magnitude of the squeezing action. Values larger than zero tend to constrict the "waist" of the object, and values less than zero tend to bulge the waistline out, as if the object had been stepped on.

<Squeeze>.Squeeze_Curvature Float default: 2.0 -- animatable

The degree of curvature into the squeeze. Low values cause a sharp squeezing effect, while high values create a gradual, less pronounced squeeze.

<Squeeze>.Limit_Squeeze_Effects Integer default: 0

When on, limits the extent of the squeeze effect as defined by the Lower and Upper Limit settings.

0- Off

1- On

<Squeeze>.Squeeze_Lower_Limit Float default: -50.0 -- animatable

The limit of the squeeze effect in the positive direction along the Z axis.

<Squeeze>.Squeeze_Upper_Limit Float default: 50.0 -- animatable

The limit of the squeeze effect in the negative direction along the Z axis.

<Squeeze>.Bias Float default: 0.0 -- animatable, percentage

The relative amounts of bulge and squeeze while retaining a constant object volume.

<Squeeze>.Volume Float default: 100.0 -- animatable, percentage

Increases or decreases the effects of both Squeeze and Bulge in parallel.

<Squeeze>.center Point3 default: [0,0,0] -- animatable

At this sub-object level, you can translate and animate the center, altering the Squeeze gizmo’s shape, and thus the shape of the squeezed object.

<Squeeze>.gizmo SubAnim

At this sub-object level, you can transform and animate the gizmo like any other object, altering the effect of the Squeeze modifier. Translating the gizmo translates its center an equal distance. Rotating and scaling the gizmo takes place with respect to its center.

<Squeeze.Gizmo>.position Point3 default: [0,0,0] -- animatable

The position of the squeeze gizmo.

<Squeeze.Gizmo>.rotation Quat default: (quat 0 0 0 1) -- animatable

The rotation of the squeeze gizmo.

<Squeeze.Gizmo>.scale Point3 default: [1,1,1] -- animatable

The scale of the squeeze gizmo.

See also

Modifier Sub-Object Transform Properties

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Stretch : Modifier

Stretch - superclass: modifier; super-superclass:MAXWrapper - classID: #(65712, 12332321)

Value > MAXWrapper > Modifier > Stretch

Constructor

stretch ...

Properties

<Stretch>.Stretch Float default: 0.0 -- animatable

The base scale factor for all three axes. The scale factor derived from the Stretch value varies according to the sign of the value.

<Stretch>.Amplify Float default: 0.0 -- animatable

The scale factor applied to the minor axes. Amplify generates a multiplier using the same technique as stretch. The multiplier is then applied to the stretch value before the scale factor for the minor axes is calculated.

<Stretch>.axis Integer default: 2

Determines which of the object’s local axes is the Stretch Axis:

0- X

1- Y

2- Z

<Stretch>.limit Boolean default: false

When on, the stretch effect is limited by the from and to values.

<Stretch>.from Float default: 0.0 -- animatable

The boundary of the stretch effect along the negative Stretch Axis.

<Stretch>.to Float default: 0.0 -- animatable

The boundary of the stretch effect along the positive Stretch Axis.

<Stretch>.center Point3 default: [0,0,0] -- animatable

At this sub-object level, you can translate and animate the center, altering the Stretch gizmo’s shape, and thus the shape of the stretched object.

<Stretch>.gizmo SubAnim

At this sub-object level, you can transform and animate the gizmo like any other object, altering the effect of the Stretch modifier. Translating the gizmo translates its center an equal distance. Rotating and scaling the gizmo takes place with respect to its center.

<Stretch.Gizmo>.position Point3 default: [0,0,0] -- animatable

The position of the stretch gizmo.

<Stretch.Gizmo>.rotation Quat default: (quat 0 0 0 1) -- animatable

The rotation of the stretch gizmo.

<Stretch.Gizmo>.scale Point3 default: [1,1,1] -- animatable

The scale of the stretch gizmo.

See also

Modifier Sub-Object Transform Properties

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Substitute : Modifier

Substitute - superclass: modifier; super-superclass:MAXWrapper - classID: #(1982024088, 1345264630)

Value > MAXWrapper > Modifier > Substitute

Constructor

substitute ...

substituteMod ...

Properties

<Substitute>.DisplayInViewport Boolean default: true

<Substitute>.DisplayInRender Boolean default: true

<Substitute>.ObjectName String default: "" -- alias: SceneNodeName

<Substitute>.ObjectReference Node default: undefined -- alias: SelectFrom

<Substitute>.MoveCopyInstance Integer default: 2

<Substitute>.SubstituteType String default: "" -- alias: Substitute_Type

<Substitute>.RetainPosition Boolean default: false

<Substitute>.RetainLocalRotation Boolean default: true

<Substitute>.RetainLocalScale Boolean default: true

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Taper : Modifier

Taper - superclass: modifier; super-superclass:MAXWrapper - classID: #(32, 0)

Value > MAXWrapper > Modifier > Taper

Constructor

taper ...

Properties

<Taper>.amount Float default: 1.0 -- animatable

The extent to which the ends are scaled. Amount is a relative value with a maximum of 10.

<Taper>.curve Float default: 0.0 -- animatable, alias: curvature

Applies a curvature to the sides of the Taper gizmo, thus affecting the shape of the tapered object. Positive values produce an outward curve along the tapered sides, negative values an inward curve. At 0, the sides are unchanged.

<Taper>.primaryaxis Integer default: 2

The central axis or spine of the taper:

0- X

1- Y

2- Z

<Taper>.effectaxis Integer default: 2

The axis, or pair of axes, indicating the direction of the taper from the primary axis. The available choices are determined by the choice of primary axis. The effect axis can be either of the two remaining axes, or their combination. If the primary axis is X, the effect axis can be Y, Z, or YZ.

0- Z

1- Y

2- ZY

<Taper>.symmetry Boolean default: false -- animatable

When on, produces a symmetrical taper around the primary axis. A taper is always symmetrical around the effect axis.

<Taper>.limit Boolean default: false

Enables/disables upper and lower limits for the taper effect.

<Taper>.upperlimit Float default: 0.0 -- animatable, alias: Upper_Limit

The upper limit boundaries in world units from the taper center point, beyond which the taper no longer affects the geometry.

<Taper>.lowerlimit Float default: 0.0 -- animatable, alias: Lower_Limit

The lower limit boundaries in world units from the taper center point, beyond which the taper no longer affects the geometry.

<Taper>.center Point3 default: [0,0,0] -- animatable

At this sub-object level, you can translate and animate the center, altering the Taper gizmo’s shape, and thus the shape of the melted object

<Taper>.gizmo SubAnim

At this sub-object level, you can transform and animate the gizmo like any other object, altering the effect of the Taper modifier. Translating the gizmo translates its center an equal distance. Rotating and scaling the gizmo takes place with respect to its center.

<Taper.Gizmo>.position Point3 default: [0,0,0] -- animatable

The position of the taper gizmo.

<Taper.Gizmo>.rotation Quat default: (quat 0 0 0 1) -- animatable

The rotation of the taper gizmo.

<Taper.Gizmo>.scale Point3 default: [1,1,1] -- animatable

The scale of the taper gizmo.

See also

Modifier Sub-Object Transform Properties

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Twist : Modifier

Twist - superclass: modifier; super-superclass:MAXWrapper - classID: #(144, 0)

Value > MAXWrapper > Modifier > Twist

Constructor

twist ...

Properties

<Twist>.angle Float default: 0.0 -- animatable

The amount of twist around the vertical axis.

<Twist>.bias Integer default: 0 -- animatable

Causes the twist rotation to bunch up at either end of the object. When the parameter is negative, the object twists closer to the gizmo center. When the value is positive, the object twists more away from the gizmo center. When the parameter is 0, the twisting is uniform.

<Twist>.axis Integer default: 2

The axis along which the twist will occur. This is the local axis of the Twist gizmo.

0- X

1- Y

2- Z

<Twist>.limit Boolean default: false

When on, applies limit constraints to the Twist modifier.

<Twist>.upperlimit Float default: 0.0 -- animatable, alias: Upper_Limit

The upper limit for the twist effect.

<Twist>.lowerlimit Float default: 0.0 -- animatable, alias: Lower_Limit

The lower limit for the twist effect.

<Twist>.center Point3 default: [0,0,0] -- animatable

You can translate and animate the center at this sub-object level, altering the Twist gizmo’s shape, and thus the shape of the twisted object.

<Twist>.gizmo SubAnim

You can transform and animate the gizmo like any other object at this sub-object level, altering the effect of the Twist modifier. Translating the gizmo translates its center an equal distance. Rotating and scaling the gizmo takes place with respect to its center.

<Twist.Gizmo>.position Point3 default: [0,0,0] -- animatable

The position of the twist gizmo.

<Twist.Gizmo>.rotation Quat default: (quat 0 0 0 1) -- animatable

The rotation of the twist gizmo.

<Twist.Gizmo>.scale Point3 default: [1,1,1] -- animatable

The scale of the twist gizmo.

See also

Modifier Sub-Object Transform Properties

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Wave : Modifier

Wave - superclass: modifier; super-superclass:MAXWrapper - classID: #(71, 0)

Value > MAXWrapper > Modifier > VolumeSelect

Constructor

wave ...

Properties

<Wave>.amplitude1 Float default: 5.0 -- animatable, alias: Amplitude_1

This produces a sine wave along the gizmo’s Y-axis. Switching a value from positive to negative reverses the positions of peaks and troughs.

<Wave>.amplitude2 Float default: 5.0 -- animatable, alias: Amplitude_2

This produces a sine wave the gizmo’s X-axis. Switching a value from positive to negative reverses the positions of peaks and troughs.

<Wave>.wavelength Float default: 25.0 -- animatable, alias: Wave_Length

The distance in current units between the crests of both waves.

<Wave>.phase Float default: 0.0 -- animatable

Shifts the wave pattern over the object. Positive numbers move the pattern in one direction, while negative numbers move it in the other.

<Wave>.decay Float default: 0.0 -- animatable

Limits the effect of the wave generated from its origin. A decay value decreases the amplitude at increasing distance from the center. As this value increases, the wave is concentrated at the center and flattened until it disappears (completely decays).

<Wave>.center Point3 default: [0,0,0] -- animatable

At this sub-object level, you can translate and animate the center, altering the Wave gizmo’s shape, and thus the shape of the wavy object.

<Wave>.gizmo SubAnim

At this sub-object level, you can transform and animate the gizmo like any other object, altering the effect of the Wave modifier. Translating the gizmo translates its center an equal distance. Rotating and scaling the gizmo takes place with respect to its center.

<Wave.Gizmo>.position Point3 default: [0,0,0] -- animatable

The position of the wave gizmo.

<Wave.Gizmo>.rotation Quat default: (quat 0 0 0 1) -- animatable

The rotation of the wave gizmo.

<Wave.Gizmo>.scale Point3 default: [1,1,1] -- animatable

The scale of the wave gizmo.

See also

Modifier Sub-Object Transform Properties

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


XForm : Modifier

XForm - superclass: modifier; super-superclass:MAXWrapper - classID: #(622942244, 0)

Value > MAXWrapper > Modifier > XForm

Constructor

XForm ...

Properties

<XForm>.center Point3 default: [0,0,0] -- animatable

At this sub-object level, you can translate and animate the center, altering the Xform gizmo’s shape, and thus the shape of the object.

<XForm>.gizmo SubAnim

At this sub-object level, you can transform and animate the gizmo like any other object, altering the effect of the Xform modifier. Translating the gizmo translates its center an equal distance. Rotating and scaling the gizmo takes place with respect to its center.

<XForm.Gizmo>.position Point3 default: [0,0,0] -- animatable

The position of the wave gizmo.

<XForm.Gizmo>.rotation Quat default: (quat 0 0 0 1) -- animatable

The rotation of the wave gizmo.

<XForm.Gizmo>.scale Point3 default: [1,1,1] -- animatable

The scale of the wave gizmo.

See also

Modifier Sub-Object Transform Properties

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


CrossSection : Modifier

CrossSection - superclass: modifier; super-superclass:MAXWrapper - classID: #(321083012, 1573356846)

Value > MAXWrapper > Modifier > CrossSection

Constructor

crossSection ...

Properties

There are no additional properties for CrossSection.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


DeletePatch - superclass: modifier

DeletePatch : Modifier

DeletePatch - superclass: modifier; super-superclass:MAXWrapper - 0:0 - classID: #(2134166570, 0)

Value > MAXWrapper > Modifier > DeletePatch

Apply the Delete Patch modifier to delete the geometry specified at that sub-object level.

Properties

No properties exposed to MAXScript.


DeleteSplineModifier : Modifier

DeleteSplineModifier - superclass: modifier; super-superclass:MAXWrapper - classID: #(302984204, 0)

Value > MAXWrapper > Modifier > DeleteSplineModifier

Constructor

deleteSplineModifier ...

Properties

There are no additional properties for DeleteSplineModifier.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Edit_Patch : Modifier

Edit_Patch - superclass: modifier; super-superclass:MAXWrapper - classID: #(112, 0)

Value > MAXWrapper > Modifier > Edit_Patch

Constructor

edit_patch ...

Properties

There are no additional properties for Edit_Patch.

See the Editable Patch Modify Panel Command Modes and Operations section in Patch for information on invoking the various Edit_Patch operations.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Edit_Spline : Modifier

Edit_Spline - superclass: modifier; super-superclass:MAXWrapper - classID: #(96, 0)

Value > MAXWrapper > Modifier > Edit_Spline

Constructor

Edit_Spline ...

Properties

There are no additional properties for Edit_Spline.

See the Editable Spline Modify Panel Command Modes and Operations section in SplineShape for information on invoking the various Edit_Spline operations.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Fillet_Chamfer : Modifier

Fillet_Chamfer - superclass: modifier; super-superclass:MAXWrapper - classID: #(352533126, 280374377)

Value > MAXWrapper > Modifier > Fillet_Chamfer

Constructor

fillet_chamfer ...

Properties

There are no additional properties for Fillet_Chamfer.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Lathe : Modifier

Lathe - superclass: modifier; super-superclass:MAXWrapper - classID: #(176, 0)

Value > MAXWrapper > Modifier > Lathe

Constructor

lathe ...

Properties

<Lathe>.degrees Float default: 360.0 -- animatable, angle

Determines the number of degrees that the object is spun around the axis of revolution (0 to 360, default=360). You can set keyframes for Degrees to animate the circular growth of a lathed object. The Lathe axis auto-sizes itself to the height of the shape being lathed.

<Lathe>.weldCore Boolean default: false

When on, simplifies the mesh by welding together vertices that lie on the axis of revolution.

<Lathe>.flipNormals Boolean default: false

Depending on the direction of the vertices on your shape, and the direction of rotation, the lathed object might be inside out. Toggle this value to fix this.

<Lathe>.segs Integer default: 16 -- animatable, alias: segments

Determines how many interpolated segments are created in the surface between the start and endpoint.

<Lathe>.ca p Start Boolean default: false

Caps the start of the lathed object with Degrees set to less than 360 and a closed shape.

<Lathe>.capEnd Boolean default: false

Caps the end of the lathed object with Degrees set to less than 360 and a closed shape.

<Lathe>.capType Integer default: 0

Cap type:

0- Morph (Arranges cap faces in a predictable, repeatable pattern necessary for creating morph targets. Morph capping can generate long, thin faces that don’t render or deform as well as grid capping. Use morph capping primarily if you are lathing multiple morph targets.)

1- Grid (Arranges cap faces in a square grid trimmed at the shape boundaries. This method produces a surface of evenly sized faces that can easily be deformed by other modifiers.)

<Lathe>.output Integer default: 1

Output:

0- Patch (Produces an object that you can collapse to a patch object.)

1- Mesh (Produces an object that you can collapse to a mesh object.)

2- NURBS (Produces an object that can be collapsed to a NURBS surface.)

<Lathe>.mapCoords Boolean default: false

When on, applies mapping coordinates to the lathed object. When Degrees is less than 360, and Generate Mapping Coordinates is turned on, additional mapping coordinates are applied to the end caps, placing a 1 x 1 tile on each cap.

<Lathe>.matIDs  Boolean default: true

When on, the software assigns different material IDs to the sides and the caps of the lathed object. Specifically, the sides receive ID 3, and the caps (when Degrees is less than 360 and the lathed shape is closed) receive IDs 1 and 2.

<Lathe>.useShapeIDs Boolean default: false

When on, the software uses the material ID values assigned to segments in the object.

<Lathe>.smooth  Boolean default: true

When on, applies smoothing to the extruded shape.

<Lathe>.axis SubAnim

At this sub-object level, you can transform and animate the axis of revolution.

<Lathe.axis>.position Point3 default: [0,0,0] -- animatable

Position of the axis of revolution.

<Lathe.axis>.rota t ion Quat default: (quat -0.707107 0 0 0.707107) -- animatable

Rotation of the axis of revolution.

<Lathe.axis>.scale Point3 default: [1,1,1] -- animatable

Scale of the axis of revolution.

Interfaces:

Interface: realWorldMapSizeInterface

Properties:

.realWorldMapSize : boolean : Read|Write

Enables/disables the real-world map size option. Available in 3ds Max 8 and higher.

See also

Modifier Sub-Object Transform Properties

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Normalize_Spl - superclass: modifier

Normalize_Spl : modifier

Normalize_Spl - superclass: modifier; super-superclass:MAXWrapper - 1:0 - classID: #(474287708, 772671746)

Value > MAXWrapper > Modifier > Normalize_Spl

Constructor

normalize_spl ...

normalize_spline ...

Properties

<Normalize_Spl>.Length Float default: 20.0 -- float

Determines how many control points are added. Smaller values produce more control points; larger values produce fewer.

The positions of the original vertices are disregarded. Vertices are set to regular intervals once the Normalize Spline modifier is applied.

NOTES:

In versions prior 3ds Max 4, this class was called Normalize_Spline. It has been rewritten to use ParamBlock2 but has retained the same ClassID and properties. Both the old and the new constructor will create an instance of Normalize_Spl class in 3ds Max 4 and above. Loading old .MAX files with a Normalize_Spline modifier will create a Normalize_Spl modifier in the scene so handling is completely transparent to the user and will not break existing scripts. Testing the class of the modifier using classof against both the old and the new class name will return true.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Renderable_Spline : Modifier

Renderable_Spline - superclass: modifier; super-superclass:MAXWrapper - 11:0 - classID: #(-2122363625, -1949890742)

Value > MAXWrapper > Modifier > Renderable_Spline

This modifier has been introduced in Autodesk VIZ 2005 as RendSpline : Modifier and is now available in 3ds Max 7 and higher. It can be used to procedurally turn an incoming spline shape from the modifier stack into a renderable mesh. It is also used internally when linking DWG files.

Constructor

Renderable_Spline ...

RendSpline ...

Properties

<Renderable_Spline>.Renderable BooleanClass default: true -- boolean

Toggle the "Enable In Renderer" checkbox on and off. When set to true, a mesh will be generated based on the underlying spline. When false, no mesh will be generated

<Renderable_Spline>.displayRenderSettings BooleanClass default: true -- boolean

When on, displays the mesh generated by the render settings.

<Renderable_Spline>.useViewportSettings BooleanClass default: false -- boolean

When set to true, displays the mesh defined by the Viewport settings if .displayRenderSettings is set to true.

<Renderable_Spline>.mapcoords BooleanClass default: false -- boolean

When set to true, mapping coordinates will be generated procedurally. The U coordinate wraps once around the thickness of the spline; the V coordinate is mapped once along the length of the spline.

When set to false, no mapping coordinates will be generated.

<Renderable_Spline>.ViewportOrRender Integer default: 1 -- radiobtnIndex

Get/Set the "Viewport/Renderer" radio buttons.

0 - Viewport

1 - Renderer

Renderer

<Renderable_Spline>.SymmetricalOrRectangular Integer default: 0 -- radiobtnIndex

Get/Set the state of the Radial or Rectangular radio button for the renderer. Available in 3ds Max 8 and higher.

Possible values are:

0 - Radial

1 - Rectangular

Renderer - Radial Cross-Section

<Renderable_Spline>.thickness Float default: 1.0 -- animatable; float

Get/Set the thickness (diameter) of the radial cross-section in the renderer.

<Renderable_Spline>.sides Integer default: 12 -- animatable; integer

Get/Set the number of sides of the radial cross-section in the renderer.

<Renderable_Spline>.angle Float default: 0.0 -- animatable; float

Get/Set the rotational position of the cross-section in the renderer.

Renderer - Rectangular Cross-Section

<Renderable_Spline>.length Float default: 6.0 -- float

Get/Set the length of the rectangular cross-section in the renderer. Available in 3ds Max 8 and higher.

<Renderable_Spline>.width Float default: 2.0 -- float

Get/Set the width of the rectangular cross-section in the renderer. Available in 3ds Max 8 and higher.

<Renderable_Spline>.Angle2 Float default: 0.0 -- float; Angle_2

Get/Set the angle of the rectangular cross-section in the renderer. Available in 3ds Max 8 and higher.

<Renderable_Spline>.LockAspect BooleanClass default: false -- boolean; Lock_Aspect

Toggle the Aspect Lock on and off. Available in 3ds Max 8 and higher.

Viewport

<Renderable_Spline>.Viewport_SymmetricalOrRectangular Integer default: 0 -- radiobtnIndex

Get/Set the state of the Radial or Rectangular radio button for the viewport. Available in 3ds Max 8 and higher.

Possible values are:

0 - Radial

1 - Rectangular

Viewport - Radial Cross-Section

<Renderable_Spline>.Viewport_Thickness Float default: 1.0 -- float

Get/Set the thickness (diameter) of the radial cross-section in the viewport.

<Renderable_Spline>.Viewport_Sides Integer default: 12 -- integer

Get/Set the number of sides of the radial cross-section in the viewport.

<Renderable_Spline>.Viewport_Angle Float default: 0.0 -- float

Get/Set the rotational position of the cross-section in the viewport.

Viewport - Rectangular Cross-Section

<Renderable_Spline>.Viewport_Length Float default: 6.0 -- float

Get/Set the length of the rectangular cross-section in the viewport. Available in 3ds Max 8 and higher.

<Renderable_Spline>.Viewport_Width Float default: 2.0 -- float

Get/Set the width of the rectangular cross-section in the viewport. Available in 3ds Max 8 and higher.

<Renderable_Spline>.Viewport_Angle2 Float default: 0.0 -- float

Get/Set the angle of the rectangular cross-section in the viewport. Available in 3ds Max 8 and higher.

<Renderable_Spline>.Viewport_LockAspect BooleanClass default: false -- boolean; Viewport_Lock_Aspect

Toggle the Aspect Lock on and off. Available in 3ds Max 8 and higher.

Auto Smooth

<Renderable_Spline>.Autosmooth BooleanClass default: true -- boolean

Toggle Auto Smooth on and off.

<Renderable_Spline>.Threshold Float default: 30.0 -- angle

Get/Set the Auto Smooth Threshold value.

Interfaces:

Interface: realWorldMapSizeInterface

Properties:

.realWorldMapSize : boolean : Read|Write

Enables/disables the real-world map size option. Available in 3ds Max 8 and higher.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Surface : Modifier

surface - superclass: modifier; super-superclass:MAXWrapper - classID: #(321410692, 1573287214)

Value > MAXWrapper > Modifier > Surface

Constructor

surface ...

Properties

<surface>.threshold Float default: 1.0 -- animatable

The overall distance that is used to weld the vertices of the spline object. All vertices/vectors within the threshold of each other are treated as one.

<surface>.steps Integer default: 5 -- animatable

The number of steps used between each vertex. The higher the step count, the smoother the curve you will get between vertices.

NOTE:

The Flip Normals, Remove Interior Patches, and Use Only Selected Segs. properties are not accessible by MAXScript.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Trim_Extend : Modifier

Trim_Extend - superclass: modifier; super-superclass:MAXWrapper - classID: #(259284998, 966352378)

Value > MAXWrapper > Modifier > Trim_Extend

Constructor

trim_extend ...

Properties

There are no additional properties for Trim_Extend.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Projection : Modifier

Projection - superclass: modifier; super-superclass:MAXWrapper - 31:0 - classID: #(376188956, 435752009)

Value > MAXWrapper > Modifier > Projection

The Projection modifier lets yout project data such as mapping coordinates, vertex colors and Material IDs from one geometry object onto another. It is typically used in conjunction with Normal Mapping, but has a much larger number of possible applications.

NOTE:

This modifier is not available in Autodesk VIZ.

Constructor

Projection ...

Properties

Selection Rollout

<Projection>.ignoreBackfacing BooleanClass default: false -- boolean; Ignore_Backfacing

Get/Set the state of the "Ignore Backfacing" checkbox.

<Projection>.smoothGroup Integer default: 1 -- integer; Smoothing_Group

Get/Set the "Select SG" value. This is the smoothing group number (1-32) to select by.

<Projection>.materialID Integer default: 1 -- integer; Material_ID

Get/Set the "Select MatID" value. This is the material ID to select by.

<Projection>.clearSelection BooleanClass default: true -- boolean; Clear_Selection

Get/Set the state of the "Clear Selection" checkbox. When checked, the previous selection will be cleared.

Related Methods:

For related methods, see Projection Modifier - Selection Rollout Methods

Soft Selection Rollout

<Projection>.useSoftSelection BooleanClass default: false -- boolean; Use_Soft_Selection

Get/Set the state of the "Use Soft Selection" checkbox.

<Projection>.softselUseEdgeDistance BooleanClass default: false -- boolean; Use_Edge_Distance

Get/Set the state of the "Edge Distance" checkbox.

<Projection>.softselEdgeDist Integer default: 1 -- integer; Edge_Distance

Get/Set the "Edge Distance" value as integer.

<Projection>.softselAffectBackfacing BooleanClass default: true -- boolean; Affect_Backfacing

Get/Set the state of the "Affect Backfacing" checkbox.

<Projection>.softselFalloff Float default: 20.0 -- world units; Falloff

Get/Set the Soft Selection "Falloff" value.

<Projection>.softselPinch Float default: 0.0 -- float; Pinch

Get/Set the Soft Selection "Pinch" value.

<Projection>.softselBubble Float default: 0.0 -- float; Bubble

Get/Set the Soft Selection "Bubble" value.

Reference Geometry Rollout

<Projection>.geomNames ArrayParameter default: #() -- string array; Geometry_Selection_Names; Read-only

Contains geometry selection names. Read-only!

<Projection>.geomNodeIDs ArrayParameter default: #() -- int array; Node_ID; Read-only

Contains the geometry selection IDs. Read-only!

<Projection>.geomNodes ArrayParameter default: #() -- node array; Geometry_Nodes; Read-only

Contains the geometry selections nodes. Read-only!

<Projection>.IDs ArrayParameter default: #() -- int array; SO_IDs; Read-only

Contains the sub-object IDs. Read-only!

<Projection>.mapProportions ArrayParameter default: #() -- float array; Map_Proportions; Read-only

Contains an array of Map Proportions. Read-only!

<Projection>.projectionTypes ArrayParameter default: #() -- max object array; Projection_Types; Read-only

Contains an array of Projection Types. Read-only!

<Projection>.selLevels ArrayParameter default: #() -- int array; Selection_Levels; Read-only

Contains an array of Selection Levels. Read-only!

<Projection>.MapChannel Integer default: 1 -- integer; Map_Channel

<Projection>.geomNodeVisible ArrayParameter default: #() -- int array; Node_Visible

Contains an array of visibility flags. Available in 3ds Max 8 and higher.

<Projection>.displayToggleEnable BooleanClass default: false -- boolean

Controls the state of the Enable checkbox in the Display Toggle group of controls. Available in 3ds Max 8 and higher.

<Projection>.displayToggleMode Integer default: 1 -- integer

Available in 3ds Max 8 and higher.

Cage Rollout

<Projection>.displayCage BooleanClass default: true -- boolean; Display_Cage

Get/Set the state of the "Cage" checkbox. When true, the cage will be displayed.

<Projection>.displayCageShaded BooleanClass default: false -- boolean; Display_Cage_Shaded

Get/Set the state of the "Shaded" checkbox. When true, the cage will be shaded.

<Projection>.displayCageOffset BooleanClass default: false -- boolean; Display_Cage_Offset

Get/Set the state of the "Point to Point" checkbox. When true, the projection vectors along the offset will be displayed.

<Projection>.pushValue Float default: 0.0 -- world units; Push_Value

Get/Set the Push "Amount" value.

<Projection>.pushPercent Float default: 0.0 -- float; Push_Percentage

Get/Set the Push "Percent" value.

<Projection>.autoWrapTolerance Float default: 0.0 -- world units; Auto_Wrap_Tolerance

Get/Set the Auto-Wrap "Tolerance" value.

<Projection>.autoWrapAlwaysUpdate BooleanClass default: false -- boolean; Auto_Wrap_Always_Update

Get/Set the state of the Auto-Wrap "Always Update" checkbox.

Related Methods:

For related methods, see Projection Modifier - Cage Rollout Methods

Selection Check Rollout

<Projection>.selectionCheckType Integer default: 2 -- integer; Selection_Check_Type

Get/Set the selection of the Check radio buttons. Possible values are:

0 - Material ID

1 - Geometry

2 - Both (default)

<Projection>.selectionCheckSelFaces BooleanClass default: true -- boolean; Show_Selection_Check_Faces

Get/Set the state of the "Selected Faces" checkbox. When true, only selected faces will be checked.

Related Methods:

For related methods, see Projection Modifier - Selection Check Rollout Methods

Projection Rollout

No properties exposed.

For related methods, see Projection Modifier - Projection Rollout Methods

Projection interfaces:

Interface: projectionModOps

NOTE:

The projectionModOps interface is a Mixin interface exposed by the Projection modifier itself. Any interfaces of the modifier will be searched for the method name, thus all methods below are visible as methods exposed by the Projection modifier itself.

<Projection>.shrinkSelection()

and

<Projection>.projectionModOps.shrinkSelection()

are equivalent.

FOR EXAMPLE

--assuming a cylinder has been applied a projection modifier:

theProjMod = $Cylinder01.modifiers[#Projection] --get the modifier

theProjMod.projectionModOps.shrinkSelection() --shrink selection

theProjMod.growSelection() --grow selection - also works

Methods:

Selection Rollout

<void>shrinkSelection()

Shrinks the selection. Corresponds to pressing the "Shrink" button in the Selection rollout.

<void>growSelection()

Grows the selection. Corresponds to pressing the "Grow" button in the Selection rollout.

<void>selectBySG <integer>sg

Selects by Smoothing Group. Corresponds to pressing the "Select SG" button in the Selection rollout.

<void>selectByMtlID <integer>id

Selects by Material ID. Corresponds to pressing the "Select MatID" button in the Selection rollout.

Geometry Selection Rollout

<bool>isValidObject <node>node

Returns true if the node is a valid projection object.

<bool>addObjectNode <node>node

Adds the given node to the Geometry Selection list.

<void>deleteAll()

Deletes all objects. Corresponds to pressing the "Delete All" icon.

<integer>numObjects()

Returns the number of objects in the Geometry Selection list.

<node>getObjectNode <index>objIndex

Returns the node corresponding to the indexed object on the Geometry Selection list.

<string>getObjectName <index>objIndex

Returns the name of the indexed object on the Geometry Selection list.

<enum>getObjectSelLevel <index>objIndex

getObjectSelLevel enums: {#object|#vertex|#face|#element)

Returns the selection level of the indexed object on the Geometry Selection list.

<bool>getObjectSelFaces <node>node <index>objIndex <&bitArray>faces

faces is Out parameter

Returns the selected faces of the specified node and indexed object into the by-reference bitArray. The method itself returns true on success, false otherwise.

<integer>getObjectMtlIds <node>node <index>objIndex <&integer array>mtlIDs

mtlIDs is Out parameter

Returns the Material IDs of the specified node and indexed object into the by-reference Array of integers.

<void>deleteObjectNode <index>objIndex

Deletes the indexed object from the Geometry Selection list.

<integer>numGeomSels()

Returns the number of objects in the Geometry Selection list.

<string>getGeomSelName <index>selIndex

Returns the name of the indexed selection.

<enum>getGeomSelLevel <index>selIndex

getGeomSelLevel enums: {#object|#vertex|#face|#element)

Returns selection level of the the indexed selection.

<integer>numGeomSelNodes <index>selIndex

Returns the number of geometry selection nodes with the given selection index.

<node>getGeomSelNode <index>selIndex <index>nodeIndex

Returns the scene node corresponding to the indexed node and indexed selection.

<bool>getGeomSelFaces <node>node <index>selIndex <&bitArray>faces

faces is Out parameter

Returns the face selection of the given scene node and the indexed selection in the by-reference bitArray. The method itself returns true on success, false otherwise.

<integer>getGeomSelMtlIds <node>node <index>selIndex <&integer array>mtlIDs

mtlIDs is Out parameter

Returns the Material IDs of the given scene node and the indexed selection in the by-reference Array of Integers.

<float>getGeomSelMapProportion <index>selIndex

Returns the Map Proportion value of the indexed geometry selection.

<void>SetGeomSelMapProportion <index>selIndex <float>proportion

Sets the Map Proportion value of the indexed geometry selection to the supplied float value.

<void>deleteGeomSel <index>selIndex

Deletes the indexed geometry selection.

<void>deleteGeomSelNode <index>selIndex <index>nodeIndex

Deletes the indexed node from the indexed geometry selection .

<float>getGeomSelFaceArea <node>node <index>selIndex

Returns the face area of the indexed geometry selection of the given node.

<void>setGeomSelNodesVisibility <bool>visible

Sets the visibility of the current Geometry Selection node to the given boolean value. Corresponds to pressing the visibility icon in the Geometry Selection list.

<bool>getGeomSelNodesVisibility()

Returns the visibility of the current Geometry Selection node.

Cage Rollout

<void>autowrapCage()

Performs a Cage Auto-Wrap. Corresponds to pressing the "Update" button in the Auto-Wrap group of controls.

<void>resetCage()

Resets the Cage. Corresponds to pressing the "Reset" button in the Auto-Wrap group of controls.

<void>pushCage <float>amount

Pushes the cage by the given amount. Corresponds to chaning the Amount value in the Push group of controls.

<bool>importCage <node>importNode

Imports the cage from the specified node. Available in 3ds Max 2008 and higher.

<bool>exportCage <string>exportNodeName

Exports the cage as a new node with the given name. Available in 3ds Max 2008 and higher.

Selection Check Rollout

<integer>checkDuplicateMatIDs <node>node <&bitArray>dupFaces

dupFaces is Out parameter

Performs a check for duplicated Material IDs and returns a bitarray in the by-reference argument containing the offending faces. The method itself returns the number of offending faces as integer.

<integer>checkDuplicateSels <node>node <&bitArray>dupFaces

dupFaces is Out parameter

Performs a check for duplicated Selections and returns a bitarray in the by-reference argument containing the offending faces. The method itself returns the number of offending faces as integer.

Projection Rollout

<integer>numProjectionTypes()

Returns the number of projections currently on the Projection list.

<void>removeProjectionType <index>ptIndex

Removes the indexed Projection Type from the Projection list.

<void>projectProjectionType <index>ptIndex

Performs the projection using the the indexed Projection Type from the Projection list. Similar to pressing the "Project" button.

<void>projectAll()

Projects all.Corresponds to pressing the "Project All" button.

<integer>numRegisteredProjectionTypes()

Returns the number of available Projection types. Currently there is only one type implemented.

<maxObject>getProjectionType <index>ptIndex

Returns the indexed Projection object. Currently there is only one type implemented: Project_Mapping : ReferenceTarget

<void>addRegisteredProjectionType <index>rptIndex

Adds a new projection of the indexed type to the Projection list.

<void>getRegisteredProjectionTypeClassID <index>rptIndex <&integer array>classID

classID is Out parameter

Returns the classID of the indexed projection type into the by-reference variable.

<void>showAlignment()

Corresponds to pressing the "Show Alignment" button.

<void>clearAlignment()

Corresponds to pressing the "Clear" button.

Related Methods

The following scripted functions are available for easier Project Modifier access. They are implemented in the file ProjectionMod.ms

NOTE:

These functions are not available in Autodesk VIZ.

GetPModObjectNames <projectionMod>modifier

Returns an array of Geometry Selection names for the given Projection Modifier.

FindPMod <node>source

Returns the highest Projection modifier from the stack of the supplied node. Returns undefined if there is no Projection modifier applied.

AddPModObjects <array>node_list <boolean>createNew <boolean>deleteAll [objList:<array>]

Adds Projection modifier objects to the nodes in the array.

If createNew is true, a new modifier is created, otherwise the existing modifier is used.

If deleteOld is true, all previous objects will be deleted from the modifier's geometry selection.

If the optional objList: parameter is supplied, the Target objects will be added to the list, otherwise the Pick dialog will be displayed to pick Target objects manually.

Returns an array of Projection Modifiers corresponding to the node_list.

See also

Project_Mapping : ReferenceTarget

Project_Mapping_Holder : Modifier

NormalsMap : BakeElement

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Project_Mapping_Holder : Modifier

Project_Mapping_Holder : modifier {42a0115b,2a504ded}

Value > MAXWrapper > Modifier > Project_Mapping_Holder

The Project_Mapping_Holder modifier is used to hold the projected data generated by a Projection : Modifier assigned to a different object.

NOTES:

This modifier is not available in Autodesk VIZ.

Class instances not creatable by MAXScript

Properties

<Project_Mapping_Holder>.projector : max object

Get/Set the Projector Reference Target object. Currently, this is always a Project_Mapping : ReferenceTarget object.

See also

Project_Mapping : ReferenceTarget

Projection : Modifier

NormalsMap : BakeElement

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Project_Mapping : ReferenceTarget

Project_Mapping : ReferenceTarget {56bb7872,2d4c74ef}

Value > MAXWrapper > Modifier > Project_Mapping

The Project_MappingReferenceTarget is used as a "plug-in" for the Projection : Modifier . It implements the basic projection of mapping coordinates between geometry objects with dissimilar topology.

NOTES:

This modifier is not available in Autodesk VIZ.

Class instances not creatable by MAXScript

Properties

<Project_Mapping>.name : string

Get/Set the name of the Projection.

<Project_Mapping>.holderName (Projection_Holder_Name) : string

Get/Set the name of the corresponding Project_Mapping_Holder.

<Project_Mapping>.createNewHolder (Create_New_Holder) : boolean

Get/Set the state of the "Create New Holder" checkbox.

<Project_Mapping>.sameTopology (Same_Topology) : boolean

Get/Set the state of the "Same Topology" checkbox.

<Project_Mapping>.alwaysUpdate (Always_Update_Holder) : boolean

Get/Set the state of the "Always Update " checkbox.

<Project_Mapping>.sourceMapChannel (Source_Map_Channel) : integer

Get/Set the source map channel.

<Project_Mapping>.sameAsSource (Same_as_Source) : boolean

Get/Set the state of the "Same as Source" checkbox. When true, the .sourceMapChannel value will be used for both Source and Target.

<Project_Mapping>.targetMapChannel (Target_Map_Channel) : integer

Get/Set the target map channel.

<Project_Mapping>.projectMaterialIDs (Project_Material_IDs) : boolean

Get/Set the state of the "Project Material IDs" checkbox.

<Project_Mapping>.ignoreBackfacing (Ignore_Backfacing) : boolean

When set to true, backfaces will be ignored. Corresponds to the "Ignore Backfacing" checkbox in the "Projection Quality" group of controls. Default is false.

<Project_Mapping>.testSeams (Test_Seams) : boolean

When set to true, seams will be checked. Corresponds to the "Test Seams" checkbox in the "Projection Quality" group of controls. Default is true. Available in 3ds Max 2008 and higher.

<Project_Mapping>.checkEdgeRatios (Check_Edge_Ratios) : boolean

When set to true, edge ratios will be checked. Corresponds to the "Check Edge Ratios" checkbox in the "Projection Quality" group of controls. Default is false. Available in 3ds Max 2008 and higher.

<Project_Mapping>.edgeRatioThreshold (Edge_Ratio_Threshold) : float

Get/set the Edge Ratio Threshold. Corresponds to the "Check Edge Ratios>Threshold" spinner in the "Projection Quality" group of controls. Default is 0.1. Available in 3ds Max 2008 and higher.

<Project_Mapping>.weldUVs (Weld_UVs) : boolean

When set to true, UVs will be welded based on the threshold defined by .weldUVsThreshold. Corresponds to the "Weld UVs" checkbox in the "Projection Quality" group of controls. Default is true. Available in 3ds Max 2008 and higher.

<Project_Mapping>.weldUVsThreshold (Weld_UVs_Threshold) : float

Get/set the UV Welding Threshold. Corresponds to the "Weld UVs>Threshold" spinner in the "Projection Quality" group of controls. Default is 5.0. Available in 3ds Max 2008 and higher.

See also

Projection : Modifier

Project_Mapping_Holder : Modifier

NormalsMap : BakeElement

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Mesh_Select : Modifier

Mesh_Select - superclass: modifier; super-superclass:MAXWrapper - classID: #(1943601043, 0)

Value > MAXWrapper > Modifier > Mesh_Select

Constructor

mesh_select ...

MeshSelect ...

Properties

Mesh Select Parameters Rollout

.byVertex BooleanClass default:false alias: By_Vertex

Get/Set the state of the By Vertex option. When set to true, selecting a vertex in Face, Polygon or Element mode will select all faces, polygons or elements sharing that vertex.

.ignoreBackfacing BooleanClass default:false alias: Ignore_Backfacing

Get/Set the state of the Ignore Backgfaces option. When set to true, only faces with normals facing the viewer can be selected.

.ignoreVisibleEdges BooleanClass default:false alias: Ignore_Visible_Edges

Get/Set the state of the Ignore Visible Edges option. When set to true, selecting a face will also select all connected faces whose normals are within the specified planar threshold.

.planarThreshold Angle default: alias: Threshold

Get/Set the Planar Thresh. value. It specifies the angle threshold used by the Ignore Visible Edges option.

.materialID integer default:1 alias: Material_ID

Get/Set the Material ID value in the "Select by Material ID" group of controls.

Soft Selection Rollout

.useSoftSelection BooleanClass default:false alias: Use_Soft_Selection

Get/Set the state of the Use Soft Selection option. When set to true, the soft selection will be enabled.

.softselUseEdgeDistance BooleanClass default:false alias: Use_Soft_Selection

Get/Set the state of the Edge Distance option. When set to true, the Edge Distance value will be used.

.softselEdgeDist Integer default:1 -- animatable; alias: Edge_Distance

Get/Set the Edge Distance value. When .softselUseEdgeDistance is set to true, it specifies the number of edges to include in the soft selection.

.softselAffectBackfacing BooleanClass default:true alias: Affect_Backfacing

Get/Set the state of the Affect Backfacing option. When set to true, the Vertices belonging to back-facing faces will also be affected if within the Soft Selection Falloff range.

.softselFalloff world units default:20.0 -- animatable; alias: Falloff_type

Get/Set the Falloff value. It specifies the falloff range until the soft selection reaches an influence of 0.

.softselPinch Float default:0.0 -- animatable; alias: Pinch

Get/Set the Pinch value.

.softselBubble Float default:0.0 -- animatable; alias: Bubble

Get/Set the Bubble value.

See the getVertSelection(), getFaceSelection(), and getEdgeSelection() functions in Editable_Mesh for information about accessing the current selections in the Mesh_Select modifier.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


NCurve_Sel : Modifier

Value > MAXWrapper > Modifier > NCurve_Sel

Constructor

NCurve_Sel ...

Properties

There are no additional properties for NCurve_Sel.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


NSurf_Sel : Modifier

NSurf_Sel - superclass: modifier; super-superclass:MAXWrapper - classID: #(1711236954, 1344416944)

Value > MAXWrapper > Modifier > NSurf_Sel

Constructor

NSurf_Sel ...

Properties

There are no additional properties for NSurf_Sel.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Patch_Select - superclass: modifier

Patch_Select : Modifier

Patch_Select - superclass: modifier; super-superclass:MAXWrapper - 0:0 - classID: #(425273138, 54557306)

Value > MAXWrapper > Modifier > Patch_Select

The Patch Select modifier lets you pass a sub-object selection up the stack to subsequent modifiers. It provides a superset of the selection functions available in the Edit Patch modifier. You can select vertices, edges, patches and elements. You can also change the selection from sub-object level to object level.

See also

Patches

Patch : GeometryClass


Poly_Select - superclass: modifier

Poly_Select : Modifier

Poly_Select - superclass: modifier; super-superclass:MAXWrapper - 16:0 - classID: #(2095390827, 823661829)

Value > MAXWrapper > Modifier > Poly_Select

Constructors

Poly_Select ...

'PolyMesh Select' ...

Properties

<Poly_Select>.useSoftSelection Boolean default: false -- boolean; Use_Soft_Selection

Affects the action of Move, Rotate, and Scale functions within editable object or edit modifier, and the action of deformation modifiers applied to the object if they are operating on a sub-object selection. When on, 3ds Max applies a spline curve deformation to the unselected sub-objects surrounding the selection that you transform. To take effect, this check box must be on before moving the selection.

You can also use the keyboard shortcut CTRL+S to toggle Use Soft Selection (while the Plug-In Keyboard Shortcut Toggle button is turned on).

<Poly_Select>.softselUseEdgeDistance Boolean default: false -- boolean; Use_Edge_Distance

<Poly_Select>.softselEdgeDist Integer default: 1 -- animatable; integer; Edge_Distance

This spinner setting limits the region affected by the number of edges between the selection and the affected vertices. The affected region is measured in terms of "edge-distance" space, along the surface, rather than real space.

<Poly_Select>.softselAffectBackfacing Boolean default: false -- boolean; Affect_Backfacing

When on, deselected sub-objects whose normals (or, in the case of vertices and edges, the normals of faces to which they're attached) are facing in the opposite direction to the average normal of the selected sub-objects, are affected by the soft selection influence. Turn off Affect Backfacing when you want to pull faces of a thin object, such as a thin box, but don't want to affect faces on the other side of the object.

You can also use the keyboard shortcut CTRL+F to toggle Affect Backfacing (while the Plug-In Keyboard Shortcut Toggle button is turned on).

<Poly_Select>.softselFalloff Float default: 20.0 -- animatable; world units; Falloff

Distance in current units from the center to the edge of a sphere defining the affected region. Use higher falloff settings to achieve more gradual slopes, depending on the scale of your geometry. Default=20.

Note: At the Vertex sub-object level, the region specified by the Falloff setting is depicted graphically in the viewports as a vertex-color gradient from the Sub-selection color (normally red) to the Vertex Ticks color (normally blue). In addition, this gradient is updated in real time as you change the Falloff setting.

<Poly_Select>.softselPinch Float default: 0.0 -- animatable; float; Pinch

Raises and lowers the top point of the curve along the vertical axis. Sets the relative "pointedness" of the region. When negative, a crater is produced instead of a point. At a setting of 0, Pinch produces a smooth transition across this axis. Default=0.

<Poly_Select>.softselBubble Float default: 0.0 -- animatable; float; Bubble

Expands and contracts the curve along the vertical axis. Sets the relative "fullness" of the region. Limited by Pinch, which sets a fixed starting point for Bubble. A setting of 0 for Pinch and 1.0 for Bubble produces a maximum smooth bulge. Negative values for Bubble move the bottom of the curve below the surface, creating a "valley" around the base of the region. Default=0.

<Poly_Select>.byVertex Boolean default: false -- boolean; Select_By_Vertex

Get/set the state of the Select By Vertex option.

<Poly_Select>.ignoreBackfacing Boolean default: false -- boolean; Ignore_Backfacing_in_Selections

Get/set the state of the Ignore Backfaces option.

<Poly_Select>.materialID Integer default: 1 -- integer; Material_ID

Get/set the Material ID value.

The following properties have been added in 3ds Max 7:

<Poly_Select>.lockSoftSel BooleanClass default: false -- boolean; Lock_Soft_Selection

Get/set the Lock Soft Selection option. When set to true, the Soft Selection will not be recalculated dynamically based on the current "hard selection" and the procedural soft-selection parameters and will allow for painting custom soft-selection values using the brush.

<Poly_Select>.paintSelSize Float default: 20.0 -- float; Brush_Size

Get/set the size of the paint brush.

<Poly_Select>.paintSelStrength Float default: 1.0 -- float; Brush_Strength

Get/set the strength of the paint brush.

<Poly_Select>.paintSelValue Float default: 1.0 -- float; Selection_Value

Get/set the Selection Value to be applied by the brush.

The following properties have been added in 3ds Max 8:

<Poly_Select>.loopEdgeSel Integer default: 0 -- integer; Loop_Sel

Get/set the loop edge selection value.

<Poly_Select>.ringEdgeSel Integer default: 0 -- integer; Ring_Sel

Get/set the ring edge selection value.

See also

Edit_Poly : Modifier

Editable Poly - Topics Index


Select_By_Channel : Modifier

Select_By_Channel - superclass: modifier; super-superclass:MAXWrapper - 3:0 - classID: #(838452838, 62170504)

Value > MAXWrapper > Modifier > Select_By_Channel

The Select_By_Channel modifier allows selections based on mapping channels.

Constructors:

Select_By_Channel...

SelectByChannel ...

Properties:

<Select_By_Channel>.selectionType Integer default: 0 -- integer; Selection_Type

Get/Set the selection type. Possible values are

0 - Replace

1 - Add

2 - Subtract

<Select_By_Channel>.mapID Integer default: 0 -- integer; Map_ID

Get/Set the map ID.

<Select_By_Channel>.mapSubID Integer default: 0 -- integer; Map_Sub_ID

Get/Set the map subID.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


SplineSelect : Modifier

SplineSelect - superclass: modifier; super-superclass:MAXWrapper - classID: #(1304310066, 1631803321)

Value > MAXWrapper > Modifier > SplineSelect

Constructor

splineSelect ...

Properties

There are no additional properties for SplineSelect.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


VolumeSelect : Modifier

VolumeSelect - superclass: modifier; super-superclass:MAXWrapper - classID: #(1017361, 0)

Value > MAXWrapper > Modifier > VolumeSelect

Constructor

volumeselect ...

vol__Select ...

Properties

<Volumeselect>.level Integer default: 0

Volume Select provides three selection levels. Vertex and Face levels put the modifier stack in sub-object selection. You can make one sub-object selection for each Volume Select modifier. You can then toggle the one selection between Face and Vertex level to send either up the stack. Object (top) level lets you modify the whole object while retaining any sub-object selection.

0- Object

1- Vertex

2- Face

<Volumeselect>.type Integer default: 0

Lets you determine whether selected faces are wholly or partially within the defined volume:

0- Window (Selects only faces with all three vertices within the selection volume.)

1- Crossing (Selects faces with only one vertex within the selection volume.)

<Volumeselect>.invert Boolean default: false

When on, the entire selection set is reversed. Geometry that was unselected becomes selected, and vice versa.

<Volumeselect>.method Integer default: 0

Sets the volume select type:

0- Replace (Clears any selection passed up the stack to the Volume Select modifier, and then selects geometry within the volume.)

1- Add (Selects all geometry within the volume, adding to any previous selection.)

2- Subtract (Deselects all geometry within the volume.)

<Volumeselect>.volume Integer default: 0

These controls let you define the selection with a primitive, a mesh object, or by surface characteristics:

0- Box

1- Sphere

2- Cylinder

3- Mesh Object

4- Texture Map

5- Material Id

6- Smoothing Group

<Volumeselect>.Node Node default: undefined

The node which defines the selection space when .volume is set to 3 (mesh object).

<Volumeselect>.matID Integer default: 1 -- alias: Material_ID

When .volume is set to 5 (material ID), all faces or vertices using the material ID specified by this value are selected.

<Volumeselect>.smGroup Integer default: 1 -- alias: Smoothing_Group

When .volume is set to 6 (smoothing group), all faces or vertices using the smoothing group specified by this value are selected.

<Volumeselect>.texture TextureMap default: undefined -- alias: TextureMap

When .volume is set to 4 (texture map), this texture map will define the selection space.

<Volumeselect>.map Integer default: 0 -- alias: Map_Channel_Type

Specifies whether to apply the selection by mapping channel or vertex color channel:

0- Map Channel

1- Vertex Color Channel

<Volumeselect>.mapChannel Integer default: 1 -- alias: Map_Channel

Specifies which map channel to use when .map is set to 0.

<Volumeselect>.autofit Boolean default: true -- alias: Auto_fit

When on, automatically adjusts the gizmo size and shape to fit the object as you change the underlying topology.

<Volumeselect>.UseAffectRegion Boolean default: false -- alias: Use_affect_region

When on, a soft selection region is applied.

<Volumeselect>.falloff Float default: 20.0 -- animatable

Distance in current units from the center to the edge of a sphere defining the affected region. Use higher falloff settings to achieve more gradual slopes, depending on the scale of your geometry.

<Volumeselect>.pinch Float default: 0.0 -- animatable

Raises and lowers the top point of the curve along the vertical axis. Sets the relative "pointedness" of the region. When negative, a crater is produced instead of a point. At a setting of 0, Pinch produces a smooth transition across this axis.

<Volumeselect>.bubble Float default: 0.0 -- animatable

Expands and contracts the curve along the vertical axis. Sets the relative "fullness" of the region. Limited by Pinch, which sets a fixed starting point for Bubble. A setting of 0 for Pinch and 1.0 for Bubble produces a maximum smooth bulge. Negative values for Bubble move the bottom of the curve below the surface, creating a "valley" around the base of the region.

<Volumeselect>.center Point3 default: [0,0,0] -- animatable

You can translate and animate the center, which affects rotation or scaling of the Volume Select modifier’s gizmo.

<Volumeselect>.gizmo SubAnim

You can transform and animate the gizmo to change the selection. Translating the gizmo translates its center an equal distance. Rotating and scaling the gizmo takes place with respect to its center.

<Volumeselect.Gizmo>.position Point3 default: [0,0,0] -- animatable

The position of the volumeselect gizmo.

<Volumeselect.Gizmo>.rotation Quat default: (quat 0 0 0 1) -- animatable

The rotation of the volumeselect gizmo.

<Volumeselect.Gizmo>.scale Point3 default: [1,1,1] -- animatable

The scale of the volumeselect gizmo.

NOTE:

The center and gizmo properties are not present until the Volumeselect modifier has been applied to a node.

See also

Modifier Sub-Object Transform Properties

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


HSDS_Modifier - superclass: modifier

HSDS_Modifier : Modifier

HSDS_Modifier - superclass: modifier; super-superclass:MAXWrapper - 15:0 - classID: #(341062, 28997)

Value > MAXWrapper > Modifier > HSDS_Modifier

Constructor

HSDS_Modifier ...

HSDS ...

NOTE:

The HSDS_Modifier class is exposed as HSDS in 3ds Max 5 and higher. Both the old and the new constructor will work, so existing scripts should remain compatible. Testing the class using classof will return true for both HSDS_Modifier and HSDS. Also note that there are a couple of new properties in 3ds Max 5 and higher described at the bottom of the Properties list.

Properties

<HSDS_Modifier>.levelOfDetail Integer default: 0 -- integer; LOD

Shows the current level of the subdivision hierarchy. Automatically increments when you subdivide a sub-object selection. To edit at a different level of detail, change the setting to the desired level.

<HSDS_Modifier>.matId Integer default: 1 -- integer; Material_Id

Displays the material ID assigned to the current selection. Available only in Polygon and Element sub-object modes. If multiple sub-objects are selected and they don't share an ID, this field is blank.

<HSDS_Modifier>.ignoreBackface Boolean default: false -- boolean; Ignore_Backface

When on, you can select only those sub-objects whose normals are visible in the viewport. When off (the default), selection includes all sub-objects, regardless of the direction of their normals.

<HSDS_Modifier>.useSoftSel Boolean default: false -- boolean; Use_Soft_Selection

These controls let you set a gradual falloff of influence between selected and unselected vertices. See Soft Selection Rollout (Edit/Editable Mesh).

Vertex Interpolation rollout

Determines how selected vertices are treated during subdivision. Available only in Vertex sub-object mode.

For best results, use when moving control grid vertices at a level of detail lower than the highest in which the vertex resides.

<HSDS_Modifier>.useEdgeDist Boolean default: false -- boolean; Use_Edge_Distance

<HSDS_Modifier>.affectBackface Boolean default: false -- boolean; Affect_Backface

When on, deselected sub-objects whose normals (or, in the case of vertices and edges, the normals of faces to which they're attached) are facing in the opposite direction to the average normal of the selected sub-objects, are affected by the soft selection influence. Turn off Affect Backfacing when you want to pull faces of a thin object, such as a thin box, but don't want to affect faces on the other side of the object.

NOTE:

Affect Backfacing is not available when editing splines.

When using Edit/Editable Mesh, you can also use the keyboard shortcut CTRL+F to toggle Affect Backfacing (while the Keyboard Shortcut Override Toggle button is turned on).

<HSDS_Modifier>.edgeDistance Integer default: 1 -- integer; Edge_Dist

This spinner setting limits the region affected by the number of edges between the selection and the affected vertices. The affected region is measured in terms of "edge-distance" space, along the surface, rather than real space.

<HSDS_Modifier>.falloff Float default: 20.0 -- float

Distance in current units from the center to the edge of a sphere defining the affected region. Use higher falloff settings to achieve more gradual slopes, depending on the scale of your geometry. Default=20.

NOTE:

At the Vertex sub-object level, the region specified by the Falloff setting is depicted graphically in the viewports as a vertex-color gradient from the Sub-selection color (normally red) to the Vertex Ticks color (normally blue). In addition, this gradient is updated in real time as you change the Falloff setting.

<HSDS_Modifier>.pinch Float default: 0.0 -- float

Raises and lowers the top point of the curve along the vertical axis. Sets the relative "pointedness" of the region. When negative, a crater is produced instead of a point. At a setting of 0, Pinch produces a smooth transition across this axis. Default=0.

<HSDS_Modifier>.bubble Float default: 0.0 -- float

Expands and contracts the curve along the vertical axis. Sets the relative "fullness" of the region. Limited by Pinch, which sets a fixed starting point for Bubble. A setting of 0 for Pinch and 1.0 for Bubble produces a maximum smooth bulge. Negative values for Bubble move the bottom of the curve below the surface, creating a "valley" around the base of the region. Default=0.

<HSDS_Modifier>.vertexType Integer default: 0 -- integer; Vertex_Type]

Standard/Conic/Cusp/Corner:

Determines how closely mesh vertices follow the movement of control grid vertices. Standard provides the least amount of relative movement, while Cusp and Corner provide the most. Corner also more closely matches mesh edges to the control grid edges attached to the moved vertex. Default=Standard.

The following additional properties have been exposed in 3ds Max 5:

<HSDS_Modifier>.crease Float default: 0.0 -- float

Controls the Edge Crease value.

<HSDS_Modifier>.displayLevel Integer default: 0 -- integer; Display_Level

Returns the current display level

<HSDS_Modifier>.onlyCurrentLevel Boolean default: false -- boolean; Only_Current_Level

When set to true, only the current level will be displayed.

<HSDS_Modifier>.smoothResult Boolean default: true -- boolean; Smooth_Result

When set to true, the resulting mesh will be smoothed.

REMOVED:

The following property was available in 3ds Max 4 but is not available in 3ds Max 5 and higher:

<HSDS_Modifier>.shadedLattice Boolean default: false -- boolean; Shaded_Lattice

Displays only polygons at the current level of detail, with highlights, but without smoothing. Use this option to speed up the display when working with complex objects. Default=off.

HSDS_Modifier interfaces:

Interface: hsdsOps

Methods

<void>subdivide()

<void>deletePolygon()

<void>hide()

<void>showAll()

<void>createNamedSelection <string>name

<void>activateNamedSelection <string>name

<void>addDetail <float>length <float>angle

<void>removeDetail <float>length <float>angle

<void>setDetailPrecision <float>p

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


MeshSmooth : Modifier

meshsmooth - superclass: modifier; super-superclass:MAXWrapper - classID: #(50, 32670)

Value > MAXWrapper > Modifier > MeshSmooth

Constructor

meshSmooth ...

Properties

<MeshSmooth>.subdivMethod    Integer default: 2

Selects the Subdivision method to use:

0- Classic (Produces three- and four-sided facets.)

1- Quad Output (Produces only four-sided facets.)

2- NURMS (Produces Non-Uniform Rational MeshSmooth object.)

<MeshSmooth>.Apply_To_Whole_Mesh   Boolean default: true

When turned on, any sub-object selection passed up the stack is ignored and MeshSmooth is applied to the entire object. Note that the sub-object selection is still passed up the stack to any subsequent modifiers.

<MeshSmooth>.ignoreSel    Boolean default: true

When turned on, any sub-object selection passed up the stack is ignored and MeshSmooth is applied to the entire object.

<MeshSmooth>.oldMapping    Boolean default: false

Uses the algorithm from the previous release of the program to apply MeshSmooth to the mapping coordinates. This technique tends to distort the underlying mapping coordinates as it creates new faces and as texture coordinates shift.

<MeshSmooth>.iterations Integer default: 0 -- animatable

The number of iterations used to smooth the mesh. Each iteration generates new faces using the vertices created from the previous iteration.

<MeshSmooth>.smoothness    Float default: 1.0 -- animatable; alias: smoothness_filter

Determines how sharp a corner must be before faces are added to smooth it. Smoothness is calculated as the average angle of all edges connected to a vertex. A value of 0.0 prevents the creation of any faces. A value of 1.0 adds faces to all vertices even if they lie on a plane.

<MeshSmooth>.useRenderIterations Boolean default: false; alias: use_render_iterations

Turn on/off use of render iterations, for using a different number of iterations at render time. When off, the software will use the iterations value.

<MeshSmooth>.renderIterations   Integer default: 0 -- animatable; alias: render_iterations

Number of smoothing iterations to be applied to the object at render time.

<MeshSmooth>.useRenderSmoothness   Boolean default: false; alias: use_render_smoothness

Turn on/off use of render smoothness, for using a different smoothness value at render time. When off, the software will use the smoothness value.

<MeshSmooth>.renderSmoothness   Float default: 1.0 -- animatable; alias: render_smoothness

Lets you choose a different Smoothness value to be applied to the object at render time.

<MeshSmooth>.ignoreBackfacing   Boolean default: false

When on, selection of sub-objects selects only those sub-objects whose normals are visible in the viewport. When off (the default), selection includes all sub-objects, regardless of the direction of their normals.

<MeshSmooth>.controlLevel    Integer default: 0

Allows you to see the control mesh after one or more iterations and to edit sub-object points and edges at that level.

<MeshSmooth>.displayCage    Boolean default: false; alias: display_control_mesh

Displays a wireframe gizmo that shows what the control mesh looks like after it’s been converted to polygons (if applicable) and before the smoothing occurs.

<meshsmooth>.CageColor Point3 default: [1,0.588235,0] -- point3; Cage_Color

Displays a wireframe gizmo that shows what the control mesh looks like after it’s been converted to polygons (if applicable) and before the smoothing occurs.

<meshsmooth>.selectedCageColor Point3 default: [0.94902,0.85098,0] -- point3; Selected_Cagwe_Color

Displays a wireframe gizmo that shows what the control mesh looks like after it’s been converted to polygons (if applicable) and before the smoothing occurs.

<MeshSmooth>.useSoftSel    Boolean default: false

Affects the action of Move, Rotate, and Scale functions within editable object or edit modifier, and the action of deformation modifiers applied to the object if they are operating on a sub-object selection. When on, 3ds Max applies a spline curve deformation to the unselected sub-objects surrounding the selection that you transform.

<MeshSmooth>.useEdgeDist    Boolean default: false

Turn on/off use Edge Distance.

<MeshSmooth>.edgeDist     Integer default: 1

Limits the region affected by the number of edges between the selection and the affected vertices.

<MeshSmooth>.affectBackfacing   Boolean default: false

When on, deselected sub-objects whose normals (or, in the case of vertices and edges, the normals of faces to which they’re attached) are facing in the opposite direction to the average normal of the selected sub-objects, are affected by the soft selection influence.

<MeshSmooth>.falloff     Float default: 20.0

Distance in current units from the center to the edge of a sphere defining the affected region. Use higher falloff settings to achieve more gradual slopes, depending on the scale of your geometry.

<MeshSmooth>.pinch     Float default: 0.0

Raises and lowers the top point of the curve along the vertical axis. Sets the relative "pointedness" of the region. When negative, a crater is produced instead of a point. At a setting of 0, Pinch produces a smooth transition across this axis.

<MeshSmooth>.bubble     Float default: 0.0

Expands and contracts the curve along the vertical axis. Sets the relative "fullness" of the region. Limited by Pinch, which sets a fixed starting point for Bubble. A setting of 0 for Pinch and 1.0 for Bubble produces a maximum smooth bulge. Negative values for Bubble move the bottom of the curve below the surface, creating a "valley" around the base of the region.

<MeshSmooth>.strength Float default: 0.5 -- animatable

Sets the size of the added faces using a range from 0.0 to 1.0.

Values near 0.0 create small faces that are very thin and close to the original vertices and edges, values near 0.5 size faces evenly between edges, and values near 1.0 create large new faces and make the original faces very small.

<MeshSmooth>.Relax Float default: 0.0 -- animatable

Applies a positive relax effect to smooth all vertices.

<MeshSmooth>.limitSurface    Boolean default: false; alias: project_to_limit_surface

Places all points on the "limit surface" of the MeshSmooth result, which is the surface you’d get after an infinite number of iterations.

<MeshSmooth>.smoothResult    Boolean default: false; alias: smooth_output

Applies the same smoothing group to all faces.

<MeshSmooth>.sepByMats    Boolean default: false; alias: separate_by_materials

Prevents the creation of new faces for edges between faces that do not share Material IDs.

<MeshSmooth>.sepBySmGroups    Boolean default: false; alias: separate_by_smoothing_group

Prevents the creation of new faces at edges between faces that don’t share at least one smoothing group.

<MeshSmooth>.faceType     Integer default: 1

Select the type to operate on during input conversion:

0- Faces

1- Polygons

Operate On Faces treats every triangle as a face and smooths across all edges, even invisible edges. Operate On Polygons ignores invisible edges, treating polygons (like the quads making up a box or the cap on a cylinder) as a single face.

<MeshSmooth>.keepConvex    Boolean default: false; alias: keep_input_faces_convex

Keeps all input polygons convex. Selecting this option causes non-convex polygons to be handled as a minimum number of separate faces, each of which is convex.

<MeshSmooth>.update     Integer default: 0; alias: update_options

Set update options:

0- Always update

1- Update when rendering

2- Update Manually

<MeshSmooth>.reset     Integer default: 0

Select reset settings:

0- Reset all levels

1- Reset this level

NOTE:

The edge and vertex weight properties are not accessible to MAXScript.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


TurboSmooth : Modifier

TurboSmooth - superclass: modifier; super-superclass:MAXWrapper - 9:0 - classID: #(225606462, 1226647975)

Value > MAXWrapper > Modifier > TurboSmooth

Constructor

TurboSmooth ...

Properties

<TurboSmooth>.explicitNormals BooleanClass default: false -- boolean; Explicit_Normals

When set to true, the modifier will generate explicit normals and pass them up the stack. When set to false, the normals will be calculated on top of the modifier stack based on the face edges.

<TurboSmooth>.isolineDisplay BooleanClass default: false -- boolean; Isoline_Display

When set to true, only the edges corresponding to the source mesh's edges will be displayed. When set to false, all edges will be displayed.

<TurboSmooth>.iterations Integer default: 1 -- animatable; integer

Get/Set the viewport iterations. When useRenderIterations is set to false, this value will be used by the production renderer, too.

<TurboSmooth>.renderIterations Integer default: 0 -- animatable; integer; Render_Iterations

Get/Set the render iterations. When useRenderIterations is set to true, this value will be used by the production renderer.

<TurboSmooth>.sepByMats BooleanClass default: false -- boolean; Separate_By_Materials

When set to true, material borders will be taken into account and will be left unsmoothed (as edge creases).

<TurboSmooth>.sepBySmGroups BooleanClass default: false -- boolean; Separate_By_Smoothing_Group

When set to true, smoothing group borders will be taken into account and will be left unsmoothed (as edge creases).

<TurboSmooth>.smoothResult BooleanClass default: true -- boolean; Smooth_Output

When set to true, the newly created faces will be smoothed.

<TurboSmooth>.update Integer default: 0 -- integer; Update_Options

Get/Set the update type. Possible values are:

0 - Always

1 - When Rendering

2 - Manually

<TurboSmooth>.useRenderIterations BooleanClass default: false -- boolean; Use_Render_Iterations

When set to true, the renderIterations value will be used by the production renderer. When false, the iterations value will be used for both viewports and production renderer.

TurboSmooth Interfaces:

Interface: TurboSmooth

Methods

<void>ForceUpdate()

Forces an update of the modifier. Corresponds to pressing the Update button in the modifier's User Interface.

See also

Modifier Sub-Object Transform Properties

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Disp_Approx : Modifier

Disp_Approx - superclass: modifier; super-superclass:MAXWrapper - classID: #(2046172368, 1968250764)

Value > MAXWrapper > Modifier > Disp_Approx

Constructor

disp_Approx ...

Properties

There are no additional properties for Disp_Approx.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


MaterialByElement : Modifier

MaterialByElement - superclass: modifier; super-superclass:MAXWrapper - classID: #(1501386990, 233576367)

Value > MAXWrapper > Modifier > MaterialByElement

Constructor

materialByElement ...

Properties

<MaterialByElement>.method Integer default: 1

Set method:

0- Random Distribution (Assigns the materials at random to different elements in the object.)

1- List Frequency (Determines an approximate relative weight (percentage) for each of up to eight material ID’s)

<MaterialByElement>.Material_ID_Count Integer default: 2 -- animatable

The minimum number of material IDs to assign. Because material ID assignment is random, setting it to the number of materials in the multi/sub-object material or higher doesn’t guarantee that all materials get used.

<MaterialByElement>.Material_ID__1 Float default: 0.5 -- animatable

Approximate relative weight (percentage) for first material ID.

<MaterialByElement>.Material_ID__2 Float default: 0.5 -- animatable

Approximate relative weight (percentage) for second material ID.

<MaterialByElement>.Material_ID__3 Float default: 0.0 -- animatable

Approximate relative weight (percentage) for third material ID.

<MaterialByElement>.Material_ID__4 Float default: 0.0 -- animatable

Approximate relative weight (percentage) for fourth material ID.

<MaterialByElement>.Material_ID__5 Float default: 0.0 -- animatable

Approximate relative weight (percentage) for fifth material ID.

<MaterialByElement>.Material_ID__6 Float default: 0.0 -- animatable

Approximate relative weight (percentage) for sixth material ID.

<MaterialByElement>.Material_ID__7 Float default: 0.0 -- animatable

Approximate relative weight (percentage) for seventh material ID.

<MaterialByElement>.Material_ID__8 Float default: 0.0 -- animatable

Approximate relative weight (percentage) for eighth material ID.

<MaterialByElement>.Random_Seed Integer default: 12345

The seed value for the (pseudo-)randomization of material ID assignments.

NOTE:

Material_ID values are shown as percentages in the 3ds Max user interface, but stored as fractions.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


MaterialModifier : Modifier

Materialmodifier - superclass: modifier; super-superclass:MAXWrapper - classID: #(1017362, 0)

Value > MAXWrapper > Modifier > MaterialModifier

Constructor

materialModifier ...

Properties

<Materialmodifier>.materialid Integer default: 1 -- animatable, alias: Material_ID

The material ID to be assigned. If the input object is in face sub-selection, then the ID is only applied to selected faces, otherwise it is applied to the entire object. The ID number refers to one of the materials in a multi/sub-object material.

NOTE:

The default modifier name used when creating a MaterialModifier modifier is "material". If you then try to access the modifier as a property of the node it is applied to, a name conflict occurs with the material property of nodes. To prevent this conflict, you should specify a name during MaterialModifier creation.

FOR EXAMPLE

addModifier myObj (materialModifier materialID:5 name:"MaterialMod")

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


CameraMap : Modifier

CameraMap - superclass: modifier; super-superclass:MAXWrapper - classID: #(567176868, 2127836379)

Value > MAXWrapper > Modifier > CameraMap

Constructor

cameraMap ...

Properties

There are no additional properties for CameraMap.

CameraMap Interfaces:

Interface: interface

Properties

.cameraNode : node : Read|Write

Get/set the camera node.

.channel : integer : Read|Write

Get/set the mapping channel.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


MapScaler : Modifier

MapScaler - superclass: modifier; super-superclass:MAXWrapper - 5:0 - classID: #(229485990, 0)

Value > MAXWrapper > Modifier > MapScaler

This is an object-space version of the MapScalerSpacewarpModifier .

Constructors:

MapScaler ...

MapScalerOSM ...

Properties:

<MapScaler>.scale Float default: 100.0 -- animatable; float

The size of one repeat of the texture pattern. Size is measured in current scene units. Repeats occur across the object in the U direction.

<MapScaler>.uOffset Float default: 0.0 -- animatable; float

The U direction map offset.

<MapScaler>.vOffset Float default: 0.0 -- animatable; float

The V direction map offset.

<MapScaler>.wrap BooleanClass default: true -- boolean

When true, Map Scaler attempts to wrap the texture evenly around the object. This option requires more computing, but usually produces the most satisfactory results.

<MapScaler>.wrapUsingSmoothingGroups BooleanClass default: false -- boolean

Controls the state of Wrap using Smoothing Groups checkbox. When set to true and .wrap is also set to true, Map Scaler will attempt to wrap the texture around the object based on its smoothing groups. Available in 3ds Max 8 and higher.

<MapScaler>.channel Integer default: 1 -- integer

The map channel used.

See also

MapScalerSpacewarpModifier : SpacewarpModifier

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Unwrap_UVW : Modifier

Unwrap_UVW - superclass: modifier; super-superclass:MAXWrapper - classID: #(48180794, 1924812319)

Value > MAXWrapper > Modifier > Unwrap_UVW

Constructors

unwrap_UVW ...

UVWunwrap ...

Properties

<Unwrap_UVW>.baseMaterial UndefinedClass default: undefined -- material;

Get/Set the Base Material. Available in 3ds Max 8 and higher.

<Unwrap_UVW>.baseMaterial_list ArrayParameter default: #() -- material array

Get/Set the Base Material List. Available in 3ds Max 2008 and higher.

<Unwrap_UVW>.checkerMaterial Standardmaterial default: UnwrapChecker:Standard -- material; SubAnim

Get/Set the Checker Material. Available in 3ds Max 8 and higher.

<Unwrap_UVW>.texMapIDList ArrayParameter default: #() -- int array;

Get/Set the Texture Map ID list. Available in 3ds Max 8 and higher.

<Unwrap_UVW>.texMapList ArrayParameter default: #() -- texturemap array;

Get/Set the Texture Map list. Available in 3ds Max 8 and higher.

<Unwrap_UVW>.vertexSnap BooleanClass default: true -- boolean; Vertex_Snap

Enable/Disable the Vertex Snap. Available in 3ds Max 8 and higher.

<Unwrap_UVW>.edgeSnap BooleanClass default: true -- boolean; Edge_Snap

Enable/Disable the Edge Snap. Available in 3ds Max 8 and higher.

<Unwrap_UVW>.gridSnap BooleanClass default: true -- boolean; Grid_Snap

Enable/Disable the Grid Snap. Available in 3ds Max 8 and higher.

<Unwrap_UVW>.showImageAlpha BooleanClass default: false -- boolean; Show_Image_Alpha

Enable/Disable the Show Image Alpha option in the Unwrap Options dialog. Available in 3ds Max 8 and higher.

Apply To Whole Object

Methods:

<boolean><Unwrap_UVW>.getApplyToWholeObject()

Gets the state of the Apply to whole object mode. When true, the Unwrap will ignore the selection set being passed to it.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setApplyToWholeObject <boolean>whole

Sets the state of the Apply to whole object mode. When set to true, it will force Unwrap to ignore the selection set being passed to it. It has to be set before the modifier is applied to the object.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

Hide Polygons in Viewports

Methods:

<void><Unwrap_UVW>.hideSelectedPolygons()

Hides the selected mesh polygons in the viewports.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.unhideAllPolygons()

Unhides the mesh polygons in the viewports.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<point3><Unwrap_UVW>.getNormal <integer>faceIndex

Returns the normal of the indexed face.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

Modify Panel User Interface Controls

The following methods require that the Unwrap UVW modifier be the displayed modifier in the Modify panel, and that the Modify panel is active.

Unwrap_UVW UI - Selection Parameters Rollout

Roll over and click a control to jump to its description:

SubObject Mode

Methods:

<integer><Unwrap_UVW>.getTVSubObjectMode()

Returns the sub-object mode index.

1 - Vertex

2 - Edge

3 - Face

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setTVSubObjectMode <integer>mode

Sets the sub-object mode:

1 - Vertex

2 - Edge

3 - Face

Exposed via unwrap2 interface in 3ds Max 5 and higher.

Expand and Contact Geometry Vertex, Edge and Face Selection

Methods:

<void><Unwrap_UVW>.expandGeomVertexSelection()

Expands the Vertex Selection. Equivalent to pressing the [+] button while in Vertex Sub-Object mode.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.contractGeomVertexSelection()

Contracts the Vertex Selection. Equivalent to pressing the [-] button while in Vertex Sub-Object mode.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.expandGeomEdgeSelection()

Expands the Edge Selection. Equivalent to pressing the [+] button while in Edge Sub-Object mode.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.contractGeomEdgeSelection()

Contracts the Edge Selection. Equivalent to pressing the [-] button while in Edge Sub-Object mode.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.expandGeomFaceSelection()

Expands the face selection in the viewport.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.contractGeomFaceSelection()

Contracts the face selection in the viewport.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

Edge Ring and Edge Loop Selection

Methods:

<void><Unwrap_UVW>.geomEdgeLoopSelection()

Edge Loop Selection. Equivalent to pressing the Loop button in the Selection Parameters rollout.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.geomEdgeRingSelection()

Edge Ring Selection. Equivalent to pressing the Ring button in the Selection Parameters rollout.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

Get Geometry Verts and Edges Selection

Methods:

<bitArray><Unwrap_UVW>.getSelectedGeomVerts()

Returns a bitarray with bits set for the selected geometry vertices.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.setSelectedGeomVerts <bitArray>selection

Selects the geometry vertices using the bitarray argument.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<bitArray><Unwrap_UVW>.getSelectedGeomEdges()

Returns a bitarray with bits set for the selected geometry edges.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.setSelectedGeomEdges <bitArray>selection

Selects the geometry edges using the bitarray argument.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

Ignore Backface Culling

Methods:

<boolean><Unwrap_UVW>.getIgnoreBackFaceCull()

Returns the state of the Ignore Backfacing checkbox in the modifier’s UI.

The Unwrap UVW modifier must be the current modifier in the Modify panel, and the Modify panel must be active.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setIgnoreBackFaceCull <boolean>ignoreBackFaceCull

Sets the state of the Ignore Backfacing checkbox in the modifier’s UI.

The Unwrap UVW modifier must be the current modifier in the Modify panel, and the Modify panel must be active.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

Select By Element

Methods:

<boolean><Unwrap_UVW>.getGeomSelectElementMode()

Returns the state of the Select By Element checkbox in the modifier’s UI.

The Unwrap UVW modifier must be the current modifier in the Modify panel, and the Modify panel must be active.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setGeomSelectElementMode <boolean>mode

Sets the state of the Select By Element checkbox in the modifier’s UI.

The Unwrap UVW modifier must be the current modifier in the Modify panel, and the Modify panel must be active.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.selectElement()

Select the Element using the current selection.

The Unwrap UVW modifier must be the current modifier in the Modify panel, and the Modify panel must be active.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

Planar Threshold

Methods:

<boolean><Unwrap_UVW>.getGeomPlanarThresholdMode()

Returns true if the Planar Angle mode is checked, false otherwise. Corresponds to the checkbox in front of the Planar Angle value in the modifier’s UI.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setGeomPlanarThresholdMode <boolean>mode

Sets the Planar Angle mode state. Corresponds to the checkbox in front of the Planar Angle value in the modifier’s UI.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<float><Unwrap_UVW>.getGeomPlanarThreshold()

Returns the Planar Angle value.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setGeomPlanarThreshold <float>angle

Sets the Planar Angle value.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

Select By Material ID

Methods:

<void><Unwrap_UVW>.selectByMatID <integer>matID

Selects the faces with the specified Material ID. Corresponds to the Select MatID button in the modifier’s UI.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<integer><Unwrap_UVW>.getSelectMatID()

Returns the value in the Select MatID (Material ID) spinner in the Unwrap_UVW modifier's User Interface.

The Unwrap UVW modifier must be the current modifier in the Modify panel, and the Modify panel must be active.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<void><Unwrap_UVW>.setSelectMatID <integer>matID

Sets the value in the Select MatID (Material ID) spinner in the Unwrap_UVW modifier's User Interface.

The Unwrap UVW modifier must be the current modifier in the Modify panel, and the Modify panel must be active.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

Select By Smoothing Group

Methods:

<void><Unwrap_UVW>.selectBySG <integer>sg

Selects the faces with the specified Smoothing Group. Corresponds to the Select SG button in the modifier’s UI.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<integer><Unwrap_UVW>.getSG()

Returns the value in the Select SG (Smoothing Group) spinner in the Unwrap_UVW modifier's User Interface.

The Unwrap UVW modifier must be the current modifier in the Modify panel, and the Modify panel must be active.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<void><Unwrap_UVW>.setSG <integer>sgID

Sets the value in the Select SG (Smoothing Group) spinner in the Unwrap_UVW modifier's User Interface.

The Unwrap UVW modifier must be the current modifier in the Modify panel, and the Modify panel must be active.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

Unwrap_UVW UI - Parameters Rollout

Roll over and click a control to jump to its description:

Edit, Reset, Save and Load Buttons

Methods:

<void><Unwrap_UVW>.edit()

Presses the Edit button in the modifier’s UI

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.reset()

Presses the Reset UVWs button in the modifier’s UI

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.save()

Presses the Save... button in the modifier’s UI

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.load()

Presses the Load... button in the modifier’s UI

Exposed via unwrap interface in 3ds Max 4 and higher.

Map Channel Settings

Methods:

<void><Unwrap_UVW>.setMapChannel <integer>mapChannel

Sets the Map Channel field in the modifier’s UI

Exposed via unwrap interface in 3ds Max 4 and higher.

<integer><Unwrap_UVW>.getMapChannel()

Returns the mapping channel set for editing in the modifier’s UI.

Note that Channel 1 returns 0 instead. This is for backwards compatibility with older max versions where the only UVW Channel was 0 and the Vertex Color channel was 1.

0 - UVW Channel 1

1 - Vertex Colors Channel

2..99 - UVW Channels 2 .. 99

Exposed via unwrap interface in 3ds Max 4 and higher.

EXAMPLE

$.unwrap_uvw.unwrap.setMapChannel 10  --set map channel to 10

$.unwrap_uvw.unwrap.getMapChannel () --returns 10

$.unwrap_uvw.unwrap.setMapChannel 1 --set map channel to 1

$.unwrap_uvw.unwrap.getMapChannel () --although set to 1, returns 0

$.unwrap_uvw.unwrap.setMapChannel 2 --set map channel to 2

$.unwrap_uvw.unwrap.getMapChannel () --returns 2

<void><Unwrap_UVW>.setVC <boolean>vertexColor

When set to true, activates the Vertex Colors Channel radio button in the Channel Group. When set to false, enables Map Channels.

Exposed via unwrap interface in 3ds Max 4 and higher.

<boolean><Unwrap_UVW>.getVC()

Returns the state of the Vertex Color Channel radio button in the rollup.

Exposed via unwrap interface in 3ds Max 4 and higher.

Display Settings

Methods:

<boolean><Unwrap_UVW>.getPeltAlwaysShowSeams()

Returns the state of the Show Pelt Seam checkbox.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.setPeltAlwaysShowSeams <boolean>show

Sets the state of the Show Pelt Seam checkbox.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<boolean><Unwrap_UVW>.getViewportOpenEdges()

Returns the state of the Show Map Seam checkbox.

Exposed via unwrap4 interface in 3ds Max 7 and higher.

<void><Unwrap_UVW>.setViewportOpenEdges <boolean>show

Sets the state of the Show Map Seam checkbox.

Exposed via unwrap4 interface in 3ds Max 7 and higher.

<boolean><Unwrap_UVW>.getThickOpenEdges()

Returns the state of the Thick/Thin Seam Display radio button. If the result is true, the radio buttons are set to "Thick Seam Display". If false, they are set to "Thin Seam Display"

Exposed via unwrap4 interface in 3ds Max 7 and higher.

<void><Unwrap_UVW>.setThickOpenEdges <boolean>thick

Sets the state of the Thick/Thin Seam Display radio buttons. If the argument is true, the radio buttons are set to "Thick Seam Display". If false, they are set to "Thin Seam Display"

Exposed via unwrap4 interface in 3ds Max 7 and higher.

Prevent Reflattening Option

Methods:

<boolean><Unwrap_UVW>.getPreventFlattening()

Returns the state of the Prevent Reflattening checkbox in the modifier’s UI.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setPreventFlattening <boolean>preventFlattening

Set the state of the Prevent Reflattening checkbox in the modifier’s UI.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

Unwrap_UVW UI - Map Parameters Rollout

Roll over and click a control to jump to its description:

Projection Type and Quick Planar Map

Methods:

<void><Unwrap_UVW>.setProjectionType <integer>projection

Sets the Mapping Align radio buttons state:

1 - X

2 - Y

3 - Z

4 - Averaged Normals

Exposed via unwrap interface in 3ds Max 4 and higher.

<integer><Unwrap_UVW>.getProjectionType()

Returns the state of the Mapping Align radio buttons:

1 - X

2 - Y

3 - Z

4 - Averaged Normals

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.planarMap()

Presses the Quick Planar Map button. Creates planar mapping using the Mapping Align radio button settings.

Exposed via unwrap interface in 3ds Max 4 and higher.

Mapping Mode

Methods:

<void><Unwrap_UVW>.mappingMode <integer>mode

Sets the mapping mode to the specified mode.

Possible argument values are:

0 - None

1 - Planar

2 - Cylindrical

3 - Spherical

4 - Box

5 - Pelt

6 and higher - Free

Exposed via unwrap5 interface in 3ds Max 8 and higher.

FOR EXAMPLE

--make sure the modifier is displayed in the Modify panel:

max modify mode

modPanel.setCurrentObject $Teapot01.Unwrap_UVW

$Teapot01.Unwrap_UVW.mappingMode 5 --enter Pelt Mapping Mode

<boolean><Unwrap_UVW>.getPeltMapMode()

Returns true if in Pelt mapping mode, false otherwise.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

NOTE:

Implementation currently missing!

<void><Unwrap_UVW>.setPeltMapMode <boolean>mode

Pass true as argument to enable the Pelt mapping mode, or false to disable.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

NOTE:

Implementation currently missing!

Use <Unwrap_UVW>.mappingMode 5 instead.to enter Pelt Mapping Mode.

See example above.

Mapping Align Mode

Methods:

<void><Unwrap_UVW>.mappingAlign <integer>axis

Aligns the mapping gizmo to the specified axis.
Possible argument values are:

0 - Align X

1 - Align Y

2 - Align Z

3 - Best Align

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.mappingFit()

Fit the mapping gizmo to the selection. Corresponds to pressing the Fit button.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.mappingAlignToView()

Align the mapping gizmo to the view. Corresponds to pressing the Align To View button.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.mappingCenter()

Center the mapping gizmo to the selection. Corresponds to pressing the Center button.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.mappingReset()

Resets the Mapping gizmo. Corresponds to pressing the Reset button.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<boolean><Unwrap_UVW>.getNormalizeMap()

Returns the state of the Normalize Map checkbox.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.setNormalizeMap <boolean>normalize

Sets the state of the Normalize Map checkbox.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.setGizmoTM <matrix3>tm

Sets the transformation matrix of the mapping gizmo to the matrix3 argument.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<matrix3><Unwrap_UVW>.getGizmoTM()

Returns the transformation matrix of the mapping gizmo.
Exposed via unwrap5 interface in 3ds Max 8 and higher.

Edit and Convert Pelt Seams Buttons

Methods:

<boolean><Unwrap_UVW>.getPeltEditSeamsMode()

Returns true if in Edit Seams mode, false otherwise.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.setPeltEditSeamsMode <boolean>mode

Pass true as argument to enable the Edit Seams mode, or false to disable.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<boolean><Unwrap_UVW>.getPeltPointToPointSeamsMode()

Returns true if in Point To Point Seams mode, false otherwise.

<void><Unwrap_UVW>.setPeltPointToPointSeamsMode <boolean>mode

Pass true as argument to enable the Point To Point Seams mode, or false to disable.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.peltExpandSelectionToSeams()

Presses the Exp. Face Sel To Pelt Seams button in the Map Parameters rollout.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.peltSeamToEdgeSel <boolean>replace

Converts the Pelt Seams to Edge Selection. If the argument is passed as true, any existing edge selection will be replaced.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.peltEdgeSelToSeam <boolean>replace

Converts the Edge Selection to Pelt Seams. If the argument is passed as true, any existing Pelt Seams will be replaced.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<bitArray><Unwrap_UVW>.getPeltSelectedSeams()

Returns a bitarray of the selected seams for pelting.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.setPeltSelectedSeams <bitArray>selection

Sets the selected seams for pelting to the bitarray argument.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

Pelt Map Parameters Dialog

Methods:

<void><Unwrap_UVW>.peltDialog()

Opens the Pelt Map Parameters dialog.
Exposed via unwrap5 interface in 3ds Max 8 and higher.

Pelt Map Parameters Dialog - Stretcher group of controls

Methods:

<void><Unwrap_UVW>.peltDialogResetStretcher()

Presses the Reset Stretcher button in the Pelt Map Parameters dialog.
Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.peltDialogSnapToSeams()

Presses the Snap To Seams button in the Pelt Map Parameters dialog.
Exposed via unwrap5 interface in 3ds Max 8 and higher.

<boolean><Unwrap_UVW>.getPeltDialogStraightenMode()

Returns true if in Straighten mode, false otherwise.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.setPeltDialogStraightenMode <boolean>mode

Pass true as argument to enable the Straighten mode (check the Straighten Stretcher checkbutton in the Pelt map Parameters dialog), or false to disable.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.peltDialogStraighten <index>vert1 <index>vert2

Straigtens using the specified indexed vertices.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.peltDialogMirrorStretcher()

Presses the Mirror Stretcher button in the Pelt Map Parameters dialog.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<float><Unwrap_UVW>.getPeltDialogMirrorAxis()

Returns the Mirror Axis.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.setPeltDialogMirrorAxis <float>axis

Sets the Mirror Axis.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

Pelt Map Parameters Dialog - Springs group of controls

Methods:

<float><Unwrap_UVW>.getPeltDialogStretcherStrength()

Returns the Stretcher Pull Strength value.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.setPeltDialogStretcherStrength <float>strength

Sets the Stretcher Pull Strength value.
Exposed via unwrap5 interface in 3ds Max 8 and higher.

<float><Unwrap_UVW>.getPeltDialogStiffness()

Returns the Stretcher Stiffness value.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.setPeltDialogStiffness <float>stiffness

Sets the Stretcher Stiffness value.
Exposed via unwrap5 interface in 3ds Max 8 and higher.

<float><Unwrap_UVW>.getPeltDialogDampening()

Returns the Dampening value.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.setPeltDialogDampening <float>dampening

Sets the Dampening value.
Exposed via unwrap5 interface in 3ds Max 8 and higher.

<float><Unwrap_UVW>.getPeltDialogDecay()

Returns the Decay value.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.setPeltDialogDecay <float>decay

Sets the Decay value.

<boolean><Unwrap_UVW>.getPeltLockOpenEdges()

Returns the state of the Lock Open Edges checkbox.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.setPeltLockOpenEdges <boolean>lock

Sets the state of the Lock Open Edges checkbox.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

Pelt Map Parameters Dialog - Select group of controls

Methods:

<void><Unwrap_UVW>.peltDialogSelectStretcher()

Presses the Select Stretcher button in the Pelt Map Parameters dialog.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.peltDialogSelectPelt()

Presses the Select Pelt UVs button in the Pelt Map Parameters dialog.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

Pelt Map Parameters Dialog - Simulation group of controls

Methods:

<integer><Unwrap_UVW>.getPeltDialogFrames()

Returns the number of Iterations of the Pelt simulation in frames.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.setPeltDialogFrames <integer>frames

Sets the Iterations of the Pelt simulation in frames.
Exposed via unwrap5 interface in 3ds Max 8 and higher.

<integer><Unwrap_UVW>.getPeltDialogSamples()

Returns the number of Samples for the Pelt simulation.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.setPeltDialogSamples <integer>samples

Sets the number of Samples for the Pelt simulation.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.peltDialogRelaxLight()

Performs light relaxing. Corresponds to pressing the Relax(Light) button in the Pelt Map Parameters Dialog.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.peltDialogRelaxHeavy()

Performs heavy relaxing. Corresponds to pressing the Relax(Heavy) button in the Pelt Map Parameters Dialog.
Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.peltDialogRun()

Runs the Pelt simulation. Corresponds to pressing the Sumulate Pelt Pulling button.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

Edit UVWs Floater

Roll over and click a tool area or menu item to jump to its description:

Editor Update Methods

<void><Unwrap_UVW>.updateMenuBar()

Forces an update of the menu bar.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

Editor Lock Aspect

Methods:

<boolean>GetLockAspect()

Returns whether the edit window aspect ratio is locked or not. If the aspect ratio is not locked the image will try stretch to fit the aspect ratio of the window.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void>SetLockAspect <boolean>aspect

This sets the Lock Aspect Ratio value.

<boolean>aspect - Aspect lock toggle.

Exposed via unwrap interface in 3ds Max 4 and higher.

Editor Window Size

Methods:

<integer><Unwrap_UVW>.getWindowX()

Returns the Editor’s upper left corner’s X coordinate relatively to the upper left corner of the Windows desktop.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<integer><Unwrap_UVW>.getWindowY()

Returns the Editor’s upper left corner’s Y coordinate relatively to the upper left corner of the Windows desktop.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<integer><Unwrap_UVW>.getWindowW()

Returns the Editor’s window width in pixels.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<integer><Unwrap_UVW>.getWindowH()

Returns the Editor’s window height in pixels.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setWindowXOffset <integer>offset

Sets the horizontal window offset.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.setWindowYOffset <integer>offset

Sets the vertical window offset.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

Other Editor Window Methods

Methods:

<void><Unwrap_UVW>.fitSelectedElement()

Fits the selected element to the window.
Exposed via unwrap5 interface in 3ds Max 8 and higher.

<boolean>getShowSubObjectCounter()

Returns the state of the show sub-object counter option. When set to true, the count of the current sub-object selection will be displayed in the upper left corner of the Edit UVWs window.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.setShowSubObjectCounter <boolean>show

Sets the state of the show sub-object counter option. When set to true, the count of the current sub-object selection will be displayed in the upper left corner of the Edit UVWs window.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

Edit UVWs File Menu

Roll over and click a menu to jump to its description:

Edit UVWs Edit Menu

Roll over and click a menu to jump to its description:

Copy and Paste Selection

Methods:

<void><Unwrap_UVW>.copy()

Copy the current selection to the clipboard.

Copy/Paste allows you to copy a texture face/faces from one part or mesh to another or to a new mesh. These functions are extremely topology dependant so if you copy faces onto faces that have a different topology or face order, you will get unpredictable results.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.paste <boolean>rotate

Paste the copied values. Paste take one parameter which determines every time you paste to the same face whether the texture vertices are reoriented. For instance, if you paste a quad onto a another quad there are actually 4 possible ways you can paste it onto it. If rotate is on, every time you paste it will go onto the next variation.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.pasteInstance()

Paste Instance forces the faces that are being pasted to use the vertices that the copy buffer use (NOTE you cannot paste instance across objects). This is similar to doing a regular paste and then selecting all the overlapping vertices and doing a weld. There is no rotate option with this method. As noted above Pasting faces that have a different topology or face order will result in unpredictable results.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

Edit UVWs Select Menu

Roll over and click a menu to jump to its description:

Convert Selection

Methods:

<void><Unwrap_UVW>.vertToEdgeSelect()

Convert the Vertex Selection to Edge Selection.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.vertToFaceSelect()

Convert the Vertex Selection to Face Selection.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.edgeToVertSelect()

Convert the Edge Selection to Vertex Selection.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.edgeToFaceSelect()

Convert the Edge Selection to Face Selection.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.faceToVertSelect()

Convert the Face Selection to Vertex Selection.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.faceToEdgeSelect()

Convert the Face Selection to Edge Selection.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

Select Inverted and Overlapped Faces

<void><Unwrap_UVW>.selectInvertedFaces()

Selects the inverted faces.

Exposed via unwrap4 interface in 3ds Max 7 and higher.

<void><Unwrap_UVW>.selectOverlappedFaces()

Selects overlapped faces. Corresponds to the Select>Select Overlapped Faces option in the Edit UVWs dialog menu bar.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

Edit UVWs Tools Menu

Roll over and click a menu to jump to its description:

Break and Weld

Methods:

<void><Unwrap_UVW>.breakSelected()

Presses the Break Selected button in the edit floater.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.weld()

Presses the Target Weld button in the edit floater.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.weldSelected()

Presses the Weld Selected button in the edit floater.

Exposed via unwrap interface in 3ds Max 4 and higher.

<float><Unwrap_UVW>.getWeldThresold()

Returns the weld threshold

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.setWeldThreshold <float>height

Sets the threshold values for welds.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.detachEdgeVertices()

Detaches any vertex that is not completely surrounded by selected vertices. This is similar to a polygon selection detach except it uses the vertex selection to determine what is detached.

Exposed via unwrap interface in 3ds Max 4 and higher.

Stitch

Methods:

<void><Unwrap_UVW>.stitchVerts <boolean>align <float>bias

Stitch the selected vertices using the specified bias. If align is supplied as true, the vertices will be aligned.

Stitching allows you to find all the texture vertices that are assigned to the same geometric vertex and bring them all to the same spot and weld them together. This allows you take faces that are geometrically contiguous, but not texture face contiguous and line them up.

The parameters are:

align - if checked and the edges to be stitched are on separate clusters it will try to align the clusters and then stitch the vertices.

bias determines which direction the vertices will move (to or from the source). At a Bias of 0.0 the vertices will move to the source and 1.0 they will move to the target. Stitching will respect the soft selection.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.stitchVertsNoParams()

Execute the Stitch function using the current defaults.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.stitchVertsDialog()

Open the Stitch dialog.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

Pack

Methods:

<void><Unwrap_UVW>.pack <integer>method <float>spacing <boolean>normalize <boolean>rotate <boolean>fillholes

Lets you pack the texture vertex elements so that they fit within a square space.

method - 0 is a linear packing algorithm fast but not that efficient, 1 is a recursive algorithm slower but more efficient.

spacing - the gap between cluster in percentage of the edge distance of the square

normalize - determines whether the clusters will be fit to 0 to 1 space.

rotate - determines whether a cluster will be rotated so it takes up less space.

fillholes - determines whether smaller clusters will be put in the holes of the larger cluster.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.packNoParams()

Executes the Pack function using the current default settings.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.packDialog()

Opens the Pack UVs dialog.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

Sketch

Methods:

<void><Unwrap_UVW>.sketch <int array>indexList <point3 array>positionList

Sketches UV coordinates using the supplied index list array and the position list array.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.sketchNoParams()

Executes the Sketch function using the current defaults.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.sketchDialog()

Opens the Sketch Vertices dialog.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.sketchReverse()

Reverses the order of the select vertices that are being used for sketch when you use the Use Current Selection option.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

Relax

Methods:

<void><Unwrap_UVW>.relax <integer>iterations <float>strength <boolean>lockEdges <boolean>matchArea

Performs a Relax.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

NOTE:

In 3ds Max 6 and higher, you should consider using the Relax2() method and related methods described below.

<void>fitRelax <integer>iterations <float>strength

Performs a Fit Relax.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<float><Unwrap_UVW>.getRelaxAmount()

Returns the relax amount

Exposed via unwrap3 interface in 3ds Max 6 and higher.

<void><Unwrap_UVW>.setRelaxAmount <float>amount

Sets the relax amount to the spacified value

Exposed via unwrap3 interface in 3ds Max 6 and higher.

<integer><Unwrap_UVW>.getRelaxIteration()

Returns the relax iterations count

Exposed via unwrap3 interface in 3ds Max 6 and higher.

<void><Unwrap_UVW>.setRelaxIteration <integer>amount

Sets the relax iterations count to the specified value.

Exposed via unwrap3 interface in 3ds Max 6 and higher.

<boolean><Unwrap_UVW>.getRelaxBoundary()

Get the Relax Boundary Points status. When true, the boundary points will remain fixed. Returns the state of the "Keep Boundary Points Fixed" checkbox in the Relax dialog.

Exposed via unwrap3 interface in 3ds Max 6 and higher.

<void><Unwrap_UVW>.setRelaxBoundary <boolean>boundary

Set the Relax Boundary Points status. When set to true, the boundary points will remain fixed. Affects the state of the "Keep Boundary Points Fixed" checkbox in the Relax dialog.

Exposed via unwrap3 interface in 3ds Max 6 and higher.

<boolean><Unwrap_UVW>.getRelaxSaddle()

Get Relax saddle status. Returns the state of the "Save Outer Corners" checkbox in the Relax dialog.

Exposed via unwrap3 interface in 3ds Max 6 and higher.

<void><Unwrap_UVW>.setRelaxSaddle <boolean>saddle

Set Relax saddle status. Affects the state of the "Save Outer Corners" checkbox in the Relax dialog.

Exposed via unwrap3 interface in 3ds Max 6 and higher.

<void><Unwrap_UVW>.relax2()

Performs the Relax operation. Same as pressing the Apply button in the Relax Dialog.

Exposed via unwrap3 interface in 3ds Max 6 and higher.

<void><Unwrap_UVW>.relax2dialog()

Opens the Relax Dialog.

Exposed via unwrap3 interface in 3ds Max 6 and higher.

Relax By Spring

Methods:

<void><Unwrap_UVW>.relaxBySpringDialog()

Opens the Relax By Spring Tool dialog.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<integer><Unwrap_UVW>.getRelaxBySpringIteration()

Returns the Iteration value.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.setRelaxBySpringIteration <integer>iteration

Sets the Iteration value.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<float><Unwrap_UVW>.getRelaxBySpringStretch()

Returns the Stretch value.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.setRelaxBySpringStretch <float>stretch

Sets the Stretch value.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<boolean><Unwrap_UVW>.getRelaxBySpringUseOnlyVEdges()

Returns the state of the Lock Bondaries checkbox.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.setRelaxBySpringUseOnlyVEdges <boolean>useOnlyVEdges

Sets the state of the Lock Bondaries checkbox.
Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.relaxBySpring <integer>frames <float>stretch <boolean>useOnlyVEdges

Performs the relax by spring without opening the dialog. The arguments correspond to the Iterations value, Stretch value and Lock Boundaries checkbox state.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

Relax By Angle

Methods:

<void><Unwrap_UVW>.relaxByFaceAngle <integer>iterations <float>stretch <float>strength <boolean>lockBoundaries

Performs a Relax By Face Angles operation without opening the Relax Tool dialog. The arguments correspond to the Iterations value, Stretch value, Amount value and Keep Boundary Points Fixed checkbox state found in the Relax Tool>Relax By Face Angles mode.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.relaxByEdgeAngle <integer>iterations <float>stretch <float>strength <boolean>lockBoundaries

Performs a Relax By Edge Angles operation without opening the Relax Tool dialog. The arguments correspond to the Iterations value, Stretch value, Amount value and Keep Boundary Points Fixed checkbox state found in the Relax Tool>Relax By Edge Angles mode.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

Render UV Template Dialog

Properties

<Unwrap_UVW>.renderuv_width Integer default: 1024 -- integer; Width

Get/Set the Image Width. Available in 3ds Max 8 and higher.

<Unwrap_UVW>.renderuv_height Integer default: 1024 -- integer; Height

Get/Set the Image Height. Available in 3ds Max 8 and higher.

<Unwrap_UVW>.renderuv_force2sided BooleanClass default: true -- boolean; Force_2_Sided

Get/Set the state of the Force 2-Sided checkbox. Available in 3ds Max 8 and higher.

<Unwrap_UVW>.renderuv_fillColor Color default: (color 127.5 127.5 127.5) -- RGB color; Fill_Color

Get/Set the Fill Color value. Available in 3ds Max 8 and higher.

<Unwrap_UVW>.renderuv_fillalpha Float default: 1.0 -- float; Fill_Alpha

Get/Set the Fill Alpha value. Available in 3ds Max 8 and higher.

<Unwrap_UVW>.renderuv_fillmode Integer default: 0 -- integer; Fill_Mode

Get/Set the Fill Mode. Available in 3ds Max 8 and higher.

Possible values are:

0 - None

1 - Solid

2 - Normal

3 - Shaded

<Unwrap_UVW>.renderuv_showoverlap BooleanClass default: true -- boolean; Overlap

Get/Set the state of the Show Overlap checkbox. Available in 3ds Max 8 and higher.

<Unwrap_UVW>.renderuv_overlapColor Color default: (color 255 0 0) -- RGB color; Overlap_Color

Get/Set the Overlap color. Available in 3ds Max 8 and higher.

<Unwrap_UVW>.renderuv_edgeColor Color default: (color 255 255 255) -- RGB color; Edge_Color

Get/Set the Edge color. Available in 3ds Max 8 and higher.

<Unwrap_UVW>.renderuv_edgealpha Float default: 1.0 -- float; Edge_Alpha

Get/Set the Edge Alpha value. Available in 3ds Max 8 and higher.

<Unwrap_UVW>.renderuv_visibleedges BooleanClass default: true -- boolean; Visible_Edges

Get/Set the state of the Visible Edges checkbox. When true, visible edges will be rendered. Available in 3ds Max 8 and higher.

<Unwrap_UVW>.renderuv_invisibleedges BooleanClass default: false -- boolean; Invisible_Edges

Get/Set the state of the Invisible Edges checkbox. When true, invisible edges will be rendered. Available in 3ds Max 8 and higher.

<Unwrap_UVW>.renderuv_seamedges BooleanClass default: true -- boolean; Seam_Edges

Get/Set the state of the Seam Edges checkbox. When true, seam edges will be rendered. Available in 3ds Max 8 and higher.

<Unwrap_UVW>.renderuv_seamColor Color default: (color 0 255 0) -- RGB color; Seam_Color

Get/Set the color to render Seam Edges with. Available in 3ds Max 8 and higher.

<Unwrap_UVW>.renderuv_showframebuffer BooleanClass default: true -- boolean; Show_Frame_Buffer

When true, the frame buffer will be displayed. Available in 3ds Max 8 and higher.

Methods:

<void><Unwrap_UVW>.renderUVDialog()

Opens the Render UVW Template dialog.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.renderUV <filename>fileName

Renders a UVW Template to the specified file name using the current Render UVW Template dialog settings. See Unwrap_UVW Modifier Properties for available settings.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

Edit UVWs Mapping Menu

Roll over and click a menu to jump to its description:

Flatten Mapping

Methods:

<void><Unwrap_UVW>.flattenMap <float>angleThreshold <point3 array>normalList <float>spacing <boolean>normalize <integer>layOutType <boolean>rotateClusters <boolean>fillHoles

Flattens the UVW coordinates based on the supplied parameters without using the Flatten Mapping Dialog. This method exposes the same functionality directly to MAXScript and does not require the Edit UVWs Floater to be open.

Flatten Mapping uses an angle threshold to define the clusters and the clusters will always be contiguous faces. This type of mapping will generate mapping that does not overlap so it is useful for baking textures and lighting.

angleThreshold - when building contiguous faces this the angle used to determine whether a face is part of that cluster. The larger this angle the larger the cluster will be, but you will get more distortion since the texture faces area will start deviating from there geometric face area.

normalList specifies an array of normal vectors defining clusters. The clusters will still be built using the angle threshold, but the supplied vectors will be used as starting directions for building the clusters. To use no vectors, an empty array #() can be supplied. The default UI Flatten feature uses a list of 6 vectors aligned to the world axes: #([1,0,0], [-1,0,0], [0,1,0], [0,-1,0], [0,0,1], [0,0,-1])

spacing determines how much space there is between the clusters.

normalize will normalize the complete flattened mapping from 0 to 1

layOutType defines the layout type. 0 - sort clusters from bottom to top and from left to right. 1 - sort clusters from left to right and from bottom to top. Default type of the Flatten feature in the UI is 0.

rotateClusters will rotate the clusters so they take the least area.

fillHoles will fill clusters with holes. It places smaller cluster in the gaps of larger clusters.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.flattenMapDialog()

Open the Flatten dialog.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.flattenMapNoParams()

Execute the FlattenMap function using the current default.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<float><Unwrap_UVW>.getFlattenAngle()

Returns the current default Flatten Angle threshold .

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setFlattenAngle <float>angle

Sets the current default Flatten Angle threshold .

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<float><Unwrap_UVW>.getFlattenSpacing()

Returns the current default Flatten Spacing value.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setFlattenSpacing <float>spacing

Sets the current default Flatten Spacing value.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<boolean>getFlattenNormalize()

Returns the current default Flatten Normalize option state.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setFlattenNormalize <boolean>normalize

Sets the current default Flatten Normalize option state.

<boolean><Unwrap_UVW>.getFlattenRotate()

Returns the current default Flatten Rotate option state.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setFlattenRotate <boolean>rotate

Sets the current default Flatten Rotate option state.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<boolean><Unwrap_UVW>.getFlattenFillHoles()

Returns the current default Flatten Fill Holes option state.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setFlattenFillHoles <boolean>fillHoles

Sets the current default Flatten Fill Holes option state.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.flattenMapByMatID <float>angleThreshold <float>spacing <boolean>normalize <integer>layOutType <boolean>rotateClusters <boolean>fillHoles

Performs flatten by material ID.

Exposed via unwrap4 interface in 3ds Max 7 and higher.

<void><Unwrap_UVW>.setMax5Flatten <boolean>like5

Sets whether Flatten is using the 3ds Max 5 algorithm or the 3ds Max 7 algorithm.

Exposed via unwrap4 interface in 3ds Max 7 and higher.

Normal Map

Methods:

<void><Unwrap_UVW>.normalMap <point3 array>normalList <float>spacing <boolean>normalize <integer>layOutType <boolean>rotateClusters <boolean>alignWidth

Normal-map the UVW coordinates. For each normal vector in the normalList, a cluster of the faces with the corresponding normal vector will be created.

Normal Mapping is mapping based solely are the normals provided. This is identical to box mapping except you customize what normals you want to project on.

Parameters in the Normal Mapping dialog are:

spacing determines how much space there is between the clusters.

layOutType determines which of the 6 mapping types to use: Back/Front, Left/Right, Top/Bottom, Box Mapping No Top, Box Mapping, Diamond mapping

normalize will normalize the cluster from 0 to 1

rotateClusters will rotate the clusters so they take the least area.

alignWidth will sort the clusters by there width otherwise it will use their heights.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.normalMapNoParams()

Executes the NormalMap function using the current defaults.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.normalMapDialog()

Opens the NormalMap dialog.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

Unfold Map

Methods:

<void><Unwrap_UVW>.unfoldMap <integer>unfoldMethod

Unfold the UVW coordinates using the specified unfold method:

0 - Walk to farthest face

1 - Walk to closest face (default)

These determine the order of which face gets unfolded. Under almost all conditions you want to walk to the closest face.

This is an actual unfolding algorithm. It guarantees that all texture faces will have the exact same proportions as their geometric equivalents, but you may get faces that overlap. This type of mapping is only good on meshes that are very regular, like cylinders etc.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.unfoldMapNoParams()

Executes the unfoldMap function using the current defaults.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.unfoldMapDialog()

Opens the UnfoldMap dialog.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setSeedFace()

Takes the current selection and sets it as the seed face when unfolding. The seed face is where the unfolding starts from.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

Edit UVWs Options Menu

Roll over and click a menu to jump to its description:

Load/Save Default Settings

Methods:

<void><Unwrap_UVW>.saveCurrentSettingsAsDefault()

Saves the current settings as the defaults.

The method takes the current state of Unwrap UVW and save it to the plugcfg directory into a file called unwrapUVW.ini. The next time the user creates an Unwrap UVW modifier this ini file will be used to set the defaults.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.loadDefault()

Loads the unwrapUVW.ini defaults into the current Unwrap UVW modifier.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

Edit UVWs Display Menu

Roll over and click a menu to jump to its description:

Lock/Hide/Freeze

Methods:

<void><Unwrap_UVW>.lock()

Toggles the Lock Selected Vertices button in the edit floater.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.hide()

Presses the Hide button in the edit floater.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.unhide()

Presses the Unhide button in the edit floater.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.freeze()

Presses the Freeze button in the edit floater.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.unfreeze()

Presses the Unfreeze button in the edit floater.

Exposed via unwrap interface in 3ds Max 4 and higher.

Filter Selected

Methods:

<boolean><Unwrap_UVW>.getFilterSelected()

Returns the state of the "Filter Selected Faces" checkbutton in the Editor’s status bar.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setFilterSelected <boolean>filter

Sets the state of the "Filter Selected Faces" checkbutton in the Editor’s status bar.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.filterSelected()

Toggles the Filter Selected Faces button in the edit floater.

Exposed via unwrap interface in 3ds Max 4 and higher.

Hidden Edges Display

Methods:

<boolean><Unwrap_UVW>.getDisplayHiddenEdges()

Returns the state of the Display Hidden Edges option.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setDisplayHiddenEdges <boolean>displayHiddenEdges

Sets the state of the Display Hidden Edges option.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

Show Edge Distortion

Methods:

<boolean><Unwrap_UVW>.getShowEdgeDistortion()

Returns the state of the Show Edge Distortion option in the Display menu of the Edit UVWs dialog.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.setShowEdgeDistortion <boolean>show

Sets the state of the Show Edge Distortion option in the Display menu of the Edit UVWs dialog.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<float><Unwrap_UVW>.getEdgeDistortionScale()

Returns the Edge Distortion Scale value.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

<void><Unwrap_UVW>.setEdgeDistortionScale <float>scale

Sets the Edge Distortion Scale value.
Exposed via unwrap5 interface in 3ds Max 8 and higher.

Show Vertex Connections

Methods:

<boolean><Unwrap_UVW>.getShowVertexConnections()

Returns the state of the "Show Vertex Connections" option found in the Options menu item. Vertex Connections are TV vertices that share the same geometric vertices.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setShowVertexConnections <boolean>show

Sets the state of the "Show Vertex Connections" option found in the Options menu item. Vertex Connections are TV vertices that share the same geometric vertices.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.toggleVertexConnection()

Toggles the Vertex Connections display.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

Edit UVWs View Menu

Roll over and click a menu to jump to its description:

The same commands are exposed as icons. See Unwrap UVW Pan Zoom

Edit UVWs Main Toolbar

The main toolbar of the UVW Editor exposes the transform tools and the background map controls:

Move/Rotate/Scale

Methods:

<void><Unwrap_UVW>.move()

Presses the Move button in the edit floater.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.moveH()

Presses the Move Horizontal button in the edit floater.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.moveV()

Presses the Move Vertical button in the edit floater.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.rotate()

Presses the Rotate button in the edit floater.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.scale()

Presses the Scale button in the edit floater.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.scaleH()

Presses the Scale Horizontal button in the edit floater.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.scaleV()

Presses the Scale Vertical button in the edit floater.

Exposed via unwrap interface in 3ds Max 4 and higher.

<boolean><Unwrap_UVW>.getFreeFormMode()

Returns true if in FreeForm Mode, false otherwise.

In this mode, you select anywhere inside the bounding rectangle to move the selection. You select the corners to scale the selection, and select the edge centers to rotate the selection. You can also move the center cross which is your rotation pivot point.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setFreeFormMode <boolean>freeFormMode

Enable / Disable FreeForm Mode.

In this mode, you select anywhere inside the bounding rectangle to move the selection. You select the corners to scale the selection, and select the edge centers to rotate the selection. You can also move the center cross which is your rotation pivot point.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.mirrorH()

Presses the Mirror Horizontal button in the edit floater.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.mirrorV()

Presses the Mirror Vertical button in the edit floater.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.flipHorizontal()

This presses the Flip Horizontal button in the edit floater dialog.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.flipVertical()

This presses the Flip Vertical button in the edit floater dialog.

Exposed via unwrap interface in 3ds Max 4 and higher.

UV Space Flyout

Methods:

<void><Unwrap_UVW>.s etUVSpace <integer>UVSpace

Sets the UV Space fly out in the edit floater, where UVSpace defines the space that you want to view the texture vertices in:

1 - UV

2 - VW

3 - UW

Exposed via unwrap interface in 3ds Max 4 and higher.

<integer><Unwrap_UVW>.GetUVSpace()

Returns the state of the UV Space fly out in the edit floater:

1 - UV

2 - VW

3 - UW

Exposed via unwrap interface in 3ds Max 4 and higher.

Texture Map Display

Methods:

<void><Unwrap_UVW>.updateMap()

Presses the Update Map button in the edit floater.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.displayMap <boolean>displayMap

Toggles the Display Map button in the edit floater.

Exposed via unwrap interface in 3ds Max 4 and higher.

<boolean><Unwrap_UVW>.isMapDisplayed()

Returns the state of the Display Map button.

Exposed via unwrap interface in 3ds Max 4 and higher.

<boolean><Unwrap_UVW>.getShowMap()

Returns the Show Map button state.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setShowMap <boolean>showMap

Sets the Show Map button state. Same functionality as .displayMap() method.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<integer><Unwrap_UVW>.getCurrentMap()

Returns the index into the map drop down list of the current map in the view of the edit floater.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.SetCurrentMap <integer>map

Changes the currently displayed map to the index provided, where map is the index of the map in the drop down list that you want to display.

Exposed via unwrap interface in 3ds Max 4 and higher.

<integer><Unwrap_UVW>.numberMaps()

Returns the number of maps in the map drop down list.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.addMap <texturemap>map

Adds the supplied texture map to the Maps drop-down list of the Unwrap_UVW Editor.

Exposed via unwrap4 interface in 3ds Max 7 and higher.

Auto-Background

<boolean><Unwrap_UVW>.getAutoBackground()

Returns the AutoBackground option’s state.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setAutoBackground <boolean>enable

Sets the AutoBackground option’s state.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.SetAutoBackGround <boolean>autoBackground

There is a new auto background option which, when set to True, will tie the current background to the current Mat. Filter ID. When you change the Mat. Filter ID, the background will automatically change to a map that uses that material id.

Exposed via unwrap3 interface in 3ds Max 6 and higher.

<boolean><Unwrap_UVW>.GetAutoBackGround()

Returns the state of the Auto Background option (see above)

Exposed via unwrap3 interface in 3ds Max 6 and higher.

Edit UVWs Bottom Toolbar

Methods:

<boolean><Unwrap_UVW>.getRelativeTypeIn()

Returns true when the UVW coordinates Type-In spinners are set to Relative mode, false when in Absolute mode.

Exposed via unwrap4 interface in 3ds Max 7 and higher.

<void><Unwrap_UVW>.setRelativeTypeIn <boolean>relative

When the parameter is true, sets the UVW coordinates Type-In spinners to Relative mode. When the supplied parameter is false, sets the Type-In to Absolute mode.

Exposed via unwrap4 interface in 3ds Max 7 and higher.

Lock State

Methods:

<boolean><Unwrap_UVW>.getLock()

Returns the state of the selection Lock.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setLock <boolean>lock

Sets the state of the selection Lock.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

Material ID

Methods:

<integer><Unwrap_UVW>.getMatID()

Returns the current material id index filter.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.setMatID <integer>matid

Sets the material drop list to the index supplied.

Exposed via unwrap interface in 3ds Max 4 and higher.

<integer><Unwrap_UVW>.numberMatIDs()

Returns the number of material ids in the material id filter drop down.

Exposed via unwrap interface in 3ds Max 4 and higher.

Pan and Zoom

Methods:

<void><Unwrap_UVW>.pan()

Presses the Pan button in the edit floater.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.zoom()

Presses the Zoom button in the edit floater.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.zoomRegion()

Presses the Zoom Region button in the edit floater.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.fit()

Presses the Fit button in the edit floater.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.fitSelected()

Presses the Fit Selected button in the edit floater.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.ZoomToGizmo <boolean>all

This zooms the selected or all the viewports to zoom to the current planar map gizmo.

<boolean>all - Determines whether the active or all the viewports get zoomed.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.UpdateView()

This forces the viewport and dialog to update.

Exposed via unwrap interface in 3ds Max 4 and higher.

Snap

Methods:

<boolean><Unwrap_UVW>.getSnap()

Returns the state of the "Pixel Snap" checkbutton in the Editor’s status bar when the flyout is set to Pixel Snap. Always returns false when Grid Snap is set in the flyout.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setSnap <boolean>snap

Sets the state of the "Pixel Snap" checkbutton in the Editor’s status bar. Sets the flyout to Pixel Snap if necessary.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.snap()

Presses the Snap button in the edit floater.

Exposed via unwrap interface in 3ds Max 4 and higher.

<boolean><Unwrap_UVW>.getMidPixelSnap()

Returns a boolean value which indicated whether the mid pixels snap is used, if it is false the snap is set to the bottom right corner of the pixel, else it snaps to the center of the pixel.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.setMidPixelSnape <boolean>snap

Sets whether mid pixels snap is used. When false, the snap is set to the bottom right corner of the pixel. When true, it snaps to the center of the pixel.

Exposed via unwrap interface in 3ds Max 4 and higher.

Edit UVWs Bottom Tools Panel

Soft-Selection

Methods:

<boolean><Unwrap_UVW>.getEnableSoftSelection()

Returns the state of the Soft Selection On checkbox.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setEnableSoftSelection <boolean>enable

Sets the state of the Soft Selection On checkbox.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<boolean><Unwrap_UVW>.getLimitSoftSel()

Returns the state of the Edge Distance checkbox in the Soft Selection group.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setLimitSoftSel <boolean>limit

When true is supplied as limit, the Edge Distance will be used.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<integer><Unwrap_UVW>.getLimitSoftSelRange()

Returns the Edge Distance value set in the Soft Selection group.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setLimitSoftSelRange <integer>range

Sets the Edge Distance value used to limit the Soft Selection.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setFalloffType <integer>falloff

Sets the falloff type in the edit floater, where falloff defines the falloff type:

1 - Smooth falloff

2 - Linear falloff

3 - Slow Out falloff

4 - Fast Out falloff

Exposed via unwrap interface in 3ds Max 4 and higher.

<integer><Unwrap_UVW>.getFalloffType()

Returns the falloff type in the edit floater:

1 - Smooth falloff

2 - Linear falloff

3 - Slow Out falloff

4 - Fast Out falloff

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.setFalloffSpace <integer>space

Sets the Falloff Space.

Possible values are:

1 - XY (Local space of the object vertices.)

2 - UV (UVW space of the map vertices.)

Exposed via unwrap interface in 3ds Max 4 and higher.

<integer><Unwrap_UVW>.getFalloffSpace()

Returns the Falloff space. See previous method for possible values.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.setFalloffDist <integer>distance

Sets the Falloff distance value.

Exposed via unwrap interface in 3ds Max 4 and higher.

<float><Unwrap_UVW>.getFalloffDist()

Returns the Falloff distance value.

Exposed via unwrap interface in 3ds Max 4 and higher.

Selection Modes

Methods:

<void><Unwrap_UVW>.expandSelection()

Presses the Expand Selection [+] button.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.contractSelection()

Presses the Contract Selection [-] button.

Exposed via unwrap interface in 3ds Max 4 and higher.

<boolean><Unwrap_UVW>.getTVElementMode()

Returns the state of the Select Element checkbox in the Selection Modes group of the Editor’s panel.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setTVElementMode <boolean>mode

Sets the state of the Select Element checkbox in the Selection Modes group of the Editor’s panel.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.options()

Presses the Options... button in the edit floater.

Exposed via unwrap interface in 3ds Max 4 and higher.

Paint Selection

Methods:

<boolean><Unwrap_UVW>.getPaintSelectMode()

Returns the PaintSelect Mode.

When set to true, the tiled images are blended to the background color or black

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setPaintSelectMode <boolean>paint

Sets the PaintSelect Mode.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<integer><Unwrap_UVW>.getPaintSelectSize()

Returns the size of the paint select brush. Will be clamped between 1 and 15.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setPaintSelectSize <integer>size

Sets the size of the PaintSelect brush. Will be clamped between 1 and 15.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.paintSelectIncSize()

Increments the PaintSelect brush size by 1.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.paintSelectDecSize()

Decrements the PaintSelect brush size by 1.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

Bitmap Options

Methods:

<integer><Unwrap_UVW>.getRenderWidth()

Returns the width of the bitmap used to render 2d/3d textures to.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.setRenderWidth <integer>width

Sets the width in pixels of the bitmap used to render to for display.

Exposed via unwrap interface in 3ds Max 4 and higher.

<integer><Unwrap_UVW>.getRenderHeight()

Returns the height of the bitmap used to render 2d/3d textures to.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.setRenderHeight <integer>height

Sets the height in pixels of the bitmap used to render to the display.

Exposed via unwrap interface in 3ds Max 4 and higher.

<boolean><Unwrap_UVW>.getUseBitmapRes()

Returns the state of the Use Bitmap Resolution as a boolean value. If false, the bitmaps are rendered using the RenderWidth/Height values.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.setUseBitmapRes <boolean>useRes

Set to true to use the bitmap resolution, false to use the render width and height.

Exposed via unwrap interface in 3ds Max 4 and higher.

Viewport Options

Methods:

<boolean><Unwrap_UVW>.getConstantUpdate()

Returns the state of Constant Update as a boolean value. When true, viewport is updated on every move, otherwise it is just updated on mouse up.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.setConstantUpdate <boolean>update

Sets the state of the Constant Update value. When true, the viewport is updated on every move, otherwise it is just updated on mouse up.

Exposed via unwrap interface in 3ds Max 4 and higher.

<boolean><Unwrap_UVW>.getShowSelectedVertices()

Returns a boolean value which indicates whether the selected texture vertices are also displayed in the viewports.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.setShowSelectedVertices <boolean>show

Sets whether the selected texture vertices are also displayed in the viewport.

Exposed via unwrap interface in 3ds Max 4 and higher.

Unwrap Options Dialog

Roll over and click a controls group to jump to its description:

Colors

Methods:

<point3><Unwrap_UVW>.getLineColor()

Returns the color of the lines used to connect the texture vertices edges as a Point3 value.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.setLineColor <point3>color

Sets the line color of the texture vertices.

Exposed via unwrap interface in 3ds Max 4 and higher.

<point3><Unwrap_UVW>.getHandleColor()

Returns the handle color.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setHandleColor <point3>color

Sets the handle color.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<boolean><Unwrap_UVW>.getShowShared()

Returns whether shared sub objects are displayed. Shared sub objects are texture vertices or edges that share the same geometric vertex or edge.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setShowShared <boolean>select

Sets whether shared sub objects are displayed. Shared sub objects are texture vertices or edges that share the same geometric vertex or edge.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<point3><Unwrap_UVW>.getSharedColor()

Returns the color that will be used to show shared sub objects.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setSharedColor <point3>color

Sets the color that will be used to show shared sub objects.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<point3><Unwrap_UVW>.getSelectionColor()

Returns the texture vertices selection color as a Point3 value.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.setSelectionColor <point3>color

Sets the color of selected texture vertices.

Exposed via unwrap interface in 3ds Max 4 and higher.

<point3><Unwrap_UVW>.getFreeFormColor()

Returns the Free Form Gizmo color.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setFreeFormColor <point3>color

Sets the Free Form Gizmo color.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<point3><Unwrap_UVW>.getOpenEdgeColor()

Returns the color used to display Open Edges.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setOpenEdgeColor <point3>color

Sets the color used to display Open Edges.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<point3><Unwrap_UVW>.getBackgroundColor()

Returns the Background color.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setBackgroundColor <point3>color

Sets the Background color.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

Fill Mode

Methods:

<integer><Unwrap_UVW>.getFillMode()

Returns the polygon fill mode:

1 - No Fill

2 - Solid Fill

3 - Cross Hatch Diagonal Downward

4 - Cross Hatch Horizontal/Vertical

5 - Cross Hatch Diagonal

6 - Cross Hatch Diagonal Upward

7 - Cross Hatch Horizontal

8 - Cross Hatch Vertical

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setFillMode <integer>mode

Sets the polygon fill mode.

1 - No Fill

2 - Solid Fill

3 - Cross Hatch Diagonal Downward

4 - Cross Hatch Horizontal/Vertical

5 - Cross Hatch Diagonal

6 - Cross Hatch Diagonal Upward

7 - Cross Hatch Horizontal

8 - Cross Hatch Vertical

Exposed via unwrap2 interface in 3ds Max 5 and higher.

Open Edges Display

Methods:

<boolean><Unwrap_UVW>.getDisplayOpenEdges()

Returns the state of the Display Seams option.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setDisplayOpenEdges <boolean>displayOpenEdges

Sets the state of the Display Seams option.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<boolean><Unwrap_UVW>.getOpenEdgeMode()

Returns the OpenEdge Mode.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setOpenEdgeMode <boolean>uvOpenMode

Sets the OpenEdge Mode.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.openEdgeSelect()

Selects Open Edges. Select any number of edges and call this method to select all open edges which share texture vertices with the original selection.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

Display Preferences

Methods:

<boolean><Unwrap_UVW>.getBrightnessAffectsCenterTile()

Returns the state of the "Affect Center Tile" option in the Display Preferences of the Advanced Options dialog.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setBrightnessAffectsCenterTile <boolean>bright

Sets the state of the "Affect Center Tile" option in the Display Preferences of the Advanced Options dialog. When set to true, the brightness value affects the center tile.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<boolean><Unwrap_UVW>.getBlendTileToBackground()

Returns the state of the "Blend Tile To Background" option in the Display Preferences of the Advanced Options dialog. When true, the brightness value affects the center tile.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setBlendTileToBackground <boolean>blend

Sets the state of the "Blend Tile To Background" option in the Display Preferences of the Advanced Options dialog.

When set to true, the tiled images are blended to the background color or black

Exposed via unwrap2 interface in 3ds Max 5 and higher.

Map Tiling

Methods:

<boolean><Unwrap_UVW>.getTileMap()

Returns true if the map is tiled, false otherwise.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setTileMap <boolean>tile

Enable/Disable the map tiling.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<integer><Unwrap_UVW>.getTileMapLimit()

Returns the map tiling limit. Corresponds to the Tile Limit value found in the Options panel and Advanced Options dialog. The value defines how many times to repeat the map outside of the original map area.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setTileMapLimit <integer>limit

Sets the map tiling limit. Corresponds to the Tile Limit value found in the Options panel and Advanced Options dialog. The value defines how many times to repeat the map outside of the original map area.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<float><Unwrap_UVW>.getTileMapBrightness()

Returns the Brightens of the tiled map outside of the original map area.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setTileMapBrightness <float>contrast

Sets the Brightens of the tiled map outside of the original map area.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

Grid

Methods:

<float><Unwrap_UVW>.getGridSize()

Returns the Grid Size.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setGridSize <float>size

Sets the Grid Size.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<boolean><Unwrap_UVW>.getGridSnap()

Returns the state of the Grid Snap checkbutton. Always returns false if the Snap flyout is in Pixel Snap mode.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setGridSnap <boolean>snap

Sets the state of the Grid Snap checkbutton. Changes the flyout to Grid Snap if necessary.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<boolean><Unwrap_UVW>.getGridVisible()

Returns the visible state of the Grid.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setGridVisible <boolean>visible

Sets the visible state of the Grid.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<point3><Unwrap_UVW>.getGridColor()

Returns the Grid color.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setGridColor <point3>color

Sets the Grid color.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<float><Unwrap_UVW>.getGridStr()

Returns the strength of the grid snap. At a strength of 1 the snap system has complete control and a vertex will always snap to a grid intersection, at a strength of 0 there will be no snapping.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setGridStr <float>str

Sets the strength of the grid snap. At a strength of 1 the snap system has complete control and a vertex will always snap to a grid intersection, at a strength of 0 there will be no snapping.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

Hit Size

Methods:

<integer><Unwrap_UVW>.getHitSize()

Returns the Single Click Hit Size value found in the Advanced Options dialog.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setHitSize <integer>size

Sets the Single Click Hit Size value found in the Advanced Options dialog.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

Tick Size

Methods:

<integer><Unwrap_UVW>.getTickSize()

Returns the selected vertex tick size.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setTickSize <integer>size

Sets the selected vertex tick size.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

Transforming and Selecting

Map Scale

Methods:

<boolean><Unwrap_UVW>.GetMapScale()

Returns the scaling factor when the user applies a planar map. The smaller the value the more planar map is scaled down

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.SetMapScale <float>scale

Sets the scaling factor when the user applies a planar map. The smaller the value the more planar map is scaled down.

<float>scale - The scaling factor for planar map.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.SetVertexPosition <time>time <integer>index <point3>pos

This sets the position of a UVW vertex at a specific time.

<time>time - The time at what you want to set the pos.

<integer>index - The index of the vertex.

<point3>pos - The position of the vertex in UVW space.

Exposed via unwrap interface in 3ds Max 4 and higher.

Number Of ...

Methods:

<integer><Unwrap_UVW>.NumberVertices()

Returns the number of texture vertices.

Exposed via unwrap interface in 3ds Max 4 and higher.

<integer><Unwrap_UVW>.numberPolygons()

Returns the number of polygons in the object.

Exposed via unwrap interface in 3ds Max 4 and higher.

Vertex Selection

Methods:

<bitArray><Unwrap_UVW>.getSelectedVertices()

Returns the current selected texture vertices in the edit floater as a bitarray.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.selectVertices <bitArray>selection

Selects texture vertices in the edit floater dialog.

Exposed via unwrap interface in 3ds Max 4 and higher.

<boolean><Unwrap_UVW>.isVertexSelected <integer>index

Returns a boolean value which indicates whether a texture vertex is selected.

index (integer) - The index of the vertex to check.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.GetSelectionFromFace()

Takes the current polygon selection and uses it to select the texture vertices that are associated with it.

Exposed via unwrap interface in 3ds Max 4 and higher.

Vertex Weight

Methods:

<float><Unwrap_UVW>.getVertexWeight <integer>index

Returns the Vertex Weight of the specified vertex.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setVertexWeight <integer>index <float>weight

Sets the Vertex Weight of the specified vertex to the supplied value.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<boolean><Unwrap_UVW>.isWeightModified <integer>index

Returns true if the specified vertex has been affected by soft selection, false otherwise.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.modifyWeight <integer>index <boolean>modify

Sets whether the specified vertex should be modified by soft selection.

If a vertex is modified it ignores regular UI soft selection and the vertex soft selection weight is locked to it current state and can only be changed by the setVertexWeight method.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

Synchronize Selection

Methods:

<boolean><Unwrap_UVW>.getSyncSelectionMode()

Returns the Sync. to Viewport mode.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setSyncSelectionMode <boolean>sync

Sets the Sync. to Viewport mode.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.syncTVSelection()

Synchronizes the selection in the Editor to reflect the viewport selection.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.syncGeomSelection()

Synchronizes the face selection in the viewport to reflect the Editor’s selection.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

Selected Edges

Methods:

<bitArray><Unwrap_UVW>.getSelectedEdges()

Returns the edge selection from the Editor as bitarray.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.selectEdges <bitArray>selection

Set the edge selection in the Editor using the supplied bitarray.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<boolean><Unwrap_UVW>.isEdgeSelected <integer>index

Returns true if the indexed edge is selected, false otherwise.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

Selected Faces

Methods:

<bitArray><Unwrap_UVW>.getSelectedFaces()

Returns the face selection from the Editor as bitarray

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.selectFaces <bitArray>selection

Sets the face selection in the Editor using the supplied bitArray.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<boolean><Unwrap_UVW>.isFaceSelected <integer>index

Returns true if the specified indexed face is selected, false otherwise.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

Old Selection Method

Methods:

<boolean><Unwrap_UVW>.getOldSelMethod()

Returns false when the new selection method is used, false when the old selection method is used. In the old selection mode, drag selection always uses back faces and single pick mode ignore back faces.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setOldSelMethod <boolean>oldSelMethod

Sets the selection method. False means use the new selection method, true means use the old selection method.

This method lets you set the system back to the old selection method where drag selection always uses back faces and single pick mode ignore back faces. This will override the Ignore Back Faces mode.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

Always Edit Mode

Methods:

<boolean><Unwrap_UVW>.getAlwaysEdit()

Returns the state of the "Always Bring Up the Edit Window" option found in the Options menu item. When true, the Editor will auto-open each time the object is selected.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setAlwaysEdit <boolean>always

Sets the state of the "Always Bring Up the Edit Window" option found in the Options menu item. When set to true, the Editor will auto-open each time the object is selected.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

Transform Selected

Methods:

<void><Unwrap_UVW>.moveSelected <point3>offset

Moves the selected sub-objects at the specified offset.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.rotateSelectedCenter <float>angle

Rotates the selected sub-objects at the specified angle using the selection center.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.rotateSelected <float>angle <point3>axis

Moves the selected sub-objects at the specified offset about the specified axis.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.scaleSelectedCenter <float>scale <integer>dir

Scales the selected sub-objects by the specified amount using the selection center. The dir integer defines the direction of scaling as follows:

0 - scale both X and Y

1 - scale X only

2 - scale Y only

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.ScaleSelected <float>scale <integer>dir <point3>axis

Scales the selected sub-objects by the specified amount using the specified axis. The dir integer defines the scaling mode as follows:

0 - scale both X and Y

1 - scale X only

2 - scale Y only

Exposed via unwrap2 interface in 3ds Max 5 and higher.

UV Edge Mode

Methods:

<boolean><Unwrap_UVW>.getUVEdgeMode()

Returns the UV Edge Mode.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setUVEdgeMode <boolean>uvEdgeMode

Sets the UV Edge Mode.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.uvEdgeSelect()

Selects UV Edge Loops. Select any number of edges and call this method to select all edges that build an edge loop with the original selection.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

Scale Selected XY

Methods:

<void><Unwrap_UVW>.s caleSelectedXY <float>scaleX <float>scaleY <point3>axis

Scales the current selection non-uniformly using the separate X and Y scale values. Uses the axis Point3 value as center.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

Pivot

Methods:

<void><Unwrap_UVW>.snapPivot <integer>pos

This lets you quickly snap the free form gizmo pivot to the bounding rectangle.

1 is the center

2 is the lower left of the selection

3 is the lower center of the selection

4 is the lower right of the selection

5 is the right center of the selection

6 is the upper right of the selection

7 is the upper center of the selection

8 is the upper left of the selection

9 is the left center of the selection

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<point3><Unwrap_UVW>.getPivotOffset()

Returns the pivot offset of the free form gizmo. This is an offset from the center of the selection.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setPivotOffset <point3>offset

Sets the free from gizmo’s Pivot offset.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<point3><Unwrap_UVW>.getSelCenter()

Returns the Selection Center so you can compute the pivot offset from a world uv position.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<boolean><Unwrap_UVW>.getResetPivotOnSelection()

Returns the Reset Pivot on selection state. When true, the pivot will reset itself to the center of the selection.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setResetPivotOnSelection <boolean>reset

Sets the Reset Pivot on selection option. When true, the pivot will reset itself to the center of the selection.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

Polygon Mode

Methods:

<boolean><Unwrap_UVW>.getPolygonMode()

Returns the Polygon mode.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setPolygonMode <boolean>mode

Sets the Polygon mode.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.polygonSelect()

Returns the Polygon mode.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

Selection Inside Gizmo

Methods:

<boolean><Unwrap_UVW>.getAllowSelectionInsideGizmo()

Returns the state of the Allow Selecting Inside Gizmo option.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.setAllowSelectionInsideGizmo <boolean>select

Allow / Disallow selecting inside the gizmo.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

Transform Selected Vertices

Methods:

<void><Unwrap_UVW>.moveSelectedVertices <point3>offset

Moves the selected texture vertices by the specified offset.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.rotateSelectedVerticesCenter <float>angle

Rotates the selected vertices around their center point.

angle (float) - The angle in radians that you want to rotate the selection by.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.RotateSelectedVertices <float>angle <point3>axis

Rotates the selected vertices around a specific axis

where

angle is the angle in radians that you want to rotate the selection by.

axis is the axis that you want to rotate the selected vertices about. This is in the space of the window.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.scaleSelectedVerticesCenter <float>scale <integer>dir

Scales the selected points around their center,

where

scale is the amount that you want to scale by.

dir is the direction you want to scale in:

0 - Scales uniform

1 - Scales in the x

2 - Scales in the y

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.scaleSelectedVertices <float>scale <integer>dir <point3>axis

Scales the selected points around their center around the axis

where

scale is the amount that you want to scale by.

dir is the direction you want to scale in:

0 - Scales uniform

1 - Scales in the x

2 - Scales in the y

axis (point3) - The axis that you want to scale the selected vertices along. This is in the space of the window.

Exposed via unwrap interface in 3ds Max 4 and higher.

<point3><Unwrap_UVW>.getVertexPosition <time>time <integer>index

Returns the position of the vertex as a Point3 value.

time (timevalue) - The time at which you wan to check.

index (integer) - The index of the vertex.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.moveX <float>p

This sets the selected vertices x values in absolute coordinates.

<float>p - The absolute position along the x axis.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.moveY <float>p

This sets the selected vertices y values in absolute coordinates.

<float>p - The absolute position along the y axis.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.moveZ <float>p

This sets the selected vertices xzvalues in absolute coordinates.

<float>p - The absolute position along the z axis.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.setVertexPosition2 <time>time <integer>index <point3>pos <boolean>hold <boolean>update

An extended version of the setVertexPosition method with control over Holding and Updating.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<boolean><Unwrap_UVW>.getRotationsRespectAspect()

Returns true if the rotations respect the aspect, false otherwise.

Exposed via unwrap4 interface in 3ds Max 7 and higher.

<void><Unwrap_UVW>.setRotationsRespectAspect <boolean>respect

Sets whether rotations will respect the aspect or not.

Exposed via unwrap4 interface in 3ds Max 7 and higher.

Selected Polygons

Methods:

<bitArray><Unwrap_UVW>.getSelectedPolygons()

Returns the selected polygons in the view port as a bitarray.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.selectPolygons <bitArray>selection

Selects the polygons in the view ports.

<bitArray>sel - The polygons to select.

Exposed via unwrap interface in 3ds Max 4 and higher.

<boolean><Unwrap_UVW>.isPolygonSelected <integer>index

Returns whether a polygon is selected or not.

<integer>index - Index of the polygon to check.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.selectPolygonsUpdate <bitArray>selection <boolean>update

Selects the faces supplied by the bitArray. When update is given as true, updates the selection display. This selection method gives you an option to not update the view if you are doing lots of face processing.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.selectFacesByNormal <point3>normal <float>threshold <boolean>update

Selects the faces whose face normals are within the given threshold relatively to the supplied normal. When update is given as true, updates the selection display.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.selectClusterByNormal <float>threshold <integer>faceIndexSeed <boolean>relative <boolean>update

Select a cluster based on the supplied threshold value starting with the faceIndexSeed face.

When relative is supplied as true, the threshold will be measured relatively to the neighbor face (and thus be able to propagate across the whole mesh if needed). When false, the threshold will be measured absolutely to the seed face.

When true is supplied for update, the selection will be updated in the viewports.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

<void><Unwrap_UVW>.getArea <bitArray>faceSelection <&float>x <&float>y <&float>width <&float>height <&float>areaUVW <&float>areaGeom

x is Out parameter

y is Out parameter

width is Out parameter

height is Out parameter

areaUVW is Out parameter

areaGeom is Out parameter

Returns the geometry and uvw area, x, y, width and height of the supplied face selection.

Exposed via unwrap4 interface in 3ds Max 7 and higher.

Topology Editing

The functions below work on the UVW topology allowing you to rearrange the topology or add new topology. Use these with care since you can create invalid topology which can cause unpredictable results. Unwrap has topology similar to meshes but it has been changed to support everything except patches and polygons at the same time. Unwrap has a list of Point3 values which are the texture vertices positions. Then there are texture faces which contain an array of integers which are indices into the texture vertex list. There can be 3 to N number of ints in this array depending on the topology being fed into Unwrap. In addition to this, there are also 2 arrays of integers for the handles and interior handles if the topology is a patch which also points into the texture vertex list. The functions below allow you to manipulate these arrays to do things like break, weld, and other topological functions.

Methods:

<void><Unwrap_UVW>.markAsDead <integer>index

This marks a vertex that it is dead, and no longer in use. Vertices are not actually deleted they are just marked and recycled when needed. That means that when a vertex is added vertices marked as dead will be the first ones checked. If there are no dead vertices, the vertex is appended to the end of the list. Use this function carefully, since marking a vertex in use as dead will cause strange results.

<integer>index - The index of the vertex to mark as dead.

Exposed via unwrap interface in 3ds Max 4 and higher.

<integer><Unwrap_UVW>.numberPointsInFace <integer>index

This retrieves the numbers of vertices that a face contains. A face can contain 3 to N number of points depending on what type of topology Unwrap is working on. For Tri Meshes this is always 3; for patches this can be 3 or 4; and for polygons this can be 3 or greater. Unwrap abstracts all three object types into one generic format.

<integer>index - The index of the face that you are inspecting.

Exposed via unwrap interface in 3ds Max 4 and higher.

<integer><Unwrap_UVW>.getVertexIndexFromFace <integer>faceIndex <integer>ithVertex

This retrieves the index of a vertex, from a face. A face contains 0 to N number of vertices, so to retrieve a particular vertex index, you give it the face index and the ith vertex that you want to inspect. For example, if you wanted to look at the 3 vertex on face 1 you would call GetVertexIndexFromFace (1,3).

<integer>FaceIndex - The index of the face that you want to inspect.

<integer>IthVertex - The ith vertex of that you want to retrieve. This value should range from 1 to the number of vertices that the face contains.

Exposed via unwrap interface in 3ds Max 4 and higher.

<integer><Unwrap_UVW>.getHandleIndexFromFace <integer>faceIndex <integer>ithVertex

This retrieves the index of a handle, from a face, which contains 0 to N number of handles. To retrieve a particular handle index, you give it the face index and the ith handle that you want to inspect. For example, if you wanted to look at the 3 handle on face 1 you would call GetHandleIndexFromFace (1,3). This only applies to patch meshes.

<integer>FaceIndex - The index of the face that you want to inspect.

<integer>IthVertex - The ith handle of that you want to retrieve. This value should range from 1 to the twice the number of vertices that the face contains.

Exposed via unwrap interface in 3ds Max 4 and higher.

<integer><Unwrap_UVW>.getInteriorIndexFromFace <integer>faceIndex <integer>ithVertex

This retrieves the index of a interior handle from a face. A face contains 0 to N number of interior handles, so to retrieve a particular interior handle index, you give it the face index and the ith interior handle that you want to inspect. For example, if you wanted to look at the 3 interior handle on face 1 you would call GetInteriorIndexFromFace (1,3). This only applies for patch meshes.

<integer>FaceIndex - The index of the face that you want to inspect.

<integer>IthVertex - The ith interior handle of that you want to retrieve. This value should range from 1 to the number of vertices that the face contains.

Exposed via unwrap interface in 3ds Max 4 and higher.

<integer><Unwrap_UVW>.getVertexGeomIndexFromFace <integer>faceIndex <integer>ithVertex

This retrieves the index of a geometric vertex from a face. This the vertex that is attached to the mesh and not the texture faces. A face contains 0 to N number of vertices, so to retrieve a particular vertex index, you give it the face index and the ith vertex that you want to inspect. For example, if you wanted to look at the 3 vertex on face 1 you would call GetVertexGeomIndexFromFace (1,3).

<integer>FaceIndex - The index of the face that you want to inspect.

<integer>IthVertex - The ith vertex of that you want to retrieve. This value should range from 1 to the number of vertices that the face contains.

Exposed via unwrap interface in 3ds Max 4 and higher.

<integer><Unwrap_UVW>.getHandleGeomIndexFromFace <integer>faceIndex <integer>ithVertex

This retrieves the index of a geometric handle from a patch. This the handle that is attached to the patch and not the texture faces. A face contains 0 to N number of handles, so to retrieve a particular handle index, you give it the face index and the ith handle that you want to inspect. For example, if you wanted to look at the 3 handle on face 1 you would call GetHandleGeomIndexFromFace(1,3).

<integer>FaceIndex - The index of the face that you want to inspect.

<integer>IthVertex - The ith handle of that you want to retrieve. This value should range from 1 to twice the number of vertices that the face contains.

Exposed via unwrap interface in 3ds Max 4 and higher.

<integer><Unwrap_UVW>.getInteriorGeomIndexFromFace <integer>faceIndex <integer>ithVertex

This retrieves the index of a geometric interior handle from a patch. This the interior handle that is attached to the patch and not the texture faces. A face contains 0 to N number of interior handles, so to retrieve a particular interior handle index, you give it the face index and the ith interior handle that you want to inspect. For example, if you wanted to look at the 3 interior handle on face 1 you would call GetInteriorGeomIndexFromFace (1,3).

<integer>FaceIndex - The index of the face that you want to inspect.

<integer>IthVertex - The ith interior handle of that you want to retrieve. This value should range from 1 to the number of vertices that the face contains.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.setFaceVertex <point3>pos <integer>faceIndex <integer>ithVertex <boolean>sel

This allows you to manipulate the position of vertex attached to a face. Basically, it detaches the vertex if multiple faces share that vertex and then moves it to the position specified. So if you want to move the 3rd vertex of face 1 to (.5,.5,.0) you would do setFaceVertex [.5 .5 .0] 1 3. If you don’t want the vertex broken use SetVertexSPosition.

<point3>pos - The position that you want to move a vertex to.

<integer>faceIndex (integer) - The index of the face that you wish to work on.

<integer>ithVertex (integer) - The ith vertex of the face that you want to change.

<boolean>sel - Whether or not to select the vertex after it is recreated.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.setFaceHandle <point3>pos <integer>faceIndex <integer>ithVertex <boolean>sel

Identical to SetFaceVertex except works on patch handles.

<point3>pos - The position that you want to move a vertex to.

<integer>faceIndex (integer) - The index of the face that you wish to work on.

<integer>ithVertex (integer) - The ith vertex of the face that you want to change.

<boolean>sel - Whether or not to select the vertex after it is recreated.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.setFaceInterior <point3>pos <integer>faceIndex <integer>ithVertex <boolean>sel

Identical to SetFaceVertex except works on patch interior handles.

<point3>pos - The position that you want to move a vertex to.

<integer>faceIndex (integer) - The index of the face that you wish to work on.

<integer>ithVertex (integer) - The ith vertex of the face that you want to change.

<boolean>sel - Whether or not to select the vertex after it is recreated.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.setFaceVertexIndex <integer>faceIndex <integer>ithVertex <integer>vertexIndex

This allows you to set the index of the ith vertex of a face. For example, if you wanted to change the index of the 3rd vertex of face 1 to 100 you would call setFaceVertexIndex 1 3 100.

<integer>faceIndex - Index of the face you want work on.

<integer>ithVertex - The ith vertex that you want to manipulate.

<integer>vertexIndex - The index into the vertex list that you want to set to.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.setFaceHandleIndex <integer>faceIndex <integer>ithVertex <integer>vertexIndex

Identical to setFaceVertexIndex but works on handles for patches.

<integer>faceIndex - Index of the face you want work on.

<integer>ithVertex - The ith vertex that you want to manipulate.

<integer>vertexIndex - The index into the vertex list that you want to set to.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.setFaceInteriorIndex <integer>faceIndex <integer>ithVertex <integer>vertexIndex

Identical to setFaceVertexIndex but works on interior handles for patches.

<integer>faceIndex - Index of the face you want work on.

<integer>ithVertex - The ith vertex that you want to manipulate.

<integer>vertexIndex - The index into the vertex list that you want to set to.

Exposed via unwrap interface in 3ds Max 4 and higher.

<void><Unwrap_UVW>.forceUpdate <boolean>update

This sets a flag to determines how Unwrap will behave when a topology change occurs. If update is TRUE the mapping gets reset, otherwise unwrap skips mapping the object if it has a different topology. It is sometimes useful to turn this off if you have MeshSmooth or other topology changing modifiers below Unwrap that have different topologies when rendering.

<boolean>update - Determines whether the mapping is reset on topology change.

Exposed via unwrap interface in 3ds Max 4 and higher.

NOTE:

Normally, when the user changes the topology, Unwrap resets the mapping. If the forceUpdate is set to true then the mapping will not be reset, but you can't edit/see any mapping that makes sense. This flag is for advance users that want to lock a mapping and then set the topology back down for maximized viewport speed.

<void><Unwrap_UVW>.getFaceSelectionFromStack()

Updates the Unwrap_UVW modifier to accept any face selection coming from the modifier stack. For example, create a sphere, add a MeshSelect modifier, add an Unwrap_UVW modifier. Go to Face Sub-Object level of Unwrap_UVW - there is no selection. Go down to MeshSelect and select some faces. Go back to Unwrap_UVW - there is still no face selection. Call this function and the MeshSelect face selection will be accepted by the Unwrap_UVW modifier.

Exposed via unwrap interface in 3ds Max 4 and higher.

The following methods are available in 3ds Max 2008 and higher:

The Unwrap_UVW modifier in 3ds Max 2008 and higher supports multiple objects when applied as an instance. This interface exposes some methods which used to be available in the Unwrap_UVW modifier, but this time it provides an argument to specify the node to operate on.

Interface: unwrap6

Methods:

<integer><Unwrap_UVW>.numberVerticesByNode <node>node

Returns the number of map vertices in the Unwrap_UVW modifier corresponding to the given node.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<bitArray><Unwrap_UVW>.getSelectedPolygonsByNode <node>node

Returns the number of selected polygons corresponding to the given node.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<void><Unwrap_UVW>.selectPolygonsByNode <bitArray>selection <node>node

Selects the polygons corresponding to the given node defined by the bitarray value.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<boolean><Unwrap_UVW>.isPolygonSelectedByNode <integer>index <node>node

Returns true of the indexed polygon of the given node is selected in the Unwrap_UVW modifier, false if not selected.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<integer><Unwrap_UVW>.numberPolygonsByNode <node>node

Returns the number of polygons in the Unwrap_UVW modifier corresponding to the given node.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<void><Unwrap_UVW>.markAsDeadByNode <integer>index <node>node

Marks the indexed vertex in the given node as dead.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<integer><Unwrap_UVW>.numberPointsInFaceByNode <integer>index <node>node

Returns the number of points in the indexed face of the given node.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<integer><Unwrap_UVW>.getVertexIndexFromFaceByNode <integer>faceIndex <integer>ithVertex <node>node

Returns the vertex index of the i-th vertex of the indexed face of the given node.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<integer><Unwrap_UVW>.getHandleIndexFromFaceByNode <integer>faceIndex <integer>ithVertex <node>node

Returns the handle index of the i-th vertex of the indexed face of the given node.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<integer><Unwrap_UVW>.getVertexGeomIndexFromFaceByNode <integer>faceIndex <integer>ithVertex <node>node

Returns the index of the geometry vertex corresponding to the i-th vertex of the indexed face of the given node.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<integer><Unwrap_UVW>.getHandleGeomIndexFromFaceByNode <integer>faceIndex <integer>ithVertex <node>node

Returns the handle of the geometry vertex corresponding to the i-th vertex of the indexed face of the given node.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<integer><Unwrap_UVW>.getInteriorGeomIndexFromFaceByNode <integer>faceIndex <integer>ithVertex <node>node

Returns the interior geometry vertex index corresponding to the i-th vertex of the indexed face of the given node.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<void><Unwrap_UVW>.setFaceVertexByNode <point3>pos <integer>faceIndex <integer>ithVertex <boolean>sel <node>node

Sets the position of the i-th vertex of the indexed face in the given node. If the 4th parameter is passed as true, the vertex will also be selected.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<void><Unwrap_UVW>.setFaceHandleByNode <point3>pos <integer>faceIndex <integer>ithVertex <boolean>sel <node>node

Sets the handle position of the i-th vertex of the indexed face in the given node.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<void><Unwrap_UVW>.setFaceInteriorByNode <point3>pos <integer>faceIndex <integer>ithVertex <boolean>sel <node>node

Sets the interior position of the i-th vertex of the indexed face in the given node.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<void><Unwrap_UVW>.setFaceVertexIndexByNode <integer>faceIndex <integer>ithVertex <integer>vertexIndex <node>node

Sets the vertex index of the i-th vertex of the indexed face in the given node.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<void><Unwrap_UVW>.setFaceHandleIndexByNode <integer>faceIndex <integer>ithVertex <integer>vertexIndex <node>node

Sets the handle handle index of the i-th vertex of the indexed face in the given node.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<void><Unwrap_UVW>.setFaceInteriorIndexByNode <integer>faceIndex <integer>ithVertex <integer>vertexIndex <node>node

Sets the face interior index of the i-th vertex of the indexed face in the given node.

<void><Unwrap_UVW>.getAreaByNode <bitArray>faceSelection <&float>areaUVW <&float>areaGeom <node>node

areaUVW is Out parameter

areaGeom is Out parameter

Gets the map faces area and the geometry faces area of the faces specified by the bitArray in the given node. The results are written into the two by-reference variables areaUVW and areaGeom.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<void><Unwrap_UVW>.getAreaByNode <bitArray>faceSelection <&float>x <&float>y <&float>width <&float>height <node>node

x is Out parameter

y is Out parameter

width is Out parameter

height is Out parameter

Gets the upper left corner, the width and the height of the faces specified by the bitArray in the given node. The results are written into the four by-reference variables x, y, width and height.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<bitArray><Unwrap_UVW>.getPeltSelectedSeamsByNode <node>node

Returns a bitarray of the selected seams for pelting in the given node.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<void><Unwrap_UVW>.setPeltSelectedSeamsByNode <bitArray>selection <node>node

Sets the selected seams for pelting in the given node to the given bitArray.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<void><Unwrap_UVW>.selectPolygonsUpdateByNode <bitArray>selection <boolean>update <node>node

Selects the faces supplied by the bitArray in the given node. When update is given as true, updates the selection display. This selection method gives you an option to not update the view if you are doing lots of face processing.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<void><Unwrap_UVW>.sketchByNode <int array>indexList <point3 array>positionList <node>node

Sketches UV coordinates of the given node using the supplied index list array and the position list array.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<point3><Unwrap_UVW>.getNormalByNode <integer>faceIndex <node>node

Returns the normal of the indexed face in the given node.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

Get and Set Vertex Position and Weight

<point3><Unwrap_UVW>.GetVertexPositionByNode <time>time <integer>index <node>node

Returns the position of the indexed map vertex of the node given by the third argument at the time given by the first argument.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<void><Unwrap_UVW>.setVertexPosition ByNode <time>time <integer>index <point3>pos <node>node

Sets the position of the indexed map vertex of the node given by the fourth argument at the time given by the first argument to the position specified by the third argument.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<void><Unwrap_UVW>.setVertexPosition2ByNode <time>time <integer>index <point3>pos <boolean>hold <boolean>update <node>node

An extended version of the setVertexPosition method with control over Holding and Updating.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<float><Unwrap_UVW>.getVertexWeightByNode <integer>index <node>node

Returns the Vertex Weight of the specified vertex in the given node.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<void><Unwrap_UVW>.setVertexWeightByNode <integer>index <float>weight <node>node

Sets the Vertex Weight of the specified vertex in the given node to the value defined by the second argument.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<boolean><Unwrap_UVW>.isWeightModifiedByNode <integer>index <node>node

Returns true if the weight of the indexed vertex in the given node has been modified, false otherwise.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<void><Unwrap_UVW>.modifyWeightByNode <integer>index <boolean>modify <node>node

Sets the modified flag of the indexed vertex in the given node to the Boolean value provided by the second argument.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

Get and Set Selection

<bitArray><Unwrap_UVW>.getSelectedVerticesByNode <node>node

Returns a bitarray with the map vertices selected in the Unwrap_UVW modifier and corresponding to the given node.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<void><Unwrap_UVW>.selectVerticesByNode <bitArray>selection <node>node

Selects the map vertices in the Unwrap_UVW modifier and corresponding to the given node, based on the provided bitarray.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<boolean><Unwrap_UVW>.isVertexSelectedByNode <integer>index <node>node

Returns true if the indexed map vertex is selected, false otherwise.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<bitArray><Unwrap_UVW>.getSelectedFacesByNode <node>node

Returns a bitarray with the faces selected in the Unwrap_UVW modifier and corresponding to the given node.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<void><Unwrap_UVW>.selectFacesByNode <bitArray>selection <node>node

Selects the faces in the Unwrap_UVW modifier and corresponding to the given node, based on the provided bitarray.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<boolean><Unwrap_UVW>.isFaceSelectedByNode <integer>index <node>node

Returns true if the indexed face is selected, false otherwise.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<bitArray><Unwrap_UVW>.getSelectedEdgesByNode <node>node

Returns a bitarray with the map edges selected in the Unwrap_UVW modifier and corresponding to the given node.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<void><Unwrap_UVW>.selectEdgesByNode <bitArray>selection <node>node

Selects the map edges in the Unwrap_UVW modifier and corresponding to the given node, based on the provided bitarray.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<boolean><Unwrap_UVW>.isEdgeSelectedByNode <integer>index <node>node

Returns true if the indexed map edge is selected, false otherwise.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<bitArray><Unwrap_UVW>.getSelectedGeomVertsByNode <node>node

Returns a bitarray with the geometry vertices selected in the Unwrap_UVW modifier and corresponding to the given node.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<void><Unwrap_UVW>.setSelectedGeomVertsByNode <bitArray>selection <node>node

Selects the vertices in the Unwrap_UVW modifier and corresponding to the given node, based on the provided bitarray.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<bitArray><Unwrap_UVW>.getSelectedGeomEdgesByNode <node>node

Selects the geometry edges in the Unwrap_UVW modifier and corresponding to the given node, based on the provided bitarray.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

<void><Unwrap_UVW>.setSelectedGeomEdgesByNode <bitArray>selection <node>node

Selects the geometry edges in the Unwrap_UVW modifier and corresponding to the given node, based on the provided bitarray.

Exposed via unwrap6 interface in 3ds Max 2008 and higher.

Show Icon

<void><Unwrap_UVW>.showIcon <integer>index <boolean>show

Lets you turn on/off icons in the Unwrap UVW Edit dialog

The icons are as follows:
1 - Move Mode
2 - Rotate Mode
3 - Scale Mode
4 - Transform Mode
5 - Mirror Tool
6 - Expand Selection
7 - Contract Selection
8 - Soft Selection Falloff
9 - Soft Selection Space
10 - Soft Selection Strength
11 - Break
12 - Target Weld
13 - Weld Selected
14 - Update Map
15 - Show Map
16 - UV/VW/UW space
17 - Properties Dialog
18 - Map Drop List
19 - U Spinner
20 - V Spinner
21 - W Spinner
22 - Lock Sub Object
23 - Hide/Show
24 - Freeze/Thaw
25 - Filter Selected
26 - Mat Ids
27 - Pan Mode
28 - Zoom Mode
29 - Zoom Region Mode
30 - Fit Command
31 - Snap
Exposed via unwrap2 interface in 3ds Max 5 and higher.

Debug Level (For Developers)

<void><Unwrap_UVW>.setDebugLevel <integer>level

Development debugging level. Not exposed to the UI. Level 0 means no debug info, the higher the value the more info you will see in your script window.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

Spline Mapping

The following properties and methods expose the Spline Mapping functionality inteoduced in 3ds Max 2009:

Properties:

<Unwrap_UVW>.splinemap_node UndefinedClass default: undefined -- node

NEW in 3ds Max 2009: Get/set the Spline Mapping Shape node. Corresponds to the - Pick Spline - button in the Spline Map Parameters dialog.

<Unwrap_UVW>.splinemap_projectiontype Integer default: 0 -- integer

NEW in 3ds Max 2009: Get/set the Spline Mapping projection type. Corresponds to the "Mapping" drop-down list in the Spline Map Parameters dialog.

Possible values are:

0 - Circlular

1 - Planar

<Unwrap_UVW>.splinemap_manualseams BooleanClass default: false -- boolean

NEW in 3ds Max 2009: Get/set the state of the Use Manual Seams checkbox in the Spline Mapping dialog.

<Unwrap_UVW>.splinemap_resampleCount Integer default: 4 -- integer

NEW in 3ds Max 2009: Get/set the Spline Mapping resample count.

<Unwrap_UVW>.splinemap_display BooleanClass default: true -- boolean

NEW in 3ds Max 2009: Enable/disable the Spline Mapping Gizmo display. When set to false, the cross-sections and the spline map gizmo will be hidden.

<Unwrap_UVW>.splinemap_iterations Integer default: 16 -- integer

NEW in 3ds Max 2009: Get/set the Spline Mapping iterations count.

<Unwrap_UVW>.splinemap_advanceMethod Integer default: 1 -- integer

NEW in 3ds Max 2009: Get/Set the advance method option.

<Unwrap_UVW>.splinemap_uoffset Float default: 0.0 -- float

NEW in 3ds Max 2009: Get/set the Spline Mapping U Offset.

<Unwrap_UVW>.splinemap_voffset Float default: 0.0 -- float

NEW in 3ds Max 2009: Get/set the Spline Mapping V Offset.

<Unwrap_UVW>.splinemap_uscale Float default: 1.0 -- float

NEW in 3ds Max 2009: Get/set the Spline Mapping U Scale.

<Unwrap_UVW>.splinemap_vscale Float default: 1.0 -- float

NEW in 3ds Max 2009: Get/set the Spline Mapping V Scale.

Methods:

<void><Unwrap_UVW>.splineMap_Fit <boolean>fitAll <float>extraScale

NEW in 3ds Max 2009: Fits the cross-sections. If the first argument is true, all cross-sections will be affected. If it is false, only the selected cross-sections will be affected. The second argument defines the extra scale of the cross-sections beyond the fitted size.

Corresponds to pressing the Fit button in the Spline Map Parameters dialog.

<void><Unwrap_UVW>.splineMap_AddCrossSectionMode()

NEW in 3ds Max 2009: Enters Add Cross-section Mode.

Corresponds to pressing the Add button in the Spline Map Parameters dialog.

<void><Unwrap_UVW>.splineMap_Delete()

NEW in 3ds Max 2009: Deletes the currently selected cross-sections. Corresponds to pressing the Remove button in the Spline Map Parameters dialog.

<void><Unwrap_UVW>.splineMap_AlignSectionCommandMode()

NEW in 3ds Max 2009: Enters Align Section command mode.

Corresponds to pressing the Section button in the Spline Map Parameters dialog.

<void><Unwrap_UVW>.splineMap_AlignCommandMode()

NEW in 3ds Max 2009: Enters Align To Face command mode.

Corresponds to pressing the Face button in the Spline Map Parameters dialog.

<void><Unwrap_UVW>.splineMap_Align <index>splineIndex <index>crossSectionIndex <point3>vec

NEW in 3ds Max 2009: Aligns the indexed cross-section in the indexed spline to the given vector.

<void><Unwrap_UVW>.splineMap_AlignSelected <point3>vec

NEW in 3ds Max 2009: Aligns the selected cross-section to the given vector.

<void><Unwrap_UVW>.splineMap_Resample <integer>samples

NEW in 3ds Max 2009: Performs Resampling of the Spline Mapping to the given number of samples. Effectively inserts the specified number of cross-sections along the spline.

<integer><Unwrap_UVW>.splineMap_numberSplines()

NEW in 3ds Max 2009: Returns the number of mapping splines.

<void><Unwrap_UVW>.splineMap_selectSpline <index>splineIndex <boolean>sel

NEW in 3ds Max 2009: Sets the selected state of the indexed spline to the given boolean value.

<boolean><Unwrap_UVW>.splineMap_isSplineSelected <index>splineIndex

NEW in 3ds Max 2009: Returns true if the indexed spline is selected, false otherwise.

<void><Unwrap_UVW>.splineMap_ClearSelectSpline()

NEW in 3ds Max 2009: Clears the Spline selection.

<integer><Unwrap_UVW>.splineMap_numberCrossSection <index>splineIndex

NEW in 3ds Max 2009: Returns the number of cross-sections on the indexed spline.

<void><Unwrap_UVW>.splineMap_selectCrossSection <index>splineIndex <index>crossSectionIndex <boolean>sel

NEW in 3ds Max 2009: Sets the selected state of the indexed cross-section in the indexed spline to the given boolean value.

<boolean><Unwrap_UVW>.splineMap_isCrossSectionSelected <index>splineIndex <index>crossSectionIndex

NEW in 3ds Max 2009: Returns true if the indexed cross-section in the indexed spline is selected, false otherwise.

<void><Unwrap_UVW>.splineMap_ClearSelectCrossSection()

NEW in 3ds Max 2009: Clears the Cross-section selection.

<point3><Unwrap_UVW>.splineMap_GetCrossSection_Pos <index>splineIndex <index>crossSectionIndex

NEW in 3ds Max 2009: Returns the Position of the indexed cross-section in the indexed spline.

<void><Unwrap_UVW>.splineMap_SetCrossSection_Pos <index>splineIndex <index>crossSectionIndex <point3>pos

NEW in 3ds Max 2009: Sets the Position of the indexed cross-section in the indexed spline to the given Point3 value.

<void><Unwrap_UVW>.splineMap_moveSelectedCrossSection <float>u

NEW in 3ds Max 2009: Moves the selected cross-section by the given amount.

<float><Unwrap_UVW>.splineMap_GetCrossSection_ScaleX <index>splineIndex <index>crossSectionIndex

NEW in 3ds Max 2009: Returns the X Scale of the indexed cross-section in the indexed spline.

<void><Unwrap_UVW>.splineMap_SetCrossSection_ScaleX <index>splineIndex <index>crossSectionIndex <float>scaleX

NEW in 3ds Max 2009: Sets the X Scale of the indexed cross-section in the indexed spline to the given Float value.

<float><Unwrap_UVW>.splineMap_GetCrossSection_ScaleY <index>splineIndex <index>crossSectionIndex

NEW in 3ds Max 2009: Returns the Y Scale of the indexed cross-section in the indexed spline.

<void><Unwrap_UVW>.splineMap_SetCrossSection_ScaleY <index>splineIndex <index>crossSectionIndex <float>scaleY

NEW in 3ds Max 2009: Sets the Y Scale of the indexed cross-section in the indexed spline to the given Float value.

<void><Unwrap_UVW>.splineMap_scaleSelectedCrossSection <point2>scale

NEW in 3ds Max 2009: Scales the X and Y axes of the selected cross-section by the given Point2 value.

<float><Unwrap_UVW>.splineMap_GetCrossSection_Twist <index>splineIndex <index>crossSectionIndex

NEW in 3ds Max 2009: Returns the Twist value of the indexed cross-section in the indexed spline.

<void><Unwrap_UVW>.splineMap_SetCrossSection_Twist <index>splineIndex <index>crossSectionIndex <float>Twist

NEW in 3ds Max 2009: Sets the Twist of the indexed cross-section in the indexed spline to the given Float value.

<void><Unwrap_UVW>.splineMap_rotateSelectedCrossSection <float>twist

NEW in 3ds Max 2009: Rotates the selected cross-section about the spline's axis at the given twist amount.

<void><Unwrap_UVW>.splineMap_RecomputeCrossSections()

NEW in 3ds Max 2009: Forces are rebuilding of the cross-sections.

<void><Unwrap_UVW>.splineMap_InsertCrossSection <index>splineIndex <float>u

NEW in 3ds Max 2009: Inserts a cross-section into the indexed spline at the given position along the spline. The u parameter is in the range from 0.0 to 1.0.

<void><Unwrap_UVW>.splineMap_Copy()

NEW in 3ds Max 2009: Copies the selected cross-section to the clipboard. If multiple cross-sections are selected, the one with the lowest index will be copied.

<void><Unwrap_UVW>.splineMap_Paste()

NEW in 3ds Max 2009: Pastes the cross-section from the clipboard onto the currently selected cross-sections.

<void><Unwrap_UVW>.splineMap_PasteToSelected <index>splineIndex <index>crossSectionIndex

NEW in 3ds Max 2009: Pastes the indexed cross-section of the indexed spline to the selected cross-sections.

<void><Unwrap_UVW>.splineMap_Dump()

NEW in 3ds Max 2009:

<void><Unwrap_UVW>.splineMap()

NEW in 3ds Max 2009:

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


UVW_Mapping_Add : Modifier

UVW_Mapping_Add - superclass: modifier; super-superclass:MAXWrapper - classID: #(838452838, 62170487)

Value > MAXWrapper > Modifier > UVW_Mapping_Add

The Add UVW Mapping Modifier is used by the Channel Utility to add mapping channels to objects..

Constructors:

UVW_Mapping_Add...

MapChannelAdd ...

Properties:

No Properties Exposed.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


UVW_Mapping_Clear : Modifier

UVW_Mapping_Clear - superclass: modifier; super-superclass:MAXWrapper - classID: #(838452838, 62170453)

Value > MAXWrapper > Modifier > UVW_Mapping_Clear

The Clear UVW Mapping Modifier is used by the Channel Utility to remove mapping channels from objects..

Constructors:

UVW_Mapping_Clear...

MapChannelDelete...

Properties:

<UVW_Mapping_Clear>.mapID Integer default: 1 -- integer; Map_ID

Get/Set the map ID.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


UVW_Mapping_Paste : Modifier

UVW_Mapping_Paste : modifier {31f9c666,3b4a566}

Value > MAXWrapper > Modifier > UVW_Mapping_Paste

The Paste UVW Mapping Modifier is used by the Channel Utility to paste mapping channels to objects..

Class instances not creatable by MAXScript

Alias:

MapChannelPaste

Properties:

.mapID (Map_ID) : integer

Get/Set the map ID.

.useMap (Use_Map) : Boolean

Get/Set the Use Map ID.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


UVW_Xform : Modifier

UVW_Xform - superclass: modifier; super-superclass:MAXWrapper - classID: #(1597169170, 0)

Value > MAXWrapper > Modifier > UVW_Xform

Constructor

uvw_xform ...

Properties

<UVW_Xform>.U_Tile Float default: 1.0 -- animatable

The tiling along the U-axis.

<UVW_Xform>.U_Flip Integer default: 0

When on, reverses the direction of the map along the U-axis.

0- Off

1- On

<UVW_Xform>.V_Tile Float default: 1.0 -- animatable

The tiling along the V-axis.

<UVW_Xform>.V_Flip Integer default: 0

When on, reverses the direction of the map along the V-axis.

0- Off

1- On

<UVW_Xform>.W_Tile Float default: 1.0 -- animatable

The tiling along the W-axis.

<UVW_Xform>.W_Flip Integer default: 0

When on, reverses the direction of the map along the W-axis.

0- Off

1- On

<UVW_Xform>.U_Offset Float default: 0.0 -- animatable

Offsets the map along the U-axis.

<UVW_Xform>.V_Offset Float default: 0.0 -- animatable

Offsets the map along the V-axis.

<UVW_Xform>.W_Offset Float default: 0.0 -- animatable

Offsets the map along the W-axis.

<UVW_Xform>.Map_or_Vertex_Color Integer default: 0

Specifies whether to apply the transform to a mapping channel or a vertex color channel:

0- Map Channel

  1. Vertex Color Channel

<UVW_Xform>.Map_Channel Integer default: 1 -- integer

Get/Set the affected map channel.

<UVW_Xform>.Rotation_Angle Float default: 0.0 -- animatable; angle;

Get/Set the rotation angle.

<UVW_Xform>.Rotation_Center Integer default: 0 -- integer

Get/Set the state of the "Rotate about center" checkbox. Possible values are

0 - unchecked

1 - checked.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


UVWmap : Modifier

Uvwmap - superclass: modifier; super-superclass:MAXWrapper - 15:1 - classID: #(1012401, 0)

Value > MAXWrapper > Modifier > UVWmap

Constructor

uvwmap ...

Properties

<Uvwmap>.maptype Integer default: 0

Determines the type of mapping coordinates used. Different kinds of mapping are distinguished by how the map is geometrically projected onto the object and how the projection interacts with the object’s surfaces.

0- Planar (Projects the map from a single plane flat against the object, somewhat like projecting a slide. Planar projection is useful when only one side of an object needs to be mapped. It is also useful for obliquely mapping multiple sides, and for mapping two sides of a symmetrical object.)

1- Cylindrical (Projects the map from a cylinder, wrapping it around an object. Seams where the edges of the bitmap meet are visible unless a seamless map is used. Cylindrical projection is useful for objects that are roughly cylindrical in shape.)

2- Spherical (Surrounds the object by projecting the map from a sphere. You see a seam and mapping singularities at the top and bottom of the sphere where the bitmap edges meet at the sphere’s poles. Spherical mapping is useful for objects that are roughly spherical in shape.)

3- Shrink Wrap (Uses spherical mapping, but truncates the corners of the map and joins them all at a single pole, creating only one singularity. Shrink-wrap mapping is useful when you want to hide the mapping singularity.)

4- Box (Projects the map from the six sides of a box. Each side projects as a planar map, and the effect on the surface depends on the surface normal. Each face is mapped from the closest box surface whose normal most closely parallels its own normal.)

5- Face (Applies a copy of the map to every face of an object. Pairs of faces sharing a hidden edge are mapped with the full rectangular map. Single faces with no hidden edge are mapped with a triangular portion of the map.)

6- XYZ to UVW (Maps 3D procedural coordinates to UVW coordinates. This "sticks" the procedural texture to the surface. If the surface stretches, so does the 3D procedural map.)

<Uvwmap>.cap Boolean default: false

When on, applies planar mapping coordinates to the caps of the cylinder.

<Uvwmap>.length Float default: 1.0 -- animatable

The length of the UVW mapping gizmo.

<Uvwmap>.width Float default: 1.0 -- animatable

The width of the UVW mapping gizmo.

<Uvwmap>.height Float default: 1.0 -- animatable

The height of the UVW mapping gizmo.

<Uvwmap>.utile Float default: 1.0 -- animatable, alias: U_Tile

The tiling of the UVW map along the U-axis.

<Uvwmap>.uflip Boolean default: false

When on, reverses the image about the U-axis.

<Uvwmap>.vtile Float default: 1.0 -- animatable, alias: V_Tile

The tiling of the UVW map along the V-axis.

<Uvwmap>.vflip Boolean default: false

When on, reverses the image about the V-axis.

<Uvwmap>.wtile Float default: 1.0 -- animatable, alias: W_Tile

The tiling of the UVW map along the W-axis.

<Uvwmap>.wflip Boolean default: false

When on, reverses the image about the W-axis.

<Uvwmap>.channel Integer default: 0

Specifies whether to apply the transform to a mapping channel or a vertex color channel:

0- Map Channel

1- Vertex Color Channel

<Uvwmap>.mapChannel Integer default: 1

The map channel used to apply mapping transforms.

<Uvwmap>.axis Integer default: 2

Specifies which axis of the gizmo is aligned with the local Z-axis of the object:

0- X

1- Y

2- Z

<Uvwmap>.gizmo SubAnim

Enables gizmo transformations. Turn on and then move, scale, and rotate the gizmo in the viewports to position the map. In the Material Editor, you turn on the Show Map in Viewport option to make the map visible in a shaded viewport, the map moves on the surface of the object as you transform the gizmo.

<Uvwmap.Gizmo>.position Point3 default: [0,0,0] -- animatable

The position of the UVWmap gizmo.

<Uvwmap.Gizmo>.rotation Quat default: (quat 0 0 -1 0) -- animatable

The rotation of the UVWmap gizmo.

<Uvwmap.Gizmo>.scale Point3 default: [1,1,1] -- animatable

The scale of the UVWmap gizmo.

NOTE:

The Gizmo property is not present until the Uvwmap modifier has been applied to a node.

Interfaces:

Interface: realWorldMapSizeInterface

Properties:

.realWorldMapSize : boolean : Read|Write

Enables/disables the real-world map size option. Available in 3ds Max 8 and higher.

See also

Modifier Sub-Object Transform Properties

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Spacewarp Binding SpacewarpModifiers

The SpaceWarp Binding SpacewarpModifiers are not directly created in MAXScript, but are rather created and applied to a node using the bindSpaceWarp() method. Most of the SpacewarpModifiers do not have any additional properties.

NOTE:

These classes are not available in Autodesk VIZ.

Constructors and Properties

SimpleOSMToWSMMod:

bindSpaceWarp <node> <spaceBend_node>

bindSpaceWarp <node> <spaceNoise_node>

bindSpaceWarp <node> <spaceSkew_node>

bindSpaceWarp <node> <spaceStretch_node>

bindSpaceWarp <node> <spaceTaper_node>

bindSpaceWarp <node> <spaceTwist_node>

BombBinding:

bindSpaceWarp <node> <bomb_node>

DeflectorBinding:

bindSpaceWarp <particlesys_node> <deflector_node>

DisplaceBinding:

bindSpaceWarp <node> <spaceDisplace_node>

FFD_Binding:

bindSpaceWarp <node> <spaceFFDBox_node>

bindSpaceWarp <node> <spaceFFDCyl_node>

GravityBinding:

bindSpaceWarp <node> <gravity_node>

MotorMod:

bindSpaceWarp <node> <motor_node>

PathFollowMod:

bindSpaceWarp <particlesys_node> <path_Follow_node>

PBombMod:

bindSpaceWarp <node> <pbomb_node>

PDynaFlectMod:

bindSpaceWarp <node> <PDynaFlect_node>

POmniFlectMod:

bindSpaceWarp <particlesys_node> <POmniFlect_node>

PushMod:

bindSpaceWarp <node> <pushSpaceWarp_node>

RippleBinding:

bindSpaceWarp <node> <spaceRipple_node>

<RippleBinding>.Flexibility Float default: 1.0 -- animatable

SDeflectMod:

bindSpaceWarp <particlesys_node> <sdeflector_node>

SDynaFlectMod:

bindSpaceWarp <node> <SDynaFlect_node>

SOmniFlectMod:

bindSpaceWarp <particlesys_node> <SOmniFlect_node>

SpaceConform:

bindSpaceWarp <node> <conformSpaceWarp_node>

UDeflectorMod:

bindSpaceWarp <particlesys_node> <uDeflector_node>

UDynaFlectMod:

bindSpaceWarp <node> <UDynaFlect_node>

UOmniFlectMod:

bindSpaceWarp <particlesys_node> <UOmniFlect_node>

WaveBinding:

bindSpaceWarp <node> <spaceWave_node>

<WaveBinding>.Flexibility Float default: 1.0 -- animatable

WindBinding:

bindSpaceWarp <node> <wind_node>

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Displace_Mesh : SpacewarpModifier

Displace_Mesh - superclass: SpacewarpModifier; super-superclass:MAXWrapper - classID: #(689841003, 608652637)

Value > MAXWrapper > Modifier > Displace_Mesh

Constructor

displace_Mesh ...

Properties

There are no additional properties for Displace_Mesh.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Displace_NURBS : SpacewarpModifier

Displace_NURBS - superclass: SpacewarpModifier; super-superclass:MAXWrapper - classID: #(1711236907, 1344482480)

Value > MAXWrapper > Modifier > Displace_NURBS

Constructor

displace_NURBS ...

Properties

There are no additional properties for Displace_NURBS.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


LS_Colors : SpacewarpModifier

LS_Colors - superclass: SpacewarpModifier; super-superclass:MAXWrapper - classID: #(1250446478, 407706705)

Value > MAXWrapper > Modifier > LS_Colors

Constructor

LS_Colors ...

lsColors ...

Properties

<LS_Colors>.addToColors BooleanClass default: false -- boolean; Add_to_colors

When set to true, the result of the color conversion is added to existing vertex color values, if there are any.

<LS_Colors>.brightness Float default: 50.0 -- animatable; float

Controls the brightness of the displayed image on your monitor. The setting of this control does not affect the actual lighting levels in the model.

<LS_Colors>.contrast Float default: 50.0 -- animatable; float

Controls the contrast between light and dark regions in the model.

<LS_Colors>.convertLight Integer default: 1 -- integer; Convert_Light

<LS_Colors>.daylight Boolean default: true -- boolean

Determines whether natural daylight is to be used in the calculation.

<LS_Colors>.exterior Boolean default: false -- boolean

Used for exterior daylight simulations.

<LS_Colors>.useExposureControl Boolean default: false -- boolean; Use_Exposure_Control

This option determines whether the Brightness, Contrast, Daylight and Exterior Scene parameters will be used for calculating the vertex colors, or the Exposure control attached to the scene.

<LS_Colors>.useSelfIllumination Boolean default: true -- boolean; Use_self_illumination

Enable/Disable self-illumination usage.

NOTES:

The LS_Colors Spacewarp Modifier is only applicable to objects of the LightscapeMesh class imported from Lightscape using the Lightscape Solution File Importer.

When a Lightscape scene is imported, the radiosity values are kept as irradiances, that is they describe the intensity of light falling on a mesh in physical units. This modifier converts the physical units to RGB colors. In conjunction with the LS_Mesh modifier, this modifier can be used to produce meshes suitable for game engines.

See also

LS_Mesh Modifier

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


MapScalerSpacewarpModifier : SpacewarpModifier

MapScalerSpacewarpModifier - superclass: SpacewarpModifier; super-superclass:MAXWrapper - classID: #(229485986, 0)

Value > MAXWrapper > Modifier > MapScalerSpacewarpModifier

Constructors:

MapScalerSpacewarpModifier ...

MapScalerOSM ...

Properties:

<MapScalerSpacewarpModifier>.scale Float default: 100.0 -- animatable; float

The size of one repeat of the texture pattern. Size is measured in current scene units. Repeats occur across the object in the U direction.

<MapScalerSpacewarpModifier>.channel Integer default: 1 -- integer

The map channel used.

<MapScalerSpacewarpModifier>.uOffset Float default: 0.0 -- animatable; float

The U direction map offset.

<MapScalerSpacewarpModifier>.vOffset Float default: 0.0 -- animatable; float

The V direction map offset.

<MapScalerSpacewarpModifier>.wrap Boolean default: true -- boolean

When true, Map Scaler attempts to wrap the texture evenly around the object. This option requires more computing, but usually produces the most satisfactory results.

<MapScalerSpacewarpModifier>.wrapUsingSmoothingGroups BooleanClass default: false -- boolean

Controls the state of Wrap using Smoothing Groups checkbox. When set to true and .wrap is also set to true, Map Scaler will attempt to wrap the texture around the object based on its smoothing groups. Available in 3ds Max 8 and higher.

<MapScalerSpacewarpModifier>.upDirection Integer default: 1 -- radio button number; localZUp

Sets the map alignment:

  1. World Z Axis (Aligns the map with the Z axis of the world.)

  2. Local Z Axis (Aligns the map with the local Z axis of the object.)

NOTES:

The two parameters for the MapScalerSpacewarpModifier, "U Offset" and "V Offset", will let you fine-tune mapping placement on a per-instance basis, as opposed to controlling from the texture map definition in the material. The values can be positive or negative, and are controlled independently.

If the Wrap toggle is ON, the offset values are ignored, and the controls are disabled. This is because "wrapping" determines the offsets for each face based on a specific previous face, so it doesn't make much sense to control the offset for just one face (or one set of coplanar faces). Therefore, if Wrap is ON, it works just as before. Likewise, if the U and V Offset values are 0, the results should be identical to previous versions.

See also

MapScaler : modifier

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Particle_Cache : SpacewarpModifier

Particle_Cache : SpacewarpModifier {21d07ae1,48d30bee}

Value > MAXWrapper > Modifier > Particle_Cache

Constructor

Class instances not creatable by MAXScript

Aliases

Particle_Cache

ParticleCache

Properties

<Particle_Cache>.time : float

<Particle_Cache>.start_time : float

<Particle_Cache>.end_time : float

<Particle_Cache>.samples : integer

<Particle_Cache>.cache_file : filename

<Particle_Cache>.recomputeOnChange (Recompute_on_size_change) : boolean

See also

Point_Cache - superclass: modifier

Point_CacheSpacewarpModifier - superclass: SpacewarpModifier


Point_CacheSpacewarpModifier - superclass: SpacewarpModifier

Point_CacheSpacewarpModifier : SpacewarpModifier

Point_CacheSpacewarpModifier - superclass: SpacewarpModifier; super-superclass:MAXWrapper - classID: #(923738083, 61950361)

Value > MAXWrapper > Modifier > Point_CacheSpacewarpModifier

In 3ds Max 9, the PointCache World Space Modifier has been replaced with a version of the PointCache2 modifier previously available as a free plug-in. Its cache format has also been adapted to allow interchangeability with the new PointCache in Autodesk Maya for easier animation transfer between the two applications.

The documentation of the old PointCache World Space Modifier in versions prior to 3ds Max 9 is provided at the bottom of this page for users developing scripts for earlier versions of 3ds Max.

Constructors

Point_CacheSpacewarpModifier ...

PointCacheWSM ...

Note: This class is not available in Autodesk VIZ.

Properties

<Point_CacheSpacewarpModifier>.fileName String default: "" -- filename

Get/set the cache file name.

Record

<Point_CacheSpacewarpModifier>.fileCount Integer default: 0 -- integer; File_Count

Get/Set the state of the file count radio buttons.

Possible values are:

0 - One File

1 - One File Per Frame

Available in 3ds Max 2008 and higher.

<Point_CacheSpacewarpModifier>.recordStart Float default: 0.0 -- float; Record_Start

Get/Set the cache record start time in Frames.

<Point_CacheSpacewarpModifier>.recordEnd Float default: 100.0 -- float; Record_End

Get/Set the cache record end time in Frames.

<Point_CacheSpacewarpModifier>.sampleRate Float default: 1.0 -- float; Sample_Rate

Get/Set the cache sample rate in samples per frame.

Load Type

<Point_CacheSpacewarpModifier>.loadType Integer default: 0 -- integer; Load_Type

Get/Set the Load Type mode when using the Point Cache on a local workstation. Possible values are:

0 - Stream - Keeps the cache file open for fast access, but only loads a single frame at a time to conserve memory.

1 - Per-Sample - Opens the cache file, reads a single frame, and then immediately closes the file. This is slower than the stream load type, but is useful if you have many users reading/writing the same set of cache files since the cache files won't be locked open as you read from them.

2 - Pre-Load - Loads the entire cache file into RAM for very fast access, and then closes the file. Specifically useful for networks, or when a few caches are used by many objects in one scene (in which case, turning this on will prevent each object from thrashing the disk on playback). Be conservative in using this, as it can eat up RAM fast (though if one cache file is used by several objects, the cache will only be loaded into RAM once).
See the pointCacheMan.GetUsedMemory() method for more info.

<Point_CacheSpacewarpModifier>.loadTypeSlave Integer default: 1 -- integer; Load_Type_Slave

Get/Set the Load Type mode when using the Point Cache on a network slave. Possible values are:

1 - Per-Sample

2 - Pre-Load

Playback Options

<Point_CacheSpacewarpModifier>.strength Float default: 1.0 -- animatable; float

Get/Set the cache Strength. Default is 1.0. Lower values will influence the mesh less than the vertex positions stored in the cache file. Higher values will exaggerate the animation.

<Point_CacheSpacewarpModifier>.relativeOffset BooleanClass default: false -- boolean; Relative_Offset

Get/Set the state of the Relative Offset option.

When true, only the differences from the first frame of the cache are used to distort the current object. If you would record a cache, set this option to true, add another modifier below the cache and modify the mesh, the recorded deformations will be added on top of the new deformations. Similarly, if the original recorded modifiers are still enabled, the object will get a double deformation.

When false, the point positions in the cache file explicitly set the point positions of the current object, overriding any additional deformations below the cache.

<Point_CacheSpacewarpModifier>.applyToWholeObject BooleanClass default: true -- boolean; Apply_To_Whole_Object

Get/Set the state of the Apply to Whole Object option.

Playback Type

<Point_CacheSpacewarpModifier>.playbackType Integer default: 0 -- integer; Playback_Type

Get/Set the Playback type. Possible values are:

0 - Original Range - This will always play back the cache over the range it was originally recorded (so the animation will always be the same as the original).

1 - Custom Start - This will play back the cache from a custom start time, but the animation length/playback speed will be the same as the original animation).

2 - Custom Range - This allows you to set a start and end frames that the current cache plays back within. Using a range that is smaller than the original record range will play the cache back faster, a larger range plays the cache back slower.

3 - Playback Graph - Allows you to animate which cache frame is played at any given time.
For example, if you record a cache from frame 0 to 100, set this parameter to 0 at frame 0, and animate it to 100 at frame 100. The function curve of this parameter in trackview shows how the cache is played back. Animating this lets you do interesting effects like slowing a cache down over time, or ping pong the cache playback, etc.

<Point_CacheSpacewarpModifier>.playbackStart Float default: 0.0 -- float; Playback_Start

Get/Set the Playback Start value.

<Point_CacheSpacewarpModifier>.playbackEnd Float default: 100.0 -- float; Playback_End

Get/Set the Playback End value.

<Point_CacheSpacewarpModifier>.playbackFrame Float default: 0.0 -- animatable; float; Playback_Frame

Get/Set the Playback Frame. This value can be keyframes to control the playback when in Playback Graph mode.

<Point_CacheSpacewarpModifier>.clampGraph BooleanClass default: false -- boolean; Clamp_Graph

Get/Set the state of the Clamp Graph option. It controls what gets loaded when the playback graph frame is out of the original recorded range.
For example if the playback frame is set to 105, but the original cache was recorded from 0 to 100. With clampGraph set to true, the loaded frame will be 100. When set to false, the cache will "wrap around" and load frame 5.
This way, you can loop caches more easily. In the example above, you could simply have a two key playback graph. Key 1 would be at frame 0 with a value of 0, and key 2 would be at frame 100 with a value of 100. Then you would set the out-of-range type for the graph to "linear extrapolate", and the cache would smoothly loop back to the beginning at frame 101.

The following properties are not exposed to the UI and are not fully supported:

<Point_CacheSpacewarpModifier>.applyMeshToSpline BooleanClass default: false -- boolean; Apply_To_Spline

This option is not exposed to the UI. It should not be used.

<Point_CacheSpacewarpModifier>.forceUncPath BooleanClass default: true -- boolean; Force_UNC_Path

Get/Set whether to force the cache path to UNC path or not. This option is not exposed to the UI.

<Point_CacheSpacewarpModifier>.interpolationType Integer default: 0 -- integer; Interpolation_Type

This option is not exposed to the UI. It should not be used.

<Point_CacheSpacewarpModifier>.playbackORTafter Integer default: 0 -- integer; Playback_Out_Of_Range_After

This option is not exposed to the UI.

<Point_CacheSpacewarpModifier>.playbackORTbefore Integer default: 0 -- integer; Playback_Out_Of_Range_Before

This option is not exposed to the UI.

<Point_CacheSpacewarpModifier>.preLoadCache BooleanClass default: false -- boolean; PreLoad_Cache

Get/Set whether to preload the cache when the scene is loaded. This option is not exposed to the UI.

PointCacheMan Struct

pointCacheMan.GetMemoryUsed()

Returns the memory used by Point Caches in the scene.

cacheOps Struct

cacheOps.DisableBelow <PointCacheWSM>

Disables all modifiers below the Point Cache Space Warp.

cacheOps.EnableBelow <PointCacheWSM>

Enables all modifiers below the Point Cache Space Warp.

cacheOps.RecordCache <PointCacheWSM>

Records the cache data of the given Point Cache Space Warp to disk.

cacheOps.Reload <PointCacheWSM>

Reloads the cache data of the given Point Cache Space Warp from disk.

cacheOps.Unload <PointCacheWSM>

Unloads the cache data of the given Point Cache Space Warp from memory.

Old Definition Prior To 3ds Max 9

Point_CacheSpaceWarpModifier : SpaceWarpModifier

Point_CacheSpacewarpModifier - superclass: SpacewarpModifier; super-superclass:MAXWrapper - 7:0 - classID: #(567311073, 1221790701)

Constructors

Point_CacheSpacewarpModifier ...

PointCacheWSM ...

Note: This class is not available in Autodesk VIZ.

Properties

<Point_CacheSpacewarpModifier>.time Float default: 0.0 -- float

<Point_CacheSpacewarpModifier>.start_time Float default: 0.0 -- float

The frame number at which the cached animation starts playing back. Using decimal fractions lets you start at a sub-frame setting when using a Frame:Ticks time display. Default=0.0.

Sets the first frame for recording the vertex animation.

<Point_CacheSpacewarpModifier>.end_time Float default: 100.0 -- float

Sets the last frame for recording the vertex animation.

<Point_CacheSpacewarpModifier>.samples Integer default: 1 -- integer

<Point_CacheSpacewarpModifier>.cache_file Filename default: undefined -- string

Loads a vertex animation from a cache file on disk into the Point Cache modifier. If number of vertices in the cache file does not match the number of vertices in the object, a warning appears, but no error occurs.

<Point_CacheSpacewarpModifier>.relativeOffset Boolean default: false -- boolean; Relative_Offset

Makes the Strength setting available. This enables offsetting the animated vertex positions relative to their positions as recorded. Default=off.

Note: When you turn on Use Relative Offsets and play back a cached animation with the modifiers turned on, the cached vertex positions are calculated relative to their positions as calculated by the modifiers. For example, if you record a Bend animation to a cache file, and then play it back with both Use Relative Offsets and the Bend modifier turned on and Strength=1.0, all vertex positions are doubled, resulting in exaggerated motion.

<Point_CacheSpacewarpModifier>.strength Float default: 1.0 -- animatable; float

Affects the motion relative to the original animation. Available only when Use Relative Offsets is turned on. Default=1.0. Range=-10.0 to 10.0.

At 1.0, the animation plays back the same as recorded. With strengths between 0 and 1, the animation is relatively restrained. At strengths greater than 1, the animation is exaggerated. With negative Strength settings, the motion is reversed.

Point Cache Interfaces:

Interface: pointCacheWSM

Methods

<void>record()

Stores the vertex animation to a disk file. Call Record to activate the Save Points dialog, which lets you specify a path and file name for the cache file. Click OK to record the file, and then load it into the Point Cache modifier, ready for playback.

<void>setCache()

Loads a vertex animation from a cache file on disk into the Point Cache Spacewarp modifier. If number of vertices in the cache file does not match the number of vertices in the object, a warning appears, but no error occurs.

<void>enableMods()

Turns on all stack modifiers below the Point Cache SpaceWarp modifier. Use this when you want to change modifier settings.

<void>disableMods()

Turns off all the object's stack modifiers below Point Cache SpaceWarp so that only the cached vertex animation appears when you play back the animation.

See also

Point_Cache : Modifier


SpaceCameraMap : SpacewarpModifier

SpaceCameraMap - superclass: SpacewarpModifier; super-superclass:MAXWrapper - classID: #(383533907, 767575985)

Value > MAXWrapper > Modifier > SpaceCameraMap

Constructor

SpaceCameraMap ...

Properties

<SpaceCameraMap>.camera Node default: undefined

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


SpacePatchDeform : SpacewarpModifier

SpacePatchDeform - superclass: SpacewarpModifier; super-superclass:MAXWrapper - classID: #(1068375055, 732573781)

Value > MAXWrapper > Modifier > SpacePatchDeform

Constructor

SpacePatchDeform ...

Properties

<SpacePatchDeform>.U_Percent Float default: 50.0 -- animatable, percentage

Moves the object along the U (horizontal) axis of the gizmo patch, based on a percentage of the U distance. This defaults to a setting of 50 percent, which places the object at the center of the gizmo patch. A setting of 0 percent places the object at the left edge of the gizmo patch, as seen from the viewport where the patch was created.

<SpacePatchDeform>.U_Stretch Float default: 1.0 -- animatable

Scales the object along the U (horizontal) axis of the gizmo patch.

<SpacePatchDeform>.V_Percent Float default: 50.0 -- animatable, percentage

Moves the object along the V (vertical) axis of the gizmo patch, based on a percentage of the V distance. A setting of 0 percent places the object at the bottom of the gizmo patch.

<SpacePatchDeform>.V_Stretch Float default: 1.0 -- animatable

Scales the object along the V (vertical) axis of the gizmo patch.

<SpacePatchDeform>.rotation Float default: 0.0 -- animatable, angle

Rotates the modified object with respect to the gizmo patch.

<SpacePatchDeform>.Plane_to_Patch_Deform Integer default: 0

Choose a two-axis plane of the object to make parallel with the XY plane of the gizmo patch:

0- XY

1- YZ

2- ZX

<SpacePatchDeform>.Flip_deformation_axis Integer default: 0

When on, reverses the gizmo direction:

0- Off

1- On

NOTES:

There is no way to specify the patch to deform to using MAXScript.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


SpacePathDeform : SpacewarpModifier

SpacePathDeform - superclass: SpacewarpModifier; super-superclass:MAXWrapper - classID: #(69812, 32670)

Value > MAXWrapper > Modifier > SpacePathDeform

Constructor

SpacePathDeform ...

Properties

<SpacePathDeform>.path Node default: undefined

The node designated as the path.

<SpacePathDeform>.Percent_along_path Float default: 0.0 -- animatable, percentage

Moves the object along the gizmo path based on a percentage of the path length.

<SpacePathDeform>.Stretch Float default: 1.0 -- animatable

Scales the object along the gizmo path, using the object’s pivot point as the base of the scale.

<SpacePathDeform>.rotation Float default: 0.0 -- animatable, angle

Rotates the object about the gizmo path.

<SpacePathDeform>.Twist Float default: 0.0 -- animatable, angle

Twists the object about the path. The twist angle is based on the rotation of one end of the overall length of the path. Typically, the deformed object takes up only a portion of the path, so the effect can be subtle.

<SpacePathDeform>.axis Integer default: 2

Choose one to rotate the gizmo path to align with a specified local axis of the object:

0- X

1- Y

2- Z

<SpacePathDeform>.Flip_deformation_axis Integer default: 0

When on, reverses the gizmo path 180 degrees about the specified axis.

0- Off

1- On

NOTE:

The PathDeform World Space Modifier provides an additional "Move To Path" button in the UI which is not directly exposed to MAXScript, but its functionality can be easily scripted.

What it does is setting the transformation matrix of the deformed object to the transformation matrix of the deformation path.

EXAMPLE

thePath = Circle pos:[200,300,400] --create a circle

theObj = Box heightsegs:20 --create a box with 20 height segments

theMod = SpacePathDeform() --create an instance of the PathDeform WSM

addModifier theObj theMod --add to the box

theMod.path = thePath --set the path to the Circle shape

theObj.transform = thePath.transform --MOVE TO PATH!

You can link the deformed object to the path to keep the transformation matrix identical - moving the path around should keep the deformed object aligned.

See also

PathDeform : Modifier

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


SpaceSurfDeform : SpacewarpModifier

SpaceSurfDeform - superclass: SpacewarpModifier; super-superclass:MAXWrapper - classID: #(1161891894, 555366610)

Value > MAXWrapper > Modifier > SpaceSurfDeform

NOTE:

This class is not available in Autodesk VIZ.

Constructor

SpaceSurfDeform ...

Properties

<SpaceSurfDeform>.surface Node default: undefined

The surface used for deformation.

<SpaceSurfDeform>.U_Percent Float default: 50.0 -- animatable, percentage

Moves the object along the U (horizontal) axis of the gizmo patch, based on a percentage of the U distance. This defaults to a setting of 50 percent, which places the object at the center of the gizmo patch. A setting of 0 percent places the object at the left edge of the gizmo patch, as seen from the viewport where the patch was created.

<SpaceSurfDeform>.U_Stretch Float default: 1.0 -- animatable

Scales the object along the U (horizontal) axis of the gizmo patch.

<SpaceSurfDeform>.V_Percent Float default: 50.0 -- animatable, percentage

Moves the object along the V (vertical) axis of the gizmo patch, based on a percentage of the V distance. A setting of 0 percent places the object at the bottom of the gizmo patch.

<SpaceSurfDeform>.V_Stretch Float default: 1.0 -- animatable

Scales the object along the V (vertical) axis of the gizmo patch.

<SpaceSurfDeform>.rotation Float default: 0.0 -- animatable, angle

Rotates the modified object with respect to the gizmo patch.

<SpaceSurfDeform>.Plane_to_Patch_Deform Integer default: 0

Choose a two-axis plane of the object to make parallel with the XY plane of the gizmo patch:

0- XY

1- YZ

2- ZX

<SpaceSurfDeform>.Flip_deformation_axis Integer default: 0

Flip_deformation_axis = 0 - off; 1 - on

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


SubdivideSpacewarpModifier : SpacewarpModifier

subdivideSpacewarpModifier - superclass: SpacewarpModifier; super-superclass:MAXWrapper - classID: #(756131754, 213087256)

Value > MAXWrapper > Modifier > SubdivideSpacewarpModifier

The SubdivideSpacewarpModifier provides procedural means for subdividing polygons for radiosity processing.

Constructor

subdivideSpacewarpModifier ...

Properties

<subdivideSpacewarpModifier>.manualUpdate Integer default: 1 -- integer; Manual_Update

Get/Set the Update mode of the modifier:

0 - Manual

1 - Automatic

2 - Render

<subdivideSpacewarpModifier>.showAllTriangles Boolean default: true -- boolean; Show_All_Triangles

Get/Set the state of the "Display Subdivisions" checkbox. Controls whether to display the subdivision in the viewport or not.

<subdivideSpacewarpModifier>.size Float default: 39.3701 -- world units

Get/Set the Subdivision Size value.

See also

Subdivide : Modifier

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Surface_Mapper : SpacewarpModifier

Surface_Mapper - superclass: SpacewarpModifier; super-superclass:MAXWrapper - classID: #(-1717866581, -1718324347)

Value > MAXWrapper > Modifier > Surface_Mapper

Constructor

Surface_Mapper ...

Properties

There are no additional properties for Surface_Mapper.

Methods

updateSurfaceMapper <surface_mapper>

This method has the effect of performing a manual update to the mapping provided by the associated NURBS surface.

NOTE:

There is no way to specify the Source Texture Surface using MAXScript.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


World Space Modifiers - Validity Methods

The following method can be used to determine whether a Space Warp can be applied to a given object.

This method is available in 3ds Max 2008 and higher.

<Boolean>IsSpaceWarpValid <Scene Object>object <Space warp>warp

Returns true if it is possible to add the given space warp to the specified scene object, false otherwise.

object – Any scene object that you want to apply the Space Warp too.

warp – Any Space Warp object instance.

EXAMPLE USAGE:

(

local b = box()

local p = parray()

local o = omnilight()

for class in SpacewarpObject.classes do (

if ( class.creatable ) then (

local inst = class()

for obj in #(b,p,o) do (

if (IsSpaceWarpValid obj inst) then

 format "+% can be applied to %\n" class obj

else

 format "-% CANNOT be applied to %\n" class obj

)--end obj loop

)--end if creatable

)--end class loop

)--end script

RESULT:

+SpaceBend can be applied to $Box:Box04 @ [0.000000,0.000000,0.000000]

+SpaceBend can be applied to $PArray:PArray03 @ [0.000000,0.000000,0.000000]

-SpaceBend CANNOT be applied to $Omni_Light:Omni03 @ [0.000000,0.000000,0.000000]

+SpaceTaper can be applied to $Box:Box04 @ [0.000000,0.000000,0.000000]

+SpaceTaper can be applied to $PArray:PArray03 @ [0.000000,0.000000,0.000000]

-SpaceTaper CANNOT be applied to $Omni_Light:Omni03 @ [0.000000,0.000000,0.000000]

+Spaceripple can be applied to $Box:Box04 @ [0.000000,0.000000,0.000000]

+Spaceripple can be applied to $PArray:PArray03 @ [0.000000,0.000000,0.000000]

-Spaceripple CANNOT be applied to $Omni_Light:Omni03 @ [0.000000,0.000000,0.000000]

+Spacewave can be applied to $Box:Box04 @ [0.000000,0.000000,0.000000]

+Spacewave can be applied to $PArray:PArray03 @ [0.000000,0.000000,0.000000]

-Spacewave CANNOT be applied to $Omni_Light:Omni03 @ [0.000000,0.000000,0.000000]

+SpaceTwist can be applied to $Box:Box04 @ [0.000000,0.000000,0.000000]

+SpaceTwist can be applied to $PArray:PArray03 @ [0.000000,0.000000,0.000000]

-SpaceTwist CANNOT be applied to $Omni_Light:Omni03 @ [0.000000,0.000000,0.000000]

+SpaceStretch can be applied to $Box:Box04 @ [0.000000,0.000000,0.000000]

+SpaceStretch can be applied to $PArray:PArray03 @ [0.000000,0.000000,0.000000]

-SpaceStretch CANNOT be applied to $Omni_Light:Omni03 @ [0.000000,0.000000,0.000000]

+gravity can be applied to $Box:Box04 @ [0.000000,0.000000,0.000000]

+gravity can be applied to $PArray:PArray03 @ [0.000000,0.000000,0.000000]

-gravity CANNOT be applied to $Omni_Light:Omni03 @ [0.000000,0.000000,0.000000]

+Wind can be applied to $Box:Box04 @ [0.000000,0.000000,0.000000]

+Wind can be applied to $PArray:PArray03 @ [0.000000,0.000000,0.000000]

-Wind CANNOT be applied to $Omni_Light:Omni03 @ [0.000000,0.000000,0.000000]

+Spacedisplace can be applied to $Box:Box04 @ [0.000000,0.000000,0.000000]

+Spacedisplace can be applied to $PArray:PArray03 @ [0.000000,0.000000,0.000000]

-Spacedisplace CANNOT be applied to $Omni_Light:Omni03 @ [0.000000,0.000000,0.000000]

+Deflector can be applied to $Box:Box04 @ [0.000000,0.000000,0.000000]

+Deflector can be applied to $PArray:PArray03 @ [0.000000,0.000000,0.000000]

-Deflector CANNOT be applied to $Omni_Light:Omni03 @ [0.000000,0.000000,0.000000]

+Bomb can be applied to $Box:Box04 @ [0.000000,0.000000,0.000000]

-Bomb CANNOT be applied to $PArray:PArray03 @ [0.000000,0.000000,0.000000]

-Bomb CANNOT be applied to $Omni_Light:Omni03 @ [0.000000,0.000000,0.000000]

+PDynaFlect can be applied to $Box:Box04 @ [0.000000,0.000000,0.000000]

+PDynaFlect can be applied to $PArray:PArray03 @ [0.000000,0.000000,0.000000]

-PDynaFlect CANNOT be applied to $Omni_Light:Omni03 @ [0.000000,0.000000,0.000000]

+Vortex can be applied to $Box:Box04 @ [0.000000,0.000000,0.000000]

+Vortex can be applied to $PArray:PArray03 @ [0.000000,0.000000,0.000000]

-Vortex CANNOT be applied to $Omni_Light:Omni03 @ [0.000000,0.000000,0.000000]

+UOmniFlect can be applied to $Box:Box04 @ [0.000000,0.000000,0.000000]

+UOmniFlect can be applied to $PArray:PArray03 @ [0.000000,0.000000,0.000000]

-UOmniFlect CANNOT be applied to $Omni_Light:Omni03 @ [0.000000,0.000000,0.000000]

+UDeflector can be applied to $Box:Box04 @ [0.000000,0.000000,0.000000]

+UDeflector can be applied to $PArray:PArray03 @ [0.000000,0.000000,0.000000]

-UDeflector CANNOT be applied to $Omni_Light:Omni03 @ [0.000000,0.000000,0.000000]

+PushSpaceWarp can be applied to $Box:Box04 @ [0.000000,0.000000,0.000000]

+PushSpaceWarp can be applied to $PArray:PArray03 @ [0.000000,0.000000,0.000000]

-PushSpaceWarp CANNOT be applied to $Omni_Light:Omni03 @ [0.000000,0.000000,0.000000]

+ConformSpaceWarp can be applied to $Box:Box04 @ [0.000000,0.000000,0.000000]

+ConformSpaceWarp can be applied to $PArray:PArray03 @ [0.000000,0.000000,0.000000]

-ConformSpaceWarp CANNOT be applied to $Omni_Light:Omni03 @ [0.000000,0.000000,0.000000]

+SDynaFlect can be applied to $Box:Box04 @ [0.000000,0.000000,0.000000]

+SDynaFlect can be applied to $PArray:PArray03 @ [0.000000,0.000000,0.000000]

-SDynaFlect CANNOT be applied to $Omni_Light:Omni03 @ [0.000000,0.000000,0.000000]

+Drag can be applied to $Box:Box04 @ [0.000000,0.000000,0.000000]

+Drag can be applied to $PArray:PArray03 @ [0.000000,0.000000,0.000000]

-Drag CANNOT be applied to $Omni_Light:Omni03 @ [0.000000,0.000000,0.000000]

+WaterSpaceWarp can be applied to $Box:Box04 @ [0.000000,0.000000,0.000000]

+WaterSpaceWarp can be applied to $PArray:PArray03 @ [0.000000,0.000000,0.000000]

-WaterSpaceWarp CANNOT be applied to $Omni_Light:Omni03 @ [0.000000,0.000000,0.000000]

+PBomb can be applied to $Box:Box04 @ [0.000000,0.000000,0.000000]

+PBomb can be applied to $PArray:PArray03 @ [0.000000,0.000000,0.000000]

-PBomb CANNOT be applied to $Omni_Light:Omni03 @ [0.000000,0.000000,0.000000]

+POmniFlect can be applied to $Box:Box04 @ [0.000000,0.000000,0.000000]

+POmniFlect can be applied to $PArray:PArray03 @ [0.000000,0.000000,0.000000]

-POmniFlect CANNOT be applied to $Omni_Light:Omni03 @ [0.000000,0.000000,0.000000]

+Motor can be applied to $Box:Box04 @ [0.000000,0.000000,0.000000]

+Motor can be applied to $PArray:PArray03 @ [0.000000,0.000000,0.000000]

-Motor CANNOT be applied to $Omni_Light:Omni03 @ [0.000000,0.000000,0.000000]

+SOmniFlect can be applied to $Box:Box04 @ [0.000000,0.000000,0.000000]

+SOmniFlect can be applied to $PArray:PArray03 @ [0.000000,0.000000,0.000000]

-SOmniFlect CANNOT be applied to $Omni_Light:Omni03 @ [0.000000,0.000000,0.000000]

+SpaceFFDBox can be applied to $Box:Box04 @ [0.000000,0.000000,0.000000]

+SpaceFFDBox can be applied to $PArray:PArray03 @ [0.000000,0.000000,0.000000]

-SpaceFFDBox CANNOT be applied to $Omni_Light:Omni03 @ [0.000000,0.000000,0.000000]

+UDynaFlect can be applied to $Box:Box04 @ [0.000000,0.000000,0.000000]

+UDynaFlect can be applied to $PArray:PArray03 @ [0.000000,0.000000,0.000000]

-UDynaFlect CANNOT be applied to $Omni_Light:Omni03 @ [0.000000,0.000000,0.000000]

+SDeflector can be applied to $Box:Box04 @ [0.000000,0.000000,0.000000]

+SDeflector can be applied to $PArray:PArray03 @ [0.000000,0.000000,0.000000]

-SDeflector CANNOT be applied to $Omni_Light:Omni03 @ [0.000000,0.000000,0.000000]

+SpaceSkew can be applied to $Box:Box04 @ [0.000000,0.000000,0.000000]

+SpaceSkew can be applied to $PArray:PArray03 @ [0.000000,0.000000,0.000000]

-SpaceSkew CANNOT be applied to $Omni_Light:Omni03 @ [0.000000,0.000000,0.000000]

+Vector_Field can be applied to $Box:Box04 @ [0.000000,0.000000,0.000000]

+Vector_Field can be applied to $PArray:PArray03 @ [0.000000,0.000000,0.000000]

-Vector_Field CANNOT be applied to $Omni_Light:Omni03 @ [0.000000,0.000000,0.000000]

+Path_Follow can be applied to $Box:Box04 @ [0.000000,0.000000,0.000000]

+Path_Follow can be applied to $PArray:PArray03 @ [0.000000,0.000000,0.000000]

-Path_Follow CANNOT be applied to $Omni_Light:Omni03 @ [0.000000,0.000000,0.000000]

+SpaceNoise can be applied to $Box:Box04 @ [0.000000,0.000000,0.000000]

+SpaceNoise can be applied to $PArray:PArray03 @ [0.000000,0.000000,0.000000]

-SpaceNoise CANNOT be applied to $Omni_Light:Omni03 @ [0.000000,0.000000,0.000000]

+SpaceFFDCyl can be applied to $Box:Box04 @ [0.000000,0.000000,0.000000]

+SpaceFFDCyl can be applied to $PArray:PArray03 @ [0.000000,0.000000,0.000000]

-SpaceFFDCyl CANNOT be applied to $Omni_Light:Omni03 @ [0.000000,0.000000,0.000000]

OK


World Space Modifiers - Force-Related Methods

The following methods can be used to calculate forces defined by World Space Modifiers (Space Warps).

These methods are available in 3ds Max 2008 and higher. They were previously available in the [ AVG ] Avguard Extensions.

WSMApplyFC <WSM_node_array> <pos_point3_array> <vel_point3_array> <force_point3_array> interval:<interval> stepsize:<time>

Applies force-field (Particles & Dynamics + Displace) and deflector (Particles Only) type Space Warps to the position, velocity, and force array values.

Units:

The position values are in 3ds Max units, the velocity values are in 3ds Max units/tick, the force values are in 3ds Max units/tick^2 (mass assumed to be == 1).

The position, velocity, and force arrays must be the same size.

Evaluation Interval and Order:

The effects of the space warps are evaluated over the specified interval, with a default interval of (interval currenttime (currenttime+1f)), using the specified stepsize, with a default of 1 frame.

The effect of the force-field space warps are first evaluated in the order specified, followed by the deflector space warps in the order specified.

The values in the position, velocity, and force arrays are replaced with the results of the evaluation of the effects of the space warps

The supplied force values are applied prior to the space warps being applied.

Initial Values:

Normally you want to set the force array to contain values of [0,0,0] prior to calling this method. Only if you are calculating an additional force in your script would you set the force array to other values. The position and velocity arrays would normally contain the results of the last call to this method.

Supported Space Warps:

Any force-field space warp, including 3rd party plug-ins, should work correctly.

Only the deflector space warps that ship with 3ds Max are supported.

The Path Follow space warp is not supported as it requires a particle system.

EXAMPLE USAGE:

(

resetMaxFile #noPrompt

gravity pos:[41.7827,242.9,0] isSelected:on iconSize:33.4742 transform:(matrix3 [1,0,0] [0,-1,0] [0,0,-1] [41.7827,242.9,0])

Deflector bounce:1 width:101.617 length:74.9636 transform:(matrix3 [1,0,0] [0,0.751713,0.659491] [0,-0.659491,0.751713] [16.7722,4.28949,-146.329])

posArray=#([10,0,0],[10,10,0])

velArray=#([0,0,0],[0,0,0])

forceArray=#([0,0,0],[0,0,0])

for i = 0 to 40 do (

point pos:posArray[1] wirecolor:red

point pos:posArray[2] wirecolor:blue

at time i WSMApplyFC #($gravity01,$deflector01) posArray velArray forceArray

)

)

<bool>WSMSupportsForce <node>

Returns true if the specified node can be used as a force-field type space warp for WSMApplyFC().

<bool>WSMSupportsCollision <node>

Returns true if the specified node can be used as a deflector type space warp for WSMApplyFC().


Material : MAXWrapper

Value > MAXWrapper > Material

The Material class represents the materials which you can assign to objects in 3ds Max. You can create materials like standard, blend, and raytrace, access various properties on them, and assign these materials to 3ds Max objects.

The classes derived directly from the Material class are described in Material Types . Other classes are derived from these classes, and inherit the properties and methods defined for the Material class.

The properties, operators, and methods that are common to all classes derived directly from the Material class are described in Material Common Properties, Operators, and Methods .

The Material class is derived from the MAXWrapper class, and inherits the properties and methods defined for that class. These properties and methods are described in MAXWrapper .


Material Common Properties, Operators, and Methods

Value > MAXWrapper > Material

Properties

<material>.name

All the material subclasses can access the name property and specify it as a constructor parameter.

<material>.effectsChannel

All the material subclasses can access the effectsChannel property and specify it as a constructor parameter.

<material>.showInViewport

Accesses the material-level show-in-viewport state, which can also be set on a material constructor call using the showInViewport: parameter.

Example:

b=box()

b.material = standard diffuseMap:(checker()) showInViewport:true

Methods

assignNewName <material>

Modifies the name of the specified material to make it unique. The name is of the form "Material #1" where the number is incremented as required to make ensure it’s unique.

okMtlForScene <material>

Tests the material name against other material names in the scene, and returns true if there are no other materials with the same name, false otherwise. Before assigning material to scene, call this to avoid duplicate names.

getMTLMEditFlags ( <material> | <texture> )

setMTLMEditFlags ( <material> | <texture> ) <bitarray>

Get and set the MEdit options for the specified material or texture as a <bitarray>. If a bit is on, the corresponding option is turned on. The order of the bits is: #{MTL_BEING_EDITED,BACKGROUND,BACKLIGHT,VIDEO_COLOR_CHECK}

The first bit is set if the rollout for the specified material or texture is currently displayed in the active MEdit slot. The state of this bit is ignored in setMTLMEditFlags().

getMTLMeditObjType ( <material> | <texture> )

setMTLMeditObjType ( <material> | <texture> ) <integer>

Get and set the MEdit sample object type for the specified material or texture. The valid values are: 1 - sphere; 2 - cylinder; 3 - cube; 4 - custom

getMTLMeditTiling ( <material> | <texture> )

setMTLMeditTiling ( <material> | <texture> ) <integer>

Get and set the MEdit tiling type for the specified material or texture. The valid values are: 1 - 1x1; 2 - 2x2; 3 - 3x3; 4 - 4x4

updateMTLInMedit ( <material> | <texture> )

Performs a set of 3ds Max notifications that forces an update of the material or texture throughout 3ds Max, including the MEdit and material browser.

You can get and set Material Editor materials using the getMeditMaterial() and setMeditMaterial() functions. You can also get a material from the Material Editor using the meditMaterials virtual array. See Material Editor and MaterialLibrary Values for more information.

The following methods are available in 3ds Max 6 and higher:

getNumSubMtls <material>

This method returns the number of sub materials for the material.

getSubMtl <material> <index>

This method returns the indexed sub material of the material.

setSubMtl <material> <index> <material>

This method sets the indexed sub material of the material to the specified material.

getSubMtlSlotName <material> <index>

This method returns the slot name of the indexed sub material of the material.

getNumSubTexmaps (<material> | <texture>)

This method returns the number of sub textures for the material or texture.

getSubTexmap (<material> | <texture>) <index>

This method returns the indexed sub texture of the material or texture.

setSubTexmap (<material> | <texture>) <index> <texture>

This method sets the indexed sub texture of the material or texture to the specified texture.

getSubTexmapSlotName (<material> | <texture>) <index>

This method returns the slot name of the indexed sub texture of the material or texture.

See also

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Material Types

Value > MAXWrapper > Material

The following list displays the 3ds Max material subclasses:

Advanced_Lighting_Override

Architectural

Blend

CompositeMaterial

DirectX_9_Shader

DoubleSided

InkNPaint

Lightscape_Mtl

MatteShadow

MorpherMaterial

MultiMaterial

NoMaterial

RaytraceMaterial

Shell_Material

Shellac

Standard

TopBottom


Advanced_Lighting_Override : Material

Advanced_Lighting_Override - superclass: material; super-superclass:MAXWrapper - classID: #(689195325, 1828668151)

Value > MAXWrapper > Material > Advanced_Lighting_Override

This material is used to override the physical properties of the Base material for radisosity calculations.

NOTES:

The Advanced_Lighting_Override material found in 3ds Max is called Radiosity_Override in Autodesk VIZ, but has the same classID in both applications!

Class instances of this material can also be constructed in both applications using the alias discreetRadiosityMaterial. It is a good idea to use the alias in your scripts to ensure compatibility between 3ds Max and Autodesk VIZ.

Checking the class using

classof my_mat == discreetRadiosityMaterial

will return true in both applications.

3ds Max Constructors

advanced_lighting_override...

discreetRadiosityMaterial...

Autodesk VIZ Constructors

radiosity_override ...

discreetRadiosityMaterial ...

Properties

<Advanced_Lighting_Override>.baseMaterial Standardmaterial default: (null):Standard -- material; SubAnim

Contains the base material whose radiosity properties have to be controlled.

<Advanced_Lighting_Override>.bumpScale Float default: 1.0 -- animatable; float

Get/Set the Bump Scale value. Scales the effect of the base material's Bump Mapping in areas lit by indirect light. When this value is zero, no bump mapping is done for indirect light. Increasing Indirect Light Bump Scale increases the bump effect under indirect lighting. This value does not affect the Bump amount in areas where the base material is lit directly.

<Advanced_Lighting_Override>.colorBleed Float default: 1.0 -- animatable; float

Get/Set the Color Bleeding value. Controls the saturation of reflected color during radiosity processing. Range from 0.0 to 1.0 in Autodesk VIZ. Range from 0.0 to 1000.0 in 3ds Max.

<Advanced_Lighting_Override>.luminanceScale Float default: 0.0 -- animatable; float

Get/Set the Luminance Scale value. Scales the self-illumination component of the base material.

<Advanced_Lighting_Override>.reflectanceScale Float default: 1.0 -- animatable; float

Get/Set the Reflectance Scale value. Used to Scale increases or decreases the energy of reflected rays. Range from 0.1 to 5.0 in Autodesk VIZ. Range from 0.0 to 1000.0 in 3ds Max.

<Advanced_Lighting_Override>.transmittanceScale Float default: 1.0 -- animatable; float

Get/Set the Transmittance Scale value. Used to control the amount of radiosity energy the material transmits. Range from 0.0 to 1000.0 in 3ds Max. (Range from 0.1 to 5.0 in the Radiosity_Override material in Autodesk VIZ.)

See also

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Architectural : Material

Architectural - superclass: material; super-superclass:MAXWrapper - 57:1 - classID: #(332471230, 1763586103)

Architectural is a material class providing simplified user interface for advanced material effects in 3ds Max 6 and higher.

Constructor:

Architectural ...

ArchitecturalMaterial ...

Properties:

<Architectural>.bumpMap UndefinedClass default: undefined -- texmap; Bump_Map

Get/Set the Bump Map.

<Architectural>.bumpMapAmount Float default: 100.0 -- percentage; Bump_Map_Amount

Get/Set the bump map amount.

<Architectural>.bumpMapEnable BooleanClass default: true -- boolean; Bump_Map_Enable

Enable/Disable the Bump Map.

<Architectural>.colorBleed Float default: 100.0 -- animatable; percentage; Color_Bleed_Scale;

Get/Set the Color Bleeding amount.

<Architectural>.cutoutMap UndefinedClass default: undefined -- texmap; Cutout_Map

Get/Set the Cutout Map.

<Architectural>.cutoutMapAmount Float default: 100.0 -- percentage; Cutout_Map_Amount

Get/Set the cutout map amount.

<Architectural>.cutoutMapEnable BooleanClass default: true -- boolean; Cutout_Map_Enable

Enable/Disable the Cutout Map

<Architectural>.diffuse Color default: (color 150 150 150) -- animatable; RGB color; Controller Scaling: ([1,1,1] : (color 255 255 255));

<Architectural>.diffuseColor Color default: (color 255 255 255) -- animatable; alias for diffuse; Controller Scaling: ([1,1,1] : (color 255 255 255));

Get/Set the diffuse color.

<Architectural>.diffuseMap UndefinedClass default: undefined -- texmap; Diffuse_Map

Get/Set the Diffuse Map.

<Architectural>.diffuseMapAmount Float default: 100.0 -- percentage; Diffuse_Map_Amount

Get/Set the diffuse map amount.

<Architectural>.diffuseMapEnable BooleanClass default: true -- boolean; Diffuse_Map_Enable

Enable/Disable the Diffuse Map.

<Architectural>.displacementMap UndefinedClass default: undefined -- texmap; Displacement_Map

Get/Set the Displacement Map.

<Architectural>.displacementMapAmount Float default: 100.0 -- percentage; Displacement_Map_Amount

Get/Set the displacement map amount.

<Architectural>.displacementMapEnable BooleanClass default: true -- boolean; Displacement_Map_Enabled

Enable/Disable the Displacement Map.

<Architectural>.emitLuminance BooleanClass default: false -- boolean; Emit_Luminance

Enable/Disable the Luminance Map.

<Architectural>.exposureControlInvertReflection BooleanClass default: false -- boolean

Enable/Disable Inverted Reflections in Exposure Control. NOT EXPOSED IN THE UI. Available in 3ds Max 8 and higher.

<Architectural>.exposureControlInvertRefraction BooleanClass default: false -- boolean

Enable/Disable Inverted Refractions in Exposure Control. NOT EXPOSED IN THE UI. Available in 3ds Max 8 and higher.

<Architectural>.exposureControlInvertSelfIllum BooleanClass default: false -- boolean

Enable/Disable Inverted Self Illumination in Exposure Control. NOT EXPOSED IN THE UI. Available in 3ds Max 8 and higher.

<Architectural>.noExposureControl BooleanClass default: false -- boolean

When set to true, the material will not be processed by Exposure Controls. NOT EXPOSED IN THE UI. Available in 3ds Max 8 and higher.

<Architectural>.filterMap UndefinedClass default: undefined -- texmap; Filter_Map

Get/Set the Filter Map.

<Architectural>.indirectBumpAmount Float default: 100.0 -- animatable; percentage; Indirect_Bump_Scale; Controller Scaling: (1 : 100.0);

Get/Set the Indirect Bump Amount.

<Architectural>.intensityMap UndefinedClass default: undefined -- texmap; Intensity_Map

Get/Set the intensity map.

<Architectural>.intensityMapAmount Float default: 100.0 -- percentage; Intensity_Map_Amount

Get/Set the intensity map amount.

<Architectural>.intensityMapEnable BooleanClass default: true -- boolean; Intensity_Map_Enable

When set to True, the intensity map will be used.

<Architectural>.ior Float default: 1.5 -- animatable; float

Get/Set the Index Of Refraction value.

<Architectural>.luminance Float default: 0.0 -- float

Get/Set the luminance value.

<Architectural>.luminanceMap UndefinedClass default: undefined -- texmap; Luminance_Map

Get/Set the Luminance Map.

<Architectural>.luminanceMapEnable BooleanClass default: true -- boolean; Luminance_Map_Enable

Enable/Disable the Luminance Map.

<Architectural>.mapAmounts ArrayParameter default: #(100.0, 0.0, 0.0, 0.0, 100.0, 100.0, 0.0, 100.0, 100.0) -- percent array; Map_Amounts; SubAnim

An array of all map amounts used by the material.

<Architectural>.maps ArrayParameter default: #(undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined) -- texmap array; SubAnim

An array of all maps used by the material.

<Architectural>.mapsEnables ArrayParameter default: #(true, true, true, true, true, true, true, true, true) -- bool array; Map_Enables; SubAnim

An array of all map enable switches used by the material.

<Architectural>.rawDiffuseTexture BooleanClass default: false -- boolean; Raw_Diffuse_Texture

Enable/Disable the raw diffuse texture option.

<Architectural>.reflectanceScale Float default: 100.0 -- animatable; percentage; Refllectance_Scale; Controller Scaling: (1 : 100.0);

Get/Set the reflectance scale value.

<Architectural>.sampler Integer default: 0 -- integer

Get/Set the sampler by index.

<Architectural>.samplerAdaptOn BooleanClass default: false -- boolean; Sampler_Adapt_On

Enable/Disable adaptive sampling.

<Architectural>.samplerAdaptThreshold Float default: 0.0 -- float; Sampler_Adapt_Threshold

Get/Set the sampler adaptive threshold.

<Architectural>.samplerAdvancedOptions BooleanClass default: false -- boolean; Sampler_Advanced_Options

Enable/Disable the advanced options.

<Architectural>.samplerByName String default: ""Max 2.5 Star"" -- string; Sampler_By_Name

Get/Set the the sampler by name.

<Architectural>.samplerEnable BooleanClass default: false -- boolean; Sampler_Enabler

Enable/Disable the sampler.

<Architectural>.samplerQuality Float default: 0.1 -- float; Sampler_Quality

Get/Set the sampler quality value.

<Architectural>.samplerUseGlobal BooleanClass default: true -- boolean; Use_Global_Settings

When set to true, the global sampler settings will be used.

<Architectural>.shininess Float default: 0.0 -- percentage

Get/Set the shininess value.

<Architectural>.shininessMap UndefinedClass default: undefined -- texmap; Shininess_Map

Get/Set the Shininess Map.

<Architectural>.shininessMapEnable BooleanClass default: true -- boolean; Shininess_Map_Enable

Enable/Disable the Shininess Map.

<Architectural>.subSampleTextureOn BooleanClass default: true -- boolean; Subsample_Texture_On

Enable/Disable sampling of maps.

Architectural>.supersampling Max_2_5_Star default: ReferenceTarget:Max_2_5_Star

Get/Set the Supersampler object.

<Architectural>.template String default: "User Defined" -- string

Get/Set the template by name.

<Architectural>.textureHeight Float default: 40.0 -- animatable; world units; Texture_Height

Get/Set the texture height.

<Architectural>.textureUOffset Float default: 0.0 -- animatable; world units; Texture_U_Offset

Get/Set the texture U offset.

<Architectural>.textureVOffset Float default: 0.0 -- animatable; world units; Texture_V_Offset

Get/Set the texture V offset.

<Architectural>.textureWidth Float default: 40.0 -- animatable; world units; Texture_Width

Get/Set the texture width.

<Architectural>.translucency Float default: 0.0 -- percentage

Get/Set the translucency value.

<Architectural>.translucencyEnable BooleanClass default: true -- boolean; Translucency_Enable

Enable/Disable the Transparency.

<Architectural>.translucencyMap UndefinedClass default: undefined -- texmap; Translucency_Map

Get/Set the Translucency Map.

<Architectural>.transmittanceScale Float default: 100.0 -- animatable; percentage; Transmittance_Scale; Controller Scaling: (1 : 100.0);

Get/Set the transmittance scale value.

<Architectural>.transparency Float default: 0.0 -- percentage

Get/Set the transparency value.

<Architectural>.transparencyMapEnable BooleanClass default: true -- boolean; Filter_Map_Enable

Enable/Disable the Transparency Map.

<Architectural>.twoSided BooleanClass default: false -- boolean; Two_Sided

Enable/Disable the two-sided option.

<Architectural>.UserParam0 Float default: 0.0 -- float; User_Param0

User parameter.

<Architectural>.UserParam1 Float default: 0.0 -- float; User_Param1

User parameter.

<Architectural>.useTextureSize BooleanClass default: false -- boolean; Use_Texture_Size

Enable/Disable texture size usage.

Architectural interfaces:

Interface: ExposureMaterialControl

Properties:

.noExposureControl : boolean : Read|Write

When set to true, Exposure Controls will ignore the material.

.exposureControlInvertSelfIllum : boolean : Read|Write

When set to true, Self-Illumination values from this material will be inverted.

.exposureControlInvertReflection : boolean : Read|Write

When set to true, Reflection values from this material will be inverted.

.exposureControlInvertRefraction : boolean : Read|Write

When set to true, Refraction values from this material will be inverted.

Interface: ArchMatMixin

Methods:

<boolean>averageColor <&color>color [map:<texturemap>]

color is Out parameter

map default value: undefined

Returns the average color of material or of the optional texture map in the by-reference color Out parameter. The method itself returns true on success.

<boolean>convertMaterial <material>material [replace:<boolean>]

replace default value: false

Converts the Architectural material to the supplied material by copying relevant properties. If the optional parameter replace is set to true, replaces all occurrences of the supplied material in the scene and the Material Editor with the Architectural material. Returns true on success.


Blend : Material

Blend - superclass: material; super-superclass:MAXWrapper - classID: #(592, 0)

Value > MAXWrapper > Material > Blend

Constructor

blend ...

Properties

<blend>.map1 Material default: Standard -- alias: Map_1

The first material to be blended.

<blend>.map1Enabled Boolean default: true -- alias: Map_1_Enable

Turn on/off the use of the first material in the blend.

<blend>.map2 Material default: Standard -- alias: Map_1

the second material to be blended.

<blend>.map2Enabled Boolean default: true -- alias: Map_2_Enable

Turn on/off

<Blend>.mask TextureMap default: undefined

Selects a map to use as a mask. The two materials will blend in greater or lesser degree according to the intensity of the map. Lighter (whiter) areas of the mask show Material 1. Darker (blacker) areas of the mask show Material 2.

<blend>.maskEnabled Boolean default: true -- alias: MaskEnable

Enable/disable the use of the map mask.

<blend>.interactive Integer default: 0

Selects which of the two materials is displayed on object surfaces in viewports by the interactive renderer:

  1. Material 1

  2. Material 2

<blend>.mixAmount Float default: 0.0 -- animatable; percentage

The proportion of the blend (percentage). 0 means only Material 1 is visible on the surface; 100 means only Material 2 is visible.

<blend>.useCurve Boolean default: false

Determines whether the Mixing Curve affects the mix.

<blend>.upper Float default: 0.75 -- animatable

<blend>.lower Float default: 0.25 -- animatable

These values adjust the level of the Upper and Lower limits. If the two values are the same, the two materials meet at a definite edge. Wider ranges give more gradual blending from one sub-material to the other. The mixing curve displays the effect of changing these values.

See also

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


CompositeMaterial : Material

compositematerial - superclass: material; super-superclass:MAXWrapper - classID: #(1641811159, 325323510)

Value > MAXWrapper > Material > CompositeMaterial

Constructor

compositeMaterial...

Properties

<compositematerial>.materialList Array default: #(Standard, undefined, ... , undefined, undefined) -- alias: Material

This array contains all of the materials included in the composite material.

<compositematerial>.mapEnables Array default: #(true, true, ... , true, true) -- alias: Map_Enable

This array turns on/off the use of materials (corresponding to the .materialList array) in the composite material.

<compositematerial>.mixType Array default: #(0, 0, ... , 0, 0) -- alias: Composite_Type

This array sets the mix type for each material in the .materialList of the composite material:

0- Additive

1- Subtractive

2- Mix

<compositematerial>.amount Array default: #(100.0, 100.0, ... , 100.0, 100.0) -- animatable

This array sets the amount of mixing for each corresponding material in the .materialList.

<compositematerial>.baseMaterial  Standard Material default: (null) - alias for materialList[0]

S ets a base material for the composite material.

NOTES:

The materialList array stores the material for the base material and the sub-materials, the mapEnables array stores whether a sub-material is enabled, the mixTypes array stores the type of mixing to be performed for a sub-material, and the mixTypes array stores the amount of mixing to be performed for a sub-material. The materialList array contains N elements, corresponding to the base material and the (N-1) sub-materials. The remaining arrays store (N-1) elements, corresponding to the (N-1) sub-materials.

A property alias exists for each element of the amount array. The property aliases have the name amount_X, where X is the array element index. So the alias for the first amount element is amount_1, for the second amount_2, etc.

baseMaterial is an alias for materialList[1].

See also

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


DirectX_9_Shader : Material

DirectX_9_Shader - superclass: material; super-superclass:MAXWrapper - 6:0 - classID: #(249140708, 1630788338)

The DirectX_9_Shader provides access to DirectX 9 shader files.

Constructors:

DirectX_9_Shader...

DxMaterial ...

Properties:

<DirectX_9_Shader>.effectfile String default: "None" -- filename

Get/Set the .FX effect file.

<DirectX_9_Shader>.technique Integer default: 0 -- integer

Get/Set the effect technique.

<DirectX_9_Shader>.renderEnabled BooleanClass default: false -- Boolean; Force_Software_Render

Enable Software Rendering.

<DirectX_9_Shader>.renderMaterial Standardmaterial default: Material #29:Standard -- material; SubAnim

Get/Set the Standard Material corresponding to the directX shader.

<DirectX_9_Shader>.lightDir Integer default:0

Get/Set the Light Direction drop-down list selection. Default is 0 = Default Light. The possible values depend on the number of directional light sources (Spotlights, DirectLights etc.) in the scene which appear in the drop-down list.

<DirectX_9_Shader>.k_a fRGBA color default: (color 119.85 119.85 119.85)

Get/Set the shader's Ambient color.

<DirectX_9_Shader>.k_d fRGBA color default: (color 119.85 119.85 119.85)

Get/Set the shader's Diffuse color.

<DirectX_9_Shader>.k_s fRGBA color default: (color 255 255 255)

Get/Set the shader's Specular color.

<DirectX_9_Shader>.n Integer default: 15

Get/Set the shader's Specular Power.

<DirectX_9_Shader>.renderStyle Integer default: 0 -- integer; Software_Rendering

Retired. Not used in 3ds Max 7 and higher.

<DirectX_9_Shader>.renderShade Color default: (color 127.5 127.5 127.5) -- RGB color; Shaded_Color;

Retired. Not used in 3ds Max 7 and higher.

<DirectX_9_Shader>.renderBitmap UndefinedClass default: undefined -- bitmap; Render_Bitmap

Retired. Not used in 3ds Max 7 and higher.

DirectX_9_Shader interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

Interface: IDxMaterial

Properties:

<DirectX_9_Shader>.effectFilename : string : Read|Write

Get/Set the name of the effect.

<DirectX_9_Shader>.softwareBitmap : bitmap : Read|Write

Get/Set the bitmap to be used by the software rendering.

Methods:

<void><DirectX_9_Shader>.reloadeffect()

Reload the effect.

<integer><DirectX_9_Shader>.numberofbitmaps()

Get the number of bitmaps.

<bitmap><DirectX_9_Shader>.geteffectbitmap <integer>index

Get the bitmap of the specified indexed effect channel.

<void><DirectX_9_Shader>.seteffectbitmap <integer>index <bitmap>bitmap

Set the indexed effect channel to the specified bitmap.

<integer><DirectX_9_Shader>.bitmapmappingchannel <index>index

Set the mapping channel of the indexed bitmap.

<enum><DirectX_9_Shader>.bitmapusage <index>index

bitmapusage enums: {#Unknown|#DiffuseMap|#BumpMap|#OpacityMap|#DisplacementMap|#LightMap}

Get the bitmap usage.

<void><DirectX_9_Shader>.setmappingchannel <index>index <integer>mapChannel

Set the mapping channel of the indexed bitmap to the integer value mapChannel.

<integer><DirectX_9_Shader>.getNumberOfTechniques()

Returns the number of techniques. Available in 3ds Max 2008 and higher.

<string><DirectX_9_Shader>.getTechniqueName <index>Index

Returns the name of the indexed technique. Available in 3ds Max 2008 and higher.

<string by value array><DirectX_9_Shader>.getTechniqueList()

Returns the technique list. Available in 3ds Max 2008 and higher.

<string><DirectX_9_Shader>.getCurrentTechniqueName()

Returns the name of the current technique. Available in 3ds Max 2008 and higher.

See also

Interface: globalDXDisplayManager


DoubleSided : Material

DoubleSided - superclass: material; super-superclass:MAXWrapper - classID: #(528, 0)

Value > MAXWrapper > Material > DoubleSided

Constructor

doubleSided ...

doubleSidedMat ...

Properties

<DoubleSided>.translucency Float default: 0.0 -- animatable

The amount that one material shows through the other. This is a percentage that can range from 0.0 to 100.0. At 100 percent, the outer material is visible on inner faces and the inner material is visible on outer faces. At intermediate values, the specified percentage of the inner material "bleeds through" and is visible on outer faces.

<DoubleSided>.material1 Material default: Standard -- alias: Material_1

The facing material.

<DoubleSided>.map1Enabled Boolean default: true -- alias: Map_1_Enable

Turn on/off display of the facing material.

<DoubleSided>.material2 Material default: Standard -- alias: Material_2

The back material.

<DoubleSided>.map2Enabled Boolean default: true -- alias: Map_2_Enable

Turn on/off display of the back material.

See also

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


InkNPaint : Material

InkNPaint - superclass: material; super-superclass:MAXWrapper - classID: #(27793050, 1295605925)

Value > MAXWrapper > Material > InkNPaint

The InkNPaint Cartoon shading material uses the raytracer and provides a wide range of controls over inking and painting.

NOTE:

Certain advanced features of this material are accessible only through MAXScript.

Constructor

InkNPaint ...

Properties:

<InkNPaint>.backface_error_color Color default: (color 0 255 255)

Get/Set the backface error flag color.

NOTE:

This property has been exposed for internal use only.

<InkNPaint>.backface_error_on Boolean default: true -- boolean

Enable/Disable the backface error coloring.

NOTE:

This property has been exposed for internal use only.

<InkNPaint>.bump_Map TextureMap default: undefined -- texmap

Get/Set the bump map.

<InkNPaint>.bump_map_amt Float default: 30.0 -- animatable; float

Get/Set the bump map amount.

<InkNPaint>.bump_map_on Boolean default: false -- boolean

Enable/Disable bump mapping.

<InkNPaint>.color1 Color default: (color 0 0 0) -- animatable; Ink_Color

Get/Set the Ink Color.

<InkNPaint>.dsp_Map TextureMap default: undefined -- texmap; Dsp__Map

Get/Set the displacement map.

<InkNPaint>.dsp_map_amt Float default: 20.0 -- animatable; float; Dsp__Map_Amt

Get/Set the displacement map amount.

<InkNPaint>.dsp_map_on Boolean default: false -- boolean; Dsp__Map_On

Enable/Disable displacement mapping.

<InkNPaint>.edge_ang_ink_color Color default: (color 0 0 0) -- animatable; Internal_Ink_Color

Get/Set the Ink Color for internal edges.

<InkNPaint>.edge_ang_ink_Map TextureMap default: undefined -- texmap; Internal_Map

Get/Set the Ink Map for internal edges.

<InkNPaint>.edge_ang_ink_map_amt Float default: 100.0 -- animatable; float; Internal_Map_Amt

Get/Set the Ink Map amount for internal edges.

<InkNPaint>.edge_ang_ink_map_on Boolean default: false -- boolean; Internal_Map_On

Enable/Disable the Ink Map for internal edges.

<InkNPaint>.edge_ang_ink_on Boolean default: false -- boolean; Internal_Ink_On

Enable/Disable Inking of internal edges.

<InkNPaint>.edge_ang_thresh Float default: 0.5 -- animatable; float; Edge_Ang__Thresh

Get/Set the Edge Angle Threshold used to define internal edges.

<InkNPaint>.face_map_on Boolean default: false -- boolean

Get/Set the Face Map state.

<InkNPaint>.faceted_on Boolean default: false -- boolean

Get/Set the Facetted state.

<InkNPaint>.fog_bg Boolean default: false -- boolean; Fog_B_G

Get/Set the "Fog Background when not painting" state.

<InkNPaint>.init_fail_color Color default: (color 0 255 0)

Get/Set the Initialization Failed flag color.

NOTE:

This property has been exposed for internal use only.

<InkNPaint>.init_fail_on Boolean default: true -- boolean

Enable/Disable the marking of Initialization Failed error.

NOTE:

This property has been exposed for internal use only.

<InkNPaint>.ink_auto_vary_on Boolean default: false -- boolean

Get/Set the Variable Width option in the Ink Controls.

<InkNPaint>.ink_on Boolean default: true -- boolean

Enable/Disable Ink usage.

<InkNPaint>.ink_quality Integer default: 1 -- animatable; integer

Get/Set the Ink Quality value.

<InkNPaint>.ink_width_clamp_on Boolean default: false -- boolean

Get/Set the Clamp option under Ink Controls.

<InkNPaint>.intersect_bias Float default: 0.0 -- animatable; float

Get/Set the Intersection Bias.

<InkNPaint>.mat1 Material default: undefined -- material; Material_1

Get/Set the optional sub-material used for surface shading.

NOTE:

This feature is accessible through MAXScript only and is not exposed to the InkNPain UI.

<InkNPaint>.mat1_on Boolean default: false -- boolean; Material_1_Enabled

Enable/Disable the optional sub-material

<InkNPaint>.matid_adj_req_on Boolean default: true -- boolean; MatID_Adj__Req__On

When set to true, only adjacent faces with different Material IDs will be inked. Corresponds to the "Only Adjacent Faces" checkbox in the UI.

<InkNPaint>.matid_ink_color Color default: (color 0 0 0) -- animatable

Get/Set the Ink color used for Material ID borders.

<InkNPaint>.matid_ink_on Boolean default: true -- boolean

Enable/Disable the Inking of Material ID borders.

<InkNPaint>.matid_intersect_bias Float default: 0.0 -- animatable; float

Get/Set the Material ID Ink Intersecion Bias.

<InkNPaint>.matid_Map TextureMap default: undefined -- texmap

Get/Set the Material ID Ink Map.

<InkNPaint>.matid_map_amt Float default: 100.0 -- animatable; float

Get/Set the Material ID Ink Map Amount.

<InkNPaint>.matid_map_on Boolean default: false -- boolean

Enable/Disable the Material ID Ink Map.

<InkNPaint>.max_ink_width Float default: 4.0 -- animatable; float; Max__Ink_Width

Get/Set the Max. Ink Width.

<InkNPaint>.min_ink_width Float default: 2.0 -- animatable; float; Min__Ink_Width

Get/Set the Min. Ink Width.

<InkNPaint>.missed_rays_error_color Color default: (color 255 0 255)

Get/Set the Color used to flag missed rays errors.

NOTE:

This property has been exposed for internal use only.

<InkNPaint>.missed_rays_error_on Boolean default: true -- boolean

Enable/Disable flagging of missed rays errors.

NOTE:

This property has been exposed for internal use only.

<InkNPaint>.opaque_alpha_on Boolean default: false -- boolean

Enable/Disable opaque alpha.

<InkNPaint>.out_ink_Map TextureMap default: undefined -- texmap

Get/Set the Outline Ink map.

<InkNPaint>.out_ink_map_amt Float default: 100.0 -- animatable; float

Get/Set the Outline Ink map amount.

<InkNPaint>.out_ink_map_on Boolean default: false -- boolean

Enable/Disable Outline Ink mapping.

<InkNPaint>.out_ink_on Boolean default: true -- boolean

Enable/Disable Outline Inking.

<InkNPaint>.paint_color Color default: (color 79 165 210) -- animatable

Get/Set the Paint color.

<InkNPaint>.paint_levels Integer default: 2 -- animatable; integer

Get/Set the Paint Levels.

<InkNPaint>.paint_Map TextureMap default: undefined -- texmap

Get/Set the Paint map.

<InkNPaint>.paint_map_amt Float default: 100.0 -- animatable; float

Get/Set the Paint map amount.

<InkNPaint>.paint_map_on Boolean default: false -- boolean

Enable/Disable Paint mapping.

<InkNPaint>.paint_on Boolean default: true -- boolean

Enable/Disable Painting.

<InkNPaint>.pixel_grid_on Boolean default: false -- boolean

Enable/Disable the Pixel grid.

NOTE:

This is an advanced feature accessible through MAXScript only and is not exposed to the standard InkNPain UI.

<InkNPaint>.pixel_sampler Integer default: 3

Get/Set the Pixel sampler by index.

0 - Adaptive Halton

1 - Adaptive Uniform

2 - Hammersley

3 - Max 2.5 Star (default)

<InkNPaint>.rayengine Ray_Engine default: ReferenceTarget:Ray_Engine

Get the Ray Engine. This property cannot be set via MAXScript.

<InkNPaint>.sampler Integer default: 3 -- integer; Pixel_Sampler

Get/Set the Pixel sampler. Same as .sixel_sampler

<InkNPaint>.samplerAdaptOn Boolean default: true -- boolean; Adaptive_On

Enable/Disable Adaptive sampling.

<InkNPaint>.samplerAdaptThreshold Float default: 0.1 -- float; Adaptive_Threshold

Get/Set Adaptive sampling Threshold.

<InkNPaint>.samplerAdvancedOptions Boolean default: true -- boolean; Samper_Advanced_Options

Enable/Disable the Sampler Advanced Options.

<InkNPaint>.samplerByName String default: "Max 2.5 Star" -- string; Sampler_By_Name

Get/Set the Pixel sampler by name.

<InkNPaint>.samplerEnable Boolean default: true -- animatable; boolean; Sampler_On

Enable/Disable SuperSampling.

<InkNPaint>.samplerQuality Float default: 0.5 -- animatable; float; Sampler_Quality

Get/Set the SuperSampling quality.

<InkNPaint>.samplerUseGlobal BooleanClass default: true -- boolean; Use_Global_Settings

When set to true, the Global Sampler settings will be used.

<InkNPaint>.self_overlap_bias Float default: 10.0 -- animatable; float

Get/Set the Self-Overlapping Bias.

<InkNPaint>.self_overlap_ink_color Color default: (color 0 0 0) -- animatable

Get/Set the Self-Overlapping Ink Color.

<InkNPaint>.self_overlap_ink_Map TextureMap default: undefined -- texmap; Self_Overlap_Map

Get/Set the Self-Overlapping Ink Map

<InkNPaint>.self_overlap_ink_map_amt Float default: 100.0 -- animatable; float; Self_Overlap_Map_Amt

Get/Set the Self-Overlapping Ink Map amount

<InkNPaint>.self_overlap_ink_map_on Boolean default: false -- boolean

Enable/Disable Self-Overlapping Ink Mapping

<InkNPaint>.self_overlap_ink_on Boolean default: true -- boolean

Enable/Disable Self-Overlapping Inking.

<InkNPaint>.self_underlap_bias Float default: 10.0 -- animatable; float

Get/Set the Self-Underlapping Bias.

<InkNPaint>.self_underlap_ink_color Color default: (color 0 0 0) -- animatable

Get/Set the Self-Underlapping Ink Color.

<InkNPaint>.self_underlap_ink_Map TextureMap default: undefined -- texmap; Self_Underlap_Map

Get/Set the Self-Underlapping Ink Map

<InkNPaint>.self_underlap_ink_map_amt Float default: 100.0 -- animatable; float; Self_Underlap_Map_Amt

Get/Set the Self-Underlapping Ink Map amount

<InkNPaint>.self_underlap_ink_map_on Boolean default: false -- boolean

Enable/Disable Self-Underlapping Ink Mapping

<InkNPaint>.self_underlap_ink_on Boolean default: false -- boolean

Enable/Disable Self-Underlapping Inking

<InkNPaint>.shade_amt Float default: 70.0 -- animatable; float

Get/Set the Shade amount.

<InkNPaint>.shade_amt_on Boolean default: true -- boolean; Shade_Amt__On

Enable/Disable the Shade amount. When true, the amount will be used. When false, the shade_color will be used instead.

<InkNPaint>.shade_color Color default: (color 40 80 100) -- animatable

Get/Set the Shade color.

<InkNPaint>.shade_color_Map TextureMap default: undefined -- texmap

Get/Set the Shade color map.

<InkNPaint>.shade_color_map_amt Float default: 100.0 -- animatable; float

Get/Set the Shade color map amount.

<InkNPaint>.shade_color_map_on Boolean default: false -- boolean

Enable/Disable the Shade color map

<InkNPaint>.smgroup_edge_ink_color Color default: (color 0 0 0) -- animatable; Sharp_Edge_Ink_Color

Get/Set the Smoothing groups edge Ink color.

<InkNPaint>.smgroup_edge_ink_on Boolean default: true -- boolean; Sharp_Edge_Ink_On

Enable/Disable Smoothing groups edge Inking.

<InkNPaint>.smgroup_edge_Map TextureMap default: undefined -- texmap; Sharp_Edge_Map

Get/Set the Smoothing groups edge map.

<InkNPaint>.smgroup_edge_map_amt Float default: 100.0 -- animatable; float; Sharp_Edge_Map_Amt

Get/Set the Smoothing groups edge map amoumt.

<InkNPaint>.smgroup_edge_map_on Boolean default: false -- boolean; Sharp_Edge_Map_On

Enable/Disable Smoothing groups edge mapping.

<InkNPaint>.spec_color Color default: (color 255 255 255) -- animatable

Get/Set the Specular color.

<InkNPaint>.spec_gloss Float default: 50.0 -- animatable; float

Get/Set the Glossines value.

<InkNPaint>.spec_Map TextureMap default: undefined -- texmap; Spec__Map

Get/Set the Specular map.

<InkNPaint>.spec_map_amt Float default: 100.0 -- animatable; float; Spec__Map_Amt

Get/Set the Specular map amount.

<InkNPaint>.spec_map_on Boolean default: false -- boolean; Spec__Map_On

Enable/Disable Specular mapping.

<InkNPaint>.spec_on Boolean default: false -- boolean; Spec__On

Enable/Disable Specular highlights.

<InkNPaint>.sub_mtl_amt Float default: 100.0 -- animatable; float

Get/Set the Sub-material amount.

<InkNPaint>.subSampleTextureOn Boolean default: true -- boolean; Sample_SubTexmaps_On

Enable/Disable Texture SuperSampling.

<InkNPaint>.two_side_on Boolean default: true -- boolean

Enable/DisableDoubleSided rendering.

<InkNPaint>.UserParam0 Float default: 0.0 -- float; Param_0

Get/Set a user parameter value.

<InkNPaint>.UserParam1 Float default: 0.0 -- float; Param_1

Get/Set a user parameter value.

<InkNPaint>.width_Map TextureMap default: undefined -- texmap

Get/Set the Width map.

<InkNPaint>.width_map_amt Float default: 100.0 -- animatable; float

Get/Set the Width map amount.

<InkNPaint>.width_map_on Boolean default: false -- boolean

Get/Set the Width mapping.

See also

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Lightscape_Material : Material

Lightscape_Mtl : Material

Lightscape_Mtl - superclass: material; super-superclass:MAXWrapper - classID: #(1167726318, 664240028)

Value > MAXWrapper > Material > Lightscape_Mtl

This material is used mainly by the Lightscape Importer as a top-level material for imported Lightscape materials.

Constructor

Lightscape_Mtl...

lightscapeMtl...

Properties

<Lightscape_Mtl>.ambientLight Float default: 0.0 -- float; Ambient_Light

Get/Set the Ambient Light value.

<Lightscape_Mtl>.baseMaterial Standardmaterial default: (null):Standard -- material; Base_Material; SubAnim

Get/Set the Base Material of the Lightscape Material.

<Lightscape_Mtl>.brightness Float default: 50.0 -- float

Get/Set the Brightness value.

<Lightscape_Mtl>.bumpAmount Float default: 5.0 -- float; Bump_Amount

Get/Set the Bump Amount value. Range is from -10.0 to +10.0

<Lightscape_Mtl>.contrast Float default: 50.0 -- float

Get/Set the Contrast value.

<Lightscape_Mtl>.daylight Boolean default: true -- boolean

Get/Set the Daylight property.

<Lightscape_Mtl>.disabled Boolean default: false -- boolean

Get/Set the Disabled property. Corresponds to the Disable Radiosity checkbox in the UI.

<Lightscape_Mtl>.exterior Boolean default: false -- boolean

Get/Set the Exterior property. Corresponds to the Exterior Scene checkbox in the UI.

See also

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


MatteShadow : Material

MatteShadow - superclass: material; super-superclass:MAXWrapper - classID: #(608, 0)

Value > MAXWrapper > Material > MatteShadow

Constructor

matteShadow ...

matte ...

Properties

<MatteShadow>.opaqueAlpha Boolean default: false -- boolean; Opaque_Alpha

Determines whether or not the matte material appears in the alpha channel. If you turn off Opaque Alpha, the matte object will not make an alpha channel, and the image can be used for compositing, just as if there are no matte objects in the scene.

<MatteShadow>.applyAtmosphere Boolean default: false

Turns the fogging of matte objects on and off.

<MatteShadow>.atmosphereDepth Integer default: 0

When applying fog, you can choose between two different methods. You can either apply fog as if the matte surface is at an infinite distance from the camera or you can apply it as if the matte surface is actually at that point on the object being shaded. In other words, you can apply the fog to the matte surface in either 2D or 3D. The following controls determine how this is applied:

0- At Background Depth (This is the 2D method. The scanline renderer fogs the scene, and then renders its shadows. In this case, the shadows won’t be lightened by the fog. If you want to lighten the shadows, you need to turn up the shadow brightness.)

1- At Object Depth (This is the 3D method. The renderer first renders the shadows, and then fogs the scene. Since this varies the amount of fog over the 3D matte surface, the generated matte/alpha channels don’t blend perfectly into the background. Use At Object Depth when the matte object is meant to be a 3D object in the scene that the 2D background represents.)

<MatteShadow>.receiveShadows Boolean default: true -- boolean; RecieveShadows

When on, renders shadows on the matte surfaces.

<MatteShadow>.affectAlpha Boolean default: true -- boolean

When on, shadows cast on a matte material are applied to the alpha channel. This lets you render bitmaps with alpha channels that you can composite later.

<MatteShadow>.shadowBrightness Float default: 0.0 -- animatable, alias: Shadow_Brightness

Sets shadow brightness. At 0.5, the shadows will not be attenuated on the matte surface; at 1.0, the shadows are brightened to the color of the matte surface; and at 0.0 they are darkened to completely obliterate the matte surface.

<MatteShadow>.color Color default: (color 0 0 0) -- animatable, alias: Shadow_Color

The color of the shadow.

<MatteShadow>.amount Float default: 50 -- animatable, percentage, alias: Reflection_Amount

The amount of reflection to use. This is a percentage that can range from 0 to 100.

<MatteShadow>.map TextureMap default: undefined

The map used for reflections.

<MatteShadow>.useReflMap Boolean default: true

Turns on/off the use of a reflection map. Corresponds to the checkbox next to the map slot in the material’s UI.

<MatteShadow>.additiveReflection Integer default: 1

When set to 1, the material will use additive reflections. Set it to 0 to disable additive reflections. Corresponds to the Additive Reflection checkbox in the material’s UI.

See also

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


MorpherMaterial : Material

MorpherMaterial - superclass: material; super-superclass:MAXWrapper - classID: #(1268332512, 974929316)

Value > MAXWrapper > Material > MorpherMaterial

NOTE:

This class is not available in Autodesk VIZ

Constructor

MorpherMaterial ...

Properties

<MorpherMaterial>.Channel_0 Float default: 0.0 -- animatable, percentage

<MorpherMaterial>.Channel_1 Float default: 0.0 -- animatable, percentage

<MorpherMaterial>.Channel_2 Float default: 0.0 -- animatable, percentage

...

<MorpherMaterial>.Channel_98 Float default: 0.0 -- animatable, percentage

<MorpherMaterial>.Channel_99 Float default: 0.0 -- animatable, percentage

<MorpherMaterial>.Channel_100 Float default: 0.0 -- animatable, percentage

<MorpherMaterial>.base

<MorpherMaterial>.Mat_1

<MorpherMaterial>.Mat_2

<MorpherMaterial>.Mat_3

...

<MorpherMaterial>.Mat_98

<MorpherMaterial>.Mat_99

<MorpherMaterial>.Mat_100

NOTES:

The Morph modifier associated with a MorpherMaterial can not be set using MAXScript.

The Channel_N properties are instances of the Morph modifier channel percentage properties, where MorpherMaterial Channel_N corresponds to the Morph modifier channel N+1. The MorpherMaterial Channel_100 value corresponds to Morph modifier base object percentage.

The Channel_N property values are 100* the value shown for the corresponding Morph modifier channel percentage value.

The submaterial for each channel is accessible through the properties .base and .Mat_1 through .Mat_100.

As an example, suppose you had an object called MyMorph which has two morph channels defined, and a MorpherMaterial applied to it. You would need to assign the channel submaterials in the 3ds Max user interface. To access this material and its submaterials you could use:

EXAMPLE

mtl=$MyMorph.material -- get the MorpherMaterial

MM_C1_percent=mtl.Channel_0/100. -- get morph target 1 percentage and scale it correctly

MM_C1_mtl=mtl.Mat_1 -- get morph target 1 submaterial

MM_base_percent=mtl.Channel_100/100. -- get morph base object percentage and scale it correctly

MM_base_mtl=mtl.base  -- get morph base object submaterial

See also

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


MultiMaterial : Material

multimaterial - superclass: material; super-superclass:MAXWrapper - classID: #(512, 0)

Value > MAXWrapper > Material > MorpherMaterial

Constructor

multimaterial [ numsubs:<integer> ]

multiSubMaterial [ numsubs:<integer> ]

NOTE:

MultiSubMaterial is obsolete and is visible only for backward compatibility.

Properties

<multimaterial>.numsubs

Sets the number of sub-materials in the MultiMaterial.

When getting this value, the result will be the number of sub-anims in the MultiMaterial.

Please see the Historical Notes at the end of this page for important details on how the behaviour of this property has changed between 3ds Max versions!

<multimaterial>.materialList ArrayParameter default: #(Standard, Standard, ... Standard, Standard)

Stores the Material for each sub-material.

<multimaterial>.mapEnabled ArrayParameter default: #(true, true, ... true, true)

Stores whether the sub-material is enabled.

<multimaterial>.names ArrayParameter default: #("", "", ... "", "")

Stores the sub-material slot name (not the sub-material name).

<multimaterial>.materialIDList ArrayParameter default: #(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) -- int array; Index

Stores the sub-material ID’s.

<multimaterial>.material1 Standardmaterial default: Standard -- alias for materialList[0]; SubAnim

Stores the material.

NOTES:

Each of the arrays contains as many elements as there are sub-materials.

The materialList array stores the Material for each sub-material.

The mapEnabled array stores whether that sub-material is enabled.

The names array stores the sub-material slot name (not the sub-material name)

The materialIDList stores the Material ID corresponding to the sub-material.

If the numsubs named parameter is not specified, the default numsubs value is 10.

The number of sub-materials can be changed after material creation by changing the numsubs property value.

The number of sub-materials can also be changed by setting the count property for the materialList, mapEnabled, or names property to the desired number.

material1 is an alias for materialList[1].

In versions prior 3ds Max 4, MultiMaterials had sub-materials arranged in a table, so MAXScript also allowed access to these sub-materials using the array indexing accessor:

FOR EXAMPLE

mm = multimaterial numsubs:3

mm[1] = $foo.material

$baz.material = mm[2]

See the notes below regarding indexed access in newer versions of 3ds Max!

HISTORICAL NOTES REGARDING .NUMSUBS:

The .numsubs property is normally a read-only property that returns the number of immediate subAnims in any MAXWrapper as explained in the topic Indexed Access to Animatable Properties in 3ds Max Objects

Originally, in 3ds Max prior to version 4, the value returned by the .numsubs property in the MultiMaterial was equivalent to the number of sub-materials in the MultiMaterial, because there were always as many sub-materials in the MultiMaterial as there were Material IDs to be assigned. In addition, the .numsubs property can be both get and set in a MultiMaterial.

After the introduction of the .materialIDList property which specifies the correspondence between the sub-materials and the Material IDs, it became possible to have sub-materials corresponding to much higher Material IDs than the total number of sub-materials. In this case, the number of sub-anims in the MultiMaterial will be set internally to reflect the highest ID, with any sub-anims without corresponding Material IDs left undefined!

FOR EXAMPLE

Creating a default MultiMaterial with 10 sub-materials and accessing the .count of the MaterialIDList or .materialList and the.numsubs property always returns 10:

theMat = multiMaterial()

#Multi/Sub-Object:Multimaterial(Standard:Material #25, Standard:Material #26, Standard:Material #27, Standard:Material #28, Standard:Material #29, Standard:Material #30, Standard:Material #31, Standard:Material #32, Standard:Material #33, Standard:Material #34)

theMat.materialList.count

10

theMat.numsubs

10

But assigning Material ID 20 to the 10th material and looking at the same values shows a different picture:

theMat.materialIDList[10]=20

20

theMat.materialIDList

#(1, 2, 3, 4, 5, 6, 7, 8, 9, 20)

theMat.materialList.count --still 10 sub-materials

10

theMat.numsubs --but the number of sub-anims is 20!

20

--Let's print the sub-anims to get a better idea:

for i = 1 to theMat.numsubs do format "%: %\n" i theMat[i]

1: Material #25:Standard

2: Material #26:Standard

3: Material #27:Standard

4: Material #28:Standard

5: Material #29:Standard

6: Material #30:Standard

7: Material #31:Standard

8: Material #32:Standard

9: Material #33:Standard

10: undefined

11: undefined

12: undefined

13: undefined

14: undefined

15: undefined

16: undefined

17: undefined

18: undefined

19: undefined

20: Material #34:Standard

OK

From this example it is obvious that the sub-material 10 corresponding to Material ID 20 was stored internally in the sub-anim track 20, leaving sub-anims 10 to 19 undefined.

Thus, it is a good idea to use the .materialList property to iterate through sub-materials instead of using the indexed access to sub-anims.

See also How do I Sort a MultiMaterial By Material ID? in the FAQ Chapter for more examples of working with MultiMaterials.

See also

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


NoMaterial : Material

Value > MAXWrapper > Material > NoMaterial

Assigning this material is equivalent to setting the material to "None" in the Material Editor. Setting a material to the value undefined is also equivalent to setting the material to "None" in the Material Editor.

FOR EXAMPLE,

if a box had a Top_Bottom material assigned, the following would set the Top sub-material to "None":

$box01.material.TopMaterial=noMaterial()

is the same as

$box01.material.TopMaterial=undefined

Constructor

noMaterial ...

Properties

There are no additional properties for NoMaterial.

See also

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


RayTraceMaterial : Material

RaytraceMaterial - superclass: material; super-superclass:MAXWrapper - classID: #(655953908, 849023086)

Value > MAXWrapper > Material > RayTraceMaterial

Constructor

rayTraceMaterial ...

Properties

<RaytraceMaterial>.Ambient_Color_On Boolean default: true -- animatable; boolean

If Ambient_Color_On is false, Ambient_Amount is used, otherwise Ambient is used

<RaytraceMaterial>.Ambient Color default: (color 0 0 0) -- animatable

Sets the degree to which the material absorbs ambient light.

<RaytraceMaterial>.Ambient_Amount Float default: 0.0 -- animatable; percentage

The amount that the ambient map affects the material expressed as a percentage of full intensity.

<RaytraceMaterial>.Luminosity_Color_On Boolean default: true -- animatable; boolean

If Luminosity_Color_On is false, Self_Illum__Amount is used, otherwise Luminosity is used

<RaytraceMaterial>.Luminosity Color default: (color 0 0 0) -- animatable

The self-illumination color of the material.

<RaytraceMaterial>.Self_Illum_Amount Float default: 0.0 -- animatable; percentage

The amount that the self-illumination map affects the material expressed as a percentage of full intensity.

<RaytraceMaterial>.Diffuse Color default: (color 127.5 127.5 127.5) -- animatable

Sets the diffuse color.

<RaytraceMaterial>.Transparency_Color_On Boolean default: true

If Transparency_Color_On is false, Transparency_Amount is used, otherwise Transparecy is used

<RaytraceMaterial>.Transparecy Color default: (color 0 0 0) -- animatable

The filter color of the material.

<RaytraceMaterial>.Transparency_Amount Float default: 0.0 -- animatable; percentage

The amount that the transparency map affects the material expressed as a percentage of full intensity.

<RaytraceMaterial>.Reflect_Color_On Integer default: 1 -- animatable

If Reflect_Color_On is false, Reflect_Amount is used, otherwise Reflect is used

<RaytraceMaterial>.Reflect Color default: (color 0 0 0) -- animatable

The specular reflection color.

<RaytraceMaterial>.Reflect_amount Float default: 0.0 -- animatable; percentage

The amount that the reflection map affects the material expressed as a percentage of full intensity.

<RaytraceMaterial>.Index_of_Refraction Float default: 1.55 -- animatable; float

The index of refraction (IOR) controls how severely the material refracts transmitted light. At 1.0, the IOR of air, the object behind the transparent object does not distort. At 1.5, the object behind distorts greatly, like a glass marble. At an IOR slightly less than 1.0, the object reflects along its edges, like a bubble seen from under water.

<RaytraceMaterial>.Spec__Color Color default: (color 255 255 255) -- animatable

Sets the color of specular highlights.

<RaytraceMaterial>.Specular_Level Float default: 50.0 -- animatable; percentage

Sets the intensity of specular highlights. Set the Specular Level to a very high value for very strong, tight highlights.

<RaytraceMaterial>.Glossiness Float default: 40.0 -- animatable; percentage

Affects the size of the specular highlight. As you increase the value, the highlight gets smaller and the material appears shinier.

<RaytraceMaterial>.Soften Float default: 0.1 -- animatable

Softens the effect of highlights formed by glancing light.

<RaytraceMaterial>.Extra_Lighting Color default: (color 0 0 0) -- animatable

Adds light to the surface of objects with the Raytrace material.

<RaytraceMaterial>.translucency Color default: (color 0 0 0) -- animatable

Creates a translucent effect. The Translucency color is a non-directional diffuse reflection.

<RaytraceMaterial>.Fluorescence Color default: (color 0 0 0) -- animatable

Creates an effect similar to black light on a black light poster. The light from a black light is largely ultraviolet, outside the visible spectrum. Under black light, fluorescent paints flare or glow. The fluorescence in Raytrace material takes whatever light it sees in the scene, applies the Bias to it, and then, regardless of the color of the lights in the scene, illuminates the fluorescent material as if it were lit by white light.

<RaytraceMaterial>.Fluorescence_Bias Float default: 70.0 -- animatable; percentage

At 0.5, The Bias makes Fluorescence behave just like diffuse coloring. Bias values higher than 0.5 increase the fluorescent effect, making the object brighter than other objects in the scene. Bias values lower than 0.5 make the object dimmer than other objects in the scene.

<RaytraceMaterial>.Wire_Size Float default: 1.0 -- animatable;

Sets the size of the wire in wireframe mode.

<RaytraceMaterial>.wireUnits Integer default: 0 --

Sets the units to use with the .wiresize value:

0- Pixels

1- Units

<RaytraceMaterial>.Color_Density_Enable Boolean default: false—animatable

Turns on/off the color density controls.

<RaytraceMaterial>.Color_Density_Start Float default: 0.0 -- animatable

The position in the object where the density color begins to appear.

<RaytraceMaterial>.Color_Density_End Float default: 25.0 -- animatable

The position in the object where the density color reaches its full Amount value.

<RaytraceMaterial>.Color_Density_Amount Float default: 1.0 -- animatable

The amount of density color. It can range from 0 to 1.0. Reducing this value reduces the density color effect.

<RaytraceMaterial>.Color_Density_Color Color default: (color 255 255 255) -- animatable

Sets a transmission color based on thickness. While filter (Transparency) color tints objects behind the transparent object, the density color gives the appearance of color within the object itself, like tinted glass.

<RaytraceMaterial>.Fog_Enable Boolean default: false—animatable

Turn on/off the use of density fog in the raytrace material.

<RaytraceMaterial>.Fog_Start Float default: 0.0 -- animatable

The position in the object where the density fog begins to appear.

<RaytraceMaterial>.Fog_End Float default: 25.0 -- animatable

The position in the object where the density fog reaches its full Amount value.

<RaytraceMaterial>.Fog_Amount Float default: 1.0 -- animatable

Controls the amount of density fog. It can range from 0 to 1.0. Reducing this value reduces the density fog effect and makes the fog translucent.

<RaytraceMaterial>.Fog_Color Color default: (color 0 0 0) -- animatable

The color of the density fog.

<RaytraceMaterial>.Reflection_Type Integer default: 0 -- animatable

Set the type of reflection:

  1. Default (Reflections are layered with the diffuse color)

  2. Additive (Refelections are added to the diffuse color)

<RaytraceMaterial>.Reflection_Gain Float default: 0.5 -- animatable

Controls reflection brightness. The lower the gain value, the brighter the reflection. At a gain of 1.0, no reflection is visible.

<RaytraceMaterial>.Enable_Raytraced_Reflections Boolean default: true -- animatable

Turns raytracing of reflective objects on or off.

<RaytraceMaterial>.Enable_Raytraced_Refractions Boolean default: true -- animatable

Turns raytracing of transparent objects on or off.

<RaytraceMaterial>.Reflection_Falloff_Mode Integer default: 0 -- animatable

When on, dims reflections to black at distance specified by Reflection_Falloff_End_Distance:

0- Off (Turns off attenuation)

1- Linear

2- Inverse Square (Inverse square is the actual attenuation rate for light in the real world.)

3- Exponential

<RaytraceMaterial>.Reflection_Falloff_End_Distance Float default: 100.0 -- animatable

The distance in world units where the reflected ray is fully attenuated.

<RaytraceMaterial>.Refraction_Falloff_Mode   Integer default: 0 -- animatable

Sets the falloff mode for refraction in the raytrace material:

0- Off (Turns off attenuation)

1- Linear

2- Inverse Square (Inverse square is the actual attenuation rate for light in the real world.)

3- Exponential

<RaytraceMaterial>.Refraction_Falloff_End_Distance Float default: 100.0 -- animatable

The distance in world units where the refracted ray is fully attenuated.

<RaytraceMaterial>.Bump_Map_Effect Float default: 1.0 -- animatable

Adjusts the effect of bump maps on raytraced reflections and refractions.

<RaytraceMaterial>.Override_Global_Antialiasing_Settings Boolean default: false—animatable

If Override_Global_Antialiasing_Settings = false, Global Antialiasing Settings are used. If true, the antialiaser is determined by Adaptive_Antialiasing_On.

<RaytraceMaterial>.Adaptive_Antialiasing_On Boolean default: false—animatable

If Adaptive_Antialiasing_On = true, the Multiresolution Adaptive Antialiaser is used; otherwise the Fast Adaptive Antialiaser is used. This property only has an effect if Override_Global_Antialiasing_Settings = true.

The following properties are associated with the Options dialog

<RaytraceMaterial>.Options___Raytracer_Enable Boolean default: true -- animatable

Turns the raytracer on or off.

<RaytraceMaterial>.Options___Antialiasing_Enable Boolean default: true -- animatable

Turns antialiasing on or off.

<RaytraceMaterial>.Options___Self_Reflect_Refract Boolean default: true -- animatable

Turns self reflection/refraction on or off.

<RaytraceMaterial>.Options___Raytrace_Atmospherics Boolean default: true -- animatable

Turns the raytracing of atmospheric effects on or off. Atmospheric effects include fire, fog, volume light, and so on.

<RaytraceMaterial>.Options___Reflect_Refract_Material_ID_s Boolean default: true -- animatable

When on, the material reflects effects assigned to material IDs in the renderer’s G-Buffer.

<RaytraceMaterial>.Options___Raytrace_Objects_in_Glass Boolean default: true -- animatable

Turns the raytracing of objects inside raytraced objects on or off.

<RaytraceMaterial>.Options___Raytrace_Atmospherics_in_Glass Boolean default: true -- animatable

Turns the raytracing of atmospherics inside raytraced objects on or off.

<RaytraceMaterial>.Options___Color_Density___Fog_Enable Boolean default: true -- animatable

Turns the color density and fog features on or off.

The following properties are associated with the Antialiaser configuration dialogs.

<RaytraceMaterial>.Local_Threshold Float default: 0.1 -- animatable

The sensitivity of the adaption algorithm. This value can range from 0 to 1, where 0 always casts the maximum number of rays and 1 always casts only the minimum number of rays.

<RaytraceMaterial>.Local_Min__Rays Integer default: 4 -- animatable

The minimum number of rays that the algorithm casts.

<RaytraceMaterial>.Local_Max__Rays Integer default: 32 -- animatable

The maximum number of rays the algorithm casts.

<RaytraceMaterial>.Local_Blur_Offset Float default: 0.0 -- animatable

The sharpness or blurriness of reflections or refractions without regard to distance. This value is specified in pixels.

<RaytraceMaterial>.Local_Blur_Aspect Float default: 1.0 -- animatable

Changes the shape of the blur by changing the aspect ratio.

<RaytraceMaterial>.Local_Defocus Float default: 0.0 -- animatable

Blurs based on distance. Objects near the surface are not blurred, but objects farther away are blurred. The rays cast are spread as they leave the surface of the raytrace map object.

<RaytraceMaterial>.Local_Defocus_Aspect Float default: 1.0 -- animatable

Changes the shape of the defocusing by changing the aspect ratio.

The following properties are associated with the Maps rollout.

<RaytraceMaterial>.ambientMap TextureMap default: undefined

The map assigned to the ambient map channel.

<RaytraceMaterial>.ambientMapAmount Float default: 100.0

The relative strength of the ambient map channel.

<RaytraceMaterial>.ambientMapEnable Boolean default: false

Turn on/off use of the ambient map channel.

<RaytraceMaterial>.bumpMap TextureMap default: undefined

The map assigned to the bump map channel.

<RaytraceMaterial>.bumpMapAmount Float default: 100.0

The relative strength of the bump map channel.

<RaytraceMaterial>.bumpMapEnable Boolean default: false

Turn on/off use of the bump map channel.

<RaytraceMaterial>.diffuseMap TextureMap default: undefined

The map assigned to the diffuse map channel.

<RaytraceMaterial>.diffuseMapAmount Float default: 100.0

The relative strength of the diffuse map channel.

<RaytraceMaterial>.diffuseMapEnable Boolean default: false

Turn on/off use of the diffuse map channel.

<RaytraceMaterial>.displacementMap TextureMap default: undefined

The map assigned to the displacement map channel.

<RaytraceMaterial>.displacementMapAmount Float default: 100.0

The relative strength of the displacement map channel.

<RaytraceMaterial>.displacementMapEnable Boolean default: false

Turn on/off use of the displacement map channel.

<RaytraceMaterial>.reflectionMap TextureMap default: undefined

The map assigned to the reflection map channel.

<RaytraceMaterial>.reflectionMapAmount Float default: 100.0

The relative strength of the reflection map channel.

<RaytraceMaterial>.reflectionMapEnable Boolean default: false

Turn on/off use of the reflection map channel.

<RaytraceMaterial>.refractionMap TextureMap default: undefined

The map assigned to the refraction map channel.

<RaytraceMaterial>.refractionMapAmount Float default: 100.0

The relative strength of the refraction map channel.

<RaytraceMaterial>.refractionMapEnable Boolean default: false

Turn on/off use of the refraction map channel.

<RaytraceMaterial>.glossinessMap TextureMap default: undefined

The map assigned to the glossiness map channel.

<RaytraceMaterial>.glossinessMapAmount Float default: 100.0

The relative strength of the glossiness map channel.

<RaytraceMaterial>.glossinessMapEnable Boolean default: false

Turn on/off use of the glossiness map channel.

<RaytraceMaterial>.specularLevelMap TextureMap default: undefined

The map assigned to the specularLevel map channel.

<RaytraceMaterial>.specularLevelMapAmount Float default: 100.0

The relative strength of the specularLevel map channel.

<RaytraceMaterial>.specularLevelMapEnable Boolean default: false

Turn on/off use of the specularLevel map channel.

<RaytraceMaterial>.luminosityMap TextureMap default: undefined

The map assigned to the luminosity map channel.

<RaytraceMaterial>.luminosityMapAmount Float default: 100.0

The relative strength of the luminosity map channel.

<RaytraceMaterial>.luminosityMapEnable Boolean default: false

Turn on/off use of the luminosity map channel.

<RaytraceMaterial>.transparencyMap TextureMap default: undefined

The map assigned to the transparency map channel.

<RaytraceMaterial>.transparencyMapAmount Float default: 100.0

The relative strength of the transparency map channel.

<RaytraceMaterial>.transparencyMapEnable Boolean default: false

Turn on/off use of the transparency map channel.

<RaytraceMaterial>.environmentMap TextureMap default: undefined

The map assigned to the environment map channel.

<RaytraceMaterial>.environmentMapAmount Float default: 100.0

The relative strength of the environment map channel.

<RaytraceMaterial>.environmentMapEnable Boolean default: false

Turn on/off use of the environment map channel.

<RaytraceMaterial>.transEnvMap TextureMap default: undefined

The map assigned to the transEnv map channel.

<RaytraceMaterial>.transEnvMapAmount Float default: 100.0

The relative strength of the transEnv map channel.

<RaytraceMaterial>.transEnvMapEnable Boolean default: false

Turn on/off use of the transEnv map channel.

<RaytraceMaterial>.iorMap TextureMap default: undefined

The map assigned to the ior map channel.

<RaytraceMaterial>.iorMapAmount Float default: 100.0

The relative strength of the ior map channel.

<RaytraceMaterial>.iorMapEnable Boolean default: false

Turn on/off use of the ior map channel.

<RaytraceMaterial>.translucencyMap TextureMap default: undefined

The map assigned to the translucency map channel.

<RaytraceMaterial>.translucencyMapAmount Float default: 100.0

The relative strength of the translucency map channel.

<RaytraceMaterial>.translucencyMapEnable Boolean default: false

Turn on/off use of the translucency map channel.

<RaytraceMaterial>.extraLightingMap TextureMap default: undefined

The map assigned to the extraLighting map channel.

<RaytraceMaterial>.extraLightingMapAmount Float default: 100.0

The relative strength of the extraLighting map channel.

<RaytraceMaterial>.extraLightingMapEnable Boolean default: false

Turn on/off use of the extraLighting map channel.

<RaytraceMaterial>.fluorescenceMap TextureMap default: undefined

The map assigned to the fluorescence map channel.

<RaytraceMaterial>.fluorescenceMapAmount Float default: 100.0

The relative strength of the fluorescence map channel.

<RaytraceMaterial>.fluorescenceMapEnable Boolean default: false

Turn on/off use of the fluorescence map channel.

<RaytraceMaterial>.colorDensityMap TextureMap default: undefined

The map assigned to the colorDensity map channel.

<RaytraceMaterial>.colorDensityMapAmount Float default: 100.0

The relative strength of the colorDensity map channel.

<RaytraceMaterial>.colorDensityMapEnable Boolean default: false

Turn on/off use of the colorDensity map channel.

<RaytraceMaterial>.fogColorMap TextureMap default: undefined

The map assigned to the fogColor map channel.

<RaytraceMaterial>.fogColorMapAmount Float default: 100.0

The relative strength of the fogColor map channel.

<RaytraceMaterial>.fogColorMapEnable Boolean default: false

Turn on/off use of the fogColor map channel.

<RaytraceMaterial>.diffusionMap TextureMap default: undefined

The map assigned to the diffusion map channel.

<RaytraceMaterial>.diffusionMapAmount Float default: 100.0

The relative strength of the diffusion map channel.

<RaytraceMaterial>.diffusionMapEnable Boolean default: false

Turn on/off use of the diffusion map channel.

<RaytraceMaterial>.specularMap TextureMap default: undefined

The map assigned to the specular color map channel.

<RaytraceMaterial>.specularMapAmount Float default: 100.0

The relative strength of the specular color map channel.

<RaytraceMaterial>.specularMapEnable Boolean default: false

Turn on/off use of the specular color map channel.

The following properties are associated with the Dynamics Properties rollout.

NOTES:

These properties are not available in Autodesk VIZ.

<RaytraceMaterial>.Bounce_Coefficient Float default: 1.0 -- animatable

Sets how far an object bounces after hitting a surface. The higher the value, the greater the bounce. A value of 1 represents a "perfectly elastic collision" or a bounce in which no kinetic energy is lost.

<RaytraceMaterial>.Static_Friction Float default: 0.0 -- animatable

Sets how difficult it is for the object to start moving along a surface. The higher this value, the more difficult.

<RaytraceMaterial>.Sliding_Friction Float default: 0.0 -- animatable

Sets how difficult it is for the object to keep moving over a surface. The higher this value, the more difficult for the object to keep moving.

The following properties do not correspond to any user-interface items, but appear to be used by the raytracer. These properties appear to be similar to the corresponding properties for the Raytrace TextureMap .

<RaytraceMaterial>.Attenuation_Start Float default: 0.0

The distance in world units where attenuation begins.

<RaytraceMaterial>.Attenuation_Exponent Float default: 2.0

The distance in world units where the ray is fully attenuated.

<RaytraceMaterial>.Attenuation_Color_Mode Integer default: 0

This affects the behavior of light rays as they attenuate out:

0- Background (As the ray attenuates out, returns the background (either the scene’s background or the background specified locally in the Raytracer Parameters rollout) rather than the actual color of what the reflected/refracted ray sees.)

1- Use Attenuation_Color

<RaytraceMaterial>.Attenuation_Color Color default: (color 0 0 0)

The color used for attenuation.

<RaytraceMaterial>.Attenuation_Near Float default: 1.0

The strength of the reflected/refracted ray at the start range distance. This is a normalized percentage that can range from 0.0 to 1.0.

<RaytraceMaterial>.Attenuation_Control_1 Float default: 0.6666

Controls the shape of the curve near the curve start.

<RaytraceMaterial>.Attenuation_Control_2 Float default: 0.3333

Controls the shape of the curve near the curve end.

<RaytraceMaterial>.Attenuation_Far Float default: 0.0

Sets the strength of the reflected/refracted ray at the end range distance. This is a normalized percentage that can range from 0.0 to 1.0.

<RaytraceMaterial>.Blur_Map Boolean default: false

When on, the software uses a map to apply the Blur Offset value. That is, where the map is white, blur offset is fully applied, and where it is black, it is ignored. For example, if the map is a Checker map, blur offset is applied only in every other square. Values between black and white cause less blur.

<RaytraceMaterial>.Defocus_Map Boolean default: false

When on, uses a map to apply the Defocus value. That is, where the map is white, Defocus is fully applied, and where it is black, it is ignored. For example, if the map is a Checker map, Defocus is applied only in every other square. Values between black and white cause less defocusing.

<RaytraceMaterial>.Enable_Reflection_Falloff Boolean default: false

Turns on/off falloff of reflection.

<RaytraceMaterial>.Reflection_Falloff_Distance Float default: 0.0

The distance until the reflections are fully attenuated.

<RaytraceMaterial>.Enable_Refraction_Falloff Boolean default: false

Turns on/off falloff of refraction.

<RaytraceMaterial>.Refraction_Falloff_Distance Float default: 0.0

The distance until the refractions are fully attenuated.

<RaytraceMaterial>.supersample Boolean default: false

Toggle Supersampling on and off.

<RaytraceMaterial>.ShaderType  Integer default: 1

The shader index:

1- Phong

2- Metal

3- Blinn

4- Oren Nayar-Blinn

5- Anisotropy

<RaytraceMaterial>.shaderByName String default: "Phong"

Sets the type of shader with a string, rather than a number. Enter "phong", "metal", "blinn", "ONB" or "Anisotropic"

NOTES:

The .shaderType and .shaderByName are linked and will automatically change each others values.

<RaytraceMaterial>.TwoSided  Boolean default: false

Turns on/off the 2-Sided property

<RaytraceMaterial>.Wire  Boolean default: false

Turns on/off wireframe mode

<RaytraceMaterial>.FaceMap  Boolean default: false

Turns on/off face mapping

The following additional properties have been exposed since 3ds Max 5:

<RaytraceMaterial>.Anisotropy Float default: 50.0 -- animatable; percentage

Get/Set the Anisotropy percentage.

<RaytraceMaterial>.Orientation Float default: 0.0 -- animatable; percentage

Get/Set the Anisotropy Orientation percentage.

<RaytraceMaterial>.sampler_param_block SubAnim default: SubAnim:sampler_Param_Block -- SubAnim

Read-only access to the Sampler Parameters.

<RaytraceMaterial.sampler_param_block>.sampler_on Boolean default: false -- animatable

Get/Set the Sampler enabled state.

<RaytraceMaterial.sampler_param_block>.sampler_quality Float default: 0.5 -- animatable

Get/Set the Sampler quality value.

NOTES:

MacroRecorder gives incorrect property names when changing SuperSampling rollout items.

Some items in SuperSampling rollout are not scriptable.

RaytraceMaterial interfaces:

Interface: ExposureMaterialControl

Properties:

<RaytraceMaterial>.noExposureControl : boolean : Read|Write

When set to true, Exposure Controls will ignore the material.

<RaytraceMaterial>.exposureControlInvertSelfIllum : boolean : Read|Write

When set to true, Self-Illumination values from this material will be inverted.

<RaytraceMaterial>.exposureControlInvertReflection : boolean : Read|Write

When set to true, Reflection values from this material will be inverted.

<RaytraceMaterial>.exposureControlInvertRefraction : boolean : Read|Write

When set to true, Refraction values from this material will be inverted.

See also

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Shell_Material : Material

Shell_Material - superclass: material; super-superclass:MAXWrapper - classID: #(597, 0)

Value > MAXWrapper > Material > Shell_Material

This material is used to accomodate texture baking results with alternative display in viewport and rendering.

Constructor

Shell_Material ...

BakeShell ...

Properties

<Shell_Material>.bakedMaterial Standardmaterial default: Standard -- material; Baked_Material; SubAnim

Get/Set the baked material.

<Shell_Material>.originalMaterial Standardmaterial default: Standard -- material; Original_Material; SubAnim

Get/Set the original material.

<Shell_Material>.renderMtlIndex Integer default: 0 -- integer; Rendering_Material

Get/Set the index of the material for rendering.

0 - use the Original Material for rendering

1 - use the Baked Material for rendering

<Shell_Material>.viewportMtlIndex Integer default: 0 -- integer; Viewport_Material

Get/Set the index of the material for viewport display.

0 - use the Original Material in the viewport

1 - use the Baked Material in the viewport

EXAMPLE

--Set all scene Shell materials to use Original in Viewport

--and Baked in rendering:

for m in scenematerials do

(

if classof m == Shell_Material then

(

m.viewportMtlIndex = 0

m.renderMtlIndex = 1

)

)

See also

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Shellac : Material

Shellac - superclass: material; super-superclass:MAXWrapper - classID: #(1190024042, 0)

Value > MAXWrapper > Material > Shellac

Constructor

Shellac ...

Properties

<Shellac>.shellacMtl1 Material default: Standard -- alias: Base_Material

The base sub-material.

<Shellac>.shellacMtl2 Material default: Standard -- alias: Shellac_Material

The shellac material.

<Shellac>.shellacColorBlend Float default: 0.0 -- animatable, percentage, alias: Shellac_Color_Blend

Controls the amount of color mixing. At 0.0, the shellac material has no effect. Increasing the Shellac Color Blend value increases the amount of shellac material color blended into the base material color. There is no upper limit on this parameter. Large values "overload" the shellac material colors.

See also

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


StandardMaterial : Material

Standardmaterial - superclass: material; super-superclass:MAXWrapper - classID: #(2, 0)

Value > MAXWrapper > Material > StandardMaterial

Constructor

standardMaterial ...

standard ...

Quick Page Navigation - Jump To:

Dynamics Properties

Phong, Metal, Blinn, ONB, Anisotropic, Translucent Shader Properties

Oren-Nayer-Blinn Shader Properties

Strauss Shader Properties

Map Channels for Standard Material Shaders

Properties

The properties of a standard material vary based on the shader type. The following properties are applicable to all shader types:

<Standard>.shaderType Integer default: 1 -- alias: Shader_Type

Sets the shader type:

0- Anisotropic

1- Blinn

2- Metal

3- Multi-Layer

4- Oren-Nayar-Blinn

5- Phong

6- Strauss

7-Translucent

<Standard>.shaderByName String default: "Blinn"—alias: Shader_Name

Sets the type of shader with a string, rather than a number. Enter "anisotropic", "blinn", "metal", "multi-layer", "oren-nayar-blinn", "phong", "strauss" or "Translucent Shader"

NOTE:

The .shaderType and .shaderByName are linked and will automatically change each others values.

<standard>.wire Boolean default: false -- boolean

When on, the material will be rendered in wireframe mode.

<Standard>.twoSided Boolean default: false -- alias: Two_sided

When on, the material will be applied to both sides of the selected faces.

<Standard>.faceMap Boolean default: false -- alias: Face_Map

Applies the material to the faces of the geometry. If the material is a mapped material, it requires no mapping coordinates. The map is automatically applied to each facet of the object.

<Standard>.faceted Boolean default: false

Renders each face of a surface as if it were flat.

<Standard>.adTextureLock Boolean default: true -- alias: Ambient_Diffuse_Texture_Lock

When on, ambient and diffuse texture maps will be locked.

<standard>.adLock Boolean default: true -- alias: Ambient_Diffuse_Lock

When on, ambient and diffuse colors will be locked.

<Standard>.opacityType Integer default: 0 -- alias: Opacity_Type

Sets the type of opacity:

0- Filter

1- Subtractive

2- Additive

<Standard>.opacity Float default: 100.0 -- animatable, percentage

Sets the opacity/transparency of the material as a percentage.

<Standard>.filterColor Color default: (color 127.5 127.5 127.5) -- animatable, alias: Filter_Color

The color transmitted through transparent or semi-transparent materials such as glass.

<Standard>.opacityFallOffType Integer default: 0, -- alias: Falloff_Type

Sets the fallof type:

0- In (Increases transparency towards the inside of the object, as in a glass bottle.)

1- Out (Increases transparency towards the outside of the object, as in a cloud of smoke.)

<Standard>.opacityFallOff Float default: 0.0 -- animatable, percentage, alias: Falloff

Specifies the amount of transparency at the outside or inside extreme.

<Standard>.ior Float default: 1.5 -- animatable, alias: Index_of_Refraction

Sets the index of refraction (IOR) used by refraction maps and raytracing. The IOR controls how severely the material refracts transmitted light. Left at 1.0, the IOR of air, the object behind the transparent object does not distort. At 1.5 the object behind distorts greatly, like a glass marble. At an IOR slightly less than 1.0, the object reflects along its edges, like a bubble seen from under water.

<Standard>.wireSize Float default: 1.0 -- animatable, alias: Wire_Size

Sets the size of the wire in wireframe mode.

<Standard>.wireUnits Integer default: 0 -- alias: Wire_Units

Sets the units to use with the .wiresize value:

0- Pixels

1- Units

<Standard>.applyReflectionDimming Boolean default: false -- alias: Apply_Reflection_Dimming

Turn on to use reflection dimming. When off, the reflection-mapped material is not affected by the presence or absence of direct light.

<Standard>.dimLevel Float default: 0.0 -- animatable, alias: Dim_Level

The amount of dimming that takes place in shadow. At 0.0, the reflection map is completely dark in shadow. At 0.5, the reflection map is half dimmed. At 1.0, the reflection map is not dimmed and the material appears as if Apply were turned off.

<Standard>.reflectionLevel Float default: 3.0 -- animatable, alias: Reflection_Level

Affects the intensity of the reflection that is not in shadow. The Reflection Level value multiplies the illumination level of the lit area of the reflection, to compensate for dimming.

<Standard>.sampler Integer default: 3 -- alias: Pixel_Sampler

Sets the sampler type:

0- Adaptive Halton (Spaces samples along both X and Y axes according to a scattered, "quasi random" pattern. Depending on Quality, the number of samples can range from 4 to 40. )

1- Adaptive Uniform (Spaces samples regularly, from a minimum quality of 4 samples to a maximum of 36. The pattern is not square, but skewed slightly to improve accuracy in the vertical and horizontal axes. )

2- Hammersley (Spaces samples regularly along the X axis, but along the Y axis it spaces them according to a scattered, "quasi random" pattern. Depending on Quality, the number of samples can range from 4 to 40.)

3- Max 2.5 Star (The sample at the center of the pixel is averaged with 4 samples surrounding it. The pattern is like the fives on dice.)

<Standard>.samplerByName String default: "Max 2.5 Star" -- string; Sampler_Name

Sets the sampler type by name. Enter "Adaptive Halton", "Adaptive Uniform", "Hammersley", or "Max 2.5 Star".

<Standard>.samplerEnable Boolean default: false -- animatable, alias: Sampler_Enable

When on, applies supersampling to the material.

<Standard>.subSampleTextureOn Boolean default: true -- animatable, alias: SubSample_Textures

When on, the maps applied to the material are supersampled as well. When off, the supersampler uses pixel averages for maps.

<Standard>.samplerQuality Float default: 0.5 -- animatable, alias: Sampler_Enable

Adjusts the quality of supersampling by controlling the number of samples used for each pixel.

<Standard>.samplerAdaptOn Boolean default: true -- alias: Adaptive_On

When on, these methods take fewer samples than the Quality specifies unless samples show a change in color greater than the Threshold value. In that case, they take all the samples specified by the Quality. Turning on Adaptive On can reduce the amount of time required to supersample.

<Standard>.samplerAdaptThreshold Float default: 0.1 -- alias: Adaptive_Threshold

Controls the Adaptive methods. A change in color greater than the Threshold value causes the adaptive methods to take the full number of samples specified by the Quality. If the color does not change as much, the adaptive method takes fewer samples and does not require as much processing time.

<Standard>.samplerAdvancedOptions Boolean default: true -- alias: Advanced_Options

The samplerAdvancedOptions property is defined as a property, but is not used by the Standard material.

<standard>.UserParam0 Float default: 0.0 -- alias: Optional_Param0

<standard>.UserParam1 Float default: 0.0 -- alias: Optional_Param1

The UserParam0 and UserParam1 properties are defined as properties, but are not used by the Standard material.

<Standard>.maps ArrayParameter default: #(undefined, undefined, ... , undefined, undefined)

<Standard>.mapEnables ArrayParameter default: #(false, false, ... , false, false) -- alias: Map_Enables

<Standard>.mapAmounts ArrayParameter default: #(100.0, 100.0, ... , 100.0, 100.0) -- animatable, alias: Map_Amounts

The three map arrays each have 24 elements and store data related to the material’s maps. The maps array stores the textureMap for each channel, the mapEnables array stores whether the that map channel is enabled, and the mapAmounts array stores the amount value for each channel. The meaning of each map channel depends on the shaderType value. Table Map Channels for Standard Material Shaders shows the meaning of each map channel for each shader. For example, for the Blinn shader type element 5 of the map arrays correspond to the Glossiness map channel. The names in this table also reflect property aliases that have been defined for easier access to the map channels. Again for the Blinn shader type, array element 4, the property aliases for the 3 map arrays are: GlossinessMap (maps[5]), GlossinessMapEnable (mapEnables[5]), and GlossinessMapAmount (mapAmounts[5]). A textureMap needs to be assigned to a maps array element (or alias) before the corresponding mapAmounts property (or alias) can be animated.

The following properties are associated with the Dynamics Properties rollout.

NOTE:

These properties are not present in Autodesk VIZ

<Standard>.bounce Float default: 1.0 -- animatable, alias: Bounce_Coefficient

Sets how far an object bounces after hitting a surface. The higher the value, the greater the bounce. A value of 1 represents a "perfectly elastic collision", or a bounce in which no kinetic energy is lost.

<Standard>.staticFriction Float default: 0.0 -- animatable, alias: Static_Friction

Sets how difficult it is for the object to start moving along a surface. The higher this value, the more difficult.

<Standard>.slidingFriction Float default: 0.0 -- animatable, alias: Sliding_Friction

Sets how difficult it is for the object to keep moving over a surface. The higher this value, the more difficult for the object to keep moving.

Shader Types: Phong; Metal; Blinn; Oren-Nayar-Blinn; Anisotropic; Translucent

Unless otherwise noted, the following additional properties are applicable to the above shader types:

<Standard>.ambient Color default: (color 149.94 149.94 149.94) - animatable; RGB color; Ambient_Color

Controls the ambient color. The ambient color is the color in direct light.

<Standard>.ambientMap TextureMap default: undefined -- alias for maps[0]

Get/Set the ambient map.

<Standard>.ambientMapAmount Float default: 100.0 -- alias for mapAmounts[0]

Get/Set the ambient map amount.

<standard>.ambientMapEnable Boolean default: false -- alias for mapEnables[0]

Enable/Disable the ambient map.

<Standard>.diffuse Color default: (color 149.94 149.94 149.94) -- animatable, alias: Diffuse_Color

Controls the diffuse color. The diffuse color is the color in direct light.

<Standard>.diffuseLevel Float default: 100.0 -- animatable; percentage; Diffuse_Level

Controls the brightness of the material’s diffuse component. Increasing this value increases diffuse brightness, and decreasing it reduces diffuse brightness without affecting the specular highlight.

<Standard>.diffuseLevelMap TextureMap default: undefined -- alias for maps[8]

Get/Set the diffuse level map.

<Standard>.diffuseLevelMapAmount Float default: 100.0 -- alias for mapAmounts[8]

Get/Set the diffuse level map amount.

<Standard>.diffuseLevelMapEnable Boolean default: false -- alias for mapEnables[8]

Enable/Disable the diffuse level map.

<Standard>.diffuseMap TextureMap default: undefined -- alias for maps[1]

Get/Set the diffuse map.

<Standard>.diffuseMapAmount Float default: 100.0 -- alias for mapAmounts[1]

Get/Set the diffuse map value.

<Standard>.diffuseMapEnable Boolean default: false -- alias for mapEnables[1]

Enable/Disable the diffuse map.

<Standard>.specularMap TextureMap default: undefined -- alias for maps[2]

Get/Set the specular map.

<Standard>.specularMapAmount Float default: 100.0 -- alias for mapAmounts[2]

Get/Set the specular map amount.

<Standard>.specularMapEnable Boolean default: false -- alias for mapEnables[2]

Enable/Disable the specular map.

<Standard>.Glossiness Float default: 10.0 -- animatable; percentage

Get/Set the glossiness value.

<Standard>.glossinessMap TextureMap default: undefined -- alias for maps[3]

Get/Set the glossiness map.

<Standard>.glossinessMapAmount Float default: 100.0 -- alias for mapAmounts[3]

Get/Set the glossiness map amount.

<Standard>.glossinessMapEnable Boolean default: false -- alias for mapEnables[3]

Enable/Disable the glossiness map.

<Standard>.specular Color default: (color 229.5 229.5 229.5) -- animatable; Specular_Color

Get/Set the specular color.

<Standard>.specularLevel Float default: 0.0 -- animatable; percentage; Specular_Level

Get/Set the specular level value.

<Standard>.specularLevelMap TextureMap default: undefined -- alias for maps[4]

Get/Set the specular level map.

<Standard>.specularLevelMapAmount Float default: 100.0 -- alias for mapAmounts[4]

Get/Set the specular level map amount.

<Standard>.specularLevelMapEnable Boolean default: false -- alias for mapEnables[4]

Enable/Disable the specular level map.

<Standard>.selfIllumAmount Float default: 0.0 -- animatable; percentage; Self_Illumination

Get/Set the self illumination amount.

<Standard>.selfIllumColor Color default: (color 0 0 0) -- animatable; Self_Illum_Color

Get/Set the self illumination color.

<Standard>.selfIllumMap TextureMap default: undefined -- alias for maps[5]

Get/Set the self illumination map.

<Standard>.selfIllumMapAmount Float default: 100.0 -- alias for mapAmounts[5]

Get/Set the self illumination map amount.

<Standard>.selfIllumMapEnable Boolean default: false -- alias for mapEnables[5]

Enable/Disable the self illumination map.

<Standard>.opacity Float default: 100.0 -- animatable; percentage

Get/Set the opacity value.

<Standard>.opacityFallOff Float default: 0.0 -- animatable; percentage; Falloff

Get/Set the opacity falloff value.

<Standard>.opacityFallOffType Integer default: 0 -- integer; Falloff_Type

Get/Set the opacity falloff type.

0 - In

1 - Out

<Standard>.opacityMap TextureMap default: undefined -- alias for maps[6]

Get/Set the opacity map.

<Standard>.opacityMapAmount Float default: 100.0 -- alias for mapAmounts[6]

Get/Set the opacity map amount value.

<Standard>.opacityMapEnable Boolean default: false -- alias for mapEnables[6]

Enable/Disable the opacity map.

<Standard>.opacityType Integer default: 0 -- integer; Opacity_Type

Get/Set the opacity type.

0 - Filter

1 - Subtractive

2 - Additive

<Standard>.filter Color default: (color 127.5 127.5 127.5) -- animatable; Filter_Color

<standard>.filterColor Color default: (color 127.5 127.5 127.5) -- animatable; Filter_Color

Specifies a filer color that is multiplied by the translucent color. The filter, or transmissive color, is the color transmitted through transparent or semi-transparent materials such as glass. Raytraced shadows cast by transparent objects are tinted with the filter color.

<Standard>.filterMap TextureMap default: undefined -- texmap; Filter_Map, alias for maps[7]

Specifies a filter color map to control the trasmissive color.

<Standard>.filterMapAmount Float default: 100.0 -- alias for mapAmounts[7]

Get/Set the filter map amount.

<Standard>.filterMapEnable Boolean default: false -- alias for mapEnables[7]

Enable/Disable the filter map.

<Standard>.bumpMap TextureMap default: undefined -- alias for maps[10]

Get/Set the bump map.

<Standard>.bumpMapAmount Float default: 30.0 -- alias for mapAmounts[10]

Get/Set the bump map amount.

<Standard>.bumpMapEnable Boolean default: false -- alias for mapEnables[10]

Enable/Disable the bump map.

<Standard>.reflectionLevel Float default: 3.0 -- animatable; float; Reflection_Level

Get/Set the reflection level.

<Standard>.reflectionMap TextureMap default: undefined -- alias for maps[11]

Get/Set the reflection map.

<Standard>.reflectionMapAmount Float default: 100.0 -- alias for mapAmounts[11]

Get/Set the reflection map amount.

<Standard>.reflectionMapEnable Boolean default: false -- alias for mapEnables[11]

Enable/Disable the reflection map.

<Standard>.refractionMap TextureMap default: undefined -- alias for maps[12]

Get/Set the refraction map.

<Standard>.refractionMapAmount Float default: 100.0 -- alias for mapAmounts[12]

Get/Set the refraction map amount.

<Standard>.refractionMapEnable Boolean default: false -- alias for mapEnables[12]

Enable/Disable the refraction map.

<Standard>.displacementMap TextureMap default: undefined -- alias for maps[13]

Get/Set the displacement map.

<Standard>.displacementMapAmount Float default: 100.0 -- alias for mapAmounts[13]

Get/Set the displacement map amount.

<Standard>.displacementMapEnable Boolean default: false -- alias for mapEnables[13]

Enable/Disable the displacement map.

<Standard>.specular Color default: (color 229.5 229.5 229.5) -- animatable, alias: Specular_Color

Controls the specular color. The specular color is the color of the highlight on a shiny object.

<Standard>.dsLock Boolean default: false -- alias: Diffuse_Specular_Lock

When on, the diffuse and specular colors are linked together.

<Standard>.useSelfIllumColor Boolean default: false -- boolean; Use_Self_Illum_Color

When on, the material uses a special self-illumination color (.selfIllumColor). When off, the material uses the diffuse color for self-illumination.

<Standard>.selfIllumAmount Float default: 0.0 -- animatable, percentage, alias: Self_Illumination

Sets the amount of self-illumination.

<Standard>.selfIllumColor Color default: (color 0 0 0) -- animatable, alias: Self_Illum_Color

Sets a separate color to use for self-illumination.

<Standard>.specularLevel Float default: 5.0 -- animatable, percentage, alias: Specular_Level

Affects the intensity of the specular highlight. As you increase the value, the highlight grows brighter.

<Standard>.glossiness Float default: 25.0 -- animatable, percentage

Affects the size of the specular highlight. As you increase the value, the highlight gets smaller and the material appears shinier.

<Standard>.soften Float default: 0.1 -- animatable, alias: Soften_Level

Softens the effect of specular highlights, especially those formed by glancing light. When Specular Level is high and Glossiness is low, you can get harsh backlights on surfaces. Increase the value of Soften to mitigate this effect. At 0 there is no softening. At 1.0, the maximum amount of softening is applied.

NOTE:

Soften is not applicable to the Anisotropic and Translucent shader

The following additional properties are applicable to the Oren-Nayar-Blinn shader:

<Standard>.diffuseRoughness Float default: 50.0 -- animatable, percentage, alias: Diff_Roughness

Controls how quickly the diffuse component blends into the ambient component. As you increase roughness, the matte appearance of the material increases. It also grows darker and appears more flat.

The following additional properties are applicable to the Anisotropic shader:

<Standard>.anisotropy Float default: 50.0 -- animatable, percentage

Controls the anisotropy, or shape, of the highlight. At 0, the highlight is round. At 100, the highlight is extremely narrow.

<Standard>.orientation Float default: 0.0 -- animatable, percentage

Changes the orientation of the highlight.

<Standard>.unused Integer default: 1

The unused property is defined but not used by the shader

The following additional properties are applicable to the Translucent shader:

<Standard>.translucentColor Color default: (color 0 0 0) -- RGB color; Translucent_Color

Specifies a translucency color. This is the color of light that is scattered within the material. It does not need to be the same as the filter color, which is light transmitted by the material. The two color values are multiplied.

<Standard>.translucentColorMap UndefinedClass default: undefined -- alias for maps[9]

Specifies a translucency color map.

<Standard>.translucentColorMapAmount Float default: 100.0 -- alias for mapAmounts[9]

Specifies a translucency color map amount.

<Standard>.translucentColorMapEnable Boolean default: false -- alias for mapEnables[9]

Controls the usage of the translucency color map. When true, the map will be used. When false, the translucency color will be used.

<Standard>.backsideSpecular Boolean default: true -- boolean; alias: Backside_Specular

When true, both sides of the material receive a specular highlight. When false, only the front side of the material receives a highlight. Default=on.

Shader Type: Multi-Layer

<Standard>.ambient Color default: (color 149.94 149.94 149.94) -- animatable, alias: Ambient_Color

Controls the ambient color. The ambient color is the color not in direct light.

<Standard>.diffuse Color default: (color 149.94 149.94 149.94) -- animatable, alias: Diffuse_Color

Controls the diffuse color. The diffuse color is the color in direct light.

<Standard>.useSelfIllumColor Boolean default: false -- alias: Use_Self_Illumination

When on, the material uses a special self-illumination color (.selfIllumColor). When off, the material uses the diffuse color for self-illumination.

<Standard>.selfIllumAmount Float default: 0.0 -- animatable, percentage, alias: Self_Illumination

Sets the amount of self-illumination. As you increase self-illumination, the self-illumination color takes over from the ambient color. At a setting of 100, the material shows no shaded areas, although it can show specular highlights.

<Standard>.selfIllumColor Color default: (color 0 0 0) -- animatable, alias: Self_Illum_Color

Sets an alternate color to use for self-illumination.

<Standard>.diffuseLevel Float default: 100.0 -- animatable, percentage, alias: Diffuse_Level

Controls the brightness of the material’s diffuse component. Increasing this value increases diffuse brightness, and decreasing it reduces diffuse brightness without affecting the specular highlight.

<Standard>.diffuseRoughness Float default: 0.0 -- animatable, percentage, alias: Diff_Roughness

Controls how quickly the diffuse component blends into the ambient component. As you increase roughness, the matte appearance of the material increases. It also grows darker and appears more flat.

<Standard>.specular Color default: (color 229.5 229.5 229.5) -- animatable, alias: Color_1

Controls the specular color of the first color’s highlight. The specular color is the color of the highlight on a shiny surface.

<Standard>.specularLevel Float default: 5.0 -- animatable, percentage, alias: Level_1

Affects the intensity of the first color’s specular highlight. As you increase the value, the highlight grows brighter.

<Standard>.glossiness Float default: 25.0 -- animatable, percentage, alias: Glossiness_1

Affects the size of the first color’s specular highlight. As you increase the value, the highlight gets smaller and the material appears shinier.

<Standard>.anisotropy Float default: 0.0 -- animatable, alias: Anisotropy_1

Controls the anisotropy, or shape, of the first color’s highlight. At 0, the highlight is round. At 100, the highlight is extremely narrow.

<Standard>.orientation Float default: 0.0 -- animatable, percentage

Changes the orientation of the first color’s highlight.

<Standard>.specular2 Color default: (color 229.5 229.5 229.5) -- animatable, alias: Color_2

Affects the intensity of the second color’s specular highlight. As you increase the value, the highlight grows brighter.

<Standard>.specularLevel2 Float default: 0.0 -- animatable, percentage, alias: Level_2

Affects the intensity of the second color’s specular highlight. As you increase the value, the highlight grows brighter.

<Standard>.glossiness2 Float default: 25.0 -- animatable, percentage, alias: Glossiness_2

Affects the size of the second color’s specular highlight. As you increase the value, the highlight gets smaller and the material appears shinier.

<Standard>.anisotropy2 Float default: 0.0 -- animatable, alias: Anisotropy_2

Controls the anisotropy, or shape, of the second color’s highlight. At 0, the highlight is round. At 100, the highlight is extremely narrow.

<Standard>.orientation2 Float default: 0.0 -- animatable, percentage

Changes the orientation of the second color’s highlight.

Shader Type: Strauss

<Standard>.diffuse Color default: (color 149.94 149.94 149.94) -- animatable, alias: Diffuse_Color

Controls the color of the material. This corresponds to the diffuse color you specify for other kinds of shaders. With the Strauss shader, you control only this color. The shader calculates the ambient and specular color components.

<Standard>.glossiness Float default: 25.0 -- animatable, percentage

Affects the size and intensity of the specular highlight. As you increase the value, the highlight gets smaller and the material appears shinier.

<Standard>.metalness Float default: 0.0 -- animatable, percentage

Changes the metallic appearance of a material. Increasing the Metalness value increases the metallic appearance, with glancing as well as primary highlights. Because a metallic appearance principally depends on highlights, the Metalness value has little effect unless you also increase the Glossiness value.

The following Interface is available in 3ds Max 6 and higher:

Standardmaterial interfaces:

Interface: ExposureMaterialControl

Properties:

.noExposureControl : boolean : Read|Write

When set to true, Exposure Controls will ignore the material.

.exposureControlInvertSelfIllum : boolean : Read|Write

When set to true, Self-Illumination values from this material will be inverted.

.exposureControlInvertReflection : boolean : Read|Write

When set to true, Reflection values from this material will be inverted.

.exposureControlInvertRefraction : boolean : Read|Write

When set to true, Refraction values from this material will be inverted.

See also

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods

Map Channels for Standard Material Shaders

 | Anisotropic | Blinn | Metal | Multi-Layer | Oren-Nayar-Blinn | Phong | Strauss | Translucent
1 | AmbientMap | AmbientMap | AmbientMap | AmbientMap | AmbientMap | AmbientMap | DiffuseMap | AmbientMap
2 | DiffuseMap | DiffuseMap | DiffuseMap | DiffuseMap | DiffuseMap | DiffuseMap | GlossinessMap | DiffuseMap
3 | SpecularMap | SpecularMap | SpecularMap | DiffuseLevelMap | SpecularMap | SpecularMap | MetalnessMap | SpecularMap
4 | DiffuseLevelMap | SpecularLevelMap | SpecularLevelMap | DiffuseRoughnessMap | GlossinessMap | SpecularLevelMap | OpacityMap | GlossinessMap
5 | SpecularLevelMap | GlossinessMap | GlossinessMap | SpecularMap | SpecularLevelMap | GlossinessMap | FilterMap | SpecularLevelMap
6 | GlossinessMap | SelfIllumMap | SelfIllumMap | SpecularLevelMap | SelfIllumMap | SelfIllumMap | BumpMap | SelfIllumMap
7 | AnisotropyMap | OpacityMap | OpacityMap | GlossinessMap | OpacityMap | OpacityMap | ReflectionMap | OpacityMap
8 | OrientationMap | FilterMap | FilterMap | AnisotropyMap | FilterMap | FilterMap | RefractionMap | FilterMap
9 | SelfIllumMap | BumpMap | BumpMap | OrientationMap | DiffuseLevelMap | BumpMap | DisplacementMap | DiffuseLevel
10 | OpacityMap | ReflectionMap | ReflectionMap | specularMap2 | DiffuseRoughnessMap | ReflectionMap |  | TranslucentColor
11 | FilterMap | RefractionMap | RefractionMap | SpecularLevelMap2 | BumpMap | RefractionMap |  | BumpMap
12 | BumpMap | DisplacementMap | DisplacementMap | GlossinessMap2 | ReflectionMap | DisplacementMap |  | ReflectionMap
13 | ReflectionMap |  |  | AnisotropyMap2 | RefractionMap |  |  | RefractionMap
14 | RefractionMap |  |  | OrientationMap2 | DisplacementMap |  |  | DisplacementMap
15 | DisplacementMap |  |  | SelfIllumMap |  |  |  |
16 |  |  |  | OpacityMap |  |  |  |
17 |  |  |  | FilterMap |  |  |  |
18 |  |  |  | BumpMap |  |  |  |
19 |  |  |  | ReflectionMap |  |  |  |
20 |  |  |  | RefractionMap |  |  |  |
21 |  |  |  | DisplacementMap |  |  |  |


TopBottom : Material

TopBottom - superclass: material; super-superclass:MAXWrapper - classID: #(256, 0)

Value > MAXWrapper > Material > TopBottom

Constructor

topBottom ...

topBottomMat ...

Properties

<TopBottom>.topMaterial Material default: Standard -- alias: Top______Standard

The top material.

<TopBottom>.bottomMaterial Material default: Standard -- alias: Bottom______Standard

The bottom material.

<TopBottom>.map1Enabled Boolean default: true -- alias: Map_1_Enable

Turns on/off the use of the top material in the topbottom material.

<TopBottom>.map2Enabled Boolean default: true -- alias: Map_2_Enable

Turns on/off the use of the bottom material in the topbottom material.

<TopBottom>.blend Float default: 0.0 -- animatable

Blends the edge between the top and bottom sub-materials. This is a percentage that can range from 0 to 100. At 0, there is a sharp line between the top and bottom sub-materials. At 100, the top and bottom sub-materials tint each other.

<TopBottom>.position Float default: 50.0 -- animatable

Determines where the division between the two materials lies on an object. This is a percentage that can range from 0 to 100. 0 is at the bottom of the object, and displays only the top material. 100 is at the top of the object, and displays only the bottom material.

<TopBottom>.coordinates Integer default: 0

Choose how the software determines the boundary between top and bottom:

0- World (Faces point up or down according to the scene’s world coordinates. When you rotate the object, the boundary between top and bottom faces remains in place.)

1- Local (Faces point up or down according to the object’s local coordinates. When you rotate the object, the material rotates with it.)

See also

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


MetalShader : Shader

MetalShader - superclass: Shader; super-superclass:MAXWrapper - classID: #(57, 0)

The MetalShader is available only when the viewport driver is set to DirectX.

Interfaces:

Interface: ExposureMaterialControl

Properties:

.noExposureControl : boolean : Read|Write

When set to true, Exposure Controls will ignore the material.

.exposureControlInvertSelfIllum : boolean : Read|Write

When set to true, Self-Illumination values from this material will be inverted.

.exposureControlInvertReflection : boolean : Read|Write

When set to true, Reflection values from this material will be inverted.

.exposureControlInvertRefraction : boolean : Read|Write

When set to true, Refraction values from this material will be inverted.


LightMap : ReferenceTarget

LightMap - superclass: ReferenceTarget; super-superclass:MAXWrapper - classID: #(1920807870, 844480512)

This is a viewport shader used to display light mapping on DirectX-enabled hardware.

NOTE:

This shader is not available in Autodesk VIZ.

Constructors

LightMap...

Properties

<LightMap>.diffuse_on Boolean default: true -- boolean; DiffuseOn

Enable/Disable diffuse mapping.

<LightMap>.diffuse_filename String default: undefined -- string

Get/Set the diffuse map filename.

<LightMap>.diffuse_mapping Integer default: 3 -- integer

Get/Set the diffuse map channel.

<LightMap>.diffuse_texture Bitmap default: undefined -- bitmap

Get/Set the diffuse map texture

<LightMap>.lightmap_filename String default: undefined -- string

Get/Set the light map filename.

<LightMap>.lightmap_mapping Integer default: 3 -- integer

Get/Set the light map channel.

<LightMap>.lightmap_on Boolean default: true -- boolean; LightmapOn

Enable/Disable light mapping.

<LightMap>.lightmap_texture Bitmap default: undefined -- bitmap

Get/Set the lightmap map texture

See also

Interface: dxshadermanager

CubeMap : ReferenceTarget

Membrane_Shader : ReferenceTarget

Metal_Bump : ReferenceTarget

Interface: dxshadermanager


TextureMap : Material

Value > MAXWrapper > Material > TextureMap

The TextureMap class represents the 2D and 3D texture maps which you can assign to materials or certain object properties in 3ds Max. You can create texture maps like bitmap, dent, and swirl, access various properties on them, and assign these texture maps to materials and to certain 3ds Max object properties.

The classes derived directly from the TextureMap class are described in TextureMap Types .

The properties, operators, and methods that are common to all classes derived directly from the TextureMap class are described in TextureMap Common Properties, Operators, and Methods .

TextureMaps also share a set of classes for properties that are used in several different TextureMap classes. These shared classes are described in TextureMap Shared Classes .

The TextureMap class is derived from the Material class, and inherits the properties and methods defined for that class. These properties and methods are described in Material Common Properties, Operators, and Methods .


TextureMap Common Properties, Operators, and Methods

Value > MAXWrapper > Material > TextureMap

Properties

<TextureMap>.name

All the TextureMap subclasses can access the name property and specify it as a constructor parameter.

Methods

assignNewName <TextureMap>

Modifies the name of the specified texture to make it unique. The name is of the form "Map #1" where the number is incremented as required to make ensure it’s unique.

renderMap <TextureMap> [into:<bitmap>] [size:<point2>] [filename:<string>] [scale:<float>] [filter:<boolean>] [display:<boolean>]

Provides access the Render Map function available in the Material Editor. The function returns a Bitmap value containing a rendering of the given texture map. If you specify the optional into: argument, the function renders the map into the supplied bitmap, taking size and other attributes from the existing bitmap. If you don’t, a new bitmap value is created using the size: and fileName: arguments in its creation. Default size value is [200,200].

The scale: argument is a scale factor applied to 3D TextureMaps. This is the scale of the surface in 3d space that is mapped to UV and controls how much of the texture appears in the bitmap representation. Default scale value is 1.

If the filter: argument is true, the bitmap is filtered. It is quite a bit slower to rescale bitmaps with filtering on. Defaults filter value is false/off.

If the display: argument is true, the resulting bitmap is displayed using the virtual frame buffer; otherwise it is not. Default display value is false/off.

EXAMPLE

rm = renderMap $foo.material.diffuseMap size:[640,480] \

fileName:"foodif.bmp"

save rm

close rm

The above will render the diffuse map assigned to the material of object $foo to a bitmap of size 640x480 and save it to the file "foodif.bmp"

Associated Methods

showTextureMap <material> [<texmap>|<material>] <boolean>

This method provides control over the visibility of textures in the shaded viewport. You specify the material containing the texture map, the texture map in that material to be controlled, and a boolean to turn the display on or off. For multi-materials, you need to specify the appropriate sub-material to be affected.

EXAMPLE

showTextureMap $foo.material $foo.material.diffuseMap on

tm = checker()

mat = standardMaterial diffuseMap:tm

mm = multimaterial()

mm[1] = mat

$box01.material = mm

showTextureMap mm[1] tm on

showHWTextureMap <material> [<texmap>|<material>] <boolean>

This method provides control over the visibility of hardware textures in the shaded viewport. (The Show Hardware Map in Viewports is a flyout of the Show Map In Viewports icon). Available in 3ds Max 2008 and higher.

See Show Map In Viewports Function for details.

See also

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


TextureMap Shared Classes

Value > MAXWrapper > Material > TextureMap > Shared Classes

The following set of material classes are shared by multiple texture maps. These shared classes correspond to the Coordinates, Noise, and Output rollouts for texture maps in Material Editor. These classes are not constructable in MAXScript, rather they are automatically constructed by the texture map.

These shared material classes are the 2D and 3D texture map coordinate properties, and the Output properties:

UVGenClass

StandardXYZGen

TexOutputClass


UVGenClass : Material

Value > MAXWrapper > Material > TextureMap > Shared Classes > UVGenClass

Properties

<textureMap.coordinates>.mappingType Integer default: 0

Controls the mapping type of the generated texure coordinates. Possible values are:

0 - Texture

1 - Environment

If the Coordinates rollout for the textureMap is displayed in Material Editor and this property’s value is changed, the Texture/Environ radiobutton and Mapping dropdown displays are not updated to reflect the change.

<textureMap.coordinates>.mapping Integer default: varies

If mapping type is Texture mapping (mappingType = 0), the default value for this property is 0. Possible mapping values are:

0 - Explicit Map Channel

1 - Vertex Color Channel

2 - Planar from Object XYZ

3 - Planar from World XYZ

If mapping type is Environment mapping (mappingType = 1), the default value for this property is 0. Possible mapping values are:

0 - Spherical

1 - Cylindrical

2 - Shrink-Wrap

3 - Screen

The mapping source for Texture and Environment mapping types are internally stored in separate variables, and the mapping source set for a mapping type is retained if you change the mapping source for the other mapping type.

<textureMap.coordinates>.showMapOnBack Boolean default: true

Corresponds to the Show Map on Back checkbox.

<textureMap.coordinates>.U_Mirror Boolean default: false

Mirror the U coordinate.

<textureMap.coordinates>.V_Mirror Boolean default: false

Mirror the V coordinate.

<textureMap.coordinates>.U_Tile Boolean default: true

Tile the U coordinate.

<textureMap.coordinates>.V_Tile Boolean default: true

Tile the V coordinate.

<textureMap.coordinates>.UVW_Type Integer default: 0

The UV, VW and WU type:

0 - UV

1 - VW

2 - WU

<textureMap.coordinates>.mapChannel Integer default: 1

The UV coordinate map channel.

<textureMap.coordinates>.U_Offset Float default: 0.0 -- animatable

<textureMap.coordinates>.V_Offset Float default: 0.0 -- animatable

Offset mapping coordinates along the surface’s local U axis or V axis. That is, at 0.0 (the default), the map begins at the U or V origin. Increasing an Offset value moves the map forward along that axis, and decreasing it moves it backward.

<textureMap.coordinates>.U_Tiling Float default: 1.0 -- animatable

<textureMap.coordinates>.V_Tiling Float default: 1.0 -- animatable

The tiling of UV mapping coordinates; that is, the number of times a mapped material’s map is repeated in the surface’s local U axis or V axis.

<textureMap.coordinates>.U_Angle Float default: 0.0 -- animatable, angle

Rotates the map about the U-axis (in degrees).

<textureMap.coordinates>.V_Angle Float default: 0.0 -- animatable, angle

Rotates the map about the V-axis (in degrees).

<textureMap.coordinates>.W_Angle Float default: 0.0 -- animatable, angle

Rotates the map about the W-axis (in degrees).

<textureMap.coordinates>.Blur Float default: 1.0 -- animatable

Affects the sharpness or blurriness of the map based on its distance from the view. The farther away the map is, the greater the blurring. The Blur value blurs maps in world space.

<textureMap.coordinates>.Blur_Offset Float default: 0.0 -- animatable

Affects the sharpness or blurriness of the map without regard to its distance from the view. Blur Offset blurs the image itself in object space. Use this option when you want to soften or defocus the details in a map to achieve the effect of a blurred image.

<textureMap.coordinates>.Phase Float default: 0.0 -- animatable

The speed of the animation of the noise function.

<textureMap.coordinates>.Noise_On Boolean default: false

Toggles Noise on and off. Corresponds to the On checkbox in the UI.

<textureMap.coordinates>.Noise_Animate Boolean default: false

Toggles the animation of the Noise on and off.

<textureMap.coordinates>.Noise_Amount Float default: 1.0 -- animatable

The strength of the fractal function, expressed as a percentage. If the amount is 0 there is no noise. If the amount is 100 the map becomes pure noise.

<textureMap.coordinates>.Noise_Levels Integer default: 1 -- animatable

The number of times the function is applied. The effect of the level is dependent on the Amount value. The stronger the amount, the greater the effect of increasing the Levels value.

<textureMap.coordinates>.Noise_Size Float default: 1.0 -- animatable

The scale of the noise function relative to geometry. At very small values, the noise effect becomes white noise. At large values, the scale can exceed the scale of the geometry, in which case it has little or no effect.

<textureMap.coords>.realWorldScale BooleanClass default: false -- boolean

When set to true, the texture will be scaled to real-world size. When false, it will behave as in previous versions of 3ds Max. Available in 3ds Max 8 and higher.

<textureMap.coords>.UVTransform Matrix3 default: (matrix3 [1,0,0] [0,1,0] [0,0,1] [0,0,0])

Get/set the transformation matrix to convert the mapping coordinates into real-world size. Available in 3ds Max 8 and higher.

<textureMap.coords>.realWorldHeight Float default: 1.0 -- boolean

Get/set the real-world Height value. Available in 3ds Max 8 and higher.

<textureMap.coords>.realWorldWidth Float default: 1.0 -- boolean

Get/set the real-world Width value. Available in 3ds Max 8 and higher.

See also

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


StandardXYZGen : Material

Value > MAXWrapper > Material > TextureMap > Shared Classes > StandardXYZGen

Properties

<textureMap.coords>.coordType Integer default: 0

The type of coordinates used for mapping:

0- Object XYZ (Uses planar mapping based on the object’s local coordinates (disregarding the pivot point location).)

1- World XYZ (Uses planar mapping based on the scene’s world coordinates (disregarding the object’s bounding box).)

2- Explicit Map Channel (Uses the map channel specified by the .mapChannel value.)

3- Vertex Color Channel (Uses assigned vertex colors as a channel.)

<textureMap.coords>.mapChannel Integer default: 1

The map channel used for mapping coordinates.

<textureMap.coords>.offset Point3 default: [0,0,0] -- animatable

Changes the position of the map in UV coordinates. The map moves in relation to its size.

<textureMap.coords>.Tiling Point3 default: [1,1,1] -- animatable

The number of times the map is tiled across each axis.

<textureMap.coords>.angle Point3 default: [0,0,0] -- animatable, point3 angle

Rotates the map about the U, V, and W-axis (in degrees).

<textureMap.coords>.blur Float default: 1.0 -- animatable

Affects the sharpness or blurriness of the map based on its distance from the view. The farther away the map is, the greater the blurring. The Blur value blurs maps in world space.

<textureMap.coords>.Blur_Offset Float default: 0.0 -- animatable

Affects the sharpness or blurriness of the map without regard to its distance from the view. Blur Offset blurs the image itself in object space.

See also

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


TexOutputClass : Material

Value > MAXWrapper > Material > TextureMap > Shared Classes > TexOutputClass

Properties

<texturemap.output>.invert Boolean default: false

Invert the output. Corresponds to the Invert checkbox in the UI.

<texturemap.output>.clamp Boolean default: false

Clamp the output. Corresponds to the Clamp checkbox in the UI.

<texturemap.output>.alphaFromRGB Boolean default: false

Outputs alpha channel based on the RGB intensity. Corresponds to the Alpha from RGB Intensity checkbox in the UI.

<texturemap.output>.Output_Amount Float default: 1.0 -- animatable

The amount of the map being mixed into a composite material. Affects the saturation and alpha value of the map.

<texturemap.output>.RGB_Offset Float default: 0.0 -- animatable

This value is added to the RGB values of the map colors, which affects the tonal value of the colors. Eventually the map becomes white and self-illuminated. Lowering the value decreases the tonal value towards black.

<texturemap.output>.RGB_Level Float default: 1.0 -- animatable

The RGB values of the map colors are multiplied by this value, which affects the saturation of the color. Eventually the map becomes fully saturated and self-illuminated. Lowering the value decreases the saturation and makes the map colors grayer.

<texturemap.output>.Bump_Amount Float default: 1.0 -- animatable

Adjusts the amount of bumpiness. This value has an effect only when the map is used as a bump map.

<texturemap.output>.Mono_Color_Map subAnim

The Mono_Color_Map SubAnim contains the monochrome color mapping curve. You cannot create this curve in MAXScript, or access this curve unless you first turn on the Enable Color Map checkbox in the user interface.

<texturemap.output>.RGB_Color_Map subAnim

The RGB_Color_Map SubAnim contains the RGB color mapping curves. You cannot create these curves in MAXScript, or access the curves unless you first turn on the Enable Color Map checkbox and select the RGB radiobutton in the user interface.

<texturemap.output.Mono_Color_Map>.curve_1 SubAnim

The curve_1 SubAnim contains the monochrome color mapping curve points. You cannot create or access these points unless the point is animated. If a point is animated, you can access the point position using the .Point_X property of curve_1, where X in the point number.

<texturemap.output.RGB_Color_Map>.curve_1 SubAnim

<texturemap.output.RGB_Color_Map>.curve_2 SubAnim

<texturemap.output.RGB_Color_Map>.curve_3 SubAnim

The curve_1, curve_2, and curve_3 SubAnims contains the R, G, and B color mapping curve, respectively. You cannot create or access points in these curves unless the point is animated. If a point is animated, you can access the point position using the .Point_X property of the curve, where X in the point number.

NOTE:

The following properties are not accessible by MAXScript in 3ds Max: Enable Color Map checkbox and the RGB/Mono radio-button.

See also

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


TextureMap Types

Value > MAXWrapper > Material > TextureMap

The following list displays the 3ds Max TextureMap subclasses:

Adobe_Photoshop_Plug_In_Filter

Adobe_Premiere_Video_Filter

BitmapTexture

Bricks

Camera_Map_Per_Pixel

Cellular

Checker

Color_Correction

Combustion

Composite

Dent

Emulator

Falloff

FalloffTextureMap

FlatMirror

FoliagetextureMap

Gradient

Gradient_Ramp

Marble

Mask

Mix

Noise

Normal_Bump

NoTexture

Output

Particle_Age

Particle_Mblur

Perlin_Marble

Planet

Raytrace

Reflect_Refract

RGB_Multiply

RGB_Tint

Smoke

Speckle

Splat

Stucco

Swirl

Thin_Wall_Refraction

Vertex_Color

Water

Wood


Adobe_Photoshop_Plug_In_Filter : TextureMap

Value > MAXWrapper > Material > TextureMap > Adobe_Photoshop_Plug_In_Filter

Constructor

Class instances not creatable by MAXScript in 3ds Max 5.

NOTES:

This plug-in has been retired. The properties listed below will still be accessible when opening older .MAX files from prior 3ds Max versions containing Adobe_Photoshop_Plug_In_Filter class instances.

This class is not available in Autodesk VIZ.

Properties

<Adobe_Photoshop_Plug_In_Filter>.blur Float default: 0.0 -- animatable, percentage

<Adobe_Photoshop_Plug_In_Filter>.Foreground_Color Color default: (color 0 0 0) -- animatable

Specifies the foreground color for the image, used by some Photoshop filters.

<Adobe_Photoshop_Plug_In_Filter>.Background_Color Color default: (color 0 0 0) -- animatable

Specifies the background color for the image, used by some Photoshop filters.

<Adobe_Photoshop_Plug_In_Filter>.coordinates SubAnim

See UVGenClass for the StandardUVGen properties.

<Adobe_Photoshop_Plug_In_Filter>.output StandardTextureOutput

See TexOutputClass for the StandardTextureOutput properties.

NOTE:

The following properties were not accessible by MAXScript in 3ds Max : the Use Alpha Plane checkbox in the Parameters rollout, and all properties in the Bitmap Parameters and Time Parameters rollouts.

See also

TextureMap Common Properties, Operators, and Methods

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Adobe_Premiere_Video_Filter : TextureMap

Value > MAXWrapper > Material > TextureMap > Adobe_Premiere_Video_Filter

Constructor

Class instances not creatable by MAXScript in 3ds Max 5.

NOTES:

This plug-in has been retired. The properties listed below will still be accessible when opening older .MAX files from prior 3ds Max versions containing Adobe_Premiere_Plug_In_Filter class instances.

This class is not available in Autodesk VIZ.

Properties

<Adobe_Premiere_Video_Filter>.coordinates SubAnim

See UVGenClass for the StandardUVGen properties.

<Adobe_Premiere_Video_Filter>.output StandardTextureOutput

See TexOutputClass for the StandardTextureOutput properties.

NOTE:

The following properties were not accessible by MAXScript in 3ds Max: all properties in the Time Parameters rollout.

See also

TextureMap Common Properties, Operators, and Methods

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


BitmapTexture : TextureMap

Bitmaptexture - superclass: textureMap; super-superclass:material - classID: #(576, 0)

Value > MAXWrapper > Material > TextureMap > BitmapTexture

Constructor

bitmaptexture ...

bitmaptex ...

Properties

<Bitmaptexture>.bitmap Bitmap default: Bitmap:

The bitmap of the texture map. The script can perform any bitmap operations on this bitmap and the changes will be reflected in the texture map. In order to see the results of changing the bitmap in Material Editor and in the viewports, you need to modify any one bitmapTexture property in the Material Editor user interface.

<Bitmaptexture>.filename Filename default: "" -- alias: file_name

The name of the bitmap file.

<Bitmaptexture>.filtering Integer default: 0

The method of pixel averaging used in antialiasing the bitmap:

0- Pyramidal (Requires less memory and is adequate for most purposes.)

1- Summed Area (Requires much more memory, but yields generally superior results.)

2- None (Turns off filtering.)

<Bitmaptexture>.monoOutput Integer default: 0

Some parameters, such as opacity or specular level are a single value as opposed to a material’s three-value color components. Controls in this group determine the source of the Output mono channel in terms of the input bitmap:

0- RGB Intensity (Uses the intensity of the red, green, and blue channels for mapping. The color of the pixels is ignored and only the value or luminance of the pixels is used. The colors are computed as gray values in the range between 0 (black) and 255 (white).)

1- Alpha (Uses the intensity of the alpha channel for mapping.)

<Bitmaptexture>.RGBOutput Integer default: 0

The RGB Channel Output determines where the output RGB part comes from. The controls in this group affect only maps for material components that display color: Ambient, Diffuse, Specular, Filter Color, Reflection, and Refraction.

0- RGB (Displays the full color values of the pixels.)

1- Alpha as Gray (Displays tones of gray based on the levels of the alpha channel.)

<Bitmaptexture>.apply Boolean default: false

Turn on to use the cropping or placements settings.

<Bitmaptexture>.cropPlace Integer default: 0

Set whether cropping or placement is active:

0- Crop

1- Place

<Bitmaptexture>.clipu Float default: 0.0 -- animatable, alias: clip_u_offset

Adjusts the bitmap location along the U-axis.

<Bitmaptexture>.clipv Float default: 0.0 -- animatable, alias: clip_v_offset

Adjusts the bitmap location along the V-axis.

<Bitmaptexture>.clipw Float default: 1.0 -- animatable, alias: clip_u_width

Adjusts the width of the bitmap.

<Bitmaptexture>.cliph Float default: 1.0 -- animatable, alias: clip_v_width

Adjusts the height of the bitmap.

<Bitmaptexture>.jitter Float default: 1.0 -- animatable, alias: jitter_placement

The amount of random offset. At 0, there is no random offset.

<BitmapTex>.useJitter Boolean default: false -- boolean

Apply the .jitter value.

<Bitmaptexture>.alphasource Integer default: 0

Controls in this group determine the source of the Output alpha channel in terms of the input bitmap:

0- Image Alpha (Uses the image’s alpha channel.)

1- RGB Intensity (Converts the colors in the bitmap to grayscale tonal values and uses them for transparency. Black is transparent and white is opaque.)

2- None (Opaque; does not use transparency.)

<Bitmaptexture>.preMultAlpha Boolean default: true

Determines how alpha is treated in the bitmap. When turned on, the default, premultiplied alpha is expected in the file. When turned off, the alpha is treated as non-premultiplied, and any RGB values are ignored.

<Bitmaptexture>.starttime   Time default: 0f

Get/set the frame of the scene time range where the animated bitmap (multi-frame file like AVI, MOV or IFL describing a sequence of single frames) will play back its first frame.

<Bitmaptexture>.playbackrate Float default: 1.0

Get/set the playback rate of an animated bitmap (multi-frame file like AVI, MOV or IFL describing a sequence of single frames). This property lets you speed up and slow down the animation - for example, 1.0 is normal speed (one bitmap frame per scene time frame) , 2.0 is twice as fast (every second bitmap frame shown on each scene time frame), .333 is one third of the original speed (each bitmap frame held for three scene time frames) and so on.

<Bitmaptexture>.endcondition Integer default: 0

These controls determine what happens after the last frame of the animation:

0- Loop (Causes the animation to loop over and over again.)

1- Ping Pong (Causes the animation to be played backwards, making every animated sequence "loop smoothly")

2- Hold (Causes the last frame of the animation to be frozen on the surface until the end of the scene.)

<Bitmaptexture>.tieTimeToMatIDs BooleanClass default: false -- boolean; Tie_Time_to_Mat_IDs

Corresponds to the Sync Frames to Particle Age checkbox in the Time rollout.

<Bitmaptexture>.coords StandardUVGen -- alias: coordinates

See UVGenClass for the StandardUVGen properties.

<Bitmaptexture>.output StandardTextureOutput

See TexOutputClass for the StandardTextureOutput properties.

Methods

<Bitmaptexture>.reload()

Reload the bitmap. Corresponds to pressing the Reload button in the UI.

<Bitmaptexture>.viewImage()

View the image source. Corresponds to pressing the View Image button in the UI.

NOTE:

These methods are identical to what is exposed in the bitmapTex interface .

EXAMPLE

-- get the diffuse map from the first material in Material Editor

dif_map = meditMaterials[1].diffusemap

-- if the diffuse map is a bitmap texture, show it

if classof dif_map == BitmapTexture do dif_map.viewImage()

Associated Methods

enumerateFiles [ <MAXWrapper_obj> ] <function> [<arg>] [#inactive] [#videoPost] [#render] [#missing] [#localOnly]

Lets you run through all the bitmap files currently used in the scene or in an individual object. You can filter this so it just gives you the bitmap files that are inactive or missing.

See Bitmap Files for a description of this method’s parameters.

freeSceneBitmaps()

Frees up all the memory used by the image file bitmap caches. This is useful if memory is fragmented with a lot of different bitmaps and you want to have just the ones currently active reloaded.

usedMaps()

This method returns an array containing the filename strings of all bitmap textures used by the current scene.

NOTE:

Bitmap textures present only in the Material Editor but not assigned to the scene are excluded.

There is an optional MAXWrapper argument to this method:

usedMaps {<MAXWrapper>}

If a MAXWrapper is specified, the method returns a list of all bitmap textures used by that object. In order to include all Material Editor bitmap textures, you can use:

EXAMPLE

fn allUsedMaps =

(

sceneMaps = usedMaps()

for m in meditmaterials do join sceneMaps (usedMaps m)

sceneMaps

)

bitmapTexture interfaces:

Interface: bitmapTex

Methods

<void>reload()

Reloads the bitmap file using the same name and path. You don't need to use the file browser to reload the bitmap after you've updated it in your paint program.

Clicking reload for any instance of the map updates the map in all sample slots and in the scene.

<void>viewImage()

Displays a Virtual Frame Buffer that shows the bitmap surrounded by a region outline. The region outline has handles at its sides and corners. When cropping is on, dragging the handles changes the size of the crop area. You can also drag within the region area to move it.

The VFB editing window has U/V and W/H (width/height) spinners on its toolbar. Use these to adjust the location and size the image or crop area.

When Place is turned on, dragging the region area handles changes the scale of the bitmap (hold down CTRL to preserve the bitmap's aspect ratio), and dragging the image changes its location within the tile area.

When Crop is turned on, the UV or XY button at the right of the virtual frame buffer toolbar lets you switch between using UV or XY coordinates in the toolbar spinners. Also, you can zoom out by pressing SHIFT+Z and zoom in by pressing Z.

See also

TextureMap Common Properties, Operators, and Methods

BitmapIO Classes

Interface: medit

showTextureMap() function

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Bricks : TextureMap

Bricks - superclass: textureMap; super-superclass:material - classID: #(1677942713, 1768312028)

Value > MAXWrapper > Material > TextureMap > Bricks

Constructors:

bricks ...

tiles ...

Properties:

<Bricks>.Brick_Type Integer default: 1

Brick_Type = 0 - Custom Bricks; 1 - Running Bond; 2 - Common Flemish Bond; 3 - English Bond; 4 - ½ Running Bond; 5 - Stack Bond; 6 - Fine Running Bond; 7 - Fine Stack Bond

The brick_type values define a set of predefined values for the Stacking and Row and Column Editing properties. Changing brick_type only updates these properties if Material Editor is displayed and the material is in the active slot.

<Bricks>.Show_Texture_Swatches Integer default: 1

When on, updates to show the texture assigned by a map for Bricks or Mortar.

0- Off

1- On

<Bricks>.Brick_Color Color default: (color 165.75 76.5 51) -- animatable

The color of the bricks.

<Bricks>.Horizontal_Count Float default: 3.0 -- animatable

The number of bricks in a row.

<Bricks>.Vertical_Count Float default: 8.0 -- animatable

The number of bricks in a column.

<Bricks>.Color_Variance Float default: 0.4 -- animatable

The color variation among the bricks.

<Bricks>.Fade_Variance Float default: 0.2 -- animatable

The fading variation among the bricks.

<Bricks>.Mortar_Color Color default: (color 211.65 196.35 183.6) -- animatable

The color of the mortar.

<Bricks>.Horizontal_Gap Float default: 1.0 -- animatable

The horizontal size of the mortar between the bricks.

<Bricks>.Vertical_Gap Float default: 1.0 -- animatable

The vertical size of the mortar between the bricks.

<Bricks>.Lock_Gap_Symmetry Integer default: 1

When on, the vertical_gap and horizontal_gap values are locked to one another.

0- Off

1- On

<Bricks>.Holes Integer default: 0 -- animatable

The percentage of holes in the bricked surface caused by missing bricks. The mortar shows through the holes.

<Bricks>.Edge_Roughness Float default: 0.0 -- animatable

Controls the roughness of the edges of the mortar.

<Bricks>.Random_Seed Integer default: 43304 -- animatable

Randomly applies patterns of color variation to the bricks. Does not require any other setting to generate completely different patterns.

<Bricks>.Line_Shift Float default: 0.0 -- animatable

Shifts every second row of bricks a distance of one unit.

<Bricks>.Random_Shift Float default: 0.0 -- animatable

Randomly shifts all rows of bricks a distance of one unit.

<Bricks>.Use_Row_Edit Integer default: 0

Turn on/off row edit:

0- Off

1- On

<Bricks>.Per_Row Integer default: 2

The amount of bricks per row.

<Bricks>.Change_Row Float default: 1.0

For every row you specify in the Per_Row value, the software stores the amount of bricks that you specify in the Change_row value.

<Bricks>.Use_Column_Edit Integer default: 0

Turn on/off column edit:

0- Off

1- On

<Bricks>.Per_Column Float default: 1.0

The amount of bricks per column.

<Bricks>.Change_Column Float default: 1.0

For every row you specify in the Per_Column value, the software stores the amount of bricks that you specify in the Change_column value.

<Bricks>.coords SubAnim

See UVGenClass for the StandardUVGen properties.

See also

TextureMap Common Properties, Operators, and Methods

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Camera_Map_Per_Pixel : textureMap

Camera_Map_Per_Pixel - superclass: textureMap; super-superclass:material - 11:0 - classID: #(1626110529, 169925758)

Value > MAXWrapper > Material > TextureMap > Camera_Map_Per_Pixel

This map provides precise camera mapping without image deformations when looking at the mapped surface at shallow angles.

Constructors:

Camera_Map_Per_Pixel...

CameraMapTexture...

Properties:

<Camera_Map_Per_Pixel>.angleThreshold Float default: 90.0 -- animatable; float; Angle_Threshold

Get/Set the Angle Threshold value.

<Camera_Map_Per_Pixel>.backFace BooleanClass default: true -- Boolean

Enable/disable the Remove Back Face Pixels checkbox.

<Camera_Map_Per_Pixel>.camera UndefinedClass default: undefined -- node

Get/Set the Camera node.

<Camera_Map_Per_Pixel>.MapChannel Integer default: 1 -- animatable; integer; Map_Channel

Get/Set the Map Channel value.

<Camera_Map_Per_Pixel>.mask UndefinedClass default: undefined -- texmap

Get/Set the Mask map.

<Camera_Map_Per_Pixel>.maskUsesProjection BooleanClass default: true -- boolean; Mask_Uses_the_Camera_Projection

Enable/Disable the Mask Uses the Camera Projection checkbox.

<Camera_Map_Per_Pixel>.texture UndefinedClass default: undefined -- texmap

Get/Set the Texture map.

<Camera_Map_Per_Pixel>.useMask BooleanClass default: false -- boolean; Use_Mask

Enable/Disable the use of the mask map.

<Camera_Map_Per_Pixel>.useZBuffer BooleanClass default: false -- boolean

Enable/Disable the use of the ZBuffer Mask map.

<Camera_Map_Per_Pixel>.zbuffer UndefinedClass default: undefined -- bitmap

Get/Set the ZBuffer Mask map.

<Camera_Map_Per_Pixel>.ZFudge Float default: 1.0 -- animatable; float; Z_Fudge

Get/Set the ZFudge value.

See also

TextureMap Common Properties, Operators, and Methods

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Cellular : TextureMap

Cellular - superclass: textureMap; super-superclass:material - classID: #(-922740827, 286867643)

Value > MAXWrapper > Material > TextureMap > Cellular

Constructor

cellular ...

cellularTex ...

Properties

<Cellular>.celcolor Color default: (color 255 255 255) -- animatable, alias: Cell_Color

The color of the cell.

<Cellular>.cellmap textureMap default: undefined

Assigns a map to the cells, rather than a solid color.

<Cellular>.map1Enabled Boolean default: true -- alias: Map1_On

When on, enables the map. When off, disables the map (cell color reverts to celcolor).

<Cellular>.variation Float default: 0.0 -- animatable

Varies the color of the cells by randomly altering RGB values. The higher the variation, the greater the random effect. This percentage value can range from 0 to 100. At 0, the color swatch or the map completely determines the cell color.

<Cellular>.divcolor1 Color default: (color 127.5 127.5 127.5) -- animatable, alias: Division_Color1

The color of the first cell division.

<Cellular>.divmap1 textureMap default: undefined -- alias: DivisionMap1

Assigns a map to the first cell division.

<Cellular>.map2Enabled Boolean default: true -- alias: Map2_On

When on, enables the first cell division map. When off, disables the associated map (the division color reverts to divcolor1).

<Cellular>.divcolor2 Color default: (color 0 0 0) -- animatable, alias: Division_Color2

The color of the second cell division.

<Cellular>.divmap2 textureMap default: undefined -- alias: DivisionMap2

Assigns a map to the second cell division.

<Cellular>.map3Enabled Boolean default: true -- alias: Map3_On

When on, enables the second cell division map. When off, disables the associated map (the division color reverts to divcolor2).

<Cellular>.type Integer default: 0

Sets the shape and size of the cells:

0- Circular (This gives a more organic, or bubbly look.)

1- Chips (With Chips, the cells have linear edges. This gives a more chipped or mosaic appearance.)

<Cellular>.size Float default: 5.0 -- animatable

Alters the overall scale of the map. Adjust this value to fit the map to your geometry.

<Cellular>.spread Float default: 0.5 -- animatable

Alters the size of individual cells.

<Cellular>.smooth Float default: 0.1 -- animatable, alias: Bump_smoothing

When you use a cellular map as a bump map, you might encounter aliasing or jagginess at the boundaries of the cells. If this occurs, increase this value.

<Cellular>.fractal Boolean default: false

When on, makes the cellular pattern a fractal pattern.

<Cellular>.iteration Float default: 3.0 -- animatable, alias: Iterations

Sets the number of times the fractal function is applied. Caution: Increasing this value increases rendering time.

<Cellular>.adaptive Boolean default: true

When on, the number of fractal iterations is set adaptively. That is, the number of iterations increases the closer the geometry is to the scene’s point of view, and decreases in the distance. This reduces aliasing and also saves time while rendering.

<Cellular>.roughness Float default: 0.0 -- animatable

When you use the Cellular map as a bump map, this parameter controls how rough the bumps are. When Roughness is zero, each iteration is half the strength of the previous iteration, and half the size. As Roughness increases, each iteration is closer in strength and size to the previous iteration. When Roughness is at its maximum value of 1.0, each iteration is the same size and strength as the previous. In effect, this turns off the fractalization. Roughness has no effect unless Iterations is greater than 1.0.

<Cellular>.lowthresh Float default: 0.0 -- animatable, alias: Low

<Cellular>.midthresh Float default: 0.5 -- animatable, alias: Mid

<Cellular>.highthresh Float default: 1.0 -- animatable, alias: High

These controls affect the relative size of cells and divisions. They are expressed as normalized percentages (0 to 1) of the sizes specified by the default algorithm.

lowthresh: Adjusts the size of the cells. Default=0.0.

midthresh: Adjusts the size of the first division color, relative to the second. Default=0.5.

highthresh: Adjusts the overall size of divisions. Default=1.0.

<Cellular>.coords StandardXYZGen -- alias: coordinates

See StandardXYZGen for the StandardXYZGen properties.

<Cellular>.output StandardTextureOutput

See TexOutputClass for the StandardTextureOutput properties.

See also

TextureMap Common Properties, Operators, and Methods

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Checker : TextureMap

Checker - superclass: textureMap; super-superclass:material - classID: #(512, 0)

Value > MAXWrapper > Material > TextureMap > Checker

Constructor

checker ...

Properties

<Checker>.soften Float default: 0.0 -- animatable

Blurs the edges between the checkers. A little blurs a lot.

<Checker>.color1 Color default: (color 0 0 0) -- animatable, alias: Color_1

Sets the color of one of the checkers.

<Checker>.map1 textureMap default: undefined -- alias: Map_1

Selects a map to use within the area of the checker color. For example, you could put an additional checkerboard within one of the checker colors.

<Checker>.map1Enabled Boolean default: true -- alias: Map_1_Enable

This enables the associated map.

<Checker>.color2 Color default: (color 255 255 255) -- animatable, alias: Color_2

Sets the color of the second checker.

<Checker>.map2 textureMap default: undefined -- alias: Map_2

Selects a map to use within the area of the checker color. For example, you could put an additional checkerboard within one of the checker colors.

<Checker>.map2Enabled Boolean default: true -- alias: Map_2_Enable

This enables the associated map.

<Checker>.coords StandardUVGen -- alias: coordinates

See UVGenClass for the StandardUVGen properties.

See also

TextureMap Common Properties, Operators, and Methods

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Color_Correction : TextureMap

Color_Correction - superclass: textureMap; super-superclass:material - classID: #(720, 0)

Value > MAXWrapper > Material > TextureMap > Color_Correction

NEW in 3ds Max 2009: The Color_Correction TextureMap provides means to change the color information of an input texture map including Color Channel Rewiring, Brightness, Contrast, Hue, Saturation and Exposure adjustments and more.

Roll over and click a group of controls to jump to relevant properties:

Constructors:

Color_Correction ...

ColorCorrection ...

Properties:

<Color_Correction>.color Color default: (color 0 0 0) -- fRGBA color; Color_1;

Get/set the map's color used when no input map has been specified.

<Color_Correction>.Map UndefinedClass default: undefined -- texturemap;

Get/set the input map to color-correct.

Channels Rollout

<Color_Correction>.rewireR Integer default: 0 -- integer;

Get/set the Red= drop-down list index.

Possible values are:

0 - Red

1 - Green

2 - Blue

3 - Alpha

<Color_Correction>.rewireG Integer default: 1 -- integer;

Get/set the Green= drop-down list index.

Possible values are:

0 - Red

1 - Green

2 - Blue

3 - Alpha

<Color_Correction>.rewireB Integer default: 2 -- integer;

Get/set the Blue= drop-down list index.

Possible values are:

0 - Red

1 - Green

2 - Blue

3 - Alpha

<Color_Correction>.rewireA Integer default: 3 -- integer;

Get/set the Alpha= drop-down list index.

Possible values are:

0 - Red

1 - Green

2 - Blue

3 - Alpha

<Color_Correction>.rewireMode Integer default: 0 -- integer; Rewire_Mode

Get/set the Rewire Mode.

Possible values are:

0 - Normal

1 - Monochrome

2 - Invert

3 - Custom

Color Rollout

<Color_Correction>.hueShift Float default: 0.0 -- float;

Get/set the Hue Shift value.

<Color_Correction>.saturation Float default: 0.0 -- float;

Get/set the Saturation value.

<Color_Correction>.tint Color default: (color 0 0 0) -- fRGBA color; Hue_Tint;

Get/set the Hue Tint value.

<Color_Correction>.tintStrength Float default: 0.0 -- float; Hue_Strength;

Get/set the Hue Tint Strength value.

Lightness Rollout

<Color_Correction>.lightnessMode Integer default: 0 -- integer;

Get/set the Lightness Mode.

Possible values are

0 - Standard

1 - Advanced

Standard Mode Controls

<Color_Correction>.brightness Float default: 0.0 -- float;

Get/set the Brighness value in Standard mode.

<Color_Correction>.contrast Float default: 0.0 -- float;

Get/set the Contrast value in Standard mode.

Advanced Mode Controls

<Color_Correction>.exposureMode Integer default: 0 -- integer; Lightness;

Get/set the Exposure Mode drop-down list's selection index.

Possible values are:

0 - Gain

1 - F-Stops

2 - Printer Lights

<Color_Correction>.enableR BooleanClass default: false -- boolean;

Get/set the state of the R checkbox in Advanced Lightness mode.

<Color_Correction>.enableG BooleanClass default: false -- boolean;

Get/set the state of the G checkbox in Advanced Lightness mode.

<Color_Correction>.enableB BooleanClass default: false -- boolean;

Get/set the state of the B checkbox in Advanced Lightness mode.

Gain

<Color_Correction>.gainRGB Float default: 100.0 -- float; LightnessGainRGB;

Get/set the Gain RGB value in Advanced Lightness mode.

<Color_Correction>.gainR Float default: 100.0 -- float; LightnessGainR;

Get/set the Gain R value in Advanced Lightness mode.

<Color_Correction>.gainG Float default: 100.0 -- float; LightnessGainG;

Get/set the Gain G value in Advanced Lightness mode.

<Color_Correction>.gainB Float default: 100.0 -- float; LightnessGainB;

Get/set the Gain B value in Advanced Lightness mode.

Gamma/Contrast

<Color_Correction>.gammaRGB Float default: 1.0 -- float; LightnessGammaRGB;

Get/set the Gamma RGB value in Advanced Lightness mode.

<Color_Correction>.gammaR Float default: 1.0 -- float; LightnessGammaR;

Get/set the Gamma R value in Advanced Lightness mode.

<Color_Correction>.gammaG Float default: 1.0 -- float; LightnessGammaG;

Get/set the Gamma G value in Advanced Lightness mode.

<Color_Correction>.gammaB Float default: 1.0 -- float; LightnessGammaB;

Get/set the Gamma B value in Advanced Lightness mode.

Pivot

<Color_Correction>.pivotRGB Float default: 1.0 -- float; LightnessPivotRGB;

Get/set the Pivot RGB value in Advanced Lightness mode.

<Color_Correction>.pivotR Float default: 1.0 -- float; LightnessPivotR;

Get/set the Pivot R value in Advanced Lightness mode.

<Color_Correction>.pivotG Float default: 1.0 -- float; LightnessPivotG;

Get/set the Pivot G value in Advanced Lightness mode.

<Color_Correction>.pivotB Float default: 1.0 -- float; LightnessPivotB;

Get/set the Pivot B value in Advanced Lightness mode.

Lift/Offset

<Color_Correction>.liftRGB Float default: 0.0 -- float; LightnessLiftRGB;

Get/set the Lift/Offset RGB value in Advanced Lightness mode.

<Color_Correction>.liftR Float default: 0.0 -- float; LightnessLiftR;

Get/set the Lift/Offset R value in Advanced Lightness mode.

<Color_Correction>.liftG Float default: 0.0 -- float; LightnessLiftG;

Get/set the Lift/Offset G value in Advanced Lightness mode.

<Color_Correction>.liftB Float default: 0.0 -- float; LightnessLiftB;

Get/set the Lift/Offset B value in Advanced Lightness mode.

Printer Lights

<Color_Correction>.printerLights Float default: 5.0 -- float; LightnessPrinter;

Get/set the "Printer Lights Per Stop" value in Advanced Lightness mode.

See also

TextureMap Common Properties, Operators, and Methods

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Combustion

Combustion : TextureMap

Combustion - superclass: textureMap; super-superclass:material - 3:1 - classID: #(1051942422, 1799968651)

Constructor

Combustion ...

With the Combustion map, you can create maps interactively using the Discreet combustion product and 3ds Max at the same time. You use combustion software to paint on a bitmap, and the material updates automatically in the 3ds Max Material Editor and in shaded viewports.

Important: The combustion map works only if Discreet combustion is installed on your system.

You can use combustion as a material map in 3ds Max. With a Combustion map, you can create a material from a Paint or composite operator, and in turn apply that material to objects in a 3ds Max scene. The Combustion map can include combustion effects, and it can be animated.

In addition, with combustion you can import 3ds Max scenes that have been rendered to a rich pixel file (RPF or RLA file). The imported rich pixel rendering becomes an element of your composite. You can adjust its 3D position relative to video elements of the composite, and you can apply combustion 3D Post effects to objects within it. See the combustion User's Guide for more information.

NOTES:

Because 3ds Max runs only on Windows, you cannot use combustion to create material maps on a Macintosh.

The environmental atmospheric effect known as "Combustion" in versions prior to 3ds Max 4 is now known as Fire_effect .

A Combustion map is a 2D map . It is a combustion project used by the 3ds Max Material Editor, so like any combustion project, it is vector-based, animatable, and fully editable. From within the Material Editor, you can have combustion create a new project from scratch, or use an existing composite or Paint branch. You can synchronize the combustion Timeline with the 3ds Max time slider so animated materials synchronize with your 3D scene.

A macroScript has been added that gets called by the render management system to output render element info to the combustion(tm) .cws file format.

../UI/MacroScripts/Macro_CombustionOutput.mcr

Associated files include:

RenderElements-fns.ms

CombustionExport-fns.ms

EXAMPLE

c = combustion()

See also

Combustion.coordinates - superclass: MAXObject

Render Element Manager

Material Common Properties, Operators, and Methods


Combustion.coordinates - superclass: MAXObject

Combustion.coordinates : MAXObject

Combustion.coordinates - superclass: MAXObject; super-superclass:Value - 16:0 - classID: #(256, 0)

Value > MAXObject > Combustion.coordinates

Constructor

Combustion.coordinates ...

Properties

<Combustion.coordinates>.blur Float default: 1.0 -- animatable; float

Affects the sharpness or blurriness of the map based on its distance from the view. The farther away the map is, the greater the blurring. The Blur value blurs maps in world space. Blur is primarily used to avoid aliasing.

<Combustion.coordinates>.mapping Integer default: 0

<Combustion.coordinates>.mapChannel Integer default: 1

<Combustion.coordinates>.mappingType Integer default: 0

<Combustion.coordinates>.phase Float default: 0.0 -- animatable; float

<Combustion.coordinates>.U_Offset Float default: 0.0 -- animatable; float

Changes the position of the map in UV coordinates. The map moves in relation to its size. For example, if you want to shift the map its full width to the left, and half its width downward from its original position, you enter -1 in the U Offset field and 0.5 in the V offset field.

<Combustion.coordinates>.V_Offset Float default: 0.0 -- animatable; float

Changes the position of the map in UV coordinates. The map moves in relation to its size. For example, if you want to shift the map its full width to the left, and half its width downward from its original position, you enter -1 in the U Offset field and 0.5 in the V offset field.

<Combustion.coordinates>.U_Tiling Float default: 1.0 -- animatable; float

Determines the number of times the map is tiled (repeated) along each axis.

<Combustion.coordinates>.V_Tiling Float default: 1.0 -- animatable; float

Determines the number of times the map is tiled (repeated) along each axis.

<Combustion.coordinates>.U_Angle Float default: 0.0 -- animatable; angle

Rotates the map about the U, V, or W axis (in degrees).

<Combustion.coordinates>.V_Angle Float default: 0.0 -- animatable; angle

Rotates the map about the U, V, or W axis (in degrees).

<Combustion.coordinates>.W_Angle Float default: 0.0 -- animatable; angle

Rotates the map about the U, V, or W axis (in degrees).

<Combustion.coordinates>.Noise_Amount Float default: 1.0 -- animatable; float

<Combustion.coordinates>.Noise_Size Float default: 1.0 -- animatable; float

<Combustion.coordinates>.Noise_Levels Integer default: 1 -- animatable; integer

<Combustion.coordinates>.Blur_Offset Float default: 0.0 -- animatable; float

Affects the sharpness or blurriness of the map without regard to its distance from the view. Blur Offset blurs the image itself in object space. Use this option when you want to soften or defocus the details in a map to achieve the effect of a blurred image.

See also

Combustion

Material Common Properties, Operators, and Methods


CompositeTextureMap : TextureMap

CompositeTextureMap - superclass: textureMap; super-superclass:material - classID: #(640, 0)

Value > MAXWrapper > Material > TextureMap > CompositeTextureMap

NEW in 3ds Max 2009: The CompositeTextureMap has been reimplemented in 3ds Max 2009 but provides backwards compatibility with files containing the old version of the map.

Constructors:

compositeTextureMap ...

compositeMap ...

compositeTexture ...

Properties:

<CompositeTexturemap>.blendMode ArrayParameter default: #(0) -- int array; Map_Blend_Mode

NEW in 3ds Max 2009: Get/set the blend modes associated with all layers as an array of integers.

Possible values are:

# | Blend Mode | # | Blend Mode | # | Blend Mode
0 | Normal | 9 | Screen | 18 | Hard Mix
1 | Average | 10 | Color Dodge | 19 | Difference
2 | Addition | 11 | Linear Dodge | 20 | Exclusion
3 | Subtract | 12 | Spotlight | 21 | Hue
4 | Darken | 13 | Spotlight Blend | 22 | Saturation
5 | Multiply | 14 | Overlay | 23 | Color
6 | Color Burn | 15 | Soft Light | 24 | Value
7 | Linear Burn | 16 | Hard Light |  |
8 | Lighten | 17 | Pin Light |  |

<CompositeTexturemap>.dlgOpened ArrayParameter default: #(true) -- boolean array; Dialog_Opened

NEW in 3ds Max 2009: Get/set the rollout open states of all composite layers as an array of booleans.

<CompositeTexturemap>.layerName ArrayParameter default: #(undefined) -- string array; Name

NEW in 3ds Max 2009: Get/set the names of all composite layers as an array of strings.

<CompositeTexturemap>.mapEnabled ArrayParameter default: #(true) -- boolean array; Map_1_Enable

Get/set the enabled states of all composite layers as an array of Boolean values.

This property existed in the legacy version of the CompositeMap prior to 3ds Max 2009.

<CompositeTexturemap>.mapList ArrayParameter default: #(undefined) -- texturemap array; Maps

Get/set the maps of all composite layers as an array of TextureMaps.

This property existed in the legacy version of the CompositeMap prior to 3ds Max 2009.

<CompositeTexturemap>.mask ArrayParameter default: #(undefined) -- texturemap array; Map_Mask

NEW in 3ds Max 2009: Get/set the mask of each composite layer as a TextureMap object element of the array.

<CompositeTexturemap>.maskEnabled ArrayParameter default: #(true) -- boolean array; Map_1_Enable

NEW in 3ds Max 2009: Get/set the mask enabled states of all composite layers as an array of Booleans.

<CompositeTexturemap>.opacity ArrayParameter default: #(100.0) -- float array; Map_Opacity

NEW in 3ds Max 2009: Get/set the opacity of all composite layers as an array of Integers.

CompositeTexturemap interfaces:

Interface: layers

Methods:

<void>add()

NEW in 3ds Max 2009: Adds a new layer to the Composite Map. Equivalent to pressing the "Add a New Layer" icon in the UI.

<void>delete <integer>index

NEW in 3ds Max 2009: Deletes the indexed layer of the Composite Map. Equivalent to pressing the "Delete This Layer" icon in the UI.

<void>duplicate <integer>index

NEW in 3ds Max 2009: Duplicates the indexed layer of the Composite Map, creating an identical new layer. Equivalent to pressing the "Duplicate This Layer" icon in the UI.

See also

TextureMap Common Properties, Operators, and Methods

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Dent : TextureMap

Dent - superclass: textureMap; super-superclass:material - classID: #(536, 0)

Value > MAXWrapper > Material > TextureMap > Dent

Constructor

dent ...

dents ...

Properties

<Dent>.size Float default: 200.0 -- animatable

Sets the relative size of dents. As the size increases, the number of dents decreases when other settings are the same.

<Dent>.strength Float default: 20.0 -- animatable

Higher values increase the number of dents, lower values decrease the number of dents. Decreasing Strength reduces the number of dents over a surface. At 0, the surface is smooth (no dents). Increasing Strength increases the number of dents over a surface. 100 is maximum.

<Dent>.iterations Integer default: 2 -- animatable

Sets the number of calculations used to create the dents.

<Dent>.color1 Color default: (color 0 0 0) -- animatable, alias: Color_1

Sets the color of the dent.

<Dent>.map1 TextureMap default: undefined

Colors can be replaced by maps in the dent pattern.

<Dent>.map1Enabled Boolean default: true -- alias: MapOn1

Enables the associated map.

<Dent>.color2 Color default: (color 255 255 255) -- animatable, alias: Color_2

Sets the second color of the dent.

<Dent>.map2 TextureMap default: undefined

Assigns second map to the dent pattern.

<Dent>.map2Enabled Boolean default: true -- alias: MapOn2

Enables the associated map.

<Dent>.coords StandardXYZGen -- alias: coordinates

See StandardXYZGen for the StandardXYZGen properties.

See also

TextureMap Common Properties, Operators, and Methods

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


DummyRadMapClass : ReferenceTarget

DummyRadMapClass : ReferenceTarget {3d205434,37b31d2f}

Constructor

Class instances not creatable by MAXScript

Aliases

DummyRadMapClass

radianceMap

Properties

.brightness () : float

The brightness value.

.contrast () : float

The contrast value.

.daylight () : boolean

Daylight flag.

.exterior () : boolean

Exterior flag.


Emulator : TextureMap

Value > MAXWrapper > Material > TextureMap > Emulator

Constructor

Class instances not creatable by MAXScript

Aliases

Emulator

MSEmulator

Properties

See also

TextureMap Common Properties, Operators, and Methods

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Falloff : TextureMap

falloff - superclass: textureMap; super-superclass:material - classID: #(1858302732, 0)

Value > MAXWrapper > Material > TextureMap > Falloff

Constructor

falloff ...

Properties

<Falloff>.color1 Color default: (color 0 0 0) -- animatable, alias: Color_1

Sets the first color for falloff.

<Falloff>.map1Amount Float default: 100.0 -- animatable, alias: Map_Amount_1

Relative strength of the first color in the falloff map.

<Falloff>.map1 TextureMap default: undefined -- alias: Map_1

Assigns a map to the first slot in the falloff.

<Falloff>.map1On Boolean default: true  -- alias: Map_1_Enable

When on, the selected maps are used in the falloff. When off, colors are used.

<Falloff>.color2 Color default: (color 255 255 255) -- animatable, alias: Color_2

Sets the second color for falloff.

<Falloff>.map2Amount Float default: 100.0 -- animatable, alias: Map_Amount_2

Relative strength of the second color in the falloff map.

<Falloff>.map2 TextureMap default: undefined -- alias: Map_1

Assigns a map to the second slot in the falloff.

<Falloff>.map2On Boolean default: true   -- alias: Map_2_Enable

When on, the selected maps are used in the falloff. When off, colors are used.

<Falloff>.type Integer default: 1 -- animatable, alias: Falloff_Type

Sets the type of falloff:

0- Towards/Away (Sets the angular falloff ranges between face normals that face toward (parallel to) the falloff direction and normals that face away from the falloff direction. The falloff range is based on a 180-degree change in face normal direction.)

1- Perpendicular/Parallel (Sets the angular falloff ranges between face normals that are perpendicular to the falloff direction and normals that are parallel to the falloff direction. The falloff range is based on a 90-degree change in face normal direction.)

2- Fresnel (Based on adjustments to the Index of Refraction (IOR). Results in dim reflections on surfaces facing the view, with much brighter reflections on angled faces, creating highlights like those on the sides of a glass.)

3- Lit/Shadowed (Adjusts between two subtextures based on how much light is falling on the object.)

4- Distance Blend (Adjusts between two subtextures based on Near Distance and Far Distance values. Uses include reducing aliasing on large terrain objects and controlling the shading in non-photorealistic environments.)

<Falloff>.mtlIOROverride Boolean default: true -- alias: Mtl_IOR_Override_Enable

When on, allows change to the Index of Refraction set by the material.

<Falloff>.ior Float default: 1.6 -- animatable, alias: Index_of_Refraction

Sets a new Index of Refraction.

<Falloff>.nearDistance Float default: 0.0 -- animatable, alias: Near_Distance

The distance at which the blend effect begins.

NOTE:

This is only available for the Distance Blend falloff type.

<Falloff>.farDistance Float default: 100.0 -- animatable, alias: Far_Distance

The distance at which the blend effect ends.

NOTE:

This is only available for the Distance Blend falloff type.

<Falloff>.extrapolateOn Boolean default: false -- alias: Distance_Blend_Extrapolate

When on, allows the effect to continue beyond the Near and Far settings.

NOTE:

This is only available for the Distance Blend falloff type.

<Falloff>.direction Integer default: 0 -- animatable, alias: Falloff_Direction

Sets the direction of the falloff:

0- Viewing Direction (Sets the falloff direction relative to the camera (or screen). Changing object orientation doesn’t affect the falloff map.)

1- Object ( Picks an object whose orientation determines the falloff direction, .node. The falloff direction is the direction from the point being shaded toward the object’s center. Points on the side toward the object center get the Towards value, and those away from the object get the Away value.)

2- Local X Axis (Sets the falloff direction to the object’s local X-axis. Changing the orientation of the object changes the falloff direction. When no object is chosen, the falloff direction uses the local X-axis of the object being shaded.)

3- Local Y Axis (Sets the falloff direction to the object’s local Y-axis. Changing the orientation of the object changes the falloff direction. When no object is chosen, the falloff direction uses the local Y-axis of the object being shaded.)

4- Local Z Axis (Sets the falloff direction to the object’s local Z-axis. Changing the orientation of the object changes the falloff direction. When no object is chosen, the falloff direction uses the local Z-axis of the object being shaded.)

5- World X Axis (Sets the falloff direction to the world coordinate system X-axis. Changing object orientation doesn’t affect the falloff map.)

6- World Y Axis (Sets the falloff direction to the world coordinate system Y-axis. Changing object orientation doesn’t affect the falloff map.)

7- World Z Axis (Sets the falloff direction to the world coordinate system Z-axis. Changing object orientation doesn’t affect the falloff map.)

<Falloff>.node Node default: undefined -- alias: Falloff_Direction_Object

When Falloff_Direction = 1, this object will determine the falloff direction.

<Falloff>.texture_output StandardTextureOutput

See TexOutputClass for the StandardTextureOutput properties.

<Falloff>.mixcurve SubAnim default: SubAnim:MixCurve

This mix curve determines the falloff.

<Falloff.mixcurve>.curve_1 SubAnim default: SubAnim:Curve_1

The curve_1 SubAnim contains the mix curve points. You cannot create or access these points unless the point is animated. If a point is animated, you can access the point position using the .Point_X property of curve_1, where X in the point number.

See also

TextureMap Common Properties, Operators, and Methods

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


FalloffTextureMap : TextureMap

Value > MAXWrapper > Material > TextureMap > FalloffTextureMap

Constructor

The falloffTextureMap class is used to convert 3ds Max R2.5 falloff texture maps to the new Falloff map in 3ds Max 4 and higher. FalloffTextureMap objects are not creatable in MAXScript.

Properties

<fallofftextureMap>.perpendicularValue (Perpendicular_Value) : float

The perpendicular falloff value.

<fallofftextureMap>.parallelValue (Parallel_Value) : float

The parallel falloff value.

<fallofftextureMap>.type (Falloff_Type) : integer

The falloff type.

<fallofftextureMap>.direction : integer

The falloff direction type.

<fallofftextureMap>.node : node

The node.

See also

Falloff : TextureMap

TextureMap Common Properties, Operators, and Methods

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Flat_Mirror : TextureMap

flatMirror - superclass: textureMap; super-superclass:material - classID: #(608, 0)

Value > MAXWrapper > Material > TextureMap > Flat_Mirror

Constructor

Flat_Mirror ...

flatMirror ...

Properties

<FlatMirror>.applyBlur Boolean default: true

Turns on filtering to blur the maps. Antialiasing is also applied to the Distortion effect, if any, when Apply Blur is turned on.

<FlatMirror>.blurAmount Float default: 1.0 -- animatable

Affects the sharpness or blurriness of the generated map based on its distance from the object. The farther away the map is, the greater the blurring.

<FlatMirror>.frame Integer default: 1

When this is set to 0, the renderer creates the automatic flat mirror only on the first frame. When this is set to 1, the renderer creates the automatic flat mirror based on nthframe.

<FlatMirror>.nthFrame Integer default: 1

<FlatMirror>.useEnviroment Boolean default: true

When off, environment maps are ignored by the mirror during rendering. It’s useful to turn this off when you have mirrors in the scene and you’re rotoscoping against a flat screen environment map. A screen environment map does not exist in 3D space the way the other environment-map types do, and will not render properly.

<FlatMirror>.applyToFaceID Boolean default: false

When on, a specified material is applied to the mirror face.

<FlatMirror>.faceID Integer default: 1

Specifies the material ID number where you want the mirror assigned.

<FlatMirror>.distortionType Integer default: 0

To simulate irregular surfaces, you can distort the flat-mirror reflections. Distortion can be based on a bump map or on noise controls built into Flat Mirror material.

0- None (No distortion)

1- Use Bump Map (Distorts the reflection using the material’s bump map. A flat mirror surface that has a Bump map will appear bumpy, but its reflection won’t be distorted by the bumps unless you use this option.)

2- Use Built-in Noise (Distorts the reflection using the settings in the Noise group.)

<FlatMirror>.noiseType Integer default: 0

Sets the type of noise when distortionType is set to 2.

0- Regular (Generates plain noise. Basically the same as Fractal noise with the Levels setting at 1. When the noise type is set to Regular, the Levels spinner is inactive, because Regular is not a fractal function.)

1- Fractal (Generates noise using a fractal algorithm. The Levels setting determines the number of iterations for the fractal noise.)

2- Turbulence (Generates fractal noise with an absolute value function applied to it to make fault lines.)

<FlatMirror>.distortionAmount Float default: 0.5 -- animatable

Adjusts the amount of distortion to the reflected image. This is the only value that affects the amount of distortion.

<FlatMirror>.phase Float default: 0.0 -- animatable

Controls the speed of the animation of the noise function. A 3D noise function is used for the noise, so that the first two parameters are U and V and the third is phase.

<FlatMirror>.size Float default: 10.0 -- animatable

Sets the scale of the noise function. Smaller values give smaller chunks of noise.

<FlatMirror>.level Float default: 2.0 -- animatable

Sets the number of fractal iterations or turbulence (as a continuous function).

See also

TextureMap Common Properties, Operators, and Methods

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


FoliagetextureMap : TextureMap

FoliagetextureMap : textureMap {2f905b11,f00004f}

Texture used by the Foliage AEC object.

Class instances not creatable by MAXScript

Properties:

.Soften : percentage

.Color_1 : RGB color

.Color_2 : RGB color

See also

Foliage : GeometryClass

TextureMap Common Properties, Operators, and Methods

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Gradient : TextureMap

Gradient - superclass: textureMap; super-superclass:material - classID: #(624, 0)

Value > MAXWrapper > Material > TextureMap > Gradient

Constructor

gradient ...

Properties

<Gradient>.color1 Color default: (color 0 0 0) -- animatable, alias: Color_1

The gradient interpolates between 3 colors. This is the first color.

<Gradient>.map1 TextureMap default: undefined -- alias: Map_1

You can interpolate between 3 maps instead of colors. This is the first map.

<Gradient>.map1Enabled Boolean default: true -- alias: Map_1_Enable

When on, the associated map is enabled.

<Gradient>.color2 Color default: (color 127.5 127.5 127.5) -- animatable, alias: Color_2

The gradient interpolates between 3 colors. This is the second color.

<Gradient>.map2 TextureMap default: undefined -- alias: Map_2

You can interpolate between 3 maps instead of colors. This is the second map.

<Gradient>.map2Enabled Boolean default: true -- alias: Map_2_Enable

When on, the associated map is enabled.

<Gradient>.color3 Color default: (color 255 255 255) -- animatable, alias: Color_3

The gradient interpolates between 3 colors. This is the third color.

<Gradient>.map3 TextureMap default: undefined -- alias: Map_3

You can interpolate between 3 maps instead of colors. This is the third map.

<Gradient>.map3Enabled Boolean default: true -- alias: Map_3_Enable

When on, the associated map is enabled.

<Gradient>.color2Pos Float default: 0.5 -- animatable, alias: Color_2_Position

Controls the centerpoint of the middle color. The position ranges from 0 to 1. When it is 0, color2 replaces color3. When it is 1, color2 replaces color1.

<Gradient>.gradientType Integer default: 0 -- alias: Gradient_Type

Sets the type of gradient:

0- Linear (Interpolates the color based on the vertical position.)

1- Radial (Interpolates based on the distance from the center of the map.)

<Gradient>.noiseAmount Float default: 0.0 -- animatable, alias: Noise_Amount

When nonzero (ranges from 0 to 1), applies a noise effect. This perturbs the color interpolation parameter using a 3D noise function based on U, V, and Phase.

<Gradient>.noiseType Integer default: 0 -- alias: Noise_Type

Set the type of noise

0- Regular (Generates plain noise. This is the same as Fractal noise with the Levels setting at 1.)

1- Fractal (Generates noise using a fractal algorithm. noiselevels sets the number of iterations for the fractal noise.)

2- Turbulence (Generates fractal noise with an absolute value function applied to it to make fault lines. The noise amount must be greater than 0 to see any effects of turbulence.)

<Gradient>.noiseSize Float default: 1.0 -- animatable, alias: Noise_Size

Scales the noise function. Smaller values give smaller chunks of noise.

<Gradient>.noisePhase Float default: 0.0 -- animatable, alias: Noise_Phase

Controls the speed of the animation of the noise function. A 3D noise function is used for the noise. The first two parameters are U and V and the third is phase.

<Gradient>.noiseLevels Float default: 4.0 -- animatable, alias: Noise_Levels

Sets the number of fractal iterations or turbulence (as a continuous function).

<Gradient>.noiseThresholdLow Float default: 0.0 -- animatable, alias: Low_Threshold

<Gradient>.noiseThresholdHigh Float default: 1.0 -- animatable, alias: High_Threshold

<Gradient>.noiseThresholdSMooth Float default: 0.0 -- animatable, alias: Threshold_Smoothing

When the noise value is above the Low threshold and below the High threshold, the dynamic range is stretched to fill 0-1. This produces a smaller discontinuity at the threshold transition and thus causes less potential aliasing.

noiseThresholdLow: Sets the low threshold.

noiseThresholdHigh: Sets the high threshold.

NoiseThresholdSmooth: Helps make a smoother transition from the threshold value to the noise value. When 0, no smoothing is applied. When it is 1, the maximum amount of smoothing is applied.

<Gradient>.coords StandardUVGen -- alias: coordinates

See UVGenClass for the StandardUVGen properties.

<Gradient>.output StandardTextureOutput

See TexOutputClass for the StandardTextureOutput properties.

See also

TextureMap Common Properties, Operators, and Methods

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Gradient_Ramp : TextureMap

Gradient_Ramp - superclass: textureMap; super-superclass:material - classID: #(502029190, 1127758417)

Value > MAXWrapper > Material > TextureMap > Gradient_Ramp

Constructor

Gradient_Ramp ...

Properties

<Gradient_Ramp>.Gradient_Type Integer default: 4

The type of gradient:

0- 4 Corner (An asymmetrical linear transition of colors.)

1- Box (A box.)

2- Diagonal (A linear diagonal transition of colors.)

3- Lighting (Based on the light intensity value.)

4- Linear (A smooth, linear transition of colors.)

5- Mapped (Based on the luminance. Remaps the colors of the source map used in the gradient.)

6- Normal (Based on the angle between the vector from the camera to the object and the surface normal vector at the sample point.)

7- Pong (A diagonal sweep that repeats in the middle.)

8- Radial (A radial transition of colors.)

9- Spiral (A smooth, circular transition of colors.)

10- Sweep (A linear sweep transition of colors.)

11- Tartan (A plaid.)

<Gradient_Ramp>.Source_Map_On Integer default: 1

When on, assigns a map to a mapped gradient.

0- Off

1- On

<Gradient_Ramp>.Noise_Type Integer default: 0

Sets the noise type:

0- Regular (Generates plain noise. Basically the same as fractal noise with levels disabled, because Regular is not a fractal function.)

1- Fractal (Generates noise using a fractal algorithm. levels sets the number of iterations for the fractal noise.)

2- Turbulence (Generates fractal noise with an absolute value function applied to it to make fault lines.

NOTE:

that amount must be greater than 0 to see any effects of turbulence.)

<Gradient_Ramp>.amount Float default: 0.0 -- animatable

When nonzero, a random noise effect is applied to the gradient, based on the interaction of the gradient ramp colors (and maps, if present). The higher this value, the greater the effect.

<Gradient_Ramp>.size Float default: 1.0 -- animatable

Sets the scale of the noise function. Smaller values give smaller chunks of noise.

<Gradient_Ramp>.phase Float default: 0.0 -- animatable

Controls the speed of the animation of the noise function. A 3D noise function is used for the noise; the first two parameters are U and V and the third is phase.

<Gradient_Ramp>.Levels Float default: 4.0 -- animatable

Sets the number of fractal iterations or turbulence (as a continuous function).

<Gradient_Ramp>.Low_Threshold Float default: 0.0 -- animatable

<Gradient_Ramp>.High_Threshold Float default: 1.0 -- animatable

When the noise value is above the Low threshold and below the High threshold, the dynamic range is stretched to fill 0 to 1. This causes a smaller discontinuity at the threshold transition and produces less potential aliasing.

<Gradient_Ramp>.Threshold_Smoothing Float default: 0.0 -- animatable

Helps make a smoother transition from the threshold value to the noise value. When 0, no smoothing is applied. When 1, the maximum amount of smoothing is applied.

<Gradient_Ramp>.coordinates SubAnim

See UVGenClass for the StandardUVGen properties.

<Gradient_Ramp>.output StandardTextureOutput

See TexOutputClass for the StandardTextureOutput properties.

<Gradient_Ramp>.gradient_ramp SubAnim

This subanim contains all flags in the map. Currently, flags are being added dynamically by the UI only and can not be created using MAXScript. Existing flags can be accessed as subanims of the gradient_ramp subanim though.

<Gradient_Ramp.gradient_ramp>.flag__1 SubAnim

<Gradient_Ramp.gradient_ramp>.flag__2 SubAnim

<Gradient_Ramp.gradient_ramp>.flag__3 SubAnim

These are the 3 default color flags of a newly created Gradient_Ramp Map.

<Gradient_Ramp.gradient_ramp.flag__1>.color Point3 default: [0,0,0] -- animatable

<Gradient_Ramp.gradient_ramp.flag__2>.color Point3 default: [255,255,255] -- animatable

<Gradient_Ramp.gradient_ramp.flag__3>.color Point3 default: [127.5,127.5,127.5] -- animatable

Each flag has a color property which contains the color associated with the flag. Note that the 3rd flag is the middle flag. The first and the second flag cannot be removed and are always accessible. Any additional flags between the first and the second will have higher numbers.

<Gradient_Ramp.gradient_ramp.flag__3>.position Float default: 50.0 -- animatable

The 3rd flag has a position property which defines its location between the first and the second flag. The first two flags cannot be moved. Any additional flags added through the UI will have a position property and can be accessed through MAXScript.

See also

TextureMap Common Properties, Operators, and Methods

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Marble : TextureMap

Marble - superclass: textureMap; super-superclass:material - classID: #(528, 0)

Value > MAXWrapper > Material > TextureMap > Marble

Constructor

marble ...

Properties

<Marble>.size Float default: 70.0 -- animatable

Sets the spacing between the veins.

<Marble>.width Float default: 0.025 -- animatable, alias: Vein_width

Sets the width of the veins.

<Marble>.color1 Color default: (color 51 51 25.5) -- animatable, alias: Color_1

The color for the veins.

<Marble>.map1 TextureMap default: undefined -- alias: Map_1

The map used for the veins.

<Marble>.map1Enabled Boolean default: true -- alias: Map_1_Enable

When on, the veins use map1 as their color.

<Marble>.color2 Color default: (color 209.1 209.1 153) -- animatable, alias: Color_2

The color of the background.

<Marble>.map2 TextureMap default: undefined -- alias: Map_2

The map used for the background.

<Marble>.map2Enabled Boolean default: true -- alias: Map_2_Enable

When on, map2 is used for the background.

<Marble>.coords StandardXYZGen -- alias: coordinates

See StandardXYZGen for the StandardXYZGen properties.

See also

TextureMap Common Properties, Operators, and Methods

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Mask : TextureMap

Mask - superclass: textureMap; super-superclass:material - classID: #(544, 0)

Value > MAXWrapper > Material > TextureMap > Mask

Constructor

mask ...

maskTex ...

Properties

<Mask>.map TextureMap default: undefined

The map viewed through the mask.

<Mask>.mapEnabled Boolean default: true -- alias: Map_1_Enable

Enables the map.

<Mask>.mask TextureMap default: undefined

The map to be used as a mask.

<Mask>.maskEnabled Boolean default: true -- alias: Map_2_Enable

Enables the mask map.

<Mask>.maskInverted Boolean default: false -- alias: Invert

When on, inverts the effect of the mask.

See also

TextureMap Common Properties, Operators, and Methods

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Mix : TextureMap

Mix - superclass: textureMap; super-superclass:material - classID: #(560, 0)

Value > MAXWrapper > Material > TextureMap > Mix

Constructor

mix ...

mixTextures ...

Properties

<Mix>.color1 Color default: (color 0 0 0) -- animatable, alias: Color_1

The first color to be mixed.

<Mix>.map1 TextureMap default: undefined -- alias: Map_1

Sets a map to be used instead of color1.

<Mix>.map1Enabled Boolean default: true -- alias: Map_1_Enable

When on, map1 is enabled.

<Mix>.color2 Color default: (color 255 255 255) -- animatable, alias: Color_2

The second color to be mixed.

<Mix>.map2 TextureMap default: undefined -- alias: Map_2

Sets a map to be used instead of color2.

<Mix>.map2Enabled Boolean default: true -- alias: Map_2_Enable

When on, map2 is enabled.

<Mix>.mixAmount Float default: 0.0 -- animatable, percentage

Determines the proportion of the mix. 0 means only color1 is visible on the surface, 1 means only color2 is visible.

<Mix>.mask TextureMap default: undefined

You can also use a map instead of the mix amount. The two colors will mix in greater or lesser degree according to the intensity of the map.

<Mix>.maskEnabled Boolean default: true -- alias: MaskEnable

When on, mask is used instead of mixAmount.

<Mix>.useCurve Boolean default: false

Determines whether the Mixing Curve effects the mix.

<Mix>.lower Float default: 0.3 -- animatable

<Mix>.upper Float default: 0.7 -- animatable

Adjusts the level of the upper and lower limits. If the two values are the same, the two materials will meet at a definite edge. Wider ranges give more gradual mixing.

<Mix>.output StandardTextureOutput

See TexOutputClass for the StandardTextureOutput properties.

See also

TextureMap Common Properties, Operators, and Methods

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Noise : TextureMap

Noise - superclass: textureMap; super-superclass:material - classID: #(564, 0)

Value > MAXWrapper > Material > TextureMap > Noise

Constructor

noise ...

Properties

<Noise>.type Integer default: 0

Sets the type of noise:

0- Regular (Generates plain noise. Basically the same as fractal noise with levels at 1.)

1- Fractal (Generates noise using a fractal algorithm. levels sets the number of iterations for the fractal noise.)

2- Turbulence (Generates fractal noise with an absolute value function applied to it to make fault lines.)

<Noise>.size Float default: 25.0 -- animatable, alias: Noise_Size

Sets the scale of the noise function.

<Noise>.thresholdLow Float default: 0.0 -- animatable, alias: Low_Threshold

<Noise>.thresholdHigh Float default: 1.0 -- animatable, alias: High_Threshold

When the noise value is above the Low threshold and below the High threshold, the dynamic range is stretched to fill 0-1. This creates a smaller discontinuity (technically, 1st order instead of 0 order) at the threshold transition and produces less potential aliasing.

<Noise>.levels Float default: 3.0 -- animatable, alias: Noise_Levels

Determines how much fractal energy is used for the Fractal and Turbulence noise functions. You can set the exact amount of turbulence you want, and also animate the number of fractal levels.

<Noise>.phase Float default: 0.0 -- animatable

Controls the speed of the animation of the noise function. Use this option to animate the noise function.

<Noise>.color1 Color default: (color 0 0 0) -- animatable, alias: Color_1

Sets the first principal noise color.

<Noise>.map1 TextureMap default: undefined -- alias: Map_1

Map used in place of color1.

<Noise>.map1Enabled Boolean default: true -- alias: Map_1_Enable

When on, map1 is enabled.

<Noise>.color2 Color default: (color 255 255 255) -- animatable, alias: Color_2

Sets the second principal noise color.

<Noise>.map2 TextureMap default: undefined -- alias: Map_2

Map used in place of color2.

<Noise>.map2Enabled Boolean default: true -- alias: Map_2_Enable

When on, map2 is enabled.

<Noise>.coords StandardXYZGen -- alias: coordinates

See StandardXYZGen for the StandardXYZGen properties

<Noise>.output StandardTextureOutput

See TexOutputClass for the StandardTextureOutput properties

See also

TextureMap Common Properties, Operators, and Methods

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Normal_Bump : textureMap

Normal_Bump - superclass: textureMap; super-superclass:material - 10:0 - classID: #(608051910, 1677107220)

Value > MAXWrapper > Material > TextureMap > Normal_Bump

This texture map implements the normal bump map for applying baked normal maps.

NOTE:

This texture map is not creatable in Autodesk VIZ.

Constructors

Normal_Bump ...

GNormal ...

Properties:

<Normal_Bump>.bump_map UndefinedClass default: undefined -- texmap; Additional_Bumpmap

Get/Set the additional bump map texture.

<Normal_Bump>.bump_spin Float default: 1.0 -- animatable; float; Bump_Multiplier

Get/Set the Additional Bump multiplier value.

<Normal_Bump>.flipgreen BooleanClass default: false -- boolean; flip_green

When set to true, flips the green channel.

<Normal_Bump>.flipred BooleanClass default: false -- boolean; flip_red

When set to true, flips the red channel.

<Normal_Bump>.map1on BooleanClass default: true -- boolean

When set to true, enables the Normal map channel.

<Normal_Bump>.map2on BooleanClass default: true -- boolean

When set to true, enables the Additional Bump map channel.

<Normal_Bump>.method Integer default: 0 -- integer; Methods

Get/set the bump method.

0 - Tangent (default)

1 - Local XYZ

2 - Screen

3 - World

<Normal_Bump>.mult_spin Float default: 1.0 -- animatable; float; Multiplier

Get/Set the Normal multiplier value.

<Normal_Bump>.normal_map UndefinedClass default: undefined -- texmap; Map1

Get/Set the Normal map texture.

<Normal_Bump>.swap_rg BooleanClass default: false -- boolean; swap_red_green

When set to true, swaps the red and green channels.

See also

TextureMap Common Properties, Operators, and Methods

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


NoTexture : TextureMap

Value > MAXWrapper > Material > TextureMap > NoTexture

Constructor:

noTexture ...

Properties:

There are no additional properties associated with NoTexture.

Description:

Assigning this texture is equivalent to setting a texture to "None" in the Material Editor. Setting a texture to the value undefined is also equivalent to setting the texture to "None" in the Material Editor.

FOR EXAMPLE

$box01.material.bumpmap=noTexture()

or

$box01.material.bumpmap=undefined

See also

TextureMap Common Properties, Operators, and Methods

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Output : TextureMap

output - superclass: textureMap; super-superclass:material - classID: #(688, 0)

Value > MAXWrapper > Material > TextureMap > Output

Constructor

output ...

Properties

<output>.map1 TextureMap default: undefined -- alias: Map_1

Map used to apply output settings.

<output>.map1Enabled Boolean default: true -- alias: Map_1_Enable

When on, enables the associated map.

<output>.output StandardTextureOutput

See TexOutputClass for the StandardTextureOutput properties

See also

TextureMap Common Properties, Operators, and Methods

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Particle_Age : TextureMap

Particle_Age - superclass: textureMap; super-superclass:material - classID: #(-1922986332, 1237051599)

Value > MAXWrapper > Material > TextureMap > Particle_Age

Constructor

particle_age ...

NOTE:

This class is not available in Autodesk VIZ.

Properties

<Particle_Age>.color1 Color default: (color 0 0 0) -- animatable, alias: Color_1

Sets the color of a particle at its birth.

<Particle_Age>.map1 TextureMap default: undefined -- alias: Map_1

Sets the map used for a particle at its birth.

<Particle_Age>.map1Enabled Boolean default: true -- alias: Map_1_Enable

When on, the associated map is enabled.

<Particle_Age>.age1 Float default: 0.0 -- animatable, alias: Age_1

Sets the age where a particle starts changing from color1 to color2, expressed as a percentage of the particle’s entire life.

<Particle_Age>.color2 Color default: (color 127.5 127.5 127.5) -- animatable, alias: Color_2

Sets the color of a particle in mid-life.

<Particle_Age>.map2 TextureMap default: undefined -- alias: Map_2

Sets the map used for a particle in mid-life.

<Particle_Age>.map2Enabled Boolean default: true -- alias: Map_2_Enable

When on, the associated map is enabled.

<Particle_Age>.age2 Float default: 50.0 -- animatable, alias: Age_2

Sets the age where a particle’s color equals color2, expressed as a percentage of the particle’s entire life.

<Particle_Age>.color3 Color default: (color 255 255 255) -- animatable, alias: Color_3

Sets the color of a particle at its death.

<Particle_Age>.map3 TextureMap default: undefined -- alias: Map_3

Sets the map used for a particle at its death.

<Particle_Age>.map3Enabled Boolean default: true -- alias: Map_3_Enable

When on, the associated map is enabled.

<Particle_Age>.age3 Float default: 100.0 -- animatable, alias: Age_3

Sets the age where a particle changes to color3, expressed as a percentage of the particle’s entire life.

<Particle_Age>.output StandardTextureOutput

See TexOutputClass for the StandardTextureOutput properties.

See also

TextureMap Common Properties, Operators, and Methods

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Particle_MBlur : TextureMap

Particle_MBlur - superclass: textureMap; super-superclass:material - classID: #(-1972081691, -2129248522)

Value > MAXWrapper > Material > TextureMap > Particle_MBlur

Constructor

Particle_MBlur ...

particleBlur ...

NOTE:

This class is not available in Autodesk VIZ.

Properties

<Particle_MBlur>.color1 Color default: (color 255 255 255) -- animatable, alias: Color_1

A particle approaches this color as it reaches its slowest speed. By default, this color is white to provide the opaque end of the range for an opacity map.

<Particle_MBlur>.color2 Color default: (color 0 0 0) -- animatable, alias: Color_2

A particle approaches this color as it speeds up. As a default, this color is black to provide transparency in an opacity map.

<Particle_MBlur>.sharp Float default: 2.0 -- animatable, alias: Sharpness

Controls the transparency, relative to the speed. If Sharpness is set to 0, the entire particle is blurry and transparent, no matter how slow it is traveling. The default works well in many cases.

See also

TextureMap Common Properties, Operators, and Methods

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Perlin_Marble : TextureMap

Perlin_Marble - superclass: textureMap; super-superclass:material - classID: #(598543081, 361593480)

Value > MAXWrapper > Material > TextureMap > Perlin_Marble

Constructor

Perlin_Marble ...

perlinMarble ...

Properties

<Perlin_Marble>.size Float default: 50.0 -- animatable

Sets the size of the marble pattern. Change this to change the scale of marble, relative to the object’s geometry.

<Perlin_Marble>.level Float default: 8.0 -- animatable, alias: Levels

Sets the number of times the turbulence algorithm is applied. Can range from 1.0 to 10.0. The higher the value, the more complicated the marble pattern.

<Perlin_Marble>.color1 Color default: (color 189.975 189.975 160.65) -- animatable, alias: Color_1

The first color used in the marble.

<Perlin_Marble>.saturation1 Float default: 85.0 -- animatable, alias: Color_1_Saturation

Controls the saturation of the color in the map, without altering the color displayed in the color swatch. Lower values darken the color, and higher values lighten it.

<Perlin_Marble>.map1 TextureMap default: undefined

Map used in place of color1.

<Perlin_Marble>.map1Enabled Boolean default: true -- alias: EnableMap1

When on, the associated map is enabled.

<Perlin_Marble>.color2 Color default: (color 59.925 89.25 59.925) -- animatable, alias: Color_2

The second color used in the marble.

<Perlin_Marble>.saturation2 Float default: 70.0 -- animatable, alias: Color_2_Saturation

Controls the saturation of the color in the map, without altering the color displayed in the color swatch. Lower values darken the color, and higher values lighten it.

<Perlin_Marble>.map2 TextureMap default: undefined

Map used in place of color2.

<Perlin_Marble>.map2Enabled Boolean default: true -- alias: EnableMap2

When on, the associated map is enabled.

<Perlin_Marble>.coords StandardXYZGen -- alias: Coordinates

See StandardXYZGen for the StandardXYZGen properties.

See also

TextureMap Common Properties, Operators, and Methods

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Planet : TextureMap

Planet - superclass: textureMap; super-superclass:material - classID: #(1178168561, 0)

Value > MAXWrapper > Material > TextureMap > Planet

Constructor

planet ...

Properties

<Planet>.color1 Color default: (color 10.2 20.4 79.05) -- animatable, alias: Color_1

The color at the center of the water mass.

<Planet>.color2 Color default: (color 10.2 30.6 79.05) -- animatable, alias: Color_2

The color surrounding the center of the water mass.

<Planet>.color3 Color default: (color 10.2 40.8 79.05) -- animatable, alias: Color_3

The color surrounding color2, meeting the land.

<Planet>.color4 Color default: (color 10.2 99.45 12.75) -- animatable, alias: Color_4

<Planet>.color5 Color default: (color 99.45 79.05 12.75) -- animatable, alias: Color_5

<Planet>.color6 Color default: (color 79.05 20.4 7.65) -- animatable, alias: Color_6

<Planet>.color7 Color default: (color 99.45 79.05 51) -- animatable, alias: Color_7

<Planet>.color8 Color default: (color 99.45 99.45 99.45) -- animatable, alias: Color_8

The colors in these five swatches are applied to the land areas of the planet surface. Their arrangement continues that of the water colors. color4 is the shoreline of the land, meeting the water; color5 comes next, working toward the center of the land mass. color8 is at the center of the land mass.

<Planet>.continentSize Float default: 40.0 -- animatable, alias: Continent_Size

Sets the size of the fractal noise pattern used to generate the continents. Can range from 0 to 100. The higher the value, the larger the continents.

<Planet>.islandFactor Float default: 0.5 -- animatable, alias: Island_Factor

Sets the size of the fractal noise pattern used to generate islands and mountains. Can range from 0 to 100. At 0, the geography is very low. Higher settings create a more rugged landscape.

<Planet>.oceanPercent Float default: 60.0 -- animatable, alias: Ocean_Percent

Sets the percentage of the planet’s surface that is covered by water.

<Planet>.randomSeed Integer default: 12345

Sets the seed for pseudo-random generation of the pattern. Changing this number can completely change the pattern, even if other settings remain the same. On the other hand, a different Planet map with the same settings including the same Random Seed will appear the same.

<Planet>.blendWaterLand Boolean default: true

When on, the boundary between water and land is blended, giving a hazy appearance. When off, the boundary between water and land is sharp.

<Planet>.coords StandardXYZGen -- alias: Coordinates

See StandardXYZGen for the StandardXYZGen properties.

See also

TextureMap Common Properties, Operators, and Methods

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Raytrace : TextureMap

Raytrace - superclass: textureMap; super-superclass:material - classID: #(0, 675561916)

Value > MAXWrapper > Material > TextureMap > Raytrace

Constructor

raytrace ...

Properties

<Raytrace.parameters>.Trace_Mode Integer default: 0

Sets whether to cast reflected or refracted rays:

0- Auto Detect (If assigned to the material’s Reflection component, the raytracer will reflect. If assigned to Refraction, it will refract. If you assign Raytrace to any other component, you have to manually specify whether you want reflected rays or refracted rays.)

1- Reflection (Casts reflected rays off the object’s surface.)

2- Refraction (Casts refracted rays into or through the object’s surface.)

<Raytrace.parameters>.Options__Raytracer_Enable Boolean default: true -- animatable

Turns the raytracer on or off. Even with raytracing off, Raytrace material and Raytrace map still reflect and refract the environment, including both the environment map for the 3ds Max scene, and the environment map assigned to the Raytrace material.

<Raytrace.parameters>.Options__Antialiasing_Enable Boolean default: true -- animatable

Turns antialiasing on or off. Antialiasing is possibly the slowest portion of raytrace rendering.

<Raytrace.parameters>.Options__Self_Reflect_Refract Boolean default: true -- animatable

Turns self reflection/refraction on or off.

<Raytrace.parameters>.Options__Raytrace_Atmospherics Boolean default: true -- animatable

Turns the raytracing of atmospheric effects on or off. Atmospheric effects include fire, fog, volume light, and so on.

<Raytrace.parameters>.Options__Reflect_Refract_Material_ID_s Boolean default: true -- animatable

When on, the material reflects effects assigned to material IDs in the renderer’s G-buffer on or off.

<Raytrace.parameters>.Options__Raytrace_Objects_in_Glass Boolean default: true -- animatable

Turns the raytracing of objects inside raytraced objects on or off.

<Raytrace.parameters>.Options__Raytrace_Atmospherics_in_Glass Boolean default: true -- animatable

Same as the previous control, but for atmospheric effects instead of objects.

<Raytrace.parameters>.Options__Color_Density___Fog_Enable Boolean default: true -- animatable

Turns the color density and fog features on or off.

NOTE:

The Options__Color_Density___Fog_Enable property is not available in Autodesk VIZ

<Raytrace.parameters>.Background_Mode Integer default: 0

Sets Background Mode:

0- Use Environment Settings (Respects the environment settings of the current scene.)

1- Use Background_Color (Overrides environment settings)

2- Use background map (Overrides the environment settings with the specified map.)

<Raytrace.parameters>.Background_Color Color default: (color 0 0 0) -- animatable

Color used as background.

<Raytrace.parameters>.Local_Antialias_Override Boolean default: false

When on, allows you to modify local anitialiasing settings.

<Raytrace.parameters>.Adaptive_Antialiasing Boolean default: false

When on, enables the adaptive antialiaser for this Raytrace map.

<Raytrace.parameters>.Local_Threshold Float default: 0.1 -- animatable

Determines the sensitivity of the adaption algorithm. This value can range from 0 to 1, where 0 always casts the maximum number of rays and 1 always casts only the minimum number of rays.

<Raytrace.parameters>.Local_Min__Rays Integer default: 4 -- animatable

Sets the initial number of rays cast per pixel.

<Raytrace.parameters>.Local_Max_Rays Integer default: 32 -- animatable

Sets the maximum number of rays the algorithm casts.

<Raytrace.parameters>.Local_Blur_Offset Float default: 0.0 -- animatable

Affects the sharpness or blurriness of reflections or refractions without regard to distance. You can use this to soften the details of a reflection or refraction. This value is specified in pixels.

<Raytrace.parameters>.Local_Blur_Aspect Float default: 1.0 -- animatable

Changes the shape of the blur by changing the aspect ratio. Usually you will not need to change this setting.

<Raytrace.parameters>.Local_Defocus_Amount Float default: 0.0 -- animatable

Blurs based on distance. Objects near the surface are not blurred, but objects farther away are blurred. The rays cast are spread as they leave the surface of the Raytrace map object.

<Raytrace.parameters>.Local_Defocus_Aspect Float default: 1.0 -- animatable

Changes the shape of the defocusing by changing the aspect ratio. Usually you will not need to change this setting.

<Raytrace.parameters>.Use_Blur_Map Boolean default: false

When on, uses a map to apply the Blur Offset value. That is, where the map is white, blur offset is fully applied, and where it is black, it is ignored. For example, if the map is a Checker map, blur offset is applied only in every other square. Values between black and white cause less blur.

<Raytrace.parameters>.Use_Defocus_Map Boolean default: false

When on, uses a map to apply the Defocus value. That is, where the map is white, Defocus is fully applied, and where it is black, it is ignored. For example, if the map is a Checker map, Defocus is applied only in every other square. Values between black and white cause less defocusing.

<Raytrace.parameters>.Attenuation_Mode Integer default: 0

Sets Attenuation Mode:

0- Off

1- Linear (Linear attenuation is calculated between the attenuation_start and attenuation_end values.)

2- Inverse Scale (Sets inverse square attenuation. Inverse square attenuation is calculated beginning at the attenuation_start range, and doesn’t use the attenuation_end range. Inverse scale is the actual attenuation rate for light in the real world. However, it doesn’t always give the effect you want in a rendered scene.)

3- Exponential (Sets exponential attenuation. Exponential attenuation is calculated between the attenuation_start and attenuation_end values. You also specify the exponent to use.)

4- Custom Falloff (Specifies a custom curve to use for attenuation.)

<Raytrace.parameters>.Attenuation_Start Float default: 0.0 -- animatable

The distance in world units where attenuation begins.

<Raytrace.parameters>.Attenuation_End Float default: 100.0 -- animatable

<Raytrace.parameters>.Attenuation_Exponent Float default: 2.0 -- animatable

<Raytrace.parameters>.Attenuation_Color_Mode Integer default: 0

Attenuation_Color_Mode = 0 - Background; 1 - use Attenuation_Color

<Raytrace.parameters>.Attenuation_Color Color default: (color 0 0 0) -- animatable

Sets the distance in world units where the ray is fully attenuated.

<Raytrace.parameters>.Attenuation_Near Float default: 1.0 -- animatable

Sets the strength of the reflected/refracted ray at the start range distance. This is a normalized percentage that can range from 0.0 to 1.0.

<Raytrace.parameters>.Attenuation_Control_1 Float default: 0.6666 -- animatable

Controls the shape of the curve near the curve start.

<Raytrace.parameters>.Attenuation_Control_2 Float default: 0.3333 -- animatable

Controls the shape of the curve near the curve end.

<Raytrace.parameters>.Attenuation_Far Float default: 0.0 -- animatable

Sets the strength of the reflected/refracted ray at the end range distance. This is a normalized percentage that can range from 0.0 to 1.0.

<Raytrace.parameters>.Use_Reflectivity_Map Boolean default: false -- animatable

Enables a reflectivity map.

<Raytrace.parameters>.Reflectivity_Map_Amount Float default: 1.0 -- animatable

Controls the amount of raytracing used by the material it is assigned to.

<Raytrace.parameters>.Basic_Tint_Enable Boolean default: false

Turns basic tinting on or off.

<Raytrace.parameters>.Tint_Amount Float default: 1.0 -- animatable

Sets the amount of tinting used.

<Raytrace.parameters>.Tint_Color Color default: (color 255 255 255) -- animatable

Assigns a tint color for reflections.

<Raytrace.parameters>.Use_Tint_Map Boolean default: false

Enables the use of a map for tinting.

<Raytrace.parameters>.Color_Density_Enable Boolean default: false

Turns color density on or off.

<Raytrace.parameters>.Color_Density_Color Color default: (color 255 255 255) -- animatable

Sets the transmission color.

<Raytrace.parameters>.Color_Density_Amount Float default: 1.0 -- animatable

Controls the amount of density color. It can range from 0 to 1.0. Reducing this value reduces the density color effect.

<Raytrace.parameters>.Color_Density_Start Float default: 0.0 -- animatable

<Raytrace.parameters>.Color_Density_End Float default: 25.0 -- animatable

A thin piece of tinted glass is mainly clear, while a thick piece of the same glass has more color. Start and End Distance, expressed in world units, controls help you simulate this effect. Start is the position in the object where the density color begins to appear. End is the position in the object where the density color reaches its full Amount value. To have a lighter effect, increase the End value. To have a heavier effect, reduce the End value.

<Raytrace.parameters>.Use_Color_Density_Map Boolean default: false

Enables the use of a map for the color density filter.

<Raytrace.parameters>.Fog_Enable Boolean default: false

Turns fog on or off.

<Raytrace.parameters>.Fog_Color Color default: (color 255 255 255) -- animatable

Sets the fog color.

<Raytrace.parameters>.Fog_Amount Float default: 1.0 -- animatable

Controls the amount of density fog. It can range from 0 to 1.0. Reducing this value reduces the density fog effect and makes the fog translucent.

<Raytrace.parameters>.Fog_Start Float default: 0.0 -- animatable

<Raytrace.parameters>.Fog_End Float default: 25.0 -- animatable

Start and End Distance controls, expressed in world units, adjust the fog effect based on the object’s dimensions. Start is the position in the object where the density fog begins to appear. End is the position in the object where the density fog reaches its full Amount value. To have a lighter effect, increase the End value. To have a heavier effect, reduce the End value.

<Raytrace.parameters>.Use_Fog_Map Boolean default: false

Enables a map for the fog color.

<Raytrace.parameters>.Bump_Multiplier Float default: 0.2 -- float

Get/set the Bump Multiplier value.

<Raytrace.parameters>.Filter_Density_Map_Amount Float default: 1.0 -- float

Get/set the Filter Density map amount value.

<Raytrace.parameters>.Fog_Map_Amount Float default: 1.0 -- float

Get/set the Fog map amount value.

<Raytrace.parameters>.Refractions_as_Glass_Enable Boolean default: true -- boolean

Enable the glass refractions option.

<Raytrace.parameters>.Tint_Map_Amount Float default: 1.0 -- float

Get/set the Tint map amount value.

The following properties do not correspond to any user-interface items, and may or may not be used by the raytracer.

NOTE:

These properties are not available in Autodesk VIZ and 3ds Max 5.

<Raytrace.parameters>.Interobject_Interphase_Fusing Boolean default: false

<Raytrace.parameters>.IIF_Tolerance Float default: 1.0

<Raytrace.parameters>.Options__Color_Density___Fog_Enable Boolean default: true -- animatable; boolean

NOTES:

The sub-maps that can be assigned to a Raytrace texturemap are not accessible to MAXScript unless they have already been assigned to the Bricks map. Once these maps have been assigned, they are available as properties of the Bricks TextureMap value. The property names, however, are dependent on the type of maps assigned. For example, if dent maps were assigned to all the sub-maps, the property names would be similar to Background__Map__17____Dent, Blur_Map__Map__18____Dent, Defocus_Map__Map__19____Dent, Reflectivity_Map__Map__20____Dent, Tint_Map__Map__21____Dent, Color_Density_Map__Map__22____Dent, and Fog_Color_Map__Map__23____Dent. These maps are also stored as subAnims 2 through 8 of the Raytrace TextureMap value, respectively. If the subAnim name for a subAnim is similar to Background__None, no map has been assigned to that sub-map.

See also

TextureMap Common Properties, Operators, and Methods

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Reflect_Refract : TextureMap

Reflect_Refract - superclass: textureMap; super-superclass:material - classID: #(592, 0)

Value > MAXWrapper > Material > TextureMap > Reflect_Refract

Constructor

Reflect_Refract ...

reflectRefract ...

Properties

<Reflect_Refract>.source Integer default: 0

Chooses the source of the six cubic maps:

0- Automatic (Automatically generates by looking out in six directions from the pivot of the object with the material, then mapped onto the surface during rendering. When on, the options in the Automatic group are active, letting you choose whether the maps will be generated only once, or regenerated at specified frames in the animation.)

1- From File (When on, you can specify the bitmaps to use.)

<Reflect_Refract>.size Integer default: 100 -- animatable

Sets the size of the Reflect/Refract maps. The default value of 100 produces distinct images. Lower values lose progressively more detail.

<Reflect_Refract>.useAtmosphericMap Boolean default: true -- alias: Use_Atmospheric

When off, environment maps are ignored by Reflect/Refract map during rendering. It’s useful to turn this off when you have mirrors in the scene and you’re rotoscoping against a flat screen environment map. A screen environment map does not exist in 3D space the way the other environment-map types do, and will not render properly.

<Reflect_Refract>.apply Boolean default: true

Turns on filtering to blur the maps.

<Reflect_Refract>.blurOffset Float default: 0.0 -- animatable, alias: Blur_Offset

Affects the sharpness or blurriness of the map without regard to its distance from the object. Use this when you want to soften or defocus the details in a map to achieve the effect of a blurred image.

<Reflect_Refract>.blur Float default: 1.0 -- animatable

Affects the sharpness or blurriness of the generated map based on its distance from the object. The farther away the map is, the greater the blurring. Blur is primarily used to avoid aliasing. It’s a good idea to use a small amount of blurring for all maps in order to avoid the scintillation or aliasing that can occur when pixel details are reduced off in the distance.

<Reflect_Refract>.near Float default: 0.0 -- animatable, alias: Near_Value

Sets the near range for fog.

<Reflect_Refract>.far Float default: 500.0 -- animatable, alias: Far_Value

Sets the far range for fog.

<Reflect_Refract>.frametype Integer default: 0

Sets the frame type:

0- First Frame Only (Tells the renderer to create automatic maps only on the first frame.)

1- Every Nth Frame (Tells the renderer to create animated auto maps based on nthframe.)

<Reflect_Refract>.nthframe Integer default: 1

Sets the frame rate for automatic maps.

<Reflect_Refract>.bitmapName FilenameArray default: #(undefined, ... , undefined)

Array with 6 elements. Each element stores a string reflecting the name of a source bitmap file.

<Reflect_Refract>.outputname Filename default: undefined—alias: Output_Name

See also

TextureMap Common Properties, Operators, and Methods

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


RGB_Multiply : TextureMap

RGB_Multiply - superclass: textureMap; super-superclass:material - classID: #(656, 0)

Value > MAXWrapper > Material > TextureMap > RGB_Multiply

Constructor

RGB_Multiply ...

rgbMult ...

Properties

<RGB_Multiply>.color1 Color default: (color 255 255 255) -- animatable, alias: Color_1

<RGB_Multiply>.map1 TextureMap default: undefined -- alias: Map_1

<RGB_Multiply>.map1Enabled Boolean default: true -- alias: Map_1_Enable

Enables associated map.

<RGB_Multiply>.color2 Color default: (color 255 255 255) -- animatable, alias: Color_2

<RGB_Multiply>.map2 TextureMap default: undefined -- alias: Map_2

<RGB_Multiply>.map2Enabled Boolean default: true -- alias: Map_2_Enable

Enables associated map.

<RGB_Multiply>.alphaFrom Integer default: 2

Determines how to generate alpha for the map:

0- Map #1 (Uses the first map’s alpha channel.)

1- Map #2 (Uses the second map’s alpha channel.)

2- Multiply Alphas (Generates a new alpha channel by multiplying the alpha channels of the two maps.)

See also

TextureMap Common Properties, Operators, and Methods

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


RGB_Tint : TextureMap

RGB_Tint - superclass: textureMap; super-superclass:material - classID: #(548, 0)

Value > MAXWrapper > Material > TextureMap > RGB_Tint

Constructor

RGB_Tint ...

rgbTint ...

Properties

<RGB_Tint>.red Color default: (color 255 0 0) -- animatable

The tint of the red color channel.

<RGB_Tint>.green Color default: (color 0 255 0) -- animatable

The tint of the green color channel.

<RGB_Tint>.blue Color default: (color 0 0 255) -- animatable

The tint of the blue color channel.

<RGB_Tint>.map1 TextureMap default: undefined -- alias: Map_1

Sets the map to be tinted.

<RGB_Tint>.map1Enabled Boolean default: true -- alias: Map_1_Enable

Enable the effect of map1.

See also

TextureMap Common Properties, Operators, and Methods

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Smoke : TextureMap

Smoke - superclass: textureMap; super-superclass:material - classID: #(176447100, 0)

Value > MAXWrapper > Material > TextureMap > Smoke

Constructor

Smoke ...

Properties

<Smoke>.size Float default: 40.0 -- animatable

Changes the scale of the smoke "clumps".

<Smoke>.iterations Integer default: 5 -- animatable

Sets the number of times the fractal function is applied. The higher the value, the more detail within the smoke, but the longer the calculation time.

<Smoke>.phase Float default: 0.0 -- animatable

Shifts the turbulence within the smoke pattern. Animate this parameter to animate the movement of the smoke.

<Smoke>.exponent Float default: 1.5 -- animatable

Makes color2, representing the smoke, sharper and more wispy. As this value increases, the smoke "tendrils" become smaller within the pattern.

<Smoke>.color1 Color default: (color 0 0 0) -- animatable, alias: Color_1

The smokeless portion of the effect.

<Smoke>.map1 TextureMap default: undefined

The map used for the smokeless portion of the effect.

<Smoke>.map1On Boolean default: true -- alias: Map1_On

Enables the associated map.

<Smoke>.color2 Color default: (color 229.5 229.5 229.5) -- animatable, alias: Color_2

The color of the smoke.

<Smoke>.map2 TextureMap default: undefined

The map used for the smoke.

<Smoke>.map2On Boolean default: true -- alias: Map2_On

Enables the associated map.

<Smoke>.coords StandardXYZGen -- alias: Coordinates

See StandardXYZGen for the StandardXYZGen properties.

See also

TextureMap Common Properties, Operators, and Methods

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Speckle : TextureMap

Speckle - superclass: textureMap; super-superclass:material - classID: #(1656957834, 0)

Value > MAXWrapper > Material > TextureMap > Speckle

Constructor

Speckle ...

Properties

<Speckle>.size Float default: 0.1 -- animatable

Adjusts the size of the speckles. Use this to make the speckles match your geometry.

<Speckle>.color1 Color default: (color 51 127.5 255) -- animatable, alias: Color_1

The color of the speckles.

<Speckle>.map1 TextureMap default: undefined

The map used as the color of the speckles.

<Speckle>.map1On Boolean default: true -- alias: Map1_On

Enables associated map.

<Speckle>.color2 Color default: (color 178.5 204 204) -- animatable, alias: Color_2

The color of the background.

<Speckle>.map2 TextureMap default: undefined

The map used as the color of the background.

<Speckle>.map2On Boolean default: true -- alias: Map2_On

Enables associated map.

<Speckle>.coords StandardXYZGen -- alias: Coordinates

See StandardXYZGen for the StandardXYZGen properties.

See also

TextureMap Common Properties, Operators, and Methods

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Splat : TextureMap

Splat - superclass: textureMap; super-superclass:material - classID: #(151717113, 0)

Value > MAXWrapper > Material > TextureMap > Splat

Constructor

Splat ...

Properties

<Splat>.size Float default: 40.0 -- animatable

Adjusts the size of the splats. Use this to make the splats match your geometry.

<Splat>.iterations Integer default: 4 -- animatable

Sets the number of times the fractal function is evaluated. The higher the number, the more detailed the splats, but the longer the calculation time.

<Splat>.threshold Float default: 0.2 -- animatable

Determines how much of color1 is mixed with color2. At 0, only color1 is displayed; at 1, only color2 is displayed.

<Splat>.color1 Color default: (color 178.5 204 204) -- animatable, Color_1

The color of the background.

<Splat>.map1 TextureMap default: undefined

The map used as the color of the background.

<Splat>.map1On Boolean default: true -- alias: Map1_On

Enables associated map.

<Splat>.color2 Color default: (color 51 127.5 255) -- animatable, Color_2

The color of the splats.

<Splat>.map2 TextureMap default: undefined

The map used as the color of the splats.

<Splat>.map2On Boolean default: true -- alias: Map2_On

Enables associated map.

<Splat>.coords StandardXYZGen -- alias: Coordinates

See StandardXYZGen for the StandardXYZGen properties.

See also

TextureMap Common Properties, Operators, and Methods

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Stucco : TextureMap

Stucco - superclass: textureMap; super-superclass:material - classID: #(154218430, 0)

Value > MAXWrapper > Material > TextureMap > Stucco

Constructor

Stucco ...

Properties

<Stucco>.size Float default: 20.0 -- animatable

Adjusts the size of the indentations. Use this to make the scale of the stucco match your geometry.

<Stucco>.thickness Float default: 0.15 -- animatable

Blurs the border between the two colors. At 0, the borders are sharp. The higher the Thickness, the more the borders are blurred and the less distinct the indentations are. When you use Stucco as a bump map, the indentations are very faint at 0.5 and disappear at values not much greater.

<Stucco>.threshold Float default: 0.57 -- animatable

Determines how much of color1 is mixed with color2. At 0, only color1 is displayed; at 1, only color2 is displayed.

<Stucco>.color1 Color default: (color 0 0 0) -- animatable, alias: Color_1

The color of the indentations.

<Stucco>.map1 TextureMap default: undefined

The map used as the color of the indentations.

<Stucco>.map1On Boolean default: true -- alias: Map1_On

Enables associated map.

<Stucco>.color2 Color default: (color 229.5 229.5 229.5) -- animatable, alias: Color_2

The background stucco color.

<Stucco>.map2 TextureMap default: undefined

The map used as the background stucco color.

<Stucco>.map2On Boolean default: true -- alias: Map2_On

Enables associated map.

<Stucco>.coords StandardXYZGen -- alias: Coordinates

See StandardXYZGen for the StandardXYZGen properties.

See also

TextureMap Common Properties, Operators, and Methods

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Swirl : TextureMap

Swirl - superclass: textureMap; super-superclass:material - classID: #(1925732223, 966789659)

Value > MAXWrapper > Material > TextureMap > Swirl

Constructor

Swirl ...

Properties

<Swirl>.Base Color default: (color 229.5 147.9 76.5) -- animatable

The underlying layer for the swirl effect.

<Swirl>.Swirl Color default: (color 0 25.5 51) -- animatable

Mixed with the Base color or map, produces the swirl effect.

<Swirl>.Color_Contrast Float default: 0.4 -- animatable

Controls the contrast between Base and Swirl. At 0, the swirl is blurred. Higher values increase the contrast until all colors become black and white, even if Swirl Intensity and Swirl Amount are very high.

<Swirl>.Swirl_Intensity Float default: 2.0 -- animatable

Controls the intensity of the swirl color. Higher values create a more vibrant mix of colors. At 0, the swirl effect disappears.

<Swirl>.Swirl_Amount Float default: 1.0 -- animatable

Controls the quantity of the swirl color that gets mixed into the base color. If set to 0, only the base color is used.

<Swirl>.Twist Float default: 1.0 -- animatable

Changes the number of spirals in the swirl effect. Higher values increase the number of spirals. Negative values change the direction of the twist. At 0, the colors are randomly distributed, not swirled.

<Swirl>.Constant_Detail Integer default: 4 -- animatable

Changes the level of detail within a swirl. Lower values minimize the level of detail within the swirl. At 0, all detail is lost. Higher values increase detail until the swirl effect disappears.

<Swirl>.Center_Position_Y Float default: -0.5 -- animatable

<Swirl>.Center_Position_X Float default: -0.5 -- animatable

Adjusts the location of the swirl’s center on the object.

<Swirl>.Lock_Background Integer default: 1

X and Y values remain identical as you adjust them. By turning off Lock and adjusting either the X or Y position, you can "slide" the swirl effect across the object.

0- Off

1- On

<Swirl>.Random_Seed Float default: 23638.4 -- animatable

Sets a new starting point for the swirl effect. Changes the swirl pattern while maintaining other parameters.

<Swirl>.coordinates SubAnim

See UVGenClass for the StandardUVGen properties.

NOTES:

The Base and Swirl sub-maps are not accessible to MAXScript unless they have already been assigned to the Swirl map. Once these maps have been assigned, they are available as properties of the Swirl TextureMap value. The property names, however, are dependent on the type of maps assigned. For example, if a Checker and a Cellular map were assigned as the Base and Swirl sub-maps, the property names would be similar to Swirl__Map__7____Checker and Swirl__Map__6____Cellular. These maps are also stored as subAnims 12 and 13 of the Swirl TextureMap value. If the subAnim name for the subAnim is Swirl__None and Swirl__None, respectively, no map has been assigned.

See also

TextureMap Common Properties, Operators, and Methods

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Thin_Wall_Refraction : TextureMap

Thin_Wall_Refraction - superclass: textureMap; super-superclass:material - classID: #(-772429820, 0)

Value > MAXWrapper > Material > TextureMap > Thin_Wall

Constructor

thin_wall_refraction ...

thinWallRefraction ...

Properties

<Thin_Wall_Refraction>.applyBlur Boolean default: true

Turns on filtering to blur the maps.

<Thin_Wall_Refraction>.blur Float default: 1.0 -- animatable

Affects the sharpness or blurriness of the generated map based on its distance from the object. The farther away the map is, the greater the blurring. Blur is primarily used to avoid aliasing. It’s a good idea to use a small amount of blurring for all maps in order to avoid the scintillation or aliasing that can occur when pixel details are reduced off in the distance.

<Thin_Wall_Refraction>.frame Integer default: 0

Affects how the refraction should behave in animations:

0- First Frame Only (Tells the renderer to create the refracted image only on the first frame.)

1- Every Nth Frame (Tells the renderer to regenerate the refracted image based on nthframe.)

<Thin_Wall_Refraction>.nthFrame Integer default: 1

Sets the regeneration rate in animations.

<Thin_Wall_Refraction>.useEnviroment Boolean default: true

When off, environment maps are ignored by the refraction during rendering. It’s useful to turn it this off when you have refractions in the scene and you’re rotoscoping against a flat screen environment map. A screen environment map does not exist in 3D space the way the other environment map types do, and will not render properly.

<Thin_Wall_Refraction>.thicknessOffset Float default: 0.5 -- animatable, alias: Thickness_Offset

Affects the size of the refractive offset, or jog effect. At 0, there’s no offset, and the object can appear invisible in the rendered scene. At 10.0, the offset is at its greatest.

<Thin_Wall_Refraction>.bumpMapEffect Float default: 1.0 -- animatable, alias: Bump_Map_Effect

Affects the magnitude of refraction due to the presence of a bump map. This parameter multiplies the current bump map Amount in the parent material. Reduce this value to reduce the effect of the secondary refraction; increase this value to increase the effect. If there is no bump map assigned, this value has no effect.

See also

TextureMap Common Properties, Operators, and Methods

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Vertex_Color : TextureMap

Vertex_Color - superclass: textureMap; super-superclass:material - classID: #(9652305, 0)

Value > MAXWrapper > Material > TextureMap > Vertex_Color

Constructor

Vertex_Color ...

VertexColor ...

Properties

<Vertex_Color>.map Integer default: 0 -- integer; Map_ID

Get/Set the source map channel.

<Vertex_Color>.subid Integer default: 0 -- integer

Get/Set the Sub Channel.

Possible values are:

0 - All

1 - Red

2 - Green

3 - Blue

See also

TextureMap Common Properties, Operators, and Methods

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Water : TextureMap

Waves - superclass: textureMap; super-superclass:material - classID: #(1997693774, 0)

Value > MAXWrapper > Material > TextureMap > Water

All properties of this class have been exposed in 3ds Max 6.

Constructors:

Water ...

Waves ...

Properties:

<Water>.numWaveSets Integer default: 10 -- animatable, alias: Num_Wave_Sets

Specifies how many wave sets are used in the pattern. Wave sets are groups of radially symmetrical waves that originate from randomly computed points along the surface of an imaginary sphere inside the object (a circle, in the case of 2D wave distribution). For calm water, set this to a low number. Use a high number for choppy water.

<Water>.waveRadius Float default: 1000.0 -- animatable, alias: Wave_Radius

Specifies the radius, in 3ds Max units, of the imaginary sphere (3D distribution) or circle (2D distribution) whose surface is the origin of each wave set. A large radius produces large circular wave patterns, while a small radius produces dense, smaller waves.

<Water>.waveLenMax Float default: 50.0 -- animatable

<Water>.waveLenMin Float default: 50.0 -- animatable

Define the interval used to randomly chose each wave center. If these two values are close together, the water appears more regular. If they’re farther apart, the water is less regular.

<Water>.amplitude Float default: 1.0 -- animatable

Adjusts the strength and the depth of the waves by increasing the contrast between the two colors.

<Water>.phase Float default: 0.0 -- animatable

Shifts the wave pattern. Animate this parameter to animate the motion of the pattern.

<Water>.distribution Integer default: 0

3D distributes the wave centers on the surface of an imaginary sphere, affecting all sides of a 3D object. 2D distributes the wave in circles centered on the XY plane, which is more appropriate for flat water surfaces such as oceans and lakes.

0- 3D

1- 2D

<Water>.randomSeed Integer default: 30159

Provides a seed number to generate the water pattern. The pattern changes with each seed, but all other settings are maintained.

<Water>.color1 Color default: (color 198.9 198.9 239.7) -- animatable, alias: Color_1

Sets the wave trough color.

<Water>.map1 TextureMap default: undefined

Sets a map as the wave trough color.

<Water>.map1On Boolean default: true -- alias: Map1_On

Enables associated map.

<Water>.color2 Color default: (color 25.5 25.5 198.9) -- animatable, alias: Color_2

The color of wave peaks.

<Water>.map2 TextureMap default: undefined

Sets a map as the color of wave peaks.

<Water>.map2On Boolean default: true -- alias: Map2_On

Enables associated map.

<Water>.coords StandardXYZGen -- alias: Coordinates

See StandardXYZGen for the StandardXYZGen properties.

See also

TextureMap Common Properties, Operators, and Methods

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Wood : TextureMap

Wood - superclass: textureMap; super-superclass:material - classID: #(532, 0)

Value > MAXWrapper > Material > TextureMap > Wood

Constructor

Wood ...

Properties

<Wood>.thickness Float default: 7.0 -- animatable, alias: Grain_Thickness

Sets the relative thickness of the color bands that make up the grain.

<Wood>.radialNoise Float default: 1.0 -- animatable, alias: Radial_Noise

Sets the relative randomness of the pattern on a plane perpendicular to the grain, the circular ring structure.

<Wood>.axialNoise Float default: 1.0 -- animatable, alias: Axial_Noise

Sets the relative randomness of the pattern on a plane parallel with the grain, along the length of the grain.

<Wood>.color1 Color default: (color 201.45 175.95 68.85) -- animatable, alias: Color_1

<Wood>.map1 TextureMap default: undefined

<Wood>.map1Enabled Boolean default: true -- alias: MapOn1

Enables associated map.

<Wood>.color2 Color default: (color 130.05 81.6 12.75) -- animatable, alias: Color_2

<Wood>.map2 TextureMap default: undefined

<Wood>.map2Enabled Boolean default: true -- alias: MapOn2

Enables associated map.

<Wood>.coords StandardXYZGen -- alias: Coordinates

See StandardXYZGen for the StandardXYZGen properties.

See also

TextureMap Common Properties, Operators, and Methods

Material Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


CubeMap : ReferenceTarget

CubeMap - superclass: ReferenceTarget; super-superclass:MAXWrapper - classID: #(468262473, 1630180972)

This is an unsupported sample viewport shader used to display cube mapping on DirectX-enabled hardware. It is only available if you add \plugins\hardwareshaders to your plugin paths.

Constructors

CubeMap...

Properties

<CubeMap>.cubeMapfile String default: undefined -- filename; Cubemap

Set the file name of the cube map file.

See also

Interface: dxshadermanager

LightMap : ReferenceTarget

Membrane_Shader : ReferenceTarget

Metal_Bump : ReferenceTarget

Interface: dxshadermanager


Membrane_Shader : ReferenceTarget

Membrane_Shader - superclass: ReferenceTarget; super-superclass:MAXWrapper - classID: #(811029973, 807618143)

This is an unsupported sample viewport shader used to display membrane shading on DirectX-enabled hardware. It is only available if you add \plugins\hardwareshaders to your plugin paths.

Constructors

Membrane_Shader ...

‘Membrane Shader’ ...

Properties

<Membrane_Shader>.spin Integer default: 1 -- animatable; integer

<Membrane_Shader>.tv Boolean default: false -- boolean; Animate_TVs

<Membrane_Shader>.coords ParamBlock2ParamBlock2 default: ReferenceTarget:ParamBlock2 -- max object; Coordinates; SubAnim

Membrane_Shader.coords - superclass: ParamBlock2; super-superclass:MAXWrapper - 1:1 - classID: #(130, 0)

<Membrane_Shader.coords>.spin Integer default: 1 -- animatable

See also

Interface: dxshadermanager

CubeMap : ReferenceTarget

LightMap : ReferenceTarget

Metal_Bump : ReferenceTarget

Interface: dxshadermanager


Metal_Bump : ReferenceTarget

Metal_Bump - superclass: ReferenceTarget; super-superclass:MAXWrapper - classID: #(542388197, -1888194017)

This is a viewport shader used to display bump mapping on DirectX-enabled hardware.

Constructor

Metal_Bump ...

Properties

<Metal_Bump>.ALPHA_ON Boolean default: false -- boolean; MaterialState

<Metal_Bump>.BUMP UndefinedClass default: undefined -- bitmap; Map

<Metal_Bump>.BUMP_ON Boolean default: false -- boolean; MaterialState

<Metal_Bump>.COLOR_AMBIENT Color default: (color 0 0 0) -- animatable; RGB color; Ambient

<Metal_Bump>.COLOR_DIFFUSE Color default: (color 255 255 255) -- animatable; RGB color; Diffuse

<Metal_Bump>.COLOR_SPECULAR Color default: (color 255 255 255) -- animatable; RGB color; Specular

<Metal_Bump>.DETAIL UndefinedClass default: undefined -- bitmap; Map

<Metal_Bump>.DETAIL_ON Boolean default: false -- boolean; MaterialState

<Metal_Bump>.DIFFUSE UndefinedClass default: undefined -- bitmap; Map

<Metal_Bump>.DIFFUSE_ON Boolean default: false -- boolean; MaterialState

<Metal_Bump>.MAP_BUMP Integer default: 1 -- integer; MappingBump

<Metal_Bump>.MAP_DIFFUSE1 Integer default: 1 -- integer; MappingDiffuse1

<Metal_Bump>.MAP_DIFFUSE2 Integer default: 1 -- integer; MappingDiffuse2

<Metal_Bump>.MAP_SPECULAR Integer default: 1 -- integer; MappingSpecular

<Metal_Bump>.MASK UndefinedClass default: undefined -- bitmap; Map

<Metal_Bump>.MASK_ON Boolean default: false -- boolean; MaterialState

<Metal_Bump>.NORMAL UndefinedClass default: undefined -- bitmap; Map

<Metal_Bump>.NORMAL_ON Boolean default: false -- boolean; MaterialState

<Metal_Bump>.REFLECTION UndefinedClass default: undefined -- bitmap; Map

<Metal_Bump>.REFLECTION_ON Boolean default: false -- boolean; MaterialState

<Metal_Bump>.SPECULAR_ON Boolean default: false -- boolean; MaterialState

<Metal_Bump>.SPIN_ALPHA Float default: 1.0 -- animatable; float; Alpha

<Metal_Bump>.SPIN_BUMPSCALE Integer default: 1000 -- animatable; integer; Bump_Scale

<Metal_Bump>.SPIN_REFLECTSCALE Integer default: 0 -- animatable; integer; reflect_amount

<Metal_Bump>.SPIN_TEXSCALE Integer default: 0 -- animatable; integer; mix

<Metal_Bump>.SYNC Boolean default: false -- boolean

See also

Interface: dxshadermanager

CubeMap : ReferenceTarget

LightMap : ReferenceTarget

Membrane_Shader : ReferenceTarget


Animation Controllers

Value > MAXWrapper > Animation Controllers

All animation in 3ds Max is implemented using one of the many controller classes accessible in the Track View and Motion Panel, or assigned automatically by 3ds Max when you use the Animate button to do keyframing. Certain controllers (keyframeable controllers) store their animation values as keys.

This section includes topics that discuss all aspects of scripting 3ds Max controllers and the Key classes used in keyframing.

Controller Common Properties, Operators, and Methods

Time and Key Functions on Object Hierarchies

Controllers - Superclass Level

The controllers are arranged in a hierarchy of superclasses and classes. All classes in a superclass output a specific data type (for example, Float or Point3). Each animatable property in 3ds Max has a data type, and any of the classes in the superclass that outputs that data type can be assigned that property. So, for example, the linear_float and noise_float controllers are classes in the Float superclass, and either can be assigned to the height property of a box, which is has a Float data type.

The list of controller superclasses can be determined using the apropos() function:

apropos "controller:super"

The list of available controllers can be determined using the showClass() function:

showClass "*:*controller*"

which lists all the known classes that have "controller" in their superclass name. The controllers include, at least, 3ds Max’s core controllers and any 3rd-party plug-in controllers. In some cases, embedded controllers for some complex plug-ins may be visible in the showClass() listing (such as for Character Studio and HyperMatter). You should not attempt to create and use these controllers individually, this may result in system exceptions.


Controller Common Properties, Operators, and Methods

Value > MAXWrapper > Animation Controllers > Controller

Properties

All controllers have the following properties:

<controller>.keys MAXKeyArray -- read-only, the controller’s key array

<controller>.value varies -- get or set the current controller value

The keys and value properties give you access to the value and keys in a free-standing controller, which is useful when working with the global tracks controllers that are accessible in MAXScript. Those controllers that are not keyframeable return an empty KeyArray for their keys property.

The value property is sensitive to the current time and animate contexts, so you can use it to evaluate a controller at various times or to plant keyframes in those controllers that support keys.

You can only assign a value to a controller’s value property if the controller is a key-based controller. The only exception to this is that you can assign a Matrix3 value to a PRS controller’s value property. MAXScript will automatically set the individual position, rotation, and scale values to the values represented in the Matrix3 value.

If an Ease Curve has been assigned to a controller, the following controller-related sub-property is available:

<controller>.Ease_Curve Float -- the controller’s ease curve value

If an Ease Curve has been assigned to a controller, the following controller-related sub-property is available:

<controller>.Multiplier_Curve Float -- the controller’s multiplier curve value

See Ease and Multiplier Curve Functions for methods and notes related to ease and multiplier curves.

EXAMPLE:

globaltracks.float.mycontroller.value

globaltracks.float.mycontroller.keys[2]

Associated Properties

All animatable properties in 3ds Max objects let you reference several controller-related sub-properties. These are:

<property>.controller

The property’s controller.

<property>.track

A synonym for .controller.

<property>.isAnimated

A boolean indicating whether the property is animated.

<property>.keys

Read-only, gets the property’s controller’s key array

<property>.supportsKeys

Read-only, boolean, true if controller is key-framable

<property>.keyable

Boolean, true if controller is keyable, false if set to unkeyable

<property>.isHSV

Read-only, boolean, true if controller's value represent HSV colors

The track property is a simple synonym for controller. If an animatable property does not yet have a controller assigned, the isAnimated property returns false and the controller, track, and keys properties return undefined.

EXAMPLE:

$foo.pos.controller

bend_mod1.angle.isAnimated

$bar.taper.gizmo.scale.keys[2]

You create controllers as you do other 3ds Max objects by calling the class' constructor function:

EXAMPLE:

c = bezier_position()

and assign them to animatable properties by assigning to the controller property in those animatables.

EXAMPLE:

$foo.pos.controller = c

$baz.bend.gizmo.rotation.controller = tcb_rotation()

$box01.length = linear_float()

Methods

getPointControllers {<editable_mesh_node> | <editable_spline_node>}

Returns an array of controllers assigned to the vertices in the mesh or spline. If no controller has been assigned to a vertex, the array element value will be undefined. For editable splines, each knot consists of 3 vertices: the in vector, the knot, and the out vector. The array of controllers returned is a "snapshot" of the current controllers. If controllers are assigned or changed for a vertex, this change is not reflected in the array. If a vertex is added/deleted, the array is not resized to reflect the change in number of vertices.

getPointController <editable_mesh_node> <vertex_index_integer>

Returns the controller currently assigned to the vertex, undefined if no controller assigned.

getPointController <editable_spline_node> <spline_index_integer> <vertex_index_integer>

Returns the controller for specified vertex in the specified spline, undefined if no controller assigned. Each spline knot consists of 3 vertices: the in vector, the knot, and the out vector.

NOTES:

Applying a controller to a property causes the controller to take on the properties value at frame 0. If keys are present for the controller before the assignment to the property, all keys will be adjusted by the difference between the controller’s value at frame 0 and the property’s value. This is shown in the following example.

SCRIPT

a=bezier_float()

addnewkey a 0

addnewkey a 10

a.keys[1].value=10

a.keys[2].value=100

b=box()

b.height

b.height.controller=a

b.height

at time 10 b.height

OUTPUT

Controller:Bezier_Float -- result line 1

#Bezier Float key(1 @ 0f) -- result line 2

#Bezier Float key(2 @ 10f) -- result line 3

10 -- result line 4, key value at time 0

100 -- result line 5, key value at time 10

$Box:Box01 @ [0.0,0.0,0.0] -- result line 6

25.0 -- result line 7, default property value

Controller:Bezier_Float -- result line 8

25.0 -- result line 9, key value changed from 10 to 25 (delta= +15)

115.0 -- result line 10, key value changed by delta = +15

A somewhat strange situation can arise when a single controller is assigned to multiple object properties. The value actually stored in a controller may not necessarily be the same value seen in Track View or in the command panels, nor the same value returned by accessing the property value in MAXScript. Part of a MAXWrapper property definition is scaling value that is applied when reading or setting the true value stored in a controller. For example, the slice_to and slice_from properties associated with many of the geometry primitives is displayed in degrees. The actual value stored in the controller associated with these properties are in radians. This scaling factor is an internal property of the MAXWrapper property, and not an internal property of the controller. Both 3ds Max and MAXScript automatically apply the specified scaling factor when accessing properties, so this scaling is normally invisible to the user. If the same controller is assigned to two properties which have different scaling factors, the question arises as to which scaling factor to apply to the output of the controller. If you are accessing the controller’s value through a MAXWrapper property, the scaling factor associated with that property is applied to the controller’s value. MAXScript also internally stores the last scaling factor applied to the controller’s value. If you are directly accessing the value property of the controller, or the value property of a key in the controller, the stored scaling factor is used. This can result in a controller’s value property returning different values at different times in a script, based on how the controller was last accessed. Because of this, it is highly recommended that you do not instance a controller onto multiple MAXWrapper properties which have different scaling factors. The scaling factor, if any, is listed for each MAXWrapper property in the documentation of the MAXWrapper classes.

displayControlDialog <controller> <string>

Displays the modal controller dialog, if any. The string will be in the dialog title bar. If the controller is a keyframe controller, the key info dialog will be displayed for the selected keys. If no keys are selected, no dialog will be displayed.

clearControllerNewFlag <controller>

Clears the 'new' flag on the MAXScript wrapper for the controller.

When this flag is set, when you assign the controller to a property, the initial value of the controller is set to the property value.

When you create an instance of a controller, this flag is set.

It is normally cleared only after the controller is assigned to a property.

Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

Controllers that can be keyframed support several time and key-related functions, as described in the following topics:

Controller Time Functions

Controller Key Functions

Controller Out-Of-Range Functions

Controller Ease and Multiplier Curve Functions

Controller Key Reducer

See also

Key Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Controller Time Functions

Value > MAXWrapper > Controllers > Time Functions

Time Range Operations:

getTimeRange <controller> [ #selOnly ] [ #allKeys ] [ #children ]

Returns a time Interval value specifying the range of time covered by keys in the controller. The optional symbolic arguments specify options:

#selOnly: return the time range covered by the currently selected keys (in the track view)

#allKeys (default): the time range for all keys in the controller

#children: descends into sub-controllers and returns the total time interval covering all keys in all sub-controllers

setTimeRange <controller> [ <interval> ] [ #linkToKeys ]

Sets the time range to be an interval other than that covered by existing keys, typically to influence when the out-of-range methods take over. If the optional #linkToKeys argument is given any keys exactly at the start or end of the given interval become anchors for the time range and moving them move the time range for the controller.

If you call setTimeRange() with just the single argument, #linkToKeys, it will set the time range to the current start and end keys in all the controllers affected,

EXAMPLES

setTimeRange $box* #linkToKeys

This is equivalent to the Recouple Ranges function in the Position Ranges mode in Track View.

NOTE:

When the #linkToKeys argument is not supplied, only the supplied controller will be affected. When the #linkToKeys argument is supplied, the function will also affect recursively all sub-controllers.

Time Operations:

supportsTimeOperations <ctrl>

returns true or false depending on whether the controller supports the following time operations

deleteTime <controller> <interval> [ #incLeft ] [ #incRight ] [ #noSlide ]

Deletes an interval of time from the controller, removing all the keys with that interval and, by default, sliding the keys to the right of the interval to the left by the width of the interval. The optional symbolic arguments choose one of several options:

#incLeft: includes any key exactly at the start time of the interval

#incRight: includes any key exactly at the end time of the interval

#noSlide: doesn’t slide the later keys to fill in the gap removed- this effectively just deletes any keys in the interval.

The <interval> argument can be specified as an Interval value or as two numbers or time values defining the start and end times. Number values are taken as frame numbers.

reverseTime <controller> <interval> [ #incLeft ] [ #incRight ]

Reverses time in the given interval, essentially swapping keys around so that their time placements are reversed within the interval. The notes on inclusion and interval arguments from deleteTime() apply.

scaleTime <controller> <interval> <float_scale>

Scales the times of the keys within the given interval. Again, the <interval> argument can be specified as an Interval value or as two numbers or time values defining the start and end times. Number values are taken as frame counts.

insertTime <controller> <at_time> <amount_time>

Inserts a block of time at the specified time, effectively moving all later keys out in time by the amount inserted. The times can be numbers or Time values. Numbers are taken as frame counts.

The following script shows example usages of some of the above methods.

EXAMPLES

-- controller test bed 1

b=box height:10

at time 5 animate on b.height=50

at time 10 animate on b.height=100

bhc=b.height.controller

bhk=bhc.keys

supportstimeoperations bhc

deletetime bhc 4 5

bhk

deletetime bhc 4 5 #incLeft

bhk

deletetime bhc 1 4 #noslide

bhk

at time 5 animate on b.height=50

deletetime bhc (interval 5 8) #incLeft

bhk

at time 10 animate on b.height=150

for k in bhk do format "%:%\n" k.time k.value

reversetime bhc 5 15 #incLeft #incRight

for k in bhk do format "%:%\n" k.time k.value

insertTime bhc 12 5

bhk

getTimeRange bhc


Controller Key Functions

Value > MAXWrapper > Controllers > Key Functions

addNewKey <controller> <time> [ #select ]

Adds a new key to the controller track at the time specified. The value for the new key is the interpolated controller value at the specified time. The new key is also selected if the #select optional argument is specified. The value for the new key is the interpolated controller value at that time. addNewKey() will not add a key if a key already exists at the specified time. The return value in this case is the key located at the specified time.

NOTE:

If the controller is a compound controller (like a Position_XYZ controller), a value of OK is returned. A single key value can’t be returned, as addNewKey creates a key in each of the sub-controllers.

This function returns a MAXKey value representing the key so you can set its various properties. See MAXKey Values for details.

deleteKeys <controller> [ #allKeys | #selection ]

Deletes keys from the controller according to the optional symbolic argument supplied.

#allKeys (default): deletes all keys in the controller.

#selection: deletes the currently selected keys

deleteKey <controller> <index>

Deletes the indexed key. Key indexes are 1-based.

selectKeys <controller> [ <interval> | <time> ]

Selects the specified keys in the track view. If an interval is given, all the keys within the interval are selected. If a single time is given, the key at that time is selected. If no time or interval is given, select all keys.

deselectKeys <controller> [ <interval> | <time> ]

Deselects specified keys. Arguments are as described in selectKeys().

selectKey <controller> <index_integer>

Selects the indexed key. Key indexes are 1-based.

isKeySelected <controller> <index_integer>

Returns true if indexed key is selected, false otherwise. Key indexes are 1-based.

deselectKey <controller> <index_integer>

Deselects the indexed key. Key indexes are 1-based.

moveKeys <controller> <time> [ #selection ]

Moves the specified keys by the time given. If #selection is specified, move the current selection otherwise move all keys. The moveKeys function only works on track properties, .controller and .track. It is not defined on the keys’ virtual array.

EXAMPLES

moveKeys $box01.pos.controller 5

moveKeys $box01.pos.track 5

moveKey <controller> <index_integer> <time>

Move the indexed key by the specified time.

numKeys <controller>

Returns the number of keys in the controller. Returns -1 if you call it on a controller that does not support keyframing.

getKey <controller> <index_integer>

Returns the indexed key as a MAXKey instance. See Controller Key Functions for MAXKey class information.

getKeyTime <controller> <index_integer>

Returns the time of indexed key.

getKeyIndex <controller> <time>

Returns the index of the key at the specified time.

numSelKeys <controller>

Returns the number of keys currently selected in the track view.

sortKeys <controller>

Re-sorts keys according to their times. Some MAXKey operations can result in out of order keys and this function must be called to correctly order keys. See the Controller Keys and Key Properties topic for MAXKey properties information.

createLockKey <controller> <time> <rot_or_pos_integer>

This method is called to create a locking key at the specified time. This is a key that looks back to the previous key and creates a new key at the specified time which matches the previous key in value. It also adjusts the parameters for the key such that the value stays constant from the previous key to this key. For instance, for a TCB controller the continuity of the previous key and new key will set to 0. For a Bezier controller the out tangent type of the previous key is set to linear and the in tangent type of the new key is set to linear.

If the controller passed to this method is a transform level controller, <rot_or_pos_integer> specifies whether to create the key in the transform controller’s position or rotation (or roll angle) sub-controller. If rot_or_pos_integer = 0, the key is created in the position controller. For all other values, the key is created in the rotation (or roll angle) controller.

If the controller passed to this method is not a transform level controller, the <rot_or_pos_integer> value is not used.

Returns true if the key creation was successful, false otherwise.

The following script shows example usages of some of the above methods.

EXAMPLES

-- controller test bed 2

b=box height:10

at time 5 animate on b.height=50

at time 10 animate on b.height=100

bhc=b.height.controller

bhk=bhc.keys

addnewkey bhc 7

addnewkey bhc 9

for k in bhk do format "%:%\n" k.time k.value

selectKeys bhc (interval 7 9)

deleteKeys bhc #selection

bhk

addnewkey bhc 7

addnewkey bhc 9

selectKeys bhc (interval 7 9)

deleteKeys bhc #selection #slide

bhk

addnewkey bhc 7

addnewkey bhc 9

selectKeys bhc (interval 7 9)

deleteKeys bhc #selection #slide #rightToLeft

bhk

addnewkey bhc 8

i=getKeyIndex bhc 8

selectKey bhc i

moveKey bhc i 10

bhk

getKeyTime bhc 4

b.width.controller=noise_float()

numkeys b.width.controller

appendKey <key_array> <max_key>

Appends the given key to the specified key array at the key’s original time.

EXAMPLE

--Create a Box and a Sphere

source_obj = box()

target_obj = sphere()

-- Animate the position of the Box on frames 50 and 100.

with animate on

(

at time 50 source_obj.pos.controller.x_position = 100

at time 100 source_obj.pos.controller.x_position= 200

)

--Animate the position of the Sphere on frames 40 and 80

with animate on

(

at time 40 target_obj.pos.controller.x_position = 50

at time 80 target_obj.pos.controller.x_position = 60

)

--Print keys of both controllers

format "Source Keys X Pos: %\n" source_obj.pos.x_position.controller.keys

format "Target Keys X Pos: %\n" target_obj.pos.x_position.controller.keys

--Get the 2nd key from the X axis controller of the position transformation

source_key = source_obj.pos.x_position.controller.keys[2]

--Get the X axis position controller keys array of the target object

target_keys = target_obj.pos.x_position.controller.keys

--Assign the key from the source to the target controller

appendKey target_keys source_key

--The Sphere now has a 3rd key on frame 50 with the value 100

format "Target Keys After appendKey: %\n" target_obj.pos.x_position.controller.keys

OUTPUT

$Box:Box02 @ [0.000000,0.000000,0.000000]

$Sphere:Sphere02 @ [0.000000,0.000000,0.000000]

200

60

Source Keys X Pos: #keys(0f, 50f, 100f)

OK

Target Keys X Pos: #keys(0f, 40f, 80f)

OK

#Bezier Float key(2 @ 50f)

#keys(0f, 40f, 80f)

#Bezier Float key(3 @ 50f)

Target Keys After appendKey: #keys(0f, 40f, 50f, 80f)

OK

assignKey <key_array> <max_key> <index>

Deletes the key specified by <index> from the target key array and inserts the source key into the target key array at the source key’s time.

NOTE:

Technically speaking, the source key first overwrites the target key specified by <index>, then the resulting array is being sorted by time. The result is the same as described above.

EXAMPLE

--Create a Box and a Sphere

source_obj = box()

target_obj = sphere()

-- Animate the position of the Box on frames 50 and 100.

with animate on

(

at time 50 source_obj.pos.controller.x_position = 100

at time 100 source_obj.pos.controller.x_position= 200

)

--Animate the position of the Sphere on frames 10 and 20

with animate on

(

at time 10 target_obj.pos.controller.x_position = 50

at time 20 target_obj.pos.controller.x_position = 60

)

--Print keys of both controllers

format "Source Keys X Pos: %\n" source_obj.pos.x_position.controller.keys

format "Target Keys X Pos: %\n" target_obj.pos.x_position.controller.keys

--Get the 2nd key from the X axis controller of the position transformation

source_key = source_obj.pos.x_position.controller.keys[2]

--Get the X axis position controller keys array of the target object

target_keys = target_obj.pos.x_position.controller.keys

--Assign the key from the source to the target controller,

--delete original source key 3

assignKey target_keys source_key 3

--The Sphere now has a 3rd key on frame 50 with the value 100,

--original 3rd key on frame 20 has been deleted:

format "Target Keys After assignKey: %\n" target_obj.pos.x_position.controller.keys

LISTENER OUTPUT

$Box:Box02 @ [0.000000,0.000000,0.000000]

$Sphere:Sphere02 @ [0.000000,0.000000,0.000000]

200

60

Source Keys X Pos: #keys(0f, 50f, 100f)

OK

Target Keys X Pos: #keys(0f, 10f, 20f)

OK

#Bezier Float key(2 @ 50f)

#keys(0f, 10f, 20f)

#Bezier Float key(3 @ 50f)

Target Keys After assignKey: #keys(0f, 10f, 50f)

OK

NOTES:

appendKey and assignKey only work on controllers that directly support key frames and the source and target need to be of the same type. The controller level property <control>.supportsKeys (boolean, read-only) returns true if the controller implements the I_KEYCONTROL interface and thus can be used as argument of the appendKey and assignKey functions. See supportsKeys

In order to copy a key between controllers, the user has to

  • Make sure that the source and target controllers are of the same type

  • Check to see if they support keys using the .supportsKeys property

  • If not, see if they have subanims

  • If they have, recurse down into the subanims

  • Repeat the check for the subanims and so on...

copyPasteKeys <controller> (<map_struct> | <fn> <arg>) [#replacekeys] [#insertkeys]

This function is pretty similar to the existing mapKeys() method , but implies that some keys have been selected first. Upon calling copyPasteKeys(), selected keys will first get copied, then copied keys get selected and pasted, using either the map_struct or a mapping function as described in the mapKeys() method topic. Available in 3ds Max 8 and higher.

In addition, using the #replacekeys argument will delete any unselected key within the copied keys' range, and using the #insertkeys argument will shift to the right any unselected key located on or after the copied keys' insertion point (i.e., the location of the first copied key), with a time value equal to the length of the copied keys' range.


Controller Out-Of-Range Functions

Value > MAXWrapper > Controllers > Out-Of-Range Functions

getBeforeORT <controller>

Gets the Out-of-Range type (ORT) for the controller for the time before the first key.

Returns one of the following name values:

#constant

#cycle

#loop

#pingPong

#linear

#relativeRepeat

getAfterORT <controller>

Gets the Out-of-Range (ORT) type for the controller for the time after the last key. Returns one of the name values as for getBeforeORT() shown above.

setBeforeORT <controller> <ORT_type_name>

Sets the Out-of-Range (ORT) type for the controller for the time before the first key.

The <ORT_type_name> must be one of the following name values:

#constant

#cycle

#loop

#pingPong

#linear

#relativeRepeat

setAfterORT <controller> <ORT_type_name>

Sets the Out-of-Range (ORT) type for the controller for the time after the last key. The <ORT_type_name> must be one of the symbolic values shown in setBeforeORT() above. No testing done on the validity of <ORT_type_name> is performed.

enableORTs <controller> <boolean>

Enables or disables the Out-of-Range processing for the controller. If set to disabled with false, the controller effectively employs a constant ORT.


Controller Ease and Multiplier Curve Functions

Value > MAXWrapper > Controllers > Ease and Multiplier Curve Functions

addEaseCurve <controller> [ <float_controller> ]

Adds an ease curve to the specified controller. You may provide an optional float controller for the curve or have the function generate a default float controller for you. When you add a ease curve in Track View, keys are automatically created at the beginning and end of the current animation range. The addEaseCurve() method does not generate these keys, so you will need to add them to the ease curve controller.

deleteEaseCurve <controller> <index_integer>

Deletes the indexed ease curve from the controller. The indexes are 1-based and correspond to the order in which the curves were originally added to the controller.

numEaseCurves <controller>

Returns the number of ease curves currently operating on the controller.

applyEaseCurve <controller> <time>

Applies the combined ease curves in the specified controller to the given time value, returning the transformed time.

addMultiplierCurve <controller> [ <float_controller> ]

Adds a multiplier curve to the specified controller. You may provide an optional float controller for the curve or have the function generate a default float controller for you. When you add a ease curve in Track View, keys are automatically created at the beginning and end of the current animation range. The addMultiplierCurve() method does not generate these keys, so you will need to add them to the ease curve controller.

deleteMultiplierCurve <controller> <index_integer>

Deletes the indexed multiplier curve from the controller. The indexes are 1-based and correspond to the order in which the curves were originally added to the controller.

numMultiplierCurves <controller>

Returns the number of multiplier curves currently operating on the controller.

getMultiplierValue <controller> <time>

Returns the combined (float) value of the multiplier curves in the specified controller at the given time value.

Associated Properties

If an Ease Curve has been assigned to a controller, the following controller-related sub-property is available:

<controller>.Ease_Curve -- the controller’s ease curve value

If an Ease Curve has been assigned to a controller, the following controller-related sub-property is available:

<controller>.Multiplier_Curve -- the controller’s multiplier curve value

NOTE:

The values stored in an Ease Curve controller are stored as integer time ticks.

The following script shows example usages of some of the above methods.

EXAMPLE

--controller test bed 3

b=box height:10

at time 5 animate on b.height=50

at time 10 animate on b.height=100

bhc=b.height.controller

ec=bezier_float()

at time 0 animate on ec.value = 0

at time 100 animate on ec.value=100*ticksPerFrame

setBeforeORT ec #linear

setAfterORT ec #linear

addEaseCurve bhc ec

applyEaseCurve bhc 50

addEaseCurve bhc ec

numEaseCurves bhc

deleteEaseCurve bhc 2

numEaseCurves bhc

at time 50 bhc.ease_curve.value

mc=bezier_float()

at time 0 animate on mc.value = 1

at time 100 animate on mc.value = 2

addMultiplierCurve bhc mc

at time 50 bhc.multiplier_curve


Controller Key Reducer

Value > MAXWrapper > Controllers > Key Reducer Function

reduceKeys <controller> <threshold> <step> [ <range> ]

where <threshold> is the closeness that the key-reduced controller will match the original keys, <step> is the time step at which the controller will be sampled and <range> is an optional time range within which the keys are reduced given as either 2 time values or an Interval value, defaulting to the active animation range.

EXAMPLE

reduceKeys $foo.pos.controller 0.5 1f

reduce keys on foo’s position, retain 0.5 units accuracy, sample every frame.

EXAMPLE

reduceKeys $baz.bend.angle.controller 0.1 0.5f (interval 20 75)

Reduce keys on baz’s bend angle, retain 0.1 units accuracy, sample every half frame, reduce within the interval 20f to 75f.

As with the reducer in the track view, a progress bar and cancel button is displayed.


mapKeys() method

The mapKeys() method gives access to the SDK function Control::MapKeys().

The form is:

mapKeys <max_object> (<map_struct> | <fn> <arg>) [#allKeys] [#selection] * [#slide] [#rightToLeft]

This is like other recursive controller key functions in MAXScript, such as moveKeys, deleteKeys, etc., which operate on all the keys in nested controllers in the object you supply. The thing to be mapped is either a scripted function and argument pair or a struct instance. If a function is supplied, it should take two arguments, the time value to be mapped and the <arg> from the mapKeys() call, and pass back the mapped time.

EXAMPLE

fn bumpTime t delta = t + delta

mapKeys $Box01 bumpTime 23 #selection

will add 23 to all the selected keys in controllers within $Box01.

If a struct is supplied, it should have at least a 'map' member function that takes a time to be mapped and returns the mapped time. The advantage of a struct is that it is a way to set up complex parameterized mapping by having as many data members as needed to hold the parameters.

EXAMPLE

struct mapper

(

scale,

offset,

fn map t = return t * scale * offset

)

mapKeys $foo (mapper scale:0.5 offset:10)

will execute a combination time scale and offset in one pass.

See also

Time and Key Functions on Object Hierarchies

Nested Object Controller Functions

Controller Time Functions

Controller Key Functions

MAXKeyArray Values


GetMasterController() Method

The GetMasterController method lets you get the master controller of a system. It is available in 3ds Max 9 and higher.

GetMasterController <System>

Returns the master controller of a system (for example RingArray, Sunlight System etc.)

EXAMPLE

--First create a Sunlight System using the UI.

--Then get its master controller:

theMaster = GetMasterController $Sun01

ReferenceTarget:Sunlight

show theMaster

.Solar_Time : integer

.Solar_Date : float

.Latitude : float

.Longitude : float

.Orbital_Scale : float

false


Time and Key Functions on Object Hierarchies

Certain of the controller time and key functions can be called on any 3ds Max object or collection of 3ds Max objects, not just individual controllers. If called in this way, they apply recursively to all the nested controllers within those objects and on any on sub-objects and sub-controllers within those objects. In this way, they work in a manner similar to the object-level tracks in the 3ds Max Track View that allow you to manipulate keys and time for all the sub-objects and sub-controllers within them.

The time and controller functions that work this way are:

deleteTime

reverseTime

scaleTime

insertTime

setTimeRange

addNewKey

deleteKeys

selectKeys

deselectKeys

moveKeys

sortKeys

reduceKeys

addEaseCurve

deleteEaseCurve

setBeforeORT

setAfterORT

enableORTs

The above functions can be called on any 3ds Max object collection (such as a wild-card pathname or object set or array of objects ) and will recursively apply to all animation within those objects. If they are called on components within an object that themselves have nested controllers, they are applied to all those nested controllers - see the examples below.

NOTE:

An exception to the above behavior is the setTimeRange function which will be applied recursively only when a #linkToKeys argument is provided. See setTimeRange for details.

EXAMPLES

insertTime $box01.xform 0f 10f

all keys after 0f in all controllers in the xform modifier are moved by 10f

insertTime $box01 0f 10f

all keys after 0f in box01 are moved (transform, creation, modifiers)

selectKeys $box02.xform.gizmo.rotation.controller 0f 100f

selects keys in 0-100f, if controller is Euler, e.g., will select x, y and z keys

deleteTime $box* 10f 20f

delete time from frame 10 and frame 20 in all objects named $box* (works with any pathname or array of objects)

insertTime $box03.children 0f 10f

inserts time in all controllers of all children of $box03

reduceKeys $box01.modifiers 0.5 1f

applies key reductions to all controllers in all modifiers in $box01 (leaves transform and creation parameters alone)


Controllers - Superclass Level

Value > MAXWrapper > Controllers > Superclasses

The following is a list of the controller superclasses:

FloatController

Bezier Controllers

Matrix3Controller

MorphController

Point3Controller

Point4Controller

PositionController

RotationController

ScaleController

QuatController

MasterBlockController


QuatController : MAXWrapper

Value > MAXWrapper > Controllers > QuatController

There are presently no classes associated with the QuatController superclass.


Attachment Controller Keys

Value > MAXWrapper > Controllers > PositionController > Attachment Controller Keys

Attachment controllers use different keys than most other controllers. The MAXAKey class implements the keys of Attachment controllers with all their specific properties like face index and barycentric coordinates inside the face.

The AttachCtrl.getKey() method returns keys of class MAXAKey. The method expects two arguments - the attachment controller and the index of the key to get. (See Attachment : PositionController for a list of all available AttachCtrl methods).

Properties

<MAXAKey>.face : Integer (0-based)

Get/Set the 0-based index of the face to attach to.

<MAXAKey>.coord : Point2 (barycentric coordinates)

Get/Set the barycentric coordinates inside the face to attach to.

<MAXAKey>.time : Time

Get/Set the time of the key.

<MAXAKey>.selected : Boolean

Get/Set the selected state of the key.

<MAXAKey>.tension : Float

Get/Set the tension.

<MAXAKey>.continuity : Float

Get/Set the continuity.

<MAXAKey>.bias : Float

Get/Set the bias.

<MAXAKey>.easeTo : Float

Get/Set the EaseTo value.

<MAXAKey>.easeFrom : Float

Get/Set the EaseFrom value.

The following script will create an animated cylinder with a geosphere attached to its top and following all deformations:

EXAMPLE

c = cylinder height:100 heightsegs:10 --create a tall segmented cylinder

addModifier c (Bend()) --add a Bend Modifier to the cylinder

s = geosphere() --create a default geosphere

actrl = Attachment() --create an Attachment controller

s.position.controller = actrl --assign to the position of the geosphere

actrl.node = c --set the cylinder as the node to attach to

addNewKey actrl 0f --add a key at frame 0

theAKey = AttachCtrl.getKey actrl 1 --get the first key

--Set the face index (0-based) by reading the number of faces in the mesh

--The last face of a cylinder is always on top near the central vertex!

theAKey.face = c.mesh.numfaces - 1

--Set the coordinates for the center.

--The barycentric coordinates of the central vertex are [1,0]

theAKey.coord = [1,0]

with animate on at time 100 --animate on frame 100

(

c.height = 200 --animate the height of the cylinder

c.bend.angle = 90 --and the bend angle

)

See also

Attachment : PositionController

Key Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Audio Controllers

audiofloat : floatController
audiopoint3 : point3Controller
audioposition : positionController
audiorotation : rotationController
audioscale : scaleController

Value > MAXWrapper > Controllers > PositionController > Audio Controller

Constructor

audiofloat ...

audiopoint3 ...

audioposition ...

audiorotation ...

audioscale ...

Properties

There are no additional properties accessible for Audio controllers.

See also

Controller Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Dynamics Controllers

Dynamics_Position_Controller : positionController
Dynamics_Rotation_Controller : rotationController

Value > MAXWrapper > Controllers > Dynamic Controllers

Constructor

The Dynamics controllers are created by the Dynamics utility, and are not creatable in MAXScript.

NOTE:

These classes are not available in Autodesk VIZ.

Properties

When you solve a dynamics solution in the Dynamics utility, the Dynamics controllers are assigned as the position and rotation controllers of all objects not flagged as unyielding. These controllers are similar to List controllers in that they contain multiple sub-controllers. The first sub-controller is a Bezier controller of the appropriate type that contains the keys generated while solving the dynamics solution. This controller can be accessed as the Dynamic_position_controller or Dynamic_rotation_controller property of the dynamics controller. The second sub-controller is the original position or rotation controller assigned to the object, and can be accessed as the old_position or old_position property.


Expression Controllers

Value > MAXWrapper > Controllers > Expression Controllers

NOTE:

These classes are not available in Autodesk VIZ.

The Expression controllers have been rewritten and completely exposed to MAXScript via the IExprCtrl interface documented below. In versions prior to 3ds Max 8, there were no properties or methods accessible for Expression controllers.

The following Expression controllers are available:

Float_Expression : FloatController

Point3_Expression : Point3Controller

Position_Expression : PositionController

Scale_Expression : ScaleController

Properties:

<expression_controller>.ThrowOnError Bool default:true

Controls whether to throw when an error occurs in the expression.

Interfaces:

All expression controllers expose the IExprCtrl Interface since 3ds Max 8. This interface provides all methods to access the controller through MAXScript:

IExprCtrl - Expression Controller Interface

Methods:

<boolean>SetExpression <&TSTR>Expression

Expression is In parameter

Sets the expression string to the string passed by-reference. Returns true on success, false otherwise.

<TSTR by value>GetExpression()

Returns the expression string.

<integer>NumScalars()

Returns the number of scalars defined in the controller.

<integer>NumVectors()

Returns the number of vectors defined in the controller.

<boolean>AddScalarTarget <&TSTR>Name <value>Target Offset:<time> Owner:<maxObject>

Name is In parameter

Offset default value: 0f

Owner default value: undefined

Adds a scalar target. The first argument is the name of the scalar. The second argument is the target to be connected to the scalar.

<boolean>AddVectorTarget <&TSTR>Name <value>Target Offset:<time> Owner:<maxObject>

Name is In parameter

Offset default value: 0f

Owner default value: undefined

Adds a vector target. The first argument is the name of the vector. The second argument is the target to be connected to the vector.

<boolean>AddVectorNode <&TSTR>Name <node>Node Offset:<time>

Name is In parameter

Offset default value: 0f

Adds a vector node. The first argument is the name of the vector. The second argument is the node to be connected to the vector.

<boolean>AddScalarConstant <&TSTR>Name <float>Constant

Name is In parameter

Adds a scalar constant. The first argument is the name of the scalar. The second argument is the constant value to be assigned to the scalar.

<boolean>AddVectorConstant <&TSTR>Name <point3>Constant

Name is In parameter

Adds a vector constant. The first argument is the name of the vector. The second argument is the constant value to be assigned to the vector.

<boolean>SetScalarTarget <value>Which <value>Target Owner:<maxObject>

Owner default value: undefined

Sets the target of the given scalar variable. Returns true on success, false otherwise. The optional Owner parameter can be supplied to specify the owner of the target track in case the target is instanced across multiple objects.

<boolean>SetVectorTarget <value>Which <value>Target Owner:<maxObject>

Owner default value: undefined

Sets the target of the given vector variable. Returns true on success, false otherwise. The optional Owner parameter can be supplied to specify the owner of the target track in case the target is instanced across multiple objects.

<boolean>SetVectorNode <value>Which <node>Node

Sets the node of the given vector variable. Returns true on success, false otherwise.

<boolean>SetScalarConstant <value>Which <float>Constant

Sets the value of the given scalar variable to the specified constant value. Returns true on success, false otherwise.

<boolean>SetVectorConstant <value>Which <point3>Constant

Sets the value of the given vector variable to the specified constant value. Returns true on success, false otherwise.

<boolean>DeleteVariable <&TSTR>Name

Name is In parameter

Deletes the variable with the given name. Returns true on success, false otherwise.

<TSTR by value>GetDescription()

Returns the description string of the controller.

<boolean>SetDescription <&TSTR>Description

Description is In parameter

Sets the description string of the controller to the specified by-reference string argument.

<time>GetOffset <&TSTR>Name

Name is In parameter

Returns the offset of the given variable.

<boolean>SetOffset <&TSTR>Name <time>Offset

Name is In parameter

Sets the offset of the given variable to the specified time value.

<void>Update()

Updates the controller.

<boolean>VariableExists <&TSTR>Name

Name is In parameter

Returns true if the named variable exists, false otherwise.

<float>GetScalarConstant <value>Which

Returns the value of the given scalar constant.

<value>GetScalarTarget <value>Which asController:<boolean>

asController default value: false

Returns the target of the given scalar variable. If the optional asController parameter is set to true, the result will be a controller value.

<point3 by value>GetVectorConstant <value>Which

Returns the value of the given vector constant.

<value>GetVectorTarget <value>Which asController:<boolean>

asController default value: false

Returns the target of the given vector variable. If the optional asController parameter is set to true, the result will be a controller value.

<node>GetVectorNode <value>Which

Returns the node of the given vector variable.

<float>GetScalarValue <value>Which

Returns the value of the given scalar variable.

<point3 by value>GetVectorValue <value>Which

Returns the value of the given vector variable.

<fpvalue>GetValue <&TSTR>Name

Name is In parameter

Returns the value of the named variable.

<enum>GetScalarType <value>Which

GetScalarType enums: {#unknown | #scalarTarget | #scalarConstant | #vectorTarget | #vectorConstant | #vectorNode}

Returns the type of the given scalar variable.

<enum>GetVectorType <value>Which

GetVectorType enums: {#unknown | #scalarTarget | #scalarConstant | #vectorTarget | #vectorConstant | #vectorNode}

Returns the type of the given vector variable.

<enum>GetValueType <&TSTR>Name

GetValueType enums: {#unknown | #scalarTarget | #scalarConstant | #vectorTarget | #vectorConstant | #vectorNode}

Name is In parameter

Returns the value type of the given variable.

<TSTR by value>GetScalarName <index>Index

Returns the name of the indexed scalar variable.

<TSTR by value>GetVectorName <index>Index

Returns the name of the indexed vector variable.

<index>GetScalarIndex <&TSTR>Name

Name is In parameter

Returns the index of the named scalar variable.

<index>GetVectorIndex <&TSTR>Name

Name is In parameter

Returns the index of the named vector variable.

<TSTR by value>PrintDetails()

Prints information about the expression controller, including description string, expression code, scalars and vectors details.

NOTES:

  • To change the existing value for a variable, you can also use the appropriate AddScalarTarget(), AddVectorTarget(), AddVectorNode(), AddScalarConstant(), or AddVectorConstant(). Using these methods will also set the offset value.

  • You cannot change the type of a variable (Scalar/Vector) – you must remove the variable and add it as the new type.

  • The ‘<value>Target’ argument to AddScalarTarget(), AddVectorTarget() and AddVectorNode() can be either a controller or a subAnim value. If it is a controller, the methods will look for the controller under the specified Owner value if supplied, otherwise it will use the first owner found.

  • For methods that take an argument of ‘<value>Which’, the value of Which can be either an integer index or a string name,

  • Expression controller variable names are case sensitive!.

  • All Function Publishing System operations support undo/redo.

  • The expression controller’s expression is only evaluated by calling SetExpression() and Update().

NOTE:

There is a discontinuity between the MAXScript Debugger window, getting variable values via Function Publishing System and evaluating the expression controller.

  • When working with the Debugger dialog, variable values are shown based on the current slider time.

  • When accessed via Function Publishing System, the variable values returned are based on the current MXS time.

  • When evaluating the controller, the result is based on the current time value, but also the range of the controller, the Out-Of-Range Type set for the controller, and any Ease curves applied to the controller.

This means that while 'NT' might show one value in the Debugger dialog, its value in the evaluation may be different!

See also

Controller Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Limit Controllers

Value > MAXWrapper > Controllers > Limit Controllers

The Limit controllers can be used to limit the values of other controllers to user-defined value ranges. Available in 3ds Max 8 and higher.

The following Limit controllers are available:

float_limit : FloatController

See also

Controller Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


List Controllers

float_list : floatController
point3_list : point3Controller
position_list : positionController
rotation_list : rotationController
scale_list : scaleController

Value > MAXWrapper > Controllers > List Controllers

Constructor

float_list ...

point3_list ...

position_list ...

rotation_list ...

scale_list ...

The List controller combines multiple controllers into a single effect. It is a compound controller with tools for managing the order in which its internal controllers are calculated. Controllers are evaluated in a top to bottom order; the controller at the top of the list is evaluated first. The contribution of the single sub-controllers can be weighted allowing for animation mixing.

When you assign a List controller to a parameter, the current controller is moved one level below the List controller; it becomes the first controller in the list. A second parameter is added below the List controller and is named Available. This is an empty placeholder for the next controller you add to the list.

Properties

.weight ArrayParameter default: #() -- float array

An array of the weight values of the sub-controllers.

.average Boolean default: false -- boolean; Average_Weights

Controls the averaging of the Weights.

.available

The .available property has a controller property, which contains a "phantom" controller. To add a controller to a list controller, assign the controller to the available.controller property. The following script shows an example of creating and adding controllers to a list controller.

.<subcontroller>...

The property list for a list controller also contains the sub-controllers in the list controller (if any). The type of these controllers depends on the type of the list controller. For example, a float_list can contain any number of bezier_float controllers.

EXAMPLE

p=float_list() -- create a list controller

showproperties p -- show its properties

p.available.controller -- the "phantom" controller

p1=bezier_float() -- create a new bezier float controller

p.available.controller=p1 -- add it to the list controller

p2=bezier_float() -- create a new bezier float controller

p.available.controller=p2 -- add it to the list controller

getpropnames p -- show the list controller properties

showproperties p -- show the list controller properties

p.numSubs -- the number of list controller subAnims

getsubanimnames p -- show the list controller subAnim names

p[2].object -- retrieve the second bezier float controller

OUTPUT

Controller:Float_List -- result line 1

.weight : float array

.average (Average_Weights) : boolean

.available : float -- output line 2

false -- output line 2

Controller: -- result line 3 (the "phantom" controller)

Controller:Bezier_Float -- result line 4

Controller:Bezier_Float -- result line 5

Controller:Bezier_Float -- result line 6

Controller:Bezier_Float -- result line 7

#(#weight, #average, #bezier_float, #available) -- result line 8

.weight : float array -- output line 9

.average (Average_Weights) : boolean -- output line 9

.bezier_float : float -- output line 9

.bezier_float : float -- output line 9

.available : float -- output line 9

false -- output line 9

4 -- result line 10

#(#bezier_float, #bezier_float, #available, #Weights) -- result line 11

Controller:Bezier_Float -- result line 12

OK

EXAMPLE

lst = $.pos.controller -- if this is a list controller

showInterfaces lst  -- interface name is "list"

List Controllers Interfaces:

Interface: list

Properties

.count : integer : Read

This property contains the number of items that appear in the List controllers list box.

.active : index : Read|Write

Get/Set the the index of the currently active item.

Methods:

<integer>getCount()

This method returns the number of items that appear in the List controllers list box.

<void>setActive <index>listIndex

This method allows you to sets the indexed item in the list active so its parameters appear in the motion panel, and any input is directed to the indexed sub controller.

<index>listIndex: The index of the item to set as the active item.

<integer>getActive()

This method returns the index of the currently active item.

<void>delete <index>listIndex

This method allows you to delete the indexed sub controller from the list.

<index>listIndex: The index of the item to delete from the list.

<void>cut <index>listIndex

This method allows you to cut the index sub controller from the list and stores it in the buffer to paste later.

<index>listIndex: The index of the item you wish to cut.

<void>paste <index>listIndex

This method allows you to paste the sub-controller from the buffer into the indexed slot in the list.

<index>listIndex: The index of the slot to paste into.

<string>getName <index>listIndex

This method returns the class name of the indexed sub-controller if a user defined name doesn’t exist.

<index>listIndex: The index of the item for which to get the name.

<void>setName <index>listIndex <string>name

This method allows you to set the name of an indexed item.

<index>listIndex : The index of the item.

<string>name: The name to set it to.

See also Class IlistControl, in the SDK Help file accompanying this product.

EXAMPLE

b = Box lengthsegs:1 widthsegs:1 heightsegs:1 length:65.7611 width:32.0211 height:39.8261 pos:[-15.6972,-84.9615,0] isSelected:on

b.pos.controller = position_list ()

b.pos.controller.Available.controller = Position_XYZ ()

b.pos.controller.Available.controller = tcb_position ()

b.pos.controller.Available.controller = bezier_position ()

lst = b.pos.controller -- the list controller

showInterfaces lst -- interface name is "list"

lst.getCount() -- count function

lst.count -- count property (read only)

lst.SetActive 3 -- set active function

lst.GetActive() -- get active function

lst.active -- active property

lst.cut 2 -- cut the second sub-controller

lst.paste 1 -- paste it to the top of the list

lst.delete lst.count -- delete the second to last sub-controller

lst.setName 2 "My Bezier" -- sets the name of the second sub-controller

lst.getName 2 -- gets the name of the sub-controller

ListCtrl Methods

The following methods were available in 3ds Max prior to version 4. They are still supported for backwards compatibility, but their functionality is covered by the new methods described above.

listCtrl.getName <list_controller> <index_integer>

Returns the name of the indexed subcontroller in the list controller.

listCtrl.setName <list_controller> <index_integer> <string>

Sets the name of the indexed subcontroller in the list controller. If the string is a null string (""), the default controller name is used.

listCtrl.getActive <list_controller>

Returns the index of the active subcontroller in the list controller

listCtrl.setActive <list_controller> <index_integer>

Sets the indexed subcontroller in the list controller as the active controller

See also

float_list : FloatController

point3_list : Point3Controller

position_list : PositionController

rotation_list : RotationController

scale_list : ScaleController

Controller Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Motion Capture Controllers

float_motion_capture : floatController
point3_motion_capture : point3Controller
position_motion_capture : positionController
rotation_motion_capture : rotationController
scale_motion_capture : scaleController

Value > MAXWrapper > Controllers > Motion Capture Controllers

Constructor

float_motion_capture ...

point3_motion_capture ...

position_motion_capture ...

rotation_motion_capture ...

scale_motion_capture ...

NOTE:

Thes classes are not available in Autodesk VIZ.

Properties

<motion_capture>.data Controller

The data controller type depends on the motion controller data type. The controller is typically a Bezier controller.

There are presently no properties or methods associated with the motion capture controllers themselves.

See also

Controller Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Noise Controllers

noise_float : floatController
noise_point3 : point3Controller
noise_position : positionController
noise_rotation : rotationController
noise_scale : scaleController

Value > MAXWrapper > Controllers > Noise Controllers

Constructor

noise_float ...

noise_point3 ...

noise_position ...

noise_rotation ...

noise_scale ...

Properties

Access to the following properties is available on all noise controllers:

<noise_controller>.seed Integer default: 0

<noise_controller>.frequency Float default: 0.5

<noise_controller>.fractal Boolean default: true

<noise_controller>.roughness Float default: 0.0

<noise_controller>.rampin Time default: 0f

<noise_controller>.rampout Time default: 0f

In addition, for noise float controllers you can get these properties:

<noise_controller>.noise_strength Float default: 5 -- animatable

<noise_controller>.positive Boolean default: false

limits values to > 0

and for noise position, point3, rotation and scale controllers:

<noise_controller>.noise_strength Point3 default: varies -- animatable

position and point3 default: [50,50,50]

rotation default: [0.785398,0.785398,0.785398]

scale default: [0.5,0.5,0.5]

<noise_controller>.x_positive Boolean default: false

<noise_controller>.y_positive Boolean default: false

<noise_controller>.z_positive Boolean default: false

limits values to > 0

NOTE:

You need to access these properties explicitly on a controller,

FOR EXAMPLE,

$box01.position.controller.x_strength = 100

or

c = $box01.rotation.controller

c.seed = random 0 100

c.fractal = off

c.frequency = random 0.1 0.2

See also

Controller Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


On_Off Controller Keys

Value > MAXWrapper > Controllers > FloatController > On_Off > On_Off Controller Keys

Properties

For On_Off keys, the following properties are accessible:

<key>.time Time

Get the key's time as time value. Read-only.

<key>.selected Boolean

Get/Set whether the key is selected.

See also

Key Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Slave Controllers

slavefloat : floatController
slave_point3 : point3Controller
slavepos : positionController
slaverotation : rotationController
slavescale : scaleController

Value > MAXWrapper > Controllers > Slave Controllers

Constructor

The Slave controllers are not creatable by MAXScript. They can only be created by creating a Masterblock in the Block Control node in the Global Tracks node of Track View. See MasterBlock : MasterBlockController for more information.

See also

Controller Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Spring Controller

NOTE:

This class is not available in 3D Studio VIZ.

The Spring controller adds secondary dynamics effects to any point or object position. The end result is secondary mass/spring dynamics similar to Flex. This constraint adds realism to generally static animations.

When you apply Spring to an animated object, its original motion is preserved and secondary, velocity-based dynamics are applied. When you first apply the controller, it constructs a virtual spring between the object's original position and where it would end up after forces are applied to it. You can adjust spring tension and dampening. Increasing the tension creates a tighter spring, while increasing the dampening smoothes out jitters in the motion.

Users have control over the point's Mass and Drag, the spring's Tension and Dampening, and other world space constraints. These include being able to add external forces like Wind and Gravity (spacewarps), and being able to constrain the spring effects along a given axis. This way you can add vertical dynamics while controlling the about of effect it has in the horizontal directions.

The solution is calculated using a start time and a step size. Solutions are cached once for the last tick calculated, and once per frame. Performance should be the same one each frame as you step forward, and significantly faster after the first pass if nothing changes. Cached values will be used if going backwards in time.

The biggest slowdown occurs when animating an object that the controller uses as a force way down the time line since this is a history dependant solver. If a lot of animation is going to occur along a long timeline you can shut off the spring solver by setting steps to 0. Set this back to the desired value when you want the solution recalculated.

Methods

<float>getMass()

Returns the mass.

<void>setMass <float>mass

Sets the mass. The mass of the object to which the Spring controller is applied. Increasing the mass causes the "bouncing" spring motion to become more exaggerated.

<float>getDrag()

Returns the drag.

<void>setDrag <float>drag

Sets the drag. Acts as air friction on the spring motion. A low Drag setting results in a greater "bouncing" effect, while a high Drag results in subdued bouncing. Default=1. Range=0 to 10.

<float>getTension <index>springIndex

Gets the tension for the spring corresponding to the index.

<void>setTension <index>springIndex <float>tension

Sets the tension for the spring corresponding to the index. The "stiffness" of the virtual spring between the controlled object and the highlighted spring object(s).

<float>getDampening <index>springIndex

Gets the dampening for the spring corresponding to the index.

<void>setDampening <index>springIndex <float>dampening

Sets the dampening for the spring corresponding to the index. : Acts as a multiplier of an internal factor that determines how quickly the object comes to rest. With the Self Influence spring, changing Dampening has the same effect as changing Drag. With other springs, Dampening affects only the movement caused by that spring. Internally, the dampening value is proportional to the tension, so as you increase the tension and make the solution more stiff, the dampening is increased to maintain system stability.

<boolean>addSpring <node>node

<node>node

Adds the node to the spring list.

Returns true if successful, false otherwise

<integer>getSpringCount()

Returns the number of springs in the spring system.

<void>removeSpringByIndex <index>springIndex

Removes the spring corresponding to the index.

<void>removeSpring <node>node

Removes the spring if the node is in the spring list.

See also

SpringPoint3Controller : Point3Controller

SpringPositionController : PositionController

Flex : Modifier


XYZ Controllers

Color_RGB : Point3Controller
Euler_XYZ : RotationController
Local_Euler_XYZ : RotationController
Point3_XYZ : Point3Controller
Position_XYZ : PositionController
ScaleXYZ : ScaleController

Value > MAXWrapper > Controllers > XYZ COntrollers

Constructors

Color_RGB ...

Euler_XYZ ...

Local_Euler_XYZ ...

Point3_XYZ ...

Position_XYZ ...

ScaleXYZ ...

Properties

The property names for the XYZ controllers vary between the specific controllers.

Color_RGB:

<Color_RGB>.r Float default: 0.0 -- animatable

<Color_RGB>.g Float default: 0.0 -- animatable

<Color_RGB>.b Float default: 0.0 -- animatable

Euler_XYZ:

<Euler_XYZ>.x_rotation Float default: 0.0 -- animatable

<Euler_XYZ>.y_rotation Float default: 0.0 -- animatable

<Euler_XYZ>.z_rotation Float default: 0.0 -- animatable

<Euler_XYZ>.axisOrder   Integer default: 1

Get/set the order of application of the axis angles. Its value can be any of the following:

1 - XYZ

2 - XZY

3 - YZX

4 - YXZ

5 - ZXY

6 - ZYX

7 - XYX

8 - YZY

9 - ZXZ Local_Euler_XYZ:

<Local_Euler_XYZ>.local_x_rotation Float default: 0.0 -- animatable

<Local_Euler_XYZ>.local_y_rotation Float default: 0.0 -- animatable

<Local_Euler_XYZ>.local_z_rotation Float default: 0.0 -- animatable

<Local_Euler_XYZ>.axisOrder  Integer default: 1

Get/set the order of application of the axis angles. Its value can be any of the following:

1 - XYZ

2 - XZY

3 - YZX

4 - YXZ

5 - ZXY

6 - ZYX

7 - XYX

8 - YZY

9 - ZXZ

Point3_XYZ:

<Point3_XYZ>.x Float default: 0.0 -- animatable

<Point3_XYZ>.y Float default: 0.0 -- animatable

<Point3_XYZ>.z Float default: 0.0 -- animatable

Position_XYZ:

<Position_XYZ>.x_position Float default: 0.0 -- animatable

<Position_XYZ>.y_position Float default: 0.0 -- animatable

<Position_XYZ>.z_position Float default: 0.0 -- animatable

ScaleXYZ:

<ScaleXYZ>.x_scale Float default: 0.0 -- animatable

<ScaleXYZ>.y_scale Float default: 0.0 -- animatable

<ScaleXYZ>.z_scale Float default: 0.0 -- animatable

Methods

getXYZControllers <controller>

Returns an array of the X, Y, and Z sub-controllers of the specified controller

See also

Controller Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Bezier Controllers

bezier_color : point3Controller
bezier_float : floatController
bezier_point3 : point3Controller
bezier_position : positionController
bezier_rotation : rotationController
bezier_scale : scaleController

Value > MAXWrapper > Controllers > Bezier Controllers

Constructor

bezier_color ...

bezier_float ...

bezier_point3 ...

bezier_position ...

bezier_rotation ...

bezier_scale ...

Properties

<bezier_controller>.keys MAXKeyArray

See also

MAXKeyArray Values

Bezier Controller Keys

BezierDefaultParams Structure

Controller Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


BezierDefaultParams Structure

The BezierDefaultParams Structure allows you to set the default Bezier key parameters to be used for newly created Bezier controller keys.

Available in 3ds Max 2008 and higher. Previously available in the free [ AVG ] Avguard Extensions.

Properties

BezierDefaultParams.inTangentType

BezierDefaultParams.outTangentType

Get/set the default Bezier key in and out Tangent Types.

Valid values are: #smooth | #linear | #step | #fast | #slow | #custom | #flat

See also

Bezier Controllers

Bezier Controller Keys


Bezier Controller Keys

For Bezier controller keys, the following properties are accessible:

Properties

<key>.time Time

Time value or number (interpreted as frames)

<key>.selected Boolean

Specifies whether the key is selected

<key>.value varies

Class determined by its containing controller

<key>.inTangent varies -- float or point3 (see below)

<key>.outTangent varies -- float or point3 (see below)

<key>.inTangentType Name -- see list of permitted names below

<key>.outTangentType Name -- see list of permitted names below

<key>.inTangentLength Float

<key>.outTangentLength Float

<key>.freeHandle Boolean

<key>.x_locked Boolean default: true

<key>.y_locked Boolean default: true

<key>.z_locked Boolean default: true

<key>.constantVelocity Boolean default: false

The .inTangent and .outTangent values are Floats in keys of float controllers and Point3s for the other appropriate controllers. Default value is 0 for float controllers, [0,0,0] otherwise.

The .inTangentType and .outTangentType properties have symbolic name values representing the possible tangent types available in the drop-down menu in the Bezier key property dialog:

#smooth

#linear

#step

#fast

#slow

#custom

#auto

.inTangentLength and .outTangentLength, (typically a fraction from 0 to 1) represent how long the handle is towards the adjacent key. For example, a value of 0.5 means the handle reaches halfway from the current key to the adjacent key, and a value of 1 reaches all the way. If the handle reaches beyond the adjacent key, it will be greater than one. If there is no previous key, the value of .inTangentLength will be -1.

There is a check box to the key property/Master Point control dialog found in the Motion Panel. It is called Free Handle. When Free Handle is checked, the user can move the horizontal handle where ever s/he feels. Otherwise, s/he is constrained, to prevent discontinuities.

Correspondingly, there is a bezier key property called .freeHandle that implements the functionality described above.

EXAMPLE

c = bezier_position () -- create and assign new controller

$bar.pos.controller = c

k = addNewKey c 0f -- add a key at frame 0

k.value = [10,0,0] -- set value there

k.outTangentType = #slow -- and outgoing tangent type

k = addNewKey c 100f -- add another key at 100

k.value = [200,10,0] -- set value

k.inTangentType = #custom -- make inTangent custom

k.inTangent = [0.2, 0.02, 0.112] -- set its tangents

k.x_locked = false -- and unlock handles

NOTE:

There are a fair number of classes that don't implement the showproperties method. MAXKey is one of them. getPropNames is not implemented for it either.

See also

Key Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods

Bezier Controllers

BezierDefaultParams Structure


FloatController : MAXWrapper

Value > MAXWrapper > Controllers > FloatController

FloatController is the superclass for all controllers that can be assigned to parameters that are simple numbers (Float or Integer). The following is a list of the core FloatController classes accessible in MAXScript:

AudioFloat

Boolean_Float

Bezier_Float

Block

Float_Expression

Float_List

Float_Motion_Capture

Float_Reactor

Float_Script

Linear_Float

LOD_Controller

Noise_Float

On_Off

SlaveFloat

TCB_Float

Waveform_Float

Float_Layer

Layer_Output


Block : FloatController

Value > MAXWrapper > Controllers > FloatController > Block

Constructor

The Block controller is not creatable by MAXScript. It can only be created by creating a Masterblock in the Block Control node in the Global Tracks node of Track View. See MasterBlock : MasterBlockController for more information.

See also

Controller Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


boolean_float : FloatController

boolean_float - superclass: FloatController; super-superclass:MAXWrapper - classID: #(1591046085, 1794172193)

Value > MAXWrapper > Controllers > FloatController > boolean_float

Constructor

boolean_float ...

boolcntrl ...

NOTE:

This class are not available in Autodesk VIZ.

Properties

There are no additional properties accessible for this controller.

See also

Float controller

Controller Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


float_list : FloatController

float_list - superclass: FloatController; super-superclass:MAXWrapper - 1:1 - classID: #(1263210496, 0)

Value > MAXWrapper > FloatController > float_list

The List controller combines multiple controllers into a single effect. It is a compound controller with tools for managing the order in which its internal controllers are calculated. Controllers are evaluated in a top to bottom order; the controller at the top of the list is evaluated first.

When you assign a List controller to a parameter, the current controller is moved one level below the List controller; it becomes the first controller in the list. A second parameter is added below the List controller and is named Available. This is an empty placeholder for the next controller you add to the list.

Constructor

float_list...

floatList...

Properties

<float_list>.available Float default: 0.0 -- animatable; float

Represents the Available sub-controller.

<float_list>.average Boolean default: false -- boolean; Average_Weights

Controls the state of the "Average Weights" checkbox.

<float_list>.weight ArrayParameter default: #(100.0) -- float array; SubAnim

Get/set the array of the weights for the List controller’s sub-controllers.

List Interfaces

Interface: list

Properties:

.count : integer : Read

.active : index : Read|Write

Methods

<integer>getCount()

This method returns the number of items that appear in the List controllers list box.

<void>setActive <index>listIndex

This method allows you to sets the indexed item in the list active so its parameters appear in the motion panel, and any input is directed to the indexed sub controller.

<index>listIndex: The index of the item to set as the active item.

<integer>getActive()

This method returns the index of the currently active item.

<void>delete <index>listIndex

This method allows you to delete the indexed sub controller from the list.

<index>listIndex: The index of the item to delete from the list.

<void>cut <index>listIndex

This method allows you to cut the index sub controller from the list and stores it in the buffer to paste later.

<index>listIndex: The index of the item you wish to cut.

<void>paste <index>listIndex

This method allows you to paste the sub-controller from the buffer into the indexed slot in the list.

<index>listIndex: The index of the slot to paste into.

<string>getName <index>listIndex

This method allows you to paste the sub-controller from the buffer into the indexed slot in the list.

<index>listIndex: The index of the item for which to get the name.

<void>setName <index>listIndex <string>name

This method allows you to set the name of an indexed item.

<index>listIndex : The index of the item.

<string>name: The name to set it to.

See also Class IlistControl, in the SDK Help file accompanying this product.

See also

List Controllers

point3_list : Point3Controller

position_list : PositionController

rotation_list : RotationController

scale_list : ScaleController

Controller Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Float_Expression : FloatController

Float_Expression - superclass: FloatController; super-superclass:MAXWrapper - 0:0 - classID: #(8213, 0)

Value > MAXWrapper > Controllers > FloatController > Float_Expression

The Float_Expression controller has been rewritten and completely exposed to MAXScript via the IExprCtrl interface in 3ds Max 8. In versions prior to 3ds Max 8, there were no properties or methods accessible for it.

Constructor

float_expression ...

Float_Expression interfaces:

Interface: IExprCtrl

See Expression Controllers for documentation of the methods exposed by the IExprCtrl Interface.


float_limit : FloatController

float_limit - superclass: FloatController; super-superclass:MAXWrapper - 6:0 - classID: #(387087934, 0)

Value > MAXWrapper > Controllers > FloatController > float_limit

The Float_Limit controller can be used to limit the values of another controller to a user-defined value range. Available in 3ds Max 8 and higher.

Constructor

float_limit ...

FloatLimitCtrl ...

Properties:

<float_limit>.enable BooleanClass default: true -- boolean

Enable and disable the limit controller.

<float_limit>.lower_limit Float default: -10000.0 -- animatable; float

Get and set the lower limit of the controller.

<float_limit>.lower_limit_enabled BooleanClass default: true -- boolean

Enable and disable the use of the lower limit.

<float_limit>.static_value Float default: 0.0 -- float

Get and set the static value of the limit controller.

<float_limit>.upper_limit Float default: 10000.0 -- animatable; float

Get and set the upper limit of the controller.

<float_limit>.upper_limit_enabled BooleanClass default: true -- boolean

Enable and disable the use of the upper limit.

float_limit interfaces:

Interface: limits

Methods:

<bool>IsEnabled()

Returns true if the limit controller is enabled, false otherwise.

<void>SetEnabled <bool>enabled

Sets the enabled state of the controller to the boolean value.

<control>GetLimitedControl()

Returns the controller which is being limited.

<void>SetLimitedControl <control>limitedCtrl

Sets the controller to be limited.

<void>SetUpperLimit <time>time <(null)>value

value is In and Out parameter

Sets the upper limit of the controller at the specified time to the given value.

<void>SetLowerLimit <time>time <(null)>value

value is In and Out parameter

Sets the lower limit of the controller at the specified time to the given value.


FloatReactor - superclass: FloatController

FloatReactor : FloatController

FloatReactor - superclass: FloatController; super-superclass:MAXWrapper - 0:0 - classID: #(1904049439, 306976571)

Value > MAXWrapper > FloatController > FloatReactor

Constructor

FloatReactor ...

Float_Reactor ...

FloatReactor interfaces:

Interface: reactions

Properties

.editStateMode : boolean : Read|Write

Get/set the edit state of the reactor controller.

.useCurve : boolean : Read|Write

Get/set whether the reactor controller uses the curve control.

.createMode : boolean : Read|Write

Enable/Disable the Create mode.

Methods

<boolean>reactTo <maxObject>object

Set the react-to object of the reactor controller. Returns true on success, false otherwise.

<boolean>create name:<string>

name default value: "scriptCreated"

Create a new reaction with the specified name. Returns true on success.

<boolean>delete <index>index

Delete the indexed reaction. Returns true on success.

<integer>getCount()

Returns the number of reactions.

<void>select <index>index

Select the indexed reaction.

<index>getSelected()

Returns the selected reaction’s index.

<boolean>setStateToCurrent <index>index

Sets the indexed reaction’s state to the current state. Returns true on success.

<boolean>setFloatState <index>index <float>state

Sets the state of the indexed reaction in a float reactor controller to the specified float value. Returns true on success.

<boolean>setVectorState <index>index <point3>state

Sets the state of the indexed reaction in a point3 reactor controller to the specified float value. Returns true on success.

<boolean>setRotationState <index>index <quat>state

Sets the state of the indexed reaction in a rotation reactor controller to the specified float value

<fpvalue>getState <index>index

Returns the state of the indexed reaction.

<boolean>setValueToCurrent <index>index

Sets the value of the indexed reaction to the current value. Returns true on success.

<boolean>setValueAsFloat <index>index <float>value

Sets the value of the indexed reaction to the specified float value. Returns true on success.

<boolean>setValueAsVector <index>index <point3>value

Sets the value of the indexed reaction to the specified point3 value. Returns true on success.

<boolean>setValueAsQuat <index>index <quat>value

Sets the value of the indexed reaction to the specified quaternion value. Returns true on success.

<fpvalue>getValue <index>index

Returns the value of the indexed reaction.

<boolean>setInfluence <index>index <float>influence

Sets the influence of the indexed reaction to the specified float value. Returns true on success.

<float>getInfluence <index>index

Returns the influence of the indexed reaction.

<boolean>setStrength <index>index <float>strength

Sets the strength of the indexed reaction to the specified float value. Returns true on success.

<float>getStrength <index>index

Returns the strength of the indexed reaction.

<boolean>setFalloff <index>index <float>influence

Sets the falloff of the indexed reaction to the specified float value. Returns true on success.

<float>getFalloff <index>index

Returns the falloff of the indexed reaction.

<void>setName <index>index <string>name

Sets the name of the indexed reaction to the specified string. Returns true on success.

<string>getName <index>index

Returns the name of the indexed reaction.

<enum>getType()

getType enums: {#floatReaction|#positionalReaction|#rotationalReaction|#scaleReaction}

Returns the falloff of the indexed reaction.

Actions:

See also

Reactor controller

Reactor Controllers

Point3Reactor : Point3Controller

PositionReactor : PositionController

Rotation_Reactor : RotationController

Scale_Reactor : ScaleController

Controller Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Float_Wire : FloatController

Value > MAXWrapper > Controllers > FloatController > Float_Wire

Constructor

Class instances not creatable by MAXScript

Aliases

Float_Wire

WireFloat

Float_Wire interfaces:

Interface: wireController

Properties

.numWires : integer : Read

This property returns the number of wires out of this controller (i.e. the number of dependent params).

.isMaster : boolean : Read

This property will return True if the wire is a master predicate, otherwise it will return False.

.isSlave : boolean : Read

This property will return True if the wire is a slave predicate, otherwise it will return False.

.isTwoWay : boolean : Read

This property will return True if the wire is a two-way predicate, otherwise it will return False.

.slaveAnimation : control : Read|Write

This property returns a pointer to the slave animation controller and allows you to set the slave animation controller.

Methods

<maxObject>getWireParent <index>index

This method returns a pointer to the i-th dependent parameter parent.

<index>index: The index you wish to retrieve.

<index>getWireSubnum <index>index

This method returns the i-th dependent parameter subanim num in the animatable.

<index>index: The index of the subanim.

<control>getCoController <index>index

This method returns a pointer to the i-th CoController.

<index>index: The index of the controller.

<string>getExprText <index>index

This method returns the expression string of the i-th wire parameter.

<index>index: The index of the parameter.

<void>setExprText <index>index <string>text

This method allows you to set the expression string of the i-th wire parameter.

<index>index : The index of the parameter

<string>text: The expression you wish to set.

See also

Point3_Wire : Point3Controller

Position_Wire : PositionController

Rotation_Wire : RotationController

Scale_Wire : ScaleController

Parameter Wiring

Interface: paramWire


LOD_Controller : FloatController

Value > MAXWrapper > Controllers > FloatController > LOD_Controller

Constructor

The LOD_Controller controller is not creatable by MAXScript. It can only be created using the Level of Detail utility.

NOTE:

This class is not available in Autodesk VIZ.

Properties

There are no additional properties for LOD_Controller.

See also

Controller Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


On_Off : FloatController

On_Off - superclass: FloatController; super-superclass:MAXWrapper - classID: #(-1739879129, -1819328957)

Value > MAXWrapper > Controllers > FloatController > On_Off

Constructor

on_off ...

Properties

<on_off>.keys MAXKeyArray

Returns the array of controller keys.

See also

MAXKeyArray Values

On_Off Controller Keys

Controller Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Waveform_Float : FloatController

Waveform_Float - superclass: FloatController; super-superclass:MAXWrapper - 0:0 - classID: #(-1828012936, 0)

Value > MAXWrapper > Controllers > FloatController > Waveform_Float

Constructor

waveform_float ...

Properties

There are no additional properties accessible for Waveform_Float controllers.

See also

Controller Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Linear Controllers

linear_float : floatController
linear_position : positionController
linear_rotation : rotationController
linear_scale : scaleController

Value > MAXWrapper > Controllers > Linear Controllers

Constructor

linear_float ...

linear_position ...

linear_rotation ...

linear_scale ...

Properties

<controller>.keys MAXKeyArray

See also

MAXKeyArray Values

Linear Controller Keys

Controller Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Linear Controller Keys

Value > MAXWrapper > Controllers > Linear Controllers > Linear Controller Keys

For Linear controller keys, the following properties are accessible:

Properties

<key>.time Time

Time value or number (interpreted as frames)

<key>.selected Boolean

Specifies whether the key is selected

<key>.value varies

Class determined by its containing controller

See also

Key Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


MasterBlockController : MAXWrapper

Value > MAXWrapper > Controllers > MasterBlockController

MasterBlockController is the superclass for the controllers associated with the Block Control Track View node. These classes are:

Block_Control

MasterBlock


Block_Control : MasterBlockController

Block_Control : MasterBlockController {4b4b1015,0}

Value > MAXWrapper > Controllers > MasterBlockController > Block_Controller

Constructor

The Block_Control controller is not creatable by MAXScript. Only one instance of the class exists in 3ds Max - the Block Control node in the Global Tracks node of Track View. See MasterBlock : MasterBlockController for more information.

Properties

.weight : float array

.average (Average_Weights) : boolean

See also

Controller Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


MasterBlock : MasterBlockController

Value > MAXWrapper > Controllers > MasterBlockController > MasterBlock

Constructor

The MasterBlock controller is not creatable by MAXScript. It can only be created in the Block Control node in the Global Tracks node of Track View. If multiple MasterBlocks are present, you will need to access the MasterBlocks as a subAnim of trackviewnodes.global_tracks.block_control. This is because all MasterBlocks have the same name (MasterBlock).

Properties

Once a MasterBlock has been created in Track View, the following MasterBlock property is available:

<MasterBlock>.blend Float

Once a track has been added to the MasterBlock, a Block controller is added to the MasterBlock, and the track’s controller is added as an input controller to the Block controller. The name assigned to the Block controller is the name specified for the block. The Block controller is then available as a property of the MasterBlock, and the track’s controller is available as a property of the Block controller. In addition, the track’s controller is replaced with a list controller and the track’s original controller is placed in the list controller along with a Slave controller. This Slave controller is controlled by the Block controller. For example, if a block with name "BoxHeight" is present, and contains the height controller for a box object, the block and its track can be accessed as follows:

mb=trackviewnodes.global_tracks.block_control[1]

SubAnim:MasterBlock

getpropnames mb

#(#Blend, #height)

h=mb.height

SubAnim:height

h.object

Controller:Block

getpropnames h

#(#Box01_Height)

h.box01_height

157.083 -- the box’s height

h.box01_height.controller

Controller:Bezier_Float -- the box’s height controller

See also

Controller Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Matrix3Controller : MAXWrapper

Value > MAXWrapper > Controllers > Matrix3Controller

Matrix3Controller is the superclass for all controllers that can be assigned to transform or Position-Rotation-Scale parameters. The following is a list of the core Matrix3Controller classes accessible in MAXScript:

Link_Control

Link_Transform

LookAt

PRS

IK_ControllerMatrix3Controller

Slave_Controller

SplineIKChain

IKChainControl

IKControl

XRef_Controller


IK_ControllerMatrix3Controller : Matrix3Controller

Value > MAXWrapper > Controllers > Matrix3Controller > IK_ControllerMatrix3Controller

The functions described in this topic provide access to some of the Inverse Kinematics (IK) parameters of the IK controller. The IK controller is typically used by the Bones system in 3ds Max. You cannot create a Bones system using MAXScript in 3ds Max 3, but these methods provide access to the IK controller for existing Bones systems. An IK system actually consists of two types of controllers - the master IK controller and slave IK controllers. The slave IK controllers are used as the transform controller for all nodes in the IK system, and the master IK controller controls the individual slave IK controllers.

All the IK-related methods are in the ik structure and are associated with a parameter in the Motion panel, IK Controller Parameters rollout. These functions return undefined if executed on an object whose controller is not an IK controller. The controller actually being accessed in these methods is the master IK controller. Accessing the IK controller for any object in the IK system accesses the same master IK controller.

NOTE:

The following ik structure methods are still present, but not applicable in 3ds Max 4 and higher. Getting/setting via these methods return a value of ‘undefined’:

GetRotThreshold

SetRotThreshold

GetPosThreshold

SetPosThreshold

GetIterations

SetIterations

ik.GetPosThreshold <node>

ik.SetPosThreshold <node> <float>

Get and set the Position threshold value for the specified object.

ik.GetRotThreshold <node>

ik.SetPosThreshold <node> <float>

Get and set the Rotation threshold value for the specified object.

ik.GetIterations <node>

ik.SetIterations <node> <integer>

Get and set the Iterations value for the specified object.

ik.GetStartTime <node>

ik.SetStartTime <node> <time>

Get and set the Start time for the specified object

ik.GetEndTime <node>

ik.SetEndTime <node> <time>

Get and set the End time for the specified object

ik.getPinNode <node>

Gets the node the specified node is bound to in the IK panel as a <node> value, undefined if none.

ik.setPinNode <node> (<node> | undefined)

Sets the node the specified node is bound to in the IK panel. If undefined is specified, the node is unbound. Returns true if the bind was successful, false otherwise.

ik.getPrecedence <node>

Gets the precedence of the node as specified in the IK panel as an <integer> value

ik.setPrecedence <node> <number>

Sets the precedence of the node as specified in the IK panel. Returns true if the assignment was successful, false otherwise.

ik.getIsTerminator <node>

ik.setIsTerminator <node> <boolean>

Get/set whether the node is a terminator.

ik.getBindPos <node>

ik.setBindPos <node> <boolean>

Get/set whether Bind Position is turned on for the node.

ik.getBindOrient <node>

ik.setBindOrient <node> <boolean>

Get/set whether Bind Orientation is turned on for the node.

ik.getAxisActive {<node> | <controller>} {#rotational | #sliding}

ik.setAxisActive {<node> | <controller>} {#rotational | #sliding} <bitarray>

Get/Set whether each axis is active as a 3 bit bitarray. Available in 3ds Max 2008 and higher. Previously available in the free [ AVG ] Avguard Extensions.

ik.getAxisLimit {<node> | <controller>} {#rotational | #sliding}

ik.setAxisLimit {<node> | <controller>} {#rotational | #sliding} <bitarray>

Get/Set whether each axis is limitted as a 3 bit bitarray. Available in 3ds Max 2008 and higher. Previously available in the free [ AVG ] Avguard Extensions.

ik.getAxisEase {<node> | <controller>} {#rotational | #sliding}

ik.setAxisEase {<node> | <controller>} {#rotational | #sliding} <bitarray>

Get/Set whether each axis is eased as a 3 bit bitarray. Available in 3ds Max 2008 and higher. Previously available in the free [ AVG ] Avguard Extensions.

ik.getAxisMin {<node> | <controller>} {#rotational | #sliding}

ik.setAxisMin {<node> | <controller>} {#rotational | #sliding} <point3>

Get/Set min value for each axis as a Point3. Available in 3ds Max 2008 and higher. Previously available in the free [ AVG ] Avguard Extensions.

ik.getAxisMax {<node> | <controller>} {#rotational | #sliding}

ik.setAxisMax {<node> | <controller>} {#rotational | #sliding} <point3>

Get/Set max value for each axis as a Point3. Available in 3ds Max 2008 and higher. Previously available in the free [ AVG ] Avguard Extensions.

ik.getAxisDamping {<node> | <controller>} {#rotational | #sliding}

ik.setAxisDamping {<node> | <controller>} {#rotational | #sliding} <point3>

Get/Set damping value for each axis as a Point3. Available in 3ds Max 2008 and higher. Previously available in the free [ AVG ] Avguard Extensions.

ik.getAxisPreferredAngle {<node> | <controller>}

ik.setAxisPreferredAngle {<node> | <controller>} <point3>

Get/Set preferred angle for each axis as a Point3. Available in 3ds Max 2008 and higher. Previously available in the free [ AVG ] Avguard Extensions.

ik.getAxisSpringOn {<node> | <controller>} {#rotational | #sliding}

ik.setAxisSpringOn {<node> | <controller>} {#rotational | #sliding} <bitarray>

Get/Set whether spring is on for each axis as a 3 bit bitarray. Available in 3ds Max 2008 and higher. Previously available in the free [ AVG ] Avguard Extensions.

ik.getAxisSpring {<node> | <controller>} {#rotational | #sliding}

ik.setAxisSpring {<node> | <controller>} {#rotational | #sliding} <point3>

Get/Set spring value for each axis as a Point3. Available in 3ds Max 2008 and higher. Previously available in the free [ AVG ] Avguard Extensions.

ik.getAxisSpringTension {<node> | <controller>} {#rotational | #sliding}

ik.setAxisSpringTension {<node> | <controller>} {#rotational | #sliding} <point3>

Get/Set spring tension for each axis as a Point3. Available in 3ds Max 2008 and higher. Previously available in the free [ AVG ] Avguard Extensions.

NOTES:

For those controllers that don't support IK parameters via the access method used for these methods, a value of undefined is returned.

IK controllers do not support the access method used, but access is provided as properties of the IK controller.

If a node is specified, the node's transform controller is used.


IKChainControl : Matrix3Controller

IKChainControl : Matrix3Controller {78724378,8a4fd9}

Value > MAXWrapper > Matrix3Controller > IKChainControl

Constructor

Class instances not creatable by MAXScript

Properties

.swivelAngle (Swivel_Angle) : angle

.startJoint (Start_Joint) : node

.endJoint (End_Joint) : node

.ikSolver (IK_Solver) : string

.autoEnable (AutoEnabled) : boolean

.autoSnap (Auto_Snap) : boolean

.dispGoal (Display_Goal) : boolean

.goalSize (Goal_Display_Size) : world units

.dispEffector (Display_Effector) : boolean

.effectorSize (Effector_Display_Size) : world units

.dispVH (Display_VH) : boolean

.vhSize (VH_Display_Size) : world units

.vhLength (VH_Display_Length) : world units

.dispSolver (Display_Solver) : boolean

.posThresh (Position_Threshold) : world units

.rotThresh (Rotation_Threshold) : float

.iterations (Iteration_Limit) : integer

.useVHTarget (Use_Vector_Handle_Target) : boolean

.VHTarget (Vector_Handle_Target) : node

.SAParent (Swivel_Angle_Parent_Space) : radio button number

IKChainControl interfaces:

Interface: Action

Methods

<boolean>snap() -- Action Interface

<boolean>ikSnap() -- Action Interface

<boolean>fkSnap() -- Action Interface

<boolean>setPrefAngles() -- Action Interface

<boolean>assumePrefAngles() -- Action Interface

<boolean>toggleEnabled() -- Action Interface

Actions

Category: IK_Chain_Actions; Action: IK_Chain_Snap_Action; Shortcut: -- none defined --

Category: IK_Chain_Actions; Action: IK_Chain_IK_Snap; Shortcut: -- none defined --

Category: IK_Chain_Actions; Action: IK_Chain_FK_Snap; Shortcut: -- none defined -

Category: IK_Chain_Actions; Action: setPrefAngles; Shortcut: -- none defined --

Category: IK_Chain_Actions; Action: assumePrefAngles; Shortcut: -- none defined --

Category: IK_Chain_Actions; Action: toggleEnabled; Shortcut: -- none defined --

See also

IKControl : Matrix3Controller

IK_ControllerMatrix3Controller : Matrix3Controller

SplineIKChain : Matrix3Controller

IKLimb Solver


IKControl : Matrix3Controller

IKControl : Matrix3Controller {e6f5815,717f99a4}

Value > MAXWrapper > Matrix3Controller > IKControl

Constructor

Class instances not creatable by MAXScript

Properties

.PosXActive (Position_X_Active) : boolean

.PosXLLimited (Position_X_Lower_Limited) : boolean

.PosXULimited (Position_X_Upper_Limited) : boolean

.PosXLimited (Position_X_Limited) : boolean

.PosXLLimit (Position_X_Lower_Limit) : world units

.PosXULimit (Position_X_Upper_Limit) : world units

.PosYActive (Position_Y_Active) : boolean

.PosYLLimited (Position_Y_Lower_Limited) : boolean

.PosYULimited (Position_Y_Upper_Limited) : boolean

.PosYLimited (Position_Y_Limited) : boolean

.PosYLLimit (Position_Y_Lower_Limit) : world units

.PosYULimit (Position_Y_Upper_Limit) : world units

.PosZActive (Position_Z_Active) : boolean

.PosZLLimited (Position_Z_Lower_Limited) : boolean

.PosZULimited (Position_Z_Upper_Limited) : boolean

.PosZLimited (Position_Z_Limited) : boolean

.PosZLLimit (Position_Z_Lower_Limit) : world units

.PosZULimit (Position_Z_Upper_Limit) : world units

.RotXActive (Rotation_X_Active) : boolean

.RotXLLimited (Rotation_X_Lower_Limited) : boolean

.RotXULimited (Rotation_X_Upper_Limited) : boolean

.RotXLimited (Rotation_X_Limited) : boolean

.RotXLLimit (Rotation_X_Lower_Limit) : angle

.RotXULimit (Rotation_X_Upper_Limit) : angle

.RotYActive (Rotation_Y_Active) : boolean

.RotYLLimited (Rotation_Y_Lower_Limited) : boolean

.RotYULimited (Rotation_Y_Upper_Limited) : boolean

.RotYLimited (Rotation_Y_Limited) : boolean

.RotYLLimit (Rotation_Y_Lower_Limit) : angle

.RotYULimit (Rotation_Y_Upper_Limit) : angle

.RotZActive (Rotation_Z_Active) : boolean

.RotZLLimited (Rotation_Z_Lower_Limited) : boolean

.RotZULimited (Rotation_Z_Upper_Limited) : boolean

.RotZLimited (Rotation_Z_Limited) : boolean

.RotZLLimit (Rotation_Z_Lower_Limit) : angle

.RotZULimit (Rotation_Z_Upper_Limit) : angle

.PrefPosX (Preferred_Position_X) : float

.PrefPosY (Preferred_Position_Y) : float

.PrefPosZ (Preferred_Position_Z) : float

.PrefXAngle (Preferred_Rotation_X) : angle

.PrefYAngle (Preferred_Rotation_Y) : angle

.PrefZAngle (Preferred_Rotation_Z) : angle

See also

IK_ControllerMatrix3Controller : Matrix3Controller

SplineIKChain : Matrix3Controller

IKLimb Solver


Link_Control : Matrix3Controller

Value > MAXWrapper > Controllers > Matrix3Controller > Link_Control

Constructor

link_control ...

Properties

<link_control>.transform Matrix3Controller

Contains the transform controller below the link controller

Methods

linkCtrl.getLinkCount <link_control>

Returns the number of nodes linked to as an integer.

linkCtrl.getLinkNode <link_control> <index_integer>

Returns the node for the indexed link as a node value.

linkCtrl.setLinkNode <link_control> <index_integer> <node>

Sets the node for the indexed link. The indexed link must already exist.

linkCtrl.getLinkTime <link_control> <index_integer>

Returns the time for the indexed link as a time value.

linkCtrl.setLinkTime <link_control> <index_integer> <time>

Sets the time for the indexed link. The indexed link must already exist.

linkCtrl.addLink <link_control> <node> <time>

Adds the specified node as a link with the specified time.

linkCtrl.deleteLink <link_control> <index_integer>

Deletes the indexed link.

See also

Controller Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


LookAt : Matrix3Controller

lookat - superclass: Matrix3Controller; super-superclass:MAXWrapper - 3:3 - classID: #(8198, 0)

Value > MAXWrapper > Controllers > Matrix3Controller > LookAt

The LookAt controller is obsolete and available only for backwards compatibility. You are encouraged to use the LookAt Constraint (which is a Rotation Controller and not a Matrix3 Controller) instead.

Constructor

lookat ...

Properties

<lookAt>.position Bezier_Position -- the position controller

Get/Set the Position sub-controller of the LookAt controller.

<lookAt>.roll_angle Bezier_Float -- the roll controller

Get/Set the Roll sub-controller of the LookAt controller.

<lookAt>.scale Bezier_Scale -- the scale controller

Get/Set the Scale sub-controller of the LookAt controller.

There presently are no methods for directly accessing or setting the target node in the LookAt controller. To set the target node, the LookAt controller needs to be assigned to a node, and then the lookat property of the node is set to the target node. If the transform controller for a node is not a LookAt controller, and a target node is assigned to the lookat property of the node, a LookAt controller is automatically assigned to the node.

FOR EXAMPLE

$box01.lookat=$box02

is equivalent to

$box01.transform.controller=lookat()

$box01.lookat=$box02

lookat interfaces:

Interface: ILookatControl

Properties:

.UseTargetAsUpNode : bool : Read|Write

Get/Set whether to use the target as the Up Node.

.Axis : integer : Read|Write|Validated by Range: 0 to 2

Get/Set the axis. Possible values are:

0 - X Axis

1 - Y Axis

2 - Z Axis

.Flip : boolean : Read|Write

Get/Set whether to flip the orientation. Normally, a node will look at the target with the negative axis. Setting Flip to true will make the node to look at the target with the positive axis.

See also

LookAt_Constraint - superclass: RotationController

Controller Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


PRS : Matrix3Controller

prs - superclass: Matrix3Controller; super-superclass:MAXWrapper - classID: #(8197, 0)

Value > MAXWrapper > Controllers > Matrix3Controller > PRS

Constructor

prs ...

Properties

<prs>.position Bezier_Position

The position sub-controller

<prs>.rotation TCB_Rotation

The rotation sub-controller

<prs>.scale Bezier_Scale

The scale sub-controller

NOTE:

You can assign a Matrix3 value to a PRS controller’s value property. MAXScript will automatically set the individual position, rotation, and scale values to the values represented in the Matrix3 value.

See also

Controller Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Slave_Control : Matrix3Controller

Value > MAXWrapper > Controllers > Matrix3Controller > Slave_Control

NOTE:

This class is not available in Autodesk VIZ.

The Slave_Control is used as the transform controller for the boxes in a RingArray system object. You cannot create a RingArray system using MAXScript in 3ds Max, but properties for this controller are accessible by MAXScript for existing RingArray systems. A RingArray system actually consists of two types of controllers - the master controller and Slave_Control controllers. The Slave_Control controllers are used as the transform controller for all the boxes in the RingArray system, and the master controller controls the individual Slave_Control controllers. Changing a property value for one Slave_Control in a RingArray system changes the property value for all Slave_Controls in the system.

Properties

<Slave_Control>.radius Float default: 100.0 -- animatable

Get/Set the Radius value of the controller.

<Slave_Control>.cycles Float default: 3.0 -- animatable

Get/Set the Cycles value of the controller.

<Slave_Control>.amplitude Float default: 20.0 -- animatable

Get/Set the Amplitude value of the controller.

<Slave_Control>.phase Float default: 1.0 -- animatable

Get/Set the Phase value of the controller.


SplineIKChain : Matrix3Controller

SplineIKChain : Matrix3Controller {21c71167,692d0dd7}

Value > MAXWrapper > Matrix3Controller > SplineIKChain

Constructor

Class instances not creatable by MAXScript

Properties

.ikSolver (IK_Solver) : string

.pickShape (Pick_Spline_Shape) : node

.startJoint (Start_Joint) : node

.endJoint (End_Joint) : node

.StartTHAngle (Twist_Start_Angle) : angle

.EndTHAngle (Twist_End_Angle) : angle

.dispTHStart (Twist_Start_Handle_Display) : boolean

.sizeTHStart (Twist_Start_Handle_Size) : world units

.lengthTHStart (Twist_Start_Length) : world units

.dispTHEnd (Twist_End_Handle_Display) : boolean

.sizeTHEnd (Twist_End_Handle_Size) : world units

.lengthTHEnd (Twist_End_Length) : world units

.dispSolver (Display_Solver) : boolean

.dispGoal (Display_Goal) : boolean

.goalSize (Goal_Display_Size) : world units

.autoCreateSpline (Auto_Spline_Create) : boolean

.splineType (Spline_Type) : integer

.splineKnotCount (Knot_Count) : integer

.createHelper (Create_Helper) : boolean

.linkRootNode (Link_to_Root_Node) : boolean

.helper_size : float

.helper_centermarker (Center_Marker) : boolean

.helper_axistripod (Axis_Tripod) : boolean

.helper_cross (Cross) : boolean

.helper_box (Box) : boolean

.helper_const_screensize (Constant_Screen_Size) : boolean

.helper_drawontop (Draw_On_Top) : boolean

.upnode : Node

.useUpnode : Boolean

See also

IKChainControl : Matrix3Controller

IKControl : Matrix3Controller

IK_ControllerMatrix3Controller : Matrix3Controller

IKLimb Solver


transform_script - superclass: Matrix3Controller

transform_script : Matrix3Controller

transform_script - superclass: Matrix3Controller; super-superclass:MAXWrapper - 1:0 - classID: #(2136360284, 468085864)

Value > MAXWrapper > Controllers > Matrix3Controller > transform_script

The Transform Script controller contains all of the information contained in a Position/Rotation/Scale (PRS) controller in one scripted matrix value. Instead of having three separate tracks for position, rotation, and scale, all three values can be simultaneously accessed from one script controller dialog. Because the transform values are defined by a script, they are easier to animate.

The value of the controller script must be a matrix3 value. A matrix3 value is a 4x3 3D transformation matrix. For more information, see the Matrix3 Values topic in the MAXScript reference.

The software interprets the text you type into the Script text box as the body of a MAXScript block expression. You can type as many expressions as you want on as many lines as you want, and they are evaluated in turn. The value of the last expression is taken as the controller value. This must yield a matrix3 value for Transform Script controllers.

Since the text is inside a block expression, you can declare local variables which are visible only within the script and are temporary for one evaluation. You can also declare or access global variables that are shared with all other scripts in MAXScript and hold their values from one evaluation to the next.

A controller is always evaluated by the software with respect to a specific animation time. This might be the current time slider or incrementing frame time if an animation is playing, or a rendering is under way. In the case of Script controllers, the time being evaluated is used to establish an automatic "at time" context around the controller script, so any properties you access (outside of other explicit "at time" expressions) yield the correct values for the current controller evaluation time. This means you don't have to do anything special in your scripts to work at the correct time. You can access the evaluation time, with the standard MAXScript variable, current Time. You can also reference scene property values at other times by using "at time" expressions in your scripts, as in regular MAXScript programming.

Constructor

transform_script ...

Properties

<transform_script>.script String default: "(matrix3 1)"

See also

Script Controllers


XRef_Controller : Matrix3Controller

XRef_Controller - superclass: Matrix3Controller; super-superclass:MAXWrapper - classID: #(855328311, 1711097899)

Constructor

xref_controller…

XRef_Controller Interfaces:

Interface: IXRefItem

Properties:

.srcFileName : filename : Read|Write

Get/Set the XRef source filename.

.srcItemName : string : Read|Write

Get/Set the source item name as string.

.xrefRecord : Interface : Read

Get the XRef Record Interface.

.unresolved : bool : Read

Contains true if the XRef is unresolved, false if resolved.

.nested : bool : Read

Contains true if the XRef is nested, false if not nested.

.retargetable : bool : Read

Contains true if the XRef is retargetable, false of not.

Methods:

<maxObject>GetSrcItem resolveNested:<bool>

resolveNested default value: false

Returns the source item as maxObject. If resolveNested is set to false or not supplied, nested XRefs will not be resolved.

<DWORD>GetParentItems <&maxObject array>parentItems

parentItems is Out parameter

Returns the Parent Items of the XRef Controller into the array passed as by-reference parameter.

<DWORD>GetRootItems <&maxObject array>rootItems

rootItems is Out parameter

Returns the Root Items of the XRef Controller into the array passed as by-reference parameter.

<DWORD>GetChildItems <&maxObject array>childItems

childItems is Out parameter

Returns the Child Items of the XRef Controller into the array passed as by-reference parameter.

<void>GetNodes <&node array>xrefNodes

xrefNodes is Out parameter

Returns the Nodes using the XRef Controller into the array passed as by-reference parameter.

Interface: IXRefCtrl

Methods:

<control>GetSourceCtrl <bool>resolveNestedXRef

Returns the Source Controller of the XRef Controller. If the argument is passed as true, nested XRefs will be resolved. If passed as false, nested XRefs will not be resolved.

<void>ResetOffsetTM()

Resets the Offset Transformation Matrix of the XRef_Controller.

See also

Matrix3Controller : MAXWrapper


MorphController : MAXWrapper

Value > MAXWrapper > Controllers > MorphController

MorphController is the superclass for all controllers that can be assigned to morph objects. The following is a list of the core MorphController classes accessible in MAXScript:

Barycentric_Morph_Controller

Cubic_Morph_Controller


Barycentric_Morph_Controller : MorphController

Barycentric_Morph_Controller - superclass: MorphController; super-superclass:MAXWrapper - classID: #(160575522, 0)

Value > MAXWrapper > Controllers > MorphController > Barycentric_Morph_Controller

Constructor

createMorphObject <source_node>

Turns the given scene node into a Morph compound object - does nothing if it already is a Morph object. The returned morph object has a morph controller created accessible via the morph property.

NOTE:

This class is not available in Autodesk VIZ.

You can access the morph controller on a morph compound object via the <node>.morph property, for example:

c = $foo.morph -- get the morph controller

mk1 = c.keys[1] -- get the first morph key

Methods

addMorphTarget <morph_controller> <target_node> <add_method>

Adds a new morph target object to the given morph controller. The <add_method> argument defines the method of attaching the target and should be a number between 1 and 4 with the following interpretation:

1 -- by reference

2 -- by copy

3 -- by move

4 -- by instance

The return value is an Integer giving the target index of the added target object.

setMorphTarget <morph_controller> <target_index_integer> <target_node> <add_method>

Replaces an existing target with a different scene node. The arguments are the same as for addMorphTarget().

getMKTargetNames <morph_controller>

Returns an array of names of the targets in the given morph controller.

deleteMorphTarget <morph_controller> <target_index_integer>

Deletes the numbered morph target in the given controller.

setMorphTargetName <morph_controller> <target_index_integer> <name_string>

Changes the target name of the numbered target in the given morph controller.

getMKTargetWeights <morph_controller> <time> <dest_array>

A quick way of retrieving all the target weights for a given key at the time specified. The targets are placed into <dest_array> which must be an array of the right size. You can find out how many targets there by getting the size of the array returned by the getMKTargetNames() function which returns an array of target names.

getMKKey <morph_controller> <time>

Returns the morph key on the given controller at the specified time, yields undefined if there is no key at that time.

getMKKeyIndex <morph_controller> <time>

Returns the index of the key at the specified time, yields undefined if there is no key at that time.

NOTE:

When using the addnewkey() method to create a key for the Barycentric_Morph_Controller controller, the time component of the key value returned is usually not correct. Use the getMKKey() method to access the created key.

See also

Barycentric_Morph_Controller Keys

Controller Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Barycentric_Morph_Controller Keys

The morph key functions operate on MAXScript key values that are accessed on Barycentric morph controllers in the same way as keys on other keyable controllers. For Barycentric_Morph_Controller keys, the following properties and methods are accessible:

NOTE:

This class is not available in Autodesk VIZ.

Properties

<key>.time Time

Time value or number (interpreted as frames). Read-only.

<key>.selected Boolean

Specifies whether the key is selected. Read/write access.

Methods

getMKTime <morph_key>

Returns the given morph key’s time.

setMKTime <morph_key> <time>

Sets the time of the given morph key.

getMKWeight <morph_key> <target_index_integer>

Gets the weight as a percentage for the numbered target on the given morph key. Targets are numbered in order as seen in the target list in the morph key Track View dialog. This is the order in which the targets were added.

setMKWeight <morph_key> <target_index_integer> <pcnt_float> <keep100%_boolean>

Sets the percentage weight of the numbered target on the given morph key. The last argument is a boolean, if true adjusts other target weights so the maximum is 100%.

NOTE:

When using the addnewkey() method to create a key for the Barycentric_Morph_Controller controller, the time component of the key value returned is usually not correct. Use the getMKKey() method to access the created key.

EXAMPLE

sel1 = sphere radius:30 -- target 1

sel2 = sphere radius:50 -- target 2

createMorphObject sel1 -- create the morph object from sel1

mobj1= sel1.morph -- grab morph controller

addmorphtarget mobj1 sel2 3 -- add sel2 as target - creates key with

-- target weights of 0 and 100%

k=mobj1.keys[1] -- grab the key

setMKWeight k 1 100 true -- set target 1 to 100%, keep total 100%

addnewkey mobj1 50 -- create morph key at frame 50

k=getMKKey mobj1 50 -- grab the key

setMKWeight k 2 100 true -- set target 2 to 100%, keep total 100%

OUTPUT

$Sphere:Sphere01 @ [0.0,0.0,0.0] -- result line 1

$Sphere:Sphere02 @ [0.0,0.0,0.0] -- result line 2

$Editable_Mesh:Sphere01 @ [0.0,0.0,0.0] -- result line 3

Controller:Barycentric_Morph_Controller -- result line 4

2 -- result line 5

#Barycentric Morph Controller key(1 @ 0f) -- result line 7

1 -- result line 8

#Barycentric Morph Controller key(0 @ 50f) -- result line 9

#Barycentric Morph Controller key(2 @ 50f) -- result line 10

2

See also

Key Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Cubic_Morph_Controller : MorphController

Cubic_Morph_Controller - superclass: MorphController; super-superclass:MAXWrapper - classID: #(160575523, 0)

Value > MAXWrapper > Controllers > MorphController > Cubic_Morph_Controller

The Barycentric_Morph_Controller should be used instead of a Cubic_Morph_Controller controller.

Constructor

Cubic_Morph_Controller ...

NOTE:

This class are not available in Autodesk VIZ.

Properties

<Cubic_Morph_Controller>.keys MAXKeyArray

See also

MAXKeyArray Values

Cubic_Morph_Controller Keys

Controller Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Cubic_Morph_Controller Keys

Properties

For Cubic_Morph_Controller keys, the following properties are accessible:

<key>.time Time

Get the key time as time value or number (interpreted as frames). Read-only.

<key>.selected Boolean

Get/Set the selecred state of the key.

See also

Key Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Point3Controller : MAXWrapper

Value > MAXWrapper > Controllers > Point3Controller

Point3Controller is the superclass for all controllers that can be assigned to Point3 parameters. The following is a list of the core Point3Controller classes accessible in MAXScript:

AudioPoint3

Bezier_Color

Bezier_Point3

Color_RGB

Noise_Point3

Point3_Expression

Point3_List

Point3_Motion_Capture

Point3_Reactor

Point3_Script

Point3_XYZ

Slave_Point3

TCB_Point3

Point3_Layer


point3_list : Point3Controller

point3_list - superclass: Point3Controller; super-superclass:MAXWrapper - 1:1 - classID: #(1263210497, 0)

Value > MAXWrapper > Point3Controller > Point3_list

Constructors

point3_list ...

Point3List ...

Properties

<point3_list>.available Point3 default: [0,0,0] -- animatable; point3

Represents the Available sub-controller.

<point3_list>.average Boolean default: false -- boolean; Average_Weights

Controls the state of the "Average Weights" checkbox.

<point3_list>.weight ArrayParameter default: #(100.0) -- float array; SubAnim

Get/set the array of the weights for the List controller’s sub-controllers.

List Interfaces

Interface: list

Properties

.count : integer : Read

.active : index : Read|Write

Methods

<integer>getCount()

This method returns the number of items that appear in the List controllers list box.

<void>setActive <index>listIndex

This method allows you to sets the indexed item in the list active so its parameters appear in the motion panel, and any input is directed to the indexed sub controller.

<index>listIndex: The index of the item to set as the active item.

<integer>getActive()

This method returns the index of the currently active item.

<void>delete <index>listIndex

This method allows you to delete the indexed sub controller from the list.

<index>listIndex: The index of the item to delete from the list.

<void>cut <index>listIndex

This method allows you to cut the index sub controller from the list and stores it in the buffer to paste later.

<index>listIndex: The index of the item you wish to cut.

<void>paste <index>listIndex

This method allows you to paste the sub-controller from the buffer into the indexed slot in the list.

<index>listIndex: The index of the slot to paste into.

<string>getName <index>listIndex

This method allows you to paste the sub-controller from the buffer into the indexed slot in the list.

<index>listIndex: The index of the item for which to get the name.

<void>setName <index>listIndex <string>name

This method allows you to set the name of an indexed item.

<index>listIndex : The index of the item.

<string>name: The name to set it to.

See also Class IlistControl, in the SDK Help file accompanying this product.

See also

List Controllers

float_list : FloatController

position_list : PositionController

rotation_list : RotationController

scale_list : ScaleController

Controller Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Point3_Expression : Point3Controller

Float_Expression - superclass: FloatController; super-superclass:MAXWrapper - 0:0 - classID: #(8212, 0)

Value > MAXWrapper > Controllers > Point3Controller > Point3_Expression

The Point3_Expression controller has been rewritten and completely exposed to MAXScript via the IExprCtrl interface. In versions prior to 3ds Max 8, there were no properties or methods accessible for it.

Constructor

point3_expression ...

Point3_Expression interfaces:

Interface: IExprCtrl

See Expression Controllers for documentation of the methods exposed by the IExprCtrl Interface.


Point3Reactor - superclass: Point3Controller

Point3Reactor : Point3Controller

Point3Reactor - superclass: Point3Controller; super-superclass:MAXWrapper - 0:0 - classID: #(419957000, 996243513)

Value > MAXWrapper > Point3Controller > Point3Reactor

Constructor

Point3Reactor ...

Point3_Reactor ...

Point3Reactor interfaces:

Interface: reactions

Properties

.editStateMode : boolean : Read|Write

Get/set the edit state of the reactor controller.

.useCurve : boolean : Read|Write

Get/set whether the reactor controller uses the curve control.

.createMode : boolean : Read|Write

Enable/Disable the Create mode.

Methods

<boolean>reactTo <maxObject>object

Set the react-to object of the reactor controller. Returns true on success.

<boolean>create name:<string>

name default value: "scriptCreated"

Create a new reaction with the specified name. Returns true on success.

<boolean>delete <index>index

Delete the indexed reaction. Returns true on success.

<integer>getCount()

Returns the number of reactions.

<void>select <index>index

Select the indexed reaction.

<index>getSelected()

Returns the selected reaction’s index.

<boolean>setStateToCurrent <index>index

Sets the indexed reaction’s state to the current state. Returns true on success.

<boolean>setFloatState <index>index <float>state

Sets the state of the indexed reaction in a float reactor controller to the specified float value. Returns true on success.

<boolean>setVectorState <index>index <point3>state

Sets the state of the indexed reaction in a point3 reactor controller to the specified float value. Returns true on success.

<boolean>setRotationState <index>index <quat>state

Sets the state of the indexed reaction in a rotation reactor controller to the specified float value

<boolean>setValueToCurrent <index>index

Sets the value of the indexed reaction to the current value. Returns true on success.

<boolean>setValueAsFloat <index>index <float>value

Sets the value of the indexed reaction to the specified float value. Returns true on success.

<boolean>setValueAsVector <index>index <point3>value

Sets the value of the indexed reaction to the specified point3 value. Returns true on success.

<boolean>setValueAsQuat <index>index <quat>value

Sets the value of the indexed reaction to the specified quaternion value. Returns true on success.

<boolean>setInfluence <index>index <float>influence

Sets the influence of the indexed reaction to the specified float value. Returns true on success.

<boolean>setStrength <index>index <float>strength

Sets the strength of the indexed reaction to the specified float value. Returns true on success.

<boolean>setFalloff <index>index <float>influence

Sets the falloff of the indexed reaction to the specified float value. Returns true on success.

<void>setName <index>index <string>name

Sets the name of the indexed reaction to the specified string. Returns true on success.

<string>getName <index>index

Returns the name of the indexed reaction.

<float>getInfluence <index>index

Returns the influence of the indexed reaction.

<float>getStrength <index>index

Returns the strength of the indexed reaction.

<float>getFalloff <index>index

Returns the falloff of the indexed reaction.

<enum>getType()

getType enums: {#floatReaction|#positionalReaction|#rotationalReaction|#scaleReaction}

Returns the falloff of the indexed reaction.

<fpvalue>getState <index>index

Returns the state of the indexed reaction.

<fpvalue>getValue <index>index

Returns the value of the indexed reaction.

See also

Reactor controller

Reactor Controllers

FloatReactor : FloatController

PositionReactor : PositionController

Rotation_Reactor : RotationController

Scale_Reactor : ScaleController

Controller Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


SpringPoint3Controller - superclass: Point3Controller

SpringPoint3Controller : Point3Controller

SpringPoint3Controller - superclass: Point3Controller; super-superclass:MAXWrapper - 4:4 - classID: #(327754098, 1754751609)

Value > MAXWrapper > Controllers > Point3Controller > SpringPoint3Controller

Constructors

SpringPoint3Controller ...

Point3Spring ...

Note: This class is not available in Autodesk VIZ.

Properties:

<SpringPoint3Controller>.position Point3 default: [0,0,0] -- animatable; point3

<SpringPoint3Controller>.x_effect Float default: 100.0

These settings let you control the percentage of the effect on the individual world axes. Default=100. Range=0 to 200.

<SpringPoint3Controller>.y_effect Float default: 100.0

These settings let you control the percentage of the effect on the individual world axes. Default=100. Range=0 to 200.

<SpringPoint3Controller>.z_effect Float default: 100.0

These settings let you control the percentage of the effect on the individual world axes. Default=100. Range=0 to 200.See Also

SpringPoint3Controller Interfaces:

Interface: Spring

Methods

<float>getMass()

Returns the mass.

<void>setMass <float>mass

Sets the mass. The mass of the object to which the Spring controller is applied. Increasing the mass causes the "bouncing" spring motion to become more exaggerated.

<float>getDrag()

Returns the drag.

<void>setDrag <float>drag

Sets the drag. Acts as air friction on the spring motion. A low Drag setting results in a greater "bouncing" effect, while a high Drag results in subdued bouncing. Default=1. Range=0 to 10.

<float>getTension <index>springIndex

Gets the tension for the spring corresponding to the index.

<void>setTension <index>springIndex <float>tension

Sets the tension for the spring corresponding to the index. The "stiffness" of the virtual spring between the controlled object and the highlighted spring object(s).

<float>getDampening <index>springIndex

Gets the dampening for the spring corresponding to the index.

<void>setDampening <index>springIndex <float>dampening

Sets the dampening for the spring corresponding to the index. Acts as a multiplier of an internal factor that determines how quickly the object comes to rest. With the Self Influence spring, changing Dampening has the same effect as changing Drag. With other springs, Dampening affects only the movement caused by that spring. Internally, the dampening value is proportional to the tension, so as you increase the tension and make the solution more stiff, the dampening is increased to maintain system stability.

<boolean>addSpring <node>node

Adds the node to the spring list. Returns true if successful, false otherwise

<integer>getSpringCount()

Returns the number of springs in the spring system.

<void>removeSpringByIndex <index>springIndex

Removes the spring corresponding to the index.

<void>removeSpring <node>node

Removes the spring if the node is in the spring list.

See also

Spring Controller

SpringPositionController - superclass: PositionController

Flex : Modifier


Point3_Wire : Point3Controller

Value > MAXWrapper > Controllers > Point3Controller > Point3_Wire

Constructor

Class instances not creatable by MAXScript

Aliases

Point3_Wire

WirePoint3

Point3_Wire interfaces:

Interface: wireController

Properties

.numWires : integer : Read

This property returns the number of wires out of this controller (i.e. the number of dependent params).

.isMaster : boolean : Read

This property will return True if the wire is a master predicate, otherwise it will return False.

.isSlave : boolean : Read

This property will return True if the wire is a slave predicate, otherwise it will return False.

.isTwoWay : boolean : Read

This property will return True if the wire is a two-way predicate, otherwise it will return False.

.slaveAnimation : control : Read|Write

This property returns a pointer to the slave animation controller and allows you to set the slave animation controller.

Methods

<maxObject>getWireParent <index>index

This method returns a pointer to the i-th dependent parameter parent.

<index>index: The index you wish to retrieve.

<index>getWireSubnum <index>index

This method returns the i-th dependent parameter subanim num in the animatable.

<index>index: The index of the subanim.

<control>getCoController <index>index

This method returns a pointer to the i-th CoController.

<index>index: The index of the controller.

<string>getExprText <index>index

This method returns the expression string of the i-th wire parameter.

<index>index: The index of the parameter.

<void>setExprText <index>index <string>text

This method allows you to set the expression string of the i-th wire parameter.

<index>index : The index of the parameter

<string>text: The expression you wish to set.

See also

Float_Wire : FloatController

Position_Wire : PositionController

Rotation_Wire : RotationController

Scale_Wire : ScaleController

Parameter Wiring

Interface: paramWire


Point4Controller : MAXWrapper

Point4Controller is the superclass for all controllers that can be assigned to Point4 parameters. The following is a list of the core Point4Controller classes accessible in MAXScript:

bezier_point4

bezier_rgba

Color_RGBA

point4_list

point4_script

Point4_Wire

Point4_XYZW

tcb_point4

Missing_Point4_Control

See also

Point3Controller : MAXWrapper


bezier_point4 : Point4Controller

bezier_point4 - superclass: Point4Controller; super-superclass:MAXWrapper - 0:0 - classID: #(8210, 0)

Point4 Bezier Controller.

Constructor:

bezier_point4...

Properties:

No properties or methods exposed.

See also

Point4Controller : MAXWrapper


bezier_rgba : Point4Controller

bezier_rgba - superclass: Point4Controller; super-superclass:MAXWrapper - 0:0 - classID: #(8211, 0)

Point4 Bezier_RGBA Controller.

Constructor:

bezier_rgba...

Properties:

No properties or methods exposed.

See also

Point4Controller : MAXWrapper


Color_RGBA : Point4Controller

Color_RGBA - superclass: Point4Controller; super-superclass:MAXWrapper - 4:4 - classID: #(294616065, -17947765)

Point4 Color_RGBA Controller.

Constructor:

Color_RGBA...

Properties:

<Color_RGBA>.r Float default: 0.0 -- animatable; float

<Color_RGBA>.g Float default: 0.0 -- animatable; float

<Color_RGBA>.b Float default: 0.0 -- animatable; float

<Color_RGBA>.a Float default: 1.0 -- animatable; float

See also

Point4Controller : MAXWrapper


point4_list : Point4Controller

point4_list - superclass: Point4Controller; super-superclass:MAXWrapper - 3:1 - classID: #(1263210501, 0)

Constructors:

point4_list...

Point4List...

Properties:

<point4_list>.weight ArrayParameter default: #() -- float array

<point4_list>.average BooleanClass default: false -- boolean; Average_Weights

<point4_list>.available Point4 default: [0,0,0,0] -- animatable; point4

point4_list interfaces:

Interface: list

Properties:

.count : integer : Read

.active : index : Read|Write

Methods:

<integer>getCount()

Returns the number of sub-controllers in the List controller.

<void>setActive <index>listIndex

Sets the indexed sub-controller as the active controller.

<integer>getActive()

Returns the index of the active sub-controller.

<void>delete <index>listIndex

Deletes the indexed sub-controller.

<void>cut <index>listIndex

Cuts the indexed sub-controller into the controller clipboard.

<void>paste <index>listIndex

Pasters the clipboard at the specified indexed position.

<string>getName <index>listIndex

Returns the name of the indexed sub-controller.

<void>setName <index>listIndex <string>name

Sets the name of the indexed sub-controller to the specified string.

See also

Point4Controller : MAXWrapper

point3_list : Point3Controller


point4_script : Point4Controller

point4_script - superclass: Point4Controller; super-superclass:MAXWrapper - 1:0 - classID: #(1184311408, 796853711)

Point4 Script Controller.

Constructor:

point4_script...

Properties:

<point4_script>.script String default: "[0, 0, 0, 0]" -- string

Get/set the script source code.

See also

Point4Controller : MAXWrapper


Point4_Wire : Point4Controller

Point4 Wire Controller. Constructed by the MAXScript Wiring methods.

Class instances not creatable by MAXScript

Alias:

WirePoint4

Point4_Wire interfaces:

Interface: wireController

Properties:

.numWires : integer : Read

.isMaster : boolean : Read

.isSlave : boolean : Read

.isTwoWay : boolean : Read

.slaveAnimation : control : Read|Write

Methods:

<maxObject>getWireParent <index>index

<index>getWireSubnum <index>index

<control>getCoController <index>index

<string>getExprText <index>index

<void>setExprText <index>index <string>text

See also

Point4Controller : MAXWrapper

Point3_Wire : Point3Controller


Point4_XYZW : Point4Controller

Point4_XYZW - superclass: Point4Controller; super-superclass:MAXWrapper - 4:4 - classID: #(294616578, -17947764)

Point4 XYZW controller.

Constructor:

Point4_XYZW...

Properties:

<Point4_XYZW>.x Float default: 0.0 -- animatable; float

<Point4_XYZW>.y Float default: 0.0 -- animatable; float

<Point4_XYZW>.z Float default: 0.0 -- animatable; float

<Point4_XYZW>.w Float default: 0.0 -- animatable; float

See also

Point4Controller : MAXWrapper


tcb_point4 : Point4Controller

tcb_point4 - superclass: Point4Controller; super-superclass:MAXWrapper - 0:0 - classID: #(4465430, 0)

New Point4 TCB controller.

Constructor:

tcb_point4...

Properties:

No properties or methods exposed.

See also

Point4Controller : MAXWrapper


Missing_Point4_Control : Point4Controller

Stand-in class for missing Point4 controllers.

Class instances not creatable by MAXScript

See also

Point4Controller : MAXWrapper

Missing Object Classes


PositionController : MAXWrapper

Value > MAXWrapper > Controllers > PositionController

PositionController is the superclass for all controllers that can be assigned to position parameters. The following is a list of the core Point3Controller classes accessible in MAXScript:

Attachment

Audioposition

Bezier_Position

Dynamic_Position_Controller

Linear_Position

Noise_Position

Path

Position_Expression

Position_List

Position_Motion_Capture

Position_Reactor

Position_Script

Position_XYZ

Surfaceposition

TCB_Position

Position_Layer


Attachment : PositionController

Attachment - superclass: PositionController; super-superclass:MAXWrapper - classID: #(-1155013103, -1490074649)

Value > MAXWrapper > Controllers > PositionController > Attachment

Constructor

attachment ...

Properties

<attachment>.keys : MAXKeyArray

Returns the keys of the controller.

<attachment>.node : Node

Get/set the node the controller is attaching to.

<attachment>.align : Boolean default: true

Fixes the orientation of the attached object to the face where it’s assigned. When this is turned off, the orientation of the attached object is not affected by the orientation of the face on the target object.

<attachment>.manupdate : Boolean default: false

Enables the update button.

Methods

AttachCtrl.getKey <attachment> <index_integer>

Returns the indexed key as a MAXAKey value (NOT MAXKey - see notes below).

AttachCtrl.addNewKey <attachment> <time>

Returns the indexed key as a MAXAKey value (NOT MAXKey - see notes below)

AttachCtrl.update <attachment>

Causes the controller to update if the manual update property is turned on for the attachment controller. This method was previously broken but was fixed in 3ds Max 8.

NOTES:

Accessing a key of an attachment controller by indexing into the .keys property will return a MAXKey value. The only properties available for a key accessed in this manner are the .time and .selected properties.

Instead, you can use the AttachCtrl.getKey() method which returns a key of class MAXAKey. This class provides access to the attachment controller key specific properties. See Attachment Controller Keys for details and examples.

All the common key functions like deleteKey, selectKeys, movekeys, etc. can be used with Attachment controllers.

See also

MAXKeyArray Values

Attachment Controller Keys

Controller Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Path : PositionController

Value > MAXWrapper > Controllers > PositionController > Path

NOTE:

The Path controller has been replaced by the Path_Constraint PositionController in 3ds Max 4 and higher. The description below applies to versions prior to 3ds Max 4 and is thus obsolete and provided for historical and backwards compatibility reference only.

Path_Constraint : PositionController

Constructor

path ...

Properties

<path>.allowUpsideDown Boolean default: false -- alias: Allow_Upside_Down

Turn on to avoid the situation in which an object flips when going around a vertically oriented path.

<path>.axis Integer default: 0

axis = 0 - X; 1 - Y; 2 - Z

<path>.axisFlip Boolean default: false -- alias: Axis_Flip

Flips the direction of the object on the path 180 degrees.

<path>.bank Boolean default: false

Allows the object to bank (roll) as it negotiates the curves of the spline.

<path>.bankAmount Float default: 0.5 -- animatable, alias: Bank_Amount

The amount of the banking to one side or the other, depending on whether the value is positive or negative.

<path>.constantVel Boolean default: false -- alias: Constant_Velocity

Provides a constant velocity along the path. When off, the velocity of the object along the path varies depending on the distance between the vertices on the path.

<path>.follow Boolean default: false

Aligns the object to the trajectory as it follows the contour.

<path>.loop   Boolean default: false   -- boolean

When turned on, the path controlled object will loop back to the start point of the path, after the end point is reached.

<path>.path Node default: undefined—node; Path_Constraint

The spline in the scene that you want the selected object to follow.

<path>.pathlist   Array default: #()  -- node array; SubAnim

The object will follow the resultant path which is the weighted average of the paths in this array. The weight for each path is found in the corresponding entry in <path>.weightlist.

<path>.percent Float default: 0.0 -- animatable, percentage

The percent that the object is positioned along the path.

<path>.relative Boolean default: false -- booleanExample

When turned on, the path controlled object will maintain the position offset between its initial position and the start point of the path.

<path>.smoothness Float default: 0.5 -- animatable

Controls how rapidly the roll angle changes as the object moves through bends in the trajectory. Smaller values will make the object more responsive to subtle changes in the curve, while larger values smooth out jerking. The default value is a good value for general damping along the curve. Values below 2 tend to make the action jerky, but values around 3 can be very useful for simulating a certain degree of realistic instability.

<path>.weightlist Array default: #()   -- float array; Weight; SubAnim

Array containing weights corresponding to entries in the <path>.pathlist array. The object will follow the resultant path which is the weighted average of the selected paths.

The following script shows an example of assigning and animating a path controller.

EXAMPLE

thePath=circle radius:50 -- create shape node for path

theObj=cone radius1:6 radius2:0 height:15 -- create object to travel on path

theObj.pos.controller=path follow:true -- assign path controller to object

PosCont=theObj.pos.controller -- grab the path controller

PosCont.path=thePath -- set path to shape node

PosCont.axis=2 -- point local Z axis along path

animate on -- create keys at…

(

at time 30 PosCont.percent=25 -- frame 30 - 25% along path

at time 100 PosCont.percent=95 -- frame 100 - 95% along path

)

See also

Controller Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


SpringPositionController - superclass: PositionController

SpringPositionController : PositionController

SpringPositionController - superclass: PositionController; super-superclass:MAXWrapper - 8:1 - classID: #(2036956458, -222780984)

Value > MAXWrapper > Controllers > PositionController > SpringPositionController

Constructors

SpringPositionController ...

PositionSpring ...

Note: This class is not available in Autodesk VIZ.

Properties:

<SpringPositionController>.effectHow Integer default: 1 -- radio button number; Abs_Rel

<SpringPositionController>.forceNode ArrayParameter default: #() -- node array; Force_Nodes; SubAnim

<SpringPositionController>.steps Integer default: 2 -- integer

<SpringPositionController>.x_effect Float default: 100.0 -- animatable; float

These settings let you control the percentage of the effect on the individual world axes. Default=100. Range=0 to 200.

<SpringPositionController>.y_effect Float default: 100.0 -- animatable; float

These settings let you control the percentage of the effect on the individual world axes. Default=100. Range=0 to 200.

<SpringPositionController>.z_effect Float default: 100.0 -- animatable; float

These settings let you control the percentage of the effect on the individual world axes. Default=100. Range=0 to 200.

<SpringPositionController>.start Integer default: 0 -- integer; Start_Frame

<SpringPositionController>.position Point3 default: [0,0,0] -- animatable; point3

SpringPoint3Controller Interfaces:

Interface: Spring

Methods

<float>getMass()

Returns the mass.

<void>setMass <float>mass

Sets the mass. The mass of the object to which the Spring controller is applied. Increasing the mass causes the "bouncing" spring motion to become more exaggerated.

<float>getDrag()

Returns the drag.

<void>setDrag <float>drag

Sets the drag. Acts as air friction on the spring motion. A low Drag setting results in a greater "bouncing" effect, while a high Drag results in subdued bouncing. Default=1. Range=0 to 10.

<float>getTension <index>springIndex

Gets the tension for the spring corresponding to the index.

<void>setTension <index>springIndex <float>tension

Sets the tension for the spring corresponding to the index. The "stiffness" of the virtual spring between the controlled object and the highlighted spring object(s).

<float>getDampening <index>springIndex

Gets the dampening for the spring corresponding to the index.

<void>setDampening <index>springIndex <float>dampening

Sets the dampening for the spring corresponding to the index. Acts as a multiplier of an internal factor that determines how quickly the object comes to rest. With the Self Influence spring, changing Dampening has the same effect as changing Drag. With other springs, Dampening affects only the movement caused by that spring. Internally, the dampening value is proportional to the tension, so as you increase the tension and make the solution more stiff, the dampening is increased to maintain system stability.

<boolean>addSpring <node>node

Adds the node to the spring list. Returns true if successful, false otherwise

<integer>getSpringCount()

Returns the number of springs in the spring system.

<void>removeSpringByIndex <index>springIndex

Removes the spring corresponding to the index.

<void>removeSpring <node>node

Removes the spring if the node is in the spring list.

See also

Spring Controller

SpringPoint3Controller - superclass: Point3Controller

Flex : Modifier


SurfacePositionController : PositionController

Surface_position : PositionController

Surface_position - superclass: PositionController; super-superclass:MAXWrapper - 5:2 - classID: #(-399294447, -1363988280)

Value > MAXWrapper > Controllers > PositionController > Surface_position

Constructor

Surface_position ...

Properties

<Surface_position>.surface Node default: undefined

Get/Set the NURBS surface to constrain the position to.

<Surface_position>.u Float default: 0.0 -- animatable

Get/Set the U position parameter.

<Surface_position>.v Float default: 0.0 -- animatable

Get/Set the V position parameter.

<Surface_position>.align Integer default: 1

Get/Set the alignment option. Possible values are:

1 - No Alignment

2 - Align to U

3 - Align to V

<Surface_position>.flip Boolean default: false

Get/Set the flip option state.

See also

Controller Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


position_list : PositionController

position_list - superclass: PositionController; super-superclass:MAXWrapper - 1:1 - classID: #(1263210498, 0)

Value > MAXWrapper > PositionController > position_list

Constructors

position_list ...

PositionList ...

Properties

<position_list>.available Point3 default: [0,0,0] -- animatable; point3

Represents the Available sub-controller.

<position_list>.average Boolean default: false -- boolean; Average_Weights

Controls the state of the "Average Weights" checkbox.

<position_list>.weight ArrayParameter default: #(1.0) -- float array; SubAnim

Get/set the array of the weights for the List controller’s sub-controllers.

List Interfaces

Interface: list

Properties

.count : integer : Read

.active : index : Read|Write

Methods

<integer>getCount()

This method returns the number of items that appear in the List controllers list box.

<void>setActive <index>listIndex

This method allows you to sets the indexed item in the list active so its parameters appear in the motion panel, and any input is directed to the indexed sub controller.

<index>listIndex: The index of the item to set as the active item.

<integer>getActive()

This method returns the index of the currently active item.

<void>delete <index>listIndex

This method allows you to delete the indexed sub controller from the list.

<index>listIndex: The index of the item to delete from the list.

<void>cut <index>listIndex

This method allows you to cut the index sub controller from the list and stores it in the buffer to paste later.

<index>listIndex: The index of the item you wish to cut.

<void>paste <index>listIndex

This method allows you to paste the sub-controller from the buffer into the indexed slot in the list.

<index>listIndex: The index of the slot to paste into.

<string>getName <index>listIndex

This method allows you to paste the sub-controller from the buffer into the indexed slot in the list.

<index>listIndex: The index of the item for which to get the name.

<void>setName <index>listIndex <string>name

This method allows you to set the name of an indexed item.

<index>listIndex : The index of the item.

<string>name: The name to set it to.

See also Class IlistControl, in the SDK Help file accompanying this product.

See also

List Controllers

float_list : FloatController

point3_list : Point3Controller

rotation_list : RotationController

scale_list : ScaleController

Controller Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Position_Expression : PositionController

Position_Expression - superclass: PositionController; super-superclass:MAXWrapper - 0:0 - classID: #(8211, 0)

Value > MAXWrapper > Controllers > PositionController > Position_Expression

The Position_Expression controller has been rewritten and completely exposed to MAXScript via the IExprCtrl interface. In versions prior to 3ds Max 8, there were no properties or methods accessible for it.

Constructor

position_expression ...

Position_Expression interfaces:

Interface: IExprCtrl

See Expression Controllers for documentation of the methods exposed by the IExprCtrl Interface.


PositionReactor - superclass: PositionController

PositionReactor : PositionController

PositionReactor - superclass: PositionController; super-superclass:MAXWrapper - 0:0 - classID: #(2059782884, -1874176333)

Value > MAXWrapper > PositionController > PositionReactor

Constructors

PositionReactor ...

Position_Reactor ...

PositionReactor interfaces:

Interface: reactions

Properties

.editStateMode : boolean : Read|Write

Get/set the edit state of the reactor controller.

.useCurve : boolean : Read|Write

Get/set whether the reactor controller uses the curve control.

.createMode : boolean : Read|Write

Enable/Disable the Create mode.

Methods

<boolean>reactTo <maxObject>object

Set the react-to object of the reactor controller. Returns true on success.

<boolean>create name:<string>

name default value: "scriptCreated"

Create a new reaction with the specified name. Returns true on success.

<boolean>delete <index>index

Delete the indexed reaction. Returns true on success.

<integer>getCount()

Returns the number of reactions.

<void>select <index>index

Select the indexed reaction.

<index>getSelected()

Returns the selected reaction’s index.

<boolean>setStateToCurrent <index>index

Sets the indexed reaction’s state to the current state. Returns true on success.

<boolean>setFloatState <index>index <float>state

Sets the state of the indexed reaction in a float reactor controller to the specified float value. Returns true on success.

<boolean>setVectorState <index>index <point3>state

Sets the state of the indexed reaction in a point3 reactor controller to the specified float value. Returns true on success.

<boolean>setRotationState <index>index <quat>state

Sets the state of the indexed reaction in a rotation reactor controller to the specified float value

<boolean>setValueToCurrent <index>index

Sets the value of the indexed reaction to the current value. Returns true on success.

<boolean>setValueAsFloat <index>index <float>value

Sets the value of the indexed reaction to the specified float value. Returns true on success.

<boolean>setValueAsVector <index>index <point3>value

Sets the value of the indexed reaction to the specified point3 value. Returns true on success.

<boolean>setValueAsQuat <index>index <quat>value

Sets the value of the indexed reaction to the specified quaternion value. Returns true on success.

<boolean>setInfluence <index>index <float>influence

Sets the influence of the indexed reaction to the specified float value. Returns true on success.

<boolean>setStrength <index>index <float>strength

Sets the strength of the indexed reaction to the specified float value. Returns true on success.

<boolean>setFalloff <index>index <float>influence

Sets the falloff of the indexed reaction to the specified float value. Returns true on success.

<void>setName <index>index <string>name

Sets the name of the indexed reaction to the specified string. Returns true on success.

<string>getName <index>index

Returns the name of the indexed reaction.

<float>getInfluence <index>index

Returns the influence of the indexed reaction.

<float>getStrength <index>index

Returns the strength of the indexed reaction.

<float>getFalloff <index>index

Returns the falloff of the indexed reaction.

<enum>getType()

getType enums: {#floatReaction|#positionalReaction|#rotationalReaction|#scaleReaction}

Returns the falloff of the indexed reaction.

<fpvalue>getState <index>index

Returns the state of the indexed reaction.

<fpvalue>getValue <index>index

Returns the value of the indexed reaction.

See also

Reactor controller

Reactor Controllers

FloatReactor : FloatController

Point3Reactor : Point3Controller

Rotation_Reactor : RotationController

Scale_Reactor : ScaleController

Controller Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Position_Wire : PositionController

Value > MAXWrapper > Controllers > PositionController > Position_Wire

Constructor

Class instances not creatable by MAXScript

Aliases

Position_Wire

WirePosition

Position_Wire interfaces:

Interface: wireController

Properties

.numWires : integer : Read

This property returns the number of wires out of this controller (i.e. the number of dependent params).

.isMaster : boolean : Read

This property will return True if the wire is a master predicate, otherwise it will return False.

.isSlave : boolean : Read

This property will return True if the wire is a slave predicate, otherwise it will return False.

.isTwoWay : boolean : Read

This property will return True if the wire is a two-way predicate, otherwise it will return False.

.slaveAnimation : control : Read|Write

This property returns a pointer to the slave animation controller and allows you to set the slave animation controller.

Methods

<maxObject>getWireParent <index>index

This method returns a pointer to the i-th dependent parameter parent.

<index>index: The index you wish to retrieve.

<index>getWireSubnum <index>index

This method returns the i-th dependent parameter subanim num in the animatable.

<index>index: The index of the subanim.

<control>getCoController <index>index

This method returns a pointer to the i-th CoController.

<index>index: The index of the controller.

<string>getExprText <index>index

This method returns the expression string of the i-th wire parameter.

<index>index: The index of the parameter.

<void>setExprText <index>index <string>text

This method allows you to set the expression string of the i-th wire parameter.

<index>index : The index of the parameter

<string>text: The expression you wish to set.

See also

Float_Wire : FloatController

Point3_Wire : Point3Controller

Rotation_Wire : RotationController

Scale_Wire : ScaleController

Parameter Wiring

Interface: paramWire


Reactor Controller

The Reactor controller is a procedural controller that reacts to changes in any other controller within the software. Reactor comes in five different forms: Position Reactor, Rotation Reactor, Point3 Reactor, Scale Reactor, and Float Reactor. Any animatable parameter in the software can react to changes in any other animatable parameter. Reactor is not based on time, but is based on other variables in your scene.

EXAMPLE

-- Setup a scene

ball = sphere name:"ball" pos:[-40,0,50] radius:10

ball.pos.controller = position_XYZ()

-- create some keys

key = addNewKey ball.pos.Zposition.controller 0

key.outTangentType = #slow

key.value = 50

key = addNewKey ball.pos.Xposition.controller 0

key.value = -40

key = addNewKey ball.pos.Zposition.controller 25

key.InTangentType = #fast

key.outTangentType = #fast

key.value = 4

key = addNewKey ball.pos.Xposition.controller 25

key.value = -10

key = addNewKey ball.pos.Zposition.controller 50

key.InTangentType = #slow

key.value = 50

key = addNewKey ball.pos.Xposition.controller 50

key.value = 20

ball.showtrajectory = true

-- assign a reactor controller to the scale of the ball

reactorCtrl = Scale_Reactor()

ball.scale.controller = reactorCtrl

-- Pick the react to object, and create reactions

reactorCtrl.reactions.reactTo ball.pos.ZPosition.controller 0

reactorCtrl.reactions.setName 0 "UnSquashed"

reactorCtrl.reactions.setVectorState 0 [1,1,1]

reactorCtrl.reactions.create "squashed" 25

reactorCtrl.reactions.setVectorState 1 [2.5,2.5,.4]

reactorCtrl.reactions.setValueAsFloat 0 10

reactorCtrl.reactions.setInfluence 0 6

reactorCtrl.reactions.setInfluence 1 5.5

reactorCtrl.reactions.setStrength 1 1.5

reactorCtrl.reactions.setFalloff 0 1.75

ss = StringStream ""

reactorCtrl.reactions.getType()

ct = reactorCtrl.reactions.getCount()

format "Reactor Statistics: \n------------------------------\n \n" to:ss

format "Count : %\n" ct to:ss

format "\n" to:ss

for i = 0 to ct-1 do

(

format "Reaction #: % \n------------------------------------------------

Name   : %

State  : %

Value  : %

Strength  : %

Influence   : %

Falloff  : % \n\n" (i) (reactorCtrl.reactions.getName i)

(getReactionState reactorCtrl (i+1)) (getReactionValue reactorCtrl (i+1))

(reactorCtrl.reactions.getStrength i) (reactorCtrl.reactions.getInfluence i )

(reactorCtrl.reactions.getFalloff i ) to:ss

)

print ss

See also

Reactor Controllers


Reactor Controllers

float_Reactor : floatController
point3_Reactor : point3Controller
position_Reactor : positionController
rotation_Reactor : rotationController
scale_Reactor : scaleController

Value > MAXWrapper > Controllers > Reactor Controllers

Constructor

float_Reactor ...

point3_Reactor ...

position_Reactor ...

rotation_Reactor ...

scale_Reactor ...

Methods

createReaction <reactor_controller>

Creates a new reaction for the specified reactor controller.

deleteReaction <reactor_controller> <index_integer>

Deletes the specified reaction. <index_integer> is the reaction you want to delete. The order of reactions is the order in which they are created.

reactTo <reactor_controller> ( <controller> | <node> )

Sets the controller that the reactor controller reacts to. You can either specify either a controller you want to react to or a node whose world position to react to.

getReactionCount <reactor_controller>

Returns the number of reactions for the specified reactor controller.

selectReaction <reactor_controller> <index_integer>

Selects the specified reaction. <index_integer> is the reaction you want to select. The order of reactions is the order in which they are created.

getSelectedReactionNum <reactor_controller>

Returns the number of the selected reaction.

getReactionFalloff <reactor_controller> <index_integer>

Returns the specified reaction’s falloff. <index_integer> is the reaction you want to get the falloff from. The order of reactions is the order in which they are created, and the order in which the reactions are listed in the Reactor Parameters dialog.

setReactionFalloff <reactor_controller> <index_integer> <float>

Sets the specified reaction’s falloff to the specified value. <index_integer> is the reaction you want to set the falloff for. The order of reactions is the order in which they are created, and the order in which the reactions are listed in the Reactor Parameters dialog.

getReactionInfluence <reactor_controller> <index_integer>

Returns the specified reaction’s influence. <index_integer> is the reaction you want to get the influence from. The order of reactions is the order in which they are created.

setReactionInfluence <reactor_controller> <index_integer> <float>

Sets the specified reaction’s influence to the specified value. <index_integer> is the reaction you want to set the influence for. The order of reactions is the order in which they are created.

getReactionStrength <reactor_controller> <index_integer>

Returns the specified reaction’s strength. <index_integer> is the reaction you want to get the strength from. The order of reactions is the order in which they are created.

setReactionStrength <reactor_controller> <index_integer> <float>

Sets the specified reaction’s strength to the specified value. <index_integer> is the reaction you want to set the strength for. The order of reactions is the order in which they are created.

getReactionState <reactor_controller> <index_integer>

Returns the specified reaction’s state. The value type returned matches the reactor controller type. <index_integer> is the reaction you want to get the state from. The order of reactions is the order in which they are created.

setReactionState <reactor_controller> <index_integer> <value>

Sets the specified reaction’s state to the specified value. <index_integer> is the reaction you want to set the state for. The order of reactions is the order in which they are created. The <value> type must match the reactor controller type.

getReactionValue <reactor_controller> <index_integer>

Returns the specified reaction’s value. The return value type is the same as the controller type being reacted to. <index_integer> is the reaction you want to get the value from. The order of reactions is the order in which they are created.

setReactionValue <reactor_controller> <index_integer> <value>

Sets the specified reaction’s value to the specified value. <index_integer> is the reaction you want to set the value for. The order of reactions is the order in which they are created. The <value> type must match the controller type being reacted to.

setReactionName <reactor_controller> <index_integer> <string>

Sets the name of the specified reaction. <index_integer> is the reaction you want to set the name for. The order of reactions is the order in which they are created.

getReactionName <reactor_controller> <which>

Returns the specified reaction’s name. <index_integer> is the reaction you want to get the name of. The order of reactions is the order in which they are created.

EXAMPLE

-- Setup a scene

b1 = box name:"box01" pos:[-32.5492,-21.2796,0] -- create two boxes

b2 = box name:"box02" pos:[51.3844,-17.2801,0]

animate on at time 100 b1.pos = [-48.2522,167.132,0] -- animate position of one box

--

-- Assign a reactor, pick the react to object, and create reactions

cont = b2.pos.controller = position_Reactor()

--

-- you can either react to a controller

reactTo cont b1.pos.controller

-- or a node (the World Space position of the box)

-- reactTo cont b1

--

slidertime = 100

createReaction cont

slidertime = 50

createReaction cont

deleteReaction cont 3

--

-- Set the reaction parameters

setReactionState cont 2 [65.8385,174.579,0]

selectReaction cont 1

setReactionInfluence cont 1 100

setReactionStrength cont 1 1.2

setReactionFalloff cont 1 1.0

setReactionValue cont 1 [-40.5492,-20.0,0]

setReactionName cont 1 "My Reaction"

--

-- get the reaction parameters

getReactionInfluence cont 1

getReactionStrength cont 1

getReactionFalloff cont 1

getReactionState cont 1

getReactionValue cont 1

getSelectedReactionNum cont

getReactionCount cont

getReactionName cont 1

See also

Reactor controller

FloatReactor : FloatController

Point3Reactor : Point3Controller

PositionReactor : PositionController

Rotation_Reactor : RotationController

Scale_Reactor : ScaleController

Controller Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


RotationController : MAXWrapper

Value > MAXWrapper > Controllers > RotationController

RotationController is the superclass for all controllers that can be assigned to rotation parameters. The following is a list of the core RotationController classes accessible in MAXScript:

AudioRotation

Bezier_Rotation

Dynamics_Rotation_Controller

Euler_XYZ

Linear_Rotation

Local_Euler_XYZ

Noise_Rotation

Rotation_List

Rotation_Motion_Capture

Rotation_Reactor

Rotation_Script

SlaveRotation

TCB_Rotation

Rotation_Layer


Additive_Euler_XYZ - superclass: RotationController

Additive_Euler_XYZ : RotationController

Additive_Euler_XYZ - superclass: RotationController; super-superclass:MAXWrapper - 3:3 - classID: #(8226, 0)

Properties

<Additive_Euler_XYZ>.additive_x_rotation Float default: 0.0 -- animatable; float

<Additive_Euler_XYZ>.additive_y_rotation Float default: 0.0 -- animatable; float

<Additive_Euler_XYZ>.additive_z_rotation Float default: 0.0 -- animatable; float


rotation_list : RotationController

rotation_list - superclass: RotationController; super-superclass:MAXWrapper - 1:1 - classID: #(1263210499, 0)

Value > MAXWrapper > RotationController > rotation_list

Constructors

rotation_list ...

RotationList ...

Properties

<rotation_list>.available Quat default: (quat 0 0 0 1) -- animatable; quat

Represents the Available sub-controller.

<rotation_list>.average Boolean default: false -- boolean; Average_Weights

Controls the state of the "Average Weights" checkbox.

<rotation_list>.weight ArrayParameter default: #(1.0) -- float array; SubAnim

Get/set the array of the weights for the List controller’s sub-controllers.

List Interfaces

Interface: list

Properties

.count : integer : Read

.active : index : Read|Write

Methods

<integer>getCount()

This method returns the number of items that appear in the List controllers list box.

<void>setActive <index>listIndex

This method allows you to sets the indexed item in the list active so its parameters appear in the motion panel, and any input is directed to the indexed sub controller.

<index>listIndex: The index of the item to set as the active item.

<integer>getActive()

This method returns the index of the currently active item.

<void>delete <index>listIndex

This method allows you to delete the indexed sub controller from the list.

<index>listIndex: The index of the item to delete from the list.

<void>cut <index>listIndex

This method allows you to cut the index sub controller from the list and stores it in the buffer to paste later.

<index>listIndex: The index of the item you wish to cut.

<void>paste <index>listIndex

This method allows you to paste the sub-controller from the buffer into the indexed slot in the list.

<index>listIndex: The index of the slot to paste into.

<string>getName <index>listIndex

This method allows you to paste the sub-controller from the buffer into the indexed slot in the list.

<index>listIndex: The index of the item for which to get the name.

<void>setName <index>listIndex <string>name

This method allows you to set the name of an indexed item.

<index>listIndex : The index of the item.

<string>name: The name to set it to.

See also Class IlistControl, in the SDK Help file accompanying this product.

See also

List Controllers

float_list : FloatController

point3_list : Point3Controller

position_list : PositionController

scale_list : ScaleController

Controller Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Rotation_Reactor : RotationController

Rotation_Reactor - superclass: RotationController; super-superclass:MAXWrapper - 0:0 - classID: #(713503979, 1475640742)

Value > MAXWrapper > RotationController > Rotation_Reactor

Constructor

Rotation_Reactor ...

RotationReactor ...

RotationReactor interfaces:

Interface: reactions

Properties

.editStateMode : boolean : Read|Write

Get/set the edit state of the reactor controller.

.useCurve : boolean : Read|Write

Get/set whether the reactor controller uses the curve control.

.createMode : boolean : Read|Write

Enable/Disable the Create mode.

Methods

<boolean>reactTo <maxObject>object

Set the react-to object of the reactor controller. Returns true on success.

<boolean>create name:<string>

name default value: "scriptCreated"

Create a new reaction with the specified name. Returns true on success.

<boolean>delete <index>index

Delete the indexed reaction. Returns true on success.

<integer>getCount()

Returns the number of reactions.

<void>select <index>index

Select the indexed reaction.

<index>getSelected()

Returns the selected reaction’s index.

<boolean>setStateToCurrent <index>index

Sets the indexed reaction’s state to the current state. Returns true on success.

<boolean>setFloatState <index>index <float>state

Sets the state of the indexed reaction in a float reactor controller to the specified float value. Returns true on success.

<boolean>setVectorState <index>index <point3>state

Sets the state of the indexed reaction in a point3 reactor controller to the specified float value. Returns true on success.

<boolean>setRotationState <index>index <quat>state

Sets the state of the indexed reaction in a rotation reactor controller to the specified float value

<boolean>setValueToCurrent <index>index

Sets the value of the indexed reaction to the current value. Returns true on success.

<boolean>setValueAsFloat <index>index <float>value

Sets the value of the indexed reaction to the specified float value. Returns true on success.

<boolean>setValueAsVector <index>index <point3>value

Sets the value of the indexed reaction to the specified point3 value. Returns true on success.

<boolean>setValueAsQuat <index>index <quat>value

Sets the value of the indexed reaction to the specified quaternion value. Returns true on success.

<boolean>setInfluence <index>index <float>influence

Sets the influence of the indexed reaction to the specified float value. Returns true on success.

<boolean>setStrength <index>index <float>strength

Sets the strength of the indexed reaction to the specified float value. Returns true on success.

<boolean>setFalloff <index>index <float>influence

Sets the falloff of the indexed reaction to the specified float value. Returns true on success.

<void>setName <index>index <string>name

Sets the name of the indexed reaction to the specified string. Returns true on success.

<string>getName <index>index

Returns the name of the indexed reaction.

<float>getInfluence <index>index

Returns the influence of the indexed reaction.

<float>getStrength <index>index

Returns the strength of the indexed reaction.

<float>getFalloff <index>index

Returns the falloff of the indexed reaction.

<enum>getType()

getType enums: {#floatReaction|#positionalReaction|#rotationalReaction|#scaleReaction}

Returns the falloff of the indexed reaction.

<fpvalue>getState <index>index

Returns the state of the indexed reaction.

<fpvalue>getValue <index>index

Returns the value of the indexed reaction.

See also

Reactor controller

Reactor Controllers

FloatReactor : FloatController

Point3Reactor : Point3Controller

PositionReactor : PositionController

Scale_Reactor : ScaleController

Controller Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Rotation_Wire : RotationController

Value > MAXWrapper > Controllers > RotationConroller > Rotation_Wire

Constructor

Class instances not creatable by MAXScript

Aliases

Rotation_Wire

WireRotation

Rotation_Wire interfaces:

Interface: wireController

Properties

.numWires : integer : Read

This property returns the number of wires out of this controller (i.e. the number of dependent params).

.isMaster : boolean : Read

This property will return True if the wire is a master predicate, otherwise it will return False.

.isSlave : boolean : Read

This property will return True if the wire is a slave predicate, otherwise it will return False.

.isTwoWay : boolean : Read

This property will return True if the wire is a two-way predicate, otherwise it will return False.

.slaveAnimation : control : Read|Write

This property returns a pointer to the slave animation controller and allows you to set the slave animation controller.

Methods

<maxObject>getWireParent <index>index

This method returns a pointer to the i-th dependent parameter parent.

<index>index: The index you wish to retrieve.

<index>getWireSubnum <index>index

This method returns the i-th dependent parameter subanim num in the animatable.

<index>index: The index of the subanim.

<control>getCoController <index>index

This method returns a pointer to the i-th CoController.

<index>index: The index of the controller.

<string>getExprText <index>index

This method returns the expression string of the i-th wire parameter.

<index>index: The index of the parameter.

<void>setExprText <index>index <string>text

This method allows you to set the expression string of the i-th wire parameter.

<index>index : The index of the parameter

<string>text: The expression you wish to set.

See also

Float_Wire : FloatController

Point3_Wire : Point3Controller

Position_Wire : PositionController

Scale_Wire : ScaleController

Parameter Wiring

Interface: paramWire


ScaleController : MAXWrapper

Value > MAXWrapper > Controllers > ScaleController

ScaleController is the superclass for all controllers that can be assigned to scale parameters. The following is a list of the core ScaleController classes accessible in MAXScript:

AudioScale

Bezier_Scale

Linear_Scale

Noise_Scale

Scale_Expression

Scale_List

Scale_Motion_Capture

Scale_Reactor

Scale_Script

ScaleXYZ

SlaveScale

TCB_Scale

Scale_Layer


scale_list : ScaleController

scale_list - superclass: ScaleController; super-superclass:MAXWrapper - 1:1 - classID: #(1263210500, 0)

Value > MAXWrapper > ScaleController > scale_list

Constructors

scale_list ...

ScaleList ...

Properties

<scale_list>.available Point3 default: [0,0,0] -- animatable; point3

Represents the Available sub-controller.

<scale_list>.average Boolean default: false -- boolean; Average_Weights

Controls the state of the "Average Weights" checkbox.

<scale_list>.weight ArrayParameter default: #(1.0) -- float array; SubAnim

Get/set the array of the weights for the List controller’s sub-controllers.

List Interfaces

Interface: list

Properties

.count : integer : Read

.active : index : Read|Write

Methods

<integer>getCount()

This method returns the number of items that appear in the List controllers list box.

<void>setActive <index>listIndex

This method allows you to sets the indexed item in the list active so its parameters appear in the motion panel, and any input is directed to the indexed sub controller.

<index>listIndex: The index of the item to set as the active item.

<integer>getActive()

This method returns the index of the currently active item.

<void>delete <index>listIndex

This method allows you to delete the indexed sub controller from the list.

<index>listIndex: The index of the item to delete from the list.

<void>cut <index>listIndex

This method allows you to cut the index sub controller from the list and stores it in the buffer to paste later.

<index>listIndex: The index of the item you wish to cut.

<void>paste <index>listIndex

This method allows you to paste the sub-controller from the buffer into the indexed slot in the list.

<index>listIndex: The index of the slot to paste into.

<string>getName <index>listIndex

This method allows you to paste the sub-controller from the buffer into the indexed slot in the list.

<index>listIndex: The index of the item for which to get the name.

<void>setName <index>listIndex <string>name

This method allows you to set the name of an indexed item.

<index>listIndex : The index of the item.

<string>name: The name to set it to.

See also Class IlistControl, in the SDK Help file accompanying this product.

See also

List Controllers

float_list : FloatController

point3_list : Point3Controller

position_list : PositionController

rotation_list : RotationController

Controller Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Scale_Expression : ScaleController

Scale_Expression - superclass: ScaleController; super-superclass:MAXWrapper - 0:0 - classID: #(8214, 0)

Value > MAXWrapper > Controllers > ScaleController > Scale_Expression

The Scale_Expression controller has been rewritten and completely exposed to MAXScript via the IExprCtrl interface. In versions prior to 3ds Max 8, there were no properties or methods accessible for it.

Constructor

scale_expression ...

Scale_Expression interfaces:

Interface: IExprCtrl

See Expression Controllers for documentation of the methods exposed by the IExprCtrl Interface.


Scale_Reactor : ScaleController

Scale_Reactor - superclass: ScaleController; super-superclass:MAXWrapper - 0:0 - classID: #(331629852, 751514504)

Value > MAXWrapper > ScaleController > Scale_Reactor

Constructors

Scale_Reactor ...

ScaleReactor ...

ScaleReactor interfaces:

Interface: reactions

Properties

.editStateMode : boolean : Read|Write

This property sets or gets the state of the Edit Reaction State toggle.

.useCurve : boolean : Read|Write

Specifies whether or not to use the curve.

.createMode : boolean : Read|Write

Enable/Disable the Create mode.

Methods

<boolean>reactTo <maxObject>object

The default influence value depends on the time the reaction was created. This is a time variant function so it will use the MAXScript time context instead of requiring a Time value as an argument.

<maxObject>object: The object to react to. This can either be a controller or a node.

Returns true if successful and false otherwise.

<boolean>create name:<string>

Create a new reaction and give it a name. The default influence value depends on the time the reaction was created. This is a time variant function. It will also use the name supplied if there is one, but a name is not necessary. The default value of name is: "scriptCreated". Returns true if successful and false otherwise.

NOTE:

All index parameters below are 1-based!

<boolean>delete <index>index

Delete the indexed reaction. Returns true if successful and false otherwise.

<integer>getCount()

Returns the reaction count.

<void>select <index>index

Selects the indexed reaction.

<index>getSelected()

Returns the index of the currently selected reaction.

<boolean>setStateToCurrent <index>index

This is a Time Variant function. Sets the reaction state to the current state at the given MAXScript time. Returns true if successful and false otherwise.

<boolean>setFloatState <index>index <float>state

Set the reaction state to the value passed in. The function you use depends on the type of reactor controller it is. Returns true if successful and false otherwise.

<boolean>setVectorState <index>index <point3>state

Set the reaction state to the value passed in. The function you use depends on the type of reactor controller it is. Returns true if successful and false otherwise.

<boolean>setRotationState <index>index <quat>state

Set the reaction state to the value passed in. The function you use depends on the type of reactor controller it is. Returns true if successful and false otherwise.

<boolean>setValueToCurrent <index>index

This is a Time Variant function. Sets the reaction value to value of the ReactTo object at the given MAXScript time. Returns true if successful and false otherwise.

<boolean>setValueAsFloat <index>index <float>value

Set the reaction value to the value passed in. The function you use depends on the type of object or controller you are reacting to. See getType() below. Returns true if successful and false otherwise.

<boolean>setValueAsVector <index>index <point3>value

Set the reaction value to the value passed in. The function you use depends on the type of object or controller you are reacting to. See getType() below. Returns true if successful and false otherwise.

<boolean>setValueAsQuat <index>index <quat>value

Set the reaction value to the value passed in. The function you use depends on the type of object or controller you are reacting to. See getType() below. Returns true if successful and false otherwise.

<boolean>setInfluence <index>index <float>influence

Sets the influence for the specified reaction. Returns true if successful and false otherwise.

<boolean>setStrength <index>index <float>strength

Sets the strength for the specified reaction. Returns true if successful and false otherwise.

<boolean>setFalloff <index>index <float>influence

Sets the falloff for the specified reaction.

<void>setName <index>index <string>name

Set the name of the reaction specified by the index.

<string>getName <index>index

Returns the reaction name.

<float>getInfluence <index>index

Returns the reaction influence.

<float>getStrength <index>index

Returns the reaction strength.

<float>getFalloff <index>index

Returns the reaction falloff.

<enum>getType()

getType enums: { #floatReaction | #positionalReaction | #rotationalReaction | #scaleReaction }

Returns the type of object you are reacting to.

<fpvalue>getState <index>index

Returns the reaction state. This value can be either a Point3, a Quat, or a float depending on the type of reactor controller this is.

<fpvalue>getValue <index>index

Returns the reaction value. This value can be either a Point3, a Quat, or a float depending on the type of reactor controller this is.

See also

Reactor controller

Reactor Controllers

FloatReactor : FloatController

Point3Reactor : Point3Controller

PositionReactor : PositionController

Rotation_Reactor : RotationController

Controller Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Scale_Wire : ScaleController

Value > MAXWrapper > Controllers > ScaleController > Scale_Wire

Constructor

Class instances not creatable by MAXScript

Aliases

Scale_Wire

WireScale

Scale_Wire interfaces:

Interface: wireController

Properties

.numWires : integer : Read

This property returns the number of wires out of this controller (i.e. the number of dependent params).

.isMaster : boolean : Read

This property will return True if the wire is a master predicate, otherwise it will return False.

.isSlave : boolean : Read

This property will return True if the wire is a slave predicate, otherwise it will return False.

.isTwoWay : boolean : Read

This property will return True if the wire is a two-way predicate, otherwise it will return False.

.slaveAnimation : control : Read|Write

This property returns a pointer to the slave animation controller and allows you to set the slave animation controller.

Methods

<maxObject>getWireParent <index>index

This method returns a pointer to the i-th dependent parameter parent.

<index>index: The index you wish to retrieve.

<index>getWireSubnum <index>index

This method returns the i-th dependent parameter subanim num in the animatable.

<index>index: The index of the subanim.

<control>getCoController <index>index

This method returns a pointer to the i-th CoController.

<index>index: The index of the controller.

<string>getExprText <index>index

This method returns the expression string of the i-th wire parameter.

<index>index: The index of the parameter.

<void>setExprText <index>index <string>text

This method allows you to set the expression string of the i-th wire parameter.

<index>index : The index of the parameter

<string>text: The expression you wish to set.

See also

Float_Wire : FloatController

Point3_Wire : Point3Controller

Position_Wire : PositionController

Rotation_Wire : RotationController

Parameter Wiring

Interface: paramWire


Script Controllers

float_script : floatController
point3_script : point3Controller
position_script : positionController
rotation_script : rotationController
scale_script : scaleController

Value > MAXWrapper > Controllers > Script Controllers

Constructor

float_script ...

point3_script ...

position_script ...

rotation_script ...

scale_script ...

Script controllers have been significantly enhanced in 3ds Max 8. Please see Using Script Controllers for details.

Properties

<script_controller>.script String default: varies

Lets you programmatically get and set the text for scripts.

EXAMPLE

$foo.position.controller=position_script()

$foo.position.controller.script = "$baz.pos - [20,20,35] "

NOTES ON VERSIONS PRIOR TO 3DS MAX 8:

In versions prior 3ds Max 8, it was possible to provide a script string as a construction parameter, but it would not work as expected:

When assigning a script controller to a track, 3ds Max 7 automatically reads the current value of the track and assigns it to the new controller to make it valid and to preserve the original value. For example, if the track contains the value 12.6, after assigning the script controller, the string inside the controller will be automatically set to "12.6" to preserve the last known value.

For that reason, trying to assign the script in a single pass does not work in 3ds Max 7:

$Box01.height.controller = float_script script:"random 0 100"

The above would not work because the script controller instance is first created on the right-hand side, the script string "random 0 100" is assigned to it, then the controller is assigned to the left-hand side, and its script string is immediately overwritten with a new string containing the current value of the left-hand side track.

You should always assign the controller first, then assign to its .script property.

fs = float_script()

$Box01.height.controller = fs

fs.script = "random 0 100"

In 3ds Max 8 and higher, the behavior described above has been corrected. An internal flag has been added to all controllers to denote whether the controller is "new" or "not new", thus using the current track value only when a new controller is being assigned. Thanks to this new behavior, the script string in controllers where the script property has already been set will not be replaced.

<script_controller>.ThrowOnError Bool default:true

Controls whether to throw when an error occurs in the expression. Available in 3ds Max 8 and higher.

NOTE:

There is a discontinuity between the MAXScript Debugger window, getting variable values via Function Publishing System and evaluating the script controller.

  • When working with the Debugger dialog, variable values are shown based on the current slider time.

  • When accessed via Function Publishing System, the variable values returned are based on the current MXS time.

  • When evaluating the controller, the result is based on the current time value, but also the range of the controller, the Out-Of-Range Type set for the controller, and any Ease curves applied to the controller.

This means that while 'NT' might show one value in the Debugger dialog, its value in the evaluation may be different!

Interfaces:

All script controllers expose the IScriptCtrl Interface since 3ds Max 8. This interface provides all methods to access the controller through MAXScript:

Interface: IScriptCtrl

Methods:

<boolean>SetExpression <&TSTR>Expression

Expression is In parameter

Sets the expression string to the string passed by-reference. Returns true on success, false otherwise.

<TSTR by value>GetExpression()

Returns the expression string.

<TSTR by value>GetDescription()

<boolean>SetDescription <&TSTR>Description

Description is In parameter

<integer>NumVariables()

Returns the number of variables defined in the controller.

<boolean>AddConstant <&TSTR>Name <&fpvalue>Constant

Name is In parameter

Constant is In parameter

Adds a constant. The first argument is the name of the constant. The second argument is the value to be assigned to the constant. Returns true on success, false on failure.

<boolean>AddTarget <&TSTR>Name <value>Target Offset:<time> Owner:<value>

Name is In parameter

Offset default value: 0f

Owner default value: undefined

Adds a target. The first argument is the name of the target. The second argument is the value to be assigned to the target. The optional Offset keyword can be used to define a time offset. Returns true on success, false on failure.

<boolean>AddObject <&TSTR>Name <value>Object

Name is In parameter

Adds an object. The first argument is the name of the object. The second argument is the value to be assigned to the object. Returns true on success, false on failure.

<boolean>AddNode <&TSTR>Name <node>Node

Name is In parameter

Adds a node variable. The first argument is the name of the node variable. The second argument is the scene node to be assigned to the variable. Returns true on success, false on failure.

<boolean>SetConstant <value>Which <&fpvalue>Constant

Constant is In parameter

Sets a given constant to the specified value.

<boolean>SetTarget <value>Which <value>Target Owner:<value>

Owner default value: undefined

Sets a given taget to the specified target value. Returns true on success, false on failure.

<boolean>SetObject <value>Which <value>Object

Sets a given object to the specified object value. Returns true on success, false on failure.

<boolean>SetNode <value>Which <node>Node

Sets a given node variable to the specified scene node value. Returns true on success, false on failure.

<boolean>DeleteVariable <value>Which

Deletes the specified variable. Returns true on success, false on failure.

<boolean>RenameVariable <value>Which <&TSTR>Name

Name is In parameter

Renames the specified variable to the given name. Returns true on success, false on failure.

<time>GetOffset <value>Which

Returns the time offset of the specified variable.

<boolean>SetOffset <value>Which <time>Offset

Sets the time offset of the specified variable to the given value.

<boolean>VariableExists <&TSTR>Name

Name is In parameter

Returns true if the given variable name exists in the controller, false if it does not exist.

<fpvalue by value>GetConstant <value>Which

Returns the value of the specified variable.

<value>GetTarget <value>Which asObject:<boolean>

asObject default value: false

Returns the value stored in the specified target.

<maxObject>GetObject <value>Which

Returns the object value stored in the specified object variable.

<node>GetNode <value>Which

Returns the scene node value stored in the specified node variable.

<value>GetValue <value>Which asObject:<boolean>

asObject default value: false

Returns the value stored in the specified variable.

<value>GetVarValue <value>Which

Returns the value stored in the specified variable.

<enum>GetType <value>Which

GetType enums: {#unknown|#target|#constant|#object|#node}

Returns the type of the value stored in the specified variable.

<TSTR by value>GetName <index>Index

Returns the name of the indexed variable.

<index>GetIndex <&TSTR>Name

Name is In parameter

Returns the index of the variable specified by name.

<void>Update()

Updates the controller.

<TSTR by value>PrintDetails()

Prints information about the script controller, including description string, expression code and variable details.

See also

Using Script Controllers

Controller Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Using Script Controllers

Script controllers function in similar way to expression controllers, providing a properties dialog in which a script can be entered that is used to compute the controller value. The primary advantages of script controllers are:

  • They can use all the features of the MAXScript language including loops, scripted functions, pathnames, etc.

  • Almost any property of any object in the scene can be used to help compute controller values, including things like mesh vertices, values of properties at arbitrary frame times, and other non-animatable properties that are not accessible in Expression controllers.

    • NOTE:

    Mesh values, long strings and large bitArrays are not recommended for use in variables inside a script controller because they would use system memory and not MAXScript Heap memory and could cause Out Of Memory situations without ever getting garbage collected..

    • They can use MAXScript global variables to communicate and coordinate with other controllers and scripts in 3ds Max.

    When you assign a Script controller to some parameter, a Properties dialog becomes available in Track View through the right-mouse-button menu or the Properties button on the Track View toolbar.

    The script controller dialog has been changed to look a lot like the expression controllers' dialog. At the same time, the expression controller has been completely rewritten in 3ds Max 8 to use Parameter Block 2 and both expression and script controllers now use the same code base and provide very similar features. The main difference is the language used to write the expressions.

    The new script controller dialog provides the following controls:

    Create Variable group of controls:

    • Name text field - lets you enter and edit the name of user variables.

    • Create button - used to create a variable. Enter the variable name in the Name field and press the button to add to the list of variables.

    • Delete button - used to delete a variable. Select an existing variable from the Variables list to get its name into the Name field OR type the name of the variable manually into the Name field, then press the Delete button.

    • Rename button - used to rename an existing variable. Select an existing variable from the Variables list to get its name into the Name field. Type the new name of the variable into the Name field, then press the Rename button.

    Variable Parameters group of controls:

    • Tick Offset value spinner - this value spinner can be used to specify a time offset in ticks for the current variable. Select a variable from the list and change the Tick Offset value - if the variable is assigned a Track, Controller or Node, (in other words it is not a Constant), when the script expression is evaluated, the variable's value will be taken from the current time plus the Tick Offset.

    Variables:

    • Variables list - lists all available variables in the controller. You can create any number of user variables as described above. The following pre-defined constant variables are available in every script controller and cannot be deleted or renamed:

      • F - the current time in frames.

      • NT - the normalized time. This variable contains the normalized time where t is the evaluation time and the time range is the range on scripted controller. The normalized time is clamped to 0-1 unless the controller's Out-of-Range Type is disabled.

      • S - the current time in seconds.

      • T - the current time in ticks.

    • Assign Constant - lets you assign a constant value to the selected variable. The constant value can be ANY MAXScript value, including integer, float, array, node etc. You can enter any valid MAXScript expression in the Value expression field. Then press the Evaluate button to evaluate the expression at the current time. Press OK to assign the value expression result to the variable, or Cancel to not assign a value. In the following screenshot, the constant value is an array containing the integer 1, the global constant value Pi and the position of the scene node Sphere01. The evaluated expression result contains only constant values - the integer 1 does not change, the float value of Pi is taken as the second array element, and the position of the Sphere01 at the current frame (at the moment of the evaluation) is taken as the third array element:

    • Assign Controller - lets you assign a controller to the selected variable. The value of the controller will be taken at the current time plus the variable's Tick Offset.

    • Assign Track - lets you assign a track to the selected variable.

    • Assign Node - lets you assign a node to the selected variable. See also Weak References To Nodes in the Expression/Script Controller

    Expression text field - used to enter the script expression to calculate the controller value. See the section below on writing controller scripts for details.

    Description text field - can be used to provide comments regarding the functionality of the controller.

    Load/Save buttons - Load and save scripts to text files.

    Evaluate button - Evaluates the script expression. The current time is used unless explicitly stated differently in the code using the at time context or when using controller variables with Tick Offset different than 0.

    Close button - Compiles and checks the controller script for errors. If no errors are found, it closes the dialog. If an error is detected, a MAXScript error message is shown first with the description of the problem. After closing the error message, a prompt appears asking whether to revert the expression to the original value of the current track and close the dialog (OK) or to return to editing the expression (Cancel):

    Referencing Nodes and Controllers in Script Controllers

    What is the difference between the new and the old script controllers?

    The main difference is that there is an "Assign Node" button that allows you to pick a node. What is special about this is that the node is not held as a direct reference of the script controller, rather it is held as in indirect reference. This is done through an intermediate class called NodeTransformMonitor. The only messages that propogate from the referenced node to the scripted controller are node transform messages and node deletion messages. This allows you to place a scripted controller on a sphere's radius track, and then in the scripted controller have a variable pointing at the node holding the sphere without creating a circular dependency. Note that the expression controller also uses the NodeTransformMonitor when you have a variable pointing at a node.

    What can I assign through the Assign Constant button?

    If you click Assign Constant, you can type in any valid MAXScript expression. If the result is a MAXWrapper (like a node, material, modifier, controller etc.), the result is stored as an Object. If the result is a subAnim, it is stored as a Target.

    You can assign either a constant value from a MAXScript expression, or a dynamic value if the expression evaluates to a controller.

    If you create the variable myVar and use the Assign Constant button to assign the expression

    $Box01.position.x_position.controller.value

    in the Assign Constant dialog, the value of the controller on the current frame will be taken as a constant value and assigned to the variable myVar.

    But if you say

    $Box01.position.x_position.controller

    this will create an Object value that points at the controller. In the controller's expression code, you can use 'myVar.value' to get the current value. The value will not be stored as a constant, but will be dynamic and change as the current time changes.

    What is the difference between assigning an Object and a Node to a variable?

    Let's say that you have two scripted controllers X and Y, and a node N that has a sphere base object. A variable in X points at N as an Object. A variable in Y points at N as a Node. If you change the sphere's radius, only X is re-evaluated. If you move N, both X and Y are re-evaluated.

    If stored as a Node value, the controller is invalidated only if the node's transform changes or the node is deleted. But it does allow you to specify nodes that would create a circular reference if specified as an Object value.

    To specify whether to store an Object or a Node, you should use the Assign Track / Assign Node buttons, or the MAXScript methods. When using the Assign Constant expression, a MAXWrapper will always be stored as Object.

    Difference between accessing an object property through Node and Object

    If you want, you can just create variables that hold nodes as Object values, and then reference the parameter you want as you would normally in the expression. For example, myNode would point at a sphere node, and your expression would be "myNode.radius". But this is not going to have as good performance as pointing to the sphere's radius track as a Target. In the former, any change to the node (for example, moving the node) will result in a controller re-evaluation. In the latter, only changes to the sphere base object will result in a controller re-evaluation.

    Also, if you just specify a Node variable and then access base object parameters on it (for example, its radius), you will get an error if you bring in the node as an XRef. An XRef object doesn't expose the properties of the object it wraps, so there is no 'radius' parameter. Thus an error will be generated when the expression is evaluated. If you point a variable at the sphere's radius track and use that variable instead, the expression will still work when XRef-ed in.

    What is the difference between using explicit paths names in the Expression (like in previous releases) and using the new variables pointing at nodes?

    There are multiple important differences.

    Let's say you have an object $Sphere01 using a script controller pointing at an object called $Box01.

    • If you would say

    $Box01.position.x_position.controller

    every time the expression is evaluated MXS needs to resolve the node name 'Box01' to a node value, resolve the position property to the position controller, resolve the x_position property to the x_position subAnim, get the controller from the subAnim, and get the MAXScript MAXControl value wrapping the controller.

    If you had a Target variable pointing at the controller, all that needs to happen is to get the MAXScript MAXControl value wrapping the controller.

    • The second difference is that if you rename 'Box01', your scripted controller would stop working. When using a variable, there is no node name dependency!

    • The third difference is that if you select and clone 'Box01' and the 'Sphere01', your newly cloned scripted controller will continue to point at 'Box01', not the clone of 'Box01'. As a variable, it will point at the cloned controller.

    • The fourth difference is that if you XRef Scene with 'Box01' and the 'Sphere01', your scripted controller will fail because it cannot resolve 'Box01' since the node is in an xref scene node tree, not the main 3ds Max scene node tree. As a variable, the scipted controller holds a reference to the node, so it doesn't matter where that node is.

    • If you do Save Selected on 'Sphere01', then 'Box01' will also be saved because it is dependent on the controller. Likewise, if you merge 'Sphere01', 'Box01' should also be merged.

    Should I use dependsOn in the new Script Controller?

    You do not need 'dependsOn' in the scripted controller's expression since 3ds Max 8.

    'dependsOn' should not be used in new scripts, and should actually be removed from old ones.

    When you have 'dependsOn' in a script controller expression, a new variable will be automatically created (Depends_#) that points at the node as an object. This will cause all changes to the node to result in a script controller re-evaluation.

    The automatic creation of the dependson_# variable is a special case. It is created based on the 'dependsOn' command being executed and by definition the arguments to dependsOn are MAXWrapper objects.

    This is also needed to ensure that existing script controllers using 'dependsOn' would continue to work correctly without tweaking the controller.

    See also

    Script Controllers


Writing Controller Scripts

3ds Max interprets the text you type into the Script text box as the body of a MAXScript block expression, so you can type as many expressions as you want on as many lines as you want and they are evaluated in turn and the value of the last expression is taken as the controller value. This value must yield the right type for the controller, Float for float, Point3 for position, Quat for rotation, etc.

The value returned from a script controller may not necessarily be the same value seen in Track View or in the command panels, nor the same value returned by accessing the property value in MAXScript. Part of a MAXWrapper property definition is a scaling value that is applied when reading or setting the true value stored in a controller. For example, the slice_to and slice_from properties associated with many of the geometry primitives is displayed in degrees. The actual value stored in the controller associated with these properties are in radians. This scaling factor is an internal property of the MAXWrapper property, and not an internal property of the controller. Both 3ds Max and MAXScript automatically apply the specified scaling factor when accessing properties, so this scaling is normally invisible to the user. The exception is when script or expression controllers are used. For these controllers, the data value returned must be the unscaled value, as 3ds Max will then apply the scaling factor to the output value. In the documentation of the MAXWrapper classes, any scaling applied to a property is shown. If there is no scaling listed, no scaling occurs for that property. For example, a portion of the Capsule documentation is:

<Capsule>.radius Float default: 0.0 -- animatable

<Capsule>.height Float default: 0.0 -- animatable

<Capsule>.slice_from Float default: 0.0 -- animatable, angle

<Capsule>.slice_to Float default: 0.0 -- animatable, angle

From this, a scripted controller would return unscaled values for the radius and height properties, and radians for slice_from and slice_to. The scaling types, stored value meaning, and scaling value applied to the true controller value are as follows:

Angle -- value stored in radians, output scaled by 57.29578

Percentage -- value stored as fraction (0 to 1), output scaled by 100

For properties that have a Color value type, the controller output is automatically scaled by 255. If a point3_script is assigned to one of these properties, each component value should stored as fraction (0 to 1). Remember that converting a MAXScript Color value to a Point3 value does not apply a scaling factor - red as point3 returns a value of [255,0,0]. Therefore you must explicitly scale a Color value by dividing by 255 if it is output by the script controller.

The body of a script controller’s script is any valid MAXScript expression that evaluates to the proper data type, and can contain global and local variables, functions, and structure definitions. The script is compiled in its own local scope, and the locals are only visible inside the scope of the script controller. Script controller local variables are heap-based locals, which are slightly different from normal (stack-based) locals. Normal locals are visible in the current scope and have a lifetime of one execution of that scope. Heap-based locals are also visible only in the current scope, but have a lifetime equal to the lifetime of the top-level expression where they are defined. A script controller’s locals are created the first time the script is executed and are kept permanently in the heap (unless and until you redefine the script). This means you can store values in local variables during one execution of the script controller and these values will still be present at the next evaluation. You cannot access the script controller’s locals from another utility or from Listener, because they are not executing within the scope of the script controller. See Scope of Variables for more information.

As a special case, you can exit a script controller’s script using a return <expr>.

A controller is always evaluated by 3ds Max with respect to a specific animation time. This might be the current time slider or incrementing frame time if an animation is playing or a render is under way.

In the case of Script controllers, the time being evaluated is used to establish an automatic ‘at time’ context around the controller script, so any properties you access (outside of other explicit ‘at time’ expressions) yield the correct values for the current controller evaluation time. This means you don’t have to do anything special in your scripts to work at the correct time. You can access the evaluation time if you need to with the standard MAXScript variable, currentTime. You can also reference scene property values at other times by using explicit ‘at time’ expressions in your scripts, as in normal MAXScript programming.

Remember that MAXScript lets you write multiline string literals, if you need.

EXAMPLE

--A position script keeping the object at the center of all other objects

--in the scene as they move about:

local pos = [0,0,0]

for o in objects where o != $foo do

pos += o.pos

pos / (objects.count - 1)

The above script computes the average position of all objects except the current one (written as $foo here) by setting up a local variable that iterates through all objects except $foo, accumulates a total position vector, and computes the average in the last line, which is the final result of the script.

EXAMPLE

--A position script keeping the object attached to the highest vertex in a

--given object:

local high_index = 1, high_z = (getVert $foo 1).z

for i in 2 to $foo.numVerts do

if (getVert $foo i).z > high_z then

(

high_index = i

high_z = (getVert $foo i).z

)

getVert $foo high_index

The above script runs over the vertices in $foo remembering the index of the vertex with the largest z and returns that vertex’s coordinates as the new position.

LIMITATIONS IN VERSIONS PRIOR TO 3DS MAX 8:

Script controllers were not automatically updated when you interactively modified objects that they depended on unless you defineed an explicit dependency using dependsOn or assigned the scene node to a variable.

If you moved the time slider or if you animated the changes and then played the animation, the changes were reflected automatically. Because the scripts could refer to other objects in very indirect ways or conditional ways, it was not possible for MAXScript to automatically determine the objects a script depends on. These objects always had to be specificied explicitly.


Matrix3 Scripted Controller

The Transform Script controller contains all of the information contained in a Position/Rotation/Scale (PRS) controller in one scripted matrix value. Instead of having three separate tracks for position, rotation, and scale, all three values can be simultaneously accessed from one script controller dialog. Because a script defines the transform values, they are easier to animate.

The value of the controller script must be a matrix3 values . A matrix3 value is a 4x3 3D transformation matrix.

The software interprets the text you type into the Script text box as the body of a MAXScript block expression. You can type as many expressions as you want on as many lines as you want, and they are evaluated in turn. The value of the last expression is taken as the controller value. This must yield a matrix3 value for Transform Script controllers.

Since the text is inside a block expression, you can declare local variables, which are visible only within the script and are temporary for one evaluation. You can also declare or access global variables that are shared with all other scripts in MAXScript and hold their values from one evaluation to the next.

The software with respect to a specific animation time always evaluates a controller. This might be the current time slider or incrementing frame time if an animation is playing, or a rendering is under way. In the case of Script controllers, the time being evaluated is used to establish an automatic "at time" context around the controller script, so any properties you access (outside of other explicit "at time" expressions) yield the correct values for the current controller evaluation time. This means you don't have to do anything special in your scripts to work at the correct time. You can access the evaluation time, with the standard MAXScript variable, current Time. You can also reference scene property values at other times by using "at time" expressions in your scripts, as in regular MAXScript programming.

EXAMPLE

t=transform_script()

t.script = "(matrix3 1)"

See also

transform_script - superclass: Matrix3Controller

Script Controllers


dependsOn For Scripted Controllers

NOTE:

This is obsolete in 3ds Max 8 and higher.

Assign Nodes to User Variables instead.

See Script Controllers

dependsOn was used with scripted controllers in versions prior to 3ds Max 8 to enable interactive update of scripted controllers when the code in them depends on other objects in the scene.

Place a call to dependsOn in the controller script somewhere (usually at the top), with a list of objects on which the controller depends. Interactive changes to any of these objects will cause the object containing the script controller to also update.

EXAMPLE

A $foo.pos controller script:

dependsOn $foo2 $foo3

($foo2.pos + $foo3.pos) / 2

will always keep $foo centered between $foo1 and $foo2. The objects given to the dependsOn() function can be any MAX object, controllers, base object, nodes, materials, etc. They must be individual, explicit objects, not wild-card path names or arrays of objects. The object can be the exact controller you want to depend on or any containing object. The strict dependency for the above script would be,

EXAMPLE

dependsOn $foo2.pos.controller $foo3.pos.controller

The simpler $foo2 $foo3 will catch *any* kind of changes to those nodes or components in them like base objects, modifiers, or materials and update the script-controlled object. The dependency is established the first time the controller is evaluated after any script change or recompile. This can be when editing in a controller property box, or after a scene load.

You can programmatically force a recompile and reset of the dependents by setting the control script to itself:

EXAMPLE

$foo.pos.controller.script = $foo.pos.controller.script

See also

Script Controllers

'This' Local Variable in Scripted Controllers


'This' Local Variable in Scripted Controllers

The this local variable in scripted controllers will contain a MAXWrapper value wrapping the scripted controller. The this is a local variable that exists while evaluating the scripted controller's script, and is not a property of the scripted controller.

In order to access the actual object the controller is assigned to, you can use the refs.dependents method using the this variable, then filter the valid nodes.

EXAMPLE

refsArray = (refs.dependents this)

for i in refsArray where isvalidnode i do print i.name

0.0

The example returns the name of the object the scripted controller is assigned to. Obviously it is not possible to tell the actual node when the controller is instanced across multiple objects which is a known limitation.

See also

Script Controllers

dependsOn For Scripted Controllers


TCB Controllers

TCB_float : floatController
TCB_point3 : point3Controller
TCB_position : positionController
TCB_rotation : rotationController
TCB_scale : scaleController

Value > MAXWrapper > Controllers > TCB Controllers

Constructors

TCB_float ...

TCB_point3 ...

TCB_position ...

TCB_rotation ...

TCB_scale ...

Properties

<controller>.keys MAXKeyArray

Returns the array of keys of the controller

<tcb_rotation>.rotWindup : bool : Read|Write

In tcb_rotation controller class only, controls the rotation Windup behavior.

See also

MAXKeyArray Values

TCB Controller Keys

TCBDefaultParams Structure

Controller Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


TCBDefaultParams Structure

The TCBDefaultParams Structure allows you to set the default TCB key parameters to be used for newly created TCB controller keys.

Available in 3ds Max 2008 and higher. Previously available in the free [ AVG ] Avguard Extensions.

Properties:

TCBDefaultParams.tension

Get/set the default TCB key tension.

TCBDefaultParams.continuity

Get/set the default TCB key continuity.

TCBDefaultParams.bias

Get/set the default TCB key bias.

TCBDefaultParams.easeTo

Get/set the default TCB key easeTo value.

TCBDefaultParams.easeFrom

Get/set the default TCB key easeFrom value.

See also

TCB Controllers


TCB Controller Keys

For TCB controller keys, the following additional properties are accessible:

<key>.time Time

Get/Set the key's time - expects a time value or number (interpreted as frames)

<key>.selected Boolean

Get/Set the selected state of the key.

<key>.value varies

Get/Set the value of the key. The class of the value is determined by its containing controller

<key>.tension Float default: 25.0

Get/Set the Tension of the key.

<key>.continuity Float default: 25.0

Get/Set the Continuity of the key.

<key>.bias Float default: 25.0

Get/Set the Bias of the key.

<key>.easeTo Float default: 0.0

Get/Set the Ease To value of the key.

<key>.easeFrom Float default: 0.0

Get/Set the Ease From value of the key.

See also

Key Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods

TCB Controllers

TCBDefaultParams Structure


HD IK controller chains can be assigned to existing hierarchies

The IKChainControl uses a boolean controller for turning the IK solver on/off. On/off implies an opposite referencing structure. When it is on, joints reference the ik goal, whereas when it is off, the goal references the end joint, ie. the goal has to snap to the end effector. This means that the direction of message propagation is decided on the state of this boolean controller. To avoid evaluating an animatable attribute during message propagation, we require that this controller cannot be replaced by a possibly arbitrarily wired controller.

HD IK controller chains can be assigned to existing hierarchies.

Prototype:

HDIKSys.ikChain <startJoint> <endJoint> <assignEE>

<startJoint>

The first node in the new chain, called the ancestor.

<endJoint>

The last node in the chain, called the decendent.

<assignEE>

A boolean parameter: when TRUE, a position end effector is created at the endJoint.

EXAMPLE

If 4 boxes existed in the scene and Box02 was a child of Box01, Box03 was a child of Box02, and Box04 was a child of Box03:

HDIKSys.ikChain $Box01 $Box04 TRUE

would assign HD IK controllers and create an end effector at Box04.

Pos/Rotation/Scale Property Access

Pos/Rotation/Scale properties of the nodes are accessible immediately. Instead of writing $node.transform.controller.ik_goal.controller.pos, you can say, in MAXScript, $node.pos.controller, etc.

NOTE:

Both IKControl and IKChainControl can not be instanced.

See also

IKChainControl : Matrix3Controller

Interface: HDIKSys

Interface: IKSys

IKLimb Solver


IKLimb Solver

NOTE:

This class is not available in 3D Studio VIZ.

The IK Limb Solver is specifically meant for animating the limbs of human characters; for example, the hip to the ankle, or the shoulder to the wrist. It affects only two bones in a chain. It is an analytical solver that is very fast and accurate in viewports.

NOTE:

To use with the IK Limb solver, a bones system must have three bones in the chain. The goal is placed at the pivot point of the third bone, and the IK solution is calculated for the first and second bones.

The IK Limb solver works not only with bone hierarchies, but with any linked hierarchy that has three elements, and is set up to model a human limb. The additional requirements are:

  • The first joint is "spherical." That is, it has 3 degrees of freedom.

  • The second joint is "revolute." That is, it has 1 degree of freedom.

If you attempt to put an IK Limb solver on an inappropriate chain, a warning message informs you that your IK Limb solver assignment has no effect.

The IK Limb solver uses the same controls as the HI IK solver, so it follows the model of setting preference angles for joints, and allows for mixing periods of forward and inverse kinematics in the same animation period. It does not use the HD IK Solver methods of damping, precedence, and setting joint limits.

The IK Limb solver is provided as part of the Discreet Open Source initiative, so it can be exported directly to a game engine.

The joint angles are obtained by computing the transformation (rotation) between the initial chain plane and the target chain plane. The initial chain plane is defined by three unit vectors:

  1. shoulder-to-elbow unit vector (at the initial pose)

  2. projection of end-effector-axis on a plane perpendicular to the shoulder-to-elbow unit vector (at the initial pose)

  3. cross product of the above two.

Similarly, the target plane is defined by three analogous vectors at the target pose.

See also

Interface: IKSys

Interface: HDIKSys

HD IK Controller Chains Can Be Assigned to Existing Hierarchies

IKChainControl : Matrix3Controller


Link_Constraint - superclass: Matrix3Controller

Link_Constraint : Matrix3Controller

Link_Constraint - superclass: Matrix3Controller; super-superclass:MAXWrapper - 2:1 - classID: #(-2025855132, -1430354431)

Value > MAXWrapper > Matrix3Controller > Link_Constraint

A Link constraint is used to animate an object linking from one target object to another.

The Link constraint causes an object to inherit the position, rotation and scale of its target object.

Constructor

Link_Constraint ...

Link ...

Properties

<Link_Constraint>.key_mode Integer default: 0 -- integer; Link_KeyMode

You can choose between 3 different Key Modes which will determine how keyframes are written on the linked objects as part of the link constraint. These options will provide the following:

0: No Key Mode: No keys are created any of the objects involved.

1: Key Nodes: Sets keys for some of the objects.

2: Child: Applied keys to the child object only.

3: Parents: Applies keys to both parents and the child object.

4: Key Entire Hierarchy:This applies keyframes to the chosen nodes and their entire hierarchies.

5: Child: Keys the chosen object and the nodes in its hierarchy up to the world.

6: Parents: Keys both parents and the child and all three hierarchies up to the world.

<Link_Constraint>.link_params SubAnim default: SubAnim:Link_Params -- transform

Link_Constraint interfaces:

Interface: constraints

Methods:

<node>getNode <index>nodeNumber

Returns the indexed target.

<boolean>setTarget <node>target <index>index

Sets the specified node as the target at the indexed position. Returns true on success.

<float>getFrameNo <index>targetNumber

Returns the linking start frame number of the indexed target.

<boolean>setFrameNo <index>targetNumber <integer>frameNo

Sets the linking start frame number of the indexed target. Returns true on success.

<integer>getNumTargets()

Returns the number of targets.

<boolean>addTarget <node>target <integer>frameNo

Appends the specified node to the target list at the specified frame. Returns true on success.

<boolean>DeleteTarget <integer>targetNumber

Deletes the indexed node from the target list. Returns true on success.

<integer>addWorld frameNo:<integer>

frameNo default value: -99999.
This method sets "World" as a target at the specified frame.

See also

Link_Constraint.link_params - superclass: MAXObject

LookAt_Constraint : RotationController

Path_Constraint : PositionController

Position_Constraint : PositionController

Orientation_Constraint : RotationController

Controller Functions for Use with Constraint Assignments


Link_Constraint.link_params - superclass: MAXObject

Link_Constraint.link_params : MAXObject

Link_Constraint.link_params - superclass: MAXObject; super-superclass:Value - 3:3 - classID: #(8197, 0)

Constructor

Link_Constraint.link_params ...

Link.link_params ...

Properties:

<Link_Constraint.link_params>.position Point3 default: [0,0,0] -- animatable; point3

<Link_Constraint.link_params>.rotation Quat default: (quat 0 0 0 1) -- animatable; quat

<Link_Constraint.link_params>.scale Point3 default: [1,1,1] -- animatable; point3

See also

Link_Constraint : Matrix3Controller


LookAt_Constraint - superclass: RotationController

LookAt_Constraint : RotationController

LookAt_Constraint - superclass: RotationController; super-superclass:MAXWrapper - 11:0 - classID: #(8225, 0)

Value > MAXWrapper > RotationController > LookAt_Constraint

The LookAt Constraint constrains an object's orientation so that it's always looking at another object.

NOTES:

The old Look At Controller, which is a full transform controller, will be invisible to the user unless an old file is loaded. The new LookAt Constraint Controller is a rotation controller and NOT a TM controller which the old LookAt was. The old LookAt will be phased out.

At this time, old LookAt.IsPublic returns zero, so that the users won't see the old LookAt. However, the old MAX files will still load the old LookAt and the camera and the light will continue to use the old LookAt.

Also, assigning a node to the .lookat property of another node will create an old-style transform Look At Controller and not a LookAt Constraint.

Constructor

LookAt_Constraint ...

Properties

<LookAt_Constraint>.relative Boolean default: false -- boolean

Get/set the state of the "Keep Initial Offset" checkbox. When set to true, the original rotation of the object will be kept and the look at effect will be applied relatively to it. When set to false (default), the specified axis will be rotated absolutely to look at the target(s).

<LookAt_Constraint>.lookat_vector_length Float default: 100.0 -- animatable; float; Vector_Length

Get/set the length of the lookat vector in the viewport either in generic units (when .viewline_length_abs is set to true, the default) or as percentage of the distance from the object to the target point.

<LookAt_Constraint>.viewline_length_abs Boolean default: true -- boolean; Viewline_Abs

Get/set the state of the Viewline Length Absolute checkbox. When set to true (default), the lookat line in the viewport will have a length in absolute generic units. When set to false, the length will be relative to the distance from the object to the target. See .lookat_vector_length description above.

<LookAt_Constraint>.set_orientation Boolean default: false -- boolean

Get/set the state of the Set Orientation checkbutton. When set to true, the Set Orientation checkbutton will be pressed and will allow the interactive adjustment of the initial rotation, provided the .relative property is set to false.

<LookAt_Constraint>.target_axis Integer default: 0 -- integer

Get/set the state of the LookAt Axis radiobuttons.

Possible values are:

0 - X axis

1 - Y axis

2 - Z axis

<LookAt_Constraint>.target_axisFlip Boolean default: false -- boolean

Get/set the state of the LookAt Axis > Flip checkbox. When set to true, the axis defined by .target_axis will be taken with negative sign: -X, -Y or -Z.

<LookAt_Constraint>.pickUpNode UndefinedClass default: undefined -- node; Pick_Upnode

Get/set the Upnode.

<LookAt_Constraint>.upnode_world Boolean default: true -- boolean

Get/set the state of the World checkbox in the Select Upnode group of controls. When set to true (default), the World Up Axis will be used. When set to false, the Upnode local axis will be used (if available).

<LookAt_Constraint>.StoUP_axis Integer default: 0 -- integer

Get/set the state of the Source/Upnode Alignment > Source Axis radiobuttons.

Possible values are:

0 - X axis

1 - Y axis

2 - Z axis

<LookAt_Constraint>.StoUP_axisFlip Boolean default: false -- boolean

Get/set the state of the Source/Upnode Alignment > Source Axis > Flip checkbox. When set to true, the axis defined by .StoUP_axis will be taken with negative sign: -X, -Y or -Z.

<LookAt_Constraint>.upnode_axis Integer default: 2 -- integer

Get/set the stare of the Aligned To Upnode Axis radiobuttons.

Possible values are:

0 - X axis

1 - Y axis

2 - Z axis

LookAt_Constraint interfaces:

Interface: constraints

Methods:

<integer>getNumTargets()

Returns the number of target nodes on the target list.

<node>getNode <index>targetNumber

Returns the indexed target node.

<float>getWeight <index>targetNumber

Returns the weight of the indexed target if the targetNumber is relevant, 0.0 otherwise.

<boolean>setWeight <index>targetNumber <float>weight

Sets the weight of the indexed node specified by targetNumber. Returns true on success, false otherwise.

<boolean>appendTarget <node>target <float>weight

Appends the specified node to the list and sets its weight to the specified value. Returns true on success, false otherwise.

<boolean>deleteTarget <index>targetNumber

Deletes the indexed target. Returns true on success, false otherwise.

See also Class IposConstPosition, in the SDK Help file accompanying this product.

See also

Link_Constraint : Matrix3Controller

LookAt_Constraint : RotationController

Path_Constraint : PositionController

Position_Constraint : PositionController

Orientation_Constraint : RotationController

Controller Functions for Use with Constraint Assignments


Path_Constraint - superclass: PositionController

Path_Constraint : PositionController

Path_Constraint - superclass: PositionController; super-superclass:MAXWrapper - 12:0 - classID: #(8209, 0)

Value > MAXWrapper > PositionController > Path_Constraint

A Path Constraint restricts an object’s movement along a spline or at an averaged distance between multiple splines.

Constructor

Path_Constraint ...

path ...

Properties

<Path_Constraint>.path UndefinedClass default: undefined -- node; Path_Constraint

Get/set the first path on the list of paths to constrain to.

NOTE:

This property is exposed mainly for backwards compatibility with the legacy Path Position Controller available in 3ds Max prior to version 4 before the Path_Constraint was introduced. The old controller supported only one path which could be get and set via the .path property.

The .path property in the Path_Constraint always returns the first object from the list of paths.

Setting the .path property will always replace the top path on the list with a new one.

If there are two or more objects on the list and the object assigned to the .path property is already on the list but not the first one, the new object will replace the first entry on the list and since the path can only be on the list once, the second entry will be removed.

To set and manage multiple paths, use the methods exposed by the constraints interface described at the bottom of this page!

<Path_Constraint>.percent Float default: 0.0 -- animatable; percentage

Sets the percent that the object is positioned along the path. Corresponds to the % Along Path spinner

<Path_Constraint>.follow Boolean default: false -- boolean

Aligns one object axis to the tangent at the current position along the spline. The axis to follow with can be specified using the .axis and .axisflip properties.

<Path_Constraint>.bank Boolean default: false -- boolean

Allows the object to bank (roll about the follow axis) as it negotiates the curves of the spline. This property only has effect when the .follow property is set to true. The axis to roll about when banking is the same as for the follow behavior.

<Path_Constraint>.bankAmount Float default: 0.5 -- animatable; float; Bank_Amount

Adjusts the amount of the banking to one side or the other, depending on whether the value is positive or negative.

<Path_Constraint>.smoothness Float default: 0.5 -- animatable; float

Controls how rapidly the roll angle changes as the object moves through bends in the trajectory. Smaller values will make the object more responsive to subtle changes in the curve, while larger values smooth out jerking. The default value is a good value for general damping along the curve. Values below 2 tend to make the action jerky, but values around 3 can be very useful for simulating a certain degree of realistic instability.

<Path_Constraint>.allowUpsideDown Boolean default: false -- boolean; Allow_Upside_Down

Set to true to avoid the situation in which an object flips when going around a vertically oriented path.

<Path_Constraint>.constantVel Boolean default: false -- boolean; Constant_Velocity

When set to true, provides a constant velocity along the path using path length interpolation. When set to false, the velocity of the object along the path varies depending on the distance between the vertices on the path.

See notes and examples in SplineShape - Vertex and Length Interpolation Methods for details on the two interpolation methods.

<Path_Constraint>.loop Boolean default: true -- boolean

If set to false, when the constrained object reaches the end of a path it can no longer move past the end point. When set to true (default), when the constrained object reaches the end of the path it loops back to the starting point.

<Path_Constraint>.relative Boolean default: false -- boolean

When set to true, the constrained object will maintain its original position. The object will follow the path(s) with an offset distance based on its original world space position. When set to false (default), the object will be moved to the path or the weighted position between the multiple paths.

<Path_Constraint>.axis Integer default: 0 -- integer

Get/set which axis of the object is aligned to the tangent of the path when the .follow property is set to true.

Possible values are:

0 - X axis

1 - Y axis

2 - Z axis

<Path_Constraint>.axisFlip Boolean default: false -- boolean; Axis_Flip

When set to false, the axis specified by the .axis property will be used. When set to true, the axis specified by the .axis property will be taken with negative sign (flipped).

Path_Constraint interfaces:

Interface: constraints

Methods

<integer>getNumTargets()

Returns the number of target nodes (paths) in the Target list.

<node>getNode <index>targetNumber

Returns the indexed node from the list of paths.

<float>getWeight <index>targetNumber

Gets the weight of the indexed path node from the list of Targets. Returns the target's weight value at the current time if the targetNumber is less then the number of targets, 0.0 otherwise.

<boolean>setWeight <index>targetNumber <float>weight

Sets the weight of the indexed node specified by targetNumber to the given value. Returns true on success, false otherwise.

<boolean>appendTarget <node>target <float>weight

Appends the specified node to the list. The default weight is 50.0. Returns true on success, false otherwise.

<boolean>deleteTarget <index>targetNumber

Delete the indexed target. Returns true on success, false otherwise.

NOTES ON PATH TARGET OBJECTS:

A path target can be any type of Shape. The spline curve (target) defines a path of motion for the constrained object. Targets can be animated using any of the standard translation, rotation, scale tools.

Setting keys on the path's sub object level, such as vertex or segment or deforming the path using modifiers and space warps will animate the path while affecting the constrained object.

If the shape contains multiple splines (for example like the Donut Shape), the first spline from the shape will be used.

EXAMPLE

path1 = Circle() --create a circular path

$Circle:Circle01 @ [0.000000,0.000000,0.000000]

path2 = Ellipse length:20 width:200 --create another path

$Ellipse:Ellipse01 @ [0.000000,0.000000,0.000000]

s = sphere radius:5 --create a sphere

$Sphere:Sphere01 @ [0.000000,0.000000,0.000000]

pc = path_constraint() --create a path constraint

Controller:Path_Constraint

s.position.controller = pc --assign it to the sphere's position

Controller:Path_Constraint

pc.path = path1 --assign the first path to the path property

$Circle:Circle01 @ [0.000000,0.000000,0.000000]

pc.path = path2 --assign the second path - it replaces the first

$Ellipse:Ellipse01 @ [0.000000,0.000000,0.000000]

pc.appendTarget path2 50 --try to append the second path

false --you cannot because it is already assigned!

pc.appendTarget path1 50 --try to append the first path

true --you can because it was not assigned to the list yet

pc.getNumTargets() --see how many paths there are on the list

2

pc.getWeight 1 --get the weight of the first path

50.0

pc.getWeight 2 --get the weight of the first path

50.0

pc.getWeight 3 --get the weight of the third path

0.0 --returns zero because there is no such path!

pc.setWeight 1 100 --set the weight of the first path to 100

true --success, the sphere moves closer to the ellipse

pc.setWeight 2 0 --set the weight of the second path to 0

true --success, the sphere moves to the ellipse

pc.path = path1 --try to assign the circle to the path

--At this point, the Circle replaces the Ellispe on the list,

--and the second entry which used to be the Curcle is removed

--because "There can be only one"!

$Circle:Circle01 @ [0.000000,0.000000,0.000000]

pc.deleteTarget 2 --try to delete the second path

false --you cannot, there is no second path anymore

pc.deleteTarget 1 --try to delete the first path (the Circle)

true

See also

Link_Constraint : Matrix3Controller

LookAt_Constraint : RotationController

Position_Constraint : PositionController

Orientation_Constraint : RotationController

Controller Functions for Use with Constraint Assignments


Position_Constraint - superclass: PositionController

Position_Constraint : PositionController

Position_Constraint - superclass: PositionController; super-superclass:MAXWrapper - 1:0 - classID: #(8217, 0)

Value > MAXWrapper > PositionController > Position_Constraint

A position constraint causes an object to follow the position of an object or the averaged position of several objects.

In order to activate, a position constraint requires an object and a target object. Once assigned the object becomes constrained to the target objects position. Animating the target's position causes the constrained object to follow

Each target has a weight value defining its influence. A value of 0 is equal to off. Any value greater than 0 will cause the target to influence the constrained object. Weight values may be animated to create effects such a ball being picked up from a table.

Multiple targets can be used to influence a constrained object. When using multiple targets, each target's weight value defines how much it influences the constrained object. For example if a sphere is Position constrained between 2 targets and each target's weight value is 100. Then the sphere will maintain an equal distance between both targets even when they are in motion. If one of the weight values is 0 and the other is 50, then the Sphere is only influenced by the target with the higher value.

Constructor

Position_Constraint ...

Properties

<Position_Constraint>.relative Boolean default: false -- boolean

Position_Constraint interfaces:

Interface: constraints

Methods

<integer>getNumTargets()

Returns the number of target nodes in the target list.

<node>getNode <index>targetNumber

Returns the indexed target node.

<float>getWeight <index>targetNumber

Returns the weight of the indexed target if the targetNumber is relevant, 0.0 otherwise.

<boolean>setWeight <index>targetNumber <float>weight

Sets the weight of the indexed node specified by targetNumber. Returns True on success, False otherwise.

<boolean>appendTarget <node>target <float>weight

Appends the specified node to the list and sets its weight to the specified value. Returns True on success, False otherwise.

<boolean>deleteTarget <index>targetNumber

Deletes the indexed target. Returns True on success, False otherwise.

EXAMPLE

posCtrl = Position_Constraint()

posConstraintInterface = posCtrl.constraints

posConstraintInterface.appendTarget $box01 20.0

node1 = posConstraintInterface.getNode 1

weight = posConstraintInterface.getWeight 1

posConstraintInterface.setWeight 1 0.0

See also

Link_Constraint : Matrix3Controller

LookAt_Constraint : RotationController

Orientation_Constraint : RotationController

Path_Constraint - superclass: PositionController

Controller Functions for Use with Constraint Assignments


Orientation_Constraint - superclass: RotationController

Orientation_Constraint : RotationController

Orientation_Constraint - superclass: RotationController; super-superclass:MAXWrapper - 2:0 - classID: #(8224, 0)

Value > MAXWrapper > RotationController > Orientation_Constraint

An Orientation Constraint causes an object's orientation to follow the orientation of an object or averaged orientation of several objects.

An Orientation Constrained object can be any type of object that inherits its rotation from a target object. Once constrained you can not rotate the object manually. You may move or scale the object as long as its not constrained in a manner that affects the object's position or scale controller.

The target object can be any type of object. The rotation of a target object drives the constrained object. Targets can be animated using any of the standard translation, rotation, scale tools.

Constructor

Orientation_Constraint ...

Properties

<Orientation_Constraint>.relative Boolean default: false -- boolean

<Orientation_Constraint>.local_world Integer default: 0 -- integer; LocalOrWorld

Orientation_Constraint interfaces:

Interface: constraints

Methods:

<integer>getNumTargets()

Returns the number of target nodes in the target list.

<node>getNode <index>targetNumber

Returns the indexed target node.

<float>getWeight <index>targetNumber

Returns the weight of the indexed target if the targetNumber is relevant, 0.0 otherwise.

<boolean>setWeight <index>targetNumber <float>weight

Sets the weight of the indexed node specified by targetNumber. Returns True on success, False otherwise.

<boolean>appendTarget <node>target <float>weight

Appends the specified node to the list and sets its weight to the specified value. Returns True on success, False otherwise.

<boolean>deleteTarget <index>targetNumber

Deletes the indexed target. Returns True on success, False otherwise.

See also

Link_Constraint : Matrix3Controller

LookAt_Constraint : RotationController

Path_Constraint : PositionController

Position_Constraint : PositionController

Controller Functions for Use with Constraint Assignments


Controller Functions for use with Constraint Assignments

These functions are defined in in stdplugs\stdscripts\ControllerFunctions.ms
and in ui\macroscripts\Macro_Constraints.mcr

Methods

AddListController OBJ Trans ListType

Checks to see if a list controller is assigned. If not, it will assign to the designated Trans using the ListType, This way it can be used for all list controllers.

AddConstraint OBJ Trans Constraint List

SetActiveController OBJ Trans Controller

AddConstraintTargets OBJ Trans Array Target

EXAMPLE

Foo = Selection as array

AddListController "Foo[1]" "Pos" "Position_List"

See also

Link_Constraint : Matrix3Controller

LookAt_Constraint : RotationController

Path_Constraint : PositionController

Position_Constraint : PositionController

Orientation_Constraint : RotationController


Layer Controllers

Value > MAXWrapper > Controllers > Layer Controllers

The following Layer Controllers are available in 3ds Max 9 and higher as part of the Animation Layers system:

Float_Layer : FloatController

Point3_Layer : Point3Controller

Point4_Layer : Point4Controller

Position_Layer : PositionController

Rotation_Layer : RotationController

Scale_Layer : ScaleController

The above Layer controllers expose the following Layer Interface:

Layer Controller Interface

The following Layer controller exposes no properties, methods or interfaces:

Layer_Output : FloatController

See also

Interface: AnimLayerManager

What was New in MAXScript in 3ds Max 9


Float_Layer : FloatController

Value > MAXWrapper > Controllers > FloatController > Float_Layer

The Float_Layer Controller is created and used by the Animation Layer system to manage layers of Float controllers. Available in 3ds Max 9 and higher.

Constructor

Class instances not creatable by MAXScript

Properties:

.average (Average_Weights) : boolean

Get/Set whether to average the layers' weights.

Float_Layer interfaces:

Interface: layer

See Layer Controller Interfaces for Properties and Methods

See also

Layer Controllers

Interface: AnimLayerManager


Point3_Layer : Point3Controller

Value > MAXWrapper > Controllers > Point3Controller > Point3_Layer

The Point3_Layer Controller is created and used by the Animation Layer system to manage layers of Point3 controllers. Available in 3ds Max 9 and higher.

Constructor

Class instances not creatable by MAXScript

Aliases

Point3_Layer

Point3layer

Properties:

.average (Average_Weights) : boolean

Get/Set whether to average the layers' weights.

.exposedX (X) : float

Get/Set the exposed X value.

.exposedY (Y) : float

Get/Set the exposed Y value.

.exposedZ (Z) : float

Get/Set the exposed Z value.

Point3_Layer interfaces:

Interface: layer

See Layer Controller Interfaces for Properties and Methods

See also

Layer Controllers

Interface: AnimLayerManager


Point4_Layer : Point4Controller

Value > MAXWrapper > Controllers > Point4Controller > Point4_Layer

The Point4_Layer Controller is created and used by the Animation Layer system to manage layers of Point4 controllers. Available in 3ds Max 9 and higher.

Constructor

Class instances not creatable by MAXScript

Aliases

Point4_Layer

Point4Layer

Properties:

.average (Average_Weights) : boolean

Get/Set whether to average the layers' weights.

.exposedX (X) : float

Get/Set the exposed X value.

.exposedY (Y) : float

Get/Set the exposed Y value.

.exposedZ (Z) : float

Get/Set the exposed Z value.

Point4_Layer interfaces:

Interface: layer

See Layer Controller Interfaces for Properties and Methods

See also

Layer Controllers

Interface: AnimLayerManager


Position_Layer : PositionController

Value > MAXWrapper > Controllers > PositionController > Position_Layer

The Position_Layer Controller is created and used by the Animation Layer system to manage layers of Position controllers. Available in 3ds Max 9 and higher.

Constructor

Class instances not creatable by MAXScript

Aliases

Position_Layer

PositionLayer

Properties:

.average (Average_Weights) : boolean

Get/Set whether to average the layers' weights.

.exposedX (X) : float

Get/Set the exposed X value.

.exposedY (Y) : float

Get/Set the exposed Y value.

.exposedZ (Z) : float

Get/Set the exposed Z value.

Position_Layer interfaces:

Interface: layer

See Layer Controller Interfaces for Properties and Methods

See also

Layer Controllers

Interface: AnimLayerManager


Rotation_Layer : RotationController

Value > MAXWrapper > Controllers > RotationController > Rotation_Layer

The Rotation_Layer Controller is created and used by the Animation Layer system to manage layers of Rotation controllers. Available in 3ds Max 9 and higher.

Constructor

Class instances not creatable by MAXScript

Aliases

Rotation_Layer

RotationLayer

Properties:

.average (Average_Weights) : boolean

Get/Set whether to average the layers' weights.

.exposedX (X) : float

Get/Set the exposed X value.

.exposedY (Y) : float

Get/Set the exposed Y value.

.exposedZ (Z) : float

Get/Set the exposed Z value.

.eulerXOrder (X_Axis_Euler_Order) : integer

Get/Set the Euler X axis order.

.eulerYOrder (Y_Axis_Euler_Order) : integer

Get/Set the Euler Y axis order.

.eulerZOrder (Z_Axis_Euler_Order) : integer

Get/Set the Euler Z axis order.

.BlendEulerAsQuat (IDS_BLEND_EULER_AS_QUAT) : boolean

Get/Set whether to blend Euler as Quaternion or not.

Rotation_Layer interfaces:

Interface: layer

See Layer Controller Interfaces for Properties and Methods

See also

Layer Controllers

Interface: AnimLayerManager


Scale_Layer : ScaleController

Value > MAXWrapper > Controllers > ScaleController > Scale_Layer

The Scale_Layer Controller is created and used by the Animation Layer system to manage layers of Scale controllers. Available in 3ds Max 9 and higher.

Constructor

Class instances not creatable by MAXScript

Aliases

Scale_Layer

ScaleLayer

Properties:

.average (Average_Weights) : boolean

Get/Set whether to average the layers' weights.

.exposedX (X) : float

Get/Set the exposed X value.

.exposedY (Y) : float

Get/Set the exposed Y value.

.exposedZ (Z) : float

Get/Set the exposed Z value.

Scale_Layer interfaces:

Interface: layer

See Layer Controller Interfaces for Properties and Methods

See also

Layer Controllers

Interface: AnimLayerManager


Layer_Output : FloatController

Value > MAXWrapper > Controllers > FloatController > Layer_Output

The Layer_Output Controller is created and used internally by the Animation Layer system. It exposes no properties, methods or interfaces. Available in 3ds Max 9 and higher.

Constructor

Class instances not creatable by MAXScript

See also

Layer Controllers

Interface: AnimLayerManager


Layer Controller Interfaces

The Layer Interface is exposed by all Animation Layer Controllers. Available in 3ds Max 9 and higher.

Layer interfaces:

Interface: layer

Properties:

<LayerController>.count : integer : Read

Get the number of layers in the controller.

<LayerController>.active : index : Read|Write

Get/Set the index of the active layer.

Methods:

<integer><LayerController>.getCount()

Returns the number of layers in the controller.

<void><LayerController>.setLayerActive <index>listIndex

listIndex Validated by Validator function

Activates the indexed layer.

<index><LayerController>.getLayerActive()

Returns the index of the current layer.

<void><LayerController>.copyLayer <index>listIndex

listIndex Validated by Validator function

Copies the indexed layer into the clipboard.

<void><LayerController>.pasteLayer <index>listIndex

listIndex Validated by Validator function

Pastes the indexed layer from the clipboard.

<void><LayerController>.deleteLayer <index>listIndex

listIndex Validated by Validator function

Deletes the indexed layer.

<TSTR by value><LayerController>.getLayerName <index>listIndex

listIndex Validated by Validator function

Returns the name of the indexed layer.

<void><LayerController>.setLayerName <index>listIndex <string>name

listIndex Validated by Validator function

Sets the name of the indexed layer to the given string.

<control><LayerController>.getSubCtrl <index>index

index Validated by Validator function

Returns the indexed sub-controller.

<float><LayerController>.getLayerWeight <index>index <time>atTime

index Validated by Validator function

Returns the weigth of the indexed layer at the given time.

<void><LayerController>.setLayerWeight <index>listIndex <time>atTime <float>weight

listIndex Validated by Validator function

Sets the weigth of the indexed layer at the given time to the specified float value.

<bool><LayerController>.getLayerMute <index>index

index Validated by Validator function

Returns true if the indexed layer is muted, false otherwise.

<void><LayerController>.setLayerMute <index>listIndex <bool>mute

listIndex Validated by Validator function

Sets the muted state of the indexed layer to the given boolean value.

<void><LayerController>.collapseLayer <index>listIndex

listIndex Validated by Validator function

Collapses the indexed layer.

<void><LayerController>.disableLayer()

Disables layers by removing all layer information from the track.

See also

Layer Controllers

Interface: AnimLayerManager


Atmospheric : MAXWrapper

The Atmospheric class lets you set up volumetric rendering effects with MAXScript. You can create atmospherics like fire and fog, access various properties on them and maintain their list of gizmo nodes such as lights and atmospheric helpers.

The classes derived directly from the Atmospheric class are described in Atmospheric Effect Types .

The properties, operators, and methods that are common to all classes derived directly from the Atmospheric class are described in Atmospheric Effects Common Properties, Operators, and Methods .

The Atmospheric class is derived from the MAXWrapper class, and inherits the properties and methods defined for that class. These properties and methods are described in MAXWrapper Common Properties, Operators, and Methods .


Atmospheric Effects Common Properties, Operators, and Methods

Value > MAXWrapper > Atmospheric Effects

Atmospherics have the following common properties and methods:

Properties

<atmos>.name String default: varies

The name as it appears in the Environment dialog list. The class name is used as the default name when no name: creation parameter is supplied.

<atmos>.numGizmo Integer -- read-only

The number of gizmos ever assigned to the atmospheric. A gizmo obtained via .getGizmo may be undefined, meaning a gizmo was added and then deleted. The atmospheric maintains an array of gizmos, and not every slot is necessarily in use. numGizmo is the size of the array, not the number of used slots.

Methods

isActive <atmos>

Returns true if the atmospheric is set to active; false otherwise.

getGizmo <atmos> <index_integer>

Retrieves the indexed gizmo node from the atmospheric. The gizmo node will be a light or atmospheric helper. The Index is 1-based.

deleteGizmo <atmos> <index_integer>

Deletes the indexed gizmo from the atmospheric.

appendGizmo <atmos> <node>

Appends the node to the gizmo list on the atmospheric. It must be of the right kind for the atmospheric, lights for volumeLights, helper gizmos for fire_effect, etc.

setActive <atmos> <boolean>

Sets the atmospheric active or inactive. If <boolean> is true the atmospheric is set to active; if false, inactive.

EXAMPLE

atmos = fire_effect density:20 outer_color:red

appendGizmo atmos $SphereGizmo01

Associated Methods

You can use the following functions for maintaining the list of atmospherics in the global rendering environment:

addAtmospheric <atmos>

Appends the atmospheric to the Atmospheric Effects list

getAtmospheric <index_integer>

Retrieves the atmospheric at the indexed position in the Atmospheric Effects list. Index is 1-based.

setAtmospheric <index_integer> <atmos>

Sets the atmospheric at the indexed position in the Atmospheric Effects list to the specified atmospheric. If the Atmospheric Effects dialog is displayed when this method is called, the displayed Atmospheric Effects list is not updated.

deleteAtmospheric <index_integer>

Deletes the atmospheric at the indexed position in the Atmospheric Effects list. Index is 1-based.

editAtmosphere <atmos> <node>

Opens the Environment dialog, and opens the rollout for the specified atmospheric if it has been added to the Atmospheric Effects list. If the specified node is a gizmo for the atmospheric, that gizmo is selected in the atmospheric’s gizmo list.

editAtmospheric <atmos> [ gizmo: <node> ]

Opens the Environment dialog, and opens the rollout for the specified atmospheric if it has been added to the Atmospheric Effects list. If the optional gizmo: argument is specified, and the specified node is a gizmo for the atmospheric, that gizmo is selected in the atmospheric’s gizmo list.

In 3ds Max 6 and higher, Calling editAtmosphere() or editAtmospheric() without an argument will open the Environment dialog.

The 3ds Max global variable numAtmospherics gives you the number of current atmospherics in the rendering environment.

NOTE:

Unlike most MAXWrapper objects, you can not copy an Atmospheric.

See also

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Atmospheric Effect Types

The following list shows the 3ds Max Atmospheric Effect types:

Fire_Effect

Fog

Volume_Fog

Volume_Light


Fire_Effect : Atmospheric

Fire_Effect - superclass: atmospheric; super-superclass:MAXWrapper - classID: #(682623303, 58464731)

Value > MAXWrapper > Atmospheric Effect > Fire_Effect

Constructor

Fire_Effect ...

Properties

<Fire_Effect>.Inner_Color Color default: (color 252 202 0) -- animatable

Sets the color of the densest part of the effect. For a typical fire, this color represents the hottest part of the flame.

<Fire_Effect>.Outer_Color Color default: (color 225 30 30) -- animatable

Sets the color of the sparsest part of the effect. For a typical fire, this color represents the cooler, dissipating edge of the flame. The fire effect is colored using a gradient between the inner and outer colors. The dense areas of the effect use the inner color and gradually blend to the outer color near the edges of the effect.

<Fire_Effect>.Smoke_Color Color default: (color 25.5 25.5 25.5) -- animatable

Sets the color of smoke for use with the Explosion option.

<Fire_Effect>.Flame_Type Integer default: 0

Sets the flame type:

0- Fire Ball (Creates round puffy flames. Fireballs are well suited for explosions.)

1- Tendril (Creates directional pointed flames with veins along their center. The flames orient along the local Z axis of the fire apparatus. Tendril creates campfire-like flames.)

<Fire_Effect>.Stretch Float default: 1.0 -- animatable

Scales flames along the Z axis of the apparatus. Stretch works best with Tendril flames, but you can use it to give Fireballs an oval shape. Values less than 1.0 compress flames, making them shorter and thicker. Values greater than 1.0 stretch flames, making them long and skinny.

<Fire_Effect>.Regularity Float default: 0.2 -- animatable

Modifies how the flames fill the apparatus. A value of 1.0 completely fills the apparatus. The effect fades near the edges of the apparatus, but the overall shape is still very noticeable. A value of 0.0 produces a very irregular effect that might occasionally reach the boundary of the apparatus, but usually gets trimmed back and is smaller.

<Fire_Effect>.Flame_Size Float default: 35.0 -- animatable

Sets the size of individual flames inside the apparatus. The size of the apparatus affects the flame size. A larger apparatus requires a larger flame size. Use a range from 15.0 to 30.0 for the best results. Large values work best for Fireballs. Small values work best for Tendrils.

<Fire_Effect>.Flame_Detail Float default: 3.0 -- animatable

Controls the amount of color change and edge sharpness seen within each flame. Low values produce smooth, fuzzy flames and render faster. High values produce patterned, sharp flames and render slower.

<Fire_Effect>.Density Float default: 15.0 -- animatable

Sets the opacity and brightness of the fire effect. The size of the apparatus affects the density. A large apparatus with the same density as a small apparatus appears more opaque and brighter because of its larger size. Low values make the effect less opaque and use more of the outer color. High values make the effect more opaque and brighten the effect by gradually replacing the inner color with white. The higher the value, the more white the center of the effect is.

<Fire_Effect>.Samples Integer default: 15 -- animatable

Sets the rate at which the effect is sampled. Higher values produce more accurate results but take longer to render.

<Fire_Effect>.phase Float default: 0.0 -- animatable

Controls the rate of change for the fire effect.

<Fire_Effect>.Drift Float default: 0.0 -- animatable

Sets how flames are rendered along the Z-axis of the fire apparatus. The value is the amount of rise in units.

<Fire_Effect>.Explosion Integer default: 0

When on, animates size, density, and color automatically based on the animation of the phase value.

0- Off

1- On

<Fire_Effect>.Smoke Integer default: 1

Controls whether or not the explosion creates smoke.

0- Off

1- On

<Fire_Effect>.Fury Float default: 1.0

Varies the churning effect of the Phase parameter. Values greater than 1.0 cause faster churning. Values less than 1.0 cause slower churning.

NOTE:

The Explosion, Smoke, and Fury properties are not available in Autodesk VIZ.

See also

Atmospheric Effects Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Setting explosion start and end times for Fire_Effect

The start and end spinners in the Explosion Setup dialog for Fire-Effect effectively install keyframes and set times and values for them in the controller for phase. You can achieve the same effect by manually constructing a phase controller and its keyframes. In the following example, the start and end times are set at 20 and 75:

EXAMPLE

c = getAtmospheric 1

-- to set up a new phase controller like the setup dialog does:

-- make and set the controller

pc = bezier_float()

c.phase.controller = pc

-- add key 1 at 20 & set properties

k = addNewKey pc 20

k.value = 0

k.inTangentType = #slow

k.outTangentType = #fast

-- add key 2 at 75 & set

k = addNewKey pc 75

k.value = 300

k.inTangentType = #slow

k.outTangentType = #fast

-- or, to change times if the keys are already there:

c.phase.keys[1].time = 20

c.phase.keys[2].time = 75


Fog : Atmospheric

Fog - superclass: atmospheric; super-superclass:MAXWrapper - classID: #(268435457, 0)

Value > MAXWrapper > Atmospheric Effect > Fog

Constructor

fog ...

Properties

<Fog>.Fog_Color Color default: (color 255 255 255) -- animatable

Get/set the fog color.

<Fog>.Use_Color_Map Integer default: 0

Get/set the state of the Use Color Map option:

Possible values are:

0 - off

1 - on

<Fog>.Use_Opacity_Map Integer default: 0

Get/set the state of the Use Opacity Map option:

Possible values are:

0 - off

1 - on

<Fog>.Fog_Background Integer default: 1

Get/set the Fog Background option.

Possible values are:

0 - off

1 - on

<Fog>.Fog_Type Integer default: 0

Get/set the Fog type.

Possible values are:

0 - Standard

1 - Layered

<Fog>.Exponential Integer default: 0

Get/set the state of the exponential fog option.

Possible values are:

0 - off

1 - on

<Fog>.Near Float default: 0.0 -- animatable, percentage

Get/set the fog near value.

<Fog>.Far Float default: 100.0 -- animatable, percentage

Get/set the fog far value.

<Fog>.Top Float default: 100.0 -- animatable

Get/set the layered fog top location.

<Fog>.Bottom Float default: 0.0 -- animatable

Get/set the layered fog bottom location.

<Fog>.Density Float default: 50.0 -- animatable

Get/set the layered fog density.

<Fog>.falloff Integer default: 2

Get/set the layered fog falloff mode.

Possible values are:

0 - Top

1 - Bottom

2 - None

<Fog>.Horizon_Noise Integer default: 0

Get/set the state of the Horizon Noise option.

Possible values are:

0 - off

1 - on

<Fog>.size Float default: 20.0 -- animatable

Get/set the noise size.

<Fog>.angle Float default: 5.0 -- animatable, angle

Get/set the noise angle.

<Fog>.phase Float default: 0.0 -- animatable

Get/set the noise phase.

NOTE:

You currently cannot assign texture maps as the color and opacity maps using MAXScript. Once these texture maps have been assigned, they are accessible as subAnims of Fog.

See also

Atmospheric Effects Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Volume_Fog : Atmospheric

Volume_Fog - superclass: atmospheric; super-superclass:MAXWrapper - classID: #(268435473, 0)

Value > MAXWrapper > Atmospheric Effect > Volume_Fog

Constructor

volume_fog ...

Properties

<Volume_Fog>.Soften_Gizmo_Edges Float default: 0.2 -- animatable

Get/set the Soften Gizmo Edges value.

<Volume_Fog>.Fog_Color Color default: (color 255 255 255) -- animatable

Get/set the fog color.

<Volume_Fog>.Exponential Integer default: 0

Get/set the state of the exponential fog option.

Possible values are:

0 - off

1 - on

<Volume_Fog>.Density Float default: 20.0 -- animatable

Get/set the Fog density value.

<Volume_Fog>.Step_Size Float default: 4.0

Get/set the Step size value.

<Volume_Fog>.Max_Steps Integer default: 100

Get/set the Maximum Steps value.

<Volume_Fog>.Fog_Background Integer default: 1

Get/set the Fog Background option.

Possible values are:

0 - off

1 - on

<Volume_Fog>.Noise_Type Integer default: 0

Get/set the Noise Type.

Possible values are:

0 - Regular

1 - Fractal

2 - Turbulence

<Volume_Fog>.invert Integer default: 0

Get/set the noise invert option.

Possible values are:

0 - off

1 - on

<Volume_Fog>.High_Threshold Float default: 1.0 -- animatable

Get/set the noise high threshold.

<Volume_Fog>.Low_Threshold Float default: 0.0 -- animatable

Get/set the noise low threshold.

<Volume_Fog>.Uniformity Float default: 0.0 -- animatable

Get/set the noise uniformity.

<Volume_Fog>.Levels Float default: 3.0 -- animatable

Get/set the noise levels.

<Volume_Fog>.size Float default: 20.0 -- animatable

Get/set the noise size.

<Volume_Fog>.phase Float default: 0.0 -- animatable

Get/set the noise phase.

<Volume_Fog>.Wind_Strength Float default: 0.0

Get/set the wind strength.

<Volume_Fog>.Wind_Direction Integer default: 0

Get/set the wind direction.

Possible values are:

0 - Front

1 - Back

2 - Left

3 - Right

4 - Top

5 - Bottom

See also

Atmospheric Effects Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Volume_Light : Atmospheric

Volume_Light - superclass: atmospheric; super-superclass:MAXWrapper - classID: #(268435474, 0)

Value > MAXWrapper > Atmospheric Effect > Volume_Light

Constructor

volume_light ...

Properties

<Volume_Light>.Fog_Color Color default: (color 255 255 255) -- animatable

<Volume_Light>.attenuation_color Color default: (color 0 0 255) -- animatable

<Volume_Light>.Exponential Integer default: 0

Exponential = 0 - off; 1 - on

<Volume_Light>.Density Float default: 5.0 -- animatable

<Volume_Light>.Max_Light Float default: 90.0 -- animatable

<Volume_Light>.Min_Light Float default: 0.0 -- animatable

<Volume_Light>.Use_Attenuation_Color Integer default: 0

Use_Attenuation_Color = 0 - off; 1 - on

<Volume_Light>.Attenuation_Color_Multiplier Float default: 2.0 -- animatable

<Volume_Light>.Filter_Shadows Integer default: 3

Filter_Shadows = 0 - Low; 1 - Medium; 2 - High; 3 - Use Light Smp Range

<Volume_Light>.Samples Integer default: 20

<Volume_Light>.Auto_Sample Integer default: 1

Auto_Sample = 0 - off; 1 - on

<Volume_Light>.Atten__Start Float default: 100.0 -- animatable

<Volume_Light>.Atten__End Float default: 100.0 -- animatable

<Volume_Light>.Noise_On Integer default: 0

Noise_On = 0 - off; 1 - on

<Volume_Light>.Noise_Amount Float default: 0.0 -- animatable

<Volume_Light>.Link_To_Light Integer default: 0

Link_To_Light = 0 - off; 1 - on

<Volume_Light>.Noise_Type Integer default: 0

Noise_Type = 0 - Regular; 1 - Fractal; 2 - Turbulence

<Volume_Light>.invert Integer default: 0

Possible values are:

0 - off

1 - on

<Volume_Light>.High_Threshold Float default: 1.0 -- animatable

<Volume_Light>.Low_Threshold Float default: 0.0 -- animatable

<Volume_Light>.Uniformity Float default: 0.0 -- animatable

<Volume_Light>.Levels Float default: 3.0 -- animatable

<Volume_Light>.size Float default: 20.0 -- animatable

<Volume_Light>.phase Float default: 0.0 -- animatable

<Volume_Light>.Wind_Strength Float default: 0.0

<Volume_Light>.Wind_Direction Integer default: 0

Possible values are:

0 - Front

1 - Back

2 - Left

3 - Right

4 - Top

5 - Bottom

See also

Atmospheric Effects Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Working with Atmospherics

The following 3ds Max system global variables give you access to the global rendering environment:

backgroundColor

Lets you get and set a Color value that defines the global rendering environment (Rendering\Environment) background color.

backgroundColorController

Lets you get and set a Controller value that defines the global rendering environment (Rendering\Environment) background color controller.

ambientColor

Lets you get and set a Color value that defines the global rendering environment (Rendering\Environment) ambient lighting color.

ambientColorController

Lets you get and set a Controller value that defines the global rendering environment (Rendering\Environment) ambient lighting color controller.

environmentMap

Lets you get and set a TextureMap value that defines the global rendering environment (Rendering\Environment) environment map.

useEnvironmentMap

Lets you get and set the global rendering environment (Rendering\Environment) Use Map value. A Boolean value - true if Use Map is on, false if off.

lightTintColor

Lets you get and set a Color value that defines the global rendering environment (Rendering\Environment) Global Lighting Tint color.

lightTintColorController

Lets you get and set a Controller value that defines the global rendering environment (Rendering\Environment) Global Lighting Tint color controller.

lightLevel

Lets you get and set a Float value that defines the global rendering environment (Rendering\Environment) Global Lighting Tint Level.

lightLevelController

Lets you get and set a Controller value that defines the global rendering environment (Rendering\Environment) Global Lighting Tint Level controller.

numAtmospherics

Contains an Integer value that defines the number of atmospheric events, as shown in Rendering\Environment. This variable is read-only.

The following methods set options in the global rendering environment:

getUseEnvironmentMap()

Lets you get the global rendering environment (Rendering\Environment)

setUseEnvironmentMap <boolean>

Lets you set the global rendering environment (Rendering\Environment). Use Map value. If <boolean> is true Use Map is turned on, false it is turned off.

setBackGround [<time>] ( <point3> | <color> )

Lets you set a Point3 or Color value that defines the global rendering environment (Rendering > Environment) background color at the specified time. Each component of the Point3 value is in the range of 0 to 255. If the time value is not specified, the current MAXScript time is used.

getBackGround [<time>]

Get method that parallels setBackGround method. If the time value is not specified, the current MAXScript time is used.

setBackGroundController ( <color_controller> | <point3_controller> )

Assigns the specified controller as the global rendering environment (Rendering\Environment) background color controller.

getBackGroundController()

Returns the global rendering environment (Rendering\Environment) background color controller.

EXAMPLES

ambientColor = color 10 10 25

environmentMap = bitmapTexture filename:"foo.bmp"

The following script shows an example of creating Volume Fog and Volume Light atmospherics.

SCRIPT

-- Atmospheric Effects Test Bed

-- create a geosphere, sphere gizmo, onnilight, and targetted camera

geos=geosphere radius:24

sgizmo=spheregizmo radius:40

omni=omnilight farAttenStart:20 farAttenEnd:100 useFarAtten:true v=255

cam=targetcamera pos:[150,-50,100] target:(targetobject())

--

-- put a material on the geosphere

geos.material=standard()

geos.material.selfIllumColor = color 238 241 2

--

-- create a Volume Fog atmospheric. Set name so it has one in Environment dialog.

vf=volume_fog name:"VolFog" soften_gizmo_edges:0.7 exponential:1 density:75

vf.fog_color=color 255 157 0

vf.noise_type=2

vf.size=4

appendGizmo vf sgizmo

addAtmospheric vf

--

-- create a Volume Light atmospheric. Set name so it has one in Environment dialog.

vl=volume_light name: "VolLight" exponential:1 density:20

vl.fog_color=color 255 30 0

vl.attenuation_color= color 255 162 0

vl.Use_Attenuation_Color=1

vl.noise_on=1

vl.Noise_Amount=1

vl.size=5

vl.noise_type=2

appendGizmo vl omni

addAtmospheric vl

--

-- and render away…

renderWidth=320

renderHeight=200

render camera:cam


BitmapIO Classes

Autodesk_Animator_Flic : BitmapIO

Class instances not creatable by MAXScript, no interfaces or properties exposed.

AVI : BitmapIO

Class instances not creatable by MAXScript, no interfaces or properties exposed.

BMP : BitmapIO

The BMP BitmapIO class provides a function published interface for bmp I/O that gives access to the type of image to be saved.

CIN : BitmapIO

Class instances not creatable by MAXScript, no interfaces or properties exposed.

CMB : BitmapIO

Class instances not creatable by MAXScript, no interfaces or properties exposed.

DDS : BitmapIO

Class instances not creatable by MAXScript, no interfaces or properties exposed.

EPS_Image : BitmapIO

Class instances not creatable by MAXScript, no interfaces or properties exposed.

GIF : BitmapIO

Class instances not creatable by MAXScript, no interfaces or properties exposed.

HDRI : BitmapIO

Class instances not creatable by MAXScript, no interfaces or properties exposed.

IFL : BitmapIO

Class instances not creatable by MAXScript, no interfaces or properties exposed.

JPEG : BitmapIO

The JPEG BitmapIO class provides a function published interface for jpeg I/O that gives access to the type of image to be saved.

MaxOpenEXR : BitmapIO

The MaxOpenEXR BitmapIO class provides a function published interface for OpenEXR I/O that gives access to the image settings.

Portable_Network_Graphics : BitmapIO

The Portable_Network_Graphics BitmapIO class provides a function published interface for png I/O that gives access to the type of image to be saved.

PSD_I_O : BitmapIO

Class instances not creatable by MAXScript, no interfaces or properties exposed.

QTime : BitmapIO

Class instances not creatable by MAXScript, no interfaces or properties exposed.

Rgb : BitmapIO

Class instances not creatable by MAXScript, no interfaces or properties exposed.

RLA : BitmapIO

The RLA BitmapIO class provides a function published interface for RLA I/O that gives access to the settings of the image format to be saved.

RPF : BitmapIO

The RPF BitmapIO class provides a function published interface for RPF I/O that gives access to the settings of the image format to be saved.

Targa : BitmapIO

The Targa BitmapIO class provides a function published interface for tga I/O that gives access to the type of image to be saved.

TIF : BitmapIO

The TIF BitmapIO class provides a function published interface for tiff I/O that gives access to the type of image to be saved.

YUV : BitmapIO

Class instances not creatable by MAXScript, no interfaces or properties exposed.


BMP interfaces:

BMP - superclass: BitmapIO; super-superclass:MAXWrapper - classID: #(11, 0)

Constructor

Class instances not creatable by MAXScript

Aliases:

BMP

bmpio

BMP interfaces

Interface: ibmpio

Methods

bmp.getType()

getType enums: {#noType|#paletted|#true24}

This method returns the format type, which is one of the enum types. Note: #noType is equivalent to #true24

bmp.setType <enum>type

type enums: {#noType|#paletted|#true24}

This method allows you to set the format type. Note: #noType is equivalent to #true24.

type: The type, which is one of the enum types.

The methods in this interface can be accessed by specifying the class, interface, and method. For example: bmp.ibmpio.getType().

MAXScript will automatically search through a class’ interfaces for a property or method name if the name isn’t found as a class method or property. This allows you to say: bmp.getType().

Providing the fully qualified name of the method results in faster script execution. Providing the fully qualified name is also safer, as at some point in time another interface could be specified for the class, and a method or property with the same name could be defined in that interface. Which method or property is used would then be dependent on the order in which the interfaces were searched for the method or property name.

See also Class IBitmapIO_Bmp, in the SDK Help file accompanying this product.

See also

BitmapIO Classes

JPEG : BitmapIO

Portable_Network_Graphics : BitmapIO

Targa : BitmapIO

TIF : BitmapIO


JPEG interfaces

JPEG - superclass: BitmapIO; super-superclass:MAXWrapper - classID: #(12, 0)

Constructor

Class instances not creatable by MAXScript

Aliases:

JPEG

jpegio

JPEG interfaces

Interface: ijpegio

Methods

getQuality()

This method returns the quality level of the output image.

setQuality <integer>quality

This method allows you to set the quality level of the output image.

quality: The quality level.

getSmoothing()

This method returns the smoothing level of the output image.

setSmoothing <integer>smoothing

This method allows you set the smoothing level of the output image.

smoothing: The smoothing level.

The methods in this interface can be accessed by specifying the class, interface, and method. For example: jpeg.ijpegio.getType().

MAXScript will automatically search through a class’ interfaces for a property or method name if the name isn’t found as a class method or property. This allows you to say: jpeg.getType().

Providing the fully qualified name of the method results in faster script execution. Providing the fully qualified name is also safer, as at some point in time another interface could be specified for the class, and a method or property with the same name could be defined in that interface. Which method or property is used would then be dependent on the order in which the interfaces were searched for the method or property name.

See also Class IBitmapIO_Jpeg, in the SDK Help file accompanying this product.

See also

BitmapIO Classes

BMP : BitmapIO

Portable_Network_Graphics : BitmapIO

Targa : BitmapIO

TIF : BitmapIO


MaxOpenEXR Interfaces

The MaxOpenEXR Interface provides access to the Bitmap I/O filter which lets you save and load bitmaps in the OpenEXR file format developed by ILM. Available in 3ds Max 8 and higher.

Constructor

Class instances not creatable by MAXScript

Aliases:

MaxOpenEXR

exrio

MaxOpenEXR interfaces:

Interface: iexrio

Methods:

<float>GetVersion()

Returns the version of the OpenEXR Bitmap I/O plug-in.

OpenEXR Saver

<float>GetSaveExponent()

Returns the Exponent value used by the OpenEXR Saver.

<void>SetSaveExponent <float>exponent

Sets the Exponent value used by the OpenEXR Saver.

<bool>GetSavePreMultAlpha()

Returns the state of the Pre-Multiply Alpha option.

<void>SetSavePreMultAlpha <bool>PreMultEnabled

Sets the state of the Pre-Multiply Alpha option.

<bool>GetSaveRed()

Returns the state of the Save Red Channel option.

<void>SetSaveRed <bool>saveRed

Sets the state of the Save Red Channel option.

<integer>GetSaveGreen()

Returns the state of the Save Green Channel option.

<void>SetSaveGreen <bool>saveGreen

Sets the state of the Save Green Channel option.

<integer>GetSaveBlue()

Returns the state of the Save Blue Channel option.

<void>SetSaveBlue <bool>saveBlue

Sets the state of the Save Blue Channel option.

<bool>GetSaveAlpha()

Returns the state of the Save Alpha option.

<void>SetSaveAlpha <bool>saveAlpha

Sets the state of the Save Alpha option.

<integer>GetSaveBitDepth()

Returns the bit depth of the OpenEXR Saver. Possible return values are:

0 - "Integer - 8 bits per channel"

1 - "Half Float - 16 bits per channel"

2 - "Float - 32 bits per channel"

<void>SetSaveBitDepth <integer>saveBitDepth

Sets the bit depth of the OpenEXR Saver.
Possible argument values are:

0 - "Integer - 8 bits per channel"

1 - "Half Float - 16 bits per channel"

2 - "Float - 32 bits per channel"

<integer>GetSaveCompressionType()

Returns the compression type used by the OpenEXR Saver.
Possible return values are:

0 - None

1 - Run Length Encoding (RLE)

2 - Zip (per scanline)

3 - Zip (16 scanline block)

4 - PIZ (wavelet compression)

<void>SetSaveCompressionType <integer>saveCompressionType

Sets the compression type used by the OpenEXR Saver.
Possible argument values are:

0 - None

1 - Run Length Encoding (RLE)

2 - Zip (per scanline)

3 - Zip (16 scanline block)

4 - PIZ (wavelet compression)

<bool>GetSaveUseExponent()

Returns the state of the Exponent checkbox in the OpenEXR Saver.

<void>SetSaveUseExponent <bool>saveUseExponent

Sets the state of the Exponent checkbox in the OpenEXR Saver.

<bool>GetSaveUseRealPix()

Returns whether to save using RealPixel format.

<void>SetSaveUseRealPix <bool>saveUseRealPix

Sets whether to save using RealPixel format.

<bool>GetSaveUseDefaults()

Returns the state of the Use Defaults flag in the OpenEXR Saver. When set to true, the default settings will be used and user-defined settings will be ignored.

<void>SetSaveUseDefaults <bool>UseSaveDefaults

Sets the state of the Use Defaults flag in the OpenEXR Saver.

<integer>GetSaveUseFrameNumDigits()

<void>SetSaveUseFrameNumDigits <integer>useFrameNumDigits

<integer>GetSaveFrameNumDigits()

<void>SetSaveFrameNumDigits <integer>frameNumDigits

<integer>GetNetServerSaveOverrideParams()

<void>SetNetServerSaveOverrideParams <integer>NetServerSaveOverrideEnable

OpenEXR Loader

<integer>GetLoadStorageFormat()

Returns the Storage Buffer Format settings in the OpenEXR Loader.
Possible return values are:

0 - Integer - 8 bits/channel (RGB)

1 - Integer - 8 bits/channel (RGBA)

2 - Integer - 16 bits/channel (RGB)

3 - Integer - 16 bits/channel (RGBA)

4 - LogLuv24 Float (RGB)

5 - LogLuv24A Float (RGBA)

6 - LogLuv32 Float (RGB)

7 - RealPixel Float (RGB)

8 - 32bit Floating-Point (RGBA)

<void>SetLoadStorageFormat <integer>storageFormat

Sets the Storage Buffer Format settings in the OpenEXR Loader.
Possible argument values are:

0 - Integer - 8 bits/channel (RGB)

1 - Integer - 8 bits/channel (RGBA)

2 - Integer - 16 bits/channel (RGB)

3 - Integer - 16 bits/channel (RGBA)

4 - LogLuv24 Float (RGB)

5 - LogLuv24A Float (RGBA)

6 - LogLuv32 Float (RGB)

7 - RealPixel Float (RGB)

8 - 32bit Floating-Point (RGBA)

<bool>GetLoadDoColorTransform()

Returns the state of the Color Transform checkbutton in the OpenEXR Loader.

<void>SetLoadDoColorTransform <bool>doLoadColorTransform

Sets the state of the Color Transform checkbutton in the OpenEXR Loader.

<float>GetLoadExponent()

Returns the Exponent value used by the OpenEXR Loader.

<void>SetLoadExponent <float>exponent

Sets the Exponent value used by the OpenEXR Loader.

<float>GetLoadBlackPoint()

Returns the Bloack Point value in the OpenEXR Loader. Default is 0.0.

<void>SetLoadBlackPoint <float>blackPoint

Sets the Bloack Point value in the OpenEXR Loader.

<float>GetLoadWhitePoint()

Returns the White Point value in the OpenEXR Loader. Default is 1.0.

<void>SetLoadWhitePoint <float>whitePoint

Sets the White Point value in the OpenEXR Loader.

<float>GetLoadRGBLevel()

Returns the RGB Level value in the OpenEXR Loader. Default is 1.0.

<void>SetLoadRGBLevel <float>rgbLevel

Sets the RGB Level value in the OpenEXR Loader.

<float>GetLoadRGBOffset()

Returns the RGB Offset value in the OpenEXR Loader. Default is 0.0.

<void>SetLoadRGBOffset <float>rgbOffset

Sets the RGB Offset value in the OpenEXR Loader.

<integer>GetLoadUseDefaults()

Returns the state of the Use Defaults flag in the OpenEXR Loader. When set to true, the default settings will be used and user-defined settings will be ignored.

<void>SetLoadUseDefaults <bool>UseLoadDefaults

Sets the state of the Use Defaults flag in the OpenEXR Loader.

<integer>GetNetServerLoadOverrideParams()

<void>SetNetServerLoadOverrideParams <integer>NetServerLoadOverrideEnable

OpenEXR Attributes and Channels

In releases prior to 3ds Max 9, accessing various settings through this Interface used to reset the OpenEXR UI to defaults not found in the Plugcfg/openexr.ini file.

The following 24 MAXScript methods available in 3ds Max 9 and higher expose the Attributes and Channels. This way, the OpenEXR output can be completely customized via MAXScript.

<integer>AddAttrib <enum>Type

Type enums: {#comment|#computerName|#systemTime|#localTime|#versionOpenEXR|#version3dsMax}

Add the specified attribute type to the OpenEXR output. Returns the index of the attribute, or 0 if the attribute with this type already existed. Available in 3ds Max 9 and higher.

<boolean>RemoveAttrib <integer>Index

Removes the indexed attribute from the OpenEXR output. Returns true on success, false otherwise. Available in 3ds Max 9 and higher.

<void>RemoveAllAttribs()

Removes all attributes from the OpenEXR output. Available in 3ds Max 9 and higher.

<integer>GetAttribIndex <enum>Type

Type enums: {#comment|#computerName|#systemTime|#localTime|#versionOpenEXR|#version3dsMax}

Returns the index of the specified attribute type from the OpenEXR output, or 0 if an attribute of this type does not exist. Available in 3ds Max 9 and higher.

<integer>GetNumAttribs()

Returns the number of attributes in the OpenEXR output. Available in 3ds Max 9 and higher.

<enum>GetAttribType <integer>Index

GetAttribType enums: {#comment|#computerName|#systemTime|#localTime|#versionOpenEXR|#version3dsMax}

Returns the type of the indexed attributes from the OpenEXR output. Available in 3ds Max 9 and higher.

<string>GetAttribFileTag <integer>Index

Returns the file tag of the indexed attribute as a string. Available in 3ds Max 9 and higher.

<boolean>SetAttribFileTag <integer>Index <string>File Tag

Sets the file tag of the indexed attribute to the specified string. Available in 3ds Max 9 and higher.

<boolean>IsAttribActive <integer>Index

Returns the active state of the indexed attribute. Available in 3ds Max 9 and higher.

<boolean>SetAttribActive <integer>Index <boolean>State

Sets the active state of the indexed attribute to the given boolean value. Returns true on success, false on failure (for example if the indexed attribure does not exist). Available in 3ds Max 9 and higher.

<string>GetAttribContent <integer>Index

Returns the content of the indexed attribute. Available in 3ds Max 9 and higher.

<boolean>SetAttribContent <integer>Index <string>Content

Sets the content of the indexed attribute to the given string value. Available in 3ds Max 9 and higher.

EXAMPLES:

exrio.AddAttrib #comment --add a new comment attribute

1 --it will have index 1

exrio.GetAttribContent 1 --check out the content

undefined --there is no content yet

exrio.SetAttribContent 1 "Test 1,2,3" --set the content -

true --the operation succeeded.

exrio.GetAttribContent 1 --get the content again to verify -

"Test 1,2,3" --it is what we told it to be

exrio.AddAttrib #computerName --add another attribute

2 --it will have index 2

exrio.GetNumAttribs() --check the number of attribures -

2 --there are 2 attributes now.

exrio.GetAttribIndex #comment --get the index of the comment

1 --the comment is the first attribute

exrio.GetAttribType 1 --get the type of the first attribute

#comment --it is the comment attribute

exrio.RemoveAttrib 1 --remove the first attribute

true --success!

exrio.GetNumAttribs() --check the number again -

1 --there is one left

exrio.GetAttribIndex #comment --try to get the comment's index

0

exrio.GetAttribType 1 --get the type of the first attribute

#computername

exrio.GetAttribFileTag 1 --get the file tag of the first attribute

"computerName"

exrio.SetAttribFileTag 1 "workstation" --change the file tag

true

exrio.GetAttribFileTag 1 --get the new file tag

"workstation"

exrio.SetAttribContent 1 "my computer" --try to set the content

false --this is a system attribute that cannot be set by the user

exrio.IsAttribActive 1 --check whether it is active -

true --it is!

exrio.SetAttribActive 1 false --deactivate it

true --successfully deactivated

exrio.IsAttribActive 1 --check again -

false --it is off now.

exrio.RemoveAllAttribs() --remove all attributes...

OK

exrio.GetNumAttribs() --check the attribure count -

0 --none left!

<integer>AddChannel <enum>Type

Type enums: {#ZBuffer|#objectID|#materialID|#nodeRenderID|#UVCoords|#velocity|#normal|#coverage}

Adds a channel of the given type. Returns the index of the channel. Available in 3ds Max 9 and higher.

<boolean>RemoveChannel <integer>ChannelIndex

Removes the indexed channel. Returns true on success, false othewise. Available in 3ds Max 9 and higher.

<void>RemoveAllChannels()

Removes all channels. Available in 3ds Max 9 and higher.

<integer>GetChannelIndex <enum>Type

Type enums: {#ZBuffer|#objectID|#materialID|#nodeRenderID|#UVCoords|#velocity|#normal|#coverage}

Returns the index of the channel with the specified type. Returns 0 if the channel of the specified type does not exist.

<integer>GetNumChannels()

Returns the number of channels. Available in 3ds Max 9 and higher.

<enum>GetChannelType <integer>Index

GetChannelType enums: {#ZBuffer|#objectID|#materialID|#nodeRenderID|#UVCoords|#velocity|#normal|#coverage}

Returns the type of the indexed channel. Available in 3ds Max 9 and higher.

<string>GetChannelFileTag <integer>Index

Returns the file tage of the indexed channel. Available in 3ds Max 9 and higher.

<boolean>SetChannelFileTag <integer>Index <string>File Tag

Sets the file tage of the indexed channel to the specified string value. Available in 3ds Max 9 and higher.

<boolean>IsChannelActive <integer>Index

Returns true if the indexed channel is active, false otherwise. Available in 3ds Max 9 and higher.

<boolean>SetChannelActive <integer>Index <boolean>State

Sets the active state of the the indexed channel to the given boolean value. Available in 3ds Max 9 and higher.

<enum>GetChannelDataType <integer>Index

GetChannelDataType enums: {#Uint|#Half|#Float}

Returns the data type of the indexed channel. Available in 3ds Max 9 and higher.

<boolean>SetChannelDataType <integer>Index <enum>DataType

DataType enums: {#Uint|#Half|#Float}

Sets the data type of the indexed channel to the specified type. Available in 3ds Max 9 and higher.

EXAMPLE

exrio.GetNumChannels() --check the number of channels

0 --by default there are none

exrio.AddChannel #ZBuffer --add a Z buffer channel

1 --it will have index 1

exrio.AddChannel #materialID --add a material ID channel

2 --it will have index 2

exrio.GetNumChannels() --check the number of channels again

2 --now we have two

exrio.GetChannelIndex #ZBuffer --get the index of the Z buffer

1 --it is channel 1

exrio.GetChannelIndex #materialID --get the index of the mat. ID

2 --it is channel 2

exrio.GetChannelType 1 --get the type of channel 1

#zBuffer --it is the Z buffer

exrio.GetChannelType 2 --get the type of channel 2

#materialID --it is the material ID

exrio.GetChannelFileTag 1 --get the file tag of channel 1

"Z" --the file tag is "Z"

exrio.GetChannelFileTag 2 --get the file tag of channel 2

"materialID" --the file tag is "materialID"

exrio.SetChannelFileTag 1 "Z-Buffer" --set the file tag of channel 1

true --the operation was successful

exrio.GetChannelFileTag 1 --get the file tag of channel 1 again

"Z-Buffer" --it was changed as requested

exrio.IsChannelActive 1 --see whether the channel 1 is active

true --it is

exrio.SetChannelActive 1 false --deactivate channel 1

true --it was deactivated successfully

exrio.IsChannelActive 1 --check again the active state...

false --now it is deactivated

exrio.GetChannelDataType 1 --get the data type of channel 1

#Half --it is Half Float

exrio.GetChannelDataType 2 --get the data type of channel 2

#Uint --it is Unsigned Integer

exrio.SetChannelDataType 1 #Float --change channel 1 to Float type

true --change was successful

exrio.GetChannelDataType 1 --check the new type to verify

#float --it is indeed Float type now.

exrio.RemoveChannel 1 --remove the first channel

true --removal was a success

exrio.GetChannelType 1 --get the type of the new channel 1

#materialID --it is the previous channel 2

exrio.RemoveAllChannels() --remove all channels

OK

exrio.GetNumChannels() --and check the number of channels

0 --all have been removed!

See also

BitmapIO Classes


Portable_Network_Graphics interfaces:

Portable_Network_Graphics

Portable_Network_Graphics - superclass: BitmapIO; super-superclass:MAXWrapper - classID: #(1809998075, 0)

Constructor

Class instances not creatable by MAXScript

Aliases:

pngio

Portable_Network_Graphics

Portable_Network_Graphics Interfaces

Interface: ipngio

Methods:

getType()

getType enums: {#paletted|#true24|#true48|#gray8|#gray16}

This method returns the bitmap type.

setType <enum>type

enums: {#paletted|#true24|#true48|#gray8|#gray16}

This method allows you to set the bitmap type.

getAlpha()

This method returns True if the alpha flag is set, otherwise False.

setAlpha <boolean>useAlpha

This method allows you to set the alpha flag.

useAlpha: True to set the alpha flag, otherwise False.

getInterlaced()

This method returns True if the interlaced flag is set, otherwise False.

setInterlaced <boolean>Interlaced

This method allows you to set the interlaced flag.

Interlaced: True to set the interlaced flag, otherwise False.

The methods in this interface can be accessed by specifying the class, interface, and method. For example: portable_network_graphics.ipngio.getType().

MAXScript will automatically search through a class’ interfaces for a property or method name if the name isn’t found as a class method or property. This allows you to say: portable_network_graphics.getType().

Providing the fully qualified name of the method results in faster script execution. Providing the fully qualified name is also safer, as at some point in time another interface can be could be specified for the class, and a method or property with the same name could be defined in that interface. Which method or property is used would then be dependent on the order in which the the interfaces were searched for the method or property name.

See Also In the SDK Help file accompanying this product

Class IBitmapIO_Png

See also

BitmapIO Classes

BMP : BitmapIO

JPEG : BitmapIO

Targa : BitmapIO

TIF : BitmapIO


Targa interfaces:

Targa : BitmapIO

Targa - superclass: BitmapIO; super-superclass:MAXWrapper - classID: #(6, 0)

Constructor

Class instances not creatable by MAXScript

Aliases:

Targa

tgaio

Targa interfaces

Interface: itgaio

Methods

Targa.getColorDepth()

This method returns the color depth, which would be 16, 24, or 32.

Targa.setColorDepth <integer>colorDepth

This method allows you to set the color depth.

colorDepth: The color depth, being either 16, 24, or 32.

Targa.getCompressed()

This method returns True if the compression flag is set, otherwise False.

Targa.setCompressed <boolean>compression

This method allows you to set the compression flag.

compression: True to set the compression flag, otherwise False.

Targa.getAlphaSplit()

This method returns True if the alpha split flag is set, otherwise False.

Targa.setAlphaSplit <boolean>alphaSplit

This method allows you to set the alpha split flag.

alphaSplit: True to set the alpha split flag, otherwise False.

Targa.getPreMultAlpha()

This method returns True if the premultiplied alpha flag is set, otherwise False.

Targa.setPreMultAlpha <boolean>preMultAlpha

This method allows you to set the premultiplied alpha flag.

preMultAlpha: True to set the premultiplied alpha flag, otherwise False.

<string> Targa.getAuthor()

<void> Targa.setAuthor <string>author

The author name will be clamped to 40 characters

<string>Targa.getJobName()

<void>Targa.setJobName <string>jobname

The Job name will be clamped to 40 characters

<string>Targa.getComment1()

<void>Targa.setComment1 <string>comment

<string>Targa.getComment2()

<void>Targa.setComment2 <string>comment

<string>Targa.getComment3()

<void>Targa.setComment3 <string>comment

<string>Targa.getComment4()

<void>Targa.setComment4 <string>comment

The Comments will be clamped to 80 characters

The methods in this interface can be accessed by specifying the class, interface, and method. For example: targa.itgaio.getType().

MAXScript will automatically search through a class’ interfaces for a property or method name if the name isn’t found as a class method or property. This allows you to say: targa.getType().

Providing the fully qualified name of the method results in faster script execution. Providing the fully qualified name is also safer, as at some point in time another interface can be could be specified for the class, and a method or property with the same name could be defined in that interface. Which method or property is used would then be dependent on the order in which the the interfaces were searched for the method or property name.

See also Class IBitmapIO_Tga, in the SDK Help file accompanying this product.

See also

BitmapIO Classes

BMP : BitmapIO

JPEG : BitmapIO

Portable_Network_Graphics : BitmapIO

TIF : BitmapIO


TIF interfaces:

TIF : BitmapIO

TIF - superclass: BitmapIO; super-superclass:MAXWrapper - classID: #(64530, 0)

The TIF BitmapIO class provides a function published interface for tiff I/O that gives access to the settings of the image format to be saved.

Constructor

Class instances not creatable by MAXScript

Aliases:

TIF

tifio

TIF interfaces

Interface: itifio

Methods:

<enum>TIF.getType()

getType enums: {#mono | #color | #logL | #logLUV | #color16 }

This method returns the format type, which is one of the enum types.

The type #color16 was added in 3ds Max 8 to provide access to the new 16-bit color option.

<void>TIF.setType <enum>type

type enums: {#mono | #color | #logL | #logLUV | #color16 }

This method allows you to set the format type.

The type #color16 was added in 3ds Max 8 to provide access to the new 16-bit color option.

<enum>TIF.getShowControl()

getShowControl enums: {#true | #false}

<void>TIF.setShowControl <enum>showControl

showControl enums: {#true | #false}

<enum>TIF.getCompression()

getCompression enums: {#none | #packBits}

<void>TIF.setCompression <enum>compression

compression enums: {#none | #packBits}

<enum>TIF.getAlpha()

getAlpha enums: {#true | #false}

<void>TIF.setAlpha <enum>onOff

onOff enums: {#true | #false}

<float>TIF.getDPI()

This method returns the DPI resolution.

<void>TIF.setDPI <float>dpi

This method allows you to set the DPI resolution

The methods in this interface can be accessed by specifying the class, interface, and method. For example: tif.itifio.getType().

MAXScript will automatically search through a class’ interfaces for a property or method name if the name isn’t found as a class method or property. This allows you to say: tif.getType().

Providing the fully qualified name of the method results in faster script execution. Providing the fully qualified name is also safer, as at some point in time another interface could be specified for the class, and a method or property with the same name could be defined in that interface. Which method or property is used would then be dependent on the order in which the interfaces were searched for the method or property name.

See also

BitmapIO Classes

BMP : BitmapIO

JPEG : BitmapIO

Portable_Network_Graphics : BitmapIO

Targa : BitmapIO


RLA : BitmapIO

The RLA BitmapIO class provides a function published interface for RLA I/O that gives access to the settings of the image format to be saved.

As with all FP interfaces, you can access the interface properties directly without explicitly supplying the interface name, for example rla.colorDepth is the same but shorter than rla.iRLAio.colorDepth

Interfaces:

Interface: iRLAio

Properties:

.colorDepth : integer : Read|Write

Get/Set the color depth in bits per channel. Possible values are 8, 16 and 32.

.alpha : boolean : Read|Write

Enable/Disable the saving of alpha channel.

.premultAlpha : boolean : Read|Write

Enable/Disable premultiplied alpha.

.description : string : Read|Write

Get/Set the file description string.

.author : string : Read|Write

Get/Set the author string.

.zChannel : boolean : Read|Write

Get/Set Z-buffer channel saving.

.mtlIDChannel : boolean : Read|Write

Enable/Disable material ID channel saving.

.nodeIDChannel : boolean : Read|Write

Enable/Disable node ID channel saving.

.uvChannel : boolean : Read|Write

Enable/Disable texture coordinates channel saving.

.normalChannel : boolean : Read|Write

Enable/Disable normal vector channel saving.

.realpixChannel : boolean : Read|Write

Enable/Disable non-clamped color channel saving.

.coverageChannel : boolean : Read|Write

Enable/Disable coverage channel saving.

EXAMPLE

x = rla.colorDepth --color depth value of 8, 16, or 32

rla.colorDepth = 16 --set color depth to 16 bpp

rla.description = "First Revision" --set the file description string

rla.author = "Bobo" --set the author name string

rla.zChannel = true --enable Z-Buffer saving

See also

BitmapIO Classes

BMP : BitmapIO

JPEG : BitmapIO

Portable_Network_Graphics : BitmapIO

Targa : BitmapIO

RPF : BitmapIO


RPF : BitmapIO

The RPF BitmapIO class provides a function published interface for RPF I/O that gives access to the settings of the image format to be saved.

As with all FP interfaces, you can access the interface properties directly without explicitly supplying the interface name, for example rpf.colorDepth is the same but shorter than rpf.iRPFio.colorDepth

Interfaces:

Interface: iRPFio

Properties:

.colorDepth : integer : Read|Write

Get/Set the color depth in bits per channel. Possible values are 8, 16 and 32.

.alpha : boolean : Read|Write

Enable/Disable the saving of alpha channel.

.premultAlpha : boolean : Read|Write

Enable/Disable premultiplied alpha.

.description : string : Read|Write

Get/Set the file description string.

.author : string : Read|Write

Get/Set the author string.

.zChannel : boolean : Read|Write

Get/Set Z-buffer channel saving.

.mtlIDChannel : boolean : Read|Write

Enable/Disable material ID channel saving.

.nodeIDChannel : boolean : Read|Write

Enable/Disable node ID channel saving.

.uvChannel : boolean : Read|Write

Enable/Disable texture coordinates channel saving.

.normalChannel : boolean : Read|Write

Enable/Disable normal vector channel saving.

.realpixChannel : boolean : Read|Write

Enable/Disable non-clamped color channel saving.

.coverageChannel : boolean : Read|Write

Enable/Disable coverage channel saving.

.nodeRenderIDChannel : boolean : Read|Write

Enable/Disable node render ID channel saving.

.colorChannel : boolean : Read|Write

Enable/Disable color channel saving.

.transpChannel : boolean : Read|Write

Enable/Disable transparency channel saving.

.velocChannel : boolean : Read|Write

Enable/Disable velocity channel saving.

.weightChannel : boolean : Read|Write

Enable/Disable sub-pixel weight channel saving.

.maskChannel : boolean : Read|Write

Enable/Disable sub-pixel mask channel saving.

EXAMPLE

x = rpf.colorDepth --color depth value of 8, 16, or 32

rpf.colorDepth = 32 --set color depth to 8bpp

rpf.description = "Final Rendering" --set the file description string

rpf.author = "Da Masta of Pixelz" --set the author name string

rpf.zChannel = true --enable Z-Buffer saving

See also

BitmapIO Classes

BMP : BitmapIO

JPEG : BitmapIO

Portable_Network_Graphics : BitmapIO

Targa : BitmapIO

RLA : BitmapIO


RenderEffect : MAXWrapper

The RenderEffect class lets you set up rendering effects with MAXScript. You can create render effects such as blur, color balance, and film grain effect.

The classes derived directly from the RenderEffect class are described in Render Effect Types .

The properties, operators, and methods that are common to all classes derived directly from the RenderEffect class are described in Render Effects Common Properties, Operators, and Methods .

The RenderEffect class is derived from the MAXWrapper class, and inherits the properties and methods defined for that class. These properties and methods are described in MAXWrapper Common Properties, Operators, and Methods .


Render Effects Common Properties, Operators, and Methods

Value > MAXWrapper > RenderEffect

Render Effects have the following common properties and methods:

Properties

<renderEffect>.name String default: varies

The name as it appears in the Rendering/Effects dialog list. The class name is used as the default name when no name: creation parameter is supplied.

Methods

addEffect <renderEffect>

Adds the render effect to the Rendering/Effects dialog list.

setActive <renderEffect> <boolean>

Sets the render effect active or inactive. If <boolean> is true the render effect is set to active; if false, inactive.

Associated Methods and Global Variables

You can use the following global variables and functions for maintaining the list of render effects in the Rendering/Effects dialog list:

IsActive <renderEffect>

Returns true if the render effect is set to active; false otherwise.

numEffects

Global variable containing an Integer value that defines the number of current render effects defined in the Rendering/Effects dialog list. This variable is read-only.

getEffect <index_integer>

Retrieves the render effect at the indexed position in the Rendering/Effects dialog list. The index is 1-based.

editEffect <renderEffect> [ gizmo: <node> ]

Opens the Rendering/Effects dialog, and opens the rollout for the specified render effect if it has been added to the Render Effects list. If the optional gizmo: argument is specified, and the specified node is a gizmo for the render effect, that gizmo is selected in the render effect’s gizmo list.

In 3ds Max 6 and higher, calling editEffect()without an argument will open the Effects tab in the Environemnt and Effects dialog.

setEffect <index_integer> <renderEffect>

Sets the render effect at the indexed position in the Rendering/Effects dialog list to the specified render effect. If the Render Effects dialog is displayed when this method is called, the displayed Render Effects list is not updated.

deleteEffect <index_integer>

Deletes the indexed render effect from the Rendering/Effects dialog list. The index is 1-based.

NOTE:

Unlike most MAXWrapper objects, you can not copy a RenderEffect.

See also

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Render Effect Types

Value > MAXWrapper > RenderEffect

The following list shows the 3ds Max Render Effect types:

Blur Effect

Brightness and Contrast

Color Balance Effect

Depth of Field

File Output Effect

Film Grain

Lens Effects

Lighting_Analysis_Overlay

Motion_Blur


Blur : RenderEffect

blur - superclass: renderEffect; super-superclass:MAXWrapper - classID: #(222828566, 2020440476)

Value > MAXWrapper > RenderEffect > Blur

Constructor

blur ...

Properties

<blur>.blur_type Integer default: 0 -- animatable

Select a blur type:

0- Uniform

1- Directional

2- Radial

<blur>.bUnifPixRad Float default: 10.0

Determines the intensity of the Blur effect. Increasing the value increases the number of surrounding pixels that each pixel will use to compute its blur. The more pixels used means a greater blur for the image.

<blur>.bUnifAlpha Boolean default: true -- animatable

Applies the Uniform Blur effect to the alpha channel when turned on.

<blur>.bDirUPixRad Float default: 10.0

Determines the horizontal intensity of the Blur effect. Increasing the value increases the number of surrounding pixels that each pixel will use to compute its blur. The more pixels used means a greater horizontal blur for the image.

<blur>.bDirVPixRad Float default: 10.0

Determines the vertical intensity of the Blur effect. Increasing the value increases the number of surrounding pixels that each pixel will use to compute its blur. The more pixels used means a greater vertical blur for the image.

<blur>.bDirUTrail Float default: 0.0

Adds "direction" to your blur by weighting more blur to either side of the U axis. This adds a streaking effect and creates the illusion that your objects or your camera are rapidly moving in a particular direction.

<blur>.bDirVTrail Float default: 0.0

Adds "direction" to your blur by weighting more blur to either side of the V axis. This adds a streaking effect and creates the illusion that your objects or your camera are rapidly moving in a particular direction.

<blur>.bDirRotation Integer default: 0

Rotates the axis of the U and V pixels that will be blurred by the U and V Pixel Radius spinners. By using Rotation with the U and V Pixel Radius spinners you can have the Blur effect applied to any direction in your rendered image. When rotation is 0, U corresponds to the image's X-axis and V corresponds to the image's Y-axis.

<blur>.bDirAlpha Boolean default: true -- animatable

Applies the Directional Blur effect to the Alpha channel when turned on.

<blur>.bRadialPixRad Float default: 20.0

Determines the intensity of the Radius Blur effect. Increasing the value increases the number of surrounding pixels that each pixel will use to compute its blur. The more pixels used means a greater blur for the image.

<blur>.bRadialXOrig Integer default: 320

Sets the origin for the radial blur effect along the X axis.

<blur>.bRadialYOrig Integer default: 240

Sets the origin for the radial blur effect along the Y axis.

axis.<blur>.bRadialTrail Float default: 0.0

Adds "direction" to your blur by weighting more or less blur towards the center of the Blur effect. This adds a streaking effect and creates the illusion that your objects or your camera are rapidly moving in a particular direction.

<blur>.bRadialAlpha Boolean default: true -- animatable

Applies the Radial Blur effect to the Alpha channel when turned on.

<blur>.bRadialNode Node default: undefined

Node to which radial blur is assigned.

<blur>.bRadialUseNode Boolean default: false

Turn on/off use object center for selected node, bradialnode.

<blur>.selImageActive Boolean default: true -- animatable

When on, the blur affects the entire rendered image. This is useful when the blur effect dims your rendered image.

<blur>.selImageBrighten Float default: 0.0

Brightens the entire image.

<blur>.selImageBlend Float default: 100.0

Blends the Blur effect and the Whole Image parameters with the original rendered image. This can be used to create a soft-focus effect.

<blur>.selIBackActive Boolean default: false

Affects everything but the background image or animation when turned on. This is useful when the Blur effect has dimmed you scene objects but not the background.

<blur>.selIBackBrighten Float default: 0.0

Brightens the rendered image except for the background image or animation.

<blur>.selIBackBlend Float default: 100.0

Blends the Blur effect and the Non-Background parameters with the original rendered image.

<blur>.selIBackFRadius Float default: 10.0

Feathers the Blur effect applied to the Non-Background elements of your scene. When using Non-Background as a Pixel Selection you will notice that the scene objects have a hard edge to their blur since the objects are being blurred but the background is not.

<blur>.selLumActive Boolean default: false

Affects any pixels that have luminance values that fall between it's Min and Max values, selLumMin & selLumMax.

<blur>.selLumBrighten Float default: 0.0

Brightens pixels that fall between the Minimum and Maximum luminance values.

<blur>.selLumBlend Float default: 100.0

Blends the Blur effect and the Luminance parameters with the original rendered image.

<blur>.selLumMin Float default: 90.0

The minimum luminance value necessary for each pixel in order for the Blur effect to be applied to the pixel.

<blur>.selLumMax Float default: 100.0

The maximum luminance value a pixel can have in order for the Blur effect to be applied to the pixel.

<blur>.selLumFRadius Float default: 10.0

Feathers the Blur effect applied to pixels that fall between the Minimum and Maximum luminance values. When using Luminance as a Pixel Selection the Blur effect can create a hard edge on the effect.

<blur>.selMaskActive Boolean default: false

When turned on, applies the Blur effect according to the channel selected and mask applied through the Material/Map Browser.

<blur>.selMaskMap TextureMap default: undefined

Map assigned to the blur effect.

<blur>.selMaskChannel Integer default: 4 -- alias: select_mask_channel

Selects a channel that the Blur effect will be applied to:

0- Red

1- Blue

2- Green

3- Alpha

4- Luminance

<blur>.selMaskBrighten Float default: 0.0

Brightens the portions of the image that the Blur effect is applied to.

<blur>.selMaskBlend Float default: 100.0

Blends the Map Mask Blur effect with the original rendered image.

<blur>.selMaskMin Float default: 90.0

The minimum value (RGB, Alpha, or Luminance) a pixel must have in order to have the Blur effect applied to it.

<blur>.selMaskMax Float default: 100.0

The maximum value (RGB, Alpha, or Luminance) a pixel can have for the Blur effect to be applied to it.

<blur>.selMaskFRadius Float default: 10.0

Feathers the Blur effect applied to pixels that fall between the Minimum and Maximum channel values. When using map mask as a Pixel Selection the Blur effect can create a hard edge on the effect.

<blur>.selObjIdsActive Boolean default: false -- animatable

When turned on, applies the Blur effect to an object or part of an object with a specific Object ID, if the object matches the Filter settings.

<blur>.selObjIdsIds Array default: #() -- int array

This array contains all of the Object ID’s to which the blur effects will be applied.

<blur>.selObjIdsBrighten Float default: 0.0 -- animatable

Brightens the portion of the image that the Object ID-specific Blur effect is applied to.

<blur>.selObjIdsBlend Float default: 100.0 -- animatable

Blends the Object ID Blur effect with the original rendered image.

<blur>.selObjIdsFRadius Float default: 10.0 -- animatable

Feathers the Blur effect applied to pixels that fall between the Minimum and Maximum luminance values.

<blur>.selObjIdsLumMin Float default: 0.0 -- animatable

The minimum luminance value a pixel must have in order to have the Blur effect applied to it.

<blur>.selObjIdsLumMax Float default: 100.0 -- animatable

The maximum luminance value a pixel can have for the Blur effect to be applied to it.

<blur>.selMatIdsActive Boolean default: false -- animatable

Applies the Blur effect to a material or part of a material with a specific material effects channel, if the material matches the Filter settings.

<blur>.selMatIdsIds Array default: #() -- int array

This array contains all of the Material ID’s to which the blur effects will be applied.

<blur>.selMatIdsBrighten Float default: 0.0 -- animatable

Brightens the portion of the image that the Blur effect is applied to.

<blur>.selMatIdsBlend Float default: 100.0 -- animatable

Blends the Material ID Blur effect with the original rendered image.

<blur>.selMatIdsFRadius Float default: 10.0 -- animatable

Feathers the Blur effect applied to pixels that fall between the Minimum and Maximum luminance values.

<blur>.selMatIdsLumMin Float default: 0.0 -- animatable

The minimum luminance value a pixel must have in order to have the Blur effect applied to it.

<blur>.selMatIdsLumMax Float default: 100.0 -- animatable

The maximum luminance value a pixel can have for the Blur effect to be applied to it.

<blur>.selGenBrightType Integer default: 1 -- animatable

Selects the type of brightening applied to the feather falloff curve:

0- Additive

1- Multiplicative

<blur>.select_falloff_curve SubAnim default: SubAnim:Select_Falloff_Curve

<blur.select_falloff_curve>.curve_1 SubAnim default: SubAnim:Curve_1

The brightening curve for the feather falloff.

<blur.select_falloff_curve>.curve_2 SubAnim default: SubAnim:Curve_2

The blend curve for the feather falloff.

See also

Render Effect Types

Render Effects Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Brightness_and_Contrast : RenderEffect

Brightness_and_Contrast - superclass: renderEffect; super-superclass:MAXWrapper - classID: #(1989223216, 0)

Value > MAXWrapper > RenderEffect > Brightness_and_Constrast

Constructor

brightness_and_contrast ...

briteCon ...

Properties

<Brightness_and_Contrast>.Brightness Float default: 0.5 -- animatable

<Brightness_and_Contrast>.contrast Float default: 0.5 -- animatable

<Brightness_and_Contrast>.ignoreBack Boolean default: false -- animatable, alias: ignore_background

See also

Render Effect Types

Render Effects Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Color_Balance : RenderEffect

Color_Balance - superclass: renderEffect; super-superclass:MAXWrapper - 5:0 - classID: #(222828565, 2020440476)

Value > MAXWrapper > RenderEffect > Color_Balance

Constructor

color_balance ...

colorBalance ...

Properties

<Color_Balance>.red Integer default: 0 -- animatable

<Color_Balance>.green Integer default: 0 -- animatable

<Color_Balance>.blue Integer default: 0 -- animatable

<Color_Balance>.preserveLum Boolean default: false -- animatable, alias: Preserve_Luminosity

<Color_Balance>.ignoreBack Boolean default: false -- animatable, alias: Ignore_Background

See also

Render Effect Types

Render Effects Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Depth_of_Field : RenderEffect

Depth_of_Field - superclass: renderEffect; super-superclass:MAXWrapper - classID: #(1155882880, 459823346)

Value > MAXWrapper > RenderEffect > Depth_Of_Field

Constructor

depth_of_field ...

DOFEffect ...

Properties

<Depth_of_Field>.AffectAlpha Boolean default: true -- alias: Affect_Alpha

<Depth_of_Field>.camNodeIndex Integer default: -1 -- alias: Camera_Index

camNodeIndex specifies which camera in the Depth of Field camera dropdown is the selected camera. A value of -1 specifies that no camera is selected. The index is otherwise 0-based.

<Depth_of_Field>.focalNodeIndex Integer default: -1 -- alias: Focal_Index

focalNodeIndex specifies which camera in the Depth of Field focal point node dropdown is the selected focal point node. A value of -1 specifies that no focal point node is selected. The index is otherwise 0-based.

<Depth_of_Field>.FocalPoint Integer default: 0 -- alias: Focal_Point

FocalPoint = 0 - Focal Node; 1 - Use Camera

<Depth_of_Field>.FocalType Integer default: 0 -- alias: Focal_Type

FocalType = 0 - Custom; 1 - Use Camera

<Depth_of_Field>.HorizFocalLoss Float default: 10.0 -- animatable, alias: Horiz_Focal_Loss

<Depth_of_Field>.VertFocalLoss Float default: 10.0 -- animatable, alias: Vert_Focal_Loss

<Depth_of_Field>.FocalRange Float default: 100.0 -- animatable, alias: Focal_Range

<Depth_of_Field>.FocalLimit Float default: 200.0 -- animatable, alias: Focal_Limit

Methods

DOF.addCam <Depth_of_Field> <camera_node_name_string>

Adds the specified camera to the Depth of Field camera dropdown. camera_node_name_string is the name of the camera as a string, and must match the case of the camera’s name. Returns true if the addition was successful, false if it failed. The normal reason for a failure is that the named camera is not present in the scene.

DOF.addFocalNode <Depth_of_Field> <node_name_string>

Adds the specified node to the Depth of Field focal point node dropdown. node_name_string is the name of the node as a string, and must match the case of the node’s name. Returns true if the addition was successful, false if it failed. The normal reason for a failure is that the named node is not present in the scene.

DOF.deleteCam <Depth_of_Field> <index_integer>

Deletes the indexed camera from the Depth of Field camera dropdown, where <index_integer> is the index of the camera in the dropdown. The index is 0-based to maintain consistency with the camNodeIndex property. Returns true if the deletion was successful, false if it failed. The normal reason for a failure is that the indexed camera is not present in the dropdown.

DOF.deleteCamByName <Depth_of_Field> <camera_node_name_string>

Deletes the specified camera from the Depth of Field camera dropdown. camera_node_name_string is the name of the camera as a string, and must match the case of the camera’s name. Returns true if the deletion was successful, false if it failed. The normal reason for a failure is that the named camera is not present in the dropdown.

DOF.deleteFocalNode <Depth_of_Field> <index_integer>

Deletes the indexed node from the Depth of Field focal point node dropdown, where <index_integer> is the index of the node in the dropdown. The index is 0-based to maintain consistency with the focalNodeIndex property. Returns true if the deletion was successful, false if it failed. The normal reason for a failure is that the indexed node is not present in the dropdown.

DOF.deleteFocalNodeByName <Depth_of_Field> <node_name_string>

Deletes the specified node from the Depth of Field focal point node dropdown. node_name_string is the name of the node as a string, and must match the case of the node’s name. Returns true if the deletion was successful, false if it failed. The normal reason for a failure is that the named node is not present in the dropdown.

See also

Render Effect Types

Render Effects Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


File_Output : RenderEffect

File_Output - superclass: renderEffect; super-superclass:MAXWrapper - classID: #(1366701209, 1669202771)

Value > MAXWrapper > RenderEffect > File_Output

Constructor

file_output ...

fileOut ...

Properties

<File_Output>.bitmap BitMap default: BitMap: -- output bitmap

<File_Output>.channelType Integer default: 0 -- alias: channel_type

channelType = 0 - Whole Image; 1 - Luminance; 2 - Depth; 3 - Alpha

<File_Output>.active Boolean default: true -- animatable

<File_Output>.affectSource Boolean default: false -- animatable, alias: affect_source

<File_Output>.cameraNode Node default: undefined -- alias: camera_node

<File_Output>.nearZ Float default: 0.0 -- animatable, alias: near_z_depth

<File_Output>.farZ Float default: -500.0 -- animatable, alias: far_z_depth

<File_Output>.fitScene Boolean default: true -- animatable, alias: fit_entire_scene

See also

Render Effect Types

Render Effects Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Film_Grain : RenderEffect

Film_Grain - superclass: renderEffect; super-superclass:MAXWrapper - classID: #(470000003, 0)

Value > MAXWrapper > RenderEffect > Film_Grain

Constructor

film_grain ...

filmGrain ...

Properties

<Film_Grain>.Grain Float default: 0.2 -- animatable

<Film_Grain>.Mask_Background Boolean default: false -- animatable; alias: Ignore_Background

See also

Render Effect Types

Render Effects Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Lighting_Analysis_Overlay : RenderEffect

Lighting_Analysis_Overlay - superclass: renderEffect; super-superclass:MAXWrapper - 12:0 - classID: #(1508066200, -1360828798)

Value > MAXWrapper > RenderEffect > Lighting_Analysis_Overlay

NEW in 3ds Max 2009 Design: The Lighting_Analysis_Overlay Render Effect allows the generation of lighting analysis data.

NOTE:

This feature is exposed in 3ds Max Design only.

Scenes saved from 3ds Max Design will open and render correctly in 3ds Max, but you cannot construct class instances via MAXScript in 3ds Max.

3ds Max Design Constructors:

Lighting_Analysis_Overlay ...
LightingAnalysisOverlay ...

3ds Max Constructor:

Class Instances not creatable in 3ds Max

Roll over and click a group of controls to jump to relevant properties:

Properties:

Type and Range

<Lighting_Analysis_Overlay>.quantity Integer default: 0 -- integer

Get/set the index of the Quantity drop-down list selection.

Possible values are:

0 - Illuminance

1 - Luminance

<Lighting_Analysis_Overlay>.scaleType Integer default: 0 -- integer; scale

Get/set the index of the Scale drop-down list selection.

Possible values are:

0 - Linear

1 - Logarithmic

<Lighting_Analysis_Overlay>.rangeStart Float default: 0.0 -- animatable; float; quantity_min

Get/set the Range's minimum value.

<Lighting_Analysis_Overlay>.rangeEnd Float default: 100.0 -- animatable; float; quantity_max

Get/set the Range's maximum value.

Display Options

<Lighting_Analysis_Overlay>.shownumbers BooleanClass default: true -- boolean; show_numbers

Get/set the state of the "Show Numbers On Entire Image (Screen Grid)" option.

<Lighting_Analysis_Overlay>.showhelper BooleanClass default: false -- boolean; show_numbers_from_helper_objects

Get/set the state of the "Show Numbers From Light Metering Helper Objects" option.

<Lighting_Analysis_Overlay>.showcameraname BooleanClass default: true -- boolean; show_camera_name

Get/set the state of the "Show Camera Name" option. When set to true, the name of the view/camera will be included in the Lighting Analysis Overlay.

<Lighting_Analysis_Overlay>.showdaylightinfo BooleanClass default: true -- boolean; show_daylight_info

Get/set the state of the "Show Daylight Info" option.

<Lighting_Analysis_Overlay>.fadeBackground BooleanClass default: true -- boolean; fade_background

Get/set the state of the "Fade Background Image" option.

Screen Grid Layout Options

<Lighting_Analysis_Overlay>.verticalspacing Integer default: 40 -- animatable; integer; Vertical_spacing

Get/set the Vertical Spacing value.

<Lighting_Analysis_Overlay>.horizontalspacing Integer default: 40 -- animatable; integer; Horizontal_spacing

Get/set the Horizontal Spacing value.

Statistics

<Lighting_Analysis_Overlay>.largestValue Float default: 0.0 -- float

Get the Largest Displayed Value.

See also

Render Effect Types

Render Effects Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods

Lighting Analysis and Daylight Simulation Tools


Motion_Blur - superclass: renderEffect

Motion_Blur : renderEffect

Motion_Blur - superclass: renderEffect; super-superclass:MAXWrapper - 2:0 - classID: #(141333203, 1612379012)

Value > MAXObject > ( RenderElements ) > Motion_Blur

Constructor

Motion_Blur ...

imageMotionBlur ...

Properties

<Motion_Blur>.duration Float default: 1.0 -- animatable; float

Specifies how long the "virtual shutter" is open. When this is set to 1.0, the virtual shutter is open for the entire duration between one frame and the next. The higher the value, the greater the motion Blur effect. Default=1.0.

<Motion_Blur>.transparency Boolean default: true -- boolean

When on, motion blur is applied to objects behind transparent objects. When off, objects behind transparent objects receive no motion blur. Turning off this toggle can improve rendering speed. Default=on.

imageMotionBlur interfaces:

Interface: ImageMotionBlur

Properties

None

Methods

None

Actions

None

See also

RenderEffect : MAXWrapper


Lens_Effects : RenderEffect

Lens_Effects - superclass: renderEffect; super-superclass:MAXWrapper - classID: #(1347096675, 1339450746)

Value > MAXWrapper > RenderEffect > Lens_Effects

Constructor

lens_effects ...

Properties

<Lens_Effects>.size Float default: 100.0 -- animatable

<Lens_Effects>.intensity Float default: 100.0 -- animatable

<Lens_Effects>.seed Integer default: 1357

<Lens_Effects>.angle Float default: 0.0 -- animatable

<Lens_Effects>.squeeze Float default: 0.0 -- animatable

<Lens_Effects>.affectAlpha Boolean default: true -- alias: Affect_Alpha

<Lens_Effects>.affectZBuffer Boolean default: false -- alias: Affect_Z_Buffer

<Lens_Effects>.distAffectsSize Boolean default: false -- alias: Distance_Affects_Size

<Lens_Effects>.distAffectsIntensity Boolean default: false -- alias: Distance_Affects_Intensity

<Lens_Effects>.centerAffectsSize Boolean default: false -- alias: Off_Center_Affects_Size

<Lens_Effects>.centerAffectsIntensity Boolean default: false -- alias: Off_Center_Affects_Intensity

<Lens_Effects>.innerOcclusionRadius Float default: 3.0 -- animatable, alias: Inner_Occlusion_Radius

<Lens_Effects>.outerOcclusionRadius Float default: 33.0 -- animatable, alias: Outer_Occlusion_Radius

<Lens_Effects>.occlusionAffectsSize Boolean default: true -- alias: Occlusion_Affects_Size

<Lens_Effects>.occlusionAffectsIntensity Boolean default: true -- alias: Occlusion_Affects_Intensity

<Lens_Effects>.affectByAtmosphere Boolean default: false -- alias: Affect_By_Atmosphere

Methods

The following methods add elements to a Lens Effects, load and save a Lens Effects configuration file, add and delete lights, and delete Lens Effects elements.

le.addASec <Lens_Effects>

Adds a Auto Secondary element to the Lens Effect. The element is appended to any elements present. Returns true if the addition was successful, false if it failed.

le.addGlow <Lens_Effects>

Adds a Glow element to the Lens Effect. The element is appended to any elements present. Returns true if the addition was successful, false if it failed.

le.addMSec <Lens_Effects>

Adds a Manual Secondary element to the Lens Effect. The element is appended to any elements present. Returns true if the addition was successful, false if it failed.

le.addRay <Lens_Effects>

Adds a Ray element to the Lens Effect. The element is appended to any elements present. Returns true if the addition was successful, false if it failed.

le.addRing <Lens_Effects>

Adds a Ring element to the Lens Effect. The element is appended to any elements present. Returns true if the addition was successful, false if it failed.

le.addStar <Lens_Effects>

Adds a Star element to the Lens Effect. The element is appended to any elements present. Returns true if the addition was successful, false if it failed.

le.addStreak <Lens_Effects>

Adds a Streak element to the Lens Effect. The element is appended to any elements present. Returns true if the addition was successful, false if it failed.

le.load <Lens_Effects> <filename_string>

le.save <Lens_Effects> <filename_string>

Saves the Lens Effects configuration to the file specified by <filename_string>. Animated parameter values are not saved.

le.numLights <Lens_Effects>

Returns the number of lights in the light list.

le.addLightNode <Lens_Effects> <light_node>

Adds light node to the light list.

le.addLight <Lens_Effects> <light_node_name_string>

Adds the specified light to the Lens Effects Lights dropdown. light_node_name_string is the name of the light as a string, and must match the case of the light’s name. Returns true if the addition was successful, false if it failed. The normal reason for a failure is that the named light is not present in the scene.

le.deleteLight <Lens_Effects> <index_integer>

Deletes the indexed light from the Lens Effects Lights dropdown, where <index_integer> is the index of the light in the Lens Effects Lights dropdown. Returns true if the deletion was successful, false if it failed. The normal reason for a failure is that the indexed light is not present in the dropdown.

le.deleteLightByName <light_node_name_string>

Deletes the named light from the Lens Effects Lights dropdown. light_node_name_string is the name of the light as a string, and must match the case of the light’s name. Returns true if the deletion was successful, false if it failed. The normal reason for a failure is that the named light is not present in the dropdown.

le.lightIndex <Lens_Effects> <light_node_name_string>

Returns the light list index of the named light. Returns -1 if the light’s name is not in the light list.

le.lightName <Lens_Effects> <index>

Returns the node name of the light for the specified light list index. If the index is out of range, a null string will be returned.

le.deleteElement <Lens_Effects> <index_integer>

Deletes the indexed element, where <index_integer> is the index of the element in the Lens Effects composition window. Returns true if the deletion was successful, false if it failed. The normal reason for a failure is that the indexed element does not exist.

le.deleteElementByName <element_name_string>

Deletes the named element. element_name_string is the name of the element as a string, and must match the case of the element’s name. Returns true if the deletion was successful, false if it failed. The normal reason for a failure is that the named element does not exist.

See also

Lens_Effects - Auto_Secondary

Lens_Effects - Glow

Lens_Effects - Manual_Secondary

Lens_Effects - Ray

Lens_Effects - Ring

Lens_Effects - Star

Lens_Effects - Streak

Render Effect Types

Render Effects Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Lens_Effects - Auto_Secondary

Lens_Effects - Auto_Secondary_Element

Auto_Secondary_Element - superclass: ReferenceTarget; super-superclass:MAXWrapper - classID: #(1388329754, 2046584440)

Value > MAXWrapper > RenderEffect > LensEffect > Auto_Secondary_Element

Constructor

le.addASec <Lens_Effects>

Aliases

Auto_Secondary_Element

'ASec Element'

Properties

<auto_secondary>.elementName String default: "Auto Secondary" -- alias: Name

Get/set the name of the element.

<auto_secondary>.on Boolean default: true

Toggle element on/off.

<auto_secondary>.minSize Float default: 25.0 -- animatable; alias: Min_Size

Get/set the min. size

<auto_secondary>.maxSize Float default: 100.0 -- animatable; alias: Max_Size

Get/set the max. size

<auto_secondary>.axis Float default: 3.0 -- animatable

Get/set the axis

<auto_secondary>.intensity Float default: 30.0 -- animatable

Get/set the intensity

<auto_secondary>.quantity Integer default: 12 -- animatable

Get/set the quantity

<auto_secondary>.colorSource Float default: 20.0 -- animatable; alias: Source_Color

Get/set the source color

<auto_secondary>.sides Integer default: 0

Get/set the number of sides.

Possible values are:

0 - Circular

1 - Three

2 - Four

3 - Five

4 - Six

5 - Seven

6 - Eight

<auto_secondary>.occlusion Float default: 100.0 -- animatable

Get/set the occlusion

<auto_secondary>.presets Integer default: 0

Selects a preset from the indexed list. If .presets is set to 0, no preset is selected.

<auto_secondary>.squeeze Boolean default: false

<auto_secondary>.radialColor1 Color default: (color 0 0 0) -- animatable; alias: Radial_Color_1

<auto_secondary>.radialColor2 Color default: (color 57 34 89) -- animatable; alias: Radial_Color_2

<auto_secondary>.radialColor3 Color default: (color 85 139 85) -- animatable; alias: Radial_Color_3

<auto_secondary>.radialColor4 Color default: (color 190 99 10) -- animatable; alias: Radial_Color_4

<auto_secondary>.colorRadius1 Float default: 90.0 -- animatable; alias: Radius_Color_1

<auto_secondary>.colorRadius2 Float default: 92.0 -- animatable; alias: Radius_Color_2

<auto_secondary>.colorRadius3 Float default: 95.0 -- animatable; alias: Radius_Color_3

<auto_secondary>.colorRadius4 Float default: 98.0 -- animatable; alias: Radius_Color_4

<auto_secondary>.radialMtl TextureMap default: undefined -- alias: Radial_Material

<auto_secondary>.useRadialMtl Boolean default: false -- alias: Apply_Radial_Color_Map

<auto_secondary>.radial_falloff SubAnim

<auto_secondary>.radialMap TextureMap default: undefined -- alias: Radial_Falloff_Map

<auto_secondary>.useRadialMap Boolean default: false -- alias: Apply_Radial_Falloff_Map

<auto_secondary>.circularColorMix Float default: 0.0 -- animatable; alias: Circular_Color_Mix

<auto_secondary>.quadrant1Color Color default: (color 255 0 0) -- animatable; alias: Quadrant_1_Color

<auto_secondary>.quadrant2Color Color default: (color 255 0 0) -- animatable; alias: Quadrant_2_Color

<auto_secondary>.quadrant3Color Color default: (color 255 0 0) -- animatable; alias: Quadrant_3_Color

<auto_secondary>.quadrant4Color Color default: (color 255 0 0) -- animatable; alias: Quadrant_4_Color

<auto_secondary>.circularMtl TextureMap default: undefined -- alias: Circular_Material

<auto_secondary>.useCircularMtl Boolean default: false -- alias: Apply_Circular_Color_Map

<auto_secondary>.circular_falloff SubAnim

<auto_secondary>.circularMap TextureMap default: undefined -- alias: Circular_Falloff_Map

<auto_secondary>.useCircularMap Boolean default: false -- alias: Apply_Circular_Falloff_Map

<auto_secondary>.radial_size SubAnim

<auto_secondary>.radialSizeMap TextureMap default: undefined -- alias: Radial_Size_Map

<auto_secondary>.useRadialSizeMap Boolean default: false -- alias: Apply_Radial_Size_Map

<auto_secondary>.applyLights Boolean default: true -- alias: Apply_to_Lights

<auto_secondary>.applyImage Boolean default: false -- alias: Apply_to_Image

<auto_secondary>.applyImageCenters Boolean default: false -- alias: Apply_to_Image_Centers

<auto_secondary>.sourceObjectID Boolean default: false -- alias: Source_Object_ID

<auto_secondary>.objectID Integer default: 1 -- animatable; alias: Object_ID

<auto_secondary>.sourceEffectsID Boolean default: false -- alias: Source_Effects_ID

<auto_secondary>.effectsID Integer default: 0 -- animatable; alias: Effects_ID

<auto_secondary>.sourceUnclampedColor Boolean default: false -- alias: Source_Unclamped_Color

<auto_secondary>.unclampedColor Float default: 1.0 -- animatable; alias: Unclamped_Color

<auto_secondary>.unclampedColorInvert Boolean default: false -- alias: Source_Unclamped_Color_Invert

<auto_secondary>.sourceSurfaceNormal Boolean default: false -- alias: Source_Surface_Normal

<auto_secondary>.surfaceNormal Float default: 0.0 -- animatable; alias: Surface_Normal

<auto_secondary>.surfaceNormalInvert Boolean default: false -- alias: Source_Surface_Normal_Invert

<auto_secondary>.sourceWhole Boolean default: false -- alias: Source_Whole

<auto_secondary>.sourceAlpha Boolean default: false -- alias: Source_Alpha

<auto_secondary>.alpha Integer default: 0

<auto_secondary>.sourceZBuffer Boolean default: false -- alias: Source_Z_Buffer

<auto_secondary>.zHi Float default: 1000.0 -- animatable; alias: Z_Hi

<auto_secondary>.zLo Float default: 0.0 -- animatable; alias: Z_Lo

<auto_secondary>.filterAll Boolean default: true -- alias: Filter_All

<auto_secondary>.filterEdge Boolean default: false -- alias: Filter_Edge

<auto_secondary>.filterPerimeterAlpha Boolean default: false -- alias: Filter_Perimeter_Alpha

<auto_secondary>.filterPerimeter Boolean default: false -- alias: Filter_Perimeter

<auto_secondary>.filterBrightness Boolean default: false -- alias: Filter_Brightness

<auto_secondary>.brightness Integer default: 0 -- animatable; alias: Bright

<auto_secondary>.brightnessInvert Boolean default: false -- alias: Filter_Brightness_Invert

<auto_secondary>.filterHue Boolean default: false -- alias: Filter_Hue

<auto_secondary>.hueRange Integer default: 0 -- animatable; alias: Hue_Range

<auto_secondary>.hue Color default: (color 255 0 0) -- animatable

<auto_secondary>.applyNoise Boolean default: false -- alias: Apply_Additional_Effects

<auto_secondary>.noiseMap TextureMap default: undefined -- alias: Noise_Map

<auto_secondary>.radial_density SubAnim

<auto_secondary>.radialDensity TextureMap default: undefined -- alias: Radial_Density_Map

<auto_secondary>.useRadialDensity Boolean default: false -- alias: Apply_Radial_Density_Map

<auto_secondary.radial_falloff>.curve_1 SubAnim

The curve_1 SubAnim contains the radial_falloff curve. You cannot create or access points in this curve unless the point is animated. In this case, you can access the animated point position as a SubAnim of the curve_1 property.

<auto_secondary.circular_falloff>.curve_1 SubAnim

The curve_1 SubAnim contains the circular_falloff curve. You cannot create or access points in this curve unless the point is animated. In this case, you can access the animated point position as a SubAnim of the curve_1 property.

<auto_secondary.radial_size>.curve_1 SubAnim

The curve_1 SubAnim contains the radial_size curve. You cannot create or access points in this curve unless the point is animated. In this case, you can access the animated point position as a SubAnim of the curve_1 property.

<auto_secondary.radial_density>.curve_1 SubAnim

The curve_1 SubAnim contains the radial_density curve. You cannot create or access points in this curve unless the point is animated. In this case, you can access the animated point position as a SubAnim of the curve_1 property.

NOTE:

The le.addASec <Lens_Effects> method returns true if the addition was successful, false if it failed. Once the element has been added, it can be accessed as a property of the lens_effects value. The name of this property for auto_secondary elements is auto_secondary. If more than one element of the same type is added, only the first is accessible using the property name. You will need to access the remaining elements as subAnims of the lens_effects value. The subAnim names are the same as the property names. The elements start at subAnim 7.

See also

Lens_Effects : RenderEffect

Value Common Properties, Operators, and Methods


Lens_Effects - Glow

Lens_Effects - Glow_Element

Glow_Element - superclass: ReferenceTarget; super-superclass:MAXWrapper - classID: #(1783050118, 887509407)

Value > MAXWrapper > RenderEffect > LensEffect > Glow_Element

Constructor

le.addGlow <Lens_Effects>

Aliases

Glow_Element

'Glow Element'

Properties

<glow>.elementName String default: "Glow" -- alias: Name

<glow>.on Boolean default: true

<glow>.size Float default: 30.0 -- animatable

<glow>.intensity Float default: 110.0 -- animatable

<glow>.objectsHide Boolean default: true -- alias:

Object_Hide

<glow>.occlusion Float default: 100.0 -- animatable

<glow>.squeeze Boolean default: false

<glow>.useSourceColor Float default: 0.0 -- animatable; alias: Source_Color

<glow>.centerColor Color default: (color 255 255 255) -- animatable; alias: Center_Color

<glow>.edgeColor Color default: (color 255 0 0) -- animatable; alias: Edge_Color

<glow>.radialMtl TextureMap default: undefined -- alias: Radial_Material

<glow>.useRadialMtl Boolean default: false -- alias: Apply_Radial_Color_Map

<glow>.radial_falloff SubAnim

<glow>.radialMap TextureMap default: undefined -- alias: Radial_Falloff_Map

<glow>.useRadialMap Boolean default: false -- alias: Apply_Radial_Falloff_Map

<glow>.circularColorMix Float default: 0.0 -- animatable; alias: Circular_Color_Mix

<glow>.quadrant1Color Color default: (color 255 0 0) -- animatable; alias: Quadrant_1_Color

<glow>.quadrant2Color Color default: (color 255 0 0) -- animatable; alias: Quadrant_2_Color

<glow>.quadrant3Color Color default: (color 255 0 0) -- animatable; alias: Quadrant_3_Color

<glow>.quadrant4Color Color default: (color 255 0 0) -- animatable; alias: Quadrant_4_Color

<glow>.circularMtl TextureMap default: undefined -- alias: Circular_Material

<glow>.useCircularMtl Boolean default: false -- alias: Apply_Circular_Color_Map

<glow>.circular_falloff SubAnim

<glow>.circularMap TextureMap default: undefined -- alias: Circular_Falloff_Map

<glow>.useCircularMap Boolean default: false -- alias: Apply_Circular_Falloff_Map

<glow>.radial_size SubAnim

<glow>.radialSizeMap TextureMap default: undefined -- alias: Radial_Size_Map

<glow>.useRadialSizeMap Boolean default: false -- alias: Apply_Radial_Size_Map

<glow>.applyLights Boolean default: true -- alias: Apply_to_Lights

<glow>.applyImage Boolean default: true -- alias: Apply_to_Image

<glow>.applyImageCenters Boolean default: false -- alias: Apply_to_Image_Centers

<glow>.sourceObjectID Boolean default: false -- alias: Source_Object_ID

<glow>.objectID Integer default: 1 -- animatable; alias: Object_ID

<glow>.sourceEffectsID Boolean default: false -- alias: Source_Effects_ID

<glow>.effectsID Integer default: 1 -- animatable; alias: Effects_ID

<glow>.sourceUnclampedColor Boolean default: false -- alias: Source_Unclamped_Color

<glow>.unclampedColor Float default: 1.0 -- animatable; alias: Unclamped_Color

<glow>.unclampedColorInvert Boolean default: false -- alias: Source_Unclamped_Color_Invert

<glow>.sourceSurfaceNormal Boolean default: false -- alias: Source_Surface_Normal

<glow>.surfaceNormal Float default: 0.0 -- animatable; alias: Surface_Normal

<glow>.surfaceNormalInvert Boolean default: false -- alias: Source_Surface_Normal_Invert

<glow>.sourceWhole Boolean default: false -- alias: Source_Whole

<glow>.sourceAlpha Boolean default: false -- alias: Source_Alpha

<glow>.alpha Integer default: 0 -- animatable

<glow>.sourceZBuffer Boolean default: false -- alias: Source_Z_Buffer

<glow>.zHi Float default: 1000.0 -- animatable; alias: Z_Hi

<glow>.zLo Float default: 0.0 -- animatable; alias: Z_Lo

<glow>.filterAll Boolean default: true -- alias: Filter_All

<glow>.filterEdge Boolean default: false -- alias: Filter_Edge

<glow>.filterPerimeterAlpha Boolean default: false -- alias: Filter_Perimeter_Alpha

<glow>.filterPerimeter Boolean default: false -- alias: Filter_Perimeter

<glow>.filterBrightness Boolean default: false -- alias: Filter_Brightness

<glow>.brightness Integer default: 0 -- animatable; alias: Bright

<glow>.brightnessInvert Boolean default: false -- alias: Filter_Brightness_Invert

<glow>.filterHue Boolean default: false -- alias: Filter_Hue

<glow>.hueRange Integer default: 0 -- animatable; alias: Hue_Range

<glow>.hue Color default: (color 255 0 0) -- animatable

<glow>.applyNoise Boolean default: false -- alias: Apply_Additional_Effects

<glow>.noiseMap TextureMap default: undefined -- alias: Noise_Map

<glow>.radial_density SubAnim

<glow>.radialDensity TextureMap default: undefined -- alias: Radial_Density_Map

<glow>.useRadialDensity Boolean default: false -- alias: Apply_Radial_Density_Map

<glow.radial_falloff>.curve_1 SubAnim

The curve_1 SubAnim contains the radial_falloff curve. You cannot create or access points in this curve unless the point is animated. In this case, you can access the animated point position as a SubAnim of the curve_1 property.

<glow.circular_falloff>.curve_1 SubAnim

The curve_1 SubAnim contains the circular_falloff curve. You cannot create or access points in this curve unless the point is animated. In this case, you can access the animated point position as a SubAnim of the curve_1 property.

<glow.radial_size>.curve_1 SubAnim

The curve_1 SubAnim contains the radial_size curve. You cannot create or access points in this curve unless the point is animated. In this case, you can access the animated point position as a SubAnim of the curve_1 property.

<glow.radial_density>.curve_1 SubAnim

The curve_1 SubAnim contains the radial_density curve. You cannot create or access points in this curve unless the point is animated. In this case, you can access the animated point position as a SubAnim of the curve_1 property.

NOTE:

The le.addGlow <Lens_Effects> method returns true if the addition was successful, false if it failed. Once the element has been added, it can be accessed as a property of the lens_effects value. The name of this property for glow elements is glow. If more than one element of the same type is added, only the first is accessible using the property name. You will need to access the remaining elements as subAnims of the lens_effects value. The subAnim names are the same as the property names. The elements start at subAnim 7.

See also

Lens_Effects : RenderEffect

Value Common Properties, Operators, and Methods


Lens_Effects - Manual_Secondary

Lens_Effects - Manual_Secondary_Element

Manual_Secondary_Element - superclass: ReferenceTarget; super-superclass:MAXWrapper - classID: #(217211880, 1911717313)

Value > MAXWrapper > RenderEffect > LensEffect > Manual_Secondary_Element

Constructor

le.addMSec <Lens_Effects>

Aliases

Manual_Secondary_Element

'MSec Element'

Properties

<manual_secondary>.elementName String default: "Manual Secondary" -- alias: Name

<manual_secondary>.on Boolean default: true

<manual_secondary>.size Float default: 50.0 -- animatable

<manual_secondary>.intensity Float default: 30.0 -- animatable

<manual_secondary>.plane Float default: 150.0 -- animatable

<manual_secondary>.colorSource Float default: 20.0 -- animatable; alias: Source_Color

<manual_secondary>.sides Integer default: 0

sides = 0 - Circular; 1 - Three; 2 - Four; 3 - Five; 4 - Six; 5 - Seven; 6 - Eight

<manual_secondary>.occlusion Float default: 100.0 -- animatable

<manual_secondary>.squeeze Boolean default: false

<manual_secondary>.presets Integer default: 0

presets selects a preset from the indexed list. presets = 0 - no preset.

<manual_secondary>.radialColor1 Color default: (color 0 0 0) -- animatable; alias: Radial_Color_1

<manual_secondary>.radialColor2 Color default: (color 57 34 89) -- animatable; alias: Radial_Color_2

<manual_secondary>.radialColor3 Color default: (color 85 139 85) -- animatable; alias: Radial_Color_3

<manual_secondary>.radialColor4 Color default: (color 190 99 10) -- animatable; alias: Radial_Color_4

<manual_secondary>.colorRadius1 Float default: 90.0 -- animatable; alias: Radius_Color_1

<manual_secondary>.colorRadius2 Float default: 92.0 -- animatable; alias: Radius_Color_2

<manual_secondary>.colorRadius3 Float default: 95.0 -- animatable; alias: Radius_Color_3

<manual_secondary>.colorRadius4 Float default: 98.0 -- animatable; alias: Radius_Color_4

<manual_secondary>.radialMtl TextureMap default: undefined -- alias: Radial_Material

<manual_secondary>.useRadialMtl Boolean default: false -- alias: Apply_Radial_Color_Map

<manual_secondary>.radial_falloff SubAnim

<manual_secondary>.radialMap TextureMap default: undefined -- alias: Radial_Falloff_Map

<manual_secondary>.useRadialMap Boolean default: false -- alias: Apply_Radial_Falloff_Map

<manual_secondary>.circularColorMix Float default: 0.0 -- animatable; alias: Circular_Color_Mix

<manual_secondary>.quadrant1Color Color default: (color 255 0 0) -- animatable; alias: Quadrant_1_Color

<manual_secondary>.quadrant2Color Color default: (color 255 0 0) -- animatable; alias: Quadrant_2_Color

<manual_secondary>.quadrant3Color Color default: (color 255 0 0) -- animatable; alias: Quadrant_3_Color

<manual_secondary>.quadrant4Color Color default: (color 255 0 0) -- animatable; alias: Quadrant_4_Color

<manual_secondary>.circularMtl TextureMap default: undefined -- alias: Circular_Material

<manual_secondary>.useCircularMtl Boolean default: false -- alias: Apply_Circular_Color_Map

<manual_secondary>.circular_falloff SubAnim

<manual_secondary>.circularMap TextureMap default: undefined -- alias: Circular_Falloff_Map

<manual_secondary>.useCircularMap Boolean default: false -- alias: Apply_Circular_Falloff_Map

<manual_secondary>.radial_size SubAnim

<manual_secondary>.radialSizeMap TextureMap default: undefined -- alias: Radial_Size_Map

<manual_secondary>.useRadialSizeMap Boolean default: false -- alias: Apply_Radial_Size_Map

<manual_secondary>.applyLights Boolean default: true -- alias: Apply_to_Lights

<manual_secondary>.applyImage Boolean default: false -- alias: Apply_to_Image

<manual_secondary>.applyImageCenters Boolean default: false -- alias: Apply_to_Image_Centers

<manual_secondary>.sourceObjectID Boolean default: false -- alias: Source_Object_ID

<manual_secondary>.objectID Integer default: 1 -- animatable; alias: Object_ID

<manual_secondary>.sourceEffectsID Boolean default: false -- alias: Source_Effects_ID

<manual_secondary>.effectsID Integer default: 0 -- animatable; alias: Effects_ID

<manual_secondary>.sourceUnclampedColor Boolean default: false -- alias: Source_Unclamped_Color

<manual_secondary>.unclampedColor Float default: 1.0 -- animatable; alias: Unclamped_Color

<manual_secondary>.unclampedColorInvert Boolean default: false -- alias: Source_Unclamped_Color_Invert

<manual_secondary>.sourceSurfaceNormal Boolean default: false -- alias: Source_Surface_Normal

<manual_secondary>.surfaceNormal Float default: 0.0 -- animatable; alias: Surface_Normal

<manual_secondary>.surfaceNormalInvert Boolean default: false -- alias: Source_Surface_Normal_Invert

<manual_secondary>.sourceWhole Boolean default: false -- alias: Source_Whole

<manual_secondary>.sourceAlpha Boolean default: false -- alias: Source_Alpha

<manual_secondary>.alpha Integer default: 0

<manual_secondary>.sourceZBuffer Boolean default: false -- alias: Source_Z_Buffer

<manual_secondary>.zHi Float default: 1000.0 -- animatable; alias: Z_Hi

<manual_secondary>.zLo Float default: 0.0 -- animatable; alias: Z_Lo

<manual_secondary>.filterAll Boolean default: true -- alias: Filter_All

<manual_secondary>.filterEdge Boolean default: false -- alias: Filter_Edge

<manual_secondary>.filterPerimeterAlpha Boolean default: false -- alias: Filter_Perimeter_Alpha

<manual_secondary>.filterPerimeter Boolean default: false -- alias: Filter_Perimeter

<manual_secondary>.filterBrightness Boolean default: false -- alias: Filter_Brightness

<manual_secondary>.brightness Integer default: 0 -- animatable; alias: Bright

<manual_secondary>.brightnessInvert Boolean default: false -- alias: Filter_Brightness_Invert

<manual_secondary>.filterHue Boolean default: false -- alias: Filter_Hue

<manual_secondary>.hueRange Integer default: 0 -- animatable; alias: Hue_Range

<manual_secondary>.hue Color default: (color 255 0 0) -- animatable

<manual_secondary>.applyNoise Boolean default: false -- alias: Apply_Additional_Effects

<manual_secondary>.noiseMap TextureMap default: undefined -- alias: Noise_Map

<manual_secondary>.radial_density SubAnim

<manual_secondary>.radialDensity TextureMap default: undefined -- alias: Radial_Density_Map

<manual_secondary>.useRadialDensity Boolean default: false -- alias: Apply_Radial_Density_Map

<manual_secondary.radial_falloff>.curve_1 SubAnim

The curve_1 SubAnim contains the radial_falloff curve. You cannot create or access points in this curve unless the point is animated. In this case, you can access the animated point position as a SubAnim of the curve_1 property.

<manual_secondary.circular_falloff>.curve_1 SubAnim

The curve_1 SubAnim contains the circular_falloff curve. You cannot create or access points in this curve unless the point is animated. In this case, you can access the animated point position as a SubAnim of the curve_1 property.

<manual_secondary.radial_size>.curve_1 SubAnim

The curve_1 SubAnim contains the radial_size curve. You cannot create or access points in this curve unless the point is animated. In this case, you can access the animated point position as a SubAnim of the curve_1 property.

<manual_secondary.radial_density>.curve_1 SubAnim

The curve_1 SubAnim contains the radial_density curve. You cannot create or access points in this curve unless the point is animated. In this case, you can access the animated point position as a SubAnim of the curve_1 property.

NOTE:

The le.addMSec <Lens_Effects> method returns true if the addition was successful, false if it failed. Once the element has been added, it can be accessed as a property of the lens_effects value. The name of this property for manual_secondary elements is manual_secondary. If more than one element of the same type is added, only the first is accessible using the property name. You will need to access the remaining elements as subAnims of the lens_effects value. The subAnim names are the same as the property names. The elements start at subAnim 7.

See also

Lens_Effects : RenderEffect

Value Common Properties, Operators, and Methods


Lens_Effects - Ray

Lens_Effects - Ray_Element

Ray_Element - superclass: ReferenceTarget; super-superclass:MAXWrapper - classID: #(308025732, 2043903300)

Value > MAXWrapper > RenderEffect > LensEffect > Ray_Element

Constructor

le.addRay <Lens_Effects>

Aliases

Ray_Element

'Ray Element'

Properties

<ray>.elementName String default: "Ray" -- alias: Name

<ray>.on Boolean default: true

<ray>.size Float default: 300.0 -- animatable

<ray>.intensity Float default: 10.0 -- animatable

<ray>.number Integer default: 100 -- animatable; alias: Quantity

<ray>.angle Float default: 0.0 -- animatable

<ray>.sharpness Float default: 8.0 -- animatable

<ray>.objectsHide Boolean default: false

<ray>.occlusion Float default: 100.0 -- animatable

<ray>.squeeze Boolean default: false

<ray>.colorSource Float default: 100.0 -- animatable; alias: Source_Color

<ray>.centerColor Color default: (color 255 255 255) -- animatable; alias: Center_Color

<ray>.edgeColor Color default: (color 255 0 0) -- animatable; alias: Edge_Color

<ray>.radialMtl TextureMap default: undefined -- alias: Radial_Material

<ray>.useRadialMtl Boolean default: false -- alias: Apply_Radial_Color_Map

<ray>.radial_falloff SubAnim

<ray>.radialMap TextureMap default: undefined -- alias: Radial_Falloff_Map

<ray>.useRadialMap Boolean default: false -- alias: Apply_Radial_Falloff_Map

<ray>.circularColorMix Float default: 0.0 -- animatable; alias: Circular_Color_Mix

<ray>.quadrant1Color Color default: (color 255 0 0) -- animatable; alias: Quadrant_1_Color

<ray>.quadrant2Color Color default: (color 255 0 0) -- animatable; alias: Quadrant_2_Color

<ray>.quadrant3Color Color default: (color 255 0 0) -- animatable; alias: Quadrant_3_Color

<ray>.quadrant4Color Color default: (color 255 0 0) -- animatable; alias: Quadrant_4_Color

<ray>.circularMtl TextureMap default: undefined

Circular_Material

<ray>.useCircularMtl Boolean default: false -- alias: Apply_Circular_Color_Map

<ray>.circular_falloff SubAnim

<ray>.circularMap TextureMap default: undefined -- alias: Circular_Falloff_Map

<ray>.useCircularMap Boolean default: false -- alias: Apply_Circular_Falloff_Map

<ray>.radial_size SubAnim

<ray>.radialSizeMap TextureMap default: undefined -- alias: Radial_Size_Map

<ray>.useRadialSizeMap Boolean default: false -- alias: Apply_Radial_Size_Map

<ray>.applyLights Boolean default: true -- alias: Apply_to_Lights

<ray>.applyImage Boolean default: true -- alias: Apply_to_Image

<ray>.applyImageCenters Boolean default: false -- alias: Apply_to_Image_Centers

<ray>.sourceObjectID Boolean default: false -- alias: Source_Object_ID

<ray>.objectID Integer default: 1 -- animatable; alias: Object_ID

<ray>.sourceEffectsID Boolean default: false -- alias: Source_Effects_ID

<ray>.effectsID Integer default: 1 -- animatable; alias: Effects_ID

<ray>.sourceUnclampedColor Boolean default: false -- alias: Source_Unclamped_Color

<ray>.unclampedColor Float default: 1.0 -- animatable; alias: Unclamped_Color

<ray>.unclampedColorInvert Boolean default: false -- alias: Source_Unclamped_Color_Invert

<ray>.sourceSurfaceNormal Boolean default: false -- alias: Source_Surface_Normal

<ray>.surfaceNormal Float default: 0.0 -- animatable; alias: Surface_Normal

<ray>.surfaceNormalInvert Boolean default: false -- alias: Source_Surface_Normal_Invert

<ray>.sourceWhole Boolean default: false -- alias: Source_Whole

<ray>.sourceAlpha Boolean default: false -- alias: Source_Alpha

<ray>.alpha Integer default: 0 -- animatable

<ray>.sourceZBuffer Boolean default: false -- alias: Source_Z_Buffer

<ray>.zHi Float default: 1000.0 -- animatable; alias: Z_Hi

<ray>.zLo Float default: 0.0 -- animatable; alias: Z_Lo

<ray>.filterAll Boolean default: true -- alias: Filter_All

<ray>.filterEdge Boolean default: false -- alias: Filter_Edge

<ray>.filterPerimeterAlpha Boolean default: false -- alias: Filter_Perimeter_Alpha

<ray>.filterPerimeter Boolean default: false -- alias: Filter_Perimeter

<ray>.filterBrightness Boolean default: false -- alias: Filter_Brightness

<ray>.brightness Integer default: 0 -- animatable; alias: Bright

<ray>.brightnessInvert Boolean default: false -- alias: Filter_Brightness_Invert

<ray>.filterHue Boolean default: false -- alias: Filter_Hue

<ray>.hueRange Integer default: 0 -- animatable; alias: Hue_Range

<ray>.hue Color default: (color 255 0 0) -- animatable

<ray>.applyNoise Boolean default: false -- alias: Apply_Additional_Effects

<ray>.noiseMap TextureMap default: undefined -- alias: Noise_Map

<ray>.radial_density SubAnim

<ray>.radialDensity TextureMap default: undefined -- alias: Radial_Density_Map

<ray>.useRadialDensity Boolean default: false -- alias: Apply_Radial_Density_Map

<ray.radial_falloff>.curve_1 SubAnim

The curve_1 SubAnim contains the radial_falloff curve. You cannot create or access points in this curve unless the point is animated. In this case, you can access the animated point position as a SubAnim of the curve_1 property.

<ray.circular_falloff>.curve_1 SubAnim

The curve_1 SubAnim contains the circular_falloff curve. You cannot create or access points in this curve unless the point is animated. In this case, you can access the animated point position as a SubAnim of the curve_1 property.

<ray.radial_size>.curve_1 SubAnim

The curve_1 SubAnim contains the radial_size curve. You cannot create or access points in this curve unless the point is animated. In this case, you can access the animated point position as a SubAnim of the curve_1 property.

<ray.radial_density>.curve_1 SubAnim

The curve_1 SubAnim contains the radial_density curve. You cannot create or access points in this curve unless the point is animated. In this case, you can access the animated point position as a SubAnim of the curve_1 property.

NOTE:

The le.addRay <Lens_Effects> method returns true if the addition was successful, false if it failed. Once the element has been added, it can be accessed as a property of the lens_effects value. The name of this property for ray elements is ray. If more than one element of the same type is added, only the first is accessible using the property name. You will need to access the remaining elements as subAnims of the lens_effects value. The subAnim names are the same as the property names. The elements start at subAnim 7.

See also

Lens_Effects : RenderEffect

Value Common Properties, Operators, and Methods


Lens_Effects - Ring

Lens_Effects - Ring_Element

Ring_Element - superclass: ReferenceTarget; super-superclass:MAXWrapper - classID: #(993798577, 1535576468)

Value > MAXWrapper > RenderEffect > LensEffect > Ring_Element

Constructor

le.addRing <Lens_Effects>

Aliases

Ring_Element

'Ring Element'

Properties

<ring>.elementName String default: "Ring" -- alias: Name

<ring>.on Boolean default: true

<ring>.size Float default: 75.0 -- animatable

<ring>.intensity Float default: 75.0 -- animatable

<ring>.plane Float default: 0.0 -- animatable

<ring>.thickness Float default: 10.0 -- animatable

<ring>.objectsHide Boolean default: false -- alias: Object_Hide

<ring>.occlusion Float default: 100.0 -- animatable

<ring>.squeeze Boolean default: false

<ring>.colorSource Float default: 0.0 -- animatable; alias: Source_Color

<ring>.centerColor Color default: (color 255 255 255) -- animatable; alias: Center_Color

<ring>.edgeColor Color default: (color 255 0 0) -- animatable; alias: Edge_Color

<ring>.radialMtl TextureMap default: undefined -- alias: Radial_Material

<ring>.useRadialMtl Boolean default: false -- alias: Apply_Radial_Color_Map

<ring>.radial_falloff SubAnim

<ring>.radialMap TextureMap default: undefined -- alias: Radial_Falloff_Map

<ring>.useRadialMap Boolean default: false -- alias: Apply_Radial_Falloff_Map

<ring>.circularColorMix Float default: 0.0 -- animatable; alias: Circular_Color_Mix

<ring>.quadrant1Color Color default: (color 255 0 0) -- animatable; alias: Quadrant_1_Color

<ring>.quadrant2Color Color default: (color 255 0 0) -- animatable; alias: Quadrant_2_Color

<ring>.quadrant3Color Color default: (color 255 0 0) -- animatable; alias: Quadrant_3_Color

<ring>.quadrant4Color Color default: (color 255 0 0) -- animatable; alias: Quadrant_4_Color

<ring>.circularMtl TextureMap default: undefined -- alias: Circular_Material

<ring>.useCircularMtl Boolean default: false -- alias: Apply_Circular_Color_Map

<ring>.circular_falloff SubAnim

<ring>.circularMap TextureMap default: undefined -- alias: Circular_Falloff_Map

<ring>.useCircularMap Boolean default: false -- alias: Apply_Circular_Falloff_Map

<ring>.radial_size SubAnim

<ring>.radialSizeMap TextureMap default: undefined -- alias: Radial_Size_Map

<ring>.useRadialSizeMap Boolean default: false -- alias: Apply_Radial_Size_Map

<ring>.applyLights Boolean default: true -- alias: Apply_to_Lights

<ring>.applyImage Boolean default: true -- alias: Apply_to_Image

<ring>.applyImageCenters Boolean default: false -- alias: Apply_to_Image_Centers

<ring>.sourceObjectID Boolean default: false -- alias: Source_Object_ID

<ring>.objectID Integer default: 1 -- animatable; alias: Object_ID

<ring>.sourceEffectsID Boolean default: false -- alias: Source_Effects_ID

<ring>.effectsID Integer default: 1 -- animatable; alias: Effects_ID

<ring>.sourceUnclampedColor Boolean default: false -- alias: Source_Unclamped_Color

<ring>.unclampedColor Float default: 1.0 -- animatable; alias: Unclamped_Color

<ring>.unclampedColorInvert Boolean default: false -- alias: Source_Unclamped_Color_Invert

<ring>.sourceSurfaceNormal Boolean default: false -- alias: Source_Surface_Normal

<ring>.surfaceNormal Float default: 0.0 -- animatable; alias: Surface_Normal

<ring>.surfaceNormalInvert Boolean default: false -- alias: Source_Surface_Normal_Invert

<ring>.sourceWhole Boolean default: false -- alias: Source_Whole

<ring>.sourceAlpha Boolean default: false -- alias: Source_Alpha

<ring>.alpha Integer default: 0 -- animatable

<ring>.sourceZBuffer Boolean default: false -- alias: Source_Z_Buffer

<ring>.zHi Float default: 1000.0 -- animatable; alias: Z_Hi

<ring>.zLo Float default: 0.0 -- animatable; alias: Z_Lo

<ring>.filterAll Boolean default: true -- alias: Filter_All

<ring>.filterEdge Boolean default: false -- alias: Filter_Edge

<ring>.filterPerimeterAlpha Boolean default: false -- alias: Filter_Perimeter_Alpha

<ring>.filterPerimeter Boolean default: false -- alias: Filter_Perimeter

<ring>.filterBrightness Boolean default: false -- alias: Filter_Brightness

<ring>.brightness Integer default: 0 -- animatable; alias: Bright

<ring>.brightnessInvert Boolean default: false -- alias: Filter_Brightness_Invert

<ring>.filterHue Boolean default: false -- alias: Filter_Hue

<ring>.hueRange Integer default: 0 -- animatable; alias: Hue_Range

<ring>.hue Color default: (color 255 0 0) -- animatable

<ring>.applyNoise Boolean default: false -- alias: Apply_Additional_Effects

<ring>.noiseMap TextureMap default: undefined -- alias: Noise_Map

<ring>.radial_density SubAnim

<ring>.radialDensity TextureMap default: undefined -- alias: Radial_Density_Map

<ring>.useRadialDensity Boolean default: false -- alias: Apply_Radial_Density_Map

<ring.radial_falloff>.curve_1 SubAnim

The curve_1 SubAnim contains the radial_falloff curve. You cannot create or access points in this curve unless the point is animated. In this case, you can access the animated point position as a SubAnim of the curve_1 property.

<ring.circular_falloff>.curve_1 SubAnim

The curve_1 SubAnim contains the circular_falloff curve. You cannot create or access points in this curve unless the point is animated. In this case, you can access the animated point position as a SubAnim of the curve_1 property.

<ring.radial_size>.curve_1 SubAnim

The curve_1 SubAnim contains the radial_size curve. You cannot create or access points in this curve unless the point is animated. In this case, you can access the animated point position as a SubAnim of the curve_1 property.

<ring.radial_density>.curve_1 SubAnim

The curve_1 SubAnim contains the radial_density curve. You cannot create or access points in this curve unless the point is animated. In this case, you can access the animated point position as a SubAnim of the curve_1 property.

NOTE:

The le.addRing <Lens_Effects> method returns true if the addition was successful, false if it failed. Once the element has been added, it can be accessed as a property of the lens_effects value. The name of this property for ring elements is ring. If more than one element of the same type is added, only the first is accessible using the property name. You will need to access the remaining elements as subAnims of the lens_effects value. The subAnim names are the same as the property names. The elements start at subAnim 7.

See also

Lens_Effects : RenderEffect

Value Common Properties, Operators, and Methods


Lens_Effects - Star

Lens_Effects - Star_Element

Star_Element - superclass: ReferenceTarget; super-superclass:MAXWrapper - classID: #(366678916, 1195116589)

Value > MAXWrapper > RenderEffect > LensEffect > Star_Element

Constructor

le.addStar <Lens_Effects>

Aliases

Star_Element

'Star Element'

Properties

<star>.elementName String default: "Star" -- alias: Name

<star>.on Boolean default: true

<star>.size Float default: 200.0 -- animatable

<star>.intensity Float default: 20.0 -- animatable

<star>.width Float default: 8.0 -- animatable

<star>.angle Float default: 0.0 -- animatable

<star>.taper Float default: 0.5 -- animatable

<star>.sharp Float default: 9.5 -- animatable; alias: Sharpness

<star>.quantity Integer default: 6 -- animatable

<star>.objectsHide Boolean default: false -- alias: Object_Hide

<star>.occlusion Float default: 50.0 -- animatable

<star>.squeeze Boolean default: false

<star>.colorSource Float default: 100.0 -- animatable; alias: Source_Color

<star>.centerColor Color default: (color 0 0 255) -- animatable; alias: Center_Color

<star>.edgeColor Color default: (color 255 255 255) -- animatable; alias: Edge_Color

<star>.radialMtl TextureMap default: undefined -- alias: Radial_Material

<star>.useRadialMtl Boolean default: false -- alias: Apply_Radial_Color_Map

<star>.radial_falloff SubAnim

<star>.radialMap TextureMap default: undefined -- alias: Radial_Falloff_Map

<star>.useRadialMap Boolean default: false -- alias: Apply_Radial_Falloff_Map

<star>.circularColorMix Float default: 0.0 -- animatable; alias: Circular_Color_Mix

<star>.leftSectionColor Color default: (color 0 0 255) -- animatable; alias: Left_Section_Color

<star>.centerSectionColor Color default: (color 255 255 255) -- animatable; alias: Center_Section_Color

<star>.rightSectionColor Color default: (color 0 0 255) -- animatable; alias: Right_Section_Color

<star>.circularMtl TextureMap default: undefined -- alias: Circular_Material

<star>.useCircularMtl Boolean default: false -- alias: Apply_Circular_Color_Map

<star>.circular_falloff SubAnim

<star>.circularMap TextureMap default: undefined -- alias: Circular_Falloff_Map

<star>.useCircularMap Boolean default: false -- alias: Apply_Circular_Falloff_Map

<star>.radial_size SubAnim

<star>.radialSizeMap TextureMap default: undefined -- alias: Radial_Size_Map

<star>.useRadialSizeMap Boolean default: false -- alias: Apply_Radial_Size_Map

<star>.applyLights Boolean default: true -- alias: Apply_to_Lights

<star>.applyImage Boolean default: true -- alias: Apply_to_Image

<star>.applyImageCenters Boolean default: false -- alias: Apply_to_Image_Centers

<star>.sourceObjectID Boolean default: false -- alias: Source_Object_ID

<star>.objectID Integer default: 1 -- animatable; alias: Object_ID

<star>.sourceEffectsID Boolean default: false -- alias: Source_Effects_ID

<star>.effectsID Integer default: 1 -- animatable; alias: Effects_ID

<star>.sourceUnclampedColor Boolean default: false -- alias: Source_Unclamped_Color

<star>.unclampedColor Float default: 1.0 -- animatable; alias: Unclamped_Color

<star>.unclampedColorInvert Boolean default: false -- alias: Source_Unclamped_Color_Invert

<star>.sourceSurfaceNormal Boolean default: false -- alias: Source_Surface_Normal

<star>.surfaceNormal Float default: 0.0 -- animatable; alias: Surface_Normal

<star>.surfaceNormalInvert Boolean default: false -- alias: Source_Surface_Normal_Invert

<star>.sourceWhole Boolean default: false -- alias: Source_Whole

<star>.sourceAlpha Boolean default: false -- alias: Source_Alpha

<star>.alpha Integer default: 0 -- animatable

<star>.sourceZBuffer Boolean default: false -- alias: Source_Z_Buffer

<star>.zHi Float default: 1000.0 -- animatable; alias: Z_Hi

<star>.zLo Float default: 0.0 -- animatable; alias: Z_Lo

<star>.filterAll Boolean default: true -- alias: Filter_All

<star>.filterEdge Boolean default: false -- alias: Filter_Edge

<star>.filterPerimeterAlpha Boolean default: false -- alias: Filter_Perimeter_Alpha

<star>.filterPerimeter Boolean default: false -- alias: Filter_Perimeter

<star>.filterBrightness Boolean default: false -- alias: Filter_Brightness

<star>.brightness Integer default: 0 -- animatable; alias: Bright

<star>.brightnessInvert Boolean default: false -- alias: Filter_Brightness_Invert

<star>.filterHue Boolean default: false -- alias: Filter_Hue

<star>.hueRange Integer default: 0 -- animatable; alias: Hue_Range

<star>.hue Color default: (color 255 0 0) -- animatable

<star>.applyNoise Boolean default: false -- alias: Apply_Additional_Effects

<star>.noiseMap TextureMap default: undefined -- alias: Noise_Map

<star>.radial_density SubAnim

<star>.radialDensity TextureMap default: undefined -- alias: Radial_Density_Map

<star>.useRadialDensity Boolean default: false -- alias: Apply_Radial_Density_Map

<star.radial_falloff>.curve_1 SubAnim

The curve_1 SubAnim contains the radial_falloff curve. You cannot create or access points in this curve unless the point is animated. In this case, you can access the animated point position as a SubAnim of the curve_1 property.

<star.circular_falloff>.curve_1 SubAnim

The curve_1 SubAnim contains the circular_falloff curve. You cannot create or access points in this curve unless the point is animated. In this case, you can access the animated point position as a SubAnim of the curve_1 property.

<star.radial_size>.curve_1 SubAnim

The curve_1 SubAnim contains the radial_size curve. You cannot create or access points in this curve unless the point is animated. In this case, you can access the animated point position as a SubAnim of the curve_1 property.

<star.radial_density>.curve_1 SubAnim

The curve_1 SubAnim contains the radial_density curve. You cannot create or access points in this curve unless the point is animated. In this case, you can access the animated point position as a SubAnim of the curve_1 property.

NOTE:

The le.addStar <Lens_Effects> method returns true if the addition was successful, false if it failed. Once the element has been added, it can be accessed as a property of the lens_effects value. The name of this property for star elements is star. If more than one element of the same type is added, only the first is accessible using the property name. You will need to access the remaining elements as subAnims of the lens_effects value. The subAnim names are the same as the property names. The elements start at subAnim 7.

See also

Lens_Effects : RenderEffect

Value Common Properties, Operators, and Methods


Lens_Effects - Streak

Lens_Effects - Streak_Element

Streak_Element - superclass: ReferenceTarget; super-superclass:MAXWrapper - classID: #(178544221, 1210386916)

Value > MAXWrapper > RenderEffect > LensEffect > Streak_Element

Constructor

le.addStreak <Lens_Effects>

Aliases

Streak_Element

'Streak Element'

Properties

<streak>.elementName String default: "Streak" -- alias: Name

<streak>.on Boolean default: true

<streak>.size Float default: 50.0 -- animatable

<streak>.intensity Float default: 30.0 -- animatable

<streak>.width Float default: 2.0 -- animatable

<streak>.angle Float default: 0.0 -- animatable

<streak>.taper Float default: 0.5 -- animatable

<streak>.sharp Float default: 9.8 -- animatable; alias: Sharpness

<streak>.objectsHide Boolean default: false -- alias: Object_Hide

<streak>.occlusion Float default: 100.0 -- animatable

<streak>.squeeze Boolean default: false

<streak>.colorSource Float default: 100.0 -- animatable; alias: Source_Color

<streak>.centerColor Color default: (color 0 0 255) -- animatable; alias: Center_Color

<streak>.edgeColor Color default: (color 255 255 255) -- animatable; alias: Edge_Color

<streak>.radialMtl TextureMap default: undefined -- alias: Radial_Material

<streak>.useRadialMtl Boolean default: false -- alias: Apply_Radial_Color_Map

<streak>.radial_falloff SubAnim

<streak>.radialMap TextureMap default: undefined -- alias: Radial_Falloff_Map

<streak>.useRadialMap Boolean default: false -- alias: Apply_Radial_Falloff_Map

<streak>.circularColorMix Float default: 50.0 -- animatable; alias: Circular_Color_Mix

<streak>.quadrant1Color Color default: (color 0 0 0) -- animatable; alias: Left_Section_Color

<streak>.quadrant2Color Color default: (color 255 255 255) -- animatable; alias: Center_Section_Color

<streak>.quadrant3Color Color default: (color 0 0 0) -- animatable; alias: Right_Section_Color

<streak>.circularMtl TextureMap default: undefined -- alias: Circular_Material

<streak>.useCircularMtl Boolean default: false -- alias: Apply_Circular_Color_Map

<streak>.circular_falloff SubAnim

<streak>.circularMap TextureMap default: undefined -- alias: Circular_Falloff_Map

<streak>.useCircularMap Boolean default: false -- alias: Apply_Circular_Falloff_Map

<streak>.radial_size SubAnim

<streak>.radialSizeMap TextureMap default: undefined -- alias: Radial_Size_Map

<streak>.useRadialSizeMap Boolean default: false -- alias: Apply_Radial_Size_Map

<streak>.applyLights Boolean default: true -- alias: Apply_to_Lights

<streak>.applyImage Boolean default: true -- alias: Apply_to_Image

<streak>.applyImageCenters Boolean default: false -- alias: Apply_to_Image_Centers

<streak>.sourceObjectID Boolean default: false -- alias: Source_Object_ID

<streak>.objectID Integer default: 1 -- animatable; alias: Object_ID

<streak>.sourceEffectsID Boolean default: false -- alias: Source_Effects_ID

<streak>.effectsID Integer default: 1 -- animatable; alias: Effects_ID

<streak>.sourceUnclampedColor Boolean default: false -- alias: Source_Unclamped_Color

<streak>.unclampedColor Float default: 1.0 -- animatable; alias: Unclamped_Color

<streak>.unclampedColorInvert Boolean default: false -- alias: Source_Unclamped_Color_Invert

<streak>.sourceSurfaceNormal Boolean default: false -- alias: Source_Surface_Normal

<streak>.surfaceNormal Float default: 0.0 -- animatable; alias: Surface_Normal

<streak>.surfaceNormalInvert Boolean default: false -- alias: Source_Surface_Normal_Invert

<streak>.sourceWhole Boolean default: false -- alias: Source_Whole

<streak>.sourceAlpha Boolean default: false -- alias: Source_Alpha

<streak>.alpha Integer default: 0 -- animatable

<streak>.sourceZBuffer Boolean default: false -- alias: Source_Z_Buffer

<streak>.zHi Float default: 1000.0 -- animatable; alias: Z_Hi

<streak>.zLo Float default: 0.0 -- animatable; alias: Z_Lo

<streak>.filterAll Boolean default: true -- alias: Filter_All

<streak>.filterEdge Boolean default: false -- alias: Filter_Edge

<streak>.filterPerimeterAlpha Boolean default: false -- alias: Filter_Perimeter_Alpha

<streak>.filterPerimeter Boolean default: false -- alias: Filter_Perimeter

<streak>.filterBrightness Boolean default: false -- alias: Filter_Brightness

<streak>.brightness Integer default: 0 -- animatable; alias: Bright

<streak>.brightnessInvert Boolean default: false -- alias: Filter_Brightness_Invert

<streak>.filterHue Boolean default: false -- alias: Filter_Hue

<streak>.hueRange Integer default: 0 -- animatable; alias: Hue_Range

<streak>.hue Color default: (color 255 0 0) -- animatable

<streak>.applyNoise Boolean default: false -- alias: Apply_Additional_Effects

<streak>.noiseMap TextureMap default: undefined -- alias: Noise_Map

<streak>.radial_density SubAnim

<streak>.radialDensity TextureMap default: undefined -- alias: Radial_Density_Map

<streak>.useRadialDensity Boolean default: false -- alias: Apply_Radial_Density_Map

<streak.radial_falloff>.curve_1 SubAnim

The curve_1 SubAnim contains the radial_falloff curve. You cannot create or access points in this curve unless the point is animated. In this case, you can access the animated point position as a SubAnim of the curve_1 property.

<streak.circular_falloff>.curve_1 SubAnim

The curve_1 SubAnim contains the circular_falloff curve. You cannot create or access points in this curve unless the point is animated. In this case, you can access the animated point position as a SubAnim of the curve_1 property.

<streak.radial_size>.curve_1 SubAnim

The curve_1 SubAnim contains the radial_size curve. You cannot create or access points in this curve unless the point is animated. In this case, you can access the animated point position as a SubAnim of the curve_1 property.

<streak.radial_density>.curve_1 SubAnim

The curve_1 SubAnim contains the radial_density curve. You cannot create or access points in this curve unless the point is animated. In this case, you can access the animated point position as a SubAnim of the curve_1 property.

NOTE:

The le.addStreak <Lens_Effects> method returns true if the addition was successful, false if it failed. Once the element has been added, it can be accessed as a property of the lens_effects value. The name of this property for streak elements is streak. If more than one element of the same type is added, only the first is accessible using the property name. You will need to access the remaining elements as subAnims of the lens_effects value. The subAnim names are the same as the property names. The elements start at subAnim 7.

See also

Lens_Effects : RenderEffect

Value Common Properties, Operators, and Methods


Render Element Manager

Rendering to elements lets you separate various information in the rendering into individual image files. This can be useful when you work with some image-processing or special-effects software. You can later do compositing with the element renderings.

When you render one or more elements, a normal complete rendering is also generated. In fact, the element renderings are generated during the same rendering pass, so rendering elements costs little extra render time.

Rendering to elements is available only when you do production rendering with the default scanline renderer.

Interface: RenderElementMgr

This is the interface for the Render Element Manager.

See also

Interface: maxOps

Combustion


RenderElements

RenderElements can be used to save different elements of the final rendering to separate bitmaps for later compositing.

The following RenderElements are exposed to MAXScript:

alphaRenderElement : MAXObject

atmosphereRenderElement : MAXObject

BackgroundRenderElement: MAXObject

Beauty : RenderElement

BlendRenderElement : MAXObject

diffuseRenderElement : MAXObject

emissionRenderElement : MAXObject

Illuminance_Render_Element: RenderElement

Ink : RenderElement

Lighting : RenderElement

Lighting_Analysis_Data

Lumination_Render_Element : RenderElement

Luminance_Render_Element: RenderElement

Material_ID : RenderElement

MatteRenderElement : RenderElement

Object_ID : RenderElement

PaintRenderElement : RenderElement

reflectionRenderElement : MAXObject

refractionRenderElement : MAXObject

Self_Illumination : MAXObject

ShadowRenderElement : MAXObject

specularRenderElement : MAXObject

ZRenderElement : MAXObject


alphaRenderElement - superclass: MAXObject

alphaRenderElement : MAXObject

alphaRenderElement - superclass: MAXObject; super-superclass:Value - 4:0 - classID: #(13, 0)

Value > MAXObject > ( RenderElement ) > alphaRenderElement

Constructors

alphaRenderElement ...

Alpha ...

Properties

<alphaRenderElement>.enabled Boolean default: true -- boolean

Shows whether the element is enabled.

<alphaRenderElement>.filterOn Boolean default: true -- boolean; FilteringOn

Shows whether the active antialiasing filter is enabled for the element.

<alphaRenderElement>.elementName String default: "Alpha" -- string

Shows the name of the currently selected element. You can type in a custom name for the element. This control is unavailable when multiple elements are selected.

<alphaRenderElement>.bitmap UndefinedClass default: undefined -- bitmap

See also

RenderElements


atmosphereRenderElement - superclass: MAXObject

atmosphereRenderElement : MAXObject

atmosphereRenderElement - superclass: MAXObject; super-superclass:Value - 4:0 - classID: #(9, 0)

Value > MAXObject > ( RenderElement ) > atmosphereRenderElement

Constructors

atmosphereRenderElement ...

Atmosphere ...

Properties

<atmosphereRenderElement>.enabled Boolean default: true -- boolean

Shows whether the element is enabled.

<atmosphereRenderElement>.filterOn Boolean default: true -- boolean; FilteringOn

Shows whether the active antialiasing filter is enabled for the element.

<atmosphereRenderElement>.elementName String default: "Atmosphere" -- string

Shows the name of the currently selected element. You can type in a custom name for the element. This control is unavailable when multiple elements are selected.

<atmosphereRenderElement>.bitmap UndefinedClass default: undefined -- bitmap

See also

RenderElements


BackgroundRenderElement - superclass: MAXObject

BackgroundRenderElement : MAXObject

BackgroundRenderElement - superclass: MAXObject; super-superclass:Value - 4:0 - classID: #(15, 0)

Value > MAXObject > ( RenderElements ) > BackgroundRenderElement

Constructors

BackgroundRenderElement ...

bgndRenderElement ...

Properties

<BackgroundRenderElement>.enabled Boolean default: true -- boolean

Shows whether the element is enabled.

<BackgroundRenderElement>.filterOn Boolean default: false -- boolean; FilteringOn

Shows whether the active antialiasing filter is enabled for the element.

<BackgroundRenderElement>.elementName String default: "Background" -- string

Shows the name of the currently selected element. You can type in a custom name for the element.

This control is unavailable when multiple elements are selected.

<BackgroundRenderElement>.bitmap UndefinedClass default: undefined -- bitmap

See also

RenderElements


Beauty : RenderElement

Beauty : RenderElement {1,0}

Value > MAXObject > ( RenderElements ) > Beauty

Class instances not creatable by MAXScript

Aliases:

Beauty

BeautyRenderElement

Properties:

.enabled : boolean

.filterOn (FilteringOn) : boolean

.atmosphereOn : boolean

.shadowOn (ShadowsOn) : boolean

.elementName : string

.bitmap : bitmap

See also

RenderElements


BlendRenderElement - superclass: MAXObject

BlendRenderElement : MAXObject

BlendRenderElement - superclass: MAXObject; super-superclass:Value - 12:0 - classID: #(11, 0)

Value > MAXObject > ( RenderElements ) > BlendRenderElement

Constructor:

BlendRenderElement ...

Properties:

<BlendRenderElement>.enabled Boolean default: true -- boolean

Shows whether the element is enabled.

<BlendRenderElement>.filterOn Boolean default: true -- boolean; FilteringOn

Shows whether the active antialiasing filter is enabled for the element.

<BlendRenderElement>.elementName String default: "Blend" -- string

Shows the name of the currently selected element. You can type in a custom name for the element.

This control is unavailable when multiple elements are selected.

<BlendRenderElement>.bitmap UndefinedClass default: undefined -- bitmap

<BlendRenderElement>.atmosphereOn Boolean default: true -- boolean

When on, include atmospheric effects. Default=on.

<BlendRenderElement>.shadowOn Boolean default: true -- boolean; Shadows

When on, include shadows. Default=on.

<BlendRenderElement>.diffuseOn Boolean default: true -- boolean; Diffuse

When on, include the diffuse color component. Default=on.

<BlendRenderElement>.ambientOn Boolean default: true -- boolean; Ambient

When on, include the ambient color component. Default=on.

<BlendRenderElement>.specularOn Boolean default: true - - boolean; Specular

When on, include the specular color component. Default=on.

<BlendRenderElement>.emissionOn Boolean default: true -- boolean; Self_Illum

When on, include self-illumination. Default=on.

<BlendRenderElement>.reflectionOn Boolean default: true -- boolean; Reflection

When on, include reflections. Default=on.

<BlendRenderElement>.refractionOn Boolean default: true -- boolean; Refraction

When on, include refractions. Default=on.

<BlendRenderElement>.inkOn Boolean default: true -- boolean; Ink

When on, include InkNPaint Ink component. Default=on.

<BlendRenderElement>.paintOn Boolean default: true -- boolean; Paint

When on, include InkNPaint Paint component. Default=on.

See also

RenderElements


diffuseRenderElement - superclass: MAXObject

diffuseRenderElement : MAXObject

diffuseRenderElement - superclass: MAXObject; super-superclass:Value - 4:0 - classID: #(4, 0)

Value > MAXObject > ( RenderElements ) > diffuseRenderElement

Constructors

diffuseRenderElement ...

Diffuse ...

Properties

<diffuseRenderElement>.enabled Boolean default: true -- boolean

Shows whether the element is enabled.

<diffuseRenderElement>.filterOn Boolean default: true -- boolean; FilteringOn

Shows whether the active antialiasing filter is enabled for the element.

<diffuseRenderElement>.elementName String default: "Diffuse" -- string

Shows the name of the currently selected element. You can type in a custom name for the element.

This control is unavailable when multiple elements are selected.

<diffuseRenderElement>.bitmap UndefinedClass default: undefined -- bitmap

<diffuseRenderElement>.lightingOn BooleanClass default: true -- boolean; Lighting

When set to true, lighting is enabled.

See also

RenderElements


emissionRenderElement - superclass: MAXObject

emissionRenderElement : MAXObject

emissionRenderElement - superclass: MAXObject; super-superclass:Value - 4:0 - classID: #(5, 0)

Value > MAXObject > ( RenderElements ) > emissionRenderElement

Constructor

emissionRenderElement ...

self_Illumination ...

Properties

<emissionRenderElement>.enabled Boolean default: true -- boolean

Shows whether the element is enabled.

<emissionRenderElement>.filterOn Boolean default: true -- boolean; FilteringOn

Shows whether the active antialiasing filter is enabled for the element.

<emissionRenderElement>.elementName String default: "Self-Illumination" -- string

Shows the name of the currently selected element. You can type in a custom name for the element.

This control is unavailable when multiple elements are selected.

<emissionRenderElement>.bitmap UndefinedClass default: undefined -- bitmap

See also

RenderElements


Illuminance_Render_Element: RenderElement

Illuminance_Render_Element - superclass: MAXObject; super-superclass:Value - 6:0 - classID: #(1777622264, 2135372367)

Value > MAXObject > ( RenderElements ) > Illuminance_Render_Element

Constructor

This class is not creatable by MAXScript. It is created and used by the Pseudo_Color_Exposure_Control ToneOperator.

Aliases

Illuminance_Render_Element

IllumRenderElement

Properties

<Illuminance_Render_Element>.atmosphereOn Boolean default: true -- alias: atmosphere_on

<Illuminance_Render_Element>.bitmap Bitmap default: undefined

<Illuminance_Render_Element>.elementName String default: "Illuminance" -- alias: element_name

<Illuminance_Render_Element>.enabledOn Boolean default: true -- alias: enabled

<Illuminance_Render_Element>.filterOn Boolean default: true -- alias: filter_on

<Illuminance_Render_Element>.shadowOn Boolean default: true -- alias: shadows_on

See also

Pseudo_Color_Exposure_Control : ToneOperator

Luminance_Render_Element: RenderElement


Illumination_Render_Element : RenderElement

Illumination_Render_Element : RenderElement {69f45cf4,7f473248}

Value > MAXObject > ( RenderElements ) > Illumination_Render_Element

The Illumination_Render_Element outputs Illumination data.

Class instances not creatable by MAXScript

Properties:

.enabledOn (Illumination_Enabled) : boolean

.filterOn (Illumination_Filter_On) : boolean

.atmosphereOn (Illumination_Atmosphere_On) : boolean

.shadowOn (Illumination_Shadow_On) : boolean

.elementName (Illuminatinon_Render_Element) : string

.bitmap (Illumination_Bitmap) : bitmap

.actualBitmap (Actual_Bitmap) : bitmap

See also

RenderElements


Ink : RenderElement

Ink - superclass: RenderElement; super-superclass:MAXWrapper - 4:0 - classID: #(450513551, 1836194615)

Value > MAXObject > ( RenderElements ) > Ink

Ink RenderElement outputs the InkNPaint Ink component.

Constructors

Ink ...

InkRenderElement ...

Properties

<Ink>.bitmap Bitmap default: undefined -- bitmap

Gets the bitmap the RenderElement writes to.

<Ink>.elementName String default: "Ink" -- string; Element_name

Gets/Sets the name of the RenderElement.

<Ink>.enabled Boolean default: true -- boolean

Enables/Disables the RenderElement.

<Ink>.filterOn Boolean default: true -- boolean; Filter_On

Enables/Disables filtering for the RenderElement.

See also

RenderElements


Lighting : RenderElement

Lighting - superclass: RenderElement; super-superclass:MAXWrapper - 7:0 - classID: #(17, 0)

Value > MAXObject > ( RenderElements ) > Lighting

The Lighting RenderElement outputs the direct lighting.

NOTE:

This RenderElement is not available in Autodesk VIZ.

Constructor

Lighting ...

LightingRenderElement ...

Properties

<Lighting>.enabled BooleanClass default: true -- boolean

<Lighting>.filterOn BooleanClass default: true -- boolean; FilteringOn

<Lighting>.elementName String default: "Lighting" -- string

<Lighting>.bitmap UndefinedClass default: undefined -- bitmap;

<Lighting>.shadowsOn BooleanClass default: true -- boolean; Shadows

<Lighting>.directOn BooleanClass default: true -- boolean; Direct_Light_On

<Lighting>.indirectOn BooleanClass default: true -- boolean; Indirect_Light_On

See also

RenderElements


Lighting_Analysis_Data : RenderElement

Lighting_Analysis_Data : RenderElement {18a96811,2f1383c}

Value > MAXObject > ( RenderElement ) > Lighting_Analysis_Data

NEW in 3ds Max 2009 Design: The Lighting_Analysis_Data Render Element allows the saving of the lighting analysis data to a separate image output.

NOTE:

This feature is exposed in 3ds Max Design only.

Constructors:

Class instances not creatable by MAXScript.

This RenderElement will be created and added automatically to the Render Elements list when a Lighting_Analysis_Overlay : RenderEffect is added to the Effects List.

Aliases:

Lighting_Analysis_Data
lightingAnalysisDataRenderElement

Properties:

<Lighting_Analysis_Data>.enabledOn (enabled) : boolean

Get/set the state of the Enabled checkbox.

<Lighting_Analysis_Data>.filterOn (filter_on) : boolean

Get/set the state of the Enable Filtering checkbox.

<Lighting_Analysis_Data>.atmosphereOn (atmosphere_on) : boolean

Get/set whether to apply atmospheric effects.

<Lighting_Analysis_Data>.shadowOn (shadows_on) : boolean

Get/set whether to apply shadows.

<Lighting_Analysis_Data>.elementName (element_name) : string

Get/set the name of the Render Element.

<Lighting_Analysis_Data>.bitmap : bitmap

Get/set the bitmap value of the Render Element.

See also

RenderElements

Lighting Analysis and Daylight Simulation Tools


Luminance_Render_Element: RenderElement

Luminance_Render_Element - superclass: MAXObject; super-superclass:Value - 6:0 - classID: #(1578839750, 1962503679)

Value > MAXObject > ( RenderElements ) > Luminance_Render_Element

Constructor

This class is not creatable by MAXScript. It is created and used by the Pseudo_Color_Exposure_Control ToneOperator.

Aliases

Luminance_Render_Element

lumRenderElement

Properties

<Luminance>.atmosphereOn Boolean default: true -- alias: atmosphere_on

<Luminance>.bitmap Bitmap default: undefined

<Luminance>.elementName String default: "Luminance" -- alias: element_name

<Luminance>.enabledOn Boolean default: true -- alias: enabled

<Luminance>.filterOn Boolean default: true -- alias: filter_on

<Luminance>.shadowOn Boolean default: true -- alias: shadows_on

See also

RenderElements

Pseudo_Color_Exposure_Control : ToneOperator

Illuminance_Render_Element: RenderElement


Lumination_Render_Element : RenderElement

Lumination_Render_Element : RenderElement {5e1b2ec4,74f96dfc}

Value > MAXObject > ( RenderElements ) > Lumination_Render_Element

This RenderElement outputs Lumination data.

Class instances not creatable by MAXScript

Properties:

.enabledOn (Lumination_Enabled) : Boolean

Enable/Disable the RenderElement.

.filterOn (Lumination_Filter_On) : Boolean

Enable/Disable the filtering.

.atmosphereOn (Lumination_Atmosphere_On) : Boolean

Enable/Disable atmospheric effects.

.shadowOn (Lumination_Shadow_On) : Boolean

Enable/Disable shadows.

.elementName (Lumination_Render_Element) : string

Get/Set the RenderElement name.

.bitmap (Lumination_Bitmap) : bitmap

Get/Set the Lumination Bitmap

.actualBitmap (Actual_Bitmap) : bitmap

Get/Set the actual bitmap

See also

RenderElements


Material_ID : RenderElement

Material_ID - superclass: RenderElement; super-superclass:MAXWrapper - 4:0 - classID: #(20, 0)

Value > MAXObject > ( RenderElements ) > Material_ID

The Material_ID RenderElement outputs the material IDs assigned to objects via the Material Effects channel in the Material Editor. Available in 3ds Max 8 and higher.

NOTE:

This RenderElement is not available in Autodesk VIZ.

Constructor

Material_OD ...

materialIDRenderElement...

Properties

<Material_ID>.bitmap UndefinedClass default: undefined -- bitmap;

Gets the bitmap the RenderElement writes to.

<Material_ID>.elementName String default: "Material ID" -- string

Gets/Sets the name of the RenderElement.

<Material_ID>.enabled BooleanClass default: true -- boolean

Enables/Disables the RenderElement.

<Material_ID>.filterOn BooleanClass default: false -- boolean; FilteringOn

Enables/Disables filtering for the RenderElement.

See also

RenderElements


MatteRenderElement : RenderElement

MatteRenderElement - superclass: RenderElement; super-superclass:MAXWrapper - 9:0 - classID: #(18, 0)

Value > MAXObject > ( RenderElements ) > MatteRenderElement

The MatteRenderElement outputs a matte element of objects selected by G-Buffer, Material ID or by user-defined object selection.

NOTE:

This RenderElement is not available in Autodesk VIZ.

Constructor

MatteRenderElement ...

Properties

<MatteRenderElement>.enabled BooleanClass default: true -- boolean

<MatteRenderElement>.filterOn BooleanClass default: true -- boolean; FilteringOn

<MatteRenderElement>.elementName String default: "Matte" -- string

<MatteRenderElement>.bitmap UndefinedClass default: undefined -- bitmap; !error setting value!

<MatteRenderElement>.mtlIDOn BooleanClass default: false -- boolean; Material_ID_Filter_On

<MatteRenderElement>.gbufIDOn BooleanClass default: false -- boolean; G_Buffer_ID_Filter_On

<MatteRenderElement>.gbufID Integer default: 1 -- integer; G_Buffer_ID

<MatteRenderElement>.mtlID Integer default: 1 -- integer; Material_ID

<MatteRenderElement>.includeOn BooleanClass default: false -- boolean; Include_On

See also

RenderElements


Object_ID : RenderElement

Object_ID - superclass: RenderElement; super-superclass:MAXWrapper - 5:0 - classID: #(21, 0)

Value > MAXObject > ( RenderElements ) > Object_ID

The Object_ID RenderElement outputs the Object IDs assigned to objects via the Object Properties dialog. Available in 3ds Max 8 and higher.

NOTE:

This RenderElement is not available in Autodesk VIZ.

Constructor

Object_ID ...

objectIDRenderElement ...

Properties

<Object_ID>.bitmap UndefinedClass default: undefined -- bitmap;

Gets the bitmap the RenderElement writes to.

<Object_ID>.colorMode Integer default: 1 -- integer; Object_ID

Gets/Sets the color mode.

Possible values are:

0 - Object Color

1 - Object ID

<Object_ID>.elementName String default: "Object ID" -- string

Gets/Sets the name of the RenderElement.

<Object_ID>.enabled BooleanClass default: true -- boolean

Enables/Disables the RenderElement.

<Object_ID>.filterOn BooleanClass default: false -- boolean; FilteringOn

Enables/Disables filtering for the RenderElement.

See also

RenderElements


PaintRenderElement : RenderElement

PaintRenderElement - superclass: RenderElement; super-superclass:MAXWrapper - 4:0 - classID: #(610800728, 1405106252)

Value > MAXObject > ( RenderElements ) > PaintRenderElement

Paint RenderElement outputs the InkNPaint Paint component.

Constructors

PaintRenderElement...

Paint ...

Properties

<PaintRenderElement>.bitMap Bitmap default: undefined -- bitmap

Gets the bitmap the RenderElement writes to.

<PaintRenderElement>.elementName String default: "Paint" -- string; Element_name

Gets/Sets the name of the RenderElement.

<PaintRenderElement>.enabled Boolean default: true -- boolean

Enables/Disables the RenderElement.

<PaintRenderElement>.filterOn Boolean default: true -- boolean; Filter_On

Enables/Disables filtering for the RenderElement.

See also

RenderElements


reflectionRenderElement - superclass: MAXObject

reflectionRenderElement : MAXObject

reflectionRenderElement - superclass: MAXObject; super-superclass:Value - 4:0 - classID: #(6, 0)

Value > MAXObject > ( RenderElements ) > reflectionRenderElement

Constructors

reflectionRenderElement ...

Reflection ...

Properties

<reflectionRenderElement>.enabled Boolean default: true -- boolean

Shows whether the element is enabled.

<reflectionRenderElement>.filterOn Boolean default: true -- boolean; FilteringOn

Shows whether the active antialiasing filter is enabled for the element.

<reflectionRenderElement>.elementName String default: "Reflection" -- string

Shows the name of the currently selected element. You can type in a custom name for the element.

This control is unavailable when multiple elements are selected.

<reflectionRenderElement>.bitmap UndefinedClass default: undefined -- bitmap

See also

RenderElements


refractionRenderElement - superclass: MAXObject

refractionRenderElement : MAXObject

refractionRenderElement - superclass: MAXObject; super-superclass:Value - 4:0 - classID: #(7, 0)

Value > MAXObject > ( RenderElements ) > refractionRenderElement

Constructors

refractionRenderElement ...

Refraction ...

Properties

<refractionRenderElement>.enabled Boolean default: true -- boolean

Shows whether the element is enabled.

<refractionRenderElement>.filterOn Boolean default: true -- boolean; FilteringOn

Shows whether the active antialiasing filter is enabled for the element.

<refractionRenderElement>.elementName String default: "Refraction" -- string

Shows the name of the currently selected element. You can type in a custom name for the element.

This control is unavailable when multiple elements are selected.

<refractionRenderElement>.bitmap UndefinedClass default: undefined -- bitmap

See also

RenderElements


Self_Illumination - superclass: MAXObject

Self_Illumination : MAXObject

Self_Illumination - superclass: MAXObject; super-superclass:Value - 4:0 - classID: #(5, 0)

Value > MAXObject > ( RenderElements ) > Self_Illumination

Constructor

Self_Illumination ...

Properties

<Self_Illumination>.enabled Boolean default: true -- boolean

Shows whether the element is enabled.

<Self_Illumination>.filterOn Boolean default: true -- boolean; FilteringOn

Shows whether the active antialiasing filter is enabled for the element.

<Self_Illumination>.elementName String default: "Self-Illumination" -- string

Shows the name of the currently selected element. You can type in a custom name for the element.

This control is unavailable when multiple elements are selected.

<Self_Illumination>.bitmap UndefinedClass default: undefined -- bitmap

See also

RenderElements


ShadowRenderElement - superclass: MAXObject

ShadowRenderElement : MAXObject

ShadowRenderElement - superclass: MAXObject; super-superclass:Value - 4:0 - classID: #(8, 0)

Value > MAXObject > ( RenderElements ) > ShadowRenderElement

Constructor

ShadowRenderElement ...

Properties

<ShadowRenderElement>.enabled Boolean default: true -- boolean

Shows whether the element is enabled.

<ShadowRenderElement>.filterOn Boolean default: false -- boolean; FilteringOn

Shows whether the active antialiasing filter is enabled for the element.

<ShadowRenderElement>.elementName String default: "Shadow" -- string

Shows the name of the currently selected element. You can type in a custom name for the element.

This control is unavailable when multiple elements are selected.

<ShadowRenderElement>.bitmap UndefinedClass default: undefined -- bitmap

See also

RenderElements


specularRenderElement - superclass: MAXObject

specularRenderElement : MAXObject

specularRenderElement - superclass: MAXObject; super-superclass:Value - 4:0 - classID: #(2, 0)

Value > MAXObject > ( RenderElements ) > specularRenderElement

Constructors

specularRenderElement ...

Specular ...

Properties

<specularRenderElement>.enabled Boolean default: true -- boolean

Shows whether the element is enabled.

<specularRenderElement>.filterOn Boolean default: true -- boolean; FilteringOn

Shows whether the active antialiasing filter is enabled for the element.

<specularRenderElement>.elementName String default: "Specular" -- string

Shows the name of the currently selected element. You can type in a custom name for the element.

This control is unavailable when multiple elements are selected.

<specularRenderElement>.bitmap UndefinedClass default: undefined -- bitmap

See also

RenderElements


velocity : RenderElement

velocity - superclass: RenderElement; super-superclass:MAXWrapper - 6:0 - classID: #(19, 0)

Value > MAXObject > ( RenderElements ) > velocity

The Velocity RenderElement outputs the Velocity channel containing object motion data. Available in 3ds Max 8 and higher.

NOTE:

This RenderElement is not available in Autodesk VIZ.

Constructors

Velocity ...

MotionRenderElement ...

Properties

<velocity>.bitmap UndefinedClass default: undefined -- bitmap;

Gets the bitmap the RenderElement writes to.

<velocity>.elementName String default: "Velocity" -- string

Gets/Sets the name of the RenderElement.

<velocity>.enabled BooleanClass default: true -- boolean

Enables/Disables the RenderElement.

<velocity>.filterOn BooleanClass default: false -- boolean; FilteringOn

Enables/Disables filtering for the RenderElement.

<velocity>.velocityMax Float default: 1.0 -- float; Maximum_Velocity

Gets/Sets the maximum velocity value.

<velocity>.velocityOn BooleanClass default: false -- boolean; VelocityUpdate

Enables/Disables the Update checkbox in the RenderElement's UI.

See also

RenderElements


ZRenderElement - superclass: MAXObject

ZRenderElement : MAXObject

ZRenderElement - superclass: MAXObject; super-superclass:Value - 7:0 - classID: #(12, 0)

Value > MAXObject > ( RenderElements ) > ZRenderElement

Constructors

ZRenderElement ...

Z_Depth ...

Properties

<ZRenderElement>.enabled Boolean default: true -- boolean

Shows whether the element is enabled.

<ZRenderElement>.filterOn Boolean default: false -- boolean; FilteringOn

When on, applies the active antialiasing filter to the rendered element. When off, the rendered element does not use the antialiasing filter. Default=on.

The Filter Enabled column of the elements list shows whether or not the filter is enabled for an element.

You choose the antialiasing filter in the Anti-Aliasing group of the 3ds Max Default Scanline A-Buffer rollout.

Disabling antialiasing can improve rendering time, although the rendered element that results might appear jagged.

<ZRenderElement>.elementName String default: "Z Depth" -- string

Shows the name of the element. You can change the default name of elements, in the Selected Element Parameters group.

To select an element, click its name in the list. Use CTRL+click to select additional elements, or SHIFT+click to select a contiguous group of additional elements.

<ZRenderElement>.bitmap UndefinedClass default: undefined -- bitmap

<ZRenderElement>.zMin Float default: 100.0 -- float; Z_Min

The minimum distance to include in the Z-depth rendering. This is a value in 3ds Max units. Default=0.0 (cannot be less than zero).

<ZRenderElement>.zMax Float default: 300.0 -- float; Z_Max

The maximum distance to include in the Z-depth rendering. This is a value in 3ds Max units. Default=100.0.

<ZRenderElement>.zUpdate BooleanClass default: false -- boolean; Z_depth_update

Get/Set the state of the Update option. Available in 3ds Max 8 and higher.

See also

RenderElements


Bake Elements

Value > MAXWrapper > Bake Elements

These are the BakeElement classes implementing rendering to texture (a.k.a. "texture baking"). You can bake multiple maps in a single pass by applying more than one BakeElement:

AlphaMap : BakeElement

Ambient_Occlusion : BakeElement

BlendMap : BakeElement

CompleteMap : BakeElement

diffuseMap : BakeElement

HeightMap : BakeElement

LightingMap: BakeElement

Missing_Texture_Bake_Element : BakeElement

NormalsMap : BakeElement

ShadowsMap : BakeElement

specularMap : BakeElement

See also

Interface: INodeBakeProperties

RTT_Methods : Render To Texture Methods


AlphaMap : BakeElement

AlphaMap - superclass: BakeElement; super-superclass:MAXWrapper - classID: #(65545, 0)

Value > MAXWrapper > BakeElement > AlphaMap

This BakeElement allows the baking of the Alpha channel.

Constructor

AlphaMap ...

Properties

<AlphaMap>.autoSzOn Boolean default: false -- boolean; Auto_Size_On

Enable/Disable AutoSize.

<AlphaMap>.bitmap UndefinedClass default: undefined -- bitmap

Get the bake element’s bitmap. This property cannot be set through MAXScript.

<AlphaMap>.elementName String default: "AlphaMap" -- string

Get/Set the element name.

<AlphaMap>.enabled Boolean default: true -- boolean

Get/Set the enabled state.

<AlphaMap>.fileName Filename default: "" -- string;

Get/Set the bake element file name.

<AlphaMap>.filenameUnique Boolean default: false -- boolean; Filename_Unique

Enable/Disable unique file name generation.

<AlphaMap>.fileType Filename default: "" -- string;

Get/Set the file type.

<AlphaMap>.filterOn Boolean default: false -- boolean; FilteringOn

Enable/Disable filtering.

<AlphaMap>.outputSzX Integer default: 256 -- integer; output_width

Get/Set the output width.

<AlphaMap>.outputSzY Integer default: 256 -- integer; output_height

Get/Set the output height.

<AlphaMap>.targetMapSlotName String default: ""

Get/Set the name of the map slot where element output will be applied

See also

Interface: BakeElementProperties

Interface: INodeBakeProperties

Bake Elements


Ambient_Occlusion : BakeElement

Ambient_Occlusion - superclass: BakeElement; super-superclass:MAXWrapper - 17:0 - classID: #(65547, 0)

Value > MAXWrapper > BakeElement > Ambient_Occlusion

This BakeElement allows the Ambient Occlusion to be baked to a bitmap. Available in 3ds Max 8 and higher.

Constructor

Ambient_Occlusion ...

AmbientOcclusionBakeElement ...

Properties

<Ambient_Occlusion>.autoSzOn BooleanClass default: false -- boolean; Auto_Size_On

Enable/Disable AutoSize.

<Ambient_Occlusion>.bitmap UndefinedClass default: undefined -- bitmap

Get the bake element’s bitmap. This property cannot be set through MAXScript.

<Ambient_Occlusion>.bright Color default: (color 255 255 255) -- fRGBA color

Get/set the bright color of the ambient occlusion.

<Ambient_Occlusion>.dark Color default: (color 0 0 0 0) -- fRGBA color

Get/set the dark color of the ambient occlusion.

<Ambient_Occlusion>.elementName String default: "Ambient Occlusion (MR)" -- string

Get/Set the element name.

<Ambient_Occlusion>.enabled BooleanClass default: true -- boolean

Get/Set the enabled state.

<Ambient_Occlusion>.falloff Float default: 1.0 -- float

Get/set the falloff value.

<Ambient_Occlusion>.fileName Filename default: "" -- string

Get/Set the bake element file name.

<Ambient_Occlusion>.filenameUnique BooleanClass default: false -- boolean; Filename_Unique

Get/set whether the file name should be made unique.

<Ambient_Occlusion>.fileType Filename default: "" -- string

Get/Set the file type.

<Ambient_Occlusion>.filterOn BooleanClass default: true -- boolean; FilteringOn

Enable/Disable filtering.

<Ambient_Occlusion>.maxDistance Float default: 0.0 -- float; Max_Dist

Get/set the maximum distance.

<Ambient_Occlusion>.outputSzX Integer default: 256 -- integer; output_width

Get/set the output width.

<Ambient_Occlusion>.outputSzY Integer default: 256 -- integer; output_height

Get/set the output height.

<Ambient_Occlusion>.samples Integer default: 16 -- integer

Get/set the number of samples.

<Ambient_Occlusion>.spread Float default: 0.8 -- float

Get/set the spread value.

<Ambient_Occlusion>.targetMapSlotName String default: "" -- string

Get/Set the name of the map slot where element output will be applied.

See also

Interface: BakeElementProperties

Interface: INodeBakeProperties

Bake Elements


BlendMap : BakeElement

BlendMap - superclass: BakeElement; super-superclass:MAXWrapper - classID: #(65544, 0)

Value > MAXWrapper > BakeElement > BlendMap

BlendMap allows baking of a selection of lighting components when lighting is on. When lighting is off it can be used to bake ONLY ONE component as raw, for example it gives you the ability to bake a selfillumination map.

NOTE:

It doesn't make sense to have more than one unlit channel on, as there is no way to combine them in a meaningful way.

Constructor

BlendMap ...

Properties

<BlendMap>.ambientOn Boolean default: true -- boolean; Ambient

Enable/Disable baking of the ambient color component.

<BlendMap>.autoSzOn Boolean default: false -- boolean; Auto_Size_On

Enable/Disable AutoSize.

<BlendMap>.bitmap Bitmap default: undefined -- bitmap

Get the bake element’s bitmap. This property cannot be set through MAXScript.

<BlendMap>.diffuseOn Boolean default: true -- boolean; Diffuse

Enable/Disable baking of the diffuse color component.

<BlendMap>.elementName String default: "BlendMap" -- string

Get/Set the bake element’s name.

<BlendMap>.emissionOn Boolean default: true -- boolean; Self_Illum

Enable/Disable baking of self-illumination.

<BlendMap>.enabled Boolean default: true -- boolean

Enable/Disable the bake element.

<BlendMap>.fileName Filename default: "" -- string;

Get/Set the element’s output file name.

<BlendMap>.filenameUnique Boolean default: false -- boolean; Filename_Unique

Enable/Disable unique file name generation.

<BlendMap>.fileType Filename default: "" -- string;

Get/Set the element’s output file type.

<BlendMap>.filterOn Boolean default: false -- boolean; FilteringOn

Enable/Disable filtering.

<BlendMap>.lightingOn Boolean default: true -- boolean; Lighting

Enable/Disable baking of lighting.

<BlendMap>.outputSzX Integer default: 256 -- integer; output_width

Get/Set the output width.

<BlendMap>.outputSzY Integer default: 256 -- integer; output_height

Get/Set the output height.

<BlendMap>.reflectionOn Boolean default: true -- boolean; Reflection

Enable/Disable baking of reflections.

<BlendMap>.refractionOn Boolean default: true -- boolean; Refraction

Enable/Disable baking of refractions.

<BlendMap>.shadowsOn Boolean default: true -- boolean; Shadows

Enable/Disable baking of shadows.

<BlendMap>.specularOn Boolean default: true -- boolean; Specular

Enable/Disable baking of specularity.

<BlendMap>.targetMapSlotName String default: ""

Get/Set the name of the map slot where element output will be applied

See also

Interface: BakeElementProperties

Interface: INodeBakeProperties

Bake Elements


CompleteMap : BakeElement

CompleteMap - superclass: BakeElement; super-superclass:MAXWrapper - classID: #(65537, 0)

Value > MAXWrapper > BakeElement > CompleteMap

This BakeElement allows a lit, or lit & shadowed full material to be baked.

Constructor

CompleteMap ...

Properties

<CompleteMap>.autoSzOn Boolean default: false -- boolean; Auto_Size_On

Enable/Disable AutoSize.

<CompleteMap>.bitmap Bitmap default: undefined -- bitmap

Get the bake element’s bitmap. This property cannot be set through MAXScript.

<CompleteMap>.elementName String default: "CompleteMap" -- string

Get/Set the bake element’s name.

<CompleteMap>.enabled Boolean default: true -- boolean

Enable/Disable the bake element.

<CompleteMap>.fileName Filename default: "" -- string;

Get/Set the element’s output file name.

<CompleteMap>.filenameUnique Boolean default: false -- boolean; Filename_Unique

Enable/Disable unique file name generation.

<CompleteMap>.fileType Filename default: "" -- string;

Get/Set the bake element’s output file type.

<CompleteMap>.filterOn Boolean default: true -- boolean; FilteringOn

Enable/Disable filtering.

<CompleteMap>.outputSzX Integer default: 256 -- integer; output_width

Get/Set the output width.

<CompleteMap>.outputSzY Integer default: 256 -- integer; output_height

Get/Set the output height.

<CompleteMap>.shadowsOn Boolean default: true -- boolean; Shadows

Enable/Disable baking of shadows.

<CompleteMap>.targetMapSlotName String default: ""

Get/Set the name of the map slot where element output will be applied

See also

Interface: BakeElementProperties

Interface: INodeBakeProperties

Bake Elements


diffuseMap : BakeElement

diffuseMap - superclass: BakeElement; super-superclass:MAXWrapper - classID: #(65539, 0)

Value > MAXWrapper > BakeElement > diffuseMap

This BakeElement allows a raw, lit, or lit & shadowed diffuse channel to be baked.

Constructor

DiffuseMap ...

Properties

<diffuseMap>.autoSzOn Boolean default: false -- boolean; Auto_Size_On

Enable/Disable AutoSize.

<diffuseMap>.bitmap Bitmap default: undefined -- bitmap

Get the bake element’s bitmap. This property cannot be set through MAXScript.

<diffuseMap>.elementName String default: "DiffuseMap" -- string

Get/Set the bake element’s name.

<diffuseMap>.enabled Boolean default: true -- boolean

Enable/Disable the bake element.

<diffuseMap>.fileName Filename default: "" -- string;

Get/Set the element’s output file name.

<diffuseMap>.filenameUnique Boolean default: false -- boolean; Filename_Unique

Enable/Disable unique file name generation.

<diffuseMap>.fileType Filename default: "" -- string;

Get/Set the bake element’s output file type.

<diffuseMap>.filterOn Boolean default: true -- boolean; FilteringOn

Enable/Disable filtering.

<diffuseMap>.lightingOn Boolean default: false -- boolean; Lighting

Enable/Disable baking of lighting.

<diffuseMap>.outputSzX Integer default: 256 -- integer; output_width

Get/Set the output width.

<diffuseMap>.outputSzY Integer default: 256 -- integer; output_height

Get/Set the output height.

<diffuseMap>.shadowsOn Boolean default: false -- boolean; Shadows

Enable/Disable baking of shadows.

<diffuseMap>.targetMapSlotName String default: ""

Get/Set the name of the map slot where element output will be applied

See also

Interface: BakeElementProperties

Interface: INodeBakeProperties

Bake Elements


HeightMap : BakeElement

HeightMap - superclass: BakeElement; super-superclass:MAXWrapper - 11:0 - classID: #(1860721422, 0)

Value > MAXWrapper > BakeElement > HeightMap

This BakeElement allows a height map to be baked.

NOTE:

This BakeElement is not creatable in Autodesk VIZ.

Constructor

HeightMap ...

Properties

<HeightMap>.autoSzOn BooleanClass default: false -- boolean; Auto_Size_On

Enable/Disable AutoSize.

<HeightMap>.bitmap UndefinedClass default: undefined -- bitmap;

Get the bake element’s bitmap. This property cannot be set through MAXScript.

<HeightMap>.elementName String default: "HeightMap" -- string

Get/Set the bake element’s name.

<HeightMap>.enabled BooleanClass default: true -- boolean

Enable/Disable the bake element.

<HeightMap>.fileName Filename default: "" -- string;

Get/Set the element’s output file name.

<HeightMap>.filenameUnique BooleanClass default: false -- boolean; Filename_Unique

Enable/Disable unique file name generation.

<HeightMap>.fileType Filename default: "" -- string;

Get/Set the bake element’s output file type.

<HeightMap>.filterOn BooleanClass default: true -- boolean; FilteringOn

Enable/Disable filtering.

<HeightMap>.outputSzX Integer default: 256 -- integer; output_width

Get/Set the output width.

<HeightMap>.outputSzY Integer default: 256 -- integer; output_height

Get/Set the output height.

<HeightMap>.targetMapSlotName String default: "" -- string;

Get/Set the name of the map slot where element output will be applied

See also

Interface: BakeElementProperties

Interface: INodeBakeProperties

Bake Elements


LightingMap: BakeElement

LightingMap - superclass: BakeElement; super-superclass:MAXWrapper - classID: #(65542, 0)

Value > MAXWrapper > BakeElement > LightingMap

This BakeElement allows a light map of incoming illumination to be baked with or without shadows. This is a color map, as opposed to the shadow map which is monochrome. It can be used in conjunction with a shadow map: (low-res no-shadow light map)*(shadow map)

Constructor

LightingMap ...

Properties

<LightingMap>.autoSzOn Boolean default: false -- boolean; Auto_Size_On

Enable/Disable AutoSize.

<LightingMap>.bitmap Bitmap default: undefined -- bitmap

Get the bake element’s bitmap. This property cannot be set through MAXScript.

<LightingMap>.directOn Boolean default: true -- boolean; Direct_Light_On

Enable/Disable baking of direct lighting.

<LightingMap>.elementName String default: "LightingMap" -- string

Get/Set the bake element’s name.

<LightingMap>.enabled Boolean default: true -- boolean

Enable/Disable the bake element.

<LightingMap>.fileName Filename default: "" -- string;

Get/Set the element’s output file name.

<LightingMap>.filenameUnique Boolean default: false -- boolean; Filename_Unique

Enable/Disable unique file name generation.

<LightingMap>.fileType Filename default: "" -- string;

Get/Set the bake element’s output file type.

<LightingMap>.filterOn Boolean default: true -- boolean; FilteringOn

Enable/Disable filtering.

<LightingMap>.indirectOn Boolean default: true -- boolean; Indirect_Light_On

Enable/Disable baking of indirect lighting.

<LightingMap>.outputSzX Integer default: 256 -- integer; output_width

Get/Set the output width.

<LightingMap>.outputSzY Integer default: 256 -- integer; output_height

Get/Set the output height.

<LightingMap>.shadowsOn Boolean default: true -- boolean; Shadows

Enable/Disable baking of shadows.

<LightingMap>.targetMapSlotName String default: ""

Get/Set the name of the map slot where element output will be applied

See also

Interface: BakeElementProperties

Interface: INodeBakeProperties

Bake Elements


Missing_Texture_Bake_Element : BakeElement

Value > MAXWrapper > BakeElement > Missing_Texture_Bake_Element

Constructor

Class instances not creatable by MAXScript

See also

Missing Object Classes

Interface: BakeElementProperties

Interface: INodeBakeProperties

Bake Elements


NormalsMap : BakeElement

NormalsMap - superclass: BakeElement; super-superclass:MAXWrapper - classID: #(65543, 0)

Value > MAXWrapper > BakeElement > NormalsMap

This BakeElement allows a normal map to be baked.

NOTE:

This BakeElement is not creatable in Autodesk VIZ.

Constructor

NormalsMap ...

Properties

<NormalsMap>.autoSzOn Boolean default: false -- boolean; Auto_Size_On

Enable/Disable AutoSize.

<NormalsMap>.bitmap Bitmap default: undefined -- bitmap

Get the bake element’s bitmap. This property cannot be set through MAXScript.

<NormalsMap>.elementName String default: "NormalsMap" -- string

Get/Set the bake element’s name.

<NormalsMap>.enabled Boolean default: true -- boolean

Enable/Disable the bake element.

<NormalsMap>.fileName Filename default: "" -- string;

Get/Set the element’s output file name.

<NormalsMap>.filenameUnique Boolean default: false -- boolean; Filename_Unique

Enable/Disable unique file name generation.

<NormalsMap>.fileType Filename default: "" -- string;

Get/Set the bake element’s output file type.

<NormalsMap>.filterOn Boolean default: false -- boolean; FilteringOn

Enable/Disable filtering.

<NormalsMap>.outputSzX Integer default: 256 -- integer; output_width

Get/Set the output width.

<NormalsMap>.outputSzY Integer default: 256 -- integer; output_height

Get/Set the output height.

<NormalsMap>.targetMapSlotName String default: ""

Get/Set the name of the map slot where element output will be applied

<NormalsMap>.useHeightAsAlpha BooleanClass default: false -- boolean

When set to true, the height map will be rendered into the Alpha channel.

<NormalsMap>.useNormalBump BooleanClass default: false -- boolean

When set to true, the generated normals map will be assigned to a Normal_Bump textureMap.

See also

Interface: BakeElementProperties

Interface: INodeBakeProperties

Bake Elements


ShadowsMap : BakeElement

ShadowsMap - superclass: BakeElement; super-superclass:MAXWrapper - classID: #(65541, 0)

Value > MAXWrapper > BakeElement > ShadowsMap

This BakeElement allows a shadow map to be baked. This is a mono map, with a multiplier value in the rgb channels and the matting version in the alpha channel, as opposed to the lightingMap which is color.

Constructor

ShadowsMap ...

Properties

<ShadowsMap>.autoSzOn Boolean default: false -- boolean; Auto_Size_On

Enable/Disable AutoSize.

<ShadowsMap>.bitmap Bitmap default: undefined -- bitmap

Get the bake element’s bitmap. This property cannot be set through MAXScript.

<ShadowsMap>.elementName String default: "ShadowsMap" -- string

Get/Set the bake element’s name.

<ShadowsMap>.enabled Boolean default: true -- boolean

Enable/Disable the bake element.

<ShadowsMap>.fileName Filename default: "" -- string;

Get/Set the element’s output file name.

<ShadowsMap>.filenameUnique Boolean default: false -- boolean; Filename_Unique

Enable/Disable unique file name generation.

<ShadowsMap>.fileType Filename default: "" -- string;

Get/Set the bake element’s output file type.

<ShadowsMap>.filterOn Boolean default: true -- boolean; FilteringOn

Enable/Disable filtering.

<ShadowsMap>.outputSzX Integer default: 256 -- integer; output_width

Get/Set the output width.

<ShadowsMap>.outputSzY Integer default: 256 -- integer; output_height

Get/Set the output height.

<ShadowsMap>.targetMapSlotName String default: """" -- string;

Get/Set the name of the map slot where element output will be applied

See also

Interface: BakeElementProperties

Interface: INodeBakeProperties

Bake Elements


specularMap : BakeElement

specularMap - superclass: BakeElement; super-superclass:MAXWrapper - classID: #(65538, 0)

Value > MAXWrapper > BakeElement > specularMap

This BakeElement allows a raw, lit, or lit & shadowed specular channel to be baked.

Constructor

specularMap ...

Properties

<specularMap>.autoSzOn Boolean default: false -- boolean; Auto_Size_On

Enable/Disable AutoSize.

<specularMap>.bitmap Bitmap default: undefined -- bitmap

Get the bake element’s bitmap. This property cannot be set through MAXScript.

<specularMap>.elementName String default: "SpecularMap" -- string

Get/Set the bake element’s name.

<specularMap>.enabled Boolean default: true -- boolean

Enable/Disable the bake element.

<specularMap>.fileName Filename default: "" -- string;

Get/Set the element’s output file name.

<specularMap>.filenameUnique Boolean default: false -- boolean; Filename_Unique

Enable/Disable unique file name generation.

<specularMap>.fileType Filename default: "" -- string;

Get/Set the bake element’s output file type.

<specularMap>.filterOn Boolean default: true -- boolean; FilteringOn

Enable/Disable filtering.

<specularMap>.lightingOn Boolean default: false -- boolean; Lighting

Enable/Disable baking of lighting.

<specularMap>.outputSzX Integer default: 256 -- integer; output_width

Get/Set the output width.

<specularMap>.outputSzY Integer default: 256 -- integer; output_height

Get/Set the output height.

<specularMap>.shadowsOn Boolean default: false -- boolean; Shadows

Enable/Disable baking of shadows.

<specularMap>.targetMapSlotName String default: ""

Get/Set the name of the map slot where element output will be applied

See also

Interface: BakeElementProperties

Interface: INodeBakeProperties

Bake Elements


Radiosity : RadiosityEffect

Radiosity - superclass: RadiosityEffect; super-superclass:MAXWrapper - classID: #(2036089192, 1721374773)

This RadiosityEffect was first implemented in Autodesk VIZ 4 and has been added to 3ds Max in release 5.

3ds Max Constructors

Radiosity ...

Discreet_Radiosity ...

Autodesk VIZ Constructors

Discreet_Radiosity ...

VIZ_Radiosity ...

NOTE:

The constructor Discreet_Radiosity should be used in scripts to ensure compatibility.

Properties

<Radiosity>.lightUnitsUsed Integer default: 0 -- integer; Light_Units_in_Use

Get/Set the Light Units used by the Radiosity.

Possible values are:

0 - International

1 - American

NOTE:

Changing the Light Units in the Customize>Units Setup dialog affects the currently assigned RadiosityEffect. Setting the value via MAXScript changes the units used by the currently assigned RadiosityEffect, but will not affect the Customize Units Setup dialog!

<Radiosity>.radProcessInRenderOnly Boolean default: false -- boolean; Process_in_Radiosity_Only

Get/Set the state of the "Start" button in the "Radiosity Processing Parameters" dialog. When the value is set to true, the button will be disabled and the radiosity processing can be initiated by the renderer only. When set to false, the user can initiate the processing manually by pressing the button.

Radiosity Processing Parameters Rollout

<Radiosity>.radInitialQuality Float default: 85.0 -- float; Initial_Quality

Get/Set the Initial Quality value in percent.

<Radiosity>.radGlobalRefineSteps Integer default: 0 -- integer; Refine_Iterations_Done

Get/Set the Refine Iterations (All Objects) value.

<Radiosity>.radSelectionRefineSteps Integer default: 0 -- integer; Selection_Refine_Steps

Get/Set the "Refine Iterations (Selected Objects)" value.

<Radiosity>.radProcessObjectRefineSteps Boolean default: true -- boolean; processObjectRefineSteps

Get/Set the state of the "Process Refine Iterations Stored in Object" checkbox. When set to true, the Refine Iterations set in the Object Properties...>Radiosity Tab>Refine Iterations. When false, these object-specific settings will be ignored.

<Radiosity>.radFiltering Integer default: 0 -- integer; Filtering

Get/Set the "Indirect Light Filtering" value in the "Interactive Tools" group of controls.

<Radiosity>.radDirectFiltering Integer default: 0 -- integer; Filtering

Get/Set the value of the "Direct Light Filtering" spinner in the "Interactive Tools" group of controls. Available in 3ds Max 8 and higher.

<Radiosity>.radDisplayInViewport Boolean default: true -- boolean; Display_in_Viewport

Get/Set the "Display Radiosity in Viewport" checkbox state in the "Interactive Tools" group of controls. Enables the interactive display of the radiosity in the viewport.

Radiosity Meshing Parameters Rollout

<Radiosity>.meshingEnabled Boolean default: false -- boolean; Enable_Meshing

Get/Set the state of the "Enabled" checkbox in the "Global Subdivision Settings" group of controls. When set to true, enables the user-defined global meshing size, or the adaptive subdivision if .useAdaptiveMeshing is set to true.

<Radiosity>.useAdaptiveMeshing BooleanClass default: true -- boolean; Use_Adaptive_Meshing

Toggle the Use Adaptive Subdivisions checkbox on and off. When set to true and the "Global Subdivision Settings" > "Enabled" checkbox ( .meshingEnabled ) is on, Adaptive Subdivisions will be used. Available in 3ds Max 8 and higher.

<Radiosity>.meshingSize Float default: 36.0 -- animatable; world units; Meshing_Size

Get/Set the Maximum Meshing Size value in the "Mesh Settings" group of controls. In versions prior to 3ds Max 8, the value was called "Mesh Size".

<Radiosity>.minimumMeshSize Float default: 3.0 -- animatable; worldUnits; Minimum_Mesh_Size

Get/Set the Minimum Mesh Size value in the "Mesh Settings" group of controls. Available in 3ds Max 8 and higher.

<Radiosity>.contrastThreshold Float default: 75.0 -- animatable; percent; Contrast_Threshold

Get/Set the Contrast Threshold value in the "Mesh Settings" group of controls. Available in 3ds Max 8 and higher.

<Radiosity>.initialMeshSize Float default: 12.0 -- animatable; worldUnits; Initial_Mesh_Size

Get/Set the Initial Meshing Size value in the "Mesh Settings" group of controls. Available in 3ds Max 8 and higher.

<Radiosity>.shootDirectLights BooleanClass default: true -- boolean; Shoot_Direct_Lights

Get/Set the state of the "Shoot Direct Lights" checkbox in the "Light Settings" group of controls. Available in 3ds Max 8 and higher.

<Radiosity>.includePointLights BooleanClass default: true -- boolean; Include_Point_Lights

Get/Set the state of the "Include Point Lights in Subdivision" checkbox in the "Light Settings" group of controls. Available in 3ds Max 8 and higher.

<Radiosity>.includeLinearLights BooleanClass default: true -- boolean; Include_Linear_Lights

Get/Set the state of the "Include Linear Lights in Subdivision" checkbox in the "Light Settings" group of controls. Available in 3ds Max 8 and higher.

<Radiosity>.includeAreaLights BooleanClass default: true -- boolean; Include_Area_Lights

Get/Set the state of the "Include Area Lights in Subdivision" checkbox in the "Light Settings" group of controls. Available in 3ds Max 8 and higher.

<Radiosity>.includeSkylight BooleanClass default: false -- boolean; Include_Skylight

Get/Set the state of the "Include Skylight" checkbox in the "Light Settings" group of controls. Available in 3ds Max 8 and higher.

<Radiosity>.includeSelfEmittingLights BooleanClass default: false -- boolean; Include_Self_Emitting_Faces

Get/Set the state of the "Include Self-Emitting Faces in Subdivision" checkbox in the "Light Settings" group of controls. Available in 3ds Max 8 and higher.

<Radiosity>.minimumSelfEmittingSize Float default: 6.0 -- animatable; worldUnits; Minimum_Self_Emitting_Size

Get/Set the value of the "Minimum Self-Emitting Size" spinner in the "Light Settings" group of controls. Available in 3ds Max 8 and higher.

Light Painting Rollout

<Radiosity>.lightPaintingIntensity Float default: 500.0 -- float; Light_Painting_Intensity

Get/Set the Light Painting Intensity value in lux.

<Radiosity>.lightPaintingPressure Float default: 10.0 -- float; Light_Painting_Pressure

Get/Set the Light Painting Pressure value in percent.

Rendering Parameters Rollout

<Radiosity>.rmReuseDirectIllumination Boolean default: false -- boolean; Re_Use_Direct_Illumination

Get/Set the state of the "Re-Use Direct Illumination from Radiosity Solution / Render Direct Illumination" radiobuttons. When set to true, the Direct Illumination from the Radiosity Solution will be reused. When false, the Direct Illumination will be rendered.

<Radiosity>.rmRegather Boolean default: false -- boolean; Regather

Get/Set the state of the "Regather Indirect Illumination" checkbox. When set to true, Indirect Illumination will be regathered.

<Radiosity>.rmRaysPerSample Integer default: 64 -- integer; Rays_per_Sample

Get/Set the Rays per Sample value.

<Radiosity>.rmFilterRadius Float default: 2.5 -- float; Filter_Radius

Get/Set the Filter Radius value in pixels.

<Radiosity>.rmClampEnabled Boolean default: false -- boolean; Clamp_Enabled

Get/Set the state if the Clamp Values checkbox.

<Radiosity>.rmClampValue Float default: 10000.0 -- float; Clamp_Value

Get/Set the value of the Clamp Values (cd/m^2) parameter. When rmClampEnabled is set to true, values above rmClampValue will be clamped.

<Radiosity>.rmAdaptiveEnabled Boolean default: false -- boolean; Adaptive_Enabled

Get/Set the state of the Adaptive Sampling checkbox.

<Radiosity>.rmSampleSpacing Integer default: 3 -- integer; Sample_Spacing

Get/Set the Sample Spacing value.

Possible values are:

0 - 2x2

1 - 4x4

2 - 8x8

3 - 16x16

4 - 32x32

<Radiosity>.rmSubdivisionContrast Float default: 5.0 -- float; Subdivision_Contrast

Get/Set the Subdivision Contrast value.

<Radiosity>.rmMinSampleSpacing Integer default: 1 -- integer; Minimum_Sample_Spacing

Get/Set the Min. Sample Spacing.

Possible values are:

0 - 1x1

1 - 2x2

3 - 8x8

4 - 16x16

5 - 32x32

6 - 64x64

<Radiosity>.rmShowSamples Boolean default: false -- boolean; Show_Samples

Get/Set the state of the Show Samples checkbox.

Statistics Rollout

<Radiosity>.statSolutionQuality Float default: 0.0 -- float; Solution_Quality

Contains the Solution Quality value from the Statistics rollout. Read-only.

<Radiosity>.statRefineIterations Integer default: 0 -- integer; Refine_Iterations_Done

Contains the Refine Iterations value from the Statistics rollout. Read-only.

<Radiosity>.elapsedTime Integer default: 0 -- integer; Elapsed_Time

The time in seconds used to process the radiosity solution. Read-only.

<Radiosity>.statNumGeomObjects Integer default: 0 -- integer; Number_of_Geometric_Objects

Contains the Geometric Objects value from the Statistics rollout. Read-only.

<Radiosity>.statMeshSize Float default: 36.0 -- float; Meshing_Size

Contains the Meshing Size value from the Statistics rollout. Read-only.

<Radiosity>.statNumLightObjects Integer default: 0 -- integer; Number_of_Light_Objects

Contains the Light Objects value from the Statistics rollout. Read-only.

<Radiosity>.statNumFaces Integer default: 0 -- integer; Radiosity_scene_faces

Contains the Mesh Elements value from the Statistics rollout. Read-only.

Radiosity interfaces:

Interface: srrOps

Methods:

<void>Start()

Start Radiosity calculation.

<void>Stop()

Start Radiosity calculation.

<void>Reset <boolean>resetGeometry <boolean>noWarningDialog

Reset the Radiosity solution. The resetGeometry parameter controls whether the geometry should be reset, too. The noWarningDialog controls whether the reset warning dialog should be displayed.

<void>GatherObjects <&node array>Nodes <integer>GatherSteps

Nodes is In parameter

GatherSteps Validated by Range: 0 to 1000000

<boolean>ShowLightingStatistics()

Displays the Lighting Analysis dialog. Returns true if successful, false if there is no Radiosity Solution in the scene.

<void>AbortLightingStatistics()

Close the Lighting Analysis dialog if open.

<boolean>CanShowLightingStatistics()

Returns true if the Lighting Analysis dialog can be displayed, false if not.

<bool>GetPointIlluminance <&float>result <node>node <&point3>point <&point3>vertex0 <&point3>vertex1 <&point3>vertex2

result is Out parameter

point is In parameter

vertex0 is In parameter

vertex1 is In parameter

vertex2 is In parameter

Returns true if the Illuminance value at the specified point could be retrieved. The result is passed by reference into the result Out parameter, the vertex0, vertex1 and vertex2 are passed by reference the vertex indices of the face the point resides on.

EXAMPLE

obj = $plane01

for i in 1 to obj.numFaces do

(

myFace = getFace obj i

myverts = #()

myverts[1] = getVert obj myFace.x

myverts[2] = getVert obj myFace.y

myverts[3] = getVert obj myFace.z

midPoint = (myverts[1] + myverts[2] + myverts[3])/3

PointVal = 0.0

sceneRadiosity.Radiosity.GetPointIlluminance &pointVal obj midPoint myverts[1] myverts[2] myverts[3]

format "Face %: %\n" i pointVal

)

<bool>GetPointLuminance <&float>result <node>node <&point3>point <&point3>vertex0 <&point3>vertex1 <&point3>vertex2

result is Out parameter

point is In parameter

vertex0 is In parameter

vertex1 is In parameter

vertex2 is In parameter

Returns true if the Luminance value at the specified point could be retrieved. The result is passed by reference into the result Out parameter, the vertex0, vertex1 and vertex2 are passed by reference the vertex indices of the face the point resides on.

<bool>GetPointReflectance <&float>result <node>node <&point3>point <&point3>vertex0 <&point3>vertex1 <&point3>vertex2

result is Out parameter

point is In parameter

vertex0 is In parameter

vertex1 is In parameter

vertex2 is In parameter

Returns true if the Reflectance value at the specified point could be retrieved. The result is passed by reference into the result Out parameter, the vertex0, vertex1 and vertex2 are passed by reference the vertex indices of the face the point resides on.

<bool>GetPointTransmittance <&float>result <node>node <&point3>point <&point3>vertex0 <&point3>vertex1 <&point3>vertex2

result is Out parameter

point is In parameter

vertex0 is In parameter

vertex1 is In parameter

vertex2 is In parameter

Returns true if the Transmittance value at the specified point could be retrieved. The result is passed by reference into the result Out parameter, the vertex0, vertex1 and vertex2 are passed by reference the vertex indices of the face the point resides on.

EXAMPLE

--Show the scene radiosity ReferenceTarget object:

sceneRadiosity.radiosity

ReferenceTarget:Radiosity

--Reset the Scene Radiosity solution completely, allow warning:

sceneRadiosity.radiosity.Reset true false

OK

--Start new Radiosity Processing:

sceneRadiosity.radiosity.Start()

OK

--Stop the Radiosity Processing:

sceneRadiosity.radiosity.Stop()

OK

--Check whether the Lighting Analysis dialog can be displayed

sceneradiosity.radiosity.CanShowLightingStatistics()

true

--Display the Lighting Analysis dialog

sceneradiosity.radiosity.ShowLightingStatistics()

true

--Close the Lighting Analysis dialog

sceneradiosity.radiosity.AbortLightingStatistics()

OK

The following interface provides MAXScript access to the radiosity mesh in 3ds Max 6 and higher:

Interface: srrRadiosityMesh

Methods:

<boolean>doesSolutionExist()

Returns true if a radiosity solution exists.

<boolean>doesMeshExist <node>node

Returns true if the specified node has a radiosity mesh.

<boolean>isMeshValid <node>node

Returns true if the specified node has a valid radiosity mesh.

<interval by value>getMeshValidity <node>node

Returns the validity interval of the specified node's radiosity mesh.

<mesh by value>getMesh <node>node

Returns the node's radiosity mesh.

<interval by value>getMeshTMValidity <node>node

Returns the validity interval of the radiosity mesh's transformation matrix.

<matrix3 by value>getMeshTM <node>node

Returns the transformation matrix of the radiosity mesh of the specified node.

See also

Interface: radiosityMeshOps

Interface: SceneRadiosity

Light_Tracer : RadiosityEffect


Light_Tracer : RadiosityEffect

Light_Tracer - superclass: RadiosityEffect; super-superclass:MAXWrapper - classID: #(973019628, 1999461375)

The Light_Tracer RadiosityEffect is a Global Illumination solver used mainly for advanced lighting simulation in outdoor scenes.

NOTE:

This RadiosityEffect is not available in Autodesk VIZ.

Constructor

Light_Tracer ...

LightTrace ...

Properties

<Light_Tracer>.adaptive_undersampling_on Boolean default: true -- boolean

Gets/Sets the state of the Adaptive Undersampling checkbox.

<Light_Tracer>.bounces Integer default: 0 -- integer

Gets/Sets the number of Bounces.

<Light_Tracer>.color_bleed Float default: 1.0 -- animatable; float

Gets/Sets the Color Bleed value.

<Light_Tracer>.color_filter Color default: (color 255 255 255) -- animatable

Gets/Sets the Color Filter color.

<Light_Tracer>.cone_angle Float default: 88.0 -- float

Gets/Sets the Cone Angle value.

<Light_Tracer>.extra_ambient Color default: (color 0 0 0) -- animatable

Gets/Sets the Extra Ambient color.

<Light_Tracer>.filter_size Float default: 0.5 -- animatable; float

Gets/Sets the Filter Size value.

<Light_Tracer>.global_multiplier Float default: 1.0 -- animatable; float

Gets/Sets the Global Multiplier value.

<Light_Tracer>.initial_sample_spacing Integer default: 4 -- integer

Gets/Sets the Initial Sample Spacing, where

0 - 1x1

1 - 2x2

2 - 4x4

3 - 8x8

4 - 16x16

5 - 32x32

<Light_Tracer>.object_multiplier Float default: 1.0 -- animatable; float

Gets/Sets the Object Multiplier value.

<Light_Tracer>.ray_bias Float default: 0.03 -- float

Gets/Sets the Ray Bias value.

<Light_Tracer>.rayengine Ray_Engine default: ReferenceTarget:Ray_Engine

Returns the Ray Engine used by the Radiosity Effect.

<Light_Tracer>.rays Integer default: 250 -- animatable; integer

Gets/Sets the Rays/Sample value.

<Light_Tracer>.show_samples Boolean default: false -- boolean

Gets/Sets the state of the Show Samples checkbox.

<Light_Tracer>.sky_lights Float default: 1.0 -- animatable; float

Gets/Sets the Sky Lights value.

<Light_Tracer>.sky_lights_on Boolean default: true -- boolean

Gets/Sets the state of the Sky Lights checkbox.

<Light_Tracer>.subdivide_down_to Integer default: 0 -- integer

Gets/Sets the Subdivide Down To value, where

0 - 1x1

1 - 2x2

2 - 4x4

3 - 8x8

4 - 16x16

5 - 32x32

<Light_Tracer>.subdivision_contrast Float default: 5.0 -- animatable; float

Gets/Sets the Subdivision Contrast value.

<Light_Tracer>.volumes_on Boolean default: true -- boolean

Gets/Sets the state of the Volumes checkbox.

<Light_Tracer>.volumes Float default: 1.0 -- animatable; float

Gets/Sets the Volumes value.

See also

Interface: SceneRadiosity

Radiosity : RadiosityEffect


Adv__Ray_traced : Shadow

Adv__Ray_traced - superclass: Shadow; super-superclass:MAXWrapper - classID: #(965083161, 1037325786)

Advanced_Ray_traced - superclass: Shadow; super-superclass:MAXWrapper - classID: #(965083161, 1037325786)

Value > MAXWrapper > Shadow > Adv__Ray_traced

This shadow generator class implements an advanced raytraced shadow generator which is better suited for rendering complex scenes.

3ds Max Constructors:

Adv__Ray_traced ...

StdShadowGen ...

Properties

<Adv__Ray_Traced>.shadow_Mode Integer default: 2 -- integer

Selects the type of raytracing for generating shadows:

0 - Simple

1 - Antialias 1-Pass

2 - Antialias 2-Pass

<Adv__Ray_Traced>.twoSidedShadows Boolean default: false -- boolean; Two_sided_Shadows

When on, backfaces are not ignored when calculating shadows. Objects seen from the inside are not lit by lights from the outside. This costs a bit more render time. When off, backfaces are ignored. Rendering is quicker, but outside lights illuminate object interiors.

<Adv__Ray_Traced>.pass1 Integer default: 1 -- animatable; integer; Shadow_Integrity

The number of rays cast from an illuminated surface.

<Adv__Ray_Traced>.pass2 Integer default: 2 -- animatable; integer; Shadow_Quality

The number of secondary rays cast from an illuminated surface

<Adv__Ray_Traced>.blur Float default: 1.25 -- animatable; float

The radius, in pixels, to blur the antialiased edge.

<Adv__Ray_Traced>.ray_bias Float default: 0.25 -- animatable; world units; Shadow_Bias

The minimum distance from the point being shaded that an object must be to cast a shadow. This prevents blurred shadows from affecting surfaces they shouldn't.

<Adv__Ray_Traced>.jitter_amt Float default: 0.0 -- animatable; float; Jitter_Amount

Adds randomness to the ray positions.

<Adv__Ray_Traced>.shadow_Transparent Boolean default: false -- animatable; boolean; Transparent_Shadows

When checked, transparent surfaces will cast a colored shadow. Otherwise, all shadows are black and calculate faster.

<Adv__Ray_traced>.aa_threshold Color default: (color 25.5 25.5 25.5) -- RGB color; Antialiasing_Threshold

The maximum color difference allowed between transparent object samples before antialiasing is triggered. Increasing the value of this color will make the shadow less sensitive to aliasing artifacts and improve speed, decreasing the value will increase the sensitivity, improving quality.

<Adv__Ray_Traced>.suppress_mat_aa Boolean default: true -- animatable; boolean; Suppress_Supersampling

When checked, only Pass 1 is used during 2-Pass Antialiasing when shading a supersampled material.

<Adv__Ray_Traced>.suppress_reflt_aa Boolean default: true -- animatable; boolean; Suppress_Reflection_Antialiasing

When checked, only Pass 1 is used during 2-Pass Antialiasing when shading reflections or refractions.

<Adv__Ray_Traced>.skip_coplanar Boolean default: true -- animatable; boolean

Prevents adjacent faces from shadowing each other. This is of particular concern at the terminator on curved surfaces such as spheres.

<Adv__Ray_Traced>.coplanar_threshold Float default: 0.9 -- animatable; float

The angle between adjacent faces. Range is from 0.0 (perpendicular) to 1.0 (parallel).

<Adv__Ray_Traced>.noAreaShadows BooleanClass default: false -- boolean; No_Area_Shadows

When set to true, Area Shadows will be disabled.

See also

ShadowMap : Shadow

RaytraceShadow : Shadow

Area_Shadows : Shadow

MAXScript FAQ: How do I change the Shadow type of a Light?

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Area_Shadows : Shadow

Area_Shadows - superclass: Shadow; super-superclass:MAXWrapper - classID: #(388051038, 1754550945)

Value > MAXWrapper > Shadow > Area_Shadows

This shadow generator class can be used to simulate shadows from an area light source.

Constructor

Area_Shadows ...

'Area Shadows' ...

Properties

<Area_Shadows>.shadow_Mode Integer default: 1 -- integer

Controls the way the area shadows are generated

0 - Simple

1 - Rectangle Light

2 - Disc Light

3 - Box Light

4 - Sphere Light

<Area_Shadows>.twoSidedShadows Boolean default: false -- boolean; Two_sided_Shadows

When on, backfaces are not ignored when calculating shadows. Objects seen from the inside are not lit by lights from the outside. This costs a bit more render time. When off, backfaces are ignored. Rendering is quicker, but outside lights illuminate object interiors.

<Area_Shadows>.pass1 Integer default: 2 -- animatable; integer; Shadow_Integrity

The number of rays cast from an illuminated surface.

<Area_Shadows>.pass2 Integer default: 5 -- animatable; integer; Shadow_Quality

The number of secondary rays cast from an illuminated surface

<Area_Shadows>.blur Float default: 1.0 -- animatable; float; Shadow_Spread

The radius, in pixels, to blur the antialiased edge.

<Area_Shadows>.ray_bias Float default: 0.5 -- animatable; world units; Shadow_Bias

The minimum distance from the point being shaded that an object must be to cast a shadow. This prevents blurred shadows from affecting surfaces they shouldn't.

<Area_Shadows>.jitter_amt Float default: 1.0 -- animatable; float; Jitter_Amount

Adds randomness to the ray positions.

<Area_Shadows>.aa_threshold Color default: (color 25.5 25.5 25.5) -- RGB color; Antialiasing_Threshold

The maximum color difference allowed between transparent object samples before antialiasing is triggered. Increasing the value of this color will make the shadow less sensitive to aliasing artifacts and improve speed, decreasing the value will increase the sensitivity, improving quality.

<Area_Shadows>.shadow_length Float default: 10.0 -- animatable; world units

Controls the length of the area shadow.

<Area_Shadows>.shadow_width Float default: 10.0 -- animatable; world units

Controls the width of the area shadow.

<Area_Shadows>.shadow_height Float default: 10.0 -- animatable; world units

Controls the height of the area shadow.

<Area_Shadows>.shadow_Transparent Boolean default: false -- animatable; boolean; Transparent_Shadows

When checked, transparent surfaces will cast a colored shadow. Otherwise, all shadows are black and calculate faster.

<Area_Shadows>.suppress_mat_aa Boolean default: true -- animatable; boolean; Suppress_Supersampling

When checked, only Pass 1 is used during 2-Pass Antialiasing when shading a supersampled material.

<Area_Shadows>.suppress_reflt_aa Boolean default: true -- animatable; boolean; Suppress_Reflection_Antialiasing

When checked, only Pass 1 is used during 2-Pass Antialiasing when shading reflections or refractions.

<Area_Shadows>.skip_coplanar Boolean default: true -- animatable; boolean

Prevents adjacent faces from shadowing each other. This is of particular concern at the terminator on curved surfaces such as spheres.

<Area_Shadows>.coplanar_threshold Float default: 0.9 -- animatable; float

The angle between adjacent faces. Range is from 0.0 (perpendicular) to 1.0 (parallel).

See also

ShadowMap : Shadow

RaytraceShadow : Shadow

Adv__Ray_traced : Shadow

MAXScript FAQ: How do I change the Shadow type of a Light?

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


RaytraceShadow : Shadow

raytraceShadow - superclass: Shadow; super-superclass:MAXWrapper - classID: #(512, 0)

Value > MAXWrapper > Shadow > RaytraceShadow

Constructor

raytraceShadow ...

Properties

<raytraceShadow>.raytraceBias Float default: 0.2 -- animatable; float; Bias

Controls the raytrace shadow bias - the distance from the shadowing surface to the shadow.

<raytraceShadow>.maxDepth Integer default: 7 -- animatable; integer; Max_Quadtree_Depth

Controls the max. depth of the quadtree.

<raytraceShadow>.twoSidedShadows Boolean default: false -- boolean

When true, backfaces are not ignored when calculating shadows. Objects seen from the inside are not lit by lights from the outside. This costs a bit more render time. When false, backfaces are ignored. Rendering is quicker, but outside lights illuminate object interiors.

See also

ShadowMap : Shadow

Area_Shadows : Shadow

Adv__Ray_traced : Shadow

MAXScript FAQ: How do I change the Shadow type of a Light?

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


ShadowMap : Shadow

shadowMap - superclass: Shadow; super-superclass:MAXWrapper - classID: #(256, 0)

Value > MAXWrapper > Shadow > ShadowMap

Constructor

shadowMap ...

Properties

<shadowMap>.mapsize Integer default: 512 -- animatable; integer; Map_Size

The shadow map size in pixels

<shadowMap>.samplerange Float default: 4.0 -- animatable; float; Map_Range

The shadow map sample range

<shadowMap>.mapbias Float default: 1.0 -- animatable; float; Map_Bias

Controls the shadow map bias - the distance from the shadowing surface to the shadow.

<shadowMap>.absoluteMapBias Boolean default: false -- animatable; boolean; Absolute_Bias

When set to true, the Map bias is taken as world units. When false (relative), the bias is calculated relative to the scene size.

<shadowMap>.twoSidedShadows Boolean default: false -- boolean

When true, backfaces are not ignored when calculating shadows. Objects seen from the inside are not lit by lights from the outside. This costs a bit more render time. When false, backfaces are ignored. Rendering is quicker, but outside lights illuminate object interiors.

See also

Area_Shadows : Shadow

RaytraceShadow : Shadow

Adv__Ray_traced : Shadow

MAXScript FAQ: How do I change the Shadow type of a Light?

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


ToneOperator : MAXWrapper

Value > MAXWrapper > ToneOperator

ToneOperators are used by the SceneExposureControl system to manipulate the final rendered image.

The following classes derive from ToneOperator:

Automatic_Exposure_Control : ToneOperator

Linear_Exposure_Control : ToneOperator

Logarithmic_Exposure_Control : ToneOperator

Pseudo_Color_Exposure_Control : ToneOperator

mr_Photographic_Exposure_Control : ToneOperator

See also

Interface: SceneExposureControl


Automatic_Exposure_Control - superclass: MAXObject

Automatic_Exposure_Control : MAXObject

Automatic_Exposure_Control - superclass: ToneOperator; super-superclass:MAXWrapper - classID: #(2020371114, 1150503387)

Value > MAXWrapper > ToneOperator > Automatic_Exposure_Control

Constructors

Automatic_Exposure_Control ...

AutomaticAdaptiveExposureControl ...

Properties

<Automatic_Exposure_Control>.active Boolean default: true -- boolean

Enable/Disable the Tone Operator. Changes the state of the Active checkbox in the Environment/Exposure Control rollout.

<Automatic_Exposure_Control>.physicalScale Float default: 1500.0 -- animatable; float; Physical_Scale

Sets a physical scale for exposure control to use. This is a light intensity value, in candelas. It can range from 0.0 to 200,000.0. The physical scale is factored into light multiplier values, and self-illumination, reflection, and refraction maps. Default=1500.0.

Decreasing the physical scale dims the scene. Increasing the physical scale increases brightness, up to a scale value at which the scene grows no brighter.

This parameter is animatable.

<Automatic_Exposure_Control>.chromaticAdaptation Boolean default: false -- boolean; Chromatic_Adaptation

When the check box is turned on, chromatic adaptation converts all colors so the color displayed in the color swatch appears as white. Default=off.

Clicking the color swatch displays a Color Selector so you can choose the color to adapt to.

Chromatic adaptation is a form of color correction. You can use this control to simulate the eye adjusting to lighting. For example, when the light in a room has a yellow cast, our mind adjusts it so that objects we know to be white, such as printed pages, appear as white.

<Automatic_Exposure_Control>.colorDifferentiation Boolean default: false -- boolean; Color_Differentiation

When on, renders dimly lit colors as if the light were too dim for the eye to distinguish between colors. When on, renders even dimly lit colors. Default=off.

Color differentiation simulates the eye's response to dim lighting. In dim lighting, the eye does not perceive colors and sees tones of gray instead.

The effect of this setting is not apparent except at very low light levels: below 5.62 candelas. This occurs only if the Physical Scale is less than 5.62, if a light's Multiplier is less than 0.00017, or both. When Physical Scale is less than 0.00562, the scene is completely gray.

<Automatic_Exposure_Control>.whiteColor Color default: (color 255 255 255) -- animatable; RGB color; Color_Discrimination

Get/Set the whiteColor value of the Tone Operator. When the chromaticAdaptation is set to true, the Tone Operator will shift all colors so that the color set in whiteColor appears as white.

<Automatic_Exposure_Control>.exposureValue Float default: 0.0 -- animatable; float; Exposure_Value

Adjusts the overall brightness of the rendering. Can range from -5.0 to 5.0. Negative values make the image darker, and positive values make it brighter. Default=0.0.

The exposure value is comparable to the exposure compensation setting in cameras with automatic exposure.

This parameter is animatable.

<Automatic_Exposure_Control>.brightess Float default: 50.0 -- animatable; percentage; Brightness

Get/Set the Brightness value of the Tone Operator.

<Automatic_Exposure_Control>.contrast Float default: 50.0 -- animatable; percentage

Get/Set the Contrast value of the Tone Operator.

EXAMPLE

SceneExposureControl.exposurecontrol = automatic_exposure_control()

SceneExposureControl.exposurecontrol.physicalscale = 800

SceneExposureControl.exposurecontrol.exposurevalue = 0.1

See also

Interface: SceneExposureControl

ToneOperator : MAXWrapper


Linear_Exposure_Control : ToneOperator

Linear_Exposure_Control - superclass: ToneOperator; super-superclass:MAXWrapper - classID: #(1435071256, 886776236)

Value > MAXWrapper > ToneOperator > Linear_Exposure_Control

The Linear Exposure Control samples the rendered image and uses the average brightness of the scene to map physical values to RGB values. Linear Exposure Control is best used for scenes with a fairly low dynamic range.

Constructors

Linear_Exposure_Control ...

AutomaticLinearExposureControl ...

Properties

<Linear_Exposure_Control>.active Boolean default: true -- boolean

Enable/Disable the Tone Operator. Changes the state of the Active checkbox in the Environment/Exposure Control rollout

<Linear_Exposure_Control>.brightess Float default: 50.0 -- animatable; percentage; Brightness

Get/Set the Brightness value of the Tone Operator.

<Linear_Exposure_Control>.chromaticAdaptation Boolean default: false -- boolean; Chromatic_Adaptation

Get/Set the Chromatic Adaptation value of the Tone Operator. Corresponds to the Color Correction checkbox in the Tone Operator’s rollout.

<Linear_Exposure_Control>.colorDifferentiation Boolean default: false -- boolean; Color_Differentiation

Get/Set the Color Differentiation value of the Tone Operator. Corresponds to the Desaturate Low Levels checkbox in the Tone Operator’s rollout.

<Linear_Exposure_Control>.contrast Float default: 50.0 -- animatable; percentage

Get/Set the Contrast value of the Tone Operator.

<Linear_Exposure_Control>.exposureValue Float default: 0.0 -- animatable; float; Exposure_Value

Get/Set the Exposure value of the Tone Operator.

<Linear_Exposure_Control>.physicalScale Float default: 1500.0 -- animatable; float; Physical_Scale

Get/Set the physicalScale value of the Tone Operator.

<Linear_Exposure_Control>.processBG Boolean default: false -- boolean; Process_Background

Get/Set the state of the processBG value corresponding to the "Process Background and Environment Maps" checkbox in the Tone Operator’s rollout. When set to true, the Tone Operator will affect the background.

<Linear_Exposure_Control>.whiteColor Color default: (color 255 255 255) -- animatable; RGB color; White_Color

Get/Set the whiteColor value of the Tone Operator. When the chromaticAdaptation is set to true, the Tone Operator will shift all colors so that the color set in whiteColor appears as white.

EXAMPLE

--Create a new Linear Exposure Control Tone Operator instance:

linear_exposure = Linear_Exposure_Control()

ReferenceTarget:Linear_Exposure_Control

--Assign the new tone operator as the current exposure control:

SceneExposureControl.exposureControl = linear_exposure

ReferenceTarget:Linear_Exposure_Control

--Disable the tone operator:

linear_exposure.active = false

false

--Set the white color of the current exposure control to pink:

SceneExposureControl.exposureControl.whiteColor = [255,200,200]

[255,200,200]

See also

Interface: SceneExposureControl

ToneOperator : MAXWrapper


Logarithmic_Exposure_Control : ToneOperator

Logarithmic_Exposure_Control - superclass: ToneOperator; super-superclass:MAXWrapper - classID: #(1488218187, 1350530793)

Value > MAXWrapper > ToneOperator > Logarithmic_Exposure_Control

The Logarithmic Exposure Control uses brightness, contrast, and whether the scene is outdoors in daylight to map physical values to RGB values. Logarithmic Exposure Control is better for scenes with a very high dynamic range.

NOTE:

The Logarithmic Exposure Control is the best type of exposure control for animations, since it doesn't use histograms.

Constructors

Logarithmic_Exposure_Control ...

LightscapeExposureControl ...

Properties

<Logarithmic_Exposure_Control>.active Boolean default: true -- boolean

Enable/Disable the Tone Operator. Changes the state of the Active checkbox in the Environment/Exposure Control rollout

<Logarithmic_Exposure_Control>.brightness Float default: 65.0 -- animatable; float

Get/Set the Brightness value of the Tone Operator.

<Logarithmic_Exposure_Control>.chromaticAdaptation Boolean default: false -- boolean; Chromatic_Adaptation

Get/Set the Chromatic Adaptation value of the Tone Operator. Corresponds to the Color Correction checkbox in the Tone Operator’s rollout.

<Logarithmic_Exposure_Control>.colorDifferentiation Boolean default: false -- boolean; Color_Differentiation

Get/Set the Color Differentiation value of the Tone Operator. Corresponds to the Desaturate Low Levels checkbox in the Tone Operator’s rollout.

<Logarithmic_Exposure_Control>.contrast Float default: 50.0 -- animatable; float

Get/Set the Contrast value of the Tone Operator.

<Logarithmic_Exposure_Control>.daylight Boolean default: true -- boolean

Get/Set the Daylight switch of the Tone Operator.

<Logarithmic_Exposure_Control>.exterior Boolean default: false -- boolean

Get/Set the Exterior switch of the Tone Operator.

<Logarithmic_Exposure_Control>.indirectOnly Boolean default: false -- boolean; Indirect_Only

Get/Set the IndirectOnly switch of the Tone Operator. Corresponds to the "Affect Indirect Only" checkbox in the UI.

<Logarithmic_Exposure_Control>.midTones Float default: 1.0 -- animatable; float; Mid_Tones

Get/Set the Exterior value of the Tone Operator.

<Logarithmic_Exposure_Control>.physicalScale Float default: 1500.0 -- animatable; float; Physical_Scale

Get/Set the physicalScale value of the Tone Operator.

<Logarithmic_Exposure_Control>.processBG Boolean default: false -- boolean; Process_Background

Get/Set the state of the processBG value corresponding to the "Process Background and Environment Maps" checkbox in the Tone Operator’s rollout. When set to true, the Tone Operator will affect the background.

<Logarithmic_Exposure_Control>.whiteColor Color default: (color 255 255 255) -- animatable; RGB color; White_Color

Get/Set the whiteColor value of the Tone Operator. When the chromaticAdaptation is set to true, the Tone Operator will shift all colors so that the color set in whiteColor appears as white.

<Logarithmic_Exposure_Control>.exteriorDaylight Boolean default: false -- boolean; Exterior_Daylight

Set this property to true when working with exterior Daylight scenes.

<Logarithmic_Exposure_Control>.useLegacyAlgorithm (Use_Legacy_Algorithm) : boolean

When set to true, the exposure control will use the old algorithm (pre-3ds Max 9). When set to false (default), the new algorithm will be used.

The tone mapping algorithm used in the logaricthimic exposure control has been changed in 3ds Max 9.

The old algorithm would scale all three color components (R, G, B) in an identical manner, based on the perceptible luminance of the color. The algorithm produces results which were usually over-saturated, and yellowish.

The new algorithm maps the three color components independently, and the perceptible luminance is not taken into account. This results in images which are much less saturated (more grey) and much more realistic.

EXAMPLE

--Create a new Logarithmic Exposure Control Tone Operator instance

log_exposure = Logarithmic_Exposure_Control()

ReferenceTarget:Logarithmic_Exposure_Control

--Assign the new tone operator as the current exposure control

SceneExposureControl.exposureControl = log_exposure

ReferenceTarget:Logarithmic_Exposure_Control

--Set the Brightness to 50.0

log_exposure.brightness = 50.0

50.0

--Enable the Color Correction of the current exposure control

SceneExposureControl.exposureControl.chromaticAdaptation = true

true

See also

Interface: SceneExposureControl

ToneOperator : MAXWrapper


mr_Photographic_Exposure_Control : ToneOperator

mr_Photographic_Exposure_Control - superclass: ToneOperator; super-superclass:MAXWrapper - 23:0 - classID: #(1932620593, 1226131043)

Value > MAXWrapper > ToneOperator > mr_Photographic_Exposure_Control

The mental ray Photographic Exposure Control is a tone operator implementing real-world concepts and presets familiar from traditional photography into the mental ray rendering workflow.

Available in 3ds Max 2008 and higher.

Constructors

mr_Photographic_Exposure_Control ...

mrToneMapExposureControl ...

Properties

General

<mr_Photographic_Exposure_Control>.active BooleanClass default: true -- boolean;

Get/set the Active state of the exposure control. When set to false, the control will not be applied.

<mr_Photographic_Exposure_Control>.processBG BooleanClass default: false -- boolean; Process_Background

Get/set whether the exposure control will process Background and Environment Maps.

Exposure

<mr_Photographic_Exposure_Control>.preset Integer default: 5 -- integer; Exposure_presets

Get/set the Exposure Preset in the drop-down list.

Possible values are:

0 - Physically Based Lighting, Outdoor Daylight, Clear Sky

1 - Physically Based Lighting, Outdoor Nighttime

2 - Physically Based Lighting, Indoor Daylight

3 - Physically Based Lighting, Indoor Nighttime

4 - Non Physically Base Lighting

5 - [Select a preset] (default)

<mr_Photographic_Exposure_Control>.exposure_mode Integer default: 1 -- integer

Get/set the state of the Exposure Mode radio buttons.

Possible values are:

0 - Exposure Value (EV)

1 - Photographic Exposure

<mr_Photographic_Exposure_Control>.exposure_value Float default: 10.0 -- animatable; float

Get/set the Exposure Value.

<mr_Photographic_Exposure_Control>.shutter_speed Float default: 125.0 -- animatable; float

Get/set the Shutter Speed in 1/N sec.

<mr_Photographic_Exposure_Control>.f_stop Float default: 16.0 -- animatable; float; Aperture

Get/set the Aperture (f-stop) value in f/N.

<mr_Photographic_Exposure_Control>.film_iso Float default: 100.0 -- float; Film_Speed;

Get/set the Film Speed value (ISO). This is the internal value used by the tone operator.

<mr_Photographic_Exposure_Control>.film_isoUI Float default: 100.0 -- animatable; float; Film_Speed

Get/set the Film Speed value (ISO) as exposed to the UI. This is the animatable value shown in the User Interface.

Image Control

<mr_Photographic_Exposure_Control>.burn_highlights Float default: 0.25 -- animatable; float; Highlights

Get/set the Highlights (Burn) value.

<mr_Photographic_Exposure_Control>.midtones Float default: 1.0 -- animatable; float

Get/set the Midtones value.

<mr_Photographic_Exposure_Control>.shadows Float default: 0.2 -- animatable; float

Get/set the Shadows value.

<mr_Photographic_Exposure_Control>.saturation Float default: 1.0 -- animatable; float

Get/set the Color Saturation value.

<mr_Photographic_Exposure_Control>.whitepoint Color default: (color 255 255 255) -- fRGBA color

Get/set the Whitepoint as a color value.

<mr_Photographic_Exposure_Control>.whitepointKelvin Float default: 6500.0 -- animatable; float; Whitepoint_in_color_temperature

Get/set the Whitepoint value in Kelvin.

<mr_Photographic_Exposure_Control>.vignetting Float default: 0.0 -- animatable; float

Get/set the Vignetting value.

Physical Scale

<mr_Photographic_Exposure_Control>.physical_scale_mode Integer default: 0 -- integer

Get/set the state of the Physical scale mode radio buttons.

Possible values are:

0 - Physical Units (cd/m2)

1 - Unitless

<mr_Photographic_Exposure_Control>.physical_scale Float default: 1500.0 -- animatable; float

Get/set the Physical scale value used when .physical_scale_mode is set to 1 - Unitless.

Other values (not exposed to the UI)

<mr_Photographic_Exposure_Control>.cm2_factor Float default: 1.0 -- float; Physical_Scale;

Get/set the internal Physical scale factor.

<mr_Photographic_Exposure_Control>.gamma Float default: 1.0 -- float; Display_gamma;

Get/set the display gamma value.

<mr_Photographic_Exposure_Control>.gammaOnOff BooleanClass default: true -- boolean; Display_gamma_enabled;

Get/set whether the display gamma is enabled or disabled.

<mr_Photographic_Exposure_Control>.multiplier Float default: 1.0 -- float; Non_physical_multiplier

Get/set the non-physical multiplier value.

<mr_Photographic_Exposure_Control>.shader_mode Integer default: 0 -- integer

Get/set the shader mode.

See also

Interface: SceneExposureControl

ToneOperator : MAXWrapper


Pseudo_Color_Exposure_Control : ToneOperator

Pseudo_Color_Exposure_Control - superclass: ToneOperator; super-superclass:MAXWrapper - classID: #(1465794047, 1625374106)

Value > MAXWrapper > ToneOperator > Pseudo_Color_Exposure_Control

Pseudo Color Exposure Control is a lighting analysis tool that provides an intuitive way of visualizing and evaluating the lighting levels in the scene. It maps luminance or illuminance values to pseudo colors that show the brightness of the values being converted

Constructors

Pseudo_Color_Exposure_Control ...

pseudoColorExposureControl ...

Properties

<Pseudo_Color_Exposure_Control>.active Boolean default: true -- boolean

Controls whether the exposure control is active or not.

<Pseudo_Color_Exposure_Control>.automatic Boolean default: false -- boolean

Get/Set the .automatic property of the Tone Operator. When false (default), the minimum and maximum range values will be used. When true, the Min. and Max. spinners in the UI will be disabled and the range will be determined automatically. NOTE that this feature is not exposed to the UI and is only accessible through MAXScript.

<Pseudo_Color_Exposure_Control>.display Integer default: 0 -- integer

Get/Set the display property of the Tone Operator. Corresponds to the Style drop-down list in the UI.

0 - Colored

1 - Greyscale

<Pseudo_Color_Exposure_Control>.illuminance SubAnim default: SubAnim:Illuminance -- SubAnim

The Illuminance SubAnim containing the Illuminance Render Element added automatically by the Tone Operator to the Render Elements list in order to obtain accurate data.

NOTES:

After creating the exposure control via MAXScript, the SubAnim will be unnamed. The SubAnim will be hooked up to the exposure control when the control is assigned to the scene.

The SubAnim value cannot be set!

When the .quantity property is set to 1the .illuminace property is replaced by a .luminance property containing a Luminance Render Element. In this case accessing the .illuminance property will cause an "Unknown property" error.

<Pseudo_Color_Exposure_Control>.maximum Float default: 50.0 -- animatable; float

The Maximum Display Range to be measured and displayed by the Tone Operator.

<Pseudo_Color_Exposure_Control>.minimum Float default: 0.0 -- animatable; float

The Minimum Display Range to be measured and displayed by the Tone Operator.

<Pseudo_Color_Exposure_Control>.physicalScale Float default: 1500.0 -- animatable; float; Physical_Scale

Controls the physical scale.

<Pseudo_Color_Exposure_Control>.processBG Boolean default: false -- boolean; Process_Background

Controls whether the background should be processed or not.

<Pseudo_Color_Exposure_Control>.quantity Integer default: 0 -- integer

0 - illuminance property exposes an Illuminance_Render_Element

1 - illuminance property replaced with luminance property, which exposes an Luminance_Render_Element

<Pseudo_Color_Exposure_Control>.scaleFunction Integer default: 0 -- integer; Scale_Function

Get/Set the scaleFunction property corresponding to the selection of the Scale drop-down list in the UI. Chooses the technique used to map values.

0 - Logarithmic (default) uses a logarithmic scale.

1 - Linear uses a linear scale.

<Pseudo_Color_Exposure_Control>.unitSystemUsed Integer default: 0 -- integer; Unit_System_in_Use

Not directly exposed in the UI. This property is used internally to interface with the Lighting Units set up under Customize > Units Setup.

0 - SI (International, lux)

1 - AS (American, candles/squarefoot)

See also

Illuminance_Render_Element: RenderElement

Luminance_Render_Element: RenderElement

Interface: SceneExposureControl

ToneOperator : MAXWrapper


Default_Sound : SoundClass

Default_Sound - superclass: SoundClass; super-superclass:MAXWrapper - 1:1 - classID: #(1, 0)

Properties:

<Default_Sound>.metronome__inactive DummyClass default: ReferenceTarget:Sound --

NOTE:

This property is currently inaccessible.


Bulge_Angle_Deformer : ReferenceTarget

Bulge_Angle_Deformer - superclass: ReferenceTarget; super-superclass:MAXWrapper - classID: #(9815854, 999633)

Value > MAXWrapper | Skin > ReferenceTarget > Bulge_Angle_Deformer

Constructor

Class instances not creatable by MAXScript

Aliases

Bulge_Angle_Deformer

gizmoBulge

Properties

.name : string

.twist : float

.parent : integer

.child : integer

.points : point3 array

.deformed_points : point3 array

.initial_angle : float

.use_volume : boolean

.enable (Enable_gizmo) : boolean

.orientation : point3

.selection : int array

.editing : boolean

.graph : max object

See also

Skin : Modifier

Joint_Angle_Deformer : ReferenceTarget

Morph_Angle_Deformer : ReferenceTarget


Joint_Angle_Deformer : ReferenceTarget

Joint_Angle_Deformer - superclass: ReferenceTarget; super-superclass:MAXWrapper - classID: #(9815854, 999622)

Value > MAXWrapper | Skin > ReferenceTarget > Joint_Angle_Deformer

Constructor

Class instances not creatable by MAXScript

Aliases

Joint_Angle_Deformer

gizmoJoint

Properties

.name : string

.twist : float

.parent : integer

.child : integer

.points : point3 array

.deformed_points : point3 array

.weights : float array

.initial_angle : float

.use_volume : boolean

.enable (Enable_gizmo) : boolean

.orientation : point3

.selection : int array

.editing : boolean

.graph : max object

See also

Skin : Modifier

Bulge_Angle_Deformer : ReferenceTarget

Morph_Angle_Deformer : ReferenceTarget


Morph_Angle_Deformer : ReferenceTarget

Morph_Angle_Deformer - superclass: ReferenceTarget; super-superclass:MAXWrapper - classID: #(1115854, 999744)

Value > MAXWrapper | Skin > ReferenceTarget > Morph_Angle_Deformer

Constructor

Class instances not creatable by MAXScript

Aliases

Morph_Angle_Deformer

gizmoJointMorph

Properties

.name : string

.parent : integer

.child : integer

.initial_angle : float

.enable (Enable_gizmo) : boolean

.currentJointName (Name) : string

.angles : float array

.count : integer

.morphPoints (Morph_Points) : point3 array

.nodes : node array

.names : string array

.mapTable (Map_Table) : int array

.vecs (Polar_Vectors) : point3 array

.ease : float

See also

Skin : Modifier

Bulge_Angle_Deformer : ReferenceTarget

Joint_Angle_Deformer : ReferenceTarget


Renderer

A MAXClass wrapper was added for the plug-in renderer superclass in 3ds Max 4 so that a renderer instance can be worked with in MAXScript. The new superclass is named "Renderer".

See also

Default_Scanline_Renderer : RendererClass

Mental_Ray_Renderer : RendererClass

VUE_File_Renderer : RendererClass

Controlling the Renderer

Network Render Interface

Interface: NetRender


Default_Scanline_Renderer : RendererClass

Default_Scanline_Renderer - superclass: RendererClass; super-superclass:MAXWrapper - classID: #(1, 0)

This class represents the Default Scanline Renderer. It lets you construct an instance of the Default_Scanlinle_Renderer class to be assigned to the Current, Production, ActiveShade and Material Editor renderers using the renderers structure .

Constructor

Default_Scanline_Renderer ...

DefaultScanlineRenderer...

EXAMPLE

--Assign a scanline renderer class instance

--to the current renderer:

renderers.current = Default_Scanline_Renderer()

Default_Scanline_Renderer:Default_Scanline_Renderer

Default_Scanline_Renderer interfaces:

Interface: props

Properties:

.mapping : boolean : Read|Write

Enable/Disable mapping.

.shadows : boolean : Read|Write

Enable/Disable shadows.

.autoReflect : boolean : Read|Write

Enable/Disable autmatic reflections and refractions.

.forceWireframe : boolean : Read|Write

Enable/Disable wireframe rendering.

.antiAliasing : boolean : Read|Write

Enable/Disable anti-aliasing

.filterMaps : boolean : Read|Write

Enable/Disable map filtering

.objectMotionBlur : boolean : Read|Write

Enable/Disable Object Motion Blur

.imageMotionBlur : boolean : Read|Write

Enable/Disable Image Motion Blur

.imageBlurEnv : boolean : Read|Write

Enable/Disable "Apply to Environment Map"

.imageBlurTrans : boolean : Read|Write

Enable/Disable "Work with Transpacency"

.conserveMemory : boolean : Read|Write

Enable/Disable "Conserve Memory"

.enablePixelSampler : boolean : Read|Write

Enable/Disable Global SuperSampling

.enableSSE : boolean : Read|Write

Enable/Disable SSE

.wireThickness : float : Read|Write

Get/Set the Wireframe Thinckness

.objectBlurDuration : float : Read|Write

Get/Set the Object Motion Blur Duration

.imageBlurDuration : float : Read|Write

Get/Set the Image Motion Blur Duration

.antiAliasFilterSize : float : Read|Write

Get/Set the Anti-Aliasing Filter Size

.objectBlurSamples : integer : Read|Write

Get/Set the Object Motion Samples count

.objectBlurSubdivisions : integer : Read|Write

Get/Set the Object Motion Blur Subdivisions

.autoReflectLevels : integer : Read|Write

Get/Set the Automatic Reflection Rendering Iterations

.colorClampType : integer : Read|Write

Get/Set the Color Clamping Type:

0 - Clamp

1 - Scale

.antiAliasFilter : maxObject : Read|Write|Validated by Validator function

Get/Set the Anti-Alias Filter:

The following Global Super-Sampler properties are available in 3ds Max 6 and higher:

.globalSamplerEnabled : boolean : Read|Write

Enable/Disable the Global Super-Sampler.

.globalSamplerClassByName : string : Read|Write

Get/Set the Global Super-Sampler by name.

.globalSamplerSampleMaps : boolean : Read|Write

Enable/Disable the global super-sampling of Maps.

.globalSamplerQuality : float : Read|Write

Get/Set the Global Super-Sampler quality.

.globalSamplerAdaptive : boolean : Read|Write

Enable/Disable Adaptive global super-sampling.

.globalSamplerAdaptiveThresh : float : Read|Write

Get/Set the Threshold for Adaptive global super-sampling.

EXAMPLE

--Assign a Default Scanline Renderer to the production renderer

renderers.production = Default_Scanline_Renderer()

Default_Scanline_Renderer:Default_Scanline_Renderer

--Disable Anti-Aliasing in the production renderer

renderers.production.AntiAliasing = false

false

See also

VUE_File_Renderer : RendererClass

Renderers

Render Scene Dialog

renderSceneDialog


mental_ray_renderer : RendererClass

mental_ray_renderer - superclass: RendererClass; super-superclass:MAXWrapper - classID: #(1492548972, 1338981315)

This class represents the mental ray renderer.

It lets you construct an instance of the mental_ray_renderer class to be assigned to the Current, Production and Material Editor renderers using the renderers structure .

Constructor

mental_ray_renderer ...

EXAMPLE:

RendererClass.classes

#(Default_Scanline_Renderer, VUE_File_Renderer, mental_ray_renderer, Missing_Renderer)

renderers.current = mental_ray_renderer()

mental_ray_renderer:mental_ray_renderer

Properties

Renderer Tab > Sampling Quality Rollout

Roll over and click a rollout area to jump to description:

Renderer Tab > Sampling Quality Rollout > Samples per Pixel:

<mental_ray_renderer>.MinimumSamples Integer default: -1 -- integer

Get/set the Minimum samples value.

The exposed value corresponds to the power of two value used to calculate the number of horizontal / vertical samples.

For example, when the value is 2, 2.0 to the power of 2 is 4, which means that mental ray will fire 4x4 rays to sample a single pixel. Thus, the User Interface displays 16 as the sample value which represents the minimum total number of rays to be fired.

Thus, the possible values are:

Property | User Interface | How is it calculated
-3 | 1/64 | (2.0 ^ (-3))^2 = 0.125^2 = 0.015625
-2 | 1/16 | (2.0 ^ (-2))^2 = 0.25^2 = 0.0625
-1 | 1/4 | (2.0 ^ (-1))^2 = 0.5^2 = 0.25
0 | 1 | (2.0 ^ 0)^2 = 1.0^2 = 1
1 | 4 | (2.0 ^ 1)^2 = 2.0^2 = 4.0
2 | 16 | (2.0 ^ 2)^2 = 4.0^2 = 16.0
3 | 64 | (2.0 ^ 3)^2 = 8.0^2 = 64.0
4 | 128 | (2.0 ^ 4)^2 = 16.0 ^ 2 = 128.0
5 | 1024 | (2.0 ^ 5)^2 = 32.0 ^ 2 = 1024.0

<mental_ray_renderer>.MaximumSamples Integer default: 1 -- integer

Get/set the Maximum samples value. The exposed value corresponds to the power of two value used to calculate the number of horizontal / vertical samples. See above for details.

Renderer Tab > Sampling Quality Rollout > Filter:

<mental_ray_renderer>.filter Integer default: 0 -- integer

Get/set the filter type.

Possible values are:

0 - Box

1 - Gauss

2 - Triangle

3 - Mitchell

4 - Lanczos

<mental_ray_renderer>.BoxFilterWidth Float default: 1.0 -- float

Get/set the Box filter width. Possible values are between 0.0 and 8.0, default is 1.0.

<mental_ray_renderer>.BoxFilterHeight Float default: 1.0 -- float

Get/set the Box filter height. Possible values are between 0.0 and 8.0, default is 1.0.

<mental_ray_renderer>.GaussFilterWidth Float default: 3.0 -- float

Get/set the Gauss filter width. Possible values are between 0.0 and 8.0, default is 3.0.

<mental_ray_renderer>.GaussFilterHeight Float default: 3.0 -- float

Get/set the Gauss filter height. Possible values are between 0.0 and 8.0, default is 3.0.

<mental_ray_renderer>.TriangleFilterWidth Float default: 2.0 -- float

Get/set the Triangle filter width. Possible values are between 0.0 and 8.0, default is 2.0.

<mental_ray_renderer>.TriangleFilterHeight Float default: 2.0 -- float

Get/set the Triangle filter height. Possible values are between 0.0 and 8.0, default is 2.0.

<mental_ray_renderer>.MitchellFilterWidth Float default: 4.0 -- float

Get/set the Mitchell filter width. Possible values are between 0.0 and 8.0, default is 4.0.

<mental_ray_renderer>.MitchellFilterHeight Float default: 4.0 -- float

Get/set the Mitchell filter height. Possible values are between 0.0 and 8.0, default is 4.0.

<mental_ray_renderer>.LanczosFilterWidth Float default: 4.0 -- float

Get/set the Lanczos filter width. Possible values are between 0.0 and 8.0, default is 4.0.

<mental_ray_renderer>.LanczosFilterHeight Float default: 4.0 -- float

Get/set the Lanczos filter height. Possible values are between 0.0 and 8.0, default is 4.0.

Renderer Tab > Sampling Quality Rollout > Spatial Contrast:

<mental_ray_renderer>.RedSpatialContrast Float default: 0.05 -- float

Get/set the R ed Spatial Contrast value.

<mental_ray_renderer>.GreenSpatialContrast Float default: 0.05 -- float

Get/set the G reen Spatial Contrast value.

<mental_ray_renderer>.BlueSpatialContrast Float default: 0.05 -- float

Get/set the B lue Spatial Contrast value.

<mental_ray_renderer>.AlphaSpatialContrast Float default: 0.05 -- float

Get/set the A lpha Spatial Contrast value.

Renderer Tab > Sampling Quality Rollout > Options:

<mental_ray_renderer>.LockSamples BooleanClass default: true -- boolean

Get/set the Lock Samples checkbox state.

<mental_ray_renderer>.Jitter BooleanClass default: false -- boolean

Get/set the Jitter checkbox state.

<mental_ray_renderer>.TaskSize Integer default: 48 -- integer

Get/set the Bucket Width value.

<mental_ray_renderer>.TaskOrder Integer default: 0 -- integer

Get/set the Bucket Order.

Possible values are:

0 - Hilbert (best)

1 - Spiral

2 - Left to right

3 - Right to left

4 - Top-down

5 - Bottom-up

Any values above 5 will be clamped to 0 - Hilbert (best)

<mental_ray_renderer>.FrameBufferType Integer default: 0 -- integer

Controls the Frame Buffer Type.

Possible values are:

0 - Integer (16 bits per channel)

1 - Floating-Point (32 bits per channel)

Available in 3ds Max 8 and higher.

Renderer Tab > Rendering Algorithms Rollout

Roll over and click a rollout area to jump to description:

Renderer Tab > Rendering Algorithms Rollout > Scanline:

<mental_ray_renderer>.ScanlineEnable BooleanClass default: true -- boolean

Get/set the Enable Scanline checkbox.

<mental_ray_renderer>.ScanlineMethod Integer default: 0 -- integer

Enable/disable the Fast Rasterizer method.

Possible values are:

1 - Use Fast Rasterizer (Rapid Motion Blur)

0 and any integer other than 1 - Disable Fast Rasterize.

<mental_ray_renderer>.RapidCollectRate Integer default: 0 -- integer

Get/set the selection of the Samples per Pixel drop-down list.

Possible values are

0 - 1

1 - 4

2 - 9

3 - 16

4 - 25

5 - 36

6 - 49

7 - 64

8 - 81

9 - 100

10 - 121

11 - 144

12 - 169

13 - 196

14 - 225

Available in 3ds Max 7 and higher.

<mental_ray_renderer>.RapidShadingSamples Float default: 1.0 -- float

Get/set the Shades per Pixel value.

Available in 3ds Max 8 and higher.

Renderer Tab > Rendering Algorithms Rollout > Ray Tracing:

<mental_ray_renderer>.RaytraceEnable BooleanClass default: true -- boolean

Get/set the Enable Ray Tracing checkbox.

<mental_ray_renderer>.Autovolume BooleanClass default: false -- boolean

Get/set the Use Autovolume checkbox.

Renderer Tab > Rendering Algorithms Rollout > Raytrace Acceleration:

<mental_ray_renderer>.RaytraceMethod Integer default: 4 -- integer

Get/set the Raytrace Method drop-down list.

Possible values are:

0 - BSP

4 - BPS2 [image] NEW in 3ds Max 2009

Available in 3ds Max 7 and higher.

NOTE:

The previously available options Grid (1) and Large BSP (2) have been removed in 3ds Max 2009. Setting the .RaytraceMethod property to 1, 2 or 3 via MAXScript will effectively set the acceleration to BSP2.

<mental_ray_renderer>.BSPSize Integer default: 10 -- integer

Get/set the BSP Size value available when RaytraceMethod is set to BSP

<mental_ray_renderer>.BSPDepth Integer default: 40 -- integer

Get/set the BSP Depth value available when RaytraceMethod is set to BSP.

NOTE:

The properties GridSize2, GridDepth and GridResolution added in 3ds Max 7 have been removed in 3ds Max 2009 together with the Grid acceleration method.

Renderer Tab > Rendering Algorithms Rollout > Trace Depth:

<mental_ray_renderer>.MaximumTraceDepth Integer default: 6 -- integer

Get/set the Max. Trace Depth value.

<mental_ray_renderer>.MaximumReflections Integer default: 6 -- integer

Get/set the Max.Reflections value.

<mental_ray_renderer>.MaximumRefractions Integer default: 6 -- integer

Get/set the Max.Refractions value.

<mental_ray_renderer>.ReflectionsEnable Boolean default: true -- boolean

NEW in 3ds Max 2009: Get/set the state of the Enable Reflections checkbox.

<mental_ray_renderer>.RefractionsEnable Boolean default: true -- boolean

NEW in 3ds Max 2009: Get/set the state of the Enable Refractions checkbox.

Renderer Tab > Rendering Algorithms Rollout > Subset Pixel Rendering:

<mental_ray_renderer>. enable_subset_pixel_rendering Boolean default: false -- boolean

NEW in 3ds Max 2009: Get/set the state of the "Render changes to selected objects only" checkbox. When checked, only pixels belonging to changed objects will be updated.

Renderer Tab > Camera Effects Rollout

Roll over and click a rollout area to jump to description:

Renderer Tab > Camera Effects Rollout > Motion Blur:

<mental_ray_renderer>.MotionBlurEnable BooleanClass default: false -- boolean

Get/set the state of the Enable Motion Blur checkbox.

<mental_ray_renderer>.MotionBlurAllObjects BooleanClass default: true -- boolean

Available in 3ds Max 7 and higher.

<mental_ray_renderer>.Shutter Float default: 0.5 -- float

Get/set the Shutter Duration (frames) value. Lowest value is 0.0, default is 0.5, practically unlimited.

<mental_ray_renderer>.MotionBlurOffset Float default: -0.25 -- float

Get/Set the Shutter Offset (frames) value.

Available in 3ds Max 8 and higher.

<mental_ray_renderer>.Segments Integer default: 1 -- integer

Get/Set the Motion Segments value. Possible values are between 1 (default) and 15. Values outside this range will be clamped to the range.

<mental_ray_renderer>.TimeSamples Integer default: 5 -- integer

Get/set the Time Samples value. Possible values are between 0 and 100. Lower or higher values will be clamped automatically to this range.

<mental_ray_renderer>.RapidMotionResample Integer default: 1 -- integer

Get/set the Time Samples (Fast Rasterizer) value available when Fast Rasterizer is enabled. Possible values are between 1 and 128. Lower or higher values will be clamped automatically to this range.

Available in 3ds Max 7 and higher.

Renderer Tab > Camera Effects Rollout > Contours:

<mental_ray_renderer>.EnableContours BooleanClass default: false -- boolean

Get/set the state of the Enable contours checkbox.

<mental_ray_renderer>.Contour_Contrast_Shader Contour_Contrast_Function_Levels__contour default: DefaultContourContrastShader:Contour Contrast Function Levels (contour) -- SubAnim

Get/set the Contrast shader.

The default shader is:

mental_ray_renderer.Contour_Contrast_Shader - superclass: textureMap; super-superclass:material - 10:0 - classID: #(2004031007, -2112913332)

<mental_ray_renderer>.Contour_Output_Shader Contour_Composite__contour default: DefaultContourOutputShader:Contour Composite (contour) -- SubAnim

Get/set the Output shader.

The default shader is:

mental_ray_renderer.Contour_Output_Shader - superclass: textureMap; super-superclass:material - 4:0 - classID: #(2004031007, 1963608696)

<mental_ray_renderer>.Contour_Store_Shader Contour_Store_Function__contour default: DefaultContourStoreShader:Contour Store Function (contour) -- SubAnim

Get/set the Store shader.

The default shader is:

mental_ray_renderer.Contour_Store_Shader - superclass: textureMap; super-superclass:material - 11:0 - classID: #(2004031007, -1957461970)

Renderer Tab > Camera Effects Rollout > Camera Shaders:

<mental_ray_renderer>.Enable_Camera_Lens_Shader BooleanClass default: true -- boolean

<mental_ray_renderer>.Camera_Lens_Shader UndefinedClass default: undefined

<mental_ray_renderer>.Enable_Camera_Output_Shader BooleanClass default: true -- boolean

<mental_ray_renderer>.Camera_Output_Shader UndefinedClass default: undefined

<mental_ray_renderer>.Enable_Camera_Volume_Shader BooleanClass default: true -- boolean

<mental_ray_renderer>.Camera_Volume_Shader UndefinedClass default: undefined

Renderer Tab > Camera Effects Rollout > Depth Of Field:

<mental_ray_renderer>.DepthOfFieldEnable BooleanClass default: false -- boolean

Get/set the state of the Enable depth of field checkbox.

<mental_ray_renderer>.DepthOfFieldMode Integer default: 0 -- integer

Get/set the selection in the depth of field mode drop-down list.

Possible values are

0 - f-Stop

1 - In Focus Limits

<mental_ray_renderer>.FocusPlane Float default: 100.0 -- float

Get/set the Focus Plane value available when the Focus mode is set to f-Stop.

<mental_ray_renderer>.fStop Float default: 1.0 -- float

Get/set the f-Stop value available when the Focus mode is set to f-Stop.

<mental_ray_renderer>.NearFocus Float default: 90.0 -- float

Get/set the Near focus value available when the Focus mode is set to In Focus Limits.

<mental_ray_renderer>.FarFocus Float default: 110.0 -- float

Get/set the Far focus value available when the Focus mode is set to In Focus Limits.

Renderer Tab > Shadows & Displacement

Roll over and click a rollout area to jump to description:

Renderer Tab > Shadows & Displacement > Shadows:

<mental_ray_renderer>.ShadowsEnable BooleanClass default: true -- boolean

Get/set the state of the Enable Shadows checkbox.

<mental_ray_renderer>.ShadowMethod Integer default: 0 -- integer

Get/set the Shadows Mode drop-down list selection.

Possible values are

0 - Simple

1 - Sort

2 - Segment

Renderer Tab > Shadows & Displacement > Shadow Maps:

<mental_ray_renderer>.EnableShadowMaps BooleanClass default: true -- boolean

Get/set the state of the Enable Shadow Maps checkbox.

<mental_ray_renderer>.MotionBlurShadowMapsEnable BooleanClass default: true -- boolean

Get/set the state of the Motion Blur checkbox.

<mental_ray_renderer>.ShadowMapRebuild BooleanClass default: true -- boolean

Get/set the state of the Rebuild (Do Not Re-Use Cache) checkbox.

Available in 3ds Max 7 and higher.

<mental_ray_renderer>.UseShadowMapFile BooleanClass default: false -- boolean

Get/set the state of the Use File checkbox.

Available in 3ds Max 7 and higher.

<mental_ray_renderer>.ShadowMapFilename String default: "" -- string

Get/set the name of the Shadow Maps file.

Available in 3ds Max 7 and higher.

Renderer Tab > Shadows & Displacement > Displacement (Global Settings):

<mental_ray_renderer>.view BooleanClass default: true -- boolean

Get/set the state of the View checkbox.

<mental_ray_renderer>.Smooth BooleanClass default: true -- boolean

Get/set the state of the Smoothing checkbox.

Available in 3ds Max 8 and higher.

<mental_ray_renderer>.Edge_Length Float default: 2.0 -- float

Get/set the Edge Length value in pixels.

<mental_ray_renderer>.Max_Displace Float default: 20.0 -- float

Get/set the Max.Displace value.

<mental_ray_renderer>.Max_Level Integer default: 6 -- integer

Get/Set the Max.Subdiv. value.

Possible values are:

0 - 4

1 - 16

2 - 64

3 - 256

4 - 1K

5 - 4K

6 - 16K

7 - 64K

Indirect Illumination Tab > Final Gather Rollout

Roll over and click a rollout area to jump to description:

Indirect Illumination Tab > Final Gather Rollout > Basic

<mental_ray_renderer>.numFinalGatherPresets Integer default: 6 -- integer

NEW in 3ds Max 2009: Get the number of Final Gather Presets. Exposed by the mental_ray_renderer_functions Interface .

<mental_ray_renderer>.FinalGatherEnable2 BooleanClass default: false -- boolean

Get/set the state of the Final Gather Enable checkbox.

Available in 3ds Max 7 and higher.

<mental_ray_renderer>.FGMultiplierScalar Float default:1.0 -- float

Get/set the Final Gather Multiplier value.

<mental_ray_renderer>.FGMultiplierColor color default:(color 255 255 255) -- color

Get/set the Final Gather Multiplier color.

<mental_ray_renderer>.FinalGatherDensity Float default:1.0 -- float

Get/set the Initial FG Point Density value.

<mental_ray_renderer>.FinalGatherAccuracy Integer default: 250 -- integer

Get/set the Rays per FG Point value.

<mental_ray_renderer>.FinalGatherInterpolationSamples Integer default:27 -- integer

Get/set the Interpolate Over Num. FG Points value.

<mental_ray_renderer>.FinalGatherBounces Integer default: 0 -- integer

Get/set the Diffuse Bounces value.

Available in 3ds Max 8 and higher.

<mental_ray_renderer>.FinalGatherBounceMultiplier Float default:1.0 -- float

Get/set the Final Gather Diffuse Bounces Weight value.

Indirect Illumination Tab > Final Gather Rollout > Final Gather Map

<mental_ray_renderer>.UseFinalGatherFile BooleanClass default: false -- boolean

Get/set the state of the Read/Write File checkbox.

<mental_ray_renderer>.FinalGatherFreeze : BooleanClass default:false -- boolean

Get/set the state of the Read Only (FG Freeze) checkbox.

<mental_ray_renderer>.FinalGatherFilename String default: "" -- string

Get/set the Final Gather Map filename.

<mental_ray_renderer>.FinalGatherTempFilename String default: "C:\Program Files\Autodesk\3ds Max 2009\sceneassets\renderassets\temp.fgm" -- string

NEW in 3ds Max 2009: Get/set the Final Gather Map Temp. filename.

See also the mental_ray_renderer_functions Interface for methods related to managing the Final Gather maps and Final Gather Presets.

Indirect Illumination Tab > Final Gather Rollout > Advanced

<mental_ray_renderer>.FinalGatherFilter Integer default: 1 -- integer

Get/set the selection of the Noise Filtering (Speckle Reduction) drop-down list. Possible values are:

0 - None

1 - Standard

2 - High

3 - Very High

4 - Extremely High

Available in 3ds Max 7 and higher.

<mental_ray_renderer>.FinalGatherPreview BooleanClass default: false -- boolean

Get/set the state of the Draft Move (No Precalculations) checkbox.

Indirect Illumination Tab > Final Gather Rollout > Trace Depth

<mental_ray_renderer>.FinalGatherTraceDepth Integer default: 5 -- integer

Get/set the Final Gather Max.Depth value.

<mental_ray_renderer>.FinalGatherReflectionDepth Integer default: 5 -- integer

Get/set the Final Gather Max.Reflections value.

<mental_ray_renderer>.FinalGatherRefractionDepth Integer default: 5 -- integer

Get/set the Final Gather Max.Refractions value.

<mental_ray_renderer>.FinalGatherFalloff BooleanClass default: false -- boolean

Get/set the state of the Use Falloff (Limits Ray Distance) checkbox.

<mental_ray_renderer>.FinalGatherFalloffStart Float default: 0.0 -- float

Get/set the Falloff Start value.

<mental_ray_renderer>.FinalGatherFalloffStop Float default: 0.0 -- float

Get/set the Falloff Stop value.

Indirect Illumination Tab > Final Gather Rollout > FG Point Interpolation

<mental_ray_renderer>.FinalGatherUseRadiusInterpolation BooleanClass default:false -- Boolean

Get/set the state of the Use Radius Interpolation Method (Instead of Num. FG Points) checkbox.

<mental_ray_renderer>.FinalGatherView BooleanClass default: false -- boolean

Get/set the state of the Radii in Pixels checkbox.

<mental_ray_renderer>.UseFinalGatherRadius BooleanClass default: false -- boolean

Get/set the state of the Radius checkbox.

<mental_ray_renderer>.FinalGatherRadius Float default: 1.0 -- float

Get/set the Radius value when Radii in Pixels (.FinalGatherView) is unchecked.

<mental_ray_renderer>.FinalGatherMinRadius Float default: 0.1 -- float

Get/set the Min. Radius value when Radii in Pixels (.FinalGatherView) is unchecked.

Available in 3ds Max 7 and higher.

<mental_ray_renderer>.FinalGatherRadius_View Float default: 5.0 -- float

Get/set the Radius value when Radii in Pixels (.FinalGatherView) is checked.

<mental_ray_renderer>.FinalGatherMinRadius_View Float default: 0.5 -- float

Get/set the Min. Radius value when Radii in Pixels (.FinalGatherView) is checked.

Indirect Illumination Tab > Caustics and GI Rollout

Roll over and click a rollout area to jump to description:

Indirect Illumination Tab > Caustics & GI Rollout > Caustics

<mental_ray_renderer>.CausticsEnable BooleanClass default: false -- boolean

Get/set the state of the Caustics Enable checkbox.

<mental_ray_renderer>.CausticMultiplierScalar Float default:1.0 -- float

Get/set the Caustics Multiplier value.

<mental_ray_renderer>.CausticMultiplierColor Color default: (color 255 255 255) -- color

Get/set the Caustics Multiplier color.

<mental_ray_renderer>.CausticAccuracy Integer default: 100 -- integer

Get/set the Maximum Num. Photons Per Sample value.

<mental_ray_renderer>.UseCausticRadius BooleanClass default: false -- boolean

Get/set whether to use the Maximum Sampling Radius.

<mental_ray_renderer>.CausticRadius Float default: 1.0 -- float

Get/set the Maximum Sampling Radius value.

<mental_ray_renderer>.CausticsFilter Integer default: 0 -- integer

Get/set the Caustics Filter Type drop-down list selection.

Possible values are:

0 - Box

1 - Cone

2 - Gauss

<mental_ray_renderer>.Kernel Float default: 1.1 -- float

Get/set the Filter Size value.

<mental_ray_renderer>.CausticOpaqueShadows BooleanClass default: true -- boolean

Get/set the state of the Opaque Shadows when Caustics are Enabled checkbox.

Available in 3ds Max 7 and higher.

Indirect Illumination Tab > Caustics & GI Rollout > Global Illumination:

<mental_ray_renderer>.GlobalIllumEnable BooleanClass default: false -- boolean

Get/set the state of the Global Illumination Enable checkbox.

<mental_ray_renderer>.GIMultiplierScalar Float default: 1.0 -- float

Get/set the Global Illumination Multiplier value.

<mental_ray_renderer>.GIMultiplierColor Color default: (color 255 255 255) -- color

Get/set the Global Illumination Multiplier coloe.

<mental_ray_renderer>.GlobalIllumAccuracy Integer default: 500 -- integer

Get/set the Maximum Num. Photons Per Sample value.

<mental_ray_renderer>.UseGlobalIllumRadius BooleanClass default: false -- boolean

Get/set whether to use the Maximum Sampling Radius value.

<mental_ray_renderer>.GlobalIllumRadius Float default: 1.0 -- float

Get/set the Maximum Sampling Radius value.

<mental_ray_renderer>.GIPhotonMergeDistance Float default:0.0 -- float

Get/set the Merge Nearby Photons (saves memory) value.

Indirect Illumination Tab > Caustics & GI Rollout > Volumes:

<mental_ray_renderer>.VolumeAccuracy Integer default: 100 -- integer

Get/set the Maximum Num. Photons per Sample value.

<mental_ray_renderer>.UseVolumeRadius BooleanClass default: false -- boolean

Get/set whether to use the Maximum Sampling Radius.

<mental_ray_renderer>.VolumeRadius Float default: 1.0 -- float

Get/set the Maximum Sampling Radius value.

Indirect Illumination Tab > Caustics & GI Rollout > Photon Map:

<mental_ray_renderer>.PhotonMapUseFile BooleanClass default: false -- boolean

Get/set the state of the Read/Write File checkbox.

Available in 3ds Max 7 and higher.

<mental_ray_renderer>.PhotonMapFilename String default: "" -- string

Get/set the photon map file name.

Available in 3ds Max 7 and higher.

Indirect Illumination Tab > Caustics & GI Rollout > Trace Depth:

<mental_ray_renderer>.GIMaximumTraceDepth Integer default: 5 -- integer

<mental_ray_renderer>.GIMaximumReflections Integer default: 5 -- integer

<mental_ray_renderer>.GIMaximumRefractions Integer default: 5 -- integer

Indirect Illumination Tab > Caustics & GI Rollout > Light Properties:

<mental_ray_renderer>.GlobalLightCausticPhotons Integer default: 10000 -- integer

<mental_ray_renderer>.GlobalLightGIPhotons Integer default: 10000 -- integer

<mental_ray_renderer>.GlobalLightDecay Float default: 2.0 -- float

Indirect Illumination Tab > Caustics & GI Rollout > Geometry Properties:

<mental_ray_renderer>.OverrideIIObjProps BooleanClass default: false -- boolean

Get/set the state of the All Objects Generate & Receive GI and Caustics checkbox.

Processing Tab > Translator Options Rollout

Roll over and click a rollout area to jump to description:

Processing Tab > Translation Options Rollout > Memory Options:

<mental_ray_renderer>.Use_Placeholders BooleanClass default: false -- boolean

Get/set the state of the Use Placeholder Objects checkbox.

<mental_ray_renderer>.Memory_Limit Integer default: 1536 -- integer

Get/set the the Memory Limit value.

<mental_ray_renderer>.Conserve_Memory BooleanClass default: false -- boolean

Get/set the state of the Conserve Memory checkbox.

<mental_ray_renderer>.mental_ray_Manages_Maps BooleanClass default: false -- boolean

Get/set the state of the Use mental ray Map Manager checkbox.

Available in 3ds Max 7 and higher.

Processing Tab > Translation Options Rollout > Geometry Caching:

<mental_ray_renderer>.EnableGeometryCache BooleanClass default: false -- boolean

NEW in 3ds Max 2009: Get/set the state of the Geometry Cache Enable checkbox.

<mental_ray_renderer>.IsGeometryCacheEmpty BooleanClass default: true -- Boolean

NEW in 3ds Max 2009: Get whether the Geometry Cache is empty (true) or full (false). To clear the Geometry Cache, use the .ClearGeometryCache() method exposed by the mental_ray_renderer_functions interface .

<mental_ray_renderer>.LockGeometryCache BooleanClass default: false -- boolean

NEW in 3ds Max 2009: Get/set the state of the Geometry Cache Lock checkbutton. When set to true, the cache will not be updated even if scene objects have changed.

Processing Tab > Translation Options Rollout > Material Override:

<mental_ray_renderer>.Enable_Material_Override BooleanClass default: false -- boolean

Controls the state of the Enable checkbox in the Material Override group of controls in the Translator Options rollout of the Processing tab. When set to true, the material assigned to the .Override_Material property will be used to override all scene materials.

Available in 3ds Max 8 and higher.

<mental_ray_renderer>.Override_Material UndefinedClass default: undefined

Get/Set the Override Material assigned through the Material Override group of controls in the Translator Options rollout of the Processing tab. When the .Enable_Material_Override property is set to true, this material will be used to override all scene materials.

Available in 3ds Max 8 and higher.

Processing Tab > Translation Options Rollout > Export to .mi File

<mental_ray_renderer>.Export_On_Render BooleanClass default: false -- boolean

Get/set the state of the Export on Render checkbox.

<mental_ray_renderer>.Export_ASCII BooleanClass default: true -- boolean

Get/set the state of the Un-compressed checkbox.

<mental_ray_renderer>.Incremental_Echo BooleanClass default: false -- boolean

Available in 3ds Max 7 and higher.

<mental_ray_renderer>.Export_Filename String default: """" -- string

Get/set the .mi file name.

Processing Tab > Translation Options Rollout > Render Passes

No properties exposed.

Processing Tab > Translation Options Rollout > Mapping

<mental_ray_renderer>.Skip_Texture_Maps BooleanClass default:false -- boolean

Get/set the state of the Skip Maps and Textures checkbox.

Processing Tab > Diagnostics Rollout

Roll over and click a rollout area to jump to description:

<mental_ray_renderer>.DiagnosticsEnabled BooleanClass default: false -- boolean

Get/set the state of the Diagnostics Enable checkbox.

<mental_ray_renderer>.DiagnosticMode Integer default: 0 -- integer

Get/set the Diagnostics Mode radio button state.

Possible values are:

0 - Sampling Rate

1 - Coordinate Space

2 - Photon

3 - BSP

4 - Final Gather

<mental_ray_renderer>.DiagnosticGridMethod Integer default: 0 -- integer

Get/set the selection of the BSP Mode drop-down list.

Possible values are:

0 - Object

1 - World

2 - Camera

<mental_ray_renderer>.DiagnosticGridSize Float default: 1.0 -- float

Get/set the Grid Size value..

<mental_ray_renderer>.DiagnosticPhotonMethod Integer default: 0 -- integer

Get/set the selection of the BSP Mode drop-down list.

Possible values are:

0 - Density

1 - Irradiance

<mental_ray_renderer>.DiagnosticBSPMethod Integer default: 0 -- integer

Get/set the selection of the BSP Mode drop-down list.

Possible values are:

0 - Depth

1 - Size

Processing Tab > Distributed Bucket Rendering Rollout

Roll over and click a rollout area to jump to description:

<mental_ray_renderer>.DistributedEnable BooleanClass default: false -- boolean

Get/set the state of the Distributed Render checkbox.

<mental_ray_renderer>.LocalBitmaps BooleanClass default: false -- boolean

Get/set the state of the Distributed Maps checkbox.

Last Time Statistics

<mental_ray_renderer>.LastTotalNonRenderTime_ms : integer

The time, in milliseconds, spent by the translator outside of rendering. The accounts for everything the translator does outside of the command that starts the mental ray render. If placeholders are being used, then geometry translation time will not be included in this value; only placeholder setup time will be accounted for.

Available in 3ds Max 9 and higher.

<mental_ray_renderer>.LastTotalGeomTranslationTime_ms : integer

The time, in milliseconds, spent translating geometry. If placeholders are OFF, this is a subset of LastTotalNonRenderTime_ms; if placeholders are ON, this time accounts for both placeholder setup (mostly bounding boxes calculations) and placeholder geometry translation.

Available in 3ds Max 9 and higher.

The translator outputs the statistics as information messages in the mental ray message window.

HERE IS A SAMPLE:

MSG 0.0 info : Total non-render time: 71.3281 s.

MSG 0.0 info : Total geometry translation time: 3.5781 s.

MSG 0.0 info : Total number of entities translated: 7884.

Other Properties

<mental_ray_renderer>.SlavesOnly BooleanClass default: false -- boolean

<mental_ray_renderer>.BarycentricClipLimitMultiplier Float default:1.0 -- float

mental_ray_renderer interfaces:

Interface: IMtlRender_Compability_Renderer

No Properties, Methods or Actions exposed.

Interface: mental_ray_renderer_functions

Properties:

<mental_ray_renderer>.numFinalGatherPresets : integer : Read

NEW in 3ds Max 2009: Get the number of Final Gather Presets.

Methods:

<void><mental_ray_renderer>.ClearGeometryCache noPrompt:<boolean>

noPrompt default value: false

NEW in 3ds Max 2009: Clears the Geometry Cache. Equivalent to pressing the Clear Geometry Cache button in the UI. If the noPrompt: optional keyword argument is supplied as true, the Cache will be cleared without prompting the user.

<void><mental_ray_renderer>.DeleteFinalGatherFile noPrompt:<boolean>

noPrompt default value: false

NEW in 3ds Max 2009: Deletes the Final Gather map file. Equivalent to pressing the [X] button in the UI. If the noPrompt: optional keyword argument is supplied as true, the Final Gather map file will be cleared without prompting the user.

<string><mental_ray_renderer>.GetFinalGatherPresetName <index>index

NEW in 3ds Max 2009: Returns the name of the indexed Final Gather Preset.

<void><mental_ray_renderer>.CaptureFinalGatherPreset <index>index

NEW in 3ds Max 2009: Captures the current settings into the current Final Gather Preset.

<void><mental_ray_renderer>.RestoreFinalGatherPreset <index>index

NEW in 3ds Max 2009: Restores the indexed Final Gather Preset.

<index><mental_ray_renderer>.FindFinalGatherPreset()

NEW in 3ds Max 2009: Returns the index of the current Final Gather Preset.

<void><mental_ray_renderer>.UpdateUI()

NEW in 3ds Max 2009: Reloads the mental ray UI from internal parameters, similar to renderSceneDialog.Update().

This method is much faster and produce fewer display artifacts then the equivalent renderSceneDialog method. However it updates only mental ray parameters, thus having no effect on the Common tab of the Render Dialog.

<void><mental_ray_renderer>.CommitUI()

NEW in 3ds Max 2009: Sets mental ray internal parameters based on the UI, similar to renderSceneDialog.Commit()

See also

Default_Scanline_Renderer : RendererClass

VUE_File_Renderer : RendererClass

Renderers

Render Scene Dialog

renderSceneDialog

Interface: mental_ray_Preferences


VUE_File_Renderer : RendererClass

VUE_File_Renderer - superclass: RendererClass; super-superclass:MAXWrapper - classID: #(5, 0)

This class represents the VUE File Renderer. It lets you construct an instance of the VUE_File_Renderer class to be assigned to the Current and Production renderers using the new renderers structure .

No properties or interfaces exposed.

EXAMPLE

--Create a new instance of the VUE_File_Renderer class

vue_rend = VUE_File_Renderer()

VUE_File_Renderer:VUE_File_Renderer

--Assign the VUE renderer to the current renderer

--Since assigning a new renderer generates

--an invalid undo record,

--we turn undo off temporarily

undo off renderers.current = vue_rend

VUE_File_Renderer:VUE_File_Renderer

See also

Default_Scanline_Renderer : RendererClass

Renderers


Track View Nodes

You can access and modify controllers in the Global Tracks and Video Post sections in Track View, and create new named global tracks. Among other things, these can be used to provide keyframeable parameters in your scripted utilities.

There are also methods associated with the Track View window. These methods are described in Track View .

MAXTVNode : Value is the class whose instances represent track view global track nodes. Each MAXTVNode can contain any number of MAXTVNodes or animation controllers. The MAXTVNodes and controllers within a MAXTVNode are shown as properties of the MAXTVNode so you navigate through the nesting using property access. A MAXTVNode itself does not store animation data, but rather acts as a container that can store one or more MAXTVNode or animation controller.

There are three track view nodes you can access through global variables: the root node to which you can add new custom tracks; the existing Global Tracks node which provides access to the global track controllers; and the Video Post tracks node which provides access to any video post controllers. These nodes are also accessible as properties on the root node.

Constructor

trackViewNodes

Global variable containing the top-level World, or root, node in Track View. This variable is read-only.

globalTracks

Global variable containing the top-level Global Tracks node in Track View. This variable is read-only.

videoPostTracks

Global variable containing the top-level Video Post Track View node. This variable is read-only. This variable contains the value undefined in Autodesk VIZ.

newTrackViewNode [ <maxtvnode> ] <name_string> [ #hidden ]

if the <maxtvnode> argument is supplied, adds a sub-track node to it. If not, creates a new 'top-level' track in the Track View. If the optional #hidden flag is supplied, the node is not visible in the Track View.

Properties

<maxtvnode>.name String

the track view node name as it appears in Track View

The sub-tracks and sub-controllers for a track view node are also shown as properties of the track view node. For example, the additional default properties for global trackViewNodes are:

TrackViewNodes.Global_Tracks MAXTVNode

TrackViewNodes.Video_Post MAXTVNode

And the additional default properties for global globalTracks are:

GlobalTracks.float float_list controller

GlobalTracks.point3 point3_list controller

GlobalTracks.position position_list controller

GlobalTracks.rotation rotation_list controller

GlobalTracks.scale scale_list controller

GlobalTracks.Block_Control block_control controller

Methods

deleteTrackViewNode [ <parent_maxtvnode> ] <maxtvnode>

deletes the given node from the supplied parent, or the top-level if the parent is not specified

addTrackViewController <maxtvnode> <controller> <name>

adds the sub-controller to the given Track View node. The

deleteTrackViewController <maxtvnode> <controller>

deletes the controller from the given Track View node

EXAMPLES

-- access a video post track

videoPostTracks.glow.size = 5

-- set up some visible tracks for some keyframeable parameters in a rollout panel

my_tracks = newTrackViewNode "Grinner"

happy_ctrl = bezier_position()

addTrackViewController my_tracks happy_ctrl "Happy"

...

-- plant keyframes in rollout spinner handler if the animate button is on

rollout grinner ...

(

...

on happy changed val do

(

...

happy_ctrl.value = [x, y, z]

...

)

...

)

-- add a new float controller to the global tracks float controller list

globalTracks.float.controller.available.controller = bezier_float()

See also

Value Common Properties, Operators, and Methods


Scripted Custom Attributes

Custom Attributes let you create and assign additional parameters to any object, modifier, or material in your scene. This is useful for game and other project-specific data.

MAXScript provides a way to define and add these custom attributes to objects in the scene and also a way to define UI rollups for accessing these attributes.

Custom Attributes Topics:

Adding Custom Attributes

Global and Private Custom Attributes Definitions

Custom Attribute Management Functions

Custom Attributes Definition Values

Access to Custom Attributes Virtual Array

Custom Attributes in Materials and Texture Maps

Attribute Definitions

Attributes can be added to an object via an "attribute definition". This is a syntactic construct in MAXScript that is similar to a scripted plug-in definition, but rather than adding a new plug-in class, a definition is built that can be used to add custom attributes and rollup UI to any number of objects at any time, through a special new function.

NOTE:

You cannot use Custom Attributes for per-face data. The face-data channels store objects of a user defined type and MAXScript cannot create objects of types other than those known by MAXScript.

The syntax has the following form:

attributes <name> [version:n] [silentErrors:t/f] [initialRollupState:0xnnnnn]
[remap:#(<old_param_names_array>, <new_param_names_array>)]

(

<locals>

<globals>

<parameters>

<rollouts>

<handlers>

)

Remarks

The name is a descriptive name for the definition and can be either a <name> or a <string>.

EXAMPLE

gameDataCA = attributes "Game Data"

(

...

)

or

attributes gameData

(

...

)

The attribute header keyword parameters and main clauses are basically identical to the same keyword parameters and clauses in Scripted Plug-ins . The 'custom attributes' are effectively the parameters defined in any parameter clauses in the body of the attributes definition. The UI for them is defined by the rollout clauses, which will be automatically displayed in the Command Panel and Material Editor when an object containing custom attributes is selected.

The initialRollupState argument is an integer whose 32 bits are used to initialize the rollouts' rollup state in both the create and the modify panel. The semantics are different, however for these two cases. Whenever the rollouts are created in the create tab, their state will be that specified by this value. In the modify tab, the first time an object of this type is modified the state will be that of this value, but after that it will remain what it was last set to. The bits of this value indicate the corresponding rollout is rolled up (closed). The zero bit corresponds to the first rollout, the first bit is the second rollout, etc. The default value of 0x7fffffff is used so the command panel can detect this value is not being overridden, and just leave the rollouts as is. For example, a value of 0x07 would result in the first 3 rollouts being rolled up, and the remaining rollouts open. (2^2+2^1+2^0 = 4+2+1 = 7)

The following example defines three new attributes for weapon objects in a game level editor set up. The attributes, hitPoints, cost and sound, are defined as parameters and the UI for them in a rollout:

EXAMPLE

weaponDataCA = attributes weaponData

(

parameters main rollout:params

(

hitPoints type:#float ui:hits default:10

cost type:#float ui:cost default:100

sound type:#string

)

rollout params "Weapon Parameters"

(

spinner hits "Hit Points" type:#float

spinner cost "Cost" type:#float

dropdownlist sound_dd "Sound" items:#("boom", "sparkle", "zap", "fizzle")

on sound_dd selected i do sound = sound_dd.items[i]

)

)

NOTES:

The auto-UI connection between the parameters and rollout items via the ui and keyword is the same as the support in Scripted Plug-ins . You can treat attribute scripting as basically identical to scripting plug-ins, in terms of parameter, rollout setup and handler programming.

Since 3ds Max 5.1, scripted custom attributes can be applied to any MAXWrapper object - base objects, modifiers, materials, nodes, controllers, rootnodes, render effects, etc. The only place the UI for custom attributes is currently supported is the Material Editor and the Command Panel, so you will only be able to see any rollouts associated with the custom attribues on base objects, modifiers, and materials.

Remapping Parameters when Redefining Custom Attributes

The new optional remap: keyword allows parameter names in the definitions to be changed when updating existing definitions. It is also available in Scripted Plug-ins .

The keyword takes as an argument a 2 element array, where each element contains an array of string literal or name values. The size of the 2 arrays must be the same.

The names in the first array are the existing parameter names, the names in the second array are the new parameter names. As parameter names are read in while migrating existing plugin instances, the parameter names are searched for in the first array. If the name is found, the data associated with that parameter is moved to the parameter name in the corresponding location in the second array. If a parameter name is not found in the first array, the parameter name is not remapped. If the parameter name in the second array does not match a parameter name in the new definition, the parameter data is not moved to the new definition.

EXAMPLE

CAT_DEF = attributes Custom_Attributes

Redefine:CAT_CurrentDef

remap:#(#("Param1"),#("Param9"))

(

Parameters main rollout:params

(

'Param9' Type:#float UI:'Param9' Default:0.0

'Param2' Type:#float UI:'Param2' Default:0.0

)

Rollout Params "Custom Attributes"

(

spinner 'Param9' "Param9" Width:160 Height:16 Align:#Center Type:#float Range:[0,100,0]

spinner 'Param2' "Param2" Width:160 Height:16 Align:#Center Type:#float Range:[0,100,0]

)

)

CustAttributes.add CAT_TargetObject CAT_DEF #Unique BaseObject:false

This will move the data associated with parameter Param1 to parameter Param9 in existing instances.

Next Topic:

MSCustAttribDef Class

See also

Global and Private Custom Attributes Definitions

Custom Attribute Management Functions

Custom Attributes Definition Values

Access to Custom Attributes Virtual Array

Custom Attributes in Materials and Texture Maps


MSCustAttribDef Class

This class derives from the MSPluginClass which in turn derives from the MAXClass. Custom Attributes are instances of this class.

Properties

<MSCustAttribDef>.ispb2based

Read-only Boolean property. Always returns true since Custom Attributes use ParamBlock2 . This property is also available in MAXClass and MSPluginClass.

<MSCustAttribDef>.isMSPluginClass

Read-only property of custom attribute definition. Also available in MAXClass, and MSPluginClass. Since MSPluginClass derives from MAXClass, and MSCustAttribDef derives from MSPluginClass, the property always returns true for custom attribute definitions.

<MSCustAttribDef>.isMSCustAttribClass

A read-only property, always true for custom attribute definitions. Also available in MAXClass and MSPluginClass.

Next Topic:

Adding Custom Attributes

See also

Global and Private Custom Attributes Definitions

Custom Attribute Management Functions

Custom Attributes Definition Values

Access to Custom Attributes Virtual Array

Custom Attributes in Materials and Texture Maps


Adding Custom Attributes

custAttributes.add <object_or_collection> <attributes_definition>[#unique] [BaseObject:<bool>]

Adds a set of attributes to an object or a collection. You can only add one custom attribute set of a particular attributes definition to an object, but you can have as many different attribute sets from different definitions as needed.

#unique

When adding custom attributes to an object using the custAttributes.add() function, you can now supply an optional #unique keyword as the third argument. If you do this, each object being added to will have custom attributes added that have their own private copy of the definition and do *not* share the original definition. Any later redefinitions of the original attributes definition will not update these custom attributes. To update the individual object's attributes, you would get the unique definition from the object using custAttributes.getDef, and redefine it in one of the two ways described.

NOTE:

If you extract the uniquely-added definition, and use it directly in another non-unique custAttributes.add() on some other object, a definition sharing will be set up. Using #unique when adding a global definition will make the added custom attributes non-global, they will have their own private definition which starts out being identical to the original global definition.

BaseObject:<bool>

If the optional keyword argument baseObject is set to true (the default), in case the object specified is a node, the base object will be operated on. If false, the node itself will be operated on.

NOTE:

In versions prior to 3ds Max 5.1, the base object was always used.

EXAMPLE

custAttributes.add $weapon01 weaponData

Opening $weapon01 in the Modify panel will now display the "Weapon Parameters" rollout and allow them to be edited as can normal object parameters. You can use attribute definitions to add their defined sets of attributes to any object at any time. Any appropriate type of parameter can be animated, also, exactly as with scripted plug-ins.

The custAttributes.add() function can be applied to an object collection to add sets of attributes to a group of objects in one go.

EXAMPLE

custAttributes.add $weapon* weaponData

Adds a separate set of these custom attributes to all objects whose names begin "weapon" in the scene.

NOTE:

Further, an object can have any number of separate sets of custom attributes added from different attribute definitions.

As with Scripted plug-ins , an attributes definition can have any number of sets of parameter and rollout clauses, to allow you to organize added attributes into multiple rollouts as needed.

Scripted custom attributes added to an object or modifier can be accessed via MAXScript. They turn up directly as properties on the objects they are added to. If the names of any of the custom attributes are the same as existing properties on the host object, the custom attributes are effectively hidden when accessed directly. As an alternative, you can access each added block of custom attributes by their attributes definition name and then access individual attributes as properties within that block.

EXAMPLE

if the following attributes were added to $box01

the_weaponData = attributes weaponData

(

parameters main rollout:params

(

hitPoints type:#float ui:hits default:10

cost type:#float ui:cost default:100

sound type:#string

)

rollout params "Weapon Parameters"

( ... )

)

the custom attributes could be accessed as

$box01.hitPoints

$box01.cost

$box01.sound

or indirectly through the attributes block:

$box01.weaponData.hitPoints

$box01.weaponData.cost

$box01.weaponData.sound

Next Topic:

Global and Private Custom Attributes Definitions

See also

Scripted Custom Attributes

Custom Attribute Management Functions

Custom Attributes Definition Values

Access to Custom Attributes Virtual Array

Custom Attributes in Materials and Texture Maps


Global and Private Custom Attributes Definitions

Scripted custom attributes are properly saved to and loaded from scene files.

You can assign a fixed, global definition ID to an attributes definition.

This acts in a similar way to class IDs in scripted plug-ins. Such definitions are global across any number of scenes that custom attributes may be present in and all instances of custom attributes of a global definition will have the same shape. The ID is specified with a new header parameter, 'attribID:’

attributes <name>

attribID:#(<number>, <number>)

(

...

)

The ID number pair is chosen to be unique, perhaps generated with the genClassID () function in MAXScript. Attribute definitions without attribID's are private to the current MAX session.

genClassID [returnValue:<boolean>]

This method generates a random class ID similar to #(0x9b7ea231, 0xb6db86ef), and prints it to Listener. You can just cut and paste this class ID into your script to use the generated ID. If the optional returnValue keyword is supplied and set to true, the value will be returned as the result of the method call.

Definitions are identified depending on whether they are global or private definitions.

Global definitions have explicit attribID: parameters, which define a globally unique ID for that definition and ensure that any object with custom attributes based on a definition with that ID will be follow the same definition. Whenever you evaluate an attributes definition with a particular attribID: you will update all objects that have custom attributes based on that definition, and loading objects with attributes of that attribID will update themselves to the current definition.

Private definitions have no explicit attribID: parameter (they effectively have an internally-generated random one). Each time you evaluate one, except as described in the redefinition section below, a completely distinct definition is created with its own internal ID.

In the case of both global and private definitions, the 'attributes' definition construct returns the definition as its value, so you would typically assign that value to a local and then use it to add custom attributes to objects via the custAttributes.add() function.

EXAMPLE

local def

def = attributes "Game Data"

(

parameters ...

rollout ...

)

custAttributes.add $box01 def

custAttributes.add $box02 def

This example adds a separate set of the defined custom attributes to box01 and box02. The definition is shared between the two boxes.

This is a private definition, it has no attribID:, so if you evaluated the 'def = attributes (...)' again, it would *not* automatically update box01's and box02's attributes, as used to happen in prior builds, but create a new definition.

Redefining Custom Attributes

In order to redefine a specific attribute definition so that all objects that had attributes added using it will be updated, you can use one of two schemes that operate on the actual definition value (as it sits in the 'def' variable in the above, for example).

First, you can use the 'redefine:' attributes definition parameter:

EXAMPLE

attributes "Game Data"

redefine:def

(

parameters ...

rollout ...

)

This expects an existing attributes definition as the value given in the redefine: parameter and will update it to the definition that follows, and update any custom attributes made from that particular definition value. In the example, this would update $box01 and $box02.

Alternatively, you can use the custAttributes.redefine method:

custAttributes.redefine <def> <definition_string>

EXAMPLE

local new_def = "attributes \"Game Data\" ( ... )"

custAttributes.redefine def new_def

This is particularly useful in situations where you are generating the attributes definition automatically as a string. You can use this function to compile and apply the redefinition to a particular definition object in one go, without having to construct a name for the object, as you would if you used the redefine: parameter scheme.

To redefine the attributes on some object, say based on the defData in that object's custom attributes, you might use this sequence:

old_def = custAttributes.getDef $box03 1 -- get existing def

old_def_data = custAttributes.getDefData old_def -- get my defData from it

new_def_string = generate_new_def old_def_data ... -- make new def string

custAttributes.redefine old_def new_def_string -- redefine it

These redefinition techniques can be used with global definitions (with explicit attribID:), but are strictly unnecessary since the particular definition value is specified uniquely by the attribID: parameter. In any situation that you evaluate a global definition, all custom attributes in the current scene made from that definition will be updated.

Next Topic:

Custom Attribute Management Functions

See also

Scripted Custom Attributes

Adding Custom Attributes

Custom Attributes Definition Values

Access to Custom Attributes Virtual Array

Custom Attributes in Materials and Texture Maps


Custom Attribute Management Functions

Custom Attributes Management Functions

The following management functions are available through the custAttributes struct:

custAttributes.count <obj> [BaseObject:<bool>]

Returns a count of the number of separate scripted custom attribute sets have been added via the .add() function.

BaseObject:<bool>

If the optional keyword argument baseObject is set to true (the default), in case the object specified is a node, the base object will be operated on instead. If false, the node itself will be operated on.

custAttributes.get <obj> (<index> | <attrib_def>) [BaseObject:<bool>]

Returns the custom attribute set, specified as an index or by its defining attribute definition.

BaseObject:<bool>

If the optional keyword argument baseObject is set to true (the default), in case the object specified is a node, the base object will be operated on. If false, the node itself will be operated on. (In versions prior 3ds Max 5.1, the base object was always used.)

NOTE:

The custom attribute set values returned by the custAttributes are effectively holder values for the object's custom parameters in that attribute set. You can get at these parameter values as simple properties on the attribute set value.

EXAMPLE

gp = custAttributes.get $ gameParams

gp.hitPoints = 50

This is equivalent to accessing the custom attribute parameters directly on the object:

$.gameParams.hitPoints = 50

custAttributes.delete <obj_or_collection> (<index> | <attrib_def>) [baseObject:<bool>]

Deletes the specified custom attribute set from the object or from all the objects in the given collection. The set to be deleted is defined by index number or by its defining attributes definition.

BaseObject:<bool>

If the optional keyword argument baseObject is set to true (the default), in case the object specified is a node, the base object will be operated on. If false, the node itself will be operated on. (In versions prior 3ds Max 5.1, the base object was always used.)

custAttributes.makeUnique <obj> (<index> | <attrib_def>) [baseObject:<bool>]

If some objects with custom attribute sets share a specific attributes definition, you can make selected objects have unique copies of the definition.

BaseObject:<bool>

If the optional keyword argument baseObject is set to true (the default), in case the object specified is a node, the base object will be operated on. If false, the node itself will be operated on. ( In versions prior 3ds Max 5.1, the base object was always used.)

EXAMPLE

custAttributes.add $box* def1

You can make box01 unique with:

custAttributes.makeUnique $box01 def1

or all of them unique with:

custAttributes.makeUnique $box* def1

custAttributes.getDef (<obj> <index>) | <custAttrib> [baseObject:<bool>]

Returns the attribute definition for a given custom attribute set in an object or from a custom attribute set accessed with the .get() method.

BaseObject:<bool>

If the optional keyword argument baseObject is set to true (the default), in case the object specified is a node, the base object will be operated on. If false, the node itself will be operated on. ( In versions prior 3ds Max 5.1, the base object was always used. )

custAttributes.getDefs <obj> [baseObject:<bool>]

Returns an array of definitions in attribute set order.

BaseObject:<bool>

If the optional keyword argument baseObject is set to true (the default), in case the object specified is a node, the base object will be operated on. If false, the node itself will be operated on. (In versions prior 3ds Max 5.1, the base object was always used. )

Next Topic:

Custom Attributes Definition Values

See also

Scripted Custom Attributes

Adding Custom Attributes

Global and Private Custom Attributes Definitions

Access to Custom Attributes Virtual Array

Custom Attributes in Materials and Texture Maps


Custom Attributes Definition Values

Attribute definition values have several directly accessible properties:

<def>.name

Get and set descriptive name

<def>.source

Read-only, the source code for the definition

<def>.defData

Get and set the user-supplied def data value

<def>.attribID

Read-only, a two-element array containing the attribID for the def

custAttributes.getDefSource <attrib_def>

Returns the source code for the attributes definition as a string.

custAttributes.getOwner <attrib_def>

Returns the object the custom attribute is applied to.

custAttributes.getDefClass <attrib_def>

Returns the MAXClass associated with an attrib_def. Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

custAttributes.getDefInstances <attrib_def>

Returns an array of the MSCustAttrib instances of the attrib_def. Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

custAttributes.setDefData <def> <data>

Adds user-supplied data to an attributes definition.

The <data> value supplied here will be stored persistently with the definition and loaded on scene loads containing attribute sets of this definition.

custAttributes.getDefData <attrib_def>

Returns the saved user-supplied data.

custAttributes.getPBlockDefs <attrib_def>

These methods return an array containing a runtime readable encoding of all of the parameter block definitions in the custAttributes definition.

The array is presented in the following form:

#(<paramblock>, <paramblock2>, ...)

<paramblock>

An array of details for one parameter block in this form:

#(<name>, <id>, <refno>, <keyword_params>, <parameter1>, <parameter2>, <parameter3>, ....)

<id>

The parameter block’s internal ID number

<refno>

The reference number of the parameter block in the owning plug-in instance

<keyword_params>

An array of the keyword parameters given on the parameter block definition in the form:

#(<keyword>, <value>, <keyword2_name>, <value2>, ...)

<Parameter1 to ParameterN

Definition details for each parameter in the block in the following form:

#(<param_name> <keyword_params>)

<keyword_params>

An array containing all of the keyword parameters specified on that parameter's definition in the cust attrib definition, in the same form as the <keyword_params> above.

Here is a function that will extract ParameterBlock data from a custom attribute.

EXAMPLE

mapped fn custAttribute_showPBlockDefs obj =

(

format "%\n" obj.name

for objDef in (custAttributes.getDefs obj) do

(

format "\t%\n" objDef

format "\tname: %\n" objDef.name

format "\tattribute id: %\n" objDef.attribID

format "\tParameter Blocks:"

pbArray = custAttributes.getPBlockDefs objdef

for a = 1 to pbArray.count do

(

itms = pbArray[a]

format "\n\t\tname = %\n" itms[1]

format "\t\tid = %\n" itms[2]

format "\t\towners reference number = %\n" itms[3]

keywordParams = itms[4]

format "\t\tparameter block keywords:\n"

for x = 1 to keywordParams.Count/2 do

(

format "\t\t\t% = %\n" keywordParams[x] keywordParams[x+1]

x = x+1

)

format "\t\tparameters:"

for y = 5 to itms.Count do

(

format "\n\t\t\t#name = %\n" itms[y][1]

for z = 1 to itms[y][2].Count by 2 do

(

format "\t\t\t% = %\n" itms[y][2][z] itms[y][2][z+1]

)

)

)

)

)

custAttributes.getSceneDefs ()

Returns an array of all the attribute definitions in the current scene.

custAttributes.deleteDef <attrib_def>

Deletes the given attribute definiton from the current scene and the current running MAX session. There must be no objects in the scene containing custom attributes added using this definition.

NOTE:

The name can be obtained via the .name property.

Next Topic:

Access to Custom Attributes Virtual Array

See also

Scripted Custom Attributes

Adding Custom Attributes

Global and Private Custom Attributes Definitions

Custom Attribute Management Functions

Custom Attributes in Materials and Texture Maps


Access to Custom Attributes Virtual Array

Custom attributes in MAXScript can now be applied to any type of MAX object, including nodes and the scene rootnode. However, the rollouts associated with the custom attributes will only be displayed for materials, modifiers, and base objects.

A.custAttributes property has been added to MAXWrapper in 3ds Max 5.1. It contains a virtual array of the custom attributes assigned to the object. Standard array methods and operations can be performed on this virtual array, with the exception of join and sort.

The class of the virtal array is MSCustAttribArray.

Supported operations are:

findItem < MSCustAttribArray > < cust_attrib >

Find the given custom attribute in the supplied virtual array.

< MSCustAttribArray >[< integer > | < cust_attrib_name >]

Get a custom attribute by index or name.

< MSCustAttribArray >[< integer > | < cust_attrib_name >] = < cust_attrib >

Set a custom attribute by index or name.

NOTE:

NULL/undefined values cannot be stored in a MSCustAttribArray, so if you perform an indexed write where the index is greater than the number of existing custom attributes, the custom attribute will be appended to the MSCustAttribArray.

append < MSCustAttribArray > < cust_attrib >

Add a custom attribute to the end of the virtual array.

deleteItem < MSCustAttribArray > (< cust_attrib > | < cust_attrib_name >)

Delete a custom attribute from the virtual array by providing the custom attribute or its name.

You can also map across the MSCustAttribArray.

Next Topic:

Custom Attributes in Materials and Texture Maps

See also

Scripted Custom Attributes

Adding Custom Attributes

Global and Private Custom Attributes Definitions

Custom Attribute Management Functions

Custom Attributes Definition Values


Custom Attributes in Materials and Texture Maps

Scripted custom attributes can be added to any material or texture map. Rollouts defined in these attributes will appear at the end of the Mtl Editor dialog when the material or map containing the custom attributes is selected in the Mtl Editor.

NOTE:

Typing CAT_Debug = True in the MAXScript listener window will expose the code in the listener when you add a custom attribute through the User Interface.

See also

Scripted Custom Attributes

Adding Custom Attributes

Global and Private Custom Attributes Definitions

Custom Attribute Management Functions

Custom Attributes Definition Values

Access to Custom Attributes Virtual Array


Working with NURBS

This topic mirrors almost one-for-one on the NURBS API in the 3ds Max SDK, so an understanding of one will help with the other. The following topics provide you with information about the NURBS classes and how to work with them:

Working with the NURBS Classes

Overview of the Principal NURBS Classes

Using the NURBS Classes and Functions to Create and Modify 3ds Max NURBS Models

The NURBS Classes


Working with the NURBS Classes

Unlike other parts of MAXScript that let you script 3ds Max scene objects directly, the NURBS family of classes provides an indirect means of working with 3ds Max NURBS objects. They allow you to build an idealized structure representing 3ds Max NURBS objects and then use this structure to either create new or add to scene NURBS objects or to access certain parts of existing scene objects.

The structure is made up of instances of the MAXScript NURBS classes, listed in NURBS Classes . The main class for this is NURBSSet. It is the structure that corresponds to a scene NURBS object and contains a collection of NURBS items such as curves, surfaces, dependent surfaces, points, and so on, which are themselves instances of the other MAXScript NURBS classes. You construct a NURBSSet object describing a NURBS object and then have it be instantiated as a real scene object. Conversely, you can ask for a NURBSSet to be created that corresponds to a given scene NURBS object and use it to examine the component NURBS items and to modify certain properties directly on the scene object it describes.

Parameter Validity

The 3ds Max NURBS SDK methods and the corresponding MAXScript methods and properties perform very little parameter validation. As a result, passing invalid parameters to the functions or accessing invalid ranges will generate Assertion Failures easily. In most cases 3ds Max will not crash if Retry or Ignore is selected. An example of this is:

  1. Create a CV surface and select it.

  2. Enter in MAXScript:

s = getnurbsset $ #relational

obj = getobject s 1

tess = getviewtess obj #displacement

This is invalid because the viewport does not support displacement approximation, only the production renderer does. Therefore, this will generate an Assertion Failure.

NURBSId's and Indexes

An important concept to understand when working with NURBSSets and the other NURBS classes, is the way you identify component items in the set. Before a NURBSet is instantiated as a scene NURBS object, the individual curves and points and surfaces are identified by an index number. As you append objects to the set they are assigned successive indexes, starting at 1. When you want to refer to a particular item, for example to specify the parent surfaces in a blend surface, you use this index. Once an object has been added to a NURBSSet, its index can determined through the .index property. This is a read-only property.

However, once a NURBSet is associated with a scene object, either by being instantiated or because it was directly created from an existing scene object, this index is no longer valid. Instead, a different number, called a NURBSId, is assigned to each item and you must use that Id when referring to items from then on. The NURBSId of any item in an instantiated NURBSSet can be obtained through the .NURBSId property on that object.

These identifiers, indexes or NURBSId's, are used in many places to specify the parent objects for other dependent objects. Often, these are specified using the .parent or .parentID properties on a dependent object. You must be sure to use the correct property depending on whether the containing NURBSSet has been associated with a scene object or not: .parent for non-associated NURBSSets, .parentID for associated NURBSSets. Remember that indexes used in .parent settings are 1-based.


Overview of the Principal NURBS Classes

The diagram below shows the inheritance tree of the principal classes in the NURBS family. The base classes are shown at the top, and the inheritance hierarchy proceeds toward the bottom and to the right. NURBSObject is the main base class, with NURBSPoint , NURBSControlVertex , NURBSCurve , NURBSSurface , NURBSCVCurve , and NURBSPointCurve also functioning as base classes. Several additional classes are used with NURBS objects, but are not part of the NURBS hierarchy. These classes are the NURBSDisplay , NURBSSelection , NURBSSet , NURBSSurfaceApproximation , and NURBSTextureSurface classes.

NURBS Class Hierarchy

The NURBSObject class is the base NURBS class. It provides a set of properties that are common to the other classes such as getting and setting the name of the item. It also has a NURBSId property which is an ID used to specify a particular object in communication between the NURBS classes.

The NURBSSet class is the class used when developers want to create 3ds Max NURBS objects, or retrieve data from existing 3ds Max NURBS objects. The NURBSSet acts as a container for the other objects. This class contains a table of the various NURBSObject derived entities (points, curves, surfaces) used to make up the set. Additionally it has two 'fuse' tables: one for fuse curves and one for fuse surfaces. These are used to allow the CVs in the curves or surfaces to be 'stitched' or 'fused' together so that if one curve or surface moves the other moves with it. This class also has the surface-approximation properties that control the object's tessellation into triangle meshes for use in the viewports and the production renderer.

The NURBSPoint classes describe a point in 3D space. Depending on the specific class, points can be either independent or dependent. Independent points are those that don't rely on other objects to define their location. Dependent points are related to the objects they depend on such that the relationship established initially remains if the point, curve or surface moves. For example, a point can be created such that it always remains a certain distance from another point. The options are XYZ-relative, along a normal, or along a tangent (or set of tangents for a surface-dependent constrained point).

The NURBSControlVertex class defines a Control Vertex of a NURBS Curve or NURBS Surface. This class shares may of the same properties as a NURBSPoint and has the added property of a rational weight. The weight value of a CV is rational. That is, it is relative to other CVs in the curve or surface. Changing the weight of all CVs at once has no effect, because this doesn’t change the ratio between weights.

The NURBSCurve classes describe the properties of NURBS curves. As with the NURBSPoint classes, depending on the specific class, curves can be either independent or dependent. Independent curves are those that don't rely on other objects to define their location. A dependent curve is an object that depends on one or more other objects to define what it is. For example, a Blend Curve depends on the two parent curves that it blends between when it was created (as well as on its two tension parameters).

The NURBSSurface classes describe the properties of NURBS surfaces. As with the NURBSPoint and NURBSCurve classes, depending on the specific class, surfaces can be either independent or dependent. Independent surfaces are those that don't rely on other objects to define their location. Dependent surfaces are surface sub-objects whose geometry depends on other surfaces or curves in the NURBS model. When you change the geometry of the original parent surface or curve, the dependent surface changes as well.


Using the NURBS Classes and Functions to Create and Modify 3ds Max NURBS Models

For NURBS objects in the scene, 3ds Max uses a different internal representation of NURBS objects than the MAXScript and SDK classes do. These MAXScript and SDK classes are simply a means to access these internal 3ds Max NURBS objects and allow them to be manipulated.

The object used in communication between the internal 3ds Max NURBS objects and the classes in MAXScript available to work with these objects is the NURBSSet . There are also two functions used in this communication. The first is the constructor NURBSNode() and the second is a node method, getNURBSSet(). How these are used is described in the following topics:

Creating New NURBS Objects

Modifying Existing NURBS Objects

Parameter Ranges for Curves and Surfaces

Materials Assignment and Texture Coordinates

Creating NURBS Scene Objects

Creating NURBSCVSurface Values

NURBS Node Properties and Methods


Creating New NURBS Objects

The NURBS classes can be used to create new NURBS scene objects. This is done by adding the objects (points, curves and surfaces) to an item called a NURBSSet and passing it to the function NURBSNode(). The NURBSSet is a container for the objects that define each element in the scene NURBS object. The function NURBSNode() makes an internal 3ds Max NURBS object from the specifications in the set. The function NURBSNode() is documented in Creating NURBS Scene Objects .

As an example, consider the following code fragment that creates a NURBSCVCurve object (with NURBSControlVertex sub-objects) and puts it in the scene:

EXAMPLE

-- create an empty NURBSSet object

nset = NURBSSet ()

-- create a new NURBSCVCurve and set the knots and CVs

c = NURBSCVCurve name:"CV Curve" order:4 numCVs:4 numKnots:8

for k in 1 to 4 do ( setKnot c k 0; setKnot c (k+4) 1 )

cv = NURBSControlVertex [0, 0, 50]

setCV c 1 cv

cv.pos = [-100, 0, 50]

setCV c 2 cv

cv.pos = [-100, 100, 50]

setCV c 3 cv

cv.pos = [0, 100, 50]

setCV c 4 cv

-- add the NURBSCVCurve object to the set

appendObject nset c

-- create the NURBS object from the NURBSSet

n = NURBSNode nset name:"nurbs01" pos:[10,0,0]

Note that the NURBSSet supplied to the NURBSNode() function will be modified by that function to be a relational representative for the newly created scene node which you can then use to modify the scene object -- you don't have to re-extract a fresh relational NURBSSet.


Modifying Existing NURBS Objects

The classes can also be used to modify the properties of existing NURBS objects in the scene. To gain access to an internal 3ds Max NURBS object you must have the data copied into a NURBSSet. This is done using the node method getNURBSSet(). You can then use the methods of the NURBSSet to access the objects.

For example, the following sample code attempts to grab the first NURBS sub-object from the first node in the current selection set. It then checks if it's a blend surface and if so adjust one of the tension parameters.

EXAMPLE

-- get the first node in selection

node = selection[1];

-- make sure creation has been completed on the node

stopCreating node

-- get the nurbs set for it

getSet = getNURBSSet node #relational

-- extract the first obj, check class & set tension

obj = getObject getSet 1

if classOf obj == NURBSBlendSurface then obj.tension1 = 2.0

The kinds of modification you can perform in this way are limited to changing those parameters and properties that do not alter the structure of the NURBS scene object -- you can modify point and CV positions, CV weights, dependent object parameters such as offsets and extrude amounts, etc. You cannot add or delete objects, change the number of CVs or knots or parent curves, etc. To do this kind of structural modification, use the appendObject(), setObject(), and removeObject() functions defined in NURBSSet : Value and the addNURBSSet(), breakSurface(), and similar functions defined in NURBS Node Properties and Methods .

The stopCreating() method is used to ensure that the specified node is fully created. This method is primarily used to ensure that a NURBS scene objects is fully created, which it will not be until the creation is stopped. The NURBSSet returned for a NURBS scene object will not be complete if the object is still in creation mode. This method will also deactivated any activated object create buttons in the Create panel.

There are other global functions that may be used to modify NURBS scene objects. These functions are documented in NURBS Node Properties and Methods . For instance, developers can use the function breakSurface() to take an existing NURBS surface and break it into two separate surfaces.

Non-relational NURBSSets

You can also use the getNURBSSet() function in a non-relational mode, but not supplying the #relational argument, to retrieve a "flattened" version of the NURBSSet in which all dependent surfaces, such as blends and offsets and lofts are represented as independent curves and surfaces and there is no 'live' connection back to the scene object from which the NURBSSet was derived. You might use this to get a simplified version of the NURBS scene object for an export script, for example if the destination system does not support relational objects. You can also use a non-relational NURBSSet derived in this way as the basis for creating other scene objects, perhaps modifying or adding to the set and then re-instantiating it with the NURBSNode() function.


Parameter Ranges for Curves and Surfaces

Methods that deal with points in the parameter space of a curve work with arguments in U. Methods that deal with points in the parameter space of surfaces deal with arguments in U and V. For example, setting the property <NURBSSurfConstPoint>.uParam sets the position of a dependent point in the parent surface's U parameter space. The valid U and V values that may be passed to this method must be obtained by referencing the <NURBSSurface> properties .uParameterRangeMin, .uParameterRangeMax, .vParameterRangeMin, and .vParameterRangeMax on the parent surface. This retrieves the minimum and maximum values for U and V that may be used. For curves there are similar properties for getting the valid range for U.

Developers should be aware that a curve or surface needs to be instantiated in the 3ds Max data base before it is okay to call these methods (for example by calling NURBSNode()). Prior to the object existing in the data base these calls will fail.

Generally, when CV curves and surfaces are created, the valid parameter range is known because they were specified in the beginning and ending knot values. In cases where they are not known, one can instantiate a NURBSSet that has just the base curves or surfaces. Once instantiated, the parameter range properties can be interrogated. Then one can build the rest of the parametric model by making additions and/or modifications to the already instantiated object. The node method addNURBSSet() makes this easy to do.


Materials Assignment and Texture Coordinates

Materials and NURBS

Each NURBS surface has its own material ID. If you assign a Multi-SubObject material you can apply a different material to each surface in a NURBS object by setting the <NURBSSurface> property .MatID.

Texture Coordinates and NURBS

Texture coordinates are assigned to each of the four corners of a NURBS surface. On the standard 3ds Max primitives for example most are assigned to use (0,0) to (1,1) across the surface. Some primitives, such as the Prism, don't use (0,0) to (1,1) because of the way they wrap. Developers may of course assign any values using the API. The <NURBSSurface> method to do this is setTextureUVs().


Creating NURBS Scene Objects

The following functions create new nodes in the 3ds Max scene. The main function is NURBSNode() which takes an arbitrary NURBSSet and instantiates a NURBS object in the scene based on the definition in the NURBSSet. The other two functions are shorthand ways of creating lathe and extrude NURBS surfaces based on existing shapes in the scene.

NURBSNode <nurbsset> {node_creation_parameters}

Takes a NURBSSet object and creates a 3ds Max NURBS object in the scene corresponding to the definitions in that NURBSSet. After the function call, the supplied NURBSSet becomes an active representative for the new scene node, all the NURBSId properties are filled-in and you can modify the scene object by modifying the properties of the NURBSSet component objects.

Any of the standard <node> constructor keyword arguments can be added, such as .name, .prefix, .pos, .rotation, .wireColor, etc. See Node class for details.

NURBSLatheNode <curve> <axis> <sweep> [capStart:<boolean>] \

[capEnd:<boolean>] [capType:<integer>] \

[weldCore:<boolean>] [flipNormals:<boolean>] \

[mapCoords:<boolean>] [segs:<integer>] \

[matIDs:<boolean>] [shapeIDs:<boolean>] \

{node_creation_parameters}

This function generates a NURBS object based on the specified lathe (surface of revolution) definition and returns a pointer to it. This is used by the lathe modifier.

curve <node>

The shape object to revolve. Note that if the curve pointed to is a bezier spline then capping won't work properly.

axis <Matrix3>

This specifies the axis of revolution.

sweep <float>

The angle for the surface of revolution in degrees.

capStart: <boolean>

Specifies if the surface should be capped at the beginning: true to cap; false to leave open.

capEnd: <boolean>

Specifies if the surface should be capped at the ending: true to cap; false to leave open.

capType: <integer>

This parameter is not currently used and the value specified is ignored.

weldCore: <boolean>

true to collapse any coincident vertices at the center of the surface; otherwise false.

flipNormals: <boolean>

true to invert the orientation of surface normals; otherwise false.

mapCoords: <boolean>

true to generate mapping coordinates; otherwise false.

segs: <integer>

The number of segments in the surface of revolution.

matIDs: <boolean>

If true special material IDs are assigned to the surfaces and caps.

shapeIDs: <boolean>

If true shape IDs are used. When on, this function uses the material ID values assigned to segments in the spline to be lathed, or curve sub-objects in the NURBS curve to be lathed. This is available only when matIds is true.

NURBSExtrudeNode <shape> <amount> [capStart:<boolean>] \

[capEnd:<boolean>] [capType:<integer>] \

[mapCoords:<boolean>] [matIDs:<boolean>] \

[shapeIDs:<boolean>] {node_creation_parameters}

This function generates a NURBS object based on the specified extrusion definition and returns a pointer to it. This is used by the extrude modifier.

shape <node>

The shape node to extrude. Note that if the shape pointed to is a bezier spline then capping won't work properly.

amount <float>

Specifies the height of the extrusion.

capStart: <boolean>

Specifies if the surface should be capped at the beginning: true to cap; false to leave open.

capEnd: <boolean>

Specifies if the surface should be capped at the ending: true to cap; false to leave open.

capType: <integer>

This parameter is not currently used and the value specified is ignored.

matIDs: <boolean>

If true, special material IDs are assigned to the surfaces and caps.

shapeIDs: <boolean>

If true shape IDs are used. When on, this function uses the material ID values assigned to segments in the spline to be extruded, or curve sub-objects in the NURBS curve to be extruded. This is available only when matIds is true.


Creating NURBSCVSurface Values

The following functions provide shorthand ways to construct NURBSCVSurface values that you can then add to a NURBSSet for creation in the scene.

MakeNURBSLatheSurface <curve> <origin> <north> <start> <end>

This function generates a NURBS surface of revolution given an input curve, origin, up axis, and start and end angles. The output of this function is a NURBS Surface. Note that this is a CV surface that matches the definition, not a relational surface.

curve <NURBSCurve>

This is the NURBS curve that is revolved.

origin <point3>

Specifies the origin of the revolution.

north <point3>

This is the axis that specified the up direction.

start <float>

This is the start angle of the revolution in radians.

end <float>

This is the end angle of the revolution in radians.

MakeNURBSSphereSurface <radius> <center> <north_axis> <ref_axis> <startU> <endU> <startV> <endV> [open:<boolean>]

This function generates a NURBS sphere. The output of this function is a NURBS Surface. Note that this is a CV surface that matches the definition, not a relational surface.

radius <float>

The radius of the sphere.

center <Point3>

The center point of origin of the sphere.

north_axis <Point3>

This specifies the up axis. Use (Point3 0 0 1) for the Z axis for example.

ref_Axis <Point3>

This is the direction of the seam. The sphere primitive uses (Point3 0 -1 0) as this value. The northAxis and refAxis must be perpendicular to one another.

startU <float>

The start angle for the sphere in the U direction, specified in radians.

endU <float>

The end angle for the sphere in the U direction, specified in radians.

startV <float>

The start angle for the sphere in the V direction, specified in radians.

endV <float>

The end angle for the sphere in the V direction, specified in radians.

open: <boolean>

If true, the surface is closed; otherwise the surface is not closed. Defaults to false.

MakeNURBSCylinderSurface <radius> <height> <origin> <sym_axis> <ref_axis> <start> <end> [open:<boolean>]

This function generates a NURBS cylinder. The output of this function is a NURBS Surface. Note that this is a CV surface that matches the definition, not a relational surface.

radius <float>

The radius of the cylinder.

height <float>

The height of the cylinder.

origin <Point3>

The origin of the cylinder.

sym_Axis <Point3>

The axis of symmetry. The standard cylinder primitive specifies (Point3 0 0 1).

ref_Axis <Point3>

This is the direction of the seam. The standard cylinder primitive specifies (Point3 0 1 0). The symAxis and refAxis must be perpendicular to one another.

start <float>

The start angle in radians.

end <float>

The end angle in radians.

open: <boolean>

If true, the surface is closed; otherwise the surface is not closed. Defaults to false.

MakeNURBSConeSurface <radius1> <radius2> <height> <origin> <sym_axis> <ref_axis> <start> <end> [open:<boolean>]

This function generates a NURBS cone surface. The output of this function is a NURBS Surface. Note that this is a CV surface that matches the definition, not a relational surface.

radius1 <float>

One of the radii of the cone.

radius2 <float>

The other radius of the cone.

height <float>

The height of the cone.

origin <Point3>

The origin of the cone.

sym_Axis <Point3>

The axis of symmetry.

ref_Axis <Point3>

This is the direction of the seam. The symAxis and refAxis must be perpendicular to one another.

start <float>

The start angle in radians.

end <float>

The end angle in radians.

open: <boolean>

If true, the surface is closed; otherwise the surface is not closed. Defaults to false.

MakeNURBSTorusSurface <majorRad> <minorRad> <origin> <sym_axis> <ref_axis> <startU> <endU> <startV> <endV> [open:<boolean>]

This function generates a NURBS torus surface. The output of this function is a NURBS Surface. Note that this is a CV surface that matches the definition, not a relational surface.

NOTE:

This surface is not closed surface.

majorRad <float>

This is the radius of the entire 'donut' shape.

minorRad <float>

The is the radius of the 'tube'.

origin <Point3>

The origin of the cone.

sym_Axis <Point3>

The axis of symmetry.

ref_Axis <Point3>

This is the direction of the seam. The symAxis and refAxis must be perpendicular to one another.

startU <float>

The start angle of the torus in the U direction.

endU <float>

The end angle of the torus in the U direction.

startV <float>

The start angle of the torus in the V direction.

endV <float>

The end angle of the torus in the V direction.

open: <boolean>

If true, the surface is closed; otherwise the surface is not closed. Defaults to false.


NURBS Node Properties and Methods

Properties

There are several properties on <node> objects that give access to sub-object selections in NURBS objects:

<node>.selectedCurveCVs

<node>.selectedCurves

<node>.selectedImports

<node>.selectedPoints

<node>.selectedSurfaces

<node>.selectedSurfCVs

<node>.curveCVs

<node>.curves

<node>.imports

<node>.surfaces

<node>.surfCVs

<node>.points

These all return a NURBSSelection Value , and enable sub-object manipulation in a manner similar to that provided for Editable Meshes.

Methods

The following NURBS-related methods operate on scene nodes:

getNURBSSet <node> [#relational]

This function is used to retrieve a NURBSSet that corresponds to the specified NURBS scene node. This allows access the internal objects inside a 3ds Max editable NURBS object.

If the optional #relational parameter is not supplied, the returned NURBSSet will contain only independent curves and surfaces, all dependent objects will be decomposed into corresponding independent objects. So for example, if you pass an object that has a relational model (perhaps two CV surfaces and a dependent blend surface) it will decompose them into three CV surfaces. This will be the CV surfaces that represent the two surfaces and the blend, but you won't have the blend relational data. If the #relational argument is supplied, you get back two CV surfaces and a NURBS blend surface and the NURBSSet is an active representative for the scene object -- any changes you make to the properties of it's constituent NURBSObjects will be reflected directly in the source scene object.

addNURBSSet <node> <nurbsSet>

This function adds the supplied NURBSSet to the specified NURBS scene object, creating subobjects within the scene node corresponding to the definitions in the NURBSSet. After the function call, the supplied NURBSSet becomes an active representative for the new scene node subobjects, all the NURBSId properties are filled-in and you can modify the associated scene sub-object by modifying the properties of the NURBSSet component objects.

transform <node> <nurbsId_or_Id_array> <matrix3>

Transforms the specified sub-objects by the matrix supplied in the node's local space. The sub-objects to be transformed are identified by their NURBSId property which is set up when you instantiate a NURBSSet with the NURBSNode() function or if you extract a relational NURBSSet from an existing NURBS scene node using the getNURBSSet() function.

breakCurve <node> <nurbsId> <u_param>

Breaks the specified sub-object curve at the parametric point along the curve defined by the <u_param> float argument. The sub-object to be broken is identified by its NURBSId property which is set up when you instantiate a NURBSSet with the NURBSNode() function or if you extract a relational NURBSSet from an existing NURBS scene node using the getNURBSSet() function.

breakSurface <node> <nurbsId> (#U | #V) <u_or_v_param>

Breaks the specified sub-object surface at the parametric point defined by the <u_or_v_param> argument in the u or v direction depending on whether #U or #V is supplied for the third argument. The sub-object to be broken is identified by its NURBSId property which is set up when you instantiate a NURBSSet with the NURBSNode() function or if you extract a relational NURBSSet from an existing NURBS scene node using the getNURBSSet() function.

joinCurves <node> <nurbsId1> <nurbsId2> <tolerance_float> [flip1:<boolean>] [flip2:<boolean>]

Joins two curve sub-objects in the specified scene node and makes a single curve out of them. That is, the endpoints of the two curve objects are connected by new segments, and the two original curves are replaced by a single curve.

The supplied tolerance is a distance in 3ds Max units. If the gap between the curves you are joining is greater than this value, this function creates the join by first creating a blend curve and then joining the three parts. If the gap is less than this value, or if the curves are overlapping or coincident, no blend is created.

Creating a blend and then joining the three curves into a single curve is the better technique. The result matches the parent curves well. Without the blend step, the resulting curve can deviate from the parent curves, in order to maintain smoothness. (The amount of deviation depends on how far from tangent the two input curves were at the join.)

A problem arises when there is a gap but it is too small. In this case, this function generates the blend but because there isn’t enough room for it, the resulting curve has a loop in it. To avoid this loop, set this parameter higher than the gap distance.

If you the tolerance to 0.0, the function chooses a value to use for the tolerance.

The sub-objects to be joined are identified by their NURBSId property which is set up when you instantiate a NURBSSet with the NURBSNode() function or if you extract a relational NURBSSet from an existing NURBS scene node using the getNURBSSet() function.

joinSurfaces <node> <nurbsId1> <nurbsId2> <edge1_integer> <edge2_integer> <tolerance_float>

Joins two surface sub-objects in the specified scene node and makes a single surface from them. The specified edges of the two surface objects are connected by a new surface, and the two original surfaces are replaced by a single surface.

The edges are identified by edge index numbers.

The tolerance is a distance in 3ds Max units. If the gap between the surfaces you are joining is greater than this value, this function creates the join by first creating a blend surface. If the gap is less than this value, or if the surfaces are overlapping or coincident, 3ds Max doesn’t create the blend.

Creating a blend and then joining the three surfaces into a single surface is the better technique. The result matches the parent surfaces well. Without the blend step, the resulting surface can deviate from the parent surfaces, in order to maintain smoothness. (The amount of deviation depends on how far from tangent the two input surfaces were at the join.)

A problem arises when there is a gap but it is too small. In this case, this function generates the blend but because there isn’t enough room for it, the resulting surface has a loop in it. To avoid this loop, set the tolerance parameter higher than the gap distance.

If you set the tolerance to 0.0, the function chooses a value to use for the tolerance.

The sub-objects to be joined are identified by their NURBSId property which is set up when you instantiate a NURBSSet with the NURBSNode() function or if you extract a relational NURBSSet from an existing NURBS scene node using the getNURBSSet() function.

makeIndependent <node> <nurbsId>

This function takes a dependent sub-object (fillet, offset, blend, etc.) and turns it into a CV variant of itself such that it is independent (no longer dependent on a parent).

The sub-object to be made independent is identified by its NURBSId property which is set up when you instantiate a NURBSSet with the NURBSNode() function or if you extract a relational NURBSSet from an existing NURBS scene node using the getNURBSSet() function.

setViewApproximation <node> <surfaceApproximation>

setRenderApproximation <node> <surfaceApproximation>

setSurfaceDisplay <node> <nurbsdisplay>

These methods work NURBS curve and surface scene nodes. They take instances of the NURBSSurfaceApproximation and NURBSDisplay classes and set the display or curve/surface approximation settings of the given NURBS scene node to those specified in the approximation or display control instance.

Associated Methods

canConvertTo <node> <class>

Allows you to test whether a given node is convertible into a given class. Returns true or false. For example:

if canConvertTo $foo NURBSSurface then ...

The kinds of classes you can convert objects to are the generic editable forms including Mesh, SplineShape, NURBSCurve, NURBSSurface, etc.

convertTo <node> <class> -- mapped

This function is a general form of the existing specific conversion functions such as convertToMesh(), convertToSplineShape(), etc. For example, convertToSplineShape() can be written:

convertTo $circle01 SplineShape

If the conversion is not supported, the function returns the value undefined.

convertToNURBSSurface <node> -- mapped

convertToNURBSCurve <node> -- mapped

These functions work on those primitive geometry and shape classes that support conversion to NURBS (such as boxes, spheres, circles, lines, etc.). If an object does not support conversion, the function returns undefined.

isPointSelected <node> <point_index>

Returns true is the specified point is selected, false if not. The definition of a ‘point’ varies depending on the object type. For meshes, it is the mesh vertex. For a spline, it is the knot. For NURBS objects, it is the vertex or control point.

pointSelection <node> <point_index>

Returns a floating point weighted point selection if the object supports it. Most object types just return 1.0 if the point is selected and 0.0 if not. Only NURBS objects currently support weighted point selection.

stopCreating <node>

This method stops the creation of the current object, if any. This method is primarily used to ensure that a NURBS scene objects is fully created, which it will not be until the creation is stopped. The NURBSSet returned for a NURBS scene object will not be complete if the object is still in creation mode. This method will also deactivated any activated object create buttons in the Create panel.


The NURBS Classes

The following topics describe all of the NURBS classes:

NURBSObject

NURBSPoint : NURBSObject

NURBSCurveConstPoint : NURBSPoint

NURBSCurveIntersectPoint : NURBSPoint

NURBSCurveSurfaceIntersectPoint : NURBSPoint

NURBSIndependentPoint : NURBSPoint

NURBSPointConstPoint : NURBSPoint

NURBSSurfConstPoint : NURBSPoint

NURBSControlVertex : NURBSObject

NURBSCurve : NURBSObject

NURBSBlendCurve : NURBSCurve

NURBSChamferCurve : NURBSCurve

NURBSCVCurve : NURBSCurve

NURBSCurveOnSurface : NURBSCVCurve

NURBSFilletCurve : NURBSCurve

NURBSIsoCurve : NURBSCurve

NURBSMirrorCurve : NURBSCurve

NURBSOffsetCurve : NURBSCurve

NURBSPointCurve : NURBSCurve

NURBSPointCurveOnSurface : NURBSPointCurve

NURBSProjectNormalCurve : NURBSCurve

NURBSProjectVectorCurve : NURBSCurve

NURBSSurfaceEdgeCurve : NURBSCurve

NURBSSurfaceNormalCurve : NURBSCurve

NURBSSurfSurfIntersectionCurve : NURBSCurve

NURBSXFormCurve : NURBSCurve

NURBSSurface : NURBSObject

NURBS1RailSweepSurface : NURBSSurface

NURBS2RailSweepSurface : NURBSSurface

NURBSBlendSurface : NURBSSurface

NURBSCapSurface : NURBSSurface

NURBSCVSurface : NURBSSurface

NURBSExtrudeSurface : NURBSSurface

NURBSFilletSurface : NURBSSurface

NURBSLatheSurface : NURBSSurface

NURBSMirrorSurface : NURBSSurface

NURBSMultiCurveTrimSurface : NURBSSurface

NURBSNBlendSurface : NURBSSurface

NURBSOffsetSurface : NURBSSurface

NURBSPointSurface : NURBSSurface

NURBSRuledSurface : NURBSSurface

NURBSULoftSurface : NURBSSurface

NURBSUVLoftSurface : NURBSSurface

NURBSXFormSurface : NURBSSurface

NURBSTexturePoint : NURBSObject

NURBSDisplay : Value

NURBSSelection : Value

NURBSSet : Value

NURBSSurfaceApproximation : Value

NURBSTextureSurface : Value

See also

NURBSSurf : GeometryClass


NURBSCurveshape : Shape

NURBSCurveshape : shape {76a11646,12a822fb}

Class instances not creatable by MAXScript

Properties

.render_thickness(thickness) : float

.render_sides(sides) : integer

.render_angle(angle) : float

.render_renderable(renderable) : boolean

.render_mapcoords(mapcoords) : boolean

.render_viewport_thickness(viewport_thickness) : float

.render_viewport_sides(viewport_sides) : integer

.render_viewport_angle(viewport_angle) : float

.render_displayRenderMesh(displayRenderMesh) : boolean

.render_useViewportSettings(useViewportSettings) : boolean

.render_displayRenderSettings(displayRenderSettings) : boolean

See also

NURBSObject

Value Common Properties, Operators, and Methods


NURBSObject Values

This is the parent class for all the NURBS classes and so is not directly constructable.

Properties

Because this is a parent class, all the NURBS classes except NURBSSet have the following properties:

<nurbsobject>.name : string

The name of the NURBS object

<nurbsobject>.index : integer, read-only

Only valid after a NURBSSet is instantiated via NURBSNode() or if the NURBS object is part of a non-relational NURBSSet.

<nurbsobject>.nurbsID : integer, read-only

Only valid after a NURBSSet is instantiated via NURBSNode() or if the NURBS object is part of a relational NURBSSet extracted using getNURBSSet().

<nurbsobject>.selected : boolean

Indicates whether the sub-object in a relational NURBSSet is selected in the NURBS modifier panel in the 3ds Max user interface. You can force the selection and deselection of objects by setting this property to true or false.

See also

Value Common Properties, Operators, and Methods


NURBSPoint : NURBSObject

This is the parent class for all the NURBS point classes and so is not directly constructable. The class describes a point in 3D space.

Properties

All NURBS point classes have the following properties. These properties are both gettable and settable for independent points, and read-only for dependent points. They are always given in the parent NURBS node local coordinate system.

<nurbspoint>.pos : point3

<nurbspoint>.x : float

<nurbspoint>.y : float

<nurbspoint>.z : float

See also

NURBSPoint

NURBSObject

Value Common Properties, Operators, and Methods


NURBSCurveConstPoint : NURBSPoint

This class defines a dependent point that lies on a curve or relative to it. The point can either be on the curve or off the curve. If it is on the curve, the U Position is the only control of its location. The U Position specifies a location along the curve (based on the curve’s local U axis). There are four ways to specify the displacement of the point’s location relative to the U position:

  • OnObject - the point is actually on the surface of the object.

  • Offset - the point is moved according to a relative (object space) X,Y,Z location.

  • Normal - the point is moved along the direction of the curve’s normal. (Negative values move it opposite to the normal.)

  • Tangent - the point is moved along the tangent of the U Position. If the value is positive it's the tangent that heads in the direction of increasing U value; if negative it's the tangent that heads in the direction of decreasing U value.

Constructors

NURBSCurveConstPoint [<property>:<val>]...

Any of the object's properties may be set via optional keyword arguments on the constructor.

getObject <nurbsset> <index>

Properties

<nurbscurveconstpoint>.parent : integer

The parent curve by NURBSet index.

<nurbscurveconstpoint>.parentID : integer

The parent curve by NURBSId.

<nurbscurveconstpoint>.uParam : float

Parametric point along the parent curve.

<nurbscurveconstpoint>.type : #onObject, #offset, #normal, #tangent

Specifies the transform relationship between the point and the curve.

<nurbscurveconstpoint>.offset : point3

Offset vector if an offset type.

<nurbscurveconstpoint>.normal : float

Distance along the normal if a normal type.

<nurbscurveconstpoint>.uTangent : float

Distance along the curve tangent if a tangent type.

<nurbscurveconstpoint>.trimCurve : boolean

If true, trims parent curve at the point.

<nurbscurveconstpoint>.flipTrim : boolean

If true the curve is trimmed from the point towards low parameter space. If false the curve is trimmed from the point towards high parameter space.

See also

NURBSPoint

NURBSObject

Value Common Properties, Operators, and Methods


NURBSCurveIntersectPoint : NURBSPoint

This class defines a dependent point at the intersection of two curves.

Constructors

NURBSCurveIntersectPoint [<property>:<val>]...

Any of the object's properties may be set via optional keyword arguments on the constructor.

getObject <nurbsset> <index>

Properties

<nurbscurveintersectpoint>.parent1 : integer

The 1st parent curve by NURBSet index.

<nurbscurveintersectpoint>.parent1ID : integer

The 1st parent curve by NURBSId.

<nurbscurveintersectpoint>.parent2 : integer

The 2nd parent curve by NURBSet index.

<nurbscurveintersectpoint>.parent2ID : integer

The 2nd parent curve by NURBSId.

<nurbscurveintersectpoint>.trimCurve1 : boolean

If true, trim the 1st parent curve at the intersection.

<nurbscurveintersectpoint>.trimCurve2 : boolean

If true, trim the 2nd parent curve at the intersection.

<nurbscurveintersectpoint>.flipTrim1 : boolean

If true the 1st parent curve is trimmed from the point towards low parameter space. If false the curve is trimmed from the point towards high parameter space.

<nurbscurveintersectpoint>.flipTrim2 : boolean

If true the 2nd parent curve is trimmed from the point towards low parameter space. If false the curve is trimmed from the point towards high parameter space.

See also

NURBSPoint

NURBSObject

Value Common Properties, Operators, and Methods


NURBSCurveSurfaceIntersectPoint : NURBSPoint

This class defines a dependent point at the intersection of a curve and a surface.

Constructors

NURBSCurveSurfaceIntersectPoint [<property>:<val>]...

Any of the object's properties may be set via optional keyword arguments on the constructor.

getObject <nurbsset> <index>

Properties

<nurbscurvesurfaceintersectpoint>.parent1 : integer

The parent surface by NURBSet index.

<nurbscurvesurfaceintersectpoint>.parent1ID : integer

The parent surface by NURBSId.

<nurbscurvesurfaceintersectpoint>.parent2 : integer

The parent curve by NURBSet index.

<nurbscurvesurfaceintersectpoint>.parent2ID : integer

The parent curve by NURBSId.

<nurbscurvesurfaceintersectpoint>.trimCurve : boolean

If true, trims parent curve at the point.

<nurbscurvesurfaceintersectpoint>.flipTrim : boolean

If true the curve is trimmed from the point towards low parameter space. If false the curve is trimmed from the point towards high parameter space.

<nurbscurvesurfaceintersectpoint>.seed : float

The seed location is a U position along the length of the parent curve.

See also

NURBSPoint

NURBSObject

Value Common Properties, Operators, and Methods


NURBSIndependentPoint : NURBSPoint

This class defines an independent, free-standing point.

Constructors

NURBSIndependentPoint <point3>

getObject <nurbsset> <index>

getPoint <nurbspointsurface> <index>

getPoint <nurbspointcurve> <index>

getPoint <nurbspointcurveonsurface> <index>

operators

<nurbsindependentpoint> == <nurbsindependentpoint>

<nurbsindependentpoint> != <nurbsindependentpoint>

Properties

There are no additional properties for NURBSIndependentPoint.

See also

NURBSPoint

NURBSObject

Value Common Properties, Operators, and Methods


NURBSPointConstPoint : NURBSPoint

This class defines a dependent point that lies at a point or relative to it. It is a point constrained relative to another point. This can be a point used to define a point surface or point curve, it can be a trim point, or just a point in space. There are two ways to specify the displacement of the point’s location relative to the U position:

  • OnObject - the point is actually at the parent.

  • Offset - the point is moved according to a relative (object space) X,Y,Z location.

Constructors

NURBSPointConstPoint [<property>:<val>]...

Any of the object's properties may be set via optional keyword arguments on the constructor.

getObject <nurbsset> <index>

Properties

<nurbspointconstpoint>.parent : integer

The parent point by NURBSet index.

<nurbspointconstpoint>.parentID : integer

The parent point by NURBSId.

<nurbspointconstpoint>.type : #onObject, #offset

<nurbspointconstpoint>.offset : point3

Offset vector if an offset type.

See also

NURBSPoint

NURBSObject

Value Common Properties, Operators, and Methods


NURBSSurfConstPoint : NURBSPoint

This class defines a dependent point on a surface or related to it. There are four ways to specify the displacement of the point’s location relative to the UV position:

  • OnObject - the point is actually on the surface of the object.

  • Offset - the point is offset some distance (specified in object space) from the surface of the object.

  • Normal - the point is offset along the direction of the surface’s normal. (Negative values move it opposite to the normal.)

  • Tangent - the point is offset some U and/or V distance along the tangent from the surface. If the value is positive it's the tangent that heads in the direction of increasing parameter value; if negative it's the tangent that heads in the direction of decreasing parameter value.

Constructors

NURBSSurfConstPoint [<property>:<val>]...

Any of the object's properties may be set via optional keyword arguments on the constructor.

getObject <nurbsset> <index>

Properties

<nurbssurfconstpoint>.parent : integer

The parent surface by NURBSet index.

<nurbssurfconstpoint>.parentID : integer

The parent surface by NURBSId.

<nurbssurfconstpoint>.type : #onObject, #offset, #normal, #tangent

<nurbssurfconstpoint>.uParam : float

Parametric position along u direction.

<nurbssurfconstpoint>.vParam : float

Parametric position along v direction.

<nurbssurfconstpoint>.offset : point3

Offset vector if an offset type.

<nurbssurfconstpoint>.normal : float

Distance along the normal if a normal type.

<nurbssurfconstpoint>.uTangent : float

Distance along the u tangent if a tangent type.

<nurbssurfconstpoint>.vTangent : float

Distance along the v tangent if a tangent type.

See also

NURBSPoint

NURBSObject

Value Common Properties, Operators, and Methods


NURBSControlVertex : NURBSObject

This class defines an independent Control Vertex of a NURBS Curve or NURBS Surface. This class shares may of the same properties as a NURBSPoint and has the added property of a rational weight. The weight value of a CV is rational. That is, it is relative to other CVs in the curve or surface. Changing the weight of all CVs at once has no effect, because this doesn’t change the ratio between weights.

Constructors

NURBSControlVertex <point3> [<weight_float>]

getCV <nurbscvcurve> <index>

getCV <nurbscvsurface> <u_index> <v_index>

Operators

<nurbscontrolvertex> == <nurbscontrolvertex>

<nurbscontrolvertex> != <nurbscontrolvertex>

Properties

<nurbscontrolvertex>.weight : float

The weight of the control vertex. This is a value greater than zero. Larger values cause the CV to have a greater effect, thus the curve or surface will try to pass closer to the CV.

See also

NURBSObject

Value Common Properties, Operators, and Methods


NURBSCurve : NURBSObject

This is the parent class for all the NURBS curve classes and so is not directly constructable. The class describes the common properties of all NURBS curves. This includes its open/closed state, and number of trim points. The evalPos() and evalTangent() methods are used to compute points and tangents on the curve.

Properties

All NURBS curve classes have the following properties:

<nurbscurve>.isClosed : boolean, read-only

true if the curve is closed, false if open.

<nurbscurve>.numTrimPoints : integer, read-only

The number of trim points in the curve.

<nurbscurve>.parameterRangeMin : float, read-only

<nurbscurve>.parameterRangeMax : float, read-only

Contains the minimum and maximum valid values for <u_parm> in the methods associated with NURBS Curves.

<nurbscurve>.matID : integer

The material ID assigned to the curve.

Methods

All NURBS curve classes have the following methods:

evalPos <nurbscurve> <u_param>

Returns the position in space of the given parametric point along the curve.

evalTangent <nurbscurve> <u_param>

Returns the tangent vector at the given parametric point along the curve.

See also

NURBSObject

Value Common Properties, Operators, and Methods


NURBSBlendCurve : NURBSCurve

This class defines a dependent Blend curve. A Blend curve connects the end of one curve to the end of another, blending the curvature of the parents to create a smooth curve between them.

Constructors

NURBSBlendCurve [<property>:<val>]...

Any of the object's properties may be set via optional keyword arguments on the constructor.

getObject <nurbsset> <index>

Properties

<nurbsblendcurve>.parent1 : integer

The 1st parent curve by NURBSet index.

<nurbsblendcurve>.parent1ID : integer

The 1st parent curve by NURBSId.

<nurbsblendcurve>.parent2 : integer

The 2nd parent curve by NURBSet index.

<nurbsblendcurve>.parent2ID : integer

The 2nd parent curve by NURBSId.

<nurbsblendcurve>.flip1 : boolean

true to use the end of 1st parent curve; false to use the beginning, defaults to false.

<nurbsblendcurve>.flip2 : boolean

true to use the end of 2nd parent curve; false to use the beginning, defaults to false.

<nurbsblendcurve>.tension1 : float

The tension value for the 1st parent curve.

<nurbsblendcurve>.tension2 : float

The tension value for the 2nd parent curve.

See also

NURBSCurve

NURBSObject

Value Common Properties, Operators, and Methods


NURBSChamferCurve : NURBSCurve

This class defines a dependent Chamfer curve. A Chamfer is a curve that creates a straight line corner between two parent curves.

Constructors

NURBSChamferCurve [<property>:<val>]...

Any of the object's properties may be set via optional keyword arguments on the constructor.

getObject <nurbsset> <index>

Properties

<nurbschamfercurve>.parent1 : integer

The 1st parent curve by NURBSet index.

<nurbschamfercurve>.parent1ID : integer

The 1st parent curve by NURBSId.

<nurbschamfercurve>.parent2 : integer

The 2nd parent curve by NURBSet index.

<nurbschamfercurve>.parent2ID : integer

The 2nd parent curve by NURBSId.

<nurbschamfercurve>.length1 : float

The length for 1st parent curve back from the end that defines the beginning of the chamfer.

<nurbschamfercurve>.length2 : float

The length for 2nd parent curve back from the end that defines the beginning of the chamfer.

<nurbschamfercurve>.flip1 : boolean

true to use the end of 1st parent curve; false to use the beginning, defaults to false.

<nurbschamfercurve>.flip2 : boolean

true to use the end of 2nd parent curve; false to use the beginning, defaults to false.

<nurbschamfercurve>.trim1 : boolean

Sets whether 1st parent curve is trimmed. true if the curve is trimmed; otherwise false.

<nurbschamfercurve>.trim2 : boolean

Sets whether 2nd parent curve is trimmed. true if the curve is trimmed; otherwise false.

<nurbschamfercurve>.flipTrim1 : boolean

If true the 1st parent curve is trimmed from the point towards low parameter space. If false the curve is trimmed from the point towards high parameter space.

<nurbschamfercurve>.flipTrim2 : boolean

If true the 2nd parent curve is trimmed from the point towards low parameter space. If false the curve is trimmed from the point towards high parameter space.

See also

NURBSCurve

NURBSObject

Value Common Properties, Operators, and Methods


NURBSCVCurve : NURBSCurve

This class defines an independent NURBS CV Curve. The position and weight of the control vertices (CVs) controls the shape of the curve. Unlike spline vertices, CVs don’t necessarily lie on the curve they define. The CVs define a control lattice which surrounds the curve.

Constructors

NURBSCVCurve [<property>:<val>] [closed:<boolean>]...

Any of the object's properties may be set via optional keyword arguments on the constructor. If closed:true is specified, the curve is created as a closed curve, otherwise it is an open curve.

getObject <nurbsset> <index>

Properties

<nurbscvcurve>.order : integer

The order of the curve. This is one more than the degree of polynomial of any segment of the curve. All curves have a degree. The degree of a curve is the highest exponent in the equation used to represent it. A linear equation is degree 1, a quadratic equation degree 2. NURBS curves typically are represented by cubic equations and have a degree of 3.

<nurbscvcurve>.numKnots : integer

The number of knots in the curve. If this value is changed, the previous knot data is NOT maintained. Because they are generated mathematically, NURBS curves have a parameter space in addition to the 3D geometric space in which they are displayed. Specifically, an array of values called knots specifies the extent of influence of each control vertex (CV) on the curve or surface.

<nurbscvcurve>.numCVs : integer

The number of control vertices in the curve. If this value is changed, the previous control vertex data is NOT maintained.

<nurbscvcurve>.transform : matrix3

The transformation matrix for the NURBSCVCurve. This controls the relative position of the item within a NURBSSet.

<nurbscvcurve>.endsOverlap : boolean, read-only

true if the ends of the curve overlap even though the curve may not be closed (that is, the tangents match at the ends), false otherwise.

<nurbscvcurve>.autoParam : #notAutomatic, #autoCentripetal, #autoUniform

#notAutomatic, #autoCentripetal, and #autoUniform correspond to the Automatic Reparam options in the CV Curve rollouts: none, chord length and uniform, respectively. Defaults to #notAutomatic.

Methods

close <nurbscvcurve>

Forces the curve to be closed.

getKnot <nurbscvcurve> <index>

setKnot <nurbscvcurve> <index> <float>

Get and set the indexed knot’s value, indexes are 1-based. Knots are a mathematical construct that helps define the span of control of CVs and blending functions that define NURBS Curves and Surfaces. The knots are an array of values that determines the parameterization of a curve. Values in the knot vector are nondecreasing. The knots specify the region of influence of the CVs on the curve. It is a way of partitioning the parameter space up into different segments. A B-spline curve or a NURBS curve is a curve that is defined by a series of segments. On each one of the segments the curve is like a polynomial, or in the case of a rational one, it's like the ratio of polynomials. The knot vector describes how to partition the parameter space of the curve up for each of the different pieces of the polynomial.

getCV <nurbscvcurve> <cv_index>

Get the indexed CV as a NURBSControlVertex, indexes are 1-based.

setCV <nurbscvcurve> <cv_index> <NURBSControlVertex>

Sets the indexed CV to the given NURBSControlVertex, indexes are 1-based.

refine <nurbscvcurve> <u_param>

Add a new, interpolated CV at the given parametric point along the curve.

reparameterize <nurbscvcurve> (#centripetal | #uniform)

Reparameterizes the curve by chord length (#centripetal) or uniform (#uniform) uniform parameterization.

NOTE:

CV curves and surfaces must obey the relationship that "order + number of CVs = number of knots". If this is not the case in most cases no object will be created and in some cases an assertion fault might be generated.

See also

NURBSCurve

NURBSObject

Value Common Properties, Operators, and Methods


NURBSCurveOnSurface : NURBSCVCurve

This class defines a dependent Curve-on-Surface CV curve. These curves can be used for trimming the surface they lie on.

Constructors

NURBSCurveOnSurface [<property>:<val>] [closed:<boolean>]...

Any of the object's properties may be set via optional keyword arguments on the constructor. If closed:true is specified, the curve is created as a closed curve, otherwise it is an open curve.

getObject <nurbsset> <index>

Properties

<nurbscurveonsurface>.parent : integer

The parent surface by NURBSet index.

<nurbscurveonsurface>.parentID : integer

The parent surface by NURBSId.

<nurbscurveonsurface>.trim : boolean

If true, trims parent surface at the curve.

<nurbscurveonsurface>.flipTrim : boolean

The state of the trim flip toggle. This controls which portion of the surface is trimmed.

NOTES:

The values for CVs for a NURBSCurveOnSurface are values in the parameter space of the surface, not in 3D space. CV surfaces are normally parameterized from 0 to 1, so all the CV values should have values from 0 to 1.

Point surfaces are chord-length parameterized, which means that the CV parameter range is about the same as the size of the surface. In most cases, NURBSCurveOnSurfaces work better when point surfaces are used.

You may have problems generating NURBSCurveOnSurfaces on CV surfaces. NURBSPointCurveOnSurfaces on CV surfaces are typically easier to work with.

See Also

NURBSCVCurve

NURBSCurve

NURBSObject

Value Common Properties, Operators, and Methods


NURBSFilletCurve : NURBSCurve

This class defines a dependent Fillet curve. A Fillet is a curve that creates a circular arc corner between two parent curves.

Constructors

NURBSFilletCurve [<property>:<val>]...

Any of the object's properties may be set via optional keyword arguments on the constructor.

getObject <nurbsset> <index>

Properties

<nurbsfilletcurve>.parent1 : integer

The 1st parent curve by NURBSet index.

<nurbsfilletcurve>.parent1ID : integer

The 1st parent curve by NURBSId.

<nurbsfilletcurve>.parent2 : integer

The 2nd parent curve by NURBSet index.

<nurbsfilletcurve>.parent2ID : integer

The 2nd parent curve by NURBSId.

<nurbsfilletcurve>.radius : float

The radius of the fillet.

<nurbsfilletcurve>.flip1 : boolean

true to use the end of 1st parent curve; false to use the beginning, defaults to false.

<nurbsfilletcurve>.flip2 : boolean

true to use the end of 2nd parent curve; false to use the beginning, defaults to false.

<nurbsfilletcurve>.trim1 : boolean

Sets whether 1st parent curve is trimmed. true if the curve is trimmed; otherwise false.

<nurbsfilletcurve>.trim2 : boolean

Sets whether 2nd parent curve is trimmed. true if the curve is trimmed; otherwise false.

<nurbsfilletcurve>.flipTrim1 : boolean

If true the 1st parent curve is trimmed from the point towards low parameter space. If false the curve is trimmed from the point towards high parameter space.

<nurbsfilletcurve>.flipTrim2 : boolean

If true the 2nd parent curve is trimmed from the point towards low parameter space. If false the curve is trimmed from the point towards high parameter space.

See also

NURBSCurve

NURBSObject

Value Common Properties, Operators, and Methods


NURBSIsoCurve : NURBSCurve

This class defines a dependent Iso (isoparametric) curve. U and V Iso curves are dependent curves created along lines of constant parameter value of a NURBS surface.

Constructors

NURBSIsoCurve [<property>:<val>]...

Any of the object's properties may be set via optional keyword arguments on the constructor.

getObject <nurbsset> <index>

Properties

<nurbsisocurve>.parent : integer

The parent surface by NURBSet index.

<nurbsisocurve>.parentID : integer

The parent surface by NURBSId.

<nurbsisocurve>.dir : #U, #V

The direction of the iso curve, either #U or #V.

<nurbsisocurve>.parameter : float

The parametric position in the range of 0.0 to 1.0 in the given direction on the surface at which the iso line will sit.

<nurbsisocurve>.trim : boolean

If true, trims parent surface at the curve.

<nurbsisocurve>.flipTrim : boolean

The state of the trim flip toggle. This controls which portion of the surface is trimmed.

<nurbsisocurve>.seed : point2

The seed location is a UV position on the parent surface.

See also

NURBSCurve

NURBSObject

Value Common Properties, Operators, and Methods


NURBSMirrorCurve : NURBSCurve

This class defines a dependent Mirror curve. A Mirror curve is similar to a mirror object that you create using the Mirror tool (on the 3ds Max toolbar) or the Mirror modifier. It is the original curve reflected about one or two axes.

Constructors

NURBSMirrorCurve [<property>:<val>]...

Any of the object's properties may be set via optional keyword arguments on the constructor.

getObject <nurbsset> <index>

Properties

<nurbsmirrorcurve>.parent : integer

The parent curve by NURBSet index.

<nurbsmirrorcurve>.parentID : integer

The parent curve by NURBSId.

<nurbsmirrorcurve>.axis : #X, #Y, #Z, #XY, #XZ, #YZ

The axis or axes of reflection for the curve.

<nurbsmirrorcurve>.distance : float

The mirror offset distance.

<nurbsmirrorcurve>.transform : matrix3

This is an additional transformation applied to the axis specification. This corresponds to the gizmo the user may use interactively to alter the location of the mirror axis. This is exactly equivalent to setting the transform on the gizmo of a mirror modifier.

See also

NURBSCurve

NURBSObject

Value Common Properties, Operators, and Methods


NURBSOffsetCurve : NURBSCurve

This class defines a dependent Offset curve. An Offset curve is offset from the original, parent curve. It lies in the same plane as its parent, and is normal to the original.

Constructors

NURBSOffsetCurve [<property>:<val>]...

Any of the object's properties may be set via optional keyword arguments on the constructor.

getObject <nurbsset> <index>

Properties

<nurbsoffsetcurve>.parent : integer

The parent curve by NURBSet index.

<nurbsoffsetcurve>.parentID : integer

The parent curve by NURBSId.

<nurbsoffsetcurve>.distance : float

The distance of the offset curve from the parent.

See also

NURBSCurve

NURBSObject

Value Common Properties, Operators, and Methods


NURBSPointCurve : NURBSCurve

This class defines an independent curve that uses points to describe its shape. All the points lie on the curve itself.

Constructors

NURBSPointCurve [<property>:<val>]...

Any of the object's properties may be set via optional keyword arguments on the constructor.

getObject <nurbsset> <index>

Properties

<nurbspointcurve>.numPoints : integer

The number of points in the point curve. If this value is changed, the previous point data is not maintained.

<nurbspointcurve>.closed : boolean

true if the curve is closed, false if open.

<nurbspointcurve>.transform : matrix3

The transformation matrix for the NURBSPointCurve. This controls the relative position of the item within a NURBSSet.

Methods

close <nurbspointcurve>

Closes the curve.

getPoint <nurbspointcurve> <index>

Get the indexed curve point as a NURBSIndependentPoint

setPoint <nurbspointcurve> <index> <nurbs_independent_pt>

Set the indexed point to the given NURBSIndependentPoint

refine <nurbspointcurve> <u_param>

Adds a new, interpolated point at the given parametric position along the curve.

See also

NURBSCurve

NURBSObject

Value Common Properties, Operators, and Methods


NURBSPointCurveOnSurface : NURBSPointCurve

This class defines a dependent Curve-on-Surface Point curve. These curves can be used for trimming the surface they lie on.

Constructors

NURBSPointCurveOnSurface [<property>:<val>]...

Any of the object's properties may be set via optional keyword arguments on the constructor.

getObject <nurbsset> <index>

Properties

<nurbspointcurveonsurface>.parent : integer

The parent surface by NURBSet index.

<nurbspointcurveonsurface>.parentID : integer

The parent surface by NURBSId.

<nurbspointcurveonsurface>.trim : boolean

If true, trims parent surface at the curve.

<nurbspointcurveonsurface>.flipTrim : boolean

The state of the trim flip toggle. This controls which portion of the surface is trimmed.

See also

NURBSPointCurve

NURBSCurve

NURBSObject

Value Common Properties, Operators, and Methods


NURBSProjectNormalCurve : NURBSCurve

This class defines a dependent Normal Projected curve. A Normal Projected curve lies on a surface. It is based on an existing curve, which is projected onto the surface in the direction of the surface's normals.

Constructors

NURBSProjectNormalCurve [<property>:<val>]...

Any of the object's properties may be set via optional keyword arguments on the constructor.

getObject <nurbsset> <index>

Properties

<nurbsprojectnormalcurve>.parent1 : integer

The parent surface by NURBSet index.

<nurbsprojectnormalcurve>.parent1ID : integer

The parent surface by NURBSId.

<nurbsprojectnormalcurve>.parent2 : integer

The parent curve by NURBSet index.

<nurbsprojectnormalcurve>.parent2ID : integer

The parent curve by NURBSId.

<nurbsprojectnormalcurve>.trim : boolean

If true, trims parent surface at the curve.

<nurbsprojectnormalcurve>.flipTrim : boolean

The state of the trim flip toggle. This controls which portion of the surface is trimmed.

<nurbsprojectnormalcurve>.seed : point2

The seed location is a UV position on the parent surface.

See also

NURBSPointCurve

NURBSCurve

NURBSObject

Value Common Properties, Operators, and Methods


NURBSProjectVectorCurve : NURBSCurve

This class defines a dependent Vector Projected curve. A Vector Projected curve lies on a surface. This is almost the same as a Normal Projected curve, except that the projection from the existing curve to the surface is in the direction of a vector that you can control.

Constructors

NURBSProjectVectorCurve [<property>:<val>]...

Any of the object's properties may be set via optional keyword arguments on the constructor.

getObject <nurbsset> <index>

Properties

<nurbsprojectvectorcurve>.parent1 : integer

The parent surface by NURBSet index.

<nurbsprojectvectorcurve>.parent1ID : integer

The parent surface by NURBSId.

<nurbsprojectvectorcurve>.parent2 : integer

The parent curve by NURBSet index.

<nurbsprojectvectorcurve>.parent2ID : integer

The parent curve by NURBSId.

<nurbsprojectvectorcurve>.trim : boolean

If true, trims parent surface at the curve.

<nurbsprojectvectorcurve>.flipTrim : boolean

The state of the trim flip toggle. This controls which portion of the surface is trimmed.

<nurbsprojectvectorcurve>.seed : point2

The seed location is a UV position on the parent surface.

<nurbsprojectvectorcurve>.pVec : point3

The projection vector.

See also

NURBSPointCurve

NURBSCurve

NURBSObject

Value Common Properties, Operators, and Methods


NURBSSurfaceEdgeCurve : NURBSCurve

This class defines a dependent Surface Edge curve.

Constructors

NURBSSurfaceEdgeCurve [<property>:<val>]...

Any of the object's properties may be set via optional keyword arguments on the constructor.

getObject <nurbsset> <index>

Properties

<nurbssurfaceedgecurve>.parent : integer

The parent surface by NURBSet index.

<nurbssurfaceedgecurve>.parentID : integer

The parent surface by NURBSId.

<nurbssurfaceedgecurve>.seed : Point2

The seed location is a UV position on the parent surface.

See also

NURBSPointCurve

NURBSCurve

NURBSObject

Value Common Properties, Operators, and Methods


NURBSSurfaceNormalCurve : NURBSCurve

This class defines a dependent Surface Normal curve. This is a curve created at a specified distance from a surface and normal to it.

Constructors

NURBSSurfaceNormalCurve [<property>:<val>]...

Any of the object's properties may be set via optional keyword arguments on the constructor.

getObject <nurbsset> <index>

Properties

<nurbssurfacenormalcurve>.parent : integer

The parent curve by NURBSet index.

<nurbssurfacenormalcurve>.parentID : integer

The parent curve by NURBSId.

<nurbssurfacenormalcurve>.distance : float

The distance along the normal from the surface to the curve.

NOTE:

The parent curve must have one of the following types: surface-surface intersection, U iso, V iso, normal projected, vector projected, CV curve on surface, or point curve on surface.

See also

NURBSPointCurve

NURBSCurve

NURBSObject

Value Common Properties, Operators, and Methods


NURBSSurfSurfIntersectionCurve : NURBSCurve

This class defines a dependent Surface-Surface Intersection curve.

Constructors

NURBSSurfSurfIntersectionCurve [<property>:<val>]...

Any of the object's properties may be set via optional keyword arguments on the constructor.

getObject <nurbsset> <index>

Properties

<nurbssurfsurfintersectioncurve>.parent1 : integer

The 1st parent surface by NURBSet index.

<nurbssurfsurfintersectioncurve>.parent1ID : integer

The 1st parent surface by NURBSId.

<nurbssurfsurfintersectioncurve>.parent2 : integer

The 2nd parent surface by NURBSet index.

<nurbssurfsurfintersectioncurve>.parent2ID : integer

The 2nd parent surface by NURBSId.

<nurbssurfsurfintersectioncurve>.trimCurve1 : boolean

If true, trim the 1st parent surface at the intersection.

<nurbssurfsurfintersectioncurve>.trimCurve2 : boolean

If true, trim the 2nd parent surface at the intersection.

<nurbssurfsurfintersectioncurve>.flipTrim1 : boolean

If true the 1st parent surface is trimmed from the point towards low parameter space. If false the surface is trimmed from the point towards high parameter space.

<nurbssurfsurfintersectioncurve>.flipTrim2 : boolean

If true the 2nd parent surface is trimmed from the point towards low parameter space. If false the surface is trimmed from the point towards high parameter space.

<nurbssurfsurfintersectioncurve>.seed : point2

The seed location is a UV position on the parent surface.

See also

NURBSPointCurve

NURBSCurve

NURBSObject

Value Common Properties, Operators, and Methods


NURBSXFormCurve : NURBSCurve

This class defines a dependent Transform (XForm) curve. A Transform curve is a copy of the original curve with a different position, rotation, or scale.

Constructors

NURBSXFormCurve [<property>:<val>]...

Any of the object's properties may be set via optional keyword arguments on the constructor.

getObject <nurbsset> <index>

Properties

<nurbsxformcurve>.parent : integer

The parent curve by NURBSet index.

<nurbsxformcurve>.parentID : integer

The parent curve by NURBSId.

<nurbsxformcurve>.transform : matrix3

The offset transformation matrix for the NURBSCVCurve. This controls the relative position of the item to the parent curve.

See also

NURBSPointCurve

NURBSCurve

NURBSObject

Value Common Properties, Operators, and Methods


NURBSSurface : NURBSObject

This is the parent class for all the NURBS surface classes and so is not directly constructable. The class describes the common properties of all NURBS surfaces. This includes its material ID, texture/tiling options, renderable state, and open/closed state, and normal inverted state. The evalPos(), evalUTangent(), and evalVTangent() methods are used to compute points and tangents on the surface.

Properties

All NURBS surface classes have the following properties.

<nurbssurface>.renderable : boolean

Specifies whether the surface is renderable. true if the surface is renderable, false if not.

<nurbssurface>.flipNormals : boolean

Specifies whether all the surface’s surface normals are flipped. true if the surface normals are to be flipped, false if not.

<nurbssurface>.generateUVs1 : boolean

If true, enables the generation of UV mapping coordinates for UVW channel 1. See the getGenerateUVs() and setGenerateUVs() methods for generalized mapping channel access.

<nurbssurface>.generateUVs2 : boolean

If true, enables the generation of UV mapping coordinates for UVW channel 2. See the getGenerateUVs() and setGenerateUVs() methods for generalized mapping channel access.

<nurbssurface>.matID : integer

The material ID of the surface.

<nurbssurface>.closedInU : boolean, read-only

true if the surface is closed in the U direction, false if open.

<nurbssurface>.closedInV : boolean, read-only

true if the surface is closed in the V direction, false if open.*

<nurbssurface>.uParameterRangeMin : float, read-only

<nurbssurface>.uParameterRangeMax : float, read-only

Contains the minimum and maximum valid values for <u_parm> in the methods associated with NURBS Surfaces.

<nurbssurface>.vParameterRangeMin : float, read-only

<nurbssurface>.vParameterRangeMax : float, read-only

Contains the minimum and maximum valid values for <v_param> in the methods associated with NURBS Surfaces.

<nurbssurface>.textureSurface1 : NURBSTextureSurface

<nurbssurface>.textureSurface2 : NURBSTextureSurface

Used to get and set the texture surfaces for the two mapping channels. These properties take and return instances of the NURBSTextureSurface class. .textureSurface1 accesses mapping channel 1 and .textureSurface2 accesses mapping channel 2. See NURBSTextureSurface : Value . See the getTextureSurface() and setTextureSurface() methods for generalized mapping channel access.

It is not possible to assign texture surfaces to NURBS objects present in the scene. You can create new NURBSSets and the texture surface is used when you call createNURBSObject(). However, if you do a getNURBSSet() and assign a NURBSTextureSurface to these properties, nothing happens.

Methods

All NURBS surface classes have the following methods:

evalPos <nurbssurface> <u_param> <v_param>

Returns the coordinates in space of the point at the given U and V parametric position on the surface.

evalUTangent <nurbssurface> <u_param> <v_param>

Returns the U tangent vector of the surface at the given U and V parametric position on the surface.

evalVTangent <nurbssurface> <u_param> <v_param>

Returns the V tangent vector of the surface at the given U and V parametric position on the surface.

getTiling <nurbssurface> [channel:<index>]

setTiling <nurbssurface> <ut> <vt> [channel:<index>]

These methods get and set the tiling factor on the surface in the u and v directions. These methods return or take a point2 value, with u tiling in the x component and v tiling in the y component of the point2. The optional channel keyword argument can be used to select the mapping channel which defaults to 1.

getTilingOffset <nurbssurface> [channel:<index>]

setTilingOffset <nurbssurface> <uo> <vo> [channel:<index>]

These methods get and set the tiling offset on the surface for the selected channel. These methods return or take a point2 value, with u offset in the x component and v offset in the y component of the point2. The optional channel keyword argument can be used to select the mapping channel which defaults to 1.

getGenerateUVs <nurbssurface> <channel_index>

setGenerateUVs <nurbssurface> <channel_index> <boolean>

These methods get and set whether the generation of UV mapping coordinates for the selected channel is enabled.

getTextureUVs <nurbssurface> <index> [channel:<index>]

setTextureUVs <nurbssurface> <index> <point2> [channel:<index>]

These methods get and set the texture UV as a point2 value for the indexed coordinate and selected channel. The 1-based index of the texture coordinate must be >= 1 and <= 4. The optional channel keyword argument can be used to select the mapping channel which defaults to 1.

getTextureSurface <nurbssurface> <channel_index>

setTextureSurface <nurbssurface> <channel_index> <NURBSTextureSurface>

These methods get and set texture surfaces for the selected channel. These methods return or take an instance of the NURBSTextureSurface class. See NURBSTextureSurface : Value .

getProdTess <nurbssurface> <tessType_name>

setProdTess <nurbssurface> <tessType_name> <NURBSSurfaceApproximation>

getViewTess <nurbssurface> <tessType_name>

setViewTess <nurbssurface> <tessType_name> <NURBSSurfaceApproximation>

These methods get and set renderer and viewport NURBSSurfaceApproximation values for individual surfaces, where <tessType_name> is one of #surface, #displacement, or #curve corresponding to the 3 kinds of tessellation that can be controlled on a surface.

clearProdTess <nurbssurface> <tessType_name>

clearViewTess <nurbssurface> <tessType_name>

Resets the surface approximation settings for the surface for the given tessellation type, where <tessType_name> is one of #surface, #displacement, or #curve corresponding to the 3 kinds of tessellation that can be controlled on a surface.

See also

NURBSObject

Value Common Properties, Operators, and Methods


NURBS1RailSweepSurface : NURBSSurface

This class defines a dependent 1-Rail Sweep surface. A 1-Rail Sweep surface uses at least two curves. One curve, the "rail," defines one edge of the surface. The other curves define the surface's cross sections. The cross-section curves should intersect the rail curve. If the cross sections don't intersect the rail, the resulting surface is unpredictable.

Constructors

NURBS1RailSweepSurface [<property>:<val>]...

Any of the object's properties may be set via optional keyword arguments on the constructor.

getObject <nurbsset> <index>

Properties

<nurbs1railsweepsurface>.rail : integer

The parent rail curve by NURBSet index.

<nurbs1railsweepsurface>.railID : integer

The parent rail curve by NURBSId.

<nurbs1railsweepsurface>.numCurves : integer

The number of cross-section curves.

<nurbs1railsweepsurface>.parallel : boolean

If true, ensures that the sweep surface's normal is parallel to the rail.

<nurbs1railsweepsurface>.axisTM : matrix3

The axis of the sweep.

Methods

appendCurve <nurbs1railsweepsurface> <curve> [flip:<boolean>] [startPoint:<float>]

Adds a curve to the end of the list of cross-section curves by specifying the index in the NURBSSet. If flip:true is specified, the cross-section curve is reversed. startPoint specifies the start point on the parent curve. startPoint is applicable only if the parent is a closed curve.

appendCurveByID <nurbs1railsweepsurface> <curveID> [flip:<boolean>] [startPoint:<float>]

Adds a curve to the end of the list of cross-section curves by specifying the NURBSId. If flip:true is specified, the cross-section curve is reversed. startPoint specifies the start point on the parent curve. startPoint is applicable only if the parent is a closed curve.

getCurve <nurbs1railsweepsurface> <index>

setCurve <nurbs1railsweepsurface> <index> <curve>

Get or set the indexed cross-section curve by NURBSSet index.

getCurveID <nurbs1railsweepsurface> <index>

setCurveByID <nurbs1railsweepsurface> <index> <curveID>

Get or set the indexed cross-section curve by NURBSId.

getFlip <nurbs1railsweepsurface> <index>

setFlip <nurbs1railsweepsurface> <index> <boolean>

Get or set whether the indexed cross-section curve is reversed.

getCurveStartPoint <nurbs1railsweepsurface> <index>

setCurveStartPoint <nurbs1railsweepsurface> <index> <float>

Get or set the start point of the indexed cross-section curve on the parent curve. The start point is applicable only if the parent is a closed curve.

See also

NURBSSurface

NURBSObject

Value Common Properties, Operators, and Methods


NURBS2RailSweepSurface : NURBSSurface

This class defines a dependent 2-Rail Sweep surface. A 2-Rail Sweep surface uses at least three curves. Two curves, the "rails," define the two edges of the surface. The other curves define the surface's cross sections. A 2-Rail Sweep surface is similar to a 1-Rail sweep. The additional rail gives you more control over the shape of the surface.

Constructors

NURBS2RailSweepSurface [<property>:<val>]...

Any of the object's properties may be set via optional keyword arguments on the constructor.

getObject <nurbsset> <index>

Properties

<nurbs2railsweepsurface>.rail1 : integer

The 1st parent rail curve by NURBSet index.

<nurbs2railsweepsurface>.rail1ID : integer

The 1st parent rail curve by NURBSId.

<nurbs2railsweepsurface>.rail2 : integer

The 2nd parent rail curve by NURBSet index.

<nurbs2railsweepsurface>.rail2ID : integer

The 2nd parent rail curve by NURBSId.

<nurbs2railsweepsurface>.numCurves : integer

The number of cross-section curves.

<nurbs2railsweepsurface>.parallel : boolean

If false, the rail curves define a ruled surface, and the cross sections describe lofting from this base ruled surface. If true, each cross section is associated with its best fitting plane. This plane moves along the rails and parallel to them. If the rails are curved, the plane can rotate. If the spacing between the rails changes, the section scales or stretches. In either case, the surface is blended from section to section along its entire length.

Methods

appendCurve <nurbs2railsweepsurface> <curve> [flip:<boolean>] [startPoint:<float>]

Adds a curve to the end of the list of cross-section curves by specifying the index in the NURBSSet. If flip:true is specified, the cross-section curve is reversed. startPoint specifies the start point on the parent curve. startPoint is applicable only if the parent is a closed curve.

appendCurveByID <nurbs2railsweepsurface> <curveID> [flip:<boolean>] [startPoint:<float>]

Adds a curve to the end of the list of cross-section curves by specifying the NURBSId. If flip:true is specified, the cross-section curve is reversed. startPoint specifies the start point on the parent curve. startPoint is applicable only if the parent is a closed curve.

getCurve <nurbs2railsweepsurface> <index>

setCurve <nurbs2railsweepsurface> <index> <curve>

Get or set the indexed cross-section curve by NURBSSet index.

getCurveID <nurbs2railsweepsurface> <index>

setCurveByID <nurbs2railsweepsurface> <index> <curveID>

Get or set the indexed cross-section curve by NURBSId.

getFlip <nurbs2railsweepsurface> <index>

setFlip <nurbs2railsweepsurface> <index> <boolean>

Get or set whether the indexed cross-section curve is reversed.

getCurveStartPoint <nurbs2railsweepsurface> <index>

setCurveStartPoint <nurbs2railsweepsurface> <index> <float>

Get or set the start point of the indexed cross-section curve on the parent curve. The start point is applicable only if the parent is a closed curve.

See also

NURBSSurface

NURBSObject

Value Common Properties, Operators, and Methods


NURBSBlendSurface : NURBSSurface

This class defines a dependent Blend surface. A Blend surface connects the edge of one surface to the edge of another, blending the curvature of the parents to create a smooth surface between them. You can also blend from a surface to a curve, or from a curve to a curve.

Constructors

NURBSBlendSurface [<property>:<val>]...

Any of the object's properties may be set via optional keyword arguments on the constructor.

getObject <nurbsset> <index>

Properties

<nurbsblendsurface>.parent1 : integer

The 1st parent by NURBSet index.

<nurbsblendsurface>.parent1ID : integer

The 1st parent by NURBSId.

<nurbsblendsurface>.parent2 : integer

The 2nd parent by NURBSet index.

<nurbsblendsurface>.parent2ID : integer

The 2nd parent by NURBSId.

<nurbsblendsurface>.edge1 : integer

Which edge of the 1st parent surface is used for the blend. The property’s value is one of the following:

1: The low U edge

2: The high U edge

3: The low V edge

4: The high V edge

<nurbsblendsurface>.edge2 : integer

Which edge of the 2nd parent surface is used for the blend.

<nurbsblendsurface>.flip1 : boolean

Controls the matching of parent surface normals when creating the Blend surface. For example, normally when you create a Blend surface between two parent surfaces you don't want a 'bow tie' surface (one with the ends rotated 180 degrees so it crosses on itself in the middle). If you simply match the parent normals you'll occasionally get a 'bow tie' surface. To prevent this you use this property to set a state indicating that one or the other should be flipped before it's used. In this way, when the blend is created, a 'bow tie' won't occur. If true, the 1st parent’s surface normal will be matched; if false the 1st parent’s surface normal will not be matched.

<nurbsblendsurface>.flip2 : boolean

If true, the 2nd parent’s surface normal will be matched; if false the 2nd parent’s surface normal will not be matched.

<nurbsblendsurface>.tension1 : float

The tension value for the 1st parent.

<nurbsblendsurface>.tension2 : float

The tension value for the 2nd parent.

<nurbsblendsurface>.curveStartPoint1 : float

<nurbsblendsurface>.curveStartPoint2 : float

Adjusts the position of the start point at the two edges of the blend. Adjusting the start points can help eliminate unwanted twists or "buckles" in the surface. These values are not applicable if the edges or curves are not closed.

Methods

getParent <nurbsblendsurface> <index>

setParent <nurbsblendsurface> <index> <curve>

Get or set a parent by NURBSSet index. <index> = 1 - parent 1; 2 - parent 2.

getParentID <nurbsblendsurface> <index>

setParentID <nurbsblendsurface> <index> <curveID>

Get or set a parent by NURBSId. <index> = 1 - parent 1; 2 - parent 2.

getEdge <nurbsblendsurface> <index>

setEdge <nurbsblendsurface> <index> <edge>

Get or set which edge of the parent surface is used for the blend. <index> = 1 - parent 1; 2 - parent 2. See the edge1 property description for the <edge> value description.

See also

NURBSSurface

NURBSObject

Value Common Properties, Operators, and Methods


NURBSCapSurface : NURBSSurface

This class defines a dependent Cap surface. A Cap surface is a surface that caps a closed curve or the edge of a closed surface. Caps are especially useful with extruded surfaces.

Constructors

NURBSCapSurface [<property>:<val>]...

Any of the object's properties may be set via optional keyword arguments on the constructor.

getObject <nurbsset> <index>

Properties

<nurbscapsurface>.parent : integer

The parent curve or surface by NURBSet index.

<nurbscapsurface>.parentID : integer

The parent curve or surface by NURBSId.

<nurbscapsurface>.edge : integer

Which edge of the parent surface is capped. This value is not applicable if the parent is a curve. The property’s value is one of the following:

1: The low U edge

2: The high U edge

3: The low V edge

4: The high V edge

<nurbscapsurface>.curveStartPoint : integer

The start point on the parent curve. This value is only applicable if the parent is a curve.

See also

NURBSSurface

NURBSObject

Value Common Properties, Operators, and Methods


NURBSCVSurface : NURBSSurface

This class defines an independent surface that uses control vertices (CVs) to describe its shape. The CVs define a control lattice which surrounds the surface.

Constructors

NURBSCVSurface [<property>:<val>]...

Any of the object's properties may be set via optional keyword arguments on the constructor.

getObject <nurbsset> <index>

Properties

<nurbscvsurface>.uOrder : integer

<nurbscvsurface>.vOrder : integer

The order of the surface in the U and V directions.

<nurbscvsurface>.numUKnots : integer

<nurbscvsurface>.numVKnots : integer

The number of knots in the surface in the U and V directions. If this value is changed, the previous knot data is NOT maintained. Because they are generated mathematically, NURBS surfaces have a parameter space in addition to the 3D geometric space in which they are displayed. Specifically, an array of values called knots specifies the extent of influence of each control vertex (CV) on the surface.

<nurbscvsurface>.numCVs : point2

The number of control vertices for the surface in the U and V directions. If this value is changed, the previous control vertex data is NOT maintained.

<nurbscvsurface>.transform : matrix3

The transformation matrix for the NURBSCVSurface. This controls the relative position of the item within a NURBSSet.

<nurbscvsurface>.uEdgesOverlap : boolean, read-only

<nurbscvsurface>.vEdgesOverlap : boolean, read-only

true if the edges of the surface overlap in U and/or V even though the surface may not be closed (that is, the tangents match at the edges), false otherwise.

<nurbscvsurface>.autoParam : #notAutomatic, #autoCentripetal, #autoUniform

#notAutomatic, #autoCentripetal, and #autoUniform correspond to the Automatic Reparam options in the CV Surface rollouts: none, chord length and uniform, respectively. Defaults to #notAutomatic.

<nurbscvsurface>.rigid : boolean

true if the surface is 'rigid'; otherwise false. The only editing allowed on a rigid surface is to transform it at the Surface sub-object level. You can't move a rigid surface's points or CVs, or change the number of points or CVs. Rigid surfaces reduce the amount of memory used by the NURBS model. Making surfaces rigid improves performance, especially for large and complex models. When a surface is rigid, you can't see its points or CVs when you are at the Point or Surface CV sub-object levels. If the model has no nonrigid surfaces and no point curves, the Point and Surface CV sub-object levels aren't available at all.

Methods

closeU <nurbscvsurface>

Closes the surface in the U direction.

closeV <nurbscvsurface>

Closes the surface in the V direction.

getUKnot <nurbscvsurface> <u_index>

Get the indexed U-direction knot; knot indexes are 1-based.

setUKnot <nurbscvsurface> <u_index> <float>

Sets the indexed U-direction knot to the given value; knot indexes are 1-based.

getVKnot <nurbscvsurface> <v_index>

Get the indexed V-direction knot; knot indexes are 1-based.

setVKnot <nurbscvsurface> <v_index> <float>

Get the indexed V-direction knot to the given value; knot indexes are 1-based.

getCV <nurbscvsurface> <u_index> <v_index>

Get the CV at the given U and V index as a NURBSControlVertex; CV indexes are 1-based.

setCV <nurbscvsurface> <u_index> <v_index> <NURBSControlVertex>

Sets the CV at the given U and V index to the supplied NURBSControlVertex; CV indexes are 1-based.

refineU <nurbscvsurface> <v_param>

Adds new row of interpolated CVs in the U direction on the surface at the given parametric V point.

refineV <nurbscvsurface> <u_param>

Adds new column of interpolated CVs in the V direction on the surface at the given parametric U point.

refine <nurbscvsurface> <u_param> <v_param>

Adds a new row and column of interpolated CVs on the surface at the given parametric UV position.

reparameterize <nurbscvsurface> (#centripetal | #uniform)

Reparameterizes the surface by chord length (#centripetal) or uniform (#uniform) uniform parameterization.

NOTE:

CV curves and surfaces must obey the relationship that "order + number of CVs = number of knots". If this is not the case in most cases no object will be created and in some cases an assertion fault might be generated.

See also

NURBSSurface

NURBSObject

Value Common Properties, Operators, and Methods


NURBSExtrudeSurface : NURBSSurface

This class defines a dependent Extrude surface. An Extrude surface is extruded from a curve sub-object. It is similar to a surface created with the Extrude modifier. The advantage is that an extrude sub-object is part of the NURBS model, so you can use it to construct other curve and surface sub-objects.

Constructors

NURBSExtrudeSurface [<property>:<val>]...

Any of the object's properties may be set via optional keyword arguments on the constructor.

getObject <nurbsset> <index>

Properties

<nurbsextrudesurface>.parent : integer

The parent curve by NURBSet index.

<nurbsextrudesurface>.parentID : integer

The parent curve by NURBSId.

<nurbsextrudesurface>.distance : float

The length of extrusion.

<nurbsextrudesurface>.axisTM : matrix3

The extrusion axis.

<nurbsextrudesurface>.curveStartPoint : float

The start point on the parent curve. This value is only applicable if the curve is closed.

See also

NURBSSurface

NURBSObject

Value Common Properties, Operators, and Methods


NURBSFilletSurface : NURBSSurface

This class defines a dependent Fillet surface. A Fillet surface is a rounded corner surface connecting the edges of two other surfaces.

Constructors

NURBSFilletSurface [<property>:<val>]...

Any of the object's properties may be set via optional keyword arguments on the constructor.

getObject <nurbsset> <index>

Properties

<nurbsfilletsurface>.cubic : boolean

If true, the radius is always linear. If false, the radius is treated as a cubic function, allowing it to change based on the parent surfaces’ geometry.

Methods

getParent <nurbsfilletsurface> <index>

setParent <nurbsfilletsurface> <index> <curve>

Get or set a parent surface by NURBSSet index. <index> = 1 - parent 1; 2 - parent 2.

setParentID <nurbsfilletsurface> <index> <curveID>

getParentID <nurbsfilletsurface> <index>

Get or set a parent surface by NURBSId. <index> = 1 - parent 1; 2 - parent 2.

getSeed <nurbsfilletsurface> <index>

setSeed <nurbsfilletsurface> <index> <point2>

The UV location of the seed value on a parent surface. <index> = 1 - parent 1; 2 - parent 2.

getRadius <nurbsfilletsurface> <index>

setRadius <nurbsfilletsurface> <index> <float>

Get or set the radius of the fillet surface. <index> = 1 - start radius; 2 - end radius.

getTrimSurface <nurbsfilletsurface> <index>

setTrimSurface <nurbsfilletsurface> <index> <bool>

Get or set whether to trim a parent’s surface. If true, trims the parent surface at the intersection. <index> = 1 - parent 1; 2 - parent 2.

getFlipTrim <nurbsfilletsurface> <index>

setFlipTrim <nurbsfilletsurface> <index> <bool>

Get or set the direction to trim a parent’s surface. If true the parent surface is trimmed from the point towards low parameter space. If false the surface is trimmed from the point towards high parameter space. <index> = 1 - parent 1; 2 - parent 2.

See also

NURBSSurface

NURBSObject

Value Common Properties, Operators, and Methods


NURBSLatheSurface : NURBSSurface

This class defines a dependent Lathe surface. A Lathe surface is generated from a curve sub-object. It is similar to a surface created with the Lathe modifier. The advantage is that a lathe sub-object is part of the NURBS model, so you can use it to construct other curve and surface sub-objects.

Constructors

NURBSLatheSurface [<property>:<val>]...

Any of the object's properties may be set via optional keyword arguments on the constructor.

getObject <nurbsset> <index>

Properties

<nurbslathesurface>.parent : integer

The parent curve by NURBSet index.

<nurbslathesurface>.parentID : integer

The parent curve by NURBSId.

<nurbslathesurface>.axisTM : matrix3

The axis system for the surface of revolution.

<nurbslathesurface>.sweep : float

The angle of the revolution in degrees.

<nurbsextrudesurface>.curveStartPoint : float

The start point on the parent curve. This value is only applicable if the curve is closed.

See also

NURBSSurface

NURBSObject

Value Common Properties, Operators, and Methods


NURBSMirrorSurface : NURBSSurface

This class defines a dependent Mirror surface. A Mirror surface is similar to a mirror object that you create using the Mirror tool (on the 3ds Max toolbar) or the Mirror modifier. It is the original surface reflected about one or two axes.

Constructors

NURBSMirrorSurface [<property>:<val>]...

Any of the object's properties may be set via optional keyword arguments on the constructor.

getObject <nurbsset> <index>

Properties

<nurbsmirrorsurface>.parent : integer

The parent curve by NURBSet index.

<nurbsmirrorsurface>.parentID : integer

The parent curve by NURBSId.

<nurbsmirrorsurface>.axis : #X, #Y, #Z, #XY, #XZ, #YZ

The axis or axes of reflection for the surface.

<nurbsmirrorsurface>.distance : float

The offset from the center of the local coordinate system for the mirror object that moves the mirror, in the direction specified by the mirror axis.

<nurbsmirrorsurface>.transform : matrix3

This is an additional transformation applied to the axis specification. This corresponds to the gizmo the user may use interactively to alter the location of the mirror axis. This is exactly equivalent to setting the transform on the gizmo of a mirror modifier.

See also

NURBSSurface

NURBSObject

Value Common Properties, Operators, and Methods


NURBSMultiCurveTrimSurface : NURBSSurface

This class defines a dependent Multicurve Trim surface which is a surface that is trimmed by multiple curves forming a loop.

Constructors

NURBSMultiCurveTrimSurface [<property>:<val>]...

Any of the object's properties may be set via optional keyword arguments on the constructor.

getObject <nurbsset> <index>

Properties

<nurbsmulticurvetrimsurface>.surfaceParent : Integer

The parent surface by NURBSet index.

<nurbsmulticurvetrimsurface>.surfaceParentID : Integer

The parent surface by NURBSId.

<nurbsmulticurvetrimsurface>.numCurves : Integer

The number of curves used for the trim loop.

<nurbsmulticurvetrimsurface>.flipTrim : Boolean

The state of the trim flip toggle. This controls which portion of the surface is trimmed.

Methods

getParent <nurbsmulticurvetrimsurface> <index>

Gets the NURBSSet index of the indexed trim loop.

setParent <nurbsmulticurvetrimsurface> <index> <curve>

Sets the indexed trim loop to the curve specified by the NURBSSet index.

getParentID <nurbsmulticurvetrimsurface> <index>

Gets the NURBSId of the indexed trim loop.

setParentID <nurbsmulticurvetrimsurface> <index> <curveID>

Sets the indexed curve in the trim loop to the curve specified by the NURBSId.

appendCurve <nurbsmulticurvetrimsurface> <curve>

Adds a curve to the end of the list of curves comprising the trim loop by specifying the NURBSSet index.

appendCurveByID <nurbsmulticurvetrimsurface> <curveID>

Adds a curve to the end of the list of curves comprising the trim loop by specifying the NURBSId.

See also

NURBSSurface

NURBSObject

Value Common Properties, Operators, and Methods


NURBSNBlendSurface : NURBSSurface

This class defines a dependent Multisided Blend surface. A Multisided Blend surface is a surface that "fills in" the edges defined by three or four other curve or surfaces. Unlike a regular, two-sided Blend surface, the curves or surfaces edges must form a closed loop (that is, sequence head to tail, and the ends must match). That is, they must completely surround the opening the Multisided Blend will cover.

Constructors

NURBSNBlendSurface [<property>:<val>]...

Any of the object's properties may be set via optional keyword arguments on the constructor.

getObject <nurbsset> <index>

Properties

There are no additional properties for NURBSNBlendSurface.

Methods

getParent <nurbsnblendsurface> <index>

Returns the NURBSSet index of the indexed curve or surface.

setParent <nurbsnblendsurface> <index> <curve>

Sets the specified parent curve or surface by NURBSSet index as the indexed edge for the surface.

getParentID <nurbsnblendsurface> <index>

Returns the NURBSId of the indexed curve or surface.

setParentID <nurbsnblendsurface> <index> <curveID>

Sets the specified parent curve or surface by NURBSId as the indexed edge for the surface.

getEdge <nurbsnblendsurface> <index>

setEdge <nurbsnblendsurface> <index> <edge>

Get or set which edge of the indexed parent surface is used for the blend. The edge is only applicable if the parent is a surface. the <edge> value is one of the following:

1: The low U edge

2: The high U edge

3: The low V edge

4: The high V edge

See also

NURBSSurface

NURBSObject

Value Common Properties, Operators, and Methods


NURBSOffsetSurface : NURBSSurface

This class defines a dependent Offset surface. An Offset surface is offset a specified distance from the original along the parent surface’s normals.

Constructors

NURBSOffsetSurface [<property>:<val>]...

Any of the object's properties may be set via optional keyword arguments on the constructor.

getObject <nurbsset> <index>

Properties

<nurbsoffsetsurface>.parent : integer

The parent surface by NURBSet index.

<nurbsoffsetsurface>.parentID : integer

The parent surface by NURBSId.

<nurbsoffsetsurface>.distance : float

The distance of the offset surface from the parent surface.

See also

NURBSSurface

NURBSObject

Value Common Properties, Operators, and Methods


NURBSPointSurface : NURBSSurface

This class defines an independent surface that uses points to describe its shape.

Constructors

NURBSPointSurface [<property>:<val>]...

Any of the object's properties may be set via optional keyword arguments on the constructor.

getObject <nurbsset> <index>

Properties

<nurbspointsurface>.numPoints : point2

The number of points in the point surface in the U and V directions. If this value is changed, the previous point data is not maintained.

<nurbspointsurface>.transform : matrix3

The transformation matrix for the NURBSPointSurface. This controls the relative position of the item within a NURBSSet.

<nurbspointsurface>.closedU : boolean

true if the surface is closed in the U direction, false if open.

<nurbspointsurface>.closedV : boolean

true if the surface is closed in the V direction, false if open.

Methods

closeU <nurbspointsurface>

Close the curve in U.

closeV <nurbspointsurface>

Close the curve in V.

getPoint <nurbspointsurface> <u_index> <v_index>

Get the indexed surface point as a NURBSIndependentPoint; point indexes are 1-based.

setPoint <nurbspointsurface> <u_index> <v_index> <NURBSIndependentPoint>

Get the indexed surface point to the given NURBSIndependentPoint; point indexes are 1-based.

refineU <nurbspointsurface> <v_param>

Add new row of interpolated points in the U direction on the surface at the given parametric V point.

refineV <nurbspointsurface> <u_param>

Add new column of interpolated points in the V direction on the surface at the given parametric U point.

refine <nurbspointsurface> <u_param> <v_param>

Add a new row and column of interpolated points on the surface at the given parametric UV position.

See also

NURBSSurface

NURBSObject

Value Common Properties, Operators, and Methods


NURBSRuledSurface : NURBSSurface

This class defines a dependent Ruled surface. A Ruled surface is generated from two curve sub-objects. It lets you use curves to design the two opposite borders of a surface.

Constructors

NURBSRuledSurface [<property>:<val>]...

Any of the object's properties may be set via optional keyword arguments on the constructor.

getObject <nurbsset> <index>

Properties

<nurbsruledsurface>.parent1 : integer

The 1st parent curve by NURBSet index.

<nurbsruledsurface>.parent1ID : integer

The 1st parent curve by NURBSId.

<nurbsruledsurface>.parent2 : integer

The 2nd parent curve by NURBSet index.

<nurbsruledsurface>.parent2ID : integer

The 2nd parent curve by NURBSId.

<nurbsruledsurface>.flip1 : boolean

Controls the matching of parent curve direction when creating the Ruled surface. For example, normally when you create a Ruled surface between two parent curves you don't want a 'bow tie' surface (one with the ends rotated 180 degrees so it crosses on itself in the middle). If you simply match the parent direction you'll get a 'bow tie' surface. To prevent this you use this property to set a state indicating that one or the other should be flipped before it's used. In this way, when the ruled surface is created, a 'bow tie' won't occur. If true, the 1st parent’s curve direction will be flipped; if false the 1st parent’s curve direction will not be flipped.

<nurbsruledsurface>.flip2 : boolean

If true, the 2nd parent’s curve direction will be flipped; if false the 2nd parent’s curve direction will not be flipped.

<nurbsruledsurface>.curveStartPoint1 : float

The start point on the 1st parent curve. This value is only applicable if the curve is closed.

<nurbsruledsurface>.curveStartPoint2 : float

The start point on the 2nd parent curve. This value is only applicable if the curve is closed.

See also

NURBSSurface

NURBSObject

Value Common Properties, Operators, and Methods


NURBSULoftSurface : NURBSSurface

This class defines a dependent U Loft surface. A U Loft surface interpolates a surface across multiple curve sub-objects. The curves become U-axis contours of the surface.

Constructors

NURBSUloftSurface [<property>:<val>]...

Any of the object's properties may be set via optional keyword arguments on the constructor.

getObject <nurbsset> <index>

Properties

<nurbsuloftsurface>.numCurves : integer

The number of curves used by the U Loft.

Methods

getCurve <nurbsuloftsurface> <index>

Gets the NURBSSet index of the indexed U Loft curve; curve indexes are 1-based.

setCurve <nurbsuloftsurface> <index> <curve>

Sets the indexed U Loft curve to the curve specified by the NURBSSet index.

getCurveID <nurbsuloftsurface> <index>

Gets the NURBSId of the indexed U Loft curve in the loft; curve indexes are 1-based.

setCurveByID <nurbsuloftsurface> <index> <curveID>

Sets the indexed U Loft curve to the curve specified by the NURBSId.

appendCurve <nurbsuloftsurface> <curve> [flip:<boolean>] [startPoint:<float>] [tension:<float>] [useTangent:<boolean>] [flipTangent:<boolean>]

Adds a curve to the end of the list of U Loft curves by specifying the NURBSSet index. If flip:true is specified, the interpretation of the start and end of the curve to be reversed. startPoint: specifies the start point on the curve. This value is only applicable if the curve is closed. tension: specifies the tension of the curve. If useTangent:true is specified and the curve is a curve on surface, causes the U Loft to use the tangency of the surface. This can help blend a loft smoothly onto a surface. If flipTangent:true is specified, the tangent is flipped for the curve.

appendCurveByID <nurbsuloftsurface> <curveID> [flip:<boolean>] [startPoint:<float>] [tension:<float>] [useTangent:<boolean>] [flipTangent:<boolean>]

Adds a curve to the end of the list of U Loft curves by specifying the NURBSId.

getFlip <nurbsuloftsurface> <index>

setFlip <nurbsuloftsurface> <index> <boolean>

Get or set the flip state of the indexed U Loft curve; true causes the interpretation of the start and end of the curve to be reversed, used to control twisting in the loft.

See also

NURBSSurface

NURBSObject

Value Common Properties, Operators, and Methods


NURBSUVLoftSurface : NURBSSurface

This class defines a dependent UV Loft Surface. This surface is similar to the U Loft surface, but has a set of curves in the V dimension as well as the U dimension.

Constructors

NURBSUVLoftSurface [<property>:<val>]...

any of the object's properties may be set via optional keyword arguments on the constructor.

getObject <nurbsset> <index>

Properties

<nurbsuvloftsurface>.numUCurves : integer

The number of curves in the U direction used by the UV Loft.

<nurbsuvloftsurface>.numVCurves : integer

The number of curves in the V direction used by the UV Loft.

Methods

getUCurve <nurbsuvloftsurface> <index>

Gets the NURBSSet index of the U direction indexed UV Loft curve; curve indexes are 1-based.

setUCurve <nurbsuvloftsurface> <index> <curve>

Sets the indexed UV Loft curve in the U direction to the curve specified by the NURBSSet index.

getUCurveID <nurbsuvloftsurface> <index>

Gets the NURBSId of the U direction indexed UV Loft curve in the loft; curve indexes are 1-based.

setUCurveByID <nurbsuvloftsurface> <index> <curveID>

Sets the indexed UV Loft curve in the U direction to the curve specified by the NURBSId.

getVCurve <nurbsuvloftsurface> <index>

Gets the NURBSSet index of the V direction indexed UV Loft curve; curve indexes are 1-based.

setVCurve <nurbsuvloftsurface> <index> <curve>

Sets the indexed UV Loft curve in the V direction to the curve specified by the NURBSSet index.

getVCurveID <nurbsuvloftsurface> <index>

Gets the NURBSId of the V direction indexed UV Loft curve in the loft; curve indexes are 1-based.

setVCurveByID <nurbsuvloftsurface> <index> <curveID>

Sets the indexed UV Loft curve in the V direction to the curve specified by the NURBSId.

appendUCurve <nurbsuvloftsurface> <curve>

Adds a curve to the end of the list of U direction UV Loft curves by specifying the NURBSId.

appendUCurveByID <nurbsuvloftsurface> <curveID>

Adds a curve to the end of the list of U direction UV Loft curves by specifying the NURBSSet index.

appendVCurve <nurbsuvloftsurface> <curve>

Adds a curve to the end of the list of V direction UV Loft curves by specifying the NURBSSet index.

appendVCurveByID <nurbsuvloftsurface> <curveID>

Adds a curve to the end of the list of V direction UV Loft curves by specifying the NURBSId.

See also

NURBSSurface

NURBSObject

Value Common Properties, Operators, and Methods


NURBSXFormSurface : NURBSSurface

This class defines a dependent Transform (XForm) surface. A Transform surface is a copy of the original surface with a different position, rotation, or scale.

Constructors

NURBSXFormSurface [<property>:<val>]...

any of the object's properties may be set via optional keyword arguments on the constructor.

getObject <nurbsset> <index>

Properties

<nurbsxformsurface>.parent : integer

The parent surface by NURBSet index.

<nurbsxformsurface>.parentID : integer

The parent surface by NURBSId.

<nurbsxformsurface>.transform : matrix3

The offset transformation matrix for the NURBSXFormSurface. This controls the relative position of the item to the parent surface.

See also

NURBSSurface

NURBSObject

Value Common Properties, Operators, and Methods


NURBSTexturePoint : NURBSObject

This class defines a single texture vertex in a NURBS texture surface.

Constructors

NURBSTexturePoint <point2> [indices:<point2>]

Create a NURBSTexturePoint with the specified UV coordinate. If indices: is specified, it sets the ordering the texture point in the texture surface.

getPoint <NURBSTextureSurface> <u_index> <v_index>

Properties

<nurbstexturepoint>.pos : point2

The UV coordinate of the texture point.

Methods

setIndices <nurbstexturepoint> <u_index> <v_index>

Sets the ordering the texture point in the texture surface.

See also

NURBSObject

Value Common Properties, Operators, and Methods


NURBSDisplay : Value

This class corresponds to the NURBS display control checkboxes in the General NURBS rollout panel. You can exert control over the display levels in a NURBS object by either assigning NURBSDisplay values to the .display property of a NURBSSet value or using the setSurfaceDisplay() node function. See NURBS Node Properties and Methods .

Constructors

NURBSDisplay [<property>:<val>]...

Any of the object's properties may be set via optional keyword arguments on the constructor.

<nurbsset>.display

Properties

<nurbsdisplay>.displayCurves : boolean

true if curves are displayed; otherwise false.

<nurbsdisplay>.displaySurfaces : boolean

true if surfaces are displayed; otherwise false.

<nurbsdisplay>.displayLattices : boolean

true if lattices are displayed; otherwise false.

<nurbsdisplay>.displaySurfCVLattices : boolean

true if surface CV lattices are displayed; otherwise false.

<nurbsdisplay>.displayCurveCVLattices : boolean

true if curve CV lattices are displayed; otherwise false.

<nurbsdisplay>.displayDependents : boolean

true if dependent sub-objects are displayed; otherwise false.

<nurbsdisplay>.displayTrimming : boolean

true if surface trimming is displayed; otherwise false.

<nurbsdisplay>.degradeOnMove : boolean

true if the surface may degrade while transforming it; otherwise false.

<nurbsdisplay>.displayShadedLattice : boolean

true if the NURBS surfaces appear as shaded lattices in shaded viewports and wireframe viewports display the surface's lattice without shading. false if NURBS surfaces display as tessellated meshes in shaded viewport and wireframe viewports surfaces display as either iso curves or wire meshes.

See also

Value Common Properties, Operators, and Methods


NURBSSelection : Value

An NURBSSelection represents a set of NURBS sub-objects for a scene NURBS node as a virtual array. As such, you can access a sub-object by index, iterate over the sub-objects, and apply mapped functions to the sub-objects. The NURBSSelection array is dynamic, i.e., its contents will change as the sub-objects of the NURBS node change. NURBSSelection values are mappable.

Constructors

<node>.selectedCurveCVs

<node>.selectedCurves

<node>.selectedImports

<node>.selectedPoints

<node>.selectedSurfaces

<node>.selectedSurfCVs

<node>.curveCVs -- read-only

<node>.curves -- read-only

<node>.imports -- read-only

<node>.surfaces -- read-only

<node>.surfCVs -- read-only

<node>.points -- read-only

Properties

<nurbsselection>.count : Integer, read-only

Returns the number of sub-objects in the NURBSSelection array.

<nurbsselection>.selSetNames : Array of names, read-only

Returns an array of names of the current named selection sets corresponding to the NURBSSelection level for the object the NURBSSelection is associated with.

The following property is present for singleton selections (of the form $foo.curveCVs[n]):

<nurbsselection>.index : Integer, read-only

Returns the index of the selected sub-object in the NURBS object,

FOR EXAMPLE,

$foo.selectedcurveCVs[2].index

returns the curve CV index of the 2nd curve CV in the current selection.

NOTE:

that iterating over a selection yields singleton selections in the loop body:

sCVs = for i in $foo.selectedcurveCVs collect i.index

sCVs contains selected curve CVs as array

Operators

<node>.selectedCurveCVs = (<array> | <bitarray>)

<node>.selectedCurves = (<array> | <bitarray>)

<node>.selectedImports = (<array> | <bitarray>)

<node>.selectedPoints = (<array> | <bitarray>)

<node>.selectedSurfaces = (<array> | <bitarray>)

<node>.selectedSurfCVs = (<array> | <bitarray>)

Selects the specified sub-objects.

<nurbsselection>[<integer>]

Retrieves the indexed sub-object as a singleton NURBSSelection. Index starts at 1

<nurbsselection>[(<integer_array> | <bitarray>)]

Retrieves the indexed sub-objects as a NURBSSelection. Index starts at 1.

<nurbsselection>[(<#name> | <string>)]

Retrieves the sub-object level named selection set, where the name of the named selection set can be specified as a name or string value.

<nurbsselection>[(<#name> | <string>)] = (<nurbsselection> | <integer_array> | <bitarray>)

Sets the sub-object level named selection set to the specified edges. The name of the named selection set can be specified as a name or string value, and the edges can be specified as an array, bitArray, or a NURBSSelection from the same object and of the same sub-object level.

Methods

move <nurbsselection> <point3>

Moves the sub-objects in the NURBSSelection.

rotate <nurbsselection> <quat_or_other_rotation_form>

Rotates the sub-objects in the NURBSSelection.

scale <nurbsselection> <point3>

Scales the sub-objects in the NURBSSelection.

select <nurbsselection>

Selects the sub-objects in the NURBSSelection.

deselect <nurbsselection>

Deselects the sub-objects in the NURBSSelection.

delete <nurbsselection>

Deletes the sub-objects in the NURBSSelection.

append <nurbsselection> (<nurbsselection> | <integer>)

Appends the sub-objects(s) to the NURBSSelection.

findItem <nurbsselection> (<nurbsselection[<integer>] | <integer>)

Returns the selection index of the matching item or 0 if not found. The item is selection index or singleton NURBSSelection.

EXAMPLES

$foo.surfCVs[#baz] -- retrieves the surf CV selection named baz

move $foo.curves[#bar] [0,0,10] -- moves the "bar" curve selection 10 in Z

move $foo.selectedSurfCVs [0,0,10] -- moves the current surface CV selection 10 in Z

coordsys local scale $foo.surfaces[#baz] [2,2,2]

select $foo.curveCVs[#(1,2,3,4,5)] -- select the specified curve CVs

deselect $foo.curves -- deselect all curves

delete $foo.points[#{1..31, 40..50}] -- delete the specified points

$foo.curveCVs[#fred] = $foo.selectedCurveCVs -- "snapshot" the selected curve CVs

See also

Value Common Properties, Operators, and Methods


NURBSSet : Value

This is the class used to create NURBS objects, or retrieve data from existing NURBS objects. The NURBSSet acts as a container for the other objects.

This class contains a table of the various NURBSObject derived entities (points, curves, surfaces) used to make up the set. Additionally it has two 'fuse' tables: one for fuse curves and one for fuse surfaces. These are used to allow the CVs in the curves or surfaces to be 'stitched' or 'fused' together so that if one curve or surface moves the other moves with it. This class also has the surface-approximation properties that control the object's tessellation into triangle meshes for use in the viewports and the production renderer.

NURBSSet values are mappable.

Constructors

NURBSSet [<property>:<val>]...

any of the object's properties may be set via optional keyword arguments on the constructor

getNURBSSet <node> [#relational]

This function is used to retrieve a NURBSSet that corresponds to the specified NURBS scene node. This allows access the internal objects inside a 3ds Max editable NURBS object.

If the optional #relational parameter is not supplied, the returned NURBSSet will contain only independent curves and surfaces, all dependent objects will be decomposed into corresponding independent objects. So for example, if you pass an object that has a relational model (perhaps two CV surfaces and a dependent blend surface) it will decompose them into three CV surfaces. This will be the CV surfaces that represent the two surfaces and the blend, but you won't have the blend relational data. If the #relational argument is supplied, you get back two CV surfaces and a NURBS blend surface and the NURBSSet is an active representative for the scene object -- any changes you make to the properties of it's constituent NURBSObjects will be reflected directly in the source scene object.

Properties

<nurbsset>.numObjects : integer, read-only

<nurbsset>.count : integer, read-only

The number of internal objects in the NURBSSet.

The following properties control the surface approximation tessellation. There are dual sets of properties, one for controlling viewport tessellation, the other for controlling renderer tessellation. The properties correspond directly to the surface approximation controls in the NURBS surface modifier panel. See NURBSSurfaceApproximation for a description of these properties.

<nurbsset>.viewConfig : #isoOnly, #isoAndMesh, #meshOnly

<nurbsset>.viewIsoULines : integer

<nurbsset>.viewIsoVLines : integer

<nurbsset>.viewMeshUSteps : integer

<nurbsset>.viewMeshVSteps : integer

<nurbsset>.viewMeshApproxType : #parametric, #spatial, #curvature,

: #regular, #spatialAndCurvature

<nurbsset>.viewSpacialEdge : float

<nurbsset>.viewCurvatureAngle : float

<nurbsset>.viewCurvatureDistance : float

<nurbsset>.viewViewDependent : boolean

<nurbsset>.renderConfig : #isoOnly, #isoAndMesh, #meshOnly,

: #regular, #spatialAndCurvature

<nurbsset>.renderIsoULines : integer

<nurbsset>.renderIsoVLines : integer

<nurbsset>.renderMeshUSteps : integer

<nurbsset>.renderMeshVSteps : integer

<nurbsset>.renderMeshApproxType : #parametric, #spatial, #curvature,

: #regular, #spatialAndCurvature

<nurbsset>.renderSpacialEdge : float

<nurbsset>.renderCurvatureAngle : float

<nurbsset>.renderCurvatureDistance : float

<nurbsset>.renderViewDependent : boolean

<nurbsset>.display : NURBSDisplay

Takes and returns instances of the NURBSDisplay class that controls visibility of various components of a NURBS object's display in the viewports.

<nurbsset>.viewApproximation : NURBSSurfaceApproximation

<nurbsset>.renderApproximation : NURBSSurfaceApproximation

These properties are used to access and control surface approximation using the NURBSSurfaceApproximation class, instances of which encapsulate all the approximation settings for either viewports or rendering. You can construct a surface approximation setup in one of these instances and use it to set the surface approximation for many objects.

<nurbsset>.merge : float

Controls the tessellation of surface sub-objects whose edges are joined or very nearly joined. When input to a modifier as Mesh Select which requires a mesh, and when NURBS surfaces are tessellated for production rendering, by default 3ds Max adjusts the tessellation of adjoining surfaces to match each other in terms of the number of faces along the edges. The merge value controls how this is done. If merge is zero, adjoining faces are unchanged. Increasing the value of merge increases the distance 3ds Max uses to calculate how edges should match, guaranteeing no gaps between the surfaces when they are rendered.

Operators

<nurbsset>[<index>]

<nurbsset>[<index>] = <nurbsobj>

The sub-objects in a NURBSSet can be accessed using the standard MAXScript array indexing operator, []. This is equivalent to using the getObject() and setObject() methods described below.

Methods

appendObject <nurbsset> <nurbsobj>

Appends the given NURBSObject (instances of any of the subclasses of NURBSObject and their subclasses, all the points, curves, surfaces) as a new sub-object to the NURBSSet. The new sub-object receives the next available index.

setObject <nurbsset> <index> <nurbsobj>

Set the indexed sub-object to the given NURBSObject; indexes are 1-based. You use this function to replace a previously appended object.

getObject <nurbsset> (<index> | <NURBSSelection>)

Retrieves the indexed sub-object or the set of sub-objects specified by the NURBSSelection from the NURBSSet; sub-object indexes are 1-based. If the NURBSSelection specifies no sub-objects, undefined is returned. If one sub-object is specified, a value of that sub-object’s class is returned. If multiple sub-objects are specified, a NURBSSet value is returned.

removeObject <nurbsset> <index>

Removes the given sub-object from the NURBSSet. The indexes of all the remaining higher-indexed sub-objects are renumbered down.

disconnect <nurbsset>

Disconnect a relational NURBS set from its scene object, turning it into a non-relational set.

deleteObjects <nurbsset>

This method deletes all the NURBSObjects in a NURBSSet, and frees its memory.

getProdTess <nurbsset> <tessType_name>

setProdTess <nurbsset> <tessType_name> <NURBSSurfaceApproximation>

getViewTess <nurbsset> <tessType_name>

setViewTess <nurbsset> <tessType_name> <NURBSSurfaceApproximation>

These methods get and set renderer and viewport NURBSSurfaceApproximation values for individual surfaces, where <tessType_name> is one of #surface, #displacement, or #curve corresponding to the 3 kinds of tessellation that can be controlled on a surface.

clearProdTess <nurbsset> <tessType_name>

clearViewTess <nurbsset> <tessType_name>

Resets the surface approximation settings for the surfaces in the NURBSet for the given tessellation type, where <tessType_name> is one of #surface, #displacement, or #curve corresponding to the 3 kinds of tessellation that can be controlled on a surface.

See also

Value Common Properties, Operators, and Methods


NURBSSurfaceApproximation : Value

Instances of this class contain a complete surface approximation setting that can be used to set the approximation for NURBS objects described by NURBSSet values or directly in existing NURBS scene node. You use the setViewApproximation() and setRenderApproximation() functions on existing scene nodes and the .viewApproximation and .renderApproximation properties on NURBSSet values.

Constructors

NURBSSurfaceApproximation [<property>:<val>]...

Any of the object's properties may be set via optional keyword arguments on the constructor.

<nurbsset>.viewApproximation

<nurbsset>.renderApproximation

Properties

<nurbssurfaceapproximation>.config : #isoOnly, #isoAndMesh, #meshOnly

This property determines what is displayed in the interactive or scanline renderer.

If #isoOnly is specified, only Iso lines are displayed. Iso (parametric) lines are similar to contour lines. The lines show where the NURBS surface has a constant U or V value or both. Iso line representations can be less crowded and easier to visualize than wire mesh representations.

If #isoAndMesh is specified, Iso lines and the mesh are displayed. When chosen, wireframe viewports display iso line representations of the surface, and shaded viewports display the shaded surface.

If #meshOnly is specified, just the mesh is displayed. When chosen, wireframe viewports display the surface as a wire mesh, and shaded viewports display the shaded surface. In wireframe viewports, this option lets you see the curve approximation used for viewports.

<nurbssurfaceapproximation>.isoULines : integer

This is used with the ISO line display. This is the number of additional interior iso lines in U (there are always lines along the outer edges).

<nurbssurfaceapproximation>.isoVLines : integer

This is used with the ISO line display. This is the number of additional interior iso lines in V (there are always lines along the outer edges).

<nurbssurfaceapproximation>.meshUSteps : integer

This is used for parametric tessellation. This is the number of tessellations in U. This is the number of sub-divisions for a knot span for the surface.

<nurbssurfaceapproximation>.meshVSteps : integer

This is used for parametric tessellation. This is the number of tessellations in V. This is the number of sub-divisions for a knot span for the surface.

<nurbssurfaceapproximation>.meshApproxType : #parametric, #spatial, #curvature, #regular, #spatialAndCurvature

This property controls the type of surface tessellation.

If #parametric is specified, parametric tessellation is performed. This provides for a fixed number of meshUSteps by meshVSteps tessellations. There are meshUSteps times meshVSteps quadrilaterals and each one is split up into two triangles.

If #spatial is specified, spatial tessellation is performed. This uses spacialEdge as its parameter. This specifies that the size of the tessellation will be the spacialEdge length. In view dependent tessellation spacialEdge is specified in pixels.

If #curvature is specified, view dependent tessellation is performed. This uses the curvatureAngle and curvatureDistance property values.

If #regular is specified, a fixed, regular tessellation across the surface is performed.

If #spatialAndCurvature is specified, a tessellation method which combines the spatial and curvature methods is used. This uses the spacialEdge, curvatureAngle, and curvatureDistance property values.

<nurbssurfaceapproximation>.spacialEdge : float

This is the length of an edge to use in spatial (#spatial) tessellation. In view dependent tessellation this is specified in pixels. If not in view dependent tessellation this is a percentage of the bounding box diagonal length.

<nurbssurfaceapproximation>.curvatureAngle : float

This is used in curvature dependent tessellation (#curvature). If 0.0 is specified this is ignored. If specified this ensures that no two adjacent face normals exceed this angle between them. This value is specified in radians.

<nurbssurfaceapproximation>.curvatureDistance : float

This is used in curvature dependent tessellation (#curvature). If 0.0 is specified this is ignored. This specifies a distance that cannot be exceeded between a vertex on the mesh and the mathematical surface. This is defined as a percentage of the diagonal of the bounding box of the individual surface in object space. For instance if this was set to 1.0, the allowable error in generating a tessellation would be 1% of the bounding box diagonal distance of the surface. This would be 1/100 (1%) of the diagonal distance of the bounding box. In this way if an object is scaled the tessellation remains the same. Additionally, if you have an object with a big surface and a little surface, the smaller surface will get tessellated more finely because its own bounding box is used. This prevents the smaller surface from just becoming a single triangle for example.

<nurbssurfaceapproximation>.viewDependent : boolean

Specifies if this is view dependent tessellation. If true this will tessellate less finely the farther away from the camera the object is. If false the tessellation does not change based on distance from the camera.

<nurbssurfaceapproximation>.merge : float

Controls the tessellation of surface sub-objects whose edges are joined or very nearly joined. When input to a modifier (such as Mesh Select) requires a mesh, and when NURBS surfaces are tessellated for production rendering, by default the software adjusts the tessellation of adjoining surfaces to match each other, in terms of the number of faces along the edges. The Merge parameter controls how this is done. If Merge is zero, adjoining faces are unchanged. Increasing the value of Merge increases the distance the software uses to calculate how edges should match, guaranteeing no gaps between the surfaces when they are rendered. Default is 0.0.

Available in 3ds Max 8 and higher.

<nurbssurfaceapproximation>.subdivStyle : name

Get/Set the Subdivision style in the Advanced Surface Approximation dialog. Possible values are #tree, #grid, #delaunay. Available in 3ds Max 8 and higher.

<nurbssurfaceapproximation>.minLevels : float

Get/Set the minimum number of Subdivision levels in the Advanced Surface Approximation dialog. Available in 3ds Max 8 and higher.

<nurbssurfaceapproximation>.maxLevels : float

Get/Set the maximum number of Subdivision levels in the Advanced Surface Approximation dialog. Available in 3ds Max 8 and higher.

<nurbssurfaceapproximation>.maxTris : integer

Get/Set the maximum number of triangles in the Advanced Surface Approximation dialog. Available in 3ds Max 8 and higher.

See also

Value Common Properties, Operators, and Methods


NURBSTextureSurface : Value

This class contains an editable texture coordinate surface corresponding to the editable texture surface in NURBS surfaces. You can create and apply them to any NURBSSurface value or retrieve existing texture surfaces using the getTextureSurface() and setTextureSurface() methods to access any of the 99 texture channels for a NURBS surface.

3ds Max uses the texture surface to control how materials are mapped. In effect, changing the texture surface stretches or otherwise changes the UV coordinates for the surface, altering the mapping. This is a 2D (not 3D) surface that lives in the parameter space of the corresponding NURBSSurface which controls the texture mapping used by the NURBSSurface.

It is not possible to assign texture surfaces to NURBS objects that are present in the scene. You can create new NURBSSets and the texture surface is used when you call createNURBSObject(). However, if you do a getNURBSSet() and assign a NURBSTextureSurface to a texture channel for a NURBS surface, nothing happens.

Constructors

NURBSTextureSurface [<property>:<val>]...

Any of the object's properties may be set via optional keyword arguments on the constructor.

getTextureSurface <nurbssurface> <channel_index>

<nurbssurface>.textureSurface1

<nurbssurface>.textureSurface2

Provides backward compatibility for scripts written for 3ds Max R2.5. Get and set the texture surfaces for the first two texture channels.

Properties

<nurbstexturesurface>.type : #default, #userDefined, #projected

The type of texture surface.

<nurbstexturesurface>.parent : integer

The parent surface by NURBSet index.

<nurbstexturesurface>.parentID : integer

The parent surface by NURBSId.

<nurbstexturesurface>.numUPoints : integer -- read-only

<nurbstexturesurface>.numVPoints : integer -- read-only

<nurbstexturesurface>.numPoints : point2

The number of U and V points.

Methods

getPoint <nurbstexturesurface> <u_index> <v_index>

setPoint <nurbstexturesurface> <u_index> <v_index> <texturepoint>

Get or set a NURBSTexturePoint value for the texture point at the U and V index of the texture surface.

Associated Methods

setTextureSurface <nurbssurface> <channel_index> <NURBSTextureSurface>

This method sets the texture surface for the selected channel.

NOTE:

The NURBSTextureSurface class has been updated to correspond to the new texture surface mechanism in 3ds Max 4 and higher, and has different properties and methods that were defined in 3ds Max R3.

See also

NURBSSurface

Value Common Properties, Operators, and Methods


Depth_of_FieldMPassCamEffect : MPassCamEffect

Depth_of_FieldMPassCamEffect - superclass: MPassCamEffect; super-superclass:MAXWrapper - 12:0 - classID: #(222828565, 1753053596)

Value > MAXWrapper > MPassCamEffect > Depth_of_FieldMPassCamEffect

Constructor

Depth_of_FieldMPassCamEffect ...

MultiPassDOF ...

Properties

<Depth_of_FieldMPassCamEffect>.disableAntialiasing Boolean default: false -- animatable; boolean; Disable_Antialiasing

<Depth_of_FieldMPassCamEffect>.disableFiltering Boolean default: false -- animatable; boolean; Disable_Filtering

<Depth_of_FieldMPassCamEffect>.displayPasses Boolean default: true -- animatable; boolean; Display_Passes

<Depth_of_FieldMPassCamEffect>.ditherStrength Float default: 0.4 -- animatable; float; Dither_Strength

<Depth_of_FieldMPassCamEffect>.focalDepth Float default: 100.0 -- animatable; float; Focal_Depth

<Depth_of_FieldMPassCamEffect>.normalizeWeights Boolean default: true -- animatable; boolean; Normalize_Weights

<Depth_of_FieldMPassCamEffect>.sampleBias Float default: 0.5 -- animatable; float; Sample_Bias

<Depth_of_FieldMPassCamEffect>.sampleRadius Float default: 1.0 -- animatable; float; Sample_Radius

<Depth_of_FieldMPassCamEffect>.tileSize Integer default: 32 -- animatable; integer; Tile_Size

<Depth_of_FieldMPassCamEffect>.totalPasses Integer default: 12 -- animatable; integer; Total_Passes

<Depth_of_FieldMPassCamEffect>.useOriginalLocation Boolean default: true -- animatable; boolean; Use_Original_Location

<Depth_of_FieldMPassCamEffect>.useTargetDistance Boolean default: true -- animatable; boolean; Use_Target_Distance

See also

Motion_BlurMPassCamEffect : MPassCamEffect

maxOps.displayActiveCameraViewWithMultiPassEffect Method

Camera Common Properties, Operators, and Methods

FreeCamera : Camera

TargetCamera : Camera


MPassCamEffect Classes

The following classes implement Multi-Pass Camera Effects in 3ds Max:

Depth_of_FieldMPassCamEffect : MPassCamEffect

Motion_BlurMPassCamEffect : MPassCamEffect

The following related method is available in the maxOps Interface :

maxOps.displayActiveCameraViewWithMultiPassEffect Method

See also

Camera Common Properties, Operators, and Methods


Motion_BlurMPassCamEffect : MPassCamEffect

Motion_BlurMPassCamEffect - superclass: MPassCamEffect; super-superclass:MAXWrapper - 9:0 - classID: #(222827800, 1753054361)

Value > MAXWrapper > MPassCamEffect > Motion_BlurMPassCamEffect

Constructor

Motion_BlurMPassCamEffect ...

MultiPassMotionBlur ...

Properties

<Motion_BlurMPassCamEffect>.bias Float default: 0.5 -- animatable; float

<Motion_BlurMPassCamEffect>.disableAntialiasing Boolean default: false -- animatable; boolean; Disable_Antialiasing

<Motion_BlurMPassCamEffect>.disableFiltering Boolean default: false -- animatable; boolean; Disable_Filtering

<Motion_BlurMPassCamEffect>.displayPasses Boolean default: true -- animatable; boolean; Display_Passes

<Motion_BlurMPassCamEffect>.ditherStrength Float default: 0.4 -- animatable; float; Dither_Strength

<Motion_BlurMPassCamEffect>.duration Float default: 1.0 -- animatable; float

<Motion_BlurMPassCamEffect>.normalizeWeights Boolean default: true -- animatable; boolean; Normalize_Weights

<Motion_BlurMPassCamEffect>.tileSize Integer default: 32 -- animatable; integer; Tile_Size

<Motion_BlurMPassCamEffect>.totalPasses Integer default: 12 -- animatable; integer; Total_Passes

See also

Depth_of_FieldMPassCamEffect : MPassCamEffect

maxOps.displayActiveCameraViewWithMultiPassEffect Method

Camera Common Properties, Operators, and Methods

FreeCamera : Camera

TargetCamera : Camera


Channel_Info : UtilityPlugin

Provides access to the Channel_Info Utility in the Utilities tab.

Class instances not creatable by MAXScript

Alias:

TreeViewUtil

Properties:

No properties or methods exposed.

EXAMPLE

UtilityPanel.OpenUtility Channel_Info

true


Clean_MultiMaterial : UtilityPlugin

The MultiMaterial Clean Utility cleans unused submaterials in scene Multi-Materials.

Class instances not creatable by MAXScript

Alias:

MMClean

Clean_MultiMaterial Interface:

Interface: MMClean

Methods:

findAll <&material array>mtlsFound

mtlsFound is Out parameter

Collects all multi-materials with unused sub-materials, stores them in MtlsFound array

fix <&material array>mtls [prompt:bool]

mtls is In parameter

prompt default value: true

Removes unused sub-materials from submitted multi-materials array. if promt=true, dialog shows up.

fixAll [prompt:bool]

prompt default value: true

Removes all unused sub-materials from scene multi-materials. if promt=true, dialog shows up.

Clean_MultiMaterial Interfaces:

Interface: MMCleanActions

Methods:

CleanMaterailsAll() -- Action Interface

CUI member

Actions:

Category: MultiMaterial_Clean_Actions; Action: Clean__MultiMaterial; Shortcut: -- none defined --


File_Link_Manager: UtilityPlugin

Class instances not creatable by MAXScript

Properties:

No properties or methods exposed.


Fix_Ambient : UtilityPlugin

Fix_Ambient is a Utility Plug-in providing means to fix Ambient Color values in materials by locking them to the Diffuse Color for use in Radiosity calculations.

Class instances not creatable by MAXScript

Alias:

FixAmbient

Fix_Ambient Interfaces:

Interface: fixAmbientColors

Methods:

<boolean>fixAll prompt:<boolean>

prompt default value: true

Fixes all scene materials by enabling the Ambient-Diffuse lock. When the optional prompt parameter is set to False, the changes are performed immediately. When set to True or not supplied, a dialog showing all materials to be changed will be displayed. Returns True on success.

<boolean>fixSelected prompt:<boolean>

prompt default value: true

Fixes the materials of the selected objects by enabling the Ambient-Diffuse lock. When the optional prompt parameter is set to False, the changes are performed immediately. When set to True or not supplied, a dialog showing all materials to be changed will be displayed. Returns True on success.

<void>findAll <&material array>mtlsFound

mtlsFound is Out parameter

Finds all scene materials requiring fixing. Returns the materials in the by-reference array.

<void>findSelected <&material array>mtlsFound

mtlsFound is Out parameter

Finds materials of selected objects requiring fixing. Returns the materials in the by-reference array.

<void>find <&node array>objects <&material array>mtlsFound

objects is In parameter

mtlsFound is Out parameter

Finds materials of supplied objects requiring fixing. Returns the materials in the by-reference array.

<void>findMaterials <&material array>mtls <&material array>mtlsFound

mtls is In parameter

mtlsFound is Out parameter

Finds the materials from the supplied materials list requiring fixing. Returns the materials in the by-reference array.

<boolean>fix <&material array>mtls prompt:<boolean>

mtls is In parameter

prompt default value: true

Fixes the materials from the supplied list of materials by enabling the Ambient-Diffuse lock. When the optional prompt parameter is set to False, the changes are performed immediately. When set to True or not supplied, a dialog showing all materials to be changed will be displayed. Returns True on success.

Interface: FixAmbientActions

Methods:

<boolean>fixAmbientAll() -- Action Interface

Fixes all ambient colors.

<boolean>fixAmbientSelected() -- Action Interface

Fixes ambient colors of only selected nodes.

Actions:

Category: Fix_Ambient_Actions; Action: Fix_Ambient_All; Shortcut: -- none defined --

Category: Fix_Ambient_Actions; Action: Fix_Ambient_Selected; Shortcut: -- none defined --

See also

Interface: UtilityPanel


Instance_Duplicate_Maps : UtilityPlugin

This utility finds all duplicate maps and makes them instances instead of copies. Can affect user selection or all.

Class instances not creatable by MAXScript

Alias:

InstanceDuplMap

NOTE:

Animation is not supported, due to the breadth and complexity of controllers.

A warning message will be dispayed if animation is found.

Undo is not supported

Instance_Duplicate_Maps Interface:

Interface: InstanceDuplMapInterface

Methods:

<void>findDuplicateMap <&texturemap array>mapsFound

mapsFound is Out parameter

Finds duplicate maps, stores them in the by-reference mapsFound array

<void>findCopyMap <texturemap>duplMap <&texturemap array>mapsFound

mapsFound is Out parameter

Finds map copies of the supplied duplicate map, stores them in the by-reference mapsFound array

<bool>fixMap <&texturemap array>maps [prompt:<bool>]

maps is In parameter

prompt default value: true

Fixes the maps in the by-reference array. Propmpts the user if the optional prompt parameter is set to true.

<boolean>fixMapAll [prompt:<bool>]

prompt default value: true

Fixes all maps. Propmpts the user if the optional prompt parameter is set to true.

Instance_Duplicate_Maps Interface:

Interface: InstanceDuplMapActions

Methods:

<boolean>InstanceDuplMapAll() -- Action Interface

Actions:

Category: Instance_Duplicate_Map_Actions; Action: Instance_Duplicate_Map; Shortcut: -- none defined --


Lightscape_Materials : UtilityPlugin

Constructor:

Class instances not creatable by MAXScript

Lightscape_Materials represents the Utility Plug-in for managing Lightscape materials across multiple objects.

You can use the class in conjunction with the UtilityPanel interface to open the utility in the Utilities panel.

EXAMPLE

--Open the plug-in in the Utilities panel:

UtilityPanel.OpenUtility Lightscape_Materials

True

See also

Interface: UtilityPanel


Material_XML_Exporter: UtilityPlugin

This UtilityPlugin lets the user export materials to XML format via the Utilities tab for use in Architectural Desktop 2004 with VIZrender.

Its features are exposed to MAXScript through the Interface: XMLMaterial

Class instances not creatable by MAXScript

Alias:

XmlMtlExporter

Properties:

No properties exposed.

See also

Interface: XMLMaterial


Object_Display_Culling : UtilityPlugin

Object_Display_Culling : UtilityPlugin {6243908d,54e39616}

This Utility Plugin has been made obsolete by the updated Adaptive Degradation system available since 3ds Max 2008.

Object_Display_Culling: class instances not creatable by MAXScript

Properties:

<Object_Display_Culling>.Enable : boolean

<Object_Display_Culling>.DisplayMode : integer

<Object_Display_Culling>.Framerate : integer

<Object_Display_Culling>.AutoFramerate (Auto_Adjust_Framerate) : boolean

<Object_Display_Culling>.AffectSceneXrefs (Affect_Scene_XRefs) : boolean

Object_Display_Culling interfaces:

Interface: DisplayCulling

Methods:

<maxObject>GetInstance()


Panorama_Exporter: UtilityPlugin

This Utility provides export and viewing of 360-degrees panorama images.

Class instances not creatable by MAXScript

Properties:

No properties or methods exposed.

EXAMPLE

UtilityPanel.OpenUtility Panorama_Exporter

true


Scene_Effect_Loader : UtilityPlugin

This UtilityPlugin is used to load DirectX Pre and Post Effects which are applied to the whole scene. Available in 3ds Max 8 and higher.

Class instances not creatable by MAXScript

Aliases:

Scene_Effect_Loader

Scene_Effect_LoaderUtilityPlugin

Properties:

No properties or methods exposed.


ShineExp : UtilityPlugin

Constructor:

Class instances not creatable by MAXScript

The ShineExp UtilityPlugin renders the active viewport to a TIFF file. The TIFF file includes luminance and illuminance data that can be used for lighting analysis. (This is the 32-bit SGI LogLUV image type.)

NOTE:

The 2D Lighting Data Exporter does not render the TIFF file unless you have applied an exposure control to the scene.

The same utility was available in Autodesk VIZ4 under the name Lighting_Data_Export.

ShineExp interfaces:

Interface: ShineExport

Methods:

<boolean>doExport()

Presses the Export button in the Utility Plug-in, causing the export to the specified file. Returns true on success, false otherwise.

<boolean>doPickFile()

Presses the pick file button in the Utility Plug-in, causing a file selection dialog to be displayed. Returns true if a valid output file has been specified, false otherwise.

EXAMPLE

--Open the plug-in in the Utilities panel:

UtilityPanel.OpenUtility ShineExp

True

ShineExp.ShineExport.doPickFile()

True

ShineExp.ShineExport.doExport()

True

See also

Interface: UtilityPanel


SkinUtilities : UtilityPlugin

Allows you to open the SkinUtilities Utility in the Utilities tab. The features of the plug-in are exposed to MAXScript through the Interface: SkinUtils

Class instances not creatable by MAXScript

Alias:

SkinTools

Properties:

No properties or methods exposed.

See also

Skin : Modifier

Interface: SkinUtils

Interface: SkinPose


Substitute_Manager: UtilityPlugin

The Substitute Manager is a VIZ Render feature which enables replacement of an Autodesk Architectural Desktop 2004 objects or blocks with .max files.

Class instances not creatable by MAXScript

Properties:

No properties or methods exposed.


Visual_MAXScript: UtilityPlugin

Lets you open the Visual MAXScript Utility Plug-in using the UtilityPanel Interface.

Constructor

Class instances not creatable by MAXScript

Aliases

Visual_MAXScript

VisualMSUtil

EXAMPLE

--Open the Visual MAXScript utility in the Utilities panel

UtilityPanel.OpenUtility Visual_MAXScript

See also

Interface: UtilityPanel


Vertex_Paint_Startup_GUP: GlobalUtilityPlugin

Class instances not creatable by MAXScript

Alias:

PaintboxStartup


Mb_select : GlobalUtilityPlugin

Mb_select : GlobalUtilityPlugin #(345014077, 1349069035)

For internal use.

Class instances not creatable by MAXScript

Properties:

No Properties or Methods Exposed.


CommCenterGUP : GlobalUtilityPlugin

Superclass: MAXWrapperNonRefTarg ClassID: #(723954365, 2110432474)

Class instances not creatable by MAXScript

No Properties


Missing Object Classes

The following classes are used to represent objects in the scene for which the plug-in defining the object class is missing. An example of this is if you load a scene containing a Biped, but you do not have the Character Studio plugins, the biped objects will be retained in the scene, and the object’s class will be shown as the appropriate missing object class. These classes are not creatable by MAXScript and do not have any properties or methods.

Missing_Atmospheric

Standin for missing Atmospheric class objects.

Missing_Camera

Standin for missing Camera class objects.

Missing_Custom_Attribute_Plugin

Standin for missing Custom Attributes class objects.

Missing_Exposure_Control

Standin for missing Exposure Control class objects.

Missing_Float_Control

Standin for missing Float controller class objects.

Missing_GeomObject

Standin for missing Geometry object class objects.

Missing_Helper

Standin for missing Helper object class objects.

Missing_Light

Standin for missing Light object class objects.

Missing_Matrix3_Control

Standin for missing Matrix3 controller class objects.

Missing_Morph_Control

Standin for missing Morph controller class objects.

Missing_Mtl

Standin for missing Material class objects.

Missing_OSM

Standin for missing Object Space Modifier class objects.

Missing_Point3_Control

Standin for missing Point3 controller class objects.

Missing_Point4_Control

Standin for missing Point4 controller class objects.

Missing_Position_Control

Standin for missing Position controller class objects.

Missing_Radiosity

Standin for missing Radiosity class objects.

Missing_RefMaker

Standin for missing Reference Maker class objects.

Missing_RefTarget

Standin for missing Reference Target class objects.

Missing_Render_Effect

Standin for missing Render Effect class objects.

Missing_Render_Element_Plug_in

Standin for missing Render Element class objects.

Missing_Renderer

Standin for missing Renderer class objects.

Missing_Rotation_Control

Standin for missing Rotation controller class objects.

Missing_Scale_Control

Standin for missing Scale controller class objects.

Missing_Shader_Plug_in

Standin for missing Shadow Generator class objects.

Missing_Shadow_Type

Standin for missing Shadow Generator class objects.

Missing_Shape

Standin for missing Shape class objects.

Missing_System

Standin for missing System class objects.

Missing_Texture_Bake_Element

Standin for missing Texture_Bake_Element class objects.

Missing_TextureMap

Standin for missing TextureMap class objects.

Missing_UVGen

Standin for missing UVGen class objects.

Missing_WSM

Standin for missing World Space Modifier class objects.

Missing_WSM_Object

Standin for missing World Space Modifier Object class objects.

Missing_XYZGen

Standin for missing XYZGen class objects.


Scripting Vertex and Control Point Animation

You can add animation to vertices in editable meshes, spline shapes and FFD modifiers using the animateVertex() method. Its syntax is:

animateVertex <node_or_ffd_modifier> <vertex_spec>

Animates one or more vertex, knot, or control point, where <vertex_spec> is one of

<index>

<index_array>

#all

#selected -- not applicable for FFD modifiers

For FFD modifiers, the animateAll() method will animate all the control points, and is equivalent to animateVertex <ffd_modifier> #all.

Its syntax is:

animateAll <ffd_modifier>

Animates all control points.

The animateVertex() and animateAll() methods effectively assign controllers to editable meshes, spline shapes and FFD modifiers which make them appear as animatables in the Track View, allowing further scripting of these vertex animation controllers.

EXAMPLES

animateVertex $line01 2

animateVertex $box01 #(2,3,4,5)

animateAll $box01.ffd_3x3x3

These animateVertex() method only work on editable meshes, spline shapes and FFD modifiers and will report an error if applied to other types of objects. You can use the functions convertToMesh() and convertToSplineShape() to convert existing geometry into the needed forms. Note that Line objects are SplineShapes already and don't need conversion.

The vertices to be animated are specified by index number, with the keyword #all to animate all vertices or control points, or #selected to animate the currently selected vertices. The #selected keyword is not applicable to FFD modifiers. In the case of SplineShapes, the vertex index numbers are interpreted in a special way to accommodate tangent handles and multiple curves, as follows:

  • Each SplineShape vertex has three indexes, one for each in-tangent handle, vertex, and out-tangent handle, in that order.

  • The indexes run consecutively through each curve in a multi-curve shape, with the index number for the first in-tangent handle of a curve starting after the index of the last out-tangent handle in the prior curve.

See also Class and Object Inspector Functions for details on accessing the vertices, tangents, or control points.

For information about scripting FFD control placement within FFD lattice space, see also the getModContextBBoxMin() and getModContextBBoxMin() functions, as described in Modifier Common Properties, Operators, and Methods .

For editable meshes and spline shapes, the controller values assigned to the vertices, knots, and tangent handles is in object space. See Using Node Transform Properties for information on converting between world space to object space.


ViewportManagerCustAttrib : CustAttrib

ViewportManagerCustAttrib - superclass: CustAttrib; super-superclass:MAXWrapper - 4:0 - classID: #(1510353212, 809634846)

Constructor

Class instances not creatable by MAXScript.

<ViewportManagerCustAttrib>.effect Integer default: 0 -- integer; EffectList

<ViewportManagerCustAttrib>.enabled Boolean default: false -- Boolean

<ViewportManagerCustAttrib>.dxStdMat BooleanClass default: false -- Boolean

Get/set the status of the DirectX Standard Material display.

<ViewportManagerCustAttrib>.SaveFXFile UndefinedClass default: undefined -- filename;

Get/set the file name of the FX file.

ViewportManagerCustAttrib Interface:

Interface: viewportmanager

Methods:

<integer>getNumViewportEffects()

Returns the number of available viewport effects.

<maxObject>getActiveViewportEffect()

Returns the active viewport effect.

<maxObject>setViewportEffect <integer>effectindex

Sets the indexed viewport effect as the active effect.

<string>getViewportEffectName <integer>effectindex

Returns the name of the indexed viewport effect.

<float>activateEffect <material>material <boolean>state

Enables/Disables the viewport effect for the specified material.

<bool>isDxStdMatEnabled()

Returns true if the DirectX Standard Material display is enabled, false otherwise.

<void>activateDxStdMat <bool>active

When the parameter is true, enables the DirectX Standard Material display in the viewports, when false, disables it.

<bool>saveFXFile <filename>filename

Saves the DirectX Shader to the supplied FX file name.

<string>getActiveEffectName()

Returns the name of the active effect as string.

ViewportManagerCustAttrib Interface:

Interface: SaveEffectFile

Methods:

<boolean>SaveAsFXFile() -- Action Interface

<boolean>DXDisplay() -- Action Interface

Actions:

Category: DirectX_Manager; Action: Save_as__FX_File; Shortcut: -- none defined --

Category: DirectX_Manager; Action: DX_Display; Shortcut: -- none defined --

See also

DirectX_9_Shader : Material

Interface: dxshadermanager

CubeMap : ReferenceTarget

LightMap : ReferenceTarget

Membrane_Shader : ReferenceTarget

Metal_Bump : ReferenceTarget


RayMeshGridIntersect : ReferenceTarget

RayMeshGridIntersect - superclass: ReferenceTarget; super-superclass:MAXWrapper - 1:0 - classID: #(930131240, 656216840)

Provides advanced ray-to-mesh intersection methods using a uniform voxel grid as acceleration method.

Properties

<RayMeshGridIntersect>.nodeList ArrayParameter default: #() -- node array; Node_List

RayMeshGridIntersect interfaces:

Interface: rayMeshGridIntersectOps

Methods:

<void>initialize <integer>gridSize

Initializes the voxel grid with the specified grid size. The grid size value defines the number of voxels along all 3 axes. The actual size of the voxels depends on the bounding box of the nodes to be processed.

<void>addNode <node>addNode

Adds a node to the node list.

<void>buildGrid()

Fills in the voxel grid with data.

<void>free()

Removes all data from the voxel grid.

<integer>intersectBox <point3>min <point3>max

Performs a box intersection using the specified min. and max. points in world space.

<integer>intersectSphere <point3>center <float>radius

Performs a sphere intersection using the specified center and radius.

<integer>intersectRay <point3>p <point3>dir <boolean>doubleSided

Performs a ray intersection using the specified position and direction.

If the doubleSided argument is false, only intersection with faces whose normals point towards the ray will be collected. When it is true, the faces will be considered double-sided and intersected even when their normals are pointing in the direction of the ray.

The result is 0 if not intersection was detected, or a positive number representing the number of faces that have been intersected.

<integer>intersectSegment <point3>p1 <point3>p2 <boolean>doubleSided

Performs a segment intersection using the specified two world positions. This is similar to intersectRay, but instead of a point and direction, the intersection ray is defined using two absolute positions in space, where p1 is the origin and the direction is from p1 to p2.

If the doubleSided argument is false, only intersection with faces whose normals point towards the ray will be collected. When it is true, the faces will be considered double-sided and intersected even when their normals are pointing in the direction of the ray.

The result is 0 if no intersection was detected, or a positive number representing the number of faces that have been hit.

<integer>getHitFace <integer>index

Returns the index of the TriMesh face for the indexed hit. The index can be a positive number between 1 and the number of hits reported by the last intersection method.

<point3>getHitBary <integer>index

Returns the Barycentric Coordinates of the TriMesh face for the indexed hit. The index can be a positive number between 1 and the number of hits reported by the last intersection method.

<point3>getHitNormal <integer>index

Returns the face normal of the TriMesh face for the indexed hit in world space. The index can be a positive number between 1 and the number of hits reported by the last intersection method.

<float>getHitDist <integer>index

Returns the distance to the indexed hit. The index can be a positive number between 1 and the number of hits reported by the last intersection method.

<integer>intersectSegmentDebug <point3>p1 <point3>p2 <boolean>doubleSided <integer>gridID

This method is for debugging purposes only.

<integer>getClosestHit()

Returns the index of the closest hit.

<integer>getFarthestHit()

Returns the index of the farthest hit.

<integer>closestFace <point3>p

Performs intersections from the specified world point with all faces and returns the number of hits as integer. You can use the getClosestHit() and getFarthestHit() to determine the closest and farthest faces to the specified world point, getHitDist() to determine the distance to every face, and getPerpDist() to determine the perpendicular distance to the point.

<float>getPerpDist <integer>index

Returns the perpendicular distance to the indexed hit. The index can be a positive number between 1 and the number of hits reported by the last intersection method.

<void>ClearStats()

Clears all statistics.

<void>PrintStats()

Prints current statistics, including number of faces and number of searches performed.

The following example creates a sphere and a geosphere, registers the sphere with the voxel grid and then shoots rays from each vertex of the geosphere and selects the faces of the sphere that these rays have hit.

EXAMPLE

(

resetMaxFile #noprompt --reset the scene

theSphere = Sphere radius:40 segs:50 pos:[100,200,300] --create a sphere

theGeoSphere = Geosphere radius:100 segs:3 pos:[100,200,300] --create a geosphere

theFacesArray = #() --init. an array to collect face selection

rm = RayMeshGridIntersect() --create an instance of the Reference Target

rm.Initialize 10 --init. the voxel grid size to 10x10x10

rm.addNode theSphere --add the sphere to the grid

rm.buildGrid() --build the grid data (collecting faces into the grid voxels)

theGSMesh = snapshotasmesh theGeoSphere --grab the TriMesh of the Geosphere

for v = 1 to theGSMesh.numverts do --go through all verts of the Geosphere

(

thePos = getVert theGSMesh v --get the position of the vertex

theNormal = -(getNormal theGSMesh v) --get the normal of the vertex, reverse direction

theHitsCount = rm.intersectRay thePos theNormal false --intersect the ray with the sphere

if theHitsCount > 0 then --if have hit anything...

(

 theIndex = rm.getClosestHit() --get the index of the closest hit by the ray

 theFace = rm.getHitFace theIndex --get the face index corresponding to that indexed hit

 append theFacesArray theFace --add to the face array to select the face...

)

else

 format "The Ray % Missed\n" v

)

ms = mesh_select() --create a mesh select modifier

addModifier theSphere ms --add on top of the sphere

select theSphere --select the sphere

max modify mode --go to modify panel

setFaceSelection theSphere 1 theFacesArray --set the selection in the MeshSelect

subObjectLevel = 3 --go to face selection level

)

See also

MeshProjIntersect : ReferenceTarget

IntersectRay

IntersectRayExt


MeshProjIntersect : ReferenceTarget

MeshProjIntersect - superclass: ReferenceTarget; super-superclass:MAXWrapper - 0:0 - classID: #(1266304708, 865233301)

This class exposes an interface that is used by the Projection Mapping tools to find the projection of one mesh point onto another mesh.

MeshProjIntersect interfaces:

Interface: rayMeshProjIntersectOps

Methods:

<void>SetNode <node>node

Sets the node to perform the intersections on. Multiple nodes can be added to the same instance of the intersector interface. Use the GetHitNode() method to determine which of the nodes added to the intersector was hit.

<void>Build()

Builds the internal data structures for fast intersections. This method has to be called after adding the nodes.

<void>Free()

Removes the internal data structures, frees memory.

<boolean>ProjectionFace <integer>triIndex <point3 by value>triBary

Performs a face projection.

The triIndex argument is the 0-based face index.

The triBary argument specifies the barycentric coordinates of the point in the face.

Returns true on success, false if no valid projection could be performed.

When performing Projection Mapping, a low-resolution working model and a high-resolution reference model are used. A cage is defined around the working model which has to completely surround the reference model. Every point on the high-resolution reference model corresponds to a point on the low-resolution working model. There can be multiple reference modes for one working model.

To use this method,

  • Create an instance of the MeshProjIntersect class.

  • Call SetNode() passing the low-resolution working model and call Build() to generate the acceleration data. It must have a Projection modifier applied.

  • The Projection modifier must have one or more reference models defined.

  • Call the ProjectionFace() method with the face index and barycentric coordinates of any point on the surface of the working model.

As result, the ProjectionFace() method sets the internal values to hits on the reference models. The method getHitNode() will return the reference model that was hit, getHitFace() will return the face index, getHitPos() will return the position of the hit and so on. See further on this page for details.

<boolean>ClosestFace <point3 by value>point dir:<point3 by value> caged:<boolean> doubleSided:<boolean>

dir default value: [0,0,0]

caged default value: false

doubleSided default value: false

Returns the closest face to the given point is space.

If the optional dir: keyword parameter is supplied and is not [0,0,0], the closest face in the given direction is detected.

If the optional doubleSided: keyword parameter is supplied and is true, both facing and backfacing faces will be considered.

Returns true if a closest face has been found, false otherwise.

WARNING!

Currently, you have to call the IntersectRay() method AT LEAST ONCE before calling the ClosestFace() method - some internal structures required for closest face calculations are only initialized when performing intersections!

The results from the IntersectRay() call should not be trusted though. See warning further on this page.

<fpvalue by value>GetHitDist hitIndex:<integer>

hitIndex default value: -1

Returns the distance to the hit.

If the optional hitIndex: keyword argument is not supplied or is supplied as -1, the closest hit is returned. If it is supplied and is a positive integer, the distance to the corresponding indexed hit is returned. See warning below.

WARNING!

After calling the ClosestFace() method, you MUST NOT specify the hitIndex: optional parameter when calling any of the following methods! There is only one possible closest face and attempting to pass a value other than -1 can cause instabilities or incorrect results.

<fpvalue by value>GetHitNode hitIndex:<integer>

hitIndex default value: -1

Returns the node that has been hit.

If the optional hitIndex: keyword argument is not supplied or is supplied as -1, the node of the closest hit is returned. If it is supplied and is a positive integer, the node of the corresponding indexed hit is returned.

See previous warning regarding getting data after a ClosestFace() call.

<fpvalue by value>GetHitFace hitIndex:<integer>

hitIndex default value: -1

Returns the ZERO-BASED index of the face that has been hit.

If the optional hitIndex: keyword argument is not supplied or is supplied as -1, the closest face hit is returned. If it is supplied and is a positive integer, the face of the corresponding indexed hit is returned.

See previous warning regarding getting data after a ClosestFace() call.

NOTE:

The face indexing can change between a geometry primitive and the Editable Mesh version of the same geometry. For example, a plane with just two faces would return a hit as face 0 when using the primitive geometry but 1 for the same hit when using a collapsed version of the same object.

This is normal but quite rarely visible through MAXScript since no other methods provide access to the actual underlying geometry of primitives - the other intersection and mesh methods operate on objects already converted to mesh.

<fpvalue by value>GetHitBary hitIndex:<integer>

hitIndex default value: -1

Returns the barycentric coordinates of the hit.

If the optional hitIndex: keyword argument is not supplied or is supplied as -1, the barycentric coordinates of the closest hit are returned. If it is supplied and is a positive integer, the barycentric coordinates of the corresponding indexed hit are returned.

See previous warning regarding getting data after a ClosestFace() call.

<fpvalue by value>GetHitBackfacing hitIndex:<integer>

hitIndex default value: -1

Returns the backfacing hit.

If the optional hitIndex: keyword argument is not supplied or is supplied as -1, the closest backfacing hit is returned. If it is supplied and is a positive integer, the corresponding indexed backfacing hit is returned.

See previous warning regarding getting data after a ClosestFace() call.

<fpvalue by value>GetHitPos hitIndex:<integer>

hitIndex default value: -1

Returns the world position of the hit.

If the optional hitIndex: keyword argument is not supplied or is supplied as -1, the position of the closest hit is returned. If it is supplied and is a positive integer, the position of the corresponding indexed hit is returned.

See previous warning regarding getting data after a ClosestFace() call.

<boolean>IntersectRay <point3 by value>point <point3 by value>dir doubleSided:<boolean>

doubleSided default value: false

Performs a ray intersection with the nodes set using SetNode() from the world space position defined by the point parameter in the direction of the vector specified by the dir parameter.

If the optional doubleSided: keyword parameter is supplied and is true, intersections will be performed with both the front and the backside of the faces.

Returns true if the ray has hit any faces, false if there was no intersection.

WARNING!

This method is currently considered broken and should not be used to perform actuall intersections. Under some circumstances it can return incorrect results.

See also

RayMeshGridIntersect : ReferenceTarget

IntersectRay

IntersectRayExt


DWG Import - Related Classes

The following DWG Import-related classes have been added to 3ds Max 6 but have no properties or methods exposed to MAXScript.

AlwaysEqualFilter: ReferenceMaker

Class instances not creatable by MAXScript

Block_Manager_Wrapper: FloatController

Class instances not creatable by MAXScript

Alias:

BlockMgrWrapper

BlockInstanceFilter: ReferenceMaker

Class instances not creatable by MAXScript

BoolPacket: ReferenceMaker

Class instances not creatable by MAXScript

Contour_Data_Packet: ReferenceMaker

Class instances not creatable by MAXScript

Contour_Translator: ReferenceMaker

Class instances not creatable by MAXScript

DoublePacket: ReferenceMaker

Class instances not creatable by MAXScript

DwgAlwaysEqualFilter: ReferenceMaker

Class instances not creatable by MAXScript

DwgBlockDefinitionFilter: ReferenceMaker

Class instances not creatable by MAXScript

DwgBlockInsAsNodeHierarchyFilter: ReferenceMaker

Class instances not creatable by MAXScript

DwgBlockInsertFilter: ReferenceMaker

Class instances not creatable by MAXScript

DwgCameraPacket: ReferenceMaker

Class instances not creatable by MAXScript

DwgColorFilter: ReferenceMaker

Class instances not creatable by MAXScript

DwgEnhancedLayerFilter: ReferenceMaker

Class instances not creatable by MAXScript

DwgEnhLayerPacket: ReferenceMaker

Class instances not creatable by MAXScript

DwgEntityPacket: ReferenceMaker

Class instances not creatable by MAXScript

DwgExtrusionFilter: ReferenceMaker

Class instances not creatable by MAXScript

DwgFactory: ReferenceMaker

Class instances not creatable by MAXScript

DwgFilterList: ReferenceMaker

Class instances not creatable by MAXScript

DwgGridPacket: ReferenceMaker

Class instances not creatable by MAXScript

DwgHandleFilter: ReferenceMaker

Class instances not creatable by MAXScript

DwgLayerFilter: ReferenceMaker

Class instances not creatable by MAXScript

DwgLayerTable: ReferenceMaker

Class instances not creatable by MAXScript

Alias:

FileLink_DwgLayerTable

DwgLightPacket: ReferenceMaker

Class instances not creatable by MAXScript

DwgPluginTranslatorForwardingFilter: ReferenceMaker

Class instances not creatable by MAXScript

DwgPointTrans: ReferenceMaker

Class instances not creatable by MAXScript

DwgTableEntryPacket: ReferenceMaker

Class instances not creatable by MAXScript

DwgTableRecord: ReferenceMaker

Class instances not creatable by MAXScript

FloatPacket: ReferenceMaker

Class instances not creatable by MAXScript

Instance_Manager_Wrapper:

Class instances not creatable by MAXScript

Alias:

InstanceMgrWrapper

Int64Packet: ReferenceMaker

Class instances not creatable by MAXScript

IntPacket: ReferenceMaker

Class instances not creatable by MAXScript

Link_Transform:

Class instances not creatable by MAXScript

LinkCompositeshape:

Class instances not creatable by MAXScript

LinkOriginPtHelper:

Class instances not creatable by MAXScript

Mb_select:

Class instances not creatable by MAXScript

NullFilter: ReferenceMaker

Class instances not creatable by MAXScript

PointPacket: ReferenceMaker

Class instances not creatable by MAXScript

Raster_Image_Packet: ReferenceMaker

Class instances not creatable by MAXScript

Raster_Image_Translator: ReferenceMaker

Class instances not creatable by MAXScript

SortKey: ReferenceTarget

Class instances not creatable by MAXScript

StringPacket: ReferenceMaker

Class instances not creatable by MAXScript

Substituion_Offset_Transform:

Class instances not creatable by MAXScript

VzMaterialTable: ReferenceTarget

Class instances not creatable by MAXScript

Alias:

FileLink_VzMaterialTable

VzObjectTable: ReferenceMaker

Class instances not creatable by MAXScript

VzObjectTableRecord: ReferenceMaker

Class instances not creatable by MAXScript


Link_Transform : Matrix3Controller

Value > MAXWrapper > Controllers > Matrix3Controller > Link_Transform

Constructor

Link_Transform controllers are created when a DWG file is linked. For each of the objects created by the DWG link, a Link_Transform controller is assigned to the transform track of the object, and the transform controller from the DWG file is applied as a child of the Link_Transform controller. Link_Transform controllers are not creatable in MAXScript.

Properties

<link_transform>.transform Matrix3Controller

Contains the transform controller below the link_transform controller

See also

Controller Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


LinkComposite : GeometryClass

LinkComposite - GeometryClass

Value > MAXWrapper > Node > GeometryClass > LinkComposite

Constructor

LinkComposite objects are created when a DWG file is linked by Autodesk VIZ. Each of the Autodesk VIZ objects created by the DWG link is created as an instance of this class. LinkComposite objects are not creatable in MAXScript.

NOTE:

This class is not available in 3ds Max.

Properties

There are no properties associated with this class.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


LinkOriginPtHelper : Helper

LinkOriginPtHelper - Helper

Constructor

LinkOriginPtHelper objects are created when a DWG file is linked by Autodesk VIZ. A LinkOriginPtHelper object is created, and then each of the Autodesk VIZ objects created by the DWG link is created as a child object of the LinkOriginPtHelper. LinkOriginPtHelper objects are not creatable in MAXScript.

NOTE:

This class is not available in 3ds Max.

Properties

There are no properties associated with this class.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


FileLink_LinkTable : FloatController

FileLink_LinkTable : FloatController {a20bbe82,70c763d}

Class instances not creatable by MAXScript

Properties:

No Properties or Methods Exposed.


Architectural Desktop Import

The following classes provide access to Architectural Desktop objects imported into 3ds Max.

ADT_Category : ReferenceTarget

ADT_Style : ReferenceTarget

ADT_Object_Manager_Wrapper : FloatController

ADT_Object_Manager : ReferenceTarget

ADT_StyleComposite : ReferenceTarget

ADT_SyleLeaf : ReferenceTarget


ADT_Category : ReferenceTarget

This class provides access to the Category of Architectural Desktop objects imported into 3ds Max.

Class instances not creatable by MAXScript.

Alias:

ADTCategory

ADT_Category interfaces:

Interface: IADTCategory

Properties:

.Name : string : Read|Write

Get/set the name of the Category

.numStyles : integer : Read

Returns the number of styles.

.numInstances : integer : Read

Returns the number of instances.

Methods:

<integer>GetStyles <&Interface array>styles

styles is In parameter

See also

ADT_Style : ReferenceTarget

Architectural Desktop Import


ADT_Style : ReferenceTarget

This class provides access to the Style of Architectural Desktop objects imported into 3ds Max.

Class instances not creatable by MAXScript.

Alias:

ADTStyle

ADT_Style interfaces:

Interface: IADTStyle

Properties:

.Name : String : Read|Write

Get/set the name of the Style

.numComponents : integer : Read

Returns the number of components.

.numInstances : integer : Read

Returns the number of instances.

Methods:

<Interface>GetCategory()

Returns an ADT_Category MixinInterface providing access to the category.

<integer>SetInstance <node>styleInst <bool>hasCompVisOvrd

<bool>RemoveInstance <node>styleInst

<Interface>SetComponent <integer>styleInstIterator <node>compInst <String>compName <bool>hasMtlOvrd <bool>keepRelTransf

compName is In parameter

<bool>RemoveComponent <String>compName

compName is In parameter

<Interface>GetCompositeStyle()

<integer>GetComponents <&Interface array>components

components is In parameter

<integer>GetInstances <&node array>instances <&bitArray>mtlOverrides

instances is In parameter

mtlOverrides is In parameter

<integer>FindInstance <node>node <*bool>mtlOverride

mtlOverride is In parameter

See also

ADT_Category : ReferenceTarget

Architectural Desktop Import


ADT_Object_Manager : ReferenceTarget

Class instances not creatable by MAXScript

Properties:

No properties or methods exposed.

See also

Architectural Desktop Import


ADT_Object_Manager_Wrapper : FloatController

Class instances not creatable by MAXScript

Alias:

ADTObjMgrWrapper

Properties:

No properties or methods exposed.

See also

Architectural Desktop Import


ADT_StyleComposite : ReferenceTarget

Class instances not creatable by MAXScript

Alias:

ADTStyleComp

Properties:

No properties or methods exposed.

See also

Architectural Desktop Import


ADT_SyleLeaf : ReferenceTarget

Class instances not creatable by MAXScript

Properties:

No properties or methods exposed.

See also

Architectural Desktop Import


AdtObjTranslator : ReferenceMaker

Class instances not creatable by MAXScript

Properties:

No properties or methods exposed.

See also

Architectural Desktop Import


RefTargMonitor : ReferenceTarget

This class can hold an indirect reference to any ReferenceTarget. It was added mainly for internal testing, but was left accessible as someone could find it useful in a script.

Available in 3ds Max 9 and higher.

Interface: IRefTargMonitor

Properties:

.refTarg : maxObject : Read|Write

Get/set the maxObject to monitor.

.persist : bool : Read|Write

Get/set whether the monitoring should persist.


Scripted Utilities

Scripted Utilities and Rollouts

MAXScript provides a set of classes and functions and some special syntax to allow you to construct custom rollouts that can be incorporated into the existing 3ds Max user interface. You typically use custom rollouts to provide a point-and-click interface to a tool that you have written or want to write in MAXScript, so users of your tool don't have to work with it at the script level.

There are several places in the 3ds Max user interface where you can install scripted rollouts:

  • In the Utilities panel . Use the utility definition construct in MAXScript to define and install scripted utilities. Once installed, they appear in the Utilities list at the bottom of the MAXScript rollout. If the user selects a utility in this list, its rollout(s) appear below the MAXScript rollout and functions just like a plug-in utility. This was the original way of creating scripted utilities when MAXScript was first introduced in 3ds Max 2. The main benefit of using a scripted utility is that it can be created very fast and does not require much management code to add rollouts and perform operations onto the scene so it is a good way to start into scripting. The main drawback is that the Utilities rollout is narrow and rather hidden and cannot be open at the same time as the Create and Modify tabs of the Command Panel.

  • In special modeless rollout floater windows that you can create with the newRolloutFloater() function. These windows appear on the desktop and function in a way similar to the Material Editor and the Selection floater in 3ds Max. You can click to alternate between them and the main 3ds Max user interface. You create individual rollout(s) for these windows using the rollout definition construct in MAXScript and install them in a rollout floater window using the addRollout()function.

  • In floating scripted Dialogs . Dialogs are not a holder for rollouts but a special display form of an existing rollout. They can be created out of a rollout using the createDialog() function.

  • In scripted plugins . Scripted plugins can contain one or more rollouts which will be displayed inside the Command Panel's Create and Modify tabs and can be linked to Parameter Blocks for automatic animation track management.

  • In Custom Attributes added to scene objects or modifiers. Custom Attributes are a special form of a Parameter Block that can be attached to other objects.

Choosing which place is best for your scripted rollouts depends on a number of factors. It is best to keep them in the Utilities panel if possible, as that maximizes the use of the screen and is consistent with the 3ds Max user interface conventions. However sometimes it is useful to have them in a modeless window if the user of your tool needs to move between the various command panels while using the tool. In some cases, you might want to provide a "float me" button on a scripted Utility rollout, similar to the Color Clipboard utility, so the user can choose to display the rollouts in a rollout floater window or in the Utilities panel.

The following topics provide information about scripting utility panels and rollout floater windows:

Scripted Utility Panels

Utility Clauses

Managing Multiple Rollouts in a Scripted Utility

Rollout Clauses

Utility and Rollout Properties, Methods, and Event Handlers

Rollout User-Interface Controls

Visibility of Locals, Functions, Structures, and User-Interface Items in Rollout Code

Accessing Locals and Other Items in a Rollout from External Code

Rollout Floater Windows


Scripted Utility Panels

A scripted utility panel is created using the utility definition construct in MAXScript. The top-level syntax is as follows:

utility <var_name> <description_string>
[ rolledUp:<boolean> ] [ silentErrors:<boolean> ]
( <utility_body> )

The <var_name> is the name of an automatically created global variable to hold the value that represents the scripted utility panel.

The <description_string> is a string which is used as the description for the utility in the Utilities list in the MAXScript rollout.

The optional rolledUp: parameter specifies whether the utility rollout is initially rolled up. If set to true, the utility rollout is initially rolled up. The default value is false.

The optional silentErrors: parameter controls whether MAXScript runtime error messages are displayed while executing the scripted utility. If this parameter is set to false, error messages are displayed to Listener and possibly to a pop-up error dialog, and continued execution of the utility is terminated. If this parameter is set to true, error messages will not be displayed, and continued execution of the utility is permitted. Setting this parameter to true is useful for distributed scripted plug-ins that may confuse the user with MAXScript error messages. The default value is false.

The <utility_body> is inside the required parentheses and is a sequence of clauses that defines the user-interface items that will appear in the utility, along with functions and event handlers that process user interactions, as defined in detail in Utility Clauses .

Here is a short example that implements a utility for spreading the positions of the objects in the current selection. It installs a Spread objects entry in the Utilities list. When opened, the Spread objects rollout has three check boxes and one spread amount spinner. The spread spinner event handler is called whenever the user adjusts the spinner, and the event handler expression computes a new position for the objects in the selection, testing the state of each check box to control the spread.

EXAMPLE

utility spread "Spread objects" -- define the utility name and description string

(

local last_amt = 0 -- define and initialize local variable

checkbox x "Spread in x" -- create 3 checkboxes

checkbox y "Spread in y"

checkbox z "Spread in z"

spinner spread "Spread amount:" range:[-1000,1000,0] -- create a spinner

on spread changed amt do -- when spinner value changes...

(

delta = amt - last_amt -- calculate difference in current and previous

for obj in selection do -- values for each selected object

(

-- calculate new position based on current position and selection center

p = obj.pos + normalize (obj.pos - selection.center) * delta

if x.checked then obj.pos.x = p.x -- if checkbox x checked, apply X position

if y.checked then obj.pos.y = p.y -- if checkbox y checked, apply Y position

if z.checked then obj.pos.z = p.z -- if checkbox z checked, apply Z position

)

last_amt = amt -- store spinner value as previous value

) -- end of "on spread changed"

) -- end of utility definition

The Utilities panel rollout created by the previous script looks like the following figure. The Close button is automatically created by MAXScript in the utility rollout, and closes the rollout.

Spread objects rollout

Evaluating a utility definition does several things. It creates a new value which is an instance of the Rollout class and contains the utility definition. It assigns this value to the named global variable and installs the utility description in the Utilities list in the MAXScript rollout. At this point, the user can select the utility from the Utilities list and the utility’s rollout(s) will open.

NOTE:

If a scripted utility already exists with the same description, the old rollout(s) is replaced with the new one(s), even if it is currently open in the Utilities panel. This allows you to incrementally develop a utility. Each time you modify and evaluate its definition, the old version is replaced with the new one.

See also

Scripted Utilities

Utility Clauses

Managing Multiple Rollouts in a Scripted Utility


Utility Clauses

The <utility_body> of a scripted utility definition is composed of a sequence of utility clauses as follows:

<utility_body> ::= { <utility_clause> }+

where

<utility_clause> ::= <rollout_clause> | <nested_rollout>

A <utility_clause> can contain one or more instances of <rollout_clause> or <nested_rollout>. A nested rollout is basically another self-contained rollout definition which can be used to construct scripted utilities with multiple rollouts or populate rollout floater windows that may be associated with the utility. A <nested_rollout> is defined as follows:

rollout <var_name> <description_string>
 [ rolledUp:<boolean> ] [ silentErrors:<boolean> ]
 ( <rollout_body> )

where

<rollout_body> ::= { <utility_clause> }+

In other words, a rollout definition is identical to a utility definition except its description string is not displayed in the Utilities list in the MAXScript rollout. In fact, a utility can just be considered a special case of a rollout, and both are instances of the Rollout class.

As an example, consider the following script. In this script, line 1 defines the start of the utility, and the utility body is lines 2 through 42. The following line ranges are utility clauses: 3 (a rollout clause), 5 to 9 (a nested rollout), 11 to 30 (a nested rollout), 32 to 35 (a rollout clause), and 37 to 40 (a rollout clause).

SCRIPT

utility MyUtil "My Utility"

(

local pot

rollout bout "About My Utility"

(

button aboutMU "About" width:45 height:20

on aboutMU pressed do

messagebox "My First Utility\nby ME\nVersion .1" \

title:"About My Utility"

)--end rollout bout

rollout creator "The Teapot"

(

group "Object Creator"

(

button tea "Teapot"

spinner rad "Radius" range:[10,50,20] type:#integer

spinner seg "Segments" range:[4,32,12] type:#integer scale:1

)

on tea pressed do

(

pot=teapot radius:rad.value

pot.name="TestPot"

pot.segs=seg.value

) -- end on tea pressed

on rad changed value do

pot.radius=value

on seg changed value do

pot.segs=seg.value

) -- end rollout creator

on MyUtil open do

(

addRollout bout

addRollout creator

) -- end on MyUtil open

on MyUtil close do

(

removeRollout bout

removeRollout creator

) -- end on MyUtil close

)--end utility MyUtil

The Utilities panel rollouts created by the previous script look like the following:

Multiple rollouts defined in a utility

You can also define rollouts outside utility definitions when you want to add them to a rollout floater window that may not be associated with a scripted utility. This is described more fully in Rollout Floater Windows .

A value is created for a utility or rollout when the script defining the utility or rollout is executed. In general, the lifetime of a utility value is the entire 3ds Max session, unless a new utility with the same name is executed. The lifetime of a rollout defined in a utility is the lifetime of the utility value. The lifetime of a rollout defined outside a utility is the lifetime of the context the rollout was defined in. For more information, see Scope of Variables .

See also

Scripted Utilities

Scripted Utility Panels

Managing Multiple Rollouts in a Scripted Utility


Managing Multiple Rollouts in a Scripted Utility

MAXScript includes support for managing multiple rollouts in one utility, which is useful in large scripted utilities that would be unwieldy in one rollout. There is one main rollout defined by the user-interface items in the utility definition itself. The other rollouts are defined as nested rollouts within the body of the utility definition. These other rollouts can be added to and removed from the Utilities panel under script control.

You define extra rollouts with the rollout clause inside a utility definition:

utility foo "name"

(

local ...

spinner ...

...

rollout baz "name"

(

local ...

checkbox ..

on ...

)

...

)

Such nested rollouts can contain anything a utility definition can contain with the exception of further nested rollouts. Nested rollouts are not automatically opened or closed when the parent utility rollout opens and closes. You need to explicitly do this in the open and close handlers or other handlers or functions in the utility.

There are two functions for this:

addRollout <rollout> [ rolledUp:<boolean> ]

removeRollout <rollout>

The rolledUp: parameter on the addRollout() function specifies whether the rollout is added in a rolled-up state. This defaults to false, so the rollout is added fully opened. The nested rollouts are arranged in the order of addRollout() calls, so take care in sequencing these to ensure the order you want.

The nested rollouts do not automatically get removed when the main utility rollout is closed. You must make sure they are explicitly removed, typically in the close handler for the main utility.

To always open and close extra rollouts when the main utility is opened and closed, place addRollout() and removeRollout() calls in the main utility open and close handlers.

FOR EXAMPLE

on foo open do

(

...

addRollout panel_1

addRollout panel_2 rolledUp:true

...

)

on foo close do

(

...

removeRollout panel_1

removeRollout panel_2

...

)

Calling removeRollout() on an already closed rollout is OK and does nothing. If, during utility development, you forget to close a nested rollout, closing the entire MAXScript utility will remove any remaining open scripted rollouts.

Because these rollout definitions are nested within a utility, all the locals, functions, and other items in the utility are visible to nested rollouts, following the standard nested scoping in MAXScript. This means you can "reach out" and access the utility’s locals, user-interface control items, and functions.

Conversely, user-interface control items and locals in nested rollouts are exposed as properties of that rollout, so code in the main utility or other rollouts can "reach in" and access them. In the following example, the spinner bar change handler looks at the state of a check box in the nested rollout baz:

FOR EXAMPLE

utility foo "name"

(

local ...

spinner bar ...

...

rollout baz "name"

(

local ...

checkbox baz_enable ...

on ...

)

...

on bar changed val do

if baz.baz_enable.checked == true then ...

You can control the grouping of rollouts by supplying a category:<integer> header parameter, before the opening parenthesis of the rollout body. The category numbers order the rollouts. In the following example, the rollouts are defined and added in a certain order, but displayed in another based on their category number:

FOR EXAMPLE

(

rollout first_rollout "1st Rollout" category:2

(

label rights "First"

)

rollout second_rollout "2nd Rollout" category:1

(

label second "Second"

)

rf = newRolloutFloater "Rollout Order Test" 200 140

addRollout first_rollout rf

addRollout second_rollout rf

)

See also

Scripted Utilities

Scripted Utility Panels

Utility Clauses


Rollout Clauses

Rollout clauses define the components of a rollout (utilities are considered a special case of rollouts) and can be one of four basic things:

  • Local variables, functions, or structure definitions are variables, functions, and structures whose scope is the rollout. These locals will exist as long as the rollout value exists. The rollout value will exist until a new value is assigned to the rollout’s variable name. Local variables are particularly useful for storing working data associated with the rollout such as picked objects or arrays of generated objects. The visibility of locals, and accessing rollout locals from external code, are described in Visibility of Locals, Functions, Structures, and User-Interface Items in Rollout Code and Accessing Locals and Other Items in a Rollout from External Code .

  • Mouse tools are used to perform a set of actions based on mouse clicks in the 3ds Max viewports, and are described in Scripted Mouse Tools .

  • User-interface control items are elements displayed in the rollout, such as buttons, spinners, and list boxes.

  • Event handlers are special kinds of functions associated with particular user-interface control items. Event handlers specify the processing you want to occur when a user interacts with a user-interface item. For example pressing a button or adjusting a spinner. These user actions generate named events and the optional event handler you supply for that event is called when the user action occurs. For example, if you press a button named DoIt, the on DoIt pressed event handler expression is executed.

Formally, the syntax of a <rollout_clause> is defined as follows:

<rollout_clause> ::= <local_variable_decl> | <local_function_decl> | <local_struct_decl> | <global_variable_decl>|<mousetool> | <user_interface_item> | <item_group> | <event_handler>

Locals

A <local_variable_decl>, <global_variable_decl>, <local_function_decl>, and <local_struct_decl> are exactly the same as local and global variable, local function, and local structure definitions in MAXScript:

<local_variable_decl> ::= local <decl> { , <decl> }

<decl> ::= <name> [ = <expr> ] -- optional initial value

<global_variable_decl>::= global <decl> { , <decl> }

<decl> ::= <name> [ = <expr> ] – optional initial value

<local_function_decl> ::= [ mapped ](function | fn) <name> { <argument> } = <expr>

<local_struct_decl> ::= struct <name> ( <member> { , <member> } )

<member> ::= ( <name> [ = <expr> ] | <local_function_decl> )

Examples of the previous (in order) are:

local numSelected

global foo

local numSelected = 0

fn onlyOneSelected = (selection.count == 1)

struct parents (mother="", father="")

When writing scripts, it is good programming practice to explicitly declare your local and global variables. Implicit declaration is provided as a short-hand, typically used when working in the Listener interactively or developing short scripts. When developing extended scripts, explicitly declaring variables can reduce errors and improve readability of the code. It is also recommend that you declare as local all variables unless you really want them to be global variables. The reasons for this are described in Scope of Variables .

User-Interface Items

A <user_interface_item> defines an individual button, check box, spinner, or other user-interface control item that will appear in the rollout. These user-interface control items are described in Rollout User-Interface Controls .

An <item_group> is used to place a sequence of user-interface items in a labeled box in the rollout, so you can organize large rollouts into meaningful groups.

Its syntax is:

group <group_label_string> ( { <user_interface_item> } )

The use of group is shown in the following script:

EXAMPLE

utility Infinity "Game Utilities"

(

group "Lighting"

(

label label1d "Number of Day lights:" across:2 offset:[10,0]

label label2d "0" offset:[10,0]

label label1n "Number of Night lights:" across:2 offset:[13,0]

label label2n "0" offset:[10,0]

label label3

Radiobuttons WhichOn "Active Lights:" labels:#("Day","Night")

)

group "Scene Data Dump"

(

Button scenedump "Dump Scene Data"

)

group "Exclusions/Inclusions"

(

Button DispExcl "Unhide Exclusions&Inclusions"

)

group "Camera Mattes"

(

radiobuttons CamMatte labels:#("None","1","2","3","4") columns:3

)

Button resetb "Reset"

)

The Utilities panel rollout which the previous script generates looks like the following figure.

Game Utilities rollout using group user-interface item

NOTE:

A group is technically not an user-interface control. If you want to use a group that is an interface control, consider the GroupBox user-interface control.

Internally, a group is implemented as two controls, of GroupStartControl and GroupEndControl classes, enclosing the grouped user-interface controls like brackets.

In 3ds Max 8, you can access and change the .caption property of either controls if you access them via the .controls property of a rollout - this was not possible in previous versions.

EXAMPLE

rollout test "Test"

(

group "Group"

(

button pressme "Press Me"

)

)

createDialog test

test.controls

test.controls[1].caption = "XXX" --this is the GroupStartControl

test.controls[3].caption = "Test me" --this is the GroupEndControl

--Both change the group's caption!

Event Handlers

An <event_handler> is a special function definition local to a utility or rollout that you provide to handle the processing you want to occur when a user performs an action on a user-interface item. For example, event handlers are called when the user presses a button or adjusts a spinner, opens or closes the utility or rollout, or resizes or moves a rollout floater window. These user actions generate named events and any event handler you supply for that event is called when the action occurs. The syntax for defining an event handler is as follows:

on <item_name> <event_name> [ <argument> ] do <expr>

The <item_name> specifies the name of the item to which this handler is connected. The <event_name> specifies the type of event to be handled and the optional <argument> is used to pass various values to the handler. The possible events you can specify depend on the item type. These events include:

pressed

changed

picked

entered

selected

resized

moved

open

close

The available events and the arguments passed are defined in the description for each user-interface item type, as listed in Rollout User-Interface Controls . The available events and the arguments passed for utilities and rollouts are described in Utility and Rollout Properties, Methods, and Event Handlers .

You can access and invoke the event handler functions in a scripted rollout by referring to the handlers as properties on the user-interface items. The event handler functions are accessed as sub-properties of the item, using the event name as the sub-property name. For example, if a scripted rollout had a check box item named foo, and an on foo changed event handler was defined, you could invoke the handler as follows:

foo.changed true -- call foo's 'changed' handler function, passing argument of true

Or, if a scripted rollout had a button item named apply, and an on apply pressed event handler was defined, you could invoke the handler as follows:

FOR EXAMPLE

apply.pressed() -- call apply’s 'pressed' handler function, no argument.

You can access an event handler function as a sub-property of the item.

FOR EXAMPLE

ApplyPressedEH = apply.pressed

stores a copy of the on apply pressed event handler function value to variable ApplyPressedEH. The event handler functions can only be read. You cannot set the handler function to another user-defined function.


Utility and Rollout Properties, Methods, and Event Handlers

Properties

Several properties are available for scripted utilities and rollouts which provide access to the current state of the rollout.

Rollout Properties:

<rollout>.name String, read-only

The name of the rollout.

<rollout>.title String

Title of rollout.

NOTE:

You cannot change the title of a rollout or rollout floater registered as a dialog bar.

<rollout>.open Boolean

If true, the rollout is open, false it is rolled up. You can assign true or false to this property to open or roll up the rollout.

NOTE:

Setting does nothing if the rollout is a Dialog, dialogBar, or is in an extended viewport. Will always be true in these cases.

<rollout>.scrollPos Integer

Scroll position of panel the rollout is in.

NOTE:

Setting this property does nothing if the rollout is a Dialog, dialogBar, or is in an extended viewport. Will always be 0 in these cases.

<rollout>.height Integer

Get/Set the Height of the rollout in pixels.

NOTE:

If the rollout is in an extended viewport, the .width and .height properties report the width and height of the viewport. The properties cannot be set for this case.

<rollout>.width Integer

Get / Set the Width of the rollout.

NOTE:

Setting this property does nothing if the rollout is in a rolloutfloater, subRollout, or a command panel.

If the rollout is in an extended viewport, the .width and .height properties report the width and height of the viewport. The properties cannot be set for this case.

<rollout>.controls Array of ui elements, read-only

Returns an array of all controls in the rollout.

<rollout>.inViewport Boolean, read-only

Returns True when the rollout is in extended viewport

<rollout>.dialogBar Boolean, read-only

Returns True when the rollout is registered as a dialog bar

<rollout>.inDialog Boolean, read-only

Returns True when the rollout is currently displayed in a dialog created via createDialog <rollout>. Always valid.

<rollout_floater>.placement Name, enums:{#minimized|#maximized|#normal}

This property gets/sets whether the dialog is minimized, maximized, or normal. This property will return 'undefined' if the rollout is a not in a dialog, or the dialog is a dialogBar or is in a viewport.

This property is valid if the rollout is in a dialog and is not a dialogBar or in a viewport. When setting this property, values that the dialogs's creation style settings don't support are ignored. For example, if you set the property value to #maximized and #style_maximizebox was not specified in createDialog's style argument, no action occurs.

NOTE:

This property is available in 3ds Max 6 and higher.

<rollout>.isDisplayed Boolean, read-only

Returns true if the rollout is currently displayed, false otherwise.

<rollout>.owner Object, read-only

If the rollout is being displayed by a scripted plugin or a Custom Attribute, the property will contain the scripted plugin or CA instance. This property was added in 3ds Max 8 to make it easier to access the variables in a scripted plugin or CA instance when a debugger break occurs in a rollout event handler. In this case, the owner of the event handler is the rollout, so you can access the scripted plugin or CA instance via getVar owner.owner.

Rollout floater Properties:

<rollout_floater>.title String

Title of the floater.

NOTE:

You cannot change the title of a rollout or rollout floater registered as a dialog bar.

<rollout_floater>.open Boolean, read-only

True if floater is open.

<rollout_floater>.size Point2

Size in pixels.

NOTE:

If a rollout floater is in an extended viewport, the .size and .position properties report the size and position of the viewport. The properties cannot be set for this case.

<rollout_floater>.pos Point2

Position in pixels.

NOTE:

If a rollout floater is in an extended viewport, the .size and .position properties report the size and position of the viewport. The properties cannot be set for this case.

<rollout_floater>.rollouts Array of rollouts in floater, read-only

Returns an array of all rollouts in the floater.

<rollout_floater>.inViewport Boolean, read-only

True if floater is in extended viewport.

<rollout_floater>.dialogBar Boolean, read-only

True if floater is registered as a dialog bar.

<rollout_floater>.placement Name, enums:{#minimized|#maximized|#normal}

This property gets/sets whether the dialog is minimized, maximized, or normal. This property will return 'undefined' if the rollout is a not in a dialog, or the dialog is a dialogBar or is in a viewport.

This property is valid for Rolloutfloaters that are not a dialogBar nor in a viewport.

NOTE:

This property is available in 3ds Max 6 and higher.

NOTES:

A rollout in a subrollout cannot be registered as a dialogbar or a view window. A rollout or rollout floater cannot be registered as both a dialogbar and a view window.

You can implement a form of rollout state save and restore for your scripted rollouts by recording the /open state of all rollouts and the .scrollPos of the entire panel during close handler processing, and then reset the values in the open handler.

Methods

Several methods are available for opening and closing utilities, and adding and removing rollouts in the Utilities panel. These methods are:

openUtility <utility>

Opens the utility’s main rollout in the Utilities panel. This is equivalent to selecting the utility from the Utilities list in MAXScript’s Utilities panel rollout.

closeUtility <utility>

Closes the utility’s main rollout in the Utilities panel. This is equivalent to clicking the Close button in this rollout.

addRollout <rollout> [ rolledUp:<boolean> ]

Adds the rollout to the Utilities panel. The rolledUp: parameter on the addRollout() function specifies whether the rollout is added in a rolled-up state. This defaults to false, so the rollout is added fully opened. The extra rollouts are arranged in the order of addRollout() calls, so take care in sequencing these to ensure the order you want.

<Point2>GetDialogSize <rollout>

Returns the size of the window's client area. Equivalent to

point2 <rollout>.width <rollout>.height

removeRollout <rollout>

Removes the rollout from the Utilities panel.

See Managing Multiple Rollouts in a Scripted Utility for more information on the addRollout() and removeRollout() methods.

Event Handlers

In addition to the event handlers you specify for particular user-interface items in a rollout, you can define handler functions that are called when an entire rollout is first opened (open) or explicitly closed (close) by the user. These event handlers are useful for initialization code or for cleaning up when a rollout closes, and are necessary when managing multiple rollouts in one scripted utility. If a rollout floater window is resized or moved, an event handler (resized or moved, respectively) is called on the first rollout in the rollout floater window. An additional event handler (oktoclose) is called to verify that it is OK to close a rollout.

The syntax is as follows:

on <rollout_or_utility> open do <expr>

Called when the rollout or utility is opened.

on <rollout_or_utility> close do <expr>

Called when the rollout or utility is closed.

on <rollout_or_utility> oktoclose do <expr>

Called when the user clicks the rollout’s Close button so the script writer can decide whether to allow the close to proceed. If the expression evaluates to the value true, the rollout is allowed to close. If the expression evaluates to the value false, the action attempting the close is ignored and the rollout or utility is left open.

In the following example the utility will not close unless the "OK To Close" check button is pressed:

FOR EXAMPLE

utility ui_oktoclose "OKToClose Test"

(

checkbutton a2 "OK To Close"

on ui_oktoclose oktoclose do a2.state

)

on <rollout_or_utility> rolledUp <arg> do <expr>

Called when the rollout or utility is rolled up or down. The argument will contain true when the rollout is rolled down (open) and false when the rollout is rolled up (closed).

FOR EXAMPLE

rollout test "Test"

(

 button btn_test "Press Me"

 on test rolledUp state do

  if state then print "Rolled Down!" else print "Rolled Up!"

)

nf = newRolloutFloater "Test" 200 200

addRollout test nf

on <rollout> resized <arg> do <expr>

Called on first rollout in a rollout floater window when it is resized either by the user or by a script changing the size property of the rollout floater window. Changing the rollout floater window size in the resized event handler expression will not cause the resized event handler to be called again. The value of <arg> is the current width and height of the rollout floater window.

FOR EXAMPLE

global my_rof_size

...

on my_rollout resized size do

(

my_rof_size = size -- save the new window size

)

on <rollout> moved <arg> do <expr>

Called on first rollout in a rollout floater window when it is moved either by the user or by a script changing the pos property of the rollout floater window. The value of <arg> is the current position of the rollout floater window on the screen in pixels.

The following example keeps a log file of its actions, and uses the rollout open and close handlers to open and close the log file:

FOR EXAMPLE

utility frab "Optimal Frabulator"

(

local log

spinner frab_x ...

button do_it "Enfrabulate now"

...

on do_it pressed do

(

frabulate selection

format "selection frabbed at %\n" localTime to:log

)

on frab open do log = createFile "frabulator.log"

on frab close do close log

)

In the following example the on resized event handler is called when the rollout floater window is resized. Because the event is generated only for the first rollout in a rollout floater window, the on b resized event handler is never called.

FOR EXAMPLE

rollout a "Rollout A"

(

button a1 "a1"

on a resized val do (format "A: %\n" val)

)

--

rollout b "Rollout B"

(

button b1 "b1"

on b resized val do (format "B: %\n" val)

)

--

rof=newrolloutfloater "test" 200 200

addrollout a rof

addrollout b rof

rof.size=[300,300]

See also

CreateDialog

Rollout Floater Windows


Rollout Floater Windows

MAXScript lets you create modeless dialog windows and populate them with rollouts defined using global rollout definitions or utility rollout definitions. The user can resize a rollout floater window vertically by dragging on the lower window edge.

There are two functions and a special class in support of this, as follows:

newRolloutFloater <title_string> <width_integer> <height_integer> [<top_integer> <left_integer>]

Creates and opens a new rollout floater window with the title and width and height given. If you don't supply top and left coordinates, the window will open centered in the screen. The width of the 3ds Max command panel is 218, in case you want to duplicate its width for precisely accommodating Utilities panel rollouts.

This method returns a RolloutFloater value to which you add rollouts.

closeRolloutFloater <rolloutFloater>

Closes the rollout floater window. The user can also do this by clicking the close box on the window. Once closed, the window is no longer usable. All the close handlers in the rollout floater window's rollouts are called and they are released for use in other rollout floater windows or scripted utilities.

The existing functions for adding and removing rollouts to the Utilities panel are extended to work with rollout floater windows:

addRollout <rollout> [ <rolloutFloater> ] [ rolledUp:<boolean> ] [border:<boolean>]

If the optional second argument is specified, it must be a RolloutFloater value as returned from the newRolloutFloater() function. The rollout specified by the first argument is appended after any rollouts previously in the window.

If the optional rolledUp: keyword argument is specified, the rollout will be initially rolled up (closed) when the argument is true or rolled down (open) when false.

NEW in 3ds Max 2009: If the optional border: keyword argument is specified and set to false, the rollout will have no border. If the keyword argument is not supplied or set to true, a border will be drawn around the rollout.

removeRollout <rollout> [ <rolloutFloater> ]

Removes the rollout from the given rollout floater window.

In both functions above, if the optional <rolloutFloater> is not supplied the rollout is added to, or removed from, the Utilities panel, as described in Managing Multiple Rollouts in a Scripted Utility .

Rollout floater windows have the following properties:

<rolloutFloater>.title String

The Title of the floater.

NOTE:

You cannot change the title of a rollout floater registered as a dialog bar

<rolloutFloater>.size Point2

The current size of the rollout floater window in pixels. The first component of the Point2 is the width, the second the height. This property is read/write.

<rolloutFloater>.pos Point2

The current screen position of the rollout floater window in pixels. This property is read/write.

NOTE:

If a rollout floater is in an extended viewport, the size and position properties report the size and position of the viewport. The properties cannot be set for this case.

When a rollout floater window is resized, either by the user or by a script changing the size property, a resized event is generated for the first rollout in the rollout floater window. Likewise, when a rollout floater window is moved, either by the user or by a script changing the pos property, a moved event is generated for the first rollout in the rollout floater window. The event handler for the resized and moved events are described in Utility and Rollout properties, Methods, and Event Handlers .

<rolloutFloater>.inViewport   Boolean, read-only.

Returns true if the floater is in extended viewport.

<rolloutFloater>.open   Boolean, read-only.

Returns true if the floater is open.

<rolloutFloater>.dialogBar Boolean, read-only.

Returns true if the rollout floater is used as a dialog bar.

<rolloutFloater>.rollouts Array of rollouts in floater, read-only

Returns an array of all rollouts in the floater.

FOR EXAMPLE:

rollout grin "Grin Control"

(

slider happy "Happy" orient:#vertical across:5

slider sad "Sad" orient:#vertical

slider oo "OO" orient:#vertical

slider ee "EE" orient:#vertical

slider oh "OH" orient:#vertical

/*

on happy changed val do object.xform1.center = ...

on sad changed val do object.xform2.gizmo.rotation = ...

...

*/

)

theNewFloater = newRolloutFloater "Grinning" 300 220

addRollout grin theNewFloater


Visibility of Locals, Functions, Structures, and User-Interface Items in Rollout Code

The ordering of user-interface items and functions and sub-rollouts in a utility is important when referencing other items and rollouts in handler or local function code. Specifically, you can only reference a user-interface item or rollout or function in a handler or other function if that item or rollout or function has been defined earlier in the utility.

A recommended ordering can help ensure this:

local variables

structs

user-interface items

nested rollouts

functions

event handlers

In some situations, cross-referencing means there's no way to order definitions and still pre-define everything. To remedy this, MAXScript lets you pre-declare local rollouts and functions, so code that comes before the function or rollout definition will see the correct object. You do this by declaring such rollouts and functions as uninitialized locals. In the following example, there are two rollouts, ro1 and ro2, that each want to reference items within the other. By pre-declaring them as locals in the main utility, this cross-referencing is possible:

EXAMPLE:

(

local ro1, ro2 -- pre-declare local rollouts

rollout ro1 "Rollout 01"

(

checkbox chk_checkbox "Check The Box In Rollout 02" enabled:false

on chk_checkbox changed state do ro2.chk_checkbox.checked = state

)

rollout ro2 "Rollout 02"

(

checkbox chk_checkbox "Enable The Checkbox In Rollout 01"

on chk_checkbox changed state do ro1.chk_checkbox.enabled = state

)

theFloater = newRolloutFloater "Test Local Visibility" 250 110

addRollout ro1 theFloater

addRollout ro2 theFloater

)--end script

As a general rule, it is recommended that all local variable names be explicitly declared as locals at their outermost scope. This will prevent any conflicts from occurring if another script has declared the same variable name as a global variable. While functions, structures definitions, and rollouts will always be local to the utility they are defined in (even if they have the same name as a global variable), declaring these as local will ensure the variables are defined, even if the order in which they are defined is changed. Here's an example showing these declarations:

EXAMPLE:

utility foo "Object Frabulator"

(

-- local variables

local target_obj

-- local functions

local prop_name

-- local rollouts

local setup

fn prop_name obj name =

for c in obj.children do c.name = name + "_" + c.name

checkbutton setup_btn "Setup"

edittext name_box "New name:"

-- use a checkbutton to dynamically control presence of panels

on setup_btn changed state do

if state then addRollout setup else removeRollout setup

on foo close do

removeRollout setup -- always close rollouts

rollout setup "Setup fraber" -- local panel

(

label hello

pickbutton pick_tgt "Pick object"

on pick_tgt picked obj do

(

target_obj = obj -- access utility local

name_box.text = obj.name -- access utility item

prop_name obj obj.name -- call utility local fn

)

)

)


Accessing Locals and Other Items in a Rollout from External Code

The local components defined in a scripted utility or rollout are accessible to external code as properties of the utility or rollout object. Recall that the rollout object is assigned to a new global variable (or local variable if a nested rollout) named on the utility or rollout definition.

EXAMPLE:

utility foo "Object Frabulator"

(

local var1, var2, ...

...

checkbox enable "Enable frabber"

...

rollout setup "Setup frabber" -- local panel

(

local var3

button doit "Execute"

...

on doit pressed do ...

)

function frab a b = ...

...

on enable changed state do ...

...

)

The example defines the utility and places the utility object in a global variable named foo. You can access components in the utility from the Listener or other code as properties of that object, using the name of the variable or item as the property name. Any event-handler functions supplied for user-interface items can also be accessed as sub-properties of the item, using the event name as the property name.

EXAMPLE:

print foo.var1 -- get foo's local variable, var1

if foo.enable then ... -- test foo's enabled checkbox

foo.enable = false -- set it

foo.enable.changed false -- call its 'changed' handler function

foo.frab $box01 $box02 -- call its 'frab' function

foo.setup.var3=10 -- set foo’s setup rollout local variable, var3

foo.setup.doit.pressed() -- call 'changed' handler function for doit button in setup rollout

The local variables, functions, and structures in scripted utilities and rollouts are initialized as soon as the utility or rollout is first defined, rather than when the utility or rollout is first displayed. This allows other code to use local functions and access local values at any time after definition.

Note: Whenever a utility or rollout is opened, all local values will be reinitialized and any values set before opening will be lost!

FOR EXAMPLE:

--define a test rollout with a spinner UI element

--initialized to value of 50.0 and two local variables:

rollout test "Test"

(

local testValue1

local testValue2 = 10

spinner testSpinner "Spinner" range:[0.0,100.0,50.0]

)

Rollout:test

test.testSpinner.value --peek into the spinner's value

50.0 --it is 50 as expected

test.testValue1 --get the first local variable's value

undefined --it is set implicitly to undefined

test.testValue2 --get the other local variable's value

10 --it is set to 10 as expected

test.testSpinner.value = 60.0 --change the spinner's value to 60.0

60.0

test.testSpinner.value --get the value back to see if it worked

60.0

test.testValue1 = 20 --set the first local's value to 20

20

test.testValue1 --get the first local's value

20 --now it is initialized to 20

test.testValue2 = 40 --set the second local's value to 40

40

test.testValue2 --get the second local's value

40 --now it is 40

--now create a dialog with the rollout -

--all variables will be reset!

createDialog test 100 40

true

test.testSpinner.value --get the spinner value again

50.0 --it is back to the default value of 50.0

test.testValue1 --get the first local's value again

undefined --it is back to undefined

test.testValue2 --get the second local's value again

10 --it is back to 10


SubRollout Class

User Interface Controls > Common Properties > Layout > Types > SubRollout

SubRollout is a Subclass of RolloutControl. All Rollout User-Interface Controls Common Properties and Rollout User-Interface Controls Common Layout Parameters should apply.

Description

A UI item which you can place rollouts into. No caption is displayed for the UI item. On right side of the UI item a scrollbar is displayed if the height of the rollout(s) in the item is greater than the height of the item.

Properties

.rollouts

the rollouts installed in the SubRollout control via AddSubRollout - see notes below. Read-only. The names of the installed rollouts are exposed as read-only properties.

Notes on common UI item properties:

.caption

none displayed. Read/write.

.text

none displayed. Read/write.

.enabled

setting has no effect. Always set to true. Read/Write.

.pos

the position of the UI item in the rollout. Read/write.

.align

UI item alignment. Creation only property.

.offset

UI item offset. Creation only property.

.width

Sets the width of the subrollout. Accessible as property of the UI item.

.height

Sets the height of the subrollout. Accessible as property of the UI item.

.across

Number of UI items across. Creation only parameter.

Associated Methods

addSubRollout <subrollout> <rollout> [rolledUp:<boolean>]

Adds the rollout to the subrollout. Always returns ok.

removeSubRollout <subrollout> <rollout>

Removes the rollout from the subrollout. Always returns ok.

EXAMPLE

rollout test "test" height:200

( subrollout test1 "test1"

subrollout test2 "test2"

)

rollout test1a "test1a"

( spinner test1as "test1as"

)

rollout test1b "test1b"

( spinner test1bs "test1bs"

)

createdialog test

AddSubRollout test.test1 test1a

AddSubRollout test.test1 test1b

test.test1.height += 100

test.test2.pos += [0,100]

rollout test2a "test2a"

( spinner test2as "test2as"

)

AddSubRollout test.test2 test2a

test.test2.height += 50

NOTE:

Changing the height of a subRollout doesn't change the position of any UI items below it.

See also

Rollout User-Interface Items Common Properties

Rollout User-Interface Items Common Layout Parameters


Rollout .Controls Property

<rollout>.controls

This property returns an array of all the controls in the rollout.

EXAMPLE:

rollout testRollout "Test"

(

group "Test"

(

button btn_button "Press Me If You Can"

spinner spn_spinner "Spin Me If You Can"

checkbox chk_checkbox "Check Me If You Can"

)--end group

)--end rollout

createDialog testRollout width:200

for c in testRollout.controls do print c

--loop through all controls in the rollout and

--disable them all:

for c in testRollout.controls do c.enabled = false

RESULT:

Rollout:testRollout

true

GroupStartControl:Test

ButtonControl:btn_button

SpinnerControl:spn_spinner

CheckBoxControl:chk_checkbox

GroupEndControl:Test

OK

OK

Note that a group is implemented as a pair of controls - groupStartControl and groupEndControl which "bracket" the rest of the controls. In this example, the group was also disabled.

See also

Rollout User-Interface Controls

Rollout User-Interface Controls Types

Rollout User-Interface Controls Common Properties

Rollout User-Interface Controls Common Layout Parameters


Rollout Systems 'category' Mechanism

You can control the grouping of rollout for a plug-in, utility or floater by supplying a category:<integer> creation parameter before the opening parenthesis of the rollout body.

EXAMPLE

rollout rollout01 "Rollout 01" category:10

(

button btn_pressme "Press Me"

)

rollout rollout02 "Rollout 02" category:1

(

button btn_pressme "Press Me"

)

rollout rollout03 "Rollout 03" category:2

(

button btn_pressme "Press Me"

)

theFloater = newRolloutFloater "Test" 200 200

addRollout rollout01 theFloater

addRollout rollout02 theFloater

addRollout rollout03 theFloater

Note that although we added the rollouts in the order of their naming (rollout01, rollout02, rollout03), they appear in the floater in the order defined by the category - Category 1 first, then 2, then 10.

The Floater does not allow dynamic reordering via the mouse, but scripted plugin rollouts shown in the modify tab of the command panel will participate in the rollout reordering system and can be reordered manually.

The category: keyword is a creation parameter and cannot be accessed as a property of the rollout after the creation.

See also

Rollout User-Interface Controls

Rollout User-Interface Controls Types

Rollout User-Interface Controls Common Properties

Customize The Order of Rollup Pages

Interface: cmdPanel

Rollout User-Interface Controls Common Layout Parameters

Visual MAXScript


MAXScript Dialogs and Rollout Floaters as Extended Viewports

The following functions can be used to register and unregister MAXScript dialogs and rollout floaters as extended viewports.

registerViewWindow <MAXScript_dialog | rollout_floater>

Registers any MAXScript dialog or rollout floater as an extended viewport. The title of the dialog or floater appears in the viewport right click menu, under Views > Extended menu. When picked the dialog or floater will be displayed in that viewport.

If you click anywhere on the outside border, it will pop up the standard views menu. This will let you switch to a different view window.

unRegisterViewWindow < MAXScript_dialog | rollout_floater>

Unregisters a dialog or floater as an extended view window. It will throw an error if the dialog or floater is currently displayed in a viewport.

<rollout_floater>.inViewport

This property returns true if the rolloutfloater or rollout is installed in a viewport, false otherwise. Read-only.

Here is a sample script that creates two instances of a Cult3D viewer, found at www.cycore.com, and opens two files from the internet. Install the Cult3d Viewer and execute the script example below. After executing the script right click on any of the viewports and pick "Views > Extended > Cult3D Player" to display the window in the viewport.

EXAMPLE

rollout rCult3D "Cult3D Player"

(

activeXControl ax1 "{31B7EB4E-8B4B-11D1-A789-00A0CC6651A8}" align:#left setupEvents:false pos:[10,10]

activeXControl ax2 "{31B7EB4E-8B4B-11D1-A789-00A0CC6651A8}" align:#left setupEvents:false pos:[10,220]

on rCult3D resized size do

(

local csz = (size - [20,30])*[1,.5]

ax2.pos = [10, csz.y+20]

ax1.size = ax2.size = csz

)

on rCult3D open do

(

ax1.size = ax2.size = [300,200]

ax1.LoadCult3D "http://www.cult3d.com/gallery/ecommerce/olympus_on_the_beach.co"

ax2.LoadCult3D "http://www.cult3d.com/gallery/museum/madonna.co"

)

)

createDialog rCult3D width:320 height:430

registerViewWindow rCult3D

See also

ActiveX Controls in MAXScript Rollouts


Rollout User-Interface Controls

There is a multitude of user-interface control types that you can choose from to construct your rollout.

They all share the same overall syntax:

<item_type> <name> [ <label_string> ] [ <parameters> ]

The item types correspond to the types of user-interface control items you see in typical 3ds Max rollouts. The types of user-interface control items are described in Rollout User-Interface Control Types .

The <name> is used to name an automatically constructed rollout local variable that will hold the value representing the control item, and is used to associate event handler functions with the control item. The optional <label_string> is used as a caption, item label, or text content depending on the control item type, as described in the topics for each type. The optional <parameters> is a sequence of keyword arguments used to set options or influence layout for the control item. The exact parameters that each control item type supports is also defined in the topics for each type.

There are properties associated with each of the user-interface control item types. The properties that are common to all user-interface control item types are described in Rollout User-Interface Controls Common Properties . Properties that are unique to a user-interface control item type are defined in the topics for each type.

As you define a sequence of control items, MAXScript will by default automatically lay them out in the rollout, one below the other in the order they are defined. You can override this layout or make adjustments to it using special layout parameters defined in Rollout User-Interface Controls Common Layout Parameters .


Rollout User-Interface Controls Common Properties

All defined user-interface controls have a local variable constructed for them in the rollout and a value representing the control is placed in that variable. These values typically contain state information relevant to the item, such as if a check box is checked, the current spinner value, the items in a list box, and so on. This information is made available to you as various named properties on the item values. You use standard MAXScript property access to read and set these values,

FOR EXAMPLE
frab_x.enabled = true | enable the frab_x spinner
foo.text = "Don't do it" | set foo button text
first_item = baz.items[1] | get item list from listbox baz
$bar.pos.x = x_spinner.value | get current value from spinner x_spinner

All of the user-interface common properties except for caption (the label string value is used as the caption) can be specified as parameters when the user-interface item is constructed.

EXAMPLE

button foo "You Cannot Press Me!" enabled:false

The following properties are common to all user-interface items:

<ui_item>.caption String

The meaning of this property varies depending on the specific user-interface item type. If the user-interface item has a caption, this property contains the caption string. For the various types of buttons, it is the text inside the button. The default value of the caption is the label string specified in the item definition.

<ui_item>.text String

For all the user-interface items except edittext and combobox, the text property is an alias of the caption property. For edittext and combobox user-interface items, it is the text in the edit box. The default text property value for edittext user-interface items is a null string (""). The default text property value for combobox user-interface items is the selected item’s text.

The .text property in 3ds Max 7 and higher is really equivalent to the .caption property for all rollout controls that do not define .text separately Setting a label's text is the same as setting a label's caption. In previous releases, setting the text would not update the UI, but would update the internal .caption value

<ui_item>.enabled Boolean default: true

Sets whether the item is enabled for interaction when the rollout is initially opened. Disabled items appear unavailable in the rollout. All items are enabled by default, so you typically use this parameter to disable those items that should not initially be available to the user. For example, you might have some spinners that change the properties on a scene object that should not be changed until the user has picked the object, typically with a pickbutton in the rollout. You would disable the spinner in its definition, as in the following example, and enable it once the user picked an object.

EXAMPLE

spinner frab_x "Frabulate x-axis:" range:[0,100,0] enabled:false

...

frab_x.enabled=true

<ui_item>.pos Point2 default: varies

This forces the user-interface item to a fixed [x,y] pixel position in the rollout, with [0,0] at the top-left corner.

<ui_item>.visible

When set to false, the UI Item is hidden and disabled.

EXAMPLE

rollout test "test"

(

button b1 "b1"

 on b1 pressed do print "b1"

 button b2 "b2"

 on b2 pressed do b1.visible = not b1.visible

)

createdialog test

--Pressing the 'b2' button hides and unhides the b1 button

NOTE:

Due to limitations in 3ds Max, you cannot specify a node using a Pickbutton in the Create panel, for example in a scripted Geometry plugin. The work-around is to only enable the Pickbutton when the object is open in the Modify Panel.

See also

Rollout User-Interface Controls

Rollout User-Interface Controls Common Layout Parameters


Rollout User-Interface Controls Common Layout Parameters

The layout of user-interface items defined in a utility or rollout is, by default, handled by MAXScript. It places each successive interface item down the rollout, one below the other, horizontally and vertically aligning them to match the layout conventions in the built-in 3ds Max command panels. For the most part, this works well, particularly for rollouts displayed in the Utilities panel, because there is usually just enough room for one item across. In some cases, you may want to adjust or override the automatic layout and for this there are a number of definition-line layout parameters you can use.

The user-interface element <parameters> that can be supplied in the item definition varies with the item type and is defined in each type's topic, for example spinner ranges, check box initial states, list box contents, and so on. There is, however, a set of common layout parameters that you can specify on any user-interface item. Except for the pos parameter, these parameters are not properties of the user-interface item and cannot be accessed or changed by a script. The common layout parameters for all user-interface items are:

align:#left

align:#center

align:#right

Aligns the user-interface item to the left, center, or right in the rollout. Default varies by type.

offset: <point2> default: [0,0]

Specifies an [x,y] offset in pixels relative to automatic placement. This is applied after all other layout parameters are applied, and can be used to adjust them.

width: <number> default: varies

Forces the user-interface item to a specified width in pixels. Useful with buttons, for example, which otherwise self-size to their text label. Specifying an explicit width always overrides any widths computed from the text or caption properties. For example, if a spinner is given a fixed width that is too small for both label and spinner, it always aligns things to show the spinner and so might push the text out of view.

height: <number> default: varies by type

Forces the user-interface item to a specified height, typically in pixels. This lets you override the default setting height for user-interface items.

EXAMPLE

button foo "Stop" width:75 height:25

makes a nice big stop button.

For comboBox, dropdownList and listBox user-interface items, the height is in text rows. To have a comboBox exactly display N items, set height to N+2. To have a dropdownList exactly display N items in the list, set height to N+2. To have a listBox exactly display N items, set height to N. Height has no affect on spinner and slider user-interface items.

across: <number> default: 1

Causes this and following <number>-1 items to be laid out horizontally rather than vertically. The <number> given defines how many items to arrange horizontally. Layout then reverts to normal vertical placement. This parameter effectively divides the utility into the given number of equal-width columns and places items within them using the normal alignment for each item. The other layout parameters can be used with the across: parameter to control layout within the item's column.

pos: <point2> default: varies

This forces the user-interface item to a fixed [x,y] pixel position in the rollout, with [0,0] at the top-left corner.

EXAMPLE:

button foo "foo" align:#right --default alignment is center

--align right and bump this button down a bit:

button baz "baz" align:#right offset:[0,6]

-- put b1, b2, b3 across:

checkbutton b1 "yes" across:3

checkbutton b2 "no"

checkbutton b3 "maybe"

-- default alignment is right

spinner s1 "Length:" align:#left

See also

Rollout User-Interface Controls

Rollout User-Interface Controls Common Properties


Setting Focus on User Interface Controls

You can set the focus on a specific User Interface Control Item using

setFocus <rollout_ui_item>

EXAMPLE:

rollout testFocus "Test Focus"

(

edittext text1 "Test"

edittext text2 "Focus"

)

createDialog testFocus 200 100

setFocus testFocus.text2 --the second text field gets focus!

In 3ds Max 6 and higher,

SetFocus() can be used to set focus on ActiveX controls, too.

See also

Rollout User-Interface Controls Types

ActiveX Controls in MAXScript Rollouts


Rollout User-Interface Controls Types

Rollout User-Interface Control Types

The following list contains the user-interface control types you can choose from to construct your rollout.

Roll over image and click a Control to jump to its description:

angle

slider

spinner

button

checkbutton

mapbutton

materialbutton

pickbutton

checkbox

colorpicker

listbox

multilistbox

dropdownlist

combobox

edittext

groupBox

hyperLink

label

progressbar

radiobuttons

bitmap

imgTag

SubRollout

curvecontrol

popUpMenu (not displayed)

timer (does not display in rollouts)

The following script was used to create the rollout used as image map above:

EXAMPLE SCRIPT:

try(destroyDialog allControls )catch()

rollout subRollout1 "Subrollout" ( )

rollout allControls "User Interface Controls" (

angle theAngle "Angle" width:80 across:2 degrees:45 align:#left

slider theSlider "Slider:" orient:#vertical

spinner theSpinner "Spinner:"

group "Group" (

button theButton "Button" across:2 width:80 align:#left

checkbutton theCheckbutton "Checkbutton" width:80 align:#right

mapbutton theMapButton "Map Button" width:80 across:2 align:#left

materialbutton theMatButton "Material Button" width:80 align:#right

pickbutton thePickbutton "Pickbutton:" width:80 )

checkbox theCheckbox "Checkbox" across:2 offset:[0,2]

colorpicker theColorpicker "Colorpicker:"

listbox theListbox "Listbox:" items:#("Item 1", "Item 2") \

height:3 width:80 across:2

multilistbox theMLBox "Multilistbox:" items:#("Item 1", "Item 2") \

height:3 width:80

dropdownlist theDDL "DropDownList:" items:#("Item 1", "Item 2") \

width:80 across:2

combobox theCombobox "Combobox:" items:#("Item 1", "Item 2") \

height:3 width:80

edittext theEdittext "Edittext:"

hyperlink theHyperlink "Hyperlink" url:"http://www.autodesk.com" \

color:red across:2 offset:[10,20]

label theLabel "Label" offset:[0,20]

groupBox theGroupbox "Groupbox:" height:40 offset:[0,-40] width:174

progressbar theProgressbar "Progressbar:" value:50

radiobuttons theRadiobuttons labels:#("Option 1","Option 2")

bitmap theBitmap "Bitmap" width:80 height:50 offset:[0,0] \

bitmap:(bitmap 80 50 color:red) align:#left across:2

imgTag theImgTag "Bitmap" width:80 height:50 offset:[0,0] \

bitmap:(bitmap 80 50 color:green) align:#right

SubRollout theSubrollout "Subrollout" height:50

curvecontrol theCurvecontrol "Curvecontrol:" height:150

)

createDialog allControls 200 800

AddSubRollout allControls.theSubrollout subRollout1


Angle UI element

Angle UI Control

User Interface Controls > Common Properties > Layout > Types > Angle

The Angle is a UI Control which can be used to draw a circular clock-like element representing an angle in degrees or radians.

The syntax is:

Angle <name> [caption] [color:<color>] [degrees:<float>] [bitmap:<bitmap>] [diameter:<float>] [StartDegrees:<integer>] [StartRadians:<integer>] [dir:<#cw|#ccw>] [range:<point3>]

Properties

<Angle>.color color default:(color 0 0 255)

Get/set the angle fill-in color. Setting the color turns off the Bitmap fill.

<Angle>.bitmap Bitmap default:undefined

Get/set the angle fill-in Bitmap. Setting the Bitmap turns off the color fill.

<Angle>.diameter Integer default:64

Get/set the the full diameter of the control, synonymous to .width and .height.

<Angle>.degrees Float default:0.0

Get/set the current angle in degrees.

<Angle>.radians Float default:0.0

Get/set the current angle in radians.

<Angle>.StartDegrees Integer default:0

Get/set the start angle in degrees.

<Angle>.StartRadians Integer default:0

Get/set the start angle in radians.

<Angle>.dir Name default:#ccw

Get/set the angle direction. Possible values are #cw for Clockwise and #ccw for Counter-Clockwise.

<Angle>.range

Get/set the angle range as a point3 value. The first component defines the min. value, the second is the max. value, the third is the current value. All three values are in degrees.

If min. and max. values have the same sign, click and move in angle UI will give result with the same sign.

If min. and max. values have different signs, shift or ctrl click will give negative result, click will give positive result.

Events

on <Angle> changed <arg> do <expr>

Called when the angle is being changed. <arg> is the current degrees value.

EXAMPLE

rollout test "Angle Test"

(

Angle ang1 "Angle 1" diameter:50 align:#left range:[-180,180,45] startdegrees:0 dir:#cw color:red across:3

Angle ang2 "Angle 2" diameter:50 align:#center range:[0,270,90] startdegrees:90 dir:#ccw color:green

Angle ang3 "Angle 3" diameter:50 align:#right range:[0,360,120] startdegrees:270 dir:#cw color:blue

spinner val1 fieldwidth:40 align:#left across:3 range:[-180,180,45]

spinner val2 fieldwidth:40 align:#center range:[0,270,90]

spinner val3 fieldwidth:40 align:#right range:[0,360,120]

on ang1 changed val do val1.value = val

on ang2 changed val do val2.value = val

on ang3 changed val do val3.value = val

on val1 changed val do ang1.degrees = val

on val2 changed val do ang2.degrees= val

on val3 changed val do ang3.degrees= val

)

createdialog test 200 110

See also

Rollout User-Interface Controls

Rollout User-Interface Controls Types

Rollout User-Interface Controls Common Layout Parameters

Rollout User-Interface Controls Common Properties


Bitmap

Bitmap UI Control

User Interface Controls > Common Properties > Layout > Types > Bitmap

A bitmap control is used to place a bitmap image on the rollout. The syntax is:

bitmap <name> [ <caption> ] \
[ fileName:<filename_string> | bitmap:<bitmap> ]

The default alignment of bitmap items is #center. There is no caption or text displayed with bitmap items.

EXAMPLE:

rollout test_bitmaps "Testing Bitmap"
(

bitmap the_bmp fileName:"my_pic.bmp"

)

createDialog test_bitmaps

NOTE:

If the bitmap specified by filename cannot be found, the bitmap control will be empty as shown in the screenshot above.

Parameters

fileName:

The name of the bitmap file to load and display. The size of the bitmap image in the rollout is the bitmap file image size. The specified file name is searched for in the following directories (in order of search): current MAXScript directory, MAXScript startup directory, MAXScript directory, 3ds Max bitmap directories, and then the 3ds Max image directory.

bitMap:

You can specify a bitMap: creation parameter in place of the fileName: parameter that is used to specify a bitmap file. This allows you to use an existing bitmap value, such as those generated by a call to the render function. You can set bitmap to an "empty" image of a specified size by specifying a bitmap value constructor.

EXAMPLE:

rollout test_bitmaps "Testing Bitmap"
(

bitmap BitmapImage bitmap:(bitmap 50 50 color:blue)

)

createDialog test_bitmaps

Properties

<bitmap>.fileName String

The bitmap item file name as a string. You can change the image at any time by setting this property to a new name, but it will not resize the display area in the rollout; it will always be the size set from the initial image.

<bitmap>.bitmap TextureMap

A write-only property that is used to set the image displayed from a MAXScript bitmap value, as might be derived from functions like render() or selectBitmap(). You can change the image at any time by setting this property to a bitmap value, but it will not resize the display area in the rollout; it will always be the size set from the initial image.

<bitmap>.width Integer

Get/set the width of the bitmap item in pixels.

<bitmap>.height Integer

Get/set the height of the bitmap item in pixels.

Events

-- none --

See also

Rollout User-Interface Items Common Properties

Rollout User-Interface Items Common Layout Parameters

Rollout User-Interface Control Types

How To ... Develop a Bitmap Painting Tool - Basic Utility


Button

Button UI Control

User Interface Controls > Common Properties > Layout > Types > Button

A button control is used to place a press button on the rollout which the user can click, typically to perform some task.

The syntax is:

button <name> [ <caption> ] [ images:<image_spec_array> ] \
[ toolTip:<string> ] [ border:<boolean> ]

The default alignment of button items is #center.

EXAMPLE:

rollout test_buttons "Testing Buttons"

(

button theButton "Press me!"

button theBorderlessButton "I am a button, too!" border:false

on theButton pressed do

 messagebox "Remember: Never press unknown buttons!"

)

createDialog test_buttons 150 60

Parameters

images:

An image-specification array for providing bitmap images for the button. If this is specified, the <label> is ignored and the contents of the button are replaced with the bitmaps.

The form is:

images:#(<image>, <maskImage>, <count_integer>, \
 <enabled_out_image_index>, <enabled_in_image_index>, \
 <disabled_out_image_index>, <disabled_in_image_index>)

where <image> and <maskImage> can be either a bitmap file-name string or a MAXScript bitmap value. <count_integer> specifies the number of sub-images in the bitmaps, and the image_index values specify which sub-image in the bitmaps is to be used for each of the four button states.

EXAMPLE:

bm1 = render camera:$cam01 outputSize:[80,60]

button foo images:#(bm1, undefined, 1, 1, 1, 1, 1)

In this example, the button would use the rendered image as the button image.

ANOTHER EXAMPLE:

button decay images:#("dcybtns.bmp", "dcymask.bmp", 6, 1, 4, 1, 4)

In this example, the button would use sub-images 1 and 4 of bitmaps dcybtns.bmp and dcymask.bmp for the out and in states of the button, respectively.

See also Image Buttons .

toolTip:

Provides text for a tooltip for the button; no tooltip if unsupplied.

border:

NEW in 3ds Max 2009: When set to true or not specified, the button will be drawn with a border. This was the default behavior prior to 3ds Max 2009.

When set to false, the button will be drawn without a border, making it one with the UI background. If the button is enabled, the border will appear when the button is pressed, or upon mouseover.

Properties

<button>.images Array

Sets the image-specification array for the button. This property is write-only.

Setting the value to undefined will set the control back to displaying its caption rather than images in 3ds Max 8 and higher.

EXAMPLE:

rollout image_button_test "Image Button"

(

button theButton "Press To Render!" width:200 height:200

on theButton pressed do

(

 theBmp = render outputsize:[200,200] vfb:off

 theButton.images = #(theBmp, undefined, 1,1,1,1,1 )

)

)

createDialog image_button_test 210 210

<button>.tooltip String

Get/set the tooltip string of the button.

Available in 3ds Max 9 and higher.

EXAMPLE:

rollout test "Test"

(

button btn_test "Test" tooltip:"This is a tooltip"

)

createDialog test

Rollout:test

true

test.btn_test.tooltip --get the tooltip string

"This is a tooltip"

test.btn_test.tooltip = "Now you can get and set the tooltip!"

"Now you can get and set the tooltip!"

test.btn_test.tooltip --get the new tooltip string

"Now you can get and set the tooltip!"

Events

on <button> pressed do <expr>

Called when the user clicks the button.

on <button> rightclick do <expr>

Called when the right mouse button is released over the button. Available in 3ds Max 8 and higher.

See also

Rollout User-Interface Items Common Properties

Rollout User-Interface Items Common Layout Parameters

Rollout User-Interface Control Types


Checkbox

Checkbox UI Control

User Interface Controls > Common Properties > Layout > Types > Checkbox

A checkbox control is used to place a check box on the rollout. The user can click to successively switch between states.

The syntax is:

checkbox <name> [ <caption> ] [ checked:<boolean> ] [ triState:<integer> ] [ tooltip:<string> ]

The default alignment of checkbox items is #left.

Parameters

checked:

Initial state of the check box, defaults to false (unchecked).

triState:

An integer value controlling the checked state of the checkbox as follows:

0 – unchecked (checked:false)

1 – checked (checked:true)

2 – indeterminate (checked:true)

When set to 2 (indeterminate), the checkbox will be displayed as greyed out and checked at the same time. Note that triState: has a higher priority than checked: which means that if you set the parameter checked: to false and the parameter triState: to 2, the .checked property will return true. The checked: parameter / property remains <boolean> for backwards compatibility.

Clicking an indeterminate checkbox changes its state to unchecked.

tooltip:

NEW in 3ds Max 2009: A string defining the tooltip to be displayed when the mouse rolls over the checkbox.

Properties

<checkbox>.checked Boolean

The state of the check box, on (true) or off (false).

<checkbox>.state Boolean

Synonym for .checked

<checkbox>.triState Integer

Get/Set the state of the checkbox to checked, unchecked or indeterminate. See the triState: parameter for details.

<checkbox>.tooltip String

NEW in 3ds Max 2009: Get/set the tooltip of the checkbox.

NOTE:

A limitation in the MS Windows implementation of the tooltips causes only the first 80 characters of the tooltip string to be returned to MAXScript.

Tooltips of any length can be SET though.

Events

on <checkbox> changed <arg> do <expr>

Called when the user clicks the check box to check or uncheck it. The <arg> argument contains the new state of the check box, on (true) or off (false).

NOTE:

The <arg> is a local variable in the context of the event handler – you can use it inside the handler to act according to the new state of the checkbox.

EXAMPLE:

utility testCheckBox "Test The CheckBox"

(

checkbox myCheckBox "Click Me"

-- theState is a user variable name that will contain the state

-- of the checkbox whenever the change handler is executed

on myCheckBox changed theState do

messagebox ("Checkbox state is " + theState as string)

)--end utility

The above is equivalent to using

on myCheckBox changed theState do

messagebox ("Checkbox state is " + myCheckBox.state as string)

or

on myCheckBox changed theState do

messagebox ("Checkbox state is " + myCheckBox.checked as string)

See also

Rollout User-Interface Items Common Properties

Rollout User-Interface Items Common Layout Parameters

Rollout User-Interface Control Types


Checkbutton

Checkbutton UI Control

User Interface Controls > Common Properties > Layout > Types > Checkbutton

A checkbutton control is used to place a press button on the rollout that has two states, on and off, just like a check box. The user can click to successively switch between states. The syntax is:

checkbutton <name> [<caption>] [ highlightColor:<color> ] \
[ toolTip:<string> ] [ checked:<boolean> ] [ images:<image_spec_array> ] \
[ border:<boolean> ]

The default alignment of checkbutton items is #center.

EXAMPLE:

checkbutton setup "Setup" checked:true tooltip:"Opens setup panels"

on setup changed state do

  if state == on then

    openRollout setup_pan

  else

    closeRollout setup_pan

Parameters

checked:

Initial state of the check button, defaults to off.

highlightColor:

The background color of the check button in its pressed (or on) state, defaults to a light-gray wash in keeping with 3ds Max user-interface conventions.

toolTip:

Provides text for a tooltip for the check button; no tooltip if unsupplied.

images:

An image-specification array for providing bitmap images for the check button. If this is specified, the <label> is ignored and the contents of the check button are replaced with the bitmaps.

The form is:

images:#(<image>, <maskImage>, <count_integer>, <enabled_out_image_index>, <enabled_in_image_index>, <disabled_out_image_index>, <disabled_in_image_index>)

where <image> and <maskImage> can be either a bitmap file-name string or a MAXScript bitmap value. <count_integer> specifies the number of sub-images in the bitmaps, and the image_index values specify which sub-image in the bitmaps is to be used for each of the four check button states.

FOR EXAMPLE:

bm1 = render camera:$cam01 outputSize:[80,60]

...

checkbutton foo images:#(bm1, undefined, 1, 1, 1, 1, 1)

would use a rendering as the check button image, and

checkbutton decay images:#("dcybtns.bmp", "dcymask.bmp", 6, 1, 4, 1, 4)

would use sub-images 1 and 4 of bitmaps dcybtns.bmp and dcymask.bmp for the out and in states of the check button, respectively.

See also Image Buttons .

border:

NEW in 3ds Max 2009: When set to true or not specified, the checkbutton will be drawn with a border. This was the default behavior prior to 3ds Max 2009.

When set to false, the checkbutton will be drawn without a border, making it one with the UI background. If the checkbutton is enabled, the border will appear when the checkbutton is pressed, checked, if its .checked property is set to true and upon mouseover.

Properties

<checkbutton>.checked Boolean

The state of the check button, on (true) or off (false).

<checkbutton>.state Boolean

Synonym for .checked

<checkbutton>.images Array

Sets the image-specification array for the check button. This property is write-only.

Setting the value to undefined will set the control back to displaying its caption rather than images in 3ds Max 8 and higher.

FOR EXAMPLE:

-- re-render, update button

bm1 = render()

foo.images = #(bm1, undefined, 1, 1, 1, 1, 1)

<checkbutton>.tooltip String

Get/set the tooltip string of the checkbutton.

Available in 3ds Max 9 and higher.

FOR EXAMPLE:

--Evaluate this script, then roll over the checkbutton to read the tootip.

--Check the checkbutton, roll over again to see the new tooltip.

--Uncheck the checkbutton and roll over once again to see the new tooltip.

(

rollout test "Test"

(

checkbutton chk_test "Check Me!" tooltip:"This is a tooltip"

on chk_test changed state do

chk_test.tooltip = if state then "I am checked!" else "I am unchecked!"

)

createDialog test

)

Events

on <checkbutton> changed <arg> do <expr>

Called when the user clicks the check button to change its state. The <arg> argument will contain the new state of the check button, on (true) or off (false).

NOTE:

The <arg> is a local variable in the context of the event handler – you can use it inside the handler to act according to the new state of the checkbutton.

FOR EXAMPLE:

utility testCheckButton "Test The CheckButton"

(

checkbutton myCheckButton "Check Me!"

-- theState is a user variable name that will contain the state

-- of the checkbox whenever the change handler is executed

on myCheckButton changed theState do

(

if theState == true then

myCheckButton.text = "Uncheck Me!"

else

myCheckButton.text = "Check Me!"

)

)--end utility

on <checkbutton> rightclick do <expr>

Called when the right mouse button is released over the button. Available in 3ds Max 8 and higher.

See also

Rollout User-Interface Items Common Properties

Rollout User-Interface Items Common Layout Parameters

Rollout User-Interface Control Types


Colorpicker

Colorpicker UI Control

User Interface Controls > Common Properties > Layout > Types > Colorpicker

A colorpicker control is used to place a 3ds Max color selection swatch on the rollout. The user can click the swatch to display a Color Selector dialog or drag colors to or from it.

The syntax is:

colorpicker <name> [ <caption> ] [color:<color>] [alpha:<boolean>] [fieldWidth:<number>] [height:<number>] [modal:<boolean>] [title:<string>]

The default alignment of colorpicker items is #left.

EXAMPLE:

rollout change_wirecolor "Object Color Changer"

(

 colorpicker theColor "Wireframe color:" color:[0,0,255] modal:false

 on theColor changed new_col do selection.wirecolor = new_col

)

createDialog change_wirecolor

In this example, the color picker is set to non-modal, which means that changing the color value will change the wireframe color of all selected objects instantly and interactively. Setting modal: to true would let the user adjust the color without feedback in the viewports and assign the result using the OK button.

Parameters

color:

Initial color of the swatch. Defaults to blue.

title:

The title displayed on the Color Selector dialog. Defaults to "Choose a color".

fieldWidth:

The width in pixels of the swatch. Defaults to 40.

height:

The height in pixels of the swatch. Defaults to 16.

modal:

By default, the color picker is declared as modal which prevents key strokes from being passed to 3ds Max. When the keyword argument modal: is set to false, the color picker will enable the shortcuts.

alpha:

When set to true, clicking the color swatch brings up the color picker with alpha support. Defaults to false. If the color swatch is tied to an #acolor of #point4 parameter, this parameter is automatically set to true. Available in 3ds Max 6 and higher.

Properties

<colorpicker>.color Color

The current swatch color.

<colorpicker>.alpha Boolean

When set to true, clicking the color swatch brings up the color picker with alpha support. (Previously available in 3ds Max 6 as construction parameter only).

Events

on <colorpicker> changed <arg> do <expr>

Called when the user selects a new color in the open Color Selector dialog for this swatch or drops a new color on it. The <arg> argument contains the new color.

See also

Rollout User-Interface Items Common Properties

Rollout User-Interface Items Common Layout Parameters

Rollout User-Interface Control Types


Combobox

Combobox UI Control

User Interface Controls > Common Properties > Layout > Types > Combobox

A combobox control is used to place a combo box list in the rollout. This is a variant of the drop-down list in which the list is always fully displayed in the rollout with an additional edit-text box at the top of the list where the current selection is placed and may be edited. The user can scroll the list or click to select an item in the list.

The syntax is:

combobox <name> [ <caption> ] [items:<array_of_strings>] [selection:<number>] [height:<number>]

The default alignment of combobox items is #left.

EXAMPLE:

rollout combobox_test "Combo Box"

(

 combobox scale_cb "Scale" items:#("1/2", "1/4", "1/8", "1/16")

 on scale_cb selected i do

  format "You selected '%'!\n" scale_cb.items[i]

)

createDialog combobox_test

combobox_test.scale_cb.selected = "new item text"

Parameters

text:

The text string in the edit box.

items:

The array of text strings that are the items in the list

selection:

The 1-based number of the currently selected item in the list. Defaults to 1.

height:

The overall height of the combobox in number of item lines. Defaults to 10 lines. To have a combobox display exactly N items in the list, set height to N+2.

The minimum height value is clamped to 1 line.

Properties

<combobox>.caption String

The text of the optional caption above the combo box.

<combobox>.text String

The text in the edit box.

<combobox>.items Array of Strings

The item string array.

<combobox>.selection Integer

The currently selected item number, 1-based. If the items list is an empty array, this value is 0.

<combobox>.selected String

The text of the currently selected item. Can be used to replace individual items without resetting the entire items array. If the items list is an empty array, this value is undefined.

<combobox>.width Integer

Get/set the width of the combobox list window in pixels.

<combobox>.height Integer

Get/set the height of the combobox list window in pixels.

NOTES:

As constructor parameter, the height: specifies the height in lines of text, while the .height property is the height of the combobox in pixels!

The .height property does not include the height of the edit-text box. The minimum height setting is clamped at 0 pixels.

Events

on <combobox> selected <arg> do <expr>

Called when the user selects an item in the combo box list. The <arg> argument contains the new current selection item number.

on <combobox> doubleClicked <arg> do <expr>

Called when the user double-clicks an item in the list. Note that the on selected handler is always called on single clicks and on the first click of a double-click. The <arg> argument will contain the number of the item double-clicked.

FOR EXAMPLE:

rollout combobox_test "Combo Box"

(

 combobox scale_cb "Scale" items:#("1/2", "1/4", "1/8", "1/16")

 on scale_cb doubleClicked itm do

  format "You double-clicked '%'!\n" scale_cb.items[itm]

)

createDialog combobox_test

on <combobox> entered <arg> do <expr>

Called when the user changes the text in the edit box then changes the focus away from the edit box. This handler is not called if the user presses ENTER. The <arg> argument will contain the new text in the edit box.

FOR EXAMPLE:

rollout combobox_test "Combo Box"

(

 combobox scale_cb "Scale" items:#("1/2", "1/4", "1/8", "1/16")

 on scale_cb entered txt do scale_cb.selected = txt

)

createDialog combobox_test

on <combobox> changed <arg> do <expr>

Called for each individual character change the user performs in the edit box. This handler is not called when the user presses ENTER or changes the focus away from the edit box. The <arg> argument will contain the new text in the edit box.

See also

Rollout User-Interface Items Common Properties

Rollout User-Interface Items Common Layout Parameters

Rollout User-Interface Control Types


CurveControl

You can create CurveControls in scripted rollouts by using the following syntax:

CurveControl <name> [ <caption> ] \

[ visible: <boolean> ] [ numCurves: <integer> ] \

[ x_range: <point2> ] [ y_range: <point2> ] \

[ x_value: <float> ] \

[ zoomValues: <point2> ] [ scrollValues: <point2> ] \

[ displayModes: <bitarray> ] \

[ commandMode: <#move_xy | #move_x | #move_y | #scale | #corner | bezier> ] \

[ uiFlags: <array_of_ui_flags> ] \

[ rcmFlags: <array_of_rcm_flags> ] [ asPopup:<boolean> ]

uiFlags:

Any combination of the following flags:

#drawBG - Specifies to draw the white background in the graph window.

#drawgrid - Specifies to draw the grid lines and coordinates in the graph window.

#upperToolbar - Specifies to draw the upper toolbar above the control.

#showReset - Specifies to display the Reset button in the upper toolbar.

#lowerToolbar - Specifies to draw the lower toolbar beneath the control.

#scrollBars - Specifies to draw the horizontal and vertical scroll bars for the control.

#autoScroll - Specifies to do auto scrolling. Auto scroll happens when you drag a CurvePoint out of the currently visible range. In case you're zoomed in, the window will automatically scroll.

#ruler - Specifies to draw a small moveable ruler window (measures horizontal coordinates).

#constrainY - Specifies that no points (or handles) can be moved out of the value that is set by SetYRange().

#hideDisabled - Specifies that disabled curves won't be displayed at all.

#all - all the listed uiFlags are on except #singleSelect, #noFilterButtons, and #xvalue

#xvalue - Specifies to draw a vertical bar over the graph to show the current X value

#singleSelect - this flag allows the user to single select a point. Normally if a bunch of points are stacked in area if you click on the area you get all of them. With this flag you get the first one

#noFilterButtons - this flag turns off the curve visible/editable toggle in the top of the menu bar

rcmFlags:

Any combination of the following flags:

#move_xy, #move_x, #move_y, #scale, #corner, #bezier, #delete, #all

Properties

<curvecontrol>.visible : Boolean

When set to false, the CurveControl will be invisible. When set to true, it will be visible.

<curvecontrol>.x_range : Point2

Specifying x_range sets the absolute position of the first and last CurvePoints. That is, the X value for the first and last CurvePoints will always be the values specified by x_range.

<curvecontrol>.y_range : Point2

Sets the absolute upper and lower Y-constraint. This method only has an effect if the uiFlags option #constrainY is specified.

<curvecontrol>.x_value : Float

This property is used to show a vertical line in the graph window if the uiFlags option #xvalue is specified.

<curvecontrol>.displayModes : BitArray

The Bits in the BitArray control which of the available Curves will be displayed. When the BitArray is empty {}, no curves will be shown, when bit 1 is set {1}, the first curve will be displayed, when bit 2 is set {2}, the second curve will be displayed and so on. When two or more bits are set, multiple curves will be displayed at the same time, for example {1..2} will show the first two curves, {1,3} will show curves 1 and 3 etc.

<curvecontrol>.commandMode : Name

Get/Set the current command mode. Possible values are:
#move_xy, #move_x, #move_y, #scale, #corner, #bezier

<curvecontrol>.zoomValues : Point2

Get/Set the horizontal and vertical zoom values. The higher the value, the closer the zoom (the lower the displayed values relatively to the x and y ranges.

<curvecontrol>.scrollValues  : Point2

Get/Set the horizontal and vertical scroll values.

<curvecontrol>.curves   : Array, read-only

Returns an array of curves of type MAXCurve

Methods

zoom <curvecontrol> #all

Perform a zoom extents all.

Events

In the following events <ci> represents the active Curve Index.

on <curvecontrol> selChanged <ci> <val> do <expr>

Sent when a point is selected or deselected. <val> is the number of points, which are selected.

on <curvecontrol> ptChanged <ci> <val> do <expr>

Sent when a point is changed, <val> is the index of the changed point

on <curvecontrol> tangentChanged <ci> <val> type do <expr>

Sent when a point's in or out tangent is changed, <val> is the index of the changed point.

type is #inTangent or #outTangent, depending on what changed.

on <curvecontrol> deleted <ci> <val> do <expr>

Sent when a point is deleted, val is the index of the deleted point.

on <curvecontrol> reset <ci> do <expr>

Sent when a curve is reset

ccCurve

ccCurve represents a single curve in a curve control

Properties

<ccCurve>.animatable  : Boolean

When set to true, the curve points can be keyframed.

<ccCurve>.color   : Color

Get/Set the color of the curve when it is enabled.

<ccCurve>.disabledColor : Color

Get/Set the color of the curve when it is disabled.

<ccCurve>.width  : Integer

Get/Set the width of the curve when it is enabled.

<ccCurve>.disabledWidth : Integer

Get/Set the width of the curve when it is disabled.

<ccCurve>.disabledStyle : Name

<ccCurve>.style  : Name

These are the drawing styles for the curve when disabled and enabled. Possible values are:

#solid, #dash, #dot, #dashDot, #dashDotDot, #null, #insideFrame

<ccCurve>.lookupTableSize : Integer

This method sets the size of the Curve Control lookup table. The lookup table allows users of the Curve Control to easily speed up their value access. The default value for the lookup table size is 1000. Used when getValue() is called on the curve.

<ccCurve>.numPoints   : Integer

Get/Set the number of points in the curve.

<ccCurve>.points   : Array, read-only

Returns a CurvePointsArray

Methods

getValue ccCurve <time_value> <float_x> [lookup:<false>]

Returns a Point2 value corresponding to the specified X position along the curve at the specified time.

isAnimated ccCurve <index>

Returns a true of the curve's indexed point is animated (has keys), false otherwise.

getSelectedPts ccCurve

Returns a BitArray with bits set for selected points.

setSelectedPts <ccCurve> <bitarray> [#select] [#deSelect] [#clear]

Selects the points specified by the bits in the bitArray.

setPoint <ccCurve> <index> <ccpoint> [checkConstraints:<true>]

Sets the indexed point on the curve to the specified value. If checkConstraints is set to true, the point will be constrained.

getPoint <ccCurve> <index>

Returns the Point2 value of the indexed point on the curve.

insertPoint <ccCurve> <index> <ccpoint>

Inserts a new point at the indexed position with the specified value.

deletePoint <ccCurve> <index>

Deletes the indexed point from the curve.

CurvePointsArray represents an array of curve points.

CurvePointValue represents a curve point.

CurvePointValue

CurvePointValue represents a curve point, you create a curve point like:

ccPoint <pt_point2> <in_point> <out_point2> \

[bezier:<false>] [corner:<false>] [lock_x:<false>] \

[lock_y:<false>] \ [select:<false>] [end:<false>] \

[noXConstraint:<false>]

Properties

<ccpoint>.value : Point2

Returns the Point2 value of the point.

<ccpoint>.inTangent   : Point2

Returns the Point2 value of the point's inTangent.

<ccpoint>.outTangent : Point2

Returns the Point2 value of the point's outTangent.

<ccpoint>.bezier : Boolean

When set to true, the point will behave as Bezier point.

<ccpoint>.corner : Boolean

When set to true, the point will behave as a Corner point. If the .bezier property is set to true, the point will be a Bezier-Corner.

<ccpoint>.lock_x : Boolean

When set to true, the point will be locked along X.

<ccpoint>.lock_y : Boolean

When set to true, the point will be locked along Y.

<ccpoint>.selected : Boolean

When set to true, the point will be selected.

<ccpoint>.end : Boolean

When true, no point is an end point.

<ccpoint>.noXConstraint : Boolean

When set to false, the X coordinate will be constrained, when set to true, no X constraints will be imposed on the point.

EXAMPLE

rollout uTestCurveControl "Curve Control"

(

-- Curve control Properties

local ccProps = #(

#visible,

#numCurves,

#x_range,

#y_range,

#displayModes,

#zoomValues,

#scrollValues,

#commandMode)

-- Curve properties

local curveProps = #(

#name,

#animatable,

#color,

#disabledColor,

#width,

#disabledWidth,

#style,

#disabledStyle,

#numPoints,

#lookupTableSize)

-- Curve Point properties

local cpProps = #(

#value,

#inTangent,

#outTangent,

#bezier,

#corner,

#lock_x,

#lock_y,

#selected,

#end,

#noXConstraint)

button btn_props "Print Properties"

checkBox chk_visible "Visible" checked:true

checkBox chk_enable "Enable" checked:true

CurveControl cc_test "Curve Control:"

height:200

width:400

align:#center

numCurves:2

visible:true

x_range:[-100,100]

y_range:[-100,100]

scrollValues:[-100,100]

commandMode:#move_xy

-- The following parameters default to all flags if not specified

--uiFlags:#(#drawBG, #drawgrid, #upperToolbar, #showReset, #scrollBars, #constrainY, #xvalue)

rcmFlags:#(#delete)

asPopup:false

on chk_visible changed state do cc_test.visible = state

on chk_enable changed state do cc_test.enabled = state

on uTestCurveControl open do

(

 zoom cc_test #all

local colors = #(red, green, blue)

local styles = #(#solid, #dash, #dot, #dashDot, #dashDotDot, #null, #insideFrame)

local num = cc_test.numCurves

-- Initialize curve properties

for i=2 to num do

(

local crv = cc_test.curves[i]

local ci = ((mod (i-1) colors.count)+1) as integer

local si = ((mod (i-1) styles.count)+1) as integer

crv.name = "Curve" + i as string

crv.color = colors[ci]

crv.disabledColor = colors[ci]*0.5

crv.style = styles[si]

--crv.width = crv.disabledWidth = i

crv.numPoints = i*2

local del = (cc_test.x_range.y - cc_test.x_range.x)/(crv.numPoints-1)

-- format "del:%\n" del

-- Place intermediate points equally spaced

for j=1 to crv.numPoints do

(

local cp = crv.points[j]

format "% end: % -> " j cp.end

--cp.corner = true

cp.value = [cc_test.x_range.x+(j-1)*del, cp.value.y]

cp.inTangent = [0.2,0.2]

cp.outTangent = [0.2,-0.2]

crv.points[j] = cp

format "%\n" crv.points[j].end

format "value: %\n" crv.points[j].value

)

)

)

on btn_props pressed do

(

local tab = "\t"

-- print the CC properties

format "Curve Control Properties\n"

for p in ccProps do

format (tab + "% : %\n") (p as string) (getProperty cc_test p)

 format (tab + "Curves:\n")

tab += "\t"

for i=1 to cc_test.numCurves do

(

local crv = cc_test.curves[i]

-- print each Curve's properties

format (tab + "Curve%\n") i

for p in curveProps do

format (tab + "\t% : %\n") (p as string) (getProperty crv p)

format (tab + "\tPoints:\n")

for j=1 to crv.numPoints do

(

local cp = crv.points[j]

format (tab + "\t\tPoint%\n") j

-- Print each curve point properties

for pp in cpProps do

format (tab + "\t\t\t% : %\n") (pp as string) (getProperty cp pp)

)

)

)

-- Curve control event handlers

on cc_test selChanged ci val do format "curve % numSelected : %\n" ci val

on cc_test ptChanged ci val do format "curve % ptChanged : %\n" ci val

on cc_test tangentChanged ci val type do format "curve % tangentChanged : % %\n" ci val (type as string)

on cc_test deleted ci pi do format "curve % deleted : %\n" ci pi

on cc_test reset ci do format "curve % resetted\n" ci

)

curveFloater = newRolloutFloater "Curve Control Test" 500 400

addRollout uTestCurveControl curveFloater

See also

Rollout User-Interface Controls

Rollout User-Interface Controls Types

Rollout User-Interface Controls Common Layout Parameters

Rollout User-Interface Controls Common Properties


Dropdownlist

Dropdownlist UI Control

User Interface Controls > Common Properties > Layout > Types > Dropdownlist

A dropdownlist control is used to place a drop-down list in the rollout. The user can click open the list and scroll or click again to select an item in the list.

The syntax is:

dropdownlist <name> [ <caption> ] [ items:<array_of_strings> ] \
[ selection:<number> ] [ height:<number> ] [ tooltip:<string> ]

The default alignment of dropdownList items is #left.

FOR EXAMPLE:

rollout ddl_test "Drop-Down List"

(

 dropdownlist scale_dd "Scale" items:#("1/2", "1/4", "1/8", "1/16")

on scale_dd selected i do

 format "You selected '%'!\n" scale_dd.items[i]

)

createDialog ddl_test

Parameters

items:

The array of text strings that are the items in the list.

selection:

The 1-based number of the currently selected item in the list. Defaults to 1.

height:

The overall height of the dropdownlist in number of item lines. Defaults to 10 lines. To have a dropdownlist exactly display N items in the list, set height to N+1.

The minimum height value is clamped to 1 line.

FOR EXAMPLE:

rollout test "Test"
(

 dropdownlist dd "dd" \

  items:#("1","2","3","4","5","6","7","8","9","10") height:6
 label l "L"

)
createDialog test 200 200

--You will get 5 items in the dropdown list.

--Change height to 5, and you will get 4.

tooltip:

NEW in 3ds Max 2009: A string defining the tooltip to be displayed when the mouse rolls over the dropdownlist.

Properties

<dropdownlist>.items Array

Get/Set the item string array.

<dropdownlist>.selection Integer

The currently selected item number, 1-based. If the items list is an empty array, this value is 0.

<dropdownlist>.selected String

The text of the currently selected item. Can be set to replace individual items without resetting the entire items array. If the items list is an empty array, this value is undefined.

<dropdownlist>.width Integer

Get/set the width of the dropdownlist in pixels.

<dropdownlist>.height Integer

Get/set the height of the dropdownlist in pixels. (as opposed to lines as expected in the height: creation parameter!)

<dropdownlist>.tooltip String

NEW in 3ds Max 2009: Get/set the tooltip of the dropdownlist.

NOTE:

A limitation in the MS Windows implementation of the tooltips causes only the first 80 characters of the tooltip string to be returned to MAXScript.

Tooltips of any length can be SET though.

Events

on <dropdownlist> selected <arg> do <expr>

Called when the user selects an item in the drop-down list. The <arg> argument will contain the new current selection item number.

NOTE:

The event handler function selected() is named identically to the .selected property, which effectively hides the function and does not allow the user to call the hander from other parts of the script the way it is possible with all other event handlers of UI controls.

See the following entry in the Frequently Asked Questions for a workaround:

How do I call the dropdownList Selected handler as a function?

See also

Rollout User-Interface Items Common Properties

Rollout User-Interface Items Common Layout Parameters

Rollout User-Interface Control Types

How do I call the dropdownList Selected handler as a function?


Edittext

Edittext UI Control

User Interface Controls > Common Properties > Layout > Types > Edittext

An edittext control is used to place an editable text field where the user can type and edit text.

The syntax is:

edittext <name> [ <caption> ] [text:<string>] [fieldWidth:<integer>] [height:<integer>] [bold:<boolean>] [labelOnTop:<boolean>] [readOnly:<boolean>]

The default alignment of edittext items is #left.

Parameters

text:

The text string in the edit box. To specify a multiline text as parameter, both carriage return \r and new line \n sequences should be specified, for example "First Line \r\nSecond Line".

fieldWidth:

The width in pixels of the edit box. By default, the width is set to be from just after the caption text to the right margin of the rollout.

height:

If an explicit height: parameter is supplied on an editText item definition that specifies a pixel height greater than one line of text (18 pixels), that editText item becomes a multi-line edit box, allowing multiple lines of text to be entered.

WARNING!!!

If you specify the height of the edittext to be 18 pixels or more, the on entered event handler will not be called since the edittext will be in multi-line mode!

bold:

If set to true, the text string in the edit box is displayed in bold format, if set to false, in normal, non-bold format. The default value is false.

labelOnTop:

If set to true, the caption is placed above the edit text box. If false or not specified, the caption is placed to the left of the edit text box.

readOnly:

When set to true, the user cannot copy and paste or enter text in the editText control. When false or not specified, the user can enter, copy and paste text in the editText control.

Properties

<edittext>.text String

The text in the edit box. To specify a multiline text as parameter, both carriage return \r and new line \n sequences should be specified, for example "First Line \r\nSecond Line".

<edittext>.caption String

The text of the optional caption next to the edit box.

<edittext>.bold Boolean

If true, the text is displayed in bold format, if false, in normal, non-bold format.

<edittext>.width Integer

Get/set the width of the edittext window in pixels.

<edittext>.height Integer

Get/set the height of the edittext window in pixels.

<edittext>.readOnly

When set to true, the user cannot copy and paste or enter text in the editText control. When false or not specified, the user can enter, copy and paste text in the editText control.

Events

on <edittext> changed <arg> do <expr>

Called each time the user changes the text in the edit box; the <arg> argument will contain the new text in the edit box.

on <edittext> entered <arg> do <expr>

Called when the user enters text in the edit box and then presses ENTER or TAB to move the cursor out of the field. The <arg> argument will contain the new text in the edit box.

ONCE AGAIN, IN CASE YOU MISSED THE PREVIOUS WARNING:

If you specify the .height of the edittext to be 18 pixels or more, the on entered event handler will not be called since the edittext will be in multi-line mode!

In single-line mode (default height, or less than 18 pixels), if you enter a string in the edit box and then press ENTER, the on changed handler is called once per character and once for the ENTER. The on entered handler is just called once, for the ENTER.

When in multi-line mode, ENTER keystrokes no longer cause the 'on entered' handler to be called, but are inserted into the edit box as new lines.

They do, of course, cause 'on changed' handlers to be called. These are called on every keystroke.

For multi-line editText items, 'on entered' handlers are called when the edit box loses keyboard focus, such as if you tab or click out of the edit box.

EXAMPLE:

rollout boxCreator "Box Creator"

(

--define an edittext with width 100 and the label on top:

edittext prefix_txt "Name prefix:" fieldWidth:200 labelOnTop:true

--If the user entered a new name...

on prefix_txt entered txt do

(

--And the name is not the empty string,

if txt != "" do

(

--Create a new box at a random position

--somewhere between the given coordinates:

new_obj = box pos:(random [-100,-100,-100] [100,100,100])

--Set the name of the new object to the prefix entered,

--but add unique suffix to avoid duplicate names:

new_obj.name = (uniquename txt)

--And finally clear the editText for a new entry

--by assigning an empty string to the text property:

prefix_txt.text = ""

)

)

)

createDialog boxCreator 300 30 --create a Dialog from the rollout

See also

Rollout User-Interface Items Common Properties

Rollout User-Interface Items Common Layout Parameters

Rollout User-Interface Control Types


GroupBox

GroupBox UI Control

User Interface Controls > Common Properties > Layout > Types > GroupBox

The GroupBox is a UI Element which can be used to draw a rectangular box with or without caption at a user-defined position with user-defined size. Other than the Group described in Rollout Clauses , the GroupBox is not used to group UI Elements together (both in the source code and in the resulting rollout), but can be placed independently of any other UI Elements anywhere in the rollout.

The syntax is:

groupBox <name> [caption] [pos:<point2>] [width:<integer>] [height:<integer>]

Properties

<groupBox>.caption

Get/Set the caption of the group box.

<groupBox>.pos

Get/Set the position of the upper left corner of the group box.

<groupBox>.width

Get/Set the width of the group box.

<groupBox>.height

Get/Set the height of the group box.

NOTE:

Visual MAXScript uses only GroupBox UI Elements to define groups in the rollouts.

EXAMPLE

Added new table formatting for Examples:

rollout test "GroupBox Test"

(

spinner spin "Spin1: " align:#left across:2 offset:[0,20]

spinner unspin "Spin2: " align:#right offset:[0,20]

groupBox group1 "Group 1" pos:[5,5] width:95 height:50

groupBox group2 "Group 2" pos:[105,5] width:90 height:50

)

createDialog test 200 60

KNOWN PROBLEM:

Group boxes have a line drawn through them when using bitmap backgrounds with CreateDialog. This is a problem with the Windows groupbox control.

See also

Rollout User-Interface Items Common Properties

Rollout User-Interface Items Common Layout Parameters

Rollout User-Interface Control Types


HyperLink

User Interface Controls > Common Properties > Layout > Types > HyperLink

The syntax is:

hyperLink <name> [caption] [color:<color>] [hoverColor:<color>] [visitedColor:<color>] [address:<string>]

Properties

<HyperLink>.color Color default:(color 0 0 255)

Base color of the text.

<HyperLink>.hoverColor Color default:(color 0 255 255)

Color of text when mouse is over it.

<HyperLink>.visitedColor Color default:(color 0 0 192)

Color of text after you have used the link.

<HyperLink>.address String default:"http://www.discreet.com"

The string sent to ShellExecute

See also

Rollout User-Interface Items Common Properties

Rollout User-Interface Items Common Layout Parameters

Rollout User-Interface Control Types


ImgTag

User Interface Controls > Common Properties > Layout > Types > ImgTag

The syntax is:

imgTag <name> [caption] [tooltip:<string>] [style:<key>] [bitmap:<bitmap>] [opacity:<float>] [transparent:<color>]

Properties

<ImgTag>.tooltip String default:""

<ImgTag>.bitmap Bitmap default:undefined

Current image being displayed.

<ImgTag>.style Key default:#bmp_stretch

Way the bitmap will be displayed in the control.

Can be one of the following:

#bmp_stretch

#bmp_tile

#bmp_center

<ImgTag>.opacity float default:0.0

Overall opacity of the image, can range from 0.0 to 1.0

<ImgTag>.transparent color default:(color 0 0 0)

The RGB color in the source bitmap to treat as transparent.

NOTE:

Opacity and transparent properties only have an effect in W2K. These do not have an effect in NT.

Events

on <ImgTag> mousedown do <expr>

Called when the left mouse button is pressed down.

on <ImgTag> mouseup do <expr>

Called when the left mouse button is released.

on <ImgTag> click do <expr>

Called when the left mouse button is released.

on <ImgTag> dblclick do <expr>

Called when the left mouse button double clicked.

on <ImgTag> mouseover do <expr>

Called when the mouse is moved into the image area.

on <ImgTag> mouseout do <expr>

Called when the mouse is moved out of the image area.

on <ImgTag> rightclick do <expr>

Called when the right mouse button is released. Available in 3ds Max 8 and higher.

on <ImgTag> lbuttondown <Point2> <Flags> do <expr>

Called when the left mouse button has been pressed. Available in 3ds Max 8 and higher.

The first argument contains a Point2 value representing the 0-based pixel coordinates within the ImgTag.

The second argument is the Flags value which is a combination of the following bits:

  • 0x0001 - The left mouse button is down.

  • 0x0002 - The right mouse button is down.

  • 0x0004 - The SHIFT key is down.

  • 0x0008 - The CTRL key is down.

  • 0x0010 - The middle mouse button is down.

  • 0x0020 - The first X button is down.

  • 0x0040 - The second X button is down.

on <ImgTag> lbuttonup <Point2> <Flags> do <expr>

Called when the left mouse button has been released. Available in 3ds Max 8 and higher.

The first argument contains a Point2 value representing the 0-based pixel coordinates within the ImgTag.

The second argument is the Flags value as described above.

on <ImgTag> lbuttondblclk <Point2> <Flags> do <expr>

Called when the left mouse button has been double-clicked. Available in 3ds Max 8 and higher.

The first argument contains a Point2 value representing the 0-based pixel coordinates within the ImgTag.

The second argument is the Flags value as described above.

on <ImgTag> mbuttondown <Point2> <Flags> do <expr>

Called when the middle mouse button has been pressed. Available in 3ds Max 8 and higher.

The first argument contains a Point2 value representing the 0-based pixel coordinates within the ImgTag.

The second argument is the Flags value as described above.

on <ImgTag> mbuttonup <Point2> <Flags> do <expr>

Called when the middle mouse button has been released. Available in 3ds Max 8 and higher.

The first argument contains a Point2 value representing the 0-based pixel coordinates within the ImgTag.

The second argument is the Flags value as described above.

on <ImgTag> mbuttondblclk <Point2> <Flags> do <expr>

Called when the middle mouse button has been double-clicked. Available in 3ds Max 8 and higher.

The first argument contains a Point2 value representing the 0-based pixel coordinates within the ImgTag.

The second argument is the Flags value as described above.

on <ImgTag> rbuttondown <Point2> <Flags> do <expr>

Called when the middle mouse button has been pressed. Available in 3ds Max 8 and higher.

The first argument contains a Point2 value representing the 0-based pixel coordinates within the ImgTag.

The second argument is the Flags value as described above.

on <ImgTag> rbuttonup <Point2> <Flags> do <expr>

Called when the middle mouse button has been released. Available in 3ds Max 8 and higher.

The first argument contains a Point2 value representing the 0-based pixel coordinates within the ImgTag.

The second argument is the Flags value as described above.

on <ImgTag> rbuttondblclk <Point2> <Flags> do <expr>

Called when the middle mouse button has been double-clicked. Available in 3ds Max 8 and higher.

The first argument contains a Point2 value representing the 0-based pixel coordinates within the ImgTag.

The second argument is the Flags value as described above.

EXAMPLE

rcmenu MyRCmenu

(

menuItem mi_cs "First Option" checked:false

menuItem mi_rs "Second Option" checked:false

)

rollout ui_items "ui items"

(

button a2 "button"

on a2 rightClick do print a2

checkbutton a4 "checkbutton"

on a4 rightClick do print a4

local bm = bitmap 50 50 color:red

imgtag b5 "imgtag" bitmap:bm align:#center

on b5 mousedown v1 v2 do

format "% ; % ; % ; %\n" b5 #mousedown v1 v2

on b5 lbuttondown v1 v2 do

format "% ; % ; % ; %\n" b5 #lbuttondown v1 v2

on b5 mbuttondown v1 v2 do

format "% ; % ; % ; %\n" b5 #mbuttondown v1 v2

on b5 rightClick v1 v2 do

format "% ; % ; % ; %\n" b5 #rightClick v1 v2

on b5 rbuttondown v1 v2 do

format "% ; % ; % ; %\n" b5 #rbuttondown v1 v2

on b5 mouseup v1 v2 do

format "% ; % ; % ; %\n" b5 #mouseup v1 v2

on b5 click v1 v2 do

format "% ; % ; % ; %\n" b5 #click v1 v2

on b5 lbuttonup v1 v2 do

format "% ; % ; % ; %\n" b5 #lbuttonup v1 v2

on b5 mbuttonup v1 v2 do

format "% ; % ; % ; %\n" b5 #mbuttonup v1 v2

on b5 rbuttonup v1 v2 do

format "% ; % ; % ; %\n" b5 #rbuttonup v1 v2

on b5 dblclick v1 v2 do

format "% ; % ; % ; %\n" b5 #dblclick v1 v2

on b5 lbuttondblclk v1 v2 do

format "% ; % ; % ; %\n" b5 #lbuttondblclk v1 v2

on b5 mbuttondblclk v1 v2 do

format "% ; % ; % ; %\n" b5 #mbuttondblclk v1 v2

on b5 rbuttondblclk v1 v2 do

format "% ; % ; % ; %\n" b5 #rbuttondblclk v1 v2

on b5 mouseout v1 v2 do

format "% ; % ; % ; %\n" b5 #mouseout v1 v2

on b5 mouseover v1 v2 do

format "% ; % ; % ; %\n" b5 #mouseover v1 v2

mapbutton a11 "mapButton"

on a11 rightClick do print a11

materialbutton a12 "materialbutton"

on a12 rightClick do print a12

pickbutton a13 "pickbutton"

on a13 rightClick do (print a13; popupmenu MyRCmenu)

)

createdialog ui_items width:100

See also

Rollout User-Interface Items Common Properties

Rollout User-Interface Items Common Layout Parameters

Rollout User-Interface Control Types


Label

Label UI Control

User Interface Controls > Common Properties > Layout > Types > Label

A label control is used to place non-editable text on the rollout, perhaps a label for another item or a text message.

The syntax is:

label <name> [ <string> ] [ style_sunkenedge:<bool> ]

The default alignment of label items is #center.

NEW in 3ds Max 2009: When supplied and set to true, the style_sunkenedge: optional keyword parameter lets the label draw a half-sunken border around the control.

EXAMPLE:

rollout test "Test Label"

(

label lab1 "Sorry For The Inconveniences!"

label lab2 "DoN't PaNiC!" style_sunkenedge:true width:150 height:16

)

createDialog test

Properties

No additional properties for label.

Events

-- none --

See also

Rollout User-Interface Items Common Properties

Rollout User-Interface Items Common Layout Parameters

Rollout User-Interface Control Types


Listbox

Listbox UI Control

User Interface Controls > Common Properties > Layout > Types > Listbox

A Listbox control is used to place a list box in the rollout.

This is another variant of the drop-down list in which the list is always fully displayed in the rollout.

Unlike Combobox it has no edit-text field at the top and it is just a simple scrollable list. The user can scroll the list or click to select an item.

The syntax is:

listbox <name> [ <caption> ] [items:<array_of_strings>] [selection:<number>][height:<number>] [readOnly:<boolean>]

The default alignment of listbox items is #left.

Parameters

items:

The array of text strings that are the items in the list.

selection:

The 1-based number of the currently selected item in the list. The default selection value is 1.

height:

The overall height of the listbox in number of item lines. Defaults to 10 lines. To have a listBox display exactly N items, set height to N.

The minimum height value is clamped to 1 line.

readOnly:

When set to true, the user cannot pick items from the list. When false or not specified, the user can pick items from the list.

Properties

<listbox>.items Array Of Strings

The item string array.

<listbox>.selection Integer

The currently selected item number, 1-based. If the items list is an empty array, this value is 0.

<listbox>.selected String

The text of the currently selected item. Can be used to replace individual items with resetting the entire items array. If the items list is an empty array, this value is undefined.

<listbox>.readOnly

When set to true, the user cannot pick items from the list. When false, the user can pick items from the list.

<listbox>.width Integer

Get/set the width of the listbox list window in pixels.

<listbox>.height Integer

Get/set the height of the listbox list window in pixels.

NOTE:

As constructor parameter, height: specifies the height in lines of text, while the .height property specifies the height in pixels!

Events

on <listbox> selected <arg> do <expr>

Called when the user selects an item in the list. The <arg> argument contains the new current selection item number.

on <listbox> doubleClicked <arg> do <expr>

Called when the user double-clicks on an item in the list. Note that the on selected handler is always called on single clicks and on the first click of a double-click. The <arg> argument contains the number of the item double-clicked.

LISTBOX EXAMPLE:

rollout objectKiller "Object Killer"

(

--Define a list box, collect the names of all scene objects and

--assign them to the items array

listbox objectToKill "Objects:" items:(for o in objects collect o.name)

--If the user clicked a name on the list,

--get the name from the .items array by index

--then get the node by name and select it.

--COMPARE to the doubleClicked handler below which performs a

--similar task using a slightly different approach.

--Both ways are valid!

on objectToKill selected nameIndex do

select (getNodeByName objectToKill.items[nameIndex])

on objectToKill doubleClicked itm do

(

--Get node using its name from the .selected property and delete it:

delete (getNodeByName objectToKill.selected)

--Get the items into a temporary array:

temp = objectToKill.items

--Delete the doubleckicked item by index

--the local variable itm contains the index!

deleteItem temp itm

--Assign the result back to the items array:

objectToKill.items = temp

)

)

createDialog objectKiller --create a dialog from the rolloutParameters

See also

Rollout User-Interface Items Common Properties

Rollout User-Interface Items Common Layout Parameters

Rollout User-Interface Control Types


Mapbutton

Mapbutton UI Control

User Interface Controls > Common Properties > Layout > Types > Mapbutton

A Mapbutton control is used to place a button in the rollout that will display the 3ds Max Material/Map Browser dialog when clicked. Only texture maps will be displayed in the Material/Map Browser dialog.

The syntax is:

mapbutton <name> [ <caption> ] [map:<texturemap>] [images:<image_spec_array>] [toolTip:<string>] [ border:<boolean> ]

The default alignment of mapbutton items is #center.

EXAMPLE:

rollout test_mapbutton "Background"

(

label sbm_lbl "Background Map:"

mapbutton choosemap "<<none>>" tooltip:"Select Background Map" width:120

on choosemap picked texmap do

(

  environmentmap = texmap

  choosemap.text=classof texmap as string

)

)

createDialog test_mapbutton

Parameters

map:

The initial textureMap value returned by the map property before the user has selected a texture map using the mapbutton. Defaults to undefined.

images:

An image-specification array for providing bitmap images for the mapbutton. If this is specified, the <label> is ignored and the contents of the mapbutton are replaced with the bitmaps.

The form is:

images:#(<image>, <maskImage>, <count_integer>, <enabled_out_image_index>, <enabled_in_image_index>, <disabled_out_image_index>, <disabled_in_image_index>)

where <image> and <maskImage> can be either a bitmap file-name string or a MAXScript bitmap value. <count_integer> specifies the number of sub-images in the bitmaps, and the image_index values specify which sub-image in the bitmaps is to be used for each of the four mapbutton states.

FOR EXAMPLE:

bm1 = render camera:$cam01 outputSize:[80,60]

...

mapbutton foo images:#(bm1, undefined, 1, 1, 1, 1, 1)

would use a rendering as the mapbutton image, and

mapbutton decay images:#("dcybtns.bmp", "dcymask.bmp", 6, 1, 4, 1, 4)

would use sub-images 1 and 4 of bitmaps dcybtns.bmp and dcymask.bmp for the out and in states of the mapbutton, respectively.

See also Image Buttons .

toolTip:

Provides text for a tooltip for the mapbutton. No tooltip if unsupplied.

border:

NEW in 3ds Max 2009: When set to true or not specified, the mapbutton will be drawn with a border. This was the default behavior prior to 3ds Max 2009.

When set to false, the mapbutton will be drawn without a border, making it one with the UI background. If the mapbutton is enabled, the border will appear when the materialbutton is pressed, or upon mouseover.

Properties

<mapbutton>.map TextureMap

The current textureMap value for the mapbutton, or the textureMap value specified by the map parameter if the user has not yet selected a texture map.

<mapbutton>.images Array

Sets the image-specification array for the mapbutton. This property is write-only.

FOR EXAMPLE:

-- re-render, update button

bm1 = render()

foo.images = #(bm1, undefined, 1, 1, 1, 1, 1)

<mapbutton>.tooltip String

Get/set the tooltip string of the mapbutton.

Available in 3ds Max 9 and higher.

FOR EXAMPLE:

rollout test "Test"

(

mapbutton map_test "Map Button" tooltip:"This is a map button"

)

createDialog test

test.map_test.tooltip = "The tooltip has changed!"

Events

on <mapbutton> picked <arg> do <expr>

Called when the user selects a texture map from the Material/Map Browser dialog while in the mapbutton pick command mode. The <arg> argument will contain the selected textureMap value. The handler is not called if the user cancels out of the Material/Map Browser dialog.

on <mapbutton> rightclick do <expr>

Called when the right mouse button is released over the button. Available in 3ds Max 8 and higher.

NOTE:

When a mapButton is used in a rollout in a scripted material or textureMap plug-in, and so turn up the Material Editor, it behaves with the same functionality as sub-map buttons do in other materials and maps. This includes supporting drag-and-drop with instance/copy, and opening sub-maps if they have been assigned.

See also

Rollout User-Interface Items Common Properties

Rollout User-Interface Items Common Layout Parameters

Rollout User-Interface Control Types


Materialbutton

Materialbutton UI Control

User Interface Controls > Common Properties > Layout > Types > Materialbutton

A Materialbutton control is used to place a button in the rollout that will display the 3ds Max Material/Map Browser dialog when clicked. Only materials will be displayed in the Material/Map Browser dialog.

The syntax is:

materialbutton <name> [ <caption> ] [material:<material>] [images:<image_spec_array>] [toolTip:<string>] [border:<boolean>]

The default alignment of materialbutton items is #center.

EXAMPLE:

Rollout assign_material "Assign Material"

(

label smtl_lbl "Set selected object's material to:"

materialbutton choosemtl "Pick Material"

on choosemtl picked mtl do

(

  print mtl

  if $ != undefined do $.material=mtl

)

)

createDialog assign_material

Parameters

material:

The initial material value returned by the material property before the user has selected a material using the materialbutton. Defaults to undefined.

images:

An image-specification array for providing bitmap images for the materialbutton. If this is specified, the <label> is ignored and the contents of the materialbutton are replaced with the bitmaps.

The form is:

images:#(<image>, <maskImage>, <count_integer>, \
<enabled_out_image_index>, <enabled_in_image_index>, \
<disabled_out_image_index>, <disabled_in_image_index>)

where <image> and <maskImage> can be either a bitmap file name string or a MAXScript bitmap value. <count_integer> specifies the number of sub-images in the bitmaps, and the image_index values specify which sub-image in the bitmaps is to be used for each of the four materialbutton states.

FOR EXAMPLE:

bm1 = render camera:$cam01 outputSize:[80,60]

...

materialbutton foo images:#(bm1, undefined, 1, 1, 1, 1, 1)

would use a rendering as the materialbutton image, and

materialbutton decay images:#("dcybtns.bmp", "dcymask.bmp", 6, 1, 4, 1, 4)

would use sub-images 1 and 4 of bitmaps dcybtns.bmp and dcymask.bmp for the out and in states of the materialbutton, respectively.

See also Image Buttons .

toolTip:

Provides text for a tooltip for the materialbutton. No tooltip if unsupplied.

border:

NEW in 3ds Max 2009: When set to true or not specified, the materialbutton will be drawn with a border. This was the default behavior prior to 3ds Max 2009.

When set to false, the materialbutton will be drawn without a border, making it one with the UI background. If the materialbutton is enabled, the border will appear when the materialbutton is pressed, or upon mouseover.

Properties

<materialbutton>.material Material

The current material value for the materialbutton, or the material value specified by the material parameter if the user has not yet selected a material.

<materialbutton>.images Array

Sets the image-specification array for the materialbutton.

This property is write-only.

FOR EXAMPLE:

-- re-render, update button

bm1 = render()

foo.images = #(bm1, undefined, 1, 1, 1, 1, 1)

<materialbutton>.tooltip String

Get/set the tooltip string of the checkbutton.

Available in 3ds Max 9 and higher.

FOR EXAMPLE:

rollout test "Test"

(

mapbutton mat_test "Material Button" tooltip:"This is a material button"

)

createDialog test

test.mat_test.tooltip = "The tooltip has changed!"

Events

on <materialbutton> picked <arg> do <expr>

Called when the user selects a material from the Material/Map Browser dialog while in the materialbutton pick command mode. The <arg> argument will contain the selected material value. The handler is not called if the user cancels out of the Material/Map Browser dialog.

on <materialbutton> rightclick do <expr>

Called when the right mouse button is released over the button. Available in 3ds Max 8 and higher.

NOTE:

When a materialButton is used in a rollout in a scripted material plug-in, and so turn up the Material Editor, it behaves with the same functionality as sub-material buttons do in regular materials. This includes supporting drag-and-drop with instance/copy, and opening materials if they have been assigned.

WARNING!

A materialButton cannot be used in a rollout of a scripted map plug-in. The 3ds Max Material Editor architecture assumes that a Sub-Material can only be a child of another material and will be confused when trying to assign a sub-material to a map.

See also

Rollout User-Interface Items Common Properties

Rollout User-Interface Items Common Layout Parameters

Rollout User-Interface Control Types


MultiListBox

User Interface Controls > Common Properties > Layout > Types > MultiListbox

A MultiListBox item is used to place a list box in the rollout. This is a variant of the ListBox in which multiple items in the list can be selected. The syntax is:

MultiListBox <name> [ <caption> ] [ items:<array_of_strings> ] \
[ selection:{<bitarray> | <number_array> | <number>} ] \
[ height:<number> ]

The default alignment of MultiListBox items is #left.

EXAMPLE:

rollout test "test"

(

MultiListBox mlb "MultiListBox" items:#("A","B","C") selection:#(1,3)

on mlb selected val do format "selected: % - %\n" val mlb.selection[val]

on mlb doubleclicked val do format "doubleclicked: % - %\n" val mlb.selection[val]

on mlb selectionEnd do format "selectionEnd: %\n" mlb.selection

)

rof=newrolloutfloater "tester" 200 300

addrollout test rof

test.mlb.items

test.mlb.selection=1

test.mlb.selection=#(1,3)

test.mlb.selection=#{}

Parameters

items:

The array of text strings that are the items in the list.

selection:

A BitArray signifying the currently selected items in the list. The default selection value is #{}.

height:

The overall height of the MultiListBox in number of item lines. Defaults to 10 lines. To have a MultiListBox display exactly N items, set height to N.

Properties

<listbox>.items Array of Strings

The item string array.

<listbox>.selection BitArray

The currently selected items. When setting the selection via a script, the selection can be specified as a BitArray, Array of numbers, or a number. If the items list is an empty array, this value is 0.

Events

on <listbox> selected <arg> do <expr>

Called when the user selects or deselects an item in the list. The <arg> argument contains the index of the item that was selected or deselected. Since multiple items can be selected or deselected at once, this handler is called for each item in the list, starting from the top of the list, whose selection has changed.

on <listbox> doubleClicked <arg> do <expr>

Called when the user double-clicks on an item in the list. Note that the on selected handler is always called on single clicks and on the first click of a double-click. The <arg> argument contains the number of the item double-clicked.

on <listbox> selectionEnd do <expr>

Called when the user selects or deselects an item in the list, but after all the calls to the on selected handler have been made.

NOTE:

There isn't a way to deselect all the items in the list by clicking in the list somewhere, although it is possible by holding down CTRL key and clicking the last selected item.

To clear the list selection you might want to add a "Clear Selection" button that sets selection=#{}.


Pickbutton

Pickbutton UI Control

User Interface Controls > Common Properties > Layout > Types > Pickbutton

A pickbutton control is used to place a scene object-picker button on the rollout. It operates like a normal pick button in the 3ds Max user interface, turning light-green when pressed and causing an object-pick mode to be entered. The user can then choose a scene object by clicking on it. The pick mode exits and the button returns to its unpressed state. The user can right-click to cancel the pick mode.

The syntax is:

pickbutton <name> [ <caption> ] [message:<string>] [filter:<function>] [toolTip:<string>] [autoDisplay:<boolean>]

The default alignment of pickbutton items is #center.

EXAMPLE:

rollout pick_box_test "Pick Box Test"

(

--filter all objects of class Box:

fn box_filt obj = classof obj == Box

--Pickbutton to select a Box from the scene

pickbutton chooseit "Select Box" width:140 filter:box_filt

--If the user picked an object, then

on chooseit picked obj do

(

--see if the user did not cancel the picking...

 if obj != undefined do

 (

--if he did not, make the box's wireframe red:

 obj.wirecolor = red

--and display the name of the object on the button:

chooseit.text = obj.name

 )

)--end on

)--end rollout

createDialog pick_box_test

Note that the filter function will not let you select any other objects except Boxes.

Parameters

message:

The optional text to be displayed in the 3ds Max status line while in the pick mode. Default is no message.

filter:

The optional filter function that will be called to test the eligibility of the scene object under the cursor for picking. It must be a function of one argument, which will be the object under test, and return true if the object is eligible or false if not.

Default is no filtering.

EXAMPLE:

The following filter function allows only objects whose names begin with "foo" to be pickable:

fn foo_filter obj = matchPattern obj.name pattern:"foo*"

toolTip:

Provides text for a tooltip for the button. No tooltip if unsupplied.

autoDisplay:

When set to true, the name of the picked object will be automatically displayed as the text on the button. If false or not specified, the button caption will not be changed.

Properties

<pickbutton>.object Node

The last object picked using the pickbutton, undefined if no object has been picked. The property can be both get and set, accepting a node or undefined.

<pickbutton>.tooltip String

Get/set the tooltip string of the checkbutton.

Available in 3ds Max 9 and higher.

EXAMPLE:

--If you pick a scene object, the tooltip of the pickbutton will show

--the name of the object you picked.

rollout test "Test"

(

pickbutton pck_test ">>Pick An Object" tooltip:"Pick A Scene Object..."

on pck_test picked obj do

if isValidNode obj do pck_test.tooltip = "You picked " + obj.name

)

createDialog test

Events

on <pickbutton> picked <arg> do <expr>

Called when the user selects an object in the scene while in the pickbutton pick mode. The <arg> argument will contain the selected object. The handler is not called if the user cancels out of the pick mode.

on <pickbutton> rightclick do <expr>

Called when the right mouse button is released over the button. Available in 3ds Max 8 and higher.

See also

Rollout User-Interface Items Common Properties

Rollout User-Interface Items Common Layout Parameters

Rollout User-Interface Control Types


PopupMenu

PopupMenu <RCMenu> [pos:<Point2>] [rollout:<Rollout>] [align:<key>]

This method will popup a menu anywhere on the screen.

<RCMenu>: Any RCMenu defined. It does not have to be registered.

[pos:<Point2>]: The point where to put the menu up, either relative to the Rollout or the screen. (Default:popup from current mouse position.)

[rollout:<Rollout>]: This will make the menu popup from a rollouts local coordinate system. Specifying undefined will popup the menu relative to the upper left corner of the screen. (Default:undefined)

[align:<key>]: Can be one of the following (default:#align_topleft):

#align_topleft

#align_topcenter

#align_topright

#align_bottomleft

#align_bottomcenter

#align_bottomright

#align_vcenterleft

#align_vcentercenter

#align_vcenterright

See also

Rollout User-Interface Items Common Properties

Rollout User-Interface Items Common Layout Parameters

Rollout User-Interface Control Types


ProgressBar

ProgressBar UI Control

User Interface Controls > Common Properties > Layout > Types > Progressbar

A progressBar control is used to place a progress bar in a rollout.

The syntax is:

progressBar <name> [ value:<number> ] [ color:<color> ] [ orient:<name> ]

The default alignment of progressBar items is #left.

Parameters

value:

The initial progress percentage value (0 – 100). The default value is 0. This is an Integer value.

color:

The color of the progress bar. The default color value is [30,10,190].

orient:

Specifies whether the progress bar should fill from left to right (orient:#horizontal) or bottom to top (orient:#vertical). Default value is #horizontal.

Properties

<progressbar>.value Integer

The progress bar complete percentage (0 – 100).

<progressbar>.color Color

The color of the progress bar.

<progressbar>.orient Name

The orientation of the progress bar fill: #horizontal - left to right; #vertical - bottom to top.

EXAMPLE:

--define a rollout

rollout progressTest "Progress Test"

(

button doit "Process Scene" -- button to start processing

progressbar doit_prog color:red -- a red progress bar

on doit pressed do -- when the button is pressed...

(

objArray = geometry as array -- get all geometry objects into array

for i = 1 to objArray.count do -- and iterate through all of them

(

-- update the progress bar percentage

-- for example, if there are 20 geometry objects

-- and i is currently 1, you have 100.0*1/20 = 5%

-- when i is 2 you have 100.0*2/20 = 10% etc...

doit_prog.value = 100.*i/objArray.count

-- do something with the objects, like printing their names

print objArray[i].name

)-- end i loop

doit_prog.value = 0 -- when ready, reset the progress bar to 0%

)

)

createDialog progressTest 200 60 -- create a dialog to test

NOTE:

The .value property requires an integer between 0 and 100. When calculating a percentage from a current value and a total value, the order the values are multiplied and divided does matter!

Dividing them first and then multiplying by 100.0 would always return 0.0 because an Integer divided by an Integer yields an Integer, and since the result is less than zero, it is rounded down to zero:

1/20*100.0 -> 0*100.0 -> 0.0

2/20*100.0 -> 0*100.0 -> 0.0

3/20*100.0 -> 0*100.0 -> 0.0

but

100.0*1/20 -> 100.0/20 -> 5.0

100.0*2/20 -> 200.0/20 -> 10.0

100.0*3/20 -> 300.0/20 -> 15.0

When starting with the Float value 100.0, the final result is implicitly converted to a Float because a Float multiplied by an Integer returns a Float, and a Float divided by an Integer still returns a Float. The Float value is then converted internally to Integer when assigned to the .value property.

Events

on <progressbar> clicked <arg> do <expr>

Called when user clicks on the progress bar. The <arg> argument will contain the percentage value at the clicked point.

This event handler makes the progressbar an interactive UI control. See How To ... Enhance the Morpher Modifier With Floating Controls for an example of progressbar usage as slider replacement.

See also

Rollout User-Interface Items Common Properties

Rollout User-Interface Items Common Layout Parameters

Rollout User-Interface Control Types

Progress Bar Display


Radiobuttons

Radiobuttons UI Controls

User Interface Controls > Common Properties > Layout > Types > Radiobuttons

A radiobuttons control is used to place a set of radio buttons on the rollout, only one of which can be checked at a time. The user can click different buttons in the set to change states.

The syntax is:

radiobuttons <name> [ <caption> ] labels:<array_of_strings> [default:<number>] [columns:<number>]

The default alignment of radiobuttons items is #center.

EXAMPLE:

--Create some scene objects. Select them, then run the script:

(

local obj_array = selection as array

local obj_name_array = for o in obj_array collect o.name

rollout CloneObject "Clone Object" (

radiobuttons copy_type labels:#("copy", "instance", "reference")

radiobuttons which_obj labels:obj_name_array -- computed label array

button do_it "Copy Object"

fn updateButton = (

do_it.text = case copy_type.state of (

1: "Copy "

2: "Instance "

3: "Reference " )

do_it.text += obj_name_array [which_obj.state]

)--end fn

on copy_type changed state do updateButton()

on which_obj changed state do updateButton()

on CloneObject open do updateButton()

on do_it pressed do (

copyfn = case copy_type.state of (

1: copy

2: instance

3: reference )

if which_obj.state > 0 do copyfn obj_array[which_obj.state]

)--end on pressed

)--end rollout

if obj_array.count > 0 do createDialog CloneObject

)--end script

Parameters

labels:

An array of strings that specifies the number of radio buttons and the text label for each one.

default:

The number of the radio button initially selected. Default is 1.

When set to 0, none of the radio buttons will be selected.

columns:

Number of columns across in which to arrange the buttons. By default, MAXScript will attempt to lay out all the radio buttons side-by-side on one line, and if they won't fit, vertically in a single column. You can force the layout system to array the buttons in multiple columns using this parameter. Each column is given the same width, which is the width of the widest label in all columns and it left-adjusts the radio buttons in these columns.

EXAMPLE:

--create radio buttons with two columns:

rollout testRollout "Test Size"

(

radiobuttons rad_buttons "Size:" labels:#("Big", "Bigger", "Biggest", "Huge") columns:2

)

createDialog testRollout

Properties

<radiobuttons>.state Integer

The number of the currently selected radio button in the order specified in the labels: array, or 0 if none is selected.

EXAMPLE:

rollout testRadioButtons "Test RadioButtons"

(

-- Define 2 radio buttons with the first button selected

radiobuttons radButtons labels:#( "First","Second") default:1

-- When the button is pressed, clear the radio buttons selection!

button setToNone "Clear Buttons Selection"

on setToNone pressed do radButtons.state = 0

)

createDialog testRadioButtons

Events

on <radiobuttons> changed <arg> do <expr>

Called when the user clicks one of the radio buttons in the set. The <arg> argument will contain the new state of the radio buttons array, which is the 1-based number of the newly selected button.

See also

Rollout User-Interface Items Common Properties

Rollout User-Interface Items Common Layout Parameters

Rollout User-Interface Control Types


Slider

Slider UI Control

User Interface Controls > Common Properties > Layout > Types > Slider

A slider control is used to place a slider on the rollout, as an alternative to a spinner. The user can drag the slider's pointer around to set its value.

The syntax is:

slider <name> [ <caption> ] [range:[min,max,val] ] [type:<#float|#integer>] [ticks:10] [orient:<#horizontal|#vertical>] [controller:(<controller>)]

The default alignment of slider items is #center.

EXAMPLE:

slider tilt "Head tilt" orient:#vertical ticks:0 range:[-30,30,0]

on tilt changed val do $head.bend.angle = val

Parameters

range:

A Point3 value containing the minimum, maximum and initial values for the slider in the x, y, and z components, respectively. Defaults to [0,100,0].

type:

The type of the slider, #float or #integer. Defaults to #float.

orient:

The layout orientation of the slider in the rollout, either #vertical or #horizontal. Defaults to #horizontal.

ticks:

Specifies how many ticks to place along the slider bar. No ticks are drawn if you specify ticks:0. Defaults to 10.

controller:

Links the slider to the specified controller. This can be a new controller or 'undefined' to disconnect. This lets you establish a direct link between the slider and the controller. Changes to the slider will automatically update the controller (and its controlled objects). Changes to the controller automatically update the slider. This feature was previously available for spinner controls only. Available in 3ds Max 8 and higher.

Properties

<slider>.range Point3

The current range and value for the slider, as a Point3 like the range: parameter.

<slider>.value Float

The current value of the slider.

<slider>.ticks Integer

The number of ticks along the slider.

Events

on <slider> changed <arg> do <expr>

Called when the user moves the slider pointer. The <arg> argument contains the new value of the slider.

on <slider> buttondown do <expr>

Called when the user first clicks the slider.

on <slider> buttonup do <expr>

Called when the user releases the slider.

The buttonDown and buttonUp events effectively notify you of the start and end of a slider "twiddle", allowing you to perform some setup for the adjustment. A typical use for this is to bring scene nodes that are being modified in the on <slider> changed handler into the foreground plane to speed up screen redraw.

EXAMPLE:

slider foo "height: "

on foo buttonDown do flagForeground $baz...* true

on foo buttonUp do flagForeground $baz...* false

NOTE:

If you are using a slider to interactive adjust a property of an on-screen object, you can improve the interactive speed by moving the object to the foreground plane. Objects placed in the foreground plane are redrawn individually and so interactive changes to them are much faster. An object is moved to the foreground or background plane using the flagForeground() method described below:

flagForeground <node> <boolean> -- mapped

The boolean argument puts the scene node(s) into the foreground plane if true, or into the background plane if false.

You should be judicious in putting objects in the foreground plane, because putting too many objects in the foreground plane reduces the foreground plane's effectiveness. Remember to return objects to the background plane when you don't need to interactively control them any more.

See also

Rollout User-Interface Items Common Properties

Rollout User-Interface Items Common Layout Parameters

Rollout User-Interface Control Types


Spinner

Spinner UI Control

User Interface Controls > Common Properties > Layout > Types > Spinner

A spinner control is used to place a 3ds Max value spinner in a rollout. The user can drag the spinner arrows or type values into the spinner edit field.

The syntax is:

spinner <name> [ <caption> ] [ range:[min,max,val] ] [type:<name>] [scale:<float>] [ fieldWidth:<integer>] [indeterminate:<boolean>] [controller:(<controller>)]

The default alignment of spinner items is #right.

EXAMPLE:

spinner frab_amt "Frab %:" range:[0,100,10] type:#integer

spinner ball_radius "Ball radius" controller:($ball.radius.controller)

on frab_amt changed val do frabulate selection val

Parameters

range:

A Point3 value containing the minimum, maximum, and initial values for the spinner in the x, y, and z components, respectively. Defaults to [0,100,0].

type:

The type of the spinner: #float, #integer, or #worldunits. Defaults to #float. If type is #worldunits, the value is displayed in the current 3ds Max display units, but the value is always in internal system units.

scale:

The scale of the spinner specifies the smallest value increment. Defaults to 0.1 for floats, 1 for integers.

fieldwidth:

The width in pixels of the spinner text-edit field. By default, the spinner is placed so the left edge of the edit field is exactly in the center of the rollout and right edge is placed at the right margin. You can control how wide the field is using this parameter.

Indeterminate:

When set to true, the spinner edit field is blank.

controller:

Links the spinner to the specified controller. This can be a new controller or 'undefined' to disconnect. This lets you establish a direct link between the spinner and the controller. Changes to the spinner will automatically update the controller (and its controlled objects). Changes to the controller automatically update the spinner. For example, say you have a sphere called $ball with a float controller already assigned to its radius, then the following code:

utility foo "foo"

(

spinner ball_radius "Ball radius" range:[0,1000,1] \

controller:($ball.radius.controller)

)

sets up a spinner that automatically affects and tracks the radius of the scene node $ball. Any changes to the spinner update $ball's radius. Any other changes to $ball's radius, say in the Modify panel or because of animation, will update the spinner. Note that this links to controllers, so the specified controller must already exist before creating the spinner user-interface item. You can either specify a controller already assigned to the parameter you want to link to, or you can create the controller in your script and then assign that controller to the parameter of interest.

setKeyBrackets:

When set to true (on) or false (off), it will turn on and off the red keyframe brackets that signal a keyframe is present for animated parameters. This allows you to simulate keyframe notification in scripted rollouts by setting this spinner property on or off, most likely in a time change callback function.

EXAMPLE:

utility foo "foo"

(

  local myController=bezier_float()

  spinner ball_radius "Ball radius" range:[0,1000,1] \

  controller:myController

  button apply "Apply Radius Controller"

  on apply pressed do

  (

   animate off at time 0 $ball.radius=myController.value

   $ball.radius.controller=myController

  )

)

Properties

<spinner>.range Point3

The current range and value for the spinner, as a Point3 like the range: parameter.

<spinner>.value Float

The current value of the spinner.

<spinner>.setKeyBrackets Boolean

When set to true (on) or false (off), it will turn on and off the red keyframe brackets that signal a keyframe is present for animated parameters. This allows you to simulate keyframe notification in scripted rollouts by setting this spinner property on or off, most likely in a time change callback function.

<spinner>.indeterminate Boolean

When set to true, the spinner edit field is blank. The value of the spinner is unchanged and remains accessible when a spinner is set to indeterminate. Setting the spinner's value sets indeterminate to false.

Events

on <spinner> changed <arg> [<inSpin_arg>] do <expr>

Called when the user spins the spinner, or when the user enters a value in the spinner field then presses ENTER or presses TAB to move the cursor out of the field. The <arg> argument will contain the new value of the spinner.

The optional <inSpin_arg> argument will contain true if the value was changed by spinning using the mouse and the arrows and false if the value was entered using the keyboard and the value field. Available in 3ds Max 8 and higher.

on <spinner> entered [<inSpin_arg>] [<inCancel_arg>] do <expr>

Called when the user types a number into a spinners edit field and then presses ENTER or presses TAB to move the cursor out of the field. Also called when the spinner is released. The on <spinner> changed and <spinner> buttonUp handlers, if supplied, have already been called at this point and the spinner's value property is up to date.

The optional first <inSpin_arg> argument will contain true if the value was entered by spinning the arrows and releasing the mouse and false if the value was entered using the keyboard and the value field. Available in 3ds Max 8 and higher.

The optional second <inCancel_arg> argument will contain true if the value change was canceled with a mouse right-click and false if no cancel was performed. Available in 3ds Max 8 and higher.

on <spinner> buttondown do <expr>

Called when the user first clicks the spinner.

on <spinner> buttonup [<inCancel_arg>] do <expr>

Called when the user releases the spinner.

The optional <inCancel_arg> argument will contain true if the value change was canceled with a mouse right-click and false if no cancel was performed. Available in 3ds Max 8 and higher.

NOTE:

The buttonDown and buttonUp events effectively notify you of the start and end of a spinner "twiddle", allowing you to perform some setup for the adjustment. A typical use for this is to bring scene nodes that are being modified in the on <spinner> changed handler into the foreground plane to speed up screen redraw.

If you are using a spinner to interactive adjust a property of an on-screen object, you can improve the interactive speed by moving the object to the foreground plane. Objects placed in the foreground plane are redrawn individually and so interactive changes to them are much faster. An object is moved to the foreground or background plane using the flagForeground() method described below:

flagForeground <node> <boolean> -- mapped

The boolean argument puts the scene node(s) into the foreground plane if true, or into the background plane if false.

You should be judicious in putting objects in the foreground plane, because putting too many objects in the foreground plane reduces the foreground plane's effectiveness. Remember to return objects to the background plane when you don't need to interactively control them any more.

EXAMPLE:

spinner foo "height: "

on foo buttonDown do flagForeground $baz...* true

on foo buttonUp do flagForeground $baz...* false

See also

Rollout User-Interface Items Common Properties

Rollout User-Interface Items Common Layout Parameters

Rollout User-Interface Control Types


Timer

Timer UI Control

User Interface Controls > Common Properties > Layout > Types > Timer

A timer control generates tick events at set intervals. Timer is unlike the remainder of the user-interface items as it is not a visible control. Timer lets the user interface react, animate, or change without user interaction, such as having animations playing on the rollout, checking for certain conditions or events before continuing, displaying nag/splash screens, and so on.

The syntax is:

timer <name> [ interval:<number> ] [ active:<boolean> ]

EXAMPLE:

rollout test "Test Timer"

(

timer clock "testClock" interval:1000 --tick once a second

label test "1"

on clock tick do

(

valUp = (test.text as integer)+1

test.text = valUp as string

)

)

createDialog test

Parameters

interval:

An integer value specifying the time in milliseconds between tick events. Default value 1000 (1 second).

active:

Specifies whether the timer emits tick events. Default value true.

Properties

<timer>.interval Integer

Integer value specifying the time in milliseconds between tick events.

<timer>.active Boolean

Specifies whether the timer emits tick events (true) or not (false). When first set to true, the first tick event is generated in interval milliseconds.

<timer>.ticks Integer

The read/write .ticks property is incremented by 1 on each ‘tick’ of the timer. Can be both get and set.

Events

on <timer> tick do <expr>

Called when timer ticks.

See also

Rollout User-Interface Items Common Properties

Rollout User-Interface Items Common Layout Parameters

Rollout User-Interface Control Types


Image Buttons

User Interface Controls > Common Properties > Layout > Types > Image Buttons

Four rollout user-interface item types, button, checkbutton, mapbutton, and materialbutton, can be either simple text buttons containing text labels or image buttons inside of which bitmaps can be displayed instead of text. The images to be displayed in these buttons are specified using the definition-line parameter images:.

The parameter form is:

images:#(<image>, <maskImage>, <count_integer>, <enabled_out_image_index>, <enabled_in_image_index>, <disabled_out_image_index>, <disabled_in_image_index>)

where <image> and <maskImage> can be either a bitmap file-name string or a MAXScript bitmap value. <count_integer> specifies the number of sub-images in the bitmaps, and the image_index values specify which sub-image in the bitmaps is to be used for each of the four button states.

EXAMPLE:

bm1 = render camera:$cam01 outputSize:[80,60]

...

checkbutton foo images:#(bm1, undefined, 1, 1, 1, 1, 1)

The checkbutton would use a rendering as the button image.

If the image or maskImage is specified as a file name, the bitmap file is searched for in the following directories (in order of search): current MAXScript directory, MAXScript startup directory, MAXScript directory, 3ds Max bitmap directories, and then the 3ds Max image directory.

There are four images that can be specified, one for each of the possible button states, enabled-out, enabled-in, disabled-out, and disabled-in. These images are taken from a single bitmap file or MAXScript bitmap value in which a number of images are stored side-by-side. This bitmap, containing one or more images to use for the button, is called the imagelist. All the sub-images in such an imagelist are taken to be the same width and you specify which image is used for which state by providing an image-index into the bitmap. This means you can store the images for all the states of many buttons in one file, specifying different indexes for the different buttons.

You can also specify a black-and-white mask image used to mask the image display into the buttons. It is given in the same imagelist form and the mask image indexes must be the same as the images they correspond to. Black pixels in the mask let the corresponding image pixel show; white pixels hide corresponding image pixels and show the default background color for the button. If there is no mask file, supply the value undefined for the mask file name.

Bitmap files without full path names are searched for in the Startup scripts directory, then the scripts directory, then the 3ds Max images directory, then the 3ds Max executables directory, and then the directories in the PATHS environment variable.

You can change the images in a button by setting the .images property of these user-interface items,

FOR EXAMPLE:

-- re-render, update button

bm1 = render camera:$cam01 outputSize:[80,60]

foo.images = #(bm1, undefined, 1, 1, 1, 1, 1)

EXAMPLE:

checkbutton decay images:#("dcybtns.bmp", "dcymask.bmp", 6, 1, 4, 1, 4)

In this example, the images are in a file dcybtns.bmp and the masks in dcymask.bmp. These bitmap files each have six images across and the out-state is image 1 and the in-state is image 4. Both enabled and disabled here are given as the same image, presumably because this particular button will never be disabled.


CreateDialog

CreateDialog lets you turn an existing rollout definition into a floating Dialog. Other than a RolloutFloater, a Dialog consists of a single rollout. It provides advanced features like a modal option, background bitmap display and mouse event handlers.

The syntax for creating dialogs is:

CreateDialog <Rollout> [<height> <width> <position_x> <position_y>]\

[pos:<Point2>] [width:<integer>] [height:<integer>] \

[bgcolor:<color>] [fgcolor:<color>] \

[bitmap:<bitmap>] {bmpstyle:<bmpstyle> \

[menu:<RCMenu>] [style:<array>] [modal:<boolean>] \ [escapeEnable:<boolean>] [lockHeight:<boolean>] [lockWidth: <boolean>]

When the optional modal:<boolean> keyword is set to true, the dialog ignores all user interactions except those within the dialog. Call DestroyDialog() to close it, presumably in a scripted OK button. The user can also close a modal scripted dialog by hitting the Escape key as long as escapeEnable keyword is set to false or not supplied.

When the optional escapeEnable keyword is set to true, MAXScript escape checker will be disabled for the dialog, preventing the "MaxScript Interrupt" message from appearing.

If the optional lockHeight keyword is true, the height of the dialog cannot be interactively changed. If the optional lockWidth keyword is true, the width of the dialog cannot be interactively changed.

Parameters

<Rollout>

The rollout definition to create the dialog from.

[pos:<Point2>] -- default:dialog will center within MAX.

Placement of the upper left corner of the dialog relative to the upper left corner of the screen.

[width:<integer>] -- default:200

Width of the dialog box.

[height:<integer>] -- default:dynamic on control extents

Height of the dialog box.

[bgcolor:<color>] -- default:(<system button color>)

Background color of the dialog.

[fgcolor:<color>] -- default:(color 0 0 0)

Forground color of the dialog (static text color)

[bitmap:<bitmap>] -- default:undefined

Background bitmap for the dialog.

[bmpstyle:<key>] -- default:#bmp_center

The way that the background bitmap is displayed.

Can be one of the following:

#bmp_center

#bmp_tile

#bmp_stretch

[menu:<RCMenu>] -- default:undefined

Menu that will apear in the title bar area of the dialog.

[style:<array>] -- default:#(#style_titlebar, #style_border, #style_sysmenu)

Array of style flags, can be one or more of the following:

#style_border: Creates a window with a double border but no title.

#style_titlebar: Creates a dialog with a title bar.

#style_toolwindow: Creates a tool window, which has a title bar and is intended to be used as a floating toolbar. A tool window has a title bar that is shorter than a normal title bar, and the window title is drawn using a smaller font.

#style_resizing: Creates a window with a thick frame that can be used to size the window.

#style_minimizebox: Creates a window that has a minimize button.

#style_maximizebox: Creates a window that has a maximize button.

#style_sysmenu: Creates a window that has a window menu in its title bar.

#style_sunkenedge: Specifies that a window has a 3D look, in the form of a border with a sunken edge.

NOTE:

If the style keyword parameter is not specifed, the default styles of #style_titlebar, #style_border, #style_sysmenu are used.

Events

on <Rollout> open do

Called when the dialog is opening.

on <Rollout> close do

Called when the dialog is closing.

on <Rollout> moved <Point2> do

Called when the dialog is being moved.

on <Rollout> resized <Point2> do

Called when the dialog is being resized.

on <Rollout> mousemove <Point2> do

Called when the mouse is being moved within the dialogs client area.

on <Rollout> lbuttondown <Point2> do

Called when the left mouse button is pressed down within the dialog.

on <Rollout> lbuttonup <Point2> do

Called when the left mouse button is released.

on <Rollout> lbuttondblclk <Point2> do

Called when left mouse button is double clicked within the dialog.

on <Rollout> mbuttondown <Point2> do

Called when middle mouse button is pressed down within the dialog.

on <Rollout> mbuttonup <Point2> do

Called when the middle mouse button is released.

on <Rollout> mbuttondblclk <Point2> do

Called when middle mouse button is double clicked within the dialog.

on <Rollout> rbuttondown <Point2> do

Called when right mouse button is pressed down within the dialog.

on <Rollout> rbuttonup <Point2> do

Called when the right mouse button is released.

on <Rollout> rbuttondblclk <Point2> do

Called when right mouse button is double clicked within the dialog.

NOTE:

The <Point2> value passed to the event handlers is the position of the mouse within the dialog client window. A value of [0,0] corresponds to the top left corner of the clientwindow. The top left corner of the dialog window

Associated Methods

<Point2>GetDialogPos <Rollout>

Returns the position of the Dialog built from the rollout relative to the upper left corner of the screen in Point2 format.

SetDialogPos <Rollout> <Point2>

Sets the position of the dialog built from the rollout relative to the upper left corner of the screen.

Rollout: The rollout used to build the Dialog.

Point2: Position where the Dialog is placed.

<Point2>GetDialogSize <rollout>

Returns the size of the window's client area. Equivalent to

point2 <rollout>.width <rollout>.heigh

SetDialogBitmap <rollout> <bitmap>

Sets the bitmap background for the dialog associated with the rollout. If the rollout is not in a dialog, no action is taken. A value of 'undefined' for the bitmap will clear the current bitmap.

<bitmap>GetDialogBitmap <rollout>

Gets the bitmap background for the dialog associated with the rollout. If the rollout is not in a dialog, 'undefined' is returned

See also

DestroyDialog

GetDialogPos and SetDialogPos

MAXScript Dialogs and Rollout Floaters as Extended viewports


DestroyDialog

DestroyDialog <Rollout>

Closes a dialog box created with CreateDialog.

<Rollout>: The rollout used to build the dialog to close.

See also

CreateDialog

GetDialogPos and SetDialogPos


GetDialogPos and SetDialogPos

<Point2>GetDialogPos <Rollout>

Returns the position of the Dialog built from the rollout relative to the upper left corner of the screen in Point2 format.

SetDialogPos <Rollout> <Point2>

Sets the position of the Dialog built from the rollout relative to the upper left corner of the screen.

<Rollout>: The rollout used to build the Dialog to set the position of.

<Point2>: Position where to place the Dialog.

See also

CreateDialog

DestroyDialog


cui.RegisterDialogBar and cui.UnRegisterDialogBar

cui.RegisterDialogBar <RolloutFloater_or_Rollout> [minSize:<Point2>] [maxSize:<Point2>] [style:<Array>]

This method registers a MAXScript window as a dockable CUI window in MAX.

Parameters

<RolloutFloater_or_Rollout>

This parameter must be a RolloutFloater created with NewRolloutFloater or a Rollout that has been installed in a dialog using CreateDialog.

[minSize:<Point2>] -- default: size of the floater or dialog that was passed.

Minimum size the dialog bar can be.

[maxSize:<Point2>] -- default: size of the floater or dialog that was passed.

Maximum size that the dialog bar can be. Values of -1 passed mean that the dialogbar can size and stretch.

[style:<Array>] -- default:#(#cui_dock_all, #cui_floatable, #cui_handles)

Array of style flags, can be one or more of the following:

#cui_dock_all

Dialog bar can dock on all 4 edges of the frame.

#cui_dock_horz

Can dock horizontally (top and bottom)

#cui_dock_vert

Can dock vertically (left and right)

#cui_dock_left

Can dock to the left

#cui_dock_top

Can dock to the top

#cui_dock_right

Can dock to the right

#cui_dock_bottom

Can dock to the bottom

#cui_floatable

Dialogbar can float

#cui_handles

Show gripper handles when docked

#cui_max_sized

When this flag is specified, docking the dialogbar on the top causes the dialogbar to expand to the full window width, docked to bottom it expands to full window width minus command panel width.

NOTES:

A rollout that has been registered as a dialog bar cannot be destroyed using destroyDialog, or moved using setDialogPos. The rollout must be unregistered first.

A rollout floater that has been registered as a dialog bar cannot be closed using closeRolloutFloater, its position cannot be changed using the rollout floater's pos property, its size cannot changed with the rollout floater's size property. The rollout floater must be unregistered first.

A new read-only property has been added to the Rollout and RolloutFloater classes: dialogBar. This property will return true if the rollout or rollout floater has been registered using this method:

cui.UnRegisterDialogBar <RolloutFloater_or_Rollout>

This method un-registers a dockable MAXScript window.

<RolloutFloater_or_Rollout>

This parameter must be a RolloutFloater created with NewRolloutFloater or a Rollout that has been installed in a dialog using CreateDialog, and has been registered using cui.RegisterDialogBar.

See also

CreateDialog

DestroyDialog

GetDialogPos and SetDialogPos

cui.DockDialogBar and cui.FloatDialogBar


cui.DockDialogBar and cui.FloatDialogBar

cui.DockDialogBar <RolloutFloater_or_Rollout> <dockflag>

This method docks a registered dialog bar to the specified docking area.

<RolloutFloater_or_Rollout>

This parameter must be a RolloutFloater created with NewRolloutFloater or a Rollout that has been installed in a dialog using CreateDialog, and has been registered using cui.RegisterDialogBar.

<dockflag>

Specifies the area to dock the dialog bar to. Can be one of the following:

#cui_dock_left -- dock to the left
#cui_dock_top -- dock to the top
#cui_dock_right -- dock to the right
#cui_dock_bottom -- dock to the bottom

NOTE:

Attempting to set the <dockflag> to any other value than the listed above will cause unpredictable results. Always dock to one of the four sides.

cui.FloatDialogBar <RolloutFloater_or_Rollout>

This method will float a registered dialog bar.

<RolloutFloater_or_Rollout>

This parameter must be a RolloutFloater created with NewRolloutFloater or a Rollout that has been installed in a dialog using CreateDialog, and has been registered using cui.RegisterDialogBar.

See also

CreateDialog

DestroyDialog

GetDialogPos and SetDialogPos

cui.getDockState


cui.getDockState

cui.getDockState <RolloutFloater_or_Rollout>

This method returns the current dock state of the registered dialog bar.

Parameters

<RolloutFloater_or_Rollout>

This parameter must be a RolloutFloater created with NewRolloutFloater or a Rollout that has been installed in a dialog using CreateDialog, and has been registered using cui.RegisterDialogBar.

Output

The current dock state of the given dialog bar can be one of the following:

#cui_dock_left

#cui_dock_top

#cui_dock_right

#cui_dock_bottom

#cui_floatable

See also

CreateDialog

DestroyDialog

GetDialogPos and SetDialogPos

cui.RegisterDialogBar and cui.UnRegisterDialogBar


cui.setAppTitle

cui.setAppTitle <string>

This method sets the title bar of the main 3ds Max window to the specified string.

NOTE:

The title string will be automatically reset to default on file operations like Reset, New, Open etc.

Parameters

<string>

The string to be displayed in the title bar of the main 3ds Max window


Scripted Right-Click Menus

MAXScript provides a set of classes and functions and some special syntax to allow you to construct custom right-click menus.

Feature History

In versions prior to 3ds Max 4 when the QuadMenu system was still not available, scripted right-click menus could be incorporated into the existing 3ds Max user interface. The typical use of right-click menus was to provide quick access to a selection of tools written in MAXScript. These tools would typically have no user interface, however one could create dialogs or rollout floater windows in a right-click menu to display a user interface

For an example and list of deprecated methods, see the topic Deprecated RCmenu Methods

Current Usage

With the introduction of the QuadMenu system in 3ds Max 4, registering custom scripted right-click menus became impossible, but the menus themselves can still be used in scripted tools:

  • The popUpMenu() method described below is still available and could be called from event handlers or macroScripts to display a right-click menu under the mouse cursor.

  • The scripted dialogs created from rollouts using the createDialog() method provide an optional menu: parameter which accepts an RCmenu which is then displayed as a menu bar on top of the dialog. See the CreateDialog topic for details.

Creation

A scripted right-click menu is created using the RCMenu definition construct in MAXScript, and then you register the right-click menu with 3ds Max. The top-level definition syntax is as follows:

rcmenu <var_name> ( <rcmenu_body> )

where:

<var_name> is the name of an automatically created global variable to hold the rcmenu value that represents the right-click menu.

<rcmenu_body> is enclosed in the required parentheses and is a sequence of clauses that define the menu items that will appear in the utility, along with functions and event handlers that process user interactions. These clauses are defined in detail in RCMenu Clauses .

Methods

popUpMenu <RCMenu> [pos:<Point2>] [rollout:<Rollout>] [align:<key>]

This method will popup a menu anywhere on the screen. The controls are as follows:

<RCMenu>: Any RCMenu defined. It does not have to be registered.

[pos:<Point2>]: The point where the menu pops up, either relative to the Rollout or the screen. (Default: popup from current mouse position.)

[rollout:<Rollout>]: This will make the menu popup from a rollouts local coordinate system. Specifying undefined will cause the menu to popup relative to the upper left corner of the screen. (Default: undefined)

[align:<key>]: Can be one of the following (Default: #align_topleft):

#align_topleft

#align_topcenter

#align_topright

#align_bottomleft

#align_bottomcenter

#align_bottomright

#align_vcenterleft

#align_vcentercenter

#align_vcenterright

If a runtime error occurs while executing a scripted right-click menu, an error message is displayed in Listener. The right-click menu will not be disabled.

See also

Scripted Right-Click Menus

RCMenu Clauses

RCMenu User-Interface Items


RCMenu Clauses

The <rcmenu_body> of a right-click menu definition is made up of a sequence of scripted right-click menu clauses as follows:

<rcmenu_body> ::= { <rcmenu_clause> }+

Scripted right-click menu clauses define the components of a scripted right-click menu and can be one of three basic things:

  • Local variables, functions or structure definitions are variables, functions, and structures whose scope is the scripted right-click menu. These locals will exist as long as the scripted right-click menu value exists. The scripted right-click menu value will exist until the scripted right-click menu value is redefined or deleted. Local variables are particularly useful for storing working data associated with the right-click menu such as picked objects.

  • User-interface items are displayed in the right-click menu, such as menu items, separators, and submenus.

  • Event handlers are special kinds of functions that are associated with particular user-interface items. Event handlers specify the processing you want to occur when a user interacts with an user-interface item, for example pressing a menu item or opening a submenu. These user actions generate named events and the optional event handler you supply for that event is called when the user action occurs.

The visibility of locals, and accessing scripted right-click menu locals from external code, are the same as described for utility rollouts, and described in Visibility of Locals, Functions, Structures, and User-Interface Items in Rollout Code and Accessing Locals and Other Items in a Rollout from External Code . In both utility rollouts and scripted right-click menus, the name given to a user-interface item is used to name an automatically constructed local variable that will hold the value representing the item. It is also used to associate event handler functions with the item. One difference between the scoping of these variables is that they are local to the rollout in utility rollouts, and local to the scripted right-click menu in scripted right-click menus. This means that all user-interface items in a scripted right-click menu must have a unique name within the scripted right-click menu, even for those items present in a subMenu.

Formally, the syntax of a <rcmenu_clause> is defined as follows:

<rcmenu_clause> ::= <local_variable_decl> | <local_function_decl> | <local_struct_decl> | <user_interface_item> | <event_handler>

Locals

A <local_variable_decl>, <local_function_decl>, and <local_struct_decl> are exactly the same as local variable, function, and structure definitions in MAXScript:

<local_variable_decl> ::= local <decl> { , <decl> }

<decl> ::= <name> [ = <expr> ] -- optional initial value

<local_function_decl> ::= [ mapped ](function | fn) <name> { <argument> } = <expr>

<local_struct_decl> ::= struct <name> ( <member> { , <member> } )

<member> ::= ( <name> [ = <expr> ] | <local_function_decl> )

EXAMPLES OF THE ABOVE (IN ORDER) ARE:

local numSelected

local numSelected = 0

fn onlyOneSelected = selection.count == 1

struct parents (mother="",father="")

Global variables cannot be declared as a scripted right-click menu clause, however they can be declared within event-handler scripts. If you need to ensure that a variable name references a global variable, declare the variable name as global immediately before defining the right-click menu in your script.

When writing scripts, it is good programming practice to explicitly declare your local and global variables. Implicit declaration is provided as a short-hand, typically used when working in the Listener interactively or developing short scripts. When developing extended scripts, explicitly declaring variables can reduce errors and improve readability of the code. It is also recommend that you declare as local all variables unless you really want them to be global variables. The reasons for this are described in Scope of Variables .

User-Interface Items

A <user_interface_item> defines an individual menu item, separator, or submenu user-interface item that will appear in the right-click menu. These user-interface items are described in RCMenu User-Interface Items .

Event Handlers

An <event_handler> is a special function definition local to a scripted right-click menu that you provide to handle the processing you want to occur when a user clicks on a menu item. This user action generates a named event and any event handler you supply for that event is called when the action occurs. The syntax for defining a handler is as follows:

on <item_name> <event_name> do <expr>

The <item_name> specifies the name of the item for which this handler is connected. The <event_name> specifies the type of event to be handled. There is only one type of user-interface item event:

picked

The picked handler expression is executed when a menu item is picked from the right-click menu. Any MAXScript action like creating a object, adding a modifier, and so on can be performed in this expression.

In addition to the event handlers you specify for particular menu items in a right-click menu, you can define a handler function that is called when the entire right-click menu is first opened by the user. This event handler is useful for initialization code. The syntax for this event handler is as follows:

on <rcmenu> open do <expr>

See also

Scripted Right-Click Menus

RCMenu User-Interface Items


Deprecated RCmenu Methods

Right-click menus were used in 3ds Max 2 and 3 in place of the QuadMenus introduced in 3ds Max 4. The following methods were made obsolete by the QuadMenus system, but still exist in 3ds Max.

This page is provided as part of the history of MAXScript but does not reflect current features of 3ds Max!

The following methods let you register and unregister scripted right-click menus:

registerRightClickMenu <rcmenu>

Registers the specified right-click menu.

This method was made obsolete by the QuadMenu system in 3ds Max 4 and higher.

unRegisterRightClickMenu <rcmenu>

Unregisters the specified right-click menu

This method was made obsolete by the QuadMenu system in 3ds Max 4 and higher.

unRegisterAllRightClickMenus()

Unregisters all right-click menus.

This method was made obsolete by the QuadMenu system in 3ds Max 4 and higher.

The following script for 3ds Max 2 and 3 would add two items to the right-click menu: Cast Shadows and Receive Shadows. These items would be enabled only if one object is selected. If enabled, the items would be checked or unchecked based on the current state of the selected object. Choosing a menu item would flip the state of the corresponding object property.

SCRIPT FROM 3DS MAX 3:

rcmenu MyRCmenu

(

menuItem mi_cs "Cast Shadows" checked:false

menuItem mi_rs "Receive Shadows" checked:false

--

on MyRCmenu open do

(

local sel = (selection.count == 1)

-- Enable if only one object is selected

mi_cs.enabled = mi_rs.enabled = sel

-- Set check state of items

if sel do

(

mi_cs.checked = $.castShadows

mi_rs.checked = $.receiveShadows

)

)

-- set up event handlers for items

on mi_cs picked do $.castShadows = (not $.castShadows)

on mi_rs picked do $.receiveShadows = (not $.receiveShadows)

)

-- register the rcmenu

registerRightClickMenu MyRCmenu

You could register as many scripted right-click menus as you like. Each scripted right-click menu registered was appended to the right-click menu window. If a scripted right-click menu with the same name was registered twice, the old one was overwritten by the new one.

See also

Scripted Right-Click Menus


RCMenu User-Interface Items

There are three types of user-interface items you can use to construct your scripted right-click menu. The user-interface control types are:

menuItem

separator

subMenu

See also

Scripted Right-Click Menus

RCMenu Clauses


menuItem

A menuItem is used to place a pickable item in the right-click menu. The syntax for a menuItem is:

menuItem <name> <label> [ checked:<boolean> ] [ enabled:<boolean> ] [ filter:<function> ]

Parameters

name:

Used to refer to when writing an event handler.

label:

The string that appears in the right-click menu.

checked:

Specifies if a check mark appears before the label in the right-click menu. If true the item is checked, otherwise the item is unchecked.

enabled:

Specifies if the item is enabled for interaction when the right-click menu is opened. If true the item is enabled, otherwise the item is disabled and appears unavailable.

filter:

A function that returns a Boolean value. The filter function is evaluated when the right-click menu is first opened. If the filter function returns true the menuItem appears in the menu, otherwise it is not displayed.

Properties

<menuitem>.text String

The string that appears in the right-click menu.

<menuitem>.checked Boolean

Specifies if a check-mark appears before the label in the right-click menu. If true the item is checked, otherwise the item is unchecked.

<menuitem>.enabled Boolean

Specifies if the item is enabled for interaction when the right-click menu is opened. If true the item is enabled, otherwise the item is disabled and appears as unavailable.

Events

on <menuitem> picked do <expr>

Called when the user clicks the menu item.

EXAMPLE:

rcmenu RCmenuRenderable

(

fn onlyOneSelected = selection.count == 1 -- define filter function

menuItem mi_r "Renderable" filter: onlyOneSelected -- display if only 1 object selected

on RCmenuRenderable open do -- perform following on rcmenu open

(

if selection.count == 1 then -- if only one object selected...

(

mi_r.text = $.name + " | " + "Renderable" -- change text of menu item

if isKindOf $ Shape then -- if shape set renderable property to

$.renderable=$.renderable -- itself to get shape and node renderable

-- properties the same

mi_r.checked=$.renderable -- turn on menu item check if renderable

)

)

on mi_r picked do $.renderable = not $.renderable -- when menu item picked, flip renderable value

)

--

registerRightClickMenu RcmenuRenderable -- register the rcmenu

See also

RCMenu Clauses

Scripted Right-Click Menus


separator

A separator is used to place a separator line in the right-click menu, and is normally used to group menu items. The syntax for a separator is:

separator <name> [ filter:<function> ]

Parameters

name:

Used to name an automatically constructed local variable that will hold the value representing the separator.

filter:

A function that returns a Boolean value. The filter function is evaluated when the right-click menu is first opened. If the filter function returns true the separator appears in the menu, otherwise it is not displayed.

EXAMPLE:

rcmenu MyRCmenu

(

fn flt_objects = ($ != undefined) -- objects filter

menuItem mi_cs "Cast Shadows" checked:false

menuItem mi_rs "Receive Shadows" checked:false

-- add only if one or more objects are selected

separator sep1 filter:flt_objects

menuItem mi_st "Scale Twice" filter:flt_objects

menuItem mi_sh "Scale Half" filter:flt_objects

-- event handlers would go here...

)

registerRightClickMenu MyRcmenu -- register the rcmenu

See also

RCMenu Clauses

Scripted Right-Click Menus


subMenu

A subMenu is used to place an item in the right-click menu that, if the cursor is placed on, opens a submenu containing additional user-interface items. The syntax for a subMenu is:

subMenu <label> [ filter:<function> ] ( <submenu_body> )

The <submenu_body> of a subMenu definition is made up of a sequence of RCMenu clauses as follows:

<submenu_body> ::= { <rcmenu_clause> }+

Parameters

label:

The string that appears in the right-click menu.

filter:

A function that returns a Boolean value. The filter function is evaluated when the right-click menu is first opened. If the filter function returns true the subMenu appears in the menu, otherwise it is not displayed.

EXAMPLE:

rcmenu MyRCmenu

(

fn flt_objects = ($ != undefined) -- objects filter

fn flt_shapes = (isKindOf $ Shape) -- shapes filter

menuItem mi_cs "Cast Shadows" checked:false

menuItem mi_rs "Receive Shadows" checked:false

separator sep2 filter:flt_objects

subMenu "Modifiers" filter:flt_objects -- begin subMenu

(

-- Add common objects

menuItem mi_bend "Bend"

menuItem mi_twist "Twist"

-- Add shape only modifiers

separator sep3 filter:flt_shapes

subMenu "Shape" filter:flt_shapes -- begin nested subMenu

(

menuItem mi_extrude "Extrude"

menuItem mi_EditSpline "Edit Spline"

)

)

-- event handlers would go here...

)

registerRightClickMenu MyRcmenu -- register the rcmenu

See also

RCMenu Clauses

Scripted Right-Click Menus


Defining MacroScripts

MacroScripts are scripts that are associated with toolbar buttons and are executed when the corresponding toolbar button is clicked. MacroScripts have to be defined with the macroScript definition construct and can then be associated with a toolbar button by right-clicking a Shortcut toolbar or Tab and choosing Customize. The Customize User-Interface dialog is displayed, which lets you choose from either Command shortcuts or MacroScripts. MacroScripts are essentially pieces of MAXScript code that have a name and category, and optionally a tooltip and icon.

MacroScripts do not automatically create user-interface items. If you want a MacroScript to display a dialog, you will need to create a rollout floater window and rollout(s) as described in Rollout Floater Windows , and create and install the user-interface items in the rollout(s) as described in Rollout User-Interface Controls .

Define a MacroScript using the following syntax:

macroScript <name> [ category:<string> ] [buttonText:<string>] [toolTip:<string>] [icon:#(<string>, <index>)] [silentErrors:<boolean>] ( <macro_script_body> )

EXAMPLES:

macroScript Free_Camera category:"Cameras" tooltip:"Free Camera"

Icon:#("Cameras",2)

(

StartObjectCreation FreeCamera

)

macroScript Target_Camera category:"Cameras"

tooltip:"Targeted Camera" Icon:#("Cameras",1)

(

StartObjectCreation TargetCamera

)

After MAXScript evaluates a macroScript construct, the MacroScript definition will show up in the appropriate category list in the Customize User-Interface dialog. The following figure shows a Customize User Interface dialog containing the previous two MacroScripts.

If a tooltip is specified, that tooltip is the name shown in the Customize User Interface dialog. If a tooltip is not specified, <name> is the name shown. Unlike other similar constructs (Scripted Utilities, Functions, and right-click menus), macroScript does not create a variable with this name. Rather, MacroScripts are stored as pointers into files, as described below.

NOTE:

You can use non-alpha numeric characters to define any of the argument strings. This includes support for escaped double quote characters: \".

The category: argument specifies in which category in the Customize User-Interface dialog the MacroScript name will be listed. The use of categories is intended to help you organize your MacroScripts into groupings so that the MacroScript names are less likely to clash. If you do not specify a category, a default category of "unknown" is used.

The internalCategory argument is intended to identify operations in .cui, .mnu, and .kbd files.

The toolTip: argument specifies the tooltip for the button. If no tooltip is specified, <name> is displayed for the button.

The buttonText: argument specifies the text that will appear in the button, and the icon: argument specifies the icon that will appear in the button. You can choose in the Customize User Interface dialog whether the buttonText or icon appears in the button. If no buttonText: argument is specified, the MacroScript name is used as the buttonText.

The icon: argument specifies the icon bitmap file and the icon image within the icon bitmap file. The icon bitmap file must be located in the current 3ds Max user-interface directory. Icon bitmap files have a base name, such as "MyToolbar", followed by a suffix, such as "_24i.bmp", that specifies the individual icon size and icon bitmap file type. The icon: argument string is just the base name, with no extensions present. This base name is the name shown in the Image Group list in the Customize User-Interface dialog. Each icon bitmap file can have any number of individual icons, lined up side-by-side in the file. If the icon bitmap file contains multiple icons, <index> specifies which icon in the icon bitmap file to use. The left-most icon has an <index> of 1. The 3ds Max internal icons (Image Group Internal in the Customize User-Interface dialog) are not stored in an icon file, and are referenced by using an empty string as the icon: argument.

So, the icon: argument can be either a two-element array containing the icon bitmap file’s base name as a string and the icon’s index in that file, or just a base name string, with the index 1 assumed.

EXAMPLES:

macroScript Box category:"Objects" tooltip:"Box"

icon:#("standard", 1) -- use first icon in standard

(

StartObjectCreation Box

)

macroScript Sphere category:"Objects" tooltip:"Sphere"

icon:#("", 2) -- use second icon in internal icons

(

StartObjectCreation Sphere

)

macroScript Cone category:"Objects" tooltip:"Cone"

icon:"myicon" -- use first icon in myicon

(

StartObjectCreation Cone

)

See Creating Icon Bitmap Files for more information.

The silentErrors: parameter gives control over whether MAXScript runtime error messages are displayed while executing the MacroScript. If this parameter is set to true, error messages will not be displayed. This may be useful for distributed MacroScripts that may confuse the user with MAXScript error messages. The default value is false.

The <macro_script_body> can be one of two forms. The body can be either a single MAXScript expression, or a set of event handlers. An <event_handler> is a special function definition local to the macroscript that handles events generated by 3ds Max.

The valid <event_name> are:

on isChecked do <expr>

If <expr> returns true and the macroscript item is in a menu or quad menu, a check mark is placed next to the macroscript item. If the macroscript is a toolbar button, the button will appear as "pressed in". The do is optional for this event handler. If this event handler is not specified, the item will not be checked.

on isEnabled do <expr>

If <expr> returns false and the macroscript item is in a menu or quad menu, the macroscript item will not appear in the menu or quad menu. If the macroscript is a toolbar button, the button will be disabled. The do is optional for this event handler. If this event handler is not specified, the item will be enabled.

on isVisible do <expr>

If <expr> returns false and the macroscript item is in a menu or quad menu, the macroscript item will not appear in the menu or quad menu. If the macroscript is a toolbar button, this handler has no affect. The do is optional for this event handler. If this event handler is not specified, the item will be visible.

on execute do <expr>

The expression evaluated when the menu or quad menu item is chosen, or the toolbar button clicked. A runtime error will be generated if this event handler is not specified.

SCRIPT:

macroScript Free_Camera

category:"Lights and Cameras"

internalcategory:"Lights and Cameras"

tooltip:"Free Camera"

buttontext:"Free Camera"

Icon:#("Cameras",2)

(

on execute do StartObjectCreation FreeCamera

on isChecked return (mcrUtils.IsCreating FreeCamera)

)

SCRIPT:

macroScript SubObject_Vertex

buttonText:"Vertex"

category:"Modifier Stack"

internalCategory:"Modifier Stack"

tooltip:"Vertex Sub-object Mode"

icon:#("SubObjectIcons",1)

(

on isChecked (subObjectLevel == 1 and filters.canSwitchTo_Vertex())

on isEnabled Filters.canSwitchTo_Vertex()

on isVisible Filters.canSwitchTo_Vertex()

on execute do

(

if subObjectLevel == undefined then max modify mode

if subObjectLevel != 1 then subObjectLevel = 1 else subObjectLevel = 0

)

)

on altExecute <type> do <expr>

If a macroScript implements the altExecute event handler, then a mouse icon (with dark click button) appears in the quad menu item that corresponds to the macroScript. When the icon is clicked, the event handler is executed with <type> being #default.

For example, the following adds alternative execute functionality to the standard "Wire Parameters" quad menu. When you click the icon, it pops the Param Wiring Editor instead of putting into the Wiring mode.

SCRIPT:

macroScript paramWire

category:"Parameter Wire"

internalcategory:"Parameter Wire"

buttonText:"Wire Parameters"

tooltip:"Start Parameter Wiring"

Icon:#("MAXScript" ,1)

(

on isEnabled return selection.count == 1

on execute do (paramWire.start())

on altExecute type do

(

paramWire.OpenEditor()

)

)

on closeDialogs do <expr>

The closeDialogs is handler is called instead of the on Execute handler whenever the isChecked handler returns true (the button / icon / item is checked ). It can be used to TOGGLE back to the unchecked state. This handler should implement any cleanup code that closes any open dialogs and basically returns the macroScript to a pre-executed state.

NOTE:

The closeDialogs handler depends on the existence of the isChecked handler. If an on closeDialogs handler is defined without an isChecked handler to be defined, a compile-time error will be thrown!

Here is an test of a MacroScript which toggles its rollout on and off:

SCRIPT:

macroScript testCloseDialogs category:"MXS Help"

(

rollout testCloseRollout "Test" --define a rollout

(

label lb_test "testing CloseDialogs handler..."

)

on isChecked do testCloseRollout.open --return true if rollout is open

--if isChecked returns false (the rollout is not open in a dialog),

--the on execute handler will be called and will create the dialog.

on execute do createDialog testCloseRollout

--If isChecked returns true and the user pressed the button again,

--instead of calling the on execute handler, the macroScript will call

--the on closeDialogs handler and destroy the dialog.

on closeDialogs do destroyDialog testCloseRollout

)

--If you drag the macroScript to a toolbar and click the button,

--a dialog should appear and the button should be checked.

--Click it again and the dialog will disappear.

--Repeat as often as you want - the dialog will be toggled on and off!

on droppable <window> node: point: do ...

on drop <window> node: point: do ...

These optional MacroScript event handlers can be used to define so-called DropScripts that can be used in conjunction with the i-Drop technology. See DropScript Events for details.

The <macro_script_body> can contain global and local variables, functions, and structure definitions. The <macro_script_body> is compiled in its own local scope, and the locals are only visible inside the scope of the MacroScript. MacroScript locals are heap-based locals, which are slightly different from normal (stack-based) locals.

Normal locals are visible in the current scope and have a lifetime of one execution of that scope. Heap-based locals are also visible only in the current scope, but have a lifetime equal to the lifetime of the top-level expression where they are defined. A MacroScript’s locals are created the first time you execute the MacroScript, initialized to a value of undefined, or to their specified initialization value. These values are stored in a separate memory stack. On entry to each function (or top level script) in the MacroScript, a ‘frame’ in the memory stack is marked and when the function (or top level script) exits, all of the values in the frame are freed from the memory.

Because a MacroScript’s name is not created as a variable, you cannot access a MacroScript’s locals outside the scope of the MacroScript. So, for example, you can create a rollout in a MacroScript, and the rollout’s event handlers can access the locals defined in the MacroScript because the rollout is executing within the scope of the MacroScript. However, you cannot access the MacroScript’s locals from another utility or from the Listener, because they are not executing within the scope of the MacroScript. See Scope of Variables for more information.

When you execute a macroScript definition, the return value is an integer MacroScript ID value. MAXScript internally stores information about each MacroScript in an array, and the returned MacroScript ID value is the array index for that MacroScript. The information stored for each MacroScript consists of the file in which that MacroScript is defined and a pointer into that file specifying where the MacroScript definition begins. The MacroScript definition is only compiled when you first press a toolbar button that contains the script, or execute the MacroScript using the macros.run() method.

There are five ways a MacroScript can be defined:

  • The default user-interface directory and its subdirectories will be automatically scanned at startup for files of type .mcr, which will be parsed for MacroScript definitions.

  • A MacroScript definition is executed in an Editor window, in a script file that you execute, or in a startup script file.

  • If you evaluate a MacroScript definition in the Listener window, a file will automatically be created to contain the MacroScript definition. This file is stored in the MacroScripts directory under the current user-interface directory.

  • MAXScript supports text drag onto toolbars to create MacroScript buttons. You can select and drag text from any text window, such as Listener window panes or Editor windows, onto any visible toolbar. The cursor changes to an arrow with + sign when it is OK to drop the text. If you drop it, a MacroScript button is added to the toolbar with the dropped text as the body of the MacroScript. The classic case here would be to drag some text from the Macro Recorder pane in the Listener window onto a toolbar to make a button that does the sequence of events just recorded. Remember that tabbed elements on the Shelf are toolbars and can accept dropped text. MAXScript will automatically enclose the text in a MacroScript definition with a MacroScript name of DragAndDrop-MacroN, where N is a number that will make the MacroScript name unique. The category will be DragAndDrop and no tooltip is specified. As with MacroScripts defined in the Listener window, a file will automatically be created to contain the MacroScript definition. This file is stored in the MacroScripts directory under the current user-interface directory.

  • A MacroScript can be defined using the macros.new() method described next. As with MacroScripts defined in the Listener window, a file will automatically be created to contain the MacroScript definition. This file is stored in the MacroScripts directory under the current user-interface directory.

If you move or delete a file that contains a MacroScript definition that has been loaded, and try to execute the MacroScript, you will get an error message. Further, if you edit a file containing MacroScript definitions, take care to save and re-evaluate the entire file so any other MacroScripts defined in that file will have their file pointer updated. If you don't do this, you may get an error message saying the currently loaded definition no longer matches its file.

If you reevaluate a MacroScript definition, any button using that MacroScript will see any changes you make.

Any macroScript definition evaluated in MAXScript or created by dropping text onto a toolbar has a separate definition .mcr file created in the MacroScripts directory under the current user-interface directory (typically UI\MacroScripts). The name of the file is <category_name>-<macro_name>.mcr,

FOR EXAMPLE:
DragAndDrop-Macro12.mcr | for macroScript Macro12 category:"DragAndDrop"
NURBS-Map_Updater.mcr | for macroScript Map_Updater category:"NURBS"

If you evaluate a macroScript definition in the Listener or drop text on a toolbar, its recorded definition file is this backing file in UI\MacroScripts. This definition file is the one that gets opened if you hit Edit MacroScript in the CUI customize menus or dialogs. For macroScript definitions evaluated in Listener, this means the same definition will be updated each time you evaluate it, rather than having separate backing file for each evaluation.

If you evaluate macroScript definitions in a .ms or .mcr file that does not already reside in the UI\MacroScripts directory, a copy for each will be placed in a separate file in UI\MacroScripts, but the recorded definition file will be the original source file, so that hitting Edit MacroScript will go to that file.

This means that if any buttons containing such macroScript definitions are added to toolbars in the startup.cui file, the backing .mcr file in UI\MacroScripts will be used as its definition at the next 3ds Max startup. When you start 3ds Max, the macroScript definitions will taken from the backing files in UI\MacroScripts. If these MacroScripts are also defined in MAXScript startup script files, they will be re-defined at MAXScript startup and so the definition file of record will be updated to point to the script file.

MacroScripts Access:

MAXScript provides several methods that allow you to access and run MacroScripts from within a script. These MacroScript functions are in a structure package named macros. For a description of the available methods, see the Macro Scripts topic.

The following MacroScript allows you to render directly to the RAMPlayer. This MacroScript shows the use of rollouts and rollout floater windows in MacroScripts.

SCRIPT

-- MacroScript to Render to RamPlayer

-- Author: Alexander Bicalho

--****************************************************************

-- MODIFY THIS AT YOUR OWN RISK

-- This utility will allow you to render directly to the RamPlayer

--

MacroScript RAM_Render category:"Tools" tooltip:"Render to Ram"

(

-- declare local variables and define some functions

local r_dialogue

local get_names existFile

function get_names name a = append a name

function existFile fname = (getfiles fname).count != 0

-- create the rollout definition

rollout r_size "Render Parameters"

(

local p = 95

local p2 = p+78

group "Time Output"

(

radiobuttons r_time columns:1 align:#left labels:#("Single","Active Time Segment","Range:" )

spinner nth "Every Nth Frame:" pos:[215,24] fieldwidth:50 type:#integer range:[0,10000,1] enabled:false

spinner r_from fieldwidth:60 pos:[75,56] type:#integer range:[0,10000,1] enabled:false

spinner r_to "To:" fieldwidth:60 pos:[152,56] type:#integer range:[0,10000,100] enabled:false

)

group "Render Size"

(

spinner rw "Width " fieldwidth:60 pos:[15,p+08] type:#integer range:[0,10000,320]

spinner rh "Height " fieldwidth:60 pos:[12,p+32] type:#integer range:[0,10000,240]

spinner aspect "Aspect " fieldwidth:60 pos:[10,p+56] type:#float range:[0,20,1.0]

button s160 "160x120" pos:[125,p+06] width:75 height:19

button s256 "256x243" pos:[125,p+30] width:75 height:19

button s320 "320x240" pos:[205,p+06] width:75 height:19

button s512 "512x486" pos:[205,p+30] width:75 height:19

button s640 "640x480" pos:[285,p+06] width:75 height:19

button s720 "720x486" pos:[285,p+30] width:75 height:19

button conf_render "Configure" pos:[125,p+54] width:115 height:19

button wipe "Purge Files" pos:[245,p+54] width:115 height:19

button go "Render" pos:[125,p+78] width:235 height:19

)

label abt0 "Render to RAM" pos:[8,p2+31]

label abt1 "Version 0.2a" pos:[8,p2+46]

label abt2 "Alexander Esppeschit Bicalho" pos:[225,p2+31]

label abt3 "abicalho@brasilmail.com" pos:[249,p2+46]

-- define the rollout event handlers

on wipe pressed do

(

local tempfilename_a = (getdir #image) + "\\ramplayertemp_a.avi"

local tempfilename_b = (getdir #image) + "\\ramplayertemp_b.avi"

if existfile tempfilename_a then deletefile tempfilename_a

if existfile tempfilename_b then deletefile tempfilename_b

)

on r_time changed state do

(

case state of

(

1: nth.enabled = r_from.enabled = r_to.enabled = false

2: (

nth.enabled = true

r_from.enabled = r_to.enabled = false

)

3: nth.enabled = r_from.enabled = r_to.enabled = true

)

)

on s160 pressed do (rw.value=160; rh.value=120; aspect.value=1.0)

on s320 pressed do (rw.value=320; rh.value=240; aspect.value=1.0)

on s256 pressed do (rw.value=256; rh.value=243; aspect.value=1.266)

on s512 pressed do (rw.value=512; rh.value=486; aspect.value=1.266)

on s640 pressed do (rw.value=640; rh.value=480; aspect.value=1.0)

on s720 pressed do (rw.value=720; rh.value=486; aspect.value=0.9)

on conf_render pressed do (max render scene)

on go pressed do

(

local tempfilename_a = (getdir #image) + "\\ramplayertemp_a.avi"

local tempfilename_b = (getdir #image) + "\\ramplayertemp_b.avi"

if existfile tempfilename_b then

(

deletefile tempfilename_a

copyfile tempfilename_b tempfilename_a

tempfilename = tempfilename_b

)

else

(

if existfile tempfilename_a then

tempfilename = tempfilename_b

else

(

tempfilename = tempfilename_a

tempfilename_b = ""

)

)

case r_time.state of

(

1: ( render outputheight:rh.value outputwidth:rw.value pixelaspect:aspect.value outputfile:tempfilename vfb:off )

2: ( render outputheight:rh.value outputwidth:rw.value pixelaspect:aspect.value outputfile:tempfilename vfb:off nthframe:nth.value framerange:#active )

3: ( render outputheight:rh.value outputwidth:rw.value pixelaspect:aspect.value outputfile:tempfilename vfb:off nthframe:nth.value fromframe:r_from.value toframe:r_to.value )

)

ramplayer tempfilename_a tempfilename_b

closerolloutfloater r_dialogue

) -- end of on go pressed

) -- end of rollout r_size

-- close the old rollout floater if it exists

try(closerolloutfloater r_dialogue)catch()

-- put up new rollout floater and add rollout to it.

r_dialogue = newrolloutfloater "Render to RAM" 400 300

addrollout r_size r_dialogue

-- end of MacroScript, rollout takes over...

)


macroScript Localization Support for CUI and menu files

In order to make the menu and CUI files more easily localized, a keyword argument, InternalCategory:, has been added to the macroScript facility.

Previously, when a macroScript is assigned to a CUI button or menu item, it is identified in the CUI or MNU file using the macroScript name and category, like this (from the menu file):

Item6_Action=647394:Isolate`Tools

"Isolate" is the name of the macro and "Tools" is the category.

The macroScript that defines this operation looks like:

MacroScript Isolate

Category:"Tools"

ToolTip:"Isolate Tool"

Icon:#("ViewPortNavigationControls",7)

The problem is when the macroScript is localized, the category is localized but the macroScript name "Isolate" should not be localized. When it is localized, then the MNU file entry of "Isolate`Tools" no longer works.

A non-localized category name is needed that would be used to write the operation to MNU and CUI files.

In this case the macroScript now looks like:

MacroScript Isolate
Category:"Tools"
InternalCategory:"Tools" -- This is the new keyword

ToolTip:"Isolate Tool"
Icon:#("ViewPortNavigationControls",7)

When this macroScript is localized the Category would be translated, but the InternalCategory would not.


Creating Icon Bitmap Files

An icon bitmap file can have any number of individual icons, which are lined up side-by-side in the file. If you are creating icon bitmap files, these files must meet the following requirements:

  • Icon bitmap files must be .bmp files.

  • The icon bitmap files are actually groups of files. For each icon bitmap file group there needs to be at least two image files: one containing 16x15 pixel images ending in _16i.bmp, and another containing 24x24 pixel images ending in _24i.bmp. For example, these files would be myicons_16i.bmp and myicons_24i.bmp.

    • NOTE:

    The 16x15 size requirement is not a typo, the small icons are actually displayed as 15 pixels high. Some shipping icon files have been created with a height of 16 pixels - in such cases, the last pixel row will be clipped. It is suggested that you set the height of your icon files to 15 pixels to make sure the complete image is visible.

    • All icon images in an icon bitmap file must be the same size, as defined by the file name suffix.

    • Each icon bitmap file group must contain similar icon images in the same order. This allows a single index to locate the desired bitmap, independent of which button size option the user has chosen.

    • If monochrome, Windows-compatible masks are available, they need to be stored in files ending in _16m.bmp and _24m.bmp. For example, these files would be myicons_16m.bmp and myicons_24m.bmp.

    • If 8-bit alpha channel data is available, it needs to be stored in _XXa.bmp files if the alpha is not premultiplied, and in _XXp.bmp files if the alpha is premultiplied, where XX is either 16 or 24. For example, these files would be myicons_16a.bmp and myicons_24a.bmp.

    • If the mask channel bitmap files are present, they are used. If the mask channel bitmap files are not present, then the alpha channel bitmap files are used. If neither the mask nor alpha channel data bitmap files are present, then the color of the upper-left pixel is deemed the transparent color, and a mask is generated automatically for the image bitmaps.

    If you wish to generate icons via calls to render() in MAXScript, make sure you use the naming conventions previously described and place the .bmp files in the current 3ds Max user-interface directory. You can get the current user-interface directory path with the function:

    local ui_dir = cui.getDir ()

    In 3ds Max 9 and higher, CUI icon files (*_16i.bmp, *_16a.bmp, *_24i.bmp, *_24a.bmp) are loaded first from the user icon directory, then the max system icon directory, and then <3dsmax.exe>\ui\icons. If a file set is present in multiple directories, the version in the first directory is used.

    In 3ds Max 9 and higher, the icon filename specified as an argument to loadPicture, the filename in images arrays for UI items, and the filename for the bitmap UI item no longer needs to specify a path to the icon folder. The icon filename will be searched for in the following directories (in order):

    • The directory associated with the current mzp package, if any.

    • The directory associated with the calling script

    • The user icon directory

    • The max system icon directory

    • < 3dsmax.exe >\ui\icons

    • The user startup scripts directory

    • The user scripts directory

    • The max system startup scripts directory

    • The max system scripts directory

    • The map path directories

    • The image directory

    • The 3DS executable main directory

    • The Windows NT 32-bit system directory (system32)

    • The Windows 16-bit system directory (system)

    • The Windows directory

    • The directories that are listed in the PATH environment variable

    colorman.reInitIcons()

    Reloads all CUI icons from the icon files. This can be used to refresh the UI after adding new or editing existing icon bitmap files.

    Available in 3ds Max 9 and higher.

    <bool>colorman.resolveIconFolder <filename> <&fullfilename>

    This method resolves the filename using the user icon path, then the system icon path, and then <3dsmax.exe>\ui\icons. If the file is found, fully qualified filename is placed in fullfilename and the method returns true. If not found, the method returns false.

    Available in 3ds Max 9 and higher.


Context Filters

Filter functions for context-sensitive menus.

Use this for .IsEnabled or .IsVisible handlers in macrocripts. isEnabled and isChecked handlers have been added to many of the existingmacroScripts. All of the modifier, creation and polygon toolbox macroScripts have these two handlers.

These handlers allow object creation CUI buttons to turn green while creating objects, and modifier buttons are only enabled if they apply to the current selection. The polygon toolbox buttons also only enable when applicable, and the selection level buttons stay pressed while in the sub-object level.

This structure is defined in .\stdplugs\stdscripts\FilterFunctions.ms.

An example use of the filter functions can be found in the Selection and Display Callbacks Script File, .\stdplugs\stdscripts\Selection_Display_Filters.ms

#Struct:Filters(

Is_EditMesh:<fn>,

Is_NURBS:<fn>,

Is_EditPoly:<fn>,

Is_EditPatch:<fn>,

Is_EditSpline:<fn>,

Is_MeshSelect:<fn>,

Is_PolySelect:<fn>,

Is_SplineSelect:<fn>,

Is_PatchSelect:<fn>,

Is_PosXYZ:<fn>,

Is_RotationXYZ:<fn>,

Is_ScaleXYZ:<fn>,

is_Child:<fn>,

This is used for the new IK assignments.

is_Parent:<fn>,

This is used for the new IK assignments.

CanSwitchTo_XXXX for SubObject levels:

CanSwitchTo_Vertex:<fn>,

CanSwitchTo_Edge:<fn>,

CanSwitchTo_Face:<fn>,

CanSwitchTo_Polygon:<fn>,

CanSwitchTo_Element:<fn>,

CanSwitchTo_Border:<fn>,

CanSwitchTo_Patch:<fn>,

CanSwitchTo_Segment:<fn>,

CanSwitchTo_Spline:<fn>,

These can be used to check if MeshSelect, PatchSelect, SplineSelect, Edit(able) Patch, Edit(able)Mesh, and Edit(able)Spline can go into these subobject levels.

Are_Modifiers_Applied:<fn>,

The following requires a node to be passed into the function:

Is_Bone:<fn>,

Is_IKChain:<fn>,

Is_Point:<fn>,

Is_Light:<fn>,

Is_Camera:<fn>,

These return true if the selected object’s function name condition is met.

Is_Target:<fn>,

Returns true if the node is a target of a LookAt controller, false otherwise.

HasBaseObjectProperty:<fn>,

Returns true if the node's base object has the specified property, or if the base object is a scripted plugin, and the delegate has the specified property. Is either a string or name value.

GetBaseObjectProperty:<fn>,

Returns the value for the node's base object property, or the delegate's property if the base object is a scripted plugin. If the specified property is not found, a name value of '#error' will be returned. Is either a string or name value.

SetBaseObjectProperty:<fn>,

Sets the value for the node's base object property, or the delegate's property if the base object is a scripted plugin. If the specified property is not found, or does not accept the type of value specified, a name value of '#error' will be returned. Otherwise will be returned. Is either a string or name value.

-- returns new value/#error

ToggleBaseObjectProperty:<fn>)

Toggles the value for the node's base object property, or the delegate's property if the base object is a scripted plugin. If the specified property is not found, or is not a boolean, a name value of '#error' will be returned.
Otherwise the property's new value will be returned. Is either a string or name value.

See also

Macro Scripts

Defining Macro Scripts


Scripted Mouse Tools

Scripted Mouse Tools are used to perform a set of actions based on mouse clicks in the 3ds Max viewports. Tools are useful for scripted object creation plug-ins, as described in Scripted Plug-ins .

HERE IS A SIMPLE EXAMPLE

tool foo

(

local b

on mousePoint clickno do

if clickno == 1 then b = box pos:worldPoint else #stop

on mouseMove clickno do b.pos = worldPoint

)

This tool allows the user to click in a viewport at which point a box is created. Dragging the mouse positions the box and releasing the mouse button stops the tool.

YOU WOULD START THIS TOOL BY EXECUTING:

startTool foo

The syntax for tools is similar to that for utility definition constructs. They have local variables, functions, and event handlers, but tools have no user-interface items.

A tool is created using the tool definition construct in MAXScript. The top-level syntax is as follows:

tool <tool_name> [ prompt:<string> ] [ numPoints:<number> ]
 ( <tool_body> )

where <tool_name> is the name of an automatically created variable to hold the value that represents the tool. The scope of this variable is the current MAXScript scope. This value is also returned as a result of the tool declaration. The class of this value is MouseTool.

The optional prompt keyword argument specifies the prompt string displayed in the 3ds Max Prompt Line while the tool is executing.

The optional numPoints keyword argument specifies the maximum number of points (mouse clicks) the tool will use. If the tool is still executing when you reach the numPoints number of mouse clicks, the tool will stop and return a value of #stop.

<tool_body> is enclosed in the required parentheses and is a sequence of clauses that define the functions and event handlers that process mouse clicks. These clauses are defined in detail in Mouse Tool Clauses .

The following method invokes a tool:

startTool <tool_name> [prompt:<string>] [snap:#3D|#2D] [numPoints:<number>]

where <tool_name> is the tool name used in a tool definition.

The optional prompt keyword argument specifies the prompt string displayed in the 3ds Max Prompt Line while the tool is executing. If specified, this string overrides the prompt string specified in the tool definition.

The optional snap keyword argument specifies the upper limit on snapping. specifying a snap parameter does not turn on snap, only the user can turn it on in the interface. When 2.5D or 3D snapping is turned on by the user, the snap parameter restricts snapping to the specified level.

The optional numPoints keyword argument specifies the maximum number of points (mouse clicks) the tool will use. If specified, this value overrides the number of points specified in the tool definition.

The return value from startTool() will be either #stop if a called change handler returns the value #stop or the numPoints value is reached, or #abort if the user aborts the tool using a right-click or presses the ESC key.

A currently executing tool can also be aborted using the following method:

stopTool <tool_name>

where:

<tool_name> is the tool name used in a tool definition.

This method would typically be called in a callback function or change handler (see Change Handlers and Callbacks ), or in a timer event handler in a rollout (see Timer ).


Mouse Tool Clauses

The <tool_body> of a mouse tool definition is made up of a sequence of tool clauses as follows:

<tool_body> ::= { <tool_clause> }+

Tool clauses define the components of a tool and can be one of two basic things:

  • Local variables, functions or structure definitions are variables, functions, and structures whose scope is the tool. The <tool_body> is compiled in its own local scope and the locals are only visible inside the scope of the tool. Tool locals are heap-based locals, which are slightly different from normal (stack-based) locals. Normal locals are visible in the current scope and have a lifetime of one execution of that scope. Heap-based locals are also visible only in the current scope, but have a lifetime equal to the lifetime of the top-level expression where they are defined. A tool’s locals are created the first time you execute the tool and are kept permanently in the heap (unless and until you redefine the tool). This means things like rollouts created in a tool that live beyond the simple execution of the tool can refer to these locals and the locals will still exist. Each time you execute a tool, its local variables are initialized to a value of undefined, or to their specified initialization value. For example, you can create a rollout in a tool, and the rollout’s event handlers can access the locals defined in the tool because the rollout is executing within the scope of the tool. You cannot access the tool’s locals from another utility or from Listener, because they are not executing within the scope of the tool. See Scope of Variables for more information.

  • Event handlers are special kinds of functions associated with particular events. Event handlers specify the processing you want to occur when a user clicks or moves a mouse, right-clicks, or starts or stops the tool. These actions generate named events and the optional event handler you supply for that event is called when the action occurs.

Formally, the syntax of a <tool_clause> is defined as follows:

<tool_clause> ::= <local_variable_decl> | <local_function_decl> | <local_struct_decl> | <event_handler>

Locals

A <local_variable_decl>, <local_function_decl>, and <local_struct_decl> are exactly the same as local variable, function, and structure definitions in MAXScript:

<local_variable_decl> ::= local <decl> { , <decl> }
<decl> ::= <name> [ = <expr> ] -- optional initial value

<local_function_decl> ::= [ mapped ](function | fn) <name> { <argument> } = <expr>

<local_struct_decl> ::= struct <name> ( <member> { , <member> } )
<member> ::= ( <name> [ = <expr> ] | <local_function_decl> )

Global variables cannot be declared as a tool clause, however they can be declared within event handler scripts. If you need to ensure a variable name references a global variable, declare the variable name as global immediately before defining the tool in your script.

When writing scripts, it is good programming practice to explicitly declare your local and global variables. Implicit declaration is provided as a short-hand, typically used when working in the Listener interactively or developing short scripts. When developing extended scripts, explicitly declaring variables can reduce errors and improve readability of the code. It is also recommend that you declare as local all variables unless you really want them to be global variables. The reasons for this are described in Scope of Variables .

Within the functions and event handlers of a tool, 13 pre-defined locals variables are always accessible. Each one holds a useful value relating to the mouse action that just occurred:

viewPoint Point2

The current mouse position in viewport pixel coordinates.

worldPoint Point3

The current mouse position projected on the active grid in world coordinates.

worldDist Point3

The distance in X, Y, and Z from the previous click point to the current click point in world coordinates.

worldAngle Point3

The angles around the world X, Y, and Z axes from the previous click point to the current click point in world coordinates.

gridPoint Point3

The current mouse position projected on the active grid in the coordinate system of the active grid. If the active grid is the home grid, the coordinate system is the home grid plane active in the current viewport (that is, the construction plane). See the discussion of grid versus world values below.

gridDist Point3

The distance in X, Y, and Z from the previous click point to the current click point in the coordinate system of the active grid. If the active grid is the home grid, the coordinate system is the home grid plane active in the current viewport (that is, the construction plane). See the discussion of grid versus world values below.

gridAngle Point3

The angles around the world X, Y, and Z axes from the previous click point to the current click point in the coordinate system of the active grid. If the active grid is the home grid, the coordinate system is the home grid plane active in the current viewport (that is, the construction plane). See the discussion of grid versus world values below.

shiftKey Boolean

true if SHIFT key was down.

ctrlKey Boolean

true if CTRL key was down.

altKey Boolean

true if ALT key was down.

lButton Boolean

true if left mouse button was down.

mButton Boolean

true if middle mouse button was down.

rButton Boolean

true if right mouse button was down.

When a create mouse tool is used in a level 5 scripted plug-in, an additional local variable is accessible:

nodeTM Matrix3

Provides read/write access to the transform of the node currently being created. This value is in the current grid coordinate system.

See Scripted Plug-ins for more information.

When writing SimpleObject scripted plug-ins, you should always use the gridPoint, gridDist, and gridAngle values rather than corresponding world values, as object-creation in SimpleObject scripted plug-ins is managed in the active grid coordinate system.

For gridDist, the .X and .Y components are the delta X and Y between the previous clicked point and the current mouse point in the plane of the current grid. The .Z component is a projection from the current Y screen coordinates onto a Z-vector (in the grid coordinate system) based at the last point clicked on the grid, such that the .Z value is the projected height up the Z-vector. For non-orthogonal viewports this is as expected, but for orthogonal viewports (in which you are always dragging in the XY plane of the grid), this is always the same as gridDist.y. If you are using the gridDist value to build the portion of an object on the grid, or determine the distance on the current grid from the last point, you want to use only the .X and .Y components.

FOR EXAMPLE

side1Len = gridDist.x

side2Len = gridDist.y

dist=length [gridDist.x,gridDist.y]

If you are specifying the height off of the current grid, you would typically use the .Z component.

FOR EXAMPLE

height = gridDist.z

For worldDist, the behavior is similar to that for gridDist, however the projected component is dependent on the construction plane of the viewport. For the Top, Bottom, and non-orthogonal viewports, the projected height is contained in the .Z component. For Left and Right viewports, the projected height is contained in the .X component. For Front and Back viewports, the projected height is contained in the .Y component.

When you create a node in the 3ds Max user-interface, the local Z axis of the node is perpendicular to the construction plane. When you create a node using MAXScript, by default the local Z axis of the node points along the direction of the world Z axis. If you create a node in a tool (other than in a SimpleObject scripted plug-in), you must take into account the construction plane orientation if you want to duplicate 3ds Max’s behavior when creating a node. The easiest way to do this is to create the node in a coordsys grid context and specify the position of the node during creation in grid coordinate space. An example of this is shown in the following script.

POINT CREATOR

tool PointCreator

(

local p, createpoint

-- define a function to perform actual node creation. Setting coordsys to

-- ‘grid’ in order for the alignment of the node’s local Z axis to be

-- perpendicular to the construction grid

fn createpoint = in coordsys grid p=point pos:gridPoint

--

-- set up so that a node is created on a mouse button down, move node

-- drag, release node at mouse button up.

--

-- if clickno == 1, then we are at first mouse click, which is a mouse

-- button down. If clickno != 1, at following mouse button up.

on mousePoint clickno do

(

if clickno == 1

then createPoint()

-- if p == undefined, then clicked twice without mouse movement

-- (double clicked). No point object present, so just ignore this click.

else if p != undefined do (p.pos=worldPoint;p=undefined)

)

-- if p != undefined, we are moving a previously created node

-- if p == undefined, and left mouse button is down, create a node

on mouseMove clickno do

(

if p != undefined

then p.pos=worldPoint

else if lbutton do createPoint()

)

)

-- start the tool. No exit condition defined, so right-click to exit.

startTool PointCreator

Event Handlers

An <event_handler> is a special function definition local to a tool that you provide to handle the processing you want to occur when a user clicks in a viewport, right-clicks, or starts or stops the tool. Each user action generates a named event and any event handler you supply for that event is called when the action occurs. The available event handlers are:

on start do <expr>

Called when the tool starts.

on stop do <expr>

Called when the tool ends.

on freeMove do <expr>

Called when the mouse moves prior to the first click.

on mousePoint <arg> do <expr>

Called for each mouse click, parameter arg contains the number of the click.

on mouseMove <arg> do <expr>

Called when the mouse moves anytime after the first click.

on mouseAbort <arg> do <expr>

Called when the user right-clicks to cancel or presses the ESC key.

The <arg> parameter on each of the mouse event handlers lets you know which mouse click you are in. Mouse clicks are actually only the mouse click release, except for the initial mouse click. If you do a mouse click, drag, release, move, click, drag, and release, the on mousePoint event handler is called three times: the first click, the first release, and the second release, with <arg> values of 1, 2, and 3, respectively. The mouse click counter is incremented after processing the on mousePoint event handler, so the <arg> parameter for the mouseMove and mouseAbort event handlers specify the click count for the next mouse click. In the previous example, when you drag between the first click and first release, the <arg> value for a mouseMove event handler will have a value of 2. During the following move, click, and drag it will have a value of 3.

In 3ds Max 6 and higher, while running a mouse tool, if you click in a viewport where the construction plane is on edge, the tool will exit with a return value of #abort

The following script simply demonstrates when the various event handlers are called. Simply run this script and drag in the viewports. Right-click or press the ESC key to stop the tool’s execution.

EXAMPLE

tool foo

(

on freeMove do print "Free Moving"

on mousePoint clickno do format "Point: %\n" clickno

on mouseAbort clickno do format "Abort: %\n" clickno

on mouseMove clickno do format "Moving: %\n" clickno

on start do print "Starting"

on end do print "Ending"

)

startTool foo prompt:"Hello!"

All of the mouse action event handlers may return the special value #stop which causes the tool to stop. In the following mousePoint event handler example, the first click creates the box and the release (second click) terminates the tool.

EXAMPLE

on mousePoint clickno do

if clickno == 1

then b = box pos:worldPoint

else #stop

The following script implements the following functions: on mouse click three spot lights are created at the mouse point. While holding the mouse button down, drag the mouse to position the classical key, back and fill light positions. During this drag, holding down the SHIFT key will flip the fill light side. Release the mouse button and move the mouse to change the elevation of the lights. Click the mouse button when the lights are at the correct height. The back light is raised 1.5 times the key light’s height, and the fill light is raised 0.75 times the key light’s height.

TO START THIS TOOL, YOU WOULD SAY

startTool three_lights

and then drag in one of the viewports.

EXAMPLE:

tool three_lights

(

local key, fill, back, targ

on mousePoint click do coordsys grid

(

if click == 1 then -- create key, back & fill lights at mousedown

(

targ=targetobject pos:gridPoint

key = targetspot pos:gridPoint name:"key" target:targ

back = targetspot pos:gridPoint name:"back" target:targ

fill = targetspot pos:gridPoint name:"fill" target:targ

)

if click == 3 then #stop

)

on mouseMove click do

(

if click == 2 then -- drag out & round on x-y plane

(

coordsys grid key.pos = gridPoint

coordsys targ back.pos = - key.pos

local p = if shiftKey then 90 else -90

coordsys targ fill.pos = key.pos * ((eulerangles 0 0 p) as quat)

)

else if click == 3 then -- drag up to elevate lights

(

in coordsys targ

(

local Z = gridDist.z

key.pos.z = Z

back.pos.z = Z * 1.5

fill.pos.z = Z * 0.5

)

)

)

)

See also

Scripted Mouse Tools


Defining Custom Paint Tools Using the Painter Interface

PainterInterface

The Painter Interface provides all necessary functions for developing custom Paint Tools. The Interface .thePainterInterface drives all its callbacks through user-defined functions. You need to implement the following functions:

StartStroke

PaintStroke

EndStroke

CancelStroke

SystemEnd

These functions are callbacks in response to the paint system. They will be called as the users paints across a mesh.

To initialize these functions, you need to call thePainterInterface.ScriptFunctions method:

FOR EXAMPLE:

fn startStroke = print "Handle start stroke here"

fn paintStroke = print "Handle paint stroke here"

fn endStroke = print "Handle end stroke here"

fn cancelStroke = print "Handle cancel stroke here"

fn systemEnd = print "Handle system end here"

thePainterInterface.ScriptFunctions startStroke paintStroke endStroke cancelStroke systemEnd

Once you have established the connection the thePainterInterface, you will need to tell it what to paint on. This is done by calling the initializeNodes method.

FOR EXAMPLE:

nodeList = $

thePainterInterface.initializeNodes 0 nodeList

Once you have set up the nodes, you need to tell the system when you want to start a paint session:

thePainterInterface.startPaintSession()

The Painter Interface will call your functions until you end the session. In order to finish painting, you should call

thePainterInterface.endPaintSession()

See also

PainterInterface

How To ... Develop a Bitmap Painting Tool - 3D Painting


The Super Class ID and the Class ID

Plug-ins of all types create MAX system objects. These are not the 3D objects that appear in a scene, but objects in the C++ sense. There are two IDs associated with each plug-in system object. These are the Super Class ID and the Class ID. The Super Class ID specifies what super-class of MAX the plug-in class is a sub-class of. The Class ID differentiates between the various plug-ins for a super-class.

MAXScript provides a method to generate a fresh random class ID each time you run it:

genClassID [returnValue:<boolean>]

This method generates a random class ID similar to #(0x9b7ea231, 0xb6db86ef), and prints it to Listener if returnValue is not supplied or set to false. You can cut and paste this class ID into your script to use the generated ID.

If returnValue is true, the classid is not printed to the Listener, rather a 2 element array containing the 2 parts of the class ID is returned.

MAX, and each plug-in falls into one of these predefined categories define the Super Class IDs. For instance, all Texture Map plug-ins share the same Super Class ID of TEXMAP_CLASS_ID. Each individual texture map plug-in has its own unique Class ID however. Thus, the Super Class ID defines which kind of object it is, the Class ID uniquely identifies a specific plug-in class.

See also

Scripted Plug-ins

Scripted Custom Attributes

Menu Manager


Scripted Plug-ins

MAXScript supports several levels of scripted plug-ins, as follows:

Level 1 Scripted Plug-in

The scripted plug-in appears in the user interface as a new class but does not allow instances of itself in the scene. It lets you define a mouse tool that creates other objects in the scene, but once you've finished creation, there is no instance of the class left in the scene to modify or save. Examples of this currently in 3ds Max are the System classes such as RingArray.

Level 2 Scripted Plug-in

The scripted plug-in extends an existing plug-in, either adding to or replacing the command panel parameter rollouts for the existing plug-in. For example, you might create a new "glass" material which extends StandardMaterial and provides a custom, presumably smaller, Material Editor rollout that just has glass parameters which set up and modify various properties in the underlying material plug-in as appropriate. Or, you want to create a new light type that is actually a system of coordinated lights, that also has a "controlling" dummy object created. This controlling dummy keeps track of the lights in the system and has a Create/Modify panel rollout that allows coordinated manipulation of the system. In this case, you'd create a new helper plug-in that extends Dummy, has locals to store the lights, and define a rollout. You would also create a new light plug-in with a create tool that builds the system.

Level 3 Scripted Plug-in

The scripted plug-in is given a unique and permanent class ID value by the script writer and so can be instanced in the scene and stored in scene files. All 3ds Max plug-ins have a unique class ID and 3ds Max uses this class ID to associate stored scene objects with the code that handles them each time you open a scene file, hence it has to be unique and permanent. In the level 1 scripted plug-in above, MAXScript allocates a temporary class ID that is not permanent across executions of 3ds Max and thus prevents instancing in the scene.

Level 4 Scripted Plug-in

The scripted plug-in defines one or more parameter blocks, containing directly animatable parameters that are saved to and restored from scene files. These are the permanent parameters for the plug-in and are distinct from the local variables in the example above which only live during creation.

Level 5 Scripted Plug-in

A parameter block can be associated with a rollout in the scripted plug-in that provides a user interface for the parameters in the parameter block. When associated in this way, the parameters are "wired" to their spinners and checkboxes, etc., and both update automatically as the other changes.

The general form for a scripted plug-in is:

plugin <superclass> <varname> {keyword:val}
 ( <plugin_body> )

where:

<superclass> is one of the currently-supported plug-in superclasses:

Geometry

SimpleObject

Shape

Light

Camera

Helper

Modifier

SimpleMod

TrackViewUtility

Material

TextureMap

RenderEffect

Atmospheric

<varname> is the name that will be given to the global variable that contains this plug-in class. This class value is just like a normal plug-in class (like box, sphere, etc.) and you can create an instance of the plug-in in MAXScript by applying the class value.

{keyword:val} is an optional sequence of keyword/value pairs defining options for the plug-in. These pairs are:

name:<string>

The optional name: parameter specifies the name of the plug-in as seen in the 3ds Max user-interface. For example, if the superclass of the plug-in is geometry or light, this name would be displayed on the plug-in’s button in the Create panel; if the superclass of the plug-in is modifier, this name would be displayed on the plug-in’s button in the Modify panel; and if the superclass of the plug-in is material or textureMap, this name would be displayed in the Material/Map Browser. The default name is the plug-in’s <varname>.

category:<string>

The optional category: parameter specifies in which object category (access via the object category list) the plug-in will appear in. This parameter is applicable only to plug-ins that appear in the Create panel. The default category in "Standard". Note that there is a fixed number of buttons available in the Create panel for each category. If a button for your plug-in does not show up in the appropriate Create panel, you may need to make a new category for it.

classID:#(<integer>,<integer>)

You supply the classID:#(<integer>,<integer>) parameter if you want the plug-in to be creatable and storable in the scene. This ID becomes the permanent ID for the class and is used by 3ds Max to identify objects as they are saved and loaded in the scene. You don't need to supply a class ID value if the plug-in is to be like a System object that only creates other types of objects in the scene. The class ID is basically a pair of numbers, chosen randomly so that (hopefully) they won’t conflict with another plug-in. MAXScript provides a method to generate a fresh random class ID each time you run it:

genClassID [returnValue:<boolean>]

This method generates a random class ID similar to #(0x9b7ea231, 0xb6db86ef), and prints it by default to Listener. You can cut and paste this class ID into your script to use the generated ID.

In 3ds Max 6 and higher, if returnValue is true, the classid is not printed to the Listener, rather a 2 element array containing the 2 parts of the class ID is returned.

extends:<maxClass>

The extends:<maxClass> parameter is supplied if you want to base your plug-in on an existing plug-in. This basically lets you add a new class that works internally exactly like the one you are extending, but with an expanded or replaced user interface. The class you specify must have the same superclass as specified in the scripted plug-in header. Current limitations prevent certain plug-ins from being extended, in particular those with custom creation managers. These include target lights and cameras and all the System plug-ins. You can tell if a plug-in is not extendable if your new rollouts do not appear.

When you create an object of scripted plug-in that extends another, MAXScript also creates an internal object of the extends: plug-in and passes most of 3ds Max's interaction with your plug-in onto the internal object. This is called delegation and the internal extends: plug-in object is the delegate. The delegate is visible in your plug-in's objects in Track View and you can access the delegate in your scripts to control it as needed. See the locals section below for more information. The delegate is not shown in TV if replaceUI:true is specified.

replaceUI:<boolean>

The replaceUI: parameter is used only when extends: is supplied to indicate whether the rollouts in your plug-in should add-to or replace the extended plug-ins rollouts. The default is false, which means your rollouts will be appended at the end of the extended plug-in's. Another current limitation when extending plug-ins whose objects are created in the Create panel only allows user interface replacement in the Modifier panel; the original plug-in's rollouts are always displayed along with the scripted rollouts in the Create panel.

version:<integer>

The optional version: parameter specifies the version number of the scripted plug-in. The value assigned to this parameter is used when updating the scripted plug-in definition. The default value for this parameter is 1. See Updating Scripted Plug-ins for more information on this parameter.

invisible:<boolean>

The optional invisible: parameter gives control over whether the plug-in is visible in the Create panel Object Type rollout or in the Material/Map Browser, etc. This is useful for component or controlling objects created as part of a group, say in a System-style plug-in that should not be creatable on their own. Set this parameter to true to hide the plug-in.

silentErrors:<boolean>

The optional silentErrors: parameter gives control over whether MAXScript run-time error messages are displayed when executing handlers in the scripted plug-in. If this parameter is set to true, error messages will not be displayed. This may be useful for distributed scripted plug-ins that may confuse the user with MAXScript error messages.

initialRollupState:<0xnnnnn>

The argument is an integer whose 32 bits are used to initialize the rollouts' rollup state in both the create and the modify panel. The semantics are different, however for these two cases. Whenever the rollups are created in the create tab, their state will be that specified by this value. In the modify tab, the first time an object of this type is modified, the state will be that of this value, after that it will remain what it was last set to. The bits of this value indicate the corresponding rollout page is rolled up (closed). The zero bit corresponds to the plug-ins first rollout, the first bit is the second rollout, etc. The default value of 0x7fffffff is used so the command panel can detect that this value is not being overridden, and just leave the rollouts as is. For example, a value of 0x07 would result in the first 3 rollouts being rolled up, and the remaining rollouts open.

autoPromoteDelegateProps:<boolean>

In 3ds Max 6 and higher, the optional autoPromoteDelegateProps: parameter gives control over whether the delegate’s properties are automatically searched if a property access is performed on the plug-in, but the property is not defined by the plug-in. Defaults to false.

remap:#(< old param names array>, <new param names array>)

This keyword allows parameter names in the definitions to be changed when updating existing definitions.

The keyword takes as an argument a 2 element array, where each element contains an array of string literal or name values. The size of the 2 arrays must be the same.

The names in the first array are the existing parameter names, the names in the second array are the new parameter names. As parameter names are read in while migrating existing plugin instances, the parameter names are searched for in the first array. If the name is found, the data associated with that parameter is moved to the parameter name in the corresponding location in the second array. If a parameter name is not found in the first array, the parameter name is not remapped. If the parameter name in the second array does not match a parameter name in the new definition, the parameter data is not moved to the new definition.

<plugin_body> is enclosed in the required parentheses and is a sequence of clauses that define the local variables and functions, parameters, user-interface items, and event handlers that define the plug-in. These clauses are defined in detail in Scripted Plug-in Clauses .

If you load a scene file that uses a level 3 or higher scripted plug-in, and you have not defined that scripted plug-in, a Missing DLL dialog will be displayed after the load, indicating the definition for the scripted plug-in is missing. The file will then load using a standin for the object with the missing definition, just as it would for other objects missing their DLL definitions. 3ds Max treats scripted plug-ins as it does C++ plugins, requiring the definition to be in place, either in a script file in the plugins directory when 3ds Max starts, or having been defined by running some script prior to loading the file.

See also

Scripted Plug-in Clauses

Scripted Plug-in Methods

Updating Scripted Plug-ins

Scripted Geometry Plug-ins

Scripted SimpleObject Plug-ins

Scripted Shape Plug-ins

Scripted Light Plug-ins

Scripted Helper Plug-ins

Scripted Modifier Plug-ins

Scripted SimpleMod Plug-ins

Scripted TrackViewUtility Plug-ins

Scripted Material Plug-ins

Scripted TextureMap Plug-ins

Scripted RenderEffect Plug-ins

Scripted Atmospheric Plug-ins


Scripted Plug-in Clauses

The various optional clauses inside the plug-in body are similar to those for scripted utilities and tools. There is an additional scripted plug-in specific clause <parameters> for defining scene-savable and Track View visible parameters for the plug-in.

The <plugin_body> of a scripted plug-in definition is made up of a sequence of plug-in clauses as follows:

<plugin_body> ::= { <plugin_clause> }+

Plug-in clauses define the components of a scripted plug-in and can be one of five basic things:

  • Local variables, functions or structure definitions are variables, functions, and structures whose scope is the plug-in. These locals will exist as long as the instance of the plug-in exists. The visibility of locals, and accessing scripted plug-in locals from external code, are described in Visibility of Locals, Functions, Structures, and User-Interface Items in Rollout Code and Accessing Locals and Other Items in a Rollout from External Code .

  • Parameter blocks define a set of parameters for the plug-in, which are like plug-in local variables, but are directly animatable and are saved to and restored from scene files. You can also associate each parameter with appropriate user-interface elements in one of the plug-ins rollouts. When associated in this way, the parameters are "wired" to their spinners and checkboxes, etc., and both update automatically as the other changes, so you don't have to write any user-interface event handlers for them. These parameters correspond to the visible parameters you see in other 3ds Max plug-ins.

  • Mouse tools are used to perform a set of actions based on mouse clicks in the 3ds Max viewports, and are described in Scripted Mouse Tools .

  • Rollouts can be displayed for the scripted plug-in. For scripted plug-ins that extend an existing plug-in, these rollouts can be displayed in addition to or replace the existing plug-in’s rollouts. Rollout definitions are described in Utility Clauses .

  • Event handlers are special kinds of functions associated with particular events. Event handlers specify the processing you want to occur when a user creates an instance of the scripted plug-in or when 3ds Max calls the scripted plug-in. These actions generate named events and the optional event handler you supply for that event is called when the action occurs.

Formally, the syntax of a <plugin_clause> is defined as follows:

<plugin_clause> ::= <local_variable_decl> |
 <local_function_decl> |
 <local_struct_decl> |
 <parameters> |
 <tools> |
 <rollouts> |
 <event_handler>

Locals

A <local_variable_decl>, <local_function_decl>, and <local_struct_decl> are exactly the same as local variable, function, and structure definitions in MAXScript:

<local_variable_decl> ::= local <decl> { , <decl> }

<decl> ::= <name> [ = <expr> ] -- optional initial value

<local_function_decl> ::= [ mapped ](function | fn) <name> { <argument> } = <expr>

<local_struct_decl> ::= struct <name> ( <member> { , <member> } )

<member> ::= ( <name> [ = <expr> ] | <local_function_decl> )

Global variables cannot be declared as a plug-in clause, however they can be declared within event handler scripts. If you need to ensure a variable name references a global variable, declare the variable name as global immediately before defining the plug-in in your script.

When writing scripts, it is good programming practice to explicitly declare your local and global variables. Implicit declaration is provided as a short-hand, typically used when working in the Listener interactively or developing short scripts. When developing extended scripts, explicitly declaring variables can reduce errors and improve readability of the code. It is also recommend that you declare as local all variables unless you really want them to be global variables. The reasons for this are described in Scope of Variables .

Plug-in locals are attached to plug-in objects, and each new instance of the scripted plug-in has its own local storage area. When you reference a plug-in local in a plug-in function or handler, it accesses the local storage of the currently active object, for example, the object currently open in the command panel. Plug-in local storage is not permanent across scene saves and loads (unlike <parameters>). You can provide initial values for locals, as elsewhere in MAXScript, and the locals are re-initialized when a saved scripted plug-in object is loaded again as part of a scene file open. You can also do this by hand in a create event handler if you supply one in the plug-in.

Plug-in locals are accessible to script code outside a plug-in as a normal property on the object, but note that they may be hidden by parameters or other common object properties if they have the same name. When accessing a property on a scripted plug-in object, MAXScript first looks in the common properties (such as .pos, .scale, .parent, etc. on a node), then in the parameters, and then in the locals for a property name match.

There are four local variables accessible in all scripted plug-ins:

version

Yields the current version of the object as an Integer value.

this

Yields the instance of the scripted plug-in.

delegate

Yields the instance of the plug-in you are extending in an extends: plug-in.

loading

In 3ds Max 6 and higher, yields true while the plug-in instance is in the process of being loaded.

The version local variable contains the version number specified in the scripted plug-in definition. See Updating Scripted Plug-ins for more information on this variable.

The this local variable always contains the MAXScript value corresponding to the current instance of the scripted plug-in. This variable provides a guaranteed way of accessing parameters on the new object within plug-in code (in case there are locals or globals with the same name), and it is a way of referencing the plug-in in case you want to store it to a variable.

The delegate local variable contains the MAXScript value corresponding to the instance of the plug-in being extended. To access common properties or subAnim properties in the instance of the plug-in being extended, you need to do so via the delegate local variable.

FOR EXAMPLE

delegate.width = thisWidth

inside a plug-in function or handler would set the .width property in the instance of the plug-in being extended. The delegate local variable in a scripted plug-in that creates a scene object does not contain the node itself, but a the BaseObject of that node. As such, you can not access the node level properties of the object being created. An exception to this is the node’s transform, which is exposed to the scripted plug-in through a local variable called nodeTM. This variable is described in the applicable scripted plug-in type topics.

If the extends: parameter is not supplied for a plug-in, delegate returns undefined.

As well as local variables, you can define local functions and local structures, just as you can with scripted utilities and rollouts.

Parameters

You can define one or more parameter blocks in a scripted plug-in. A parameter block has the form:

parameters <name> [type:#class] [rollout:<name>]
(
{ <param_defs> }+
{ <event_handler> }
)

A parameter block defines a set of parameters for the plug-in, which are like plug-in local variables, but are directly animatable and are saved to and restored from scene files. You can also associate each parameter with appropriate user-interface elements in one of the plug-ins rollouts. When associated in this way, the parameters are "wired" to their spinners and checkboxes, etc., and both update automatically as the other changes, so you don't have to write any user-interface event handlers for them. These parameters correspond to the visible parameters you see in other 3ds Max plug-ins. Parameters in the parameter block do not participate in 3ds Max’s undo system, therefore changes to the parameter values are not undoable.

The <name> you give to a parameter block becomes permanently associated with the parameter block and is used by MAXScript to connect to the right parameter block in a plug-in object that is being loaded from a scene file. This becomes important as you modify a plug-in script and yet there are still objects corresponding to the old definition in other files. When the old-version object is loaded, MAXScript attempts to convert it to the new definition, using the current parameter block definition as a guide. In order to properly do this, each parameter in a parameter block is also given a permanent name. So, if you have existing objects of your plug-in in other files, don't go randomly changing parameter block names or they won't be loadable.

The optional type:#class specifies that the parameters in the parameter block are "class" parameters. This means that there is one copy of each parameter for the *all* the objects of this plug-in class; they all share the parameter. Examples of existing class parameters are the creation type and type-in parameters in a typical geometry primitive.

The optional rollout:<name> specifies a rollout definition elsewhere in the plug-in body to use as the user-interface rollout for the parameter block's parameters. A limitation of the internal parameter block mechanism requires that each parameter block be associated with a separate rollout and each rollout be associated with only one parameter block. This means that each rollout you want to have in the plug-ins user interface must have its own separate parameter block.

The <param_defs> are definitions for each parameter in the parameter block.

They have the form:

<name> type:<#name> [tabSize:<integer>] [tabSizeVariable:<boolean>] [default:<operand>] [animatable:<boolean>] [subAnim:<boolean>] [ui:<ui_def>]

The <name> is permanently associated with the parameter in the same sense as parameter block names. They are used to connect to the right parameter when loading objects of the scripted plug-in and allow you to make certain changes to a script and yet still be able to load old version objects. So, as with parameter block names, don't change or re-use parameter names if you have scene files with old version objects you want to get at.

The type:<#name> parameter is required and defines the parameter type. It can be one of the following:

#float animatable

#integer animatable

#index animatable

#color animatable

#rgb animatable

#frgba animatable

#point3 animatable

#point4 animatable

#boolean animatable

#angle animatable

#percent animatable

#worldUnits animatable

#matrix3

#string

#filename

#colorChannel animatable

#time animatable

#radiobtnIndex

#material

#texturemap

#bitmap

#node

#maxObject

or one of the following types which are arrays of the above base types:

#floatTab

#intTab

#indexTab

#colorTab

#rgbTab

#frgbaTab

#point3Tab

#point4Tab

#boolTab

#angleTab

#percentTab

#worldUnitsTab

#matrix3Tab

#stringTab

#filenameTab

#colorChannelTab

#timeTab

#radiobtnIndexTab

#materialTab

#texturemapTab

#bitmapTab

#nodeTab

#maxObjectTab

In 3ds Max 6 and higher,

scripted parameter blocks can specify as parameter types: #point4, #frgba, #point4Tab, #frgbaTab. Also #rgba and #rgbaTab were added as aliases of #color and #colorTab parameter types.

TYPE_INDEX, TYPE_INDEX_TAB, TYPE_MATRIX3, and TYPE_MATRIX3_TAB have been added as supported PB2 data types in MAXScript. TYPE_INDEX is used for parameters that are 0-based, but are exposed in MAXScript as 1-based - for example, a vertex index.

The above data types are also available in scripted parameter blocks with types of #index, #indexTab, #matrix3, and #matrix3Tab, respectively.

FOR EXAMPLE

height1 type:#index animatable:true default:1 ui:height1

height3 type:#indexTab tabSizeVariable:true

m3a type:#matrix3 default:(matrix3 [1,0,0] [0,0,1] [0,-1,0] [53.1187,-6.50834e-007,14.8893])

m3b type:#matrix3tab tabSizeVariable:true

type:#index is animatable, #matrix3 is not.

type:#index should behave in the same manner as type:#int, except the data value stored is 0-based but is seen by MAXScript as 1-based. So if you had an object using an animated height1 property (as defined above),

YOU WOULD SEE SOMETHING LIKE

$.height1

15

$.height1.controller.value

14.0

The type:#integer parameters can be associated with dropDownList, ComboBox and ListBox user interface controls via the ui: option in the parameter definition. The value in the parameter corresponds to the 1-based index of the currently selected item in the user interface control.

ListBox user interface controls were not supported for integer parameter association in previous releases, support for ListBox was added in 3ds Max 7.

Typically, you would populate this list with names or strings, and the value in the associate parameter effectively becomes a code number for these names or strings. Setting the value of the parameter via a script will automatically cause the corresponding item in the dropDownList to be selected if the UI for that object is currently open.

#worldUnits and #worldUnitsTab specify that a parameter holds a world distance value, kept internally as a system units float.

FOR EXAMPLE

parameters main rollout:params

(

height type:#worldUnits ui:heightSpin

)

Note that this doesn't cause any spinner display to be automatically shown in current display units, you need to also specify type:#worldUnits on the associated rollout spinner definition.

#node and #nodeTab are used to store references to nodes. The nodes stored in these parameters cannot create a circular dependency. If, for example, you were creating a scripted helper, and set the helper as a target or parent of a camera, you can not store the camera node in a #node or #nodeTab parameter. Likewise, if you created a scripted modifier or material, and store a node in a #node or #nodeTab parameter, you cannot apply the modifier or material to that node.

The various xxTab parameter types allow you to store an array of values having the corresponding type. The initial size of the array is specified using the tabSize: specifier. If tabSizeVariable:true is specified, the size of the array will be automatically expanded when you assign to an higher array index.

FOR EXAMPLE

parameters main rollout:params

(

mapAmounts type:#floatTab tabSize:4 tabSizeVariable:true \ ui:(map1Amount, map2Amount, map3Amount, map4Amount)

)

defines an array parameter containing 4 float elements (defined by the tabSize: parameter).

WARNING!

The number of UI items must match the tavbSize. If the user increases the tab size via a script, new UI elements are not created for the new items. If the user decreases the number to less than the ui element count, this will lead to a crash!

You can associate a separate rollout element with each array parameter element. These parameters appear as arrays when accessed in plug-in handler code,

FOR EXAMPLE

a = mapAmounts[i]

Since tabSizeVariable:true was specified, the following will automatically increase the array size to 10:

mapAmounts[10] = a

You can also increase or decrease the array size by assigning a value to the .count property

Each element in an array parameter whose base type is a number of some kind (floatTab, intTab, percentTab, etc.) is independently and automatically animatable, unless you specify animatable:false. You can get at and assign individual controllers via the .controller property.

FOR EXAMPLE

c = mapAmounts[i].controller

The optional parameter default:<operand> specifies a initial default value for the parameter. The <operand> expression has to be convertible by MAXScript to the base type of the parameter.

The optional parameter animatable:<boolean> specifies whether the parameter is animatable and hence visible in the track view. Only those base types marked as animatable in the above type list can be specified as animatable. Defaults to true.

The optional parameter subAnim:<boolean> can be specified for the 3ds Max object types: #node, #material, #textureMap, and #maxObject. If specified as true, the 3ds Max object is made visible as a sub-object track in track view. Defaults to false.

The optional parameter ui:<ui_def> is used to specify which user-interface element in the parameter block's associated rollout is to be linked to this parameter. When so linked, the handling of user actions for these elements are automatic and they also update automatically to follow any changes to the parameter caused by animation, scripts, etc. For example, in the following, the parameter block named main is associated with the rollout named params. The parameters height and spread are then linked with the spinners named height and spread in that rollout:

EXAMPLE

parameters main rollout:params

(

type:#node subAnim:true

fill type:#node subAnim:true

back type:#node subAnim:true

height type:#float animatable:true default:10 ui:height

spread type:#float animatable:true default:10 ui:spread

on height set val do

(

key.pos.z = val

back.pos.z = val * 1.5

fill.pos.z = val * 0.5

)

)

rollout params "Light Parameters"

(

spinner height "Height"

spinner spread "Spread"

)

Once this is done, the parameter and spinner are linked, such that changes in one are reflected immediately and automatically in the other. Further, if the parameter is animated, the spinner will show red keyframe highlights when the time slider is positioned at a keyframe for that parameter, as with other 3ds Max plug-ins. The kinds of user-interface items that can be linked to particular parameter types is limited to the following sensible combinations:

Parameter type | Rollout user-interface item
#integer | spinner, slider, radioButtons, checkbox, checkbutton
#float | spinner, slider
#time | spinner, slider
#color | Colorpicker
#angle | spinner, slider
#percent | spinner, slider
#colorChannel | spinner, slider
#boolean | checkbox, checkbutton
#node | pickButton
#textureMap | mapButton
#material | materialButton
#worldUnits | spinner, slider

Parameter Event Handlers

The following event handlers are associated with parameters. These handlers are called when a parameter is assigned a value, or when the parameter value is retrieved.

on <name> set <arg> do <expr>

A set handler can be supplied for any of the parameters in the block and it will be called whenever the parameter is updated, either through an associated rollout user-interface item or directly, especially via MAXScript property assignment. In general, the way you would code change handlers is to supply set handlers for parameters, rather than on <item> change handlers for spinners and checkboxes, etc. in the rollout definition. A set handler in used in the previous example to update the light positions when the height parameter value changes.

The set handlers are also called when an instance is created or loaded so that common dependent actions can be taken, such as setting up other dependent system object or delegate properties.

NOTE:

If the param is of a tab type, the set handler is not called on create or load.

on <name> get <arg> do <expr>

A get handler can be supplied for any of the parameters in the block and it will be called whenever the parameter value is retrieved. This will occur when the user interface updates itself, a script accesses the parameter, a viewport is redraw, a render occurs. In all these cases, the animated value is retrieved one or more times. The get handler is called with a single argument which is the current value stored in the paramblock (or underlying controller if the parameter is animated). The currentTime variable is set to the time at which the value is being retrieved and not necessarily the current slider time, since you can ask a parameter for its value for any specified time. If you implement the get handler, you must return a value, and that value is returned as the value of the parameter to the value requester. If you don’t want to modify the value, but just monitor accesses, return the argument. You can also compute and return any value of the appropriate type.

on <name> set <arg1> [<arg2>] do <expr>

on <name> get <arg1> [<arg2>] do <expr>

For both get and set handers, if the parameter is of tab type, a second argument can be specified for the handlers. The tab index will be placed in the second argument.

EXAMPLE

plugin helper getsetHandlerTest

name:"DummyEx"

classID:#(1453456,5432110)

category:"Scripted Primitives"

extends:dummy

(

parameters main rollout:params

(

nodeTab type:#nodetab tabSizeVariable:true

on nodeTab set val index do format "set nodeTab: % : %\n" val index

on nodeTab get val index do (format "get nodeTab: % : %\n" val index;val)

intTab type:#inttab tabSizeVariable:true

on intTab set val index do format "set intTab: % : %\n" val index

on intTab get val index do (format "get intTab: % : %\n" val index;val)

point3Tab type:#point3tab tabSizeVariable:true

on point3Tab set val index do format "set point3Tab: % : %\n" val index

on point3Tab get val index do (format "get point3Tab: % : %\n" val index;val)

intVal type:#integer

on intVal set val do format "set intVal: %\n" val

on intVal get val do (format "get intVal: %\n" val;val)

)

rollout params "Parameters"

(

)

)

----------------------------------

--Test the Get and Set Handlers:--

----------------------------------

x=getsetHandlerTest() --create an instance of the above Helper

b=box()

s=sphere()

x.nodeTab[1] = b

x.nodeTab[2] = s

x.nodeTab[1]

x.nodeTab[2]

x.intTab[1] = 9

x.intTab[2] = 20

x.intTab[1]

x.intTab[2]

x.point3Tab[1] = [pi,pi,pi]

x.point3Tab[2] = [e,e,e]

x.point3Tab[1]

x.point3Tab[2]

x.intVal = 20

x.intVal

with animate on at time 100 x.intVal = 120

OUTPUT:

getsetHandlerTest

set intVal: 0

$DummyEx:DummyEx01 @ [0.000000,0.000000,0.000000]

$Box:Box01 @ [0.000000,0.000000,0.000000]

$Sphere:Sphere01 @ [0.000000,0.000000,0.000000]

set nodeTab: $Box:Box01 @ [0.000000,0.000000,0.000000] : 1

$Box:Box01 @ [0.000000,0.000000,0.000000]

set nodeTab: $Sphere:Sphere01 @ [0.000000,0.000000,0.000000] : 2

$Sphere:Sphere01 @ [0.000000,0.000000,0.000000]

get nodeTab: $Box:Box01 @ [0.000000,0.000000,0.000000] : 1

$Box:Box01 @ [0.000000,0.000000,0.000000]

get nodeTab: $Sphere:Sphere01 @ [0.000000,0.000000,0.000000] : 2

$Sphere:Sphere01 @ [0.000000,0.000000,0.000000]

set intTab: 9 : 1

9

set intTab: 20 : 2

20

get intTab: 9 : 1

9

get intTab: 20 : 2

20

set point3Tab: [3.14159,3.14159,3.14159] : 1

[3.14159,3.14159,3.14159]

set point3Tab: [2.71828,2.71828,2.71828] : 2

[2.71828,2.71828,2.71828]

get point3Tab: [3.14159,3.14159,3.14159] : 1

[3.14159,3.14159,3.14159]

get point3Tab: [2.71828,2.71828,2.71828] : 2

[2.71828,2.71828,2.71828]

set intVal: 20

20

get intVal: 20

20

set intVal: 120

120

OK

on <name> tabChanged < arg1 > < arg2 > < arg3 > do < expr >

A tabChanged handler can be supplied for any Tab parameters in the block and will be called when an operation is performed on the tab itself. The arguments are:

arg1 - the type of change. Will be one of: #insert, #append, #delete, #refDeleted, #setCount, or #sort. All are pretty evident except for #refDeleted. This type will occur when a MAXWrapper stored in the tab is deleted.

arg2 - the tabIndex associated with the operation. If not applicable, will have a value of 0.

arg3 - the count associated with the operation. If not applicable, will have a value of -1.

If, for example you append an item to a tab that already contains one member, you will get a call to this handler with arguments of: #append 2 1. The set handler is not called, so you should handle this message in the same way as the set handler.

Tools

Plug-ins can define local mouse tools. Although you can have any number of local tools and start them as needed, you would typically supply a single tool with the reserved name create. This is taken to be the create tool for objects created in the Create panel and is invoked automatically when you create scripted plug-in objects. Tool definitions are described in Scripted Mouse Tools .

Creatable scene scripted plug-ins (scripted plug-ins that are not invisible, temporary, or extend another plug-in) require a create tool. A create tool, if present on a non-temporary extending plug-in, will override the delegate's create tool. The animate state is implicitly turned off while the create tool is executed.

A local variable nodeTM is accessible within the create tool. This variable contains a Matrix3 values. This value is in the active grid coordinate system. This variable allows the create tool to set the transform of the node currently being created. Also, within the create tool you should use the gridX values rather than worldX values in all cases, since object-creation is managed in the active grid coordinate system.

Rollouts and related Event Handlers

Plug-ins can define local rollouts. These have the same syntax as local rollouts in scripted utilities. Unlike utility local rollouts, these rollouts are automatically opened as appropriate for the plug-in type (in the command panel or Material Editor, etc.).

In 3ds Max 6 and higher,

the following optional keyword argument can be used in rollout definitions:

usePBValidity:<boolean>

This argument is applicable to scripted plugins that extend an existing class. If usePBValidity is false (the default, which matches the original behavior), the validity interval of the scripted plugin does not include the validity of controllers in the scripted plugin, only the validity of the delegate that is used. If true, the validity interval is the intersection of delegate's validity interval and the validity interval of any parameter blocks defined in a scripted plugin.

NOTE:

Rollout local variables only live as long as the rollout is open in the user interface. It gets opened and closed each time it is displayed and so the rollout open and close events are signalled at this time. If you want to load any spinners or other user-interface elements from the currently editing plug-in object, supply an on <rollout> open event handler to pick up these values. Rollout definitions are described in Utility Clauses .

on <rollout> reload do ...

This event handler is defined for rollouts in scripted plug-ins. This handler is called in a scripted material or environment or render effect whenever an instance of the plug-in is open in the Material Editor or render effects dialog and another instance of the same plug-in class is selected. In this situation, the existing rollout is not closed and re-opened but rather left open and 'loaded' with the new instance. The 'reload' handler is called after the new instance is installed in the rollout and can be used in place of 'on <rollout> open do ...' handler to update the rollout. The open handler is not called in this case. The reload event handler is not called if the scripted object has custom attributes associated with it, rather the existing rollout is closed and a new rollout opened.

on <rollout> setTime <val> do ...

This event handler is defined for rollups in scripted scripted materials and texturemaps. This handler is called whenever the time slider is changed while the rollout is displayed. <val> is the slider time.

Event Handlers

As with mouse tools, scripted plug-ins respond to certain actions in 3ds Max by implementing handler functions. All types of scripted plug-ins support the following event handlers. You can use these event handlers to perform any extra initialization needed, such as loading up plug-in local variables or initializing properties of the plug-in’s delegate.

on create do <expr>

The create event handler that is called whenever an instance of a scripted plug-in is created in a scene file. The animate state is implicitly turned off while the create event handler expression is executed.

on postCreate do <expr>

When a scripted plugin is created, its create handler is called, the set handler for all paramBlock items are called, and then the postCreate handler is called. Available in 3ds Max 6 and higher.

on load do <expr>

The load event handler that is called whenever an instance of a scripted plug-in is loaded from a scene file. The animate state is implicitly turned off while the load event handler expression is executed.

on postLoad do <expr>

When a scripted plugin in loaded, its update handler is called if necessary, the load handler is called, the set handler for all param block items are called, and then the postLoad handler is called. In most cases, you do not want to perform any action in the param block item set handlers when they are called during a load. You can make processing with the set handlers conditional using the 'loading' automatic variable.

Available in 3ds Max 6 and higher.

WARNING!

It is recommended that MAX objects not be deleted in the load or postload handlers, or in the param block item set handlers when they are called during a load. These calls occur much later in the scene load than the update handler, and deleting objects will most likely not cause a failure. However, this can not be guaranteed.

on update do <expr>

The update event handler that is called whenever an instance of a scripted plug-in is present in the scene file, and the definition of the scripted plug-in is changed (i.e., if you define a scripted plug-in, create an instance of the plug-in object in the scene, and then change and execute the script defining the scripted plug-in, the update event handler defined in the new definition of the scripted plug-in script is called for each instance of the plug-in object in the scene). See the Updating Scripted Plug-ins topic for more information.

WARNING!

Under no circumstances should you cause a MAX object to be deleted in an update handler. The file is not done loading when the update handler is called, and deleting an object may cause a crash when 3ds Max tries to finish loading the now deleted object.

on attachedToNode <nodeVar> do ...

Called whenever a scripted plug-in scene object (geometry, camera, light, helper, shape) is bound to a node in the scene, such as during create mode. The node that the current plug-in instance is being attached to is given as the first argument. In the event of scene node instancing, this handler may be called several times, whenever the base object is instanced to a node. Note that, in most cases, this will be called in the middle of a create mode and consequently, actions such as creating other nodes in the handler body are forbidden, as they are generally in 'on create' handlers.

on detachedFromNode <node> do ...

This is a handler to scene object scripted plug-ins. It is called whenever a node that references a plug-in instance is deleted in the scene. Note that, in the presence of instancing, there may still be other nodes referencing the base object instance.

on deleted do ...

Called whenever the scripted plug-in object is finally deleted. This may not occur immediately, such as when a scene node containing a scripted base object is deleted, since the object is held onto by the undo stack in case the node delete is undone by the user. The delete may occur when the undo stack is cleared, such as file new or reset.

on clone <original> do ...

Called whenever an instance of a scripted plug-in is cloned. This event handler is called on the newly created scripted plugin instance, and the argument passed in is the plugin instance that was cloned.

EXAMPLE:

plugin material MyMaterial

name:"MyMaterial"

classID:#(0x69fedc0d, 0x7c79a4d2)

extends:Standard replaceUI:true

(

parameters hardwareShaders rollout:shaderRoll

(

)

rollout shaderRoll "Hardware Shaders" width:328 height:189

(

label l1 "AA"

)

on create do format "created: %\n" this

on clone orig do format "cloned: % : % : % : %\n" this orig

(this == orig) (delegate == orig.delegate)

)

a=mymaterial()

b=copy a

RESULTS:

MyMaterial

created: (null):MyMaterial

MyMaterial:MyMaterial

cloned: MyMaterial:MyMaterial : MyMaterial:MyMaterial : false : false MyMaterial:MyMaterial

Specific classes of scripted plug-ins implement additional event handlers, and are described with description of the scripted plug-in type.

Runtime errors in certain event handlers cause the plug-in to be disabled until it is re-defined. When disabled, none of the plug-in event handlers are called. For example, errors in the map event handler expression in SimpleMods and the buildMesh event handler expression in SimpleObject disable the plug-in, since they are called so frequently. You will need to correct any problems and re-evaluate the plug-in definition again to re-enable the plug-in event handlers.

See also

Scripted Plug-ins


Scripted Plug-in Methods

The addPluginRollouts() is used within scripted plug-in create tools, specifically for level 1 plug-ins that don't create instances of themselves in the scene but might create other objects within their create tool. This method lets you install rollouts for a specified object in the Create panel, typically one of the objects being created in the create tool, so that its parameters can be adjusted directly during creation.

The form is:

addPluginRollouts <obj>

In the following example, a variation of the three light mouse tool example presented in Mouse Tool Clauses is set into permanent, editable classes. It defines two new classes. The helper class lightMaster is used as a master object for the light system. The light class threeLights is what you create to layout the initial system. It also creates a lightMaster and sets its parameters to point at the lights. The lightMaster rollout allows subsequent editing of the system in the Modifier panel, and storing the lights in a parameter block makes the setup persistent over scene saves and loads.

SCRIPT

plugin helper lightMaster

name:"Light Master"

classID:#(12345,54321)

extends:Dummy

replaceUI:true

invisible:true

(

parameters main rollout:params

(

key type:#node subAnim:true

fill type:#node subAnim:true

back type:#node subAnim:true

height type:#worldUnits default:0 ui:height

spread type:#worldUnits default:0 ui:spread

angle type:#angle default:90 ui:angle

-- check value of key since lights don't exist at initial creation

on height set val do if key != undefined then coordsys key.target

(

key.pos.z = val

back.pos.z = val * 1.5

fill.pos.z = val * 0.5

)

on spread set val do if key != undefined then coordsys key.target

(

-- compute normal vector pointing at key in the target's XY plane

-- (kuv) and reposition everything based on that and the current

-- spread and angle values

local kuv = normalize ([key.pos.x, key.pos.y, 0])

key.pos = [kuv.x * spread, kuv.y * spread, height]

back.pos = [kuv.x * -spread, kuv.y * -spread, height * 1.5]

-- position fill by placing it under the key and then rotating in

-- about the target

fill.pos = [kuv.x * spread, kuv.y * spread, height * 0.5]

about key.target rotate fill angle z_axis

)

on angle set val do if key != undefined then coordsys key.target

(

fill.pos = [key.pos.x, key.pos.y, height * 0.5]

about key.target rotate fill angle z_axis

)

)

rollout params "Light Parameters"

(

spinner height "Height" type:#worldUnits range:[-1e32, 1e32, 0]

spinner spread "Spread" type:#worldUnits range:[0, 1e32, 0]

spinner angle "Angle" range:[-180, 180, 30]

on params open do flagForeGround #(key, back, fill) true

on params close do

if key != undefined and back != undefined and fill != undefined then

flagForeGround #(key, back, fill) false

)

)

SCRIPT

plugin light threeLights

name:"Three Lights"

(

local master

tool create

(

on mousePoint click do

(

if click == 1 then -- create key, back & fill lights at mousedown

(

coordsys grid

(

master = lightMaster pos:gridPoint

master.dummy.boxsize = [10,10,10]

in master

(

local targObj=targetobject pos:gridPoint

master.key = targetspot pos:gridPoint name:"key" \

target:targObj

master.back = targetspot pos:gridPoint name:"back" \

target:targObj

master.fill = targetspot pos:gridPoint name:"fill" \

target:targObj

)

)

addPluginRollouts master

)

if click == 3 then

(

select master

master = undefined

#stop

)

)

on mouseMove click do

(

if click == 2 then -- drag out & round on x-y plane

(

-- place the key on the grid then set the spread and the

-- 'on set spread' handler will

-- move the lights to the correct heights

master.key.pos = worldPoint

master.spread = distance master.key master.key.target

)

else if click == 3 then -- drag up to elevate lights

master.height = gridDist.z

)

on mouseAbort click do

(

if master != undefined then

(

if master.fill != undefined then delete master.fill

if master.back != undefined then delete master.back

if master.key != undefined then delete master.key

delete master

)

)

)

)

See also

Scripted Plug-ins


Updating Scripted Plug-ins

MAXScript allows you to redefine scripted plug-ins while working in 3ds Max, and have old instances in the current scene and in scenes you load automatically updated to the new definition. This ability to redefine scripted plug-ins is called schema-migration. MAXScript does this roughly by matching the names of local variables, parameter blocks and parameters between the old version instances and the new definition. It keeps any variables, parameter blocks and parameters of the same name, drops anything missing in the new definition and creates new variables, blocks and parameters as needed, filling them in with default values.

There are some limitations on the kinds of change that can be supported. Specifically:

  • Parameter blocks that were per-instance cannot be made per-class and vice versa.

  • Parameters can not change type across redefinitions.

  • Parameters can not move from one parameter block to another across redefinitions

This same mechanism is used to update old versions of scripted plug-in objects stored in scene files. Remember that this only works properly if the classID: specified in the scripted plug-in definition that was in force when the scene was saved is the same as the current classID: in the definition since 3ds Max depends upon this classID to match up objects in the scene file and their class definitions.

You can specify an update event handler in a scripted plug-in and it will be called whenever the object is updated by this schema migration mechanism. To make this more useful, MAXScript supports a version number on scripted plug-ins. The version for any particular instance of the plug-in can be accessed via the version special local variable in any plug-in local function or handler. When the update event handler is called during a schema-migration, the old version number is still in force, but is updated to the current version number immediately after update.

EXAMPLE:

plugin helper lightMaster

name:"Light Master"

classID:#(12345,54321)

extends:Dummy

invisible:true

replaceUI:true

version:3 -- set current version to 3

(

parameters main rollout:params

...

on update do

(

if version == 1 then ... -- do something special for v1 instances

)

...

)

NOTE:

You only need to use this explicit version access and update scheme if you want to do some special manual conversion over-and-above the automatic migration described above.

An optional remap: keyword introduced in 3ds Max 7 allows parameter names in the definitions to be changed when updating existing definitions.

The keyword takes as an argument a 2 element array, where each element contains an array of string literal or name values. The size of the 2 arrays must be the same.

The names in the first array are the existing parameter names, the names in the second array are the new parameter names. As parameter names are read in while migrating existing plugin instances, the parameter names are searched for in the first array. If the name is found, the data associated with that parameter is moved to the parameter name in the corresponding location in the second array. If a parameter name is not found in the first array, the parameter name is not remapped. If the parameter name in the second array does not match a parameter name in the new definition, the parameter data is not moved to the new definition.

Finally, if there are no existing instances of the plug-in, either in the current scene or in other scenes that you care about keeping, you can simply delete them and make whatever changes you like the scripted plug-in definition. The above version update considerations come into play only when you wish to support old version objects of your scripted plug-in.

See also

Scripted Plug-ins


Scripted Geometry Plug-ins

A scripted Geometry plug-in is declared by specifying the <superclass> as geometry. Scripted Geometry plug-ins require a create tool unless they are invisible, temporary, or extend another plug-in. If the plug-in extends another plug-in, and a create tool is specified, it will override the delegate's create tool.

EXAMPLE:

plugin geometry foo_plugin_def

name:"FooBar"

category:"Scripted Primitives"

(

local boxes = #()

local clickAt

tool create

(

on mousePoint click do

(

clickAt = worldPoint

boxes = for i in 1 to 10 collect box pos:([i*20,0,0] + clickAt)

#stop

)

)

rollout frab "Parameters"

(

spinner frab_value "Frabulate" range:[-1000,1000,20]

on frab_value changed val do

for i in 1 to boxes.count do

 boxes[i].pos = [i*val,0,0] + clickAt

)

)

This adds a new geometry category with one button to the Create panel. Pressing the FooBar button starts a mouse command mode that creates a row of 10 boxes where you click and adds a rollout to the command panel with one spinner that lets you adjust the separation of the boxes. This is very similar to a System object like the RingArray, except it lives in the Geometry tab. This is the simplest type of scripted of plug-in; it has no specific scene object and no storable parameters.

In the tool handlers, you can set the delegate properties as needed.

FOR EXAMPLE:

plugin geometry Cuboid

name:"Cuboid"

classID:#(0x133067, 0x54374)

category:"Scripted Primitives"

extends:Box

(

fn fmax val1 val2 = if val1 > val2 then val1 else val2

tool create

(

on mousePoint click do

case click of

(

1: nodeTM.translation = gridPoint

2: #stop

)

on mouseMove click do

if click == 2 then

delegate.width = delegate.length =

delegate.height = 2 * fmax (abs gridDist.x) (abs gridDist.y)

)

)

See also

Updating Scripted Plug-ins

Scripted Plug-in Methods

Scripted Plug-in Clauses

Scripted Plug-ins

Scripted Mouse Tools


Scripted SimpleObject Plug-ins

A SimpleObject is a kind of geometry primitive object that is defined by a tri-mesh, such as box, sphere, cone, and so on. In other words, all the Standard and Extended primitives in 3ds Max. In scripting a SimpleObject plug-in, you supply a handler for building this mesh and 3ds Max automatically handles scene display, hit-testing, ray intersection, rendering, modifier applicability, etc. A scripted SimpleObject plug-in is declared by specifying the <superclass> as simpleObject.

Scripted SimpleObject plug-ins require a create tool.

A SimpleObject plug-in must not perform any scene related actions such as creating scene nodes or building modifier stacks. It should basically only be adjusting its parameters in the mouse tool handlers and constructing a mesh in the buildMesh handler. Attempting to create scene nodes or applying modifiers in a SimpleObject plug-in will cause all kinds off strange interactions with the in-progress scene node creation.

A SimpleObject plug-in has a predefined local variable mesh. This variable contains the underlying mesh of the object being created. The mesh local variable is accessible in any of the plug-in's handlers, but is typically only built in the buildMesh handler. You can either modify the existing TriMesh value in place, using the TriMesh methods, or construct a new TriMesh value and assign it to the mesh plug-in local variable. The TriMesh methods and properties are described in Editable Mesh .

SCRIPT:

plugin simpleObject tower_plugin_def

name:"Tower"

classID:#(145345,543211)

category:"Scripted Primitives"

(

parameters main rollout:params

(

height type:#worldUnits ui:height default:0

width type:#worldUnits ui:width default:0

depth type:#worldUnits ui:depth default:0

)

rollout params "Two Faces Parameters"

(

spinner height "Height" type:#worldunits range:[-1000,1000,0]

spinner width "Width" type:#worldunits range:[-1000,1000,0]

spinner depth "Depth" type:#worldunits range:[-1000,1000,0]

)

on buildMesh do

(

setMesh mesh \

verts:#([0,0,0],[width,0,0],[width,depth,0],[0,depth,0]) \

faces:#([3,2,1], [1,4,3])

extrudeFace mesh #(1,2) (height * 0.5) 40 dir:#common

extrudeFace mesh #(1,2) (height * 0.5) 50 dir:#common

)

tool create

(

on mousePoint click do

case click of

(

1: nodeTM.translation = gridPoint

3: #stop

)

on mouseMove click do

case click of

(

2: (width = gridDist.x; depth = gridDist.y)

3: height = gridDist.z

)

)

)

In this script a new primitive called Tower is defined. It constructs a (very) simple tower form; the first drag sets the base and the second drag sets the height. It contains three animatable rollout parameters, height, width and depth, that set the object's basic bounds. The key components here are the create tool and the on buildMesh handler and they work together in a fairly simple way. The create tool sets the values of the parameters and the on buildMesh handler constructs a mesh based on those parameter values.

The create tool can also access and set the position of the node that is being created to contain the new object through the Matrix3 value in the pre-defined mouse tool local variable nodeTM. In this case, the position portion of the node's TM is set to the initial mouse down world position. The on mouseMove handler sets the width and depth during click 2 and the height during click 3.

The on buildMesh handler constructs the desired mesh in the TriMesh value in the pre-defined plug-in local variable mesh. Typically, it does this by building the mesh from scratch each time the handler is called. In the example above, the mesh is initially set to a simple, two-face rectangular plane (via setMesh()) and then the 2 faces are extruded up and scaled-down twice to get the simple tower.

The mesh plug-in local variable is accessible in any of the plug-in's handlers, but is typically only built in the on buildMesh handler. You can either modify the existing TriMesh value in place using the TriMesh methods, or construct a new TriMesh value and assign it to the mesh plug-in local variable. The TriMesh created must be valid or a 3ds Max crash may occur. All face, vertex, material ID, and texture vertex arrays allocated must be filled in the handler.

There are three additional event handlers that may be implemented for a scripted SimpleObject:

on OKtoDisplay do <boolean_expr>

If the OKtoDisplay event handler is implemented, <boolean_expr> should return true or false depending on whether it is OK to display the current mesh. This is useful in situations where a mesh might be in some degenerate state for particular parameter settings and so should not be displayed in the viewports. The default implementation is true. Note, empty meshes are OK to display.

on hasUVW do <boolean_expr>

If the hasUVW event handler is implemented, <boolean_expr> should return true or false depending on whether UVW coordinates are present on the mesh. In many primitive objects, a Generate Mapping Coords checkbox is provided for the user to control UVW coordinate generation and the hasUVW handler expression would return the state of this checkbox. The default implementation returns true or false depending on whether the mesh has texture vertices present or not. At present, only a single map channel is supported.

on setGenUVW <onOff> do <expr>

The setGenUVW event handler is called when 3ds Max wants the plug-in to automatically generate mapping coordinates, as happens when you first render an object that has a material applied, but not mapping coordinates. It is called with a switch argument <onOff> which is true or false to turn on or off the mapping coordinates. If your plug-in is managing mapping coordinates, it should implement this handler and generate mapping coordinates when called with a true argument.

EXAMPLE

plugin simpleObject TexturePlane

name:"TexturePlane"

classID:#(0x19a75166, 0x83e3a1c7)

category:"MAXScript Examples"

(

parameters main rollout:params

(

Size type:#worldUnits ui:size default:0

genMapCoords type:#boolean ui:gen_Map_Coords default:false animatable:false

u_tile type:#float default:1.0 ui:u_step

v_tile type:#float default:1.0 ui:v_step

)

rollout params "TexturePlane"

(

group "Geometry"

(

spinner size "Size:" type:#worldunits range:[0,1000,1]

)

group "Mapping"

(

spinner u_step "U Tiling" scale:0.01

spinner v_step "V Tiling" scale:0.01

checkbox gen_Map_Coords "Generate Mapping Coords."

)

) --end roll

--When Max wants to know whether the object has UV coords,

--return the value stored in genMapCoords to inform it of

--the current UV sate of the plug-in.

on hasUVW do genMapCoords

--When Max tells the plug-in to turn on UV coordinates

--(for example when applying a texture

--with "Show Map In Viewport" checked),

--this handler will automagically check the checkbutton

--connected to our parameter called genMapCoords.

--Also, when the user changes the checkbox,

--the variable will tell the builMesh to generate coordinates.

--Note that the handler will override the manual settings,

--for example if a texture has "Show Map In Viewport" enabled,

--you cannot actually uncheck the "Generate Mapping Coords."

--checkbox with the mouse!

on setGenUVW bool do genMapCoords = bool

on buildMesh do

(

--Generate a simple Quad

local vertex_array = #()

append vertex_array [-size/2,-size/2,0]

append vertex_array [size/2,-size/2,0]

append vertex_array [size/2,size/2,0]

append vertex_array [-size/2,size/2,0]

face_array = #( [1,2,3], [1,3,4] )

setMesh mesh verts:vertex_array faces:face_array

--If the checkbox was enabled and we want

--coordinates to be generated...

if genMapCoords then

(

--define the texture vertices

local uvw_array = #()

append uvw_array [0.0,0.0,0.0]

append uvw_array [u_tile ,0.0,0.0]

append uvw_array [u_tile ,v_tile ,0.0]

append uvw_array [0.0,v_tile ,0.0]

--set the number of vertices

setNumTVerts mesh uvw_array.count

--set all vertices

for v = 1 to uvw_array.count do

setTVert mesh v uvw_array[v]

--build texture faces

buildTVFaces mesh false

--set all texture faces (in this case using the mesh faces

--since we happen to have a one-to-one correspondence

--between vertices and texture vertices.

--This is not always the case though...

for f = 1 to face_array.count do

setTVFace mesh f face_array[f]

)

)--end on buildMesh

tool create

(

on mousePoint click do

case click of

(

1: ( nodeTM.translation = gridPoint )

2: ( #stop)

)

on mouseMove click do

case click of

(

2: (Size= abs gridDist.x)

)

)

)--end plugin

Here's another example that creates a mesh by first building other temporary objects and using mesh booleans to build the final mesh:

SCRIPT

plugin simpleObject squareTube

name:"SquareTube"

classID:#(63445,55332)

category:"Scripted Primitives"

(

local box1, box2

parameters main rollout:params

(

length type:#worldUnits ui:length default:1E-3

width type:#worldUnits ui:width default:1E-3

height type:#worldUnits ui:height default:1E-3

)

rollout params "SquareTube"

(

spinner height "Height" type:#worldUnits range:[1E-3,1E9,1E-3]

spinner width "Width" type:#worldUnits range:[1E-3,1E9,1E-3]

spinner length "Length" type:#worldUnits range:[-1E9,1E9,1E-3]

)

on buildMesh do

(

if box1 == undefined then

(box1 = createInstance box; box2 = createInstance box)

box1.height = height; box2.height = height

box1.width = width; box2.width = width * 2

box1.length = length; box2.length = length * 2

mesh = box2.mesh - box1.mesh

)

tool create

(

on mousePoint click do

case click of

(

1: nodeTM.translation = gridPoint

3: #stop

)

on mouseMove click do

case click of

(

2: (width = abs gridDist.x; length = abs gridDist.y)

3: height = gridDist.z

)

)

)

In this example, the parameters and rollouts are handled in a similar manner to the first example, but the buildMesh handler generates the mesh in an indirect way. The final object is in the form of a rectangular pipe, a box with a box hole through the middle. Two plug-in locals (box1 and box2) are made to contain Box base objects whose size parameters are set according to the plug-in's parameters, box2 is the outer box, box1 is the hole. The final mesh is made by boolean subtraction of box1 from box2. In this case, a separate new mesh is created and assigned to the mesh plug-in local variable, in contrast to the first example which modified the object's original mesh directly. Either technique is OK.

The createInstance() method is used to directly create the box base objects. This method creates the geometry associated with the specified object, but does not create a node. This method is used since SimpleObject plug-in must not perform any scene related actions such as creating scene nodes or building modifier stacks.

See also

Updating Scripted Plug-ins

Scripted Plug-in Methods

Scripted Plug-in Clauses

Scripted Plug-ins

Scripted Mouse Tools


Scripted Shape Plug-ins

Scripted Shape plug-ins can only extend existing Shape plug-ins. A scripted Shape plug-in is declared by specifying the <superclass> as shape. If a create tool is specified, it will override the delegate's create tool.

EXAMPLE

plugin shape Extended_Rect

name:"Rectangle2"

classID:#(0x133067, 0x54375)

extends:rectangle version:1

category:"Splines"

(

tool create

(

local startPoint

on mousePoint click do

case click of

(

1: startPoint = nodeTM.translation = gridPoint

3: #stop

)

on mouseMove click do

case click of

(

2: (delegate.width= abs gridDist.x

delegate.length= abs gridDist.y

nodeTM.translation = startpoint + gridDist/2.

)

3: delegate.corner_radius = amax 0 -gridDist.x

)

)

)

See also

Updating Scripted Plug-ins

Scripted Plug-in Methods

Scripted Plug-in Clauses

Scripted Plug-ins

Scripted Mouse Tools


Scripted Light Plug-ins

Scripted Light plug-ins can only extend existing Light plug-ins. A scripted Light plug-in is declared by specifying the <superclass> as light. If a create tool is specified, it will override the delegate's create tool. Current limitations prevent certain plug-ins from being extended, in particular those with custom creation managers. These include target light plug-ins. You can tell if a plug-in is not extendable if your new rollouts do not appear.

An example of a scripted Light plug-in is shown in the Three Lights example in Scripted Plug-in Methods .

on getDisplayMesh do ....

This optional event handler lets the developer replace the viewport display mesh of the delegate with a custom display mesh. Previously available in Scripted Cameras and Scripted Helper Plug-ins . Available in 3ds Max 8 and higher.

on useWireColor do ....

This optional event handler lets the developer specify whether to use the node's wire color when drawing the object in the viewport, or use the UI color for the object type (Light Object). If this handler returns true, the node's wire color is used, otherwise the UI color for the object type is used. If the event handler is not specified, the wire color is used. This handler is only applicable when a getDisplayMesh handler is supplied. Available in 3ds Max 8 and higher.

See also

Updating Scripted Plug-ins

Scripted Plug-in Methods

Scripted Plug-in Clauses

Scripted Plug-ins

Scripted Mouse Tools


Scripted Cameras

Scripted Camera Plug-ins

Scripted camera plug-ins can be written in MAXScript. At present, you can write either extending camera plug-ins that extend existing MAX cameras or temporary camera plug-ins that can be used to host create tools for a custom camera system.

The plug-in superclass for cameras is 'camera'.

Event Handlers

on renderApertureChanged val do ....

This event handler is available to scripted cameras and gives access to the CameraObject::renderApertureChanged callbacks made by the rendering dialog to a camera when the user adjusts parameters that affect render aperture.

This handler is optional.

The 'val' parameter contains the new render aperture value. This typically gets called when you select a new apeture in the Output Size dropdown in the render dialog or adjust a spinner when in Custom mode.

There are several cases where this handler is called:

  • In the Render Scene dialog, if Image Aspect is unlocked and you change Width, Height, or Pixel Aspect

  • In the Render Scene dialog, if you click on one of the output size preset buttons

  • In the Render Scene dialog, if Image Aspect is locked and you change Width, Height, or Pixel Aspect, or if you change Aperture Width, and then click on either Render or Close

The value being passed into handler is the aperture width. You can get the remaining values via: renderWidth, renderHeight, and RenderPixelAspect global variables. However, what you get for these values are typically the old value, with the exception of the Aperture Width value. The call to the handler is coming from a "InvalidateCameras" method, which is called right before setting the new values. No broadcasts are made after the new values are set, and if safe frames are not turned on in any viewport, none of the viewports are redrawn.

It is recommended that if a scripted camera uses this handler, it should cache the old Aperture Width value and test the incoming value against the cached value before proceeding.

EXAMPLE

plugin Camera CamTest

name:"CamTest"

classID:#(0x47db14ff, 0x4e9b5f90)

category:"Standard"

extends:FreeCamera

( on renderApertureChanged val do format "renderApertureChanged: %\n" val

tool create

( on mousePoint click do #stop

)

)

The following handler was added in 3ds Max 7:

on getDisplayMesh do ....

This event handler is available to scripted cameras and helpers and lets the developer replace the viewport display mesh of the delegate with a custom display mesh.

This handler is optional.

NOTE:

For performance reasons, it is critical to regenerate the returned mesh as little as possible. The handler is called often - for display, bounds
testing, and hit testing.

The example below shows how to update the mesh in the handler only when the mesh has actually changed:

EXAMPLE

plugin Camera CamTest_DisplayMesh

name:"CamTest"

classID:#(0x47db14ff, 0x4e9b5f90)

category:"Standard"

extends:FreeCamera

(

local lastR1, lastR2, meshObj

parameters pblock rollout:params

(

radius1 type:#float animatable:true ui:r1_amount default:40.0

radius2 type:#float animatable:true ui:r2_amount default:20.0

)

rollout params "CamTest Parameters"

(

Spinner r1_amount "Radius 1:" range:[0, 1e9, 40]

Spinner r2_amount "Radius 2:" range:[0, 1e9, 20]

)

on getDisplayMesh do

(

if (meshObj == undefined) do

(

meshObj = createInstance torus radius1:radius1 radius2:radius2 mapCoords:false

lastR1 = radius1; lastR2 = radius2

)

if radius1 != lastR1 do (meshObj.radius1 = radius1; lastR1 = radius1)

if radius2 != lastR2 do (meshObj.radius2 = radius2; lastR2 = radius2)

meshObj.mesh

)--end on getDisplayMesh

tool create

(

on mousePoint click do (nodeTM.translation = gridPoint;#stop )

)--end tool

)--end plugin

on useWireColor do ....

This optional event handler lets the developer specify whether to use the node's wire color when drawing the object in the viewport, or use the ui color for the object type (Camera Object for Cameras). If this handler returns true, the node's wire color is used, otherwise the ui color for the object type is used. If the event handler is not specified, the wire color is used. This handler is only applicable when a getDisplayMesh handler is supplied. Available in 3ds Max 8 and higher.

See also

Scripted Plug-ins

Scripted Plug-in Events


Scripted Helper Plug-ins

Scripted Helper plug-ins can only extend existing Helper plug-ins. A scripted Helper plug-in is declared by specifying the <superclass> as helper. If a create tool is specified, it will override the delegate's create tool.

An example of a scripted Helper plug-in is shown in the Three Lights example in Scripted Plug-in Methods .

Event Handlers

on getDisplayMesh do ....

This event handler is available to scripted cameras and helpers in 3ds Max 7 and higher and lets the developer replace the viewport display mesh of the delegate with a custom display mesh.

This handler is optional.

NOTE:

For performance reasons, it is critical to regenerate the returned mesh as little as possible. The handler is called often - for display, bounds
testing, and hit testing.

The example below shows how to update the mesh in the handler only when the mesh has actually changed:

EXAMPLE

plugin Helper HelperTest_DisplayMesh

name:"HelperTest"

classID:#(0x47db14fe, 0x4e9b5f90)

category:"Standard"

extends:dummy

(

local lastSize, meshObj

parameters pblock rollout:params

(

size type:#float animatable:true ui:amount default:40.0

)

rollout params "HelperTest Parameters"

(

Spinner amount "Size:" range:[0, 1e9, 40]

)

on getDisplayMesh do

(

if (meshObj == undefined) do

(

meshObj = createInstance box length:size \

width:size height:size mapCoords:false \

lastSize = size

)

if size != lastSize do

(

meshObj.length = meshObj.width = meshObj.height = size \

lastSize = size

)

meshObj.mesh

)

tool create

(

on mousePoint click do

(

nodeTM.translation = gridPoint;#stop

)

)

)

on useWireColor do ....

This optional event handler lets the developer specify whether to use the node's wire color when drawing the object in the viewport, or use the UI color for the object type (Dummy Object for Helpers). If this handler returns true, the node's wire color is used, otherwise the UI color for the object type is used. If the event handler is not specified, the wire color is used. This handler is only applicable when a getDisplayMesh handler is supplied. Available in 3ds Max 8 and higher.

See also

Updating Scripted Plug-ins

Scripted Plug-in Methods

Scripted Plug-in Clauses

Scripted Plug-ins

Scripted Mouse Tools


Scripted Modifier Plug-ins

Scripted Modifier plug-ins can only extend existing Modifier plug-ins. A scripted Modifier plug-in is declared by specifying the <superclass> as modifier.

The Modify panel actually creates a fresh instance of every modifier when it is to be shown in the More... list or the buttons in the Modifiers rollout. This will cause the create handler to be called for a scripted Modifier plug-in. No special handling in the create handler is required for this case.

SCRIPT:

plugin modifier myMod

name:"Supa Mod"

classID:#(685325,452281)

extends:Bend replaceUI:true version:1

(

parameters main rollout:params

(

bendamt type:#float animatable:true ui:bendamt default:0.0

on bendamt set val do delegate.angle = val

)

rollout params "SupaMod Parameters"

(

spinner bendamt "Bendiness: "

)

)

SCRIPT:

plugin modifier NSpline

name:"Normal. Spline"

classID:#(0x133067, 0x54374)

extends:normalize_spline

replaceUI:true version:1

(

parameters main rollout:params

(

seglen type:#float animatable:true ui:seglen default:20

on seglen set val do delegate.length = val

)

rollout params "Parameters"

(

spinner seglen "Seg Length: " range:[0.01,1e9,20]

)

)

See also

Updating Scripted Plug-ins

Scripted Plug-in Methods

Scripted Plug-in Clauses

Scripted Plug-ins

Scripted Mouse Tools


Scripted SimpleMod Plug-ins

A SimpleMod plug-in is a deformation-type modifier that moves vertices around but does not change topology (adding or deleting vertices, faces, surfaces, lines, etc.) Examples of similar 3ds Max modifiers are Bend, Stretch, and Taper. These kinds of modifiers require only a single map handler to be provided for moving vertices around and they automatically supply 3D box deformation gizmo and center sub-objects. A scripted Modifier plug-in is declared by specifying the <superclass> as modifier.

SCRIPT

plugin simpleMod saddle

name:"SaddleDeform"

classID:#(685325,452281)

version:1

(

parameters main rollout:params

(

amount type:#integer ui:amtSpin default:20

)

rollout params "Saddle Parameters"

(

spinner amtSpin "Amount: " type:#integer range:[0,1000,20]

)

on map i p do

(

p.z += amount * sin((p.x * 22.5/extent.x) * (p.y * 22.5/extent.y))

p

)

)

This script defines a new SimpleMod plug-in named SaddleDeform. It applies a saddle-type deformation to an object, curving up 2 opposite corners and curving down the other two opposite corners (try it on a plane object to see this best). There is a single parameter spinner, amount that specifies how much deformation to apply. The key component of a SimpleMod plug-in is the map handler.

Its form is:

on map <index> <point> do <expr>

This event handler is called once for every point in the object (or current point selection in the object) being modified. These points may be mesh vertices, spline vertices, NURBS CVs, and so on. The <index> argument gives the number of the point, but this index may not correspond to a vertex number in a mesh or a spline. The <point> argument supplied to the map handler gives the current object-space coordinates of the point as a Point3. The function should modify the supplied point value as appropriate and return it as the result of the map handler call. In the example above, the map handler applies a Z-coordinate deformation, using the equation z = sin(x * y), so that all the points retain their X and Y coordinates and the Z is moved up or down so as to follow the saddle function. Note that all coordinates are object-local.

The <index> value is 1-based, however the scripted plug-in is called with a <index> value of 0 to signal that this particular map call is being used by the gizmo bounding box drawing code to compute points in the gizmo box to draw. This occurs hit testing is performed on the object the SimpleMod modifier is applied to and the gizmo bounding box is displayed. This will be the case if the object is selected, the Modifier panel is active, and the SimpleMod modifier is selected in the object’s modifier stack.

It is basically up to the object being modified to decide what index value to pass. For meshes, for example, it is the actual mesh vertex index. For patches, it is the control points first all in one sequence, followed by the in and out vectors for each control point in control point order. For splines, it is control point, in vector, out vector in control point sequence within the curve sequence. This ordering may change in future versions of 3ds Max.

Since the map handler can be called many times, even on simple objects, it is highly recommended that you minimize the number of values that are created in the map handler. This will reduce the need for garbage collection to be run. If you need several local variables in the map handler, it is recommended that you declare one or more Point2 or Point3 values in the scripted plug-in definition, and then store values to the component values of the Point2 or Point3 values. This will prevent new local variables from being allocated in the map handler.

You should not try to access the object being modified from within the map handler as this will attempt to evaluate the scripted modifier again. This will result in an infinite loop and hang 3ds Max.

There are also three pre-defined plug-in locals you can access in the map handler, as follows:

min -- the modifier context's bounding box min coordinate

max -- the modifier context's bounding box max coordinate

center -- the modifier context's bounding box center coordinate

extent -- the modifier context's bounding box extent or size

In the example above, the map handler use the extent pre-defined local variable to compute a scaling for the saddle function, so that it gets a 1/8th cycle of the function (22.5 degrees) across the whole object. These bounding box locals relate to the modifier's context, either the whole object or group of objects if applied to a scene node selection, or sub-object selection if there is a sub-object selection modifier below it on the stack (such as a Mesh Select).

You can also use some other built-in capabilities of SimpleMod to implement modifier limits as in Bend and Taper. To do this, implement handlers for the following (you must implement all if you implement any):

on modLimitZMin do <expr>

on modLimitZMax do <expr>

on modLimitAxis do <expr>

If called, the on modLimitZMin and on modLimitZMax handler expressions must evaluate to float values corresponding to the minimum and maximum limits and the on modLimitAxis handler expression must return #x, #y or #z to specify the limit axis. The MAXScript global variable currentTime contains the time at which these values should be computed, although, normally, simple access to parameter values will yield the correct currentTime value automatically. The simplest way to implement these handlers is to maintain limit parameters and associated spinners and checkboxes, and simply pass these parameter values back.

The Modify panel actually creates a fresh instance of every modifier when it is to be shown in the More... list or the buttons in the Modifiers rollout. This will cause the create handler to be called for a scripted SimpleMod plug-in. No special handling in the create handler is required for this case.

See also

Updating Scripted Plug-ins

Scripted Plug-in Methods

Scripted Plug-in Clauses

Scripted Plug-ins

Scripted Mouse Tools


Scripted Material Plug-ins

Scripted Material plug-ins can only extend existing Material plug-ins. A scripted Material plug-in is declared by specifying the <superclass> as material.

A scripted Material plug-in must have at least one rollout defined.

In a scripted Material plug-in, Material and Map buttons that are associated with a parameter in a parameter block do not call the button’s picked event handler. Instead, you should link the button to a parameter in a parameter block, and use the set handler for the parameter.

SCRIPT

-- this is a level 3 plug-in, the beginnings of a custom glass material.

-- It extends Standard material and replaces its UI with a single

-- rollout with 2 spinners and a color picker

plugin material myGlass

name:"Supa Glass"

classID:#(695425,446581)

extends:Standard replaceUI:true version:1

(

parameters main rollout:params

(

trans type:#float default:27 ui:trans

refrac type:#float default:1.5 ui:refrac

col type:#color default:blue ui:col

on trans set val do delegate.opacity = val

on refrac set val do delegate.ior = val

on col set val do delegate.diffuse_color = val

)

rollout params "Glass Parameters"

(

spinner trans "Transparency: " fieldwidth:45 offset:[-90,0]

spinner refrac "Index of Refraction: " fieldwidth:45 offset:[-90,0]

colorpicker col "Base color: " align:#center

)

on create do

(

-- setup initial material

delegate.opacityFalloff = 75

)

)

NOTE:

The render() function can be called re-entrantly within a scripted material. (In releases prior 3ds Max 4, attempting to do this caused a runtime error saying that the renderer could not be called while a render was already under way.)

See also

Updating Scripted Plug-ins

Scripted Plug-in Methods

Scripted Plug-in Clauses

Scripted Plug-ins


Scripted TextureMap Plug-ins

Scripted TextureMap plug-ins can only extend existing TextureMap plug-ins. A scripted TextureMap plug-in is declared by specifying the <superclass> as textureMap.

A scripted TextureMap plug-in must have at least one rollout defined.

In a scripted TextureMap plug-in, Material and Map buttons that are associated with a parameter in a parameter block do not call the button’s picked event handler. Instead, you should link the button to a parameter in a parameter block, and use the set handler for the parameter.

See also

Updating Scripted Plug-ins

Scripted Plug-in Methods

Scripted Plug-in Clauses

Scripted Plug-ins

How To ... Create a Dalmatian TextureMap Plug-in


Scripted RenderEffect Plug-ins

A scriptable RenderEffect plug-in can be declared by specifying the <superclass> as RenderEffect and by declaring an apply event handler. When declared, the render effect can be seen in Render Effects > Add dialog.

on apply <bitmap> do <expr>

When the scripted effect is added as one of the rendering effects and "Update Scene" or "Update Effect" buttons are pressed, the apply event handler is called and passed a bitmap which can be modified with any changes the render effect wants to make. The bitmap you are given is the current rendered image that has had all of the prior effects in the render effects list applied to it. You modify this bitmap in place, typically by using the getPixel() and setPixel() functions. This modified bitmap is then passed onto the next render effect in the list or to the render output if it is the last effect.

To allow scripted Effects to take advantage of the g-buffer channel access, the following handlers are present:

on channelsRequired do <expr>

The handler expression must evaluate to an array of the g-buffer channel names that are required. The g-buffer channel names are:

#zDepth

#matID

#objectID

#UVCoords

#normal

#unClamped

#coverage

#mask

#node

#shaderColor

#shaderTransparency

#velocity

#weight

on preApply <bitmap> do <expr>

The preApply handler allows the scripted effect to analyze the incoming render bitmap and its channels in order to precondition the delegate's effect processing.

So, you might add an on channelsRequired do to add #node and #coverage channels to the renderer’s bitmap, and an on preApply bm do to get the #node channel out as a mask and then set it into a delegate’s mask parameter to limit an effect to a given object.

The render() function can be called re-entrantly within scripted renderEffect. In releases prior to 3ds Max 4, attempting to do this caused a runtime error saying that the renderer could not be called while a render was already under way.

Here's a simple example that extends the Blur effect to add another rollout that has a node picker button. If you pick a node it generates a channel mask and uses that to limit the blur to that object:

SCRIPT

plugin RenderEffect myBlurFX

name:"Super Blur FX"

classID:#(6545,456581)

extends:Blur

version:1

(

local tx, cm, g_channels

local tx = bitmaptexture ()

local g_channels = #(#node, #coverage)

rollout params "SupaFX Parameters"

(

label nn align:#center

pickbutton nodepick "Pick Node"

)

parameters main rollout:params

(

thenode type:#node ui:nodepick

on thenode set nd do

params.nn.text = if nd == undefined then "" else nd.name

)

on channelsRequired do g_channels

on preApply map do if theNode != undefined then

(

if cm == undefined then

(

cm = getChannelAsMask map #node node:theNode \

fileName:(scriptsPath + "__fxtmp.bmp")

save cm

tx.bitmap = cm

)

else

getChannelAsMask map #node node:theNode to:cm

)

on create do

(

delegate.selMaskActive = true

delegate.selImageActive = false

delegate.selMaskMap = tx

)

)

SCRIPT

plugin renderEffect myColorBalanceFx

name:"Super Color Balance FX"

classID:#(64425,45761)

extends:Color_Balance version:1

(

parameters main rollout:params

(

redness type:#integer animatable:true ui:redness default:0.0

on redness set val do delegate.red = val

)

rollout params "Super Color Balance Parameters"

(

spinner redness "Redness: " type:#integer range:[-100,100,0]

)

)

SCRIPT

plugin renderEffect Negative

name:"Negative"

classID:#(0xb7aa794c, 0xc3bd78ab)

(

parameters main rollout:params

(

Color type:#color default:blue ui:Color

)

rollout params "Negative Parameters"

(

colorpicker Color "Base color: " align:#center

)

on apply bmp do

(

for h=0 to (bmp.height-1) do

(

local sline = getPixels bmp [0,h] bmp.width

for i=1 to sline.count do sline[i] = Color - sline[i]

setPixels bmp [0,h] sline

)

)

)

See also

RenderEffect Progress Callback Mechanism

Updating Scripted Plug-ins

Scripted Plug-in Methods

Scripted Plug-in Clauses

Scripted Plug-ins

How To ... Create a MonoChrome RenderEffect


Scripted TrackViewUtility Plug-ins

Scripted TrackViewUtility plug-ins are declared by specifying the <superclass> as TrackViewUtility. They can be used to implement new Utilities to manipulate tracks and keys in TrackView. Their UI can be registered as child of the respective TrackView.

EXAMPLE:

plugin TrackViewUtility KeyValueUtility

 name:"Current Value Editor"

 category:"Scripted TV Utilities"

 classID:#(0x57088e0e, 0x50b6e750)

(

-- Body of Plug-in here...

)

Event Handlers:

The following Event Handlers can be implemented by a Scripted TrackViewUtility plug-in:

on trackSelectionChanged do

This hander will be called whenever the track selection has changed.

on nodeSelectionChanged do

This hander will be called whenever the node selection has changed.

on keySelectionChanged do

This hander will be called whenever the keys selection has changed.

on timeSelectionChanged do

This hander will be called whenever the time selection has changed.

on MajorModeChanged do

This hander will be called whenever the Track View mode has changed.

on TrackListChanged do

This hander will be called whenever the track list has changed.

on TrackViewClosed do

This hander will be called whenever the Track View has been closed. It can be used to do clean-up work before closing the plug-in.

on Init <value> do

This hander will be called whenever the TrackViewUtility plug-in has been initialized. It can be used to do initialization work before opening the plug-in. The value returned contains the parent Track View the TrackViewUtility plug-in has been called from. You can use the value to get the handle of the TrackView and register the dialog of the utility as child of the Track View.

EXAMPLE:

on Init val do

(

--Create a dialog from the Rollout, make it child of the Track View

 createDialog valueRollout parent:(val.ui.hwnd)

--Register the dialog as Dialog Bar, make it child of the Track View

 cui.registerDialogBar valueRollout parent:val.ui.hwnd

)

on filterAnim <anim>subAnim <anim>client <index>index do

This hander will be called for every object to be displayed in the TrackView. It has 3 arguments - the subAnim object to be displayed, its client (parent object) and the index inside the client.

The return value of this handler can be

#skip - the TrackView track should be filtered out and not displayed

#add - the TrackView track should be displayed

NOTE:

If the return value is neither #skip nor #add, a value of #add will be assumed and the track will be displayed.

See also

Updating Scripted Plug-ins

Scripted Plug-in Methods

Scripted Plug-in Clauses

Scripted Plug-ins


RenderEffect Progress Callback Mechanism

RenderEffects Progress Callback Mechanism

You can control the main Rendering Effect dialog progress bar resp. the Renderer progress bar using an on apply handler with progressCB, the progress callback interface object.

The following syntax lets you do this:

on apply <bitmap> progressCB: do <fn>

The first argument is the bitmap value to be modified by the effect, and progressCB is a progress callback interface object. This interface has several methods you can call during the course of processing the bitmap that control the progress bar and check for user cancellation.

Methods

progressCB.setTitle <string>

Sets the title on the progress bar.

progressCB.progress <done> <total>

Defines the progress of the rendering. Both arguments are integers; done indicates how much of the rendering has been completed, and total indicates the total amount of work to be done. For instance, in a main loop of a render effect going through all lines of a bitmap, done should be set to the current line number being processed, and total should be set to the number of lines in the bitmap (its vertical resolution).

When this is called, either the main Rendering Effect progress bar or the Renderer progress bar is updated to reflect this progress, depending on whether the effect is being updated by the Rendering Effect dialog or called by the renderer.

This function also returns a boolean, which if true indicates that the user has hit the Escape key to cancel the effect rendering.

progressCB.check()

Indicates whether the user has hit the escape key to cancel the effect rendering. This function returns a boolean; false if processing should continue, and true if the user has cancelled the rendering.

EXAMPLE:

on apply bm progressCB: do

(

...

progressCB.setTitle "My Effect Pass1"

...

oldEscapeEnable = escapeEnable -- get old state of escape processing

escapeEnable = false -- turn off MAXScript escape processing

total = bm.height -- define total as the height of the bitmap

for i in ...

(

<the effect rendering loop>

...

if progressCB.progress i total then exit --i lines done out of total

)--end i loop

...

escapeEnable = oldEscapeEnable --restore original state

...

)--end on apply

The progress bar update is done inside the main processing loop and the check for user cancel is done on the same call, causing the loop to exit prematurely in this example.

For a real-world practical example of the RenderEffect Progress Callback usage, please see the How To ... Create a MonoChrome RenderEffect tutorial.

See also

RenderEffect : MAXWrapper

Scripted RenderEffect Plug-ins

Render Effects Common Properties, Operators, and Methods


Scripted Atmospheric Plug-ins

Scripted Atmospheric plug-ins can only extend existing Atmospheric plug-ins. A scripted Atmospheric plug-in is declared by specifying the <superclass> as atmospheric.

SCRIPT

plugin atmospheric myFogEnv

name:"Super Fog Env"

classID:#(64433,27761)

extends:Fog version:1 replaceUI:true

(

parameters main rollout:params

(

fogcol type:#color animatable:true ui:col

on fogcol set val do delegate.fog_color = val

)

rollout params "Super Fog Parameters"

(

colorpicker col "Fog Color"

)

on create do delegate.fog_type = 1

)

NOTE:

The render() function can be called re-entrantly within a scripted atmospheric plug-in. (In releases prior 3ds Max 4, attempting to do this caused a runtime error saying that the renderer could not be called while a render was already under way.)

See also

Updating Scripted Plug-ins

Scripted Plug-in Methods

Scripted Plug-in Clauses

Scripted Plug-ins

Scripted Mouse Tools


Scripted Manipulators

Manipulators are a type of helper object designed to support direct manipulation of parameters in the 3D viewports. They can be set up to manipulate parameters on objects, modifiers, controllers and nodes.

There is a "Manipulate" button on the main toolbar. When pressed, the system will show all the manipulators for selected objects. As the mouse passes over a manipulator, it turns red, and a tool tip pops up with the name of the current value of the parameter that is affected by that manipulator. To manipulate the value, you click down on the gizmo with the left mouse button and drag it. Most manipulators are designed so that the gizmo will track under the current mouse position, if possible.

NOTE:

that "Manipulate" is not a separate mode. It modifies whatever mode you are currently in (select, move, create, etc.) to show manipulators and allow manipulation. If you are in move mode, for example, you can still move things around as usual. The only difference is that if you click down on a manipulator, you will manipulate, instead of move.

There are two flavors of manipulators. The first are manipulators that are automatically created when you enter "Manipulate" mode. The hotspot manipulator is like that. The second kind is standalone objects, like the slider manipulator. These are usually used in conjunction with parameter wiring to get make them useful.

To create a standalone manipulator, you go to the "Helpers" section of the create panel, and select "Manipulators" in the drop-down list.

Standalone manipulators do not need to be selected in order to be manipulated. However, the automatically created manipulators, like the hotspot manipulator, are only displayed for selected objects.

Manipulators support both 3d gizmos and 2d (screen space) gizmos. The hotspot manipulator is an example of a 3d gizmo, and the slider is an example of a 2d gizmo.

Scripted Manipulators

Manipulators can be created either as standard MAX plug-ins in C++, or they can be implemented in MAXScript. In MAXScript, they are a type of Scripted Plug-in object , so if you want to write your own manipulator, it would be a good idea to read about Scripted Plug-ins first. They are very similar to scripted geometry objects.

3 scripted manipulators that you can use as sample code can be found in the "..\stdplugs\stdscripts" folder.

  • RadiusManip.ms -- Generic "radius" manipulator

  • SliderManip.ms -- A 2d viewport slider. A standalone manipulator

  • UVWManip.ms -- A set of manipulators for the UVW modifier

Radius Manipulator

The radius manipulator is fairly simple, so it makes a good example to describe the scripted manipulator system.

The code for the manipulator is included below, followed by a detailed description of how it works.

EXAMPLE

--------------------------------------------------------------------

-- Generic radius manipulator

-- Written by Scott Morrison

-- This manipulator sets the radius on any object or modifier with

-- a parameter named "radius". It creates a circle gizmo of the appropriate

-- radius centered at the origin in the XY plane.

plugin simpleManipulator radiusManip

name:"RadiusManip"

invisible:true

(

-- Create the green and red colors for the gizmo

local g = [0, 1, 0], r = [1, 0, 0]

-- This manipulator manipulates any node with a "radius" property

on canManipulate target return (findItem (getPropNames target) #radius) != 0

-- Create the manipulator gizmo.

-- This is called initially and whenever the manipulator target changes

on updateGizmos do

(

-- Clear the current gizmo cache

this.clearGizmos()

-- Set the radius of circle gizmo a little bigger than the target radius

giz = manip.makeCircle [0,0,0] (target.radius * 1.01) 28

-- Add the circle to the manipulator

this.addGizmoShape giz 0 g r

-- return the ToolTip string

return node.name + " radius = " + target.radius as string

)

-- mouseMove is called on every mouse move when dragging the manip

-- It needs to convert the mouse position 'm' into a new value for the

radius

on mouseMove m which do

(

-- Create the XY plane.

-- manip.makePlaneFromNormal takes a normal vector and a point

-- and creates a plane passing through the point with the given normal

local pl = manip.makePlaneFromNormal z_axis [0, 0, 0],

projectedPoint = [0,0,0]

-- Compute the hit-ray in local coordinates

viewRay = this.getLocalViewRay m

-- Intersect the plane with the view ray

res = pl.intersect viewRay &projectedPoint

-- If the intersection worked, set the radius

if (res) then target.radius = (length projectedPoint) / 1.01

)

)

--------------------------------------------------------------------

The header:

plugin simpleManipulator radiusManip

name:"RadiusManip"

invisible:true

Indicates to MAXScript that this is a scripted manipulator plug-in called "RadiusManip". The "invisible:true" tells the system not to make a creation button for the manipulator in the create panel.

The body:

A set of handlers for various events.

on canManipulate target return (findItem (getPropNames target) #radius) != 0

"canManipulate" is called on every manipulator, for every node that is selected when the "Manipulate" button is pressed. The "target" parameter is the object that we might potentially manipulate. It is called on the base object, all the modifiers on the object, and transform controllers on the object's node. Also, if the transform controller is a PRS controller, it calls "canManipulate" on the position, rotation and scale controllers.

In the case of the radius manipulator, it can manipulate any object that has a property named "radius".

If you want to create a manipulator that works on a specific object type, say a sphere, you can say:

on canManipulate target return classOf target == sphere

There is an alternative handler that may be needed in some cases called "canManipulateNode n". This is called passing in the each selected node to the handler. This is not normally needed, but available if your manipulator wants to manipulate property of a node other than the ones that are passed as the "target" to "canManipulate".

NOTE:

While a Scripted Manipulator Plug-in could implement both handlers at the same time, the resulting behavior could confuse the user. It is a good idea to implement only the one handler that suits your needs.

The next handler is called "updateGizmos", and this is called whenever a manipulator need to build its gizmos. This happens when the manipulator is created, and whenever the target that it is manipulating changes.

When MAXScript creates a manipulator, it sets up some variables that are available inside the calls to its handlers. One of these is called "target" and it is the object, modifier or controller that is being manipulated. Another is called "this" and it is the manipulator itself. It also sets up some constant values that can be used as flags on gizmos. These will be described later. There is also a "node" value available which is the node that owns the target.

The first thing every manipulator must to in the "updateGizmos" handler is call "this.clearGizmos()". This clears any currently cached gizmos.

Next it creates a set of gizmos that will be displayed in the viewport. In the case of the radius manipulator, it creates a single circle that represents the radius being manipulated.

giz = manip.makeCircle [0,0,0] (target.radius * 1.01) 28

"manip" is a exported set of utility interface functions that manipulators can use. See the "Reference" section below for full details. In this case we are creating a circle, centered at the origin, with radius 1.01 times the radius we are manipulating, and 28 segments. The "1.01" factor was added so that the gizmo will stick out a little bit from the object it is manipulating. If we used the radius directly, then it might not be visible in the viewport, because it co-exists with the object it is manipulating.

Note that 3d gizmos are defined in the local coordinate system of the node that owns the manipulator target. The system will automatically compensate if the node is moved, rotated or scaled when displaying or hit-testing the manipulator.

Next, we add the gizmo to the manipulator:

this.addGizmoShape giz 0 g r

This tells the manipulator to add the shape gizmo to the manipulator, with no special flags values ie. the "0. All of the the flags will be decribed below. Additionally, the command indicates to use green ("g") as the unselected color and red ("r") as the selected color. The selected color is used when the mouse passes over it, and the unselected color is used when the mouse isn't over it.

Finally, this method returns a string value that will be used as the tool tip when the mouse passes over the gizmo.

In general, gizmos can be made from meshes, shapes (wire frame), text and markers. The details are covered in the reference section below.

The next handler is called "mouseMove m which". This is called on every mouse movement when the target is being manipulated. The "m" parameter holds the screen coordinates of the mouse location, and the "which" parameter is an index that indicates which gizmo is being dragged. The gizmos are numbered in the order of their creation in "updateGizmos", starting at 0.

The mouseMove handler is usually the trickiest part of the manipulator to implement. It needs to update the value of the parameter being manipulated in such a way that the manipulator gizmo tracks under themouse, if possible.

For manipulators that exist in 3d space, this is normally done by computing a "hit-ray", which is a ray in 3d space that passes through the mouse position, and travels in the direction of the view.

This is computed as follows:

viewRay = this.getLocalViewRay m

This view ray is then intersected with some plane, and the new parameter value is computed using the intersection point.

In the case of the radius manipulator, the plane we use is the XY plane, because the radius circle lies on the XY plane, in local coordinate space.

This plane is computed as follows:

local pl = manip.makePlaneFromNormal z_axis [0, 0, 0],

This create "pl" which is a plane whose normal is the Z axis, and which passes through the origin ([0,0,0]).

To intersect this with the view ray, we use the "intersect" operation on planes:

projectedPoint = [0,0,0]

res = pl.intersect viewRay &projectedPoint

We set up "projectedPoint" first at the holder of the result of the intersection. The return value "res" is a boolean value that tells us if the intersection worked or not. If it returns true, the intersection worked, if it returns false, it failed. It can fail if the plane is parallel to the view ray.

Once we have the intersection point, in "projectedPoint", then we use that to determine a new value for the radius. In this case we use the distance from the origin ("length projectedPoint") as the new radius. We scale it by dividing by 1.01 to compensate for the fact that we made the gizmo 1.01 time bigger than the actual radius being manipulated.

That's it! Generally, you will need to use some trigonometry and linear algebra in your "mouseMove" handler. The idea behind direct manipulation is that the gizmo should track directly under the mouse.

For a more complicated example of a 3d manipulator, check the code in UVWManip.ms.

Standalone Manipulators

Standalone manipulators, like the 2d slider, require a bit more work.

The code in SliderManip.ms will be used for this discussion.

The header has a bit more information:

plugin simpleManipulator sliderManipulator

name:"Slider"

classID:#(0x47db14ef, 0x4e9b5990)

category:"Manipulators"

Since standalone manipulators can be saved in the MAX file, it needs a class ID . See the MAXScript reference for more information about that. It also does not include the "invisible:true" line, which means that the system will create a button for it in the "Create" panel. It will be placed in the "Manipulators" section of the helper create panel.

We also need to define a parameter block and rollout UI for the object. This is done in the same way as other scripted plug-ins.

Standalone manipulators manipulate themselves, so the "canManipulate" handler looks like this:

on canManipulate target return (classOf target) == sliderManipulator

We also need to provide a creation tool that handles mouse interaction when creating the manipulator. This is handle exactly like other scripted plug-ins.

A standalone manipulator also needs some special code in its "updateGizmos" handler. For the slider this looks like:

-- If this is not a standalone manip, get values from the manip target

if (target != undefined) then

(

this.value = target.value

this.minVal = target.minVal

this.maxVal = target.maxVal

this.xPos = target.xPos

this.yPos = target.yPos

this.width = target.width

this.hide = target.hide

this.sldName = target.sldName

this.snapToggle = target.snapToggle

this.snapVal = target.snapVal

unselColor = greenColor

)

else

(

unselColor = yellowColor

)

The test of "target != undefined" is to see if this if this is a manipulator, or standalone object. When the object is standalone, the value of "target" is undefined, and it uses the value of the parameters from its own parameter block. It target is defined, then this means it is manipulating. In that case, we want to copy the values of the parameters from the target that we are manipulating.

Reference

Scripted manipulators can have the following handlers:

on canManipulate target

This returns a value that says whether this manipulator manipulate the given target.

on canManipulateNode n

This returns a value that says whether this manipulator manipulate the given node.

NOTE:

A manipulator should only implement one of these handlers.

on updateGizmos

This is called whenever the manipulator needs to build its gizmos. It returns a string value that is used for the tool tip. If it returns an empty string, no tool tip is displayed.

on mouseMove m which

This is called when the user has grabbed a gizmo and is dragging it.

The "m" parameter hold the current screen coordinates of the mouse, and the "which" parameter indicates the 0-based index of the gizmo that is being dragged. This is what handles that actual manipulation.

NOTE:

Normally this will set a value of a parameter of the manipulation target based on the mouse location.

on mouseDown m which

Called when the user first clicks the mouse down on the gizmo.

on mouseUp m which

Called when the user releases the mouse after manipulation is done.

Helper Functions

There are some built-in functions that manipulators support, and a couple of helper packages with utility functions.

The simpleManipulator type itself has these functions available:

this.clearGizmos()

This must be called at the beginning of the "updateGizmos" handler in order to clear the current gizmo cache.

this.addGizmoMesh mesh flags unselColor selColor

This creates a gizmo from a mesh (or geometry in MAX lingo). The mesh can be any arbitrary MAX mesh, and created with the tools in MAXScript for creating meshes. One convenient way to do this is to create an instance of a primitive and get the mesh from it.

The flags can be 0, or one or more of these value. If you want more than one flag to apply, then you add the values together.

Here are all the flags, and whether that can be used with addGizmoText, addGizmoMarker, addGizmoShape and addGizmoMesh:

gizmoDontDisplay

Tells the system to not display the gizmo. It will be hit-tested, but not displayed, applies to all.

gizmoDontHitTest

Tells the system to not hit-test the gizmo. It will be displayed, but not hit-tested, applies to all.

gizmoActiveViewportOnly

Tells the system to only display and hit-test this gizmo in the active viewport, applies to all.

this.addGizmoShape gizmoShape flags unselColor selColor

This creates a gizmo from a shape object. The gizmoShape can be created using functions from the "manip" package, described below.

The flags can take on the same value as for "addGizmoMesh", with two new values supported:

gizmoUseScreenSpace

This tells the system to interpret the coordinates of the shape as device coordinates in the viewport, not as 3d values. The values are still specified as 3d points, but the "Z" coordinate is ignored, applies to all but addGizmoMesh.

gizmoUseRelativeScreenSpace

This is like gizmoUseScreenSpace, but the coordinates are specified as values from 0.0 to 1.0, and interpreted in each viewport as a percentage of the width or height of the viewport, applies to all but addGizmoMesh.

addGizmoMarker markerType position flags unselColor selColor

The creates a gizmo using a marker. The value of the "markerType" parameter can be:

#point

#hollowBox

#plusSign

#asterisk

#xMarker

#bigBox

#circle

#triangle

#diamond

#smallHollowBox

#smallCircle

#smallTriangle

#smallDiamond

#dot

#smallDot

The position is a point in 3d space, or 2d screen space. The flags are the same ones supported by addGizmoShape.

addGizmoText text position flags unselColor selColor

This creates a gizmo that is text on the screen. Note that text cannot be hit-tested or grabbed by the mouse. It is used for display purposes only.

getLocalViewRay m

This function takes a mouse position and returns the ray that passes through that mouse position in the direction of the view. It is returned in the local coordinates of the node that owns the manipulator target.

The "manip" package

"manip" is a value in MAXScript that contains a set of useful interface functions for manipulators. The functions it exports are:

manip.makeSphere position radius segments

This returns a mesh sphere with the given position, radius, and segments.

manip.makeTorus position radius1 radius2 segments sides

Create a torus mesh with the given values.

manip.makeBox position length width height lengthSegs widthSegs heightSegs

Creates a box mesh with the given parameters.

manip.makePlaneFromNormal normal point

Creates a Plane object with the given normal that passes through the given point.

manip.makeCircle center radius segments

Creates a circle shape in the XY plane with the given parameters.

manip.makeGizmoShape()

Creates an empty gizmo shape. See the details of "GizmoShape" below for how to use this.

Plane objects

The plane objects returned from "manip.makePlaneFromNormal" have the following functions available:

intersectionPoint = [0,0,0]

plane.intersect ray &intersectionPoint

This intersects the given ray with the plane. It returns true, if it succeeds, and false if it doesn't If it works, then the intersection point is set in the "intersectionPoint" value, which must be initialized to a Point3 value in advance.

plane.mostOrthogonal ray otherPlane

This returns the plane that is most orthogonal to the given ray. This means the plane that is most "square" to the view direction.

Sometimes a manipulator might choose between two different planes on which to project a ray. It is usually best to project it to the plane which faces the view ray most directly, and this function determines that. See "UVWManip.ms" for an example of how to use this.

plane.getNormal()

Returns the normal of a plane.

plane.getPoint()

Return the point that the plane passes through.

plane.getPlaneConstant()

Return the value of the plane constant. This is the value of "D" in the equation that defines the plane:

Ax + By +Cz + D = 0

GizmoShape objects

A GizmoShape is a shape object that you can use to construct wire-frame gizmos. You can get an empty GizmoShape as follows:

local giz = manip.makeGizmoShape()

The functions available are:

giz.addPoint point

This adds a new point to the shape. The points are connected by line segments in order to create the wireframe. If you want a closed shape, you have to add the first point again as the last point.

giz.startNewLine()

This begins a new line segment in the shape.

giz.transform matrix

This transforms the gizmo by the given Matrix3 transform.

NOTE:

See UVWManip.ms for an example of creating 3D gizmos with GizmoShape.

See also

Interface: manip

Interface: simpleManip

Interface: manipPlane

Interface: gizmoShape

ConeAngle : helper

Plane_Angle : helper

Scripted Plug-ins

SliderManipulator : helper


ActiveX Controls in MAXScript Rollouts

Starting with 3ds Max 4, MAXScript lets the user embed ActiveX Controls in rollouts, thus expanding the number of available User Interface control types.

Examples include:

Simple controls

ActiveMovieControl Object,

Calendar Control,

Microsoft TreeView

Compound controls

Microsoft Excel,

Microsoft Internet Explorer

Adobe Acrobat

This provides numerous possibilities in MAXScript which include:

  • Embed a web browser into a rollout and then navigate the user to a web site.

  • Embed an Excel spreadsheet into a rollout, extract the user entered values from cells and then create animation in Max.

  • Create an ActiveMovie player through MAXScript, load an Avi file and then synchronize the animation between the rendered Avi in ActiveMovie player to animation in Max.

The technology behind this feature is a MAXScript extension plug-in (MxsActiveX.dlx) making it MAXScript capable. It does not use ParamBlock2. The plug-in adds a new type of rollout control.

The syntax is:

activeXControl <name> [ <control_type> ] [ setupEvents:<boolean> ] [releaseOnClose:<boolean> ] [ prop1:<value> ] [ prop2:<value> ] …

Parameters:

<control_type>

A string to create the control.

The string must be formatted in one of the following ways:

  • A Program ID such as "MSCAL.Calendar.7"

  • A Class ID such as "{8E27C92B-1264-101C-8A2F-040224009C02}"

  • A URL such as "http://www.microsoft.com"

  • A reference to an Active document such as "file://\\Documents\MyDoc.doc"

  • A fragment of HTML such as "MSHTML:<HTML><BODY>This is a line of text</BODY></HTML>"

    • NOTE:

    "MSHTML:" must precede the HTML fragment so that it is designated as being a MSHTML stream.

    prop1:<value>

    prop2:<value>

    These are control specific keyword arguments. You can get a list of properties and their types by calling showProperties on the control.

    setupEvents:<boolean>

    When set to true (default), event support for activeX controls will be enabled. When set to false, none of the event handlers will be called. This is useful when a control fires too many events but you are not interested in any.

    releaseOnClose:<boolean>

    Every activeX control creates two hidden controls. Passing true here (default) will free them up and also any resources taken up by the control, and the activex properties cannot be accessed after the rollout has been closed. This is the case for window'ed controls like listview, treeview etc.

    If you need to access the properties of the control after you close the rollout, then you need to pass false. This is helpful for windowless control like XML parser, FTP controls etc. See xmlio.ms for an example.

    EXAMPLE

    activeXControl ax "{05589FA1-C356-11CE-BF01-00AA0055595A}" \ height:200 width:300 align:#left

    ActiveX Controls Topics:

    ActiveX Control Properties

    Active X Controls Methods

    Active X Inspector Functions

    Accessing ActiveX Controls Indexed Properties

    ActiveX Controls Cursor Access

    ActiveX Array Properties

    ActiveX - Disable 3ds Max keyboard accelerators

    ActiveX COM Enums Represented as MAXScript Names

    ActiveX by-reference arguments for methods and events

    loadPicture for ActiveX Controls

    updateWindow for ActiveX Controls

    Typical ActiveX Controls And Examples

    ListView ActiveX Control

    ListView ActiveX Helper Functions

    ListView ActiveX Control Example

    How To ... Develop a Selected Objects Inspector using ListView ActiveX Control - Part One

    How To ... Develop a Selected Objects Inspector using ListView ActiveX Control - Part Two

    TreeView ActiveX Control

    How To ... Develop a Scene Browser using TreeView ActiveX Control - Part One

    How To ... Develop a Scene Browser using TreeView ActiveX Control - Part Two

    ImageList ActiveX Control

    TabStrip ActiveX Control

    Windows Media Player ActiveX Control

    Windows Media Player ActiveX Control Example

    Adobe Acrobat ActiveX Control

    Internet Explorer ActiveX Control

    Excel Spreadsheet in Internet Browser Control as Extended Viewport

    Shockwave Flash ActiveX Object Events

    See als

    i-drop - drag and drop

    Visual MAXScript

    MAXScript Dialogs and Rollout Floaters as Extended viewports


ActiveX Control Properties

ActiveX Controls Properties

There are two common properties for ActiveX controls, .pos and .size.

Other ActiveX properties are control specific and vary from one control to another.

For a list of all available properties except the two common properties listed above, you can use the ActiveX Control Inspector Function

showProperties <axControl>

Properties can be set as usual in MAXScript,

ax.checkboxes = true

where ax is the control name and .checkboxes is a boolean property.

Additionally, there is support for color properties. The internal representation of colors for ActiveX controls is COLORREF(unsigned integer) so you will always get integers when reading them, but you can set them as follows:

ax.forecolor = red -- if a .forecolor property exists

NOTE:

Colors in Microsoft Windows are represented as BGR instead of RGB values. Thus the above example will result in the foreground color to be BLUE and not RED. To specify the correct color, you can use a MAXScript color value and turn the order of the blue and red channels manually, or define a function to do so automatically,

EXAMPLE

fn activeXColor theColor = (color theColor.b theColor.g theColor.r)

ax.forecolor = activeXColor red

See also

Active X Inspector Functions

ActiveX Controls in MAXScript Rollouts


ActiveX Controls Methods

All methods of ActiveX controls are control-specific and vary from one control to another.

For a list of all available methods, you can use the ActiveX Control Inspector Function

showMethods <axControl>

Methods can be called like:

ax.AboutBox()

ax.loadURL "http://www.discreet.com"

See also

Active X Inspector Functions

ActiveX Controls in MAXScript Rollouts


ActiveX Controls Events

Events are notifications sent by the ActiveX controls to the rollout, whenever an action is performed on the control, e.g.: clicking a button, browsing to a webpage. If supporting event handler is implemented for the event, in the rollout context, the handler is called with supporting arguments.

For a list of all available events, you can use the ActiveX Control Inspector Function

showEvents <axControl>

See also

Active X Inspector Functions

ActiveX Controls in MAXScript Rollouts


ActiveX Inspector Functions

The following Inspector Functions can be used to acquire lists of available ActiveX Controls and their methods, events, and properties:

showAllActiveXControls [ to:<stream> ]

Prints a list of ActiveX controls with their progID and classID, registered on your system.

showMethods <axControl> [ to:<stream> ] [showHidden:<false>]

Prints a list of methods and their arguments that can be invoked on the control

showEvents <axControl> [ to:<stream> ]

Prints a list of events and their arguments that are sent by the control

showProperties <axControl> [ to:<stream> ] [showHidden:<false>]

Prints a list of the properties and their types, supported by the control. Some properties are marked read-only

getPropNames <axControl> [showHidden:<false>]

Returns an array of the properties supported by the control

where

to:<stream>

is the output stringstream.

showHidden:<boolean>

controls whether hidden properties/methods should be included in the enumeration. The default value is false.

EXAMPLE

rollout test "Test"

(

activeXControl lv "MSComctlLib.ListViewCtrl"

on test open do

(

format "PROPERTIES:\n"

showProperties lv

format "METHODS:\n"

showMethods lv

format "EVENTS:\n"

showEvents lv

)

)

createDialog test

OUTPUT

Rollout:test

PROPERTIES:

.Arrange : ListArrangeConstants( #lvwNone | #lvwAutoLeft | #lvwAutoTop )

.ColumnHeaders : IColumnHeaders

.DropHighlight : IListItem

.DropHighlight : undefined, read-only

.HideColumnHeaders : boolean

.HideSelection : boolean

.Icons : IVBDataObject

.Icons : undefined, read-only

.ListItems : IListItems

.LabelEdit : ListLabelEditConstants( #lvwAutomatic | #lvwManual )

.LabelWrap : boolean

.MouseIcon : IPictureDisp

.MousePointer : MousePointerConstants( #ccDefault | #ccArrow | #ccCross | #ccIBeam | #ccIcon | #ccSize | #ccSizeNESW | #ccSizeNS | #ccSizeNWSE | #ccSizeEW | #ccUpArrow | #ccHourglass | #ccNoDrop | #ccArrowHourglass | #ccArrowQuestion | #ccSizeAll | #ccCustom )

.MultiSelect : boolean

.SelectedItem : IListItem

.SelectedItem : undefined, read-only

.SmallIcons : IVBDataObject

.SmallIcons : undefined, read-only

.Sorted : boolean

.SortKey : integer

.SortOrder : ListSortOrderConstants( #lvwAscending | #lvwDescending )

.View : ListViewConstants( #lvwIcon | #lvwSmallIcon | #lvwList | #lvwReport )

.OLEDragMode : OLEDragConstants( #ccOLEDragManual | #ccOLEDragAutomatic )

.OLEDropMode : OLEDropConstants( #ccOLEDropNone | #ccOLEDropManual )

.Appearance : AppearanceConstants( #ccFlat | #cc3D )

.BackColor : OLE_COLOR

.BorderStyle : BorderStyleConstants( #ccNone | #ccFixedSingle )

.Enabled : boolean

.Font : IFontDisp

.ForeColor : OLE_COLOR

.hWnd : OLE_HANDLE

.AllowColumnReorder : boolean

.Checkboxes : boolean

.FlatScrollBar : boolean

.FullRowSelect : boolean

.GridLines : boolean

.HotTracking : boolean

.HoverSelection : boolean

.Picture : IPictureDisp

.PictureAlignment : ListPictureAlignmentConstants( #lvwTopLeft | #lvwTopRight | #lvwBottomLeft | #lvwBottomRight | #lvwCenter | #lvwTile )

.ColumnHeaderIcons : IVBDataObject

.ColumnHeaderIcons : undefined, read-only

.TextBackground : ListTextBackgroundConstants( #lvwTransparent | #lvwOpaque )

METHODS:

.FindItem sz:string Where:undefined Index:undefined fPartial:undefined

.GetFirstVisible()

.HitTest x:float y:float

.StartLabelEdit()

.OLEDrag()

.Refresh()

EVENTS:

on <control_name> BeforeLabelEdit Cancel:integer do ( ... )

on <control_name> AfterLabelEdit Cancel:integer NewString:string do ( ... )

on <control_name> ColumnClick ColumnHeader:ColumnHeader do ( ... )

on <control_name> ItemClick Item:ListItem do ( ... )

on <control_name> KeyDown KeyCode:integer Shift:integer do ( ... )

on <control_name> KeyUp KeyCode:integer Shift:integer do ( ... )

on <control_name> KeyPress KeyAscii:integer do ( ... )

on <control_name> MouseDown Button:integer Shift:integer x:OLE_XPOS_PIXELS y:OLE_YPOS_PIXELS do ( ... )

on <control_name> MouseMove Button:integer Shift:integer x:OLE_XPOS_PIXELS y:OLE_YPOS_PIXELS do ( ... )

on <control_name> MouseUp Button:integer Shift:integer x:OLE_XPOS_PIXELS y:OLE_YPOS_PIXELS do ( ... )

on <control_name> Click do ( ... )

on <control_name> DblClick do ( ... )

on <control_name> OLEStartDrag &Data:DataObject &AllowedEffects:integer do ( ... )

on <control_name> OLEGiveFeedback &Effect:integer &DefaultCursors:boolean do ( ... )

on <control_name> OLESetData &Data:DataObject &DataFormat:integer do ( ... )

on <control_name> OLECompleteDrag &Effect:integer do ( ... )

on <control_name> OLEDragOver &Data:DataObject &Effect:integer &Button:integer &Shift:integer &x:float &y:float &State:integer do ( ... )

on <control_name> OLEDragDrop &Data:DataObject &Effect:integer &Button:integer &Shift:integer &x:float &y:float do ( ... )

on <control_name> ItemCheck Item:ListItem do ( ... )

true

OK

Type Conversion

All supported COM datatypes are converted to an appropriate MAXScript wrapper when passed to and from a COM object. Here are the supported types and their mapping:

undefined - VT_EMPTY

boolean - VT_BOOL

integer   - VT_UI1

integer   - VT_UI2

integer   - VT_UI4

integer   - VT_UI8

integer   - VT_I1

integer   - VT_I2

integer   - VT_I4

integer   - VT_I8

float  - VT_R4

float   - VT_R8

string   - VT_BSTR

float   - VT_CY

date   - VT_DATE

error   - VT_ERROR

color   - VT_COLOR

MSDispatch - VT_DISPATCH

font - VT_FONT

undefined - VT_UNKNOWN

ComArray - VT_SAFEARRAY

ComArray - VT_CARRAY

ComArray - VT_ARRAY

Valid string handling for property sets and method call arguments, you can safely do

EXAMPLE

ax.Navigate "http://www.autodesk.com"

where: ax is the Microsoft Web Browser Control

NOTE:

Restricted functions like QueryInterface, AddRef, Release are displayed by showMethods() function.

See also

ActiveX Controls in MAXScript Rollouts


ActiveX Description Property

The .description property of any activeX control returns a description string of the format

<TypeLib name> (TypeLib info) ? <Help file name if any> - <help context id>

FOR EXAMPLE

.description on a listview control on a specific system returns:

"MSComctlLib (Microsoft Windows Common Controls 6.0 (SP4))?C:\WINNT\HELP\cmctl198.chm-210000"

See also

ActiveX Controls in MAXScript Rollouts


Accessing ActiveX Controls Indexed Properties

The following functions can be used to get and set indexed properties of ActiveX Controls that require an integer index:

getIndexedProperty <activeXControl : MSDispatch> <propName> <index>

setIndexedProperty <activeXControl : MSDispatch> <propname> <index> <value>

.

EXAMPLE

getIndexedProperty s.ActiveSheet.Panes #item 1

setIndexedProperty s.ActiveSheet.Panes #item 1 "Subitem1"

See also

ActiveX Controls in MAXScript Rollouts


Point2 Values as "Twips" in ActiveX Controls

Some ActiveX Controls' properties and methods expect and return screen coordinate values as "twips", or "twentieths of a point".

A "twip" is a device-independent unit used in the past by Microsoft, for example in Visual Basic.

A "twip" equals to 1/1440th of an inch. Since most screens are assumed to be 72dpi, 1 pixel is 14.4, or approx. 15 twips.

This means that the screen coordinates in pixels have to be converted by multiplying by 15 before passing to methods that expect twips.

See also

ListView ActiveX Helper Functions

ActiveX Controls in MAXScript Rollouts


ActiveX Controls Cursor Access

The following functions can be used to get the mouse cursor position in ActiveX controls:

getCursorPos <ActiveXControl>

Returns a Point2 value in pixels giving the current mouse cursor position in the ActiveX control’s window coordinate space.

mapPoint <ActiveXControl> <Point2>

Returns a Point2 value in pixels where the input Point2 coordinate value is mapped from the ActiveX control’s window coordinate space to the control's dialog coordinate space.

See also

ActiveX Controls in MAXScript Rollouts


ActiveX Array Properties

To see whether an ActiveX property is an array, you can check for a hidden "_newEnum" property.

FOR EXAMPLE

local an_array

try

(

getProperty rListView.ax.listItems #_newEnum; an_array = true

)

catch

(

an_array = false

)

Properties which return arrays can be iterated

For example, .listItems in the ListView control, returns IListItems. This can be looped through and also indexed.

for li in ax.listItems do li.bold = true

or

ax.listItems[1].text = "foo"

See also

ActiveX Controls in MAXScript Rollouts


Sending Windows Message

Windows Messages are used by the Microsoft Windows notification system. By sending Windows Messages, the MAXScript developer can participate in the Windows notification system and access features not directly available in MAXScript.

Windows.sendMessage <int HWND> <int message> <int messageParameter1> <int messageParameter2>

Calls the Window’s SendMessage function passing the argument values.

For an example, see How To ... Develop a Selected Objects Inspector using ListView ActiveX Control - Part Two

See also

ActiveX Controls in MAXScript Rollouts

Interaction With The Operating System


ActiveX - Disable 3ds Max keyboard accelerators

For most of the ActiveX controls there is no automatic way of determining if it supports keyboard input to disable the 3ds Max keyboard accelerators.

A MAXScript system global called "enableAccelerators" can be set to false whenever an ActiveX control gets focus so that the user can type in the controls.

Here is a sample that can be handy to enable/disable keyboard accelarators:

EXAMPLE

rollout rAccelState "State"

(

checkButton accelState "Test"

on rAccelState open do

(

accelState.text = if (enableAccelerators) then "Enabled" else "Disabled"

accelState.checked = enableAccelerators

)

on accelState changed state do

(

enableAccelerators = state

accelState.text = if (enableAccelerators) then "Enabled" else "Disabled"

)

)

nf = newRolloutFloater "" 100 100

addRollout rAccelState nf

NOTE:

There is no real way of determing when an activeX control got focus and when it lost it and automatically disable/enable Max's accelarators. It's upto the script writer's discretion to find a clever way to disable them. There is a "on StatusTextChange ..." event handler to disable the accelerators, but it is not fail-proof.

on ax StatusTextChange txt do enableAccelerators = false

See also

ActiveX Controls in MAXScript Rollouts


ActiveX COM Enums Represented as MAXScript Names

Preforming a showProperties on Microsoft ActiveX controls, like ListView, one of the properties returned is:

.MousePointer : MousePointerConstants( #ccDefault | #ccArrow | #ccCross | #ccIBeam | #ccIcon | #ccSize | #ccSizeNESW | #ccSizeNS | #ccSizeNWSE | #ccSizeEW | #ccUpArrow | #ccHourglass | #ccNoDrop | #ccArrowHourglass | #ccArrowQuestion | #ccSizeAll | #ccCustom )

You can set this property like this:

ax.MousePointer = #ccArrow

See also

ActiveX Controls in MAXScript Rollouts


ActiveX By-reference Arguments for Methods and Events

ActiveX supports by-reference arguments for methods and events since 3ds Max 5.1.

EXAMPLE

rollout winsockTester "Winsock Tester" (

activeXControl axWinsock "{248DD896-BB45-11CF-9ABC-0080C7E7B78D}" align:#left

edittext txt text:"mail.iwaynet.net" offset:[-12, 0] fieldwidth:90

edittext txt2 "Port:" text:"110" offset:[8, -2]

button btn "Connect" width:90 height:16 offset:[0, 2]

button btn2 "Disconnect" width:90 height:16 offset:[0, -2] enabled:false

-- some data has arrived..

on axWinsock DataArrival bytes do

(

format "% bytes received.\n" bytes

local wsckData = "" -- initialize to a string

p = axWinsock.getdata &wsckdata -- by-reference argument

format "Data: %\n" wsckData

)

-- connected to remote host

on axWinsock Connect do

(

format "Connected.\n"

btn2.enabled = true

btn.enabled = false

)

-- connect!

on btn pressed do

(

axWinsock.connect txt.text txt2.text

format "Connecting ...\n"

)

-- disconnect

on btn2 pressed do

(

axWinsock.close()

format "Connection closed.\n"

btn2.enabled = false

btn.enabled = true

)

)

createdialog winsockTester 100 115

By-reference arguments are preceded with a '&' in showMethods and showEvents.

FOR EXAMPLE

showmethods winsockTester.axWinsock

.Connect RemoteHost:undefined RemotePort:undefined

.Listen()

.Accept requestID:integer

.SendData data:undefined

.GetData &data:undefined type:undefined maxLen:undefined

.PeekData &data:undefined type:undefined maxLen:undefined

.Close()

.Bind LocalPort:undefined LocalIP:undefined

Since the value type for the the 'data' argument for GetData and PeekData is 'unknown', we have to pass a value type that the ActiveX control knows how to handle. In this case, the methods want a buffer where they can store data, and they know how to deal with a string value. That is why we initialized variable wsckData to a null string.

See also

ActiveX Controls in MAXScript Rollouts


loadPicture

loadPicture for ActiveX Controls

The loadPicture method provides a return value to be used as icon in ActiveX Controls.

loadPicture <filename_string>

Return value is a IPictureDisp, an MSDispatch object. File type must be a .bmp, .wmf, or .ico format. Anywhere an activeX control accepts IPictureDisp, you can pass the return value from this function. See the new Named Selection Set dialog and the How To ... Develop a Scene Browser using TreeView ActiveX Control - Part Two tutorial for example usages.

NOTE:

Does not accept symbolic paths.

See also

ActiveX Controls in MAXScript Rollouts


updateWindow

updateWindow for ActiveX Controls

Provides a way to refresh ActiveX Controls.

UpdateWindow

You can call this method on an ActiveX control to force a refresh.

See also

ActiveX Controls in MAXScript Rollouts


ListView ActiveX Control

"Microsoft ListView Control 6.0 (SP4)"
"MSComctlLib.ListViewCtrl.2"
"{BDD1F04B-858B-11D1-B16A-00C0F0283628}"

Description:

The ListView ActiveX Control is one of the most often user ActiveX Controls in MAXScript rollouts. It is very flexible and customizable and is thus discussed in detail in this chapter. It can be used to create lists and spreadsheet-like user interface controls.

Constructor:

activeXControl lv "MSComctlLib.ListViewCtrl"

Properties:

ListItems

.ListItems : IListItems

This property provides access to the ListItems. ListItems represent the rows in the Listview and have the following properties and methods:

.ListItems Properties:

.ListItems.Count : integer

Get/Set the number of ListItems in the ListView control.

.ListItems[IndexList] : IListItem, read-only

Returns the Indexed ListItem. The index is 1-based.

.ListItems Methods:

.ListItems.Add Index:undefined Key:undefined Text:undefined Icon:undefined SmallIcon:undefined

Adds a new ListItem to the ListView control.

.ListItems.Clear()

Clears the ListItems.
All ListItems will be removed from the ListView.

.ListItems.Remove Index:undefined

Removes the indexed ListItem. The index is 1-based.

ColumnHeaders

.ColumnHeaders : IColumnHeaders

This property provides access to the column headers of the ListView.

.ColumnHeaders Properties:

.Count : integer

Get/Set the number of Column Headers in the ListView control.

.Item[Index:undefined] : IColumnHeader, read-only

Get the indexed Column Header from the ListView control.
The index is 1-based!

See ColumnHeader Properties and Methods for a list of properties of single Column Headers.

.ColumnHeaders Methods:

.Clear()

Clears the ColumnHeaders.
All Column Headers will be removed from the ListView.

.Remove Index:undefined

Removes the indexed Column Header.
The index is 1-based.

._NewEnum()

Not accessible through MAXScript, return type is not supported.

.Add Index:undefined Key:undefined Text:undefined Width:undefined Alignment:undefined Icon:undefined

Adds a new Column to the ListView control.

.HideColumnHeaders : Boolean

This property lets you enable and disable the column headers. When set to true, the column headers will be hidden. When set to false, the column headers will be displayed. Note that column headers are only available when the .View property is set to #lvwReport.

.AllowColumnReorder : Boolean

When set to true, the user can drag the columns to define their order. When set to false (default), the columns order is locked and cannot be changed interactively.

ListView Layout:

.View : ListViewConstants( #lvwIcon | #lvwSmallIcon | #lvwList | #lvwReport )

Get/Set the view type of the ListView control.

.Appearance : AppearanceConstants( #ccFlat | #cc3D )

Get/Set the appearance of the ListView control. #cc3D is default.

.BorderStyle : BorderStyleConstants( #ccNone | #ccFixedSingle )

Controls the border style when .Appearance is set to #ccFlat. When set to #ccFixedSingle, a single pixel border will be drawn around the ListView.

.Arrange : ListArrangeConstants( #lvwNone | #lvwAutoLeft | #lvwAutoTop )

Controls the arrangement of the ListView control. Default is #lvwNone.

.DropHighlight : IListItem

If a ListItem is assigned to this property, the ListItem will be displayed as highlighted (appearing to be selected, but without having the selected state flag set). The highlight will not be affected by the selection highlight, leaving the specified ListItem highlighted until the DropHighlight is set to undefined again.

In the screenshot below, the ListItem representing Teapot01 was assigned to DropHighlight, while the ListItem representing Box01 was selected with the mouse.

.LabelEdit : ListLabelEditConstants( #lvwAutomatic | #lvwManual )

Controls the editing of the label (this is the text in the first column of a ListItem). Default is #lvwAutomatic.

When set to #lvwAutomatic, the user can click to select the item, then click again at the label location to open the text field to type in custom text.

When set to #lvwManual, the label editing can only be initiated by the developer by using the .StartLabelEdit() method.

WARNING:

The 3ds Max keyboard shortcuts (accelerators) have to be disabled to be able to type in the label text field! See ActiveX - Disable 3ds Max keyboard accelerators for details!

.LabelWrap : Boolean

Controls the label wrapping.

.Checkboxes : Boolean

When set to true, checkboxes will be displayed in the first column for each ListItem. When set to false (default), only the ListItem label will be displayed.

.Enabled : Boolean

When set to true (default), the ListItems can be selected, labels can be edited, checkboxes can be checked, column widths can be adjusted etc. When set to false, the ListItems will be "frozen" and cannot be changed in any way.

.ForeColor : OLE_COLOR

Controls the foreground (text) color used to draw the ListView.

.BackColor : OLE_COLOR

Controls the background color used to draw the ListView.

NOTE:

OLE_COLOR values used by ActiveX Controls are BGR and not RGB!

The following screenshots show the default white background (.BackColor property not set), .BackColor = color 225 215 210, .BackColor = color 215 225 210 and .BackColor = color 210 215 225

.GridLines : Boolean

When set to false (default), no grid lines will be drawn. When set to true, lines will be drawn to delimit the rows and columns:

.FlatScrollBar : Boolean

When set to false (default), the scrollbar will be displayed. When set to true, no scrollbar will be drawn. You can still scroll down by moving the selection using the arrow keys, but cannot scroll horizontally.

.Picture : IPictureDisp

Lets you assign a picture to the background. See loadPicture for details on passing pictures as IPuctureDisp values to ActiveX controls.

In the example below, a yellow-red gradient with the size 500x200 pixels was created in Photoshop, saved as 24 bit BMP to disk and passed to the .Picture property using the line

lv.picture = loadPicture "c:/3dsmax6/images/activex_gradient.bmp"

.PictureAlignment : ListPictureAlignmentConstants( #lvwTopLeft | #lvwTopRight | #lvwBottomLeft | #lvwBottomRight | #lvwCenter | #lvwTile )

Controls the alignment of the picture assigned to the .Picture property.

.TextBackground : ListTextBackgroundConstants( #lvwTransparent | #lvwOpaque )

Controls the appearance of the text background. When set to #lvwOpaque, the above example will appear as

.Font : IFontDisp

Returns an MSDisplatch value controlling the font used. Cannot be set by MAXScript.

Selection

.SelectedItem : IListItem, read-only, default:undefined

Returns the selected item.

.FullRowSelect : boolean

When set to true, selecting an item or sub-item will select the complete row. When set to false, only the ListItem (first column) will be selected.

.MultiSelect : Boolean

When set to true, the user can select multiple ListItems simultaneously. When set to false (default), only one ListItem at a time can be selected.

.HideSelection : Boolean

When set to true, the selection will not be displayed.When set to false, the selection will be displayed.

.HotTracking : Boolean

When set to true, the ListItems will be highlighted as the mouse moves over them. When set to false (default), there will be no effect when the mouse is moving over ListItems.

.HoverSelection : Boolean

When set to true, the ListItems will be selected automatically when the mouse hovers over them. When set to false (default), ListItems will only be selected if the user clicks with the mouse.

Mouse Access

.MouseIcon : IPictureDisp

Returns the mouse icon as IPictureDisp value. Cannot be set by MAXScript.

.MousePointer : MousePointerConstants( #ccDefault | #ccArrow | #ccCross | #ccIBeam | #ccIcon | #ccSize | #ccSizeNESW | #ccSizeNS | #ccSizeNWSE | #ccSizeEW | #ccUpArrow | #ccHourglass | #ccNoDrop | #ccArrowHourglass | #ccArrowQuestion | #ccSizeAll | #ccCustom )

Get/Set the mouse pointer type when over the ListView Control. The script developer could use the mouse events described further on this page to change the mouse pointer depending on the underlying content or the allowed actions...

Sorting

.Sorted : Boolean

When set to false (default), the ListItems will be displayed in the order they have been added to the ListView.ListItems array.

When set to true, the ListItems will be sorted alphabetically. By default, the sorting will be ascending based on the text in the first column

.SortOrder : ListSortOrderConstants( #lvwAscending | #lvwDescending )

When .Sort is set to true, this property controls the direction of sorting.

The following screenshots show the same objects displayed Unsorted, Sorted in Ascending and Descending order:

.SortKey : integer

Cannot be set by MAXScript.

Icons

The following properties lets you assign an ImageList ActiveX Control to provide images to be used as icons by the ListView Control.

Note that icons are only visible when the .View property is set to #lvwIcon resp. #lvwSmallIcon

.Icons : IVBDataObject

The property lets you assign icons to the ListView Control. The IVBDataObject containing the images to be used as icons is provided by an ImageList ActiveX Control .

.SmallIcons : IVBDataObject, read-only, default:undefined

The property lets you assign small icons to the ListView Control. The IVBDataObject containing the images to be used as icons is provided by an ImageList ActiveX Control .

.ColumnHeaderIcons : IVBDataObject, read-only, default:undefined

The property lets you assign icons to the column headers of the ListView Control. The IVBDataObject containing the images to be used as icons is provided by an ImageList ActiveX Control .

Drag and Drop

.OLEDragMode : OLEDragConstants( #ccOLEDragManual | #ccOLEDragAutomatic )

Controls the OLE Drag mode.

.OLEDropMode : OLEDropConstants( #ccOLEDropNone | #ccOLEDropManual )

Controls the OLE Drop mode.

OLE Windows Messaging

.hWnd : OLE_HANDLE

This is the ActiveX handle needed to send Windows Messages to the ActiveX Control. See Sending Windows Message for details.

Methods:

.FindItem sz:string Where:undefined Index:undefined fPartial:undefined

.GetFirstVisible()

.HitTest x:float y:float

.StartLabelEdit()

.OLEDrag()

.Refresh()

Events:

on <control_name> BeforeLabelEdit Cancel:integer do ( ... )

Called before the Label Editing starts.

on <control_name> AfterLabelEdit Cancel:integer NewString:string do ( ... )

Called after the Label Editing ends.

on <control_name> ColumnClick ColumnHeader:ColumnHeader do ( ... )

Called when the user clicked a Column Header. The ColumnHeader argument will contain the ColumnHeader that has been clicked. The ColumnHeader has its own properties including index, aliagnment controls etc. See ColumnHeader Properties and Methods for details.

on <control_name> ItemClick Item:ListItem do ( ... )

Called when the user clicked a ListItem. The Item argument will contain the 0-based index of the row that has been clicked.

Keyboard and Mouse Click Events

on <control_name> KeyDown KeyCode:integer Shift:integer do ( ... )

Called when the user pressed a key. The KeyCode argument will contain the integer code of the key that has been pressed, the Shift argument will contain an integer whose bits represent the pressed state of the Shift, Control and Alt keys - bit 1 represents Shift, bit 2 represents Control, bit 3 represents Alt.

0 - No modifier keys pressed

1 - Left or Right Shift key pressed

2 - Left or Right Control key pressed

3 - Control + Shift keys pressed simultaneously

4 - Left or Right Alt key pressed

6 - Control + Alt keys pressed simultaneously

7 - Control, Alt and Shift keys pressed simultaneously

An example of the MAXScript syntax is:

on lv_objects keyDown theKeyCode theShiftState do

(

format "Key Code is %, Shift State is %\n" theKeyCode theShiftState

)

--where lv_objects is the name of the ActiveX ListView,

--theKeyCode and theShiftState are user-defined variable names.

on <control_name> KeyUp KeyCode:integer Shift:integer do ( ... )

Called when the user releases a key. The KeyCode argument will contain the integer code of the key that has been released, the Shift argument will contain an integer whose bits represent the pressed state of the Shift, Control and Alt keys - see above.

on <control_name> KeyPress KeyAscii:integer do ( ... )

Called when the user pressed a key. The KeyAscii argument will contain the ASCII integer code of the key that has been pressed. For example, pressing Space Bar will return 32, pressing Shift+A will return 65 etc.

on <control_name> MouseDown Button:integer Shift:integer x:OLE_XPOS_PIXELS y:OLE_YPOS_PIXELS do ( ... )

Called when the user clicked the ListView with the mouse.

The Button argument will contain an integer whose bits will correspond to the mouse buttons: bit 1 represents Left Mouse Button, bit 2 represents Right Mouse Button, bit 3 represents Middle Mouse Button / Wheel.

1 - Left Mouse Button pressed.

2 - Right Mouse Button pressed.

4 - Middle Mouse Button / Wheel pressed.

NOTE:

Pressing two or three mouse buttons simultaneously will NOT add the values but generate separate events for each button!

The Shift argument will contain the state of the Shift, Control and Alt keys as described earlier on this page.

The x and y arguments will contain the location of the click in ListView pixel coordinates (NOT Twips!), where 0,0 is the upper left corner of the ListView Control.

EXAMPLE

rollout test "Test"

(

activeXControl lv "MSComctlLib.ListViewCtrl" height:100 width:100

on lv MouseDown Button Shift x y do

format "Button: %, Shift: %, xy: %,%\n" Button Shift x y

)

createDialog test

on <control_name> MouseMove Button:integer Shift:integer x:OLE_XPOS_PIXELS y:OLE_YPOS_PIXELS do ( ... )

Called when the user moves the mouse inside the ListView control.

The Button argument will contain an integer whose bits will correspond to the mouse buttons: bit 1 represents Left Mouse Button, bit 2 represents Right Mouse Button, bit 3 represents Middle Mouse Button / Wheel.

1 - Left Mouse Button pressed.

2 - Right Mouse Button pressed.

4 - Middle Mouse Button / Wheel pressed.

NOTE:

Pressing two or three mouse buttons simultaneously will NOT add the values but generate separate events for each button!

The Shift argument will contain the state of the Shift, Control and Alt keys as described earlier on this page.

The x and y arguments will contain the location of the click in ListView pixel coordinates (NOT Twips!), where 0,0 is the upper left corner of the ListView Control.

FOR EXAMPLE

--This script will print the mouse values

--while you move the mouse inside the ListView control

rollout test "Test"

(

activeXControl lv "MSComctlLib.ListViewCtrl" height:100 width:100

on lv MouseMove Button Shift x y do

format "Button: %, Shift: %, xy: %,%\n" Button Shift x y

)

createDialog test

on <control_name> MouseUp Button:integer Shift:integer x:OLE_XPOS_PIXELS y:OLE_YPOS_PIXELS do ( ... )

Called when the user released the mouse over the ListView control.

The Button argument will contain an integer whose bits will correspond to the mouse buttons: bit 1 represents Left Mouse Button, bit 2 represents Right Mouse Button, bit 3 represents Middle Mouse Button / Wheel.

1 - Left Mouse Button pressed.

2 - Right Mouse Button pressed.

4 - Middle Mouse Button / Wheel pressed.

NOTE:

Pressing two or three mouse buttons simultaneously will NOT add the values but generate separate events for each button!

The Shift argument will contain the state of the Shift, Control and Alt keys as described earlier on this page.

The x and y arguments will contain the location of the click in ListView pixel coordinates (NOT Twips!), where 0,0 is the upper left corner of the ListView Control.

FOR EXAMPLE

rollout test "Test"

(

activeXControl lv "MSComctlLib.ListViewCtrl" height:100 width:100

on lv MouseUp Button Shift x y do

format "Button: %, Shift: %, xy: %,%\n" Button Shift x y

)

createDialog test

on <control_name> Click do ( ... )

Called when the user clicked inside the ListView control. This event does not return specific ListItems, but it could be used to query the selection state or other properties of all ListItems. It is a general notification that the user clicked the ListView, the actual actions performed by the event are up to the script developer.

on <control_name> DblClick do ( ... )

Called when the user double-clicked inside the ListView control.

on <control_name> ItemCheck Item:ListItem do ( ... )

Called when the user changed the state of a ListItem's checkbox (if available because of property .checkboxes = true).

The Item argument will contain ListItem whose checkbox has been changed. You can then access the new state by accessing the .checked property of the item. You can also access any other ListItem property.

OLE Drag and Drop Events

on <control_name> OLEStartDrag &Data:DataObject &AllowedEffects:integer do ( ... )

Called when the user started dragging from the ListView control.

on <control_name> OLEGiveFeedback &Effect:integer &DefaultCursors:boolean do ( ... )

Called when the user started dragging from the ListView control.

on <control_name> OLESetData &Data:DataObject &DataFormat:integer do ( ... )

on <control_name> OLECompleteDrag &Effect:integer do ( ... )

on <control_name> OLEDragOver &Data:DataObject &Effect:integer &Button:integer &Shift:integer &x:float &y:float &State:integer do ( ... )

on <control_name> OLEDragDrop &Data:DataObject &Effect:integer &Button:integer &Shift:integer &x:float &y:float do ( ... )

ListItem Properties and Methods

A ListItem is created by using the .ListItems.Add() method and can be accessed using 1-based indexed access as described above. Every ListItem has the following properties and methods:

ListItem Properties:

.Text : string

Get/Set the Text of the ListItem.

.Ghosted : Boolean

Get/Set the Ghosted state of the ListItem.

.Height : float

Returns the Height of the ListItem in Twips . Cannot be set by MAXScript.

.Icon : undefined

Get/Set the Icon of the ListItem. The icon is a 1-based index into the .icons array which in turn is managed by an ImageList ActiveX Control .

.Index : integer

Returns the Index of the ListItem. Cannot be set by MAXScript.

.Key : string

Returns the Key of the ListItem. Cannot be set by MAXScript.

.Selected : Boolean

Get/Set the Selected state of the ListItem. When true, the item is selected, when false, it is not. Depending on the state of the .MultiSelect property of the ListView, only one or multiple ListItems can be selected at the same time. Settings the .selected property of one ListItem to true while .MultiSelect is set to false will automatically deselect any other selected ListItems.

.SmallIcon : undefined

Get/Set the SmallIcon of the ListItem.

.Tag : undefined

Get/Set the Tag of the ListItem.

.Top : float

Returns the Top coordinates of the ListItem in Twips .

.Left : float

Returns the Left coordinates of the ListItem in Twips .

.Width : float

Returns the Width of the ListItem in Twips .

.ListSubItems : IListSubItems

Provides access to the array of Sub-Items of the ListItem. Sub-Items represent the columns after the first column. Sub-Items

SubItems can be accessed through indexed access to the .ListSubItems.

EXAMPLE

--to access the second sub-item of the first item in

--a ListView Control stored in the variable lv,

--you could use:

lv.listItems[1].listSubItems[2]

.Checked : Boolean

Get/Set the checked state of the List Item. See also the on ItemCheck do event handler further on this page.

.ForeColor : OLE_COLOR

Get/Set the Text color of the ListItem.

NOTE:

OLE_COLOR values used by ActiveX Controls are BGR and not RGB!

.ToolTipText : string

Get/Set the Tooltip Text of the ListItem.

.Bold : Boolean

Get/Set the Bold Text property of the ListItem. When set to true, the text will be displayed in Bold characters.

.ListItem Methods:

.CreateDragImage()

.EnsureVisible()

Ensures that the ListItem is visible in the ListView by scrolling the view as needed.

ListSubItem Properties and Methods

A ListSubItem is created by using the .ListItems.Add() method and can be accessed using 1-based indexed access as described above. Every ListItem has the following properties:

ListSubItem Properties:

.Text : string

Get/Set the Text of the ListSubItem.

.ForeColor : OLE_COLOR

Get/Set the Text color of the ListSubItem.

NOTE:

OLE_COLOR values used by ActiveX Controls are BGR and not RGB!

.Bold : boolean

Get/Set the Bold Text property of the ListSubItem. When set to true, the text will be displayed in Bold characters.

.ToolTipText : string

Get/Set the Tooltip Text of the ListSubItem.

.Index : integer

Returns the Index of the ListSubItem. Cannot be set by MAXScript.

.Key : string

.Tag : undefined

.ReportIcon : undefined

ListSubItem Methods:

No methods exposed.

ColumnHeader Properties and Methods

Every ColumnHeader has the following properties:

ColumnHeader Properties:

.Text : string

Get/Set the text displayed by the Column Header.

.Alignment : ListColumnAlignmentConstants( #lvwColumnLeft | #lvwColumnRight | #lvwColumnCenter )

Get/Set the alignment of the Column Header's text.

.Index : integer

Get the index of the Column Header.

.Key : string

Get the key of the Column Header.

.Left : float

Get the left margin of the Column Header in Twips .

.SubItemIndex : integer

Get the sub item index of the Column Header.

.Tag : undefined

Get/Set the tag of the Column Header.

.Width : float

Get/Set the width of the Column in Twips .

.Icon : undefined

Get/Set the icon of the Column Header. The icon is a 1-based index into the .icons array which in turn is managed by an ImageList ActiveX Control . When no icon is assigned, the property returns 0.

.Position : integer

Get/Set the position of the Column Header. The position controls the order of the columns. By default, .Position is set to be equal to the .Index property. Setting .Position to a different value effectively changes the order of the columns, placing the column at the desired position.

ColumnHeader Methods:

No methods exposed.

See also

ListView ActiveX Helper Functions

TabStrip ActiveX Control

ActiveX Controls in MAXScript Rollouts

How To ... Develop a Selected Objects Inspector using ListView ActiveX Control - Part One

How To ... Develop a Selected Objects Inspector using ListView ActiveX Control - Part Two

External Reference:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cmctl198/html/vbobjlistview.asp


Listview ActiveX functions

ListView ActiveX Helper Functions

The following additional functions packaged in a structure called ListView work in conjunction with the ListView ActiveX Control . All functions need to be passed the windows handle, which can be acquired with the .hWnd property of the ActiveX control.

Listview.hittest <hWnd> <point2_pos>

Returns an array of listitem index and the subItem index, subItem index is 0 only when the listItem is hittested. The Point2 value is expected in Pixels, NOT twips!

Listview.getIndent <hWnd> <index>

Returns the indent of the indexed listitem.

Listview.setIndent <hWnd> <index> <int_indent>

Sets the indent of the indexed listitem.

See also

ListView ActiveX Control

ActiveX Controls in MAXScript Rollouts

How To ... Develop a Selected Objects Inspector using ListView ActiveX Control - Part One

How To ... Develop a Selected Objects Inspector using ListView ActiveX Control - Part Two


ListView ActiveX Control Example

SAMPLE SCRIPT

rollout controlR92 "Microsoft ListView Control, version 6.0"

(

activeXControl ax "{BDD1F04B-858B-11D1-B16A-00C0F0283628}" height:200 width:300 align:#left

--on ax Click do format "handler: Click\n"

--on ax DblClick do format "handler: DblClick\n"

on controlR92 open do

(

showProperties ax

ax.MousePointer = #ccArrow

ax.GridLines = true

ax.AllowColumnReorder = true

ax.BorderStyle = #ccFixedSingle

ax.view = #lvwReport

chs = ax.columnHeaders

--showProperties chs

--showMethods chs

hTargets = chs.Add()

hWeights = chs.Add()

hTargets.text = "Node"

hWeights.text = "Weights"

lis = ax.listItems

for i=0 to 10 do

(

local li

li = lis.Add()

li.text = "Item " + i as string

)

for li in ax.listItems do li.bold = true

li = ax.HitTest 100 1500

if li != undefined do

(

showProperties li

li.text = "Just Hit Tested"

showEvents controlR92.ax

showMethods controlR92.ax

)

)

)

nr92 = newRolloutFloater "Microsoft ListView Control, version 6.0" 350 300 10 10

addRollout ControlR92 nr92

See also

How To ... Develop a Selected Objects Inspector using ListView ActiveX Control - Part One

How To ... Develop a Selected Objects Inspector using ListView ActiveX Control - Part Two

ActiveX Controls in MAXScript Rollouts


TreeView ActiveX Control

"Microsoft TreeView Control 6.0 (SP4)"
"MSComctlLib.TreeCtrl.2"
"{C74190B6-8589-11D1-B16A-00C0F0283628}"

Description:

The TreeView ActiveX Control is one of the most often used ActiveX Controls in MAXScript rollouts. It is very flexible and customizable and is thus discussed in detail in this chapter. It can be used to create node trees and hierarchy displays.

An example of the a TreeView Control used in the 3ds Max User Interface is the Named Selection Sets dialog.

Constructor:

activeXControl tv "MSComctlLib.TreeCtrl"

Properties:

TreeView Nodes:

.Nodes : INodes

Get/Set the array of nodex represented in the TreeView.

.Nodes Properties:

.Nodes.Count : integer

Returns the number of nodes in the .Nodes array.

.Nodes[Index:undefined] : INode

You can access nodes from the array using indexed access. The index is 1-based.

Nodes returned by this property have their own properties and methods which are described under TreeView Node Properties and Methods

EXAMPLE

first_node = tv.Nodes[1]

--returns the first node in the TreeView stored in the variable tv.

showProperties first_node --show node properties

showMethods first_node --show methods applicable to TreeView nodes

.Nodes Methods:

.Add Relative:undefined Relationship:undefined Key:undefined Text:undefined Image:undefined SelectedImage:undefined

Adds a new node to the .Nodes array and returns the new node as result.

The same method can be used to add children to existing nodes to build a hierarchy. See the tutorial How To ... Develop a Scene Browser using TreeView ActiveX Control - Part One for an example.

Nodes returned by this method have their own properties and methods which are described under TreeView Node Properties and Methods

.Clear()

Removes all nodes from the .Nodes array of the TreeView Control.

.Remove Index:undefined

Removes a single node by index. Index is 1-based.

._NewEnum()

Returns an IVBDataObject

TreeView Layout

The following properties control the layout and appearance of the TreeView Control:

.LineStyle : TreeLineStyleConstants( #tvwTreeLines | #tvwRootLines )

Controls the style of the lines connecting the nodes in the hierarchy. The #tvwTreeLines mode shows the root nodes without connection lines and draws lines only between their children. The #tvwRootLines connects both root level nodes and their children with lines. Below you can see the difference:

.Style : TreeStyleConstants( #tvwTextOnly | #tvwPictureText | #tvwPlusMinusText | #tvwPlusPictureText | #tvwTreelinesText | #tvwTreelinesPictureText | #tvwTreelinesPlusMinusText | #tvwTreelinesPlusMinusPictureText )

Controls the style of the tree display.

Below, you can see the typical 4 styles without icons:

When icons are enabled, they appear between the line/plus/minus sign and the text label:

.Appearance : AppearanceConstants( #ccFlat | #cc3D )

Controls the appearance of the TreeView control. #cc3D is default.

.BorderStyle : BorderStyleConstants( #ccNone | #ccFixedSingle )

Controls the border style when .Appearance is set to #ccFlat. When set to #ccFixedSingle, a single pixel border will be drawn around the TreeView.

.Indentation : float

Get/Set the Indentation value in Twips . The value controls how far a child is indentend relatively to its parent. Note that values below 28 pixels (420 twips) will not affect the indentation anymore, but will cause the plus/minus signs to appear much smaller.

The following screenshots show Indentations of 10,28,40 and 60 pixels:

.Checkboxes : boolean

When set to true, checkboxes will be displayed in front of each Node. When set to false (default), no checkboxes will be displayed.

.PathSeparator : string

Defines the path separator string to be used by the .FullPath property of the Node. For example, setting the value to ">" and getting the .FullPath property of a node "Sphere01" which is child of node "Box01" which is child of node "ROOT" will return the path string "ROOT>Box01>Sphere01"

.Enabled : boolean

When set to true, the TreeView is editable. When set to false, the TreeView only displays the nodes but cannot be manipulated interactively. There is no visual difference between the two modes.

.DropHighlight : INode

If a TreeView node is assigned to this property, it will be displayed as highlighted (appearing to be selected, but without having the selected state flag set). The highlight will not be affected by the selection highlight, leaving the specified node highlighted until the DropHighlight is set to undefined again.

.LabelEdit : LabelEditConstants( #tvwAutomatic | #tvwManual )

Controls the editing of the label (the text of the node). Default is #tvwAutomatic. When automatic, the user can simply select a node and click a second time to edit the label. When manual, the label editing has to be initiated by the developer using the StartLabelEdit() method described below.

.Scroll : boolean

When set to true (default), horizontal and vertical scrollbars will appear whenever the tree does not fit in the TreeView area. When set to false, no scrollbars will be displayed.

.Font : IFontDisp

Defines the Font used by the TreeView. Cannot be set by MAXScript.

TreeView Selections

The following properties provide access to and give control over the selection of nodes in TreeView Controls:

.SelectedItem : INode

Returns the currently selected node.

.HideSelection : Boolean

When set to true, the selection will not be displayed. When set to false, the selection will be displayed.

.FullRowSelect : boolean

When set to true, the whole row will be selected.

.HotTracking : boolean

When set to true, the ListItems will be highlighted as the mouse moves over them. When set to false (default), there will be no effect when the mouse is moving over ListItems.

.SingleSel : boolean

When set to true (default), selecting a new branch will automatically collapse previously expanded branches. When set to false, multiple branches can be open at the same time.

TreeView Images

.ImageList : IVBDataObject

This is the array storing all images used as icons. It expects an IVBDataObject (Visual Basic Data Object) which can be provided by an ImageList ActiveX control. See the tutorial How To ... Develop a Scene Browser using TreeView ActiveX Control - Part Two for a practical example.

TreeView Mouse Pointer

.MousePointer : MousePointerConstants( #ccDefault | #ccArrow | #ccCross | #ccIBeam | #ccIcon | #ccSize | #ccSizeNESW | #ccSizeNS | #ccSizeNWSE | #ccSizeEW | #ccUpArrow | #ccHourglass | #ccNoDrop | #ccArrowHourglass | #ccArrowQuestion | #ccSizeAll | #ccCustom)

Get/Set the mouse pointer type when over the ListView Control. The script developer could use the mouse events described further on this page to change the mouse pointer depending on the underlying content or the allowed actions...

.MouseIcon : IPictureDisp

Returns the mouse icon as IPictureDisp value. Cannot be set by MAXScript.

TreeView Sorting

.Sorted : boolean

When set to false (default), the nodes will be displayed in the order they have been added to the .Nodes array.

When set to true, the nodes will be sorted alphabetically.

Drag and Drop Behaviors

.OLEDragMode : OLEDragConstants( #ccOLEDragManual | #ccOLEDragAutomatic )

Controls the OLE Drag mode. When set to manual, a drag can be initiated only via the scripted method .OLEDrag(). When set to automatic, the user can drag nodes from the list.

.OLEDropMode : OLEDropConstants( #ccOLEDropNone | #ccOLEDropManual )

Controls the OLE Drop mode.

Windows Messaging

.hWnd : OLE_HANDLE

Methods

.HitTest x:float y:float

Performs a hit test at the specified x and y coordinates.

.GetVisibleCount()

Returns the number of visible nodes.

.StartLabelEdit()

Manually starts label editing of the currently selected node.

.Refresh()

Refreshes the TreeView display.

.OLEDrag()

Manually initiates OLE Drag.

Events

on <control_name> BeforeLabelEdit Cancel:integer do ( ... )

Called before the Label Editing starts.

on <control_name> AfterLabelEdit Cancel:integer NewString:string do ( ... )

Called after the Label Editing ends.

on <control_name> Collapse Node:Node do ( ... )

Called when a node has been collapsed. The argument will contain the node that has been collapsed.

on <control_name> Expand Node:Node do ( ... )

Called when a node has been expanded. The argument will contain the node that has been expanded.

on <control_name> NodeClick Node:Node do ( ... )

Called when a node has been clicked. The argument will contain the node that has been clicked.

on <control_name> KeyDown KeyCode:integer Shift:integer do ( ... )

Called when the user pressed a key. The KeyCode argument will contain the integer code of the key that has been pressed, the Shift argument will contain an integer whose bits represent the pressed state of the Shift, Control and Alt keys - bit 1 represents Shift, bit 2 represents Control, bit 3 represents Alt.

0 - No modifier keys pressed

1 - Left or Right Shift key pressed

2 - Left or Right Control key pressed

3 - Control + Shift keys pressed simultaneously

4 - Left or Right Alt key pressed

6 - Control + Alt keys pressed simultaneously

7 - Control, Alt and Shift keys pressed simultaneously

An example of the MAXScript syntax is:

on tv keyDown theKeyCode theShiftState do

(

format "Key Code is %, Shift State is %\n" theKeyCode theShiftState

)

--where tv is the name of the ActiveX TreeView,

--theKeyCode and theShiftState are user-defined variable names.

on <control_name> KeyUp KeyCode:integer Shift:integer do ( ... )

Called when the user releases a key. The KeyCode argument will contain the integer code of the key that has been released, the Shift argument will contain an integer whose bits represent the pressed state of the Shift, Control and Alt keys - see above.

on <control_name> KeyPress KeyAscii:integer do ( ... )

Called when the user pressed a key. The KeyAscii argument will contain the ASCII integer code of the key that has been pressed. For example, pressing Space Bar will return 32, pressing Shift+A will return 65 etc.

on <control_name> MouseDown Button:integer Shift:integer x:OLE_XPOS_PIXELS y:OLE_YPOS_PIXELS do ( ... )

Called when the user clicked the TreeView with the mouse.

The Button argument will contain an integer whose bits will correspond to the mouse buttons: bit 1 represents Left Mouse Button, bit 2 represents Right Mouse Button, bit 3 represents Middle Mouse Button / Wheel.

1 - Left Mouse Button pressed.

2 - Right Mouse Button pressed.

4 - Middle Mouse Button / Wheel pressed.

NOTE:

Pressing two or three mouse buttons simultaneously will NOT add the values but generate separate events for each button!

The Shift argument will contain the state of the Shift, Control and Alt keys as described earlier on this page.

The x and y arguments will contain the location of the click in TreeView pixel coordinates (NOT twips!), where 0,0 is the upper left corner of the TreeView Control.

EXAMPLE

rollout test "Test"

(

activeXControl tv "MSComctlLib.TreeCtrl" height:100 width:100

on tv MouseDown Button Shift x y do

format "Button: %, Shift: %, xy: %,%\n" Button Shift x y

)

createDialog test

on <control_name> MouseMove Button:integer Shift:integer x:OLE_XPOS_PIXELS y:OLE_YPOS_PIXELS do ( ... )

Called when the user moves the mouse inside the TreeView control.

The Button argument will contain an integer whose bits will correspond to the mouse buttons: bit 1 represents Left Mouse Button, bit 2 represents Right Mouse Button, bit 3 represents Middle Mouse Button / Wheel.

1 - Left Mouse Button pressed.

2 - Right Mouse Button pressed.

4 - Middle Mouse Button / Wheel pressed.

NOTE:

Pressing two or three mouse buttons simultaneously will NOT add the values but generate separate events for each button!

The Shift argument will contain the state of the Shift, Control and Alt keys as described earlier on this page.

The x and y arguments will contain the location of the click in TreeView pixel coordinates (NOT twips!), where 0,0 is the upper left corner of the TreeView Control.

EXAMPLE

--This script will print the mouse values

--while you move the mouse inside the ListView control

rollout test "Test"

(

activeXControl tv "MSComctlLib.TreeCtrl" height:100 width:100

on tv MouseMove Button Shift x y do

format "Button: %, Shift: %, xy: %,%\n" Button Shift x y

)

createDialog test

on <control_name> MouseUp Button:integer Shift:integer x:OLE_XPOS_PIXELS y:OLE_YPOS_PIXELS do ( ... )

Called when the user released the mouse over the TreeView control.

The Button argument will contain an integer whose bits will correspond to the mouse buttons: bit 1 represents Left Mouse Button, bit 2 represents Right Mouse Button, bit 3 represents Middle Mouse Button / Wheel.

1 - Left Mouse Button pressed.

2 - Right Mouse Button pressed.

4 - Middle Mouse Button / Wheel pressed.

NOTE:

Pressing two or three mouse buttons simultaneously will NOT add the values but generate separate events for each button!

The Shift argument will contain the state of the Shift, Control and Alt keys as described earlier on this page.

The x and y arguments will contain the location of the click in TreeView pixel coordinates (NOT twips!), where 0,0 is the upper left corner of the TreeView Control.

EXAMPLE

rollout test "Test"

(

activeXControl tv "MSComctlLib.TreeCtrl" height:100 width:100

on tv MouseUp Button Shift x y do

format "Button: %, Shift: %, xy: %,%\n" Button Shift x y

)

createDialog test

on <control_name> Click do ( ... )

Called when the user clicked inside the TreeView control. This event does not return specific TreeView Node, but it could be used to query the selection state or other properties of all Nodes. It is a general notification that the user clicked the TreeView, the actual actions performed by the event are up to the script developer.

on <control_name> DblClick do ( ... )

Called when the user double-clicked inside the TreeView control.

on <control_name> NodeCheck Node:Node do ( ... )

Called when the user changed the state of a node's checkbox (must be visible because of property .checkboxes = true).

The Node argument will contain the node whose checkbox has been changed. You can then access the new state by accessing the .checked property of the node that was changed. You can also access any other node property like .text, .index etc. See TreeView Node Properties and Methods

on <control_name> OLEStartDrag &Data:DataObject &AllowedEffects:integer do ( ... )

Called when the user started dragging from the ListView control.

on <control_name> OLEGiveFeedback &Effect:integer &DefaultCursors:boolean do ( ... )

Called when the user started dragging from the ListView control.

on <control_name> OLESetData &Data:DataObject &DataFormat:integer do ( ... )

on <control_name> OLECompleteDrag &Effect:integer do ( ... )

on <control_name> OLEDragOver &Data:DataObject &Effect:integer &Button:integer &Shift:integer &x:float &y:float &State:integer do ( ... )

on <control_name> OLEDragDrop &Data:DataObject &Effect:integer &Button:integer &Shift:integer &x:float &y:float do ( ... )

TreeView Node Properties and Methods

The following properties and methods are available for single TreeView Nodes.

You can get single nodes either by using indexed access to the .Nodes array, or as a return value of the .Nodes.Add() method.

TreeView Node Properties:

.Children : integer

Returns the number of children of the node.

.Parent : INode

Returns the parent node.

.Child : INode

Returns the first child node.

.Root : INode

Returns the root node (top most parent in the hierarchy).

.Previous : INode

Returns the previous node in the same hierarchy level.

.Next : INode

Returns the next node in the same hierarchy level.

.FirstSibling : INode

Returns the first sibling.

.LastSibling : INode

Returns the last sibling.

.FullPath : string

Returns the full path of the node as a string. See also the .PathSeparator property of TreeView described earlier on this page.

For example, setting the value to ">" and getting the .FullPath property of a node "Sphere01" which is child of node "Box01" which is child of node "ROOT" will return the path string "ROOT>Box01>Sphere01"

.Text : string

Get/Set the text displayed by the node

.ForeColor : OLE_COLOR

Get/Set the color of the text.

.BackColor : OLE_COLOR

Get/Set the color of the node's background.

NOTE:

Microsoft ActiveX Controls use BGR and NOT RGB color specifications!

.Bold : boolean

When set to true, the text will be displayed as bold. When set to false, regular text will be used.

.Index : integer

Returns the index of the node

.Checked : boolean

Get/Set the checked state of the node. The state can always be get and set, but checkboxes will be displayed only when the .checkboxes property of the TreeView Control is set to true.

.Visible : boolean

Get/Set the visibility of the node as a boolean value.

.Selected : boolean

Get/Set the visibility of the node as a boolean value.

.Expanded : boolean

Get/Set the expanded state of the node. When set to true, all children will be shown. When set to false, the children display will be collapsed and only the parent node will be displayed.

.Image : integer, default:undefined

Set the index of the image to be displayed by the node. The index points at the imageList property of the TreeView, which is usually assigned an ImageList ActiveX Control to provide the image management.

.SelectedImage : integer, default:undefined

Set the index of the image to be displayed when the node is selected.

.ExpandedImage : integer, default:undefined

Set the index of the image to be displayed when the node is expanded.

.Sorted : Boolean

When set to true, the children of the node will be sorted.

.Key : string

.Tag : undefined

Node Methods:

The following methods are available for single TreeView Nodes:

.CreateDragImage()

.EnsureVisible()

See also

ActiveX Controls in MAXScript Rollouts

How To ... Develop a Scene Browser using TreeView ActiveX Control - Part One

How To ... Develop a Scene Browser using TreeView ActiveX Control - Part Two


TabStrip ActiveX Control

"Microsoft TabStrip Control 6.0 (SP4)"

"MSComctlLib.TabStrip.2"

"{1EFB6596-857C-11D1-B16A-00C0F0283628}"

Description:

The TabStrip ActiveX Control creates a strip of tabs that can be used to manage multi-page dialogs similar to the Tabbed Render Scene Dialog or the Preferences dialog in 3ds Max.

Constructor:

activeXControl ilctrl "MSComctlLib.TabStrip.2"

Properties:

.Tabs : ITabs

Get/Set the array of tabs represented in the TabStrip.

.Tabs Properties:

.Caption : string

Get/Set the text displayed on the tab.

.Tag : undefined

Get/Set the Tag of the tab.

.Index : integer

Get/Set the Index of the tab.

.Key : string

Get/Set the Key of the tab.

.ToolTipText : string

Get/Set the Tooltip text of the tab.

.Width : float

Get/Set the width of the tab.

.Height : float

Get/Set the height of the tab.

.Top : float

Get/Set the top position of the tab.

.Left : float

Get/Set the left position of the tab.

.Selected : boolean

Get/Set the selected state of the tab.

.Image : undefined

Get/Set the image of the tab.

.HighLighted : boolean

Get/Set the highlighted state of the tab.

.Enabled : boolean

Get/Set the enabled state of the TabStrip. When set to false, the tabs cannot be switched.

.Font : IFontDisp

Accesses the Font to be used to label the tabs.

.hWnd : OLE_HANDLE

Accesses the Windows OLE handle of the TabStrip.

.MouseIcon : IPictureDisp

Get/Set the mouse icon to be displayed.

.MultiRow : boolean

Get/Set the multi-row mode. When set to true, tabs will be ordered in multiple rows when the width of the strip does not provide enough space to show all tabs. When set to false, the excessive tabs will be off-screen, and a set of Left and Right arrows will be displayed to allow the scrolling of the tabs.

.Style : TabStyleConstants( #tabTabs | #tabButtons | #tabFlatButtons )

Get/Set the tabs style.

#TabTabs, #TabButtons and #TabFlatButtons styles.

.TabFixedWidth : integer

Get/Set the fixed width of the tabs when .TabWidthStyle property is set to #tabFixed. The value is expressed in Twips .

.TabWidthStyle : TabWidthStyleConstants( #tabJustified | #tabNonJustified | #tabFixed )

Get/Set the width style of the tabs.

#TabJustified vs. #TabFixed with TabFixedWidth set to 2400 twips.

.ClientTop : float

.ClientLeft : float

.ClientHeight : float

.ClientWidth : float

Get/Set the Client Top, Left coordinates and the Width and Height.

.MousePointer : MousePointerConstants( #ccDefault | #ccArrow | #ccCross | #ccIBeam | #ccIcon | #ccSize | #ccSizeNESW | #ccSizeNS | #ccSizeNWSE | #ccSizeEW | #ccUpArrow | #ccHourglass | #ccNoDrop | #ccArrowHourglass | #ccArrowQuestion | #ccSizeAll | #ccCustom )

Get/Set the Mouse Pointer style when hovering over the TabStrip.

.ImageList : IVBDataObject

.TabFixedHeight : integer

Get/Set the fixed height of the tabs.

.ShowTips : boolean

Get/Set whether to show tips.

.SelectedItem : ITab

Returns the currently selected item.

.OLEDropMode : OLEDropConstants( #ccOLEDropNone | #ccOLEDropManual )

Get/Set the OLE Drop Mode.

.HotTracking : boolean

Get/Set whether to hot-track the tabs when the mouse is hovering over the TabStrip.

.MultiSelect : boolean

Get/Set whether to allow multiple tabs to be selected at the same time.

.Placement : PlacementConstants( #tabPlacementTop | #tabPlacementBottom | #tabPlacementLeft | #tabPlacementRight )

Get/Set the placement of the tabs.

.Separators : boolean

Get/Set whether to use separators.

.TabMinWidth : float

Get/Set the min. width of the tabs.

.TabStyle : TabSelStyleConstants( #tabTabStandard | #tabTabOpposite )

Get/Set the Tab style.

Methods:

.Refresh()

Refreshes the tabs display.

.OLEDrag()

Performs a manual OLE Drag.

.DeselectAll()

Deselects all tabs.

Events:

on <control_name> Click do ( ... )

Called when the user clicks inside the TabStrip control (right after the mouse button has been released). This event does not return specific Tab, but it could be used to query the selection state or other properties of all Tabs. It is a general notification that the user clicked a tab, the actual actions performed by the event are up to the script developer.

on <control_name> KeyDown KeyCode:integer Shift:integer do ( ... )

Called when the user presses a key. The KeyCode argument will contain the integer code of the key that has been pressed, the Shift argument will contain an integer whose bits represent the pressed state of the Shift, Control and Alt keys - bit 1 represents Shift, bit 2 represents Control, bit 3 represents Alt.

0 - No modifier keys pressed

1 - Left or Right Shift key pressed

2 - Left or Right Control key pressed

3 - Control + Shift keys pressed simultaneously

4 - Left or Right Alt key pressed

6 - Control + Alt keys pressed simultaneously

7 - Control, Alt and Shift keys pressed simultaneously

on <control_name> KeyPress KeyAscii:integer do ( ... )

Called when the user presses a key. The KeyAscii argument will contain the ASCII integer code of the key that has been pressed. For example, pressing Space Bar will return 32, pressing Shift+A will return 65 etc.

on <control_name> KeyUp KeyCode:integer Shift:integer do ( ... )

Called when the user releases a key. The KeyCode argument will contain the integer code of the key that has been released, the Shift argument will contain an integer whose bits represent the pressed state of the Shift, Control and Alt keys - see keyDown event above.

on <control_name> MouseDown Button:integer Shift:integer x:OLE_XPOS_PIXELS y:OLE_YPOS_PIXELS do ( ... )

Called when the user moves the mouse inside the TabStrip control.

The Button argument will contain an integer whose bits will correspond to the mouse buttons: bit 1 represents Left Mouse Button, bit 2 represents Right Mouse Button, bit 3 represents Middle Mouse Button / Wheel.

1 - Left Mouse Button pressed.

2 - Right Mouse Button pressed.

4 - Middle Mouse Button / Wheel pressed.

NOTE:

Pressing two or three mouse buttons simultaneously will NOT add the values but generate separate events for each button!

The Shift argument will contain the state of the Shift, Control and Alt keys as described earlier on this page.

The x and y arguments will contain the location of the click in TabStrip pixel coordinates (NOT twips!), where 0,0 is the upper left corner of the TabStrip Control.

on <control_name> MouseMove Button:integer Shift:integer x:OLE_XPOS_PIXELS y:OLE_YPOS_PIXELS do ( ... )

Called when the user releases the mouse over the TabStrip control.

The Button argument will contain an integer whose bits will correspond to the mouse buttons: bit 1 represents Left Mouse Button, bit 2 represents Right Mouse Button, bit 3 represents Middle Mouse Button / Wheel.

1 - Left Mouse Button pressed.

2 - Right Mouse Button pressed.

4 - Middle Mouse Button / Wheel pressed.

NOTE:

Pressing two or three mouse buttons simultaneously will NOT add the values but generate separate events for each button!

The Shift argument will contain the state of the Shift, Control and Alt keys as described earlier on this page.

The x and y arguments will contain the location of the click in TabStrip pixel coordinates (NOT twips!), where 0,0 is the upper left corner of the TabStrip Control.

on <control_name> MouseUp Button:integer Shift:integer x:OLE_XPOS_PIXELS y:OLE_YPOS_PIXELS do ( ... )

Called when the user releases the mouse over the TreeView control.

The Button argument will contain an integer whose bits will correspond to the mouse buttons: bit 1 represents Left Mouse Button, bit 2 represents Right Mouse Button, bit 3 represents Middle Mouse Button / Wheel.

1 - Left Mouse Button pressed.

2 - Right Mouse Button pressed.

4 - Middle Mouse Button / Wheel pressed.

NOTE:

Pressing two or three mouse buttons simultaneously will NOT add the values but generate separate events for each button!

The Shift argument will contain the state of the Shift, Control and Alt keys as described earlier on this page.

The x and y arguments will contain the location of the click in TreeView pixel coordinates (NOT twips!), where 0,0 is the upper left corner of the TreeView Control.

on <control_name> BeforeClick Cancel:integer do ( ... )

Called when the user clicks a new tab. The Cancel argument returns 0 when the tab has been changed. Clicking the selected tab does not call this event.

on <control_name> OLEStartDrag &Data:DataObject &AllowedEffects:integer do ( ... )

Called when OLE Drag is started.

on <control_name> OLEGiveFeedback &Effect:integer &DefaultCursors:boolean do ( ... )

Called when OLE Drag needs to specify the drag effect and cursor.

on <control_name> OLESetData &Data:DataObject &DataFormat:integer do ( ... )

Called when OLE Drag needs to specify the drag effect and cursor.

on <control_name> OLECompleteDrag &Effect:integer do ( ... )

Called when OLE Drag is complete.

on <control_name> OLEDragOver &Data:DataObject &Effect:integer &Button:integer &Shift:integer &x:float &y:float &State:integer do ( ... )

Called when the OLE Drag object is being dragged over the ActiveX control.

on <control_name> OLEDragDrop &Data:DataObject &Effect:integer &Button:integer &Shift:integer &x:float &y:float do ( ... )

Called when the OLE Drag object has been dropped.

EXAMPLE

(

rollout firstRollout "Rollout 1" (

edittext edittext01 text:"This is just a test." height:135 width:262 )

rollout secondRollout "Rollout 2" (

listbox listbox02 items:#("Line One","MAXScript Rocks","ActiveX Too") width:260 )

rollout testTabs "Test Tabs" (

activeXcontrol ax_tabs "MSComctlLib.TabStrip.2" height:20

subRollout theSubRollout height:180

on ax_tabs Click do

(

 case ax_tabs.SelectedItem.index of

 (

  1: (

   removeSubRollout theSubRollout secondRollout

   addSubRollout theSubRollout firstRollout

  )

  2: (

   removeSubRollout theSubRollout firstRollout

   addSubRollout theSubRollout secondRollout

  )

 )

)

on testTabs open do

(

ax_tabs.tabs[1].caption = "First Tab"

ax_tabs.tabs.add pvCaption:"Second Tab"

)

)--end rollout

createDialog testTabs 340 220

addSubRollout testTabs.theSubRollout firstRollout

)

See also

ActiveX Controls in MAXScript Rollouts

ListView ActiveX Control

TreeView ActiveX Control


Windows Media Player ActiveX Control

"AMovie (Microsoft ActiveMovie Control)?-0"

{05589FA1-C356-11CE-BF01-00AA0055595A}

Properties

.ImageSourceWidth : integer, read-only

Returns the width of the image source as integer.

.ImageSourceHeight : integer, read-only

Returns the height of the image source as integer.

.Author : string, read-only

Returns the name of the author of the of source as string.

.Title : string, read-only

Returns the title if the image source as string.

.Copyright : string, read-only

Returns the copyright notice of the image source as string.

.Description : string, read-only

Returns the description of the image source as string.

.Rating : string, read-only

Returns the rating of the image source as string.

.FileName : string

Returns the file name of the image source as string.

.Duration : float, read-only

Returns the duration of the video stream as float.

.CurrentPosition : float

Get/Set the current position of the video stream as float.

.PlayCount : integer

Get/Set the play count (number of times to repeat the playback) as integer.

.SelectionStart : float

Get/Set the selection start as float.

.SelectionEnd : float

Get/Set the selection end as float.

.CurrentState : StateConstants( #amvNotLoaded | #amvStopped | #amvPaused | #amvRunning ), read-only

Returns the current state of the Media Player.

.Rate : float

Get/Set the playback rate as a float.

.Volume : integer

Get/Set the audio volume as float.

.Balance : integer

Get/Set the audio balance as integer.

.EnableContextMenu : Boolean

Enable/Disable the context menu.

.ShowDisplay : Boolean

Enable/Disable the display.

.ShowControls : Boolean

Enable/Disable the controls display.

.ShowPositionControls : Boolean

Enable/Disable the position controls display.

.ShowSelectionControls : Boolean

Enable/Disable the selection controls display.

.ShowTracker : Boolean

Enable/Disable the tracker display.

.EnablePositionControls : Boolean

Enable/Disable the position controls.

.EnableSelectionControls : Boolean

Enable/Disable the selection controls.

.EnableTracker : Boolean

Enable/Disable the Tracker.

.AllowHideDisplay : Boolean

Enable/Disable the display hiding.

.AllowHideControls : boolean

Enable/Disable the controls hiding.

.DisplayMode : DisplayModeConstants( #amvTime | #amvFrames )

Get/Set the time/frames display mode.

.AllowChangeDisplayMode : Boolean

Enable/Disable the changing of the time.frames display mode.

.FilterGraph : undefined

.FilterGraphDispatch : DActiveMovieEvents, read-only

.DisplayForeColor : integer

Get/Set the display foreground color as integer.

.DisplayBackColor : integer

Get/Set the display background color as integer.

.MovieWindowSize : WindowSizeConstants( #amvOriginalSize | #amvDoubleOriginalSize | #amvOneSixteenthScreen | #amvOneFourthScreen | #amvOneHalfScreen )

Get/Set the movie window size.

.FullScreenMode : Boolean

Enable/Disable fullscreen mode.

.AutoStart : boolean

Enable/Disable Auto Start. When true, the movie will repeat playback when the last frame is reached. When false, the movie will not restart.

.AutoRewind : Boolean

Enable/Disable Auto Rewind. When true, the movie will automatically jump back to the first frame when playback is finished. When false, the movie will remain on the last frame.

.hWnd : integer, read-only

Returns the Windows handle of the ActiveX control.

.Appearance : AppearanceConstants( #amvFlat | #amv3D )

Get/Set the appearance of the WMP control.

.BorderStyle : BorderStyleConstants( #amvNone | #amvFixedSingle )

Get/Set the border style of the WMP control when .Appearance is set to #amvFlat.

.Enabled : Boolean

Enable/Disable the WMP control.

.ReadyState : ReadyStateConstants( #amvUninitialized | #amvLoading | #amvInteractive | #amvComplete ), read-only

Returns the Ready state of the WMP control.

.MediaPlayer : DActiveMovieEvents

Returns a DActiveMovieEvents object with the following methods:

.MediaPlayer DActiveMovieEvents Methods

.StateChange oldState:integer newState:integer

Change the state of the Player.

.PositionChange oldPosition:float newPosition:float

Change the position of the Player.

.Timer()

Call the timer.

.OpenComplete()

Set the open state to complete.

.Click()

Call the click event handler.

.DblClick()

Call the double-click event handler.

.KeyDown KeyCode:integer Shift:integer

Causes the keyDown event handler to be executed.

.KeyUp KeyCode:integer Shift:integer

Causes the keyUp event handler to be executed.

.KeyPress KeyAscii:integer

Causes the keyPress event handler to be executed.

.MouseDown Button:integer Shift:integer x:OLE_XPOS_PIXELS y:OLE_YPOS_PIXELS

Causes the MouseDown event handler to be executed.

.MouseMove Button:integer Shift:integer x:OLE_XPOS_PIXELS y:OLE_YPOS_PIXELS

Causes the MouseMove event handler to be executed.

.MouseUp Button:integer Shift:integer x:OLE_XPOS_PIXELS y:OLE_YPOS_PIXELS

Causes the MouseUp event handler to be executed.

.Error SCode:integer Description:string Source:string CancelDisplay:Boolean

Causes the Error event handler to be executed.

Methods

.AboutBox()

Open the About box.

.Run()

Start Playback.

.Pause()

Pause Playback.

.Stop()

Stop Playback.

.IsSoundCardEnabled()

Returns true if the Sound Card is enabled, false otherwise.

Events

on <control_name> StateChange oldState:integer newState:integer do ( ... )

Called when the Player's state has changed. The arguments oldState and newState will contain the state before and after the change.

on <control_name> PositionChange oldPosition:float newPosition:float do ( ... )

Called when the Player's position has changed. The arguments oldState and newState will contain the position before and after the change.

on <control_name> Timer do ( ... )

Called when the Timer has changed.

on <control_name> OpenComplete do ( ... )

Called when the a loading of a new video stream has finished.

on <control_name> Click do ( ... )

Called when the user clicked the control.

on <control_name> DblClick do ( ... )

Called when the user double-clicked the control.

on <control_name> KeyDown KeyCode:integer Shift:integer do ( ... )

Called when the user pressed down a key.

on <control_name> KeyUp KeyCode:integer Shift:integer do ( ... )

Called when the user released a key.

on <control_name> KeyPress KeyAscii:integer do ( ... )

Called when the user pressed a key.

on <control_name> MouseDown Button:integer Shift:integer x:OLE_XPOS_PIXELS y:OLE_YPOS_PIXELS do ( ... )

Called when the user pressed a mouse button over the Control.

on <control_name> MouseMove Button:integer Shift:integer x:OLE_XPOS_PIXELS y:OLE_YPOS_PIXELS do ( ... )

Called when the user moved the mouse over the Control.

on <control_name> MouseUp Button:integer Shift:integer x:OLE_XPOS_PIXELS y:OLE_YPOS_PIXELS do ( ... )

Called when the user released a mouse button over the Control.

on <control_name> Error SCode:integer Description:string Source:string CancelDisplay:boolean do ( ... )

Called when an error has occurred.

on <control_name> DisplayModeChange do ( ... )

Called when the display mode has changed.

on <control_name> ReadyStateChange ReadyState:ReadyStateConstants( #amvUninitialized | #amvLoading | #amvInteractive | #amvComplete ) do ( ... )

Called when the ready state has changed.

on <control_name> ScriptCommand bstrType:string bstrText:string do ( ... )

See also

Windows Media Player ActiveX Control Example

ActiveX Controls in MAXScript Rollouts


Windows Media Player ActiveX Control Example

The following example creates a Windows Media Player in a rollout.

  • You can load an avi file by clicking the "Pick Avi" button and choosing an Avi file from disk.

  • When the play button is hit the "on timer..." event is called. This synchronizes the time slider with the active frame in the media player!

  • Click "Show properties" to get all the properties listed in the listbox.

  • You can get a property's value by selecting the property name from the listbox.

  • You can also set a property by picking a property from the listbox and entering the new value in the text field below.

SAMPLE SCRIPT

rollout rActiveX "Windows Media Player in a Rollout"

(

local val

activeXControl ax "{05589FA1-C356-11CE-BF01-00AA0055595A}" height:200 width:300 align:#left

button btnPick "Pick Avi" pos:[320, 10]

button btnProps "Show Properties" pos:[320, 50]

listBox lbProps "Properties:" pos:[420, 10] width:170

editText etValue "Value:" pos:[385, 170] width:200

label lblStatus "" pos:[440, 190]

on btnPick pressed do

(

local f = getOpenFileName caption:"Pick Any Avi File" types:"*.avi"

if f != undefined then ax.FileName = f

)

on btnProps pressed do

 (

showProperties ax

lbProps.items = getPropNames ax

 )

 on lbProps selected sel do

(

if lbProps.items.count > 0 then

(

try ( val = getProperty ax lbProps.items[sel] )

catch ( val == undefined )

etValue.text = val as string

)

)

on etValue entered text do

(

try( setProperty ax lbProps.selected (text as (classof val)) ) catch( etValue.text = "Set Failed" )

)

on ax timer do

(

sliderTime = animationRange.start + (ax.CurrentPosition * (animationRange.end - animationRange.start))/(ax.selectionEnd - ax.selectionStart)

)

on ax PositionChange oldPos newPos do

(

format "[%, %]\n" oldPos newPos

)

)

nf = newRolloutFloater "Test ActiveX" 650 300

addRollout rActiveX nf

See also

Windows Media Player ActiveX Control

ActiveX Controls in MAXScript Rollouts


ImageList ActiveX Control

"Microsoft ImageList Control 6.0 (SP4)"
"MSComctlLib.ImageListCtrl.2"
"{2C247F23-8591-11D1-B16A-00C0F0283628}"

Description:

The ImageList ActiveX Control can be used to create, manage and supply images to other ActiveX Controls like the ListView ActiveX Control and the TreeView ActiveX Control to be used as icons.

Constructor:

activeXControl ilctrl "MSComctlLib.ImageListCtrl"

Properties:

.ImageHeight : integer

Get/Set the height of the image in pixels.

.ImageWidth : integer

Get/Set the width of the image in pixels.

.MaskColor : OLE_COLOR

Get/Set the mask color as OLE_COLOR value. The pixels with this color will show the background color when the .UseMaskColor property is set to true.

.UseMaskColor : boolean

When set to true, pixels matching the color specified by the .MaskColor property will not be drawn and will show the background color. When set to false, the .MaskColor will not be used.

.BackColor : OLE_COLOR

Defines the background color.

.Overlay Key1:undefined Key2:undefined

Defines the overlay keys.

.hImageList : OLE_HANDLE

Returns the OLE_HANDLE to the Image List for use in the windows.SendMessage method.

.ListImages : IImages

Returns the imageList array containing the stored images. It has its own Properties and Methods as described below:

ListImages Properties and Methods

Properties:

.ListImages.Count : integer

Returns the number of images stored in the ListImages array.

.ListImages[Index] : IImage

Returns the indexed image from the list. The index is 1-based.

Methods

.Add Index:undefined Key:undefined Picture:undefined

Adds a new image to the list. Index is the index of the image to be added, key is a user-defined name property to identify the image and picture is an IPictureDisp value returned by the loadPicture method

See the tutorial How To ... Develop a Scene Browser using TreeView ActiveX Control - Part Two for a practical example.

.Clear()

Removes all images from the list.

.Remove Index:undefined

Removes the indexed image from the list. Index is 1-based.

See also

ActiveX Controls in MAXScript Rollouts

ListView ActiveX Control

TreeView ActiveX Control

TabStrip ActiveX Control

How To ... Develop a Scene Browser using TreeView ActiveX Control - Part Two


Adobe Acrobat ActiveX Control

"Adobe Acrobat Control for ActiveX"
"PDF.PdfCtrl.5"
"{CA8A9780-280D-11CF-A24D-444553540000}"

Properties

.src : string

Get/Set the source PDF file.

Methods

.LoadFile fileName:string

Load a new PDF file.

.setShowToolbar On:Boolean

When the argument is false, the toolbar will be hidden. When the argument is true, the toolbar will be displayed.

.gotoFirstPage()

Positions the PDF document at the first page.

.gotoLastPage()

Positions the PDF document at the last page.

.gotoNextPage()

Moves to the next page in the PDF document.

.gotoPreviousPage()

Moves to the previous page in the PDF document.

.setCurrentPage n:integer

Sets the current page of the PDF document to the supplied integer argument.

.goForwardStack()

.goBackwardStack()

.setPageMode pageMode:string

Set the page mode to the supplied string argument.

.setLayoutMode layoutMode:string

Set the layout mode to the supplied string argument.

.setNamedDest namedDest:string

Set a named destination.

.Print()

Print the PDF document.

.printWithDialog()

Open the Print... dialog.

.setZoom percent:float

Set the Zoom to the specified float value.

.setZoomScroll percent:float left:float top:float

Set Zoom and Scroll to the specified float values.

.setView viewMode:string

Set the view to the specified view mode.

.setViewScroll viewMode:string offset:float

Set the view to the specified view mode and the offset to the specified float value.

.setViewRect left:float top:float width:float height:float

Set the view to the rectangular area defined by the upper left corner, width and height values.

.printPages from:integer to:integer

Print a range of pages.

.printPagesFit from:integer to:integer shrinkToFit:boolean

Print a range of pages with optional fitting.

.printAll()

Print all pages.

.printAllFit shrinkToFit:Boolean

Print a all pages, shrinking them to fit the paper format when the supplied argument is set to true.

.setShowScrollbars On:Boolean

Enable/Disable the Scrollbars display.

.AboutBox()

Open the About box. (Does not work at the moment)

Events

No events exposed by this control.

See also

ActiveX Controls in MAXScript Rollouts


Internet Explorer ActiveX Control

The following example creates an Internet Explorer browser control in a rollout and registers it as extended viewport.

Pick "Web Page" from the Extended Views menu to display the rollout in the webpage. Also click various hypertext links to see the text change in the viewports

SAMPLE SCRIPT

rollout rWebpage "Web page"

(

local txtObj

local vpsz = getViewSize()

activeXControl ax "http://www.yahoo.com" height:(vpsz.y-50) width:(vpsz.x-50) align:#center

fn checkTextObject =

(

if $text01 == undefined then

(

txtObj = text text:"" name:"text01"

addModifier txtObj (extrude amount:10)

txtObj.wirecolor = red

)

else ( txtObj = $text01 )

)

on rWebpage open do ( checkTextObject() )

on ax TitleChange txt do

(

checkTextObject()

if not (matchPattern txt pattern:"http:") then

(

if txtObj.text != text then

(

print txt

txtObj.text = txt

max tool zoomextents all

)

)

)

)

fWebPage = newRolloutFloater "Web page" rWebpage.vpsz.x rWebpage.vpsz.y

addRollout rWebPage fWebPage

registerViewWindow fWebPage

showProperties rWebpage.ax

WARNING!

Due to a change in ActiveX controls handling by Microsoft, URLs are ALWAYS expected to start with "http://". Thus, using just "www.yahoo.com" would work in 3ds Max 5 but not in 3ds Max 6 and higher!

See also

ActiveX Controls in MAXScript Rollouts


Excel Spreadsheet in Internet Browser Control as Extended Viewport

Creates a Microsoft Excel spreadsheet inside an embedded Microsoft Internet Explorer browser control. It also registers the rollout as an extended viewport -

SAMPLE SCRIPT

rollout rExcel "Excel"

(

activeXControl ax "e:\\test.xls" height:250 width:370 align:#center

)

fExcel = newRolloutFloater "Excel" 390 270

addRollout rExcel fExcel

format "----Application----"

showProperties rExcel.ax.application

format "----Parent----"

showProperties rExcel.ax.parent

format "----Container----"

showProperties rExcel.ax.container

-- In case of MS Excel .document points to the msexcel.workbook

workbook = rExcel.ax.document

format "----Document----"

showProperties workbook showHidden:true

showMethods workbook showHidden:false

props = getPropNames workbook

sort props

for prop in props do

(

try

(

format "\t%=%\n" (prop as string) (getProperty workbook prop)

) catch ()

)

See also

ActiveX Controls in MAXScript Rollouts


Shockwave Flash ActiveX Object Events

Here is a sample script that creates a text object and sets the text to FSCommand event argument value sent by shockwave flash objects:

EXAMPLE

rollout rFlash "Shockwave Flash Object"

(

local txtObj

fn checkTextObject =

(

if $text01 == undefined then

(

txtObj = text text:"" name:"text01"

addModifier txtObj (extrude amount:10)

txtObj.wirecolor = red

rotate txtObj 90 x_axis

)

else ( txtObj = $text01 )

)

activeXControl axFlash "{D27CDB6E-AE6D-11CF-96B8-444553540000}" height:200 width:300 align:#left

on axFlash OnReadyStateChange arg1 do format "handler: OnReadyStateChange : %\n" arg1

on axFlash OnProgress arg1 do format "handler: OnProgress : %\n" arg1

on axFlash FSCommand arg1 arg2 do

(

checkTextObject()

txtObj.text = arg1 + "+" + arg2

max tool zoomextents all

)

on rFlash open do

(

axFlash.movie = "e:\\Movie1.swf"

axFlash.movie = "e:\\Movie1.swf" -- need to load 2nd time sometimes

checkTextObject();

)

)

flashFloater = newRolloutFloater "Shockwave Flash Object" 350 300 10 10

addRollout rFlash flashFloater

See also

ActiveX Controls in MAXScript Rollouts


RolloutCreator Functions

RolloutCreator is a structure of functions for dynamically creating rollouts. The functions are implemented by a script located under stdplugs\stdscripts\baseLib\rolloutCreator.ms

Here are the implemented functions and their usage:

rolloutCreator <rollout_name> <rollout_caption>

Creates an instance of rolloutCreator, assign it to a variable,

FOR EXAMPLE

rci = rolloutCreator "myRollout" "My Rollout"

<rollout_creator>.begin()

This function needs to be called immediately after the instance is created, this does the initialization

<rollout_creator>.addControl <control_type> <control_name> <control_caption> [paramStr:<string>]

Adds a control to the rollout:

<control_type>

can be any of named rolloutControls eg: #button, #spinner, #activeXControl etc.

<control_name>

variable name of the control by which it is referred eg: #btnButton

<control_caption>

caption of the control "My Button"

[paramStr:]

an optional string representation of all the keyword parameters that needs to be passed to the control, for example: "width:100 height:20 align:#right"

FOR EXAMPLE

rci.addControl #button #myButton "My Button"

<rollout_creator>.addHandler <control_name> <event_type> [paramStr:<string>] [codeStr:<string>] [filter:<boolean>]

Adds an event handler for the controls previously added:

<control_name>

the variable passed during the control creation

<event_type>

any of the events supported by the control, eg: #changed, #pressed, #selected

[paramStr:<string>]

an optional string representation of all the positional and keyword parameters that are passed to the event

[codeStr:<string>]

a string representation of the event handler code, if the string contains sub-strings, enclose them in two '@' characters and pass on\true to the filter: parameter

FOR EXAMPLE

rci.addHandler #myButton #pressed codeStr:"MessageBox @Hey@" filter:on

This will add an event handler for button named "myButton". When the button is clicked, a messagebox pops up with the text "hey" in it.

The final result inside the rollout definition will look like this:

on myButton pressed do MessageBox "Hey"

ANOTHER EXAMPLE

rci.addHandler #myCheckbox #changed paramStr:"val" codeStr:"myOtherCheckbox.state = not value"

This will add an event handler for checkbox named "myCheckbox". When the state of the checkbox is changed, the state of another previously defined checkbox called "myOtherCheckbox" will also be changed to the inverted boolean value of the argument variable "val" which is passed the actual state of "myCheckbox".

The final result inside the rollout definition will look like this:

on myCheckbox changed val do myOtherCheckbox.state = not value

<rollout_creator>.end()

This function has to be called whenever all the required controls and their event handlers are called. This function forms the rollout string, evaluates it and returns the definition which can be passed to createDialog and addRollout functions.

<rollout_creator>.addLocal <string> [init:<value>]

This function can be used to add local variables to the rollout definitions. The variable’s value can be initialized by passing the init: value

string

Name of local variable

init:

Specifies initialization value of local

<rollout_creator>.addText <string> [filter:<boolean>]

This function is useful for adding functions to the rollout definitions. If the string contains sub-strings, enclose them in two '@' characters and pass true to the filter: parameter

string

String added to rollout definition.

COMPLETE EXAMPLE:

rci = rolloutCreator "myRollout" "My Rollout"

rci.begin()

rci.addControl #button #myButton "My Button"

rci.addHandler #myButton #pressed filter:on codeStr:"MessageBox @Isn't this cool@ title:@Wow@"

createDialog (rci.end())

ANOTHER EXAMPLE:

rfTest = rolloutCreator "rfTestN" "rfTestC"

-- Start creating the rollout

rfTest.begin()

rfTest.addControl #button #myButton "My Button" -- add a button

rfTest.addHandler #myButton #pressed filter:on codeStr:"MessageBox @Look to the \@Light\@ thing@"

rfTest.end()

createDialog rfTest.def


Visual MAXScript

Visual MAXScript is a direct-manipulation, multithreaded, forms-based editor that you can use to layout and edit MAXScript rollouts. Rollout scripts can be created from scratch in the forms editor, or use it to interactively edit and add to an existing rollout definition in a script editor window.

The layout editor can be accessed in two ways:

  • As a standalone Utility plug-in named "Visual MAXScript"

When accessed as a Utility through the Utility command panel, the layout editor operates in a "standalone" mode. Any forms created can either be exported as separate script files containing the rollout definition script or saved in a special .vms binary layout file that can be opened again by the Visual MAXScript utility. When used in this mode, any script files exported can be opened in script editor windows for further editing in MAXScript or merging with other script files.

  • Through two new menu items in the Edit menu in script editor windows

When accessed through the new script editor Edit menu items, the layout editor is designed for application to rollout definition sections in the active script editor. The "New Rollout" menu item is used to create a rollout definition from scratch. You place the cursor in the edit window where you want the newly-generated rollout code to be inserted and choose Tools > New Rollout. This opens the editor on a blank form to which you can add and arrange and edit rollout items. Choosing File>Save or hitting the Save icon in the layout editor window will cause the script for the rollout to be inserted at that point in the editor window. Subsequent edits and saves while the layout editor is still open cause that inserted code to be updated.

The "Edit Rollout" item (hotkey F2), is used to edit an existing rollout definition in the active script editor. You place the cursor anywhere inside a rollout or utility definition, choose Tools>Edit Rollout (F2), and the layout editor is opened showing that rollout. You can edit and add to the rollout in the layout editor and when you choose File>Save or click the Save icon in the layout editor, the original definition is replaced with new code corresponding to the edited rollout. Subsequent changes and saves while the layout editor is still open cause that code to be updated each time.

Features

  • You can have more than one layout editor open at a time This allows you to cut and paste operations between them. Also, note that cutting and pasting in VMS also copies event code.

  • When opened from a script editor window, the text in that editor window becomes 'frozen' while the layout editor is open. The editor window can be brought to the front and scrolled and saved, but any other operation will be ignored and a beep will sound. The editor will 'unfreeze' as soon as you close the layout editor.

  • The Edit>Edit Rollout function can be applied to any existing rollout definition. It attempts to parse the definition and open an equivalent editable version in the layout editor. This is a somewhat tricky heuristic and may well fail for certain rollouts until we get the bugs out. MAXScript preserves all the code in the rollout and updates only those parts that correspond to the things you can edit in the layout editor, namely, UI items and their handlers.

  • Code generated by the layout editor always specifies explicit pos: width: and height: parameters for UI items, it does not use align:, offset:, or any of the other auto-layout parameters. This means that any rollout that you edit that uses automatic layout will be transformed into an explicitly-positioned layout when you do the first File>Save. It is quite difficult to preserve the auto-layout parameters under arbitrary edits in the editor and the assumption is that once you start editing a rollout using the layout editor you will continue to do so.

    • NOTE:

    An extreme example of this is the group ( ) construct which is used to nest a set of items in a group box. Nested group ( ) constructs are removed completely by the layout editor and replaced with new groupBox UI items that define an explicitly-sized box around the original items. You can edit and add and nest groupBoxes as needed in the editor.

    • If there is a syntax error in a rollout definition being opened by Edit>Edit Rollout, the syntax error is reported and highlighted and the layout editor does not open - it can only be opened on error free source.

    • When you first edit or create a rollout in the layout editor, it defaults to the standard width for Command Panel rollouts. You can adjust this width in the editor by resizing the outer gray rectangle and the editor emits width: and height: parameters on the generated rollout header. You can edit these numbers in the script editor and they will be honored by the layout editor when you next edit that rollout.

    For command panel rollouts and other scripted plug-ins, there are now symbolic constants provided that produce the correct width automatically. These are:

    #cmdPanel

    #effectsDlg

    #mtlEditor

    So, to set up the rollout for a scripted material , you'd add a width: parameter to the rollout header like this:

    EXAMPLE

    rollout foo "Frabulation" width:#mtlEditor

    (

    ...

    • You add new UI items by clicking its button in the item toolbar at the bottom and then dragging out a rectangle for it in the main form. You can select an existing item and edit its paramters in the property list on the right. You can select multiple items by fence-dragging or ctrl-clicking and perform various alignments operations, see the Layout menu. A selected item can be deleted by clicking the red X toolbar button. The various panes can be resized or even torn off if you want to customize the editor layout.

    • Axis restriction works by holding the shift down while moving objects. This will restrict movement to the X or Y axis based on the angle of the mouse from its initial position.

    • editText boxes in the editor can now be multi-line, consistent with the mulit-line editText in MAXScript .

    • Editing in the Array editor dialog has been rationalized and improved. Clicking on an item in the list box toggles the selection state of it. When items are selected in the list box, changing text in the edit field and hitting enter changes all the selected items to what was in the edit box, this allows for editing of entries in the middle of the list.

    • A new custom item type has been added to the item type toolbar at the bottom of the VisualMS dialog, allowing custom items to be created from scratch in the editor. Its icon appears in the toolbar as a face in profile. When first created, the item class parameter in the parameter list shows as '???' and must be edited to contain the desired custom item type.

    • An ActiveX control rollout item type is available in MAXScript. The icon for it appears in the UI item toolbar at the bottom of the VisualMS dialog, as a dot array with the word OLE superimposed. See ActiveX Controls in MAXScript Rollouts

    • Editing an existing rollout source that contains any unrecognized UI item types, such as those added from 3rd-party .dlx MAXScript extensions appear in the VisualMS rollout window as new 'custom' items, displaying as a rectangle containing the new 'custom' type icon. Any definition parameters on are displayed and editable in the parameter list, and overall position and size of the bounding rectangle of the custom type can be edited in the rollout pane.

    • You can de-select everything by clicking in the white space around the main form.

    • The main form always has a black rectangle drawn around it even when deselected. This allows you to see the form if both the background of the application and the form are the same color.

    • Resizing of the main form now snaps to the grid if it is on.

    • The paste command now works much better. Pasted objects are offset by [10,10] pixels, maintain unique names, and then pasting everything is de-selected and the pasted objects get selected.

    • When editing an existing rollout definition that makes use of autmatic layout in VMS for the first time, it is highly recommended that you add a 'width:n' parameter to the rollout header first so that the editor can position items correctly.If no width: parameter is supplied, it defaults to Command Panel width which may be too small for floating window rollouts or scripted materials or effects.

    For rollouts that will appear in a rolloutFloater, you should set the rollout width: equal to the floater window width minus 30.

    EXAMPLE

    rollout foo "Frabulation" width:#270

    (

    ...

    )

    ...

    rf = newRolloutFloater "Frabo" 300 220

    addRollout foo rf


max Commands

The general syntax for max commands is:

max <command_name>

MAXScript allows you to invoke 3ds Max menu and toolbar commands from within scripts using the max construct.

EXAMPLE:

max file open

max unhide all

max hold

max time play

The keyword max is followed by one or more words that describe the command. The available commands can be displayed using the '?' character in a partial max command:

max time ? -- show all the time-related commands

max sel ? -- show all the commands with 'sel' in them as a substring

max ? -- show all the commands (there are a lot!)

The max command always returns the system value ok.

NOTE:

The max spacebar max command appears to do nothing when invoked from the Listener window, because the spacebar command is window-specific and only locks selections in the active window. Because it is the Listener window that is active, 3ds Max effectively ignores this command.

3ds Max Command Name | Command description
max ? | Displays all max commands to listener
max accel pan | Activates viewport Pan mode
max acthomegrid max activate home grid | Makes home grid the active grid
max activate grid object | Makes selected grid the active grid
max adaptive persp grid max adaptive perspective grid toggle | Changes look of grid in non-orthographic viewports.
max align | Activates Align mode
max align normals max alignnormals | Activates Align Normals mode
max align camera | Places you in Align Camera mode
max angle snap toggle | Toggles Angle Snap toggle
max apply ik | Same as clicking Apply IK button in Hierarchy/IK panel
max array | Displays Array dialog
max backface max backface cull toggle | Toggles Backface Cull for selected objects
max background max background display toggle | Displays Viewport Background dialog
max bind space warp mode max bindwsm | Activates Bind to Space Warp mode
max box mode max box mode selected | Toggles Display as Box for selected objects
max box mode toggle max box toggle | Toggles active viewport’s shading mode to/from Bounding Box
max configure paths | Displays Configure Paths dialog
max create mode | Sets Create command mode active
max customize UI | Displays Customize User Interface dialog
max cycle select | Cycles through Selection Region types - Rectangular, Circular, Fence
max cycle sublevel max cycle subobject level | Cycles through sub-object levels. Must be in Modify panel with Sub-Object active.
max default lighting toggle max def lgt toggle | Toggles between default viewport lights and scene lights for viewport rendering
max delete | Deletes selected objects or sub-objects
max display floater | Displays Display Floater dialog
max display mode | Sets Display command mode active
max dolly max dolly mode | Activates Zoom/Dolly mode
max drawingaids max drawing aids | Displays Grid and Snap Setting dialog
max fetch | Activates Edit/Fetch - displays About to Fetch dialog
max file archive | Activates File/Archive - performs a scene file archive operation
max file export selected | Activates File/Export Selected - displays Select File to Export dialog
max file import | Activates File/Import - displays Select File to Import dialog
max file insert tracks | Activates File/Merge - displays Merge Animation dialog
max file merge | Activates File/Merge - displays Merge File dialog
max file new | Activates File/New
max file open | Activates File/Open - displays Open File dialog
max file preferences | Activates Customize/Preferences - displays Preference Settings dialog
max file replace | Activates File/Replace - displays Replace File dialog
max file save | Activates File/Save
max file saveas | Activates File/Save As - displays Save File As dialog
max file xref object | Activates File/XRef Objects - displays XRef Objects dialog
max file xref scene | Activates File/XRef Scenes - displays XRef Scenes dialog
max fov | Activates Region Zoom/FOV/Falloff mode
max freeze inv | Freezes non-selected objects. Same as clicking Freeze Unselected in Display panel.
max freeze selection | Freezes selected objects. Same as clicking Freeze Selected in Display panel.
max fullinteract | No operation
max grid nudge down | Nudges active grid down
max grid nudge up | Nudges active grid up
max grid toggle | Toggles display of active grid in active viewport
max grids align | Aligns active grid to active viewport
max group attach | Enters Attach Object to Group mode - user clicks on group to attach selected objects to the group
max group close | Closes active group
max group detach | Detaches selected objects from group
max group group | Groups selected objects - displays Group dialog
max group open | Opens selected group
max group ungroup | Ungroups objects in selected group
max help about | Activates Help/About - displays the About 3ds Max dialog
max hide camera toggle | Toggles Camera in Hide by Category rollout in Display panel.
max hide command panel toggle | Toggles display of command panel
max hide floating toolbars toggle | Toggles display of floating toolbars
max hide helper toggle | Toggles Helpers in Hide by Category rollout in Display panel.
max hide inv | Hides un-selected objects. Same as clicking Hide Unselected in Display panel.
max hide light toggle | Toggles Lights in Hide by Category rollout in Display panel.
max hide main toolbar toggle | Toggles display of main toolbar
max hide object toggle | Toggles Geometry in Hide by Category rollout in Display panel.
max hide tab panel toggle | Toggles display of Tab Panel
max hide selection | Hides selected objects. Same as clicking Hide Selected in Display panel.
max hide shape toggle | Toggles Shapes in Hide by Category rollout in Display panel.
max hide system toggle | Toggles Particle Systems in Hide by Category rollout in Display panel.
max hide wsm toggle | Toggles Space Warps in Hide by Category rollout in Display panel.
max hierarchy mode | Sets Hierarchy command mode active
max hold | Activates Edit/Hold
max ik terminator | Toggles Terminator in Hierarchy/IK, Object Parameters rollout
max ipan | Interactive Pan - places center of active viewport at current mouse location
max izoom in | Interactive Zoom In - zooms in active viewport at current mouse location
max izoom out | Interactive Zoom Out - zooms out active viewport at current mouse location
max key mode | Toggles Key Mode Toggle
max link | Activates Link mode
max load custom UI | Activates Customize/Load Custom UI - displays Load UI File dialog
max lock UI layout | Toggles locking of the UI layout
max material browser | Displays the Material/Map Browser dialog
max mirror | Activates Mirror mode - displays Mirror dialog
max modify mode | Sets Modify command mode active
max motion mode | Sets Motion command mode active
max move | Activates Select and Move mode
max mtledit | Activates Tools/Material Editor - displays Material Editor dialog
max next mod | Moves up one level in modifier stack
max override | Toggles Degradation Override. Executing this command works on the active window only, so if executed from Listener does nothing.
max pancamera | Activates Arc Rotate/Orbit mode
max panview | Activates Pan/Truck mode
max persp | Activates Zoom All/Perspective/Hotspot mode
max prev mod | Moves down one level in modifier stack
max preview | Activates Rendering/Make Preview - displays Make Preview dialog
max properties | Displays Object Properties dialog
max quick render | Performs Quick Render
max redo | Performs Redo operation
max renamepreview | Activates Rendering/Rename Preview - displays Save Preview As dialog
max render last | Performs Render Last
max render scene | Activate Render Scene - displays Render Scene dialog
max reset file | Activates File/Reset
max revert custom UI | Activates Customize/Revert to Startup UI - displays confirmation dialog
max rns | Activates Edit/Edit Named Selections - displays Edit Named Selection dialog
max roll | Activates Roll mode - active viewport must camera or light viewport
max rotate | Activates Select and Rotate mode
max rotateview | Activates Arc Rotate/Orbit mode
max save custom UI as | Activates Customize/Save Custom UI As - displays Save UI File as dialog
max safeframe toggle | Toggles viewport Show Safe Frames
max saveplus | Activates File/Save As in incremental file naming mode
max scale | Activates Select and Scale mode
max scale cycle | Cycles through Scale modes - Scale, Non-Uniform Scale, Squash
max select | Activates Select mode
max select all | Activates Edit/Select All - selects all objects
max select by color | Activates Edit/Select by Color - user then picks object, all objects with same wireframe color selected
max select child | Selects all 1st level children of currently selected objects
max select invert | Activates Edit/Select Invert
max select none | Activates Edit/Select None
max select parent | Selects parents of currently selected objects
max selection floater | Displays Selection Floater dialog
max set key all position | Set position keys
max set key all postion rotation and scale | Set position, rotation, and scale keys
max set key all rotation | Set rotation keys
max set key all scale | Set scale keys
max set key all x postion | Set key on X track of position XYZ controllers
max set key all x rotation | Set key on X track of rotation XYZ controllers
max set key all x scale | Set key on X track of scale XYZ controllers
max set key all y postion | Set key on Y track of position XYZ controllers
max set key all y rotation | Set key on Y track of rotation XYZ controllers
max set key all y scale | Set key on Y track of scale XYZ controllers
max set key all z postion | Set key on Z track of position XYZ controllers
max set key all z rotation | Set key on Z track of rotation XYZ controllers
max set key all z scale | Set key on Z track of scale XYZ controllers
max set key clear | Clear pending changes
max set key customattributes filter | Toggle Custom Attributes filter in the Key Filters window
max set key ikparams filter | Toggle IK Parameters filter in the Key Filters window
max set key keys | Set Keys for all filtered keyable tracks
max set key materials filter | Toggle Materials filter in the Key Filters window
max set key mode | Toggle the Set Key mode
max set key modifiers filter | Toggle Modifiers filter in the Key Filters window
max set key objectparams filter | Toggle the Object Parameters filter in the Key Filters window
max set key on selected | Same as hitting Set Keys but always on selected nodes (ignores Character dropdown setting)
max set key position filter | Toggle the Position filter in the Key Filters window
max set key rotation filter | Toggle the Rotation filter in the Key Filters window
max set key scale filter | Toggle the Scale filter in the Key Filters window
max shade selected | Toggles Views/Shade Selected
max show last img | Displays last rendered image
max showaxisicon | Toggles Views/Show Transform Gizmo
max showhomegrid | Toggles display of home grid
max snap toggle | Toggles Snap Toggle
max spacebar | Toggles Lock Selection Set. Executing this command works on the active window only, so if executed from Listener does nothing.
max spacing tool | Displays Spacing Tool dialog
max spinsnap toggle | Toggles Spinner Snap Toggle
max subobject sel | Toggles Sub-Object button in Modify panel
max swap layouts | No operation - no A/B layout any more
max texture correct | Toggles viewport Texture Correction
max time back | Sets time slider to previous frame or keyframe (Previous Frame/Previous Key)
max time config | Displays Time Configuration dialog
max time end | Sets time slider to end frame (Go to End)
max time forward | Sets time slider to next frame or keyframe (Next Frame/Next Key)
max time play | Plays animation
max time start | Sets time slider to start frame (Go to Start)
max toggle key mode | No operation
max toggle keyboard shortcuts | Toggles Plug-in Keyboard Shortcut Toggle
max toggle ik | Toggles IK Toggle
max toggle sound | Toggles Active in Audio group of Sound Options dialog
max tool animmode | Taggles Animate button
max tool center | Cycles through transform centers - Pivot Point, Selection, Transform
max tool dualplanes | Toggles state of Use Dual Planes in Preference Settings dialog, Viewports tab.
max tool hlist | Activates Select by Name - displays Select Objects dialog
max tool maximize | Maximizes/Minimizes active viewport
max tool x | Activates Restrict to X
max tool xy | Activates Restrict to XY
max tool y | Activates Restrict to Y
max tool z | Activates Restrict to Z
max tool zoom | Activates Zoom/Dolly mode
max tool zoomall | Activates Zoom All
max tool zoomextents | Activates Zoom Extents
max tool zoomextents all | Activates Zoom Extents All
max tool zoomregion | Activates Zoom Region/FOV/Falloff mode
max trajectories | Toggles trajectory display for selected objects
max treeview | Activates Track View/Open Track View - displays Track View dialog
max truck | Activates Pan/Truck mode
max tti | Activates Tools/Transform Type-In - display Transform Type-In dialog
max undo | Performs undo operation
max unfreeze all | Unfreezes all objects. Same as clicking Unfreeze All in Display panel.
max unfreeze by hit | Activates Unfreeze by Hit mode. Same as clicking Unfreeze by Hit in Display panel.
max unfreeze by name | Displays Unfreeze Objects dialog. Same as clicking Unfreeze by Name in Display panel.
max unhide all | Unhides all objects. Same as clicking Unhide All in Display panel.
max unhide by name | Displays Unhide Objects dialog. Same as clicking Unhide by Name in Display panel.
max unitsetup | Activates Customize/Units Setup - displays Units Setup dialog
max unlink | Unlinks selected objects from their parents
max utility mode | Sets Utility command mode active
max videopost | Activates Rendering/Video Post - displays Video Post dialog
max view file | Activates File/View File - displays View File dialog
max view redo | Performs viewport redo operation
max viewpreview | Activates Rendering/View Preview - displays last preview
max views redraw | Redraws all viewports
max views undo | Performs viewport undo operation
max vpt back | Sets active viewport to Back
max vpt bottom | Sets active viewport to Bottom
max vpt camera | Sets active viewport to Camera. If only 1 camera in scene, or a camera is selected, that camera will be used for the viewport. If there is more than one camera, and no cameras are selected, the Select Camera dialog will be displayed. If there is no camera in the scene, a No Camera in Scene warning is displayed.
max vpt disable | Toggles Disabled state of active viewport
max vpt front | Sets active viewport to Front
max vpt grid | Sets active viewport to Grid
max vpt iso user | Sets active viewport to User
max vpt left | Sets active viewport to Left
max vpt persp user | Sets active viewport to Perspective
max vpt right | Sets active viewport to Right
max vpt shape | Sets active viewport to Shape
max vpt spot | Sets active viewport to Spotlight. If only 1 spotlight/directional light in scene, or a spotlight/directional light is selected, that light will be used for the viewport. If there is more than one spotlight/directional light, and no lights are selected, the Select Light dialog will be displayed. If there is no spotlight/directional light in the scene, a No Light in Scene warning is displayed.
max vpt tab | Cycles between Restrict to axes - X, Y, Z, XY
max vpt top | Sets active viewport to Top
max vpt track | Sets active viewport to Track View
max vptconfig | Activates Customize/Viewport Configuration - displays Viewport Configuration dialog
max wire facet | Sets active viewport shading mode to Facets + Highlights
max wire smooth | Sets active viewport shading mode to Wireframe
max zoom in 2x | Zooms in active viewport by 2x
max zoom in 2x all | Zooms in all viewports by 2x
max zoom out 2x | Zooms out active viewport by 2x
max zoom out 2x all | Zooms out all viewports by 2x
max zoomext sel | Activates Zoom Extends Selected
max zoomext sel all | Activates Zoom Extends All Selected


3ds Max User Interface Colors

The following methods are used to get and set the 3ds Max user interface colors.

GetUIColor <index_integer>

Returns a Point3 value corresponding to the color value used for drawing the specified item type in the 3ds Max viewports. Each component of the Point3 value is in a range of 0 to 1, corresponding to a color component value of 0 to 255. See the list of <index_integer> values below.

GetDefaultUIColor <index_integer>

Returns a Point3 value corresponding to the default color used for drawing the specified item type in the 3ds Max user interface. Each component of the Point3 value is in a range of 0 to 1, corresponding to a color component value of 0 to 255. The values returned are not affected by the user's color selections or those set by SetUIColor(). See the list of <index_integer> values below.

SetUIColor <index_integer> <point3>

Sets the color value used for drawing the specified item type in the 3ds Max viewports. Each component of the Point3 value is in a range of 0 to 1, corresponding to a color component value of 0 to 255. See the list of <index_integer> values below.

The valid <index_integer> values and the corresponding item type are as follow:

INDEX | CODE | UI | ITEM
0 | COLOR_SELECTION | Main UI | Selection
1 | COLOR_SUBSELECTION | Main UI | Subselection
2 | COLOR_FREEZE | Main UI | Freeze
3 | COLOR_GRID | Grids | Grid
4 | COLOR_GRID_INTENS | Grids | Grid Intensity
5 | COLOR_SF_LIVE | Main UI | Safe Frame Live
6 | COLOR_SF_ACTION | Main UI | Safe Frame Action
7 | COLOR_SF_TITLE | Main UI | Safe Frame Title
8 | COLOR_VP_LABELS | Main UI | Viewport Label
9 | COLOR_VP_INACTIVE | Main UI | Inactive Viewport Label
10 | COLOR_ARCBALL | Main UI | Arcball
11 | COLOR_ARCBALL_HILITE | Main UI | Arcball Highlight
12 | COLOR_ANIM_BUTTON | Main UI | Animate Button
14 | COLOR_LINK_LINES | Gizmos & Apparatuses | Bones and Link Lines
15 | COLOR_TRAJECTORY | Gizmos & Apparatuses | Trajectory
16 | COLOR_ACTIVE_AXIS | Gizmos & Apparatuses | Active Axis
17 | COLOR_INACTIVE_AXIS | Gizmos & Apparatuses | Inactive Axis
18 | COLOR_SPACE_WARPS | Objects | Space Warp
19 | COLOR_DUMMY_OBJ | Objects | Dummy Object
20 | COLOR_POINT_OBJ | Objects | Point Object
21 | COLOR_POINT_AXES | Objects | Point Axis
22 | COLOR_TAPE_OBJ | Objects | Tape Object
24 | COLOR_GIZMOS | Gizmos & Apparatuses | Gizmos
25 | COLOR_SEL_GIZMOS | Gizmos & Apparatuses | Selected Gizmos
26 | COLOR_SPLINE_VECS | Main UI | Spline Vectors
27 | COLOR_SPLINE_HANDLES | Main UI | Spline Handles
29 | COLOR_PARTICLE_EM | Gizmos & Apparatuses | Particle Emitter
30 | COLOR_CAMERA_OBJ | Objects | Camera Object
31 | COLOR_CAMERA_CONE | Gizmos & Apparatuses | Camera Cone
32 | COLOR_CAMERA_HORIZ | Gizmos & Apparatuses | Camera Horizon
33 | COLOR_NEAR_RANGE | Gizmos & Apparatuses | Camera Near Range
34 | COLOR_FAR_RANGE | Gizmos & Apparatuses | Camera Far Range
35 | COLOR_LIGHT_OBJ | Objects | Light Object
36 | COLOR_TARGET_LINE | Gizmos & Apparatuses | Target Line
37 | COLOR_HOTSPOT | Gizmos & Apparatuses | Light Hotspot
38 | COLOR_FALLOFF | Gizmos & Apparatuses | Light Falloff
39 | COLOR_START_RANGE | Gizmos & Apparatuses | Light Far Start
40 | COLOR_END_RANGE | Gizmos & Apparatuses | Light Far End
41 | COLOR_VIEWPORT_BKG | Main UI | Viewport Background
42 | COLOR_TRAJ_TICS_1 | Gizmos & Apparatuses | Trajectory Frames 1
43 | COLOR_TRAJ_TICS_2 | Gizmos & Apparatuses | Trajectory Frames 2
44 | COLOR_TRAJ_TICS_3 | Gizmos & Apparatuses | Trajectory Frames 3
45 | COLOR_GHOST_BEFORE | Main UI | Ghost (Before)
46 | COLOR_GHOST_AFTER | Main UI | Ghost (After)
47 | COLOR_12FIELD_GRID | Main UI | 12-Field Grid
48 | COLOR_START_RANGE1 | Gizmos & Apparatuses | Light Near Start
49 | COLOR_END_RANGE1 | Gizmos & Apparatuses | Light Near End
50 | COLOR_CAMERA_CLIP | Gizmos & Apparatuses | Camera Clip
51 | COLOR_NURBS_CV | Main UI | NURBS Control Vertex
52 | COLOR_NURBS_LATTICE | Main UI | NURBS Lattice
53 | COLOR_NURBS_CP | Main UI | NURBS Con Point
54 | COLOR_NURBS_FP | Main UI | NURBS Fit Point
55 | COLOR_NURBS_DEP | Main UI | NURBS Dep Object
56 | COLOR_NURBS_ERROR | Main UI | NURBS Error Object
57 | COLOR_NURBS_HILITE | Main UI | NURBS Hilite
58 | COLOR_NURBS_FUSE | Main UI | NURBS Fuse
59 | COLOR_END_EFFECTOR | Gizmos & Apparatuses | End Effector
60 | COLOR_END_EFFECTOR_STRING | Gizmos & Apparatuses | End Effector String
61 | COLOR_JOINT_LIMIT_SEL | Gizmos & Apparatuses | Selected Joint Limits
62 | COLOR_JOINT_LIMIT_UNSEL | Gizmos & Apparatuses | Joint Limits
63 | COLOR_IK_TERMINATOR | Gizmos & Apparatuses | IK Terminator
64 | COLOR_SF_USER | Main UI | Safe Frame User
65 | COLOR_VERT_TICKS | Main UI | Vertex Ticks
66 | COLOR_XRAY | Main UI | See Through
67 | COLOR_GROUP_OBJ | Objects | Group Object
68 | COLOR_MANIPULATOR_X | Gizmos & Apparatuses | Transform Gizmo X
69 | COLOR_MANIPULATOR_Y | Gizmos & Apparatuses | Transform Gizmo Y
70 | COLOR_MANIPULATOR_Z | Gizmos & Apparatuses | Transform Gizmo Z
71 | COLOR_MANIPULATOR_ACTIVE | Gizmos & Apparatuses | Active Transform Gizmo
72 | COLOR_VPT_CLIPPING | Main UI | Viewport Clipping
73 | COLOR_DECAY_RADIUS | Gizmos & Apparatuses | Light Decay Start
74 | COLOR_VERT_NUMBERS | Main UI | Vertex Numbers
75 | COLOR_CROSSHAIR_CURSOR | Main UI | Cross Hair Cursor
76 | COLOR_SV_WINBK | Other Views | SV Window Bkg
77 | COLOR_SV_NODEBK | Other Views | SV Node Bkg
78 | COLOR_SV_SELNODEBK | Other Views | SV Selected Node Bkg
79 | COLOR_SV_NODE_HIGHLIGHT | Other Views | SV Node Highlight
80 | COLOR_SV_MATERIAL_HIGHLIGHT | Other Views | SV Material Highlight
81 | COLOR_SV_MODIFIER_HIGHLIGHT | Other Views | SV Modifier Highlight
82 | COLOR_SV_PLUGIN_HIGHLIGHT | Other Views | SV Plugin Highlight
83 | COLOR_SV_SUBANIM_LINE | Other Views | SV Sub-Anim Line
84 | COLOR_SV_CHILD_LINE | Other Views | SV Child Line
85 | COLOR_SV_FRAME | Other Views | SV Frame
86 | COLOR_SV_SELTEXT | Other Views | SV Selected Label
87 | COLOR_SV_TEXT | Other Views | SV Label
88 | COLOR_UNSEL_TAB | Main UI | Unselected Tabs
89 | COLOR_ATMOS_APPARATUS | Gizmos & Apparatuses | Atmospheric Apparatuses
90 | COLOR_SUBSELECTION_HARD | Main UI | SubSelection Hard
91 | COLOR_SUBSELECTION_MEDIUM | Main UI | SubSelection Medium
92 | COLOR_SUBSELECTION_SOFT | Main UI | SubSelection Soft
93 | COLOR_SV_UNFOLD_BUTTON | Other Views | SV Unfold Children Button
94 | COLOR_SV_GEOMOBJECT_BK | Other Views | SV Geometry Node Bkg
95 | COLOR_SV_LIGHT_BK | Other Views | SV Light Node Bkg
96 | COLOR_SV_CAMERA_BK | Other Views | SV Camera Node Bkg
97 | COLOR_SV_SHAPE_BK | Other Views | SV Shape Node Bkg
98 | COLOR_SV_HELPER_BK | Other Views | SV Helper Node Bkg
99 | COLOR_SV_SYSTEM_BK | Other Views | SV System Node Bkg
100 | COLOR_SV_CONTROLLER_BK | Other Views | SV Controller Node Bkg
101 | COLOR_SV_MODIFIER_BK | Other Views | SV Modifier Node Bkg
102 | COLOR_SV_MATERIAL_BK | Other Views | SV Material Node Bkg
103 | COLOR_SV_MAP_BK | Other Views | SV Map Node Bkg


Action Manager

All Action Items are macro recorded when executed. This includes main menus items, CUI buttons, keyboard shortcuts and quad menu items.

THE CODE EMITTED FOR MANY ACTION ITEMS LOOKS LIKE:

actionMan.executeAction 0 "50002" -- Tools: Rotate Mode

The MAXScript Interface: actionMan has a function called "executeAction". It takes as parameters the ID of the action table and the "persistent id" of the action. A comment string that includes the category and tooltip for the action follows it. Some action items have custom code emitters that emit better looking code.

This interface is currently intended only for running macro recorded actions.

NOTE:

There is no way currently to query the action manager for all the available action items.

actionMan.loadKeyboardFile "KbdFile.kbd"

This loads the named keyboard file from the current UI directory.

actionMan.saveKeyboardFile "KbdFile.kbd"

Saves the current keyboard configuration into the given file name in the UI directory.

actionMan.getKeyboardFile()

Returns the full path to the current keyboard file.

See also

Interface: actionMan

The Macro Recorder

Defining Macro Scripts

The MAXScript Listener Window

Turning On the Listener Log

Listener Commands


Shortcut system replaced

The "shortcuts" feature found in versions prior 3ds Max 4 has been removed. In it's place you can use macro-recording of actions.

To determine how to invoke an action from MAXScript, you should go to the UI customization dialog and put that action on a button, menu or keyboard shortcut. Then turn on macro recording and execute the action.

The code that is emitted can be cut and pasted in to your script.

If you turn on macro recording and start using the menu, quad menu or toolbar, you'll see code emitted that looks like this

EXAMPLE:

actionMan.executeAction 0 "59225" -- Manipulate Mode

This is code that will execute the same action as pressing the "Manipulate Mode" button. The comment is also generated, and it uses the action's tool tip. The parameters of "actionMan.executeAction" are the integer ActionTableId of the table the action comes from, and the "persistent id" if the action. Actions exported from core all have persistent ids that are fixed integers as a string.

Actions are accessible, all that you need to know are the ActionTableId and the persistent ID in order to invoke the operation.

NOTE:

Certain actions emit much better code. If an action is exported using a function published action table, then the code it emits calls that function. For example, if you bring up the "Plug-in Manager" from the customize menu, the code emitted is:

Plug-in_Manager.Plug-inMgrAction.show ()

If the action comes from a macro script, which many of our actions do, the code looks like:

macros.run "Modifiers" "Bend"

See also

Action Manager

Interface: actionMan


Color Picker Dialog

The following method can be used to create a color picker dialog without using a colorPicker rollout control.

This method is available in 3ds Max 2008 and higher. It was previously available in the [ AVG ] Avguard Extensions.

colorPickerDlg <init_color> <title_string> alpha:<bool> pos:<&Point2>

Displays a modal color picker.

init_color is the initial color

title_string is displayed in the title bar of the color picker.

If alpha: is true, the color picker supports alpha.

pos: specifies the position of the dialog.

If pos: is specified as a by-reference variable, the position of the dialog when closed is written back to the specified variable.

If pos: is not specified, the dialog is displayed at its last position.

If pos: is [-1,-1], the dialog is displayed centered on the 3ds Max window.

If the color picker is closed other than via pressing OK, a value of 'undefined' is returned.

EXAMPLE USAGE:

colorPickerDlg (color 100 200 300) "Pick A Better Color:" alpha:true pos:[100,100]

RESULT:

See also

Colorpicker Rollout Control


Command Line Rendering

Command line rendering in 3ds Max 6 and higher also allows MAXScript execution - so-called pre-render scripts can be executed before the rendering starts. Below are the supported command line options, including the one related to MAXScript.

Command Line Options

-?

Displays a short help listing the options

@command_file

Command line options in a file. That is, you can list all the options you want in a text file, one per line and pass the file as the command line argument.

-c:camera_name

Define camera to render

-f:frames

Frame list "1,10,30-100" or "all"

-g

Generate job description file (XML). You can use this option to create a job description file from scratch (in order to edit and resubmit it). The tool will parse the scene file, accept whatever other command line option you've given and create a proper job description file.

-h:height

New output height

-j:job_file

Use job description file. You would use this to pass an exiting job description file.

-n:job_name

New job name. Used to rename a job. This is only an issue when submitting a scene to the network. The job description file and the scene file must be the name of the scene. As there cannot be two jobs with a same name, you use this to rename it prior to submitting it to the network.

-k:network_mask

Defines a network mask other than 255.255.255.0. Only an issue when submitting a scene to the network. If you don't know what this is, you don't need it. If you need it and you don't know it, this is one of those occasions you must (no matter how much I hate those messages) talk to your network administrator.

-o:output_file

New output file. Defines a new path and name for the output image file max will be rendering to.

NOTE:

You cannot change the file type (i.e. from Jpeg to AVI) as there is no way to set these from outside max. If you try giving a different extension the tool will simply ignore it and use the original one.

-p:port

Manager port (for submission). Only an issue when submitting a scene to the network. If you don't know what this is, you don't need it.

-r

Render (not to be used with -s). This is the default (if no option is given). It exists because if you use the -g option, the scene won't render unless you have this option. That is, this is the default unless you specify -g.

-s[:manager_name]

Submit to job to network queue (and optionally providing a manager's name or IP address). It cannot be used with -r.

-t:script_file

Attaches a pre-render MAXScript. Use this option to attach a MAXScript to the scene. If used, the script will be executed prior to the renderer starting. Note that you can use this for both local render (-r) and network render (-s). If submitting to the network, the script will be archived along with the scene and sent to all servers participating. The script can be any MAXScript without UI access.

WARNING!

Care should be taken in order to avoid calling any UI functions - they will not work and may cause servers to get stuck!

-v:level

Verbose level (0 - 5). How much you want the tool to tell you what it is doing. A value of 0 will give you absolutely nothing. A value of 1 will only show errors. A value of 2 will give you errors and some progress information. Values 3, 4, and 5 will give you progressively more information.

-w:width

New output width.

-x

Show examples. Use this option to see some examples for the above options.


Command Panels

The following methods are used to get or set the active command panel:

setCommandPanelTaskMode [mode:]<panel_name>

Sets the specified command panel as active. The valid panel_name values are:

#create -- Create Panel

#modify -- Modify Panel

#hierarchy -- Hierarchy Panel

#motion -- Motion Panel

#display -- Display Panel

#utility -- Utility Panel

The syntax of SetCommandPanelTaskMode was modified in 3ds Max 7 so that the panel name to switch to can either be specified as the mode keyword argument, or simply as the argument to the method.

The following are equivalent:

setCommandPanelTaskMode #modify

setCommandPanelTaskMode mode:#modify

getCommandPanelTaskMode()

Returns the current command panel as a name value. The name values correspond to the panel_name values for SetCommandPanelTaskMode().

suspendEditing which:<panel_name> alwaysSuspend:<bool>

resumeEditing which:<panel_name> alwaysSuspend:<bool>

Suspend/resume rollout display in the command panels. The panel_name values are as described for the setCommandPanelTaskMode command.

If which: is not specified, all panels are suspended or resumed.

If alwaysSuspend: is true (default is true), the panel is suspended even if the panel is not selected when the command is run.

NOTES:

Only Modify, Hierarchy, and Motion panels support suspend/resume.

If the steps between the SuspendEditing and the ResumeEditing can throw an exception, the steps should be performed in a try/catch so that the editting state can be properly restored.

The following 3ds Max system global variables are associated with the command panel:

cui.commandPanelOpen

Lets you get and set whether the command panel is displayed. A Boolean value - true if the command panel is displayed, false if not displayed.

Specific methods and 3ds Max global variables are associated with the Create and Modify panels. These methods and global variables are described in the following topics:

Create Panel

Modify Panel


Create Panel

The startObjectCreation() method is used to simulate the user finding a Create Panel button for a given object class and pressing that button, putting 3ds Max into create mode for that object class.

The form is:

startObjectCreation <maxobjclass> [returnNewNodes:<flag>] [newNodeCallback:<fn>]

This method simply opens up the Create Panel at the right tab and category and depresses the appropriate object button.

EXAMPLE:

startObjectCreation box

startObjectCreation targetSpot

This method is primarily intended for use in macroScripts, but can be used in generalized scripts. Script execution will continue immediately after entering the create mode, and you must ensure that the script does not interfere with the object creation.

The values that can be supplied to the optional returnNewNodes: keyword argument are true, false (the default) or #first. If true is supplied, all of the nodes created, up until the current create mode is exited, will be returned in an array. If #first is supplied, only the first node created is returned, immediately after it is created. The function doesn’t wait for the create mode to be exited by the user.

The optional newNodeCallback: keyword argument can supply a scripted function of one argument to the create mode that is started, such that the function will be called each time a node is created with the new node as its argument. This is similar to supplying pickObject() filter functions, although the return value of the newNodeCallback: function is ignored.

NOTE:

The callback function is invoked immediately upon new node creation, *before* any base object is installed in it, so only node-related properties can be accessed and changed during this callback.

FOR EXAMPLE:

fn setColor n = n.wireColor = red

startObjectCreation box newNodeCallback:setColor

would cause all new boxes created in the started create mode to have red wire color.

The returnNewNodes: and newNodeCallback: can both be supplied on the same call; the callback will be called on each node, and they will be returned in an array as the result of the startObjectCreation() function.

okToCreate <maxclass>

Returns true if the specified maxclass can be created in the UI, false otherwise.

FOR EXAMPLE:

okToCreate terrain

will return false unless at least one shape is selected, or if any non-shape is selected. This corresponds to whether the button for the object is enabled.

isCreatingObject [ <maxclass> ]

Returns true if the specified maxclass is currently being created in the UI, false otherwise.

If called without an argument returns true if ANY object is being created in the UI, false otherwise.

Available in 3ds Max 9 and higher.

FOR EXAMPLE:

--go to Create panel, click the Box button and evaluate:

isCreatingObject Box

true

--in the Create panel, click on the Cone button and evaluate:

isCreatingObject Box

false

isCreatingObject Cone

true

isCreatingObject()

true

See also

Defining Macro Scripts

Change Handlers and Callbacks


Modify Panel

The following methods are associated with the Modify panel:

enableShowEndRes <boolean>

If the boolean parameter is true, allows the Show End Result On/Off Toggle icon to remain pressed in. If false, the Show End Result On/Off Toggle icon will return to the off state after being pressed. This method must be used in true/false pairs, as its effect is "sticky" when selecting other objects or modifiers, or when switching away from and back to the Modify panel.

IsSubSelEnabled()

Returns true if the user is allowed to enter Sub-Object mode, false otherwise.

enableSubObjSel <boolean>

If the boolean parameter is true, allows the user to enter Sub-Object mode for those objects/modifiers that have Sub-Object modes defined. If false, the Sub-Object button is disabled. This method must be used in true/false pairs, as its effect is "sticky" when selecting other objects or modifiers, or when switching away from and back to the Modify panel.

modPanel.addModToSelection <modifier>

Applies a modifier to the current selection opened in the Modify panel. It should be used in place of addModifier() in places where the target is a selection or group or where you have the stack open at a particular place in the Modify panel with a sub-object selection active and you want the modifier applied to that selection. addModifier() adds the modifier separately to each object in the selection or group and does not honor the current active sub-object selection in all cases. The Modify panel must be open on the selection you want to apply the modifier to, otherwise the function does nothing.

modPanel.getCurrentObject()

Returns the modifier or base object currently selected in the Modify panel stack. If the Modify panel is not open, this function returns undefined.

modPanel.getModifierIndex <node> <modifier>

Returns the index of the given modifier in the modifier stack for the given node. This index corresponds to the modifiers position in the <node>.modifiers array. This function returns undefined if the given modifier is not in the node's modifier stack.

modPanel.setCurrentObject < modifier | node | node_baseobject > [node:<node>] [ui:<boolean>]

Sets the specified object to be the active object in the modifier stack. The Modify panel must be open, otherwise the function does nothing.

If node: is specified, the modifier or base object will be searched for only in the specified node. This is typically specified when you know what node to look in, and the modifier or base object is instanced in another node. If the argument is a node, the node keyword argument defaults to that node.

If ui: is set to true, the Command Panel will be switched to Modify mode. The default is false.

modPanel.validModifier (< modifier > | < modifier_class >).

Returns true if Modify panel is open, one or more nodes are selected, and the specified modifier is applicable to all the nodes at their current edit level in the stack.

In 3ds Max 6 and higher,

the validModifier method will return false if either the node/node collection or modifier/modifier class is 'undefined', or the node collection is empty.

EXAMPLE

modPanel.addModToSelection (bend()) -- apply bend modifier to current selection

modPanel.getModifierIndex $ foo -- returns index of modifier foo

modPanel.setCurrentObject $ -- open on base object

modPanel.setCurrentObject $.baseObject -- same as above

modPanel.setCurrentObject $.taper -- open on taper modifier in object

modPanel.setCurrentObject $.modifiers[3] -- open on 3rd modifier

modPanel.setCurrentObject foo -- open on foo object or modifier

The following 3ds Max system global variables are associated with the Modify panel:

numSubObjectLevels

Lets you get the number of sub-object levels supported by the object or modifier currently selected in the modifier stack. If the Modify panel is not open or no objects are selected, the global contains the value undefined.

subObjectLevel

Lets you get and set the sub-object level in the Modify panel if it is open. An Integer value of zero or greater up to the number of sub-object levels supported by the currently open modifier, typically in the order shown in the Sub-Object drop-down list. A subObjectLevel of 0 means sub-object mode is off. If the Modify panel is not open or sub-object level setting not permitted in the current modifier, the global contains the value undefined.

EXAMPLE

b=box() -- create a box

em=edit_mesh() -- create an Edit Mesh modifier

addModifier $box01 em -- add edit mesh mod

max modify mode -- open mod panel

select $box01 -- select object box01

print subObjectLevel -- print the current subobject level

subObjectLevel = 2 -- set sub-object level to Edge

showEndResult

Lets you get and set the state of the Show End Result Toggle icon in the Modify panel. A Boolean Value - true if Show End Result is on, false if off.

The following methods can also be used to get and set the sub-object level:

getSelectionLevel <maxobject>

Get the subObject level of MAXObject. If MAXObject is a node, this method operates on the base object. This method is applicable to base editables and select and edit modifiers.

NOTE:

This method does not work with SplineSelect and PatchSelect modifier.

setSelectionLevel <maxobject> {#object | #vertex | #edge | #face}

Set the subObject level of MAXObject. If MAXObject is a node, this method operates on the base object. This method is applicable to base editables and select and edit modifiers.

NOTE:

This method does not work with SplineSelect and PatchSelect modifier.


Customize The Order of Rollup Pages

Dragging and dropping rollouts sets Rollup order. The order of the rollups will be saved in the file RollupOrder.cfg (in ASCII), which is located in the UI directory. Deleting this file, or removing an entry for a specific Class, will reset the Rollout order.

cmdPanel.GetRollupThreshold()

cmdPanel.SetRollupThreshold()

Determines how many pixels of a rollout should be scrollable in the command panel before the rollout is shifted into a separate command panel column. This option is only applicable when there are multiple columns displayed in the command panel.

Rollups, which can be customized have a new RCMenu entry, that lets the user reset the rollup customization. In order to delete all rollup customization the user can simply delete the RollupOrder.cfg file in the UI directory and restart MAX.

See also

Interface: cmdPanel

Rollout Systems 'category' Mechanism

Rollout User-Interface Controls

Rollout User-Interface Controls Types

Rollout User-Interface Controls Common Layout Parameters

Rollout User-Interface Controls Common Properties

Visual MAXScript


getTextExtent

getTextExtent <string>

Returns a Point2 value containing the size of the string in pixels if it was displayed in a command panel.

See also

String Values


FBX Export Dialog Access

The FbxExporterSetParam function provides access to the FBX Exporter dialog options. It expects a string as a first argument specifying the option to affect, with the second argument being the new value as described below:

FbxExporterSetParam "Geometries" <bool>

Controls the state of the "Geometries" checkbox in the FBX Export dialog.

FbxExporterSetParam "NormalsPerPoly" <bool>

Controls the state of the "Support normals per polygon vertex" checkbox in the FBX Export dialog.

FbxExporterSetParam "Cameras" <bool>

Controls the state of the "Cameras" checkbox in the FBX Export dialog.

FbxExporterSetParam "Lights" <bool>

Controls the state of the "Lights" checkbox in the FBX Export dialog.

FbxExporterSetParam."GeomAsBone" <bool>

Controls the state of the "Geometries used as bones, exported as bones" checkbox in the FBX Export dialog.

FbxExporterSetParam "Shape" <bool>

Controls the state of the "Shape (Morph modifier)" checkbox in the FBX Export dialog.

FbxExporterSetParam "Skin" <bool>

Controls the state of the "Skins (Skin Modifier and Physique)" checkbox in the FBX Export dialog.

FbxExporterSetParam "Animation" <bool>

Controls the state of the "Animation" checkbox in the FBX Export dialog.

FbxExporterSetParam "Resampling" <float>

Controls the value of the "Resampling rate (when necessary)" field in the FBX Export dialog.

FbxExporterSetParam "ShowWarnings" <bool>

Controls the state of the "Show warnings" checkbox in the FBX Export dialog.

FbxExporterSetParam "EmbedTextures" <bool>

Controls the state of the "Embed textures in export file" checkbox in the FBX Export dialog.

FOR EXAMPLE:

--to prevent the export of the cameras:

FBXExporterSetParam "Cameras" false

See also

FBX Import Dialog Access


FBX Import Dialog Access

The FbxImporterSetParam function provides access to the FBX Importer dialog options. It expects a string as a first argument specifying the option to affect, with the second argument being the new value as described below:

FbxImporterSetParam "Mode" ( "create" | "merge" | "exmerge" )

Controls the state of the "Import Type" radio buttons in the FBX Import dialog. Possible values are:

"exmerge" - Exclusive Merge

"merge" - Merge

"create" - Add to new scene

FbxImporterSetParam "Geometries" <bool>

Controls the state of the "Geometries" checkbox in the FBX Import dialog.

FbxImporterSetParam "Skin" <bool>

Controls the state of the "Skin" checkbox in the FBX Import dialog.

FbxImporterSetParam "SkinModifier" ( "skin" | "physique" )

Controls the state of the radio buttons in the "Skin">"More..."> "FBX Import Advanced Parameters" dialog.

FbxImporterSetParam "Cameras" <bool>

Controls the state of the "Cameras" checkbox in the FBX Import dialog.

FbxImporterSetParam "Lights" <bool>

Controls the state of the "Lights" checkbox in the FBX Import dialog.

FbxImporterSetParam "Markers" <bool>

Controls the state of the "Markers" checkbox in the FBX Import dialog.

FbxImporterSetParam "Shape" <bool>

Controls the state of the "Shape (Morph Modifier)" checkbox in the FBX Import dialog.

FbxImporterSetParam "Animation" <bool>

Controls the state of the "Animation" checkbox in the FBX Import dialog.

FbxImporterSetParam "FilterKeyReducer" <bool>

Controls the state of the "Constant Key Reduction Filtering" checkbox in the "Animation">"More... ">"FBX Import Advanced Parameters" dialog.

FbxImporterSetParam "FilterUnroll" <bool>

Controls the state of the "Gimble Lock Killer Filtering" checkbox in the "Animation">"More... ">"FBX Import Advanced Parameters" dialog.

FbxImporterSetParam "FilterKeySync" <bool>

Controls the state of the "Gimble Lock Killer Filtering" checkbox in the "Animation">"More... ">"FBX Import Advanced Parameters" dialog.

FbxImporterSetParam "Resampling" <float>

Controls the value of the "XYZ FCurve Synchronization Filtering" field in the "Animation">"More... ">"FBX Import Advanced Parameters" dialog.

FbxImporterSetParam "HumanIK" <bool>

The HumanIK option is available only if a compatible HumanIK product is installed.

FbxImporterSetParam "RescaleRoot" <bool>

Controls the state of the "Rescale scene's root node to unit size" checkbox in the FBX Import dialog.

FbxImporterSetParam "YUpZUp" <bool>

Controls the state of the "Y-up to Z-up root node rotation" checkbox in the FBX Import dialog.

FOR EXAMPLE:

--To import an fbx file using the 'Add to new scene' mode,

--the skin modifier but preventing the loading of animation:

FBXImporterSetParam "Mode" "create"

FBXImporterSetParam "SkinModifier" "skin"

FBXImporterSetParam "Animation" false

See also

FBX Export Dialog Access


class id filter

Class Id Filters

In the Selection filters/Combos filter, you can add class id filters in addition to registering superclass id filters. The bottom left list box displays a list of all helper and geometry class ids. To add a filter, select an entry from the list and hit the add button below the list box. The filter will appear in the lower right list box. This list displays all of the current class id filters. Once OK is pressed, the select filter drop down contains those class ids that were added.

You can also register custom scripted functions as filters through a callback in MAXScript:

Methods

registerSelectFilterCallback <filterFunction> <name>

Registers a custom selection filter. The 2 parameters are the filter function to be registered and the name of the filter to appear in the selection filter drop down list.

The filter function itself expects one parameter which is the node to be checked.

FOR EXAMPLE

If you want to filter only objects that are renderable (in other words have their node-level Renderable property set to true / Renderable box checked in Properties dialog), you can register the following function:

fn filterRenderableCallback node = --the node to be filtered is passed as argument

(

node.renderable --return true if the node is renderable

)

--Register the function as Select filter Callback function

--The filter will appear under the name "Renderable":

registerSelectFilterCallback filterRenderableCallback "Renderable"

--To see how it works, execute the code below to generate 10 boxes

--with random .renderable state

for i = 1 to 10 do

b = box pos:[i*30,0,0] renderable:((random 0.0 1.0) <0.5 )

--Now select the filter "Renderable" from the drop-down list and try

--to select all 10 boxes - only those that are renderable will

--be selected!

Prototype:

unregisterSelectFilterCallback <filterFunction>

Removes the specified callback function from the list of selection filters.

FOR EXAMPLE

unregisterSelectFilterCallback filterRenderableCallback

See also

Selection Filters and Display Filters

Main Toolbar


Selection Filter

Selection Filters and Display Filters

The Selection Filter list lets you restrict to specific types and combinations of objects that can be selected by the selection tools. For example, if Cameras is selected, you can select only cameras with the selection tools. Other objects cannot be selected interactively with the mouse in the viewport. (They can be selected using the Select By Name, Selection Sets or MAXScript select methods though).

Selection Filter Methods:

<int>GetSelectFilter

Returns the index of the current selection select filter in the selection filter list. For example, by default 1 means All, 4 means Lights, 8 means Bones etc.

<void>SetSelectFilter <int_index>

Set the current select filter by index.

EXAMPLE

setSelectFiler 5 --set selection filter to Cameras

<int>GetNumberSelectFilters

Returns the number of selection filters in the drop down.

<string>GetSelectFilterName <int_index>

Returns the name of the indexed selection filter.

FOR EXAMPLE,

for i = 1 to GetNumberSelectFilters() do --go through all

format "%: %\n" i (GetSelectFilterName i) --print index and name

--result:

1: All

2: Geometry

3: Shapes

4: Lights

5: Cameras

6: Helpers

7: Warps

8: Bone

9: IK Chain Object

10: Point

OK

Display Filter Methods:

<bool>GetDisplayFilter <int_index>

Returns true if the the indexed display filter is enabled, false otherwise.

NOTE:

that other than the Selection filers which can be enabled only one at a time, any number of Display filters can be activated at the same time.

<void>SetDisplayFilter <int_index> <bool_on>

Sets the enabled state of the indexed display filter to the supplied Boolean value.

FOR EXAMPLE,

setDisplayFiler 3 --set display filter to Point

<int>GetNumberDisplayFilters

Returns the number of display filters in the display panel's list box.

<string>GetDisplayFilterName <int_index>

Returns the name of the indexed display filter.

FOR EXAMPLE,

for i = 1 to GetNumberDisplayFilters() do --go through all

format "%: %\n" i (GetDisplayFilterName i) --print index and name

--result:

1: Bone

2: IK Chain Object

3: Point

OK

See also

Class Id Filters

Main Toolbar


Keyboard Entry

The following are keyboard input functions for doing simple interactivity directly in the Listener or Mini Listener. All keyboard input functions take input from Mini Listener if Listener is closed, but if it is open, input will always be taken from Listener.

getKBValue [ prompt:<string> ]

The getKBValue() function lets the user enter a MAXScript value into the Listener. The optional prompt: keyword argument takes a string that is displayed in the Listener as a prompt message. Any valid MAXScript expression can be entered into the Listener and is evaluated to become the result of the getKBValue() function. Expressions include the literals for integer, float, string, name, array, point2, point3, and scene object pathnames, or they can be expressions involving math operations and functions, script supplied functions, global variables, etc. You can test the type of value returned using MAXScript's classOf function.

FOR EXAMPLE:

v = getKBValue prompt:"Enter object count:"

if classOf v != integer then

print "Value entered must be an integer"

The user can abort the entry by pressing the ESC key in which case the function returns the special value #escape.

getKBLine [ prompt:<string> ]

getKBChar [ prompt:<string> ]

These functions let the user type characters into the Listener that are returned as a MAXScript string. getKBLine() returns all the characters up until the user presses ENTER, getKBChar() returns each character immediately as it is entered. The user can abort the entry by pressing the ESC key in which case the function returns the special value #undefined.

getKBPoint [ prompt:<string> ]

This function lets the user type in a 3D point in the syntax supported by the pickPoint() function. See the pickPoint() description above for details about the syntax. The function interprets the 3D point as relative to the current active grid construction plane and returns a Point3 in world-coordinates.

The following are system global variables related to the keyboard:

keyboard.shiftPressed

keyboard.controlPressed

keyboard.altPressed

keyboard.escPressed

These variables access the current state of the keyboard shift, control, alt and escape keys and return true or false depending on the pressed state of the key at the time the variable is read and are read-only variables.


Lighting Analysis and Daylight Simulation Tools

NEW in 3ds Max 2009 Design: A number of tools for performing Lighting Analysis have been added to 3ds Max Design.

NOTE:

These feature is exposed in 3ds Max Design only.

Scenes saved from 3ds Max Design will open and render correctly in 3ds Max, but you cannot construct related class instances via MAXScript in 3ds Max.

Interfaces

Interface: DaylightSimulationUtilities

Interface: DaylightSimulationUIOps

Interface: LightingAnalysisOverlayFactory

Interface: LightMeterManager

Interface: PseudoColorManager

Interface: LuminosityUtil

Render Effects and Render Elements

Lighting_Analysis_Overlay : RenderEffect

Lighting_Analysis_Data : RenderElement

Helpers

LightMeter : Helper


Macro Scripts

The Macro Script functions are in a structure package named macros. These functions allow you to access and run Macro Scripts. See Defining Macro Scripts for information on creating Macro Scripts. The Macro Script functions are:

macros.load [ <path_name_string> ]

Loads all of the Macro Script definition (.mcr) files in the current UI directory path, or in directory path specified by <path_name_string>. You can get the current UI directory path with the function:

local ui_dir = cui.getDir ()

macros.new <category_string> <name_string> <toolTip_string> <buttonText_string> <body_string>

Creates a new Macro Script with the specified name and category. Returns an Integer Macro Script ID value that uniquely identifies the new Macro Script. See Defining Macro Scripts for a description of Macro Script definitions.

macros.run <category_string> <name_string>

macros.run <macro_id_integer>

Executes the specified Macro Script. The Macro Script is identified by either its category and name, or by its unique Macro Script ID value.

macros.edit <category_string> <name_string>

macros.edit <macro_id_integer>

These methods will open the Macro Script definition (.mcr) file that defines the specified Macro Script in a script Editor window. The Macro Script is identified by either its category and name, or by its unique Macro Script ID value.

macros.list()

Lists all installed macroscripts including the macro ID integer, category and source file path.

FOR EXAMPLE:

macros.load "f:/gametools/macros"

macros.edit "objects" "box"

macros.run 132

macros.run "modifiers" "bend"


Main Toolbar

The following methods are associated with 3ds Max’s main toolbar:

enableUndo <boolean>

Enables or disables the Undo icon.

hitByNameDlg()

Opens the standard 3ds Max Select By Name dialog allowing users to select objects. Returns false if the user cancels out of the Select by Name dialog, true otherwise.

toolMode.uniformScale()

Set scale mode to Uniform Scale.

toolMode.nonUniformScale()

Set scale mode to Non-uniform Scale.

toolMode.squashScale()

Set scale mode to Squash.

enableRefCoordSys <boolean>

Enables or disables the Reference Coordinate System drop-down list.

toolMode.coordsys { <mode_name> | <node> }

Sets the Reference Coordinate System. Valid <mode_name> values are:

#view

#screen

#world

#parent

#local

#grid

getRefCoordSys()

setRefCoordSys <mode_name>

Get and set the Reference Coordinate System. Valid <mode_name> values are:

#hybrid -- View

#screen -- Screen

#world -- World

#parent -- Parent

#local -- Local

#object -- Pick object or Grid - not valid for setRefCoordSys()

toolMode.coordSysNode

A read/write variable containing a node value or undefined. This variable reflects which node, if any, is the current reference coordinate system node. Assignment to this variable must be a node value.

enableCoordCenter <boolean>

Enables or disables the Coordinate System Center icon.

getCoordCenter()

setCoordCenter <name>

Get and set the Coordinate System Center. Valid <name> values are:

#local -- Use Pivot Point Center

#selection -- Use Selection Center

#system -- Use Transform Coordinate Center

toolMode.transformCenter()

Sets Coordinate System Center to Transform Coordinate System.

toolMode.selectionCenter()

Sets Coordinate System Center to Selection Center.

toolMode.pivotCenter()

Sets Coordinate System Center to Pivot Point Center.

getNumAxis()

This method reflects the Coordinate System Center state. If it is set to Pivot Point Center then this method returns #individual otherwise #all.

setToolBtnState <name> <boolean>

Set the specified tool buttons on or off. This method does not put into the mode, it just changes the state of the tool button. This method does not change the state of any button other than the specified button. The valid <name> values are:

#move -- Move button on/off

#rotate -- Rotate button on/off

#nuscale -- Scale button on/off - doesn’t change scale type

#uscale -- Scale button on/off - doesn’t change scale type

#squash -- Scale button on/off - doesn’t change scale type

#select -- Select button on/off

getToolbtnState <name>

Returns whether the specified tool button is on or off as a <boolean> value. Valid name values are:

#select

#move

#rotate

#uscale -- returns true if any of the scale button states is on

#nuscale -- returns true if any of the scale button states is on

#squash -- returns true if any of the scale button states is on

The following methods deal with the Named Selection Set drop-down list. These methods are not intended for casual usage.

clearCurSelSet()

Clears the edit field of the Named Selection Set drop-down list. Does not deselect the currently selected objects.

clearSubSelSets()

Clears the named selections from the Named Selection Set drop-down list. The named selection sets still exist, they just don’t show in the drop-down list. This command can be dangerous to use unless you are in Sub-Object mode in the Modify panel, as there is not a direct method to rebuild the Named Selection Set list. When in Sub-Object mode in the Modify panel, the namedSelSetListChanged() method will rebuild the list.

namedSelSetListChanged()

When in Sub-Object mode in the Modify panel, this method will rebuild the named selection set list.

setCurNamedSelSet <string>

Sets the edit field of the Named Selection Set drop-down list to the specified string. This method not change the current selection set or add the specified string to the named selection set list.

appendSubSelSet <string>

Appends the specified string to the Named Selection Set drop-down list. This method not change the current selection set. Modifiers in 3ds Max use this method to add sub-object named selection sets to the Named Selection Set drop-down list. This is done whenever the selection level changes.

The following 3ds Max system global variables are associated with the main toolbar:

preferences.constantReferenceSystem

Lets you get and set whether to use a constant Reference System for the Move, Rotate, and Scale tools. A Boolean value - true if Constant is on, false if off. This variable matches the Constant check box in Customize menu > Preferences > General > Reference Coordinate System.

toolmode.commandmode

Get/set the 3ds Max command mode. The return value when getting the command mode is a <name> value if the command mode is a recognized command mode, otherwise the return value is an integer value. The recognized command modes are:

#SELECT

#MOVE

#ROTATE

#NUSCALE

#USCALE

#SQUASH

#VIEWPORT

#HIERARCHY

#CREATE

#MODIFY

#MOTION

#ANIMATION

#CAMERA

#NULL

#DISPLAY

#SPOTLIGHT

#PICK

When setting the 3ds Max command mode, only the following command modes are valid:

#SELECT

#MOVE

#ROTATE

#NUSCALE

#USCALE

#SQUASH

toolmode.axisConstraints

Get/set the 3ds Max axis constraints. The axis constraints values are:

#X

#Y

#Z

#XY

#YZ

#ZX

manipulateMode

Get/set the 3ds Max manipulate mode. When true, manipulate mode is active.

The following method affects all toolbars.

updateToolbarButtons()

Forces an update of toolbar button states


Material Editor

The following functions are specific to materials and the use of materials with the Material Editor:

getMeditMaterial <slot_index>

you can get the materials in the material editor slots 1 through 24.

EXAMPLE

foo = getMeditMaterial 3

setMeditMaterial <slot_index> <material>

complements the getMeditMaterial function allowing you to place a material into the numbered material editor slots. Accepts either materials or texture maps as <material>.

loadDefaultMatLib()

Loads the default 3ds Max material library file.

loadMaterialLibrary <filename_string>

Loads the named 3ds Max material library file, which becomes the current material library. If the file name does not have a fully specified directory path, the function searches through all the currently configured bitmap paths. Returns true if the loads succeeds, false if it fails.

saveMaterialLibrary <filename_string>

Saves the current material library into the named file. Returns true if the save succeeds, false if it fails.

fileOpenMatLib()

This method displays the File Open dialog and allows the user to select a material library to load.

fileSaveAsMatLib()

Displays the standard Save File As dialog to allow the user to save the current material library.

fileSaveMatLib [quiet:<bool>]

If the current material library has been saved previously (has been named) this method saves the material library to the same file. Otherwise it displays the standard Save File As dialog to allow the user to save the current material library.

For details on the quiet: option available in 3ds Max 8 and higher, please see Quiet Mode

getMatLibFileName()

Returns the current material library file name as a String value.

renderMap <textureMap> [into:<bitmap>] [size:<point2>] [filename:<string>] [scale:<float>] [filter:<boolean>] [display:<boolean>]

Provides access to the Render Map function available in the Material Editor. The function returns a Bitmap value containing a rendering of the given texture map. If you specify the optional into: argument, the function renders the map into the supplied bitmap, taking size and other attributes from the existing bitmap. If you don't, a new bitmap value is created using the size: and fileName: arguments in its creation. If the into: and size: parameters are not specified, the default size in [200,200].

The scale: argument is a scale factor applied to 3D TextureMaps. This is the scale of the surface in 3d space that is mapped to UV and controls how much of the texture appears in the bitmap representation.

If the filter: argument is true, the bitmap is filtered. It is quite a bit slower to rescale bitmaps with filtering on. Defaults to false.

If the display: argument is true, the resulting bitmap is displayed using the virtual frame buffer; otherwise it is not. Defaults to false.

EXAMPLE

rm = renderMap $foo.material.diffuseMap size:[640,480] \

fileName:"foodif.bmp"

save rm

close rm

The above will render a map to a bitmap and save it as a .bmp file.

showTextureMap <material> [<texmap>|<material>] <boolean>

This provides control over the visibility of textures in the shaded viewport. You specify the material containing the texture map, the texture map in that material to be controlled and a boolean to turn the display on or off,

FOR EXAMPLE:

showTextureMap $foo.material $foo.material.diffuseMap on

tm = checker()

mat = standardMaterial diffuseMap:tm

mm = multimaterial()

mm[1] = mat

$box01.material = mm

showTextureMap mm[1] tm on

Note that for multimaterials, you need to specify the appropriate sub-material (using [] indexing, for example).

See showTextureMap() function for details.

The following 3ds Max system global variables are applicable to the Material Editor:

currentMaterialLibrary

Contains a virtual array of materials and root level maps corresponding to the currently opened material library. You can get library materials via array indexing and iterate over them in a for loop. The array can be indexed by number, or by name or string to select by material name. This variable is read-only. See MaterialLibrary Values for more information.

meditMaterials

Contains a virtual array of materials and root level maps corresponding to the slots in the material editor. You can access material editor materials and root level maps via array indexing and iterate over them in a for loop. The array can be indexed by number to specify slot number or name or string to select by material and root level map name.

FOR EXAMPLE:

$foo.material = meditMaterials[1]

meditMaterials["foo mat"].diffuse = red

for m in meditMaterials do print m.diffuseMap

meditMaterials[1]=standard()

print meditMaterials.count -- number of slots

This variable is read-only, but the elements (the materials in the slots) are assignable. See MaterialLibrary Values for more information.

sceneMaterials

Contains a virtual array of materials and root level maps corresponding to the materials and root level maps present in the scene. You can get scene materials and root level maps via array indexing and iterate over them in a for loop. The array can be indexed by number, or by name or string to select by material or root level map name. This variable is read-only. See MaterialLibrary Values for more information.

activeMeditSlot

MAXScript can access the active slot in the material editor. The system global variable activeMeditSlot contains the index of the currently active Material Editor slot. You can read this value to find the active slot, or assign an integer (between 1 and 24) to it to set the active slot.

EXAMPLE

activeMeditSlot = 5 -- set slot 5 to active slot

mtl = meditMaterials[activeMeditSlot] -- pick up active material/map

See also

Interface: medit

MatEditor - Open and Close the Material Editor


showTextureMap() function

Show Map In Viewports Functions

The showTextureMap() function provides control over both material and map level texture showing in the viewport.

The form is:

showTextureMap <material> [<texmap>|<material>] <boolean>

If the optional <texmap> or <material> is not specified, Show Map in Viewports is set for the argument 1 material to the <boolean> argument.

If the optional <texmap> is specified, it will be searched for in the argument 1 material. It must be a direct subtexture of the supplied argument 1 material. Its show-in-viewport state will be set on or off according to the <boolean> argument.

If the optional material is specified, it will be searched for in the argument 1 material. Its show-in-viewport state will be set on or off according to the <boolean> argument.

EXAMPLE

showTextureMap $foo.material on

showTextureMap $foo.material $foo.material.diffusemap off

NOTE:

Mapping coordinates aren't explicitly enabled for all objects at creation time. When a script is run in the Listener, using 'showTextureMap' is indirectly turning mapping coordinates on. This happens during the scene redraw which happens after each line is executed, if needed. If a script is run from a script editor, or if you put parenthesis around a script, no scene redraw is performed until the entire script is run. Since no redraw is performed, no mapping coordinates exist on the object when the script tries to access them. Solutions: explicitly perform a scene redraw [redrawViews()] after 'showTextureMap', or explicitly turn on mapping coordinates for the object.

The following methods introduced in 3ds Max 2008 provide control over the state of the Hardware Mode Show Map In Viewports available as a flyout option to the regular Show Map In Viewports icon:

enableHardwareMaterial <material> [<texmap>|<material>] <boolean>

This method allows control over the state of the flyout at both material and map level.

When set to true, the flyout will be switched to Hardware mode (magenta icon).

When set to false, the flyout will be switched to Software mode (blue icon)

showHWTextureMap <material> [<texmap>|<material>] <boolean>

This method provides control over the state of the Show Map In Viewport icon at both material and map level.

When set to true, the icon will be pressed. When set to false, it will be depressed.

The flyout must be in hardware mode when using this method - see the enableHardwareMaterial method described above. If it is not, the icon will be pressed but no maps will be displayed in the viewport.

EXAMPLE

s = Sphere() --create a sphere

s.material = Arch___Design__mi() --assign an A&D Material

enableHardwareMaterial s.material true --switch SMIV flyout to HW mode

showHWTextureMap s.material true --press the SMIV icon

See also

Material Editor

TextureMap Common Properties, Operators, and Methods

Accessing The Material Editor Active Slot

Interface: medit


MatEditor - Open and Close the Material Editor

Provides methods to open and close the Material Editor and query whether it is open.

Methods:

MatEditor.Open()

Opens the Material Editor

<bool>MatEditor.isOpen()

Returns true if the Material Editor is open

MatEditor.Close()

Closes the Material Editor

See also

Material Editor

Interface: medit


MAXScript Message and Query Dialogs

These functions let you display a message box or a yes/no query dialogs from within MAXScript.

messageBox <message_string> [title:<window_title_string>] [beep:<boolean>]

Displays a modal message box containing the message string and an OK button. The message box window title an be set with the title: keyword parameter. You can control whether a beep is made with the beep: keyword parameter, which defaults to true.

queryBox <message_string> [title:<window_title_string>] [beep:<boolean>]

Displays a modal message box similar to the one that the messageBox() function creates, except it contains a Yes and a No button. The queryBox() function returns true if the user clicks Yes and false if the user clicks No.

yesNoCancelBox <message_string> [title:<window_title_string>] [beep:<boolean>]

Displays a modal message box similar to the one that the messageBox() function creates, except it contains a Yes, a No, and a Cancel button. The yesNoCancelBox() function returns #yes, #no or #cancel depending on which button the user clicked to dismiss the message box.

FOR EXAMPLE:

messageBox "You shouldn't have done that"

if queryBox "Do you want to continue?" beep:false then ...

In some cases, MAXScript statements occurring after a statement containing one of the above dialog function calls may be executed before they are supposed to be.

For example, if your execute:

SCRIPT:

for _t=0 to 3 do

(

messagebox "Press Me"

format "_t= %\n" _t

)

print "Should print last"

THE LISTENER WILL SHOW:

_t= 0

"Should print last"

"Should print last"

_t= 1

_t= 2

_t= 3

The MessageBox will be displayed 4 times, once each time before the value of _t is printed to Listener!

The reason for this is that Listener is looking for expressions to compile and run in a background thread. In the above example there are 2 expressions - the for loop expression and the final print expression. The messageBox() function goes on waiting for and processing UI events in the main UI thread, but the compiler has already compiled ahead and scheduled the print "Should print last".

To prevent this out-of-order execution, you need to bracket the script in parenthesis. This will force the sequencing to be correct because the script would now contain a single expression rather than two.


Menu Manager

MAXScript has full access to the menu manager and menu creation system.

NOTE:

Be very careful when using or testing this API. It makes permanent changes to the menu database, and it is very easy to mess things up quite badly. For example, if you "unRegister" the main menu bar, 3ds Max won't start.

Anyone using this API should make a copy of the "..\UI\MaxStartUI.mnu" file before running any of the scripts. If anything messes up, just copy the backup version back on to MaxMenu.mnu.

There are 4 exposed interfaces to MAXScript: the menu manager , menu objects , quad menu objects and menu items .

  • The menu manager is a database of menus and quad menus.

  • The main menubar and all sub-menus are menu objects.

  • A quad menu object holds 4 menu objects, one for each quad.

  • A menu object is a container for menu items.

  • A menu item can be a separator, an action that invokes a macroScript or a sub-menu that pops up a cascading menu.

Menu Manager

menuMan.loadMenuFile "file.mnu"

This loads a new menu file with the given name. It looks in the current "UI" directory for the file. It return true if successful, and false if not.

menuMan.saveMenuFile "file.mnu"

This saves a new menu file with the given name. It saves it in the current "UI" directory.

menuMan.getMenuFile()

Returns the full path to the current menu file.

menuMan.updateMenuBar()

This updates the main menu bar with any changes that have been made. This MUST be called after changing anything on the main menu bar.

menuMan.registerMenuContext contextId

This call is used to register menu extensions. The "contextId" is a random 32-bit integer. It can be generated using the "genclassid()". This function registers an extension with the menu manager that is remembered permanently. It returns true the first time the extension is registered, and false every time thereafter. This is saved in the MaxMenu.mnu file, so it is sticky from session to session. This is used so that scripts can add items and sub-menus MAX's main menu bar and quad menus. See the sample scripts below for the proper usage.

menuMan.findMenu "menuName"

This function returns the menu with the given name. It returns "undefined" if no menu exists in the menu manager with the given name. This requires the full name of the menu, including and "&" characters that might be in the name.

EXAMPLE:

helpMenu = menuMan.findMenu "&Help" -- Retrieve 3ds Max’s help menu.

menuMan.findQuadMenu "quadMenuName"

This method works like "findMenu" but it gets quad menus instead of menus.

menuMan.unRegisterMenu menu

This method removes a menu from the menu manager.

WARNING! USE EXTREME CAUTION WHEN USING THIS METHOD!

If you unregister a menu that is used as a sub-menu, or in a quad menu, or the main menu bar, you will corrupt your 3ds Max installation.

menuMan.unRegisterQuadMenu quadMenu

This method works like "unregisterMenu" but for quad menus.

menuMan.createMenu "name"

This method creates a new, empty menu with the given name.

menuMan.createQuadMenu "name" "quad1Name" "quad2Name" "quad3Name" "quad4Name"

This method creates a new, empty quad menu. It contains, 4 empty menus, one for each quad.

menuMan.createSubMenuItem "name" subMenu

This method creates a new sub-menu item that can be added to a menu. It uses the given "name" and it displays the given sub-menu.

menuMan.createSeparatorItem()

This method creates a new menu separator that can be added to a menu.

menuMan.createActionItem "macroScriptName" "macroScriptCategory"

This method creates a new menu item that can be added to a menu. The item is an action that executes the macro script with the given name and category. This returns "undefined" if there is no macroScript with the given name and category.

menuMan.setViewportRightClickMenu which quadMenu

This method sets the viewport right click menu to be the given quad menu. The value of "which" can be one of the following:

#nonePressed

#shiftPressed

#altPressed

#controlPressed

#shiftAndAltPressed

#shiftAndControlPressed

#controlAndAltPressed

#shiftAndAltAndControlPressed

The following example sets the default (no keys pressed) quad menu the "Modeling 2". The menu name must be a quad menu that is listed in the "Quads" customization dialog, and the name must match exactly, including capitalization. menuMan.SetViewportRightClickMenu returns FALSE if you try to set the viewport right-click menu to a menu that is not allowed.

EXAMPLE:

menuMan.setViewportRightClickMenu #nonePressed "Modeling 2"

menuMan.getViewportRightClickMenu which

Retrieves the quad menu used for right-clicking in the viewport. The "which" parameter can be one of the following:

#nonePressed

#shiftPressed

#altPressed

#controlPressed

#shiftAndAltPressed

#shiftAndControlPressed

#controlAndAltPressed

#shiftAndAltAndControlPressed

menuMan.getMainMenuBar()

Returns the menu being used as MAX's main menu bar.

menuMan.setMainMenuBar menu

Sets the menu being used as MAX's main menu bar. You must call "menuMan.updateMenuBar()" in order to see the result.

menuMan.getShowAllQuads quadMenu

Gets the "show all quads" setting for the given quad menu.

menuMan.setShowAllQuads quadMenu value

This sets the "show all quads" flag for the given quad menu. "value" can be true or false.

menuMan.getQuadMenuName quadMenu

This returns the name of the given quad menu.

menuMan.setQuadMenuName quadMenu "name"

This sets the name of the give quad menu.

menuMan.numMenus()

Returns the total number of menus in registered with the menu manager.

menuMan.getMenu index

Retrieves the "index"th menu in the menu manager. This is a 1-based index.

menuMan.numQuadMenus()

Returns the total number of quad menus registered with the menu manager.

menuMan.getQuadMenu index

Retrieves the "index"th quad menu in the menu manager. This is a 1-based index.

Quad Menu objects

Quad menu objects have the following functions available:

quadMenu.getMenu quadIndex

Retrieves the menu object associated with the 4 quads of the menu. "quadIndex" can take the value 0, 1, 2, or 3. Quad 0 is the lower-right, and they are numbered counter-clockwise from there.

quadMenu.trackMenu showAllQuads

This displays the quad menu. If "showAllQuads" is true, then all 4 quads are shows at once. It is displayed at the current cursor position.

Menu Objects

Menus are containers for menu items, and have the following functions:

menu.setTitle "title"

Sets the title of the menu to the give string.

menu.getTitle()

Returns the current title of the menu.

menu.numItems()

Returns the number of items the menu holds.

menu.getItem index

Retrieves the menu item at the given index.

NOTE:

The index is 0-based.

menu.addItem menuItem position

This inserts an item in the menu at the given position, which is 0-based. If the position is -1, then the item is appended to the end of the menu.

menu.removeItemByPosition position

This removes the item at the given position.

menu.removeItem menuItem

This removes the given item from the menu, if it is in the menu.

Menu Item objects

A menu item can be a separator, a sub-menu or an action that is connected to a macroScript. The following functions are available for menuItems:

menuItem.setTitle "title"

Sets the name associated with the item.

menuItem.getTitle()

Returns the name associated with the item.

menuItem.setUseCustomTitle value

When value is true, this tells an item that is associated with a macroScript to use the item title when displaying the menu. Otherwise it will use the name of the macro or the "buttontext" of the macroScript.

menuItem.getUseCustomTitle()

Returns the current value of the custom title flag.

menuItem.setDisplayFlat value

This is for sub-menu items. When value is true, it tells the menu to display the sub-menu in-line, rather than as a cascading sub-menu.

menuItem.getDisplayFlat()

Returns the current value for the "display flat" flag.

menuItem.getIsSeparator()

Return true if the item is a separator, and false otherwise.

menuItem.getSubMenu()

If the item is a sub-menu item, this returns the menu associated with the sub-menu.

Included below is a script that shows how to use the menuMan interface to register menu extensions. This script should go in the "stdplugs\stdscripts" folder.

EXAMPLE:

-- Sample menu extension script

-- If this script is placed in the "stdplugs\stdscripts"

-- folder, then this will add the new items to MAX's menu bar

-- when MAX starts.

-- A sample macroScript that we will attach to a menu item

macroScript MyTest

category:"Menu Test"

tooltip:"Test Menu Item"

(

on execute do print "Hello World!"

)

EXAMPLE:

-- This example adds a new entry to MAX's main "Help" menu.

-- Register a menu context. This returns true the first time it

-- is registered, and we can add things to the menu. If

-- it returns false, then the context is already registered,

-- and the items are already in the menu.

-- The number 0x246c6dbe is random, and can be generated

-- using the genClassID() function .

if menuMan.registerMenuContext 0x246c6dbe then

(

-- Get the main menu bar

local mainMenuBar = menuMan.getMainMenuBar()

-- The help menu is always the last menu.

local helpMenuIndex = mainMenuBar.numItems()

-- Get the menu item that holds the help menu

local helpMenuItem = mainMenuBar.getItem(helpMenuIndex)

-- Get the menu from the item

local helpMenu = helpMenuItem.getSubMenu()

-- create a menu separator item

local sepItem = menuMan.createSeparatorItem()

-- create a menu items that calls the sample macroScript

local testItem = menuMan.createActionItem "MyTest" "Menu Test"

-- Add the separator to the end of the help menu.

-- the position of -1 means add it to the end.

helpMenu.addItem sepItem -1

-- Add the action item to the end of the help menu.

helpMenu.addItem testItem -1

-- redraw the menu bar with the new item

menuMan.updateMenuBar()

)

EXAMPLE:

-- This example adds a new sub-menu to MAX's main menu bar.

-- It adds the menu just before the "Help" menu.

if menuMan.registerMenuContext 0x1ee76d8e then

(

-- Get the main menu bar

local mainMenuBar = menuMan.getMainMenuBar()

-- Create a new menu

local subMenu = menuMan.createMenu "Test Menu"

-- create a menu item that calls the sample macroScript

local testItem = menuMan.createActionItem "MyTest" "Menu Test"

-- Add the item to the menu

subMenu.addItem testItem -1

-- Create a new menu item with the menu as it's sub-menu

local subMenuItem = menuMan.createSubMenuItem "Test Menu" subMenu

-- compute the index of the next-to-last menu item in the main menu bar

local subMenuIndex = mainMenuBar.numItems() - 1

-- Add the sub-menu just at the second to last slot

mainMenuBar.addItem subMenuItem subMenuIndex

-- redraw the menu bar with the new item

menuMan.updateMenuBar()

)

EXAMPLE:

-- This example adds a new command to MAX's default right-click quad menu

if menuMan.registerMenuContext 0x36690115 then

(

-- Get the default viewport right-click quad menu

local quadMenu = menuMan.getViewportRightClickMenu #nonePressed

-- Get the lower-left menu from the quad

local menu = quadMenu.getMenu 3

-- create a menu item that calls the sample macroScript

local testItem = menuMan.createActionItem "MyTest" "Menu Test"

-- Add the item to the menu

menu.addItem testItem -1

)

Here are two macroScripts that set and reset two of the right-click menus:

macroScript SetQuads

category:"Custom UI"

tooltip:"Set Quad"

(

on execute do

(

quadmenu = menuMan.findQuadMenu "Modeling 2"

if quadmenu != undefined do menuMan.setViewportRightClickMenu #nonePressed quadmenu

quadmenu = menuMan.findQuadMenu "Sample 4x1"

menuMan.setViewportRightClickMenu #controlPressed quadmenu

)

)

macroScript ResetQuads

category:"Custom UI"

tooltip:"Reset Quads"

(

on execute do

(

quadmenu = menuMan.findQuadMenu "Default Viewport Quad"

if quadmenu != undefined do menuMan.setViewportRightClickMenu #nonePressed quadmenu

quadmenu = menuMan.findQuadMenu "Modeling 1 [Cntrl+RMB]"

if quadmenu != undefined do menuMan.setViewportRightClickMenu #controlPressed quadmenu

)

)

See also

Quad Menu

Menu and CUI Loading

maxOps

Interface: quadMenuSettings

Interface: menuMan

Interface: maxOps


Menu and CUI Loading

You can load a menu file in MAXScript as follows:

menuMan.loadMenuFile "MaxModelingMenu.mnu"

The full path should not be specified. It will look in the appropriate directories for menu files. The default is the "ui" directory.

You can set the main menu in max as follows:

menuMan.setMainMenuBar "Menu Bar1"

To restore MAX's default main menu:

menuMan.setMainMenuBar "Main Menu Bar"

The function returns true of it succeeds and false if it can't find the named menu.

You can set the quad right-click menu that MAX uses in the viewports using the following MAXScript:

menuMan.setViewportRightClickMenu #nonePressed "Modeling 2"

Sets the default (no keys pressed) quad menu to "Modeling 2". The menu name must be a quad menu that is listed in the "Quads" customization dialog, and the name must match exactly, including capitalization.

For the first parameter, you can use one of the following 8 values:

#nonePressed

#shiftPressed

#altPressed

#controlPressed

#shiftAndAltPressed

#shiftAndControlPressed

#controlAndAltPressed

#shiftAndAltAndControlPressed

Here are two macroScripts that set and reset two of the right-click menus:

EXAMPLE

macroScript SetQuads

category:"Custom UI"

tooltip:"Set Quad"

(

on execute do

(

menuMan.setViewportRightClickMenu #nonePressed "Modeling 2"

menuMan.setViewportRightClickMenu #controlPressed "Sample 4x1"

)

)

------------------------------

macroScript ResetQuads

category:"Custom UI"

tooltip:"Reset Quads"

(

on execute do

(

menuMan.setViewportRightClickMenu #nonePressed "Default Viewport Quad"

menuMan.setViewportRightClickMenu #controlPressed "Modeling 1 [Cntrl+RMB]"

)

)

You can display a quad menu like this:

menuMan.trackQuadMenu "Default Viewport Quad"

The menu name must be a quad menu that is listed in the "Quads" customization dialog, and the name must match exactly, including capitalization.

You can load a CUI file from MAXScript as follows:

maxOps.loadCUIFile "ModelingCUI.cui"

It will search the appropriate UI directory for the .cui file.

cui.expertModeOn()

Turns expert mode on

cui.expertModeOff()

Turns expert mode off

cui.getExpertMode()

Returns true of expert mode is on

cui.commandPanelOpen

Lets you get and set whether the command panel is displayed. A Boolean value - true if the command panel is displayed, false if not displayed.

See also

Interface: maxOps

Menu Manager

Interface: menuMan

3ds Max System Globals


Miscellaneous Dialogs

For methods associated with the Render Effects dialog, see RenderEffect : MAXWrapper .

For methods associated with the Render Environment dialog, see Atmospheric : MAXWrapper .

exclusionListDlg()

Displays the Exclude/Include dialog used for Lights, and returns an array of the nodes moved into the Include/Exclude list.

configureBitmapPaths()

This method puts up the Configure Bitmap Paths dialog to let the user configure the bitmap loading paths. Returns false if the user cancels out of the Configure Bitmap Paths dialog, true otherwise.

materialBrowseDlg [#mats] [#maps] [#incNone] [#instanceOnly]

This method puts up the Material/Map Browser. This method returns undefined if no Material or TextureMap is picked, otherwise a copy or instance of the Material or TextureMap is returned. The definition of the parameters are:

#mats

Display Materials only.

#maps

Display TextureMaps only.

#incNone

Include "None" as a Material and TextureMap.

#instanceOnly

If the selected Material or TextureMap already exists, the returned value contains an instance. Otherwise a dialog is displayed for the user to specify Copy or Instance.

If neither #mats or #maps is specified, both Materials and TextureMaps are displayed. If both are specified, TextureMaps are displayed.

mtlBrowser.browseFrom [#mtlLibrary | #mtlEditor | #activeSlot | #selected | #scene | #new]

Lets you set the Browse From: source for the modeless material browser.

nodeColorPicker()

This method displays the Object Color picker dialog, and returns the selected color as a Color value.

OSnap()

This method toggles the Grid and Snap Settings dialog.

USetup()

This method displays the Units Setup dialog.


mouseTrack() Function

The mouseTrack function lets you register a MAXScript function to track the mouse. While the tracking is going on, this function is called whenever a mouse action occurs, such as a button click or a drag, etc.

The function has the form:

mouseTrack [on:<node>] [prompt:<message_string>] [snap:#2D|#3D] [trackCallback:fn|#(fn,arg)]

on:<node>

Optionally specifies a scene object to track on. If you don't supply an object, the mouse tracks on the current active grid. Note that the object surface tracker uses the SDK function IntersectRay() which is not reliably implemented on all object types. Editable meshes always work OK, so you can convertToMesh() if needed.

prompt:<message_string>

Displays the prompt message in the MAX status line

snap:#2D|#3D

Relevant when not tracking on an object surface (no on:<node> specified). If snap mode is on and #2D is supplied, snaps to snap points on grid, if #3D is specified snaps to any near snap point in space.

trackCallback:fn|#(fn,arg)

Is where you specify the function to be called as the mouse is dragged over the active grid or object surface. You can specify it is a single function or a function and an argument value in a two element array. The latter form is useful if you have a common callback function for many tasks and want to send in a parameter to control its operation for a particular use. The function you give must be of the following form:

fn callback_fn msg ir obj faceNum shift ctrl alt = ...

in other words, a scripted function of 7 arguments. While the tracking is going on, it is called whenever a mouse action occurs, such as a button click or a drag, etc.

The 'msg' argument is a message code that indicates what kind of action occurred, and can be one of:

#freeMove - means the mouse is moved without a button being pressed

#mousePoint - means the left mouse button has just been pressed

#mouseMove - means the mouse is being dragged with the left button down

#mouseAbort - means the right mouse button was clicked, normally meaning cancel

'ir'

The grid or surface intersection normal Ray at the current mouse position. The ray has a .pos property giving the point in space of the normal and a .dir property giving the normal's direction vector.

'obj'

The object being dragged over or undefined if no on:<node> was supplied.

'faceNum'

The number of the face the mouse is over if the object being tracked is an editable mesh, undefined otherwise.

'shift', 'ctrl' and 'alt'

True or false depending on the down or up state of the <shift>, <ctrl> and <alt> keys on the keyboard.

The function should return the special value #continue to continue tracking or any other value to halt tracking. That value then becomes the result of the original mouseTrack() call.

See also

Rollout User-Interface Controls


Network Render Interface

The interface is fully described here: Interface: NetRender

Network Rendering is the rendering of animations using more than one computer connected by a network.

Large and complex animations take many hours to render, even on the fastest PCs. Network rendering allows you to use the power of other 3ds Max enabled computers to speed up the process.

NOTE:

For additional details regarding network rendering, please see the topic "Network Rendering" in the 3ds Max User Reference.

See also

3ds Max System Globals


Maz() / UnMaz()

MAXScript access has been added to the Maz() and UnMaz() functions in the ImaxNet Interface.

Methods:

maz <filename>archiveFile <filename or filename array>input

The first parameter is the filename of the archive to create. The second parameter is either a single filename, or an array of filenames, to be archived.

unmaz <filename>archiveFile <string>outputDir

The first parameter is the filename of the maz archive to extract from. The second parameter is a directory name where all the files in the archive will be extracted.

NOTE:

In 3ds Max 6 and higher, the Maz() function outputs a .zip file instead of the old .maz format. The function UnMaz()works correctly with both .zip and .maz files.


RTT_Methods : Render To Texture Methods

The RTT_Methods structure provides functions for network texture baking.

Methods:

RTT_methods.NetBakeNode <node> frame:<integer>

If a frame value is not specified, all frames as specified by the render setting will be rendered. The script will throw a MAXScript exception if errors are detected.

See also

Bake Elements


Quiet Mode

In Quiet Mode, dialogs participating in the new Default Action system will be suppressed, and user-defined actions will be performed instead.

The actions that can be specified are: #logmsg, #logToFile, and #abort. In addition, you can specify an integer value, where the bits specify event ID specific actions.

A #default action option is available in 3ds Max 8 and higher. When #default is specified, the current defaultAction context state is used. By default, the quiet mode is off unless specified otherwise using the context.

If you set Quiet mode but do not specify an action for an event, the default action is typically to log to the log file and continue.

Methods:

<bool>GetQuietMode()

Returns true if quiet mode is set, or 3ds Max is in net render mode

<bool>SetQuietMode <bool>

Sets quiet mode on or off. Returns previous mode value.

The syntax for MAXScript methods that use the Default Action system are:

render:

quiet: <bool>

If true, suppress participating dialogs.

In previous versions, the default was false. In 3ds Max 8 and higher, the default is the current quiet mode.

missingExtFilesAction: <actions>

Actions to take on Missing External Files, where <actions> is: #logmsg, #logToFile, #abort, #default and/or an integer, or an array of one or more of those items.

missingExtFilesList: &variable

If #logmsg is specified as action, the by-reference variable will be filled in with array of the missing external file names.

missingUVWAction: <actions>

Actions to take on Missing UVWs, where <actions> is: #logmsg, #logToFile, #abort, #default and/or an integer, or an array of one or more of those items.

missingUVWList: &variable

If #logmsg is specified as action, the by-reference variable will be filled in with array of strings containing the missing map channel and node name.

unsupportedRenderEffectAction: <actions>

Actions to take on Unsupported Render Effects, where <actions> is: #logmsg, #logToFile, #abort, #default and/or an integer, or an array of one or more of those items. Available in 3ds Max 8 and higher.

unsupportedRenderEffectList: &variable

If #logmsg is specified as action, the by-reference variable will be filled in with array of the unsupported render effect names. Available in 3ds Max 8 and higher.

loadMaxFile:

fetchMaxFile:

quiet: <bool>

If true, suppress participating dialogs.

In previous versions, the default was false. In 3ds Max 8 and higher, the default is the current quiet mode.

missingExtFilesAction: <actions>

Actions to take on Missing External Files, where <actions> is: #logmsg, #logToFile, #abort, #default and/or an integer, or an array of one or more of those items.

missingExtFilesList: &variable

If #logmsg is specified as action, the by-reference variable will be filled in with array of the missing external file names.

missingDLLsAction: <actions>

Actions to take on Missing DLLs, where <actions> is: #logmsg, #logToFile, #abort, #default and/or an integer, or an array of one or more of those items

missingDLLsList: &variable

If #logmsg is specified as action, the by-reference variable will be filled in with array of strings containing the missing dll file and class name.

missingXRefsAction: <actions>

Actions to take on Missing Xrefs, where <actions> is: #logmsg, #logToFile, #abort, #default and/or an integer, or an array of one or more of those items

missingXRefsList: &variable

If #logmsg is specified as action, the by-reference variable will be filled in with array of strings containing the missing XRef files and/or XRef object names.

mergeMaxFile:

quiet: <bool>

If true, suppress participating dialogs.

In previous versions, the default was false. In 3ds Max 8 and higher, the default is the current quiet mode.

missingDLLsAction: <actions>

Actions to take on Missing DLLs, where <actions> is: #logmsg, #logToFile, #abort, #default and/or an integer, or an array of one or more of those items.

missingDLLsList: &variable

If #logmsg is specified as action, the by-reference variable will be filled in with array of strings containing the missing dll file and class name.

missingExtFilesAction: <actions>

Actions to take on Missing External Files, where <actions> is: #logmsg, #logToFile, #abort, and/or an integer, or an array of one or more of those items. Available in 3ds Max 8 and higher.

missingExtFilesList: &variable

If #logmsg is specified as action, the by-reference variable will be filled in with array of the missing external file names. Available in 3ds Max 8 and higher.

missingXRefsAction: <actions>

Actions to take on Missing Xrefs, where <actions> is: #logmsg, #logToFile, #abort, and/or an integer, or an array of one or more of those items. Available in 3ds Max 8 and higher.

missingXRefsList: &variable

If #logmsg is specified as action, the by-reference variable will be filled in with array of strings containing the missing XRef files and/or XRef object names. Available in 3ds Max 8 and higher.

getMAXFileObjectNames:

quiet: <bool>

If true, suppress participating dialogs.

In previous versions, the default was false. In 3ds Max 8 and higher, the default is the current quiet mode.

missingDLLsAction: <actions>

Actions to take on Missing DLLs, where <actions> is: #logmsg, #logToFile, #abort, #default and/or an integer, or an array of one or more of those items

missingDLLsList: &variable

If #logmsg is specified as action, the by-reference variable will be filled in with array of strings containing the missing dll file and class name.

EXAMPLE

val = undefined

loadmaxfile "apollo.max" missingExtFilesList:&val missingExtFilesAction:#logmsg quiet:true

val

val = undefined

render missingExtFilesList:&val missingExtFilesAction:#(#logmsg,#abort) quiet:true

val

If there are missing external files, the scene will load without a Missing External Files dialog, and val will contain an array of the missing file names. The scene will not render (due to the #abort option being specified), and val will contain an array of the missing file names.

See also

Command Line Option: -silent

Controlling the Renderer

3ds Max File Loading and Saving


Command Line Option: -silent

Added -silent command line switch. Setting this switch turns off all dialogs that are not displayed while net rendering, and by code that checks the Default Action system before displaying a dialog. This includes MAXScript's messageBox, queryBox, and yesNoCancelBox. queryBox will return false and yesNoCancelBox will return #cancel when silent mode is set.

See also

Quiet Mode


Command Line Option: -mxs

Command line option in 3dsmax 6 and higher.

–mxs "command; command;…"

The command line script string is executed after the max file specified on the command line (if any) is opened and the command line script file (i.e. -U MAXScript scriptfile) (if any) is executed. No compile or runtime error messages will be displayed in Listener. The script string is executed in the global scope, the same as if the commands were typed into Listener. Following script string execution, a scene reset is performed and MAX is shut down.

EXAMPLE COMMAND LINE:

3dsmax -mxs "b=box();render()" -u MAXScript test.ms smoketest1b.max


Parameter Wiring

The Parameter Wire manager is described in the core interface 'paramWire' .

In the general case, a wire controller can be wired to any number of other wire controllers in two-way relationships. Each wire has a set of information that defines it, accessible using the indexed accessor functions.

EXAMPLE

The following will demonstrate a way to query a wire controller and determine what parameters it is referencing.

s wc = $.pos.controller.x_position.controller -- get pos X controller

if classOf wc == Float_Wire do

( -- list out its connections

for i in 1 to wc.numWires do

(

parent = wc.getWireParent i

parent_owner = (refs.dependents parent)[1]

param_name = getSubAnimName parent (wc.getWireSubnum i)

format "wire %: % in %\n" i param_name parent_owner

)

)

Additionally, you can use the subAnim indexing operator as a way to scan down through an object for wire controllers,

EXAMPLE

for i in 1 to $foo.numSubs do
if classOf $foo[i].controller == ...

Also, you might also find the exprForMAXObject() method useful here to get a MAXScript expression for the parent or parent owner.

See also

Interface: paramWire

Float_Wire : FloatController

Point3_Wire : Point3Controller

Position_Wire : PositionController

Rotation_Wire : RotationController

Scale_Wire : ScaleController


Picking Scene Nodes By Hit

pickObject [ message:<string> ] [ prompt:<string> ] \
 [ count:n|#multiple ] [ filter:fn ] \
 [ select:<boolean> ] [ pickFrozen:<boolean> ] \
 [ rubberBand:<point3>] [ rubberBandColor:<color> ] \
 [ forceListenerFocus:<boolean> ]

The pickObject() function lets the user pick one or more scene objects in the 3ds Max viewports. It takes several optional keyword arguments. The message: argument takes a string value which is displayed in the status bar prompt line. The prompt: argument takes a string value which is displayed in the Listener window. The count: argument takes either a positive integer or the symbol #multiple to specify how many objects are to be picked (default is 1). If the count specified is greater than 1 or the value #multiple, an array is returned containing the picked objects. The symbol #multiple indicates that any number of objects can be selected and the user terminates the selection with a right mouse click or, if the Listener window has focus, any character key of the keyboard. If the ESC key is pressed while the Listener windows has focus, an #escape value will be returned. If the ESC key is pressed while a viewport has focus, selection is terminated and the selection result is returned.

If #multiple was specified, and no objects had been selected when the selection was terminated, an empty array is returned. If #multiple was not specified, and an object had not been selected when the selection was terminated, a value of undefined is returned.

The filter: function takes a MAXScript function of one argument that is called whenever the cursor is over an object in the scene and is passed that object under the cursor. It returns true if the object is eligible for picking, or false if not. Typically, the function would contain some object class testing,

FOR EXAMPLE,

fn shapeFilt o = (superClassOf o == Shape)

-- which you could use like this:

pickObject prompt:"enter a shape" filter:shapeFilt

The optional keyword argument select: controls whether the picked objects become the new current selection in the 3ds Max scene. If you supply true for that argument, the current selection is replaced with the objects that you pick. The default is false in which case the picker doesn't affect the selection set.

If the pickFrozen: keyword argument is set to false (the default), frozen nodes cannot be picked. If set to true, only frozen nodes can be picked.

The two optional keyword arguments rubberBand: and rubberBandColor: control the display of a rubber-banding line in the viewport during pick operations.

If rubberBand: is supplied on the pickObject() call, it enables rubberbanding, with the given <point3> as world-space coordinates for the start point of the rubber band. You can use the rubberBandColor: argument to override the default line color of gray (color 128 128 128).

FOR EXAMPLE,

obj2 = pickObject rubberBand:obj1.pos rubberBandColor:yellow

The optional keyword argument forceListenerFocus: controls Listener focus forcing. It defaults to true to retain existing semantics and backward compatibility.

When picking multiple nodes and selecting by name by using the 'H' key, you need to supply forceListenerFocus:false to get the 'H' key to work consistently. If this is not specified, focus is forced back to the Listener after each pick:

FOR EXAMPLE,

pickObject count:#multiple forceListenerFocus:false

Be aware that the array returned can contain the same node multiple times.

pickObject will exit if you switch command modes to a non-viewport command mode. For example, if you run pickObject() and then click Select and Move, pickObject will exit with its current results. If instead you went into pan or zoom, pickObject doesn't exit, but waits for its command mode to be re-entered. If you go from a viewport command mode to another command mode, pickObject will exit.

See also

Picking Points in the Viewports

Picking Scene Nodes By Region


Picking Scene Nodes by Name

You can use the selectByName() function to open the standard 3ds Max Select By Name dialog allowing users to pick objects which are then returned as an array of MAXScript node values.

The form is:

selectByName [title:<string>] [buttonText:<string>] [ filter:<fn>] [showHidden:<boolean>] [single:<boolean>]

The optional keyword arguments are interpreted as follows:

title:"string"

Specifies the dialog window title.

buttonText:"string"

Lets you specify the label text in the 'accept' button in the dialog. The default value is "Select".

showHidden:<boolean>

Controls whether hidden and frozen objects are eligible for display. The default value is false. This option was broken in versions prior to 3ds Max 8. Now it works as expected.

single:<boolean>

Controls whether single or multiple objects may be selected in the selector. The default is false, meaning multiple objects may be selected, and they are returned in an array. If single:true is specified, a single object may be selected and is returned directly, not in an array.

filter:<fn>

Lets you specify a filter function that determines which objects should be displayed in the list. This is similar to the filter functions elsewhere in MAXScript. The function you supply should take one argument, which the current object being tested for inclusion and the function should return true for include, false for exclude. If you don't specify a filter, all objects are displayed.

FOR EXAMPLE,

the following function limits the choices to shape objects:

fn shape_filt obj = isKindOf obj Shape

Then you can call the Select By Name function to select multiple shapes including hidden ones:

theShapes = selectByName title:"Select Shapes" buttonText:"GET 'EM!" filter:shape_filt showHidden:true single:false

RESULT:

If the user cancels out of the dialog, the function returns the value undefined.

See also

Picking Scene Nodes By Hit

Picking Scene Nodes By Region

Picking Points in the Viewports


Picking Scene Nodes By Region

The following methods allow you to pick one or more objects based on their position in the viewports. All coordinates used in these methods are in Windows format, with the origin in the upper left. The gw.getWinSizeX() and gw.getWinSizeY() methods can be used to determine the size of the viewport in pixels. The objects to picked are filtered based on the Selection Filter specified in the 3ds Max main toolbar.

boxPickNode <box2> [crossing:<boolean>]

Returns an array of the nodes within the specified rectangular region. The <box2> value specifies the corner in pixel values within the active viewport. If the crossing: parameter value is true, an object only partially in the region will be picked. If false, the object must be completely within the region to be picked. The default crossing: value is true.

FOR EXAMPLE,

boxPickNode (box2 [0,0] [1000,1000])

circlePickNode <box2> [crossing:<boolean>]

Returns an array of the nodes within the specified circular region. The <box2> value specifies the center of the circle and a point on the circle in pixel values within the active viewport. If the crossing: parameter value is true, an object only partially in the region will be picked. If false, the object must be completely within the region to be picked. The default crossing: value is true. The [left, bottom] and [right, top] components of the box2 parameter value correspond to the center and radius points, respectively. The box2 parameter value needs to be set up in a specific manner, as shown in the following script:

FOR EXAMPLE,

vpCenter = (point2 (gw.getWinSizeX()) (_gw.getWinSizeY()))/2

vpQuarter = point2 (vpCenter.x/2) vpCenter.y

circleRegion = box2 0 0 0 0 -- initialize circleRegion to a box2 value

circleRegion.left = vpCenter.x -- the center of the circle

circleRegion.bottom = vpCenter.y

circleRegion.right = vpCenter.x/2 -- a point on the circle

circleRegion.top = vpCenter.y

for obj in (circlePickNode circleRegion crossing:false) do

print obj.name

will print the names of all nodes completely within a circular region, where the center of the circle is the center of the viewport and the point on the circle is located one quarter of the distance from the edge to the center of the viewport.

fencePickNode <point2_array> [crossing:<boolean>]

Returns an array of the nodes within the specified fenced region. The fenced area is defined by the array of point2 values. The default crossing: value is true.

See also

Picking Scene Nodes by Name

Picking Scene Nodes By Hit


Plug-In Manager

The Plug-in Manager lets you manage plug-ins dynamically without any initialization required. The Plug-in Manager provides a list of all plug-ins found in the 3ds Max plug-in directories, including the plug-in description, type (object, helper, modifier, and so on), status (loaded or deferred), size, and path. The Plug-in Manager provides options to load or tag as deferred, any particular plug-in, regardless where they reside on disk.

When you start the Plug-in Manager, it scans through all the plug-in paths specified in the plug-in.ini file and lists them in the Plug-in Manager dialog.

Actually there are two different FP interfaces in the plug-in manager, one is an action interface accessed through Plugin_manager and the other one is a static interface called pluginManager.

You can access the static interface using

pluginManager.show = true

or

pluginManager.loadClass Flex

Methods

pluginManager.visible = true --show

pluginManager.visible = false --hide

Show and hide the plug-in manager.

pluginManager.loadClass <class>

Will ensure that the given class is loaded, in the event that it is a deferred loading class, and so any MAXScript methods or Function Published interfaces it publishes will be available.

EXAMPLE

pluginManager.loadClass Flex

After this code is executed, all the Flex modifier MAXScript methods are installed and callable.

NOTE:

This is only needed in situations where a plug-in loading may be deferred and it does not have any instances already in the current scene.

See also

Interface: pluginManager


Quad Menu

When you click the right mouse button anywhere in an active viewport, except on the viewport label, the program displays a quad menu at the mouse cursor. The quad menu can display up to four quadrant areas with various commands.

In the MAXScript Listener window, type apropos "quadmenusettings" to see the list of functions available.

The quad menu is set in the startup scripts directory called QuadOptions_Startup.ms.

The two right quadrants of the default quad menu display generic commands, which are shared between all objects. The two left quadrants contain context-specific commands, such as mesh tools and light commands. Each of these menus provides convenient access to functions found in the command panel.

The quad menu contents depend on what is selected, as well as any customization options you may have selected in the Quads panel of the Customize UI dialog. The menus are set up to display only the commands that are available for the current selection, therefore selecting different types of objects displays different commands in the quadrants. Consequently, if no object is selected, all of the object-specific commands will be hidden. If all of the commands for one quadrant are hidden, the quadrant will not be displayed.

NOTE:

PickObject() does not pick objects when launched from a quad menu. It will hang and refuses to pick any object. Hit 'escape' for emergency exit. PickObject works correctly from a shortcut and toolbar.

See also

Interface: quadMenuSettings

Menu Manager

Interface: menuMan

Menu and CUI Loading


RAMPlayer

The following method is associated with the RAMPlayer:

RAMPlayer <filename1_string> <filename2_string>

Opens RAMPlayer with filename1 as Channel A and filename2 as Channel B. You can pass a null string ("") as a filename string, in which case no file is loaded into that channel.


renderSceneDialog

The renderSceneDialog structure provides a set of functions for controlling the Render Scene Dialog window.

renderSceneDialog.cancel()

Closes Render Scene Dialog if open. Changes made in the dialog are rejected. No arguments.

NOTE:

The render dialog provides only limited support for canceling (the Cancel button was removed when the tabbed dialogs were introduced in 3ds Max 6). It will only cancel the uncommitted changes in the Common and Renderer tabs.

renderSceneDialog.close()

Closes Render Scene Dialog if open. Changes made in the dialog are accepted. No arguments.

renderSceneDialog.commit()

If Render Scene dialog is open, the dialog remains open, but changes made in the dialog are accepted. No arguments.

renderSceneDialog.isOpen()

Returns true if the Render Scene dialog is open, false is closed. No arguments.

renderSceneDialog.open()

Opens Render Scene Dialog if not already open. No arguments.

renderSceneDialog.update()

If Render Scene dialog is open, it is updated to show the changes made to it. No arguments.

See also

Render Scene Dialog

envEffectsDialog - Open and Close the Environment and Effects dialog

Default_Scanline_Renderer : RendererClass

3ds Max Default Scanline Renderer Anti-Aliasing Filters

Controlling the Renderer

TabbedDialogs - Controlling Tabbed Dialogs


Render Scene Dialog

NOTE:

Changing the render scene dialog settings via MAXScript should be done with the actual render scene dialog in a closed state. Leaving the dialog open will make the attempted MAXScript modifications non-sticky.

Render Scene Dialog > Commong Tab:

Roll over and click a group of controls to jump to its description:

renderer

In versions prior to 3ds Max 6, this global variable was used to switch between the draft and production renderers and test which one is active. The draft renderer was retired in 3ds Max 6 and this variable now returns only #production for compatibility with older scripts.

Render Scene Dialog > Common Parameters > Time Output Group:

NOTE:

Changing the render scene dialog settings via MAXScript should be done with the actual render scene dialog in a closed state. Leaving the dialog open will make the attempted MAXScript modifications non-sticky.

3ds Max System Global Variables:

rendTimeType -- integer

Get/set the type of time range to be rendered.

Possible values are:

1 - Single frame.

2 - Active time segment (animationRange).

3 - User specified Range.

4 - User specified Frame pickup string (for example "1,3,5-12"). See rendPickupFrames below.

rendNThFrame -- integer

Get/set the Every Nth Frame value. Minimum value is 1. Default is 1.

rendStart -- time

Get/set the Start Time value. Used when rendTimeType is set to 3.

rendEnd -- time

Get/set the End Time value. Used when rendTimeType is set to 3.

rendFileNumberBase -- integer

Get/set the File Number Base value.

rendPickupFrames -- string

Get/set the Frames string containing the user frames or sequences to render.

Render Scene Dialog > Common Parameters > Area To Render

The following methods let you get and set the render type:

getRenderType()

Gets the render type.

setRenderType <name>

Sets the render type.

The valid name values are:

#view | #selected | #region | #crop | #blowUp | #boxselected | #regionselected | #cropselected | #normal | #selection | #regionCrop.

#view and #normal are equivalent

#selected and #selection are equivalent

#crop and #regionCrop are equivalent.

Render Scene Dialog > Common Parameters > Output Size Group

NOTE:

Changing the render scene dialog settings via MAXScript should be done with the actual render scene dialog in a closed state. Leaving the dialog open will make the attempted MAXScript modifications non-sticky.

3ds Max System Global Variables:

renderWidth

Lets you get and set an Integer value that defines the output size width for the active renderer.

renderHeight

Lets you get and set an Integer value that defines the output size height for the active renderer.

renderPixelAspect

Lets you get and set an Integer value that defines the output pixel aspect for the active renderer.

Methods:

getRendApertureWidth()

Get the Aperture Width in millimeters for the current renderer.

getRendImageAspect()

Get the Image Aspect Ratio for the current renderer.

setRendApertureWidth <float>

Sets the Aperture Width in millimeters for the current renderer.

Render Scene Dialog > Common Parameters > Options Group

NOTE:

Changing the render scene dialog settings via MAXScript should be done with the actual render scene dialog in a closed state. Leaving the dialog open will make the attempted MAXScript modifications non-sticky.

3ds Max System Global Variables:

rendAtmosphere -- boolean

Get/set the renderer's uses atmospheric effects flag. TRUE = on; FALSE = off

renderEffects

Lets you get and set whether to perform Render Effects after a scene render. A Boolean value - true if Render Effects are to be performed, false if not.

renderDisplacements

Lets you get and set whether to perform displacement mapping during a render. A Boolean value - true if displacement mapping is to be performed, false if not.

rendColorCheck -- boolean

Get/set the Video Color Check option.

rendFieldRender -- boolean

Get/set the Render To Fields options.

rendHidden -- boolean

Get/set the renderer's render hidden objects flag. TRUE = on; FALSE = off

rendSimplifyAreaLights

When set to true, area lights will be examined and converted to point light sources when appropriate.

rendForce2Side -- boolean

Get/set the renderer's force two-sided flag. TRUE = on; FALSE = off

rendSuperBlack -- boolean

Get/set the renderer's super black flag. TRUE = on; FALSE = off

Render Scene Dialog > Common Parameters > Advanced Lighting Group

Render Scene Dialog > Common Parameters > Bitmap Proxies Group

See Interface: BitmapProxyMgr for access to the Bitmap Proxies Manager.

Render Scene Dialog > Common Parameters > Render Output Group

NOTE:

Changing the render scene dialog settings via MAXScript should be done with the actual render scene dialog in a closed state. Leaving the dialog open will make the attempted MAXScript modifications non-sticky.

3ds Max System Global Variables:

rendSaveFile -- boolean

Get/set the state of the Save File option.

rendOutputFilename

Lets you get and set a String value that defines the output file name for the active renderer. It contains the corresponding value set in the Render Scene dialog. If this global variable is set to "" then Save File check box in the Render Scene dialog will be unchecked.

rendUseDevice -- boolean

Get/set the state of the renderer's use device flag. TRUE = on; FALSE = off

rendShowVFB -- boolean

Get/set the state of the renderer's show virtual frame buffer flag. TRUE = on; FALSE = off

rendUseNet -- boolean

Get/set the state of the renderer's use net flag. TRUE = on; FALSE = off

skipRenderedFrames

Lets you get and set whether to skip rendered frames during a render. A Boolean Value - true if rendered frames are to be skipped, false if not.

Render Scene Dialog > Common Parameters > Scripts

3ds Max System Global Variables:

usePreRendScript (system BooleanClass)

Get/set the state of the Pre-Render > Enable checkbox.

preRendScript (system String): ""

Get/set the file name of the Pre-Render script.

usePostRendScript (system BooleanClass)

Get/set the state of the Post-Render > Enable checkbox.

postRendScript (system String): ""

Get/set the file name of the Post-Render script.

Render Scene Dialog > Viewport Index, Lock Button, Render Presets

rendViewIndex

NEW in 3ds Max 2009: The index of the viewport to render when the Lock button is pressed (rendUseActiveView is false)

The index numbers correspond to those used by the "viewport" functions, for example, viewport.activeViewport.

rendUseActiveView

NEW in 3ds Max 2009: Get/set the Lock button state.

When set to false, the Lock button is pressed and the viewport specified by rendViewIndex will be rendered regardless of which viewport is active.

When set to true, the Lock button is depressed and the active viewport will be rendered, disregarding the selection in the drop-down list.

renderPresetMRUList

NEW in 3ds Max 2009: This property contains a list of render presets, matching the Render Dialog dropdown list.

This is an array of items, where each item is an array of two subitems. The first subitem is the display name of the render preset, the second item is the filename of the corresponding render preset file.

See also

Pre-Render Script Evaluation Order Changes in 3ds Max 2008


ScanlineRender Struct

The following 3ds Max system global variables are specific to 3ds Max’s default scanline A-Buffer renderer. These variables return undefined if the current renderer is not 3ds Max’s default scanline renderer.

Roll over and click a group of controls to jump to its description:

Render Scene Dialog > Default Scanline Renderer > Options

scanlineRender.mapping

Get/set the state of the Mapping checkbox. When set to false, no mapping will be calculated by the Default Scanline Renderer. Default is true.

scanlineRender.shadows

Get/set the state of the Shadows checkbox. When set to false, no shadows will be calculated by the Default Scanline Renderer. Default is true.

scanlineRender.enableSSE

Get/set the state of the Enable SSE checkbox. When set to true, SIMD Streaming Extensions technology (SSE) will be used by the Default Scanline Renderer. Default is false.

scanlineRender.autoReflect

Get/set the state of the Auto-Reflect/Refract and Mirrors checkbox. When set to false, no reflections and refractions will be calculated by the Default Scanline Renderer for Reflect, Refract and Flat Mirror maps. Default is true.

scanlineRender.forceWireframe

Get/set the state of the Force Wireframe checkbox. When set to true, all face edges will be rendered as wireframes by the Default Scanline Renderer. Default is false.

scanlineRender.wireThickness

Get/set the value of the Wire Thickness spinner in pixels.

Render Scene Dialog > Default Scanline Renderer > Antialiasing

scanlineRender.antiAliasing

Get/set the state of the Antialising checkbox. When set to false, no antialiasing will be performed. Default is true.

scanlineRender.filterMaps

Get/set the state of the Filter Map checkbox. When set to false, texture maps will not be filtered. Default is true.

scanlineRender.antiAliasFilter

Lets you get and set the anti-aliasing filter.

For a list of all of the anti-aliasing filters you can say:

showClass "*:filter*"

EXAMPLE

scanlineRender.antiAliasFilter = quadratic()

The anti-aliasing filters and their parameters are described in 3ds Max Default Scanline Renderer Anti-Aliasing Filters .

scanlineRender.antiAliasFilterSize

Get/set the antialiasing filter size as a floating point value.

scanlineRender.antiAliasFilterSizeautoReflectLevels

Render Scene Dialog > Default Scanline Renderer > Global SuperSampling

scanlineRender.enablePixelSampler

Get/set the state of the Enable Global Sampler checkbox.

Render Scene Dialog > Default Scanline Renderer > Object Motion Blur

scanlineRender.objectMotionBlur

Get/set the state of the Apply checkbox.

scanlineRender.objectBlurSamples

Get/set the value of the Samples spinner.

scanlineRender.objectBlurDuration

Get/set the value of the Duration (frames) spinner.

scanlineRender.objectBlurSubdivisions

Get/set the value of the Duration Subdivisions spinner.

Render Scene Dialog > Default Scanline Renderer > Image Motion Blur

scanlineRender.imageMotionBlur

Get/set the state of the Apply checkbox.

scanlineRender.imageBlurTrans

Get/set the state of the Transparency checkbox.

scanlineRender.imageBlurDuration

Get/set the value of the Duration (frames) spinner.

scanlineRender.imageBlurEnv

Get/set the state of the Apply to Environment Map checkbox.

Render Scene Dialog > Default Scanline Renderer > Color Range Limiting

scanlineRender.colorClampType

Get/set the Color Range Limiting radio buttons.

Possible values are:

0 - Clamp

1 - Scale

Render Scene Dialog > Default Scanline Renderer > Memory Management

scanlineRender.conserveMemory

Get/set the state of the Conserve Memory checkbox. When checked, the Scanline Renderer will use a memory conserving mode which slightly increases render time.

See also

Default_Scanline_Renderer : RendererClass

renderSceneDialog

3ds Max Default Scanline Renderer Anti-Aliasing Filters

Controlling the Renderer


Renderer Preferences

rendVidCorrectMethod -- integer

Get/set the video color check method.

Possible values are:

1 - Flag with black

2 - Scale Luma

3 - Scale Saturation

rendNTSC_PAL -- integer

Get/set the video color check NTSC or PAL setting.

Possible values are:

1 - NTSC

2 - PAL

rendDitherTrue -- boolean

Get/set the renderer's dither true color flag. TRUE = on; FALSE = off

rendDither256 -- boolean

Get/set the renderer's dither 256 color flag. TRUE = on; FALSE = off

rendFieldOrder -- integer

Get/set the rendering field order.

Possible values are:

1 - Even

2 - Odd

rendSuperBlackThresh -- integer

Get/set the Super Black Threshold value. Range 0 to 255. Default is 15.

rendNThSerial -- boolean

Get/set the output file sequencing nth serial numbering setting. TRUE = on; FALSE = off

preferences.maximumGBufferLayers

Get/set an Integer value that specifies the maximum number of g-buffer layers generated during a render.

rendMultiThread -- boolean

Get/set the renderer's multi-threaded flag. TRUE = on; FALSE = off


3ds Max Scanline A-Buffer Renderer Anti-Aliasing Filters

3ds Max Default Scanline Renderer Anti-Aliasing Filters

The following Filter class values are available as 3ds Max default scanline renderer anti-aliasing filters. The renderer anti-aliasing filter is accessed using the following 3ds Max system global variable:

scanlineRender.antiAliasFilter

Lets you get and set the anti-aliasing filter.

For a list of all of the anti-aliasing filters you can say:

showClass "*:filter*"

EXAMPLE

scanlineRender.antiAliasFilter = quadratic()

Constructors and Properties

Area:

Area()

Blackman:

Blackman()

Blendfilter:

Blendfilter ...

<Blendfilter>.Blend Float default: 0.3

Catmull_Rom:

Catmull_Rom()

Cook_Variable:

Cook_Variable()

Cubic:

Cubic()

Mitchell_Netravali:

Mitchell_Netravali ...

<Mitchell_Netravali>.Blur Float default: 0.3333

<Mitchell_Netravali>.Ringing Float default: 0.3333

Plate_Match_MAX_R2: (3ds Max only)

Plate_Match_MAX_R2()

Plate_Match_VIZ_R2: (Autodesk VIZ only)

Plate_Match_VIZ_R2()

Quadratic:

Quadratic()

Sharp_Quadratic:

Sharp_Quadratic()

Soften:

Soften()

Video:

Video()

See also

Default_Scanline_Renderer : RendererClass

Render Scene Dialog

renderSceneDialog

Controlling the Renderer


Controlling the Renderer

Controlling the Renderer using the render() method

The render() method invokes the current 3ds Max renderer.

Other than calling max quick render which is equivalent to pushing the Render icon in the Main Toolnbar, the render() method can take many optional parameters to control the rendering independently from the current Render Scene Dialog settings.

Optional Parameters:

render

[ camera: <camera_node> ]

Specifies the camera to render. If not specified, defaults to the active viewport.

[ frame: <number> | #current ]

Specifies the frame to render. If not specified or set to #current, defaults to rendering the current frame.

[ framerange: <interval> | #active ]

[ fromframe: <time> ]

[ toframe: <time> ]

[ nthframe: <time> ]

Specifies the frame range to render. If specified, one render() call will generate multiple frames. If not supplied, only one frame will be rendered.

Defaults to unsupplied, in which case the frame: value described above controls which frame to render.

Starting with 3ds Max 5, the parameters frame:, fromframe: and toframe: accept time values instead of numbers. Setting them to float values allows for sub-frame rendering!

[ outputwidth: <number> ]

Sets the width of the output image.

Defaults to the current render width specified in the Render Scene Dialog .

[ outputheight: <number> ]

Sets the height of the output image.

Defaults to current render height specified in the Render Scene Dialog .

[ outputSize: <point2> ]

An alternative way to specify the output size of the rendered image.

The point2 value is in the form: [width,height]

[ pixelaspect: <number> ]

Specifies the pixel aspect ratio.

If not supplied, defaults to 1.0.

[ renderhiddenobjects: <boolean> ]

When supplied as true, hidden objects will be rendered.

When supplied as false, hidden objects will not be rendered.

If not supplied, defaults to the current renderer's Render Hidden Objects state.

[ rendSimplifyAreaLights: <boolean> ]

When supplied as true, lets the renderer simplify area lights by rendering them as point lights when appropriate.

When supplied as false, the renderer will process area lights completely.

When not supplied, the state of the "Area Lights/Shadows as Points" checkbox in the the Render Scene Dialog .controlled by the global variable rendSimplifyAreaLights will be used.

[ superblack: <boolean> ]

Defaults to current renderer's "Superblack" checkbox state.

[ force2sided: <boolean> ]

Defaults to current renderer Force 2 Sided state.

[ renderatmosphericeffects: <boolean> ]

Defaults to current renderer Render Atmospheric Effects state.

[ renderfields: <boolean> ]

Defaults to current renderer Render Fields state.

[ fieldorder: #odd | #even ]

Defaults to current renderer preferences Field Order state.

[ outputfile: <string> ]

The frame number is appended to the filename if the file image type is a single image type (.bmp, .jpg, .tga, etc.), and a frame range is being rendered. Defaults to rendering to just the virtual frame buffer.

[ vfb: <boolean> ]

When set to true, opens a Rendered Frame Window to display the rendered image. When set to false, the rendered image will not be displayed.

Defaults to current renderer Rendered Frame Window state.

HISTORY NOTE:

In versions prior 3ds Max 6, the "Rendered Frame Window" was known as the "Virtual Frame Buffer" (thus abbreviated as VFB and not RFW).

[ pos: #vfb_upper_left | #vfb_lower_left | #vfb_upper_right | #vfb_lower_right | #vfb_center | #vfb_renderer_position | #vfb_vprimary_position | #vfb_vsecondary_position ]

NEW in 3ds Max 2009: Lets you specify the screen position the Rendered Frame Window (a.k.a. Virtual Frame Buffer - see note above) will open when the vfb: option is supplied as true.

Default is #vfb_renderer_position, which is the last position the user left the window after a render.

[ outputHDRbitmap:<boolean> ]

When set to true, the new 32 bit floating-point frame buffer will be used. When set to false or not supplied, the standard frame buffer will be used. Available in 3ds Max 8 and higher.

[ netrender: <boolean> ]

Submits the render to Backburner for network rendering.

Defaults to current renderer Net Render state.

[ renderType: #normal | #region | #regionCrop | #blowup | #selection | #regionselected | #cropselected | #bakeSelected ]

[ region: #(left,top,right,bottom) ]

Provides control over the type of rendering, corresponding to the Render Type menu in the 3ds Max toolbar.

If #region, #regionCrop or #blowUp is selected, the region: parameter may be used to override the currently set regions for the active viewport, specified as pixel coordinates relative to the top-left corner in the bitmap (VFB). The region argument is ignored for all other render types. The region argument can be a Box2 value.

If the rendertype is #blowup, and a region is specified, the region rectangle must have the same aspect as the render output size aspect. The top, bottom, and left component values are taken from the region argument, but the width is re-calculated to force the proper aspect.

NOTE:

#region, #regionCrop and #blowUp can only be selected for an active viewport rendering. An error will be reported if they are specified for a camera rendering. Defaults to #normal.

Here is a full list of the supported types, their aliases and the UI types they correspond to:

#view, #normal - correspond to View
#selection, #selected - correspond to Selected
#region - corresponds to Region
#regionCrop, #crop - correspond to Crop
#blowUp - corresponds to Blowup
#regionselected - corresponds to Region Selected
#cropselected - corresponds to Crop Selected

NOTE:

Render type #boxselected, which corresponds to Box Selected, is currently not supported.

The #bakeSelected rendertype is used by the Render To Texture toolset to invoke the renderer after defining one or more BakeElements and preparing objects for baking. Please see the source code of the Render To Texture script for an example of its usage.

[ to: <bitmap> ]

Specifies an existing bitmap to render into. The render() function takes image size and other parameter settings from the existing bitmap. If not supplied, a new bitmap is created and returned by the render() function.

[ channels: <array_of_channel_names> ]

Specifies which g-buffer channels should be created during the rendering.

EXAMPLE

bm = render camera:$cam2 channels:#(#zDepth, #coverage, #objectID)

causes $cam2 to be rendered into a new bitmap that will contain z-depth, pixel coverage and object g-buffer ID channels

The channels: argument must always be an array of channels identifiers, chosen from the following:

#zDepth

#matID

#objectID

#UVCoords

#normal

#unClamped

#coverage

#node

#mask

#shaderColor

#shaderTransparency

#velocity

#weight

Defaults to no g-buffer channels.

[ aperture: <float> ]

Defaults to current renderer Aperture Width value.

[ ditherTrueColor: <boolean> ]

Defaults to current rendering preferences Dither True Color state.

[ ditherPaletted: <boolean> ]

Defaults to current rendering preferences Dither Paletted state.

[ videocolorcheck: <boolean> ]

Defaults to current renderer Video Color Check state.

[ renderPAL: <boolean> ]

Defaults to current rendering preferences Video Color Check NTSC/PAL state. If true, and video color checking is enabled, PAL video color checking is performed.

[ superBlackThreshold: <integer> ]

Defaults to current rendering preferences Super Black Threshold value.

[ maxPixelSize: <float> ]

This property is available in the Render Scene dialog and is also accessible through the RadiosityPreferences interface.

[ useRadiosity: <boolean> ]

This property is available in the Render Scene dialog and is also accessible through the RadiosityPreferences interface.

[ ComputeRadiosity: <boolean> ]

This property is available in the Render Scene dialog and is also accessible through the RadiosityPreferences interface.

[ cancelled: <&var> ]

If the render is cancelled, the variable var will contain true, otherwise it will contain false.

FOR EXAMPLE

bm = render cancelled:&wasCancelled

if (not wasCancelled) do ....

[ progressbar: <boolean> ]

If true, the entire viewport display is disabled and a progress bar and Cancel button are displayed in the status panel. If false or not present, the viewport display is not disabled. In both cases, Esc will cancel the render.

[ renderMultiPassEffects:<boolean> ]

If true or not specified, if the view being rendered is a camera view, and a multipass effect is enabled for that camera, the rendering will be performed using that multipass effect. If explicitly supplied as false, no multipass effect will be rendered. Available in 3ds Max 8 and higher.

[ renderElements:<boolean> ]

If true or not specified, if render elements are present in the scene, those render elements will be rendered. If the outputfile: argument is specified, the render element output will be written to disk in the same manner as if rendered from the Render Scene dialog with the Render Output filename specified. If false, render elements will not be rendered. Available in 3ds Max 8 and higher.

[ renderElementBitmaps:<&var> ]

If render elements are rendered, the render element output bitmaps are placed in an array (one array element per rendered render element), and this array is returned through the specified variable by-reference. If multiple frames are rendered, the final frame's output is used. Available in 3ds Max 8 and higher.

FOR EXAMPLE

render renderMultiPassEffects:true renderElements:true renderElementBitmaps:&reb

if reb != undefined do for b in reb do display b

The following properties are available if the standard scanline renderer is being used:

[ antiAliasing: <boolean> ]

Defaults to current renderer Anti-Aliasing state.

[ antiAliasFilterSize: <float> ]

Defaults to current renderer Anti-Aliasing Filter Size value.

[ antiAliasFilter: <filter> ]

Defaults to current renderer Anti-Aliasing filter.

[ enablePixelSampler: <boolean> ]

Defaults to the current renderer Global SuperSampling state. This state is true if Disable all Samplers is checked, otherwise false.

[ mapping: <boolean> ]

Defaults to current renderer Mapping state.

[ shadows: <boolean> ]

Defaults to current renderer Shadows state.

[ autoReflect: <boolean> ]

Defaults to current renderer Auto-Reflect/Refract and Mirrors state.

[ forceWireframe: <boolean> ]

Defaults to current renderer Force Wireframe state.

[ wireThickness: <float> ]

Defaults to 1.0.

[ filterMaps: <boolean> ]

Defaults to current renderer Anti-Aliasing Filter Maps state.

[ objectMotionBlur: <boolean> ]

Defaults to current renderer Object Motion Blur Apply state.

[ objectBlurDuration: <float> ]

Defaults to 0.5.

[ objectBlurSamples: <integer> ]

Defaults to 10.

[ objectBlurSubdivisions: <integer> ]

Defaults to 10.

[ imageMotionBlur: <boolean> ]

Defaults to current renderer Image Motion Blur Apply state.

[ imageBlurDuration: <float> ]

Defaults to 0.5.

[ autoReflectLevels: <integer> ]

Defaults to 1.

NOTE:

Since 3ds Max 5, the render() method passes any keyword arguments on to the renderer class instance, so any renderer parameter block or FPS interface property can be set via the keyword argument. This behavior replaces the hardcoded keyword arguments documented in the above topic. The default scanline renderer FPS interface properties were named to maintain consistency with existing scripts.

Quiet Mode Options:

[ quiet: <bool> ]

If true, suppress participating dialogs.

[ missingExtFilesAction: <actions> ]

Actions to take on Missing External Files, where <actions> is: #logmsg, #logToFile, #abort, and/or an integer, or an array of one or more of those items.

[ missingExtFilesList: &variable ]

If #logmsg is specified as action, the by-reference variable will be filled in with array of the missing external file names.

[ missingUVWAction: <actions> ]

Actions to take on Missing UVWs, where <actions> is: #logmsg, #logToFile, #abort, and/or an integer, or an array of one or more of those items.

[ missingUVWList: &variable ]

If #logmsg is specified as action, the by-reference variable will be filled in with array of strings containing the missing map channel and node name.

[ unsupportedRenderEffectAction: <actions> ]

Actions to take on Unsupported Render Effects, where <actions> is: #logmsg, #logToFile, #abort, #default and/or an integer, or an array of one or more of those items. Available in 3ds Max 8 and higher.

[ unsupportedRenderEffectList: &variable ]

If #logmsg is specified as action, the by-reference variable will be filled in with array of the unsupported render effect names. Available in 3ds Max 8 and higher.

See Quiet Mode for details.

You can invoke the renderer and have it do one or more of four things with the rendered output:

  • Display it in a virtual frame buffer (the default), controlled with the vfb: parameter.

  • Store the rendering in an image file by supplying an outputfile: parameter. The type of image file to be created is determined from the file suffix you specify.

  • Return the result as a MAXScript Bitmap value that you can perform Bitmap operations on (see the Bitmap Values topic).

  • Store the rendering in an existing MAXScript Bitmap value by supplying the to: parameter. Supplying this parameter causes settings such as height, width, aspect, gamma, file name, etc. to be taken from the supplied bitmap.

    • NOTE:

    The render() function is interruptible mid-frame using the ESC key.

    EXAMPLES

    render camera:$cam01 outputwidth:320 outputheight:240

    for c in cameras do

    render c outputFile:(c.name + ".bmp") vfb:off

    rollout1.image.bitmap = render camera:$cam01

    See also

    Rendering - Topics Index


envEffectsDialog - Open and Close the Environment and Effects dialog

Provides methods to open and close the Environment and Effects dialog and query whether it is open.

Methods:

envEffectsDialog.Open()

Open Environment and Effects dialog

<bool>envEffectsDialog.isOpen()

Returns true if Environment and Effects dialog is open

envEffectsDialog.Close()

Closes Environment and Effects dialog

See also

renderSceneDialog

Render Scene Dialog

TabbedDialogs - Controlling Tabbed Dialogs


Renderers

Renderers is a Structure of systemGlobals. It lets the user assign renderer class instances to the current, production, Material Editor and activeShade renderer:

renderers.current

Get/Set the current renderer.

renderers.production

Get/Set the production renderer.

renderers.activeShade

Get/Set the activeShade renderer. Only renderers whose property supportsActiveShade is true can be set as the activeShade renderer!

renderers.medit_locked

Controls the state of the "Lock To Current Renderer" checkbutton next to the Material Editor slot in the Common tab > Assign Renderer rollout in the Render Scene dialog. When set to True, the Production Renderer will be used automatically by the Material Editor. When set to False, the Material Editor renderer can be set independently from the Production Renderer.

renderers.medit

Get/set the Material Editor renderer.

renderers.GetDraftRenderer()

Returns the draft renderer.

While the draft renderer is not exposed or used by 3ds Max anymore since version 6, it is possible that a renderer is assigned as the draft renderer. If that renderer is an instance of a 3rd party plug-in and you load the scene file on a computer without that plug-in installed, you will get missing plug-in messages and no way to get rid of them.

Available in 3ds Max 2008 and higher. Previously available in [ AVG ] Avguard Extensions.

NOTE:

Getting the draft renderer will cause a new default renderer to be created and set as the draft renderer if there is no current draft renderer.

renderers.ClearDraftRenderer()

Removes the draft renderer if present.

While the draft renderer is not exposed or used by 3ds Max anymore since version 6, it is possible that a renderer is assigned as the draft renderer. If that renderer is an instance of a 3rd party plug-in and you load the scene file on a computer without that plug-in installed, you will get missing plug-in messages and no way to get rid of them.

Available in 3ds Max 2008 and higher. Previously available in [ AVG ] Avguard Extensions.

Renderer class instances are creatable by MAXScript. They have a couple of common read-only properties which can be used to determine if the renderer can be used to perform certain special tasks as ActiveShade rendering and TextureBaking.

RendererClass Instances Common Properties:

<RendererClassInstance>.supportsActiveShade

Returns true if renderer can be used as ActiveShade renderer, false otherwise. Read-only.

<RendererClassInstance>.supportsTexureBaking

Returns true if renderer supports Texture Baking, false otherwise. Read-only.

To acquire a list of all installed renderers on a specific system, you can access the .classes property of the RendererClass MAXSuperClass.

EXAMPLE

RendererClass.classes

#(Default_Scanline_Renderer, VUE_File_Renderer, mental_ray_Renderer, Missing_Renderer)

--You can assign a new renderer class to the current renderer

renderers.current = RendererClass.classes[2]()

VUE_File_Renderer:VUE_File_Renderer

Material/Map Renderer Compatibility Method:

areMtlAndRendererCompatible {<mtlbase> | <maxclass>} [ renderer:{<renderer> | <maxclass>} ]

Returns true if the material/texturemap and renderer are compatible. Material/texturemap and renderer can be specified as instances or MAXClasses. If the renderer is not specified, the current renderer is tested against.

EXAMPLE

--Check Mental_Ray material against Scanline Renderer

--They are not compatible!

theMat = Mental_Ray()

mental_ray:mental_ray

theRenderer = Default_Scanline_Renderer()

Default_Scanline_Renderer:Default_Scanline_Renderer

areMtlAndRendererCompatible theMat renderer:theRenderer

false

--Check a Standard material against Scanline Renderer

--They are compatible!

theMat = Standard()

Standardmaterial:Standard

areMtlAndRendererCompatible theMat renderer:theRenderer

true

See also

Default_Scanline_Renderer : RendererClass

VUE_File_Renderer : RendererClass


Pre-Render Script Evaluation Order Changes in 3ds Max 2008

The following changes have been made to the evaluation of Pre-Render Scripts in 3ds Max 2008:

Pre-Render Scripts specified in the Render Scene Dialog are now executed before the "Render Begin" timeframe. This means a Pre-Render script can create or modify objects in the scene, and can change any render settings.

This has the following consequences:

  • The Pre-Render Script is executed BEFORE any pre-render error or warning messages, including possible cancellation of the render.

  • Previously, neither the Pre- nor Post-Render Scripts would be executed if the render was cancelled due to an error. Now both are executed if enabled, regardless of errors. The Post-Render script is executed after the render completes or is cancelled.

  • In some circumstances, the output filenames for render elements are modified by the system during the "Render Begin" timeframe. This means the Pre-Render Script is executed too early to have access to the correct filenames of all render elements.

  • The Pre-Render Script is executed BEFORE the image sequence file (.imsq or .ifl) is created. This is because creation of the sequence file requires the render element filenames, which are available only after the Pre-Render Script is executed, as explained above.

See also

RenderSceneDialog - Pre-Render and Post-Render Scripts


Rendered Frame Window and MAXScript

NEW in 3ds Max 2009: The Rendered Frame Window (a.k.a. Virtual Frame Buffer or VFB) has been extended in 3ds Max 2009 to provide new Iterative and Production rendering workflows.

Most of these changes have been implemented using MAXScript. This means that the controls exposed to the top and bottom panel of the Rendered Frame Window can be enhanced or replaced by technical artists and technical directors to facilitate various workflows and 3rd party renderers using only MAXScript.

The following MAXScript additions provide ways to access the Rendered Frame Window and its properties and register new rollouts in its panels:

Image Viewer DisplayNotifications

Two new notifications have been added to the General Event Callbacks mechanism: #preImageViewerDisplay and #postImageViewerDisplay

They are broadcast before and after the Rendered Frame Windows has been opened.

Interface:IVFB

The callbacks.notificationParam() method, if executed within the callback script, will return an IVFB Interface which provides the properties and methods exposed by the Rendered Frame Window.

EXAMPLE

The following example REMOVES the original callbacks defined in the file ..\StdPlugs\StdScripts\VFB_Methods.ms and defines new rollouts for the rollout panels.

In order to restore the original functionality, evaluate the

callbacks.removeScripts #preImageViewerDisplay

then run the above-mentioned script to register the original callbacks.

Alternatively, simply restart 3ds Max.

(

global MyFirstVFBLayout --the function needs to be global

fn MyFirstVFBLayout VFB_Interface = ( --will be called by the callback

--if the window is a Rendered Frame Window,

if VFB_Interface.IsFramebuffer do (

--set all borders to 0 to save screen estate

VFB_Interface.SetMetric #horzMarginLeft 0

VFB_Interface.SetMetric #horzMarginCenter 0

VFB_Interface.SetMetric #horzMarginRight 0

VFB_Interface.SetMetric #vertMarginTop 0

VFB_Interface.SetMetric #vertMarginCenter 0

VFB_Interface.SetMetric #vertMarginBottom 0

VFB_Interface.SetMetric #minClientWidth 320

VFB_Interface.SetMetric #minClientHeight 240

--Define some stand-in rollouts to display in the three panels:

rollout theTopLeftRollout "Top Left Rollout" width:200 height:45 (

 dropdownlist ddl_topLeft items:#("View","Region","Crop") width:160

 button btn_topLeft "Top Left Button" width:160 )

rollout theTopRightRollout "Top Right Rollout" width:200 height:50 (

 button btn_topLeft "Top Right Button..." )

rollout theBottomRollout "Bottom Rollout" width:200 height:22 (

 button btn_bottomButton "Bottom Button (Try to say 3 times fast!)"

)

--Initialize the top left panel to a size and

--get its RolloutFloater value back:

theTopLeftFloater = VFB_Interface.InitRolloutWindow #TopLeft 200 60

--Add the rollout to the RolloutFloater without borders and tile bar:

addRollout theTopLeftRollout theTopLeftFloater border:false

--and enable the visibility of the top left panel:

VFB_Interface.SetRolloutWindowVisible #TopLeft true

--Initialize the top right panel to a size and

--get its RolloutFloater value back:

theTopRightFloater = VFB_Interface.InitRolloutWindow #TopRight 200 60

--add the rollout to the RolloutFloater WITH borders and tile bar:

addRollout theTopRightRollout theTopRightFloater border:true

--and enable the visibility of the top left panel:

VFB_Interface.SetRolloutWindowVisible #TopRight true

--Initialize the bottom panel to a size and

--get its RolloutFloater value back:

theBottomFloater = VFB_Interface.InitRolloutWindow #Bottom 400 35

--add the rollout to the RolloutFloater without borders and tile bar:

addRollout theBottomRollout theBottomFloater border:false

--and enable the visibility of the top left panel:

VFB_Interface.SetRolloutWindowVisible #Bottom true

VFB_Interface.InitLayout() --finally, initialize the new layout

)--end if

)--end fn

--unregister any related callbacks:

callbacks.removeScripts #preImageViewerDisplay

--register a pre-image viewer display callback

callbacks.addScript #preImageViewerDisplay "MyFirstVFBLayout (callbacks.notificationParam())" id:#ResizeVFBPanels

)--end script


SchematicView

The Schematic View has been completely rewritten in 3ds Max 6. The following Interfaces have replaced the former SchematicView structure which used to provide methods for opening and controlling the old Schematic View. The structure and its methods are obsolete and not supported in 3ds Max 6 and higher.

These are the new Schematic View-related interfaces in 3ds Max 6:

Interface: SchematicViews

Provides access to properties and methods of the new Schematic View system.

Interface: SchematicView

Provides access to properties and methods of a specific existing Schematic View returned by the .current property and getView() method of the SchematicViews Interface.


Status Bar

The methods and 3ds Max global variables associated with 3ds Max’s Status Bar are described in the following topics:

Prompt Line

Coordinate Display

Progress Bar Display

Status Bar Buttons

Interface: StatusPanel


Prompt Line

The following methods are associated with 3ds Max’s Status Bar Prompt Line:

displayTempPrompt <string> <milliseconds_integer>

Displays the specified string on the Prompt Line for the specified number of milliseconds. After the time elapses, the string is popped from the stack. This may be used to put up a temporary error message for example. Control is returned to MAXScript immediately after the call, that is, MAXScript execution continues even while the temporary prompt is displayed.

removeTempPrompt()

Removes the temporary prompt immediately.

replacePrompt()

Replaces the string on the top of the prompt stack.

pushPrompt <string>

Pushes the currently displayed prompt onto the prompt stack, and displays the specified string as the prompt.

popPrompt()

Pops the currently displayed prompt off the prompt stack. The previous prompt will be restored.

See also

Status Bar

Coordinate Display

Progress Bar Display

Status Bar Buttons

Interface: StatusPanel


Coordinate Display

The following methods are associated with 3ds Max’s Status Bar Coordinate Display:

disableStatusXYZ()

Disables mouse tracking and display of coordinates to the X, Y, Z status boxes.

enableStatusXYZ()

Enables mouse tracking and display of coordinates to the X, Y, Z status boxes.

setStatusXYZ <format_name> <point3>

Displays the component values of the Point3 value in the X, Y, Z status boxes. The format of the displayed values is controlled by format_name. The valid format_name types are:

#universe

display point3 as position in current units

#scale

display point3 as percentages - a point3 component value of 1 displays as 100%

#angle

display point3 as angles - point3 component values are in radians

#other

display point3 as straight floating point values.

NOTE:

Using a <format_name> value of #other for setStatusXYZ() does not correctly display the specified point3 value. The X and Y component values are displayed in the Y and Z status boxes, and the X status box is blank.

See also

Status Bar

Prompt Line

Progress Bar Display

Status Bar Buttons

Interface: StatusPanel


Progress Bar Display

This group of functions let you display a progress bar for operations that may be time consuming, similar to the progress bar 3ds Max uses for IK, Preview Rendering and Reduce Key computations.

The functions are:

progressStart "caption"

Initially displays the progress bar with the caption given.

progressUpdate <percent>

Updates the bar display to show the given percentage complete (in the range 0-100). This function also checks to see if the user has clicked the Cancel button in the progress bar and returns true if the computation should continue and false if the user has requested a cancel. You can also call getProgressCancel(), described below, to check the cancel status, which is a low overhead function and so may be called more frequently than progressUpdate().

progressEnd()

Signals the end of the operation and removes the progress bar display.

getProgressCancel()

A low-overhead function that checks whether the user has canceled the operation via the Cancel button in the progress bar. You may want to call this function frequently within deep loops in your code to reduce cancel latency for the user, because you should only call progressUpdate() as needed to show significant progress bar changes to keep overhead low. The getProgressCancel() function, as well as progressUpdate(), displays a confirmation dialog if the use hits the cancel button and returns the cancel status from that confirmation. Unlike progressUpdate(), this function returns true if the user has made a confirmed cancel request and false otherwise.

setProgressCancel <boolean>

Sets or clears the Cancel flag for the progress bar. By passing a value of true, the Cancel flag is set and will be detected by progressUpdate() and getProgressCancel(). By passing a value of false, the Cancel flag is cleared if set.

The following 3ds Max system global variable is associated with the Progress Bar display:

escapeEnable

Lets you get and set a Boolean value defining whether ESC key interrupt detection is on or off. Setting enableEscape to false turns ESC key interrupt detection off, setting it to true turns it on again. This variable is useful when used in conjunction with a Progress Bar. You can set enableEscape to false when you don't want the user to be able to interrupt a script running a long computation and you have set up a progress bar with its own Cancel button.

NOTES ON CALCULATING PERCENTAGES:

When calculating the percentage from a current Integer value and a total Integer value, the order the values are multiplied and divided does matter. Dividing them first and then multiplying by 100.0 would always return 0.0 because an Integer divided by an Integer yields an Integer, and since the result is less than zero, it is rounded down to zero. If the total value is 20, for each value between 1 and 19, you would get

1/20*100.0 -> 0*100.0 -> 0.0

2/20*100.0 -> 0*100.0 -> 0.0

3/20*100.0 -> 0*100.0 -> 0.0

...

19/20*100.0-> 0*100.0 -> 0.0

20/20*100.0-> 1*100.0 -> 100.0

but

100.0*1/20 -> 100.0/20 -> 5.0

100.0*2/20 -> 200.0/20 -> 10.0

100.0*3/20 -> 300.0/20 -> 15.0

...

100.0*19/20-> 1900.0/20-> 95.0

100.0*20/20-> 2000.0/20-> 100.0

When starting with the Float value 100.0, the final result is implicitly converted to a Float because a Float multiplied by an Integer returns a Float, and a Float divided by an Integer still returns a Float.

See also

Status Bar

Prompt Line

Coordinate Display

Status Bar Buttons

Interface: StatusPanel


Status Bar Buttons

The following methods are associated with the buttons in 3ds Max’s Status Bar:

getCrossing()

Returns whether Crossing Selection (true) or Window Selection (false) is set.

getPluginKeysEnabled()

setPluginKeysEnabled <boolean>

Get and set whether Plug-in Keyboard Shortcuts are enabled (true) or disabled (false).

getSnapState()

Returns the Snap toggle state - on (true) or off (false).

getSnapMode()

Returns the current snap type as a string - "ABSOLUTE" or "RELATIVE".

isSelectionFrozen()

Returns true if the node selection is frozen, false if not frozen

freezeSelection()

Freezes the node selection

thawSelection()

Thaws the node selection.

See also

Status Bar

Prompt Line

Coordinate Display

Progress Bar Display

Interface: StatusPanel


TabbedDialogs - Controlling Tabbed Dialogs

These methods let you control 3ds Max tabbed dialogs like the Rendering, Environment and Effects, Object Properties, Configure Paths etc.

Specs:

The following specs define what a valid argument looks like for the tabbedDialogs methods. MAXScript does not have a class that corresponds to Class_ID, so these are passed as a 2 element array of integers.

tabbedDialogSpec ::= ( #render | #renderVP | #envEffects | #objProp | #preferences | #configPath | #(<int>,<int>) )

#(<int>,<int>) is Class_ID of tabbed dialog

tabPageSpec ::= ( <int> | #(<int>,<int>) )

<int> is index in dialog (1-based)

#(<int>,<int>) is Class_ID of tab page

Methods:

<bool>tabbedDialogs.isOpen <tabbedDialogSpec>

Returns true if the specified dialog is open.

WARNING!

The tabbedDialogs.isOpen method should be called before calling any of the other methods.

If the specified dialog is not open, the remainder of the methods will not perform any action or throw an error, and those methods that return a value will return 'undefined'.

<#(<int>,<int>)> tabbedDialogs.getDialogID <tabbedDialogSpec>

Returns Class_ID of specified tabbed dialog

tabbedDialogs.invalidate <tabbedDialogSpec>

Invalidates all pages in the dialog

<bool>tabbedDialogs.OkToCommit <tabbedDialogSpec>

Returns true if all pages in dialog say it is ok to commit changes. Used for modal dialogs with IDOK and IDCANCEL

tabbedDialogs.CommitPages <tabbedDialogSpec>

Commits changes in all pages. Used for modal dialogs with IDOK and IDCANCEL

tabbedDialogs.CloseDialog <tabbedDialogSpec>

Closes dialog.

tabbedDialogs.CancelDialog <tabbedDialogSpec>

Cancels dialog.

<int>tabbedDialogs.getNumPages <tabbedDialogSpec>

Returns the number of tab pages in the specified dialog.

<#(<int>,<int>)>tabbedDialogs.getPageID <tabbedDialogSpec> <tabPageSpec>

Returns Class_ID of specified tab page

<#(<int>,<int>)>tabbedDialogs.getCurrentPage <tabbedDialogSpec>

Returns Class_ID of current tab page

tabbedDialogs.setCurrentPage <tabbedDialogSpec> <tabPageSpec>

Sets specified tab page as the current tab page

tabbedDialogs.invalidatePage <tabbedDialogSpec> <tabPageSpec>

Invalidates the specified tab page

tabbedDialogs.getPageTitle <tabbedDialogSpec> <tabPageSpec>

Returns the tab title for the specified tab page. This title is localized.

<bool>tabbedDialogs.isPage <tabbedDialogSpec> <tabPageSpec>

Returns true if the the specified tab page is present in the dialog.

EXAMPLE

--Switch to Adv.Lighting tab if Render Scene dialog is open:

if tabbedDialogs.isOpen #render do

tabbedDialogs.setCurrentPage #render #(1758358594, 1812881699)

See also

envEffectsDialog - Open and Close the Environment and Effects dialog

renderSceneDialog


Time Control

The following methods and 3ds Max system global variables are associated with the 3ds Max Time Controls:

animButtonEnabled

A Boolean value that specifies whether the user can change the state of the Auto Key button. If set to false, the user can not change the Auto Key button state. If set to true, the user can change the Auto Key button state. A script can change the state of the Auto Key button using animButtonState regardless of the animButtonEnabled value.

animButtonState

Lets you to get and set the state of the Auto Key button. A Boolean value - true if Auto Key is on, false if Auto Key is off.

HISTORY:

In the early 3ds Max versions, there was no Set Key mode and the Auto Key button was called the Animate button. The name is still used for compatibility reasons.

sliderTime

Lets you get and set a Time value that defines the time associated with the 3ds Max time slider.

Two functions are provided for starting and stopping the 3ds Max animation playback, which are essentially equivalent to pressing the Play button in the 3ds Max user interface. The functions are:

playAnimation [ #selOnly ] immediateReturn:<boolean>

stopAnimation()

If you specify the optional argument, #selOnly, to playAnimation()only the currently selected objects are animated.

If immediateReturn is set to false or not specified, and Real Time Playback is on (realTimePlayback = true), the method does not return until animation playback is stopped.

If immediateReturn is set to true, or Real Time Playback is off (realTimePlayback = false), the method returns immediately.

There is an important restriction to understand when using these functions:

Calling playAnimation() is a thread-blocking call internally in 3ds Max and does not return until the playback is stopped by the user clicking the Stop Play button or another thread executing a stopAnimation(). The only way to achieve the latter in MAXScript currently is to call stopAnimation() from a scripted rollout panel handler such as a button press handler or from a scripted controller script. If you invoke playAnimation() in code run from the Listener, you will not be able to invoke stopAnimation() from the Listener, because the Listener is blocked inside the playAnimation() call.

isAnimPlaying()

NEW in 3ds Max 2008: [ AVG ] Returns true if the animation is currently playing, false otherwise.

Also see Time Configuration Dialog for methods for setting options in the Time Configuration dialog.


Time Configuration Dialog

The following methods get and set options in the Time Configuration dialog:

getKeyStepsPos()

setKeyStepsPos <boolean>

Get and set whether to jump to next position key when Key Mode Toggle is on.

getKeyStepsRot()

setKeyStepsRot <boolean>

Get and set whether to jump to next rotation key when Key Mode Toggle is on.

getKeyStepsScale()

setKeyStepsScale <boolean>

Get and set whether to jump to next scale key when Key Mode Toggle is on.

getKeyStepsSelOnly()

setKeyStepsSelOnly <boolean>

Get and set whether to use Selected Objects Only when Key Mode Toggle is on.

getKeyStepsUseTrans()

setKeyStepsUseTrans <boolean>

Get and set whether to Use Current Transform when Key Mode Toggle is on.

The following 3ds Max system global variables are applicable to the Time Configuration dialog:

animationRange

Lets you get and set an Interval value that defines the start and end frames of the Active Time Segment. It contains the values set in the Time Configuration dialog>Animation>Start Time and End Time and displayed by the Active Time Segment option in the Time Output group of controls in the Render Scene Dialog.

The start and end values of the animationRange interval can be read individually using animationRange.start and animationRange.end. They cannot be set separately though - the complete interval has to be assigned to the animationRange variable.

EXAMPLES:

animationRange --Get the current animation range

(interval 0f 100f)

animationRange = interval 10 50 --Set range to frames 10 to 50

(interval 10f 50f)

animationRange.start --Get the start frame of the range

10f

animationRange.end --Get the end frame of the range

50f

--To change the end frame of the interval only:

animationRange = interval animationRange.start 90f

(interval 10f 90f)

frameRate

Lets you get and set an Integer value that defines the current scene frame rate in frames-per-second. It contains the corresponding value set in the Time Configuration dialog.

playActiveOnly

Lets you get and set whether to playback the active viewport only. It contains the corresponding value set in the Time Configuration dialog. A Boolean value - true if Active Viewport Only is on, false if off.

realTimePlayback

Lets you get and set whether to playback in real time mode. It contains the corresponding value set in the Time Configuration dialog. A Boolean value - true if Real Time is on, false if off.

timeConfiguration.playActiveOnly

Lets you get and set whether to playback the active viewport only. It contains the corresponding value set in the Time Configuration dialog. A Boolean value - true if Active Viewport Only is on, false if off.

timeConfiguration.playbackSpeed

Get/set the viewport playback speed as an indexed <integer>. The valid values for the integer are: 1 - 1/4x, 2 - 1/2x, 3 - 1x, 4 - 2x, 5 - 4x.

timeConfiguration.realTimePlayback

Lets you get and set whether to playback in real time mode. It contains the corresponding value set in the Time Configuration dialog. A Boolean value - true if Real Time is on, false if off.

timeConfiguration.playbackLoop

Get/set whether to loop the viewport playback. Corresponds to the Loop checkbox in the Time Configuration dialog. Only used when timeConfiguration.realTimePlayback is set to true. Available in 3ds Max 8 and higher.

timeConfiguration.useTrackBar

Lets you get and set the state of the Time Configuration dialog 'Key Steps / Use TrackBar' check box. A Boolean Value - true if checked, false if not.


Time Tags Access using the FrameTagManager Interface

The Time Tags are used to define reference points on the time line for quick navigation.

They are now accessible via the FrameTagManager Interface (corresponding to the IFrameTagManager interface in the SDK).

The example below demonstrates the access to time tags via MAXscript using the FrameTagManager Interface.

FOR EXAMPLE

ntags = FrameTagManager.GetTagCount() --> 0

tag1 = FrameTagManager.CreateNewTag "tag1" 15 --> 1

tag2 = FrameTagManager.CreateNewTag "tag2" 25 lockID:tag1 scale:true --> 2

tag3 = FrameTagManager.CreateNewTag "tag3" 25 scale:false --> 3

loop1 = FrameTagManager.CheckForLoop tag1 tag2 --> false

loop2 = FrameTagManager.CheckForLoop tag2 tag1 --> true

loop3 = FrameTagManager.CheckForLoop tag1 tag3 --> false

loop4 = FrameTagManager.CheckForLoop tag3 tag1 --> false

ntags = FrameTagManager.GetTagCount() --> 3

for i = 1 to ntags do

(

 id = FrameTagManager.GetTagID i

 tagTime = FrameTagManager.GetTimeByID id

 tagLockID = FrameTagManager.GetLockIDByID id

 tagName = FrameTagManager.GetNameByID id

 tagScale = FrameTagManager.GetScaleByID id

 format "%: id:%; name:%; time:%; lockID:%; scale:%\n" i id tagName tagTime tagLockID tagScale

)

FrameTagManager.SetTimeByID tag1 10 --> ok

FrameTagManager.SetLockIDByID tag3 tag2 --> true

FrameTagManager.SetNameByID tag1 "modified tag1" --> ok

FrameTagManager.SetScaleByID tag1 false --> ok

ntags = FrameTagManager.GetTagCount() --> 3

for i = 1 to ntags do

(

 id = FrameTagManager.GetTagID i

 tagTime = FrameTagManager.GetTimeByID id

 tagLockID = FrameTagManager.GetLockIDByID id

 tagName = FrameTagManager.GetNameByID id

 tagScale = FrameTagManager.GetScaleByID id

 format "%: id:%; name:%; time:%; lockID:%; scale:%\n" i id tagName tagTime tagLockID tagScale

)

FrameTagManager.SetTimeByID tag2 5 relative:true --> ok

ntags = FrameTagManager.GetTagCount() --> 3

for i = 1 to ntags do

(

 id = FrameTagManager.GetTagID i

 tagTime = FrameTagManager.GetTimeByID id

 tagLockID = FrameTagManager.GetLockIDByID id

 tagName = FrameTagManager.GetNameByID id

 tagScale = FrameTagManager.GetScaleByID id

 format "%: id:%; name:%; time:%; lockID:%; scale:%\n" i id tagName tagTime tagLockID tagScale

)

FrameTagManager.DeleteTag tag2 --> ok

FrameTagManager.FindItem tag2 --> 0

FrameTagManager.FindItem tag3 --> 2

ntags = FrameTagManager.GetTagCount() --> 2

for i = 1 to ntags do

(

 id = FrameTagManager.GetTagID i

 tagTime = FrameTagManager.GetTimeByID id

 tagLockID = FrameTagManager.GetLockIDByID id

 tagName = FrameTagManager.GetNameByID id

 tagScale = FrameTagManager.GetScaleByID id

 format "%: id:%; name:%; time:%; lockID:%; scale:%\n" i id tagName tagTime tagLockID tagScale

)

FrameTagManager.SetLockIDByID tag1 tag3 --> true

FrameTagManager.GetTimeByID tag1 --> 10f

FrameTagManager.SetLockIDByID tag3 tag1 --> false

FrameTagManager.GetTimeByID tag3 --> 20f

FrameTagManager.CheckForLoop tag1 tag3 --> true

FrameTagManager.CheckForLoop tag3 tag1 --> false

FrameTagManager.SetLockIDByID tag1 0 --> true

FrameTagManager.GetTimeByID tag1 --> 10f

FrameTagManager.FindItemByTime 10 --> 1

FrameTagManager.FindItemByTime 15 --> 0

FrameTagManager.FindItemByTime 20 --> 2

See also

Interface: FrameTagManager


Trackbar

The following methods are associated with the Trackbar:

trackbar.getPreviousKeyTime()

Gets the previous key time. If no previous key is present, returns undefined.

EXAMPLE

at time sliderTime trackbar.getPreviousKeyTime()

trackbar.getNextKeyTime()

Gets the next key time. If no next key is present, returns undefined.

The following 3ds Max system global variables are associated with the Trackbar:

trackbar.filter Name

Get and set the filter specifying which types of keys to show in the Trackbar. The valid values are: #all, #TMOnly, #currentTM, #object, and #mat.

trackbar.visible Boolean

Get and set whether the trackbar is visible - true if the trackbar is visible, false if invisible

See also

Status Bar

Interface: StatusPanel

Exploring the Trackbar Filter Callback Functions

Trackbar Keys Filter Callback Function Examples


TimeSlider on/off toggle

This is an interface to turn on/off the timeslider.

It is accessed in the following way:

<void>timeSlider.setVisible <Boolean>

<bool>timeSlider.isVisible

In MAXScript, this is always sticky across sessions.

See also

Interface: timeSlider


Track View

The Track View window functions are in a structure package named trackView. These functions operate on named Track Views, and in many cases you identify the Track View window by this name. The Track View functions are:

trackView.open <name_string>

Opens an existing Track View with the specified name, or creates a new Track View with specified name. Returns the value true.

trackView.zoomSelected <name_string>

Zoom the named Track View on the currently selected object. The World track must be expanded for this function to operate. The Object track will automatically be expanded if is closed. The hierarchy display is scrolled such that the selected object’s track is placed at the top of the window. If multiple objects are selected, the first object in the hierarchy that is selected will be placed at the top of the window. If there are no selected objects, no operation occurs. This method will return true, except when the named Track View does not exist or is not open, when it returns false.

trackView.close <name_string>

Closes the named Track View. This method will return true, except when the named Track View does not exist or is not open, when it returns false.

trackView.pickTrackDlg [#multiple] [<filter_function>] [options:<integer>]

See separate topic: Track View Pick Dialog for details.

trackView.numTrackViews()

Returns the number of named Track Views defined

trackView.getTrackViewName <index_integer>

Returns the name of the indexed Track View as a String. Index values are 1-based.

trackView.setFilter "name_string" {<filter_flag_name>} [#noRedraw]

trackView.clearFilter "name_string" {<filter_flag_name>} [#noRedraw]

These methods allow you to set and clear display filters flags to control what is visible in a named Track View. This method will return true, except when the named Track View does not exist or is not open, when it returns false. You can supply as many filter flags as desired per call. The valid filter flag names are:

#all -- set or clear all flags

#default -- set default view flags

#selectedObjects

#selectedTracks

#animatedTracks

#spacewarpBindings

#modifiedObjects

#transforms

#baseObjects

#positionX

#positionY

#positionZ

#positionW

#rotationX

#rotationY

#rotationZ

#scaleX

#scaleY

#scaleZ

#red

#green

#blue

#alpha

#controllerTypes

#noteTracks

#sound

#materialsMaps

#materialParameters

#visibilityTracks

#hideGeometry

#hideShapes

#hideLights

#hideCameras

#hideHelpers

#hideSpacewarps

#visibleObjects

#position

#rotation

#scale

#curveX

#curveY

#curveZ

#curveW

#staticValues

#hierarchy

#objects

#boneobjects

#keyableTracks

The following 3ds Max system global variables are applicable to Track View:

globalTracks

Contains a MAXTVNode value that defines the top-level Global Tracks node in Track View. See Track View Nodes . This variable is read-only.

trackViewNodes

Contains a MAXTVNode value that defines top-level World node in Track View. See Track View Nodes . This variable is read-only.

videoPostTracks

Contains a MAXTVNode value that defines the top-level Video Post Track View node. See Track View Nodes . This variable is read-only. This variable contains the value undefined in Autodesk VIZ.

See also

Trackviews


Trackviews

NOTE:

The methods listed below reflect the features of releases prior 3ds Max 5. TrackView has been completely rewritten in 3ds Max 5. For access to the new features, please look under Interface: trackviews

Properties:

trackviews.isOpen <fpvalue>name or index

Returns a boolean value indicating if the specified trackview is open.

trackviews.isCurrent <fpvalue>name or index

Returns a boolean value indicating if the trackview is the last one used or not.

trackviews.setCurrent <fpvalue>name or index

Sets the specified trackview to be the current one. Returns true if successful.

trackviews.currentTrackView

Read only property that returns the interface for the currently used trackview. Returns undefined if the trackview is closed.

trackviews.lastUsedTrackViewName

Read only property that returns the name of the current trackview.

trackviews.openLastUsedTrackView()

Opens the current trackview if it has been closed.

trackviews.delete <fpvalue>name or index

Deletes the specified trackview.

trackviews.close <fpvalue>name or index

You can now close a trackview based on it's index or name.

trackviews.open <fpvalue>name or index

You can now open a trackview based on it's index or name.

trackviews.getTrackView <fpvalue>name or index

This method will get a trackview based on it’s index or name.

EXAMPLE

showInterface (trackviews.getTrackView 1)

trackviews.getAllTrackViews()

The above script returns an array of trackviews.

trackviews.numTrackViews()

Returns the number of trackviews.

trackviews.getTrackViewName <index>index

Returns the name of the trackview window based on the index.

<void>setName <string>name

Sets the name of the trackview window

<integer>getNumTracks()

Gets the number of tracks currently displayed in trackview

<integer>numSelTracks()

Gets the number of selected tracks

<boolean>canAssignController()

Tests to see if all selected tracks are of the same type

<void>assignControllerDialog

Invokes the assign controller dialog if canAssignController()

<boolean>assignController <maxObject>controller

Assigns the controller to the selected tracks if canAssignController() is true and the controller is the appropriate type

<void>showControllerTypes <boolean>state

Sets the ShowControllerType property

<void>expandTracks()

Expands all tracks

<void>zoomSelected()

Zooms to the selected object's track

<void>zoomOnTrack <maxObject>parent <index>subNum

Zooms to the track defined by the parent and the subNum

<maxObject>getTrack <index>index

Returns the object belonging to the indexed track

<maxObject>getParent <index>index

Gets the parent of the object belonging to the index track. If the object is a position controller, the parent is the Transform controller

<maxObject>getSelected <index>index

Gets the objects belonging to the selected, indexed track

<maxObject>getParentOfSelected <index>index

Gets the indexed selected tracks parent object

<index>getSelectedSubNum <index>index

Gets the subNum of the selected track

<index>getIndex <maxObject>object

Gets the index for the animatable object

<boolean>selectTrackByIndex <index>index <boolean>clearSelection

Selects tracks by index

<boolean>selectTrack <maxObject>object <boolean>clearSelection

Selects tracks by object

A trackview interface can be obtained for one of the currently open trackviews using one of the following methods.

trackviews.getTrackViewByName <name as string>

trackviews.getTrackViewByIndex <index as int>

trackviews.getAllTrackViews()

Once you have an instance of the trackview interface you can call the following new methods on it.

getEditMode()

Gets the current edit mode as an symbolic enum.

setEditMode <type as symbolic enum>

Sets the current edit mode

editMode

Property to do the same as the above two methods

Valid symbolic enum values are:

#editKeys

#editTime

#editFCurves

#editRanges

#positionRanges

See also

Interface: trackviews

Track View

Interface: trackviews


Track View Pick Dialog

The Track View Pick dialog displays the hierarchy for the 3ds Max scene in a manner similar to what is seen in Track View. The user can select one or more items from this dialog. The following method displays the Track View Pick dialog:

trackView.pickTrackDlg [#multiple] [<filter function>] [options:<integer>]

This method brings up the Track View Pick dialog and returns a TrackViewPick value when the user selects a track and clicks "Ok", or undefined if the user clicks "Cancel".

If the optional argument #multiple is passed, multiple tracks can be picked in the dialog and an array of TrackViewPick values is returned instead of single value.

If the optional filter_function is supplied, each track is passed to the function as a TrackViewPick value. If the function returns true, the track is selectable in the Track View Pick dialog.

If the optional keyword argument options: is specified, the bits of the integer value define what is shown in the Track View Pick dialog.

The bits are:

1: turn on display of animated tracks only

2: turn off display of node Visibility track

3: turn on display of only selected nodes

4: turn off display of World Space Modifiers

5: turn off display of Object Space Modifiers

6: turn off display of node Transform track

7: turn off display of node base object

8: turn off display of controller types

9: turn off display of note tracks

10: turn off display of the sound track

11: turn off display of maps in materials

12: turn off display of material parameters

13: turn on display of hidden nodes

14: turn off display of hierarchy

15: turn off display of non-keyable tracks

16: turn off display of nodes

17: turn off display of geometry nodes

18: turn off display of shape nodes

19: turn off display of light nodes

20: turn off display of camera nodes

21: turn off display of helper nodes

22: turn off display of warp nodes

23: turn off display of position controllers

24: turn off display of rotation controllers

25: turn off display of scale controllers

26: turn off display of bone nodes

27: set focus to first selected node found

EXAMPLE:

theInt = 0
theInt = bit.set theInt 1 true --animated tracks only
theInt = bit.set theInt 3 true --display selected nodes only
theInt = bit.set theInt 10 true --hide sound track
theTrack = trackView.pickTrackDlg options:theInt --open dialog

You can also use the following function to turn a bitarray into an integer with bits sets according to the flags described above. The resulting integer can be passed to the named options: parameter:

fn bitArrayToInt theBitArray = (

 local theInt = 0

 for i in theBitArray do theInt = bit.set theInt i true

 theInt

)

theInt = bitArrayToInt #{1,3,10}

theTrack = trackView.pickTrackDlg options:theInt

TrackViewPick : Value

Instances of the TrackViewPick class store the result of a selection from the Track View Pick dialog. A TrackViewPick value has the following properties:

<trackViewPick>.name : string

The name of the picked item as shown in the Track View Pick dialog.

<trackViewPick>.anim : subAnim

The subAnim for the item the user picked.

<trackViewPick>.client : MAXWrapper

The owner of the subAnim for the item the user picked. If the owner is a subclass of MAXWrapper, the MAXWrapper value for the owner is returned, otherwise a value of undefined is returned.

<trackViewPick>.subNum : integer

The subAnim index for anim in client.

FOR EXAMPLE:

-- Create a sphere, apply a bend modifier and execute:

tvp=trackview.pickTrackDlg()

-- pick objects->Sphere01->Modified object->Bend->Angle

tvp.anim -- returns SubAnim:Angle

tvp.client -- returns Bend:Bend

tvp.subNum -- returns 3

tvp.name -- returns "Angle"

tvp.client[tvp.subNum] -- returns SubAnim:Angle


Units Struct - Accessing System and Display Units

The Units struct provides access to system global variables and some methods to get and set the System Units scale, type, and Display Units s

System Globals:

units.DisplayType

Get/set the current unit display type as a <name>. Valid unit display types are:

#Generic

#Metric

#US

#custom

units.MetricType

Get/set the current metric unit display type as a <name>. Valid metric unit display types are:

#Millimeters

#Centimeters

#Meters

#Kilometers

units.USType

Get/set the current US standard unit display type as a <name>. Valid US standard unit display types are:

#Frac_In

#Dec_In

#Frac_Ft

#Dec_Ft

#Ft_Frac_In

#Ft_Dec_In

units.USFrac

Get/set the current US fraction display type as a <name>. Valid US fraction display types are:

#Frac_1_1

#Frac_1_2

#Frac_1_4

#Frac_1_8

#Frac_1_10

#Frac_1_16

#Frac_1_32

#Frac_1_64

#Frac_1_100

units.CustomName

Get/set the current custom unit name as a <string>

units.CustomValue

Get/set the current custom unit value as a <float>

units.CustomUnit

Get/set the current custom unit type as a <name>. Valid custom unit display types are:

#Inches

#Feet

#Miles

#Millimeters

#Centimeters

#Meters

#Kilometers

units.SystemScale

Get/set the current system unit scale value as a <float>. This is the value shown in Customize Units Setup... > System Units Setup > System Units Scale group.

units.SystemType

Get/set the current system unit scale type as a <name>. This is the unit shown in Customize > Units Setup... > System Units Setup > System Units Scale group. Valid system unit scale types are:

#Inches

#Feet

#Miles

#Millimeters

#Centimeters

#Meters

#Kilometers

Methods:

units.formatValue <float>

Returns a <string> value representing the <float> in the current unit scale. This method can cause a string overflow, especially when the units are set to miles or kilometers. If an overflow occurs a run-time error is thrown.

units.decodeValue <string>

Parses <string> using the current unit settings and returns a <float>. A run-time error is thrown if an error occurs in the parsing of the string.


Accessing Active Viewport Info, Type, and Transforms

The following 3ds Max system global variables are associated with the viewports:

viewport.activeViewport

Lets you get and set the index of the active viewport. If you change the currently active viewport to a 2D view, this variable will contain the value 0.

viewport.numViews

Contains the number of 3D viewports in the current viewport layout. This variable is read-only. This variable does not reflect any 2D (Track View, Schematic View, Listener, and so on) views in the viewport layout. So, for example, if viewport.getLayout() returns #layout_4 and this variable contains the value 2, you know that two of the viewports contain 2D views. MAXScript currently does not allow you to access 2D view viewports.

Viewport Layout

viewport.getLayout()

viewport.setLayout <view_layout_name>

Gets or sets the viewport layout, where <view_layout_name> specifies the viewport layout configuration. When setting the layout, the view shown in each viewport is based on the configuration set in Customize > Viewport Configuration > Layout. The list of valid <view_layout_name> values below uses the following syntax:

# is the total number of viewports.

V = vertical split

H = horizontal split

L/R = left/right placement

T/B = top/bottom placement

The valid <view_layout_name> values are:

#layout_1 -- 1 viewport

#layout_2v -- 2 viewports, vertical split, both same size

#layout_2h -- 2 viewports, horizontal split, both same size

#layout_2ht -- 2 viewports, horizontal split, top smaller

#layout_2hb -- 2 viewports, horizontal split, top larger

#layout_3vl -- 3 viewports, 2 on left, 1 on right

#layout_3vr -- 3 viewports, 1 on left, 2 on right

#layout_3ht -- 3 viewports, 2 on top, 1 on bottom

#layout_3hb -- 3 viewports, 1 on top, 2 on bottom

#layout_4 -- 4 viewports, all same size

#layout_4vl -- 4 viewports, 3 on left, 1 on right

#layout_4vr -- 4 viewports, 1 on left, 3 on right

#layout_4ht -- 4 viewports, 3 on top, 1 on bottom

#layout_4hb -- 4 viewports, 1 on top, 3 on bottom

viewport.getType [ index:<integer> ]

viewport.setType <name>

Get and set the view type for the current viewport. Valid <name> values are:

#view_top -- Top

#view_bottom -- Bottom

#view_right -- Right

#view_left -- Left

#view_front -- Front

#view_back -- Back

#view_persp_user -- Perspective

#view_iso_user -- User

#view_camera -- Camera

#view_spot -- Light

#view_shape -- Shape

#view_grid -- Grid

NEW in 3ds Max 2009: If the optional index: keyword is specified, viewport.getType() will return the type of the indexed viewport instead of the active viewport type. The index numbers correspond to the ones used by viewport.activeViewport.

NOTES:

If the current viewport is an extended viewport (that is, a Schematic View, Asset Manager, or MAXScript Listener viewport), getType() will return undefined. If a Camera is specified with setType(), and there is not exactly one camera selected, a dialog will be displayed for the user to select the camera to use. If there is no Camera, a message box "No Cameras in scene" will be issued.

viewport.getType can also return a value of #view_none. If none of the viewports have focus, a value of false is returned.

viewport.setType returns a boolean - true if setting the view type was successful, false if not.

EXAMPLE

viewport.setType #view_top -- set active viewport to Top view

true

viewport.getType() -- should return what you expect...

#view_top

viewport.GetID <viewportIndex>

NEW in 3ds Max 2009: Returns the ID of the indexed viewport. The ID cannot be set.

When a viewport is maximized, its index is always 1, and its ID corresponds to its index when not maximized. For example, if the bottom right viewport with index 4 is maximized, its index will become 1, but its ID will remain 4.

viewport.ResetAllViews()

This function will reset all viewports in Max to the default layout.

getActiveCamera()

viewport.getCamera [index:<integer>]

Return the camera node associated with the active view if any, undefined if none.

NEW in 3ds Max 2009: If the optional index: keyword is specified, viewport.getCamera() returns the type of the indexed viewport instead of the active viewport. The index numbers correspond to the ones used by viewport.activeViewport.

viewport.setCamera <camera_or_light_node>

Sets the active viewport to a Camera view, using the specified camera.

You can also set the active view to a Light view using a free, target or direct light.

viewport.CanSetToViewport()

Returns true for cameras and lights that can be used as a viewport camera (valid argument to viewport.setCamera)

Viewport Display and Render Controls

viewport.setGridVisibility {<int> | #all} <bool>

Set whether the grid is visible in a viewport, where <int> is the viewport index, and <bool> is the grid visibility state. If #all is specified, the grid visibility for all viewports is set to the specified state.

viewport.getGridVisibility <int>

Get whether the grid is visible in a viewport, where <int> is the viewport index.

viewport.isWire()

Returns true if the active viewport is in Wire mode

viewport.DispBkgImage

When this variable is set to true, the background image will be displayed in the active viewport. When set to false, the background image will not be displayed.

viewport.GetRenderLevel()

Returns the viewport render level.

Can be one of the following: #smoothhighlights, #wireFrame, #smooth, #facethighlights, #facet, #flat, #litwireframe, #Box

viewport.SetRenderLevel <render_level>

Sets the current viewport's render level to the specified mode.

Valid values are #smoothhighlights, #wireFrame, #smooth, #facethighlights, #facet, #flat, #litwireframe, #Box

viewport.GetShowEdgeFaces()

Returns true if Edged Faces are enabled in the current viewport, false otherwise.

viewport.SetShowEdgeFaces <boolean>

Turns the Edged Faces display on or off depending on the boolean argument.

viewport.GetTransparencyLevel()

Returns the current viewport's transparency level. Possible values are:

1 - None

2 - Simple

3 - Best

viewport.SetTransparencyLevel <transp_level>

When Sets the current viewport's transparency level. See above for possible values.

viewport.IsEnabled()

Returns true if the current viewport is enabled, false if it is disabled.

viewport.IsPerspView()

Returns true if the current viewport is a perspective viewport (Pespective or non-othographic Camera), false if it is an orthographic view (Top, Bottom, Front, Back, Left, Right, User, orthographic Camera...).

viewport.GetFPS()

Returns the last frame rate value in frames per second calculated by the Show Statistics overlay for the current viewport. If the viewport's Show Statistics option is not turned on, the value will not represent the current frame rate of the viewport.

Available in 3ds Max 9 and higher.

In 3ds Max 2008 and higher, if the Adaptive Degradation is turned on, the value reported will be the target frame rate, not the actual frame rate.

Viewport Transformations

<matrix3>getViewTM()

<matrix3>viewport.getTM()

viewport.setTM <matrix3>

Get or set the active view screen-to-world transform matrix for non-orthographic (perspective and isometric user views) viewports. This is the affine camera or viewport matrix. setTM only operates on Perspective viewports, and returns a value of true if the view transform matrix was successfully set, false otherwise.

The following function returns as a Ray value the "eye" location and direction for the active viewport. The viewport needs to be a non-orthographic viewport.

EXAMPLE

fn getViewDirectionRay =

(

-- The affine TM transforms from world coords to view coords

-- so we need the inverse of this matrix

local coordSysTM = Inverse(getViewTM())

-- The Z axis of this matrix is the view direction.

local viewDir = -coordSysTM.row3

-- get the view position from this matrix

local viewPt = coordSysTM.row4

return ray viewPt viewDir

)

getViewFOV()

Returns the Field of View for the active viewport. If the viewport is an orthographic viewport, a value of 57.2958 degrees (1 radian) is returned.

viewport.GetFOV()

Returns the Field of View for the active viewport. Same as getViewFOV()

viewport.SetFOV <float>

Sets the Field of View for the active viewport to the specified angle in degrees.

Works only with perspective and camera views.

Returns true if successful, false otherwise.

Available in 3ds Max 2008 and higher.

<float>viewport.getFocalDistance()

Return the focal distance of the active viewport if a perspective view, undefined otherwise.

Available in 3ds Max 2008 and higher.

<boolean>viewport.setFocalDistance()

Sets the focal distance of the active viewport.

Works only with perspective views, does not work with camera views.

Returns true if successful, false otherwise.

Available in 3ds Max 2008 and higher.

<boolean>viewport.pan <float> <float>

Performs a pan of the current viewport using the first argument as the X and the second argument as the Y screen delta in pixels.

Works with all viewport types except object-based ones (Camera, Light etc.).

Returns true if successful, false otherwise.

Available in 3ds Max 2008 and higher.

FOR EXAMPLE

viewport.pan 10 0 --pan horizontally by ten pixel

completeredraw()-- redraw the views to see the changes

viewport.zoom <float>

Performs a zoom of the current viewport using the supplied float value as zoom factor - for example, 2.0 zooms out two times, 0.5 zooms in two times.

Works with all viewport types except object-based ones (Camera, Light etc.).

Returns true if successful, false otherwise.

Available in 3ds Max 2008 and higher.

FOR EXAMPLE

--while the perspective viewport is active, evaluate

viewport.setFOV 50.0 --set viewport Field Of View to 50 deg.

true

completeredraw()--redraw the views

OK

viewport.zoom 2.0 --zoom out two times

true

completeredraw() --redraw the views

OK

viewport.getFOV()--get the new Field Of View

86.0061

--What does this result mean?

--The FOV angle is dependent on the width of the image plane,

--but the target distance remains the same.

--When the angle is 50 degrees, tangens of half the angle is

--tan (50.0/2) -> 0.466308

--When you zoom in two times, the width increases twice.

--Thus, atan(0.466308*2) -> 43.0031 (new half-angle) and

--43.0031 * 2 = 86.0062 which is the full viewport FOV angle:

<boolean>viewport.zoomPerspective <float>

Zooms the active viewport. Exactly equivalent to the Interactive Zoom tool in the 3ds Max UI.

This method only works with Perspective views. Does not work for camera views. In the 3ds Max UI, when a user zooms in an orthographic or Isometric User view, internally, a switch is performed on the viewport type, and instead a call to ViewExp::Zoom (viewport.zoom()) is made.

Returns true if successful, false otherwise.

Available in 3ds Max 2008 and higher.

<boolean>viewport.rotate <quat> [center:<Point3>]

Performs a rotate of the current viewport using the supplied quaternion value for the rotation and the Point3 value as the center to perform the rotation about.

Works with all viewport types except object-based ones (Camera, Light etc.).

Returns true if successful, false otherwise.

Available in 3ds Max 2008 and higher.

FOR EXAMPLE

theAxis = (viewport.getTM()).row3

for i = 1 to 180 do

(

viewport.rotate (quat 2 theAxis)

completeredraw()

)

<bitmap>viewport.getViewportDib()

This method returns the active viewport's graphics window image as a Bitmap value. The size of the bitmap is the same size as the viewport. This method is different from gw.getViewportDib() documented here in that it includes the results of using maxops.displayActiveCameraViewWithMultiPassEffect(). Thus, it can be used to generate viewport images containing Depth Of Field or Motion Blur previews.

Available in 3ds Max 2008 and higher. Previously available in [ AVG ] Avguard Extensions.

viewport.ZoomToBounds <All_Bool> <A_Point3> <B_Point3>

Zooms all or the current viewport to a bounding region.

When the first argument is passed as true, all viewports are zoomed. When false, only the selected viewport is zoomed.

The second and third arguments define the bounding region to zoom to.

<point2>getViewSize()

Returns the active view size as point2 in pixels.

<float>getScreenScaleFactor <point3>

Returns the active view scale factor, giving the width in world-space units at the point's distance from the view space origin.

<float>viewport.GetScreenScaleFactor()

Returns the active view scale factor, giving the width in world-space units at the point's distance from the view space origin. Same as getScreenScaleFactor()

<ray>mapScreenToWorldRay <pixel_coord_point2>

Returns a Ray value in world space through the given viewport pixel coordinates in the current active view, and perpendicular to the viewport plane.

<point3>mapScreenToView <pixel_coord_point2> <depth_float> \
 [ <viewport_size_point2> ]

Returns a 3D point in the view coordinate space. Given a point in the active viewport screen (in viewport pixel coordinates), and a depth in view coordinates, this method maps the point into view coordinates. If <viewport_size_point2> is supplied, the specified viewport size is used instead of the actual viewport size.

<point3>mapScreenToCP <pixel_coord_point2> [ <viewport_size_point2> ]

Maps viewport pixel coordinates in the current active view to the construction plane in world coordinates. If <viewport_size_point2> is supplied, the specified viewport size is used instead of the actual viewport size.

<matrix3>getCPTM()

Reurns the construction-plane-to-world transformation matrix.

<float>gw.nonScalingObjectSize()

The value returned from this method may be used as a scale factor that will counteract the viewport zoom. For example, lights, cameras, and tape helper objects use this factor so the size of the node in the scene remains constant when the viewport is zoomed in and out.

This value is affected by the 'Non-Scaling Object Size' spinner in the Viewport Preferences dialog, so the user has some control over this as well.

<point3>gw.getPointOnCP <pixel_coord_point2>

Returns a point in world space on the current construction plane based on the specified screen coordinate.

<float>gw.getCPDisp <base_point3> <dir_point3> \
 <start_pixel_coord_point2> <end_pixel_coord_point2>

This method returns a length in world space given a start screen point (<start_pixel_coord_point2>), an end screen point (<end_pixel_coord_point2>), a base point (<base_point3>) and a direction vector (<dir_point3>). For example, when creating a cylinder, the user clicks the mouse down to define the center point of the cylinder (base), then drags out a radius. They then drag out a height for the cylinder. This method is used to return intermediate and final heights for the cylinder based on the initial base point, the direction vector (the Z axis), the start mouse point, and the current point the user is interactively adjusting.

<float>gw.getVPWorldWidth <point3>

Returns the viewport screen width factor in world space at a point in world space.

<point3>gw.mapCPToWorld <point3>

Returns the corresponding world space point given a point on the construction plane. For example, if you use gw.getPointOnCP() to convert a screen coordinate to a point on the construction plane, you could then call this method to convert that point on the construction plane to a world space point.

<float>gw.getFocalDist()

Returns the focal distance of an active perspective view.

<boolean>gw.IsPerspView()

Returns true if the active viewport is a perspective view; otherwise returns false.

Viewport Snapping

<point3>gw.snapPoint <pixel_coord_point2> [ snapType:<snapType_name> ] [ snapPlane:<matrix3> ]

Given a 2D screen coordinate, this method returns a 3D point on either the current construction plane or the optional snapPlane based on the current snap settings and the optional snapType parameter.

The valid <snapType_name> values are:

#in3d

Snap to all points.

#inPlane

Snap only to points on the construction plane.

#unSelObjs

Ignore selected nodes when considering snap points.

#selObjs

Ignore unselected nodes when considering snap points.

#unSelSubobj

Ignore selected sub-object geometry when considering snap points.

#selSubobj

Ignore unselected sub-object geometry when considering snap points.

#force3d

Override user settings to force snap in 3D.

The optional snapPlane argument available in 3ds Max 8 and higher is a matrix3 value which is the transform that maps the XY plane to the snapping plane. If the matrix3 value supplied is equal to the identity matrix (Matrix3 1), the snapping plane is identical to the XY construction plane.

EXAMPLE

tm = Matrix3(1) --represents the XY plane

m = Point2 0 0 --screen pixel coordinates

p = gw.snapPoint m snapPlane:tm --returns the snapping point

<float>gw.snapLength <length_float>

This method snaps the length to the nearest snap increment and returns the snapped distance.

Viewport Regions

viewport.setRegionRect <viewport index> <box2>

Set the region rectangle for the specified viewport.

viewport.getRegionRect <viewport index>

Get the region rectangle for the specified viewport.

viewport.setBlowupRect <viewport index> <box2>

Set the blowup rectangle for the specified viewport. The blowup rectangle must have the same aspect as the current render output size aspect. The top, bottom, and left component values are taken from the Box2 value argument, but the right component value is re-calculated to force the proper aspect.

viewport.getBlowupRect <viewport index>

Get the blowup rectangle for the specified viewport.

NEW in 3ds Max 2009: You can use the Interface: EditRenderRegion to control the manual region editing gizmo.

See also

Refreshing the Viewports

Viewport Background Images

Viewport Drawing Methods

Adaptive Degradation Access


Adaptive Degradation Access

The following method pairs can be used to control the Adaptive Degradation system which was redesigned in 3ds Max 2008.

Roll over and click a control group to jump to its description:

Methods:

<float>viewport.GetAdaptiveDegGoalFPS()

viewport.SetAdaptiveDegGoalFPS <float>

Get/Set the "Maintain Frames Per Second" target frame rate. This is the frame rate the adaptive degradation system will try to keep.

<boolean>viewport.GetAdaptiveDegDrawBackfaces()

viewport.SetAdaptiveDegDrawBackfaces <boolean>

Gets/Sets the state of the "Draw Backfaces During Degrade" option. When set to true, backfaces will be drawn when degrading even for objects whose backface cull option is turned on, thus improving performance.

<boolean>viewport.GetAdaptiveDegNeverDegradeSelected()

viewport.SetAdaptiveDegNeverDegradeSelected <boolean>

Gets/Sets the state of the "Never Degrade Selected" option. When set to true, selected objects will never get degraded allowing the user to focus on them.

<boolean>viewport.GetAdaptiveDegDegradeLight()

viewport.SetAdaptiveDegDegradeLight <boolean>

Get/Set the state of the "Degrade to Default Lighting" option. When true, the system will degrade the lights to just the default headlight.

viewport.GetAdaptiveDegNeverRedrawAfterDegrade()

viewport.SetAdaptiveDegNeverRedrawAfterDegrade

Get/Set the state of the "Never Redraw After Degrade" option. When true, the system will remain in degraded state even after a mouse up. On large scenes this can help reduce pauses caused by full redraws between navigation operations.

Adapt Object Display by Priority

<boolean>viewport.GetAdaptiveDegDisplayModeCurrent()

viewport.SetAdaptiveDegDisplayModeCurrent <boolean>

Get/Set whether to use the current display mode when degrading.

<boolean>viewport.GetAdaptiveDegDisplayModeFastShaded

viewport.SetAdaptiveDegDisplayModeFastShaded <boolean>

Get/Set whether to use the fast shaded display mode when degrading.

<boolean>viewport.GetAdaptiveDegDisplayModeWire()

viewport.SetAdaptiveDegDisplayModeWire <boolean>

Get/Set whether to use the wireframe display mode when degrading.

<boolean>viewport.GetAdaptiveDegDisplayModeBox()

viewport.SetAdaptiveDegDisplayModeBox <boolean>

Get/Set whether to use the box display mode when degrading.

<boolean>viewport.GetAdaptiveDegDisplayModePoint()

viewport.SetAdaptiveDegDisplayModePoint <boolean>

Get/Set whether to replace objects with point drawing primitives when degrading.

<boolean>viewport.GetAdaptiveDegDisplayModeHide()

viewport.SetAdaptiveDegDisplayModeHide <boolean>

Get/Set whether to hide objects when degrading.

Prioritize Scene Objects

<float>viewport.GetAdaptiveDegCameraDistancePriority()

viewport.SetAdaptiveDegCameraDistancePriority <float>

Get/Set the "Distance from Camera" value. This weights whether the distance from camera or screen size is used to determine which objects will be degraded.

<float>viewport.GetAdaptiveDegScreenSizePriority()

viewport.SetAdaptiveDegScreenSizePriority <float>

Get/Set the "Screen Size" value. This weights whether the distance from camera or screen size is used to determine the degradation priorities.

<boolean>viewport.GetAdaptiveDegMinSize()

viewport.SetAdaptiveDegMinSize <integer>

Get/Set the value of the "Force objects displayed smaller than N pixels to the lowest priority" option.

See also

Accessing Active Viewport Info, Type, and Transforms


Display Panel: Wireframe and Shaded Colors

The following read/write properties provide access to the objects display colors:

Properties:

displayColor.wireframe

Corresponds to the Wireframe radio button in the Display panel, Display Color rollout.

Possible values are #object and #material

displayColor.shaded

Corresponds to the Shaded radio button in the Display panel, Display Color rollout

Valid values are #object and #material

EXAMPLE

displayColor.wireframe --check the current wireframe color mode

#object

displayColor.wireframe = #material --set wireframe display to material

#material

displayColor.shaded = #object --set shaded display to object's wireframe

#object


Refreshing the Viewports

The following methods force the viewports to redraw, or control when the viewports are redrawn.

redrawViews()

Causes the 3ds Max viewports to be immediately redrawn in an optimal way, such that only those parts of the view that have changed are redrawn. This is different from forcing a redraw with the max view redraw command or one of the following methods which redraw the entire scene in all views.

completeRedraw()

forceCompleteRedraw [ doDisabled:<boolean> ]

Calling this method will cause all the viewports to be completely redrawn. This method literally forces everything (every object, every screen rectangle, every view) to be marked invalid and then the whole scene is regenerated. The individual object pipeline caches are not flushed, however. This routine is guaranteed to be slow. If the optional doDisabled: boolean argument for ForceCompleteRedraw is true, disabled viewports will also be redrawn.

setNeedsRedraw complete:<bool>

Sets an internal MAXScript flag that viewports need to be redrawn before MAXScript returns. This is equivalent to a delayed redrawViews().

If complete: is true, a flag is set that a complete viewport redraw is needed. This is equivalent to a delayed completeRedraw().

Available in 3ds Max 2008 and higher. Previously available in [ AVG ] Avguard Extensions.

disableSceneRedraw()

Turns viewport scene redraw off (disables it). All calls to DisableSceneRedraw()/EnableSceneRedraw() must be in pairs, since an internal counter is used in 3ds Max to actually do the redraw enable/disable action.

enableSceneRedraw()

Turns viewport scene redraw on (enables it). All calls to DisableSceneRedraw()/EnableSceneRedraw() must be in pairs, since an internal counter is used in 3ds Max to actually do the redraw enable/disable action.

isSceneRedrawDisabled()

Returns true if scene redraw is disabled, false if it is enabled.

nodeInvalRect <node>

Invalidates the rectangle in the viewports that the node is occupying. Rectangles flagged as invalid will be updated on the next screen redraw.

See also

Redraw context


Viewport Background Images

The following methods provide access to the values in the Viewport Background dialog.

getBkgFrameNum <time>

Returns the viewport background image frame displayed at the specified time. Returns a value of -1 if no frame is to be used for specified time.

getBkgImageAnimate()

setBkgImageAnimate <boolean>

Get and set whether Animate Background is on (true), or off (false).

getBkgImageAspect()

setBkgImageAspect <name>

Get and set the background image Aspect Ratio option. Valid <name> values are:

#view -- Match Viewport

#bitmap -- Match Bitmap

#output -- Match Rendering Output

getBkgORType <start_end_integer>

setBkgORType <start_end_integer> <name>

Get and set the background image Start Processing and End Procession options.

<start_end_integer> = 0 - Start Processing; 1 - End Processing

Valid <name> values are:

#blank -- Blank Before Start/After End

#hold -- Hold Before Start/After End

#loop -- Loop After End

getBkgRangeVal()

Get the background image Use Frame range as a Point2 value. The first component of the Point2 value is the Start Frame, the second component is the End Frame.

setBkgFrameRange <point3>

Set the background image Use Frame range and step value. First component of <point3> is Start Frame, second component is End Frame, and third component is Step Frame.

getBkgStartTime()

setBkgStartTime <time>

Get and set the background image Start At frame.

getBkgSyncFrame()

setBkgSyncFrame <integer>

Get and set the background image Synch Start To Frame frame.

The following 3ds Max system global variable is associated with the Viewport Background dialog:

backgroundImageFileName

Lets you get and set a String value that defines the viewport background image bitmap file name. It contains the corresponding bitmap file name set in the Viewport Background dialog.

setAsBackground <bitmap>

Sets the specified bitmap as the viewport background image. The <bitmap> must be associated with a bitmap file, which it true if:

1 - the bitmap is read from a file via openBitmap() or selectBitMap();

2 - the bitmap was saved via save <bitmap>;

3 - the MAXBitMap constructor is passed a BitmapInfo whose Name length isn't 0 (for example if you retrieve a bitmap from a BitmapTexture); or

4 - the bitmap is saved in the render() command.

The following method affects Viewport Background redraws:

InvalidateAllBackgrounds()

Invalidates the viewport background image for all viewports, causing then to be redrawn


Viewport Grids

The following methods control the display and spacing of grid lines in the viewports.

getGridSpacing()

Returns the spacing between grid lines in units.

SetGridSpacing <float>

Sets home grid spacing. This corresponds to the Grid and Snap Settings dialog, Home Grid tab. The value is clamped to a minimum value of 0.001.

Available in 3ds Max 2008 and higher. Previously available in [ AVG ] Avguard Extensions.

getGridMajorLines()

Returns the number of grid lines between major grid lines.

SetGridMajorLines <int>

Sets home grid major grid lines. This corresponds to the Grid and Snap Settings dialog, Home Grid tab. The value is clamped to a minimum value of 2.

Available in 3ds Max 2008 and higher. Previously available in [ AVG ] Avguard Extensions.

The following 3ds Max system global variable is associated with the Viewport grids:

activeGrid

Contains the currently active grid. If the home grid is active, returns the value undefined. You can assign a grid node object to this variable to make it the currently active grid.

You can also return to the home grid by setting activegrid = undefined.


Mouse Cursors

The following methods control the mouse cursor:

setWaitCursor()

setArrowCursor()

These functions can be used to display the system wait cursor during some prolonged computation and then replace it with the normal cursor. You might want to do this instead of putting up a 3ds Max progress bar, which may be too heavy-weight in some situations. Note that in some cases, 3ds Max may itself restore the arrow cursor underneath this one (for example, with loadMAXFile()), and you may need to redisplay it after such calls.

setSysCur <name>

Sets the current system cursor to one of the standard 3ds Max cursors. Valid <name> values are:

#move

#rotate

#uscale

#nuscale

#squash

#select

#arrow

NOTE:

setSysCur #squash shows the non-uniform scale cursor.

The following 3ds Max system global variables are associated with the mouse:

mouse.mode

A read only variable to get the mouse mode as an <integer> value.

Return values are:

0 - Idle;

1 - Point;

2 - Move

mouse.buttonStates

A read only variable to get the state of the mouse buttons as a 3 element <bitArray>. The order of the bits is: #{Left, Middle, Right}

NOTE:

Right mouse button state is not always correct. If you right-click to bring up a right-click menu and then click in the viewport to dismiss the menu, the right mouse button is still reported as down.

mouse.pos

A read only variable to get the mouse position in the currently active viewport as a <point2> value. The coordinates are in pixel values. If the currently active viewport is a 2D view (Track View, Schematic View, Listener, etc.), the coordinates are in the first non-2D viewport.

mouse.screenpos

A read only variable to get the mouse position on the screen as a <point2> value. The coordinates are in pixel values relative to the top-left corner of the screen.

mouse.inAbort

Contains true if any mouse proc is currently in the process of aborting; otherwise contains false. Read-only.

Available in 3ds Max 2008 and higher. Previously available in [ AVG ] Avguard Extensions.


Picking Points in the Viewports

The pickPoint() function lets the user pick a 3D point in a 3ds Max viewport or type in a 3D point in the Listener. When called, the function puts 3ds Max into a special point-picking command mode and the cursor changes to a cross-hair. The user can either click in one of 3ds Max's viewports or type a 3D point into the Listener and the function returns that point as a MAXScript Point3 value in world-space coordinates.

pickPoint [ prompt:<string> ] [ snap:#2D|#3D ] \
 [ rubberBand:<start_point3> ] \
 [ mouseMoveCallback:fn | #(fn,arg) ] \
 [ relativeTo:<relativePt_point3> ] \
 [ terminators:#(<string>,<string>,...) ]

The function takes an optional prompt: string argument which it prints in the Listener as a prompt message. There is also an optional snap: keyword argument that controls viewport point picking if Snap is turned on in the 3ds Max interface. If #3D is specified, the cursor snaps to points anywhere in 3D space, if #2D is specified (the default), the cursor only snaps on the current active grid construction plane. If Snap is off in the 3ds Max interface, the clicked point is always taken to be on the current active grid construction plane.

The user can either press the ESC key or click the right mouse button at any time to abort the point picking and the function immediately returns the special MAXScript value #escape if the escape key is pressed or #rightClick if the right mouse button is clicked.

You can get the pickPoint() function to display a rubberbanding dashed line during point input by supplying the optional keyword argument rubberBand:<start_point3>. If you include this on a call to pickPoint(), it rubberbands a dashed line from the specified start point to follow the mouse. You would use it in a chain of point picks by specifying the last picked point as the rubberBand: start point for each successive pick. The start point given to rubberBand: should be in world coordinates.

You can also set up a mouse move callback function for tracking free mouse moves during point input. The optional keyword argument for this is mouseMoveCallback: and it has two forms:

mouseMoveCallback:fn

mouseMoveCallback:#(fn, arg)

The second form allows you to supply an argument value that is sent to the callback function each time it is called.

The fn you supply should take one argument in the first form above and two in the second. When the callback function is called, the first argument it gets is always the current world coordinates of the mouse and the second if given is the arg you supplied. You can use a callback function to implement a more sophisticated form of rubberbanding, for example by adjusting a spline's vertex or a box's height to follow the mouse. If you do this, make sure you call any needed update() mesh or spline functions.

Command Line Input in the Listener

The pickPoint() function allows coordinates to be entered either by clicking in a 3ds Max viewport or by typing numbers into the MAXScript Listener window. The user can enter coordinates in one of several forms (based on the command line input syntax for AutoCAD), as follows:

x, y, z or [x, y, z]

explicit point in current construction plane coordinates

x, y or [x, y]

point on the construction plane (cp)

d

point d units away in mouse direction from last point

@ x, y, z or @[x, y, z]

relative, offset to last input point

@ x, y or @[x, y]

on cp, relative to last point's projection on cp

d < a

polar on cp, distance from cp origin at a angle from x-axis

@ d < a

relative polar on cp, centered on last point

d < a1 < a2

spherical on cp, d from cp origin at a1 from x and a2 angle from xy-plane

@ d < a1 < a2

relative spherical

There can be zero or more white space characters before and between numbers and metacharacters.

These typed-coordinates are interpreted as relative to the current active grid construction plane and the coordinates returned by pickPoint() are always in world-space.

When the relativeTo: keyword argument is supplied, pickPoint() will evaluate the result using the relativePt Point3 value instead of the last point picked if the relative coordinate syntax is used for the entry.

Keyboard input by the user that is not in one of the expected coordinate input forms is returned as a String value so the author can handle the error gracefully or permit other kinds of input to be parsed by the script.

You can test for these return conditions using the classOf() function, for example:

p = pickPoint()

case of

(

(p == undefined): ... -- user pressed escape

(p == #rightClick): ... -- user clicked RMB

(classOf p == Point3): ... -- user entered a point

(classOf p == String): ... -- user keyed a non-point

)

The terminators: keyword argument expects an array of 1 or more strings each of 1 or more characters. When supplied, this list of strings specifies a set of keyboard input terminating character sequences. If any one of them is typed at the end of some input, the pickPoint() function returns immediately without waiting for an ENTER to be typed. In all cases when the terminators: keyword argument is supplied, the pickPoint() function returns a two-element array--the first element is the input point, the second element is the terminating string, or undefined if the point was input with a mouse click or terminated with ENTER.

This allows the user to type in a point terminated by a terminator string, or just type the terminator string. In the second case, the first element in the result array is the value undefined. You can inspect the second element in the array to see what terminator, if any, the user actually typed. For example,

pp = pickPoint prompt:"foo: " terminators:#(" ", "a", "oo")

if pp[2] == "a" then ...

Often, the pickPoint() function will be used repeatedly within a script to request multiple points, such as successive vertices in a line. You may need to use the new function, redrawViews(), to force a viewport update as you gradually construct new scene objects this way. MAXScript normally delays viewport redraw until the script finishes running.

pickOffsetDistance [ prompt:<string> ] [ pt2Prompt:<string> ] \
 [ errPrompt:<string> ] [ snap:#2D|#3D ] \
 [ keyword:<string> ]

This function issues the prompt message, if any, to Listener and waits for the user to either click in a viewport (which determines a point exactly like the pickPoint() function), to type in a number ended by ENTER (which determines a number), or to type all or the beginning of the keyword ended by ENTER. If the user types the keyword, the function returns true. If the user types a number, the function returns its value. If the user clicks a point, the function issues the pt2Prompt message, if any, to Listener and waits for a second point to be clicked, and then returns the world-space distance between the two points. If the user types something which is not a number and does not match the keyword, the function issues the errPrompt message, if any, otherwise the prompt message, if any, and waits for the user to try again.

See Also:

Picking Scene Nodes By Hit

Picking Scene Nodes by Name

Picking Scene Nodes By Region


snapMode

The snapMode structure provides system globals and functions to access and control the snapping options through MAXScript.

snapMode.active

Get/Set whether snap is active as a Boolean value.

snapMode.type

Get/Set the current snap type as a name. Possible names are #2D, #2_5D, #3D.

The snapMode structure has been extended in 3ds Max 7 to provide access to all Snap settings and Snap results. Prior to 3ds Max 7, these properties were available in the 3rd party Avguard DLX extension.

snapMode.snapPreviewRadius SystemGlobal:snapPreviewRadius 30

Get/Set the snap preview radius.

Available in 3ds Max 7 and higher.

snapMode.snapRadius SystemGlobal:snapRadius 20

Get/Set the snap radius.

Available in 3ds Max 7 and higher.

snapMode.hilite

Get/Set the snap marker color as a color value.

Available in 3ds Max 7 and higher.

snapMode.markSize

Get/Set the snap marker size as an integer

Available in 3ds Max 7 and higher.

snapMode.toFrozen

Get/Set whether to snap to frozen objects as Boolean value.

Available in 3ds Max 7 and higher.

snapMode.axisConstraint

Get/Set whether the snap should use axis constraints as Boolean value. Corresponds to the checkbox in the "Grid and Snap Settings" dialog, Options tab.

Available in 3ds Max 7 and higher.

snapMode.displayRubberBand

Get/Set whether to display rubber band as a Boolean value. Corresponds to the checkbox in the "Grid and Snap Settings" dialog, Options tab.

Available in 3ds Max 7 and higher.

snapMode.useAxisCenterAsStartSnapPoint

Get/Set the state of the "Use Axis Center As Start Snap Point" option as Boolean value. Corresponds to the checkbox in the "Grid and Snap Settings" dialog, Options tab.

Available in 3ds Max 7 and higher.

snapMode.display

Get/Set whether the snap marker is displayed as a Boolean value.

Available in 3ds Max 7 and higher.

snapMode.strength

Get/Set the snap strength as an integer

The fo Available in 3ds Max 7 and higher.

snapMode.hit

Contains true if currently snapped to something, false if not snapped. Contains undefined if Snaps are not active. Read only.

Available in 3ds Max 7 and higher.

snapMode.node

Contains the node currently being snapped. Contains undefined if not snapped to a node or if Snaps are not active. Read only.

Available in 3ds Max 7 and higher.

snapMode.flags

Contains the snap system flags as an integer. Contains undefined if Snaps not active. Read only.

Available in 3ds Max 7 and higher.

snapMode.hitPoint

Contains the last snap point as point3 coordinate in local coordinates of node snapped to. Contains undefined if Snaps are not active. Read only.

Available in 3ds Max 7 and higher.

snapMode.worldHitpoint

Contains the last snap point as point3 world coordinate. Contains undefined if Snaps are not active. Read only.

Available in 3ds Max 7 and higher.

snapMode.screenHitPoint

Contains the last snap point as point3 screen coordinate. Contains undefined if Snaps are not active. Read only.

Available in 3ds Max 7 and higher.

snapMode.OKForRelativeSnap

Contains true if at least one snap point has been recorded. Contains undefined if Snaps are not active. Read only.

Available in 3ds Max 7 and higher.

snapMode.refPoint

Contains the last snap point as point3 world coordinate. Contains undefined if Snaps are not active. Read only.

Available in 3ds Max 7 and higher.

snapMode.topRefPoint

Contains the first snap point as point3 world coordinate. Contains undefined if Snaps are not active. Read only.

Available in 3ds Max 7 and higher.

snapMode.numOSnaps

Contains the number of OSnaps as an integer. Contains undefined if Snaps are not active. Read only. Currently there are 5 sets of OSnaps.

Available in 3ds Max 7 and higher.

snapMode.getOSnapName <int osnap_index>

Returns the name of the indexed OSnap as string. Returns undefined if Snaps are not active.

Currently, the results are:

1 - "NURBS"

2 - "Standard"

3 - "Standard"

4 - "Standard"

5 - "Standard"

Available in 3ds Max 7 and higher.

NOTE:

The Standard Snaps are exposed in 4 groups with indices 2 to 5. See below for details on which snap items are in which groups. Also see example output further on this page.

snapMode.getOSnapNumItems <int osnap_index>

Returns the number of OSnap items in the indexed OSnap as <integer>. Returns undefined if Snaps are not active.

Possible osnap_index values are:

1 - NURBS

2 - Standard - Grid Points, Grid Lines

3 - Standard - Pivot, Bounding Box

4 - Standard - Perpendicular, Tangent

5 - Standard - Vertex, Endpoint, Edge/Segment, Midpoint, Face, Center Face

Available in 3ds Max 7 and higher.

snapMode.getOSnapItemName <int osnap_index> <int osnap_item_index>

Returns the name of the indexed OSnap item in the indexed OSnap as string. Returns undefined if Snaps are not active.

Available in 3ds Max 7 and higher.

snapMode.getOSnapItemToolTip <int osnap_index> <int osnap_item_index>

Returns the tooltip of the indexed OSnap item in the indexed OSnap as string. Returns undefined if Snaps are not active.

Available in 3ds Max 7 and higher.

snapMode.getOSnapItemActive <int osnap_index> <int osnap_item_index>

Returns true if the indexed OSnap item in the indexed OSnap is active, false otherwise. Returns undefined if Snaps are not active.

Available in 3ds Max 7 and higher.

snapMode.setOSnapItemActive <int osnap_index> <int osnap_item_index> <boolean>

Sets whether the indexed OSnap item in the indexed OSnap is active. Returns undefined if Snaps are not active.

Available in 3ds Max 7 and higher.

Exploring the Snap Options

SCRIPT:

--The following example prints information about the state of

--all Snap options to the Listener:

for i = 1 to snapmode.numOSnaps do

(

format "%: name: \"%\"\n" i (snapmode.getOSnapName i)

for j = 1 to (snapmode.getOSnapNumItems i) do

format " %: name: \"%\"; tooltip: \"%\"; state: %\n" j (snapmode.getOSnapItemName i j) \

(snapmode.getOSnapItemToolTip i j) (snapmode.getOSnapItemActive i j)

)

OUTPUT:

1: name: "NURBS"

1: name: "CV"; tooltip: ""; state: false

2: name: "Point"; tooltip: ""; state: false

3: name: "Curve Center"; tooltip: ""; state: false

4: name: "Curve Normal"; tooltip: ""; state: false

5: name: "Curve Tangent"; tooltip: ""; state: false

6: name: "Curve Edge"; tooltip: ""; state: false

7: name: "Curve End"; tooltip: ""; state: false

8: name: "Surf Center"; tooltip: ""; state: false

9: name: "Surf Normal"; tooltip: ""; state: false

10: name: "Surf Edge"; tooltip: ""; state: false

2: name: "Standard"

1: name: "Grid Points"; tooltip: ""; state: true

2: name: "Grid Lines"; tooltip: ""; state: false

3: name: "Standard"

1: name: "Pivot"; tooltip: ""; state: false

2: name: "Bounding Box"; tooltip: ""; state: false

4: name: "Standard"

1: name: "Perpendicular"; tooltip: ""; state: false

2: name: "Tangent"; tooltip: ""; state: false

5: name: "Standard"

1: name: "Vertex"; tooltip: ""; state: true

2: name: "Endpoint"; tooltip: ""; state: false

3: name: "Edge/Segment"; tooltip: ""; state: false

4: name: "Midpoint"; tooltip: ""; state: false

5: name: "Face"; tooltip: ""; state: false

6: name: "Center Face"; tooltip: ""; state: false

OK

Changing the Snap Options

The following example shows how to access and change since snap options:

EXAMPLE

--The Snaps dialog must not necessarily be open,

--but in this example we will toggle it on to be able to see

--what is happening to the checkboxes:

max drawingaids --toggle on the Snaps dialog

OK --if it was closed, it should be open now

snapmode.getOSnapItemActive 5 1 --print the state of the Object>Vertex snap

false --it is off

--now toggle the vertex snap:

snapmode.setOSnapItemActive 5 1 (not (snapmode.getOSnapItemActive 5 1))

OK

max drawingaids; max drawingaids --toggle the Snaps dialog twice to refresh

OK

OK --the Vertex checkbox should be checked now

snapmode.getOSnapItemActive 5 1 --get the current Vertex snap state

true --it is now on

Exploring the Snap Marker Settings

The following example prints information about the snap marker's settings:

EXAMPLE

format "type: %; hilite: %; marksize: %; toFrozen: %\n" snapmode.type snapmode.hilite \

snapmode.markSize snapmode.toFrozen

format "axisConstraint: %; active: %; strength: %\n" snapmode.axisConstraint snapmode.active \

snapmode.strength

Exploring the Snap Results

The following example shows how to access and print dynamically the results of the snap operations in the viewports:

EXAMPLE

--This function can be registered as a RedrawViews Callback

--It will print information about the current snap state to the Listener

fn snapinfo =

(

local snapinfo

if snapmode.active do

(

struct snapinfo (hit, flags, hitpoint, worldhitpoint, screenHitPoint, OKForRelativeSnap, topRefPoint, refPoint, node)

local out = snapinfo snapmode.hit (bit.intAsHex snapmode.flags) snapmode.hitPoint \

snapmode.worldHitpoint snapmode.screenHitPoint snapmode.OKForRelativeSnap \

snapmode.refPoint snapmode.topRefPoint snapmode.node

print out

)

ok

)

unregisterRedrawViewsCallback snapinfo

registerRedrawViewsCallback snapinfo

See also

3ds Max System Globals


Viewport Drawing Methods

The methods documented in this topic provide low-level access to 3ds Max's graphics system. These methods are available for scripts to do any graphics work not possible using the standard high-level graphics methods.

These methods are for use in the existing 3ds Max viewports, and only work on the active viewport. Note that these methods typically are not for casual use, as they are not intended to be a high level graphics library. For example, many steps are required to display a single lit polygon. These methods are optimized for speed, and not at all for script programmer ease of use.

The methods described in this topic actually operate on graphic windows. While graphic windows are not the same as viewports, they are related to one another. Each viewport has its own graphics window, and the contents of the viewport display can be thought of as a snapshot of the graphics window contents. Since writing to display memory a relatively slow operation, 3ds Max writes instead to the graphics window, and then when all the writes have been finished, it redraws the viewports with the graphics window contents.

Graphics Driver Configuration and Support Methods

gw.getDriverString()

This method returns a string identifying the graphics driver (and includes manufacturer info if available)

FOR EXAMPLE

on an nVidia card using MAXtreme drivers, the result would look like

gw.getDriverString()

"NVIDIA MAXtreme v. 6.00.07"

gw.querySupport <feature_name>

Determines if the driver supports the specified feature. The valid <feature_name> values are:

#txtCorrect

This is used to enable or gray-out the perspective correction right-click viewport menu option.

#geomAccel

This is used to indicate to 3ds Max (and the mesh class in particular) that the driver wants to handle all of the 3D data natively. In this case, meshes are rendered by passing 3D world space data and letting the driver transform, clip, and light the vertices. If this returns false, then the mesh class handles all transforms, clipping and lighting calculations and then calls the hPolygon or hPolyline 2 1/2D calls for the driver to rasterize. (Primitives that are actually clipped are still sent to the polygon/polyline methods.)

Currently, only the OpenGL driver returns true to this query, but other drivers have been developed that return true, and the HEIDI and D3D drivers may change in the future.

#triStrips

If this returns true, then 3ds Max will try to stripify meshes before calling the rendering methods. Currently, the drivers just return the user preference that is set in the driver configuration dialog. This preference defaults to true.

#dualPlanes

If a driver has dual-planes support it returns true. The standard 3ds Max OpenGL display driver only returns true for this if the underlying display driver has implemented a custom OpenGL extension that allows 3ds Max to handle this efficiently.

#swapModel

This returns true if 3ds Max has to redraw the whole scene any time the viewports are exposed.

#incrUpdate

This returns true if the driver can update a rectangular subset of the viewport without trashing the image outside that rectangle. This is true for most drivers that blit the viewport region and false for those that do page-flipping in the hardware. For OpenGL, this is true if the display driver implements the Microsoft glSwapRectHintWIN extension.

#passDecal

This is true if the driver can handle decalling with only one pass. Currently, this is true for OpenGL, but false for HEIDI and D3D.

#driverConfig

This is true if the driver has a configuration dialog. This is true for all three of 3ds Max’s standard drivers.

#texturedBkg

This is true if the viewport background is implemented as a textured rectangle, and false if it is a blitted bitmap.

#virtualVpts

This is true if the driver allows viewports to be made larger than the physical window they are attached to. Currently, this is only true for OpenGL.

#paintDoesBlit

This is true if WM_PAINT messages result in a blit of the backbuffer (as opposed to a page-flipping swap). This allows 3ds Max to do quick damage region repair, and works together with the #swapModel flag.

#wireframeStrips

This is true if the driver wants 3ds Max to send down wireframe models using triangle strips instead of a bundle of 2-point segments. This is only used by the OpenGL driver, and it is there as a user-choosable performance-accuracy tradeoff (since the strips are faster and are back-culled, but they display hidden edges as though they are visible).

gw.dualPlane

Gets/Sets the status of the Viewport Parameters/Use Dual Planes checkbox in the Preference Settings dialog, Viewports tab.

Window and Viewport Transformation Methods

gw.isPerspectiveView()

Returns true if the view is in perspective projection; otherwise false (orthographic projection).

gw.setTransform <matrix3>

Sets the active viewport’s graphics window transformation matrix to the specified matrix3 value, and updates the modeling coordinates to normalized projection coordinates matrix. This routine also back-transforms each light and the eye point so that lighting can be done in modeling coordinates.

This method may be used to set a matrix that transforms the point passed to the drawing methods (like gw.text(), gw.marker(), gw.polyline() or gw.polygon()). Normally these methods expect world coordinates. However if this matrix is set to an object’s transformation matrix you can pass coordinates in the object’s space coordinates and they will be transformed into world space (and then put into screen space when they are drawn). If however this is set to the identity matrix, you would pass world space coordinates. You can set this matrix to the object’s transform matrix using the following

FOR EXAMPLE

gw.setTransform node.transform

For world-to-screen space conversions by the methods gw.text(), gw.marker(), gw.polyline() or gw.polygon(), etc, a developer must explicitly set this matrix to the identity matrix. This is because the graphics window may have a non-identity transform matrix already in place from a previous operation.

FOR EXAMPLE

gw.setTransform (matrix3 1)

gw.getFlipped()

Returns true if the determinant of the current transform is positive, false if negative.

Position, Size, and Depth Clipping Methods

gw.setPos <x_integer> <y_integer> <w_integer> <h_integer>

Sets the size and position of the graphics window. The coordinates are all Windows coordinates in the space of the graphics windows' parent window. All coordinates are in Windows format, with the origin in the upper left.

x - Specifies the left graphics window origin; y - Specifies the top graphics window origin; w - Specifies the graphics window width; h - Specifies the graphics window height.

gw.getWinSizeX()

This method gets the current window size in X.

gw.getWinSizeY()

This method gets the current window size in Y.

gw.getWinDepth()

This method returns the z-buffer depth (in bits).

NOTE:

This method does not return the proper Z depth value in 3ds Max and Autodesk VIZ.

gw.getHitherCoord()

This method returns the largest device Z value.

gw.getYonCoord()

This method returns the smallest device Z value.

NOTE:

This method does not return the proper Z depth value in 3ds Max and Autodesk VIZ.

DIB (Device-Independent Bitmap) Methods

gw.getViewportDib()

This method returns the active viewport’s graphics window image as a Bitmap value. The size of the bitmap is the same size as the viewport.

See also Viewport.GetViewportDib()

SCRIPT

MacroScript GrabViewport category:"Tools" tooltip:"Grab Viewport"

(

---------------------------------------------------------------------

--GRABVIEWPORT MACROSCRIPT

--Created:3/23/99

--Edited:4/28/99

--by Borislav Petrov

--bobo@email.archlab.tuwien.ac.at

---------------------------------------------------------------------

--Snapshot Active Viewport to Bitmap

--Filename in format:

--VPGRAB_MaxFileName_ViewportName_CurentFrame.ImageFormatExtension

---------------------------------------------------------------------

--

--Init Variables

local grab_bmp --bitmap to put the snapshot into

local bmp_name --name of the bitmap to save

local get_viewport_name --viewport name

local gac,gct,mfn --variables to hold ActiveCamera, CurrentTime, MaxFileName

--

--Start Macro

grab_bmp = gw.getViewportDib() --get the viewport bitmap into variable

get_viewport_name = viewport.GetType() --get viewport name

gvn = get_viewport_name as string --convert viewport name to string

gvn = substring gvn 6 (gvn.count-5) --cut the string

if gvn == "camera" then --if the remaining string is "camera"

(

gac = getActiveCamera() --get the camera

gvn = gac.name --get the name of the camera

)

mfn = MaxFileName --get max file name

if mfn == "" then --if there is no name

mfn = "Untitled" --use "Untitled"

else

mfn = getFileNameFile mfn --use the file name without .MAX extension

gct = SliderTime as string --get current frame time

--

bmp_name = "VPGRAB_"+ mfn +"_" +gvn + "_" + gct --build the output file name

--

--Display file save dialog

bmp_name = getSaveFileName caption:"Save Viewport to:" filename:bmp_name \

types:"BMP(*.bmp)|*.bmp|TIFF(*.tif)|*.tif|JPG(*.jpg)|*.jpg|TGA(*.tga)|*.tga|"

--

if bmp_name != undefined then --if user has confirmed / entered a valid name

(

grab_bmp.filename = bmp_name --set output name to the one entered in the save file dialog

save grab_bmp --save the bitmap

display grab_bmp --display the bitmap in a VFB

)

--

)--end of script

Drawing Setup

gw.resetUpdateRect()

This method resets the update rectangle. The update rectangle is the region of the screen that needs to be updated to reflect items that have changed. When the system is done rendering items, the goal is to only update the region of the viewport that has actually been altered. This method sets the update rectangle (the region that will be blitted to the display) to a special "empty" value. This way when gw.enlargeUpdateRect() is later called, the Box2 region passed will be used as the region.

gw.enlargeUpdateRect ( <Box2> | #whole )

This method enlarges the update rectangle to include the Box2 value passed. If #whole is specified, the whole viewport will later be updated

gw.getUpdateRect()

This method retrieves the current update rectangle as a Box2 value. Returns a special an Box2 "empty" value if no region of the viewport needs to be updated.

gw.setRndLimits <render_limits_name_array>

Sets the rendering limits used by primitive calls. Setting the rendering limits is used in communication between the various parts of 3ds Max that handle the display of objects. For example, setting this limit to #polyEdges and then drawing a polygon won't result in a polygon drawn with edges. It only sets a flag that indicates the edge should be drawn.

What happens is as follows. Inside the upper level 3ds Max, part of the code knows that polygon edges have been turned on. However this is not related through the object oriented architecture to the part of 3ds Max that does the actual drawing. When 3ds Max goes to draw objects it will see that the polygon edge flag is on. This tells it to do two drawing passes -- one to draw the polygon, then it calls outlinePass() call with true, draws a bunch of edges, then calls outlinePass() with false. Thus, the drawing routine is responsible for looking at the flags and drawing appropriately. This method is only responsible setting the limit which can later be checked.

<render_limits_name_array> specifies the rendering limits used by the viewport as an array of <render_limits_name> values. The valid <render_limits_name> values are:

#allEdges

All edges of the item are shown (including hidden ones).

#boxMode

Objects are shown using their bounding box.

#backcull

Backface culling is used. Entities whose surface normal face away from the view direction are not drawn.

#colorVerts

This turns on color-per-vertex display.

#flat

Flat (facet) shading mode.

#illum

This indicates that you have colors per vertex in your polygons and that they should be used. If you had colors per vertex but this flag was not set, the colors would be ignored.

#lighting

This is the same as setting #illum and #specular.

#noAtts

No attributes are specified.

#perspCorrect

In this mode textures are corrected for perspective display.

#pick

This indicates hit testing will be performed (not rendering).

#polyEdges

This mode causes polygon edges (Edged Faces) to be on.

#shadeCverts

This modifies #colorVerts. If set, lighting is enabled and the vertex colors are used to modulate the colors that result from lighting. If off, the colors on each vertex are used directly to shade the triangle. When 3ds Max uses #shadeCverts mode, it puts a white diffuse-only material on the object so that it appears that the colors are shaded without distortion.

Described further, when #shadeCverts is OFF, then the vertex colors are used directly. This is equivalent to saying that they are modulated by a pure white self-illuminated material.

When #shadeCverts is ON, the diffuse white material is illuminated by the scene lighting, resulting in shades ranging from black to white, with most vertices being some shade of pure gray. When the vertex colors are modulated by the material color, they get multiplied (in general) by a number less than 1, which makes them appear darker.

The RGB components of the colors are modulated uniformly, so that there is no shift from, say, red to green. That would happen if the underlying material was not evenly weighted (that is, a pure gray lying between black and white). Said another way, only the intensity of the vertex colors is changed when shading is on, not luminance, chrominance, etc.

#specular

This enables specular highlight display.

#texture

This enables texture display.

#twoSided

Faces are displayed regardless of their surface normal orientation.

#vertTicks

This mode is really a pseudo-mode, in that it doesn't actually cause the graphics drivers to do anything differently, but rather is tested by the Mesh class, which sends down vertex markers (+) if the mode is on.

#wireframe

Wireframe rendering mode.

#zBuffer

When coordinates are specified for drawing primitives they have x, y, and z values. Sometimes when drawing entities in the viewports it is desirable to ignore the z values. For example in the 3ds Max viewports the text that display the type of viewport (Front, Left, and so on) are drawn without z values. So are the arc-rotate circle control and the axis tripods. These items are drawn without this flag being set so they always show up in front.

gw.getRndLimits()

Retrieves the rendering limits used by primitive calls as an array of names. See gw.setRndLimits() for a list of the returned name values.

gw.getRndMode()

Returns the current rendering mode used by the viewport as an array of names. This is a subset of the rendering limit, in that any limits imposed by the rendering limit are forced onto the current mode. See gw.setRndLimits() for a list of the returned name values.

gw.setSkipCount <skip_count_integer>

Sets the number of triangles skipped when the viewport is set as a 'Fast View Display' viewport. To disable fastview, specify 1. Since triangles are handed down to graphics driver one at a time, it is up to the code that feeds triangles to the graphics driver to skip the specified number of triangles. The mesh rendering in 3ds Max uses the skip count in this way.

<skip_count_integer> specifies that every 'n-th' triangle should be drawn. If set to 2, every other triangle should be drawn.

gw.getSkipCount()

Returns the current skip count setting.

The following is an example of using the above functions

-- Get the current rendering limits

lim = gw.getRndLimits()

-- Add another limit

append lim #polyEdges

-- Set the new rendering limits

gw.setRndLimits lim

-- Get back the rendering limits to check

gw.getRndLimits()

-- Get back the rendering mode to check

gw.getRndMode()

gw.setDirectXDisplayAllTriangle <bool>

Exposes the Display All Triangle Edges option available in the UI as a checkbox in the Customize>Preferences>Viewports>Configure Driver dialog of the Direct3D driver. When set to true, all edges will be drawn. When set to false, only visible edges will be drawn.

Available in 3ds Max 9 and higher.

Light and Camera Methods

gw.getMaxLights()

Returns the maximum number of lights that may be used by the interactive renderer.

Coordinate Transformation Methods

The following methods map points from the graphic window's current transform to device space. If the graphic window's transform is set to the identity matrix then the mapping is done from points specified in world space. Otherwise the points given are transformed by the graphic window’s transform, and are then considered to be in world space. Thus, to get a world-space to screen-space conversion, you need to set the graphic window’s transform to the identity with

CODE:

gw.setTransform(Matrix3 1)

gw.hTransPoint <point3>

This method converts the point3 coordinate to a "h" format device coordinate. Each component of the return value is in integer format in the native device coordinates for the graphics driver. For HEIDI and OpenGL, the origin is at the lower left. For Direct3D the origin is at the upper left.

gw.wTransPoint <point3>

This method converts the point3 coordinate to a "w" format device coordinate. Each component of the return value is in integer format with the origin at the upper left.

gw.transPoint <point3>

This method converts the point3 coordinate to a "h" floating point coordinate. Each component of the return value is in float format with the origin at the upper left. This is just a helper routine to avoid building up round-off error. 3ds Max uses it just for IK.

Drawing Methods

Methods that start with "h" take integer device coordinates with the origin at the lower-left. Methods that start with "w" in front take Windows device coordinates with the origin at the upper left. These "h" and "w" routines perform NO clipping unless otherwise noted. Drawing outside the allowable region is likely to cause 3ds Max to crash. These coordinate systems are left-handed.

Methods that don’t start with "h" or "w" map points from the graphic window's current transform to device space. This coordinate system is right-handed. If the graphic window's transform is set to the identity matrix then the mapping is done from points specified in world space. Otherwise the points given are transformed by the graphic window’s transform, and are then considered to be in world space. Thus, to get a world-space to screen-space conversion, you need to set the graphic window’s transform to the identity with:

CODE:

gw.setTransform(Matrix3 1)

After completing any drawing to the graphics window with the methods described in this section, you need to call gw.updateScreen() to update the viewport display.

gw.updateScreen()

Updates the viewport display to display any text, markers, polylines, polygons, or tristrips written to the graphics window via the methods described below.

gw.text <point3> <string> [ color:<color> ]

gw.hText <point3> <string> [ color:<color> ]

gw.wText <point3> <string> [ color:<color> ]

Draws 2D fixed font annotation string text to the specified location using the specified (optional) color. If the color is not specified, a default color of red is used.

NOTE:

This routine DOES perform clipping of the text if it is off the screen.

gw.getTextExtent < string >

Returns the text extents of the string as it would be displayed in the viewports as a point2 value.

gw.Marker <point3> <marker_name> [ color:<color> ]

gw.hMarker <point3> <marker_name> [ color:<color> ]

gw.wMarker <point3> <marker_name> [ color:<color> ]

Draws a marker at the specified location. This is can be paired with pickpoint() to quickly show where the user has clicked. These markers are temporary and will be erased whenever the viewports are updated. If the color is not specified, a default color of red is used. The valid <marker_name> types are:

#point

#hollowBox

#plusSign

#asterisk

#xMarker

#bigBox

#circle

#triangle

#diamond

#smallHollowBox

#smallCircle

#smallTriangle

#smallDiamond

The following is an example that creates an instance of all types of markers, spaced equally:

EXAMPLE:

arr = #("point","hollowBox","plusSign","asterisk","xMarker",

"bigBox","circle","triangle","diamond","smallHollowBox",

"smallCircle","smallTriangle","smallDiamond" )

for i=1 to arr.count do (

gw.hMarker [100, (50 + i*10), 50](arr[i] as name) )

gw.enlargeUpdateRect #whole

gw.updateScreen()

gw.Polyline <vertex_point3_array> <isClosed_boolean> [rgb:<color_array>]

gw.hPolyline <vertex_point3_array> <isClosed_boolean> [rgb:<color_array>]

gw.wPolyline <vertex_point3_array> <isClosed_boolean> [rgb:<color_array>]

This method draws a multi-segment polyline. Each value in <vertex_point3_array> is a vertex on the polyline. If <isClosed_boolean> is true, the first point is connected to the last point, that is, the polyline is closed. If false, the polyline is left open. If the optional rgb color array is specified, and shade mode is set to smooth, the polyline will be drawn Gourand shaded. This is how 3ds Max draws lit wireframes for instance. If the optional rgb color array is not specified, the line is drawn with the line color specified via gw.setColor(). The number of elements in <color_array> must be the same as in <vertex_point3_array>.

gw.Polygon <vertex_point3_array> <color_array> <uvw_point3_array>

gw.hPolygon <vertex_point3_array> <color_array> <uvw_point3_array>

gw.wPolygon <vertex_point3_array> <color_array> <uvw_point3_array>

This method draws a multi-point polygon. Each value in <vertex_point3_array> is a vertex on the polygon. <color_array> specifies the color at each vertex. The rendering mode (set via gw.setRndLimits()) must include #illum for the color values to be used. <uvw_point3_array> specifies the UVW coordinates at each. The rendering mode must include #texture for the UVW coordinates to be used. The number of elements in each array must be identical.

gw.hRect <box2> <color>

gw.wRect <box2> <color>

Draws a rectangle in the given color using the coordinates specified by box2.

Available in 3ds Max 2008 and higher. Previously available in [ AVG ] Avguard Extensions.

EXAMPLE:

rect = (box2 13 47 96 97)

gw.wrect rect red

gw.wmarker [rect.left,rect.top,0] #point color:green

gw.wmarker [rect.left,rect.bottom,0] #point color:green

gw.wmarker [rect.right,rect.top,0] #point color:green

gw.wmarker [rect.right,rect.bottom,0] #point color:green

eRect = rect -- enlargeUpdateRect 1 pixel too small in either direction?

eRect.right += 1

eRect.bottom += 1

gw.enlargeUpdateRect eRect

gw.updateScreen()

gw.startTriangles()

This method is called to begin sending a series of triangles to render. Call this method, then gw.triangle() one or more times, then gw.endTriangles() to finish.

Available in 3ds Max 2008 and higher. Previously available in [ AVG ] Avguard Extensions.

gw.endTriangles()

Call this method to finish rendering triangles.

Available in 3ds Max 2008 and higher. Previously available in [ AVG ] Avguard Extensions.

gw.triangle <vertex_point3_array> <color_array>

This method draws a triangle. Each value in <vertex_point3_array> is a vertex on the triangle.

<color_array> specifies the color at each vertex. The rendering mode set via gw.setRndLimits() must include #illum for the color values to be used.

There must be 3 elements in each array.

Call gw.startTriangles() first, call gw.triangle() one or more times, then gw.endTriangles() when done drawing triangles.

Available in 3ds Max 2008 and higher. Previously available in [ AVG ] Avguard Extensions.

EXAMPLE:

gw.setTransform(Matrix3 1)

gw.startTriangles()

gw.triangle #([0,0,0], [50,0,0], [50,50,0]) #(red,red,red)

gw.triangle #([0,0,0], [50,50,0], [0,50,0]) #(green,green,green)

gw.endTriangles()

gw.enlargeUpdateRect #whole

gw.updateScreen()

gw.triStrip <vertex_point3_array> <color_array> <uvw_point3_array>

This method is used for drawing a series of triangles specified as 'strips'.

The method takes 3 or more vertices and builds triangles in a strip. This sends a lot less data and the underlying graphics library has to set up a lot less data since it can use the previous information to start the rasterization, resulting in a significant speed increase. This routine does no clipping so all the vertices passed must be within view.

The parameters are the same as for the gw.Polygon(). However, the <vertex_point3_array> is handled differently. After the first two vertices, each new vertex is used to create a new triangle. For instance, to draw a quad, the first three vertices specify the first triangle and the next one is combined with the previous two to complete the square.

Available in 3ds Max 2008 and higher. Previously available in [ AVG ] Avguard Extensions.

gw.hTriStrip <vertex_point3_array> <color_array> <uvw_point3_array>

gw.wTriStrip <vertex_point3_array> <color_array> <uvw_point3_array>

NOTE:

These two methods are currently broken. Please use the gw.triStrip and Polygon methods above.

The following is an example of using the above functions:

EXAMPLE:

-- Draw some primitives

gw.hPolyline #([300,50,16], [300,200,8], [450,250,4]) true

--

gw.hPolygon #([200,100,16], [280,100,8], [250,200,4]) \

#(red, blue, green) \

#([1.0,.5,0], [0.5,0.5,0], [0,0,0.5])

-- Update the viewports

gw.enlargeUpdateRect #whole

gw.updateScreen()

gw.setColor <type_name> <color_value>

Sets the RGB color used for the specified drawing type. The valid <type_name> values are:

#line -- line drawing color

#fill -- polygon fill color

#text -- text drawing color

#clear -- The color that the viewport is cleared to

when you call gw.clearScreen()

gw.clearScreen <Box2> [ useBkg:<boolean> ]

Clears the specified rectangular region of the screen. If the optional useBkg parameter is set to false, the region is set to the "clear" color (see gw.setColor() above). If true, the background should be used to fill the cleared area. The default useBkg value is false.


ViewportManager

Constructor

Class instances not creatable by MAXScript.

Aliases

ViewportManager

ViewportManagerControl

See also

Interface: dxshadermanager


Miscellaneous Viewport Methods and System Globals

createPreview()

Creates a viewport preview using the current values in the Make Preview dialog.

getVPortBGColor()

setVPortBGColor()

Get and set the viewport background color as a Color value.

isCPEdgeOnInView()

This method returns true if the construction plane is 'head on' in the current viewport. For example if the construction plane was XY and you were looking from the Front view, this method would return true. This is used for example during object creation because this process doesn't work very well when the view is 'head on'.

axisTripodLocked()

This method returns true if the axis tripods are locked, that is, they won’t move when you move an object or sub-object, false otherwise.

lockAxisTripods <boolean>

If <boolean> is true, this method locks the axis tripods so that they will not be updated. If false, the axis tripods will be updated.

NOTE:

In certain cases, the lockAxisTripods() method can cause multiple Assertion Failures. This occurs when one or more objects are selected, lockAxisTripods true is executed, and then the objects are deselected.

flashNodes <node_array>

This method is used to 'flash' a group of nodes. This is usually used as a confirmation of some operation (for example as an indication of the completion of a pick node operation.) The nodes are briefly erased and then redrawn in the viewport to flash them.

NOTE:

The flashNodes() method does not redraw the viewports after displaying the specified nodes as white wireframes. To properly redraw the viewports, call the forceCompleteredraw() method immediately after calling flashNodes().

The following 3ds Max system global variables are applicable to the viewports:

displaySafeFrames

Lets you get and set whether Show Safe Frames is on for the active viewport. A Boolean value - true if Show Safe Frames is on, false if off.

preferences.useLargeVertexDots

Lets you get and set whether to use small or large dots when representing vertices as dots. A Boolean value set to true if you when using dots to represent vertices and a large size is desired. The value of this variable only has effect when UseVertexDots is set to true. This variable contains the corresponding value set in the Viewports page of Customize > Preferences.

preferences.useTransformGizmos

Lets you get and set whether to use the Transform Gizmos. A Boolean value - true if on, false if off. This variable contains the corresponding value set in the Viewports page of Customize > Preferences.

preferences.useVertexDots

Lets you get and set whether to represent vertices as dots. A Boolean value set to true when you want to use dots as the representation of the vertices in a mesh. If set to false, ticks will be used. This variable contains the corresponding value set in the Viewports page of Customize > Preferences.


Vertex_Paint_Floater : ReferenceTarget

The VertexPaintTool Primitive provides access to the Vertex Paint Floater used by the VertexPaint Modifier . It returns a Vertex_Paint_Floater ReferenceTarget with the following properties:

Properties:

.curPaintMode (Current_Paint_Mode) : integer

Get/Set the current paint mode.

.mapDisplayChannel (Map_Channel) : integer

Get/Set the current map channel.

.brushOpacity (Paint_Strength) : float

Get/Set the brush opacity.

.brushSize (Paint_Strength) : float

Get/Set the brush size.

.paintColor (Paint_Color) : RGB color

Get/Set the brush color.

.blurStrength (Blur_Strength) : float

Get/Set the brush strength.

.windowPosX (Window_Pos_X) : integer

Get/Set the horizontal position of the Vertex Paint Floater relatively to the upper left corner of the Windows desktop.

.windowPosY (Window_Pos_Y) : integer

Get/Set the vertical position of the Vertex Paint Floater relatively to the upper left corner of the Windows desktop.

.MapDisplayChannelLock : boolean

When set to true, the channel will be locked.

When the lock is enabled, the user cannot manually change the display channel in the floater. Instead, it will always reflect the paint channel of the active VertexPaint modifier, if any.

.KeepToolboxOpen : boolean

When set to true, the vertex paint floater will remain open after the modifier is closed. The default is false

.HideUnselSubobjs : boolean

When set to true, only the selected subobjects are drawn in the viewport, when false, selected and unselected subobjects are both drawn, in different colors. The default is false

.MirrorMode : boolean

Turns the PainterInterface mirror mode on and off

.MirrorModeAxis : integer

Determines the mirror axis. Possible values are:

0 - X

1 - Y

2 - Z

EXAMPLE

v = VertexPaintTool()

ReferenceTarget:Vertex_Paint_Floater

v.brushOpacity = 50

50

See also

VertexPaint : Modifier

Interface: AssignVertexColors


3ds Max File Loading and Saving

The following methods are used to load, save, merge, import, and export 3ds Max scenes.

<boolean>loadMaxFile <filename_string> [useFileUnits:<bool>] [quiet:<bool>]

Returns true if the file was found and loaded successfully.

If useFileUnits:false, the file objects will be rescaled to the current System's unit scale. If true, the System's unit scale will be changed to the File's unit scale. This option will apply regardless of the Respect System Units in Files option setting in the System Units Setup dialog. Loading a file with useFileUnits:true will not change the system units setting in the 3dsmax.ini file. useFileUnits defaults to false for 3ds Max, true for Autodesk VIZ.

For details on the quiet: option, please see Quiet Mode

<boolean>mergeMAXFile <filename_string> [<name_array>] [#prompt] \

[ [ #select ] #noRedraw ] \

[ #deleteOldDups | #mergeDups | #skipDups | #promptDups ] \

[ #promptMtlDups | #useMergedMtlDups | #useSceneMtlDups | #renameMtlDups ]\

[ #promptReparent | #alwaysReparent | #neverReparent ] \

[ quiet:<bool> ] \
missingExtFilesAction: <actions> missingExtFilesList: <&variable> \
missingXRefsAction: <actions> missingXRefsList: <&variable>

All arguments are optional except the initial file name. The flag arguments can be specified in any order. The arguments details are as follows:

<name_array>

An optional array of names or strings identifying the objects in the source scene file to be merged; all objects are merged if not specified.

#prompt

If specified causes the standard merge dialog to be opened.

#select

If specified causes the newly merged objects to be selected when merged.

#noRedraw

If specified causes the screen redraw to be delayed in case you want to call mergeMAXFile several times and delay the redraw until after the last file merge.

#deleteOldDups

Deletes existing scene objects with the same names as incoming objects, equivalent to a replace.

#mergeDups

Ignore name conflicts, merge anyway resulting in possibly duplicated names.

#skipDups

Don't merge objects with duplicated names.

#promptDups

Throw up the duplicates resolution dialog for the user to choose.

#promptMtlDups

Default, prompt the user when duplicated materials are found.

#useMergedMtlDups

Merge using the incoming materials.

#useSceneMtlDups

Merge using the scene materials.

#renameMtlDups

Merge and rename duplicated incoming materials.

#promptReparent

Default, prompt the user.

#alwaysReparent

Don't ask the user, always reparent.

#neverReparent

Don't ask the user, never reparent.

For details on the quiet: option, please see Quiet Mode

mergeMAXFile returns true if the file was found and loaded successfully. Returns false when the argument is a file with .DRF extension.

If you don't specify a full path name, the file is looked for in the 3ds Max scene directory, then in the 3ds Max executable directory, and then in the PATH environment directories.

getMAXSaveFileName filename: <seed_filename_string>

Displays standard 3ds Max file save dialog, returns file name or value 'undefined' if canceled.

getMAXOpenFileName filename: <seed_filename_string> dir:<seed_directory_string>

Displays standard 3ds Max file open dialog, returns file name or value 'undefined' if canceled.

getMAXFileObjectNames <max_filename_string> [ quiet:<bool> ]

Returns an array of strings, one for each of the names of the objects in the given 3ds Max file. This provides a way to get a preview list of the objects in another scene file (by name) to set up user selection of the objects to be merged under script control using the mergeMAXFile() function,

FOR EXAMPLE.

p=[1000,1000,1000]

for i = 1 to 5 do box pos:(random p -p) -- create some boxes

savemaxfile "mergetest.max" -- save to file

for obj in objects do obj.name = "_"+obj.name -- rename the boxes

objects.pos += [0,-1000,0] -- move them off to the side

fobj_names = getmaxfileobjectnames "mergetest.max" -- get the object names from the file

deleteitem fobj_names 3 -- delete the third name from the array

mergemaxfile "mergetest.max" fobj_names #select -- merge in the objects and select them

selection.count -- should be 4

objects.count -- should be 9

getMAXFileObjectNames returns an empty array when the argument is a file with .DRF extension.

For details on the quiet: option, please see Quiet Mode

getMAXFileObjectNames in 3ds Max 7 and higher returns an array of string values, rather than the array of name values in previous 3ds Max versions. The object names used by mergeMaxFile are case sensitive, and name values are not guaranteed to maintain the case of the string they wrap.

<bool>saveMaxFile <filename_string> [clearNeedSaveFlag:<bool>] [useNewFile:<bool>] [quiet:<bool>]

Saves the scene to the current 3ds Max scene directory if there is no explicit directory path on the supplied file name. If no filename extension is specified, ".max" is automatically appended to the filename.

WARNING!

saveMaxFile() will overwrite existing files with the same name without warning!

See CheckForSave() and doesFileExist() further on this page!

The optional keywords are true by default to match the existing behavior prior to 3ds Max 6.

If clearNeedSaveFlag is set to false, the file is saved, but the need save flag will not be cleared and 3ds Max will still consider the scene as changed and requiring saving.

If useNewFile is false, the saved file is not set as the current scene file and the file is not put in the Most Recently Used list. This lets you save a backup file of the scene to a different name without the name becoming the current one or appearing on the list of recent files.

For details on the quiet: option which was added to this method in 3ds Max 8, please see Quiet Mode

The method will return true on success or false if the saving failed (for example if attempting to overwrite an existing read-only file) in 3ds Max 8 and higher.

holdMaxFile()

Equivalent to the 3ds Max Edit > Hold operation.

fetchMaxFile [quiet:<boolean>]

Equivalent to the 3ds Max Edit > Fetch operation. For details on the quiet: option, please see Quiet Mode

<bool>isMaxFile <filename_string>

Returns true if the specified file is a MAX file. This method tests the internal structure of the file to see if it is consistent with a MAX file. Returns false if the file is not a MAX file or if the specified file does not exist.

EXAMPLES:

isMaxFile "$scenes/ca_test1.max" --returns true if file exists

isMaxFile "$max/autoback/maxhold.mx" --returns true if file exists

isMaxFile "$matlibs/Nature.mat" --returns true if file exists

isMaxFile (maxFilePath + maxFileName) --returns true unless the scene is Untitled

importFile <filename_string> [ #noPrompt ] [ using:<maxclass> ]

Lets you import files using any of the import plug-ins that are available. The kind of file imported is determined by the file name suffix such as DFX for .dxf, 3DS DOS for .3ds, etc.

The #noPrompt flag prevents any configuration or control dialogs from being displayed in which case the default configuration is used.

If the optional keyword argument using: is supplied, the respective I/O class will be used to perform the import. This can be useful when multiple plug-ins support the same file format extension. Available in 3ds Max 8 and higher.

To see all available importer plug-in classes, you can access the .classes property of the importerPlugin value - it returns an array of all installed importer plug-ins:

EXAMPLES:

print importerPlugin.classes

RESULT:

3D_Studio

3D_Studio_Shape

Adobe_Illustrator_Shape

AutoCADImport

FBXIMP

STL_Import

FileLinkAsDwgImporter

mental_ray_Import

IGES_Import

Wavefront_Object

VrmlImp

ImportTRC

Lightscape_Importer

XMLImp2

ImportHTR

InventorImport

LandXML___DEM_Model_Import

Wavefront_Material

exportFile <filename_string> [ #noPrompt ] [ selectedOnly:<boolean> ] [ using:<maxclass> ]

Lets you export files using any of the export plug-ins that are available. The kind of file exported is determined by the file name suffix such as DFX for .dxf, 3DS DOS for .3ds, etc.

The #noPrompt flag prevents any configuration or control dialogs from being displayed in which case the default configuration is used.

If the selectedOnly keyword parameter is set to true, only selected nodes are exported. Defaults to false.

If the optional keyword argument using: is supplied, the respective I/O class will be used to perform the export. This can be useful when multiple plug-ins support the same file format extension. Available in 3ds Max 8 and higher.

To get an array of all available exporter plug-in classes, you can access the .classes property of the exporterPlugin value:

FOR EXAMPLE,

theClasses = exporterPlugin.classes

exportFile (GetDir #scene + "/exportTest" ) using:theClasses[1]

In the example above, the export will use the first plug-in found in the array, which is by default the 3D_StudioExporterPlugin.

<bool>saveNodes <node_collection> <filename_string> [quiet:<bool>]

Creates a new .max scene file with the given name and stores the node collection to it. The <node_collection> argument can be a single node, an array of nodes you gathered, a wild-card path name, one of the built-in objects sets such as selection or lights, or a <node>.children array. If no filename extension is specified, ".max" is automatically appended to the filename.

For details on the quiet: option which was added to this method in 3ds Max 8, please see Quiet Mode

The method will return true on success or false if the saving failed (for example if attempting to overwrite an existing read-only file) in 3ds Max 8 and higher.

WARNING!

saveMaxFile() will overwrite existing files with the same name without warning!

See CheckForSave() and doesFileExist() below for solution.

checkForSave()

If the scene has been modified since the last file save (if any), calling this function displays the message box prompting the user that the scene has been modified and requests to save. Function returns false if the user cancels out of the save, true otherwise. See also Exiting and Resetting 3ds Max

WARNING!

saveNodes and saveMaxFile will overwrite existing files with the same name without warning!

FOR EXAMPLE

b = box()

saveNodes b "foo.max"

saveNodes b "foo.max"

saveMaxFile "foo.max"

You should always use doesFileExist() to make sure the target file does not exist and prompt if it does. Here are two examples of using doesFileExist() for these cases:

SCRIPT:

b = box()

-- if filename exists, ask user if ok to overwrite

-- function returns true if file was saved, false otherwise

fn maybe_saveNodes nodeArray filename =

(

if getFilenamePath filename == "" do

filename = getdir #scene + "\\" + filename

if (not (doesfileexist filename)) or

querybox ("filename: "+filename + "\nexists. Overwrite?") then

(

saveNodes nodeArray filename

true

)

else

false

)

SCRIPT:

fn maybe_saveMaxFile filename =

(

if getFilenamePath filename == "" do

filename = getdir #scene + "\\" + filename

if (not (doesfileexist filename)) or

querybox ("filename: "+filename + "\nexists. Overwrite?") then

(

saveMaxFile filename

true

)

else

false

)

USING THE ABOVE FUNCTIONS:

maybe_saveNodes b "foo.max"

maybe_saveNodes b "foo.max"

maybe_saveMaxFile "foo.max"

See also

External File Methods

File Name Parsing

Standard Open and Save File Dialogs

Exiting and Resetting 3ds Max


Controlling the Auto-Backup

In versions of 3ds Max prior to 3ds Max 9, the Auto-Backup feature would continue saving even if the scene was untouched. Over a long period of time it was possible for the user to return to their computer and have all their autobackup files completely overwritten with the 'latest' scene. This has been fixed in 3ds Max 9 and higher by respecting the scene's dirty flag (scene needs saving). If the scene has not been changed, no backup will be performed.

In addition, the timer will now be reset AFTER the Auto-Backup has completed, giving the user exactly the number of minutes specified as the Auto-Backup Interval to work on the scene before the next saving occurs.

Using the Autosave Core Interface , you can also change the name of the Auto-Backup files to avoid multiple sessions of 3ds Max from overwriting their backup files.

See also

Interface: autosave


3ds Max Scene File Properties

The File Properties can be accessed in MAXScript using the methods described in this topic. The File Properties are organized into three sets. These sets correspond to the three pages in the Main Menu > File > File Properties dialog:

#summary

This set contains the Title, Subject, Author, Keywords, Comments fields from the Summary page.

#contents

This set contains the Manager, Company, Category and an array of all headers from the Contents page like General, Mesh Totals etc. Note that the Contents page contents are only update when the file is saved. You can perform a max hold to perform a scene hold, which causes the file to be saved and the Contents page contents to be updated.

#custom

This set contains all the fields from the Custom page.

The following methods are used to access the above sets. <set_name> can be any of the values from above.

fileProperties.getNumProperties <set_name>

Returns the number of properties in the given set.

FOR EXAMPLE:

numProps=fileProperties.getNumProperties #summary

fileProperties.getPropertyName <set_name> <index>

Returns as a string the property name of the given index. The index is 1-based.

FOR EXAMPLE:

nameProp=fileProperties.getPropertyName #summary 1

fileProperties.getPropertyValue <set_name> <index>

Returns the property value of given index. The value type can be one of the following four types of values currently supported by 3ds Max in the File Properties dialog. The values in bracket are the MAXScript equivalent value type.

Property Value Types:

Text [String]

Date [String] - contains the date eg:"03/23/99"

Number [Integer or Float based on actual value]

Yes or No [Boolean]

Headers [Array of strings]

Headers are items like General, Mesh Totals, etc. that appear in contents page.

FOR EXAMPLE:

an array of headers from contents page obtained using:

fileproperties.getPropertyValue #contents 1

will return

#("General", "Mesh Totals",...)

fileProperties.getItems <header_string>

Returns an array of strings containing all the items under the given header.

FOR EXAMPLE:

an array of headers from contents page obtained using:

fileProperties.getItems "Mesh Totals"

might return

#("Vertices: 488", "Faces: 968")

fileProperties.findProperty <set_name> <prop_name_string>

Given the set name and property name string, will return the index of the property if found, 0 if not found.

FOR EXAMPLE:

fileProperties.findProperty #custom "BoolVal"

fileProperties.addProperty <set_name> <prop_name_string> \
 <prop_value> [#date]

Adds a new property with the property name and property value to the specified set. The property values can be any of the types previously described except an Array as you cannot add anything to contents page.

If string containing a date is passed then the optional #date argument has to be passed for it to be added as a date value.

FOR EXAMPLE:

fileProperties.addProperty #custom "DateVal" "03/23/99" #date

will add a date property named DateVa l to the custom page.

fileProperties.deleteProperty <set_name> <prop_name_string>

Delete the property indicated by <prop_name_string> in the specified set.

Following is an example of printing all the File Properties in an hierarchial fashion for the current scene.

EXAMPLE:

-- Add some properties

fileProperties.addProperty #summary "Title" "Title val"

fileProperties.addProperty #custom "IntVal" 30

fileProperties.addProperty #custom "FloatVal" 30.034

fileProperties.addProperty #custom "BoolVal" true

fileProperties.addProperty #custom "DateVal" "03/23/99" #date

--

-- Perform a scene hold to update the Contents set.

max hold

--

-- Get all properties

pages = #(#summary, #contents, #custom)

for pg in pages do

(

format "--- % ---\n" (pg as string)

for i=1 to (fileProperties.getNumProperties pg) do

(

local pname = (fileProperties.getPropertyName pg i)

local pval = (fileProperties.getPropertyValue pg i)

format "\t% : " pname

if (pname == "Headers") then

(

format "\n"

for hdr in pval do

(

format "\t\t%\n" hdr

local docs = fileProperties.getItems hdr

if docs != undefined then

for d in docs do format "\t\t\t%\n" d

)

)

else format " %\n" pval

)

)


XRef Files

See XRefObject and XRefScene for information on XRef Object and XRef Scene files.


Bitmap Files

The following method is used to collect a list of the bitmap files used in a scene. For the properties and methods associated with bitmap values, including reading and writing bitmap files, see Bitmap Values .

enumerateFiles [ <maxwrapper_obj> ] <function> [ <arg> ] \

[ #inactive ] [ #videoPost ] [ #render ] [ #missing ] \

[ #localOnly ] [ #skipCustAttributes ] [ #skipVPRender ] \
[ #firstSubOnly ]

Lets you run through all the bitmap files currently used in the scene or in an individual object. You can filter this so it just gives you those for video post or the renderer or the ones that are inactive or missing.

The enumerator works by calling a function you give it once for each of the file names it finds corresponding to the filters switches and other arguments you set.

The only required argument is the <function> argument. The details are:

<maxwrapper_obj>

An optional 3ds Max object, such as a node or a material. Supplying this argument causes the enumerator to only consider files associated with this object. See the #localOnly switch for more info.

<function>

The function to be called for each file found. It should be a function of one or two arguments, the first one is the string file name supplied by the enumerator. See example below.

<arg>

If specified is passed to the <function> as its second argument by the enumerator. This is useful if you have a general purpose enumerator function that can be conditioned by the argument you pass in on a particular enumeration, or if you want to pass in an array that the found names should be appended to.

#inactive

Include the inactive files.

#videoPost

Include the files used in video post.

#render

Include the files used during rendering.

#missing

Include files that are missing in the file system

If you don't specify any of the above filter flags, all the files are enumerated.

#localOnly

Use in conjunction with the <maxwrapper_obj> argument. If specified, limits the enumeration to those files used directly in the object, if not then any referenced objects are scanned.

#skipCustAttributes

Don't enumerate into custom attributes

#skipVPRender

Don't include viewport rendering only required files

#firstSubOnly

Check only first file in an .ifl

FOR EXAMPLE:

function get_names name a = append a name

files = #()

enumerateFiles get_names files #missing

The following script will print out a sorted list of all the bitmap files used in the current scene file:

EXAMPLE:

(

local mapfiles=#()

fn addmap mapfile =

(

local mapfileN=mapfile as name

local index=finditem mapfiles mapfileN

if index == 0 do append mapfiles mapfileN

)

enumeratefiles addmap --line 9

sort mapfiles

for mapfile in mapfiles do print (mapfile as string)

)

By replacing line 9 with

enumeratefiles addmap #missing

only the missing bitmap files will be printed.

See also

External File Methods

File Name Parsing

Standard Open and Save File Dialogs


Custom User Interface Files

The following methods provide access to Custom User Interface (CUI) files. The CUI functions are in a structure package named cui.

cui.getDir()

Returns the directory of the currently active CUI file as a string.

cui.getConfigFile()

Returns the currently active CUI file name as a string.

cui.setConfigFile <filename_string>

Sets the currently active CUI file to the specified file name.

cui.saveConfig()

Saves the current CUI configuration data to the active .cui file

cui.saveConfigAs <filename_string>

Saves current CUI configuration data to the specified file. The specified file is made the current CUI file.

cui.loadConfig <filename_string>

Loads the CUI configuration data from supplied file. The specified file is made the current CUI file.

NOTE:

The Customize/Load Custom UI Scheme menu item is implemented as a macroScript. This macroScript is called macro_uischeme.mcr in the \ui\macroscripts directory. cui.loadConfig is only part of what needs to be done to switch over to a new UI scheme. The aforementioned macroScript will guide you through the other actions that also need to be performed.


3ds Max System Directories

The following methods allow you to access the 3ds Max system directories:

GetDir <filetype_name>

Returns as a string the directory specified in the Customize > Configure Paths dialog for the specified file type. The valid <filetype_name> values are:

#animations    -- available in 3ds Max 9 and higher

#archives     -- available in 3ds Max 9 and higher

#autoback

#defaults

#downloads     -- available in 3ds Max 9 and higher

#drivers

#export

#expression

#font

#help

#image

#import

#matlib

#maxData     -- available in 3ds Max 9 and higher

#maxroot

#maxstart

#Photometric    -- available in 3ds Max 9 and higher

#plugcfg

#preview

#proxies     -- available in 3ds Max 9 and higher

#renderassets    -- available in 3ds Max 9 and higher

#renderPresets   -- available in 3ds Max 9 and higher

#renderoutput    -- available in 3ds Max 9 and higher

#scene

#scripts

#sound

#startupScripts

#temp      -- available in 3ds Max 9 and higher

#ui

#userMacros    -- available in 3ds Max 9 and higher

#userScripts    -- available in 3ds Max 9 and higher

#userStartupScripts  -- available in 3ds Max 9 and higher

#userIcons     -- available in 3ds Max 9 and higher

#vpost

SetDir <filetype_name> <string>

Sets the directory specified in string. Replicated in the Customize > Configure Paths dialog for the specified file type.

The valid <filetype_name> values are the same as for GetDir.

Returns true if successful, false if not. Does not check to see if <string> is a valid path. Any change made through this function is immediately reflected in the 3dsmax.ini file and so is persistent. Use with caution.

ConvertDirIDToInt <filetype_name>

In 3ds Max 9 and higher, returns an Integer corresponding to the given system directory name:

Int | Name | Int | Name | Int | Name
0 | #font | 12 | #drivers | 24 | #Photometric
1 | #Scene | 13 | #autoback | 25 | #renderassets
2 | #import | 14 | #matlib | 26 | #userScripts
3 | #export | 15 | #scripts | 27 | #userMacros
4 | #help | 16 | #startupScripts | 28 | #userStartupScripts
5 | #expression | 17 | #defaults | 29 | #temp
6 | #preview | 18 | #renderPresets | 30 | #userIcons
7 | #image | 19 | #ui | 31 | #maxData
8 | #Sound | 20 | #maxroot | 32 |
9 | #plugcfg | 21 | #renderoutput | 33 | #downloads
10 | #maxstart | 22 | #animations | 34 | #proxies
11 | #vpost | 23 | #archives |  |

The following methods let you get, add or delete Bitmap and XRef paths, corresponding to the Bitmaps and XRefs tabs in the Configure Paths dialog in 3ds Max. Any changes made through these functions are immediately reflected in the 3dsmax.ini file and so are persistent.

Map Path Methods:

mapPaths.add <path_string>

Appends the specified path to the list of Bitmap search paths.

mapPaths.count()

Returns the number of Bitmap search paths defined.

mapPaths.get <index>

Returns the indexed Bitmap search path as a string. The index is 1-based.

mapPaths.delete() <index>

Deletes the indexed Bitmap search path. The index is 1-based.

mapPaths.getFullFilePath <filename>

Resolves the filename using map paths, returns fully qualified filename if the file is found. Available in 3ds Max 9 and higher.

FOR EXAMPLE:

mapPaths.getFullFilePath "fir.tga"

Xref Path Methods:

xrefPaths.add <path_string>

Appends the specified path to the list of XRef search paths.

xrefPaths.count()

Returns the number of XRef search paths defined.

xrefPaths.get <index>

Returns the indexed XRef search path as a string. The index is 1-based.

xrefPaths.delete <index>

Deletes the indexed XRef search path. The index is 1-based.

xrefPaths.getFullFilePath <filename>

Resolves the filename using xref paths, returns fully qualified filename if the file is found. Available in 3ds Max 9 and higher.

FOR EXAMPLE:

xrefPaths.getFullFilePath "delme.max"

See also

pathConfig Struct

pluginPaths Struct


Symbolic Pathnames

You can use symbolic pathnames in the form $<name> anywhere a filename can be supplied to MAXScript. This support has been added in 3ds Max 4 and largely enhanced in 3ds Max 9. Any filename you provide to MAXScript can begin with a '$' followed by one of the symbolic directory names below.

The following symbolic names are recognized:

Index | Symbolic Name | Directory
1 | $max | Main 3ds Max executable directory
2 | $maps | First directory in Maps directory config*
3 | $scenes | 3ds Max Scenes directory
4 | $fonts | Fonts directory
5 | $imports | File Imports directory
6 | $exports | File Exports directory
7 | $sounds | Sounds directory
8 | $matlibs | Material Libraries directory
9 | $scripts | Scripts directory
10 | $startupScripts | Auto-load startup scripts directory
11 | $plugins | First in the Plug-ins directory config*
12 | $plugcfg | Plugin configurations directory
13 | $images | Images directory
14 | $ui | User Interface files directory
15 | $macroScripts | macroScripts in UI directory
16 | $web | Web downloads directory
17 | $temp | System temp directory
18 | $renderPresets | Render presets directory
19 | $help | Help files directory
20 | $expressions | Expressions directory
21 | $previews | Previews directory
22 | $maxstart | Directory of MAXSTART.MAX
23 | $vpost | Video post directory
24 | $drivers | Drivers directory
25 | $autoback | Auto-backup directory
26 | $marketDefaults | Market Defaults directory
27 | $icons | Icons directory
28 | $maxSysIcons | System icons directory
29 | $renderOutput | Render output directory
30 | $animation | Animations directory
31 | $archives | Archives directory
32 | $photometrics | Photometric files directory
33 | $renderAssets | Render Assets directory
34 | $userScripts | User Scripts directory
35 | $userMacros | User Macroscripts directory
36 | $userStartupScripts | User Startup Scripts directory
37 | $userIcons | User Icons directory
38 | $maxData | Max Data (Root) directory
39 | $downloads | Downloads directory
40 | $proxies | Bitmap Proxies directory

Please note that these are similar to the 3D Studio MAX System Directories filetype_names which start with a "#" and are used as arguments to the GetDir() and SetDir() methods.

The following example will open the file "foo.ms" in the current 3ds Max Scripts directory.

EXAMPLE

fileIn "$scripts\foo.ms"

In 3ds Max 9 and higher, the $maps and $plugins symbolic pathnames can also specify an index. In this case, the indexed directory will be used.

EXAMPLE

"$maps[2]\\mybitmap.tga"

When no index is provided, the first map resp. plugins path will be used.

SymbolicPaths Struct

In 3ds Max 9 and higher, the SymbolicPaths struct provides methods to access existing and define new symbolic paths:

symbolicPaths.numPaths()

Returns the number of symbolic path names. This includes both system and user-defined path names

symbolicPaths.getPathName <index>

Returns the indexed symbolic path name.

EXAMPLE

for i = 1 to symbolicPaths.numPaths() do

format "% : %\n" i (symbolicPaths.getPathName i)

symbolicPaths.isPathName <string>

Returns true if the string corresponds to a symbolic path name, false otherwise.

EXAMPLE

symbolicPaths.isPathName "$maps"

true

symbolicPaths.isPathName "$map"

false

symbolicPaths.getPathValue {<index> | <string>}

Returns the path associated with the specified symbolic path name (specified either by index or by name string).

EXAMPLE

symbolicPaths.getPathValue 2

"C:\Program Files\Autodesk\3dsmax9\maps"

symbolicPaths.getPathValue "$maps"

"C:\Program Files\Autodesk\3dsmax9\maps"

symbolicPaths.numUserPaths()

Returns the number of user-defined symbolic path names.

symbolicPaths.getUserPathName <index>

Returns the indexed user-defined symbolic path name.

symbolicPaths.isUserPathName <string>

Returns true if the string corresponds to a user-defined symbolic path name, false otherwise.

symbolicPaths.getUserPathValue {<index> | <string>}

Returns the path associated with the specified user-defined symbolic path name

symbolicPaths.setUserPathValue {<index> | <string>} <filepath>

Sets path associated with the specified user-defined symbolic path name

symbolicPaths.addUserPath <string> <filepath>

Adds user-defined symbolic path name and path

symbolicPaths.removeUserPath {<index> | <string>}

Removes user-defined symbolic path name

symbolicPaths.expandFileName <filename>

Returns expanded file nane

EXAMPLE

symbolicPaths.numUserPaths()--check for user path - none by default

0

symbolicPaths.addUserPath "$test" "c:\\test" --define new user path

OK

symbolicPaths.numUserPaths()--check for user path - there is one!

1

symbolicPaths.isUserPathName "$test" -- is a user symbolic path?

true

--See if $temp is a user symbolic path.

--NOTE that $temp is a SYSTEM symbolic path,

--but not a USER symbolic path:

symbolicPaths.isUserPathName "$temp"

false

symbolicPaths.getUserPathName 1 --get the name of the first path

"$test"

symbolicPaths.getUserPathValue 1 --get the first path

"c:\test"

symbolicPaths.getUserPathValue "$test" --get the path by name

"c:\test"

symbolicPaths.setUserPathValue "$test" "c:\\another\\path" --change

OK

symbolicPaths.getUserPathValue "$test" --see if it changeg?

"c:\another\path"

symbolicPaths.expandFileName "$test\\somefile.txt" --expand a path

"c:\another\path\somefile.txt"

symbolicPaths.removeUserPath "$test" --remove the user path

OK

symbolicPaths.numUserPaths()--there are no user paths left

0

See also

Zip-file Script Packages

3ds Max System Directories


PathConfig Struct

The PathConfig struct provides methods to access and manage Project paths, System paths, manipulate paths and convert between UNC, absolute and relative paths and so on.

Available in 3ds Max 9 and higher.

Project Folder

pathConfig.doProjectSetupSteps()

Performs all steps necessary to set up a new Project, including browsing for project folder and creating all sub-folders. Returns true on success, false if cancelled.

pathConfig.doProjectSetupStepsUsingDirectory <ProjectPath>

Performs all steps necessary to set up a new Project using the supplied Project Path as the Root. Returns true on success, false if cancelled.

pathConfig.getCurrentProjectFolder()

Returns the current Project Folder.

pathConfig.getCurrentProjectFolderPath()

Returns the current Project Folder definition file (*.MXP).

pathConfig.getProjectFolderPath <ProjectPath>

Returns the Project Definition filename (<ProjectPath>\<ProjectName>.mxp) for the specified Project Folder.

pathConfig.getProjectSubDirectory <subdir_index>

Returns the indexed Project sub-directory.

FOR EXAMPLE,

--Print all Project Sub-Directories:

for i = 1 to pathConfig.getProjectSubDirectoryCount() do

format "%: %\n" i (pathConfig.getProjectSubDirectory i)

pathConfig.getProjectSubDirectoryCount()

Returns the number of Project sub-directories. See above example.

pathConfig.addProjectDirectoryCreateFilter <#directory_type>

Adds Project Directory Filter where directory_type is one of the following:

#font | #Scene | #export | #import | #help | #expression | #preview | #image | #Sound | #plugcfg | #maxstart | #vpost | #drivers | #autoback | #matlib | #scripts | #startupScripts | #defaults | #renderPresets | #ui | #maxroot | #renderoutput | #animations | #archives | #Photometric | #renderassets | #userScripts | #userMacros | #userStartupScripts | #temp | #userIcons | #maxData | #downloads | #proxies

pathConfig.removeAllProjectDirectoryCreateFilters()

Removes all filters added using pathConfig.addProjectDirectoryCreateFilter()

pathConfig.setCurrentProjectFolder <ProjectPath>

Sets the current project folder to the given path. The Project Folder is displayed in the title bar of 3ds Max and will be updated instantly.

Path Manipulation, Conversion and Resolving

pathConfig.appendPath <path1> <path2>

Appends the second argument filename to the first argument path, adding backslash if necessary.

FOR EXAMPLE,

pathConfig.appendPath "c:\\temp" "test.txt"

"c:\temp\test.txt"

pathConfig.appendPath "c:\\temp\\" "test"

"c:\temp\test"

pathConfig.convertPathToAbsolute <relative_path>

Converts the relative path argument to absolute project path using the Project Directory.

FOR EXAMPLE,

pathConfig.convertPathToAbsolute "meshes"

"C:\Documents and Settings\username\My Documents\3dsmax\meshes"

pathConfig.convertPathToLowerCase <path>

Converts the path argument to lower case and unifies the backslashes.

FOR EXAMPLE,

pathConfig.convertPathToLowerCase "C:\\Temp\Test/pATH"

"c:\temp\test\path"

pathConfig.convertPathToRelativeTo <path1> <path2>

Converts the first path argument to a relative path with respect to the second path argument.

FOR EXAMPLE,

pathConfig.convertPathToRelativeTo "C:\\Temp\\Test" "c:\\Program Files\\"

"..\Temp\Test"

pathConfig.convertPathToUnc <path>

Returns the UNC path from a mapped drive path.

FOR EXAMPLE,

--If drive letter T: is mapped to a server called MyServer, then

pathConfig.convertPathToUnc "t:\\project"

"\\MyServer\projects"

mapPaths.getFullFilePath <filename>

Resolves the filename using map paths, returns fully qualified filename if the file is found.

pathConfig.normalizePath <path>

Returns a normalized path name.

FOR EXAMPLE,

pathConfig.normalizePath "scenes/test.txt"

".\scenes\test.txt"

pathConfig.pathsResolveEquivalent <path1> <path2>

Returns true if the two paths resolve to the same location (in other words the two paths are equivalent), false if they are not equivalent.

FOR EXAMPLE,

pathConfig.pathsResolveEquivalent "scenes\\test.txt" "./scenes/test.txt"

true

pathConfig.resolvePathSymbols <path>

Resolves the path symbols.

pathConfig.resolveUNC SystemGlobal:resolveUNC false

This is the property toggle found in Preferences>Files which controls whether max automatically converts absolute paths to their UNC equivalents. (i.e. M:\file.txt to server1\\file.txt if M: is mapped to server1\\)

pathConfig.removePathLeaf <path>

Removes a leaf from the given path.

FOR EXAMPLE,

pathConfig.removePathLeaf "c:\\temp\\test"

"c:\temp"

pathConfig.removePathTopParent <path>

Removes the top parent from the given path.

FOR EXAMPLE,

pathConfig.removePathLeaf "c:\\temp\\test"

"temp\test"

pathConfig.stripPathToLeaf <path_or_filename>

Returns the last sub-directory name from the given path. If the path is a full file name, returns the file name. Equivalent to filenamefrompath.

EXAMPLES:

pathConfig.stripPathToLeaf "C:\\temp\\test"

"test"

pathConfig.stripPathToLeaf "C:\\temp\\test\\"

""

pathConfig.stripPathToLeaf "C:\\temp\\test\\somefile.tga"

"somefile.tga"

--COMPARE:

filenamefrompath "C:\\temp\\test"

"test"

filenamefrompath "C:\\temp\\test\\"

""

filenamefrompath "C:\\temp\\test\\somefile.tga"

"somefile.tga"

pathConfig.stripPathToTopParent

Returns the root of the given path.

EXAMPLES:

pathConfig.stripPathToTopParent "C:\\temp\\test\\test.tga"

"C:\"

pathConfig.stripPathToTopParent "\\\\SomeServer\\Projects\\Test"

"\\SomeServer"

Is... Query Methods

pathConfig.isAbsolutePath <path_string>

Returns true if the argument is an absolute path, false if it is a relative path. The path does not have to exist for this method to operate on it.

pathConfig.isLegalPath <path_string>

Returns true if the argument is a legal path definition, false if it is an illegal path. The path does not have to exist for this method to operate on it, it is only being parsed for correctness.

EXAMPLES:

pathConfig.isLegalPath "c:\\" --legal path, existing

true

pathConfig.isLegalPath "z:\\path" --legal path, not existing

true

pathConfig.isLegalPath "zz:\\path" --illegal double drive letter!

false

pathConfig.isPathRootedAtBackslash <path>

Returns true if the argument starts with a backslash, false if it does not.

EXAMPLES:

--starts with backslash:

pathConfig.isPathRootedAtBackslash "\\machine\\c$"

true

--does not start with backslash:

pathConfig.isPathRootedAtBackslash "c:\\temp"

false

pathConfig.isPathRootedAtDriveLetter <path>

Returns false if the argument starts with a backslash, true if it starts with a drive letter. The inverse of pathConfig.isPathRootedAtBackslash()

pathConfig.isProjectFolder <path>

Returns true if the argument path is a valid Project Folder root, false otherwise.

pathConfig.isRootPath <path>

Returns true if the argument path is a Root path, false otherwise

EXAMPLES:

pathConfig.isRootPath "C:\\"

true

pathConfig.isRootPath "C:\\temp"

false

pathConfig.isUncPath <path>

Returns true if the argument path is a UNC path, false otherwise

EXAMPLES:

pathConfig.isUncPath "T:\\Projects" --mapped drive, not UNC

false

pathConfig. isUncPath "\\\\MyServer\\Projects" --UNC path

true

pathConfig.isUncSharePath <path>

Returns true if the argument path is a UNC share path, false otherwise.

pathConfig.isUsingProfileDirectories()

Returns true if the system is using Profile directories, false otherwise.

pathConfig.isUsingRoamingProfiles()

Returns true if the system is using Roaming Profiles, false otherwise. When using roaming profiles on somebody else's machine, your profile is being accessed over the network from your own machine. This mode is not officially supported.

Other Path-Related Methods and Structs

pathConfig.GetDir <#directory_type>

Points at the GetDir() method documented here .

Returns the system directory where directory_type is one of the following:

#font | #Scene | #export | #import | #help | #expression | #preview | #image | #Sound | #plugcfg | #maxstart | #vpost | #drivers | #autoback | #matlib | #scripts | #startupScripts | #defaults | #renderPresets | #ui | #maxroot | #renderoutput | #animations | #archives | #Photometric | #renderassets | #userScripts | #userMacros | #userStartupScripts | #temp | #userIcons | #maxData | #downloads | #proxies

pathConfig.mapPaths #Struct:mapPaths

Points at the mapPaths struct definition.

EXAMPLE

--the two method calls are equivalent:

mapPaths.getFullFilePath "fir.tga"

pathConfig.mapPaths.getFullFilePath "fir.tga"

pathConfig.pluginPaths #Struct:pluginPaths

Points at the pluginPaths struct .

EXAMPLE

count = pathConfig.pluginPaths.count()

for j = 1 to count do

format " % : %\n" j (pathConfig.pluginPaths.get j)

pathConfig.sessionPaths #Struct:sessionPaths

Points at the sessionPaths struct .

pathConfig.SetDir

Points at the SetDir() method documented here .

pathConfig.xrefPaths #Struct:xrefPaths

Points at the XRefPath struct

EXAMPLE

--the two method calls are equivalent:

xrefPaths.getFullFilePath "delme.max"

pathConfig.xrefPaths.getFullFilePath "delme.max"

Configurate User Paths Dialog - Path Settings Loading, Saving and Merging

pathConfig.SaveTo <filename>

Saves the path configuration to the given filename. Returns true on success, false otherwise. Corresponds to the Save To... button in the Customize>Configure User Paths dialog.

pathConfig.load <filename>

Loads the path configuration from the specified path configuration file. Returns true on success, false otherwise. Corresponds to the Load button in the Customize>Configure User Paths dialog.

pathConfig.merge <filename>

Merges the settings from the given path configuration file. Returns true on success, false otherwise. Loads the path configuration from the specified path configuration file. Returns true on success, false otherwise. Corresponds to the Merge button in the Customize>Configure User Paths dialog.

See also

3ds Max System Directories


pluginPaths Struct

This struct provides methods to access the plugin paths defined in the plugin.ini file.

Available in 3ds Max 9 and higher.

pluginPaths.count()

Returns the number of plugin paths

pluginPaths.get <index>

Returns the indexed plugin path

EXAMPLE

count = pluginPaths.count()

for j = 1 to count do format " % : %\n" j (pluginPaths.get j)

See also

PathConfig Struct

3ds Max System Directories


SessionPaths Struct

Session paths are identical to bitmap/photometric paths and xref paths, except they are never saved when 3ds Max exits. The list of session paths is always empty when 3ds Max boots up. However, if session paths are configured before a file is loaded, then they will be used to search for resources in the file.

NOTE:

The session paths are NOT displayed in the Configure Paths dialog!

There are four functions available through the sessionPaths structure. In each function, the keyword #map can be replaced with #xref to specify an xref path. The two lists of session paths (bitmaps and xrefs) are maintained separately from each other.

<boolean>sessionPaths.add (#map|#xref) <String path>

Adds a new bitmap or xref session path. Returns true on success. Adding the same path more than once will result in a single path stored in the session paths.

<integer>sessionPaths.count (#map|#xref)

Returns the number of bitmap or xref session paths.

<string>sessionPaths.get (#map|#xref) <Integer index>

Returns the indexed bitmap or xref session path.

<boolean>sessionPaths.delete (#map|#xref) <Integer index>

Deletes the indexed bitmap or xref session path. Returns true on success.

EXAMPLE

sessionPaths.count #map --the number of session bitmap paths

0 --there are none at this point

sessionPaths.add #map "d:/maps" --add a bitmap session path

true --success!

sessionPaths.count #map --has the number of paths changed?

1 --of course it did!

sessionPaths.get #map 1 --get the first bitmap session path

"d:/maps" --what you put in, comes out...

sessionPaths.delete #map 1 --delete the first bitmap session path

true --dead you are!

sessionPaths.count #map --and the number of session paths is...

0 --none.

One suggested use for session paths is to create a "project" system of asset management. Each project has certain folders for bitmaps and xrefs. Before a user loads a file, they would first load the project settings, which would set up the appropriate session paths. Any files loaded as part of that project will automatically have access to the correct library of maps and xrefs. If a project is closed, the session paths would be deleted.

See also

3ds Max System Directories


MAXScript Source Filename Access

These methods allow a script to query the source file it has been run from and the position inside the source file:

<filename>getSourceFileName()

Returns the filename path of the source file the function has been called from.

Returns undefined if the call does not occur from a valid MAXScript file, for example if executed in the Listener.

Returns empty string or file path without a file name if called from an Untitled (not yet saved) file.

If the method has been called from inside a string evaluated using the execute() method, the result will still be the file the execute() has been called from.

Available in 3ds Max 9 and higher.

<filename>getThisScriptFilename()

Returns the filename associated with the calling script. Same as getSourceFileName(), added mainly for backwards compatibility with pre-Max 9 scripts using the Avguard extensions.

Available in 3ds Max 2008 and higher. Previously available in [ AVG ] Avguard Extensions.

<integerPtr>getSourceFileOffSet()

Returns the character position in the source script file, 'undefined' if not called from a source script file. The return value is IntegerPtr to ensure that the position would be valid even with files over 4GB.

Available in 3ds Max 9 and higher.


Standard Open and Save File Dialogs

The following methods display the standard 3ds Max file open, file save, or folder selection browser dialog:

getOpenFileName [ caption:<title> ] \

[ filename:<seed_filename_string> ] \

[ types:<description1>|<pattern1>|<description2>|<pattern2>|...| ] \

[ historyCategory:<string> ]

getSaveFileName [ caption:<title>] \

[ filename:<seed_filename_string> ] \

[ types:<description1>|<pattern1>|<description2>|<pattern2>|...| ] \

[ historyCategory:<string> ]

Both functions return a fully-specified file path name or undefined if the user cancels out.

When the optional keyword filename: is supplied, the string is used to define the path and file name of the file to be loaded or saved. The dialog automatically navigates to the specified path (if available on the disk/network), displays its content in the browsing area and suggests the file name in the "File name" field. If the path does not exist, the current path is used and only the file name is displayed as requested.

FOR EXAMPLE

f = getOpenFileName caption:"Open A Test File:" \

filename:"c:/test/test.txt"

--if the path exists, will result in something like:

The types: parameter lets you specify custom file types and suffixes for the file type drop-down list in the open and save dialogs. You supply a string for this argument that is formatted in a special way, as follows:

"<description1>|<pattern1>|<description2>|<pattern2>|...|"

In other words, a sequence of file type descriptions and file type patterns each separated by a '|' vertical bar and terminated by a '|' vertical bar.

FOR EXAMPLE

f = getOpenFileName \

types:"Data(*.dat)|*.dat|Excel(*.csv)|*.csv|All|*.*|"

Specifies three types in the file type drop-down list, the first reading "Data(*.dat)" and matching *.dat and the second reading "Excel(*.csv)" and matching *.csv and the third reading "All" and matching any file.

The getSaveFileName() function tests for the pre-existence of the file with the chosen file type suffix added.

NEW in 3ds Max 2008: The history dropdown list in the file load and save dialogs keeps track of previously selected files according to a specified history name.

If historyCategory: is not specified, the caption text is used if specifed, and if no caption is specified, the default category "MAXScriptFileOpenSave" is used instead.

FOR EXAMPLE

filename = getOpenFileName \

caption:"Render To Texture Object Presets Open" \

filename:(getDir #renderPresets + @"\") \

types:"Object Preset(*.rtp)|*.rtp" \

historyCategory:"RTTObjectPresets"

By using the same historyCategory: name for a pair of open and save dialogs, users will see a consistent history dropdown in the dialogs.

getSavePath [caption:<window_caption_string>] [initialDir:<pathname>]

This function displays a folder selection browser for the user to select a folder. Returns a string path name for the selected folder or the value undefined if the user presses Cancel in the folder browser.

If the initialDir: keyword argument is specified, the Browse For Folder dialog will be opened at the specified directory. Symbolic pathnames are acceptable as the pathname. Available in 3ds Max 8 and higher.

FOR EXAMPLE,

getSavePath caption:"my title" initialDir:"$scripts"

getSavePath caption:"my title" initialDir:(getDir #maxroot)

See also

Filestream Values

External File Methods

File Name Parsing


File Name Parsing

The following function can be used to parse file name paths and extract different parts like the path, the file name, the type (extension) etc.

filenameFromPath <filename_string>

Returns the file name and extension of a full file name, useful for labeling file buttons in rollout panels.

getFilenamePath <filename_string>

Returns the directory path part of a full file name.

getFilenameFile <filename_string>

Returns the file name part of a full file name.

getFilenameType <filename_string>

Returns the type extension part of a full file name.

doesFileExist <filename_string>

Returns true if the file exists, false otherwise.

pathIsNetworkPath <file_path>

NEW in 3ds Max 2008: [ AVG ] Returns true if the specified file path has a UNC network path signature (\\someslave\) and false if it has a local path signature (D:\) where D: is a drive letter.

The method does not test for the path's existence, it only checks the signature of the path to see if it is UNC or local.

See also pathConfig.isUncPath() in the PathConfig Struct topic.

EXAMPLES:

file="g:\\subdir1\\subdir2\\myImage.jpg"

filenameFromPath file -- returns: "myImage.jpg"

getFilenamePath file -- returns: "g:\subdir1\subdir2\"

getFilenameFile file -- returns: "myImage"

getFilenameType file -- returns: ".jpg"

pathIsNetworkPath "c:\\temp\\test.txt" --returns: false

pathIsNetworkPath "\\\\someserver\\temp\\test.txt" --returns: true

See also

Filestream Values

External File Methods

Standard Open and Save File Dialogs

PathConfig Struct

pluginPaths Struct


External File Methods

getFiles <wild_card_filename_string>

Returns an array of file names that match the given wild-card path name.

FOR EXAMPLE,

The following code gets an array of all the .max scene files in c:\foo and then loops over the array, opening each file and printing the objects in each:

files = getFiles "c:\\foo\\*.max"

for f in files do (loadMAXFile f; print objects)

getFiles() can also be used to determine if a file exists.

FOR EXAMPLE,

the following function will return true if the specified file name or pattern exists:

fn existFile fname = (getfiles fname).count != 0

getDirectories <wild_card_directory_name_string>

Returns an array of directory paths that match the given wild-card directory path name.

SCRIPT

fn getFilesRecursive root pattern =

(

dir_array = GetDirectories (root+"/*")

for d in dir_array do

join dir_array (GetDirectories (d+"/*"))

my_files = #()

for f in dir_array do

join my_files (getFiles (f + pattern))

my_files

)

--get all .ms files from the folder c:/temp

--and all its subfolders:

getFilesRecursive "c:/temp" "*.ms"

makeDir <directory_path_string> all:<boolean>

Creates a new directory with the given name. Returns true on success, false on failure (either because the path could not be created or because the path already existed).

If the optional all: keyword argument is set to true (default since 3ds Max 9, in 3ds Max 8 the default was false), all sub-directory levels specified in the path will be created if they do not exist.

deleteFile <filename_string>

Deletes the named file. Fails if the file is open in MAXScript. Returns true on success, false on failure.

renameFile <old_filename_string> <new_filename_string>

Renames the old file to the new file. This can also be used to move a file between directories. Fails if new file already exists or if the old file is open in MAXScript. Returns true on success, false on failure.

copyFile <existing_filename_string> <new_filename_string>

Copies the existing file to the new file. Fails if the new file already exists, the new file cannot be created, or the existing file is open in MAXScript. Returns true on success, false on failure.

getFileSize <filename_string>

Returns the size of the specified file in bytes. Returns 0 if the file could not be found.

getFileAttribute <filename_string> <attribute>

setFileAttribute <filename_string> <attribute> <boolean>

Get and set the attributes associated with a file. The get function returns true or false depending on the state of the specified attribute, the set function sets the state of the individual attribute specified (leaving other attributes as they were). The valid <attribute> values are:

#readOnly

#hidden

#system

#directory

#archive

#temporary

#normal

getFileModDate <filename_string>

Returns a String value containing the modification date for the specified file, for example "1/29/99 1:52:05 PM".

getFileCreateDate <filename_string>

Returns a String value containing the creation date for the specified file.

getFileVersion <filename_string>

Returns the file and product version for the specified file, or unknown if this data is not specified in the file. This data is typically specified only for executable and application extension (i.e., .dll) files.

EXAMPLE

GetFileVersion (getDir #maxRoot + "\\3dsmax.exe")

getMAXIniFile()

In 3ds Max 6 and higher, returns the current 3dsmax.ini file as a string. For some products that store the ini settings in the registry, this method returns undefined.

EXAMPLES:

for f in getFiles "3dsmax\\maps\\*.jpg" do deleteFile f

for d in getDirectories "D:\\foo\\*" do

for f in getFiles (d + "*.*") do

copyFile f ("C:\\temp\\" + getFilenameFile f + getFilenameType f)

if (getFiles "foo.max").count == 0 then print "File missing"

See also

Filestream Values

File Name Parsing

Standard Open and Save File Dialogs


Accessing INI File Keys

The following methods allow you to read and write key values in .INI files.

getINISetting <filename_string> <section_string> <key_string>

Reads an INI setting from the specified file. Within the file, the section identified by <section_string> is located, and then the key specified by the <key_string> is located. The value assigned to this key is then returned as a string.

If the specified file, section, or key is not found, an empty string "" is returned.

EXAMPLE

GetINISetting "c:/3dsmax6/3dsmax.ini" "Directories" "Scenes"

In 3ds Max 6 and higher,

If only the .ini file is specified, the method will return an array of the sections in the .ini file.

If only the .ini file and section are specified, the method will return an array of the keys in the section.

setINISetting <filename_string> <section_string> <key_string> <key_value_string>

Sets an INI setting in the specified file. Returns a value of true if the key value was written to the file, false if the key was not written. Within the file, the section identified by <section_string> is located, and then the key specified by the <key_string> is located. The <key_value_string> is then assigned to this key.

EXAMPLE

setINISetting "c:/3dsmax6/3dsmax.ini" "Directories" "Scenes" "c:/3dsmax/scenes"

If the specified file, section, or key is not found, a new file, section, or key is created.

If the specified file is read-only, or the file is open in MAXScript, the key value is not written to the file.

The method returns true when writing has been successful, false when writing has failed.

delIniSetting <filename_string> <section_string> <key_string>

Deletes the specified key from the supplied section of the given INI file.

delIniSetting <filename_string> <section_string>

Deletes the section and all keys in the section of the given INI file.

hasINISetting <filename_string> <section_string> [<key_string>]

NEW in 3ds Max 2008: Returns true if the INI setting exists in the specified file.

Within the file, the section identified by <section_string> is located, and then the key specified by the <key_string> is tested for.

If <key_string> is not specified, the section specifed by <section_string> is tested for.

Related Methods:

getMAXIniFile()

Returns the current 3dsmax.ini file as a string. For some products that store the ini settings in the registry, this method returns undefined.

See also

External File Methods


Text File Input and Output

See FileStream Values for information on creating, opening, closing, and accessing external text files.


Readable/Writable Checks

MAXScript does readable/writable checks since 3ds Max 4 and throws an error if you try to read from a write-only file and vice versa. Some modes are read/write, such as "a+" "w+" and "r+".

See also

FileStream Values


BinStream for Binary Reading and Writing

The BinStream methods can be used to read and write binary files. The methods are very similar to the ones provided by the FileStream Values

Methods:

<BinStream>fopen <String fileName> <String mode>

Opens a file for reading or writing based on the mode parameter. The function will return a BinStream value.

The fopen method parses the mode string looking for exactly one of {rwa}, at most one '+', at most one of {tb}, at most one of {SR}, at most one 'T', and at most one 'D'.

In other words, a mode string is valid if

  • First mode character is 'r', 'w', or 'a'

  • There can be up to six more optional mode characters:

    • One '+' character,

    • One of 't' and 'b', and

    • One of 'c' and 'n', and

    • One of 'S' and 'R', and

    • One of 'T',

    • One of 'D'.

r - read-only text - file must exist

rt - read-only text - file must exist

rb - read-only binary - file must exist

r+ - read/write text - file must exist

a - write-only text, append writes - file must exist

at - write-only text, append writes - file must exist

ab - write-only binary, append writes - file must exist

a+ - read/write text, append writes - file must exist

w - write-only text - deletes file contents if it exists

wt - write-only text - deletes file contents if it exists

wb - write-only binary - deletes file contents if it exists

w+ - read/write text - deletes file contents if it exists

S - access is primarily sequentional

R - access is primarily random

T - temporary storage file, try not to flush

D - file is deleted when last handle is closed

c - enable the commit flag for the associated filename so that the contents of the file buffer are written directly to disk if flush or fflush is called.

n - reset the commit flag for the associated filename to "no-commit" - contents of the file buffer are written to operating system buffers.

NOTE:

These modes are actual string and should always be written in quotation marks!

They are also CASE SENSITIVE!

When a file is opened with one of the "a" access types, all write operations occur at the end of the file. The file pointer can be repositioned using seek, but is always moved back to the end of the file before any write operation is carried out. Thus, existing data cannot be overwritten.

The "a" mode does not remove the EOF marker before appending to the file. After appending has occurred, the MS-DOS TYPE command only shows data up to the original EOF marker and not any data appended to the file.

The "a+" mode does remove the EOF marker before appending to the file. After appending, the MS-DOS TYPE command shows all data in the file. The "a+" mode is required for appending to a stream file that is terminated with the CTRL+Z EOF marker.

When the "r+", "w+", or "a+" access type is specified, both reading and writing are allowed (the file is said to be open for "update"). However, when you switch between reading and writing, there must be an intervening fflush or fseek operation. The current position can be specified for the fseek operation, if desired.

Having any character not listed above, having any repeats of characters listed above, or having both of a 'one of' pair will result in a runtime error being thrown.

If the mode string does not include 't' or 'b', 'b' is automatically appended to the mode string so that the file is opened in binary mode. Available in 3ds Max 8 and higher.

fflush <binStream>

Ensure all output to file is on disk, flushes the memory buffers.

<Boolean>FClose <BinStream>

Close a BinStream value. Returns True if it successfully closed the BinStream.

<Boolean>fseek <BinStream> <Integer> <#seek_set | #seek_cur | #seek_end>

Move the file pointer to the specified location based off the seek parameter.

#seek_set - base off start of file.

#seek_cur - base off current position.

#seek_end - base off end of file.

<Integer>ftell <BinStream>

Returns the current file pointer position.

<Boolean>WriteByte <BinStream> <Integer> [#signed | #unsigned]

Writes a Integer to the file as one byte. Returns True if write was successful.

<Boolean>WriteShort <BinStream> <Integer> [#signed | #unsigned]

Writes a Integer to the file as two bytes. Returns True if write was successful.

<Boolean>WriteLong <BinStream> <Integer> [#signed | #unsigned]

Writes a Integer to the file as four bytes. Returns True if write was successful.

<Boolean>WriteFloat <BinStream> <Float>

Writes a Float to the file as four bytes. Returns True if write was successful.

<Boolean>WriteString <BinStream> <String>

Writes a string to the file. Returns True if write was successful.

<Boolean>WriteLongLong <BinStream> <Integer64> [#signed | #unsigned]

Writes an Integer64 to the file as eight bytes. Returns True if write was successful. Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

<Boolean>WriteDouble <BinStream> <Double>

Writes a Double to the file as eight bytes. Returns True if write was successful. Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

<Boolean>WriteFloatAsDouble <BinStream> <float>

Writes a float value as a double precision (eight bytes) float to the BinStream. Returns True if write was successful. Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

<Integer>ReadByte <BinStream> [#signed | #unsigned]

Read a one byte value and return as an Integer.

<Integer>ReadShort <BinStream> [#signed | #unsigned]

Read a two byte value and return as an Integer.

<Integer>ReadLong <BinStream> [#signed | #unsigned]

Read a four byte value and return as an Integer.

<Float>ReadFloat <BinStream>

Read a four byte value and return as an Float.

<String>ReadString <BinStream>

Read a string from the file.

<Float>ReadDoubleAsFloat <BinStream>

Reads a double precision (eight byte) float from the BinStream and returns as a float. Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

<Integer64>ReadLongLong <BinStream> [#signed | #unsigned]

Read an eight byte value and return as an Integer64. Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

<Double>ReadDouble <BinStream>

Read an eight byte value and return as a Double. Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

EXAMPLE

f=fopen "c:\\test.bin" "wb"

WriteString f "String"

WriteByte f 64

WriteShort f 128

WriteLong f 256

WriteFloat f 512.0

WriteString f "gnirtS"

WriteLong f (ftell f)

fclose f

f=fopen "c:\\test.bin" "rb"

ReadString f

ReadByte f

ReadShort f

ReadLong f

ReadFloat f

ReadString f

ftell f

ReadLong f

fclose f

See also

FileStream Values


Encrypted Files

encryptFile <in_filename_string> <out_filename_string> <key_integer>

Creates an encrypted copy of the file named by <in_filename_string> using the integer supplied as a key, naming the encrypted file <out_filename_string>.

openEncryptedFile <filename_string> <key_integer>

Opens the encrypted file using the given integer key and returns a FileStream value that you can then do read calls on, exactly as you can on FileStreams returned from the openFile() function.

encryptFile() and openEncryptedFile() let you encrypt a text file with your own key and open an encrypted file via a key for reading. Among other things, you can use this to write and read an encrypted file containing a hardware lock ID for doing authorization-based piracy protection.

Here is some code that creates an encrypted lock ID file in some authorization process.

EXAMPLE

f = createFile "lock.tmp"

format "%" hardwareLockID to:f

close f

encryptFile "lock.tmp" "lock.dat" 5476557

deleteFile "lock.tmp"

The following code can be used to read and check the lock ID (obviously, all this is only safe if the creation and checking scripts are themselves encrypted):

EXAMPLE

f = openEncryptedFile "lock.dat" 5476557

id = readValue f

close f

if id != hardwareLockID then

(

message "Lock ID's don't match"

return 0

)


String Parser Methods

The following string parsing methods were first introduced in gmax 1.0 and are available in MAXScript since 3ds Max 5.

Methods:

<Boolean>isSpace <String>

Returns true if the first character of the given string is whitespace (space, tab, or newline), false if not.

EXAMPLE

isSpace " MAXScript" --first character is space

true

isSpace "MAXScript" --first character is not whitespace

false

isSpace "\nMAXScript" --first character is new line

true

<String>trimLeft <String> [String trimChars]

Trims all leading characters specified in trimChars from the given string and returns it. If trimChars is not specified, basic whitespace characters (space, tab, and newlines) are trimmed.

EXAMPLE

trimleft " \nMAXScript" --space and new line trimmed

"MAXScript"

<String>trimRight <String> [String trimChars]

Trims all trailing characters specified in trimChars from the given string and returns it. If trimChars is not specified, basic whitespace characters (space, tab, and newlines) are trimmed.

EXAMPLE

trimright "MAXScript \n " --spaces and new line trimmed

"MAXScript"

trimright "$Teapot0911" "1234567890" --remove trailing numbers

"$Teapot"

<String>readToken <CharStream>

Reads a token from the given stream and returns it as a string. Tokens are defined by a sequence of characters broken up by whitespace. Leading whitespace and one line "//" style comments are automatically skipped.

<String>peekToken <CharStream>

Same as readToken except it does not increment the file position.

EXAMPLE

a= "token! -- /* comment!\n */ ( ( \"nested bracket\" pair ) ) " as stringstream

(while peekToken a != undefined do print (readToken a);ok)

skipSpace <CharStream>

Skips to first non-whitespace from the given stream's current file position.


Asset Browser enhancements

Asset Browser

The Asset Browser provides access from your desktop to design content on the World Wide Web. From within the program you can browse the Internet for texture samples and product models. This includes bitmap textures (BMP, JPG, GIF, TIF, and TGA), or geometry files (MAX, DWG, and so on). You can drag these samples and models into your scene for immediate visualization and presentation. You can use the CTRL key to drag geometry into predefined locations. You can also use the Asset Browser to browse thumbnail displays of bitmap textures and geometry files on your hard disk or shared network drives. Then you can either view them or drag them into your scene or into valid map buttons or slots.

  • Several special new icons are now used in Thumbnail view to represent script files (.ms, .mcr, .mse), dropScripts (.ds), and script zip packages (.mzp).

  • Now viewing or double-clicking script source files (.ms, .mcr, .ds) will open them in a MAXScript editor window, ready for editing and evaluation. You can also double-click .mzp script zip package files to open them in WinZip or some other zip utility if the type .mzp has been associated with that utility.

  • Executable script files (.ms, .mcr, .mse, .mzp) now have a Run... menu item available in the right-click menu on their thumbnail icons in the thumbnail view, allowing you to launch them directly from within the asset browser.

  • The home page for web views is now <max-directory>\web\maxindex.html.

Methods:

assetBrowser.open ()

Opens the asset browser if it is not already open.

assetBrowser.gotoURL <URL_string>

Opens the given URL in the asset browser.

NOTE:

The URL can be a web URL or a local or network disc directory path name.

See also

i-drop - drag and drop

Zip-file Script Packages


Zip-file Script Packages

This feature in MAXScript allows a package of related files, possibly making up a scripted tool, to be bundled and compressed into a single zip format file. This package file can then be run like an ordinary .ms file. Any secondary files, needed by the tool, will be either automatically found in the package or they will be automatically extracted to specified locations prior to running the main tool scripts.

The file type for script packages is '.mzp'. These files are recognized as executable script files in the following situations:

  • Auto-loading at MAX startup, in scripts\startups, stdplugs\stdscripts, etc. any .mzp file found is run.

  • Choosing the Run Script menu item in the main MAXScript menu, or in the Listener menu, now shows .mzp files as one of the default kinds of executable files in the Open Script dialog and will run it if selected.

  • Specifying a fileName: parameter when adding a callBack script .

  • As executable files inside other .mzp archives, you can nest them if want.

  • When using the fileIn <fileName> function , you can specify a .mzp package for fileIn.

The mzp Package

The package startup control file is 'mzp.run'. When a .mzp package is opened, it is scanned for an 'mzp.run' file and, if found, the package commands in it are executed in sequence.

If there is no mzp.run control file in the package, MAXScript will unzip all the files in it to a unique temporary directory in the system temp directory and run all the executable script files it finds, in unspecified order. The kinds of rundle script files in a .mzp package are .ms, .mse and nested .mzp files.

When the contents of the .mzp file is extracted to a destination folder, either the default temp folder or one defined in the mzp.run control file, MAXScript will build and replicate any folder structure that is present in the .mzp file.

When you cause a script file inside the package to be run, either through 'run' commands in the mzp.run file, or by the default running scheme described in the previous item, the package becomes a search context for files that the script may try to open while it is running such things as image .bmp files, include files, etc. Only files named by relative path names are searched for in the package, fully specified paths (with device names at the front) will be looked for at the specified location.

The names of files and directories in commands that take them now can be supplied WITHOUT surrounding double quotes if the name contains only the following kinds of characters:

alphanumeric, '_', '$', '*', '.', '-', '\'

which covers most file names. Any file names with embedded spaces or punctuation not in the above list needs double-quotes.

EXAMPLE

name "test package"

version 3

treeCopy flobber to $scripts

copy *.ms to $scripts\flobber\dobber

move foo.max $scenes

drop $scenes\foo.max

The zip package is a text file that contains one or more of the following commands. All are optional.

name "<package_name>"

Names the package.

description "<text>"

Describes the package. Normally, a readme file in the package would give extended operating instructions, if they are provided.

version <number>

Returns the version number of the package.

extract to "<directory>"

Specifies the location in which to extract the contained files. This can be an absolute path name (starting with a drive letter or \) or a relative name. Relative names are taken as being relative to the default temp directory. The special prefix $max can be used to specify the main MAX executable directory

run "<script_file_name>"

If the package is launched from a MAXScript run menu item or via a fileIn() function, run the named script file. There can be more than one run command and they are run in order. These are ignored if the package is launched via a fileIn() call that is supplied with an explicit script file to run. During the execution of an mzp.run file, any 'run' commands are ignored. See mzp drop protocol for details.

drop "<dropScript_file_name>"

If the package is launched by drag-and-drop into MAX, run the named dropScript file. There can only be one of these per msp.startup file.

copy "<files>" to "<directory>"

Copies the named file or files (if the <files> string contains wild-cards) to the given directory. The special $max prefix can be used here.

clear temp

Cause the temporarily-extracted files to be deleted once all the nominated scripts are run or dropped.

clear temp on MAX exit

Cause the temporarily-extracted files to be deleted when the currently running MAX session exits.

clear temp on reset

Cause the temporarily-extracted files to be deleted when a file open or reset is performed.

keep temp

Prevents any deletion of the extracted files.

open <max_file_name>

Opens the named MAX scene file.

NOTE:

If the execution of an mzp.run file is triggered during an i-drop event, any 'open' commands are ignored. See mzp drop protocol for details.

merge <max_file_name>

Merges the named MAX scene file.

NOTE:

If the execution of an mzp.run file is triggered during an i-drop event, any 'merge' commands are ignored. See mzp drop protocol for details.

xref <max_file_name>

Xrefs the named MAX scene file.

NOTE:

If the execution of an mzp.run file is triggered during an i-drop event, any 'xref' commands are ignored. See mzp drop protocol for details.

import <importable_file_name>

Imports the named file.

NOTE:

If the execution of an mzp.run file is triggered during an i-drop event, any 'import' commands are ignored. See mzp drop protocol for details.

Only one 'open' or 'import' command may be used per mzp.run file. Any number of 'merge' and 'xref' commands can be used.

File Searches:

The following functions will perform searches for files given as relative file names in the current package file:

fileIn <filename>

include <filename>

openBitmap <filename>

editScript <filename>

NOTE:

Any saves will not go back into the package, but into the temp extracted file.

loadMAXFile <filename>

mergeMAXFile <filename> ...

getMAXFileObjectNames <filename>

importFile <filename> ...

loadMaterialLibrary <filename>

Bitmap Searches:

The following UI items will search for named bitmap .bmp files in the package:

bitmap <name> fileName:<filename>

button <name> images:<image_spec_array>

checkButton <name> images:<image_spec_array>

Relative file names can contain path names, so

EXAMPLE

fileIn "libs/myFns.ms"

would search in the "libs" sub-folder in the extracted package for "myFns.ms". You can arrange the contents of the package in any kind of folder nesting desired and file names in running script or in the mzp.run control file are relative to the package directory structure.

Copy and Move:

copy "<from>" to "<to>" [noReplace]

move "<from>" to "<to>" [noReplace]

treeCopy "<from>" to "<to>" [noReplace]

treeMove "<from>" to "<to>" [noReplace]

These cause files from within the package to be copied or moved as specified. The treeCopy & treeMove variants move whole nested directories of files. By default, any existing files in the destination location are replaced with the newly extracted ones, add the 'noReplace' keyword to prevent this.

The <to> spec must always be a directory. Any treeCopy/Move replicates the source sub-directories into the <to> directory, making new directories as needed. The <from> spec for copy & move may be any relative or fully specified file name or wild-card pattern. Relatively named files are looked for in that relative position in the package. Fully specified names are looked for in the main file-system.

The <from> spec for treeCopy/Move may be just a directory path, in which case the whole directory and its subdirectories are copied/moved, or it can be a wild-card path name in which case just the matching files or directory trees are copied/moved.

The file path names you can specify in the various commands (extract to, run, copy, move, etc.) can have a starting path that is one of several special names beginning with $. These name useful locations in the currently running MAX installation.

The $ names recognized are:

$max - main MAX executable directory

$maps - first directory in Maps directory config

$scenes - scenes directory

$fonts - fonts directory

$imports - imports directory

$sounds - sounds directory

$matlibs - matlibs directory

$scripts - scripts

$startupScripts - auto-load startup scripts

$plugins - first in the Plug-ins directory config

$plugcfg - plugcfg

$images - images

$ui - UI

$macroScripts - macroScripts in UI directory

$web - web directory

$temp - system temp directory

These directories reflect any customization the user has set up in the various preference dialogs.

EXAMPLE

If you had set up a package with several scenes, plug-ins & map files in several directories in the package, you could install them with some move commands in the mzp.run file, something like this:

move "plug-ins\*.*" to "$plugins"

move "*.max" to "$scenes"

move "texmaps\*.bmp" to "$maps"

NOTE:

As an added feature, if the scripts run from within a package define any functions, macroScripts, plug-ins, rollouts, or any major MAXScript value or construct that might live longer that the running script, then the package is 'associated' with that defined value or construct and will again become the initial search location whenever the functions or handlers in the rollouts/plug-ins/macroScripts/etc. are later run.

Winzip:

You can initially create a .mzp with a zip utility such as WinZip. You can then associate that utility with the .mzp type, so simple double-clicking a .mzp file will open it in that editor. You only need to set up this association once, and you can do this in the Windows Explorer by selecting a .mzp file, shift-right-clicking on the selected file and choosing "Open with..." in the popup menu that appears. Scroll the application list that appears to find you desired zip utility and check the "Always use this program ..." checkbox at the bottom of the dialog.

msZip Interface:

The MAXScript zip package interface has exposed 2 MAXScript-callable functions:

msZip.fileInPackage <mzpFilename> &<exractDirVar>

The 'fileInPackage' function is essentially the equivalent of:

fileIn <mzpFileName>

and will return true if success or false if there is a failure, or a missing or invalid .mzp file, and it will also return the directory that the package file were extracted to in the pass-by-reference <extractDirVar> argument.

EXAMPLE

local extractDir = ""

if msZip.fileInPackage "foo.mzp" &extractDir then

(

-- extractDir contains the extracted-to directory name

...

)

msZip.unloadPackage <mzpFilename> &<exractDirVar> &<dropFileVar>

The 'unloadPackage' function performs an extract and executes all the file copying and moving commands in any enclosed mzp.run file, but will not execute any scripts in the package. The extractTo directory and any 'drop' command file found will be returned in the pass-by-reference arguments.

EXAMPLE

local extractDir = "", dropFile = ""

if msZip.unloadPackage' "foo.mzp" &extractDir &dropFile then

(

-- extractDir contains the extracted-to directory name

-- dropFile contains any found drop file name (the path to extracted location )

...

)

See also

i-drop - drag and drop


i-drop - drag and drop

i-drop is a technology developed by Autodesk which allows the drag-and-drop of web content onto i-drop aware applications. For more details, documentation and samples, visit http://www.autodesk.com/developidrop

i-drop drag-and-drop support in 3ds Max allows i-drop-encapsulated files, scripts and texturemaps to be dragged from web pages directly onto a 3ds Max viewport, toolbar or menubar.

To create an i-drop capable web page, the following components are necessary:

  • An HTML file containing at least one i-drop ActiveX control

  • A standard file called idrop-schema.xml containing the XML definitions of high-level objects that can be dropped into i-drop-aware applications. This file is available online but can also be included locally when i-drop is used on local machines without internet access.

  • An XML file describing the package to be dropped. The file is being referenced by the i-drop ActiveX control.

  • A thumbnail image representing the content to be dropped.

  • A resource file, for example a .MAX files containing the model to be dropped, a bitmap texture to be dropped on scene models as diffuse map, a drop script to execute MAXScript commands.

EXAMPLE

Here is a simple HTML file containing a single i-drop active-X control that represents a MAX file that can be dropped into a 3ds Max viewport. The HTML refers to an XML file containing details about the MAX file to drop. The image proxy, XML file and .max file names specify files in the \Temp directory on the local C: drive, you will have to adjust these for your setup.

HTML FILE:

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<title>i-Drop Example</title>

</head>

<body>

Example of an i-drop activeX control...

<p>

<object name="idrop" width="64" height="80" classid="clsid: 21E0CB95-1198-4945-A3D2-4BF804295F78">

<param name="package" value="file:///C:/Temp/Example.xml">

</object>

</body>

</html>

XML PACKAGE FILE:

<?xml version="1.0"?>

<package xmlns="x-schema:file:///C:/Temp/idrop-schema.xml">

<proxy defaultsrc="file:///C:/Temp/blob.gif">

<caption>i-Drop it!</caption>

<img src="file:///C:/Temp/blob.gif"/>

</proxy>

<dataset>

<datasrc clipformat="CF_IDROP.MAX">

<datafile src="file:///C:/Temp/foo.max"/>

</datasrc>

</dataset>

</package>


i-drop Standard Schema File

The file idrop-schema.xml describes the high-level objects that can be dropped into i-drop-aware applications such as 3ds Max.

You can download the latest version of the idrop-schema.xml file by visiting

http://www.autodesk.com/developidrop

following the link to Samples and clicking on the i-drop schema link.

Alternatively, you can copy the source code below into a text file with the name idrop-schema.xml

XML CODE:

<?xml version="1.0"?>

<!-- ********************************************************************** -->

<!-- i-drop package schema -->

<!-- -->

<!-- The i-drop package is a description of a high-level "object" that can -->

<!-- be dropped into an i-drop aware application. The package lists native -->

<!-- file formats and web page proxy representations. -->

<!-- ********************************************************************** -->

<Schema name="idrop-13mar2000"

 xmlns="urn:schemas-microsoft-com:xml-data"

 xmlns:dt="urn:schemas-microsoft-com:datatypes">

<!-- ********************************************************************** -->

<!-- Attributes -->

<AttributeType name="src" dt:type="uri" required="no">

 <description>URL of a source file</description>

</AttributeType>

<AttributeType name="defaultsrc" dt:type="uri" required="no">

 <description>URL of a default source file</description>

</AttributeType>

<AttributeType name="clipformat" dt:type="string" required="no">

 <description>Custom defined clipboard format</description>

</AttributeType>

<AttributeType name="clsid" dt:type="uuid" required="no">

 <description>Class ID of an ActiveX control</description>

</AttributeType>

<AttributeType name="codebase" dt:type="uri" required="no">

 <description>URL to an ActiveX control distribution (ala object tag in HTML)</description>

</AttributeType>

<AttributeType name="name" dt:type="string" required="no">

 <description>Name of a parameter (ala object tag in HTML)</description>

</AttributeType>

<AttributeType name="value" dt:type="string" required="no">

 <description>Value of a parameter (ala object tag in HTML)</description>

</AttributeType>

<!-- ********************************************************************** -->

<!-- Elements -->

<ElementType name="package">

 <description>i-Drop XML package file</description>

 <element type="proxy" minOccurs="1" maxOccurs="1"/>

 <element type="dataset" minOccurs="1" maxOccurs="1"/>

</ElementType>

<ElementType name="proxy">

 <description>Stand-in for the dataset</description>

 <attribute type="defaultsrc" required="yes"/>

 <element type="caption" minOccurs="0" maxOccurs="1"/>

 <element type="img" minOccurs="0" maxOccurs="*"/>

 <element type="activex" minOccurs="0" maxOccurs="*"/>

</ElementType>

<ElementType name="caption">

 <description>Caption to display with the proxy</description>

</ElementType>

<ElementType name="img">

 <description>Bitmap image file</description>

 <attribute type="src" required="yes"/>

</ElementType>

<ElementType name="activex">

 <description>HTML-like definition of an ActiveX control</description>

 <attribute type="clsid" required="yes"/>

 <attribute type="codebase" required="no"/>

 <element type="param" minOccurs="0" maxOccurs="*"/>

</ElementType>

<ElementType name="param">

 <description>Parameter to an ActiveX control</description>

 <attribute type="name" required="yes"/>

 <attribute type="value" required="yes"/>

</ElementType>

<ElementType name="dataset">

 <description>Collection of data files to choose from</description>

 <attribute type="defaultsrc" required="yes"/>

 <element type="datasrc" minOccurs="0" maxOccurs="*"/>

</ElementType>

<ElementType name="datasrc">

 <description>Collection of data files to treat as one</description>

 <attribute type="clipformat" required="no"/>

 <element type="datafile" minOccurs="1" maxOccurs="1"/>

 <element type="xreffile" minOccurs="0" maxOccurs="*"/>

</ElementType>

<ElementType name="datafile">

 <description>Single data file (may have dependencies)</description>

 <attribute type="src" required="yes"/>

</ElementType>

<ElementType name="xreffile">

 <description>Externally referenced file</description>

 <attribute type="src" required="yes"/>

</ElementType>

</Schema>

See also

i-drop - drag and drop

Interface: dragAndDrop

Zip-file Script Packages


Drag-and-Drop Manager

Interface: dragAndDrop

A new type of datasrc file in an i-drop XML file can be specified that contains a macroScript with drag-and-drop handlers that will be run when you drag and drop the i-drop control onto a 3ds Max viewport. These new kinds of files are called 'drop scripts' and have the extension ".ds". Such files should contain a single macroScript definition with handlers for one or more of the special dropscript events. If there is more than just a single macroScript in the .ds file, all other text is ignored.

Here is a sample XML specifying a dropScript file called "foo.ds":

XML CODE:

<?xml version="1.0"?>

<package xmlns="x-schema:file:///C:/Temp/idrop-schema.xml">

<proxy defaultsrc="file:///C:/Temp/blob.gif">

<caption>i-Drop Script!</caption>

<img src="file:///C:/Temp/blob.gif"/>

</proxy>

<dataset>

<datasrc clipformat="CF_IDROP.MAX">

<datafile src="file:///C:/Temp/foo.ds"/>

</datasrc>

</dataset>

</package>

dropScript Events

The current dropScript events are delivered as a mixture of positional and keyword parameters. The first parameter is positional and is always the code name for the window on which the drop is currently occurring. Subsequent parameters are keyword parameters that vary in name and number depending on the window being currently dragged over or dropped on.

on droppable <window> node: point: do ...

on drop <window> node: point: do ...

<window>

Possible values are #max and #viewport. #max is returned if the mouse is over the MAX window, #viewport is returned if the mouse is over a viewport.

node:

any item (scene node) currently under the mouse pointer.

point:

The coordinates of the mouse. When <window> returns #max, point: will be in screen coordinates. When <window> returns #viewport, point will be the coordinates within the viewport.

If supplied, the 'droppable' handler is called continuously while the i-drop control is dragged over the MAX viewport, and should return true or false depending on whether the item is droppable at that position. If the mouse is not over a scene node, the <item> argument value is undefined. You implement the 'droppable' filter if the dropScript wants to limit droppability in any way.

The 'drop' handler is called when the user finally drops the i-drop control over a viewport and is given the same parameters as 'droppable'.

For example, currently for viewport windows, the full signatures are:

on droppable window node: point: do ...

on drop window node: point: do ...

but since keyword arguments are optional, you can choose any subset of the keyword arguments you need, such as:

on drop window node: do ...

or

on drop window do ...

Passing by keyword like this allows different context windows to supply a variable and large range of context info without requiring an unwieldy and fixed set of positional args.

EXAMPLE

Here is a sample 'foo.ds' file.

macroScript foo

(

on droppable window node: return

window == #viewport and

node != undefined and

classOf node == sphere

on drop window item do

(

node.scale *= 1.2

node.material = meditmaterials[1]

)

)

The droppable handle only allows dropping when the mouse is over a sphere scene node. When dropped, that sphere will be scaled up by 1.2 and be assigned the material currently in slot 1 in the material editor.


Dropping .max files from the Windows desktop

3ds Max scene files can be dropped from the Windows desktop or Windows Explorer.

3ds Max behaves differently depending on whether the file is dropped on a viewport or anywhere else in the 3ds Max UI:

  • When dropping .max scene files onto a 3ds Max viewport, either from i-drop-enabled web pages or directly from file directories, the Open/Merge/XRef/Cancel pop-up menu is displayed.

  • If the scene file is dropped elsewhere, such as on the toolbars, menu bar, status bar the file is opened, closing the currently open file.

    • NOTE:

    Dropping a scene file on the Command Panel does not perform any operation.


Dragging DropScripts from Toolbars

Drag-and-drop of dropScripts from the MAX toolbars is possible. DropScripts are simply macroScripts with 'on drop' and optionally 'on droppable' handlers, as defined above. If a macroScript button on a toolbar has an 'on drop' handler defined, you can drag that button off the toolbar to initiate dropScript drag-and-drop.

EXAMPLE

Here's a simple dropScript that applies a newly created brick material to the object that it is dropped on. Note that it also has an 'on execute' handler that does the same thing to the current selection. By providing both 'on drop' and 'on execute' handlers, you can make such a macroScript installable in menus, hotkeys and toolbars or droppable from toolbars, the web, etc.

macroScript dropBricks category:"DropScripts" Icon:#("MAXScript", 3)

(

on droppable window node: return

window == #viewport and node != undefined

on drop window node: do

node.material = standard diffuseMap:(bricks()) showInViewport:true

on execute do if selection.count == 1 then

$.material = standard diffuseMap:(bricks()) showInViewport:true

)

Note the use of the ' showInViewport ' property at material level.


Drag-and-Drop plain script files

You can drop plain script files of type, .ms, .mse or .mcr, either via i-drop controls or directly from file directories. The script is simply run when it is dropped.

Note that DropScripts (MacroScripts implementing 'on dropped do' handler) can supply an 'on loaded do ...' handler which will be called whenever the dropScript is first loaded during a drag-and-drop operation, either from the web or from a file directory. This allows the dropScript to perform any one-time initialization it might require to set up drop, such as loading ancillary files, etc.


Drag-and-drop MAXScript Zip files

The OLE-based drag-and-drop system in MAXScript accepts the dropping of MAXScript .mzp zip packages. They can be dropped either from i-drop-enabled web pages or directly from file directories, say from the Windows Explorer or the new MAX Asset Browser.

The main use for this feature is to allow script packages to be dropped into MAX and automatically run, particularly packaged dropScripts. But, since the package can contain files of any kind, it is possible to use it to drop any set of files, say a scene file and its maps & other supporting files, or a new plug-in, etc. The mzp.run control file allows you to set up arbitrary distributions of the files in the package using the extract to, copy and move commands. This can be a useful alternative to the current i-drop package-dropping mechanism, which simply places all the downloaded files listed in the i-drop to the MAX downloads directory.

See also

Zip-file Script Packages

.mzp drop protocol

When a .mzp package is dropped, the sequence of events that occurs differs slightly, depending on whether it is dropped via an i-drop control or directly from a file directory. In summary, the i-drop first downloads the package and then extracts it, dropping from a file directory extracts directly from that file. Further, the 'on droppable' handler in any dropScript specified in the package is only run if the package is droped via a i-drop, dropping from a file directory is a system-controlled action that doesn't provide any drag-over callbacks in which to run the 'on droppable' test.

From an i-drop, the .mzp file is first downloaded to the <max>\downloads directory, along with any other files specified in the i-drop XML file, overwriting any files currently there. If the .mzp file is the first file in the i-drop file set, it is the prime dropped file and the following .mzp processing continues. The .mzp file is then extracted to a new temp directory, in the system's main TEMP directory, and the mzp.run control file is run. If there is no mzp.run file in the package, the first file in the .mzp package is dropped, causing whatever drop protocol is appropriate for that file type. If supplied, a typical mzp.run control file will contain extract to, move and copy commands to control the disposition of the files extracted from the package, say placing any texture files in $maps & scene files in $scenes, etc.

During this execution of the mzp.run file after initial load, all 'copy' and 'move' commands are performed, and a 'drop' command is looked for. The file specified on the drop command is remembered for later drop processing. Any 'run', 'open', 'import', 'merge', 'xref' commands are ignored. If more than one 'drop' command is found, only the first one is run.

At this point, the drop file is known, either because it was supplied on a 'drop' command in the mzp.run file or because it is the first file in the .mzp package if there was no mzp.run file or drop command. If the drop file is anything other than .ds dropScript file, the drop protocol appropriate to that file is engaged. If it is a .ds dropScript, and the drop is from an i-drop, any 'on droppable' handler in the dropscript is repeatedly run as the mouse is moved off MAX's windows, and the cursor changes to show valid drop targets. If the drag-and-drop is from a file directory, the arrow+ cursor shows, but the 'on droppable' handler is NOT called. This is a consequence of the limitations of simple file drag-and-drop in Windows. When the mouse-click is released, the 'on droppable' handler is called on the target window and object and if it returns OK or is not supplied, the 'on drop' handler is called. This protocol is identical to dropping .ds dropScript files directly, as if they were not inside a .mzp package.

NOTE:

You can specify a file type other than a dropScript on the 'drop' command, such as an image or scene file. This allows the .mzp drag-and-drop to be used for dropping any kind of package, not just scripts.

See also

Interface: dragAndDrop

Zip-file Script Packages


Change Handlers and Callbacks

Change Handlers and Callbacks are used to detect when certain types of events occur to scene objects or within 3ds Max.

Change Handlers are applied to individual MAXWrapper objects and specify an attribute to monitor for that object and an expression to evaluate when that attribute changes. Example attributes that can be monitored are geometry, name, transform, and parameters. Change Handlers are not stored in the 3ds Max scene.

Callbacks are used to register with 3ds Max functions that are called when specific events occur within 3ds Max. Events that can be monitored are changes to the time slider time and redrawing of viewports . Callbacks are not stored in a 3ds Max scene.

MAXScript also provides several methods that automatically tie into 3ds Max’s Callback system. These General Event Callback Mechanism methods are used to register and unregister 3ds Max scripts that are called for a variety of 3ds Max events. These scripts can optionally be saved with the currently-open file and stay permanently with it, running whenever the scene is loaded, until they are explicitly removed.

The Node Event System introduced in 3ds Max 2009 provides a direct exposure of the SDK INodeEventCallback methods and allows more node-related events to be captured, including mapping changes and node-related Undo/Redo actions.

The above are described in more detail in the following topics:

Change Handlers and When Constructs

Time Change Callback Mechanism

Viewport Redraw Callback Mechanism

General Event Callback Mechanism

Node Event System

See also:

Trackbar Filter Callback Functions

RenderEffect Progress Callback Mechanism


Change Handlers and When Constructs

Change Handlers are used to detect when certain types of user events are performed on objects in the scene, allowing you to write scripts that respond to user operations like object moves, vertex edits, object deletions, name changes, etc.. Change Handlers are applied to individual MAXWrapper objects and specify an attribute to monitor for that object and an expression to evaluate when that attribute changes. Example attributes that can be monitored are geometry, name, transform, and parameters. Change Handlers are not stored in a 3ds Max scene.

The ChangeHandler : Value class instances represent change handler setups. ChangeHandler values are created using the when construct. Each time a when construct is executed, it creates and returns a new ChangeHandler instance. You should store this ChangeHandler value in a variable or array so that you can dismiss the handler when it is appropriate to do so.

The when construct defines a change handler function for a certain type of event on one or more objects. The system then automatically calls this function whenever the event occurs.

The syntax of the when construct has two forms as follows:

when <attribute> <objects> change[s] [ id:<name> ] \ [handleAt:#redrawViews|#timeChange] \ [ <object_parameter> ] do <expr>

when <objects> deleted [ id:<name> ] \ [handleAt:#redrawViews|#timeChange] \ [ <object_parameter> ] do <expr> \

In the first form, the <attribute> can be one of:

topology

geometry

name[s]

transform

select

parameters

subAnimStructure

controller

children

These specify the attribute of the given object(s) to be tracked for change (see below for more details).

The second form tracks object deletion by the user or other scripts. This is typically used if you have tables or other structures containing MAXScript object values and you want to remove deleted objects from them as the user modifies the scene.

NOTES:

The #selectedNodesPreDelete general callback is the far superior method to use to catch node deletion by the user. It is called before anything happens to the nodes and will report the deletion of any node - in contrast, the when construct operates only on nodes explicitly registered with the callback.

mypot1 = teapot() --create a teapot

fn whendeleted = --define a callback function

(

local deletedobjects = callbacks.notificationParam()

format "Callback: %\n" deletedobjects

-- This will print every object that was deleted.

-- By this point, the object is still attached to it's parents

-- and is still in groups etc...

-- Nothing has been done to the node yet.

)

when mypot1 deleted id:#foo obj do --define a when construct

(

format "When Construct: %\n" obj

)

--unregister any preDelete callbacks

callbacks.removeScripts #selectedNodesPreDelete

--register the function as general callback

callbacks.addscript #selectedNodesPreDelete "whendeleted()"

A regression in 3ds Max 9 caused a change in the way the when construct was called. In releases prior to 3ds Max 9, the when construct was called before the actual deletion of the object. In 3ds Max 9, the when callback in the above code would return <deleted scene node> instead.

This behavior has been fixed in 3ds Max 2008.

In both forms, the <objects> argument can be one of the following:

  • a single 3ds Max object, such as a scene node, controller, modifier, or material, etc.

  • one of the object sets, such as 'selection', or 'cameras', etc.

  • a wild-card pathname like $foo*.

  • an array of 3ds Max objects.

If more than one object is specified, the handler is called each time the given attribute of any of the objects is signaled as changed by the 3ds Max core.

The optional id: parameter specifies an ID for one or more handlers as a name literal. The ID name can later be used to delete the handler and, if the same name is given to several handlers, they can be deleted as a group.

The optional handleAt: parameter signals that the change handler expression should not be executed immediately upon notification, but delayed until the either the 3ds Max viewports are redrawn (#redrawViews) or current 3ds Max animation time is changed (#timeChange). Delaying the processing of the change handler expression is highly recommended, as described in the Caution section below. An example usage of the handleAt: parameter is:when select $ changes id:#foo handleAt:#redrawViews do ...

The optional <object_parameter> lets you specify the name of a parameter variable that will be accessible in the do <expr> and will hold the actual object that has changed. You typically specify this parameter name if the handler will respond to changes in many objects, so you can determine which one has changed. The <expr> can be a single expression or block expression.

EXAMPLE

when transform $box01 changes do

$box02.pos = $box01.pos + delta

when names selection change obj do update_name_table obj

when #($foo, $baz, $bar) deleted obj do

(

messageBox "Warning!"

deleteItem obj_table (findItem obj_table obj)

)

The change attributes are interpreted as follows:

topology

Signaled when the topology of an object changes in the Modify panel, such as via a mesh smooth, optimize, or vertex delete.

geometry

Signaled when the geometry of an object changes, such as by moving a vertex or via an animated modifier.

name or names

Signaled when the name of an object is changed if this occurs because a user edits the name in one of the 3ds Max command panels. The handler is called repeatedly with each character that is changed.

transform

Signaled when the transform of an object is changed, such as by a move, rotate, or scale.

select

Signaled when a scene node moves into or out of the current selection set. You should interrogate the <node>.isSelected property to determine the new state.

parameters

Signaled when any parameters are changed in the object. This is something of a catch all, because the core signals this event in many situations.

subAnimStructure

Signaled when the dynamic subAnim structure changes, such as when a new vertex becomes animated in an editable mesh, or when a new controller is added to a list controller. Also called when subAnims are reassigned, for example, when a material is changed in an object.

controller

Signaled when a new controller is assigned to one of the object's tracks.

children

Signaled when an object has immediate children added or removed.

Deleting Change Handlers

You can use the following two methods for deleting change handlers:

deleteChangeHandler <change_handler>

deletes specified change handler. change_handler is the value returned by a when construct.

deleteAllChangeHandlers [ id:<name> ]

If optional id: parameter is not specified, deletes all change handlers. If optional id: parameter is specified, deletes all change handlers with the specified id.

FOR EXAMPLE:

deleteAllChangeHandlers id:#foo

For efficiency reasons, you don't want irrelevant change handlers running in the background, so it is essential that you delete those that you no longer need.

Special Considerations

  • If a runtime error occurs in the body of a change handler while it is being executed, an error message is displayed and that handler is permanently disabled.

  • If all of the objects being tracked by a change handler are deleted, the change handler is also deleted.

  • The do <expr> change handler code is executed in a special context and not in the context of the code that created it. This means that the <expr> code cannot contain references to local variables in outer code nestings surrounding the when, since those variables are on an execution stack that does not exist at the time the when handler is called. The compiler detects any illegal references to outer locals and generates a compiler message. An important exception to this is utility and rollout panel locals, such as local functions, rollout variables and nested rollouts. You can refer to them in change handler code inside rollout code as they are associated directly with their rollout or utility object.

  • Change handlers are called only for user initiated events, and not for changes resulting from a change in controller values. For example, a change handler on the transform attribute of a node would be called when the user moves the node. If the position of the node is animated, and you play back the animation, the transform attribute change handler is not called.

  • If you assign a change handler to an attribute on multiple objects, the change hander is called once per object if that object’s attribute changes.

    • FOR EXAMPLE, IF YOU SAY:

    when select $ changes obj do update_modifier_list obj

    The function update_modifier_list is called whenever any object is selected or deselected. This is true even if you do an Edit / Select All. In this case, update_modifier_list will be called once for each object currently selected (as the objects are deselected), and then once for all objects in the scene (as the objects are selected). If update_modifier_list is at all processor-intensive, a significant system slowdown can occur.

    • Change handlers are only applied to object already present in the scene. Change handlers are not automatically applied to newly created objects.

    • If you have multiple change handlers defined, the order in which the change handlers are called is somewhat arbitrary.

    • Due to the way that 3ds Max internally processes notification signals, the $ form of accessing selected objects is not recommended in a select change handler. To access the selected objects, you should use the selection objectset. This is because $ relies on information that has not yet been set in the selection processing whereas selection uses a different method of accessing selections and the information it uses has been set up.

    CAUTION!

    The change handler system is based on 3ds Max's internal notification system which essentially drives all animation and interactivity within 3ds Max.

    There are cases when the core sends many, many signals for the same change, so setting up change handlers on many objects that do vast amounts of computing can significantly slow down the system.

    Strictly speaking, change handlers are supposed to be used to just set "dirty flags" in a lightweight, order-independent way, and then use Redraw Views or Time Change callbacks to actually cause the triggered processing.

    You should attempt to use change handlers judiciously, and not, for example, as a simple way to get scripted controllers.

    If you do find that a desired setup is being flooded with unnecessary signals, you should use the handleAt: to delay the actual processing of the event handler script until a redrawViews or timeChange event occurs.

    See also

    Change Handlers and Callbacks

    Time Change Callback Mechanism

    Viewport Redraw Callback Mechanism

    General Event Callback Mechanism


Time Change Callback Mechanism

You can register one or more functions to be called whenever the current 3ds Max animation time is changed, such as when the user drags the time slider or plays the animation. The following methods let you register and unregister these callbacks:

registerTimeCallback <fn>

unRegisterTimeCallback <fn>

You can register as many functions as you like. Each one is individually called whenever the time changes. The functions you register must take no arguments. They can access the updated current time through the MAXScript system variable currentTime.

EXAMPLE:

fn time_p = print currentTime

registerTimeCallback time_p

In the above example, the registered function causes the current time to be printed in the Listener window whenever the user moves the time slider or plays the animation.

Special Considerations

  • If a runtime error occurs in a callback function while it is being executed, an error message is displayed and that callback function is permanently disabled.

  • The time callback is not called during rendering, even if multiple frames are rendered.

  • The registered function is executed in a special context and not in the context of the code that created it. This means that the function cannot contain references to local variables in outer code nestings surrounding the function definition since those variables are on an execution stack that does not exist at the time the function is called. An important exception to this is utility and rollout panel locals, such as local functions, rollout variables and nested rollouts. You can refer to them in change handler code inside rollout code as they are associated directly with their rollout or utility object.

  • Note that it is the function value that is being registered, not the function name or global variable. This means that redefining the same-named function after registering it does not change the callback. You either need to unregister, re-define the function and then register it again, or make the registered function an intermediary which calls another function,

    • EXAMPLE:

    fn time_cb = print currentTime

    fn tcb = time_cb()

    registerTimeCallback tcb

    In this case, the registered callback function, tcb, calls the real call back, time_cb, (by referencing the global variable it is defined in), meaning you can redefine time_cb() as often as you need and the callback will always invoke the latest definition. This is a useful technique to employ while you are developing and debugging a callback.

    • Callback functions remain registered after loading a new file or performing a 3ds Max Reset.

    See also

    Change Handlers and Callbacks

    Change Handlers and When Constructs

    Viewport Redraw Callback Mechanism

    General Event Callback Mechanism


Viewport Redraw Callback Mechanism

You can register one or more functions to be called whenever the 3ds Max viewports are redrawn. The following methods let you register and unregister these callbacks:

registerRedrawViewsCallback <fn>

unRegisterRedrawViewsCallback <fn>

You can register as many functions as you like. Each one is individually called whenever the viewports are redrawn. The functions you register must take no arguments.

EXAMPLE:

fn redrawviews_p = print "Viewports Redrawn"

registerRedrawViewsCallback redrawviews_p

In the above example, the registered function causes the string "Viewports Redrawn" to be printed in the Listener window whenever the 3ds Max viewports are redrawn.

Special Considerations

  • If a runtime error occurs in a callback function while it is being executed, an error message is displayed and that callback function is permanently disabled.

  • The registered function is executed in a special context and not in the context of the code that created it. This means that the function cannot contain references to local variables in outer code nestings surrounding the function definition since those variables are on an execution stack that does not exist at the time the function is called. An important exception to this is utility and rollout panel locals, such as local functions, rollout variables and nested rollouts. You can refer to them in change handler code inside rollout code as they are associated directly with their rollout or utility object.

  • Note that it is the function value that is being registered, not the function name or global variable. This means that redefining the same-named function after registering it does not change the callback. You either need to unregister, re-define the function and then register it again, or make the registered function an intermediary which calls another function,

    • EXAMPLE:

    fn redrawviews_cb = print currentTime

    fn rvcb = redrawviews_cb()

    registerRedrawViewsCallback rvcb

    In this case, the registered callback function, rvcb, calls the real call back, redrawviews_cb, (by referencing the global variable it is defined in), meaning you can redefine redrawviews_cb() as often as you need and the callback will always invoke the latest definition. This is a useful technique to employ while you are developing and debugging a callback.

    • Callback functions remain registered after loading a new file or performing a 3ds Max reset.

    See also

    Change Handlers and Callbacks

    Change Handlers and When Constructs

    Time Change Callback Mechanism

    General Event Callback Mechanism


Node Event System

NEW in 3ds Max 2009: The Node Event System introduced in 3ds Max 2009 lets you define a scripted function that is triggered in response to any of various node-related scene events. The events map one-to-one with the event methods of class INodeEventCallback in the 3ds Max SDK. For detailed information on each, read the methods comments for class INodeEventCallback in maxsdk\include\ISceneEventManager.h

The Node Event System is similar to the General Event Callback Mechanism . It operates as a layer over the General Event Callback system, but also receives some node messages which the older system cannot handle, like geometry, topology and mapping changes. This system will also catch events which happen as a result of undo/redo, while the older system sometimes would not.

Thus, if you wish to catch nodes-related events and changes to nodes, the Node Event System is your best option.

NOTE:

The Node Event System is inappropriate for catching any events except those specifically related to scene nodes!

Contructor:

<callbackItem>NodeEventCallback [mouseUp:<bool>] [delay:<integer>] \

[callbackBegin:<fn>] [all:<fn>] \

[added:<fn>] [deleted:<fn>] \

[linkChanged:<fn>] [layerChanged:<fn>] \

[groupChanged:<fn>] [hierarchyOtherEvent:<fn>] \ [modelStructured:<fn>] [geometryChanged:<fn>] \

[topologyChanged:<fn>] [mappingChanged:<fn>] \

[extentionChannelChanged:<fn>] [modelOtherEvent:<fn>] \

[materialStructured:<fn>] [materialOtherEvent:<fn>] \

[controllerStructured:<fn>] [controllerOtherEvent:<fn>] \

[nameChanged:<fn>] \

[wireColorChanged:<fn>] [renderPropertiesChanged:<fn>] \ [displayPropertiesChanged:<fn>] [userPropertiesChanged:<fn>] \

[propertiesOtherEvent:<fn>] \

[subobjectSelectionChanged:<fn>] [selectionChanged:<fn>] \

[hideChanged:<fn>] [freezeChanged:<fn>] \ [displayOtherEvent:<fn>] [callbackEnd:<fn>]

The example script below prints a message to the MAXScript Listener when any message is received by registering a function to the optional keyword argument all:

The script also displays a message box when the linkChanged or layerChanged event occurs, that is, whenever one node is linked or unlined from another node, or moved to a different layer.

EXAMPLE SCRIPT:

--Define a callback function to handle linking and layer changes:

fn CallbackFn1 ev nd = (

 messageBox ("Event Detected: Event "+(ev as string)+ \

 ", Nodes " + (nd as string))

)

--Define a callback function to handle ALL messages:

fn CallbackFn2 ev nd = (

 format "Event Detected: Event %, Nodes %\n" ev nd )

--Register callbacks for link changes, layer changes using the

--first function and for all changes using the second function.

--Act only when mouse is up and there have been no other events

--within one second (1000 milliseconds):

callbackItem = NodeEventCallback mouseUp:true delay:1000 linkChanged:CallbackFn1 layerChanged:CallbackFn1 all:CallbackFn2

Handling optional keyword parameters:

mouseup:

If the optional keyword argument mouseUp: is set to true, the callback will only be triggered when the mouse button is released.

delay:

When the optional keyword argument delay: is supplied (as time in milliseconds), the callback is only triggered if the given time passes with no events, that is, only after the system is idle for the specified time.

Callback Function optional keyword parameters:

One or more of the other optional keyword arguments can be supplied with pre-defined MAXScript Functions to be executed if a callback of the specified type is found in the message received by the Node Event System.

The callback functions take two parameters: the first is the event name that triggered the function call, the second is a list of node AnimHandles . The GetAnimByHandle() method must be used to get the node itself.

Callback Batch Handling:

callbackBegin:

callbackEnd:

When a callback is triggered, messages for all queued events will be sent in one batch.

The callbackBegin: message indicates the start of a batch, while callbackEnd: indicates the end of a batch.

Registering functions using these two optional keyword arguments lets you get notification of the beginning and the end of a single message batch.

all:

The supplied function will be called whenever ANY of the node-related messages listed below has been received.

Node Creation and Removal Callbacks:

added:

The supplied function will be called whenever a node has been added to the scene.

deleted:

The supplied function will be called whenever a node has been deleted from the scene.

Node Hierarchy, Layer and Group Callbacks:

linkChanged:

The supplied function will be called whenever the node is linked to or unlinked from another node.

layerChanged:

The supplied function will be called whenever the node has moved to another layer.

groupChanged:

The supplied function will be called whenever the node has been added or removed from a group.

hierarchyOtherEvent:

The supplied function will be called whenever the node's hierarchy has been changed in some other way.

Node Model, Geometry, Topology and Mapping Callbacks:

modelStructured:

The supplied function will be called whenever the model's structure has been modified.

geometryChanged:

The supplied function will be called whenever the geometry of the node has changed, for example a vertex has been moved.

topologyChanged:

The supplied function will be called whenever the topology of the node's geometry has changed, for example an edge has been added or removed.

mappingChanged:

The supplied function will be called whenever the mapping of the node's geometry has changed, for example UV coordinates have been assigned or modified.

extentionChannelChanged:

The supplied function will be called whenever the a non-mapping channel of the node has been changed, for example Vertex Alpha, Soft-Selection and so on.

modelOtherEvent:

The supplied function will be called whenever the node's model has been changed in some other way.

Node Material Callbacks:

materialStructured:

The supplied function will be called whenever a material has been added or removed from the node.

materialOtherEvent:

The supplied function will be called whenever the node's material has been changed.

Node Controller Callbacks:

controllerStructured:

The supplied function will be called whenever a controller has been assigned or removed to a SubAnim track of the node.

controllerOtherEvent:

The supplied function will be called whenever a node's controller has been changed in another way.

Node Name and Properties Callbacks:

nameChanged:

The supplied function will be called whenever the name of the node has been changed.

wireColorChanged:

The supplied function will be called whenever the wireframe color of the node has been changed.

renderPropertiesChanged:

The supplied function will be called whenever the Render Properties of the node has been changed, including Renderable, Visible To Camera, Visible To Reflections and so on.

displayPropertiesChanged:

The supplied function will be called whenever a disdlay property of the node has been changed, for example "Display As Box", "Show Vertex Ticks", "Backface Culling" and so on.

userPropertiesChanged:

The supplied function will be called whenever the User Properties buffer of the node has been changed.

propertiesOtherEvent:

The supplied function will be called whenever any other properties of a node have been changed.

Node Selection Callbacks:

subobjectSelectionChanged:

The supplied function will be called whenever the sub-object selection of a node has changed.

selectionChanged:

The supplied function will be called whenever the selected state of the node has changed, for example a node has been selected or deselected.

Node Display Callbacks:

hideChanged:

The supplied function will be called whenever the Hidden flag of a node has changed.

freezeChanged:

The supplied function will be called whenever the Frozen flag of a node has changed.

displayOtherEvent:

The supplied function will be called whenever other display flags of a node have changed.

See also:

General Event Callback Mechanism

Change Handlers and When Constructs

Change Handlers and Callbacks


General Event Callback Mechanism

MAXScript allows you to register callback scripts for all of the notification events supported by 3ds Max, such as pre/post scene file open, new, reset, scene file save, pre/post render, selection change, etc. You can specify any number of callback scripts per notification event. Callback scripts can be bundled into ID'd sets, and can be deleted individually or all callback scripts in and ID’d set can be deleted. Callback scripts can be specified as persistent so that they are saved and loaded with the currently open file.

Adding Callbacks

The callbacks are added using the following syntax:

callbacks.addScript <callback_type_name> ( <script_string> | <script_stringstream> | \ fileName:<filename_string> ) [id:<name>] [ persistent:<boolean> ]

This method is used to register a new callback script. Requires as the first argument a name that specifies which type of notify event this script is associated with. The list of valid callback_type_name values is listed below.

The script is supplied either as a direct String or StringStream value containing the text of the script to run, or as a fileName: keyword argument, in which case the named file is loaded and run whenever the event notification callback occurs. You can specify either a direct string or a fileName:, but not both.

The optional id: parameter lets you tag one or a group of callbacks with a unique name so that you can remove them all as a group without interfering with other callbacks, perhaps registered by other scripted tools.

The optional persistent: parameter lets you control whether the script is saved permanently in the currently open scene file or is a global callback script that remains in place no matter what file opening and closing is performed. A true value for the parameter specifies that the script should be stored in the current file and loaded and registered for callback whenever that file is opened again. Persistent callback scripts are always removed when a new file is loaded or a reset is performed so that persistent scripts in one file don't accidentally get copied to a later file. The default for this parameter is false, indicating the script is a global script and is not persistent.

EXAMPLE:

callbacks.addScript #preRender "setUpRenderGeom()" id:#jbwRender

This registers a new callback script that will be called just before a render is performed. The script invokes a function (that has presumably already been set up). A unique ID has been assigned to the script for later selective removal.

Removing Callbacks

callbacks.removeScripts [ <callback_type_name> ] [ id:<name> ]

This method is used to unregister and remove one or more callback scripts.

Specifying just a callback event type name removes all the callback scripts for that event type.

Specifying just an id: removes all callback scripts in all events with that ID.

Specifying both limits the ID-based removal to the specified event type.

Inspecting Callbacks

callbacks.show [ <callback_type_name> ] [ id:<name> ]

This method lists out the current callback scripts in the Listener window.

NEW in 3ds Max 2009: If the optional callback type name argument is specified, only callbacks of that type will be shown.

If the optional keyword argument id: is specified, only callbacks with that ID will be shown.

If both are specified, only callbacks of the type with the given ID will be shown.

callbacks.broadcastCallback <callback_type_name>

This method provides a way for you to simulate one of the events and have all the callback scripts for it executed. Within 3ds Max, the #preRenderFrame and #preRenderFrame callbacks can only be called by the renderer. These callbacks can not be called by using this method.

Additional Notification Information on the Callback:

callbacks.notificationParam()

This method can be called in a callback script to provide additional information on the callback. The value returned by this method varies based on the callback type. If no additional information was present for the callback, a value of 'undefined' is returned.

EXAMPLE:

--Remove any existing callbacks with this ID.

callbacks.removeScripts id:#MXSHelp

--Add a new callback script which will call

--callbacks.notificationParam() before selected nodes are deleted

--and thus will print the deleted objects to the Listener:

callbacks.addScript #selectedNodesPreDelete "print (callbacks.notificationParam())" id:#MXSHelp

Callback Event Names and notificationParam Return Values:

Below are all supported Callback Event Names and the callbacks.notificationParam() values typically returned. Depending on how the broadcast is generated, a value of 'undefined' may be returned by this method instead of the value shown.

Quick Navigation:

Animation Notifications

Render Dialog and Render Plugin Notifications

Image Viewer Display Notifications

Rendering Notifications

File Notifications

Xrefs Notifications

Layer System Notifications

Manipulate Mode Notifications

Modifier Panel Notifications

Modifier Notifications

Material Library Notifications

Material Notifications

Node Related Notifications

System Notifications

Radiosity Notifications

Undo System Notifications

Schematic View Notifications

Asset Browser Notifications

Named Selection Set Notifications

Direct3D Notifications

Other Notifications

Animation Notifications:

#animateOff: undefined

Sent when the Animate button is turned off.

#animateOn: undefined

Sent when the Animate button is turned on.

#animationRangeChange: undefined

Sent when the Animation range is changed.

Render Dialog and Renderer Plugin Notifications:

#tabbedDialogCreated: #(integer, integer)

Sent after the tabbed render dialog has been created.

#tabbedDialogDeleted: #(integer, integer)

Sent after the tabbed render dialog has been deleted.

#renderParamsChanged: undefined

Sent whenever the common renderer parameters have changed.

#preRendererChange: undefined

Sent before the current renderer is changed, or the type of one of the renderers is changed.

#postRendererChange: undefined

Sent after the current renderer is changed, or the type of one of the renderers is changed.

Image Viewer Display Notifications:

#preImageViewerDisplay: IVFB Interface

NEW in 3ds Max 2009: Sent after the image viewer is created, but before it becomes visible. Calling callbacks.notificationParam() returns an IVFB interface which allows rollouts to be added to the Virtual Frame Buffer (a.k.a. Rendered Frame Window).

#postImageViewerDisplay: IVFB Interface

NEW in 3ds Max 2009: Sent after the image viewer becomes visible. Calling callbacks.notificationParam() returns an IVFB interface which allows rollouts to be added to the Virtual Frame Buffer (a.k.a. Rendered Frame Window).

Rendering Notifications:

#preRender: Array

Sent before rendering is started. This notification is sent out before the renderer creates the render instance objects, which means that you can create nodes and other objects as a response to this event. When rendering multiple frames, this event is sent only once at the beginning of the rendering phase, and not on a per-frame basis. In the #preRender callback, you can't change any of the render parameters (height, width, aliasing, etc) and affect the current render sessions. Those parameters have already been set up internally in 3ds Max, and so changes to them won't occur until the next render session occurs.

Returns a 28 element array - see the SDK help file, class RendParams, for more information on the parameter definitions.

1 - Name - rpar->rendType

2 - Boolean - rpar->isNetRender

3 - Boolean - rpar->fieldRender

4 - Integer - rpar->fieldOrder

5 - Time - rpar->frameDur

6 - Boolean - rpar->colorCheck

7 - Integer - rpar->vidCorrectMethod

8 - Integer - rpar->ntscPAL

9 - Boolean - rpar->superBlack

10 - Integer - rpar->sbThresh

11 - Boolean - rpar->rendHidden

12 - Boolean - rpar->force2Side

13 - Boolean - rpar->inMtlEdit

14 - Float - rpar->mtlEditTile

15 - Boolean - rpar->mtlEditAA

16 - Boolean - rpar->multiThread

17 - Boolean - rpar->useEnvironAlpha

18 - Boolean - rpar->dontAntialiasBG

19 - Boolean - rpar->useDisplacement

20 - Boolean - rpar->useRadiosity

21 - Boolean - rpar->computeRadiosity

22 - TextureMap - rpar->envMap

23 - Time - rpar->firstFrame

24 - Integer - rpar->scanBandHeight

25 - Integer - rpar->extraFlags

26 - Point2 - rpar->width, rpar->height

27 - Boolean - rpar->filterBG

28 - Boolean - rpar->alphaOutOnAdditive

#postRender: undefined

Sent after rendering has finished. This notification is sent out after the renderer destroys the render instance objects, which means that you can create nodes and other objects as a response to this event. When rendering multiple frames, this event is sent only once at the end of the rendering phase, and not on a per-frame basis.

#preRenderEval: time

Sent just before the renderer starts evaluating objects.

Returns the time being rendered

#preRenderFrame: Array

Sent just before each frame is rendered by the renderer. This notification is sent out after the renderer has taken a snapshot of the scene geometry. At the time of this call the scene cannot be modified. The renderer has already called GetRenderMesh() on all the object instances, and the materials and lights are already updated. If you don't modify anything that is rendered, then it is okay to use this callback. The current frame being rendered is set into the MAXScript currentTime context and system global, so any references to other scene object properties will automatically be resolved at the currently rendering frame's time. This notification is not sent out when the renderer is called to update the Material Editor sample spheres, only during output rendering.

#postRenderFrame: Array

Sent just after each frame is rendered by the renderer. The current frame being rendered is set into the MAXScript currentTime context and system global, so any references to other scene object properties will automatically be resolved at the currently rendering frame's time. This notification is not sent out when the renderer is called to update the Material Editor sample spheres, only during output rendering.

Returns a 22 element array - see the SDK help file, class RenderGlobalContext, for more information on the parameter definitions.

1 - Integer - rendParams->projType

2 - Point2 - rendParams->devWidth, rendParams->devHeight

3 - Point2 - rendParams->xscale, rendParams->yscale

4 - Point2 - rendParams->xc, rendParams->yc

5 - Boolean rendParams->antialias

6 - Matrix3 - rendParams->camToWorld

7 - Matrix3 - rendParams->worldToCam

8 - Point2 - rendParams->nearRange, rendParams->farRange

9 - Float - rendParams->devAspect

10 - Float - rendParams->frameDur

11 - TextureMap - rendParams->envMap

12 - Color - rendParams->globalLightLevel

13 - Time - rendParams->time

14 - Boolean rendParams->wireMode

15 - Float - rendParams->wire_thick

16 - Boolean - rendParams->force2Side

17 - Boolean - rendParams->inMtlEdit

18 - Boolean - rendParams->fieldRender

19 - Boolean - rendParams->first_field

20 - Boolean - rendParams->field_order

21 - Boolean - rendParams->objMotBlur

22 - Integer - rendParams->nBlurFrames

#beginRenderingReflectRefractMap: undefined

Sent before preparing Reflect and Refract Maps for rendering

#beginRenderingActualFrame: undefined

Sent after render setup and immediately before the actual render begins

#beginRenderingTonemappingImage: undefined

Sent before rendering Tonemapping image

WARNING:

You cannot change an object's mesh in a #preRenderFrame, #postRenderFrame, or any of the #beginRendering* callbacks, particularly if the mesh isn't animated. The renderer has already evaluated the original mesh and holds a pointer to that mesh. Changing the object's mesh will delete the old mesh, but the renderer doesn't know this, and when trying to render the now deleted mesh will crash.

EXAMPLE:

For an example of using the #preRender and #postRender callbacks, see

How To ... Change Objects At Render Time

FileLink Notifications:

#fileLinkPreAttach: undefined

Sent just before a file link attach.

#fileLinkPostAttach: undefined

Sent just after a file link attach.

#fileLinkPreBind: undefined

Sent just before a file link bind.

#fileLinkPostBind: undefined

Sent just after a file link bind.

#fileLinkPreDetatch: undefined

Sent just before a file link detach.

#fileLinkPostDetatch: undefined

Sent just after a file link detach.

#fileLinkPreReload: undefined

Sent just before a file link reload.

#fileLinkPostReload: undefined

Sent just after a file link reload.

#filelinkPostReloadPrePrune: undefined

Sent after all of the new objects for a reload have been created, but before any objects have been deleted.

File Notifications:

#filePreOpen: (integer | undefined)

Sent before a new file is opened.

Calling callbacks.notificationParam() returns an integer value of 2 if a render preset file is being opened, undefined otherwise.

#filePostOpen: (integer | undefined)

Sent after a new file is opened successfully.

Calling callbacks.notificationParam() returns an integer value of 2 if a render preset file is being opened, undefined otherwise.

#filePreOpenProcess: #(integer, string)

Sent before the file open process starts.

Calling callbacks.notificationParam() returns an array with two elements:

Element 1 is

1 if doing a normal file load,

2 if doing an Edit>Fetch

Element 2 is the scene file name being loaded.

EXAMPLE:

callbacks.removeScripts id:#testCallback

callbacks.addScript #filePreOpenProcess "print (callbacks.notificationParam())" id:#testCallback

PERFORM A FETCH - THE CALLBACK WILL PRINT:

2

"C:\Documents and Settings\user\My Documents\3dsmax\autoback\maxhold.mx"

#filePostOpenProcess: undefined

Sent after the file open process has finished.

#filePreSave: string

Sent before a file is saved.

Calling callbacks.notificationParam() returns a String containing the file name.

#filePostSave: string

Sent after a file is saved.

Calling callbacks.notificationParam() returns a String containing the file name.

#filePreSaveProcess: #(integer, string)

Sent before the save process has started.

Calling callbacks.notificationParam() returns a 2 element array:

Element 1 is

1 if doing a normal file save,

2 if doing an Edit>Hold

3 if doing an Autobackup

Element 2 is the scene file name being saved.

EXAMPLE:

Evaluate the following code:

callbacks.removeScripts id:#testCallback

callbacks.addScript #filePreSaveProcess "print (callbacks.notificationParam())" id:#testCallback

Save the file to "TestingCallback.max" - the callback will print:

1

"C:\Documents and Settings\user\My Documents\3dsmax\scenes\testingcallback.max"

Perform an Edit>Fetch at this point - the callback will print:

2

"C:\Documents and Settings\user\My Documents\3dsmax\autoback\maxhold.mx"

Wait fro the Autobackup to kick in - the callback will print:

3

"C:\Documents and Settings\user\My Documents\3dsmax\autoback\AutoBackup01.max"

#filePostSaveProcess: undefined

Sent after the save process has finished.

#filePreSaveOld: undefined

Sent before an old version file is saved.

#filePostSaveOld: undefined

Sent after an old version file is saved.

#filePreMerge: integer

Sent before a file is merged.

Calling callbacks.notificationParam() returns an integer value of 1 if object or scene Xref merged, undefined otherwise.

#filePostMerge: integer

Sent after a file is merged successfully.

Calling callbacks.notificationParam() returns an integer value of 1 if object or scene Xref merged, undefined otherwise.

#filePostMergeProcess: undefined

Sent after the merge process has finished.

#preImport: undefined

Sent before a file is imported.

#postImport: undefined

Sent after a file is imported successfully.

#importFailed: undefined

Sent if import fails.

#preExport: undefined

Sent before a file is exported.

#postExport: undefined

Sent after a file is exported successfully.

#exportFailed: undefined

Sent if export fails.

Xrefs Notifications:

#objectXrefPreMerge: undefined

Loading XRef (typically surrounding Merge notices)

#objectXrefPostMerge: undefined

Loading XRef (typically surrounding Merge notices)

#sceneXrefPreMerge: undefined

Loading XRef (typically surrounding Merge notices)

#sceneXrefPostMerge: undefined

Loading XRef (typically surrounding Merge notices)

Layer System Notifications:

#layerCreated: BaseLayer (reftarg)

Sent after layer created.

Calling callbacks.notificationParam() returns a layer ReferenceTarget.

NOTE:

There is a known problem with #layerCreated - a layer may be created if an object is merged or an object XRef is performed, but these actions do not broadcast a #layerCreated event.

#layerDeleted: BaseLayer (reftarg)

Sent before layer deleted, callbacks.notificationParam() returns the layer.

#nodeLayerChanged: #(node, BaseLayer, BaseLayer)

Sent after node placed on new layer, callbacks.notificationParam() returns an array containing 3 elements - the node, the old layer and the new layer

Manipulate Mode Notifications:

#manipulateModeOn: undefined

Sent when entering manipulate mode.

#manipulateModeOff: undefined

Sent when exiting manipulate mode.

Modifier Panel Notifications:

#modPanelObjPreChange: undefined

Sent just before the current edit object is about to change in Modify panel.

#modPanelObjPostChange: undefined

Sent just after the current edit object changes in Modify panel.

#modPanelSelChanged: undefined

Sent whenever the Modify panel opens on a new selection, either because the Modify panel was just selected or because a new selection is made in the scene. The notify occurs at a point just prior to panel redraw but after the selection has been established, so that callback functions can modify the panel state without it being overwritten.

#ModPanelSubObjectLevelChanged: #(newSOlevelIndex, oldSOlevelIndex)

Sent whenever the Modify panel changes the sub-object level. Calling callbacks.notificationParam() returns an array containing the new SO level number and the old SO level number. Available in 3ds Max 9 and higher.

Modifier Notifications:

#preModifierAdded: #(node, modifier)

Sent before a modifier is added to a node.

Calling callbacks.notificationParam() within the callback function will return a 2 element array containing the node and the modifier which was added.

#postModifierAdded: #(node, modifier)

Sent after a modifier is added to a node.

Calling callbacks.notificationParam() within the callback function will return a 2 element array containing the node and the modifier which was added.

#preModifierDeleted: #(node, modifier)

Sent before a modifier is deleted from a node.

Calling callbacks.notificationParam() within the callback function will return a 2 element array containing the node and the modifier which was deleted.

#postModifierDeleted: #(node, modifier)

Sent after a modifier is deleted from a node.

Calling callbacks.notificationParam() within the callback function will return a 2 element array containing the node and the modifier which was deleted.

Material Library Notifications:

#mtlLibPreOpen: undefined

Sent just before loading a material library.

#mtlLibPostOpen: materiallib

Sent just after loading a material library.

Calling callbacks.notificationParam() within the callback function will return the MaterialLibrary loaded.

#mtlLibPreSave: undefined

Sent just before saving a material library.

#mtlLibPostSave: undefined

Sent just after saving a material library.

#mtlLibPreMerge: undefined

Sent just before merging a material library.

#mtlLibPostMerge: undefined

Sent just after merging a material library.

Material Notifications:

#mtlRefAdded: material

Called when a material reference is added.

Calling callbacks.notificationParam() within the callback function returns the Material.

#mtlRefDeleted: material

Called when a material reference is deleted.

Calling callbacks.notificationParam() within the callback function returns the Material

Node Related Notifications:

#nodeCreated: node

Sent when a node is created.

Calling callbacks.notificationParam() within the callback function returns the node.

#nodeCloned: node

Sent after a node is cloned but before theHold.Accept(..).

Calling callbacks.notificationParam() within the callback function returns the node.

#sceneNodeAdded: node

Sent just after a node is added to the scene.

Calling callbacks.notificationParam() within the callback function returns the node.

#nodeFreeze: node

Sent when a node is frozen.

Calling callbacks.notificationParam() within the callback function returns the node.

#nodeUnfreeze: Node

Sent when a node is unfrozen.

Calling callbacks.notificationParam() within the callback function returns the node.

#nodeHide: node

Sent when a node is hidden.

Calling callbacks.notificationParam() within the callback function returns the node.

#nodeUnhide: Node

Sent when a node is unhidden.

Calling callbacks.notificationParam() within the callback function returns the node.

#nodeLinked: Node

Sent when a new parent-child link is made. Calling callbacks.notificationParam() within the callback function returns the node.

#nodeUnlinked: Node

Sent when a parent-child link is broken.

Calling callbacks.notificationParam() within the callback function returns the node.

#nodePreDelete: Node

Sent before a node is deleted.

Calling callbacks.notificationParam() within the callback function returns the node.

#nodePostDelete: undefined

Sent after a node is deleted.

#nodePreMaterial: Node

Sent just before a node gets a new material.

Calling callbacks.notificationParam() within the callback function returns the node.

#nodePostMaterial: Node

Sent just after a node gets a new material.

Calling callbacks.notificationParam() within the callback function returns the node.

#nodeRenamed: #(name, name)

Sent if a scene node is renamed.

Calling callbacks.notificationParam() within the callback function returns a 2 element array containing the old and new node name as strings

NOTE:

It is more reliable to use the #nodeNameSet callback introduced in 3ds Max 7! See below.

#nodeNameSet: #(name, name, node)

Sent when a scene node name is set or changed.

Calling callbacks.notificationParam() within the callback function returns a 3 element array containing the old name, the new name, and the node.

NOTE:

It is more reliable to use the #nodeNameSet callback introduced in 3ds Max 7! See below.

#preNodeBonePropChanged: Array of nodes

Pre bone property change.

Calling callbacks.notificationParam() within the callback function returns the array of nodes.

#postNodeBonePropChanged: Array of nodes

Post bone property change.

Calling callbacks.notificationParam() within the callback function returns the array of nodes.

#preNodeGeneralPropChanged: Array of nodes

Pre general property change.

Calling callbacks.notificationParam() within the callback function returns the array of nodes

#postNodeGeneralPropChanged: Array of nodes

Post general property change.

Calling callbacks.notificationParam() within the callback function returns the array of nodes whose properties have been changed.

#preNodeGiPropChanged: Array of nodes

Sent before Advanced Lighting property changes.

Calling callbacks.notificationParam() within the callback function returns the array of nodes whose properties will be changed.

#postNodeGiPropChanged: Array of nodes

Sent after Advanced Lighting property changes.

Calling callbacks.notificationParam() within the callback function returns the array of nodes whose properties have been changed.

#preNodeMentalrayPropChanged: Array of nodes

Sent before mental ray property changes.

Calling callbacks.notificationParam() within the callback function returns the array of nodes whose mental ray properties will be changed.

#postNodeMentalrayPropChanged: Array of nodes

Sent after mental ray property changes.

Calling callbacks.notificationParam() within the callback function returns the array of nodes whose mental ray properties have been changed.

#preNodesCloned: Array of nodes

Sent before node clone.

Calling callbacks.notificationParam() within the callback function returns the array of nodes.

#postNodesCloned: #(array of nodes, array of nodes, name)

Sent after nodes are cloned.

Calling callbacks.notificationParam() within the callback function will return a 3 element array where the first element is an array of the original nodes, the second element is an array of the cloned nodes, and the third element is a name value of #copy, #instance, or #reference, reflecting the clone type.

#preNodeUserPropChanged: Array of nodes

Pre user property change.

Calling callbacks.notificationParam() within the callback function returns the array of nodes.

#postNodeUserPropChanged: Array of nodes

Post user property change.

Calling callbacks.notificationParam() within the callback function returns the array of nodes.

#preMirrorNodes: Array of nodes

Beginning of the mirror operation.

Calling callbacks.notificationParam() within the callback function returns the array of nodes.

#postMirrorNodes: Array of nodes

End of the mirror operation.

Calling callbacks.notificationParam() within the callback function returns the array of nodes.

#selectedNodesPreDelete: Array of nodes

Sent just before selected nodes are deleted.

Calling callbacks.notificationParam() within the callback function returns the Array of nodes about to be deleted.

#selectedNodesPostDelete: undefined

Sent just after selected nodes are deleted.

#selectionSetChanged: undefined

Sent after the selection set has changed.

System Notifications:

#postSystemStartup: undefined

Sent when the software goes live.

#systemPreNew: integer

Sent just before 3ds Max is reset.

Calling callbacks.notificationParam() within the callback function will return an integer value corresponding to the option selected in the New Scene dialog:

1 - New All

2 - Keep Objects

3 - Keep Objects and Hierarchy

#systemPostNew: undefined

Sent just after 3ds Max is reset.

#systemPreReset: undefined

Sent before 3ds Max is reset.

#systemPostReset: undefined

Sent after 3ds Max is reset.

#systemPreDirChange: undefined

System path has changed - Catalogs dir modified from the Configure Path dialogue.

#systemPostDirChange: undefined

System path has changed - Catalogs dir modified from the Configure Path dialogue.

#preSystemShutdown: undefined

Sent just before the software enters the shutdown process.

#postSystemShutdown: undefined

Sent just before the software finishes the shutdown process.

#pluginLoaded: string

Sent whenever a plug-in is loaded.

Calling callbacks.notificationParam() within the callback function will return the String containing the name of the dll loaded

Radiosity Notifications:

#radiosityPluginChanged: undefined

Radiosity plugin is changed.

#radiosityProcessDone: undefined

Called when the Radiosity process has finished.

#radiosityProcessReset: undefined

Called when the Radiosity process has been reset.

#radiosityProcessStart: undefined

Called when the Radiosity process has been started.

#radiosityProcessStopped: undefined

Called when the Radiosity process has been stopped.

Undo System Notifications:

#sceneUndo: string

Sent after a scene undo is performed.
callbacks.notificationParam() returns the name of the undo entry in 3ds Max 8 and higher.

#sceneRedo: string

Sent after a scene redo is performed.
callbacks.notificationParam() returns the name of the undo entry 3ds Max 8 and higher.

EXAMPLE:

callbacks.removeScripts id:#test

callbacks.addScript #sceneRedo "format \"Redo: %\\n\" (callbacks.notificationParam())" id:#test

callbacks.addScript #sceneUndo "format \"Undo: %\\n\" (callbacks.notificationParam())" id:#test

Schematic View Notifications:

#svSelectionSetChanged: integer

Sent when the Schematic View selection set has changed. callbacks.notificationParam() returns the Schematic View index.

#svDoubleClickGraphNode: undefined

Sent when the user double-clicked a Schematic View node.

#svPreLayoutChange: integer

Sent before Schematic View applies its layout algorithm.

Calling callbacks.notificationParam() within the callback function returns the Schematic View index.

#svPostLayoutChange: integer

Sent after Schematic View applies its layout algorithm.

Calling callbacks.notificationParam() within the callback function returns the Schematic View index.

Asset Browser Notification:

#assetBrowserPreNavigate: string

Sent whenever a URL is loaded into the Asset Browser.

Calling callbacks.notificationParam() within the callback function returns the String containing the URL to browse to.

Named Selection Set Notification:

#NamedSelSetCreated: string

Sent after a named selection set is created.

Calling callbacks.notificationParam() will return the new selection set name.

Available in 3ds Max 9 and higher.

#NamedSelSetDeleted: string

Sent after a named selection set is deleted.

Calling callbacks.notificationParam() will return the name of the deleted named selections set.

Available in 3ds Max 9 and higher.

#NamedSelSetRenamed: string

Sent after a named selection set is renamed.

Calling callbacks.notificationParam() will return an array containing the old name and new name of the renamed selection set.

Available in 3ds Max 9 and higher.

Direct3D Device Notification:

#D3DPreDeviceReset: undefined

Sent before the DirectX device is being reset.

Available in 3ds Max 9 and higher.

#D3DPostDeviceReset: undefined

Sent after the DirectX device has been reset.

Available in 3ds Max 9 and higher.

Other Notifications:

#bitmapChanged: string

Sent after a bitmap is reloaded.

Calling callbacks.notificationParam() within the callback function returns the String containing bitmaptexture bitmap file name.

#byCategoryDisplayFilterChanged: undefined

Sent AFTER object categories marked to be hidden\unhidden.

#colorChanged: undefined

Sent when the system is updating it’s custom colors.

#customDisplayFilterChanged: undefined

Sent AFTER custom display filters have been activated\deactivated.

#lightingUnitDisplaySystemChange: undefined

Sent when lighting unit display system is changed.

#spacemodeChange: undefined

Sent if the user changes the reference coordinate system.

#timeunitsChange: undefined

Sent if the user changes the time format setting.

#unitsChange: undefined

Sent if the user changes the unit setting.

#viewportChange: undefined

Sent everytime the viewport parameters change, including panning, zooming and orbiting the viewport or changing the active viewport. Currently, there is no notification for viewport layout change.

#mainWindowEnabled: boolean

Sent when the main application window gets enabled.

Calling callbacks.notificationParam() within the callback function returns a Boolean value - true if main 3ds Max window is being enabled, false if another window is being enabled.

#heightMenuChanged: undefined

Sent when a user operated the height menu.

#preProgress: undefined

Sent before the progress bar is displayed.

#postProgress: undefined

Sent after the progress bar is finished.

See also

How To ... Change Objects At Render Time

Change Handlers and Callbacks

Change Handlers and When Constructs

Time Change Callback Mechanism

Viewport Redraw Callback Mechanism


Exploring the Trackbar Filter Callback Functions

To understand the way the filter function callback works, you can register a test function to explore the argument passed by the callback:

SCRIPT

fn testCallbackFilterFunction theAnimatable theParent theSubAnimIndex theGrandParent theNode = (

format "theAnimatable: %\n" theAnimatable

format "theParent: %\n" theParent

format "theSubAnimIndex: %\n" theSubAnimIndex

format "theGrandParent: %\n" theGrandParent

format "theNode: %\n\n" theNode

true ) --always returns true, means show all keys

fn testCallbackAdditionFunction arg1 arg2 = (true)

theInterface = maxOps.trackbar

theIndex = theInterface.registerFilter testCallbackFilterFunction \

callbackAdditionFunction "Test Filter" 8 active:true stopTraversal:false

If you select for example a Sphere scene node called "Sphere01", the callback will traverse all its sub-anim tracks and call the function multiple times. The function will print all arguments to the Listener.

Let's take a look at some of them for better understanding:

theAnimatable: $Sphere:Sphere01 @ [-40.683792,-17.994026,0.000000]

theParent: undefined

theSubAnimIndex: 1

theGrandParent: undefined

theNode: $Sphere:Sphere01 @ [-40.683792,-17.994026,0.000000]

In this case, the scene node Sphere01 is being filtered. There is no grand parent, there is no parent either, the animatable to be filtered is the node itself, the subAnim Index is 1. This is the "top level" of the node.

theAnimatable: Controller:Bezier_Float

theParent: $Sphere:Sphere01 @ [-40.683792,-17.994026,0.000000]

theSubAnimIndex: 1

theGrandParent: undefined

theNode: $Sphere:Sphere01 @ [-40.683792,-17.994026,0.000000]

In this case, there is no grand parent, the parent is the sphere node itself, the animatable to be filtered is the subAnim with Index 1 which is the Bezier Controller of the Visibility track. This shows that the visibility of this sphere has been animated! Otherwise, theAnimatable would be undefined.

theAnimatable: undefined

theParent: $Sphere:Sphere01 @ [-40.683792,-17.994026,0.000000]

theSubAnimIndex: 2

theGrandParent: undefined

theNode: $Sphere:Sphere01 @ [-40.683792,-17.994026,0.000000]

In this case, there is no grand parent, the parent is the sphere node itself, the animatable to be filtered is the subAnim with Index 2 which is undefined. Track 2 of every node is the Space_Warps subAnim track. You can verify by typing in the Listener:

$Sphere01[2]

$Sphere01[2].controller

--results:

SubAnim:Space_Warps

undefined

theAnimatable: Controller:Position_Rotation_Scale

theParent: $Sphere:Sphere01 @ [-40.683792,-17.994026,0.000000]

theSubAnimIndex: 3

theGrandParent: undefined

theNode: $Sphere:Sphere01 @ [-40.683792,-17.994026,0.000000]

In this case, there is no grand parent, the parent is the sphere node itself, the animatable to be filtered is the subAnim with Index 3 which is the Transformation controller, in this case a Position_Rotation_Scale controller.

theAnimatable: Controller:Position_XYZ

theParent: Controller:Position_Rotation_Scale

theSubAnimIndex: 1

theGrandParent: $Sphere:Sphere01 @ [-40.683792,-17.994026,0.000000]

theNode: $Sphere:Sphere01 @ [-40.683792,-17.994026,0.000000]

Now we go one level deeper: The grand parent is the Sphere, the parent is Transformation controller (Position_Rotation_Scale), the subAnim index inside the parent is 1 which corresponds to the Position track, in this case a Position_XYZ controller. For comparison, try typing in the Listener:

$Sphere01[3][1].controller

Controller:Position_XYZ

theAnimatable: Controller:Bezier_Float

theParent: Controller:Position_XYZ

theSubAnimIndex: 1

theGrandParent: Controller:Position_Rotation_Scale

theNode: $Sphere:Sphere01 @ [-40.683792,-17.994026,0.000000]

Now we go even deeper, the grand parent is the node Transformation track (the PRS controller), the parent is the Position track (the Position_XYZ), the animatable to be filtered is the subAnim with Index 1 which is the Bezier controller assigned to the X axis of the node position.

theAnimatable: Controller:Bezier_Float

theParent: Controller:Position_XYZ

theSubAnimIndex: 2

theGrandParent: Controller:Position_Rotation_Scale

theNode: $Sphere:Sphere01 @ [-40.683792,-17.994026,0.000000]

theAnimatable: Controller:Bezier_Float

theParent: Controller:Position_XYZ

theSubAnimIndex: 3

theGrandParent: Controller:Position_Rotation_Scale

theNode: $Sphere:Sphere01 @ [-40.683792,-17.994026,0.000000]

Same with these two tracks which are the Y and Z sub-controllers of the Position track with indices 2 and 3 respectively. This is the same as accessing

$Sphere01[3][1][3].controller

--result

Controller:Bezier_Float

theAnimatable: Controller:Euler_XYZ

theParent: Controller:Position_Rotation_Scale

theSubAnimIndex: 2

theGrandParent: $Sphere:Sphere01 @ [-40.683792,-17.994026,0.000000]

theNode: $Sphere:Sphere01 @ [-40.683792,-17.994026,0.000000]

Now we go back one level and get to the second subAnim index of the PRS controller which is the Rotation track. It has an Euler_XYZ controller assigned. The following 3 calls will traverse the X, Y and Z sub-controllers of the rotation:

theAnimatable: Controller:Bezier_Float

theParent: Controller:Euler_XYZ

theSubAnimIndex: 1

theGrandParent: Controller:Position_Rotation_Scale

theNode: $Sphere:Sphere01 @ [-40.683792,-17.994026,0.000000]

theAnimatable: Controller:Bezier_Float

theParent: Controller:Euler_XYZ

theSubAnimIndex: 2

theGrandParent: Controller:Position_Rotation_Scale

theNode: $Sphere:Sphere01 @ [-40.683792,-17.994026,0.000000]

theAnimatable: Controller:Bezier_Float

theParent: Controller:Euler_XYZ

theSubAnimIndex: 3

theGrandParent: Controller:Position_Rotation_Scale

theNode: $Sphere:Sphere01 @ [-40.683792,-17.994026,0.000000]

We go back one level again and get to the third subAnim index of the PRS controller which is the Scale track. It has a Bezier_Scale controller assigned which does not have sub-controllers:

theAnimatable: Controller:Bezier_Scale

theParent: Controller:Position_Rotation_Scale

theSubAnimIndex: 3

theGrandParent: $Sphere:Sphere01 @ [-40.683792,-17.994026,0.000000]

theNode: $Sphere:Sphere01 @ [-40.683792,-17.994026,0.000000]

theAnimatable: Sphere

theParent: $Sphere:Sphere01 @ [-40.683792,-17.994026,0.000000]

theSubAnimIndex: 4

theGrandParent: undefined

theNode: $Sphere:Sphere01 @ [-40.683792,-17.994026,0.000000]

We are back to the Sphere object level and check the 4th subAnim index which is the Sphere object.

Try this in the Listener:

$Sphere01[4]

$Sphere01[4].controller

--results:

SubAnim:Object__Sphere

undefined

theAnimatable: ReferenceTarget:ParamBlock

theParent: Sphere

theSubAnimIndex: 1

theGrandParent: $Sphere:Sphere01 @ [-40.683792,-17.994026,0.000000]

theNode: $Sphere:Sphere01 @ [-40.683792,-17.994026,0.000000]

Now we are inside the ParamBlock of the sphere. The grand parent is the Sphere node itself, the parent is the sphere, the subAnim index is 1 and the animatable track is the Parameter Block. It does not have any keys, so we can go on and traverse its subAnim tracks which contain the animatable parameters of the Sphere

theAnimatable: undefined

theParent: ReferenceTarget:ParamBlock

theSubAnimIndex: 1

theGrandParent: Sphere

theNode: $Sphere:Sphere01 @ [-40.683792,-17.994026,0.000000]

This is the first subAnim of the ParamBlock which is the Radius of the sphere. The radius of this sphere was not animated, so there is no controller assigned - theAnimatable parameter is passed as undefined.

Compare to the Listener:

$Sphere01[4][1]

$Sphere01[4][1].controller

--results:

SubAnim:Radius

undefined

theAnimatable: Controller:Bezier_Float

theParent: ReferenceTarget:ParamBlock

theSubAnimIndex: 2

theGrandParent: Sphere

theNode: $Sphere:Sphere01 @ [-40.683792,-17.994026,0.000000]

This is the second subAnim of the ParamBlock which is the Segments count of the sphere. The Segments of this sphere have been animated, so there is a Bezier_Float controller assigned!

Compare to the Listener:

$Sphere01[4][2]

$Sphere01[4][2].controller

--results:

SubAnim:Segments

Controller:Bezier_Float

This following calls traverse the remaining tracks of the ParamBlock and of the Sphere itself but do not find any controllers assigned - they all return undefined as theAnimatable:

theAnimatable: undefined

theParent: ReferenceTarget:ParamBlock

theSubAnimIndex: 3

theGrandParent: Sphere

theNode: $Sphere:Sphere01 @ [-40.683792,-17.994026,0.000000]

theAnimatable: undefined

theParent: ReferenceTarget:ParamBlock

theSubAnimIndex: 4

theGrandParent: Sphere

theNode: $Sphere:Sphere01 @ [-40.683792,-17.994026,0.000000]

theAnimatable: undefined

theParent: ReferenceTarget:ParamBlock

theSubAnimIndex: 5

theGrandParent: Sphere

theNode: $Sphere:Sphere01 @ [-40.683792,-17.994026,0.000000]

theAnimatable: undefined

theParent: ReferenceTarget:ParamBlock

theSubAnimIndex: 6

theGrandParent: Sphere

theNode: $Sphere:Sphere01 @ [-40.683792,-17.994026,0.000000]

theAnimatable: undefined

theParent: $Sphere:Sphere01 @ [-40.683792,-17.994026,0.000000]

theSubAnimIndex: 5

theGrandParent: undefined

theNode: $Sphere:Sphere01 @ [-40.683792,-17.994026,0.000000]

theAnimatable: undefined

theParent: $Sphere:Sphere01 @ [-40.683792,-17.994026,0.000000]

theSubAnimIndex: 6

theGrandParent: undefined

theNode: $Sphere:Sphere01 @ [-40.683792,-17.994026,0.000000]

theAnimatable: undefined

theParent: $Sphere:Sphere01 @ [-40.683792,-17.994026,0.000000]

theSubAnimIndex: 7

theGrandParent: undefined

theNode: $Sphere:Sphere01 @ [-40.683792,-17.994026,0.000000]

Our test function always returns true. Now that we know how it is being called, we could change it to perform actual filtering.

See Trackbar Filter Callback Function Examples for some ideas for filter functions incl. a way to limit the number of displayed keys in the trackbar to increase interaction speed with the 3ds Max UI.

See also

Trackbar Filter Callback Function Examples

Trackbar Interface


Trackbar Keys Filter Callback Function Examples

Trackbar Filter Callback Function Examples

The following examples show possible ways to implement trackbar key filter functions:

Visibility Keys Filter Function Examples

In order to register a filter that will display only Visibility keys,

YOU CAN SAY

fn filterVisibilityKeys theAnim theParent theIndex theGParent theNode =

(

if theParent != undefined then

theParent[theIndex].name == "Visibility"

else

false

)

fn testCallbackAdditionFunction arg1 arg2 = (true)

theInterface = maxOps.trackbar

theIndex = theInterface.registerFilter filterVisibilityKeys callbackAdditionFunction "Visibility" 8 active:true stopTraversal:false

The filter function will return true only when the Parent is not undefined and the subAnim indexed track of the parent is called "Visibility".

A faster and better way
to define a visibility track key filter function would be

fn filterVisibilityKeys theAnim theParent theIndex theGParent theNode = ( theIndex == 2 and theParent == theNode )

This function will return true only when the parent is the node itself and the index is 2 which corresponds to the Visibility track!

Name and Class Filter Function Examples

Obviously, you can define filter functions that will filter keys by the class or even the name of the node being traversed,

FOR EXAMPLE

--this function will show keys only of Sphere class nodes:

fn filterSphereKeys theAnim theParent theIndex theGParent theNode = ( classof theNode == Sphere )

--this function will show keys only of objects whose name starts with "Sphere":

fn filterSphereByNameKeys theAnim theParent theIndex theGParent theNode = ( substring theNode.name 1 6 == "Sphere" )

Key Count Filter Function Examples

In some cases, for example when animating using Reactor or baking animation to keys per frame using MAXScript, the trackBar could become very slow as it tries to display hundreds and even thousands of keys.

The following function will show keys only of those controllers that have less than 10 keys:

fn filterNonMassiveKeys theAnim theParent theIndex theGParent theNode = (superClassof theAnim == FloatController and theAnim.keys.count < 10 )

Create some object in the scene, for example a Box, set the Animation mode to Set Key and start animating the position by pressing the Key button. The trackBar will display the keys of the Box until you create the 10th key, after that all keys will be filtered out and disappear! You could define a global variable to control the number of keys to be displayed at a time,

EXAMPLE

global maxNumberOfKeysInTrackbar = 50

fn filterNonMassiveKeys theAnim theParent theIndex theGParent theNode = ( superClassof theAnim == FloatController and theAnim.keys.count < maxNumberOfKeysInTrackbar )

Simply changing the value stored in the global variable maxNumberOfKeysInTrackbar will control how many keys a controller may have in order to appear in the trackBar. You could even define a small dialog with a spinner and dock it in the UI to have interactive control over the keys display:

SCRIPT

(

try(cui.UnRegisterDialogBar MassiveKeysFilterCount)catch()

try(destroyDialog MassiveKeysFilterCount)catch()

 global maxNumberOfKeysInTrackbar = 20

--Define a rollout with a spinner

rollout MassiveKeysFilterCount "Keys Limit"

(

 spinner massive_count "Max.Keys:" range:[10,1000,20] type:#integer fieldwidth:40

 on massive_count changed val do

maxNumberOfKeysInTrackbar = val

select selection

)

--Create a dialog, register as DialogBar and dock at bottom

createDialog MassiveKeysFilterCount 120 25

cui.RegisterDialogBar MassiveKeysFilterCount style:#(#cui_dock_all)

cui.DockDialogBar MassiveKeysFilterCount #cui_dock_bottom

--Define, register and enable the key filter functions:

fn callbackAdditionFunction arg1 arg2 = (true)

fn filterNonMassiveKeys theAnim theParent theIndex theGParent theNode =

(

superClassof theAnim == FloatController and theAnim.keys.count < maxNumberOfKeysInTrackbar

)

theIndex = (maxOps.trackBar).registerFilter filterNonMassiveKeys callbackAdditionFunction "Massive Keys Filter" 13 active:true stopTraversal:false

)--end script

See also

Exploring the Trackbar Filter Callback Functions

Trackbar Interface


Miscellaneous Functions

freeSceneBitmaps()

Frees up all the memory used by the image file bitmap caches. This is useful if memory is fragmented with a lot of different bitmaps and you want to have just the ones currently active reloaded.

rescaleWorldUnits <factor> [ #selOnly ]

This method provides functionality similar to that of Rescale World Utility plug-in in 3ds Max. <factor> is the factor the objects should be scaled by. If #selOnly is specified then only the selected objects are scaled.

IsNetServer()

Returns true if 3ds Max is operating in network rendering mode and false if operating in normal interactive mode.

loadDllsFromDir <directory_path_string> <filename_wildcard_string>

Load all the plug-ins found in the specified directory. The directory_path_string must be terminated with a ‘\’.

EXAMPLE

LoadDllsFromDir "f:\\maxsdk\\plugin\\" "*.dlc"

scanForNewPlugins includeUnknownSuperclasses:<bool>

NEW in 3ds Max 2008: [ AVG ] Scans for new plug-in classes and exposes the classes to MAXScript. Typically called after calling loadDllsFromDir().

If includeUnknownSuperclasses: is false (the default), classes with unknown superclasses are ignored.

maxVersion()

Returns an Array with three integers like #(3000, 6, 0) with 3ds Max release number, max API number, revision number of the SDK.

getMAXWindowSize()

Returns the 3ds Max window size in pixels.

getMAXWindowPos()

Returns the 3ds Max window position in pixels relative to the upper left corner of the desktop. Returns [-4,-4] when the application is maximized.

swap <destination> <destination>

Takes two valid assignment destinations (property, array index, or variable) as arguments and swaps their values.

EXAMPLE

swap myMaterial.diffuseMap.map1 myMaterial.diffuseMap.map2


Accessing the Last Rendered Image

getLastRenderedImage [ copy:<bool> ]

The getLastRenderedImage() method returns the last image rendered via Render Scene, Render Last, or Quick Render as a bitmap value.

NEW in 3ds Max 2009: If the optional keyword argument copy: is not specified or is set to true, the bitmap will be copied into a new bitmap value. If the keyword argument copy: is specified as true, the MAXScript bitmap value will share the renderer's bitmap.

NOTE:

The renderer reuses the last rendered bitmap value when re-rendering with the same dimensions. If the dimensions have been changed, a new bitmap value will be created.

EXAMPLE:

  • Render the scene

  • Run the following code:

bm =  GetLastRenderedImage copy:false --share the bitmap

display bm

  • Change the view and render the scene again.

  • Run the following code:

display bm

RESULT: The bitmap display will update to reflect the second render.

  • Change the render size and render the scene again.

  • Run the following code:

display bm

RESULT: The bitmap display will still reflect the second render because the third render created a new bitmap value which is not referenced by the variable bm.

You still need to call free bm to release the underlying bitmap from the MAXScript bitmap value if you want the release to occur before the MAXScript bitmap value is garbage collected.

See also

Bitmap Values


Affect Region Function

float> affectRegionVal <distance_float> <falloff_float> <pinch_float> <bubble_float>

The standard affect region function, based on a distance and the three affect region parameters (same as the editable mesh). This function is a cubic curve which returns 1 at distance 0, 0 if distance is greater than falloff, and other values for distance between 0 and falloff.

This is the function used inside the Affect_Region modifier. For the different editables, one of the data channels is the selection weight. If you wanted to, you could use this function to calculate the vertex selection weights on you own.

See also

Affect_Region : Modifier


Executing External Commands

Executing External Commands and Programs

MAXScript provides two methods for executing external programs - DOSCommand() and ShellLaunch().

DOSCommand() takes a DOS command as a string and send it to the system for execution. It has the form:

DOSCommand <command_string>

EXAMPLE:

DOSCommand "delete c:\\temp\\foo.dat"

DOSCommand ("copy " + source_file + " " + dest_folder)

You can use this function to launch other programs, for example, or perform such tasks as gathering all the material texture and displacement image files in your scene into one folder.

The DOSCommand() function returns an integer which is the status result returned by the executed system command.

ShellLaunch() emulates the double-clicking on a specified file in Windows.

It has the form:

ShellLaunch <filename_string> <parameters_string>

Whatever you send to ShellLaunch will be run by the Windows shell automatically.

FOR EXAMPLE,

ShellLaunch "E:\\tests\\lookup.html" ""

would launch the default Web Browser with lookup.html.

If a file-name extension is not specified in <filename_string>, Windows will search the specified directory for executable files. If no directory is specified, Windows will search the paths in the Path environment variable for the executable file.

FOR EXAMPLE,

shellLaunch "e:/program files/ucalc/ucalc" ""

will execute the ucalc.exe file in the specified directory.

The <parameters_string> is passed to the launched application as command line parameters.

FOR EXAMPLE,

shellLaunch "e:/t.avi" "/play /loop"

will launch the application associated with .avi files, and pass /play and /loop as command line parameters.

HiddenDOSCommand <command string to execute> [startpath:unsupplied] [prompt:unsupplied] [donotwait:false]

NEW in 3ds Max 2008: [ AVG ] HiddenDOSCommand looks like DOSCommand, but runs more like ShellLaunch. Launches a dos command in a hidden window.

"startpath" allows you to set the starting folder for the command.

"prompt" allows you to set the prompt that appears on the Max prompt line (just below the viewports). If you don't change it, the command string is displayed.

"donotwait" allows you to decide whether or not you want to return control to back to maxscript while the command runs, or wait for completion.

NOTE:

You must redirect any output generated to a file if you are interested in text that would normally be printed to the console.

EXAMPLE USAGE:

HiddenDOSCommand "dir > %temp%\\hiddencmdout.tmp" startpath:"c:\\"

cmd = "echo The time is " + localTime + " >> %temp%\\hiddencmdout.tmp"

HiddenDOSCommand cmd

HiddenDOSCommand "notepad %temp%\\hiddencmdout.tmp" prompt:"Waiting for Notepad to exit"

HiddenDOSCommand "del hiddencmd.tmp" startpath:"%temp%" donotwait:true

--(Source for HiddenDOSCommand provided by Mike BiddleCombe)


Exiting and Resetting 3ds Max

The quitMAX() function lets you exit 3ds Max under script control. This function is typically used in batch processing or render scripts. The function has the form:

quitMAX [ #noPrompt ]

If the #noPrompt optional argument is not specified and there are unsaved changes in the scene, 3ds Max will prompt with its standard save changes dialog.

Additionally, you can control the scene save and undo states in 3ds Max with the following functions:

setSaveRequired <boolean>

lets you set the 3ds Max system "dirty" flag. If this flag is set or there are entries in the Undo buffer, the user is asked if they want to save the scene file on a File > New or File > Reset.

getSaveRequired()

returns true if the 3ds Max system "dirty" flag is set to true or if the Undo buffer is not empty. If the Undo buffer if not empty, this function will still return true, even if you just called setSaveRequired false.

clearUndoBuffer()

empties the Undo buffer, both providing a way to reset the undo state and another way to control the save-changes requester.

Normally, if there are entries in the Undo buffer when the scene is closed, 3ds Max will prompt with a save-changes requester. In some cases, where you are controlling undo in MAXScript, you may want to force the need for a save-changes prompt.

The resetMAXFile() function lets you reset 3ds Max under script control. This function is typically used in batch processing or render scripts. The function has the form:

resetMaxFile() [ #noPrompt ]

If the #noPrompt optional argument is not specified, 3ds Max will prompt with its standard dialog "Do you really want to reset".

NOTE:

In order to check for unsaved changes before resetting the scene, you should use checkForSave(). See 3ds Max File Loading and Saving

FOR EXAMPLE:

--CheckForSave checks whether the scene has been modified

--and issues the standard "Do you want to save your changes" dialog.

--If the user presses Yes or No, the function returns true and

--resetMaxFile will be called.

--If the user presses Cancel, the function returns false and

--resetMaxFile will not be called.

if checkForSave() do resetMaxFile()

See also

3ds Max File Loading and Saving


Pausing Script Execution

The sleep function lets you pause script execution for a given amount of time.

The form is:

sleep <time_in_seconds>

The time argument is a floating point number of seconds to sleep.

Note that the sleep time is not guaranteed to be extremely accurate. You can interrupt a sleep with the ESC key which halts all execution or with the SPACE bar which simply causes the sleep function to terminate and the script to continue executing. In both cases, you may need to hold the key down for up to half a second for MAXScript to respond.


Time Stamping

The timeStamp() function gives time-of-day in milliseconds.

The form is:

timeStamp()

The function returns the number of milliseconds since 00:00 hours that day. This is useful for timing operations (presuming you are not timing across midnight.)

EXAMPLE

start = timeStamp()

process_mesh() -- do some big job

end = timeStamp()

format "Processing took % seconds\n" ((end - start) / 1000.0)


TheHold

This structure exposes all but 3 of the theHold public SDK methods. (The 3 methods missing are not useful in the MXS scripting context.)

The undo / redo system of 3ds Max uses a global instance of the Hold class called theHold. Developers call methods of theHold object to participate in the undo / redo system.

WARNING!

These are straight SDK method exposures with no additional protection built in!

You better know what you are doing! You should run your code within try/catch blocks to keep the hold system in a consistent state.

For methods that take arguments, the arguments are checked before use, but they won't throw an error if argument is incorrect. Instead, a default string of "" will be used for Accept and SuperAccept, and &unsupplied for Restoring.

Methods:

theHold.Accept <string>

Leaves the database in its modified state and registers an undo object with the undo system. This will allow the user to undo the operation. The parameter is the string to appear in the Edit menu next to Undo or Redo.

theHold.Begin()

When a developer is about to modify the database he should check to see if theHold is 'holding'. This indicates that the Begin() method has been called. This signifies the beginning of a potential undo/redo operation. If theHold is not holding, they should call Begin(). After Begin() has been called the system is ready to accept restore objects.

In certain cases the system may already be 'holding' when the plug-in is about to begin its modification to the database. For example controllers would normally not call Begin() because it usually has been called already. A procedural object will normally call Begin() because there is no other part of the system that may alter a procedural object so Begin() would not have been called.

theHold.Cancel()

Restores the database to its previous state and throws out the restore object. This cancels the operation.

theHold.DisableUndo()

This is used internally. Plug-In developers should not call this method. Prevents Undo when Accept() is called.

theHold.EnableUndo()

This is used internally. Plug-In developers should not call this method. Allows Undo when Accept() is called.

theHold.End()

This method is used internally to 3ds Max and should not be called by a plug-in developer. It leaves the database in its modified state but throws out the restore object.

<integer>theHold.GetGlobalPutCount()

Returns the number of times Put() has been called in the current session of 3ds Max.

<boolean>theHold.Holding()

This indicates if theHold.Begin() has been called. Any operation that modifies the database checks to see if theHold is currently in a holding state. If the undo system is 'holding' it is ready to accept restore objects.

Return Value: true if theHold is holding; otherwise false.

<boolean>theHold.Redoing()

Returns nonzero if the system is redoing and zero if not.

theHold.Release()

This tosses out the restore objects since the last Begin() but still continues holding. Group several Begin-End lists into a single Super-group.

theHold.Restore()

This method will call Restore() on all the restore objects registered since the last Begin(). This restores the database to the state it was in when Begin() was called. The restore objects are NOT deleted.

<boolean>theHold.RestoreOrRedoing()

Returns nonzero if the system is restoring or redoing and zero if not.

<boolean>theHold.Restoring isUndo:<&integer> -- pass by reference

Returns nonzero if the system is restoring and zero if not. The isUndo parameter is updated to indicate if the restore is coming from an undo. It's assigned nonzero if it is; zero if not.

theHold.Resume()

This is used internally. It resumes holding if it was suspended.

theHold.SuperAccept <string>

When a developer has used SuperBegin(), this method is used to Accept. This leaves the database in its modified state and registers the restore object with the undo system. This will allow the user to undo the operation. The string parameter is the text to appear in the Edit menu next to Undo or Redo.

theHold.SuperBegin()

Normally this is NOT needed but in special cases this can be useful. This allows a developer to group a set of Begin()/Accept() sequences to be undone in one operation.

Consider the case of the user using the Shift-Move command to create a new node in the scene. There are two parts to this process. First the node must be cloned and second the position must be tracked as the user moves the mouse to place the new node in the scene. Naturally if the user wanted to Undo this operation, they would expect a single selection of the Undo command would accomplish it. However the process was not a single operation. There was the initial cloning of the node, and then the iterative process of moving the node in the scene, restoring its position, moving it again, restoring it again, etc. Cases like this are handled using methods of theHold named SuperBegin(), SuperAccept() and SuperCancel(). These allow the developer to group several restore objects together so that they may be undone via a single selection of Undo. Note that in this example it is only necessary to use SuperBegin() and SuperAccept() because the move was restoring interactively. Normally a developer does NOT need to use these methods even if they have several operations that modify the database. The undo system will automatically register all the restore objects needed as part of the undo object when theHold.Accept() is called and these may be undone using a single UNDO command.

theHold.SuperCancel()

When a developer has used SuperBegin(), this method is used to Cancel. This restores the database to its previous state and throws out the restore object. This cancels the operation.

theHold.Suspend()

Suspends the holding.

<boolean>theHold.IsSuspended()

Returns true if suspended, false otherwise.

theHold.SuperLevel()

Returns the superlevel depth. Normally 0, incremented for each call to SuperBegin, decremented for each call to SuperAccept or SuperCancel.

theHold.getCurrentUndoLevels()

Returns the current number of undo/redo entries. Available in 3ds Max 8 and higher.

theHold.getMaxUndoLevels()

Returns the maximum number of undo/redo entries - same as 'Scene Undo Levels' setting in Preference Settings dialog. Available in 3ds Max 8 and higher.

theHold.setMaxUndoLevels <int>

Sets the maximum number of undo/redo entries. Available in 3ds Max 8 and higher.

See also the SDK documentation on theHold methods.


Internet Methods

Methods:

internet.CheckConnection url:<string> [force:<bool>]

This method checks to see if a connection to the Internet can be established.

If url: is specified, a connection is attempted to the specified url, returning true if a connection was made, false if not.

If force: is true, a connection is forced. If false (the default), a connection is not forced.

NOTE:

The URL must be fully qualified, for example: url:"http://www.autodesk.com"


OLE Automation

OLE Server

OLE Automation capability is provided in MAXScript that allows 3ds Max to act as an OLE Automation server for applications such as Visual Basic, Excel, Paradox, etc. With it, you can publish MAXScript functions that can then be called from OLE Automation clients like VB and Excel to generate models or animations or return data from the current scene, etc. There is an example supplied in the script samples that defines a set of simple business graphing MAXScript functions and an Excel spreadsheet with some Excel VB-scripted menus that will pass a selection of cells across to these MAXScript functions to generate an animated bar chart.

This facility has the following features and limitations:

  • It exposes a single server object to which you can attach a list of MAXScript functions that then appear as the methods of that object to an OLE Automation client. Future releases will allow you to construct any number of OLE Automation objects and give them any number of interfaces.

  • It is registered as a separate process, local server supporting multiple use of its exposed object.

  • It does not support in-place activation or object linking and embedding and provides no containers for other OLE objects. In future versions, you will be able to pass rendered images and animations to OLE clients for direct linking and embedding.

  • It supports only the IDispatch form of interface with no accessible type information -- clients need to declare their reference to the 3ds Max server object as an untyped generic object.

  • It supports the following method argument and result data types:

integers

reals (floats)

currency (floats)

string

boolean

empty (an empty spreadsheet cell, for example)

the equivalent MAXScript value for empty is undefined

OLE Objects (interfaces)

  • You need to have 3ds Max running and MAXScript activated before OLE Clients can access 3ds Max. MAXScript is activated (and the startup.ms script run) when you first access its Utility panel rollout. Alternatively, you can use launch script facilities described in Running Scripts from the Command Line to establish an OLE server interface as soon as 3ds Max runs.

  • You need to have registered 3ds Max with Windows as an OLE server using the registration script supplied with this release. See the instructions in Setting Up MAXScript OLE Automation for details.

OLE Client

With the MAXScript OLE Automation Client system, you can use MAXScript to create OLE Automation (now called Active-X) objects within 3ds Max and control the associated OLE Automation Servers servers with MAXScript, such as making an Excel spreadsheet and inserting 3ds Max object information directly into cells there.

The function

createOLEObject()

is used for establishing a connection to OLE Auto Servers. The return value of createOLEObject() is an instance of the OLEObject class.

For example,

xl = createOLEObject "Excel.Sheet"

opens a connection to Excel and creates a sheet object and puts it in the variable xl. The single argument to this function is an OLE progID string. You can then access properties and call methods on the new OLE object.

For example,

xl.application.name

will return

"Microsoft Excel"

xl.application.visible = true

will make Excel visible on the desktop. You get properties on OLE objects with the dot '.' notation, just as you do in MAXScript. You also refer to OLE object methods as properties of the OLE object. For example, the Sheet has a method 'cells' which takes a cell coordinate and returns a Cell OLE object.

xlc = xl.application.cells 1 1

puts the top-left-hand cell into xlc. Set its value like this:

xlc.value = 123.45

The server application that was attached with createOLEObject() is released and terminated when the created MAXScript OLE object is eventually garbage-collected. You can explicitly disconnect from an OLE server application with the releaseOLEObject() function.

The form is:

releaseOLEObject <ole_object>

The OLE object becomes disabled once releaseOLEObject() has been called on it and further attempts to use it results in a descriptive error message.

You can explicitly disconnect from all active OLE server applications with the releaseAllOLEObjects() function.

Its form is:

releaseAllOLEObjects()

After calling this function, all existing OLE objects become disabled and any attempt to use them further will generate a runtime error.


Setting Up MAXScript OLE Automation

In order to use the OLE Automation features in MAXScript, you need to register 3ds Max as an OLE Automation server in the system registry:

  1. Open the Maxscrpt.reg file that ships with 3ds Max in Notepad or some other text editor.

  2. Edit this registry entry file to make sure it references the correct 3ds Max executable. Make sure the last line specifies the correct location for your 3ds Max executable. The supplied Maxscrpt.reg file points to c:\3dsmax\3dsmax.exe by default.

  3. Save the file and exit the editor.

  4. Locate the Maxscrpt.reg registry file in Windows Explorer and double-click it.

This registers 3ds Max as an OLE server. You need to do this on all the systems you expect to run 3ds Max as an OLE server.

For more information, see the following topics:

Exposing MAXScript Functions

3ds Max Specific Errors

Running the OLE Demo


Exposing MAXScript Functions

The list of OLE Automation-callable MAXScript functions is defined using the registerOLEInterface() function. It takes an array of functions to be exposed:

registerOLEInterface <array_of_fns>

For example:

registerOLEInterface #(get_object_count,

get_object_name,

get_object_position)

Each time you call this function, it replaces the current set of exposed functions with the new set -- it does not add to the existing set. The functions you expose should limit themselves to passing and returning only the following data types: integers, reals (floats), currency, string, boolean and empty (undefined).


3ds Max Specific Errors

There are two errors that may be reported to OLE clients when calling exposed MAXScript functions that are specific to 3ds Max:

#512 -- an exception or interrupt occurred while running the called function

#513 -- the called function attempted to return an unsupported data type


Running the OLE Demo

The example supplied consists of 2 files:

ole.ms -- a MAXScript script containing a grapher interface

oledemo.xls -- an Excel spreadsheet with some data and a VBA script to call the grapher

To run the example, make sure you've registered 3ds Max as an OLE server as described in Setting Up MAXScript OLE Automation , start 3ds Max and open the ole.ms script file in a script Editor window. You'll see it contains definitions for six functions and a call to registerOLEInterface() to expose some of those functions. Select the whole script and press number pad ENTER to evaluate it. This defines the functions and exposes them through OLE.

Start Excel and open the oledemo.xls spreadsheet (in the scripts directory). It contains one worksheet and one module sheet and defines a new Max menu. The worksheet contains some example data to be charted and the module sheet contains the VBA scripts that implement the menu commands in the new 3ds Max menu.

Bring up the sheet1 worksheet. It contains a table of numbers representing quarterly sales figure for a number of regions. Drag-select all the label and figure cells and choose the Max > Build Animated Chart menu. This opens a connection to 3ds Max and passes the selected column labels and figures to the appropriate functions in the exposed interface. It then brings 3ds Max to the front which chugs away for a bit building the labeled bar chart and animating the bars over the range of quarters given. Drag the slider to see the bars animate. Business graphs in 3ds Max!

The Max > Render Movie menu in Excel invokes another of the exposed MAXScript functions that creates and animates a camera in the bar chart scene and then sets off a render to an AVI file. (If you want to interrupt the render, hold down the ESC key until it stops at the beginning of the next frame - currently the MAXScript renderer interface only looks at the ESC key between frames).


MAXScript.reg - Registery file

The last line has to be edited to point at your current 3ds Max exe location.

Save the file as MAXScript.reg.

Then just double-click it in Windows Explorer to register with the Windows Registery.

;-------- cut here -------------

REGEDIT

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;

; 1. Change the path in the last line of this file to point at your

; current 3ds Max executable directory, then

; 2. Double click this file in Windows Explorer

;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;

; registration info MAX.Application (defaults to MAX.Application.4)

HKEY_CLASSES_ROOT\MAX.Application = OLE Automation MAX Application

HKEY_CLASSES_ROOT\MAX.Application\Clsid = {7FA22CB1-D26F-11d0-B260-00A0240CEEA3}

HKEY_CLASSES_ROOT\MAX.Application\CurVer = MAX.Application.4

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;; registration info MAX 4.0

; (Application Object)

HKEY_CLASSES_ROOT\MAX.Application.4 = OLE Automation MAX 4.0 Application

HKEY_CLASSES_ROOT\MAX.Application.4\Clsid = {7FA22CB1-D26F-11d0-B260-00A0240CEEA3}

HKEY_CLASSES_ROOT\CLSID\{7FA22CB1-D26F-11d0-B260-00A0240CEEA3} = OLE Automation MAX 4.0 Application

HKEY_CLASSES_ROOT\CLSID\{7FA22CB1-D26F-11d0-B260-00A0240CEEA3}\ProgID = MAX.Application.4

HKEY_CLASSES_ROOT\CLSID\{7FA22CB1-D26F-11d0-B260-00A0240CEEA3}\VersionIndependentProgID = MAX.Application

HKEY_CLASSES_ROOT\CLSID\{7FA22CB1-D26F-11d0-B260-00A0240CEEA3}\LocalServer32 = C:\3dsmax4\3dsmax.exe

;---- cut here

See also

Setting Up MAXScript OLE Automation

OLE Automation

Running the OLE Demo

Exposing MAXScript Functions

3ds Max-Specific Errors


SafeArrayWrapper Class

Instances of SafeArrayWrapper are creatable by the user and are returned by OLE methods that return SAFEARRAY values. Available in 3ds Max 8 and higher.

Constructor:

SafeArrayWrapper ()

SafeArrayWrapper < data array >

SafeArrayWrapper < data array > < lBounds array >

Properties:

<SafeArrayWrapper>.dataArray

Data array. May be 'undefined'. The dataArray is a set of nested arrays. The dataArray must be "square", ie., the number of elements in the dataArray at any given dimension is constant. For example,

dataArray[i].count is constant for i = 1 to dataArray.count, dataArray[i][j].count is constant for j = 1 to dataArray[2].count.

A runtime error will be thrown if dataArray is set to a non-square array. The depth of the array is it's dimension. A dimension 2 array is where dataArray[i][j] is a non-array data value. Setting dataArray will change the number of elements in lBoundsArray to match, with added elements having the value 0.

<SafeArrayWrapper>.lBoundsArray

Lower bounds array. May be 'undefined'. Array of size dimensions, where each element contains the lower bound of one dimension of the array. This array is used for creating the OLE SAFEARRAY value from the SafeArrayWrapper. When setting lBoundsArray, its size must be 'dimensions' or a runtime error will be thrown,

< SafeArrayWrapper >.dimensions

Number of dimensions in data and bounds array. Read only.

Methods:

copy < SafeArrayWrapper >

Returns a new SafeArrayWrapper, a deep copy is performed on the data and bounds array

Notes:

  • SafeArrayWrapper values can be passed to OLE methods as arguments, and can passed to/from ActiveX control methods. Arrays passed to OLE or ActiveX methods are automatically converted to intermediate SafeArrayWrapper values.

  • The following additional variant types for values returned by OLE objects can converted to MAXScript values: VT_UI2, VT_UI4, VT_INT, VT_NULL, VT_VOID

  • Color values are converted to VT_I4 variant values when passed to OLE objects.

Examples:

Example tests which show in part retrieving data from an SQL database using the GetRows method:

-- open sql database and get rows

DogConn = createOLEObject "ADODB.Connection"

DogConn.Open "driver={SQL Server}; server=dsqedb01.autodesk.com; database=MXSTest"

recordSet = createOLEObject "ADODB.Recordset"

recordSet.Open "SELECT * from TestTable" DogConn

a = recordSet.GetRows()

-- display data properties

a.dataArray

a.lBoundsArray

a.dimensions

-- create a new SafeArrayWrapper using data array and lbounds array

b = SafeArrayWrapper #(#(1, 1.2345, "One point two three four five", undefined, undefined, undefined), #(2, undefined, "Float is null", undefined, undefined, undefined), #(3, 0.0, " ", undefined, undefined, undefined), #(4, 123.4, undefined, undefined, undefined, undefined)) #(0, 0)

b.dataArray

b.lBoundsArray

b.dimensions

-- create a new SafeArrayWrapper using data array

d = SafeArrayWrapper a.dataArray

d.dataArray

d.lBoundsArray

d.dimensions

-- create a new SafeArrayWrapper via copy, show it is a deep copy

f = copy a

f.dataArray

f.lBoundsArray

f.dimensions

f.dataArray[1][1] = 999999

f.dataArray

a.dataArray

Example of updating an SQL database, where the update method is passed array or SafeArrayWrapper values:

DogConn=createOLEObject "ADODB.Connection"

DogConn.Open "driver={SQL Server}; server=dsqedb01.autodesk.com; database=MXSTest"

recordSet = createOLEObject "ADODB.Recordset"

recordSet.Open "SELECT * from TestTable" DogConn 1 3-- adOpenKeyset adLockOptimistic

fields=recordSet.Fields -- print out column names

count = fields.count

for i = 1 to count do (local item = fields.item (i-1); print item.name)

recordSet.GetRows() -- display current contents

recordSet.AddNew #("arbitraryFloat", "arbitraryChar", "boolean", "arbitraryInt") #(pi,"Hello World",true,42) -- add via array

recordSet.AddNew (SafeArrayWrapper #("arbitraryFloat", "arbitraryChar", "arbitraryInt")) (SafeArrayWrapper #(e/pi,"Merry xmas!", 54321)) -- add via SafeArrayWrapper

recordSet.close()

recordSet.Open "SELECT * from TestTable" DogConn

recordSet.GetRows() -- display current contents

Example of getting/setting an ActiveX control property with SafeArrayWrapper:

rollout controlR86 "Microsoft Chart Control 6.0 (SP4) (OLEDB)"

(

activeXControl ax "{3A2B370C-BA0A-11D1-B137-0000F8753F5D}" height:200 width:300 align:#left setupEvents:false

)

createdialog ControlR86 height:250 width:350

data = ControlR86.ax.chartdata -- returns SafeArrayWrapper

ControlR86.ax.chartdata = SafeArrayWrapper #(#(undefined, "R1", "R2", "R3", "R4", "R5"), #("C1", 1, 2, 3, 4, 5), #("C2", 1, 2, 3, 4, 5), #("C3", 5, 4, 3, 2, 1), #("C4", -1, 2, 3, 2, 1))

Conversion between MAXScript values and OLE variant values:

OLE à MAXScript:

VT_EMPTY VT_NULL | undefined
VT_VOID | OK
VT_UI1 VT_UI2 VT_UI4 VT_I2 VT_I4 VT_INT | Integer
VT_R4 VT_R8 VT_CY | Float
VT_BSTR | String
VT_BOOL | Boolean
VT_DISPATCH | OLEObject
VT_ARRAY | VT_VARIANT | SafeArrayWrapper

MAXScript à OLE:

SafeArrayWrapper Array | VT_ARRAY | VT_VARIANT
Integer | VT_I4
Float | VT_R4
Boolean | VT_BOOL
Color | VT_I4
String | VT_BSTR
Undefined | VT_EMPTY
OLEObject | VT_DISPATCH

The following information is taken from the document "Accessing Data with ADO" from MSDN
(ms-help://MS.MSDNQTR.2003OCT.1033/iisref/htm/AccessingDatawithADO.htm)

The following table lists OLE DB connection strings for several common data sources:

Data Source | OLE DB Connection String
Microsoft Access | Provider=Microsoft.Jet.OLEDB.4.0;Data Source=physical path to .mdb file
Microsoft SQL Server | Provider=SQLOLEDB.1;Data Source=path to database on server
Oracle | Provider=MSDAORA.1;Data Source=path to database on server
Microsoft Indexing Service | Provider=MSIDXS.1;Data Source=path to file

To provide for backward compatibility, the OLE DB Provider for ODBC supports ODBC connection string syntax. The following table lists commonly used ODBC connection strings:

Data Source Driver | ODBC Connection String
Microsoft Access | Driver={Microsoft Access Driver (*.mdb)};DBQ=physical path to .mdb file
SQL Server | DRIVER={SQL Server};SERVER=path to server
Oracle | DRIVER={Microsoft ODBC for Oracle};SERVER=path to server
Microsoft Excel | Driver={Microsoft Excel Driver (*.xls)};DBQ=physical path to .xls file; DriverID=278
Microsoft Excel 97 | Driver={Microsoft Excel Driver (*.xls)};DBQ=physical path to .xls file;DriverID=790
Paradox | Driver={Microsoft Paradox Driver (*.db)};DBQ=physical path to .db file;DriverID=26
Text | Driver={Microsoft Text Driver (*.txt;*.csv)};DBQ=physical path to .txt file
Microsoft Visual FoxPro (with a database container) | Driver= {MicrosoftVisualFoxProDriver};SourceType=DBC;SourceDb=physical path to .dbc file
Microsoft Visual FoxPro (without a database container) | Driver= {MicrosoftVisualFoxProDriver};SourceType=DBF;SourceDb=physical path to .dbf file


DotNet In MAXScript

Not all ActiveX controls have been recompiled for the 64 bit versions of Microsoft Windows. Various areas of the 3ds Max User Interface rely on ActiveX controls like TreeView and ListView. To provide an alternative implementation of these and other controls, 3ds Max 9 and higher provide access to DotNet Classes, Objects and Methods and provides a dotNetControl User Interface Control to use in MAXScript Rollouts.

NOTE ON DOTNET PERFORMANCE:

Since DotNet uses a Just in Time compiler (JIT), the first time you load or execute any managed code, the Common Language Runtime (CLR) will compile the Intermediate code into machine language code, causing a significant performance hit. The second time the code is executed in the same session, the JIT compiler will use cached binaries instead of compiling the code again and the code will execute much faster.

So for instance, the first time the Named Selection Sets tool is opened, it can take several seconds for the dialog to open. The second time it would open instantly.

DotNet Topics Index:

dotNetClass

dotNetObject

dotNetControl

dotNetMethod

dotNetMXSValue

MAXScript / DotNet Value Conversions

dotNet Struct Methods

DotNet Examples Index:

Creating A Simple DotNet MonthCalendar And Changing Its Colors

Creating A Simple Web Browser Using DotNet

Using DotNet Forms To Create MAXScript User Interfaces

Registering Windows SystemEvents Callbacks Using DotNet

Converting Scripts From Using ActiveX Controls to DotNet Controls:

Converting Scripts From Using ActiveX Controls to DotNet Controls

Converting ActiveX ListView Control to DotNet ListView Control

Converting ActiveX TreeView Control to DotNet TreeView Control

External Files Containing DotNet Examples and Related Functionality:

[3dsMax Path]\stdplugs\stdscripts\NET_ListViewWrapper.ms

This script contains useful functions for creating and managing ListView DotNet controls.

[3dsMax Path]\stdplugs\stdscripts\NET_TreeViewWrapper.ms

This script contains useful functions for creating and managing TreeView DotNet controls.

[3dsMax Path]\ui\macroscripts\Macro_BakeTextures.mcr

The Render To Texture dialog has been updated to use DotNet ListView controls instead of ActiveX controls.

[3dsMax Path]\ui\macroscripts\Macro_NamedSelSets.mcr

The Named Selection Sets editor dialog has been updated to use a DotNet TreeView control instead of an ActiveX control. It is a good example of using Drag And Drop in DotNet TreeView controls.

External Resources:

Microsoft Developers Network Library - System.Windows.Forms documentation:

http://msdn2.microsoft.com/en-us/library/system.windows.forms.aspx


dotNetClass

In 3ds Max 9 and higher, the dotNetClass wraps a DotNet System::Type and exposes the static properties, methods, and events associated with the class via reflection.

Property access uses MAXScript number data types (widened as necessary), String, Boolean, dotNetControl, dotNetObject, and dotNetClass values. Properties are accessed via the normal property access specification [control.property] and getProperty() / setProperty() methods.

Accessing a class method will create a dotNetMethod instance.

New methods are used to add and manage event handlers. These methods register and unregister callback functions to be called when the event is fired. The arguments passed back to the functions will include the class, the event name, and the arguments passed by the event handler. See dotNet Struct Methods for details.

NOTE:

There is a difference between a dotNetClass and a dotNetObject that wraps the same type.

Accessing the dotNetObject accesses the System::Type while accessing the dotNetClass access the object type described by the System::Type.

So, for example, if you called showProperties() on a dotNetClass you will get the properties of the System::Type the dotNetClass wraps, but on a dotNetObject that wraps the same type you will get the properties of System::Type itself.

Constructor:

dotNetClass {<dotNetObject> | <dotNetControl> | <class_type_string>}

Constructs a dotNetClass object. If the argument is a dotNetObject or dotNetControl object, the dotNetClass will wrap the System::Type of that object. If the argument is a string, MXS will attempt to resolve the string as a System::Type name.

EXAMPLE

theClass = dotNetClass "System.Drawing.Size"

This resolution is done using the following steps:

  • Attempt to resolve as a fully qualified name. A fully qualified name includes both the class name and the assembly name.

    • EXAMPLE

    dotNetClass "System.Windows.Forms.MonthCalendar, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

    • Attempt to resolve as a class name by looking for the name in each assembly loaded into the current AppDomain.

    • If no match is found, the name is prepended with "System." and another attempt will be made.

    • If no match is found, the name is prepended with "System.Windows.Forms." and another attempt will be made.

    Assemblies can be loaded to the Current AppDomain. See the dotNet.LoadAssembly() method in dotNet Struct Methods

    An example of adding an assembly to the current AppDomain via methods exposed by the dotNetClass itsef is:

    EXAMPLE

    assembly = dotNetClass "System.Reflection.Assembly"

    r = assembly.loadfrom "F:\\FlashTrackBar\\bin\\Debug\\FlashTrackBar.dll"

    NOTE:

    Assemblies can not be unloaded once loaded.

    Methods:

    getProperty <dotNetClass> <prop name> [asDotNetObject:<bool>]

    Returns the value of the specified property. If asDotNetObject is false (the default) the value will converted to a native MAXScript value if possible; if true, the value will always be returned as a dotNetControl or dotNetObject value.

    EXAMPLE

    o = dotNetObject "System.Windows.Forms.ImageList"

    mxs_bool = getproperty o #HandleCreated -- mxs boolean

    net_bool = getproperty o #HandleCreated asDotNetObject:true -- .net System::Boolean

    If the property accessed is an indexed property, a dotNetMethod will be returned.

    EXAMPLE

    o1 = dotNetObject "System.String" "hello!"

    chars = getProperty o1 #chars

    chars[1] -- "e"

    o1.chars[1] -- "e"

    NOTE:

    Indexed access is 0-based!

    setProperty <dotNetClass> <prop name> <value>

    Sets the value of the specified property. If the value specified is a native MAXScript value, it will be converted to the proper DotNet value if possible.

    getPropNames <dotNetClass> [showStaticOnly:<bool>] [declaredOnTypeOnly:<bool>]

    Returns an array of property names exposed by the class.

    If showStaticOnly is true (the default), only static properties are shown; if false both static and instance properties are shown.

    If declaredOnTypeOnly is true, only properties declared on the specified class are shown; if false (the default) properties on the class and the classes it derives from are shown.

    The results of this method are sorted by name. The properties returned actually contain two different things in terms of DotNet - properties and fields. The properties are shown first in sorted order, then the fields are shown in sorted order.

    showProperties <dotNetClass> ["prop_pat"] [to:<stream>] [showStaticOnly:<bool>] [showMethods:<bool>] [showAttributes:<bool>] [declaredOnTypeOnly:<bool>]

    Displays the properties exposed by the class whose name matches the property pattern.

    If to is not specified, the output goes to Listerner, otherwise the output goes to the specified stream.

    If showStaticOnly is true (the default), only static properties are shown; if false both static and instance properties are shown.

    If showMethods is true, the signature of the get and set methods (if any) are shown; defaults to false.

    If showAttributes is true, the attributes associated with the property are shown; defaults to false.

    If declaredOnTypeOnly is true, only properties declared on the specified class are shown; if false (the default) properties on the class and the classes it derives from are shown.

    The results of this method are sorted by name. The properties returned actually contain two different things in terms of DotNet - properties and fields. The properties are shown first in sorted order, then the fields are shown in sorted order.

    showMethods <dotNetClass> ["prop_pat"] [to:<stream>] [showStaticOnly:<bool>] [showSpecial:<bool>] [showAttributes:<bool>] [declaredOnTypeOnly:<bool>]

    Displays the methods exposed by the class whose name matches the property pattern.

    If to is not specified, the output goes to Listerner, otherwise the output goes to the specified stream.

    If showStaticOnly is true (the default), only static properties are shown; if false both static and instance properties are shown.

    If showSpecial is true, methods that are not normally called by the user (such as a method to set a property value or to invoke an event handler) are shown; defaults to false.

    If showAttributes is true, the attributes associated with the property are shown; defaults to false.

    If declaredOnTypeOnly is true, only properties declared on the specified class are shown; if false (the default) properties on the class and the classes it derives from are shown.

    The results are sorted by name. Secondary sort is performed based on the number of parameters.

    showEvents <dotNetClass> ["prop_pat"] [to:<stream>] [showStaticOnly:<bool>] [declaredOnTypeOnly:<bool>]

    Displays the events exposed by the class whose name matches the property pattern.

    If to is not specified, the output goes to Listerner, otherwise the output goes to the specified stream.

    If showStaticOnly is true (the default), only static properties are shown; if false both static and instance properties are shown.

    If declaredOnTypeOnly is true, only properties declared on the specified class are shown; if false (the default) properties on the class and the classes it derives from are shown.

    The results are sorted by name.

    dotNet.showConstructors <dotNetClass> [to:<stream>]

    Displays the constructors exposed by the class.

    If to is not specified, the output goes to Listerner, otherwise the output goes to the specified stream.

    The results are sorted by name. Secondary sort is performed based on the number of parameters.

    See also

    DotNet In MAXScript

    dotNet Struct Methods


dotNetObject

In 3ds Max 9 and higher, the dotNetObject value class wraps instances of DotNet objects. It is the MAXScript wrapper class around a DotNet System::Object object.

The dotNetObject class exposes the properties, methods, and events associated with the object via reflection.

Property access uses MAXScript number data types (widened as necessary), String, Boolean, dotNetControl, dotNetObject, and dotNetClass values.

Properties of dotNetObject can be accessed via the normal property access specification [object.property] and the getProperty() / setProperty() methods.

Accessing an object method will create a dotNetMethod instance.

New methods are used to add and manage event handlers. These methods register and unregister callback functions to be called when the event is fired. The arguments passed back to the functions include the object, the event name, and the arguments passed by the event handler. See dotNet Struct Methods for details.

NOTE:

There is a difference between a dotNetClass and a dotNetObject that wraps the same type.

Accessing the dotNetObject accesses the System::Type while accessing the dotNetClass access the object type described by the System::Type.

So, for example, if you called showProperties() on a dotNetClass you will get the properties of the System::Type the dotNetClass wraps, but on a dotNetObject that wraps the same type you will get the properties of System::Type itself.

Constructor:

dotNetObject { <dotNetClass> | <class_type_string> } ... additional args as needed ...

Constructs a dotNetObject object.

A dotNetObject can be created either using the class type string or from a dotNetClass:

EXAMPLE

o1 = dotNetObject "System.Drawing.Size" 10 20 -- existing object

o2 = dotNetClass "System.Drawing.Size"

o3 = dotNetObject o2 10 20 -- new object from class

Operators:

==

!=

Methods:

getProperty <dotNetObject> <prop name> [asDotNetObject:<bool>]

Returns the value of the specified property.

If asDotNetObject is false (the default) the value will converted to a native MAXScript value if possible; if true, the value will always be returned as a dotNetControl or dotNetObject value.

setProperty <dotNetObject> <prop name> <value>

Sets the value of the specified property. If the value specified is a native MAXScript value, it will be converted to the proper DotNet value if possible.

getPropNames <dotNetObject> [showStaticOnly:<bool>] [declaredOnTypeOnly:<bool>]

Returns an array of property names exposed by the object.

If showStaticOnly is true (the default), only static properties are shown; if false both static and instance properties are shown.

If declaredOnTypeOnly is true, only properties declared on the specified object are shown; if false (the default) properties on the object and the classes it derives from are shown.

The results of this method are sorted by name. The properties returned actually contain two different things in terms of DotNet - properties and fields. The properties are shown first in sorted order, then the fields are shown in sorted order.

showProperties <dotNetObject> ["prop_pat"] [to:<stream>] [showStaticOnly:<bool>] [showMethods:<bool>] [showAttributes:<bool>] [declaredOnTypeOnly:<bool>]

Displays the properties exposed by the object whose name matches the property pattern.

If to is not specified, the output goes to Listerner, otherwise the output goes to the specified stream.

If showStaticOnly is true (the default), only static properties are shown; if false both static and instance properties are shown.

If showMethods is true, the signature of the get and set methods (if any) are shown; defaults to false.

If showAttributes is true, the attributes associated with the property are shown; defaults to false.

If declaredOnTypeOnly is true, only properties declared on the specified object are shown; if false (the default) properties on the object and the classes it derives from are shown.

The results of this method are sorted by name. The properties returned actually contain two different things in terms of DotNet - properties and fields. The properties are shown first in sorted order, then the fields are shown in sorted order.

showMethods <dotNetObject> ["prop_pat"] [to:<stream>] [showStaticOnly:<bool>] [showSpecial:<bool>] [showAttributes:<bool>] [declaredOnTypeOnly:<bool>]

Displays the methods exposed by the object whose name matches the property pattern.

If to is not specified, the output goes to Listerner, otherwise the output goes to the specified stream.

If showStaticOnly is true (the default), only static properties are shown; if false both static and instance properties are shown.

If showSpecial is true, methods that are not normally called by the user (such as a method to set a property value or to invoke an event handler) are shown; defaults to false.

If showAttributes is true, the attributes associated with the property are shown; defaults to false.

If declaredOnTypeOnly is true, only properties declared on the specified object are shown; if false (the default) properties on the object and the classes it derives from are shown.

The results are sorted by name. Secondary sort is performed based on the number of parameters.

showEvents <dotNetObject> ["prop_pat"] [to:<stream>] [showStaticOnly:<bool>] [declaredOnTypeOnly:<bool>]

Displays the events exposed by the object whose name matches the property pattern.

If to is not specified, the output goes to Listerner, otherwise the output goes to the specified stream.

If showStaticOnly is true (the default), only static properties are shown; if false both static and instance properties are shown.

If declaredOnTypeOnly is true, only properties declared on the specified object are shown; if false (the default) properties on the object and the classes it derives from are shown.

The results are sorted by name.

dotNet.showConstructors <dotNetClass> [to:<stream>]

Displays the constructors exposed by the object.

If to is not specified, the output goes to Listerner, otherwise the output goes to the specified stream.

The results are sorted by name. Secondary sort is performed based on the number of parameters.

See also

DotNet In MAXScript

dotNet Struct Methods


dotNetControl

In 3ds Max 9 and higher, the dotNetControl class exposes the properties, methods, and events associated with the control via reflection.

Property access will take/get MAXScript number data types (widened as necessary), string, Boolean, dotNetControl, dotNetObject, and dotNetClass values. Property access will be via the normal property access specification [control.property] and get/setProperty.

Accessing a control method will create a dotNetMethod instance.

The event handlers for dotNetControl are handled in the same way as all UI controls use event handlers - the user defines a named scripted event handler in the rollout definition that is called when the event with the same name is fired on the control.

New methods are used to add and manage event handlers. These methods register and unregister callback functions to be called when the event is fired. The arguments passed back to the functions include the object, the event name, and the arguments passed by the event handler. See dotNet Struct Methods for details.

Constructor:

dotNetControl <name> <class_type_string> [{<property_name>:<value>}]

keyword arguments are applied to the control after the control is created and event handlers have been assigned, but before the control is added to the rollout.

Properties:

.focus

When set to true, the control will have focus. When set to false (default), the control will not have focus.

.enable

When set to false, the control will be disabled. When set to true (default), the control will be available.

Methods:

getProperty <dotNetControl> <prop name> [asDotNetObject:<bool>]

Returns the value of the specified property.

If asDotNetObject is false (the default) the value will converted to a native MAXScript value if possible; if true, the value will always be returned as a dotNetControl or dotNetObject value.

setProperty <dotNetControl> <prop name> <value>

Sets the value of the specified property. If the value specified is a native MAXScript value, it will be converted to the proper DotNet value if possible.

getPropNames <dotNetControl> [showStaticOnly:<bool>] [declaredOnTypeOnly:<bool>]

Returns an array of property names exposed by the control.

If showStaticOnly is true (the default), only static properties are shown; if false both static and instance properties are shown.

If declaredOnTypeOnly is true, only properties declared on the specified control are shown; if false (the default) properties on the control and the classes it derives from are shown.

The results of this method are sorted by name. The properties returned actually contain two different things in terms of DotNet - properties and fields. The properties are shown first in sorted order, then the fields are shown in sorted order.

showProperties <dotNetControl> ["prop_pat"] [to:<stream>] [showStaticOnly:<bool>] [showMethods:<bool>] [showAttributes:<bool>] [declaredOnTypeOnly:<bool>]

Displays the properties exposed by the control whose name matches the property pattern.

If to is not specified, the output goes to Listerner, otherwise the output goes to the specified stream.

If showStaticOnly is true (the default), only static properties are shown; if false both static and instance properties are shown.

If showMethods is true, the signature of the get and set methods (if any) are shown; defaults to false.

If showAttributes is true, the attributes associated with the property are shown; defaults to false.

If declaredOnTypeOnly is true, only properties declared on the specified control are shown; if false (the default) properties on the control and the classes it derives from are shown.

The results of this method are sorted by name. The properties returned actually contain two different things in terms of DotNet - properties and fields. The properties are shown first in sorted order, then the fields are shown in sorted order.

showMethods <dotNetControl> ["prop_pat"] [to:<stream>] [showStaticOnly:<bool>] [showSpecial:<bool>] [showAttributes:<bool>] [declaredOnTypeOnly:<bool>]

Displays the methods exposed by the control whose name matches the property pattern.

If to is not specified, the output goes to Listerner, otherwise the output goes to the specified stream.

If showStaticOnly is true (the default), only static properties are shown; if false both static and instance properties are shown.

If showSpecial is true, methods that are not normally called by the user (such as a method to set a property value or to invoke an event handler) are shown; defaults to false.

If showAttributes is true, the attributes associated with the property are shown; defaults to false.

If declaredOnTypeOnly is true, only properties declared on the specified control are shown; if false (the default) properties on the control and the classes it derives from are shown.

The results are sorted by name. Secondary sort is performed based on the number of parameters.

showEvents <dotNetControl> ["prop_pat"] [to:<stream>] [showStaticOnly:<bool>] [declaredOnTypeOnly:<bool>]

Displays the events exposed by the control whose name matches the property pattern.

If to is not specified, the output goes to Listerner, otherwise the output goes to the specified stream.

If showStaticOnly is true (the default), only static properties are shown; if false both static and instance properties are shown.

If declaredOnTypeOnly is true, only properties declared on the specified control are shown; if false (the default) properties on the control and the classes it derives from are shown.

The results are sorted by name.

dotNet.showConstructors <dotNetClass> [to:<stream>]

Displays the constructors exposed by the control.

If to is not specified, the output goes to Listerner, otherwise the output goes to the specified stream.

DotNet controls can be created by the class name of the control.

EXAMPLE

dotNetControl f1 "System.Windows.Forms.MonthCalendar" align:#left height:180

To create a class instance, DotNet needs more than just this information, it also needs the assembly info in the constructor string. The following shows the full string needed, and will also be valid:

EXAMPLE

dotNetControl f1 "System.Windows.Forms.MonthCalendar, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" align:#left height:180

In most cases, the user doesn't care about the assembly version, and just wants to specify the class name. The MAXScript UI control wrapper will try to create the control using the specified class name, and if the control cannot be created it will append the "System.Windows.Forms" assembly info to the class name and try again.

If the class name specified still cannot be resolved, the class name will be prepended with "System." and another attempt will be made. Thus, this will be valid:

EXAMPLE

dotNetControl f1 "Windows.Forms.MonthCalendar" align:#left height:180

If the class name still cannot be resolved, the class name will be prepended with "System.Windows.Forms." and another attempt will be made. Thus, this will be valid:

EXAMPLE

dotNetControl f1 "MonthCalendar" align:#left height:180

See also

DotNet In MAXScript


dotNetMethod

In 3ds Max 9 and higher, instances of dotNetMethod point to the object that owns the method and to the method itself inside that object. The instance implements the necessary internal Apply methods so that the method can be invoked, passing in the specified argument list. This is similar to the way ActiveX methods are handled.

See also

DotNet In MAXScript


dotNetMXSValue

The dotNetMXSValue value class holds another value. The dotNetMXSValue can be assigned to .net objects. A "proxy" DotNet value is actually stored to the DotNet object, and that proxy points back to the dotNetMXSValue.

As long as the DotNet object holds the proxy value, the dotNetMXSValue and the value it holds are protected from garbage collection.

Available in 3ds Max 9 and higher.

EXAMPLE

a = color 10 20 30 --MAXScript color value

b = dotNetMXSValue a --DotNet value holding the MAXScript value

tv = dotnetobject "treeview" --DotNet TreeView control

tv.tag = b --The tag is set to the color

tv.tag

a=b=undefined --Both a and b are set to undefined

gc() --and manual garbage collection is requested

--BUT the color value and dotNetMXSValue protected are from

--collection because the treeview instance holds

--the dotNetMXSValue proxy!

tv = undefined --assign undefined to the treeview variable

gc() --and request garbage collection again

--This time both the color value and the dotNetMXSValue are not

--protected from collection

Note that the above garbage collection may not delete the color value and the dotNetMXSValue because the DotNet garbage collector has not deleted the treeview and freed its values yet. One can force manual garbage collection of DotNet:

EXAMPLE

dgc = dotnetclass "system.gc"

dgc.collect()

gc() -- color value and dotNetMXSValue collected

See also

DotNet In MAXScript


MAXScript / DotNet Value Conversions

The following table shows the native MAXScript value types and the DotNet value types they can be converted to in 3ds Max 9 and higher.

MAXScript type | DotNet type
Integer, Integer64, IntegerPtr, Float, Double, MSTime | Byte, SByte, Decimal, Int16, UInt16, Int32, UInt32, IntPtr, UIntPtr, Int64, UInt64, Single, Double
Boolean | Boolean
String | String, Char array

The following table shows the DotNet value types and the native MAXScript value type they are converted to.

DotNet type | MAXScript type
Byte, SByte, Decimal, Int16, UInt16, Int32, UInt32, | Integer
Int64, UInt64 | Integer64
IntPtr, UIntPtr | IntegerPtr
Single | Float
Double | Double
Boolean | Boolean
String, Char array | String

See also

DotNet In MAXScript


dotNet Struct Methods

The dotNet Struct provides additional MAXScript methods for managing dotNet objects, classes, assemblies, event handlers etc.

Available in 3ds Max 9 and higher.

<dotNetObject>dotNet.loadAssembly <assembly>

This method loads the specified assembly. The assembly can be specified as an assembly name or the filename of the dll containing the assembly.

The method first attempts to load an assembly from the application directory or from the global assembly cache using the assembly name. If that fails, a dll with the assembly name is searched for in the directory containing the primary .net assemblies.

If the assembly is found and successfully loaded, a dotNetObject value wrapping the .net assembly value is returned, otherwise a value of undefined is returned.

FOR EXAMPLE

dotnet.loadAssembly "system.xml"

dotnet.loadAssembly "system.xml.dll"

dotnet.loadAssembly "C:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727\\system.xml.dll"

dotnet.loadAssembly "C:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727\\system.xml"

NOTE:

You can do the same via existing dotNet classes:

FOR EXAMPLE

assembly = dotNetClass "System.Reflection.Assembly"
r = assembly.loadfrom "F:\\FlashTrackBar\\bin\\Debug\\FlashTrackBar.dll"

dotNet.addEventHandler()

This method adds an event handler to a dotNetControl.

If two arguments are specified for dotNetControl event handlers, the first argument should contain the sender, the second the eventArg.

If the event handler doesn't specify any argsuments, none are passed.

If the event handler specifies one argument, then the eventArg is passed.

NOTE:

You can register multiple functions with differing number of argsuments for the same event using dotNet.addEventHandler().

dotNet.removeAllEventHandlers()

Removes all event handlers from the specified dotNetControl.

dotNet.removeEventHandler()

Removes the specified event handlers from the given dotNetControl.

dotNet.removeEventHandlers()

Removes the specified event handlers from the given dotNetControl.

dotNet.showConstructors [<dotNetClass> | <dotNetObject> | <dotNetControl>] [to:<stream>]

Displays the constructors exposed by the specified DotNetClass, DotNetObject or DotNetControl.

If to is not specified, the output goes to Listerner, otherwise the output goes to the specified stream.

dotNet.getType <type_string>

Returns a dotNetObject value that wraps the System:Type specified by the type string.

dotnet.combineEnums {<dotNetObject> | <number>}+

Combines System::Enum-derived objects that are to be treated as bit fields (these have a FlagsAttribute attribute). The System::Enum-derived objects must all be of the same type. The return value is of that type. If a number is specified, at least one System::Enum-derived object must also be specified (to provide the type).

dotnet.CompareEnums {<dotNetObject> | <number>} {<dotNetObject> | <number>}

Performs bit-wise comparison of the two value. Returns true if at least one corresponding bit is set in each value.

EXAMPLE

BindingFlags= dotNetClass "System.Reflection.BindingFlags"

dotNetClass:System.Reflection.BindingFlags

BindingFlags.Static.value__

8

BindingFlags.Public.value__

16

BindingFlags.FlattenHierarchy.value__

64

res = dotNet.combineEnums BindingFlags.Static BindingFlags.Public 2 dotNetObject:System.Reflection.BindingFlags

res.value__

26

dotNet.compareEnums res 1

false

dotNet.compareEnums res BindingFlags.Static

true

dotNet.compareEnums res BindingFlags.Public

true

dotNet.compareEnums res BindingFlags.FlattenHierarchy

false

See also

DotNet In MAXScript


Creating A Simple DotNet MonthCalendar And Changing Its Colors

The following example creates a simple dialog with a MonthCalendar dotNet control and assigns a mousedown event handler which prints the properties, methods and events:

EXAMPLE

rollout test "test" height:200 width:220

(

 dotNetControl f1 "MonthCalendar" align:#left height:180 width:200

 on f1 mousedown val do

 (

  format "in mousedown handler: arg: %\n" val

  format "showproperties:\n"

  showproperties val

  format "showmethods:\n"

  showmethods val

  format "showevents:\n"

  showevents val

  format "getpropnames : %\n" (getpropnames val)

  format "prop values:\n"

 )

)

createdialog test escapeEnable:true

After evaluation, we have a dialog showing a Month Calendar DotNet Contol with default settings. We can see the constructor of the control using the dotnet.showconstructors() method:

EXAMPLE

--see the constructor of the control

dotnet.showConstructors test.f1

System.Windows.Forms.MonthCalendar()

true

Now let's change the calendar's appearance by modifying its colors:

EXAMPLE

--First we list all properties of the control

--and look to find those controlling some of its colors:

showproperties test.f1

.AccessibilityObject : <System.Windows.Forms.AccessibleObject>, read-only

.AccessibleDefaultActionDescription : <System.String>

.AccessibleDescription : <System.String>

.AccessibleName : <System.String>

.AccessibleRole : <System.Windows.Forms.AccessibleRole>

.AllowDrop : <System.Boolean>

.Anchor : <System.Windows.Forms.AnchorStyles>

.AnnuallyBoldedDates : <System.DateTime[]>

.AutoScrollOffset : <System.Drawing.Point>

.AutoSize : <System.Boolean>

.BackColor : <System.Drawing.Color>

.BackgroundImage : <System.Drawing.Image>

.BackgroundImageLayout : <System.Windows.Forms.ImageLayout>

.BindingContext : <System.Windows.Forms.BindingContext>

.BoldedDates : <System.DateTime[]>

.Bottom : <System.Int32>, read-only

.Bounds : <System.Drawing.Rectangle>

.CalendarDimensions : <System.Drawing.Size>

.CanFocus : <System.Boolean>, read-only

.CanSelect : <System.Boolean>, read-only

.Capture : <System.Boolean>

.CausesValidation : <System.Boolean>

.CheckForIllegalCrossThreadCalls : <System.Boolean>, static

.ClientRectangle : <System.Drawing.Rectangle>, read-only

.ClientSize : <System.Drawing.Size>

.CompanyName : <System.String>, read-only

.Container : <System.ComponentModel.IContainer>, read-only

.ContainsFocus : <System.Boolean>, read-only

.ContextMenu : <System.Windows.Forms.ContextMenu>

.ContextMenuStrip : <System.Windows.Forms.ContextMenuStrip>

.Controls : <System.Windows.Forms.Control+ControlCollection>, read-only

.Created : <System.Boolean>, read-only

.Cursor : <System.Windows.Forms.Cursor>

.DataBindings : <System.Windows.Forms.ControlBindingsCollection>, read-only

.DefaultBackColor : <System.Drawing.Color>, read-only, static

.DefaultFont : <System.Drawing.Font>, read-only, static

.DefaultForeColor : <System.Drawing.Color>, read-only, static

.DisplayRectangle : <System.Drawing.Rectangle>, read-only

.Disposing : <System.Boolean>, read-only

.Dock : <System.Windows.Forms.DockStyle>

.Enabled : <System.Boolean>

.FirstDayOfWeek : <System.Windows.Forms.Day>

.Focused : <System.Boolean>, read-only

.Font : <System.Drawing.Font>

.ForeColor : <System.Drawing.Color>

.Handle : <System.IntPtr>, read-only

.HasChildren : <System.Boolean>, read-only

.Height : <System.Int32>

.ImeMode : <System.Windows.Forms.ImeMode>

.InvokeRequired : <System.Boolean>, read-only

.IsAccessible : <System.Boolean>

.IsDisposed : <System.Boolean>, read-only

.IsHandleCreated : <System.Boolean>, read-only

.IsMirrored : <System.Boolean>, read-only

.LayoutEngine : <System.Windows.Forms.Layout.LayoutEngine>, read-only

.Left : <System.Int32>

.Location : <System.Drawing.Point>

.Margin : <System.Windows.Forms.Padding>

.MaxDate : <System.DateTime>

.MaximumSize : <System.Drawing.Size>

.MaxSelectionCount : <System.Int32>

.MinDate : <System.DateTime>

.MinimumSize : <System.Drawing.Size>

.ModifierKeys : <System.Windows.Forms.Keys>, read-only, static

.MonthlyBoldedDates : <System.DateTime[]>

.MouseButtons : <System.Windows.Forms.MouseButtons>, read-only, static

.MousePosition : <System.Drawing.Point>, read-only, static

.Name : <System.String>

.Padding : <System.Windows.Forms.Padding>

.Parent : <System.Windows.Forms.Control>

.PreferredSize : <System.Drawing.Size>, read-only

.ProductName : <System.String>, read-only

.ProductVersion : <System.String>, read-only

.RecreatingHandle : <System.Boolean>, read-only

.Region : <System.Drawing.Region>

.Right : <System.Int32>, read-only

.RightToLeft : <System.Windows.Forms.RightToLeft>

.RightToLeftLayout : <System.Boolean>

.ScrollChange : <System.Int32>

.SelectionEnd : <System.DateTime>

.SelectionRange : <System.Windows.Forms.SelectionRange>

.SelectionStart : <System.DateTime>

.ShowToday : <System.Boolean>

.ShowTodayCircle : <System.Boolean>

.ShowWeekNumbers : <System.Boolean>

.SingleMonthSize : <System.Drawing.Size>, read-only

.Site : <System.ComponentModel.ISite>

.Size : <System.Drawing.Size>

.TabIndex : <System.Int32>

.TabStop : <System.Boolean>

.Tag : <System.Object>

.Text : <System.String>

.TitleBackColor : <System.Drawing.Color>

.TitleForeColor : <System.Drawing.Color>

.TodayDate : <System.DateTime>

.TodayDateSet : <System.Boolean>, read-only

.Top : <System.Int32>

.TopLevelControl : <System.Windows.Forms.Control>, read-only

.TrailingForeColor : <System.Drawing.Color>

.UseWaitCursor : <System.Boolean>

.Visible : <System.Boolean>

.Width : <System.Int32>

.WindowTarget : <System.Windows.Forms.IWindowTarget>

true

Using DotNet Color Presets

We want to change the color properties of the control.
Let's take a look at their own properties first:

showproperties test.f1.ForeColor --see all properties of the color

.A : <System.Byte>, read-only

.AliceBlue : <System.Drawing.Color>, read-only, static

.AntiqueWhite : <System.Drawing.Color>, read-only, static

.Aqua : <System.Drawing.Color>, read-only, static

.Aquamarine : <System.Drawing.Color>, read-only, static

.Azure : <System.Drawing.Color>, read-only, static

.B : <System.Byte>, read-only

.Beige : <System.Drawing.Color>, read-only, static

.Bisque : <System.Drawing.Color>, read-only, static

.Black : <System.Drawing.Color>, read-only, static

.BlanchedAlmond : <System.Drawing.Color>, read-only, static

.Blue : <System.Drawing.Color>, read-only, static

.BlueViolet : <System.Drawing.Color>, read-only, static

.Brown : <System.Drawing.Color>, read-only, static

.BurlyWood : <System.Drawing.Color>, read-only, static

.CadetBlue : <System.Drawing.Color>, read-only, static

.Chartreuse : <System.Drawing.Color>, read-only, static

.Chocolate : <System.Drawing.Color>, read-only, static

.Coral : <System.Drawing.Color>, read-only, static

.CornflowerBlue : <System.Drawing.Color>, read-only, static

.Cornsilk : <System.Drawing.Color>, read-only, static

.Crimson : <System.Drawing.Color>, read-only, static

.Cyan : <System.Drawing.Color>, read-only, static

.DarkBlue : <System.Drawing.Color>, read-only, static

.DarkCyan : <System.Drawing.Color>, read-only, static

.DarkGoldenrod : <System.Drawing.Color>, read-only, static

.DarkGray : <System.Drawing.Color>, read-only, static

.DarkGreen : <System.Drawing.Color>, read-only, static

.DarkKhaki : <System.Drawing.Color>, read-only, static

.DarkMagenta : <System.Drawing.Color>, read-only, static

.DarkOliveGreen : <System.Drawing.Color>, read-only, static

.DarkOrange : <System.Drawing.Color>, read-only, static

.DarkOrchid : <System.Drawing.Color>, read-only, static

.DarkRed : <System.Drawing.Color>, read-only, static

.DarkSalmon : <System.Drawing.Color>, read-only, static

.DarkSeaGreen : <System.Drawing.Color>, read-only, static

.DarkSlateBlue : <System.Drawing.Color>, read-only, static

.DarkSlateGray : <System.Drawing.Color>, read-only, static

.DarkTurquoise : <System.Drawing.Color>, read-only, static

.DarkViolet : <System.Drawing.Color>, read-only, static

.DeepPink : <System.Drawing.Color>, read-only, static

.DeepSkyBlue : <System.Drawing.Color>, read-only, static

.DimGray : <System.Drawing.Color>, read-only, static

.DodgerBlue : <System.Drawing.Color>, read-only, static

.Firebrick : <System.Drawing.Color>, read-only, static

.FloralWhite : <System.Drawing.Color>, read-only, static

.ForestGreen : <System.Drawing.Color>, read-only, static

.Fuchsia : <System.Drawing.Color>, read-only, static

.G : <System.Byte>, read-only

.Gainsboro : <System.Drawing.Color>, read-only, static

.GhostWhite : <System.Drawing.Color>, read-only, static

.Gold : <System.Drawing.Color>, read-only, static

.Goldenrod : <System.Drawing.Color>, read-only, static

.Gray : <System.Drawing.Color>, read-only, static

.Green : <System.Drawing.Color>, read-only, static

.GreenYellow : <System.Drawing.Color>, read-only, static

.Honeydew : <System.Drawing.Color>, read-only, static

.HotPink : <System.Drawing.Color>, read-only, static

.IndianRed : <System.Drawing.Color>, read-only, static

.Indigo : <System.Drawing.Color>, read-only, static

.IsEmpty : <System.Boolean>, read-only

.IsKnownColor : <System.Boolean>, read-only

.IsNamedColor : <System.Boolean>, read-only

.IsSystemColor : <System.Boolean>, read-only

.Ivory : <System.Drawing.Color>, read-only, static

.Khaki : <System.Drawing.Color>, read-only, static

.Lavender : <System.Drawing.Color>, read-only, static

.LavenderBlush : <System.Drawing.Color>, read-only, static

.LawnGreen : <System.Drawing.Color>, read-only, static

.LemonChiffon : <System.Drawing.Color>, read-only, static

.LightBlue : <System.Drawing.Color>, read-only, static

.LightCoral : <System.Drawing.Color>, read-only, static

.LightCyan : <System.Drawing.Color>, read-only, static

.LightGoldenrodYellow : <System.Drawing.Color>, read-only, static

.LightGray : <System.Drawing.Color>, read-only, static

.LightGreen : <System.Drawing.Color>, read-only, static

.LightPink : <System.Drawing.Color>, read-only, static

.LightSalmon : <System.Drawing.Color>, read-only, static

.LightSeaGreen : <System.Drawing.Color>, read-only, static

.LightSkyBlue : <System.Drawing.Color>, read-only, static

.LightSlateGray : <System.Drawing.Color>, read-only, static

.LightSteelBlue : <System.Drawing.Color>, read-only, static

.LightYellow : <System.Drawing.Color>, read-only, static

.Lime : <System.Drawing.Color>, read-only, static

.LimeGreen : <System.Drawing.Color>, read-only, static

.Linen : <System.Drawing.Color>, read-only, static

.Magenta : <System.Drawing.Color>, read-only, static

.Maroon : <System.Drawing.Color>, read-only, static

.MediumAquamarine : <System.Drawing.Color>, read-only, static

.MediumBlue : <System.Drawing.Color>, read-only, static

.MediumOrchid : <System.Drawing.Color>, read-only, static

.MediumPurple : <System.Drawing.Color>, read-only, static

.MediumSeaGreen : <System.Drawing.Color>, read-only, static

.MediumSlateBlue : <System.Drawing.Color>, read-only, static

.MediumSpringGreen : <System.Drawing.Color>, read-only, static

.MediumTurquoise : <System.Drawing.Color>, read-only, static

.MediumVioletRed : <System.Drawing.Color>, read-only, static

.MidnightBlue : <System.Drawing.Color>, read-only, static

.MintCream : <System.Drawing.Color>, read-only, static

.MistyRose : <System.Drawing.Color>, read-only, static

.Moccasin : <System.Drawing.Color>, read-only, static

.Name : <System.String>, read-only

.NavajoWhite : <System.Drawing.Color>, read-only, static

.Navy : <System.Drawing.Color>, read-only, static

.OldLace : <System.Drawing.Color>, read-only, static

.Olive : <System.Drawing.Color>, read-only, static

.OliveDrab : <System.Drawing.Color>, read-only, static

.Orange : <System.Drawing.Color>, read-only, static

.OrangeRed : <System.Drawing.Color>, read-only, static

.Orchid : <System.Drawing.Color>, read-only, static

.PaleGoldenrod : <System.Drawing.Color>, read-only, static

.PaleGreen : <System.Drawing.Color>, read-only, static

.PaleTurquoise : <System.Drawing.Color>, read-only, static

.PaleVioletRed : <System.Drawing.Color>, read-only, static

.PapayaWhip : <System.Drawing.Color>, read-only, static

.PeachPuff : <System.Drawing.Color>, read-only, static

.Peru : <System.Drawing.Color>, read-only, static

.Pink : <System.Drawing.Color>, read-only, static

.Plum : <System.Drawing.Color>, read-only, static

.PowderBlue : <System.Drawing.Color>, read-only, static

.Purple : <System.Drawing.Color>, read-only, static

.R : <System.Byte>, read-only

.Red : <System.Drawing.Color>, read-only, static

.RosyBrown : <System.Drawing.Color>, read-only, static

.RoyalBlue : <System.Drawing.Color>, read-only, static

.SaddleBrown : <System.Drawing.Color>, read-only, static

.Salmon : <System.Drawing.Color>, read-only, static

.SandyBrown : <System.Drawing.Color>, read-only, static

.SeaGreen : <System.Drawing.Color>, read-only, static

.SeaShell : <System.Drawing.Color>, read-only, static

.Sienna : <System.Drawing.Color>, read-only, static

.Silver : <System.Drawing.Color>, read-only, static

.SkyBlue : <System.Drawing.Color>, read-only, static

.SlateBlue : <System.Drawing.Color>, read-only, static

.SlateGray : <System.Drawing.Color>, read-only, static

.Snow : <System.Drawing.Color>, read-only, static

.SpringGreen : <System.Drawing.Color>, read-only, static

.SteelBlue : <System.Drawing.Color>, read-only, static

.Tan : <System.Drawing.Color>, read-only, static

.Teal : <System.Drawing.Color>, read-only, static

.Thistle : <System.Drawing.Color>, read-only, static

.Tomato : <System.Drawing.Color>, read-only, static

.Transparent : <System.Drawing.Color>, read-only, static

.Turquoise : <System.Drawing.Color>, read-only, static

.Violet : <System.Drawing.Color>, read-only, static

.Wheat : <System.Drawing.Color>, read-only, static

.White : <System.Drawing.Color>, read-only, static

.WhiteSmoke : <System.Drawing.Color>, read-only, static

.Yellow : <System.Drawing.Color>, read-only, static

.YellowGreen : <System.Drawing.Color>, read-only, static

.Empty : <System.Drawing.Color>, read-only, static

true

Looks like the color property itself has properties, some of them read-only definitions of typical colors! This means that we can set the .ForeColor and .BackColor properties to the static read-only values they already defined:

test.f1.ForeColor = test.f1.ForeColor.Blue

dotNetObject:System.Drawing.Color

test.f1.BackColor = test.f1.BackColor.Yellow

dotNetObject:System.Drawing.Color

test.f1.TitleBackColor = test.f1.TitleBackColor.Tomato

dotNetObject:System.Drawing.Color

Using User-Defined Colors

Of course, we can create our own DotNet colors instead of using the presets.

Let's take a look at the methods that a System.Drawing.Color object exposes:

showMethods test.f1.backcolor

.<System.Boolean>Equals <System.Object>obj

.[static]<System.Boolean>Equals <System.Object>objA <System.Object>objB

.[static]<System.Drawing.Color>FromArgb <System.Int32>argb

.[static]<System.Drawing.Color>FromArgb <System.Int32>alpha <System.Drawing.Color>baseColor

.[static]<System.Drawing.Color>FromArgb <System.Int32>red <System.Int32>green <System.Int32>blue

.[static]<System.Drawing.Color>FromArgb <System.Int32>alpha <System.Int32>red <System.Int32>green <System.Int32>blue

.[static]<System.Drawing.Color>FromKnownColor <System.Drawing.KnownColor>color

.[static]<System.Drawing.Color>FromName <System.String>name

.<System.Single>GetBrightness()

.<System.Int32>GetHashCode()

.<System.Single>GetHue()

.<System.Single>GetSaturation()

.<System.Type>GetType()

.[static]<System.Boolean>ReferenceEquals <System.Object>objA <System.Object>objB

.<System.Int32>ToArgb()

.<System.Drawing.KnownColor>ToKnownColor()

.<System.String>ToString()

true

As you can see, the .FromARGB() method allows us to provide Red, Green and Blue values and it will construct a DotNet color value for us:

test.f1.forecolor = test.f1.backcolor.FromArgb 255 255 100

test.f1.backcolor = test.f1.backcolor.FromArgb 100 200 234

dotNetObject:System.Drawing.Color

See also

DotNet In MAXScript


Creating A Simple Web Browser Using DotNet

In the following example, we will create a simple Web Browser using the WebBrowser DotNet control provided by System.Windows.Forms

First, we create a simple MAXScript rollout and add a dotNetControl called wb which uses the System.Windows.Forms.WebBrowser control.

Then we open the rollout as a dialog - the WebBrowser will be, of course, empty.

EXAMPLE

rollout webbrowser_rollout "Web Test" width:600 height:600

(

 dotNetControl wb "System.Windows.Forms.WebBrowser" pos:[10,10] width:580 height:580

)

createdialog webbrowser_rollout

At this point, we would like to set a default URL for the browser to open at. To see what properties are available in the WebBrowser control, we can call showProperties() on the control:

CODE

showProperties webbrowser_rollout.wb

RESULT

.AccessibilityObject : <System.Windows.Forms.AccessibleObject>, read-only

.AccessibleDefaultActionDescription : <System.String>

.AccessibleDescription : <System.String>

.AccessibleName : <System.String>

.AccessibleRole : <System.Windows.Forms.AccessibleRole>

.ActiveXInstance : <System.Object>, read-only

.AllowDrop : <System.Boolean>

.AllowNavigation : <System.Boolean>

.AllowWebBrowserDrop : <System.Boolean>

.Anchor : <System.Windows.Forms.AnchorStyles>

.AutoScrollOffset : <System.Drawing.Point>

.AutoSize : <System.Boolean>

.BackColor : <System.Drawing.Color>

.BackgroundImage : <System.Drawing.Image>

.BackgroundImageLayout : <System.Windows.Forms.ImageLayout>

.BindingContext : <System.Windows.Forms.BindingContext>

.Bottom : <System.Int32>, read-only

.Bounds : <System.Drawing.Rectangle>

.CanFocus : <System.Boolean>, read-only

.CanGoBack : <System.Boolean>, read-only

.CanGoForward : <System.Boolean>, read-only

.CanSelect : <System.Boolean>, read-only

.Capture : <System.Boolean>

.CausesValidation : <System.Boolean>

.CheckForIllegalCrossThreadCalls : <System.Boolean>, static

.ClientRectangle : <System.Drawing.Rectangle>, read-only

.ClientSize : <System.Drawing.Size>

.CompanyName : <System.String>, read-only

.Container : <System.ComponentModel.IContainer>, read-only

.ContainsFocus : <System.Boolean>, read-only

.ContextMenu : <System.Windows.Forms.ContextMenu>

.ContextMenuStrip : <System.Windows.Forms.ContextMenuStrip>

.Controls : <System.Windows.Forms.Control+ControlCollection>, read-only

.Created : <System.Boolean>, read-only

.Cursor : <System.Windows.Forms.Cursor>

.DataBindings : <System.Windows.Forms.ControlBindingsCollection>, read-only

.DefaultBackColor : <System.Drawing.Color>, read-only, static

.DefaultFont : <System.Drawing.Font>, read-only, static

.DefaultForeColor : <System.Drawing.Color>, read-only, static

.DisplayRectangle : <System.Drawing.Rectangle>, read-only

.Disposing : <System.Boolean>, read-only

.Dock : <System.Windows.Forms.DockStyle>

.Document : <System.Windows.Forms.HtmlDocument>, read-only

.DocumentStream : <System.IO.Stream>

.DocumentText : <System.String>

.DocumentTitle : <System.String>, read-only

.DocumentType : <System.String>, read-only

.Enabled : <System.Boolean>

.EncryptionLevel : <System.Windows.Forms.WebBrowserEncryptionLevel>, read-only

.Focused : <System.Boolean>, read-only

.Font : <System.Drawing.Font>

.ForeColor : <System.Drawing.Color>

.Handle : <System.IntPtr>, read-only

.HasChildren : <System.Boolean>, read-only

.Height : <System.Int32>

.ImeMode : <System.Windows.Forms.ImeMode>

.InvokeRequired : <System.Boolean>, read-only

.IsAccessible : <System.Boolean>

.IsBusy : <System.Boolean>, read-only

.IsDisposed : <System.Boolean>, read-only

.IsHandleCreated : <System.Boolean>, read-only

.IsMirrored : <System.Boolean>, read-only

.IsOffline : <System.Boolean>, read-only

.IsWebBrowserContextMenuEnabled : <System.Boolean>

.LayoutEngine : <System.Windows.Forms.Layout.LayoutEngine>, read-only

.Left : <System.Int32>

.Location : <System.Drawing.Point>

.Margin : <System.Windows.Forms.Padding>

.MaximumSize : <System.Drawing.Size>

.MinimumSize : <System.Drawing.Size>

.ModifierKeys : <System.Windows.Forms.Keys>, read-only, static

.MouseButtons : <System.Windows.Forms.MouseButtons>, read-only, static

.MousePosition : <System.Drawing.Point>, read-only, static

.Name : <System.String>

.ObjectForScripting : <System.Object>

.Padding : <System.Windows.Forms.Padding>

.Parent : <System.Windows.Forms.Control>

.PreferredSize : <System.Drawing.Size>, read-only

.ProductName : <System.String>, read-only

.ProductVersion : <System.String>, read-only

.ReadyState : <System.Windows.Forms.WebBrowserReadyState>, read-only

.RecreatingHandle : <System.Boolean>, read-only

.Region : <System.Drawing.Region>

.Right : <System.Int32>, read-only

.RightToLeft : <System.Windows.Forms.RightToLeft>

.ScriptErrorsSuppressed : <System.Boolean>

.ScrollBarsEnabled : <System.Boolean>

.Site : <System.ComponentModel.ISite>, write-only

.Size : <System.Drawing.Size>

.StatusText : <System.String>, read-only

.TabIndex : <System.Int32>

.TabStop : <System.Boolean>

.Tag : <System.Object>

.Text : <System.String>

.Top : <System.Int32>

.TopLevelControl : <System.Windows.Forms.Control>, read-only

.Url : <System.Uri>

.UseWaitCursor : <System.Boolean>

.Version : <System.Version>, read-only

.Visible : <System.Boolean>

.WebBrowserShortcutsEnabled : <System.Boolean>

.Width : <System.Int32>

.WindowTarget : <System.Windows.Forms.IWindowTarget>

We can see that there is a property URL exposed by the control. We can assume that this is the property we have to set in order to access a web page.

We also see that the type of the value expected by the DotNet control is System.Uri. This means that we will have to convert the URL MAXScript String value to a dotNetObject value of the expected type:

CODE

webbrowser_rollout.wb.url = dotNetObject "System.Uri" "http://www.autodesk.com"

At this point, if your computer has Internet access, the Web Browser should display the Autodesk homepage:

A Web Browser requires at least an address text field so the user can enter other URLs. We can easily transform our first script into a more advanced Web Browser by adding a MAXScript edittext control and some event handlers:

SCRIPT

rollout webbrowser_rollout "Web Test" width:600 height:600

(

 edittext edt_url "URL:" text:"http://www.autodesk.com"

 dotNetControl wb "System.Windows.forms.WebBrowser" pos:[10,22] width:580 height:570

 fn openURL urlString = (

  wb.url = dotNetObject "System.Uri" urlString )

 on edt_url entered txt do openURL txt

 on webbrowser_rollout open do openURL edt_url.text

)

createdialog webbrowser_rollout

Try typing in other URLs in the text field and see your Web Browser opening them...

See also

DotNet In MAXScript


Using DotNet Forms To Create MAXScript User Interfaces

DotNet controls can not only be placed inside 3ds Max Dialogs and Rollouts, but they can also be used to generate user interfaces implemented completely using DotNet Forms.

In the following example, a DotNet Button is created and assigned to a DotNet Form including a custom function declared as event handler. Finally, the Form is displayed as a dialog by calling its .show() method.

SCRIPT

(

fn whenButtonIsPressed a b =

(

format "Pressed from a DotNet Button\n"

format "Argument a (Form): <%> \n" (classof a)

format "Properties:\n"

showproperties a

format "Methods:\n"

showmethods a

format "Events:\n"

showevents a

format "\nArgument b (Button): <%> \n" (classof b)

format "Properties:\n"

showproperties b

format "Methods:\n"

showmethods a

format "Events:\n"

showevents a

)

--Create a DotNet Button

mButton = dotNetObject "System.Windows.Forms.Button"

mButton.text = "BIG DotNet Button"

mButton.size = dotNetObject "System.Drawing.Size" 160 160

mButton.location = dotNetObject "System.Drawing.Point" 60 60

--Create a DotNet Form

hForm = dotNetObject "System.Windows.Forms.Form"

hForm.controls.add mButton --add the Button to the Form

hForm.topmost = true

--Add an Event Handler for the click event:

dotNet.addEventHandler mButton "click" whenButtonIsPressed

hForm.show() --show the Form with the Button

)

Output Of The Event Handler When Button Is Pressed:

Pressed from a DotNet Button

Argument a (Form): <dotNetObject>

Properties:

.AccessibilityObject : <System.Windows.Forms.AccessibleObject>, read-only

.AccessibleDefaultActionDescription : <System.String>

.AccessibleDescription : <System.String>

.AccessibleName : <System.String>

.AccessibleRole : <System.Windows.Forms.AccessibleRole>

.AllowDrop : <System.Boolean>

.Anchor : <System.Windows.Forms.AnchorStyles>

.AutoEllipsis : <System.Boolean>

.AutoScrollOffset : <System.Drawing.Point>

.AutoSize : <System.Boolean>

.AutoSizeMode : <System.Windows.Forms.AutoSizeMode>

.BackColor : <System.Drawing.Color>

.BackgroundImage : <System.Drawing.Image>

.BackgroundImageLayout : <System.Windows.Forms.ImageLayout>

.BindingContext : <System.Windows.Forms.BindingContext>

.Bottom : <System.Int32>, read-only

.Bounds : <System.Drawing.Rectangle>

.CanFocus : <System.Boolean>, read-only

.CanSelect : <System.Boolean>, read-only

.Capture : <System.Boolean>

.CausesValidation : <System.Boolean>

.CheckForIllegalCrossThreadCalls : <System.Boolean>, static

.ClientRectangle : <System.Drawing.Rectangle>, read-only

.ClientSize : <System.Drawing.Size>

.CompanyName : <System.String>, read-only

.Container : <System.ComponentModel.IContainer>, read-only

.ContainsFocus : <System.Boolean>, read-only

.ContextMenu : <System.Windows.Forms.ContextMenu>

.ContextMenuStrip : <System.Windows.Forms.ContextMenuStrip>

.Controls : <System.Windows.Forms.Control+ControlCollection>, read-only

.Created : <System.Boolean>, read-only

.Cursor : <System.Windows.Forms.Cursor>

.DataBindings : <System.Windows.Forms.ControlBindingsCollection>, read-only

.DefaultBackColor : <System.Drawing.Color>, read-only, static

.DefaultFont : <System.Drawing.Font>, read-only, static

.DefaultForeColor : <System.Drawing.Color>, read-only, static

.DialogResult : <System.Windows.Forms.DialogResult>

.DisplayRectangle : <System.Drawing.Rectangle>, read-only

.Disposing : <System.Boolean>, read-only

.Dock : <System.Windows.Forms.DockStyle>

.Enabled : <System.Boolean>

.FlatAppearance : <System.Windows.Forms.FlatButtonAppearance>, read-only

.FlatStyle : <System.Windows.Forms.FlatStyle>

.Focused : <System.Boolean>, read-only

.Font : <System.Drawing.Font>

.ForeColor : <System.Drawing.Color>

.Handle : <System.IntPtr>, read-only

.HasChildren : <System.Boolean>, read-only

.Height : <System.Int32>

.Image : <System.Drawing.Image>

.ImageAlign : <System.Drawing.ContentAlignment>

.ImageIndex : <System.Int32>

.ImageKey : <System.String>

.ImageList : <System.Windows.Forms.ImageList>

.ImeMode : <System.Windows.Forms.ImeMode>

.InvokeRequired : <System.Boolean>, read-only

.IsAccessible : <System.Boolean>

.IsDisposed : <System.Boolean>, read-only

.IsHandleCreated : <System.Boolean>, read-only

.IsMirrored : <System.Boolean>, read-only

.LayoutEngine : <System.Windows.Forms.Layout.LayoutEngine>, read-only

.Left : <System.Int32>

.Location : <System.Drawing.Point>

.Margin : <System.Windows.Forms.Padding>

.MaximumSize : <System.Drawing.Size>

.MinimumSize : <System.Drawing.Size>

.ModifierKeys : <System.Windows.Forms.Keys>, read-only, static

.MouseButtons : <System.Windows.Forms.MouseButtons>, read-only, static

.MousePosition : <System.Drawing.Point>, read-only, static

.Name : <System.String>

.Padding : <System.Windows.Forms.Padding>

.Parent : <System.Windows.Forms.Control>

.PreferredSize : <System.Drawing.Size>, read-only

.ProductName : <System.String>, read-only

.ProductVersion : <System.String>, read-only

.RecreatingHandle : <System.Boolean>, read-only

.Region : <System.Drawing.Region>

.Right : <System.Int32>, read-only

.RightToLeft : <System.Windows.Forms.RightToLeft>

.Site : <System.ComponentModel.ISite>

.Size : <System.Drawing.Size>

.TabIndex : <System.Int32>

.TabStop : <System.Boolean>

.Tag : <System.Object>

.Text : <System.String>

.TextAlign : <System.Drawing.ContentAlignment>

.TextImageRelation : <System.Windows.Forms.TextImageRelation>

.Top : <System.Int32>

.TopLevelControl : <System.Windows.Forms.Control>, read-only

.UseCompatibleTextRendering : <System.Boolean>

.UseMnemonic : <System.Boolean>

.UseVisualStyleBackColor : <System.Boolean>

.UseWaitCursor : <System.Boolean>

.Visible : <System.Boolean>

.Width : <System.Int32>

.WindowTarget : <System.Windows.Forms.IWindowTarget>

Methods:

.<System.IAsyncResult>BeginInvoke <System.Delegate>method

.<System.IAsyncResult>BeginInvoke <System.Delegate>method <System.Object[]>args

.BringToFront()

.<System.Boolean>Contains <System.Windows.Forms.Control>ctl

.CreateControl()

.<System.Drawing.Graphics>CreateGraphics()

.<System.Runtime.Remoting.ObjRef>CreateObjRef <System.Type>requestedType

.Dispose()

.<System.Windows.Forms.DragDropEffects>DoDragDrop <System.Object>data <System.Windows.Forms.DragDropEffects>allowedEffects

.DrawToBitmap <System.Drawing.Bitmap>bitmap <System.Drawing.Rectangle>targetBounds

.<System.Object>EndInvoke <System.IAsyncResult>asyncResult

.<System.Boolean>Equals <System.Object>obj

.[static]<System.Boolean>Equals <System.Object>objA <System.Object>objB

.<System.Windows.Forms.Form>FindForm()

.<System.Boolean>Focus()

.[static]<System.Windows.Forms.Control>FromChildHandle <System.IntPtr>handle

.[static]<System.Windows.Forms.Control>FromHandle <System.IntPtr>handle

.<System.Windows.Forms.Control>GetChildAtPoint <System.Drawing.Point>pt

.<System.Windows.Forms.Control>GetChildAtPoint <System.Drawing.Point>pt <System.Windows.Forms.GetChildAtPointSkip>skipValue

.<System.Windows.Forms.IContainerControl>GetContainerControl()

.<System.Int32>GetHashCode()

.<System.Object>GetLifetimeService()

.<System.Windows.Forms.Control>GetNextControl <System.Windows.Forms.Control>ctl <System.Boolean>forward

.<System.Drawing.Size>GetPreferredSize <System.Drawing.Size>proposedSize

.<System.Type>GetType()

.Hide()

.<System.Object>InitializeLifetimeService()

.Invalidate()

.Invalidate <System.Drawing.Rectangle>rc

.Invalidate <System.Drawing.Region>region

.Invalidate <System.Boolean>invalidateChildren

.Invalidate <System.Drawing.Region>region <System.Boolean>invalidateChildren

.Invalidate <System.Drawing.Rectangle>rc <System.Boolean>invalidateChildren

.<System.Object>Invoke <System.Delegate>method

.<System.Object>Invoke <System.Delegate>method <System.Object[]>args

.[static]<System.Boolean>IsKeyLocked <System.Windows.Forms.Keys>keyVal

.[static]<System.Boolean>IsMnemonic <System.Char>charCode <System.String>text

.NotifyDefault <System.Boolean>value

.PerformClick()

.PerformLayout()

.PerformLayout <System.Windows.Forms.Control>affectedControl <System.String>affectedProperty

.<System.Drawing.Point>PointToClient <System.Drawing.Point>p

.<System.Drawing.Point>PointToScreen <System.Drawing.Point>p

.<System.Windows.Forms.PreProcessControlState>PreProcessControlMessage <System.Windows.Forms.Message&>msg

.<System.Boolean>PreProcessMessage <System.Windows.Forms.Message&>msg

.<System.Drawing.Rectangle>RectangleToClient <System.Drawing.Rectangle>r

.<System.Drawing.Rectangle>RectangleToScreen <System.Drawing.Rectangle>r

.[static]<System.Boolean>ReferenceEquals <System.Object>objA <System.Object>objB

.Refresh()

.ResetBackColor()

.ResetBindings()

.ResetCursor()

.ResetFont()

.ResetForeColor()

.ResetImeMode()

.ResetRightToLeft()

.ResetText()

.ResumeLayout()

.ResumeLayout <System.Boolean>performLayout

.Scale <System.Single>ratio

.Scale <System.Drawing.SizeF>factor

.Scale <System.Single>dx <System.Single>dy

.Select()

.<System.Boolean>SelectNextControl <System.Windows.Forms.Control>ctl <System.Boolean>forward <System.Boolean>tabStopOnly <System.Boolean>nested <System.Boolean>wrap

.SendToBack()

.SetBounds <System.Int32>x <System.Int32>y <System.Int32>width <System.Int32>height

.SetBounds <System.Int32>x <System.Int32>y <System.Int32>width <System.Int32>height <System.Windows.Forms.BoundsSpecified>specified

.Show()

.SuspendLayout()

.<System.String>ToString()

.Update()

Events:

on <control_name> AutoSizeChanged <System.EventArgs>e do ( ... )

on <control_name> BackColorChanged <System.EventArgs>e do ( ... )

on <control_name> BackgroundImageChanged <System.EventArgs>e do ( ... )

on <control_name> BackgroundImageLayoutChanged <System.EventArgs>e do ( ... )

on <control_name> BindingContextChanged <System.EventArgs>e do ( ... )

on <control_name> CausesValidationChanged <System.EventArgs>e do ( ... )

on <control_name> ChangeUICues <System.Windows.Forms.UICuesEventArgs>e do ( ... )

on <control_name> Click <System.EventArgs>e do ( ... )

on <control_name> ClientSizeChanged <System.EventArgs>e do ( ... )

on <control_name> ContextMenuChanged <System.EventArgs>e do ( ... )

on <control_name> ContextMenuStripChanged <System.EventArgs>e do ( ... )

on <control_name> ControlAdded <System.Windows.Forms.ControlEventArgs>e do ( ... )

on <control_name> ControlRemoved <System.Windows.Forms.ControlEventArgs>e do ( ... )

on <control_name> CursorChanged <System.EventArgs>e do ( ... )

on <control_name> Disposed <System.EventArgs>e do ( ... )

on <control_name> DockChanged <System.EventArgs>e do ( ... )

on <control_name> DoubleClick <System.EventArgs>e do ( ... )

on <control_name> DragDrop <System.Windows.Forms.DragEventArgs>e do ( ... )

on <control_name> DragEnter <System.Windows.Forms.DragEventArgs>e do ( ... )

on <control_name> DragLeave <System.EventArgs>e do ( ... )

on <control_name> DragOver <System.Windows.Forms.DragEventArgs>e do ( ... )

on <control_name> EnabledChanged <System.EventArgs>e do ( ... )

on <control_name> Enter <System.EventArgs>e do ( ... )

on <control_name> FontChanged <System.EventArgs>e do ( ... )

on <control_name> ForeColorChanged <System.EventArgs>e do ( ... )

on <control_name> GiveFeedback <System.Windows.Forms.GiveFeedbackEventArgs>e do ( ... )

on <control_name> GotFocus <System.EventArgs>e do ( ... )

on <control_name> HandleCreated <System.EventArgs>e do ( ... )

on <control_name> HandleDestroyed <System.EventArgs>e do ( ... )

on <control_name> HelpRequested <System.Windows.Forms.HelpEventArgs>hlpevent do ( ... )

on <control_name> ImeModeChanged <System.EventArgs>e do ( ... )

on <control_name> Invalidated <System.Windows.Forms.InvalidateEventArgs>e do ( ... )

on <control_name> KeyDown <System.Windows.Forms.KeyEventArgs>e do ( ... )

on <control_name> KeyPress <System.Windows.Forms.KeyPressEventArgs>e do ( ... )

on <control_name> KeyUp <System.Windows.Forms.KeyEventArgs>e do ( ... )

on <control_name> Layout <System.Windows.Forms.LayoutEventArgs>e do ( ... )

on <control_name> Leave <System.EventArgs>e do ( ... )

on <control_name> LocationChanged <System.EventArgs>e do ( ... )

on <control_name> LostFocus <System.EventArgs>e do ( ... )

on <control_name> MarginChanged <System.EventArgs>e do ( ... )

on <control_name> MouseCaptureChanged <System.EventArgs>e do ( ... )

on <control_name> MouseClick <System.Windows.Forms.MouseEventArgs>e do ( ... )

on <control_name> MouseDoubleClick <System.Windows.Forms.MouseEventArgs>e do ( ... )

on <control_name> MouseDown <System.Windows.Forms.MouseEventArgs>e do ( ... )

on <control_name> MouseEnter <System.EventArgs>e do ( ... )

on <control_name> MouseHover <System.EventArgs>e do ( ... )

on <control_name> MouseLeave <System.EventArgs>e do ( ... )

on <control_name> MouseMove <System.Windows.Forms.MouseEventArgs>e do ( ... )

on <control_name> MouseUp <System.Windows.Forms.MouseEventArgs>e do ( ... )

on <control_name> MouseWheel <System.Windows.Forms.MouseEventArgs>e do ( ... )

on <control_name> Move <System.EventArgs>e do ( ... )

on <control_name> PaddingChanged <System.EventArgs>e do ( ... )

on <control_name> Paint <System.Windows.Forms.PaintEventArgs>e do ( ... )

on <control_name> ParentChanged <System.EventArgs>e do ( ... )

on <control_name> PreviewKeyDown <System.Windows.Forms.PreviewKeyDownEventArgs>e do ( ... )

on <control_name> QueryAccessibilityHelp <System.Windows.Forms.QueryAccessibilityHelpEventArgs>e do ( ... )

on <control_name> QueryContinueDrag <System.Windows.Forms.QueryContinueDragEventArgs>e do ( ... )

on <control_name> RegionChanged <System.EventArgs>e do ( ... )

on <control_name> Resize <System.EventArgs>e do ( ... )

on <control_name> RightToLeftChanged <System.EventArgs>e do ( ... )

on <control_name> SizeChanged <System.EventArgs>e do ( ... )

on <control_name> StyleChanged <System.EventArgs>e do ( ... )

on <control_name> SystemColorsChanged <System.EventArgs>e do ( ... )

on <control_name> TabIndexChanged <System.EventArgs>e do ( ... )

on <control_name> TabStopChanged <System.EventArgs>e do ( ... )

on <control_name> TextChanged <System.EventArgs>e do ( ... )

on <control_name> Validated <System.EventArgs>e do ( ... )

on <control_name> Validating <System.ComponentModel.CancelEventArgs>e do ( ... )

on <control_name> VisibleChanged <System.EventArgs>e do ( ... )

Argument b (Button): <dotNetObject>

Properties:

.Button : <System.Windows.Forms.MouseButtons>, read-only

.Clicks : <System.Int32>, read-only

.Delta : <System.Int32>, read-only

.Location : <System.Drawing.Point>, read-only

.X : <System.Int32>, read-only

.Y : <System.Int32>, read-only

.Empty : <System.EventArgs>, read-only, static

Methods:

.<System.IAsyncResult>BeginInvoke <System.Delegate>method

.<System.IAsyncResult>BeginInvoke <System.Delegate>method <System.Object[]>args

.BringToFront()

.<System.Boolean>Contains <System.Windows.Forms.Control>ctl

.CreateControl()

.<System.Drawing.Graphics>CreateGraphics()

.<System.Runtime.Remoting.ObjRef>CreateObjRef <System.Type>requestedType

.Dispose()

.<System.Windows.Forms.DragDropEffects>DoDragDrop <System.Object>data <System.Windows.Forms.DragDropEffects>allowedEffects

.DrawToBitmap <System.Drawing.Bitmap>bitmap <System.Drawing.Rectangle>targetBounds

.<System.Object>EndInvoke <System.IAsyncResult>asyncResult

.<System.Boolean>Equals <System.Object>obj

.[static]<System.Boolean>Equals <System.Object>objA <System.Object>objB

.<System.Windows.Forms.Form>FindForm()

.<System.Boolean>Focus()

.[static]<System.Windows.Forms.Control>FromChildHandle <System.IntPtr>handle

.[static]<System.Windows.Forms.Control>FromHandle <System.IntPtr>handle

.<System.Windows.Forms.Control>GetChildAtPoint <System.Drawing.Point>pt

.<System.Windows.Forms.Control>GetChildAtPoint <System.Drawing.Point>pt <System.Windows.Forms.GetChildAtPointSkip>skipValue

.<System.Windows.Forms.IContainerControl>GetContainerControl()

.<System.Int32>GetHashCode()

.<System.Object>GetLifetimeService()

.<System.Windows.Forms.Control>GetNextControl <System.Windows.Forms.Control>ctl <System.Boolean>forward

.<System.Drawing.Size>GetPreferredSize <System.Drawing.Size>proposedSize

.<System.Type>GetType()

.Hide()

.<System.Object>InitializeLifetimeService()

.Invalidate()

.Invalidate <System.Drawing.Rectangle>rc

.Invalidate <System.Drawing.Region>region

.Invalidate <System.Boolean>invalidateChildren

.Invalidate <System.Drawing.Region>region <System.Boolean>invalidateChildren

.Invalidate <System.Drawing.Rectangle>rc <System.Boolean>invalidateChildren

.<System.Object>Invoke <System.Delegate>method

.<System.Object>Invoke <System.Delegate>method <System.Object[]>args

.[static]<System.Boolean>IsKeyLocked <System.Windows.Forms.Keys>keyVal

.[static]<System.Boolean>IsMnemonic <System.Char>charCode <System.String>text

.NotifyDefault <System.Boolean>value

.PerformClick()

.PerformLayout()

.PerformLayout <System.Windows.Forms.Control>affectedControl <System.String>affectedProperty

.<System.Drawing.Point>PointToClient <System.Drawing.Point>p

.<System.Drawing.Point>PointToScreen <System.Drawing.Point>p

.<System.Windows.Forms.PreProcessControlState>PreProcessControlMessage <System.Windows.Forms.Message&>msg

.<System.Boolean>PreProcessMessage <System.Windows.Forms.Message&>msg

.<System.Drawing.Rectangle>RectangleToClient <System.Drawing.Rectangle>r

.<System.Drawing.Rectangle>RectangleToScreen <System.Drawing.Rectangle>r

.[static]<System.Boolean>ReferenceEquals <System.Object>objA <System.Object>objB

.Refresh()

.ResetBackColor()

.ResetBindings()

.ResetCursor()

.ResetFont()

.ResetForeColor()

.ResetImeMode()

.ResetRightToLeft()

.ResetText()

.ResumeLayout()

.ResumeLayout <System.Boolean>performLayout

.Scale <System.Single>ratio

.Scale <System.Drawing.SizeF>factor

.Scale <System.Single>dx <System.Single>dy

.Select()

.<System.Boolean>SelectNextControl <System.Windows.Forms.Control>ctl <System.Boolean>forward <System.Boolean>tabStopOnly <System.Boolean>nested <System.Boolean>wrap

.SendToBack()

.SetBounds <System.Int32>x <System.Int32>y <System.Int32>width <System.Int32>height

.SetBounds <System.Int32>x <System.Int32>y <System.Int32>width <System.Int32>height <System.Windows.Forms.BoundsSpecified>specified

.Show()

.SuspendLayout()

.<System.String>ToString()

.Update()

Events:

on <control_name> AutoSizeChanged <System.EventArgs>e do ( ... )

on <control_name> BackColorChanged <System.EventArgs>e do ( ... )

on <control_name> BackgroundImageChanged <System.EventArgs>e do ( ... )

on <control_name> BackgroundImageLayoutChanged <System.EventArgs>e do ( ... )

on <control_name> BindingContextChanged <System.EventArgs>e do ( ... )

on <control_name> CausesValidationChanged <System.EventArgs>e do ( ... )

on <control_name> ChangeUICues <System.Windows.Forms.UICuesEventArgs>e do ( ... )

on <control_name> Click <System.EventArgs>e do ( ... )

on <control_name> ClientSizeChanged <System.EventArgs>e do ( ... )

on <control_name> ContextMenuChanged <System.EventArgs>e do ( ... )

on <control_name> ContextMenuStripChanged <System.EventArgs>e do ( ... )

on <control_name> ControlAdded <System.Windows.Forms.ControlEventArgs>e do ( ... )

on <control_name> ControlRemoved <System.Windows.Forms.ControlEventArgs>e do ( ... )

on <control_name> CursorChanged <System.EventArgs>e do ( ... )

on <control_name> Disposed <System.EventArgs>e do ( ... )

on <control_name> DockChanged <System.EventArgs>e do ( ... )

on <control_name> DoubleClick <System.EventArgs>e do ( ... )

on <control_name> DragDrop <System.Windows.Forms.DragEventArgs>e do ( ... )

on <control_name> DragEnter <System.Windows.Forms.DragEventArgs>e do ( ... )

on <control_name> DragLeave <System.EventArgs>e do ( ... )

on <control_name> DragOver <System.Windows.Forms.DragEventArgs>e do ( ... )

on <control_name> EnabledChanged <System.EventArgs>e do ( ... )

on <control_name> Enter <System.EventArgs>e do ( ... )

on <control_name> FontChanged <System.EventArgs>e do ( ... )

on <control_name> ForeColorChanged <System.EventArgs>e do ( ... )

on <control_name> GiveFeedback <System.Windows.Forms.GiveFeedbackEventArgs>e do ( ... )

on <control_name> GotFocus <System.EventArgs>e do ( ... )

on <control_name> HandleCreated <System.EventArgs>e do ( ... )

on <control_name> HandleDestroyed <System.EventArgs>e do ( ... )

on <control_name> HelpRequested <System.Windows.Forms.HelpEventArgs>hlpevent do ( ... )

on <control_name> ImeModeChanged <System.EventArgs>e do ( ... )

on <control_name> Invalidated <System.Windows.Forms.InvalidateEventArgs>e do ( ... )

on <control_name> KeyDown <System.Windows.Forms.KeyEventArgs>e do ( ... )

on <control_name> KeyPress <System.Windows.Forms.KeyPressEventArgs>e do ( ... )

on <control_name> KeyUp <System.Windows.Forms.KeyEventArgs>e do ( ... )

on <control_name> Layout <System.Windows.Forms.LayoutEventArgs>e do ( ... )

on <control_name> Leave <System.EventArgs>e do ( ... )

on <control_name> LocationChanged <System.EventArgs>e do ( ... )

on <control_name> LostFocus <System.EventArgs>e do ( ... )

on <control_name> MarginChanged <System.EventArgs>e do ( ... )

on <control_name> MouseCaptureChanged <System.EventArgs>e do ( ... )

on <control_name> MouseClick <System.Windows.Forms.MouseEventArgs>e do ( ... )

on <control_name> MouseDoubleClick <System.Windows.Forms.MouseEventArgs>e do ( ... )

on <control_name> MouseDown <System.Windows.Forms.MouseEventArgs>e do ( ... )

on <control_name> MouseEnter <System.EventArgs>e do ( ... )

on <control_name> MouseHover <System.EventArgs>e do ( ... )

on <control_name> MouseLeave <System.EventArgs>e do ( ... )

on <control_name> MouseMove <System.Windows.Forms.MouseEventArgs>e do ( ... )

on <control_name> MouseUp <System.Windows.Forms.MouseEventArgs>e do ( ... )

on <control_name> MouseWheel <System.Windows.Forms.MouseEventArgs>e do ( ... )

on <control_name> Move <System.EventArgs>e do ( ... )

on <control_name> PaddingChanged <System.EventArgs>e do ( ... )

on <control_name> Paint <System.Windows.Forms.PaintEventArgs>e do ( ... )

on <control_name> ParentChanged <System.EventArgs>e do ( ... )

on <control_name> PreviewKeyDown <System.Windows.Forms.PreviewKeyDownEventArgs>e do ( ... )

on <control_name> QueryAccessibilityHelp <System.Windows.Forms.QueryAccessibilityHelpEventArgs>e do ( ... )

on <control_name> QueryContinueDrag <System.Windows.Forms.QueryContinueDragEventArgs>e do ( ... )

on <control_name> RegionChanged <System.EventArgs>e do ( ... )

on <control_name> Resize <System.EventArgs>e do ( ... )

on <control_name> RightToLeftChanged <System.EventArgs>e do ( ... )

on <control_name> SizeChanged <System.EventArgs>e do ( ... )

on <control_name> StyleChanged <System.EventArgs>e do ( ... )

on <control_name> SystemColorsChanged <System.EventArgs>e do ( ... )

on <control_name> TabIndexChanged <System.EventArgs>e do ( ... )

on <control_name> TabStopChanged <System.EventArgs>e do ( ... )

on <control_name> TextChanged <System.EventArgs>e do ( ... )

on <control_name> Validated <System.EventArgs>e do ( ... )

on <control_name> Validating <System.ComponentModel.CancelEventArgs>e do ( ... )

on <control_name> VisibleChanged <System.EventArgs>e do ( ... )

Using this output, you can easily see what Properties, Methods and Events are available for each control and implement additional functionality to extend the script, change the appearance and behaviour of the DotNet controls and so on.

See also

DotNet In MAXScript


Registering Windows SystemEvents Callbacks Using DotNet

The following example demonstrates how to register a MAXScript event handler which will react when Windows System settings are being changed.

CODE:

--First we need the SystemEvents DotNet Class:

c = dotNetClass "Microsoft.Win32.SystemEvents"

dotNetClass:Microsoft.Win32.SystemEvents

--Then we get a list of all available events:

showevents c

[static] DisplaySettingsChanged <System.Object>sender <System.EventArgs>e = ( ... )

[static] DisplaySettingsChanging <System.Object>sender <System.EventArgs>e = ( ... )

[static] EventsThreadShutdown <System.Object>sender <System.EventArgs>e = ( ... )

[static] InstalledFontsChanged <System.Object>sender <System.EventArgs>e = ( ... )

[static] LowMemory <System.Object>sender <System.EventArgs>e = ( ... )

[static] PaletteChanged <System.Object>sender <System.EventArgs>e = ( ... )

[static] PowerModeChanged <System.Object>sender <Microsoft.Win32.PowerModeChangedEventArgs>e = ( ... )

[static] SessionEnded <System.Object>sender <Microsoft.Win32.SessionEndedEventArgs>e = ( ... )

[static] SessionEnding <System.Object>sender <Microsoft.Win32.SessionEndingEventArgs>e = ( ... )

[static] SessionSwitch <System.Object>sender <Microsoft.Win32.SessionSwitchEventArgs>e = ( ... )

[static] TimeChanged <System.Object>sender <System.EventArgs>e = ( ... )

[static] TimerElapsed <System.Object>sender <Microsoft.Win32.TimerElapsedEventArgs>e = ( ... )

[static] UserPreferenceChanged <System.Object>sender <Microsoft.Win32.UserPreferenceChangedEventArgs>e = ( ... )

[static] UserPreferenceChanging <System.Object>sender <Microsoft.Win32.UserPreferenceChangingEventArgs>e = ( ... )

true

--We define a global function to be called by the event handler:

fn TimeChanged a1 a2 = format "TimeChanged callback: % : %\n" a1 a2

TimeChanged()

--Finally we add the Event Handler for the event "TimeChanged":

dotnet.addeventhandler c "TimeChanged" TimeChanged

OK

Now if you would open the Date and Time properties of MS Windows, change the seconds only (to avoid problems with your 3ds Max license, don't change the date too much!) and apply the changes, the MAXScript function we registered will be called and will print in the Listener:

TimeChanged callback: dotNetObject:Microsoft.Win32.SystemEvents : dotNetObject:System.EventArgs

As you can see from the events list, one could register event handlers to be notified when display settings are being changed, the palette or fonts are changing and so on.

See also

DotNet In MAXScript


Converting Scripts From Using ActiveX Controls to DotNet Controls

The main reason for the introduction of DotNet support in MAXScript was the fact that ActiveX controls which were largely used in the 3ds Max User Interface were made unavailable in 64 bit Windows versions.

Scripts developed for versions prior to 3ds Max 9 would require a rewrite to be able to run under 64 bit Windows operating systems.

The following examples show the conversion of ActiveX controls to DotNet Controls:

Converting ActiveX ListView Control to DotNet ListView Control

Converting ActiveX TreeView Control to DotNet TreeView Control

See also these 3ds Max components which were updated to use DotNet controls:

[3dsMax9 Path]\ui\macroscripts\Macro_BakeTextures.mcr

The Render To Texture dialog has been updated to use DotNet ListView controls instead of ActiveX controls.

[3dsMax9 Path]\ui\macroscripts\Macro_NamedSelSets.mcr

The Named Selection Sets editor dialog has been updated to use a DotNet TreeView control instead of an ActiveX control. It is a good example of using Drag And Drop in DotNet TreeView controls.

See also

DotNet In MAXScript


Converting ActiveX ListView Control to DotNet ListView Control

ListView Controls are probably the most widely used ActiveX controls in scripted 3ds Max tools. Converting such scripts to use DotNet ListView controls is a relatively straightforward process.

Let's take as the base for our conversion example the simple script available in the topic How To ... Develop a Selected Objects Inspector using ListView ActiveX Control - Part One

In the following script, you can compare the original ActiveX code which is now remarked and in green to the new commented DotNet code.

CONVERSION OF THE SCRIPT

macroScript SceneListView category:"DotNet"

(

rollout listview_rollout "ListView Selected"

(

/* ActiveX Version:

fn initListView lv =

(

lv.gridLines = true

lv.View = #lvwReport

lv.fullRowSelect = true

layout_def = #("Object Name", "Object Class", "Verts", "Faces", "Material")

for i in layout_def do

(

column = lv.ColumnHeaders.add()

column.text = I

)

)

*/

fn initListView lv =

(

lv.gridLines = true --same as in ActiveX

--The following controls the display of details. We use defaults:

lv.View = (dotNetClass "System.Windows.Forms.View").Details

lv.fullRowSelect = true --same as in ActiveX

layout_def = #("Object Name", "Object Class", "Verts", "Faces", "Material")

for i in layout_def do

lv.Columns.add i 96 --add column with name and optional width

)

/* ActiveX Version:

fn fillInSpreadSheet lv =

(

for o in selection do

(

li = lv.ListItems.add()

li.text = o.name

sub_li = li.ListSubItems.add()

sub_li.text = (classof o) as string

sub_li = li.ListSubItems.add()

sub_li.text = try((o.mesh.numverts) as string)catch("--")

sub_li = li.ListSubItems.add()

sub_li.text = try((o.mesh.numfaces) as string)catch("--")

sub_li = li.ListSubItems.add()

sub_li.text = (o.material) as string

)

)

*/

fn fillInSpreadSheet lv =

(

theRange = #() --array to collect the list items

for o in selection do

(

 --First we create a ListViewItem object with the object's name:

li = dotNetObject "System.Windows.Forms.ListViewItem" o.name

--Then we add all the sub-items with the desired string values:

sub_li = li.SubItems.add ((classof o) as string)

sub_li = li.SubItems.add (try((o.mesh.numverts) as string)catch("--"))

sub_li = li.SubItems.add (try((o.mesh.numfaces) as string)catch("--"))

sub_li = li.SubItems.add ((o.material) as string)

append theRange li --we add the list item to the array

)

lv.Items.AddRange theRange --when done, we populate the ListView

)

/* ActiveX Version:

activeXControl lv_objects "MSComctlLib.ListViewCtrl" width:490 height:190 align:#center

*/

dotNetControl lv_objects "System.Windows.Forms.ListView" width:490 height:190 align:#center

on listview_rollout open do

(

initListView lv_objects

fillInSpreadSheet lv_objects

)

)

try(destroyDialog listview_rollout)catch()

createDialog listview_rollout 500 200

)

See also

DotNet In MAXScript

How To ... Develop a Selected Objects Inspector using ListView ActiveX Control - Part One


Converting ActiveX TreeView Control to DotNet TreeView Control

TreeView Controls are among the most widely used ActiveX controls in scripted 3ds Max tools. Converting such scripts to use DotNet TreeView controls is a relatively straightforward process.

Let's take as the base for our conversion example the simple script available in the topic How To ... Develop a Scene Browser using TreeView ActiveX Control - Part One

In the following script, you can compare the original ActiveX code which is now remarked and in green to the new commented DotNet code.

CONVERSION OF THE SCRIPT - PART ONE

macroScript SceneTreeView category:"DotNet"

(

rollout treeview_rollout "TreeView Scene Browser"

(

/* ActiveX Version:

fn initTreeView tv =

(

tv.Indentation = 28*15

tv.LineStyle = #tvwRootLines

)

*/

fn initTreeView tv =

(

tv.Indent= 28 --property name is different and value is in pixels

--the default style already has root lines.

)

/* ActiveX Version:

fn addChildren tv theNode theChildren =

(

for c in theChildren do

(

newNode = tv.Nodes.add theNode.index 4 "" c.name 0

addChildren tv newNode c.children

)

)

*/

fn addChildren theNode theChildren =

(

for c in theChildren do

(

newNode = theNode.Nodes.add c.name --add to the parent!

newNode.tag = dotNetMXSValue c --.tag can contain a MXS value

addChildren newNode c.children --recursive call for new node

)

)

/* ActiveX Version:

fn fillInTreeView tv =

(

theRoot = tv.Nodes.add()

theRoot.text = "WORLD ROOT"

rootNodes = for o in objects where o.parent == undefined collect o

addChildren tv theRoot rootNodes

)

*/

fn fillInTreeView tv =

(

theRoot = tv.Nodes.add "WORLD ROOT" --add parent node

rootNodes = for o in objects where o.parent == undefined collect o

addChildren theRoot rootNodes --no need to pass the TreeView

)

/* ActiveX Version:

activeXControl tv "MSComctlLib.TreeCtrl" width:190 height:290 align:#center

*/

dotNetControl tv "TreeView" width: 190 height:290 align:#center

spinner spn_indent "Indentation" range:[0,100,28] type:#integer fieldwidth:40

/* ActiveX Version:

on tv nodeClick theNode do try(select (getNodeByName theNode.text))catch()

*/

on tv Click arg do

(

 --First get the TreeView node below the mouse cursor

 --The arg argument has properties .x and .y with the current pos.

 --Use showProperties arg to see what is available...

--We use the TreeView method GetNodeAt to see what was clicked:

hitNode = tv.GetNodeAt (dotNetObject "System.Drawing.Point" arg.x arg.y)

if hitNode != undefined do --if a TreeView node was clicked,

try(select hitNode.tag.value)catch(max select none)

--...we try to select the object stored as value in the .tag

)

--We change the .indentation to .indent:

on spn_indent changed val do tv.indent = val

--The rest of the script does not require changes:

on treeview_rollout open do

(

initTreeView tv

fillInTreeView tv

)

)

try(destroyDialog treeview_rollout)catch()

createDialog treeview_rollout 200 320

)

Now let's take a look at the second part of the TreeView example found in the topic How To ... Develop a Scene Browser using TreeView ActiveX Control - Part Two . In this example, we will convert the ActiveX ImageList control to a DotNet ImageList object, will add icons to the TreeView, set the node's color to the wireframe color of the scene object and also add checkboxes to control the hidden state of the objects.

CONVERSION OF THE SCRIPT - PART TWO

macroScript SceneTreeView category:"DotNet"

(

--We create an ImageList object to hold all icons for the TreeView

--in the local scope of the MacroScript. In he case of ActiveX,

--the ImageList had to be a UI control inside the rollout.

--It is possible to create a local DotNet object inside the rollout

--and pass the ImageList as parameter to the functions, but it is

--more convoluted. In this version, all functions "see" the

--ImageList DotNet object in the higher scope:

ilTv = dotNetObject "System.Windows.Forms.ImageList"

ilTv.imageSize = dotNetObject "System.Drawing.Size" 16 15

rollout treeview_rollout "TreeView Scene Browser"

(

/* ActiveX Version:

fn getIconFromBitmap thePath number =

(

tempBmp = openBitmap thePath

iconBmp = bitmap 16 15

for v = 0 to 14 do

setPixels iconBmp [0,v] (getPixels tempBmp [(number-1)*16, v] 16)

iconBmp.filename = getDir #image +"/_temp.bmp"

save iconBmp

close iconBmp

close tempBmp

getDir #image +"/_temp.bmp"

)

*/

--When creating icons for DotNet, it is necessary to create

--one bitmap for each icon, because the DotNet image list will

--lock the file for the duration of the script execution.

--The original script used a single file to write temporarily

--all icon bitmaps. This version writes a separate bitmap with the

--name passed as third argument. The function only creates bitmaps

--if they do not exist yet to avoid bitmap access errors.

fn getIconFromBitmap thePath number iconFileName =

(

theFileName = getDir #image +"\\icon_"+ iconFileName +".bmp"

if not doesFileExist theFileName do

(

tempBmp = openBitmap thePath

iconBmp = bitmap 16 15

for v = 0 to 14 do

setPixels iconBmp [0,v] (getPixels tempBmp [(number-1)*16, v] 16)

iconBmp.filename = theFileName

save iconBmp

close iconBmp

close tempBmp

)

img = dotNetClass "System.Drawing.Image" --create an image

ilTv.images.add (img.fromFile theFileName) --add to the list

)

/* ActiveX Version:

fn initTreeView tv ilTv =

(

tv.Indentation = 28*15

tv.LineStyle = #tvwRootLines

tv.checkboxes = true

tv.sorted = true

ilTv.imagewidth = 16

ilTv.imageheight = 15

iconDir = (getDir #ui) + "\\icons"

ilTv.listImages.add 1 #root (loadPicture (getIconFromBitmap (iconDir + "\\Standard_16i.bmp") 2))

ilTv.listImages.add 2 #geomnode (loadPicture (getIconFromBitmap (iconDir + "\\Standard_16i.bmp") 1))

ilTv.listImages.add 3 #light (loadPicture (getIconFromBitmap (iconDir + "\\Lights_16i.bmp") 3))

ilTv.listImages.add 4 #camera (loadPicture (getIconFromBitmap (iconDir + "\\Cameras_16i.bmp") 2))

ilTv.listImages.add 5 #helper (loadPicture (getIconFromBitmap (iconDir + "\\Helpers_16i.bmp") 1))

tv.imageList = ilTv

)

*/

fn initTreeView tv =

(

tv.Indent= 28

tv.CheckBoxes = true --same as in ActiveX

--This is the icons directory.

--We could also use the new colorman.resolveIconFolder() method

--to get the path to the actual system icons...

iconDir = (getDir #ui) + "\\icons\\"

--We call our function for each icon, this time also passing a

--third argument with the icon name suffix.

getIconFromBitmap (iconDir + "Standard_16i.bmp") 2 "Sphere"

getIconFromBitmap (iconDir + "Standard_16i.bmp") 1 "Box"

getIconFromBitmap (iconDir + "Lights_16i.bmp") 3 "Light"

getIconFromBitmap (iconDir + "Cameras_16i.bmp") 2 "Camera"

getIconFromBitmap (iconDir + "Helpers_16i.bmp") 1 "Helper"

--At the end, we assign the ImageList to the TreeView.

tv.imageList = ilTv

)

/* ActiveX Version:

fn addChildren tv theNode theChildren =

(

for c in theChildren do

(

theIcon = case superclassof c of

(

GeometryClass: 2

Light: 3

Camera: 4

Helper: 5

Default:2

)

newNode = tv.Nodes.add theNode.index 4 "" c.name theIcon

theNode.sorted = true

newNode.checked = not c.isHidden

newNode.forecolor = color c.wirecolor.b c.wirecolor.g c.wirecolor.r

addChildren tv newNode c.children

)

)

*/

fn addChildren theNode theChildren =

(

for c in theChildren do

(

newNode = theNode.Nodes.add c.name

newNode.tag = dotNetMXSValue c

--By default, all nodes will use icon 0 (the first one) unless

--specified otherwise via the .iconIndex and .selectedIconIndex

--properties. We set both of them to the icon corresponding to

--the superclass of the scene object:

newNode.imageIndex = newNode.selectedImageIndex = case superclassof c of

(

Default: 1

Light: 2

Camera: 3

Helper: 4

)

newNode.checked = not c.isHidden --same as in ActiveX

--For the color, we create a DotNet color class from the

--wirecolor of the object and assign to the .forecolor of

--the TreeView node:

newNode.forecolor = (dotNetClass "System.Drawing.Color").fromARGB c.wirecolor.r c.wirecolor.g c.wirecolor.b

addChildren newNode c.children

)

)

--Since every node uses icon with index 0 unless specified otherwise

--the Root Node will use the first icon by default.

fn fillInTreeView tv =

(

theRoot = tv.Nodes.add "WORLD ROOT"

rootNodes = for o in objects where o.parent == undefined collect o

addChildren theRoot rootNodes

)

dotNetControl tv "TreeView" width:290 height:490 align:#center

on tv Click arg do

(

hitNode = tv.GetNodeAt (dotNetObject "System.Drawing.Point" arg.x arg.y)

if hitNode != undefined do

try(select hitNode.tag.value)catch(max select none)

)

/*

on tv NodeCheck theNode do

(

theSceneNode = (getNodeByName theNode.text)

if theSceneNode != undefined do

theSceneNode.isHidden = not theNode.checked

)

*/

--NOTE that in the case of ActiveX controls, we were using the name

--displayed by the TreeView node. In the case of DotNet, we are

--using the actual MAXScript value pointing at the scene object.

--The arg argument provides a .node property containing the node

--that was checked. We use the .tag property to access the

--DotNetMXSValue stored in the TreeView node and then the .value to

--get the MAXScript value stored in it. Then we set the isHidden

--property of the scene object to the inverse of the checked state

--of the TreeView node:

on tv AfterCheck arg do

try (arg.node.tag.value.isHidden = not arg.node.checked)catch()

on treeview_rollout open do

(

initTreeView tv

fillInTreeView tv

)

)

try(destroyDialog treeview_rollout)catch()

createDialog treeview_rollout 300 500

)

See also

DotNet In MAXScript

How To ... Develop a Scene Browser using TreeView ActiveX Control - Part One

How To ... Develop a Scene Browser using TreeView ActiveX Control - Part Two


dotNetClass:System.Windows.Forms.Clipboard

dotNet > dotNetClass > System.Windows.Forms.Clipboard

PROPERTIES OF dotNetClass:System.Windows.Forms.Clipboard | Default / Value
METHODS OF dotNetClass:System.Windows.Forms.Clipboard |
.[static]Clear() |
.[static]ContainsAudio() |
.[static]ContainsData format |
.[static]ContainsFileDropList() |
.[static]ContainsImage() |
.[static]ContainsText() |
.[static]ContainsText format |
.[static]Equals objA objB |
.[static]GetAudioStream() |
.[static]GetData format |
.[static]GetDataObject() |
.[static]GetFileDropList() |
.[static]GetImage() |
.[static]GetText() |
.[static]GetText format |
.[static]ReferenceEquals objA objB |
.[static]SetAudio audioStream |
.[static]SetAudio audioBytes |
.[static]SetData format data |
.[static]SetDataObject data |
.[static]SetDataObject data copy |
.[static]SetDataObject data copy retryTimes retryDelay |
.[static]SetFileDropList filePaths |
.[static]SetImage image |
.[static]SetText text |
.[static]SetText text format |
EVENTS OF dotNetClass:System.Windows.Forms.Clipboard |


dotNetObject:System.Windows.Forms.Timer

dotNet > dotNetObject > System.Windows.Forms.Timer

PROPERTIES OF dotNetObject:System.Windows.Forms.Timer | Default / Value
.Container : , read-only | undefined
.Enabled : | false
.Interval : | 100
.Site : | undefined
.Tag : | undefined
METHODS OF dotNetObject:System.Windows.Forms.Timer |
.CreateObjRef requestedType |
.Dispose() |
.Equals obj |
.[static]Equals objA objB |
.GetHashCode() |
.GetLifetimeService() |
.GetType() |
.InitializeLifetimeService() |
.[static]ReferenceEquals objA objB |
.Start() |
.Stop() |
.ToString() |
EVENTS OF dotNetObject:System.Windows.Forms.Timer |
Disposed sender e = ( ... ) |
Tick sender e = ( ... ) |


Interaction With The Operating System

The following topics cover the access to the system 3ds Max is running on.

Copy To and From Clipboard

System Information

System Tools

Windows Structure


Copy To and From Clipboard

The following methods allow the copying of text and bitmap values to and from the Windows Clipboard.

These methods are available in 3ds Max 2008 and higher. They were previously available in the [ AVG ] Avguard Extensions.

getclipboardText()

setclipboardText <string>

Get/Set the text string in Window's clipboard. getclipboardText returns a string value, or undefined if the clipboard does not contain a string. setclipboardText returns true if the string was successfully placed in the clipboard, an integer error code if failed. Error code meanings are:

-1: memory could not be allocated

-2: clipboard could not be opened

-3: clipboard could not be cleared

-4: clipboard could not be set

setclipboardBitmap <bitmap>

getclipboardBitmap()

Get/Set the bitmap in Window's clipboard. getclipboardBitmap returns a bitmap value, or undefined if the clipboard does not contain a bitmap. setclipboardBitmap returns true if the bitmap was successfully placed in the clipboard, an integer error code if failed. Error code meanings are:

-1: memory could not be allocated

-2: clipboard could not be opened

-3: clipboard could not be cleared

-4: clipboard could not be set

EXAMPLE

(

local str = "Sorry For The Inconveniences!"

retCode = setclipboardText str

format "Return Code: %\n" retCode

local result = getclipboardText()

if (result != str) then

throw "Clipboard functions didn't work"

else

format "%\n" result

local bm1 = bitmap 100 100 color:red

retCode = setclipboardBitmap bm1

format "Return Code: %\n" retCode

local bm2 = getclipboardBitmap()

display bm2

OK

)

See also

Interaction With The Operating System


Local and Universal Time

The following methods and system global variables provide access to the system's time.

These methods are available in 3ds Max 2008 and higher. They were previously available in the [ AVG ] Avguard Extensions.

getLocalTime()

getUniversalTime()

Return the Local respectively the Coordinated Universal Time (UTC) as an 8 element array.

Array elements are:

1. Year - Specifies the current year.

2. Month - Specifies the current month; January = 1, February = 2, and so on.

3. DayOfWeek - Specifies the current day of the week; Sunday = 0, Monday = 1, and so on.

4. Day - Specifies the current day of the month.

5. Hour - Specifies the current hour.

6. Minute - Specifies the current minute.

7. Second - Specifies the current second.

8. Milliseconds - Specifies the current millisecond.

localTime

This system global variable contains a String value that defines the current local date and time. This variable is read-only. An example of the value stored in localtime is:

s = localTime

"4/14/97 10:24:57 AM"

The format of this string is controlled by the date format selected in the main Windows Regional Settings control panel.


System Information

The sysinfo struct provides several variables and methods related to accessing system information like system directories, system name, user, desktop size and color depth, as well as hardware-related data like CPU count and memory usage.

Directories

sysInfo.windowsdir

A read only variable to get the Windows directory as a <string> value.

sysInfo.systemdir

A read only variable to get the Windows System directory as a <string> value.

sysInfo.tempdir

A read only variable to get the Temp directory as a <string> value.

sysInfo.currentdir

Variable to get/set the current directory as a <string> value.

The current directory is the directory MAXScript will look for files if no explicit path is specified, for example in fileIn() calls. If a relative path is specified in such a call, it will be resolved relatively to the directory in sysInfo.currentdir.

Since this variable can not only be read but also written to, it effectively allows you to specify the current directory at any time before using relative paths or no explicit paths at all.

EXAMPLE

sysinfo.currentdir

"C:\Documents and Settings\username\My Documents\3dsmax\Scripts"

sysinfo.currentdir = "C:\\Temp"

"C:\Temp"

fileIn "test.ms" --this will load the script from C:\Temp

OK

User and Computer Names:

sysInfo.username

A read only variable to get the user name as a <string> value.

sysInfo.computername

A read only variable to get the computer name as a <string> value.

CPU and Desktop Info:

sysInfo.cpucount

A read only variable to get the number of CPUs as an <integer> value.

sysInfo.desktopSize

A read only system global variable - returns the Windows Desktop size in pixels as a Point2 value. Note that on dual monitor systems with the desktop set to stretch on both monitors, the desktop size returned will include the second monitor.

sysInfo.desktopBPP

A read only system global variable. Returns the Windows Desktop color depth as an integer value in Bits Per Pixel. For example, if the graphics driver is set to 32 bit True Color, the value returned will be 32.

3ds Max Process Priority and Affinity:

sysInfo.MAXPriority

Get/set the 3ds Max process priority as a <name> value. Valid priority name values are #high, #normal, and #low

sysinfo.processAffinity

Get/set the process affinitity (the processors the process can use) as an integer. Each bit in the integer corresponds to a processor. If the bit is set, the process can use that processor.

Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

sysinfo.systemAffinity

Get the system affinitity (the processors present in the system) as an integer. Each bit in the integer corresponds to a processor. If the bit is set, the processor exists.

Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

EXAMPLE

The following example shows how to get a bitarray with a bit set for each existing processor (core):

sysinfo.systemAffinity

1P

(for i = 1 to 32 where bit.get sysinfo.systemAffinity i collect i) as bitarray

#{1}

System Language:

sysinfo.getLanguage()

A method which returns a 3 element array:

The first 2 elements are integer values that correspond to the Primary Language and SubLanguage IDs. See the Windows SDK Help file for documentation of these IDs.

The third element is a description script for the current language.

If user: is true (the default) the current user's language is returned. If false, the system's language is returned.

Available in 3ds Max 6 and higher.

Memory Usage Info:

sysinfo.getSystemMemoryInfo()

A method which returns a 7 element array containing system memory status data. The array elements contain the following, respectively:

  • percent of memory in use

  • bytes of physical memory

  • free physical memory bytes

  • bytes of paging file

  • free bytes of paging file

  • user bytes of address space

  • free user bytes

EXAMPLE

(

r=sysinfo.getSystemMemoryInfo()

for i=2 to 7 do r[i] /= (1024*1024.)

format "percent of memory in use:\t%\n" r[1]

format "total physical memory:\t% MB\n" r[2]

format "free physical memory:\t% MB\n" r[3]

format "used physical memory:\t% MB\n" (r[2]-r[3])

format "total paging file size:\t% MB\n" r[4]

format "free paging file size:\t% MB\n" r[5]

format "used paging file size:\t% MB\n" (r[4]-r[5])

format "total virtual memory:\t% MB\n" r[6]

format "free virtual memory:\t\t% MB\n" r[7]

format "used virtual memory:\t\t% MB\n" (r[6]-r[7])

ok

)

OUTPUT

percent of memory in use: 0

total physical memory: 255.359 MB

free physical memory: 16.5156 MB

used physical memory: 238.844 MB

total paging file size: 1016.3 MB

free paging file size: 757.898 MB

used paging file size: 258.398 MB

total virtual memory: 2047.88 MB

free virtual memory:  1846.55 MB

used virtual memory:  201.328 MB

OK

sysinfo.getMAXMemoryInfo()

Returns a 9 element array containing 3ds Max memory status data. The array elements contain the following, respectively:

  • Page Fault Count

  • Peak Working Set Size

  • Working Set Size

  • Quota Peak Paged Pool Usage

  • Quota Paged Pool Usage

  • Quota Peak NonPaged Pool Usage

  • Quota NonPaged Pool Usage

  • Pagefile Usage

  • Peak Pagefile Usage

EXAMPLE

(

r=sysinfo.getMAXMemoryInfo()

for i=2 to 9 do r[i] /= (1024*1024.)

format "Page Fault Count:\t\t\t%\n" r[1]

format "Peak Working Set Size:\t\t% MB\n" r[2]

format "Working Set Size:\t\t\t% MB\n" r[3]

format "Quota Peak Paged Pool Usage:\t% MB\n" r[4]

format "Quota Paged Pool Usage:\t\t% MB\n" r[5]

format "Quota Peak NonPaged Pool Usage:\t% MB\n" r[6]

format "Quota NonPaged Pool Usage:\t\t% MB\n" r[7]

format "Pagefile Usage:\t\t\t% MB\n" r[8]

format "Peak Pagefile Usage:\t\t\t% MB\n" r[9]

ok

)

OUTPUT

Page Fault Count:   32948

Peak Working Set Size:  70.3594 MB

Working Set Size:   70.3594 MB

Quota Peak Paged Pool Usage: 0.166186 MB

Quota Paged Pool Usage:  0.161236 MB

Quota Peak NonPaged Pool Usage: 0.0213509 MB

Quota NonPaged Pool Usage:  0.0213509 MB

Pagefile Usage:   58.9023 MB

Peak Pagefile Usage:   58.9219 MB

See also

Interaction With The Operating System

How To ... Access Windows System Data


System Tools

The global struct called systemTools was added to MAXScript in 3ds Max 4 and was extended in 3ds Max 2008.

This group of functions lets you gather various pieces of information about the system 3ds Max is running on.

systemTools.NumberOfProcessors()

Returns the number of processors

systemTools.GetScreenWidth()

Returns the screen width including multiple monitors.

systemTools.GetScreenHeight()

Returns the screen height including multiple monitors.

systemTools.IsWindows98or2000()

Returns true if the Operating System is Windows98, Windows 2000, Windows XP or Windows Vista.

systemTools.IsWindows9x()

Returns true if the OS is a Win9x flavor.

systemTools.IsDebugging()

Returns true if running in a Debugger.

systemTools.getEnvVariable <string>

Returns the contents of specified environment variable. If the specified environment variable does not exist, returns a value of undefined. Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

EXAMPLE

systemTools.getEnvVariable "PATH"

"C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\Autodesk Shared\;C:\Program Files\backburner 2\;"

systemTools.setEnvVariable <string> { <string> | undefined }

Sets the contents of specified environment variable. Returns true if the set occurred, false if not. If second arg is the value undefined, the environment variable is deleted. Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

See also

Interaction With The Operating System

System Information


Windows Structure

The Windows struct provides methods to access the Windows OS' User Interface elements.

These methods are available in 3ds Max 2008 and higher. They were previously available in the [ AVG ] Avguard Extensions.

windows.getChildrenHWND {<int_HWND>|#max} parent:{<int_HWND>|#max}

This method returns an array of the children windows of the specified HWND, recursively.

If the specified HWND is 0, only the top level desktop windows are returned (not recursively).

If the parent HWND is specified, only windows whose immediate parent is the specified window are returned.

If #max is specified as the HWND, the HWND associated with the 3ds Max main window is used.

If the specified HWND does not exist, the value undefined is returned.

Otherwise, an array is returned.

Each element of the array corresponds to a window, and contains a 5 element array. The elements of these arrays represent the window's

1: HWND

2: parent's HWND

3: ancestor's HWND

4: class name as a string

5: window text as a string

FOR EXAMPLE, A PARTIAL RESULT FROM THE CALL

print (windows.getChildrenHWND #max)

looks like

...

#(330752P, 592998P, 592998P, "#32770", "Main Toolbar")

#(135510P, 330752P, 330752P, "CustToolbar", "")

#(69978P, 135510P, 135510P, "CustButton", "")

#(69980P, 135510P, 135510P, "CustButton", "")

#(69982P, 135510P, 135510P, "CustSeparator", "")

#(69984P, 135510P, 135510P, "CustButton", "")

#(69986P, 135510P, 135510P, "CustButton", "")

#(69988P, 135510P, 135510P, "CustButton", "")

#(69990P, 135510P, 135510P, "CustSeparator", "")

#(69992P, 135510P, 135510P, "ComboBox", "All")

...

In this case, the Main Toolbar of 3ds Max is a docked window which has a HWND of 330752, the 3ds Max main window's HWND is 592998, the class name of the Main Toolbar is "#32770" and the window text of the toolbar is "Main Toolbar".

The next element is the toolbar window is the toolbar itself which has a HWND of 135510 and is parented by the Main Toolbar window with HWND 330752. The class of the toolbar is "CustToolbar" and it does not display any text.

The next element is the Undo Button, first icon in the toolbar. It has a HWND of 69978 and is parented by the custom toolbar with HWND of 135510. Its class is "CustButton" and has no text associated with it.

After the next element with HWND of 69980 representing the Redo button on the Main Toolbar, we have a Separator, then the Link, Unlink and Bind To Spacewarp icons, yet another separator and the Selection Filter with HWND 69992 and class name "ComboBox" which by defaults displays the text "All"…

windows.getChildHWND {<int_HWND>|#max} <string> parent:{<int_HWND>|#max}

The mehod returns the child window of the specified HWND with the given child window's text. Child windows are recursively searched.

If the specified HWND is 0, only the top level desktop windows are searched (not recursively).

If the parent HWND is specified, only windows whose immediate parent is the specified window are searched.

If #max is specified as the HWND, the HWND associated with 3ds Max main window is used.

If the specified HWND does not exist, the value undefined is returned.

If a child window with the specified text is not found, undefined is returned.

The text comparison is case insensitive.

If a match is found, a 5 element array is returned, where the elements of the array correspond to the following window properties:

1: HWND

2: parent's HWND

3: ancestor's HWND

4: class name as a string

5: window text as a string

FOR EXAMPLE, A PARTIAL RESULT FROM THE CALL

max file xref object -- open xref object dialog

xro_hwnd = windows.getChildHWND 0 "XRef Objects" parent:#max -- find xref object dialog

if xro_hwnd != undefined do windows.sendMessage xro_hwnd[1] 0x0010 0 0 -- if found, send close message

max file xref scene -- open xref sceen dialog

xrs_hwnd = windows.getChildHWND 0 "XRef Scenes" parent:#max -- find xref scene dialog

if xrs_hwnd != undefined do windows.sendMessage xrs_hwnd[1] 0x0010 0 0 -- if found, send close message

LISTENER OUTPUT:

OK

#(1117532P, 65556P, 592998P, "#32770", "XRef Objects")

1

OK

#(1183068P, 65556P, 592998P, "#32770", "XRef Scenes")

1

windows.getMAXHWND()

This method returns the HWND of the main 3ds Max window as an integer.

windows.getDesktopHWND()

This method returns the HWND of the MS Window's desktop as an integer.

See also

Interaction With The Operating System

Sending Windows Message


HKey Values

HKey class instances are used to access registry keys.

Available in 3ds Max 2008 and higher. Previously available in the [ AVG ] Avguard Extensions.

Constructors

HKey <HKey parentKey> <string keyName> <int writeAccess>

Opens existing subkey of parentKey.

This constructor is not typically used, instead the method registry.openKey() is used.

Properties

<HKey>.parentKey : HKey - read-only - parent HKey

Contains the parent HKey of the sub key.

<HKey>.name  : String - read-only - subKey name

Contains the name of the sub key.

<HKey>.accessRights : Integer - read-only - access rights flags

Contains the access rights of the sub key (see tables below)

writeAcces values are as follows (see platform SDK help file for more info):

STANDARD_RIGHTS_READ | 0x00020000
STANDARD_RIGHTS_WRITE | 0x00020000
STANDARD_RIGHTS_ALL | 0x001F0000
KEY_QUERY_VALUE | 0x00000001
KEY_SET_VALUE | 0x00000002
KEY_CREATE_SUB_KEY | 0x00000004
KEY_ENUMERATE_SUB_KEYS | 0x00000008

writeAccess values for common access types are:

#readOnly | 0x00020019
#writeOnly | 0x00020006
#all | 0x000f003f

See also

Registry Structure

Interaction With The Operating System


Registry Structure

The Registry struct provides methods to access the Windows OS' Registry Keys.

These methods are available in 3ds Max 2008 and higher. They were previously available in the [ AVG ] Avguard Extensions.

WARNING!

Messing with the Windows Registry can destabilize your operating system and should be performed only by professionals who know what they are doing!

registry.closeKey <HKey>

Closes the open HKey. Returns true if successful, false if error. Use registry.getLastError() to get error message.

A HKey should not be used after it has been closed, because it will no longer be valid.

HKeys should not be left open any longer than necessary.

The closeKey method does not necessarily write information to the registry before returning; it can take as much as several seconds for the cache to be flushed to the hard disk.

If an application must explicitly write registry information to the hard disk, it can use registry.flushKey(). That method, however, uses many system resources and should be called only when necessary.

registry.flushKey <HKey>

Writes all the attributes of the open HKey into the registry. Returns true if successful, false if error. Use registry.getLastError() to get error message.

It is not necessary to call registry.flushKey() method to change a key. Registry changes are flushed to disk by the registry using its lazy flusher. Lazy flushing occurs automatically and regularly after a system-specified interval of time. Registry changes are also flushed to disk at system shutdown. Unlike registry.closeKey(), registry.flushKey() returns only when all the data has been written to the registry. registry.flushKey() may also write out parts of or all of the other keys.

Calling this function excessively can have a negative effect on an application's performance. An application should only call registry.flushKe() if it requires absolute certainty that registry changes are on disk.

In general, registry.flushKey() rarely, if ever, need be used.

registry.deleteSubKey <HKey> <string subKeyName> recurse:<bool>

Deletes the specified subkey of the open HKey. The entire key, including all of its values, is removed. Returns true if successful, false if error. Use registry.getLastError() to get error message.

If recurse is false or not specified, the subkey to be deleted must not have subkeys. If recurse is true, the subkey and all its descendants are deleted.

registry.deleteKey <HKey> recurse:<bool>

Deletes the HKey. The parent HKey of the specified HKey must be open. The entire key, including all of its values, is removed. Returns true if successful, false if error. Use registry.getLastError() to get error message.

If recurse is false or not specified, the HKey to be deleted must not have subkeys. If recurse is true, the HKey and all its descendants are deleted.

registry.createKey <HKey> <string subKeyName> accessRights:<{#readOnly | #writeOnly | #all | <int>}> newKeyCreated:<&bool> Key:<&HKey> volatile:<bool>

Creates a new HKey as a subkey of the specified open HKey. If the subkey already exists, the function opens it.

Returns true if successful, false if error. Use registry.getLastError() to get error message.

See "HKey Values" for a description of the <int> values for accessRights. The default accessRights is #all

If a new key is created, a true value will be written to the newKeyCreated: keyword variable.

If a new key is created or an existing key is opened, the HKey value will be written to the Key: keyword variable.

If volatile: is false or not specified, the key information will be written to the registry file. If true, the information is stored only in memory and is not preserved when the corresponding registry hive is unloaded.

EXAMPLE

registry.createKey HKEY_CLASSES_ROOT ".123" accessRights:#all newKeyCreated:&newKeyCreated key:&key1

registry.openKey <HKey> <string subKeyName> accessRights:<{#readOnly | #writeOnly | #all | <int>}> key:<&HKey>

Opens an existing HKey.

Returns true if successful, false if error. Use registry.getLastError() to get error message.

registry.openKey does not create the specified key if the key does not exist in the registry.

See "HKey Values" for a description of the <int> values for accessRights. The default accessRights is #readOnly

If a HKey is successfully opened, the HKey value will be written to the Key keyword variable.

EXAMPLE

registry.openKey HKEY_CLASSES_ROOT ".123" accessRights:#all key:&key1

registry.deleteValue <HKey> <string valueName>

Deletes the specified value of the open HKey.

Returns true if successful, false if error.

Use registry.getLastError() to get error message.

If valueName is an empty string (""), the default value on the HKey is deleted.

registry.setValue <HKey> <string valueName> <name valueType> <value data>

Sets the data type and value of the specified value of the open HKey.

Returns true if successful, false if error.

Use registry.getLastError() to get error message.

If valueName is an empty string (""), the default value on the HKey is set.

The valid valueType values for setValue, and the corresponding MXS data type are:

#REG_DWORD - integer

#REG_SZ - string

#REG_EXPAND_SZ - string that contains unexpanded references to environment variables

#REG_MULTI_SZ - array of strings

EXAMPLE

registry.setvalue key1 "" #multiSZ #("zz","ww")

registry.queryValue <HKey> <string valueName> type:<&name> value:<&value> expand:<bool>

Gets the data type and value of the specified value of the open HKey.

Returns true if successful, false if error.

Use registry.getLastError() to get error message.

If the query is successful, the data type will be written to the type keyword variable.

If the query is successful and the data type is one of the following supported data types, the data value will be written to the value keyword variable.

#REG_DWORD - integer

#REG_SZ - string

#REG_EXPAND_SZ - string that contains unexpanded references to environment variables

#REG_MULTI_SZ - array of strings

If the data type is REG_EXPAND_SZ, and expand is true, the environment variables are expanded in the returned data value.

Other data types that may be returned, but are not currently supported, are:

#REG_BINARY

#REG_DWORD_LITTLE_ENDIAN

#REG_DWORD_BIG_ENDIAN

#REG_LINK

#REG_NONE

#REG_QWORD

#REG_QWORD

#REG_RESOURCE_LIST

EXAMPLE

registry.queryValue key2 "Notepad.exe" type:&type value:&val

registry.queryInfoKey <HKey> numSubKeys:<&int> numValues:<&int>

Gets the number of subkeys and values of the open HKey.

Returns true if successful, false if error.

Use registry.getLastError() to get error message.

If the query is successful, the number of subKeys and values will be written to the numSubKeys: and numValues: keyword variable, respectively.

EXAMPLE

registry.queryInfoKey key2 numSubKeys:&numSubKeys numValues:&numValues

registry.isKeyOpen <HKey>

Returns true of the specified HKey is open.

registry.isParentKeyOpen <HKey>

Returns true of the parent HKey of the specified HKey is open.

registry.isKeyConstant <HKey>

Returns true if the HKey is a constant (root) HKey.

registry.getParentKey <HKey>

Returns the parent HKey of the specified HKey.

registry.getSubKeyName <HKey> <index> name:<&name>

Get a subkey name of the open HKey by index. Returns true if successful, false if error. Use registry.getLastError() to get error message.

If successful, the name will be written to the name: keyword variable.

EXAMPLE

registry.getSubKeyName key2 i name:&vname

registry.getSubKeyNames <HKey> names:<&array>

Get array of subkey names of the open HKey by index. Returns true if successful, false if error. Use registry.getLastError() to get error message.

If successful, an array of the subkey names as strings name will be written to the names: keyword variable.

EXAMPLE

registry.getSubKeyNames key2 names:&vnames

registry.getValueName <HKey> <index> name:<&name>

Get a value name of the open HKey by index. Returns true if successful, false if error. Use registry.getLastError() to get error message.

If successful, the name will be written to the name: keyword variable.

EXAMPLE

registry.getValueName key2 i name:&vname

registry.getValueNames <HKey> names:<&array>

Get array of value names of the open HKey by index. Returns true if successful, false if error. Use registry.getLastError() to get error message.

If successful, an array of the value names as strings name will be written to the names: keyword variable.

EXAMPLE

registry.getSubKeyNames key2 names:&vnames

registry.getLastError()

return string describing the last registry error that occurred\n"));

EXAMPLES:

registry.openKey HKEY_CLASSES_ROOT "*" accessRights:#readOnly key:&key2

registry.queryInfoKey key2 numSubKeys:&numSubKeys numValues:&numValues;numSubKeys;numValues

for i = 1 to 2 do

(registry.getSubKeyName key2 i name:&vname;print vname)

registry.isKeyOpen key2

registry.setvalue key2 "" #REG_SZ "123123" -- fails because opened with #readOnly access

registry.getLastError()

registry.getSubKeyNames key2 names:&names;names

registry.getvalueNames key2 names:&names;names

registry.queryValue key2 "InfoTip" type:&type value:&val;type;val

registry.createKey HKEY_CLASSES_ROOT ".123x" accessRights:#all key:&key1

registry.setvalue key1 "" #REG_MULTI_SZ #("zz","ww")

registry.queryValue key1 "" type:&type value:&val;type;val

registry.setvalue key1 "" #REG_SZ "123123"

registry.queryValue key1 "" type:&type value:&val;type;val

registry.deleteKey key1

registry-related global variables:

HKEY_CLASSES_ROOT

HKEY_CURRENT_CONFIG

HKEY_CURRENT_USER

HKEY_LOCAL_MACHINE

HKEY_USERS

HKEY_PERFORMANCE_DATA

See also

HKey Values

Interaction With The Operating System


The MAXScript Debugger

The MAXScript Debugger in 3ds Max 8 implements the first half of a script development and debugging environment. It allows the main thread of 3ds Max to be suspended, the values of global and local variables to be examined and altered while the 3ds Max thread is not running, MAXScript commands to be executed from a command line, and the execution to be suspended using method calls from inside the MAXScript code. The Debugger also lets you stop or continue the execution of the suspended code.

In future versions of MAXScript, this base system will be extended with support for break points in the MAXScript Editor and more.

Accessing the Debugger Dialog

The MAXScript Debugger Dialog can be opened using

  • The 3ds Max Main menu > MAXScript > Debugger Dialog... item

  • The MAXScript Listener menu > Debugger > Debugger Dialog... item

  • A MAXScript Editor menu > Debugger > Debugger Dialog... item

The Debugger Dialog

The MAXScript Debugger Dialog runs in a separate thread and is thus independent of 3ds Max. The Debugger has its own icon and will be represented as a separate application in the Windows Taskbar. This allows it to break the execution of 3ds Max threads while remaining interactive.

The Debugger Dialog is resizable - you can drag the bottom right corner or the borders of the dialog to resize. You can also minimize, maximize and close the dialog as any other window.

The Debugger dialog provides the following controls:

Command

This is a command line where you can input Debugger commands to navigate the code frames, query variables, change variable values and execute MAXScript commands in Break mode.

Available commands are:

  • threads - list all threads

  • setThread <integer literal> - set specified thread as active thread
    stack - dump stack for active thread

  • setFrame <integer literal> - set specified frame as active frame
    locals {<string literal>} - dump variables for current active thread and frame, or specified variable

  • getVar <string literal> - get value for specified variable in active frame or global

  • setVar <string literal> <expr> - set value for specified variable in active frame or global, expression is evaluated in active frame's scope

  • eval <expr> - evaluate expression, expression is evaluated in active frame's scope

  • ? - display list of debugger commands

Output

This is the output window where the code trace-back is output, as well as the results of commands input in the Command line.

Break

This is the button which breaks the execution of the main 3ds Max thread and allows the Debugger to "peek" into the current state of any MAXScript code that was running in that thread. When pressed, the button will be disabled until the Run or Stop buttons have been pressed to continue the execution of the 3ds Max thread. During a break state, the 3ds Max UI will be completely unavailable.

NOTE:

Functions, mouse tools, plugins, and rollouts that are defined in encrypted scripts will NOT have their local variable values dumped during error traceback, or shown in the debugger frames after a break. This is to prevent low-level access to encrypted commercial code.

Run

Resumes the execution of the main 3ds Max thread after a break. The button is disabled by default and becomes available after a break has been performed.

NOTE:

If you hold down the Escape key when you click on the Run button, MAXScript will typically immediately throw an exception. However, if Break on Error is turned on in the Debugger, this exception will cause a break back into the Debugger.

Evaluate

This button causes the command line to be evaluated.

Watch...

This checkbutton opens the Watch Manager dialog which can be used to monitor the values of global and local variables of interest. When checked, the Watch Manager will be opened. When unchecked, the Watch Manager will be closed.

Stop

This button can be used to stop the execution of the code after a break instead of continuing the execution with Run. The Stop button resumes 3ds Max execution, but causes an exception to be thrown by the calling script. This exception will not be caught by the Debugger, allowing the running script to terminate.

NOTE:

The Stop button is enabled only when execution is broken by a script, not when execution is broken by the Break button.

Clear

This button clears the content of the Output window.

The Debugger Parameters Dialog

The Config button opens the modal MAXScript Debugger Parameters dialog which can be used to customize the Debugger settings and toggle certain features on and off.

The MAXScript Debugger Parameters dialog provides the following options:

  • Allow Break On Throw - When checked, if a throw has been detected, the Debugger will break the code execution. Default is on.

  • Break On Error - When checked, if an error has been detected, the Debugger will break the code execution. Default is off.

  • Break On Exception - When checked, if an exception has been detected, the Debugger will break the code execution. Default is off.

  • Ignore Caught Throws - When checked, if a throw has been caught, the Debugger will ignore that throw and will not break the code execution. When unchecked, caught throws will still cause the Debugger to break. Default is on.

  • Ignore Caught Errors - When checked, if an error has been caught, the Debugger will ignore that error and will not break the code execution. When unchecked, caught errors will still cause the Debugger to break. Default is on.

  • Ignore Caught Exceptions - When checked, if an exception has been caught, the Debugger will ignore that exception and will not break the code execution. When unchecked, caught exceptions will still cause the Debugger to break. Default is on.

  • Default Throw debugBreak:on - this checkbox controls the default behavior of the Throw() method in MAXScript code. When checked, the optional debugBreak: argument will be assumed true, causing a break in the Debugger from any Throw() method call in your code that does not supply the optional argument. Default is off.

  • Enabled In Quiet Mode - when checked, the Debugger will be enabled in Quiet Mode. Default is off.

  • Enabled in Net Render - when checked, the Debugger will be enabled during net rendering. Default is off.

  • Allow Unsafe Method Calls - normally, the Debugger will only allow "safe" methods to be executed from the Command line and will ignore attempts to execute calls that could potentially hang the main 3ds Max thread. When this checkbox is on, the Debugger will allow such calls. Default is off.
    In many cases, if a hang occurs, the hang will last only as long as the Command Timeout period. In some cases though, the hang will be complete and the 3ds Max session will need to be manually terminated.

  • Show Global Constants - when checked, global constants like pi, e etc. will also be shown. Default is off.

  • Show First Frame Only - when checked, only the information of the first frame will be shown. This is useful when you are only interested in the first frame, but there are multiple sub-frames which would be printed to the Output window. Default is off.

  • Stay On Top - when checked, the Debugger dialog will always stay on top. Default is off.

  • Command Timeout (secs.) - this value specifies how long the Debugger should wait for a command to be executed. After this number of seconds, the execution of the command will be stopped. This means that if for some reason the command causes 3ds Max to hang, control will be safely returned to the Debugger after a specified period of time. Default is 15 seconds.

  • GC Timeout (secs.) - this value specifies how long the Debugger should wait for a garbage collection. After this number of seconds, the execution of the garbage collector will be stopped. Default is 5 seconds.

  • Break Timeout (msecs.) - this value specifies how long the Debugger should try to break the 3ds Max thread. Default is 5 milliseconds.

  • Break Cycle (msecs.) - this value specifies the time period between break attempts. Default is 1 millisecond.

  • Reset - resets all settings to the factory defaults.

  • OK - confirms the changes and saves them for future usage.

  • Cancel - discards all changes and returns to the Debugger.

See Also:

Using the MAXScript Debugger

Interface: MXSDebugger


Using the MAXScript Debugger

The advantage of the MAXScript Debugger over using print/format is that when you hit the break, you can look at local variables, variables up the call tree (in each stack frame), and global variables. And if you can get to a scope via one of those, you can access variables in those scopes.

So, for example, you break in a scripted plug-in event handler. Normally you would not see the scripted plug-in's local variables or parameters. Using the Debugger you can not only see these, you can also change their value before continuing execution.

How many times have you gotten some sort of MAXScript error, and you couldn't tell what exactly the problem was just by looking at the values printed in the error trace-back, but if you could do some more digging to see other variables you could (thus the adding of print/format statements in the hope that they give you enough info).

3ds Max is multithreaded, and when you hit a breakpoint there can be multiple scripts running in different threads. The usual case of this is when you hit a scripted plug-in or controller while rendering. If you hit a breakpoint or exception in this case, the Debugger will default to the thread that threw it. But if you broke by hitting the break button, then it defaults to the main thread. But you may want to see what's running in a different thread, and can do so.

As you run a script and call functions, each function call creates its own stack frame. The stack frame simply contains the local variables associated with that function call. In each stack frame, the following variables are shown:

  • Parameters - the function arguments

  • Locals - the local variables

  • Externals - non-local variables used in the function

  • Owner - Parameters/Locals/Externals of the owner of the method

FOR EXAMPLE,

if you run the following code,

v = 0

r = 0

(

local pi = 3

for i = 1 to 1000000 do

(ss = random e pi; v += ss; v += r; if i == 999999 do throw "A")

)

and then hit Break, you would get:

** thread data: threadID:2224

** [stack level: 0]

** In i loop

** member of: anonymous codeblock

-- Parameters:

-- i: 184349

-- Locals:

-- ss: 2.78488

-- i: 184349

-- Externals:

-- owner: &lt;CodeBlock:anonymous&gt;

-- r: Global:r : 0

-- pi: 3

-- V: Global:V : 527028.0

-- Owner:

-- Locals:

-- pi: 3

-- Externals:

** [stack level: 1]

** called from anonymous codeblock

-- Locals:

-- pi: 3

-- Externals:

** [stack level: 2]

** called from top-level

First line just tells us which thread we are in. Most of the time this is not important. Then we start walking out through the function calls, dumping the stack frame for each. In this case there are 3 levels - the body of the FOR loop (which internally is handled as a function call), the code within the outer parenthesis, and the Listener executing the FOR loop.

For level 0, first we have the function name (i loop), and then we say what owns the function. In this case its the code block defined by the outer parenthesis. This code block is anonymous because it doesn't have a name. Other code blocks will.

FOR EXAMPLE,

if you drag the above code onto a toolbar to make a MacroScript, run the MacroScript and hit Break, the first couple of lines would look like:

** thread data: threadID:2224

** [stack level: 0]

** In i loop; filename:

C:\3dsmax8\UI\MacroScripts\DragAndDrop-Macro1.mcr; position: 186

** member of: codeblock macroScript: DragAndDrop_Macro1

Next thing shown is the Parameters, which for a for loop is just the for loop counter. The values shown here are the values passed to the function. Next are the Locals. There are 2- ss and i. Here, if a new value was assigned to variable i (the for loop counter), that new value would be shown. Next, the Externals are shown. These are variables that are used in the function, but are not local variables. They can be either defined in an outer scope, global scope, or some other outside scope. The owner variable allows you to access the owner of the function. If, for example, the function was in a scripted plug-in, the owner would be the scripted plug-in instance. Through this, you can get and set the owner's variables.

Finally, if there is an owner, the information for the owner is shown. In this case it is not that important since the next stack level shows the same thing, but in general that is not true (functions in scripted plug-ins, MacroScripts, rollouts).

The next stack level dumps the info for the caller of the function, the anonymous code block.

Let's say you wanted to change the value of variable 'pi'. You can only change a variable if you can access the variable. In this case, you can access 'pi' from within the for loop function via:
'owner.pi'

but if we had nested function calls, you wouldn't be able to get to it that way. Instead, you would have to set the current stack level to the desired level and set the variable.

FOR EXAMPLE:

>> setframe 1

** ok

>>locals

** thread data: threadID:2224

** [stack level: 1]

** In anonymous codeblock

-- Locals:

-- pi: 3.1

-- Externals:

>> setvar pi 3.5

3.5

>> getvar pi

3.5

Compare the above to the error traceback from throwing the exception:

-- Error occurred in i loop

--  Frame:

--   ss: 2.99878

--   i: 999999

--   called in anonymous codeblock

--  Frame:

--   pi: 3

-- Runtime error: A

There is also a Stop button in the MAXScript Debugger. After doing a Break, if you hit Run you will continue executing the code, if you hit Stop, the script will stop running.

Manual Break Points using the Break() function

You can add manual break points to your code by using the break() function to invoke the Debugger.

FOR EXAMPLE:

for i = 1 to 10000 do

(

theRandom = random 1 100

if theRandom == 50 do break()

)

In this simple example, the Debugger will be called if the random value generated within the loop generated the integer 50.

NOTE:

Some parts of the code are "locked" and cannot be stopped from executing.

One of the "locks" that prevents breaking into the debugger is one associated with arrays. When you are iterating across an array using the FOR statement, the lock is set.

FOR EXAMPLE:

for i in #(1,2) do break()

The result will be *** Break attempt timed out *** printed to the Debugger Output without a successful break.

Debugger variables for Functions

Each function has a special .owner variable that points to the owner of the function, if any. An owner can be a rollout, scripted plugin, rcmenu, mouse tool, macroscript, or anonymous code block. If a function is defined in the global scope, it does not have an owner. If it does have an owner, and the owner is not an anonymous code block, another debugger variable with the same name as the owner is created. Both of these variables contain the owner value. These variables are not true local variables, and are not accessible in the function. If the function declares a variable with the name 'owner', the debugger 'owner' variable will not be created.

See Also:

The MAXScript Debugger

Interface: MXSDebugger


MAXScript Extensions in character studio

The following chapters describe the MAXScript extensions providing access to various areas of character studio:

Biped MAXScript Extensions

Crowd MAXScript Extensions

WorkBench Core Interfaces

See also

Biped and Physique


Biped and Physique

The following topics describe the basic MAXScript access to Biped systems and the Physique modifier:

Biped

Biped : System

Biped-Related Classes

BipedExportInterface Values

For advanced access to Biped, see

Biped MAXScript Extensions

Physique

Physique : Modifier

See also

MAXScript Extensions in character studio


Biped : System

Constructor

For a complete description of the Biped Constructor and Creation Parameters, see Biped Creation

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Biped-Related Classes

The following classes associated with Biped systems. Instances of these classes are not creatable by MAXScript.

Geometry

Biped_Object : GeometryClass

This class represents each object within the biped system.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods

Controllers

Vertical_Horizontal_Turn : Matrix3Controller

This class represents the transform controller for the root object within the biped system.

BipSlave_Control : Matrix3Controller

This class represents the transform controller for each object within the biped system. If the object does not have a transform controller (that is, it is a slave of another object in the biped), a value of undefined is returned.

Footsteps : Matrix3Controller

This class represents both the transform controller for the footsteps and the footstep object.

See also

Controller Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


BipedExportInterface Values

The BipedExportInterface class is an interface into a Biped.

Constructor

getBipedExportInterface <biped_node>

Returns an instance of BipedExportInterface class. The biped_node can be any node associated with the Biped system, including the footprints.

Methods

setNonUniformScale <BipedExportInterface> <boolean>

Biped-based bone systems created prior to Character Studio version R2.1 have non-uniform scaling on the nodes that make up the biped object. This scaling can cause difficulties when exporting the biped. This function removes or restores the non-uniform scaling on a biped object. If <boolean> is true the non-uniform scaling will be set, and false will remove it. All non-uniform scaling information has been removed from new bipeds created with version R2.1 or greater of Character Studio, and this method is not required for exporting these bipeds.


Physique : Modifier

Physique - superclass: modifier; super-superclass:MAXWrapper - 0:0 - classID: #(256, 0)

Constructor

physique ...

Properties

There are no properties associated with Physique.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Biped MAXScript Extensions

The following topics provide description of methods for accessing the Biped, its Footsteps, the Motion Flow and the Crowd simulation in character studio

Biped Creation

Biped Creation

Biped Display, Load and Save

Biped Display Preferences

Biped Load and Save

Biped Hiearchy, Layers, SubAnims

Biped Node Hierarchy

Biped Layers

Biped Transform

Biped Sub Anims

Biped SubAnim Controller

Biped Copy and Paste Posture

Biped Footsteps

Biped Footsteps and Footprints

FootSteps : Matrix3 Controller

Biped Footprints

Biped MultFprintParams Class

Biped Controllers

Biped Controllers

Biped Slave Controller

Biped Vertical_Horizontal_Turn(Body):Matrix3 Controller

Biped SubAnim Controller

Biped Sub Anim Methods

Biped Keys

Biped Keys

BipedFSKey : MAXObject

BipedKey : MAXObject

Biped Motion Capture

Biped Motion Capture

Biped Motion Flow

Biped Motion Flow

MoFlow : MaxWrapper

MoFlowScript : MaxWrapper

MoFlowSnippet : MaxWrapper

MoFlowTranInfo : MaxWrapper

MoFlowTransition : MaxWrapper

Biped and Crowd

Biped and Crowd Interaction

Biped Transform Methods

Biped Transform Methods

Biped Miscellaneous Methods

Biped Miscellaneous Methods

Biped Sample Scripts

Biped Sample Scripts

See also

MAXScript Extensions in character studio


Biped Creation

The following constructor function and optional creation parameters let the user create new Biped systems using MAXScript:

Constructor

biped.createNew <height_float> <angle_float> <wpos_point3> . . .

<height_float>

The height of the Biped to be created

<angle_float>

Angle in degrees, 0° will make the Biped look along the positive X axis.

<wpos_point3>

World position of the Biped. This is the position of the COM shadow.

Creation Parameters

The following creation parameters are optional and can be used in any combination to override the default creation parameters.

NOTE:

All UI limit constraints apply on keyword parameters, for example, fingers and fingerLinks parameters are not respected when arms is set to false.

arms: Boolean Default: True

Specifies whether or not arms will be generated for the current biped.

neckLinks: Integer Default: 1

Specifies the number of links in the biped neck.

spineLinks: Integer Default: 4

Specifies the number of links in the biped spine.

legLinks: Integer Default: 3

Specifies the number of links in the biped legs.

tailLinks: Integer Default: 0

Specifies the number of links in the biped tail. A value of 0 specifies no tail.

ponytail1Links: Integer Default: 0

Specifies the number of Ponytail links.

ponytail2Links: Integer Default: 0

Specifies the number of Ponytail links.

fingers: Integer Default: 1

Specifies the number of biped fingers.

fingerLinks: Integer Default: 3

Sets the number of links per finger.

toes: Integer Default: 5

Specifies the number of biped toes.

toeLinks: Integer Default: 3

Specifies the number of links per toe.

ankleAttach: Float Default: 0.2

Specifies the right and left ankles' point of attachment along the corresponding foot block. The ankles may be placed anywhere along the center line of the foot block from the heel to the toe.

A value of 0 places the ankle attachment point at the heel. A value of 1 places the ankle attachment point at the toes.

trianglePelvis: Boolean Default: True

Select this control to create links from the upper legs to the lowest biped spine object when Physique is applied. Normally, the legs are linked to the biped pelvis object.

The pelvis area can be a problem when the mesh is deformed with Physique. Triangle Pelvis creates a more natural spline for mesh deformation.

prop1Exists: Boolean Default: False

Specifies whether prop 1 exists.

prop2Exists: Boolean Default: False

Specifies whether prop 2 exists.

prop3Exists: Boolean Default: False

Specifies whether prop 3 exists.

forearmTwistLinks: Integer Default: 0

Specifies the number of forearm links. If 0, Forearm Twist is unchecked in the Structure dialog, and Forearm Links is 2. If non-zero, Forearm Twist is checked and Forearm Links is the specified number (the Forearm Links spinner has a lower limit of 2). Valid values are in the range of 0 to 10.

The following example will create a Biped with specific non default values and facing the front view (negative Y axis).

EXAMPLE:

bipObj = biped.createNew 100 -90 [0,0,0] arms:true neckLinks:2 \

spineLinks:4 legLinks:4 tailLinks:1 ponyTail1Links:1 \

ponyTail2Links:1 fingers:5 fingerLinks:2 toes:4 \

toeLinks:2 ankleAttach:0.3 trianglePelvis:True \
prop1Exists:True forearmTwistLinks:4

See also

Biped MAXScript Extensions


Biped Display Preferences

Biped Display Preferences Access

Displays the Biped Display Preferences dialog.

Method

biped.displayPrefsDlg <biped_ctrl>

<biped_ctrl> Controller which is attached to the transform track of the Biped root objects.

A Biped Vertical_Horizontal_Turn(Body):Matrix3 Controller

The following example will display the Biped Display Preferences dialog:

EXAMPLE:

bipObj = biped.createNew 100 100 [0,0,0]

select bipObj

bip = bipObj.controller

-- Display properties

biped.displayPrefsDlg bip

See also

Biped Creation

Biped Controllers

Biped MaxScript Extensions


Biped Load and Save

Biped Load and Save Methods

This topic covers the load and save methods for motion, figure, score, keys, motion capture, and talent files.

Motion File Access Methods

biped.loadBipFile <biped_ctrl> <file_name> [#matchFileStruct] [#zeroHgt] [#noRedraw] [#loadMaxObjects][#promptForDuplicates] [#retargetHeight] [#retargetLimbSizes] [#scaleIKObjectSize] [#loadSubAnimControllers] [#loadSelectedMaxObjects nodename_array] [#loadSelectedSubAnimControllers bipednodename_array int_array]

Load a biped motion file. Motion files include, footsteps, keyframe settings, the biped scale, and the active gravity value (GravAccel). IK Blend values for the keys and Object Space Object information are also loaded. This method will generate a runtime error if run while the biped is in Figure, Footstep, or Motion Flow modes.

The optional arguments are:

#matchFileStruct

Restructure biped to match file

#zeroHgt

Set lowest starting foot height to Z=0

#noRedraw

Don’t redraw viewports after load

#loadMaxObjects

Load MAX objects

#promptForDuplicates

Prompt for duplicates

#retargetHeight

Retarget based on height

#retargetLimbSizes

Retarget based on limb sizes

#scaleIKObjectSize

Scale IK object’s size

#loadSubAnimControllers

Load List controllers

#loadSelectedMaxObjects

#loadSelectedSubAnimControllers

The loadBipFile function call was modified in 3ds Max 7 to handle selecting which max objects or subanims you wish to load.

NOTE:

For the selected objects, you pass in an array of strings of the nodes you wish to load. For the selected subanims you wish to load, you pass in array of string names of the biped nodes and a corresponding array of integers which specify which subanim (0= pos, 1 = rot, 2= scale).

biped.saveBipFile <biped_ctrl> <file_name> [#saveSubAnimControllers] [#saveMaxObjects] [#saveSelectedMaxObjects node_array] [#saveSelectedSubAnimControllers node_array int_array ]

Save a biped motion file. A .bip file includes footsteps and keyframe data. Biped files store the complete movement and allow you to create libraries of motion. Create your own .bip library by animating the biped and saving a .bip file. This method will generate a runtime error if run while the biped is in Figure, Footstep, or Motion Flow modes. If the Biped contains footstep animation, the entire animation is always saved.

The optional arguments are:

#saveMaxObjects

Save MAX objects

#saveSubAnimControllers

Save List controllers

#saveSelectedMaxObjects

#saveSelectedSubAnimControllers

The saveBipFile and saveBipFileSegment functions in 3ds Max 7 and higher let you selectively pick objects and subanims to save.

NOTE:

For the selected objects, you pass in an array of strings of the nodes you wish to save. For the subanims you wish to save you pass in an array of biped nodes and an array of corresponding subanim integers.

biped.saveBipFileSegment <biped_ctrl> <file_name> <StartSeg> <EndSeg> [#keyPerFrame] [#saveSubAnimControllers] [#saveMaxObjects] [#saveSelectedMaxObjects node_array] [#saveSelectedSubAnimControllers node_array int_array ]

Save a biped motion file for the specified time segment. StartSeg and EndSeg are integer values specifying the begin and end frames of the time segment to save. This method will generate a runtime error if run while the biped is in Figure, Footstep, or Motion Flow modes.

The optional arguments are:

#keyPerFrame

Saves a key per frame per object

#saveMaxObjects

Save MAX objects

#saveSubAnimControllers

Save List controllers

#saveSelectedMaxObjects

#saveSelectedSubAnimControllers

The saveBipFile and saveBipFileSegment functions in 3ds Max 7 and higher let you selectively pick objects and subanims to save.

NOTE:

For the selected objects, you pass in an array of strings of the nodes you wish to save. For the subanims you wish to save you pass in an array of biped nodes and an array of corresponding subanim integers.

Motion File Dialog Methods

biped.loadBipFileDlg <biped_ctrl>

Displays the load biped dialog.

biped.saveBipFileDlg <biped_ctrl>

Displays the save biped dialog.

Figure File Access Methods

biped.LoadFigFile <biped_ctrl> <filename> [#noRedraw]

Load a Figure file. Figure mode must be active to load a Figure file. Figure files allow you to apply the structure of one biped to another. Reload a Figure file if you accidentally lose your biped Figure mode pose; this pose is the biped fitted to a mesh.

The optional argument is:

#noRedraw – don’t redraw viewports after load

biped.loadFigJustTwists <biped_ctrl> <filename> [#noRedraw]

Load just the Twists from a Figure file. Figure mode must be active to load a Figure file. Corresponds to the radio button option "Load Twist Poses Only" in the Load Figure file dialog.

biped.loadFigNoTwists <biped_ctrl> <filename> [#noRedraw]

Load a Figure file without the Twists. Figure mode must be active to load a Figure file. Corresponds to the radio button option "Don't Load Twist Poses" in the Load Figure file dialog.

biped.SaveFigFile <biped_ctrl> <filename>

Save the structure and position of a biped in Figure mode.

Step File Access Methods

biped.LoadStpFile <biped_ctrl> <filename> [#noRedraw]

Step files save footsteps, but don't save body keyframes. They are an ASCII file format that enables developers to write programs that generate step files for biped motion. The online document stp.rtf, provided with character studio in the \cstudio\docs directory, describes the .stp format.

The optional argument is:

#noRedraw – don’t redraw viewports after load

biped.SaveStpFile <biped_ctrl> <filename>

Save footstep file.

Motion Capture File Access Methods

biped.loadMocapFile <biped_ctrl> <file_name> [#prompt] [#noRedraw]

Load a motion capture (.BIP, .BVH, .CSM) file. If.

The optional arguments are:

#prompt - the file is not automatically loaded, rather the Motion Capture Conversion Parameters dialog is displayed with the specified file as the motion capture file

#noRedraw – don’t redraw viewports after load

Talent File Access Methods

biped.adjustTalentPose <biped_ctrl>

After loading a marker file, use Adjust Talent Pose to correct the biped position relative to the markers. Align the biped limbs to the markers then call biped.adjustTalentPose to compute this offset for all the loaded marker data.

NOTE:

Calibration controls are only enabled when a marker or .bvh file is imported in its raw form. Do not use key reduction or extract footsteps when you import a marker file for the first time.

biped.saveTalentFigFile <biped_ctrl> <file_name>

After changing the biped scale in Talent Figure mode, save the changes into a .fig file. Use this file in the Motion Capture Conversion Parameters dialog to adjust marker files created by the same actor.

biped.saveTalentPoseFile <biped_ctrl> <file_name>

Save a Talent Pose adjustment as a .cal file.

Save a .cal file after adjusting the biped relative to the markers. A .cal file is used for processing marker files that require the same adjustment. A .cal file can be loaded in the Motion Capture Conversion Parameters dialog during marker file importation.


biped_object : GeometryClass

Constructor:

Class instances not creatable by MAXScript.

Description:

This class represents the individual Biped body part and footstep nodes’ baseobject. There are no class-specific properties or methods associated with this class. For the COM, the transform controller type is Vertical_Horizontal_Turn. For footsteps, the transform controller type is FootSteps. For the remaining biped body parts, the transform controller type is BipSlave_Control.

See also

Vertical_Horizontal_Turn Matrix3 Controller

FootSteps : Matrix3 Controller

BipSlave_Control Controllers

MAXScript Extensions in character studio


Biped Node Hierarchy

biped.getNode <biped | biped_ctrl> <name | index> [link:<int_link>]

Returns the specified limb node where the second argument can be a named limb (like #larm, #rarm, or #lfingers) or an integer index. If you don't specify the link argument the top (first) node is returned. If the specified node does not exist, a value of undefined is returned.

EXAMPLE

--you can get the left hand as follows:

biped.getNode $ #lArm link:4

The top level and their link nodes in character studio 4 are:

Index | Limb Name | Link Nodes in Link Index Order
1 | #larm | L Clavicle | L UpperArm | L Forearm | L Hand
2 | #rarm | R Clavicle | R UpperArm | R Forearm | R Hand
3 | #lfingers | L Finger0 | L Finger01 | L Finger02 | L Finger1
 |  | L Finger11 | L Finger12 | L Finger2 | L Finger21
 |  | L Finger22 | L Finger3 | L Finger31 | L Finger32
 |  | L Finger4 | L Finger41 | L Finger42 |
4 | #rfingers | R Finger0 | R Finger01 | R Finger02 | R Finger1
 |  | R Finger11 | R Finger12 | R Finger2 | R Finger21
 |  | R Finger22 | R Finger3 | R Finger31 | R Finger32
 |  | R Finger4 | R Finger41 | R Finger42 |
5 | #lleg | L Thigh | L Calf | L HorseLink | L Foot
6 | #rleg | R Thigh | R Calf | R HorseLink | R Foot
7 | #ltoes | L Toe0 | L Toe01 | L Toe02 | L Toe1
 |  | L Toe11 | L Toe12 | L Toe2 | L Toe21
 |  | L Toe22 | L Toe3 | L Toe31 | L Toe32
 |  | L Toe4 | L Toe41 | L Toe42 |
8 | #rtoes | R Toe0 | R Toe01 | R Toe02 | R Toe1
 |  | R Toe11 | R Toe12 | R Toe2 | R Toe21
 |  | R Toe22 | R Toe3 | R Toe31 | R Toe32
 |  | R Toe4 | R Toe41 | R Toe42 |
9 | #spine | Spine | Spine1 | Spine2 | Spine3
 |  | Spine4 |  |  |
10 | #tail | Tail | Tail1 | Tail2 | Tail3
 |  | Tail4 |  |  |
11 | #head | Head |  |  |
12 | #pelvis | Pelvis |  |  |
13 | #vertical | Biped COM |  |  |
14 | #horizontal | Biped COM |  |  |
15 | #turn | Biped COM |  |  |
16 | #footprints | Footsteps |  |  |
17 | #neck | Neck | Neck1 | Neck2 | Neck3
 |  | Neck4 |  |  |
18 | #pony1 | Ponytail1 | Ponytail11 | Ponytail12 | Ponytail13
 |  | Ponytail14 |  |  |
19 | #pony2 | Ponytail2 | Ponytail21 | Ponytail22 | Ponytail23
 |  | Ponytail24 |  |  |
20 | #prop1 | Prop1 |  |  |
21 | #prop2 | Prop2 |  |  |
22 | #prop3 | Prop3 |  |  |
101 | #lfArmTwist | L ForeTwist | L ForeTwist1 | L ForeTwist2 | L ForeTwist3
 |  | L ForeTwist4 | L ForeTwist5 | L ForeTwist6 | L ForeTwist7
 |  | L ForeTwist8 | L ForeTwist9 |  |
102 | #rfArmTwist | R ForeTwist | R ForeTwist1 | R ForeTwist2 | R ForeTwist3
 |  | R ForeTwist4 | R ForeTwist5 | R ForeTwist6 | R ForeTwist7
 |  | R ForeTwist8 | R ForeTwist9 |  |
103 | #lUparmTwist | L UpTwist | L UpTwist1 | L UpTwist2 | L UpTwist3
 |  | L UpTwist4 | L UpTwist5 | L UpTwist6 | L UpTwist7
 |  | L UpTwist8 | L UpTwist9 |  |
104 | #rUparmTwist | R UpTwist | R UpTwist1 | R UpTwist2 | R UpTwist3
 |  | R UpTwist4 | R UpTwist5 | R UpTwist6 | R UpTwist7
 |  | R UpTwist8 | R UpTwist9 |  |
105 | #lTighTwist | L TighTwist | L TighTwist1 | L TighTwist2 | L TighTwist3
 |  | L TighTwist4 | L TighTwist5 | L TighTwist6 | L TighTwist7
 |  | L TighTwist8 | L TighTwist9 |  |
106 | #rTighTwist | R TighTwist | R TighTwist1 | R TighTwist2 | R TighTwist3
 |  | R TighTwist4 | R TighTwist5 | R TighTwist6 | R TighTwist7
 |  | R TighTwist8 | R TighTwist9 |  |
107 | #lClafTwist | L CalfTwist | L CalfTwist1 | L CalfTwist2 | L CalfTwist3
 |  | L CalfTwist4 | L CalfTwist5 | L CalfTwist6 | L CalfTwist7
 |  | L CalfTwist8 | L CalfTwist9 |  |
108 | #rClafTwist | R CalfTwist | R CalfTwist1 | R CalfTwist2 | R CalfTwist3
 |  | R CalfTwist4 | R CalfTwist5 | R CalfTwist6 | R CalfTwist7
 |  | R CalfTwist8 | R CalfTwist9 |  |
109 | #lHorseTwist | L HorseTwist | L HorseTwist1 | L HorseTwist2 | L HorseTwist3
 |  | L HorseTwist4 | L HorseTwist5 | L HorseTwist6 | L HorseTwist7
 |  | L HorseTwist8 | L HorseTwist9 |  |
110 | #rHorseTwist | R HorseTwist | R HorseTwist1 | R HorseTwist2 | R HorseTwist3
 |  | R HorseTwist4 | R HorseTwist5 | R HorseTwist6 | R HorseTwist7
 |  | R HorseTwist8 | R HorseTwist9 |  |

Biped Node Hierarchy related methods

biped.maxNumNodes <biped | biped_ctrl>

Maximum nodes supported by Biped. In character studio 4, this value is 24. In future versions of character studio, additional top level nodes may be present. See the desrciption of biped.getNode() for a list of the top level nodes.

biped.maxNumLinks <biped | biped_ctrl>

Maximum link nodes supported by Biped. In character studio 4 this value is 16. In future versions of character studio, additional link nodes may be present. See the desrciption of biped.getNode() for a list of the link nodes.

EXAMPLE

bipObj = biped.createNew 100 0 [0,0,0] arms:true neckLinks:5 \

spineLinks:5 legLinks:4 tailLinks:5 ponyTail1Links:5 \

ponyTail2Links:5 fingers:5 fingerLinks:3 toes:5 \

toeLinks:3 ankleAttach:0.3 trianglePelvis:True \

prop1Exists:True prop2Exists:True prop3Exists:True \

forearmTwistLinks:4

nn = biped.maxNumNodes bipObj

nl = biped.maxNumLinks bipObj

for i = 1 to nn do

(

anode = biped.getNode bipObj i

if anode != undefined do

(

format "% :\t%\n" i anode.name

for j = 1 to nl do

(

alink = biped.getNode bipObj i link:j

if alink != undefined do

format "% : % \t%\n" i j alink.name

)

)

)

The above example code will give you all of the Biped nodes, but it will NOT give you the Biped twisty nodes.

In 3ds Max 7 it used to get the forearm twist nodes with ID 24 and 25, but that was all the twist nodes a Biped had.

In 3ds Max 8, twist nodes were added for the upper arms, the calves, the horse legs, and the thighs.

maxNumNodes was changed to return 22 instead of 24, so one could no longer access the forarm twists.

The IDs of the forarm twists were changed, and new IDs were added for all of the other twists, but there were no methods to allow users to access the twists.

The following methods were added in 3ds Max 9 to allow user access to the twisty bones in a Biped. They each take a Biped controller as their only parameter:

Biped.maxTwistNodes   <biped | biped_ctrl>

Number of twist node tracks supported by Biped. In 3ds Max 9, this value is 10. See the description of biped.getNode() for a list of the top level twist nodes.

Biped.maxTwistLinks   <biped | biped_ctrl>

Maximum number of link nodes for each twist track supported by Biped. In 3ds Max 9 this value is 10. In future versions, additional link nodes may be present. See the desrciption of biped.getNode() for a list of the link nodes.

Biped.getTwistStartId <biped | biped_ctrl>

Starting id for twist nodes. In max 9 this value is 101. See the desrciption of biped.getNode() for a list of the twist nodes and their ids.

Below is an example which gets all of the twisty nodes in a Biped.

EXAMPLE

nn = biped.maxTwistNodes bipObj

format "num twist nodes: %\n" nn

nl = biped.maxTwistLinks bipObj

format "max twist links: %\n" nl

ts = biped.getTwistStartId bipObj

format "twist start id: %\n" ts

for i = ts to ts+nn-1 do

(

    anode = biped.getNode bipObj i

    if anode != undefined do

    (

        format "% :\t%\n" i anode.name

        for j = 1 to nl do

        (

            alink = biped.getNode bipObj i link:j

            if alink != undefined do

            (

                format "% : % \t%\n" i j alink.name

            )

        )

    )

)

See also

Biped MaxScript Extensions

MAXScript Extensions in character studio


Biped Layers

Layer related methods

biped.collapseAtLayer <biped_ctrl> <index>

Collapses layer index+1 into layer index. All layers underneath (<= index+1) should be active for this function to work. Returns true if successful, otherwise false.

biped.createLayer <biped_ctrl> <index> <name>

Creates a layer at the specified position, maximum index value can be NumLayers

biped.deleteLayer <biped_ctrl> <index>

Deletes the specified layer

biped.getCurrentLayer <biped_ctrl>

Returns the position of the currently active layer in the UI

biped.getLayerActive <biped_ctrl> <index>

Returns true if the specified layer is active.

biped.getLayerName <biped_ctrl> <index>

Returns the specified layer name

biped.numLayers <biped_ctrl>

Returns the number of layers

biped.setCurrentLayer <biped_ctrl> <index>

Sets the active layer in the UI to the specified layer

biped.setLayerActive <biped_ctrl> <index> <bool_val>

Sets the specified layer to active/inactive based upon the bool_val passed

biped.setLayerName <biped_ctrl> <index> <name>

Sets the specified layer name to the value passed

biped.setSnapKey <biped_node>

Sets the snap key for a layer

The following example will create a new Biped, access it’s Vertical_Horizontal_Turn(Body) controller and load a specific *.Bip file:

EXAMPLE

-- create a new Biped

bipObj = biped.createNew 100 100 [0,0,0]

-- select bipObj

bip = bipObj.controller

max motion mode

-- File I/O

biped.LoadBipFile bip (CSPATH + "scripts\\Limploop.bip")

See also

Biped Creation

Biped Controllers

Biped MaxScript Extensions


Biped Transforms

Biped Transform Methods

biped.getTransform <biped_node> (#pos | #rotation | #scale) [limb:<biped_node>]

Gets the specified node’s transform in world coordinates

biped.setTransform <biped_node> #pos <point3> <bool_setkey> [limb:<biped_node>]

biped.setTransform <biped_node> #rotation <quat> <bool_setkey> [limb:<biped_node>]

biped.setTransform <biped_node> #scale <point3> <bool_setkey> [limb:<biped_node>]

Sets the specified transform in world coordinates. Setting scale is only applicable in Figure mode. When setting positions, Biped will try to place the node at the specified location, but the final position may be clamped by Biped’s IK. Since positions are in world coordinates, you should start at the biped root and work through the biped hierarchy setting positions.

biped.setKey <biped_node> copyHor:<bool_setHoriz> copyVer:<bool> copyTrn:<bool>

Sets a key on the controller for the specified biped node at the current time. If the node specified in the biped's COM, which tracks keys are created on depends on the boolean arguments.

biped.setSelectedKey <bipedCtrl>

Sets a key at the current frame on the specified controller. If the biped_ctrl is the biped's body controller, the key is set on the track corresponding to the current transform type (horizontal, vertical, rotation). Not applicable in footstep, motion, or mixer mode.

See also

Biped MAXScript Extensions

MAXScript Extensions in character studio


Biped Animation Manipulation and Clearing

The following methods let you delete animation from specific biped controllers and the complete biped:

biped.clearAllAnimation <biped_controller>

Clears all animation in the whole biped.
Any biped controller can be passed as argument.

EXAMPLE

biped.clearAllAnimation $Bip01.controller --pass any controller to clear animation in the whole biped

biped.clearSelectedAnimation <biped_controller>

Clears the animation only in the biped controllers of selected body parts.
Any biped controller can be passed as argument.

EXAMPLE

--select some body parts first, then execute:

biped.clearAllAnimation $'Bip01'.controller

--the animation of the selected body parts will be removed.

biped.mirror <biped_controller>

Mirrors the complete biped animation.

See also

Biped Creation

Biped Controllers

Biped MaxScript Extensions


Biped Sub Anim

Biped Sub Anim Methods

A set of Biped Sub Anim helper functions.

biped.createPosSubAnims <biped_ctrl> <control> <bool_checkIfExists>

biped.createRotSubAnims <biped_ctrl> <control> <bool_checkIfExists>

biped.createScaleSubAnims <biped_ctrl> <control> <bool_checkIfExists>

These functions place a clone of the specified control in the subanim control of every biped body part. If checkIfExists is true we check first to see whether or not the control of the same type already exists, if so we don't create it.

biped.setPosSubAnim <biped_ctrl> <point3> <node> <bool_absolute>

biped.setRotSubAnim <biped_ctrl> <quat> <node> <bool_absolute>

biped.setScaleSubAnim <biped_ctrl> <point3> <node>

These functions set the particular sub anim for the specified node with the specified value. If absolute is true then the specified position or rotation value is the absolute world space position or rotation of the combined biped + subanims (so the subanim stores the difference between the current biped value and the specified value). If false, then the specified value is the value that's stored the subanim. Setting the Scale subanim always stores the specified value in subanim. These methods are not applicable to the biped’s COM node.

biped.collapsePosSubAnims <biped_ctrl> <bool_perFrame> <bool_keep> <node>

biped.collapseRotSubAnims <biped_ctrl> <bool_perFrame> <bool_keep> <node>

biped.collapseAllPosSubAnims <biped_ctrl> <bool_perFrame> <bool_keep>

biped.collapseAllRotSubAnims <biped_ctrl> <bool_perFrame> <bool_keep>

These functions collapse the sub anim onto the specified node or all nodes. If perFrame is true a key is created per frame, otherwise only the biped's keys are modified. If keep is true then the subAnim isn't deleted, otherwise it is.

EXAMPLE

bipObj = biped.createNew 100 100 [0,0,0]

bip = bipObj.controller

b=bezier_position()

biped.createPosSubAnims bip b true

biped.setPosSubAnim bip [20,0,60] $'Bip01 R Hand' true

See also

Biped SubAnim Controller

Biped Controllers

Biped MAXScript Extensions

MAXScript Extensions in character studio


Biped Copy and Paste Posture

Biped Copy and Paste Posture Methods

These functions mirror the Copy/Paste functionality.

biped.copyPosture <biped_ctrl> (#posture |#pose |#track) <bool_horiz> <bool_vert> <bool_turn>

Creates a copy of the posture, pose, or track, as specified, for the selected objects in the Biped. Returns the name of copy. bool_horiz, bool_vert, and bool_turn control whether the horizontal, vertical, and/or turn is copied for the COM.

biped.pastePosture <biped_ctrl> (#posture |#pose |#track) <bool_opposite> <string_name>

Pastes the specified posture, pose, or track to the selected objects in the Biped.

biped.deleteAllCopies <biped_ctrl> (#posture |#pose |#track)

Deletes all postures, poses, or tracks, as specified.

biped.numCopies <biped_ctrl> (#posture |#pose |#track)

Returns the number of the posture, pose, or track copies.

biped.deleteCopy <biped_ctrl> (#posture |#pose |#track) <string_name>

Deletes the specified posture, pose, or track copy.

biped.setCopyName <biped_ctrl> (#posture |#pose |#track) <int_which> <String_newName>

Renames the specified posture, pose, or track copy.

biped.getCopyName <biped_ctrl> (#posture |#pose |#track) <int_which>

Returns the name of the specified posture, pose, or track copy.

biped.loadCopyPasteFile <biped_ctrl> <string_filename>

Loads the posture, pose, and track copies from the specified file.

biped.saveCopyPasteFile <biped_ctrl> <string_filename>

Saves the posture, pose, and track copies to the specified file. The file name extension should be "cpy".

biped.createCopyCollection <biped_ctrl> <collection_name>

Creates a new collection with the given name.

<integer>biped.numCopyCollections <biped_ctrl>

Returns the number of Copy Collections.

<collection_value>biped.getCopyCollection <biped_ctrl> <collection_index>

Returns the indexed Copy Collection. The CopyCollection value has one property that can be get and set - .name

biped.deleteCopyCollection <biped_ctrl> <collection_index>

Deletes the indexed Copy Collection.

biped.deleteAllCopyCollections <biped_ctrl>

Deletes all Copy Collections.

biped.copyBipPosture  <biped_ctrl> <ICC_MXCopyCollection> <nodes_array> (#snapView |#snapAuto |#snapNone)

Copies the biped posture. Available in 3ds Max 8 and higher.

biped.pasteBipPosture <biped_ctrl> <ICP_MXBipedCopy> <bool_opposite> (#pstdefault |#pstcopied |#pstinterp) <bool_hor> <bool_ver> <bool_trn> <bool_byvel>

Pastes the biped posture. Available in 3ds Max 8 and higher.

biped.copyBipPose <biped_ctrl> <ICC_MXCopyCollection> (#snapView |#snapAuto |#snapNone)

Copies the biped pose. Available in 3ds Max 8 and higher.

biped.pasteBipPose <biped_ctrl> <ICP_MXBipedCopy> <bool_opposite> (#pstdefault |#pstcopied |#pstinterp) <bool_hor> <bool_ver> <bool_trn> <bool_byvel>

Pastes the biped pose. Available in 3ds Max 8 and higher.

biped.copyBipTrack <biped_ctrl> <ICC_MXCopyCollection> <nodes_array> (#snapView |#snapAuto |#snapNone)

Copies the biped track. Available in 3ds Max 8 and higher.

biped.pasteBipTrack <biped_ctrl> <ICP_MXBipedCopy> <bool_opposite> <bool_hor> <bool_ver> <bool_trn>

Pastes the biped track. Available in 3ds Max 8 and higher.

See also

Biped Creation

Biped Controllers

Biped MaxScript Extensions


Biped and Crowd Interaction

It is possible to influence clip selection for bipeds during a Crowd solution by using preferred clips. The following biped MAXScript functions allow users to set the biped preferred clip during a crowd solution .

biped.numPrefClips <biped_ctrl>

Returns the number of preferred clips

biped.getPrefClip <biped_ctrl> <index_integer>

Returns the name of the nth preferred clip. The index is 0-based.

biped.clearPrefClips <biped_ctrl>

Clears the preferred clip list.

biped.addPrefClip <biped_ctrl> <name_string> <prob_integer>

Adds the clip to the preferred clip list with the given probability. Returns true if added, false if not added because it was already in the list. If the clip is already in the preferred clip list, its probability is changed to the specified probability. The range of meaningful probabilities is –100 to 100 where negative values make the clip less likely to be taken. A value of –100 effectively ensures that the clip will not be taken, and for values greater than -100, a comparision is done where choices of transitions prefer higher values (with positive values being favored over negative ones and zero being neutral). Negative preferences are useful when you want to avoid certain clips. For example , if have 30 clips, you can easily avoid a clip by setting it with one negative value without having to set positive preferences for the other 29 clips.

biped.getPrefClipProb <biped_ctrl> <index_integer>

Returns the probability of the nth preferred clip. The index is 0-based.

biped.deletePrefClip <biped_ctrl> <name_string>

Deletes the named clip from the preferred clip list. Returns true is successful, false if the clip was not in the list.

biped.isPrefClip <biped_ctrl> <name_string>

Returns true if the clip is in the list, false if not.

biped.getCurrentClip <biped_ctrl>

Returns the name of the currently active clip for this biped - only relevant during a crowd solve.

biped.getClipAtTime <biped_ctrl> <time>

Returns the name of the active clip for the biped at the specified time. If a transition between clips is occurring at the specified time, the clip being transitioned from is returned.

NOTE:

Preferred clip names are case-sensitive.

The following are examples showing how the crowd system "PerFrameFn" can be used to dynamically change the biped preferred clip.

EXAMPLE

-- changes the preferred clip as a function of frame number.

fn PerFrameFn crwd t = (

a = $bip100.controller

if (t == 200f) then

biped.addprefclip a "jog_L45" 100

else

biped.deletePrefClip a "jog_L45"

)

EXAMPLE

-- changes the preferred clip as a function of the current clip.

fn PerFrameFn crwd t = (

a = $bip100.controller

if (biped.getcurrentclip a == "jog_L135") then

biped.addprefclip a "jog_L45" 100

else

biped.clearPrefClips a

)

See also

Crowd : helper

MAXScript Extensions in character studio


bipedSystem : System

bipedSystem : System {9155,0}

Constructor:

Class instances not creatable by MAXScript

Properties

.scriptName () : string

.startRange0 () : integer

.startRange1 () : integer

.minLength () : integer

.startType () : radio button number

.fileName () : filename

.dirName () : filename

.makeScript () : boolean

.appendScript () : boolean

.makeMotion () : boolean

.storeBip () : boolean

.applyToSharedMoflow () : boolean

.scriptName () : string

.length () : integer

.fileName () : string

.dirName () : string

.Multiple () : radio button number

.makeScript () : boolean

.makeMotion () : boolean

.storeBip () : boolean

.whichMoflow () : radio button number

.refObj () : node

.multipleBipeds () : node array

.multipleReferences () : node array


Biped Controllers

The Biped controller, referred to as "<biped_ctrl>" in this documentation, is called the Biped Vertical_Horizontal_Turn(Body):Matrix3 Controller . This is sometimes also called the body controller because it is equivalent to the Biped’s.transform.controller.

The Biped footsteps have a controller. It is referred to as "<footsteps_ctrl>" in this documentation. See Biped Footsteps for details regarding the FootSteps:Matrix3 Controller.

Individual Biped body part objects and the Vertical, Horizontal, and Turning tracks of the Biped Vertical Horizontal Turn(Body):Matrix3_Controller use the Biped Slave Controller . This type of controller is attached to the transform track.

In addition, a new Biped SubAnim Controller has been introduced in character studio 4.

See also

Biped Vertical_Horizontal_Turn(Body):Matrix3 Controller

Biped Slave Controller

Biped SubAnim Controller

Biped MAXScript Extensions


Biped Vertical_Horizontal_Turn(Body):Matrix3 Controller

Vertical_Horizontal_Turn : MAXWrapper {9156,0}

Class instances not creatable by MAXScript

This controller is attached to the transform track of the Biped root objects.

Constructor

biped_ctrl=bipobj.transform.controller

or

biped_ctrl=$bip01.controller

Properties

All the following properties are get/set properties unless specified.

Structure properties

<biped_ctrl>.rootName String Default: BipXX

where XX is a number

The name of the biped center of mass object. The center of mass (COM) is the root of the biped hierarchy, and is visible as a diamond shaped object in the biped pelvis area. The Root Name is appended to all the links of the biped hierarchy.

<biped_ctrl>.rootNode Node Default: Varies -- Read-only

The root node (COM) of the Biped system this biped_ctrl belongs to.

<biped_ctrl>.arms Boolean Default: True

Specifies whether or not arms will be generated for the current biped.

<biped_ctrl>.neckLinks Integer Default: 1

range: 1-5

Specifies the number of links in the biped neck.

<biped_ctrl>.spineLinks Integer Default: 4

range: 1-5

Specifies the number of links in the biped spine.

<biped_ctrl>.legLinks Integer Default: 3

range: 3-4

Specifies the number of links in the biped legs.

<biped_ctrl>.tailLinks Integer Default: 0

range: 0-5

Specifies the number of links in the biped tail. A value of 0 specifies no tail.

<biped_ctrl>.ponytail1Links Integer Default: 0

range: 0-5

Specifies the number of Ponytail links.

<biped_ctrl>.ponytail2Links Integer Default: 0

range: 0-5

Specifies the number of Ponytail links.

<biped_ctrl>.fingers Integer Default: 1

range: 0-5

Specifies the number of biped fingers.

<biped_ctrl>.fingerLinks Integer Default: 1

range: 1-3

Sets the number of links per finger.

Note: If the number of fingers is 0, fingerLinks is always equal to 1.

<biped_ctrl>.toes Integer Default: 1

range: 1-5

Specifies the number of biped toes.

<biped_ctrl>.toeLinks Integer Default: 3

range: 1-3

Specifies the number of links per toe.

<biped>.prop1Exists Boolean Default: False

Specifies whether prop 1 exists.

<biped>.prop3Exists Boolean Default: False

Specifies whether prop 2 exists.

<biped>.prop3Exists Boolean Default: False

Specifies whether prop 3 exists.

<biped_ctrl>.ankleAttach Float Default: 0.2

range: 0-1

Specifies the right and left ankles' point of attachment along the corresponding foot block. The ankles may be placed anywhere along the center line of the foot block from the heel to the toe.

A value of 0 places the ankle attachment point at the heel. A value of 1 places the ankle attachment point at the toes.

<biped_ctrl>.height Float Default: Defined at creation

Sets the height of the biped.

<biped_ctrl>.trianglePelvis Boolean Default: True

Select this control to create links from the upper legs to the lowest biped spine object when Physique is applied. Normally, the legs are linked to the biped pelvis object.

The pelvis area can be a problem when the mesh is deformed with Physique. Triangle Pelvis creates a more natural spline for mesh deformation.

<biped>.forearmTwistLinks Integer Default: 0

range: 0-10

Specifies the number of forearm links. If 0, Forearm Twist is unchecked in the Structure dialog, and Forearm Links is 2. If non-zero, Forearm Twist is checked and Forearm Links is the specified number (the Forearm Links spinner has a lower limit of 2). Valid values are in the range of 0 to 10.

<biped_ctrl>.bodyType Integer Default; 0

The body type of the biped: 0-Skeleton, 1-Male, 2-Female, 3-Classic

Animation properties

<biped_ctrl>.gravAccel Float Default: 5.63855*Body height

Sets the strength of the gravitational acceleration used to calculate the biped's motion.

By default, this parameter is set to accurately simulate Newtonian gravity as found on the Earth's surface.

<biped_ctrl>.dynamicsType Integer Default: 0

range: 0-1

0 - Biped Dynamics

Keys for the center of mass Balance Factor and Dynamics Blend parameters are set to a value of 1. Biped calculates airborne trajectories and biped balance.

1 - Spline Dynamics

Create new center of mass keys using full spline interpolation.

Adapt Locks Group

Lock specified tracks to prevent automatic adjustments being made to those tracks when footsteps are moved in space or edited in time. All the locks except for Time work for footstep editing in space. Time, locks upper body keys when footsteps are edited in time (Track View). Adapt Locks only applies to a Footstep animation not a freeform animation.

When you move a footstep in space or adjust footstep timing, Biped automatically adapts existing keyframes to match the new footsteps. Adapt locks allows you to preserve the exact position of already created keys for a selected track.

Adapt Locks does not need to be on all the time. For example, if you want to raise all the footsteps along the world Z-axis, without changing the upper body position, turn on Adapt Locks Body Vertical Keys, turn on Footstep mode, select all the footsteps and move them up along the world Z-axis. The footsteps are repositioned, the legs are adapted, but the upper body retains the same motion rather than being raised with the footsteps. Now turn off Adapt Locks Body Vertical Keys, the upper body still retains its original motion.

<biped_ctrl>.adaptLockFreeform Boolean Default: False

Turn on to prevent adaptation of a freeform period in a footstep animation. The biped's position during a freeform period will not move if footsteps after the freeform period are moved further away.

<biped_ctrl>.adaptLockHorz Boolean Default: False

Turn on to prevent adaptation of body horizontal keys when footsteps are edited in space.

<biped_ctrl>.adaptLockTurn Boolean Default: False

Turn on to prevent adaptation of body turning keys when footsteps are edited in space.

<biped_ctrl>.adaptLockVert Boolean Default: False

Turn on to prevent adaptation of body vertical keys when footsteps are edited in space.

<biped_ctrl>.adaptLockLLeg Boolean Default: False

Turn on to prevent adaptation of left leg move keys (a leg move key, is a leg key between footsteps) when footsteps are edited in space.

<biped_ctrl>.adaptLockRLeg Boolean Default: False

Turn on to prevent adaptation of right leg move keys (a leg move key, is a leg key between footsteps) when footsteps are edited in space.

<biped_ctrl>.adaptLockTime Boolean Default: False

Use Adapt Locks Time to retain upper body motion while editing footstep duration in Track View. When the duration of a footstep is changed, the biped leg will adapt by re-timing the touch, plant and lift keys. The biped upper body keys will retain their exact motion.

Separate Tracks Group

By default character studio stores a finger, hand, forearm, and upper-arm key in the clavicle track. The toe, foot and calf keys are stored in the thigh track. This optimized approach to key storage works well in most cases. If you need extra tracks, turn them on for a specific biped body part.

For example, turn on Arms if you plan on extensive finger-hand animation; if an arm key is deleted, it will not affect the finger-hand keys. Notice that in Track View a transform track is now available for the first link of the thumb (stores all finger keys), hand, forearm, and upper-arm.

<biped_ctrl>.sepArmsTracks Boolean Default: False

Turn on to create separate transform tracks for the finger, hand, forearm and upper-arm.

There is one finger track per hand. All finger keys are stored in the "Finger0" transform track, the first link of the biped thumb.

<biped_ctrl>.sepLegsTracks Boolean Default: False

Turn on to create separate toe, foot, and calf transform tracks.

<biped_ctrl>.sepPonytail1Tracks Boolean Default: False

Turn on to create separate ponytail 1 transform tracks.

<biped_ctrl>.sepPonytail2Tracks Boolean Default: False

Turn on to create separate ponytail 2 transform tracks.

NOTE:

If the number of pony tail links is 0, you cannot set Separate Ponytail Tracks to true.

<biped_ctrl>.sepNeckTracks Boolean Default: False

Turn on to create separate transform tracks for the neck links.

<biped_ctrl>.sepTailTracks Boolean Default: True

Turn on to create separate transform tracks for each tail link.

<biped_ctrl>.sepSpineTracks Boolean Default: False

Turn on to create separate spine transform tracks.

Modes

<biped_ctrl>.figureMode Boolean Default: False

-- cannot be in Buffer mode to enter figureMode

Use Figure mode to fit a biped to the mesh or mesh objects representing your character. Leave Figure Mode on when you attach the mesh to the biped with Physique. Figure mode is also used to scale a biped with a mesh attached, to make biped "fit" adjustments after Physique is applied, and to correct posture in motion files that need a global posture change.

<biped_ctrl>.footstepMode Boolean Default: False

Create and edit footsteps; generate a walk, run, or jump footstep pattern; edit selected footsteps in space; and append footsteps using parameters available in Footstep mode.

<biped_ctrl>.motionMode Boolean Default: False

-- cannot be in Buffer mode to enter motionMode

Create scripts and use editable transitions to combine .bip files together (to create character animation) in Motion Flow mode. After creating a script and editing transitions, use Save Segment on the General rollout to store a script as one long .bip file. Save a .mfe file, this enables you to continue Motion Flow work in progress.

<biped_ctrl>.mixerMode Boolean Default: False

Places the biped in Mixer mode.

<biped_ctrl>.moveAllMode Boolean Default: False

Places the biped in Move All mode.

<biped_ctrl>.bufferMode Boolean Default: False

Footsteps are required in the buffer to enter bufferMode.

Edit segments of an animation in Buffer mode. Copy footsteps and associated biped keys into the buffer using Copy Footsteps on the Footstep Operation rollout first, then turn on Buffer mode to view and edit the copied segment of your animation.

NOTE:

Paste buffered motion back to the original animation repeatedly to create looping motions.

Edit footsteps and biped animation that has been copied into the buffer using Copy Footsteps on the Footsteps Operation rollout. The changes can be pasted back by turning off Buffer Mode, turning on Paste Footsteps on the Footstep Operation rollout and overlapping the buffered footsteps with the original footsteps. The buffered motion is spliced into the original animation.

<biped_ctrl>.bendLinksMode Boolean Default: False

Bend all the biped spine objects naturally by rotating a biped spine object. Bend Links also works for the biped tail and ponytail links.

<biped_ctrl>.rubberBandMode Boolean Default: False

Use this to reposition the biped elbows and knees without moving the biped hands or feet in Figure mode. Reposition the biped center of mass to simulate the physics of wind or weight pushing against the biped. Figure mode must be turned on to enable Rubber Band Mode.

NOTE:

Rubber Band mode behaves differently than Non-Uniform Scale. If you "Rubber Band" the biped thigh, for example, the thigh and biped calf objects scale proportionally to keep the biped foot stationary. Using Non-Uniform Scale, the calf retains its scale and the foot moves.

<biped_ctrl>.scaleStrideMode Boolean Default: True

Footstep stride length and width are scaled to match the stride length and width of the biped figure. scaling occurs automatically when you load a .bip, .stp, or .fig file. When you paste footsteps; or when you scale the biped's legs or pelvis.

<biped_ctrl>.inPlaceMode Boolean Default: False

-- cannot be in Figure mode to enter inPlaceMode

Keep the biped visible in the viewports while the animation plays. Use this for biped key editing or adjusting envelopes with Physique. Prevents XY movement of the biped center of mass during animation playback; motion along the Z-axis is preserved. In Place mode is stored with the 3ds Max file.

<biped_ctrl>.inPlaceXMode Boolean Default: False

-- cannot be in Figure mode to enter inPlaceXMode

Lock center of mass X-axis motion. Use this for game export where the character stays in place but the swinging motion of the hips and upper body along the Y-axis is preserved.

<biped_ctrl>.inPlaceYMode Boolean Default: False

-- cannot be in Figure mode to enter inPlaceYMode

Lock center of mass Y-axis motion. Use this for game export where the character stays in place but the swinging motion of the hips and upper body along the X-axis is preserved.

Biped limbs, footsteps, and center of mass keys can be adjusted using In Place mode (when the center of mass is moved on the XY-axes in this mode, the footsteps move). View biped playback without requiring a follow camera. In this viewing mode, visible footsteps "slide" under the biped.

For export to games, this feature is valuable since many game engines intelligently move the character's center of mass laterally according to game play. In Place mode makes it easy to view, tune, and export animation in a manner that is complimentary to game engine playback.

NOTE:

Trajectories do not display when In Place mode is active.

Track Selection

<biped_ctrl>.trackSelection Integer Default: 0

0 - No track selection

While a trackSelection value of 0 is a valid return value, setting trackSelection to 0 is meaningless and will not change the current track selection.

1 - Body Horizontal

Turn on to prevent adaptation of body horizontal keys when footsteps are edited in space.

2 - Body Vertical

Turn on to prevent adaptation of body vertical keys when footsteps are edited in space.

3 - Body Rotation

Turn on to prevent adaptation of body turning keys when footsteps are edited in space.

Display properties

<biped_ctrl>.displayBones Boolean Default: False

Displays biped bones. Bones are represented as yellow lines, which do not render. Selecting Bones is useful for seeing exactly where the joints fall in relation to the biped objects.

<biped_ctrl>.displayObjects Boolean Default: True

Displays biped body objects (objects).

<biped_ctrl>.displayFootsteps Boolean Default: True

Displays biped footsteps in the viewport. Footsteps are represented as green and blue foot-shaped outlines by default; these are also visible in preview renderings. Turning off the Footsteps button also turns off the footstep numbers and the center of mass shadow.

<biped_ctrl>.displayFSNumbers Boolean Default: True

Displays biped footstep numbers. Footstep numbers specify the order in which the biped will move along the path created by the footsteps. Footstep numbers are displayed in white and do not render, but do appear in preview renderings.

<biped_ctrl>.displayTrajectories Boolean Default: False

Displays trajectories for selected biped limbs.

Layers

<biped_ctrl>.visibleBefore Integer Default: 1

Set the number of preceding layers too display as stick figures.

<biped_ctrl>.visibleAfter Integer Default: 0

Set the number of succeeding layers too display as stick figures.

<biped_ctrl>.keyHighlight Boolean Default: False

Display keys by highlighting the stick figures.

Footstep related properties

<biped_ctrl>.fsAppendState Boolean Default: False

Each new footstep is appended to the end of the biped's footstep sequence.

<biped_ctrl>.fsCreateState Boolean Default: False

Set to true to create new states. The first state you add is, by default, the first state in the controller that executes when the simulation is run.

<biped_ctrl>.fsGroundDuration Time Default: 18f

<biped_ctrl>.fsAirDuration Time Default: 3f

Specifies the number of frames when the body will be in the air during a run or a jump.

NOTE:

If fsGaitMode is #walk, the above 2 parameters are the Walk Footstep and Double Support durations, respectively. If fsGaitMode is #run, the above 2 parameters are the Run Footstep and Airborne durations, respectively. If fsGaitMode is #jump, the above 2 parameters are the 2-Feet down and Airborne durations, respectively.

<biped_ctrl>.fsGaitMode Name Default: #walk

fsGaitMode can be set to any of the three gaits: #walk, #run, #jump

Motion Flow properties

<biped_ctrl>.motionFlow MoFlow

Returns an instance of MoFlow. See Biped Motion Flow section for more details.

Motion Capture properties

<biped_ctrl>.displayBuffer Boolean Default: False

A red stick figure appears, representing the raw motion capture data.

<biped_ctrl>.displayBufferTraj Boolean Default: False

Display a trajectory based on the buffered raw motion capture data for any biped body part. Use this in combination with Show/Hide Trajectories on the Display rollout to see how closely the raw and filtered data match.

<biped_ctrl>.talentFigMode Boolean Default: False

Turn on Talent Figure mode to scale the biped relative to the markers. Calibration for the entire marker file takes place when you exit Talent Figure mode.

Keyframe adaptation takes place in order to accommodate the new biped scale; because of this, you should adjust the biped scale before adjusting the biped position relative to the markers.

Use Rubber Band Mode on the General rollout and Non-Uniform Scale to size the biped in Talent Figure mode.

Ideally, you will not need to use this feature. When loading a motion capture file, Biped attempts to extract the appropriate figure scale from the given data. Use Talent Figure mode only if the extracted scale of the biped doesn't match the scale of the original talent. Minor differences in scale will alter the motion.

NOTE:

Calibration controls are only enabled when a marker or .bvh file is imported in its raw form. Do not use key reduction or extract footsteps when you import a marker file for the first time.

Object Space Object

<biped_ctrl>.osObject Node Default: Undefined

The Object Space Object for the currently selected body part.

The osObject can be specified for the Clavicle or any of its decendents, and the Thigh or any of its decendents.

The osObject is undefined for all other body parts.

The osObject is normally specified in the IK Key Info rollout.

The .osObject property can be reset by assigning undefined via MAXScript in 3ds Max 2008 and higher.

Head LookAt Target

<biped_ctrl>.headObject Node Default: Undefined

The node the head object looks at.

The .headObject property can be reset by assigning undefined via MAXScript in 3ds Max 2008 and higher.

Sub Anim Animation Properties

<biped_ctrl>.enableSubAnims Boolean Default: True

When on, sets the Workbench to display the curves of the selected part’s subanim in combination with the position or rotation curves.

<biped_ctrl>.manipSubAnims Boolean Default: False

If true, the following rollouts appear in the Motion panel: Position List, Scale List and Rotation List.

SubAnim Properties (as seen in Track View)

<biped_ctrl>.vertical Matrix3 -- Animatable

The vertical track of controller

<biped_ctrl>.horizontal Matrix3 -- Animatable

The horizontal track of controller

<biped_ctrl>.turning Matrix3 -- Animatable

The turning track of controller

EXAMPLE

bipObj = biped.createNew 100 100 [0,0,0]

select bipObj

bip = bipObj.transform.controller

-- Display properties

bip.displayBones = true

bip.displayObjects = false

bip.displayFootsteps = false

bip.displayFSNumbers = false

-- Animations properties

bip.gravAccel = 700

bip.dynamicsType = 1

See also

Biped Creation

MAXScript Extensions in character studio


Biped Slave Controller

BipSlave_Control : Matrix3Controller {9154,0}

Constructor:

Class instances not creatable by MAXScript

Individual Biped body part objects and the Vertical, Horizontal, and Turning tracks of the Biped_Vertical_Horizontal_Turn_Body_Matrix3_Controller use the Biped_Slave Controller.

This type of controller is attached to the transform track.

<bipslave_ctrl>=$'Bip01 Pelvis'.controller

It is not always possible to get the controller via <biped_object>.transform.controller.
The transform track is not exposed for all nodes but it is possible to get the controller via: <biped_object>.controller.

Properties

<bipslave_ctrl>.rootName String Default: Varies

The name of the root node (COM) of the Biped system this bipslave_ctrl belongs to. Note: changing the value of this property also changes the root name of the biped.

<bipslave_ctrl>.rootNode Node Default: Varies -- Read-only

The root node (COM) of the Biped system this bipslave_ctrl belongs to.

See also

Biped MAXScript Extensions

MAXScript Extensions in character studio


Biped SubAnim Controller

Biped_SubAnim - superclass: FloatController; super-superclass:MAXWrapper - 5:0 - classID:

#(1796502377, 126642986)

Properties

<Biped_SubAnim>.keep BooleanClass default: true -- boolean; Don_t_Delete_SubAnim

<Biped_SubAnim>.perframe BooleanClass default: true -- boolean; Per_Frame

<Biped_SubAnim>.posactive BooleanClass default: true -- boolean; Pos_Active

<Biped_SubAnim>.rotactive BooleanClass default: true -- boolean; Rot_Active

<Biped_SubAnim>.scaleactive BooleanClass default: true -- boolean; Scale_Active

See also

Biped Sub Anim

Biped Controllers

Biped Vertical_Horizontal_Turn(Body):Matrix3 Controller

Biped Slave Controller

Biped MAXScript Extensions

MAXScript Extensions in character studio


FootSteps : Matrix3 Controller

Footsteps : MAXWrapper {3011,0}

Class instances not creatable by MAXScript

Access:

<footsteps_ctrl> = $'Bip01 Footsteps'.transform.controller

or:

<footsteps_ctrl> = $'Bip01 Footsteps'.controller

NOTE:

This controller is attached to the transform track of the named Biped footstep object.

Properties

<footsteps_ctrl>.freeFormMode Boolean Default: False

false - Edit Footsteps

true - Edit Free Form (no physics)

<footsteps_ctrl>.dispNumType Integer Default: 0

0 - Start and End Frame

1 - Start Frame

2 - Duration

3 - Double Support

<footsteps_ctrl>.dispAirDur Boolean Default: False

Displays the foot air duration. This is the number of frames each foot is in the air in the lower part of each footstep's portion of the track.

<footsteps_ctrl>.dispNoSupport Boolean Default: False

Displays the number of frames when both feet are off the ground, directly above the areas without footsteps.

<footsteps_ctrl>.rootName String Default: Varies

Contains the root name of the Biped using the Foootsteps Controller. Changing the value of this property also changes the root name of the Biped.

<footsteps_ctrl>.rootNode Node Default: Varies -- Read-only

The root node (COM) of the Biped system this footstep_ctrl belongs to.

The following example will access the footstep controller, set several values and then display all of its properties.

EXAMPLE

fsCont = $'Bip01 Footsteps'.transform.controller

fsCont.freeFormMode = true

fsCont.dispNumType = 3

fsCont.dispAirDur = false

fsCont.dispNoSupport = false

showProperties fsCont

See also

Biped Footprints

Biped Keys

Biped MaxScript Extensions

MAXScript Extensions in character studio


Biped Footsteps and Footprints

This topic will cover the Biped’s footsteps controller, individual footprints, the multiple footstep creation dialog, as well as obtaining and setting the parameters for multiple footsteps.

Biped Footsteps

Biped Footprints

See also

Biped MaxScript Extensions

MAXScript Extensions in character studio


Biped Footprints

Methods

biped.addFootprint <biped_ctrl> <matrix3> [append:<boolean>]

Creates a single footprint for the biped, where matrix3 specifies the position and rotation of the footstep. The scale portion of the matrix3 is ignored. Whether a left or right footstep is created depends on the value of biped.fsAddSide (see below). The length and timing of the footstep depends on biped’s fsGroundDuration and fsAirDuration property values.

The append keyword argument specifies where in time the footstep is added. If true (the default) then the footstep is appended as the last footstep, else it is inserted at the current time.

NOTE:

Creates a single footprint for the Biped.

Global Properties

biped.fsAddSide Integer Default:0

0 - Start Right

1 - Start Left

NOTES:

For multiple footstep creation, the starting foot needs to be identified. There is a UI radio button in the Multiple Footstep Creation dialog "Start Right/Start Left". The biped global property, fsAddSide, exposes access to this UI element.

This property also effects the start foot when manually creating footsteps in the viewports and when using biped.addFootprint. If the biped.fsAddSide is 1, a left footstep is created. If 0, a right footstep is created. When you create a footstep in the viewports or by using biped.addFootprint, the value of biped.fsAddSide is flipped, resulting in alternating footsteps being created by default.

Methods

biped.multipleFSDlg <biped_ctrl>

Displays the Multiple Footstep Creation dialog

biped.getMultipleFSParams <gait_type_name>

Returns an instance of MultFprintParams, gait_type_name can be #walk, #run or #jump. For information on MultFprintParams and gait_type_name see Biped MultFprintParams Class .

The following example will obtain the MultipleFSParams for a walk cycle, set several of its values and then show all of the properties.

EXAMPLE

walk = biped.getMultipleFSParams #walk

walk.numFootsteps = 5

walk.paramStrideWidth = 2.5

walk.paramStrideLength1 = .6

walk.actualStrideHeight1 = .6

walk.cycle1 = 6

walk.paramStrideLength2 = .7

walk.actualStrideHeight2 = .7

walk.cycle2 = 7

walk.autoTiming = true

walk.interpTiming = true

walk.alternate = true

walk.multiInsertInTime = true

showProperties walk

Methods

biped.addMultipleFootprints <biped_ctrl> <MultFprintParams>

Create footsteps for a Biped based on the MultFprintParams value

biped.newFootprintKeys <biped_ctrl>

Activates all inactive footsteps. Activation creates default keys for any footsteps that do not have them. If a footstep does not have keys, it is displayed as bright green (right foot) or bright blue (left foot). After keys are created for the footsteps, the footsteps change color to pastel green and pastel blue.

biped.convertToFootSteps <biped_ctrl> [keyPerFrame:<false>] [flattenToZ:<true>]

Converts a freeform animation to footsteps. If keyPerFrame is true, keys are created at every frame, and footsteps are extracted based on foot IK Blend values equal to 1. If flattenToZ is true, the entire biped is repositioned to place the footsteps at Z=0.

biped.convertToFreeform <biped_ctrl> [keyPerFrame:<false>]

Converts a freeform animation to footsteps. If keyPerFrame is true, keys are created at every frame.

Bending/Scaling Footprints

biped.bendFootprints <biped_ctrl> <float> --angle in degrees

Bend the Footprints of the biped whose controller has been supplied as argument at the specified angle.

biped.scaleFootprints <biped_ctrl> <float> --angle in degrees

Scale the Footprints of the biped whose controller has been supplied as argument at the specified angle.

The following example will create a biped, create 10 footsteps and then have Biped create default keys for the footsteps.

EXAMPLE

-- create a Biped

bipObj = biped.createNew 100 100 [0,0,0]

-- get the transform controller for the Biped

bip = bipObj.transform.controller

-- get the multiple footstep parameters interface

mfsp=biped.getMultipleFSParams #walk

-- set the number of footsteps to 10

mfsp.numFootsteps=10

-- create the inactive footsteps

biped.addMultipleFootprints bip mfsp

-- create the Biped keys for inactive footsteps

biped.newFootprintKeys bip

See also

Biped Controllers

Biped MultFprintParams Class

Biped Keys

Biped MaxScript Extensions

MAXScript Extensions in character studio


Biped Class : MultFprintParams

Biped Class : MultipleFSParams

This class represents multiple footstep creation parameters of a Biped. An instance of this class is returned by the biped.getMultipleFSParams <gait_type_name> method, where gait_type_name can be #walk, #run or #jump.

Properties

<MultipleFSParams>.alternate Boolean Default: true (walk) true (run) true (jump)

Footsteps will alternate between right and left. Alternate is always selected when the Walk gait is selected. You can only clear Alternate when Run or Jump gaits are selected.

<MultipleFSParams>.numFootsteps Integer Default: 4 (walk) 4(run) 4 (jump)

Determines the number of new footsteps to be created.

<MultipleFSParams>.paramStrideWidth Float Default: 1.0 (walk) 1.0 (run) 1.0 (jump)

Sets the stride width as a percentage of the pelvis width. A value of 1.0 produces a stride width equal to the pelvis width. A value of 3.0 produces a wide, waddling stride. Changes to this setting automatically change the Actual Stride Width.

Parametric describes the parameter in terms of biped anatomy, and Actual describes the value in 3ds Max units.

<MultipleFSParams>.autoTiming Boolean Default: true (walk) true (run) true (jump)

Sets timing parameters automatically. Auto Timing affects the following timing parameters for the Walk gait:

Walk footstep, Double Support

When Auto Timing is selected, these parameters are automatically adjusted to reasonable values. Control the footstep sequence by adjusting the Stride Length and Time to Next Footstep parameters.

When Auto Timing is cleared, you can control the footstep sequence by adjusting the gait timing parameters, but you can't change the Time to Next Footstep parameter.

<MultipleFSParams>.interpTiming Boolean Default: false (walk) false (run) false (jump)

Control acceleration or deceleration of the series of footsteps.

<MultipleFSParams>.multiInsertInTime Boolean Default: false (walk) false (run) false (jump)

false - Start after last footstep

Appends the newly created footsteps to the end of the existing footstep sequence.

true - Start at current frame

Inserts the newly created footsteps at the current frame after the existing footstep sequence allowing you to make a gap in time before the footsteps start again.

<MultipleFSParams>.paramStrideLength1 Float Default: 0.75 (walk) 1.5 (run) 2.4 (jump)

Sets the stride length for the First Step as a percentage of the length of the biped's leg. The default value of 0.75 gives an average stride of normal proportions.

A value of 1.0 will produce a stride length equal to the leg length, which makes the biped stretch slightly to reach the next step. A value of 0.0 will make the biped walk in place. A negative stride length will make the biped walk backwards.

When a biped walks backwards, it does not simply reverse the forward movement but maintains the correct foot-state sequence with the toe touching the ground first, followed by the heel.

<MultipleFSParams>.actualStrideHeight1 Float Default: 0.0 (walk) 0.0 (run) 0.0 (jump)

Sets the rise or fall between footsteps for the First Step. You can use this parameter to create a set of footsteps going up or down a slope or a stairway.

The value for Actual Stride Height is the difference in height in units between each of the new footsteps. Positive values step up and negative values step down.

<MultipleFSParams>.cycle1 Time Default: 15f (walk) 15f (run) 15f (jump)

Sets the Time to Next Footstep for the First Step.

<MultipleFSParams>.paramStrideLength2 Float Default: 0.75 (walk) 1.5 (run) 2.4 (jump)

Sets the stride length for the Last Step as a percentage of the length of the biped's leg. The default value of 0.75 gives an average stride of normal proportions.

A value of 1.0 will produce a stride length equal to the leg length, which makes the biped stretch slightly to reach the next step. A value of 0.0 will make the biped walk in place. A negative stride length will make the biped walk backwards. When a biped walks backwards, it does not simply reverse the forward movement but maintains the correct foot-state sequence with the toe touching the ground first, followed by the heel.

<MultipleFSParams>.actualStrideHeight2 Float Default: 0.0 (walk) 0.0 (run) 0.0 (jump)

Sets the rise or fall between footsteps for the Last Step. You can use this parameter to create a set of footsteps going up or down a slope or a stairway.

The value for Actual Stride Height is the difference in height in units between each of the new footsteps. Positive values step up and negative values step down.

<MultipleFSParams>.cycle2 Time Default: 15f (walk) 15f (run) 15f (jump)

Sets the Time to Next Footstep for the Last Step.

NOTE:

See the biped.addMultipleFootprints method for creating footsteps based on a MultipleFSParams, and biped.newFootprintKeys creating the biped keys for the inactive footsteps.

Since MultipleFSParams is biped independent, the actual stride lengths and heights are not accessible in this class. To convert from a paramStrideWidth value to an actualStrideWidth value, multiply the paramStrideWidth value by the width of the pelvis.

To convert from a paramStrideLength value to an actualStrideLength value, multiply the paramStrideLength value by the length of the right leg. Given a biped_ctrl, the length of the right leg can be calculated by:

legLength = distance (biped.getNode biped_ctrl #rleg link:1) (biped.getNode biped_ctrl #rleg link:2) -- thigh

legLength += distance (biped.getNode biped_ctrl #rleg link:2) (biped.getNode biped_ctrl #rleg link:3) -- calf

if ((biped_ctrl.rootnode).controller.leglinks) > 3 do

legLength += distance (biped.getNode biped_ctrl #rleg link:3) (biped.getNode biped_ctrl #rleg link:4) -- horsellink, if present

See also

Biped Vertical_Horizontal_Turn(Body):Matrix3 Controller

Biped Slave Controller

FootSteps : Matrix3 Controller

Biped Footsteps

Biped MAXScript Extensions

MAXScript Extensions in character studio


BipedFSKey : MAXObject

This class represents a Biped footstep in the viewports and trackview.

Properties

<fskey>.time Time Default: Varies

A value indicating when in time the key occurs.

<fskey>.duration Time Default: Varies

The number of frames in each footstep.

<fskey>.selected Boolean Default: False

<fskey>.edgeSel Integer Default: 0

0 - no edges selected

1 - left edge Selected

2 - right edge selected

3 - both edges Selected

<fskey>.active Boolean Default: True -- Read-only

Whether the footstep is active.

<fskey>.transform Matrix3 Default: Varies

<fskey>.side Name Default: #left or #right -- Read-only

See also

Biped Controllers

Biped Footsteps

Biped Vertical_Horizontal_Turn(Body):Matrix3 Controller

Biped Keys

Biped MAXScript Extensions

MAXScript Extensions in character studio


Biped Motion Flow

MoFlow : MaxWrapper

MoFlowScript : MaxWrapper

MoFlowSnippet : MaxWrapper

MoFlowTranInfo : MaxWrapper

MoFlowTransition : MaxWrapper

See also

MAXScript Extensions in character studio


MoFlow : MaxWrapper

This class can be used to access features in the Biped Motion Flow panel. An instance of this class is returned by the .motionFlow property of a Biped Body Controller .

Properties

<moflow>.scripts Array Default: #()

-- Read-only

An array of motion flow scripts (MoFlowScript values).

A Script is a list of clips (.bip files) that are executed sequentially to animate a character.

<moflow>.activeScript MoFlowScript Default:undefined

Get/set which MoFlowScript in scripts array is the active script. If the specified MoFlowScript is not in the scripts array, no action occurs.

<moflow>.snippets Array Default: #()

-- Read-only

An array of motion flow snippets (MoFlowSnippet values).

<moflow>.selSnippets BitArray Default: #{}

A bitarray specifying the motion flow snippets that are selected in the Motion Flow Graph.

<moflow>.startFrame Integer Default: 0

-- Read-only

The start frame of currently active motion flow script.

<moflow>.endFrame Integer Default: 0

-- Read-only

The last frame of currectly active motion flow script.

Methods

loadMoFlowFile <moflow> <file_name> [ quiet:<boolean> ]

Load a Motion Flow Editor file (.mfe). Motion Flow Editor files include:

Clips: references to biped animation files.

Transitions: The names, attributes, and connections between clips.

Scripts: different paths through a set of connected clips and transitions.

If quiet:true, which is the default, any warning message dialogs are suppressed.

saveMoFlowFile <moflow> <file_name>

Save a Motion Flow Editor file (.mfe).

Load/Save a motion flow (.MFE) file.

NOTE:

The location of the referenced .bip files is saved in the .mfe file. If the .bip file cannot be found, the program looks to the motion flow directory specified in \plugcfg\biped.ini. By default, this setting is MoFlowDir=<maxdir>\cstudio\scripts

If a referenced .bip file cannot be found in its current location, you will need to move it to the specified Motion Flow directory. You can change the location of this directory at any time by editing your biped.ini file with a text editor. The new directory will be used the next time you restart 3ds Max. You can also add multiple search paths to your biped.ini file by repeating the MoFloDir= line multiple times. The program will search the directories in the order they appear and will use the first instance of the file that it finds.

loadSnippetFiles <moflow>

Loads the snippet files whose file names are assigned. This function should be called whenever new snippets are added.

Clips represent all or part of a .bip file.

addScript <moflow> <name>

Scripts represent different paths through the clips in the Motion Flow Graph.

Creates a new motion flow script with the given name and adds it to the motion flow. Returns the new MoFlowScript.

deleteScript <moflow> <MoFlowScript>

deleteScript <moflow> <index_integer>

Deletes the specified script. If the second argument is an integer, the script deleted is the indexed script in the motion flow’s .scripts array.

NOTE:

deleteScript sets the active script to the first script. To maintain the current active script store and set <motionflow>.activeScript around the call to deleteScript.

getScriptIndex <moflow> <MoFlowScript>

Given the script, returns its index in the script’s combobox.

getSnippetIndex <moflow> <MoFlowSnippet>

Given the snippet, returns its index in the in the motion flow’s .snippets array.

computeAnimation <moflow> [redraw:<true>] [incGlobals:<false>]

Computes the global flow network. This function has to be called to update any changes made to the motion flow network. redraw:true will redraw the viewports. incGlobals:true will also include the global motion flow network.

Related Methods

newSnippet <moflow> <filename> <point2_pos> <redraw:true> <load:true>

Adds a new MoFlowSnippet to the motion flow network, from the given .bip file. <point2_pos> is the position in windows coordinates where the origin is the top left of the snippet in the motion flow graph. Redraw:true will redraw the graph window. Load:true will immediately load the snippet

See also

Biped Controllers

MoFlowScript : MaxWrapper

MoFlowSnippet : MaxWrapper

Biped MAXScript Extensions

MAXScript Extensions in character studio


MoFlowScript : MaxWrapper

Constructor

addScript <moflow> <script_name>

Create a new motion flow script with the given name to the motion flow. Returns the new MoFlowScript.

Properties

<MoFlowScript>.startFrame Integer Default: 0f

<MoFlowScript>.snippets Array Default: #() -- Read-only

Array of MoFlowSnippet values defined in the motion flow script

<MoFlowScript>.name String Default: Varies

<MoFlowScript>.startPos Point3 Default: [0,0,0]

<MoFlowScript>.startRot Float Default: 0

<MoFlowScript>.tranIndices Array Default: #()

Methods

addSnippet < MoFlowScript > < MoFlowSnippet >

Adds the specified MoFlowSnippet to a motion flow script. Returns the MoFlowSnippet value.

insertSnippet < MoFlowScript > < MoFlowSnippet > <index_integer>

Inserts the snippet at the location specified and returns the new script item. Returns the MoFlowSnippet value.

deleteSnippet < MoFlowScript > <index_integer>

Deletes the indexed MoFlowSnippet from the motion flow script.

Related Methods

deleteScript <moflow> <index_integer>

Deletes the indexed MoFlowScript from the motion flow.

computeAnimation <moflow> [redraw:<true>] [incGlobals:<false>]

Computes the global flow network. This function has to be called to update any changes made to the motion flow network. redraw:true will redraw the viewports. incGlobals:true will also include the global motion flow network

NOTE:

Changes to the MoFlowScript property values do not cause an immediate update of the biped. ComputeAnimation must be called on the MoFlow value to recompute the biped motion.


MoFlowSnippet : MaxWrapper

Constructor

newSnippet <moflow> <filename> <point2_pos> <redraw:true> <load:true>

Adds a new MoFlowSnippet to the motion flow network, from the given .bip file. <point2_pos> is the position in windows coordinates where the origin is the top left of the snippet in the motion flow graph. Redraw:true will redraw the graph window. Load:true will immediately load the snippet. Returns the new MoFlowSnippet.

Properties

<MoFlowSnippet>.start Integer Default: 0

The start frame in the snippet file.

<MoFlowSnippet>.end Integer Default: Varies

The end frame in the snippet file.

<MoFlowSnippet>.clipName String Default: Varies

<MoFlowSnippet>.fileName String Default: Varies

<MoFlowSnippet>.pos Point2 Default: Varies

The coordinates of the snippet in the Motion Flow Graph.

<MoFlowSnippet>.active Boolean Default: True

<MoFlowSnippet>.transitions Array Default: #(MoFlowTransition : X -> Y) - read only

An array of the transitions defined for the snippet (MoFlowTransition values). The MoFlowTransition values printed show the from and to MoFlowSnippet names.

<MoFlowSnippet>.randomStartProbability Integer Default: 100

Methods

addTransition <from_MoFlowSnippet > <to_MoFlowSnippet > <bool_optimize>

Adds a new MoFlowTransition to a motion flow Snippet. The optimize parameter acts as the "Optimize Selected Transition" in the Motion Flow Editor. If a MoFlowTransition already exists from from_MoFlowSnippet to to_MoFlowSnippet, no action occurs.

deleteTransition < MoFlowSnippet > <index_integer>

Deletes the indexed MoFlowTransition emanating from the MoFlowSnippet.

deleteTransitionsTo <from_MoFlowSnippet > <to_MoFlowSnippet >

Delete all transitions that emanate to the specified snippet.

Related Methods

addSnippet < MoFlowScript > < MoFlowSnippet >

Adds the specified MoFlowSnippet to a motion flow script. Returns the MoFlowSnippet value.

insertSnippet < MoFlowScript > < MoFlowSnippet > <index_integer>

Inserts a snippet at the location specified and returns the new script item. Returns the MoFlowSnippet value.

deleteSnippet < MoFlowScript > <index_integer>

Deletes the indexed MoFlowSnippet from the motion flow script.

loadSnippetFiles <moflow>

Loads all of the snippet files whose file names are assigned. This function should be called whenever new snippets are added.

getSnippetIndex <moflow> <MoFlowSnippet>

Given the snippet, returns its index in the motion flow’s .snippets array.

computeAnimation <moflow> [redraw:<true>] [incGlobals:<false>]

Computes the global flow network. This function has to be called to update any changes made to the motion flow network. redraw:true will redraw the viewports. incGlobals:true will also include the global motion flow network

NOTE:

Changes to the MoFlowSnippet property values do not cause an immediate update of the biped. ComputeAnimation must be called on the MoFlow value to recompute the biped motion.

See also

MoFlowScript : MaxWrapper

MAXScript Extensions in character studio


MoFlowTranInfo : MaxWrapper

Constructor

addTranInfo < MoFlowTransition >

Adds a new MoFlowTranInfo to the MoFlowTransition and returns the newly created MoFlowTranInfo.

Properties

<MoFlowTranInfo>.length Integer Default: 25

The transition length in frames.

<MoFlowTranInfo>.angle Float Default: 0.0

The direction of the destination clip

<MoFlowTranInfo>.easeFrom Float Default: 0.5

<MoFlowTranInfo>.easeTo Float Default: 0.5

<MoFlowTranInfo>.sourceStart Integer Default: Varies

The start frame for the source clip

<MoFlowTranInfo>.destStart Integer Default: Varies

The start frame for the destination clip

<MoFlowTranInfo>.sourceState Boolean Default: True

false - Fixed

true - Rolling

<MoFlowTranInfo>.destState Boolean Default: True

false - Fixed

true - Rolling

<MoFlowTranInfo>.note String Default: ""

<MoFlowTranInfo>.probability Integer Default: 100

Related Methods

deleteTranInfo < MoFlowTransition > <index_integer>

Deletes the indexed MoFlowTranInfo from the MoFlowTransition. If the MoFlowTranInfo is the only MoFlowTranInfo in MoFlowTransition, it is not deleted.

computeAnimation <moflow> [redraw:<true>] [incGlobals:<false>]

Computes the global flow network. This function has to be called to update any changes made to the motion flow network. redraw:true will redraw the viewports. incGlobals:true will also include the global motion flow network

NOTE:

Changes to the MoFlowSnippet property values do not cause an immediate update of the biped. ComputeAnimation must be called on the MoFlow value to recompute the biped motion.

The following example will find the transition information from the first clip (snippet) to the next in the first script defined for the Biped motion flow.

EXAMPLE

CSPATH = "f:\\3dsmax31_86\\cstudio\\"

bipObj = biped.createNew 100 100 [0,0,0]

select bipObj

max motion mode

bip = bipObj.controller

-- get the MoFlow value from the biped controller:

mf = bip.motionFlow

-- go into motion flow mode and load a motion flow file

bip.motionmode = true

loadMoFlowFile mf (CSPATH + "scripts\\4floloop.mfe")

-- get the script of interest from the MoFlow and make it the active script:

mfs = mf.activeScript = mf.scripts[2]

-- the sequence of snippets for the script are in mfs.snippets.

-- get the first snippet (snippet_from) from the script:

snippet_from = mfs.snippets[1]

-- get the second snippet (snippet_to) from the script:

snippet_to = mfs.snippets[2]

-- search the transitions in snippet_from to find

-- the one whose toSnippet property == snippet_to:

theTrans = undefined

for trans in snippet_from.transitions where (trans.toSnippet == snippet_to) do

( theTrans = trans

break

)

-- which transition info used to go from snippet_from to snippet_to for

-- this particular transition is in the mfs.tranIndices array:

whichTrans = mfs.tranIndices[1]

--get the transition information for the from script item:

theTransInfo = theTrans.tranInfos[whichTrans]

See also

Biped MAXScript Extensions

MAXScript Extensions in character studio


MoFlowTransition : MaxWrapper

Constructor

addTransition <from_MoFlowSnippet > <to_MoFlowSnippet > <bool_optimize>

Adds a new MoFlowTransition from the from_MoFlowSnippet to the to_MoFlowSnippet if one doesn’t already exist. The optimize parameter acts as the "Optimize Selected Transition" in the Motion Flow Editor.

Properties

<MoFlowTransition>.fromSnippet MoFlowSnippet Default: Varies

Specifies the MoFlowSnippet transitioning from.

<MoFlowTransition>.toSnippet MoFlowSnippet Default: Varies

Specifies the MoFlowSnippet transitioning to.

<MoFlowTransition>.active Boolean Default: True -- Read-only

Specifies whether the MoFlowTransition is active.

<MoFlowTransition>.selected Boolean Default: False

Specifies whether the MoFlowTransition line is selected in the Motion Flow Graph.

<MoFlowTransition>.tranInfos Array Default: #(MoFlowTranInfo : [X,X])

-- Read-only

Array of motion flow transition info blocks (MoFlowTranInfo values). The element of this array used is determined by the <mfscriptItem>.tranIndex property.

Methods

addTranInfo < MoFlowTransition >

Adds a new MoFlowTranInfo to the MoFlowTransition and returns the newly created MoFlowTranInfo.

deleteTranInfo < MoFlowTransition > <index_integer>

Deletes the indexed MoFlowTranInfo from MoFlowTransition. If the MoFlowTranInfo is the only MoFlowTranInfo in MoFlowTransition, it is not deleted.

Related Methods

deleteTransition < MoFlowSnippet > <index_integer>

Deletes the indexed MoFlowTransition emanating from the MoFlowSnippet.

deleteTransitionsTo <from_MoFlowSnippet > <to_MoFlowSnippet >

Deletes all transitions that emanate to the specified snippet.

computeAnimation <moflow> [redraw:<true>] [incGlobals:<false>]

Computes the global flow network. This function has to be called to update any changes made to the motion flow network. redraw:true will redraw the viewports. incGlobals:true will also include the global motion flow network

NOTE:

Changes to the MoFlowSnippet property values do not cause an immediate update of the biped. ComputeAnimation must be called on the MoFlow value to recompute the biped motion.

See also

MAXScript Extensions in character studio


SharedMotionFlow : ReferenceTarget

SharedMotionFlow - superclass: ReferenceTarget; super-superclass:MAXWrapper - 3:0 - classID: #(704337733, 13270397)

Properties:

<SharedMotionFlow>.bipeds ArrayParameter default: #() -- node array;

<SharedMotionFlow>.figFileLoaded BooleanClass default: false -- boolean;

<SharedMotionFlow>.name String default: "SharedMoflow" -- string;

See also

MAXScript Extensions in character studio


SharedMotionFlows : ReferenceTarget

SharedMotionFlows - superclass: ReferenceTarget; super-superclass:MAXWrapper - 2:0 - classID: #(282148065, 332808693)

Properties:

<SharedMotionFlows>.EditedSharedMoFlow UndefinedClass default: undefined -- max object;

<SharedMotionFlows>.SharedMoFlows ArrayParameter default: #() -- max object array;

See also

MAXScript Extensions in character studio


Biped Keys

All common MAXScript key functions like deleteKey, selectKeys, moveKeys etc. can be used with Biped keys with the exceptions of addNewKey and deleteKeys. These methods are substituted with the following methods.

Method

biped.addNewKey <biped_controller> <time> [ #select ]

where

<time>

Adds a new key to the controller track at the time specified.

[ #select ]

The new key is also selected if the #select optional argument is specified.

The value for the new key is the interpolated controller value at the specified time. The value for the new key is the interpolated controller value at that time. The new key is also selected if the #select optional argument is specified.

addNewKey() will not add a key if a key already exists at the specified time. The return value is the key located at the specified time.

NOTE:

The biped COM and props’ controllers are not keyable.

Method

biped.deleteKeys <biped_controller> [ #allKeys ] [ #selection ]

where

[ #allKeys ]

Deletes all the controller’s keys. The default if no other arguments specified.

[ #selection ]

Deletes the selected keys.

Deletes either all keys or all selected keys from the controller. If neither #allKeys or #selection is specified, all keys are deleted.

Accessing a Biped Controller Key by Index

Accessing a Biped controller key by indexing into the .keys property of the controller returns a type of key that MAXScript does not recognize. To get a Biped controller key by index use the following method:

Method

biped.getKey ( <biped_controller> | <footstep_ctrl> ) <index>

where

<biped_controller>

A biped object controller

<footstep_ctrl>

A biped footstep controller

<index>

Which key to retrieve from the controller

Returns an instance of BipedKey for Biped body controllers and BipedFSKey for footstep controllers. BipedKey and BipedFSKey are defined below.

Not all of the Biped elements contain their own transform controller. Rather, a controller on an object typically higher in the hierarchy may store the transform key for an element. For example, the transforms for all the fingers on a hand are stored in either the Finger0 or Clavicle transform controller. This depends on whether "Separate Tracks for Arms" is set to true or false, respectively.

The following example will get the first key for each of the subcontrollers of the $Bip01 Vertical_Horizontail_Turn transform controller and show their properties. Additionally, the first key of the $Bip01 Footstep transform controller will have its properties shown.

EXAMPLE

bip = $Bip01.transform.controller

-- Obtain the subcontrollers

vertCont = bip.vertical.controller

horzCont = bip.horizontal.controller

turnCont = bip.turning.controller

-- Get the first key for each subcontroller

vk = biped.getKey vertCont 1

hk = biped.getKey horzCont 1

tk = biped.getKey turnCont 1

-- Show the properties for the individual subcontroller key types

showProperties vk

showProperties hk

showProperties tk

-- Obtain the Biped’s Footstep controller

fsCont = $'Bip01 Footsteps'.transform.controller

-- Show the Footstep controller properties

showProperties fsCont

-- Get the first Footstep controller key

fk = biped.getkey fsCont 1

showProperties fk

See also

BipedKey : MAXObject

BipedFSKey : MAXObject

MAXScript Extensions in character studio


BipedKey : MAXObject

All Biped vertical, horizontal, turning, and body keys are represented by this class.

Properties

<bipedkey>.time Time Default: Varies

When in time the key occurs.

<bipedkey>.selected Boolean Default: False

True if the key is selected.

<bipedkey>.tension Float Default: 25.0

Controls the amount of curvature in the animation curve.

High Tension produces a linear curve. It also has a slight Ease To and Ease From effect.

Low Tension produces a very wide, rounded, curve. It also has a slight negative Ease To and Ease From effect

.

<bipedkey>.continuity Float Default: 25.0

Controls the tangential property of the curve at the key. The default setting is the only value that produces a smooth animation curve through the key. All other values produce a discontinuity in the animation curve causing an abrupt change in the animation.

<bipedkey>.bias Float Default: 25.0

Controls where the animation curve occurs with respect to the key.

<bipedkey>.easeTo Float Default: 0.0

Slows the velocity of the animation curve as it approaches the key.

High Ease To causes the animation to decelerate as it approaches the key.

The default setting causes no extra deceleration.

<bipedkey>.easeFrom Float Default: 0.0

Slows the velocity of the animation curve as it leaves the key.

High Ease From causes the animation to start slow and accelerate as it leaves the key.

The default setting causes no change of the animation curve.

<bipedkey>.type Name Default: Varies -- Read-onlyContains #vertical, #horizontal, #turning, #body, #biped, #head, or #prop based on the key type

There are additional properties based on the type of the key:

#vertical

<vertkey>.z Float Default: Varies

Position of the selected biped part in z.

<vertkey>.dynamicsBlend Float Default: 1.0

Controls the amount of gravity in an airborne period, as in a running or jumping motion. This parameter has no effect on a walking motion where footsteps overlap.

<vertkey>.ballisticTension Float Default: 0.5

Controls the amount of spring or tension when the biped lands or takes off from a jump or run step. The change is subtle.

A walk cycle will not activate this value. The biped has to be airborne, then the Lift and Touch vertical keys will display a Ballistic Tension value.

#horizontal

<horzkey>.x Float Default: Varies

Position of the selected biped part in x.

<horzkey>.y Float Default: Varies

Position of the selected biped part in y.

<horzkey>.balanceFactor Float Default: 1.0

Positions the biped's weight along a line that extends from the center of mass to the biped's head. A value of 0 places the biped's weight at the center of mass. A value of 1 places the biped's weight above the center of mass. A value of 2 places the biped's weight in the head.

#turning

<turnkey>.rotation Quaternion Default: (quat 0 0 0 1)

Rotation of the selected biped part.

#body

<bodykey>.ikBlend Float Default: 0.0

Determines how forward kinematics and inverse kinematics are blended to interpolate an intermediate position.

<bodykey>.ikSpace Integer Default: 0

0 - Body

The biped limb is in biped coordinate space.

1 - Object

The biped limb is either in World coordinate space or the coordinate space of the selected object. Coordinate space can be blended between keys.

<bodykey>.ikAnkleTension Float Default: 0.0

Adjusts the precedence of the ankle joint over the knee joint. When set to 0, the knee takes precedence. When set to 1, the ankle takes precedence.

<bodykey>.ikJoinedPivot Boolean Default: True

Put the biped foot in the coordinate space of the previous key.

<bodykey>.ikPivotIndex Integer Default: 1

Index into <bodykey>.ikPivots array of active (selected) pivot

<bodykey>.ikNumPivots Integer Default: Varies - Read only

Number of pivot points in <bodykey>.ikPivots array

<bodykey>.ikPivots Array Deafult: Varies - Array of Point3 values

Array of positions of all the pivot points for the body part

#biped

#biped type keys do not expose any additional parameters

#head

<headkey>.headBlend Float Default: 0.0

Determines the degree of influence of the lookat target (headObject) on the head's rotation. At a value of 0, the headObject's position has no influence on the head's rotation. At a value of 1, the head will look at the headObject.

#prop

<propkey>.posSpace Integer Default: 1

<propkey>.rotSpace Integer Default: varies

0 - World

Positioning/rotation is in world coordinate space.

1 - Body

Positioning/rotation is in body coordinate space.

2 – Right Hand

Positioning/rotation is in right hand coordinate space.

3 – Left Hand

Positioning/rotation is in left hand coordinate space.

EXAMPLE

-- to add a new key

k = biped.addNewKey $'bip01 L clavicle'.controller 10f

k = biped.getKey $'bip01 L clavicle'.controller 1

showProperties k

k.ikBlend = .5

k.ikSpace = 0

k.ikAnkleTension = .8

k.ikJoinedPivot = false

k.ikPivotIndex = 8

k.ikNumPivots

k.ikPivots

See also

BipedFSKey : MAXObject

MAXScript Extensions in character studio


Biped Twist Poses

biped.createTwistPose <biped_ctrl>

Creates a new twist pose for the specified biped limb. Corresponds to the "Add" button in the UI.

<integer>biped.numTwistPoses <biped_ctrl>

Returns the number of twist poses in the specified biped limb.

biped.setTwistPose <biped_ctrl> <pose_index>

Sets the twist pose in the specified biped limb to the indexed pose. Corresponds to the "Set" button in the UI.

biped.setDefaultTwistPoses <biped_ctrl>

Resets the twist poses in the specified biped limb to the default poses and values, removes custom poses. Corresponds to pressing the "Default" button in the UI.

<float>biped.getTwistPoseTwist <biped_ctrl> <pose_index>

Returns the twist value of the indexed twist pose in the specified biped limb.

biped.setTwistPoseTwist <biped_ctrl> <pose_index> <float_value>

Sets the twist value of the indexed twist pose in the specified biped limb to the given floating point value.

<float>biped.getTwistPoseBias <biped_ctrl> <pose_index>

Returns the bias value of the indexed twist pose in the specified biped limb.

biped.setTwistPoseBias <biped_ctrl> <pose_index> <float_value>

Sets the bias value of the indexed twist pose in the specified biped limb to the given floating point value.

<name>biped.getTwistPoseName <biped_ctrl> <pose_index>

Returns the name of the indexed twist pose in the specified biped limb as a name value.

biped.setTwistPoseName <biped_ctrl> <pose_index> <name_or_string>

Sets the name of the indexed twist pose in the specified biped limb to the given string or name value.

biped.deleteTwistPose <biped_ctrl> <pose_index>

Deletes the indexed twist pose for the specified biped limb. Corresponds to the "Delete" button in the UI.


Biped Quaternions / Euler

<bool>biped.getEulerActive <biped_ctrl>

Returns true if the biped is set to use Euler, false if set to use Quaternions. Corresponds to the radio button selection in the "Quaternion/Euler" rollout of the UI.

biped.setQuaternionActive <biped_ctrl>

Sets the Biped controllers to use Quaternions. Corresponds to selecting "Quaternion" in the "Quaternion/Euler" rollout of the UI.

biped.setEulerActive <biped_ctrl>

Sets the Biped controllers to use Eulers. Corresponds to selecting "Quaternion" in the "Quaternion/Euler" rollout of the UI.

<enum>biped.getEulerOrder <biped_ctrl>

Returns the Euler Order as a name value. Possible values are #xyz, #xzy, #yzx, #yxz, #zxy, #zyx. Corresponds to the drop-down list in the "Quaternion/Euler" rollout of the UI.

biped.setEulerOrder <biped_ctrl> <enum>

Sets the Euler Order using the enum name. Possible values are #xyz, #xzy, #yzx, #yxz, #zxy, #zyx. Corresponds to the drop-down list in the "Quaternion/Euler" rollout of the UI.


Biped Motion Capture

All motion capture properties in Biped are global parameters and cannot be varied from Biped to Biped. Hence they are exposed as system globals residing in the mocap struct.

Properties

mocap.fsExtractionMode Integer Default: 0

0 - None: Freeform

No footsteps are extracted.

1 - On

Extract footsteps.

2 - Fit to existing

For motion data that has both footstep motion and flying, swimming, falling, or tumbling motions.

mocap.fsConversionMode Integer Default: 0

0 - No Key Reduction

Do not reduce keys. Use this on files that are already key reduced or if you want to work with all the data in a raw motion capture file.

1 - Use Key Reduction

Reduce keys for simpler key editing.

2 - Load Buffer Only

Do not apply the data to the biped, load the data to the motion capture buffer only. Use this to either compare your edited version with the original or to paste postures from the motion capture buffer to the biped in the scene.

mocap.upVector Integer Default: 2

Set the vertical axis used in the motion capture data.

0 - X

1 - Y

2 - Z

mocap.scaleFactor Float Default: 1.0

Multiply the stored talent size by this value and size the biped accordingly.

-- range: 1+

Footstep Extraction

mocap.fsExtractionTol Float Default: 0.07

Set the sensitivity of footstep extraction. Biped determines if the footstep is there by checking that the foot does not move beyond the distance determined by the Extraction Tolerance value. Smaller numbers are more sensitive and extract more footsteps. Value is a percentage of foot length.

-- range: 0+

mocap.fsSlidingDist Float Default: 25.0

Create a sliding footstep when positional tolerance is reached. This value is a percentage of foot length. By default the foot must slide its own distance (100), before a sliding footstep is created.

-- range: 0+

mocap.fsSlidingAngle Float Default: 0.0

Create a sliding footstep when rotational tolerance is reached. This value is in degrees. If this is set high (360 degrees), the foot must make a complete turn before a sliding footstep is created.

-- range: 0-360

mocap.fsUseVerticalTol Boolean Default: False

Turn on Z-axis Tolerance. The control filters out footsteps that do not fall within a given range of the ground plane. Use this when filtering motions, such as hopping or pitching a baseball, in which a foot may come off the ground and remain stationary, but its position is not intended as a footstep.

mocap.fsVerticalTol Float Default: 0.5

Value is a percentage of leg length

-- range: 0+

mocap.fsZLevel Float Default: 0.0

Set a Z value (ground).

mocap.fsUseFlatten Boolean Default: False

Extracted footsteps are moved to Z=0. Use this to flatten out minor differences in the height of the extracted footsteps.

Load Frames

mocap.startFrame Integer Default: 0

Start importing at this frame. Default is frame 0, the first frame.

mocap.endFrame Integer Default:0

Stop importing at this frame. Default is the last frame of the clip.

mocap.loop Boolean Default: False

Loop the data by the value set here.

This is relative. Succeeding loops start where the previous loop left off. The clips are not blended and may require editing unless the original clip was designed to loop.

Use this for clips designed to loop.

NOTE:

This often works best if Footstep Extraction is tuned off.

mocap.loopFrameCount Integer Default: 0

-- range: 0+

Key Reduction Settings

Tolerance: Set the maximum angular or positional deviation for a track.

Values are in degrees for rotation tracks. Values are in units of translation for position tracks.

Minimum Key Spacing: Set the minimum number of frames between keys.

Tolerance is computed first, then Minimum Key Spacing computes further key reduction.

A Minimum Key Spacing value of 10 for the head track ensures that no two keys are closer than 10 frames for this track.

Set All: Force all tracks to the values set in these fields.

Higher values here can determine how much key reduction is possible while preserving the original motion.

Filter: Clear to prevent filtering of the motion capture data into a track. If this is cleared, there will be no key reduction for the track.

mocap.allTol Float Default: 0.0

-- range: 0+

mocap.allSpacing Integer Default: 3

-- range: 0+

mocap.allFilter Boolean Default: False

mocap.horzTol Float Default: 1.0

-- range: 0+

mocap.horzSpacing Integer Default: 3

-- range: 0+

mocap.horzFilter Boolean Default: True

mocap.rotTol Float Default: 1.0

-- range: 0+

mocap.rotSpacing Integer Default: 3

-- range: 0+

mocap.rotFilter Boolean Default: True

mocap.vertTol Float Default: 1.0

-- range: 0+

mocap.vertSpacing Integer Default: 4

-- range: 0+

mocap.vertFilter Boolean Default: True

mocap.pelvisTol Float Default: 6.0

-- range: 0+

mocap.pelvisSpacing Integer Default: 3

-- range: 0+

mocap.pelvisFilter Boolean Default: True

mocap.spineTol Float Default: 6.0

-- range: 0+

mocap.spineSpacing Integer Default: 3

-- range: 0+

mocap.spineFilter Boolean Default: True

mocap.neckTol Float Default: 6.0

-- range: 0+

mocap.neckSpacing Integer Default: 3

-- range: 0+

mocap.neckFilter Boolean Default: True

mocap.leftArmTol Float Default: 6.0

-- range: 0+

mocap.leftArmSpacing Integer Default: 3

-- range: 0+

mocap.leftArmFilter Boolean Default: True

mocap.rightArmTol Float Default: 6.0

-- range: 0+

mocap.rightArmSpacing Integer Default: 3

-- range: 0+

mocap.rightArmFilter Boolean Default: True

mocap.leftLegTol Float Default: 6.0

-- range: 0+

mocap.leftLegSpacing Integer Default: 3

-- range: 0+

mocap.leftLegFilter Boolean Default: True

mocap.rightLegTol Float Default: 6.0

-- range: 0+

mocap.rightLegSpacing Integer Default: 3

-- range: 0+

mocap.rightLegFilter Boolean Default: True

mocap.tailTol Float Default: 6.0

-- range: 0+

mocap.tailSpacing Integer Default: 3

-- range: 0+

mocap.tailFilter Boolean Default: True

Limb orientation

Angle: Move the knee or Elbow position to create the biped joint key.

Point: Rotate the shoulder-elbow-wrist or hip-knee-ankle to create the biped joint key.

Auto: Auto reads exact hand and foot positions from the motion capture data, character studio then places the knees and elbows in a natural position. For marker files involving running and walking, this option can clean up the data nearly instantly, regardless of how many markers were used (and where they were placed).

mocap.kneeOrient Integer Default: 1

0 - angle

1 - point

2 - auto

The biped knee hinge joints are perpendicular to the triangles formed by the hip-knee-ankle. Resolve errors in the motion capture data that break this rule by using either the angle or point method.

mocap.elbowOrient Integer Default: 1

0 - angle

1 - point

2 - auto

The biped elbow hinge joints are perpendicular to the triangles formed by the shoulder-elbow-wrist. Resolve errors in the motion capture data that break this rule by using either the angle or point method.

mocap.footOrient Integer Default: 0

0 - angle

1 - auto

The biped foot hinge joints are perpendicular to the triangles formed by the hip-knee-ankle respectively. Resolve errors in the motion capture data that break this rule by using either the angle or point method.

mocap.handOrient Integer Default: 0

0 - angle

1 - auto

The biped hand hinge joints are perpendicular to the triangles formed by the shoulder-elbow-wrist. Resolve errors in the motion capture data that break this rule by using either the angle or point method.

Talent Definition

mocap.talentFigStrucFile String Default: "" -- figure structure file (.fig)

A .fig file containing changes made to the biped scale while in Talent Figure mode.

mocap.useTalentFigStrucFile Boolean Default: False

Turn on useTalentFigStrucFile to use the file whose string is defined in mocap.talentFigStrucFile.

mocap.talentPoseAdjFile String Default: "" -- pose adjustment file (.cal)

A .cal file containing changes made to the biped while in Adjust Talent Pose mode.

mocap.useTalentPoseAdjFile Boolean Default: False

Turn on useTalentPoseAdjFile to use the file whose string is defined in mocap. talentPoseAdjFile.

Marker Name Files

mocap.markerNameFile String Default: "" -- csm marker name file (.mnm)

A Marker Name file to map incoming marker names in motion capture files (.bvh or .csm) to the character studio marker naming convention.

mocap.useMarkerNameFile Boolean Default: False

When set to true, use the file defined in mocap.markerNameFile.

mocap.jointNameFile String Default: "" -- bvh marker name file (.mnm)

A Marker Name file to map incoming marker names in motion capture files (.bvh or .csm) to the character studio marker naming convention.

mocap.useJointNameFile Boolean Default: False

When set to true, use the file defined in mocap.jointNameFile.

Marker Display Options

Marker and marker names are displayed around the biped. Discrepencies like the biped elbow position relative to the elbow marker can be spotted and adjusted.

mocap.dispKnownMarkers Boolean Default: False

mocap.dispKnownMarkersType Boolean Default: False

true - on all props

false - on selected props

mocap.dispPropMarkers Boolean Default: False

mocap.dispUnKnownMarkers Boolean Default: False

Load Save Methods

mocap.loadParameters <file_name>

mocap.saveParameters <file_name>

Load/Save a motion capture parameter (.MOC) file

See also

MAXScript Extensions in character studio


Setting and Resetting Biped IK Keys

biped.setPlantedKey <node>

biped.setSlidingKey <node>

biped.setFreeKey <node>

These methods will set an IK key of the respective type for the given biped node.

biped.resetAllLimbKeys <biped_ctrl>

This function will reset a limbs IK pivot points, which is useful if you are seeing oddities (such as popping) when you are using scale subanims.

NOTE:

There is an ActionItem available for this function.

biped.collapseMoveAllMode <biped_ctrl>

This function will bake the Move All Mode information directly into the biped.

NOTE:

There is an ActionItem available for this function.

See also

Biped Creation

Biped Controllers

Biped MaxScript Extensions


Biped Miscellaneous Methods

<bool>biped.getIKActive <biped_ctrl> <int_index>

Returns true if the indexed limb is under IK control at the current MAXScript time. Useful for custom key reducers and exporters.

biped.unifyMotion <biped_ctrl>

Displays the Unify Motion dialog for the specified biped. The biped must be selected in the Motion panel and in Motion mode.

<Interval>biped.getCurrentRange <biped_ctrl>

Get the animation range of the specified biped controller.

<Point2>biped.getIdLink <node>

The id and link values for a particular biped node. The 'x' value is the id and the 'y' value is the link. An id value of -1 means the node isn't part of a biped.

Copy Paste Buffer

biped.loadCopyPasteFile <biped_ctrl> <file_name>

Load the specified buffer file.

<bool>biped.pasteFromBuffer <biped_ctrl>

Paste from buffer. Returns true on success, false otherwise.

Accessing Internal Biped Values

Collection of functions useful for a biped interpolator that uses the internal biped hierarchy.

<INode>biped.getRotParentNode <node>

<INode>biped.getPosParentNode <node>

<Quat>biped.getParentNodeRot <node>

<Point3>biped.getParentNodePos <node>

<Point2>biped.getClavicleVals <node> --2 angles in degrees

<float>biped.getHingeVal <node> --in degrees

<float>biped.getHorseAnkleVal <node> --in degrees

<float>biped.getPelvisVal <node> --in degrees

<float>biped.getFingerVal <node> --in degrees

COM Controls Access

Convenience functions for getting the different biped COM controls.

<Control>biped.getHorizontalControl <biped_ctrl>

<Control>biped.getVerticalControl <biped_ctrl>

<Control>biped.getTurnControl <biped_ctrl>

Biped Keys Display in Trackbar

You can turn off biped keys in the trackbar, so that you may only just see subanim keys. The property is

<biped_controller>.showBipedInTrackBar = true|false.

Set Multiple Keys Dialog

biped.dosetmultiplekeysdlg <biped_controller>

The function will bring up the old set multiple keys dialog in a popup.

biped.setmultiplekeys <biped_controller>

The function will apply increment without bringing up the dialog.

See also

Biped MAXScript Extensions

MAXScript Extensions in character studio


MAXScript Extensions for Crowd

The following topics describe the constructors, properties and methods providing MAXScript access to the Crowd feature of character studio:

Crowds

Crowd : Helper

Delegate:Helper

CrowdScatter:

CrowdAssignment : MAXObject

CrowdTeam : MAXObject

CrowdState:MAXObject

CrowdTransition : MAXObject

Crowds - Methods

Crowd Behaviors

Crowd Behaviors

Avoid_Behavior : MAXObject

CogControl : MAXObject

Orientation_Behavior : MAXObject

Path_Follow_Behavior : MAXObject

Repel_Behavior : MAXObject

Scripted_Behavior : MAXObject

Seek_Behavior : MAXObject

Space_Warp_Behavior: MAXObject

Speed_Vary_Behavior : MAXObject

Surface_Arrive_Behavior : MAXObject

Surface_Follow_Behavior : MAXObject

Wall_Repel_Behavior : MAXObject

Wall_Seek_Behavior : MAXObject

Wander_Behavior : MAXObject

Motion Clips

MotionClips and GlobalMotionClip

Clip_Associations : ReferenceTarget

ClipAssigner : ReferenceTarget

ClipAssignerReferenceTarget : ReferenceTarget

ClipState : ReferenceTarget

Space Warps

Vector_Field: SpacewarpObject

See also

Biped and Crowd Interaction

MAXScript Extensions in character studio


Crowd : helper

Crowd - superclass: helper; super-superclass:node - 28:0 - classID: #(1611940610, 1128617348)

Value > MAXWrapper > Node > Helper > Crowd

Constructor

crowd ...

Properties

<crowd>.simStart Integer Default: 0

The first frame of the simulation.

<crowd>.solveStart Integer Default: 0

The frame at which you begin solving.

<crowd>.solveEnd Integer Default: 100

Specifies the last frame considered for the solution.

<Crowd>.deleteKeys Boolean Default: False

When true, Crowd deletes the keys of active delegates in the range over which the solution takes place.

<Crowd>.saveNthPos Integer Default: 1

Saves every nth position frame after the solution.

<Crowd>.saveNthRot Integer Default: 1

Saves every nth rotation frame after the solution.

<Crowd>.flashing Boolean Default: True Alias: Hilite_Delegates_During_Assignments

<crowd>.vectorScale Float Default: 1.0

Globally scales all force and velocity vectors that are displayed during the simulation. Scaling vectors up helps to see them better when they are very small. It does not effect the simulation.

<Crowd>.useScript Boolean Default: False

When true, Crowd executes a script at each frame of the solution.

<Crowd>.functionName String Default: "PerFrameFn" Alias: Script_Context_Name

The name of the function to be executed. This name must also be specified in the script.

<Crowd>.script String Default: Undefined

<Crowd>.update Boolean Default: True Alias: Update_Display_During_Solve

When true, motion produced during solution of a crowd simulation appears in the viewports.

<Crowd>.updateFrequency Integer Default: 1

How often the display is updated during the solution. If 1, the update occurs every frame. If 2, the update occurs every other frame, and so on.

<Crowd>.solveForBipeds Boolean Default: False

When on, only biped/delegates are included in the computation. Also, the options to use priorities and backtracking become available. These options are available only for biped-only computations.

<Crowd>.usePriorities Boolean Default: False

When on, biped/delegates are computed one delegate at a time, in order of their Priority values, from lowest to highest. Also, backtracking becomes available and Step Solve becomes unavailable.

<Crowd>.backtracking Boolean Default: False

Turns on backtracking functionality when solving a crowd simulation that uses bipeds. When Backtracking is on during the solution, in the case of an impending collision between bipeds, the Crowd system will back up the simulation to the beginning of the current clip, and then try a different traversal of the lower-priority delegate/biped's motion flow graph. If necessary, the system will back up two or more clips.

<Crowd>.showCollisions Boolean Default: False Alias: ClearColl

When true the delegates that collide are highlighted in the collision color.

<crowd>.whenToShowCollisions Integer Default: 0

0 - only during collisions - Colliding delegates are highlighted only in frames in which they actually collide.

1 - always - Colliding delegates are highlighted in frames in which they collide and all subsequent frames.

<crowd>.collisionColor Color Default: (color 255 0 0)

The color swatch indicates the color used to highlight colliding delegates.

<crowd>.IconSize Float Default: 0.0

<crowd>.behaviors ArrayParameter Default: #()

Array of Behavior objects

<crowd>.teams ArrayParameter Default: #()

Array of Team objects

<crowd>.assignments ArrayParameter Default: #()

<crowd>.cogcontrols ArrayParameter Default: #() Alias: Cognitive_Controllers

CogControl : MAXObject

<crowd>.scatter MAXObject Default: Scatter_Parameters

CrowdScatter:

<crowd>.objAssoc MAXRefTarg Default: ObjAssoc Alias: Object_Delegate_Associations_Parameters

Display the dialog to link any number of delegate-object pairs.

<crowd>.smooth MAXRefTarg Default: Smooth Alias: Smoothing_Parameters

Display the Smoothing dialog to smooth existing animation keys on a solved simulation to create more natural-looking animation

<Crowd>.priority MAXRefTarg Default: Priority -- Read-only; Alias: Priority_Parameters

ObjAssoc Properties

These properties correspond to the Object / Delegate dialog displayed by clicking the Associate Objects with Delegates icon.

< Crowd.objAssoc>.objects ArrayParameter Default: #() -- node array

Array of linked Objects.

< Crowd.objAssoc>.delegates ArrayParameter Default: #() -- node array

Array of linked delegates.

< Crowd.objAssoc>.alignScale Boolean Default: True

When true, Align Objects with Delegates sets each object's absolute scaling factor to that of its corresponding delegates. This is useful if, for example, you've randomized delegates' sizes with the Scatter Objects Scale panel, and want the associated objects to match.

Smooth Properties

These properties correspond to the Smoothing rollout.

<Crowd.smooth>.objects ArrayParameter Default: #() -- node array; Alias: Objects_to_Smooth

Specify which objects' positions and/or rotations to smooth.

<Crowd.smooth>.filterDelegates Boolean Default: True Alias: Filter_Delegate_Selection

When true, the Select dialog opened by the Select Objects to Smooth button shows only delegates. When off, it shows all scene objects.

<Crowd.smooth>.wholeAnim Integer Default: 0

0 - Whole Animation: Smoothes all animation frames.

1 - Animation Segment: Smoothes only the frame ranges specified in the From and To fields.

<Crowd.smooth>.from Integer Default: 0 Alias: smooth_from_frame

When Animation Segment is chosen, specifies the first animation frame for smoothing.

<Crowd.smooth>.to Integer Default: 0 Alias: smooth_to_frame

When Animation Segment is chosen, specifies the last animation frame for smoothing.

<Crowd.smooth>.positions Boolean Default: True Alias: Smooth_positions

When true, selected objects' animation paths generated via the simulation are smoothed after the simulation has finished.

<Crowd.smooth>.rotations Boolean Default: True Alias: Smooth_rotations

When true, selected objects' rotations generated via the simulation are smoothed after the simulation has finished.

<Crowd.smooth>.filter Boolean default: false Alias: Perform_Filtering

<Crowd.smooth>.futurekeys Integer default: 2 Alias: Future_Keys

<Crowd.smooth>.n Integer default: 2 Alias: Keep_every_Nth_frame

<Crowd.smooth>.pastkeys Integer default: 2 Alias: Past_Keys

<Crowd.smooth>.smoothness Integer default: 4

<Crowd.smooth>.reduce Boolean default: true Alias: Perform_Key_Reduction

Priority Properties

These properties correspond to the Priority rollout.

<Crowd.priority>.start Integer Default: 0

<Crowd.priority>.delegates ArrayParameter Default: #() -- node array

<Crowd.priority>.object Node Default: Undefined

<Crowd.priority>.grid Node Default: Undefined

<Crowd.priority>.increment Integer Default: 0

<Crowd.priority>.showPriorities Boolean Default: False

<Crowd.priority>.showStartFrames Boolean Default: False

See also

Biped and Crowd Interaction

MAXScript Extensions in character studio


Delegate : Helper

Delegate - superclass: helper; super-superclass:node - 36:0 - classID: #(1086356394, 610041830)

Value > MAXWrapper > Node > Helper > Delegate

The Delegate helper object is a special pyramidal object used in crowd animation. By default, the point of the pyramid indicates the forward direction.

The Crowd object controls the delegate or delegates, whose motion can then be imparted to a biped or other object.

Constructor

Delegate ...

CrowdDelegate ...

Properties

<Delegate>.width Float Default: 0.0 -- world units

The width of the Delegate object.

<Delegate>.depth Float Default: 0.0 -- world units

The depth of the Delegate object.

<Delegate>.height Float Default: 0.0 -- world units

The height of the Delegate object.

<Delegate>.velocityColor Color Default: (color 0 0 0)

When showVelocity is true, uses the specified color to draw a vector in the delegate's center during the simulation solution. The vector length indicates the delegate's relative speed.

<Delegate>.active Boolean Default: True

The delegate object is subject to control by a Crowd object.

<Delegate>.showForces Boolean Default: True

The forces being applied to a delegate by any applicable behaviors are drawn as vectors whose length indicate the extent of the forces. For example, if the delegate is affected by a Space Warp behavior and a Wander behavior, the vectors (using default colors) are yellow and blue-green, respectively. These vectors are visible only during solution of the crowd simulation.

<Delegate>.showVelocity Boolean Default: False

Uses the Velocity Color (see above) to draw a vector whose length depicts the delegate's relative speed. This vector is visible only during solution of the crowd simulation.

<Delegate>.showCogStates Boolean Default: True

During a solve, a text label appears next to the delegate showing the name of the cognitive controller state or transition that currently directs its behavior, if any.

<Delegate>.xyConstrain Boolean Default: True

The delegate remains at its initial height (position on the world XY axis) throughout the simulation. When off, the delegate's height can change during the simulation, for example when seeking an object at a different height.

<Delegate>.useHierBbox Boolean Default: True

Alias Use_Hierarchy_in_Bounding_Box_Computation

When true, the Avoid behavior uses the bounding box of the delegate and all of its children to perform its behavior.

This bounding box is computed by the Crowd object, is used by the collision detector, and can be accessed by other behaviors.

<Delegate>.averageSpeed Float Default: 5.0 -- animatable; world units

Specifies the delegate's baseline velocity in 3ds Max units (or the current unit type) per second. This can be modified during the simulation by a variety of factors, such as a linked biped's built-in speed and Deviation settings in a behavior.

<Delegate>.maxAccel Float Default: 0.1 -- animatable; world units

Multiplied times Average Speed to determine the maximum acceleration.

<Delegate>.turnDecel Float Default: 0.3 -- animatable; Alias: Turn_Deceleration_Weight

Specifies how much a delegate should slow down when turning. The higher this setting, the more the delegate slows down when it reaches the turn angle (see following parameter). A value of 0 specifies no slowdown; a value of 1 tells the delegate to stop.

The algorithm computes a value, d, which goes linearly from 0 to (1 - Decel Weight) as the turn angle of the delegate goes from 0 to the Turn Angle specified by the user. The speed of the delegate is then multiplied by d. For example, when the delegate turns at the Turn Angle or greater, its speed will be multiplied by 1 - Decel Weight, slowing it down as much as possible based on this parameter. When the delegate is not turning at all, its speed is not affected by the Decel Weight. When the delegate is turning at half the specified Turn Angle, d = Decel Weight / 2, so its speed will be multiplied by (1 - Decel Weight / 2).

As a practical example, take a delegate traveling at 10 units/sec, Decel Weight is set to 0.4, and At Turn Angle is set to 30. When the delegate has turned 15 degrees (half the At Turn Angle), the effective deceleration weight is 0.2. Subtract that quantity from 1 to get 0.8, and then multiply that times the delegate's speed to get 8 units per second halfway into the turn. At the full turn (30 degrees), the delegate travels at 6 units per second.

<Delegate>.turnDecelAngle Float Default: 10.0 -- animatable; Alias: Turn_Deceleration_Angle

Specifies the turn angle at which Decel Weight's full slowdown effect is applied. If the current turn angle is less than At Turn Angle, the algorithm divides the latter by the former, and then divides the Decel Weight setting by the result to derive the effective decel weight.

<Delegate>.inclineDecel Float Default: 0.1 -- animatable; Alias: Incline_Deceleration_Weight

Specifies how much the delegate should slow down when moving at an upward slant.

<Delegate>.inclineDecelAngle Float Default: 90.0 -- animatable; Alias: Incline_Deceleration_Angle

Specifies the upward slant angle at which Decel Weight's full slowdown effect is applied.

<Delegate>.declineAccel Float Default: 0.1 -- animatable; Alias: Decline_Acceleration_Weight

Specifies how much the delegate should speed up when moving at a downward slant.

See Decel Weight for a full explanation, taking into account that Accel Weight produces a speedup effect rather than a slowdown. Thus, the effective acceleration weight is added to 1, not subtracted from it.

<Delegate>.declineAccelAngle Float Default: 90.0 -- animatable; Alias: Decline_Acceleration_Angle

Specifies the downward slant angle at which Accel Weight's full speedup effect is applied.

<Delegate>.maxTurnVel Float Default: 30.0 -- animatable; Alias: Max_Turn_Velocity

Specifies the maximum number of degrees a delegate can turn.

<Delegate>.maxTurnAccel Float Default: 3.0 -- animatable; Alias: Max_Turn_Acceleration

Specifies how much the delegate's turn angle can change per frame. If this is not small, the delegate's direction might jerk around. It would be allowed to turn suddenly, rather than smoothly.

<Delegate>.maxIncline Float Default: 90.0 -- animatable; Alias: Max_Incline_Velocity

Specifies the maximum number of degrees a delegate can turn upward per frame.

<Delegate>.maxDecline Float Default: 90.0 -- animatable; Alias: Max_Decline_Velocity

Specifies the maximum number of degrees a delegate can turn downward per frame.

<Delegate>.maxBank Float Default: 30.0 -- animatable

Specifies the maximum number of degrees a delegate can bank.

<Delegate>.maxBankVel Float Default: 3.0 -- animatable; Alias: Max_Bank_Velocity

Specifies how much the delegate's bank angle can change per frame.

<Delegate>.bankPerTurn Float Default: 1.0 -- animatable

The number of degrees the delegate will bank as a function of the turn angle at the current frame. For example, if Bank per Turn=1, the delegate will bank one degree for every degree it is turning at a given frame.

<Delegate>.useBiped Boolean Default: False

When true, the delegate is associated with a biped.

<Delegate>.biped Node Default: Undefined

The biped with which the delegate is associated.

<Delegate>.startFrame Integer Default: 0

The frame at which the associated biped's first clip will begin to play.

<Delegate>.priority Integer Default: 0

Sets the delegate priority, which determines the order of solution in biped/delegate simulations.

<Delegate>.startClip Integer Default: 0

0 - First clip of current script

1 - Random start clip

<Delegate>.duration Integer Default: 0

The number of frames the delegate has been in the current state.

<Delegate>.behaviors ArrayParameter Default: #()

The behaviors property contains valid values only during a solve. Contains the behaviors being used during the solve.

<Delegate>.weights ArrayParameter Default: #()

The weights property contains valid values only during a solve. Each element contains the weight of the corresponding behavior in the behaviors property value.

<Delegate>.simpos Point3 Default: [0,0,0]

The simpos property contains a valid value only during a solve. Contains the current position of the delegate during the simulation.

<Delegate>.randID Integer Default: 0

A possibly non-unique identifier whose purpose is to be used by behaviors as part of it's seed calculation. If more than one delegate has the the same randId then they should have the same random behavior. By defualt, crowd creates unique randIds.

<Delegate>.index Integer Default: -1 -- Read-only

Index used by various behaviors as indices into internal arrays. Before a solve, Crowd makes sure that the delegates who are participating in the solve are given a contiguous set of indices, so that behaviors can set up arrays which use these indices.

Related Delegates Methods

delegates.isComputing <delegate_node>

Returns a '1' if the delegate is currently active in a crowd solve simulation, it returns a '0' otherwise.

delegates.velocity <delegate_node>

Returns the normalized velocity of the delegate at the current simulation frame as a Point3 value.

delegates.prevVelocity <delegate_node>

Returns the normalized velocity of the delegate at the previous simulation frame as a Point3 value.

delegates.startVelocity <delegate_node> <time>

Returns the normalized velocity of the delegate at the start of the crowd simulation as a Point3 value. Thus the <time> parameter is a time value that should be equal to crowd.simStart.

delegates.speed <delegate_node>

Returns the speed of the delegate at the current simulation frame as a float.

delegates.isAssignmentActive <delegate_node> <assignmentIndex> <time>

Returns a '1' if the delegate is active for a particular crowd assignment at the time specified, if not it returns a '0'. The <assignmentIndex> directly corresponds to the index of the assignment in the crowds.assignment array.

delegates.computingBiped <delegate_node>

Returns a '0' if the biped associated with the delegate is backtracking. This method is primarily for internal use.

delegates.reactToMe <delegate_node>

If true, the delegate's position/orientation is correct at the current time in the simulation, so it's ok to use the delegate's position in a MAXScript computation, thereby "reacting to" the delegate. This property will be false when you have a biped/crowd simulation with priorities, and the delegate's priority is lower so the delegate has not yet been computed. The delegate’s position is incorrect and you should not base any MAXScript computations upon its position.

The functions lineDisplay ,sphereDisplay ,bboxDisplay , and textDisplay are all functions which can be used to draw a graphic primitive for a particular delegate when the crowd simulation is being solved. All of the positional values are in world space. Usually these functions will be used within a scripted behavior to visually demonstrate the behavior. For example, lineDisplay could be used to draw a line that represents the force that the behavior is exerting on that delegate.

delegates.lineDisplay <delegate_node> <startPosition> <endPosition> <color> <vectorScale>

This function will draw a line from the start position to the endPosition with the color specified .

<startPosition> is a point3 value.

<endPositions> is a point3 value.

<color> is a color value.

<vectorScale> boolean value. Whether or not to scale the line display by the Crowd.vectorScale value.

delegates.sphereDisplay <delegate_node> <position> <radius> <color>

This function will draw a sphere at the position <position>, with a radius of size <radius>, and a color of <color>. <position> is a point3 value, radius is a float and <color> is a color value.

delegates.bboxDisplay <delegate_node> <minPosition> <maxPosition> <color>

This function will draw a bounding box specifed by the two extrema points, <minPosition> and <maxPosition>, with the color specified. <minPosition> and <maxPosition> are point3 values and <color> is a color value.

delegates.textDisplay <delegate_node> <position> <color> <string>

This function will draw the text found in the <string> parameter at the position specified at <position>, with the color found in <color>. <position> is a point3 value, <color> is a color value, and <string> is a string value.

delegates.simTransform <delegate> <time>

Returns the delegate’s transformation matrix at the specified time as a Matrix3 value. This method returns valid values during a solve.

NOTE:

During a Solve, the simulation doesn't set the delegate nodes’ position and rotation keys until the simulation stops. As such, accessing the delegate nodes’ position and rotation during the solve will return incorrect results. The position of a delegate during a solve can be accessed via the .simpos property.

Delegates cannot be rendered, so the size of the Delegate object is primarily for use in scene setup and for determining bounding box extents.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods

MAXScript Extensions in character studio


CrowdScatter:

CrowdScatter : ReferenceTarget

Crowd.scatter - superclass: ReferenceTarget; super-superclass:MAXWrapper - 51:0 - classID: #(2055548930, 169758462)

These properties correspond to the Scatter Objects dialog displayed by clicking the Scatter Objects icon in Crowd’s Setup rollout.

Clone Tab Properties

<crowd.scatter>.cloneObject Node Default: Undefined

Object in the scene to be cloned.

<crowd.scatter>.numClones Integer Default: 10

The number of clones to be generated.

<crowd.scatter>.cloneType Integer Default: 0 Alias (0_copy__1_reference__2_instance)

0 - copy

1 - Instance

2 - Reference

Specify how the object is cloned. It can be cloned as a copy, an instance, or a reference.

<crowd.scatter>.cloneHierarchy Boolean Default: True

When true, all objects linked to the selected object are cloned as well, with the hierarchical structure retained intact for each clone.

<crowd.scatter>.cloneControllers Boolean Default: True

Set true to clone an object when calling Scatter All. The object is cloned and then any specified transforms are applied to the clones.

Position Tab Properties

<crowd.scatter>.positionSpace Integer Default: 0 Alias 0_Grid__1_Box___2_Sphere__3_Surface

0 - On Grid

1 - Inside Box

2 - Inside Sphere

3 - On Surface

4 - In Radial Area

Choose position object before selecting the reference object. On Grid distributes the clones over the surface of a grid object. Inside Box and Inside Sphere distribute the clones within the volume of a primitive box or sphere object, respectively.

<crowd.scatter>.positionObject Node Default: Undefined Alias: Grid_Box_Sphere_Surface

An object in the scene to be used as a reference object.

NOTE:

You can use only a primitive sphere, a primitive box, or a grid helper object as a reference object. A primitive sphere or box that has been converted to a editable mesh object can't be used as a reference object.

<Crowd.scatter>.surfaceOffset Float Default: 0.0

On Surface specifies a consistent distance above the surface using surface normals for distribution. Available only when .positionSpace is set to On Surface.

<Crowd.scatter>.centerX Float Default: 0.0

Specifies the X value for the center of the distribution in world coordinates.

<Crowd.scatter>.centerY Float Default: 0.0

Specifies the Y value for the center of the distribution in world coordinates.

<Crowd.scatter>.centerZ Float Default: 0.0

Specifies the Z value for the center of the distribution in world coordinates.

<Crowd.scatter>.radius Float Default: 10.0

Specifies the maximum distance from the center within which clones are to be positioned.

<Crowd.scatter>.XYPlane Boolean Default: False

Specifies that clones are to be distributed on the world XY plane only, resulting in a disc-like array.

<crowd.scatter>.childBbox Boolean Default: True Alias: Include_childrens__bounding_boxes_in_spacing_calculations

When true, all of a hierarchical object's sub-objects are considered when determining spacing. When false, only the selected object is considered.

<crowd.scatter>.spacing Float Default: 1.0 Alias: Bounding_Box_Multiplier_for_Position_Spacing

Specifies the minimum distance between cloned objects. The Spacing setting is multiplied by the size of the object's bounding sphere to determine how close objects can get. If Spacing is left at 1.0, the default, objects normally cannot be positioned within each others' bounding spheres. If Spacing is set to 2.0, objects are separated by a distance equal to or greater than the size of the bounding sphere.

<crowd.scatter>.positionSeed Integer Default: 0

Specifies a seed value for randomizing the clones' locations. If a scene has more than one crowd, each should use a different seed to avoid having identical configurations.

<Crowd.scatter>.IncPositionSeed Boolean Default: False

When true and crowds.genlocations is called, add 1 to the .positionSeed value, and redistributes the objects using the new random seed.

Rotation Tab Properties

<Crowd.scatter>.forwardAxisSign Boolean Default: True

If true, the forward axis is in the positive direction. If false the forward axis is in the negative direction.

<crowd.scatter>.forwardAxis Integer Default: 1

0 - X

1 - Y

2 - Z

Specifies which axis of the cloned objects points forward, for use with the Look At Target option.

<crowd.scatter>.UpAxisSign Boolean Default: True

If true the up axis is in the positive direction. If false the up axis is in the negative direction.

<crowd.scatter>.UpAxis Integer Default: 2

0 - X

1 - Y

2 - Z

Axis of the cloned objects points upward; this axis is aligned with the world Z axis.

NOTE:

You cannot specify the same axis as Local Forward and Local Up simultaneously. If you choose an axis for one that's already chosen for the other, the software switches the other to a different axis.

<crowd.scatter>.lookFrom Integer Default: 0

0 - Look From Self

1 - Look From Selected Object

Determines the direction from which the clones look. By default, each clone looks from its own position (Self), so that when several clones are looking at a single target, each is oriented differently. To orient each clone so that it's parallel to an imaginary line between two objects (the "from" object and the "to" object), choose Selected Object and specify the object with the (None) button.

<crowd.scatter>.lookFromObject Node Default: Undefined

An object from which the clones are to look if lookFrom = 1.

<crowds.scatter>.LookTowards Integer Default: 0

0 - Look Toward Self

1 - Look Toward Selected Object

Determines the direction toward which the scatter objects look. By default, each object retains its current orientation.

<crowd.scatter>.lookAtTarget Node Default: Undefined

An object toward which the clones are to look.

<crowd.scatter>.sideDeviation Float Default: 0.0

Sets a maximum deviation angle in degrees for the clones' sideways orientation. If clones should look in an object's general direction but may look at a spot to either side of the target, use Sideways Deviation to set the maximum amount by which they can deviate from the calculated angle. The actual deviation amount for each clone is calculated at random, based on the Deviation settings and the Rand Seed setting. Range=0.0 to 180.0.

<crowd.scatter>.upDownDeviation Float Default: 0.0

Sets a maximum deviation angle in degrees for the clones' up/down orientation. If clones should look in an object's general direction but may look at a spot above or below the target, use Up/Down Deviation to set the maximum amount by which they can deviate from the calculated angle. The actual deviation amount for each clone is calculated at random, based on the Deviation settings and the Rand Seed setting. Range=0.0 to 180.0.

<crowd.scatter>.rotationSeed Integer Default: 0

Specifies a seed value for randomizing the clones' orientations, based on the Deviation settings. If a scene has more than one crowd, each should use a different seed to avoid having identical configurations.

<Crowd.scatter>.IncRotationSeed Boolean Default: False

When true and crowds. genrotations is called, add 1 to the .rotationSeed value, and redistributes the objects using the new random seed.

Scale Tab Properties

Contains options for scaling object clones. For each scaling axis you can specify alternative forward and up axes, plus a target object toward which the clones will point. In addition, you can specify a source object; when using both source and target objects, the clones are rotated so they're parallel to the line between the two.

<crowd.scatter>.xScale Float Default: 1.0

Sets scaling on the X axis as a multiplier.

<crowd.scatter>.xScaleDeviation Float Default: 0.0

Sets the maximum factor for randomization of scaling. For each clone, Deviation is multiplied by a random number between 0.0 and 1.0, and then added to the Scale multiplier.

<crowd.scatter>.matchXtoYscale Boolean Default: False

Lets you use the same scaling as on the Y axis, whether explicit or randomized. When you specify an axis, the parameters group for that axis becomes unavailable.

<crowd.scatter>.matchXtoZscale Boolean Default: False

Lets you use the same scaling as on the Z axis, whether explicit or randomized. When you specify an axis, the parameters group for that axis becomes unavailable.

<crowd.scatter>.yScale Float Default: 1.0

Sets scaling on the Y axis as a multiplier.

<crowd.scatter>.yScaleDeviation Float Default: 0.0

Sets the maximum factor for randomization of scaling. For each clone, Deviation is multiplied by a random number between 0.0 and 1.0, and then added to the Scale multiplier.

<crowd.scatter>.matchYtoXscale Boolean Default: False

Lets you use the same scaling as on the X axis, whether explicit or randomized. When you specify an axis, the parameters group for that axis becomes unavailable

<crowd.scatter>.matchYtoZscale Boolean Default: False

Lets you use the same scaling as on the Z axis, whether explicit or randomized. When you specify an axis, the parameters group for that axis becomes unavailable

<crowd.scatter>.zScale Float Default: 1.0

Sets scaling on the Z axis as a multiplier.

<crowd.scatter>.zScaleDeviation Float Default: 0.0

Sets the maximum factor for randomization of scaling. For each clone, Deviation is multiplied by a random number between 0.0 and 1.0, and then added to the Scale multiplier.

<crowd.scatter>.matchZtoXScale Boolean Default: False

Lets you use the same scaling as on the X axis, whether explicit or randomized. When you specify an axis, the parameters group for that axis becomes unavailable.

<crowd.scatter>.matchZtoYScale Boolean Default: False

Lets you use the same scaling as on the Y axis, whether explicit or randomized. When you specify an axis, the parameters group for that axis becomes unavailable.

<crowd.scatter>.scaleSeed Integer Default: 0

Specifies a seed value for randomizing the clones' scales, based on the Deviation settings.

<Crowd.scatter>.IncScaleSeed Boolean Default: False

When true and crowds. genscales is called, add 1 to the .scaleSeed value, and redistributes the objects using the new random seed.

All Ops Tab Properties

<crowd.scatter>.ComputeClones Boolean Default: False

Set true to clone an object when calling Scatter All. The object is cloned, then any specified transforms are applied to the clones.

Turning on Clones makes the Select Objects to Transform button unavailable. The object to clone and cloning parameters must be specified on the with .ComputeClone.

<crowd.scatter>.ComputePositions Boolean Default: False

When true and crowds.scatterall is called, the transforms are applied according to the settings in the Position panel.

<crowd.scatter>.ComputeRotations Boolean Default: False

When true and crowds.scatterall is called, the transforms are applied according to the settings in the Rotation panel.

<crowd.scatter>.ComputeScales Boolean Default: False

When true and crowds.scatterall is called, the transforms are applied according to the settings in the Scale panel.

<Crowd.scatter>.IncPosSeed Boolean Default: False

When true, .ComputePositions is true, and crowds.scatterall is called, add 1 to the .positionSeed value before redistributing the objects using the new random seed.

<Crowd.scatter>.IncRotSeed Boolean Default: False

When true, .ComputeRotations is true, and crowds.scatterall is called, add 1 to the .rotationSeed value before redistributing the objects using the new random seed.

<Crowd.scatter>.IncSclSeed Boolean Default: False

When true, .ComputeScales is true, and crowds.scatterall is called, add 1 to the .scaleSeed value before redistributing the objects using the new random seed.

<crowd.scatter>.ObjectsToScatter ArrayParameter Default: #()

Objects to be affected by calling crowds.scatterall


CrowdAssignment : MAXObject

CrowdAssignment - superclass: ReferenceTarget; super-superclass:MAXWrapper - 6:0 - classID: #(1352022790, 1524464408)

Constructor

CrowdAssignment ...

Properties

<crowdassignment>.team CrowdTeam Default: Undefined -- max object

A named group of delegates.

<crowdassignment>.delegate Node Default: Undefined -- node

A delegate object. See CrowdDelegate : Helper .

<crowdassignment>.behavior MAXObject Default: Undefined -- max object

One of the Crowd Behavior classes.

<crowdassignment>.cogcontrol CogControl Default: Undefined -- max object; CognitiveController

A cognitive controller. See CogControl:MAXObject for more details.

<crowdassignment>.weight Float Default: 1.0 -- animatable; float

The relative effect of the assigned behavior or cognitive controller. The higher an assignment's weight setting is than others', the more effect it will have. This setting is animatable. Range=0.0 to 1.0.

<crowdassignment>.active Boolean Default: true -- animatable; boolean

When true, the assignment is currently in effect. When false, the assignment has no effect. Default=true.

NOTES:

  • Normally either the team or the delegate property will contain a value of undefined. If both properties contain a value other than undefined, the assigment is applied to the team.

  • Normally either the cogcontrol or the behavior property will contain a value of undefined. If both properties contain a value other than undefined, the behavior will be used.

  • Do not assign a value other than undefined or a CrowdTeam value to the team property.

  • Do not assign a value other than undefined or a Behavior value to the behavior property.

  • Do not assign a value other than undefined or a CogControl value to the cogcontrol property.

  • Do not assign a node type other than a Delegate node to the delegate property.

See also

CrowdTeam : MAXObject

Crowd Behaviors

CogControl : MAXObject

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods

MAXScript Extensions in character studio


CrowdTeam : ReferenceTarget

CrowdTeam - superclass: ReferenceTarget; super-superclass:MAXWrapper - 2:0 - classID: #(1386162085, 308747152)

Constructor

CrowdTeam ...

CrowdGroup ...

Properties

<crowdteam>.name String Default: "CrowdTeam" -- string

The default team name is Team followed by number one more than the last added team.

<crowdteam>.members ArrayParameter Default: #() -- array of Delegate nodes

Participants of the current team.

NOTES:

You can perform the following MAXScript operations:

deleteitem <array> <itemnumber>

<array> = #(item,item...)

<array> = append <array> <item>

on all of the properties containing an ArrayParamater of objects listed below. You can also undo/redo these operations:

<CrowdTeam>.members -- array of Delegate nodes

The following MAXScript operations will cause Crowd to fail, either right away or later:

NEVER set a Members ArrayParameter element to undefined.

NEVER assign a non-Delegate node to the Members ArrayParameter.

See also

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods

MAXScript Extensions in character studio


CrowdState:ReferenceTarget

CrowdState - superclass: ReferenceTarget; super-superclass:MAXWrapper - 4:0 - classID: #(633734037, 2042692069)

Constructor

CrowdState ...

Properties

<crowdstate>.name String Default: "State"

The name of the state.

<crowdstate>.behaviors ArrayParameter Default: #() -- array of behaviors

The names of all behaviors associated with the state.

See Notes below.

<crowdstate>.weights ArrayParameter Default: #() -- array of floats

Specifies the selected behavior's weight. The higher the weight in relation to other behaviors' weights, the more evident the results of the behavior in the state. Default=1.0. Range=0.0 to 1.0.

See Notes below.

<crowdstate>.transitions ArrayParameter Default: #() -- array of CrowdTransition objects

See Notes below.

NOTES:

You can perform the following MAXScript operations:

deleteitem <array> <itemnumber>

<array> = #(item,item...)

<array> = append <array> <item>

on all of the properties containing an ArrayParamater of objects listed below. You can also undo/redo these operations:

<CrowdState>.behaviors -- array of behaviors

<CrowdState>.weights -- array of floats

<CrowdState>.transitions -- array of CrowdTransition objects

If you add or delete elements to the Behaviors ArrayParameter, the corresponding element in the Weights ArrayParameter must be added or deleted.

The following MAXScript operations will cause Crowd to fail, either right away or later:

NEVER set Behavior ArrayParameter element to undefined.

NEVER set a Behavior ArrayParameter element to anything other than an object of the appropriate type.

See also

Crowd Behaviors

CrowdTransition : MAXObject

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods

MAXScript Extensions in character studio


CrowdTransition : MAXObject

CrowdTransition - superclass: ReferenceTarget; super-superclass:MAXWrapper - 8:0 - classID: #(1649620504, 273694790)

Constructor

CrowdTransition ...

Transition ...

Properties

<crowdtransition>.priority Integer Default: 0 -- integer

Sets the transition's priority.

<crowdtransition>.duration Integer Default: 25 -- integer

The number of frames the software takes to affect the transition between states.

<crowdtransition>.easeIn Float Default: 0.5 -- float

Ease in value for the source clip.

<crowdtransition>.easeOut Float Default: 0.5 -- float

Ease out value for the destination clip.

<crowdtransition>.functionName String Default: "transFunc" -- string; Alias: Script_Context_Name

The name of the MAXScript conditional that specifies when/how the transition is to occur.

<crowdtransition>.script String Default: Undefined -- string;

<crowdtransition>.from CrowdState Default: Undefined -- max object; Alias: FromState

The state that the transition originated from.

<crowdtransition>.to CrowdState Default: Undefined -- max object; Alias: ToState

The state that the transition is destined for.

NOTES:

The <CrowdTransition>.functionName value must match the name of the function defined in <CrowdTransition>.script.

The script function is compiled with the function name in global scope. The function name cannot be the same as a MAXScript-defined global variable name.

The <CrowdTransition>.script is of the form:

fn transFunc del trans t =

( if t < 50 then 0 else 1

)

where del is the delegate node, trans is the CrowdTransition value, and t is the time value of the frame being evaluated. The 3ds Max time context will also be frame being evaluated. The return value must be an integer value. If the return value is 0, the transition is not taken. For any other return value, the transition is taken.

The <CrowdTransition>.script is not evaluated for a delegate while the delegate is in transition between states.

<CrowdTeam>.members -- array of Delegate nodes

The following MAXScript operations will cause Crowd to fail, either right away or later:

NEVER set the from or to properties to undefined.

NEVER set the from or to properties to anything other than a CrowdState object.

See also

CrowdState : MAXObject

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods

MAXScript Extensions in character studio


Crowds - Methods

The Crowds structure provides the following methods affecting the character studio Crowd feature:

crowds.solve <crowd_node>

Equivalent to clicking Solve in the crowd’s Solve rollout. .solve starts the solving, based on all other current crowd parameter settings.

crowds.genclones <crowd_node>

Equivalent to clicking Generate Clones in the Scatter Objects dialog, Clone tab, displayed by clicking the Scatter Objects icon. Generates clones based on all other current crowd parameter settings.

crowds.genlocations <crowd_node>

Equivalent to clicking Generate Locations in the Scatter Objects dialog, Position tab, displayed by clicking the Scatter Objects icon. Generates locations based on all other current crowd parameter settings.

crowds.genrotations <crowd_node>

Equivalent to clicking Generate Orientations in the Scatter Objects dialog, Rotation tab, displayed by clicking the Scatter Objects icon. Generates rotations based on all other current crowd parameter settings.

crowds.genscales <crowd_node>

Equivalent to clicking Generate Scales in the Scatter Objects dialog, Scale tab, displayed by clicking the Scatter Objects icon. Generates scales based on all other current crowd parameter settings.

crowds.scatterall <crowd_node>

Equivalent to clicking Scatter button in the Scatter Objects dialog, All Ops tab. Scatters objects based on all other current crowd parameter settings.

crowds.alignObjects <crowd_node>

Equivalent to clicking Align Objects with Delegates in the Object / Delegates dialog displayed by clicking the Associate Objects with Delegates icon. Aligns objects based on all other current crowd parameter settings.

crowds.linkObjects <crowd_node>

Equivalent to clicking Link Objects to Delegates in the Object / Delegates dialog displayed by clicking the Associate Objects with Delegates icon. Links objects based on all other current crowd parameter settings.

crowds.assignControllers <crowd_node>

Equivalent to clicking Assign Delegate Controllers to Objects in the Object / Delegates dialog displayed by clicking the Associate Objects with Delegates icon. Assigns controllers based on all other current crowd parameter settings.

crowds.smooth <crowd_node>

Equivalent to clicking OK in the Smoothing dialog displayed by clicking the Smooth Paths button in the Solve rollout. Smooths objects motions based on all other current crowd parameter settings.

crowds.assignGridProximityPriorities <crowd_node>

Equivalent to clicking Proximity to a Grid / Assign in the Priority rollout. Assigns priorities to the delegates specified in <Crowd.priority>.delegates based on their distance from the grid specified in <Crowd.priority>.grid.

crowds.assignObjectProximityPriorities <crowd_node>

Equivalent to clicking Proximity to an Object / Assign in the Priority rollout. Assigns priorities to the delegates specified in <Crowd.priority>.delegates based on their distance from the object specified in <Crowd.priority>.object.

crowds.assignRandomPriorities <crowd_node>

Equivalent to clicking Assign Random Priorities in the Priority rollout. Assigns random priorities to the delegates specified in <Crowd.priority>.delegates.

crowds.assignUniquePriorities <crowd_node>

Equivalent to clicking Make Priorities Unique in the Priority rollout. Ensures that the priorities of the delegates specified in <Crowd.priority>.delegates are unique. If two delegates share the same priority, one of them will be given a new priority.

crowds.incrementPriorities <crowd_node>

Equivalent to clicking Increment Priorities in the Priority rollout. Increments the priorities of the delegates specified in <Crowd.priority>.delegates by the value in <Crowd.priority>.increment.

NOTES - MAXSCRIPT GROUP:

The MAXScript group of the Solve Rollout has a feature to control the execution of a MAXScript script at each frame.

Use MAXScript: When on, a user-specified script is executed at each frame during the solution. Default=off.

Function Name: The name of the function to be executed. This name must be identical to the one specified in the script.

Edit MAXScript: Click this button to open a MAXScript window for displaying and modifying the script.

The crowd function needs two parameters defined. The 1st parameter passed in is the current crowd and the 2nd parameter passed in is the solve frame.

HERE IS A SIMPLE EXAMPLE

fn g_PerFrameFn current_crowd the_frame_time =

(

if the_frame_time == 1f then

(_g_mydebugwindow = newScript()

format "% %\n" current_crowd the_frame_time to:_g_mydebugwindow

)

)

NOTES:

You can perform the following MAXScript operations:

deleteitem <array> <itemnumber>

<array> = #(item,item...)

<array> = append <array> <item>

on all of the properties containing an ArrayParamater of objects listed below. You can also undo/redo these operations.

<Crowd>.behaviors -- array of Behavior objects

<Crowd>.teams -- array of CrowdTeam objects

<Crowd>.assignments -- array of Assignment objects

<Crowd>.cogcontrols -- array of CognotiveController objects

<Crowd.scatter>.ObjectsToScatter -- node array

<Crowd.objAssoc>.objects -- node array

<Crowd.objAssoc>.delegates -- node array

<Crowd.smooth>.objects -- node array

If you delete a team or a cognitive controller via MAXScript deleteitem $crowd01.teams[1] 1 or deleteitem $crowd01.cogcontrols[1] 1, it may still be referenced by some assignments. Nothing will go wrong, but it's a strange thing to do and one probably should not do it.

The following MAXScript operations will cause Crowd to fail, either right away or later:

NEVER set a Crowd ArrayParameter element to undefined.

NEVER set a Crowd ArrayParameter element to to anything other than an object of the appropriate type.

See also

MAXScript Extensions in character studio


Multiple_Delegates : ReferenceTarget

Multiple_Delegates - superclass: ReferenceTarget; super-superclass:MAXWrapper - 93:0 - classID: #(764544537, 1892711415)

Properties:

<Multiple_Delegates>.active BooleanClass default: true -- boolean

<Multiple_Delegates>.animObjNode UndefinedClass default: undefined -- node; Object_to_Clone

<Multiple_Delegates>.averageSpeed1 Float default: 5.0 -- world units; Average_Speed

<Multiple_Delegates>.averageSpeed2 Float default: 5.0 -- world units; Average_Speed

<Multiple_Delegates>.bankfactor1 Float default: 1.0 -- float; Bank_Angle_Per_Degree_of_Turn

<Multiple_Delegates>.bankfactor2 Float default: 1.0 -- float; Bank_Angle_Per_Degree_of_Turn

<Multiple_Delegates>.bipedAssociationType BooleanClass default: true -- boolean;

<Multiple_Delegates>.bipedAssociationUseBip BooleanClass default: true -- boolean;

<Multiple_Delegates>.bipedDelegates ArrayParameter default: #() -- node array;

<Multiple_Delegates>.bipeds ArrayParameter default: #() -- node array;

<Multiple_Delegates>.declineDecel1 Float default: 0.2 -- float; Decline_Acceleration_Weight

<Multiple_Delegates>.declineDecel2 Float default: 0.2 -- float; Decline_Acceleration_Weight

<Multiple_Delegates>.declineDecelAngle1 Float default: 10.0 -- float; Decline_Acceleration_Angle

<Multiple_Delegates>.declineDecelAngle2 Float default: 10.0 -- float; Decline_Acceleration_Angle

<Multiple_Delegates>.delegates ArrayParameter default: #() -- node array;

<Multiple_Delegates>.editSetting Multiple_Delegate_Settings default: ReferenceTarget:Multiple_Delegate_Settings -- max object; ; SubAnim

<Multiple_Delegates>.inclineDecel1 Float default: 0.2 -- float; Incline_Deceleration_Weight

<Multiple_Delegates>.inclineDecel2 Float default: 0.2 -- float; Incline_Deceleration_Weight

<Multiple_Delegates>.inclineDecelAngle1 Float default: 10.0 -- float; Incline_Deceleration_Angle

<Multiple_Delegates>.inclineDecelAngle2 Float default: 10.0 -- float; Incline_Deceleration_Angle

<Multiple_Delegates>.maxAccel1 Float default: 0.1 -- world units; Maximum_Acceleration

<Multiple_Delegates>.maxAccel2 Float default: 0.1 -- world units; Maximum_Acceleration

<Multiple_Delegates>.maxbank1 Float default: 30.0 -- float; Maximum_Bank_Angle

<Multiple_Delegates>.maxbank2 Float default: 30.0 -- float; Maximum_Bank_Angle

<Multiple_Delegates>.maxbankRate1 Float default: 3.0 -- float; Maximum_Bank_Velocity

<Multiple_Delegates>.maxbankRate2 Float default: 3.0 -- float; Maximum_Bank_Velocity

<Multiple_Delegates>.maxDecline1 Float default: 90.0 -- float; Maximum_Decline

<Multiple_Delegates>.maxDecline2 Float default: 90.0 -- float; Maximum_Decline

<Multiple_Delegates>.maxHeading1 Float default: 30.0 -- float; Maximum_Turn_Velocity

<Multiple_Delegates>.maxHeading2 Float default: 30.0 -- float; Maximum_Turn_Velocity

<Multiple_Delegates>.maxHeadingRate1 Float default: 3.0 -- float; Maximum_Turn_Acceleration

<Multiple_Delegates>.maxHeadingRate2 Float default: 3.0 -- float; Maximum_Turn_Acceleration

<Multiple_Delegates>.maxIncline1 Float default: 90.0 -- float; Maximum_Incline

<Multiple_Delegates>.maxIncline2 Float default: 90.0 -- float; Maximum_Incline

<Multiple_Delegates>.priority1 Integer default: 0 -- integer;

<Multiple_Delegates>.priority2 Integer default: 0 -- integer;

<Multiple_Delegates>.rand1 BooleanClass default: false -- boolean;

<Multiple_Delegates>.rand10 BooleanClass default: false -- boolean;

<Multiple_Delegates>.rand11 BooleanClass default: false -- boolean;

<Multiple_Delegates>.rand12 BooleanClass default: false -- boolean;

<Multiple_Delegates>.rand13 BooleanClass default: false -- boolean;

<Multiple_Delegates>.rand14 BooleanClass default: false -- boolean;

<Multiple_Delegates>.rand15 BooleanClass default: false -- boolean;

<Multiple_Delegates>.rand17 BooleanClass default: false -- boolean;

<Multiple_Delegates>.rand18 BooleanClass default: false -- boolean;

<Multiple_Delegates>.rand2 BooleanClass default: false -- boolean;

<Multiple_Delegates>.rand3 BooleanClass default: false -- boolean;

<Multiple_Delegates>.rand4 BooleanClass default: false -- boolean;

<Multiple_Delegates>.rand5 BooleanClass default: false -- boolean;

<Multiple_Delegates>.rand6 BooleanClass default: false -- boolean;

<Multiple_Delegates>.rand7 BooleanClass default: false -- boolean;

<Multiple_Delegates>.rand8 BooleanClass default: false -- boolean;

<Multiple_Delegates>.rand9 BooleanClass default: false -- boolean;

<Multiple_Delegates>.set1 BooleanClass default: false -- boolean;

<Multiple_Delegates>.set10 BooleanClass default: false -- boolean;

<Multiple_Delegates>.set11 BooleanClass default: false -- boolean;

<Multiple_Delegates>.set12 BooleanClass default: false -- boolean;

<Multiple_Delegates>.set13 BooleanClass default: false -- boolean;

<Multiple_Delegates>.set14 BooleanClass default: false -- boolean;

<Multiple_Delegates>.set15 BooleanClass default: false -- boolean;

<Multiple_Delegates>.set16 BooleanClass default: false -- boolean;

<Multiple_Delegates>.set17 BooleanClass default: false -- boolean;

<Multiple_Delegates>.set18 BooleanClass default: false -- boolean;

<Multiple_Delegates>.set19 BooleanClass default: false -- boolean;

<Multiple_Delegates>.set2 BooleanClass default: false -- boolean;

<Multiple_Delegates>.set20 BooleanClass default: false -- boolean;

<Multiple_Delegates>.set21 BooleanClass default: false -- boolean;

<Multiple_Delegates>.set22 BooleanClass default: false -- boolean;

<Multiple_Delegates>.set24 BooleanClass default: false -- boolean;

<Multiple_Delegates>.set25 BooleanClass default: false -- boolean;

<Multiple_Delegates>.set26 BooleanClass default: false -- boolean;

<Multiple_Delegates>.set3 BooleanClass default: false -- boolean;

<Multiple_Delegates>.set4 BooleanClass default: false -- boolean;

<Multiple_Delegates>.set5 BooleanClass default: false -- boolean;

<Multiple_Delegates>.set6 BooleanClass default: false -- boolean;

<Multiple_Delegates>.set7 BooleanClass default: false -- boolean;

<Multiple_Delegates>.set8 BooleanClass default: false -- boolean;

<Multiple_Delegates>.set9 BooleanClass default: false -- boolean;

<Multiple_Delegates>.settings ArrayParameter default: #(ReferenceTarget:Multiple_Delegate_Settings, ReferenceTarget:Multiple_Delegate_Settings, ReferenceTarget:Multiple_Delegate_Settings, ReferenceTarget:Multiple_Delegate_Settings, ReferenceTarget:Multiple_Delegate_Settings, ReferenceTarget:Multiple_Delegate_Settings, ReferenceTarget:Multiple_Delegate_Settings, ReferenceTarget:Multiple_Delegate_Settings, ReferenceTarget:Multiple_Delegate_Settings, ReferenceTarget:Multiple_Delegate_Settings) -- max object array;

<Multiple_Delegates>.showCogStates BooleanClass default: true -- boolean;

<Multiple_Delegates>.showForces BooleanClass default: true -- boolean; Show_Velocity

<Multiple_Delegates>.showVelocity BooleanClass default: true -- boolean;

<Multiple_Delegates>.startClip Integer default: 0 -- radio button number;

<Multiple_Delegates>.startFrame1 Integer default: 0 -- integer;

<Multiple_Delegates>.startFrame2 Integer default: 0 -- integer;

<Multiple_Delegates>.turnDecel1 Float default: 0.3 -- float; Turn_Deceleration_Weight

<Multiple_Delegates>.turnDecel2 Float default: 0.3 -- float; Turn_Deceleration_Weight

<Multiple_Delegates>.turnDecelAngle1 Float default: 10.0 -- float; Turn_Deceleration_Angle

<Multiple_Delegates>.turnDecelAngle2 Float default: 10.0 -- float; Turn_Deceleration_Angle

<Multiple_Delegates>.useBiped BooleanClass default: false -- boolean;

<Multiple_Delegates>.useHierBbox BooleanClass default: true -- boolean;

<Multiple_Delegates>.velocityColor Color default: (color 0 0 0) -- RGB color; Velocity_Color

<Multiple_Delegates>.xyConstrain BooleanClass default: true -- boolean; Constrain_to_XY_Plane

See also

MAXScript Extensions in character studio


Multiple_Delegate_Settings : ReferenceTarget

Multiple_Delegate_Settings - superclass: ReferenceTarget; super-superclass:MAXWrapper - 89:0 - classID: #(1012550575, 694556875)

Properties:

<Multiple_Delegate_Settings>.active BooleanClass default: true -- boolean

<Multiple_Delegate_Settings>.averageSpeed1 Float default: 5.0 -- world units; Average_Speed

<Multiple_Delegate_Settings>.averageSpeed2 Float default: 5.0 -- world units; Average_Speed

<Multiple_Delegate_Settings>.bankfactor1 Float default: 1.0 -- float; Bank_Angle_Per_Degree_of_Turn

<Multiple_Delegate_Settings>.bankfactor2 Float default: 1.0 -- float; Bank_Angle_Per_Degree_of_Turn

<Multiple_Delegate_Settings>.declineDecel1 Float default: 0.2 -- float; Decline_Acceleration_Weight

<Multiple_Delegate_Settings>.declineDecel2 Float default: 0.2 -- float; Decline_Acceleration_Weight

<Multiple_Delegate_Settings>.declineDecelAngle1 Float default: 10.0 -- float; Decline_Acceleration_Angle

<Multiple_Delegate_Settings>.declineDecelAngle2 Float default: 10.0 -- float; Decline_Acceleration_Angle

<Multiple_Delegate_Settings>.delegates ArrayParameter default: #() -- node array;

<Multiple_Delegate_Settings>.inclineDecel1 Float default: 0.2 -- float; Incline_Deceleration_Weight

<Multiple_Delegate_Settings>.inclineDecel2 Float default: 0.2 -- float; Incline_Deceleration_Weight

<Multiple_Delegate_Settings>.inclineDecelAngle1 Float default: 10.0 -- float; Incline_Deceleration_Angle

<Multiple_Delegate_Settings>.inclineDecelAngle2 Float default: 10.0 -- float; Incline_Deceleration_Angle

<Multiple_Delegate_Settings>.maxAccel1 Float default: 0.1 -- world units; Maximum_Acceleration

<Multiple_Delegate_Settings>.maxAccel2 Float default: 0.1 -- world units; Maximum_Acceleration

<Multiple_Delegate_Settings>.maxbank1 Float default: 30.0 -- float; Maximum_Bank_Angle

<Multiple_Delegate_Settings>.maxbank2 Float default: 30.0 -- float; Maximum_Bank_Angle

<Multiple_Delegate_Settings>.maxbankAccel1 Float default: 3.0 -- float; Maximum_Bank_Velocity

<Multiple_Delegate_Settings>.maxbankAccel2 Float default: 3.0 -- float; Maximum_Bank_Velocity

<Multiple_Delegate_Settings>.maxDecline1 Float default: 90.0 -- float; Maximum_Decline

<Multiple_Delegate_Settings>.maxDecline2 Float default: 90.0 -- float; Maximum_Decline

<Multiple_Delegate_Settings>.maxIncline1 Float default: 90.0 -- float; Maximum_Incline

<Multiple_Delegate_Settings>.maxIncline2 Float default: 90.0 -- float; Maximum_Incline

<Multiple_Delegate_Settings>.maxturn1 Float default: 30.0 -- float; Maximum_Turn_Velocity

<Multiple_Delegate_Settings>.maxturn2 Float default: 30.0 -- float; Maximum_Turn_Velocity

<Multiple_Delegate_Settings>.maxturnAccel1 Float default: 3.0 -- float; Maximum_Turn_Acceleration

<Multiple_Delegate_Settings>.maxturnAccel2 Float default: 3.0 -- float; Maximum_Turn_Acceleration

<Multiple_Delegate_Settings>.name UndefinedClass default: undefined -- string; !error setting value!

<Multiple_Delegate_Settings>.priority1 Integer default: 0 -- integer;

<Multiple_Delegate_Settings>.priority2 Integer default: 0 -- integer;

<Multiple_Delegate_Settings>.rand1 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.rand10 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.rand11 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.rand12 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.rand13 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.rand14 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.rand15 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.rand16 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.rand17 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.rand18 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.rand2 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.rand3 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.rand4 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.rand5 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.rand6 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.rand7 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.rand8 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.rand9 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.set1 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.set10 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.set11 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.set12 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.set13 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.set14 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.set15 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.set16 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.set17 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.set18 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.set19 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.set2 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.set20 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.set21 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.set22 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.set23 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.set24 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.set25 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.set26 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.set3 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.set4 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.set5 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.set6 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.set7 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.set8 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.set9 BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.showCogStates BooleanClass default: true -- boolean;

<Multiple_Delegate_Settings>.showForces BooleanClass default: true -- boolean; Show_Velocity

<Multiple_Delegate_Settings>.showVelocity BooleanClass default: true -- boolean;

<Multiple_Delegate_Settings>.startClip Integer default: 0 -- radio button number;

<Multiple_Delegate_Settings>.startFrame1 Integer default: 0 -- integer;

<Multiple_Delegate_Settings>.startFrame2 Integer default: 0 -- integer;

<Multiple_Delegate_Settings>.turnDecel1 Float default: 0.3 -- float; Turn_Deceleration_Weight

<Multiple_Delegate_Settings>.turnDecel2 Float default: 0.3 -- float; Turn_Deceleration_Weight

<Multiple_Delegate_Settings>.turnDecelAngle1 Float default: 10.0 -- float; Turn_Deceleration_Angle

<Multiple_Delegate_Settings>.turnDecelAngle2 Float default: 10.0 -- float; Turn_Deceleration_Angle

<Multiple_Delegate_Settings>.useBiped BooleanClass default: false -- boolean;

<Multiple_Delegate_Settings>.useHierBbox BooleanClass default: true -- boolean;

<Multiple_Delegate_Settings>.velocityColor Color default: (color 0 0 0) -- RGB color; Velocity_Color

<Multiple_Delegate_Settings>.xyConstrain BooleanClass default: true -- boolean; Constrain_to_XY_Plane

See also

MAXScript Extensions in character studio


ObjAssoc : ReferenceTarget

ObjAssoc - superclass: ReferenceTarget; super-superclass:MAXWrapper - 3:0 - classID: #(2111455970, 614598863)

Properties:

<ObjAssoc>.alignScale BooleanClass default: true -- boolean; Align_Scale

<ObjAssoc>.delegates ArrayParameter default: #() -- node array

<ObjAssoc>.objects ArrayParameter default: #() -- node array

See also

MAXScript Extensions in character studio


Priority : ReferenceTarget

Priority - superclass: ReferenceTarget; super-superclass:MAXWrapper - 7:0 - classID: #(168505779, 1998661906)

Properties:

<Priority>.delegates ArrayParameter default: #() -- node array

<Priority>.grid UndefinedClass default: undefined -- node; Read-only

<Priority>.increment Integer default: 0 -- integer

<Priority>.object UndefinedClass default: undefined -- node

<Priority>.showPriorities BooleanClass default: false -- boolean; Show_Priorities

<Priority>.showStartFrames BooleanClass default: false -- boolean; Show_Start_Frames

<Priority>.start Integer default: 0 -- integer; Start_Priority

See also

MAXScript Extensions in character studio


Crowd Behaviors

Avoid_Behavior : MAXObject

CogControl : MAXObject

Orientation_Behavior : MAXObject

Path_Follow_Behavior : MAXObject

Repel_Behavior : MAXObject

Scripted_Behavior : MAXObject

Seek_Behavior : MAXObject

Space_Warp_Behavior: MAXObject

Speed_Vary_Behavior : MAXObject

Surface_Arrive_Behavior : MAXObject

Surface_Follow_Behavior : MAXObject

Wall_Repel_Behavior : MAXObject

Wall_Seek_Behavior : MAXObject

Wander_Behavior : MAXObject

See also

MAXScript Extensions in character studio


Avoid_Behavior : MAXObject

Avoid_Behavior - superclass: ReferenceTarget; super-superclass:MAXWrapper - 18:0 - classID: #(1071803969, 1253206116)

Constructor

Avoid_Behavior ...

AvoidBehavior ...

Properties

<Avoid_Behavior>.brakePressure Float default: 2.0 -- animatable; float; Brake_Pressure

Determines how strongly the brakes are applied. Higher values induce more gradual and slower stops, but may cause brakes to "pump" in order to slow down.

<Avoid_Behavior>.detourAngle Float default: 360.0 -- animatable; float; Detour_Angle

Maximum necessary turning angle relative to the direction of delegate's goal that the delegate will steer to avoid rather than slow down and wait.

<Avoid_Behavior>.displayForce BooleanClass default: true -- boolean; Display_Force

When true, force exerted on the delegate(s) by the Avoid behavior is drawn in the viewports as a vector during the simulation solution.

<Avoid_Behavior>.forceColor Color default: (color 255 0 0) -- RGB color; Force_Color

Sets the color used to draw the Avoid force vector during the solution.

<Avoid_Behavior>.hardRadius Float default: 1.0 -- animatable; float; Hard_Radius

Distance from center of the delegate(s), where no penetration should occur.

<Avoid_Behavior>.lookAhead Integer default: 30 -- animatable; integer; Look_Ahead

The number of frames in advance of the current frame that the software looks for potential collisions.

<Avoid_Behavior>.name String default: "Avoid" -- string

The name of the behavior.

<Avoid_Behavior>.obstacles ArrayParameter default: #() -- node array; SubAnim

Any object or objects that the delegates must keep away from. See Notes below.

<Avoid_Behavior>.repelFalloff Float default: 3.0 -- animatable; float; Repel_Falloff

Higher values cause the repel to fall off to zero more rapidly with distance, thus focusing its effect closer to the delegate's hard radius.

<Avoid_Behavior>.repelRadius Float default: 3.0 -- animatable; float; Repel_Radius

Distance from hard radius of delegate where "repel" avoidance is sensed and carried out.

<Avoid_Behavior>.repelStrength Float default: 0.2 -- animatable; float; Repel_Strength

Determines the strength of the repelling force; higher values result in greater repulsion force.

<Avoid_Behavior>.showHardRadius BooleanClass default: false -- boolean; Show_Hard_Radius

Enables display of a wireframe sphere that depicts the extent of the .hardRadius setting.

<Avoid_Behavior>.showLookAhead BooleanClass default: false -- boolean; Show_Look_Ahead

When true, displays a sphere that shows the current distance used to check for potential collisions.

<Avoid_Behavior>.showPotentialCols BooleanClass default: false -- boolean; Show_Potential_Collisions

When true, displays a green line from the delegate to the location of a potential collision.

<Avoid_Behavior>.showRepelActivity BooleanClass default: false -- boolean; Show_Repel_Activity

When true, displays a white line between the delegate and target when the repel force is in effect.

<Avoid_Behavior>.showRepelRadius BooleanClass default: false -- boolean; Show_Repel_Radius

When true, displays a wireframe sphere that depicts the extent of the .repelRadius setting.

<Avoid_Behavior>.vfieldFalloff Float default: 8.0 -- animatable; float; Vector_Field_Falloff

Higher values cause vector field influence to fall off to zero more rapidly with distance, thus focusing its effect closer to the delegate's hard radius.

<Avoid_Behavior>.vfieldStrength Float default: 1.0 -- animatable; float; Vector_Field_Avoid_Strength

Higher values result in more severe influence. Delegates will be directed to move perpendicular to the field.

NOTES:

You can perform the following MAXScript operations:

deleteitem <array> <itemnumber>

<array> = #(item,item...)

<array> = append <array> <item>

on all of the properties containing an ArrayParamater of objects listed below. You can also undo/redo these operations.

<Avoid_Behavior>.obstacles

The following MAXScript operations will cause Crowd to fail, either right away or later:

NEVER set a Crowd/Behavior ArrayParameter element to undefined.

See also

Crowd : Helper

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods

MAXScript Extensions in character studio


CogControl : MAXObject

CogControl : ReferenceTarget

CogControl - superclass: ReferenceTarget; super-superclass:MAXWrapper - 3:0 - classID: #(852508842, 872572021)

Constructor

CogControl ...

Properties

<cogcontrol>.name String Default: "CognitiveControl" --string

The name of the state diagram.

<cogcontrol>.startState CrowdState Default: Undefined -- max object; Start_State

Set the starting CrowdState . By default the state that executes first in a cognitive controller is the one that was added first.

<cogcontrol>.states ArrayParameter Default: #() -- max object array

All of the states used by this cognitive controller.

NOTES:

You can perform the following MAXScript operations:

deleteitem <array> <itemnumber>

<array> = #(item,item...)

<array> = append <array> <item>

on all of the properties containing an ArrayParamater of objects listed below. You can also undo/redo these operations.

<CogControl>.states -- array of CrowdState objects

If you delete a CrowdState (deleteitem $crowd01.cogcontrols[1].states 1), it may still be referenced by either the startState or by a CrowdTransition stored in another CrowdState.

The following MAXScript operations will cause Crowd to fail, either right away or later:

NEVER set a States ArrayParameter element or the startState to undefined.

NEVER set a States ArrayParameter element or the startState to anything other than a CrowdState.

See also

CrowdState:MAXObject

CrowdAssignment : MAXObject

CrowdTeam : MAXObject

CogControl : MAXObject

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods

MAXScript Extensions in character studio


Orientation_Behavior : MAXObject

Orientation_Behavior - superclass: ReferenceTarget; super-superclass:MAXWrapper - 14:0 - classID: #(592018700, 1890584360)

Constructor

Orientation_Behavior ...

OrientationBehavior ...

Properties

<orientation_behavior>.name String Default: "Orientation"

<Orientation_Behavior>.headingRelative Boolean Default: False

<orientation_behavior>.minheading Float Default: -180.0 Alias: HeadingMin - animatable

The minimum permissible heading. This number should be lower than the Min Heading value. Range=-180 to 180.

<orientation_behavior>.maxheading Float Default: 180.0 -HeadingMax - animatable

The maximum permissible heading. This number should be higher than the Min Heading value. Range=-180 to 180.

<orientation_behavior>.maxHeadingVel Float Default: 180.0 Alias: maxHeadingVelocity - animatable

Specifies how much the delegate's heading can change per frame. This controls angular acceleration and deceleration.

<orientation_behavior>.headingresponse Float Default: 1.0 - animatable

Determines how quickly the heading follows the direction the object is moving in. A value of 1.0 indicates maximum responsiveness, and will point in the direction the delegate is moving while a lower value means that it is less responsive. Range=0 to 1.

<orientation_behavior>.minpitch Float Default: -180.0 Alias: PitchMin - animatable

The minimum number of degrees a delegate can incline or decline. This number should be lower than the Max Pitch value. Range=-180 to 180.

<orientation_behavior>.maxpitch Float Default: 180.0 Alias: PitchMax - animatable

The maximum number of degrees a delegate can incline or decline. This number should be higher than the Min Pitch value. Range=-180 to 180.

<orientation_behavior>.maxpitchVel Float Default: 1.0 Alias: maxPitchVelocity - animatable

Specifies how much the delegate's pitch can change per frame. This controls angular acceleration and deceleration.

<orientation_behavior>.pitchresponse Float Default: 1.0 - animatable

Determines how quickly the pitch follows the direction the object is moving in. A value of 1.0 indicates maximum responsiveness while a lower value means that it is less responsive. Range=0 to 1.

<orientation_behavior>.maxbank Float Default: 30.0 - animatable

The maximum number of degrees the delegate can bank.

<orientation_behavior>.maxbankAccel Float Default: 3.0 Alias: MaxBank_Change - animatable

The maximum number of degrees the delegate's bank angle can change per frame. This controls angular acceleration and deceleration.

<orientation_behavior>.bankPerTurn Float Default: 1.0 - animatable

The number of degrees the delegate will bank as a function of the turn angle at the current frame. For example, if Bank per Turn=1, the delegate will bank one degree for every degree it is turning at a given frame.

NOTES:

If this behavior is active, it controls the orientation of the delegate by allowing the animator to specify limits and responsiveness on the pitch and heading of the object.

The animator can limit the min and max values, the rate, and can also set a 'response' value which controls how quickly the pitch or heading follows the direction the object is moving in. A value of 1.0 means it's responsive, and will point in the direction the delegate is moving (within the limits), while a lower value means that it is less responsive. It also calculates the roll, which is done using the same parameters that the default behavior does.

See also

Crowd : Helper

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods

MAXScript Extensions in character studio


Path_Follow_Behavior : MAXObject

Path_Follow_Behavior - superclass: ReferenceTarget; super-superclass:MAXWrapper - 14:0 - classID: #(1057384567, 1223371753)

Constructor

Path_Follow_Behavior ...

PathFollowBehavior ...

Properties

<path_follow_behavior>.name String Default: "Path Follow"

<path_follow_behavior>.path Node Default: Undefined

A path object. Suitable path objects include splines and NURBS curves. If a path object contains more than one spline or curve, character studio uses the lowest-numbered element (usually the earliest created one).

<path_follow_behavior>.radius Float Default: 20.0 Alias: Radius_about_Path -- animatable

The radial distance from the path within which the delegate stays while traversing the path. Range=0.0 to 99,999.0.

<path_follow_behavior>.awareness Float Default: 0.5 -- animatable

Specifies how "intelligent" the delegate is while traversing this path. A high Awareness setting means that it takes into account the curve of the path while moving and will try to anticipate changes. A low value for Awareness, on the other hand, means that the delegate notices the path only when leaving it. Range=0.0 to 1.0.

Note: You can randomize awareness behavior with the Deviation and Seed settings.

<path_follow_behavior>.awareDeviation Float Default: 0.0 Alias: AwarenessDeviation -- animatable

Specifies the maximum amount by which Awareness should vary. character studio takes a random number between the negative and positive values of the Deviation setting, multiplies it by the Awareness setting, and adds the result to Awareness. Range=0.0 to 1.0.

Note: You can vary behaviors among different Path Follow behaviors that use the same Awareness and Deviation settings by changing the Seed value.

<path_follow_behavior>.start Integer Default: 0 -- animatable

0 - Path Beginning

1 - Path End

This setting determines where on the path the delegate begins to follow the path.

<path_follow_behavior>.direction Integer Default: 0 -- animatable

0 - Forwards: The delegate moves along path vertices in ascending order.

1 - Backwards: The delegate moves along path vertices in descending order.

<path_follow_behavior>.endAction Integer Default: 0 -- animatable

0 - Loop: The delegate loops around the path, even if it isn't closed. If Beginning of Path or End of Path is chosen, it returns to the path's start or end point each time it finishes traversing the path. If Nearest Point is chosen, it returns to an arbitrary point determined by its position and the path shape.

1 - Reverse: The delegate reverses direction at the end of the path. Use this choice to simulate a back-and-forth "patrol" behavior.

2 - Continue: The delegate continues moving in the same direction it faced at the end of the path until the simulation ends or it's acted upon by another force or behavior.

<path_follow_behavior>.seed Integer Default: 1 -- animatable

Specifies a seed value for randomizing Awareness.

<path_follow_behavior>.forceColor Color Default: (color 0 0 255)

The color used to draw the Path Follow force vector during the solution.

<path_follow_behavior>.displayForce Boolean Default: True

When true, force exerted on the delegate(s) by the Path Follow behavior is drawn in the viewports as a vector during the simulation solution.

<path_follow_behavior>.targetColor Color Default: (color 0 0 127.5)

Sets the color used to draw the target icon.

<path_follow_behavior>.displayTarget Boolean Default: True

Enables display of the target icon, which appears during the solution when a new interim goal is calculated for the delegate.

<path_follow_behavior>.targetScale Float Default: 5.0 -- animatable

The overall size of the target icon.

See also

Crowd : Helper

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods

MAXScript Extensions in character studio


Repel_Behavior : MAXObject

Repel_Behavior : ReferenceTarget

Repel_Behavior - superclass: ReferenceTarget; super-superclass:MAXWrapper - 11:0 - classID: #(2016560612, 1924862305)

Constructor

Repel_Behavior ...

RepelBehavior ...

Properties

<Repel_Behavior>.name String Default: "Repel"

Get/set the name of the behavior.

<Repel_Behavior>.repulsionSources ArrayParameter Default: #() -- node array

See Notes below.

<Repel_Behavior>.targetComp Integer Default: 0

0-Closest Source : Each delegate is repelled by the closest of the assigned sources. Use this to have delegates assigned a single Repel behavior move away from sources in different directions.

1-Average of Sources : All delegates head to a common point determined by averaging all sources' locations.

<Repel_Behavior>.repelMethod Integer Default: 0 -- animatable

0-Angle : Applies a force to the delegate based on the angle between the delegate's current direction and the direction it would need to take in order to be moving directly away from the source. If the behavior's Weight is set to 1, the delegate will be given a force that points directly away from the source. If Weight is set to .5, the force will bisect the angle between its current direction and the direction opposite that of the source.

1-Force : Always applies a force directly away from the source, but at different magnitudes. If the behavior's Weight is 1, the magnitude of the force will be the average speed. If the Weight is .5, the magnitude of the force will be half the average speed.

<Repel_Behavior>.useRadii Boolean Default: True

When true, the behavior applies only to delegates closer to the target than the Outer Distance value.

<Repel_Behavior>.innerRadius Float Default: 0.0 -- animatable

The distance from the target at which the force is applied at full strength.

<Repel_Behavior>.outerRadius Float Default: 10.0 - animatable

The distance from the target at which the force begins to be applied.

<Repel_Behavior>.falloff Float Default: 2.0 -- animatable

<Repel_Behavior>.forceColor Color Default: (color 255 0 255)

The color used to draw the Repel force vector.

<Repel_Behavior>.showRadii Boolean Default: True

When true, the radii are displayed when the force is active.

<Repel_Behavior>.displayForce Boolean Default: True

When true, force exerted on the delegate(s) by the Repel behavior is drawn in the viewports as a vector during the simulation solution. If Use Radii is turned on, the radii are also displayed when the force is active.

NOTES:

You can perform the following MAXScript operations:

deleteitem <array> <itemnumber>

<array> = #(item,item...)

<array> = append <array> <item>

on all of the properties containing an ArrayParamater of objects listed below. You can also undo/redo these operations.

<Repel_Behavior>.repulsionSources

The following MAXScript operations will cause Crowd to fail, either right away or later:

NEVER set a Crowd/Behavior ArrayParameter element to undefined.

See also

Crowd : Helper

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods

MAXScript Extensions in character studio


ScatterReferenceTarget : ReferenceTarget

ScatterReferenceTarget - superclass: ReferenceTarget; super-superclass:MAXWrapper - 51:0 - classID: #(2055548930, 169758462)

Properties:

<ScatterReferenceTarget>.centerX Float default: 0.0 -- float

<ScatterReferenceTarget>.centerY Float default: 0.0 -- float

<ScatterReferenceTarget>.centerZ Float default: 0.0 -- float

<ScatterReferenceTarget>.childBbox BooleanClass default: true -- boolean; Include_childrens__bounding_boxes_in_spacing_calculations

<ScatterReferenceTarget>.cloneControllers BooleanClass default: true -- boolean; Clone_Controllers

<ScatterReferenceTarget>.cloneHierarchy BooleanClass default: true -- boolean; Clone_Hierarchy

<ScatterReferenceTarget>.cloneObject UndefinedClass default: undefined -- node; Object_to_Clone

<ScatterReferenceTarget>.cloneType Integer default: 0 -- radio button number; 0_copy__1_reference__2_instance

<ScatterReferenceTarget>.ComputeClones BooleanClass default: false -- boolean; Compute_Clones

<ScatterReferenceTarget>.ComputePositions BooleanClass default: false -- boolean; Compute_Positions

<ScatterReferenceTarget>.ComputeRotations BooleanClass default: false -- boolean; Compute_Rotations

<ScatterReferenceTarget>.ComputeScales BooleanClass default: false -- boolean; Compute_Scales

<ScatterReferenceTarget>.forwardAxis Integer default: 1 -- radio button number; 0_X__1_Y__2_Z

<ScatterReferenceTarget>.forwardAxisSign BooleanClass default: true -- boolean; 0_Minus__1_Plus

<ScatterReferenceTarget>.incPositionSeed BooleanClass default: true -- boolean; Increment_Position_Random_Seed

<ScatterReferenceTarget>.IncPosSeed BooleanClass default: false -- boolean; for_ScatterAll_operation

<ScatterReferenceTarget>.incRotationSeed BooleanClass default: true -- boolean; Increment_Rotation_Random_Seed

<ScatterReferenceTarget>.IncRotSeed BooleanClass default: false -- boolean; for_ScatterAll_operation

<ScatterReferenceTarget>.incScaleSeed BooleanClass default: true -- boolean; Increment_Scale_Random_Seed

<ScatterReferenceTarget>.IncSclSeed BooleanClass default: false -- boolean; for_ScatterAll_operation

<ScatterReferenceTarget>.lookAtTarget UndefinedClass default: undefined -- node; Look_At_Target

<ScatterReferenceTarget>.lookFrom Integer default: 0 -- radio button number; 0_Self__1_Selected_Object

<ScatterReferenceTarget>.lookFromObject UndefinedClass default: undefined -- node; Look_From_Object

<ScatterReferenceTarget>.lookTowards Integer default: 0 -- radio button number; 0_Self__1_Selected_Object

<ScatterReferenceTarget>.matchXtoYscale BooleanClass default: false -- boolean; X_Scale_same_as_Y_Scale

<ScatterReferenceTarget>.matchXtoZscale BooleanClass default: false -- boolean; X_Scale_same_as_Z_Scale

<ScatterReferenceTarget>.matchYtoXscale BooleanClass default: false -- boolean; Y_Scale_same_as_X_Scale

<ScatterReferenceTarget>.matchYtoZscale BooleanClass default: false -- boolean; Y_Scale_same_as_Z_Scale

<ScatterReferenceTarget>.matchZtoXScale BooleanClass default: false -- boolean; Z_Scale_same_as_X_Scale

<ScatterReferenceTarget>.matchZtoYScale BooleanClass default: false -- boolean; Z_Scale_same_as_Y_Scale

<ScatterReferenceTarget>.numClones Integer default: 10 -- integer; How_Many_to_Clone

<ScatterReferenceTarget>.ObjectsToScatter ArrayParameter default: #() -- node array; Object_to_Scatter

<ScatterReferenceTarget>.positionObject UndefinedClass default: undefined -- node; Grid_Box_Sphere_Surface

<ScatterReferenceTarget>.positionSeed Integer default: 0 -- integer; Position_Random_Seed

<ScatterReferenceTarget>.positionSpace Integer default: 0 -- radio button number; 0_Grid__1_Box___2_Sphere__3_Surface_4_Radial_Area

<ScatterReferenceTarget>.radius Float default: 10.0 -- float

<ScatterReferenceTarget>.rotationSeed Integer default: 0 -- integer; Rotation_Random_Seed

<ScatterReferenceTarget>.scaleSeed Integer default: 0 -- integer; Scale_Random_Seed

<ScatterReferenceTarget>.sideDeviation Float default: 0.0 -- float; Sideways_Deviation

<ScatterReferenceTarget>.spacing Float default: 1.0 -- float; Bounding_Box_Multiplier_for_Position_Spacing

<ScatterReferenceTarget>.surfaceOffset Float default: 0.0 -- float; Surface_Offset

<ScatterReferenceTarget>.UpAxis Integer default: 2 -- radio button number; 0_X__1_Y__2_Z

<ScatterReferenceTarget>.UpAxisSign BooleanClass default: true -- boolean; 0_Minus__1_Plus

<ScatterReferenceTarget>.upDownDeviation Float default: 0.0 -- float; Up_Down_Deviation

<ScatterReferenceTarget>.xScale Float default: 1.0 -- float; X_Scale

<ScatterReferenceTarget>.xScaleDeviation Float default: 0.0 -- float; X_Scale_Deviation

<ScatterReferenceTarget>.xyPlane BooleanClass default: false -- boolean; In_XY_Plane

<ScatterReferenceTarget>.yScale Float default: 1.0 -- float; Y_Scale

<ScatterReferenceTarget>.yScaleDeviation Float default: 0.0 -- float; Y_Scale_Deviation

<ScatterReferenceTarget>.zScale Float default: 1.0 -- float; Z_Scale

<ScatterReferenceTarget>.zScaleDeviation Float default: 0.0 -- float; Z_Scale_Deviation

See also

MAXScript Extensions in character studio


smoothReferenceTarget : ReferenceTarget

smoothReferenceTarget - superclass: ReferenceTarget; super-superclass:MAXWrapper - 13:0 - classID: #(1865571309, 2086017791)

Properties:

<smoothReferenceTarget>.filter BooleanClass default: false -- boolean; Perform_Filtering

<smoothReferenceTarget>.filterDelegates BooleanClass default: true -- boolean; Filter_Delegate_Selection

<smoothReferenceTarget>.from Integer default: 0 -- integer; smooth_from_frame

<smoothReferenceTarget>.futurekeys Integer default: 2 -- integer; Future_Keys

<smoothReferenceTarget>.n Integer default: 2 -- integer; Keep_every_Nth_frame

<smoothReferenceTarget>.objects ArrayParameter default: #() -- node array; Objects_to_Smooth

<smoothReferenceTarget>.pastkeys Integer default: 2 -- integer; Past_Keys

<smoothReferenceTarget>.positions BooleanClass default: true -- boolean; Smooth_positions

<smoothReferenceTarget>.reduce BooleanClass default: true -- boolean; Perform_Key_Reduction

<smoothReferenceTarget>.rotations BooleanClass default: false -- boolean; Smooth_rotations

<smoothReferenceTarget>.smoothness Integer default: 4 -- integer

<smoothReferenceTarget>.to Integer default: 0 -- integer; smooth_to_frame

<smoothReferenceTarget>.wholeAnim Integer default: 0 -- radio button number; 0_whole_animation__1_Animation_Segment

See also

MAXScript Extensions in character studio


Scripted_Behavior : MAXObject

Scripted_Behavior - superclass: ReferenceTarget; super-superclass:MAXWrapper - 4:0 - classID: #(716798510, 1784546452)

Introduction to the Crowd System

The crowd system works by assembling all of the force vectors and speeds for a delegate from its active force behaviors. Then based upon the delegate’s motion parameters, these force vectors and speeds are averaged and integrated to create a velocity for the delegate. This velocity may then be modified if the delegate has an active constraint behavior or if it has an active default Avoidance behavior.

After the velocity is set, if there is an active orientation behavior, it is used to set the orientation of the delegate, otherwise the orientation is calculated from the default delegate parameters. Finally, the velocity is integrated and a new position is calculated.

The new position of the delegate isn't set until after all of the forces are calculated for all of the behaviors.

For a biped crowd, bipeds work off of goals and not forces when determining which direction they should go in. So, in order to create a force behavior that will work with a Biped, a goal position must be specified. No forces need to be integrated into velocities because the movement of the Biped isn’t based upon calculating velocities but rather by selecting clips found in the motion flow graph.

Constructor

Scripted_Behavior ...

ScriptedBehavior ...

Properties

<scripted_behavior>.name String Default: "Scripted"

<Scripted_Behavior>.scriptContextName String Default: "apply" Alias: Script_Context_Name

The script functions declared in the Edit MaxScript window are declared in a hidden MaxScript context. This textbox specifies the name of the context. Giving a unique name here avoids conflicts between different scripted behaviors.

<Scripted_Behavior>.type Integer Default: 0 Alias: Behavior_Type

One of three behavior types: Force, Constraint, or Orientation.

Force: Behaviors of this type force the delegates to move in a particular direction, for example, Seek and Repel. Force behaviors work by returning a force vector in the direction that the behavior want’s the delegate to go in, and in some cases the speed it should be traveling at and the goal at which it is trying to reach.

Constraint: Behaviors of this type restrict the position and velocity of a delegate, for example, SurfaceFollow. Constraint behaviors set the velocity and sometimes may even change the delegate’s position, in order to meet the constraint. You may only have one active constraint behavior per delegate per frame.

Orientation: Behaviors of this type affect only the orientation of the delegates, for example Orientation. These behaviors don’t work with forces but instead return an orientation that the delegate should be at, represented by a quaternion. Any active orientation behavior will override the default orientation of the delegate. The velocity determines the default orientation. Like a constraint behavior, you may only have one active orientation behavior per delegate per frame.

NOTE:

Though there are no avoid behavior types, a force or constraint behavior may be used to create an avoidance behavior.

We do recommend though that the default Avoidance behavior be used due to the fact that it is well integrated into the crowd solution pipeline.

<scripted_behavior>.script : string

Edit MaxScript

This button "Edit MaxScript", in the Scripted Behavior Rollout, opens a MAXScript editor window that can be used to enter a scripted behavior script. The editor window is similar to other MaxScript editor window but is slightly customized for scripted behaviors.

The following elements in the File Menu work differently

New: disabled since only one editor per scripted behavior can be open at any time

Open: opens a file in the existing editor window. Any existing text will be lost.

Evaluate: evaluates the script and saves it into the behavior's paramblock

Close: saves into the behavior's paramblock and closes the editor if no errors found

Scripted Behavior Syntax

The scripted behavior script is implemented by defining a set of event handlers that get called by the crowd system when solving the simulation. The event handlers are automatically enclosed into a hidden MAXScript context. The name of the context is taken from the dialog’s Script Context Name text box or its equivalent .scriptContextName.

Event Handlers for Scripted Behaviors

on execute do <expr>

Called whenever the script is evaluated. All initializing should be done here.

on setupDelegates <delegates> <behavior> do <expr>

<delegates> an array of all the delegates after they are ordered participating in the simulation. All delegates listed in the Behavior Assignments pane of the Behavior and Team Assignment dialog are found in this list.

<behavior> the current behavior

Called before the simulation starts.

NOTE:

All of the delegates are passed in, regardless if they have this behavior assigned, so the behavior knows the max number of delegates that may be used and therefore set up whatever data structures required. Some behaviors need to keep track of parameters on a per delegate basis. This function allows the behavior to set up data structures to get that info. Also that is one of the reasons why the delegate.id is unique, so it can be used to hash or index these data structures. Due to cognitive controllers, you never really know exactly all of the delegates which will be active for a particular behavior.

on display <behavior> <time> do <expr>

<behavior> the current behavior

<time> current time of the simulation

Called every time the crowd system is redrawn. You can use the low level drawing functions from the gw struct, Viewport Drawing Methods , to have a custom display for the behaviors.

NOTE:

This handler gets called a number of times, so the system will slow down if implemented.

on behaviorStarted <delegate> <behavior> <time> do <expr>

<delegate> the delegate node the behavior is assigned to

<behavior> the current behavior

<time> current time of the simulation

Called whenever a behavior becomes active for a particular delegate. This can occur at the beginning of the simulation for an assigned behavior or when a cognitive controller activates the behavior.

on initAtThisTime <behavior> <time>

This function is called for each behavior at the beginning of the frame.

on applyForce <delegate> <behavior> <time> <numSubSamples> <displayHelpers> <weight> do <expr>

If the behavior type is Force or Orientation, this handler is called every frame to move the delegate.

<delegate> the delegate node the behavior is assigned to

<behavior> the current behavior

<time> current time of the simulation

<numSubSamples> is the number of sub samples required per frame.

<displayHelpers> this value is true/false depending on the <Crowd>.update and <Crowd>.updateFrequency, as well as the current frame. If it is true, you should display any helper imagery you want using the display functions available from the delegates structure. For instance, most behaviors display their force if this is true, and pathfollow also displays its target. The delegates.lineDisplay ,.sphereDisplay , .bboxDisplay , and .textDisplay are all functions which can be used to draw a graphic primitive for a particular delegate when the crowd simulation is being solved. Please see Viewport Drawing Methods for additional viewport drawing methods.

NOTE:

The graphic window functions gw.* described in Viewport Drawing Methods will not display correctly or at all while in Step Solve.

<weight> this behavior’s weight on the delegate

The event handler should return an array of the following type:

#(<int_flags>, <point3_force>, <point3_goal>, <float_speed>, <Speed_Weight_at_the_Goal>)

<int_flags> sum of any of the following values:

0 - the return value is not used by the crowd system

1 - only force is affected

2 - only goal is affected

4 - only speed is affected

For example, a value of 5, (1+4), indicates that the force and speed are affected.

<point3_force> the force vector . It should be unit normalized and then multiplied by the delegate’s average speed. Modify this value, greater or less, to make the force stronger or weaker.

<point3_goal> the goal position in world space.

<float_speed> the net speed of the delegate. This value should be normalized to the average speed of the delegate. A value of 1.0 means go at the average speed.

<Speed_Weight_at_the_Goal> will represent the
speed that the delegate should be at when it reaches
its goal. This value should be normalized by the average speed of the delegate, so that a value of 1.0 equal it's average speed.

NOTES:

Any behavior that sets the <int_flags> with a speed affected setting should ensure that a valid value is set for <float_speed> and <Speed_Weight_at_the_Goal>. Note that a goal doesn't need to be set
for this to work. This is how the 'SpeedVary' behavior works with Biped. It doesn't explicitly set a goal but still modifies the <Speed_Weight_at_the_Goal> value.

on constraint <delegate> <behavior> <time> <numSubSamples> <displayHelpers> <finalSet> <velocity> <speed> <pos> do <expr>

If the behavior type, <Scripted_Behavior>.type, is Constraint, this handler is called at least once every frame to constrain the delegate. The constraint behavior will override any other force behavior, the Avoidance Behavior, plus it will override any acceleration limits, speed limits etc. So it should be used with caution in a simulation.

The constraint behavior constrains the position that the delegate is moving towards by changing the current position that the delegate is already at, it's current velocity, and it's current speed. These values are combined to get the next position, Next_position = Current_Position +Normalized(vel) * Speed. Changing the current position doesn't actually change where it is at though, it just changes the position that is used to calculate it's new position. This design allows the constraint to make the objects velocity change abruptly and keep its speed, thus conserving the energy of the delegate.

<delegate> the delegate node the behavior is assigned to

<behavior> the current behavior

<time> current time of the simulation

<numSubSamples> is the number of sub samples required per frame.

<displayHelpers> this value is true/false depending on the <Crowd>.update and <Crowd>.updateFrequency, as well as the current frame. If it is true, you should display any helper imagery you want using the display functions available from the delegate. For instance, most behaviors display their force if this is true, and pathfollow also displays its target. The delegates .lineDisplay, .sphereDisplay, .bboxDisplay, and .textDisplay are all functions which can be used to draw a graphic primitive for a particular delegate when the crowd simulation is being solved. Please see Viewport Drawing Methods for additional viewport drawing methods.

<finalSet> whether or not this is the final time this behavior will be called during the current frame.

NOTE:

In order to handle constraints working correctly within the avoidance system the constraint behavior may be called more than once per frame. When the passed in parameter, finalSet, is true, it will be the last time the constraint function is called for that frame.

Currently the constraint behavior's "on constraint" event handler is called twice per frame. The first call occurs before an existing Avoid_Behavior with the passed in parameter finalSet having a value of false. The second call occurs, after the delegate’s limits and Avoid_Behavior are applied with the passed in parameter finalSet having a value of true. This evaluation order is done so that the delegate’s limits and the Avoid_Behavior can affect the changes that the constraint performs. The second call is made to make sure that the constraint is still being met.

One reason to check the state of finalSet is if internally something was cached and you didn't want it to change. For example, the Surface_Follow constraint behavior keeps track of which triangle it's on and the barycentric coordinates of where it's at. The simulation will not change these values until finalSet is true.

<velocity> the current velocity of the delegate at this frame.

<speed> the current speed of the delegate at this frame.

<pos> the current position of the delegate at this frame.

After the last delegate's "on constraint" has executed for the last frame of the simulation, "on setupDelegates delegates behavior do" will be called with an empty array "#() ReferenceTarget:Scripted_Behavior". This is guarenteed and can be used by written constraint behaviors to clear out any internal caches.

The event handler should return an array of the following type:

#(<int_flags>, <point3_velocity>, <point3_pos>, <point3_goal>, <float_speed>)

<int_flags> sum of any of the following values:

0 - the return value is not used by the crowd system

1 - the return value is used by the crowd system

<point3_velocity> the velocity.

<point3_pos> the modified current position that is used to calculate it's new position. In order to meet a constraint this behavior is allowed to modify the current position of a delegate.

<point3_goal> the goal position in world space.

<float_speed> the net speed of the delegate. This value should be normalized to the average speed of the delegate.

on orient <delegate> <behavior> <time> <velocity> do <expr>

If the behavior type, <Scripted_Behavior>.type, is Orientation, this handler is called every frame. This handler is always called in conjunction with the applyForce handler.

<delegate> the delegate node the behavior is assigned to

<behavior> the current behavior

<time> current time of the simulation

<velocity> the current velocity of the delegate at this frame.

The event handler should return an array of the following type:

 #(<int_flags>, quat_orientation)

<int_flags> sum of any of the following values:

0 - the return value is not used by the crowd system

1 - the return value is used by the crowd system

<quat_orientation> the orientation of the delegate in quaternions.

NOTE:

The purpose of passing the crowd delegate and behavior to all of the event handlers is that you can call persisted global, saved with scene, MAXScript functions that work for more than one crowd simulation.

EXAMPLE

The following is a pair of scripted behaviors called "FormationConstraint" and "FormationOrientation".

The "FormationOrientation" will constrain the orientation to a fixed location, in this case based on the current delegate's orientation found at its first rotation keyframe. The entire scripted orientation behavior can be implemented with one event handler:

on orient delegate behavior time vel do

(

#(1,delegate.rotation.keys[1].value as quat )

)

The "FormationConstraint" keeps a team of delegates in a given positional formation while maintaining the pace and direction of a designated leader named "FormationLeader". This is similar to a drum major and a marching band or like football blockers running in front of a running back who may dart in any direction. This person dictates how and where the formation will move. This "FormationLeader" is not using the scripted behavior.

This behavior will affect both the position and orientation of the delegate. The orientation is being calculated by the delegate’s velocity, and the velocity is being set correctly.

on execute do ( print " executed" )

on constraint delegate behavior time numsubsamples displayHelpers finalSet vel speed pos do

(

leader_velocity = delegates.velocity $TheFormationLeader

Normalized_Leader_Velocity = normalize (delegates.velocity $TheFormationLeader)

magVel = speed* Normalized_Leader_Velocity

temp_dis = (pos + leader_velocity) - magVel

the_goal = temp_dis + magVel

 if displayHelpers == true then

 (

delegates.textDisplay delegate the_goal delegate.wirecolor delegate.name

delegates.lineDisplay delegate pos (pos+leader_velocity) delegate.wirecolor true

delegates.sphereDisplay delegate (pos+ (leader_velocity * $Crowd01.vectorScale)) 4 delegate.wirecolor

 )

#(1, Normalized_Leader_Velocity, temp_dis, the_goal, speed)

)

See also

Delegate:Helper

Crowd : Helper

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods

MAXScript Extensions in character studio


Seek_Behavior : MAXObject

Seek_Behavior - superclass: ReferenceTarget; super-superclass:MAXWrapper - 11:0 - classID: #(1058553876, 702153735)

Constructor

Seek_Behavior ...

SeekBehavior ...

Properties

<seek_behavior>.name String Default: "Seek"

Get/Set the name of the behavior.

<seek_behavior>.targets ArrayParameter Default: #() -- node array

See Notes below.

Specify the object or objects as a stationary or moving target for delegates. Delegates move toward the target during the crowd simulation while turning as necessary.

<seek_behavior>.targetComp Integer Default: 0

0 - Closest Source Only: Each delegate seeks the closest of the assigned targets. Use this to have delegates assigned a single Seek behavior move in different directions.

1 - Average of Sources: All delegates head to a common point determined by averaging all targets' locations.

<seek_behavior>.seekMethod Integer Default: 0 -- animatable

0 - Angle: Applies a force to the delegate based on the angle between the delegate's current direction and the direction it would need to take in order to be moving directly towards the goal. If the Weight of the Seek behavior is 1, the delegate will be given a force that points directly towards the goal. If it's .5 it will bisect the angle between its current direction and the direction of the goal.

1 - Force: Applies a force in the direction of the goal always, but at different magnitudes. If the Weight of the Seek behavior is 1, the magnitude of the force will be the average speed. If the Weight of the Seek behavior is .5, the magnitude of the force will be half the average speed.

<seek_behavior>.forceColor Color Default: (color 0 255 0)

The color used to draw the Seek force vector during the solution.

<seek_behavior>.displayForce Boolean Default: True

When true, force exerted on the delegate(s) by the Seek behavior is drawn in the viewports as a vector during the simulation solution.

<Seek_Behavior>.useRadii Boolean Default: False

When true, the Seek behavior applies only to delegates less than the Outer Radius distance from the target.

<Seek_Behavior>.showRadii Boolean Default: True

When true, the radii are displayed when the force is active.

<Seek_Behavior>.innerRadius Float Default: 0.0 -- animatable

The distance from the target at which Seek is applied at full strength.

<Seek_Behavior>.outerRadius Float Default: 10.0 -- animatable

The distance from the target at which Seek begins to be applied.

<Seek_Behavior>.falloff Float Default: 2.0 -- animatable

NOTES:

You can perform the following MAXScript operations:

deleteitem <array> <itemnumber>

<array> = #(item,item...)

<array> = append <array> <item>

on all of the properties containing an ArrayParamater of objects listed below. You can also undo/redo these operations.

<Seek_Behavior>.targets

The following MAXScript operations will cause Crowd to fail, either right away or later:

NEVER set a Crowd/Behavior ArrayParameter element to undefined.

See also

Crowd : Helper

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods

MAXScript Extensions in character studio


Space_Warp_Behavior: MAXObject

Space_Warp_Behavior : ReferenceTarget

Space_Warp_Behavior - superclass: ReferenceTarget; super-superclass:MAXWrapper - 4:0 - classID: #(1332960114, 233661124)

Constructor

Space_Warp_Behavior ...

WSMBehavior ...

Properties

<Space_Warp_Behavior>.name String default: "Space Warp" -- string

Get/Set the name of the behavior.

<Space_Warp_Behavior>.spaceWarp UndefinedClass default: undefined -- node; Space_Warp_Object;

Get/Set the Space Warp object to be used by the behavior.

<Space_Warp_Behavior>.forceColor Color default: (color 255 255 0) -- RGB color; Force_Color

The color used to draw the Space Warp force vector during the solution.

<Space_Warp_Behavior>.displayForce BooleanClass default: true -- boolean; Display_Force

When true, force exerted on the delegate(s) by the Space Warp behavior is drawn in the viewports as a vector during the simulation solution.

See also

Crowd : Helper

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods

MAXScript Extensions in character studio


Speed_Vary_Behavior : MAXObject

Speed_Vary_Behavior - superclass: ReferenceTarget; super-superclass:MAXWrapper - 8:0 - classID: #(208494708, 1851328878)

Constructor

Speed_Vary_Behavior ...

SpeedVaryBehavior ...

Properties

<speed_vary_behavior>.name String Default: "Speed Vary"

Get/set the name of the behavior.

<speed_vary_behavior>.period Integer Default: 10 -- animatable

Specifies how many frames should elapse before a new speed is chosen.

<speed_vary_behavior>.period_deviation Float Default: 0.5 -- animatable; Alias: Period_Deviation

Specifies the maximum amount by which Period should vary. Each time a period ends, character studio takes a random number between the negative and positive values of the Deviation setting, multiplies it by the Period setting, and adds the result to Period. Range=0.0 to 1.0.

<speed_vary_behavior>.center_speed Float Default: 1.0 -- animatable; Alias: Center_Speed

Specifies the speed the delegate should change to. Center is a multiplier: A value of 0.0 means to stop, a value of 1.0 means to move at its average speed, and a value greater than 1.0 means to move faster than its average speed. Range=0.0 to 99,999.0.

<speed_vary_behavior>.speed_deviation Float Default: 0.25 -- animatable; Alias: Speed_Deviation

Specifies the maximum amount by which the delegate's calculated speed (Average Speed*Center) should vary. Each time a period ends, character studio takes a random number between the negative and positive values of the Deviation setting, multiplies it by the calculated speed, and adds the result to the calculated speed. Range=0.0 to 99,999.0.

<speed_vary_behavior>.seed Integer Default: 1 -- animatable; Alias: Speed_Vary_Seed

Specifies a seed value for randomizing the Wander behavior.

<speed_vary_behavior>.accelPeriod Float Default: 0.5 -- animatable; Alias: Acceleration_Period

Specifies the rate at which the delegate's speed should change. An acceleration of 1.0 means that the transition to the new speed will proceed as quickly as possible to its new speed, while a value of 0.0 means the transition will take the entire period. Range=0.0 to 1.0.

<speed_vary_behavior>.accelDeviation Float Default: 0.5 -- animatable; Alias: Acceleration_Deviation

Specifies the maximum amount by which the delegate's calculated speed (Average Speed*Center) should vary. Each time a period ends, character studio takes a random number between the negative and positive values of the Deviation setting, multiplies it by the calculated speed, and adds the result to the calculated speed. Range=0.0 to 99,999.0.

See also

Crowd : Helper

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods

MAXScript Extensions in character studio


Surface_Arrive_Behavior : MAXObject

Surface_Arrive_Behavior : ReferenceTarget

Surface_Arrive_Behavior - superclass: ReferenceTarget; super-superclass:MAXWrapper - 26:0 - classID: #(942174387, 1612215883)

Constructor

Surface_Arrive_Behavior ...

SurfaceArriveBehavior ...

Properties

<Surface_Arrive_Behavior>.name String Default: "Surface Arrive"

Get/set the name of the behavior.

<Surface_Arrive_Behavior>.surfaces ArrayParameter Default: #() -- node array

See Notes below

<Surface_Arrive_Behavior>.disableAfterArriving Boolean Default: True

When true, turns off the Surface Arrive behavior after the delegate arrives at the surface.

<Surface_Arrive_Behavior>.rate Float Default: 0.5 -- animatable

A multiple of the delegate's Max Accel setting that specifies the acceleration with which it will try to arrive. A value of 1.0 uses the full acceleration of the delegate.

<Surface_Arrive_Behavior>.rateDeviation Float Default: 0.0 -- animatable

Adds a variation to the to the rate setting.

<Surface_Arrive_Behavior>.speed Float Default: 0.0 -- animatable

The speed at which to arrive and relative to the speed of the target.

<Surface_Arrive_Behavior>.speedDeviation Float Default: 0.0 -- animatable

Adds a variation to the to the speed setting.

<Surface_Arrive_Behavior>.distance Float Default: 1e+008 -- animatable

The maximum radial distance from the target within which the behavior will be active. Until the delegate is within this radius, the behavior will have no influence.

<Surface_Arrive_Behavior>.distanceDeviation Float Default: 0.0 -- animatable

Adds a variation to the to the distance setting.

<Surface_Arrive_Behavior>.offset Float Default: 0.0 -- animatable

Specifies a consistent distance from the calculated arrival point, based on the surface normal, for the delegate to use.

<Surface_Arrive_Behavior>.facing Boolean Default: False -- animatable

When true, the delegate will try to arrive only at points on triangles on the surface that are facing it.

<Surface_Arrive_Behavior>.random_closest Integer Default: 0

0 - Random: The software chooses a random point on the target surface as the arrival point.

1 - Closest: The software chooses the closest point on the target surface as the arrival point.

<Surface_Arrive_Behavior>.everyFrame Boolean Default: False -- animatable

When true, the software chooses arrival points for delegates at every frame. Available only when Closest is chosen.

<Surface_Arrive_Behavior>.displayOffset Boolean Default: False

When true, shows the Offset distance as lines emanating from each vertex in the surface object, perpendicular to the surface.

<Surface_Arrive_Behavior>.height Float Default: 0.0 -- animatable

Specifies a distance from the arrival point along its face normal. This is the point that the delegate will go to first before descending to the arrival point.

<Surface_Arrive_Behavior>.heightDeviation Float Default: 0.0 -- animatable

Adds random variation to the to the Height setting. See introduction for the formula used to calculate the deviation.

<Surface_Arrive_Behavior>.descentStart Float Default: 0.0 -- animatable

Specifies the distance between the delegate and the arrival point at which the descent should start.

NOTE:

Be careful that Descent Start is set high enough that the delegate won't overshoot when descending because its speed is too high and deceleration too low, compared to when it should start descending.

<Surface_Arrive_Behavior>.descentstartDeviation Float Default: 0.0 -- animatable

Adds a variation to the to the Descent Start setting.

<Surface_Arrive_Behavior>.useNormal Boolean Default: False Alias: Off_This_Normal

When true, use vector specified in the .xNormal, .yNormal, and .zNormal to specify the angle at which the final approach occurs.

<Surface_Arrive_Behavior>.xNormal Float Default: 0.0 -- animatable; Alias: X_Normal

Specify the final approach X value for the vector in world coordinates.

<Surface_Arrive_Behavior>.yNormal Float Default: 0.0 -- animatable; Alias: Y_Normal

Specify the final approach Y value for the vector in world coordinates.

<Surface_Arrive_Behavior>.zNormal Float Default: 1.0 -- animatable; Alias: Z_Normal

Specify the final approach Z value for the vector in world coordinates.

<Surface_Arrive_Behavior>.seed Integer Default: 1 -- animatable

Affects the random numbers used to calculate the Deviation settings.

<Surface_Arrive_Behavior>.targetColor Color Default: (color 0 0 127.5)

The color used to draw the target icon.

<Surface_Arrive_Behavior>.displayTarget Boolean Default: True

When true, displays the target icon which appears during the solution when a new interim goal is calculated for the delegate.

<Surface_Arrive_Behavior>.targetScale Float Default: 5.0 -- animatable

Specifies the overall size of the target icon.

Methods

SurfaceArriveBhvr.Getstate <Surface_Arrive_Behavior> <delegate_node>

Returns an integer value giving the state the delegate is in with respect to the Surface_Arrive_Behavior. A return value of -1 means that the delegate isn't active for that state, 0 means that the delegate is outside the distance radius and so isn't arriving, 1 means that the delegate is in the process of arriving, and 2 means that the delegate has arrived. If 'Disable After Arriving' is TRUE, the delegates will never reach state 2.

The main purpose of this funtion is so that the 'State' of a delegate as it arrives to a surface can be determined from MAXScript. It can be used for both the cognitive controller transitions as well as the script definable in MotionClips. See the ClipState Dialog and the Cognitive Controller topics in the character studio 3 online reference for more details.

Track View > Global Tracks > Block Control > GlobalClip Properties > Synthesis dialog > State Tab > New State > Edit Properties > ClipState dialog

Select a Crowd helper. > Modify panel > Global Clip Controllers rollout > New > Choose GlobalClip object. > Select object in list. > Edit > Synthesis dialog > State Tab > New State > Edit Properties > Clip State dialog

Create panel > Helpers > Object Type rollout > Crowd > Setup rollout > Cognitive Controllers

Select a Crowd object. > Modify panel > Setup rollout > Cognitive Controllers

SurfaceArriveBhvr.getPos <Surface_Arrive_Behavior> <delegate_node>

Returns a Point3 value of the position that the delegate is arriving to at the time the function is called.

NOTES:

You can perform the following MAXScript operations:

deleteitem <array> <itemnumber>

<array> = #(item,item...)

<array> = append <array> <item>

on all of the properties containing an ArrayParamater of objects listed below. You can also undo/redo these operations.

<Surface_Arrive_Behavior>.surfaces

The following MAXScript operations will cause Crowd to fail, either right away or later:

NEVER set a Crowd/Behavior ArrayParameter element to undefined.

See also

Crowd : Helper

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods

MAXScript Extensions in character studio


Surface_Follow_Behavior : MAXObject

Surface_Follow_Behavior : ReferenceTarget

Surface_Follow_Behavior - superclass: ReferenceTarget; super-superclass:MAXWrapper - 11:0 - classID: #(1709052632, 1358959157)

Constructor

Surface_Follow_Behavior ...

SurfaceFollowBehavior ...

Properties

<Surface_Follow_Behavior>.name String Default: "Surface Follow"

<Surface_Follow_Behavior>.surfaces ArrayParameter Default: #() -- node array

See Notes below.

<Surface_Follow_Behavior>.useProjection Bolean Default: False

When true, Surface Follow calculates delegate direction from the specified vector, rather than using the default.

<Surface_Follow_Behavior>.xVector Float Default: 0.0 -- animatable

Specifies the x component of a vector using world coordinates. . Range=-1.0 to 1.0.

<Surface_Follow_Behavior>.yVector Float Default: 0.0 -- animatable

Specifies the y component of a vector using world coordinates. . Range=-1.0 to 1.0.

<Surface_Follow_Behavior>.zVector Float Default: 1.0 -- animatable

Specifies the z component of a vector using world coordinates. . Range=-1.0 to 1.0.

<space_warp_behavior>.targetColor Color Default: (color 0 0 127.5)

Sets the color used to draw the Surface Follow during the solution.

<space_warp_behavior>.displayTarget Boolean Default: True

When true, the interim goal for each delegate influenced by the Surface Follow behavior is drawn in the viewports as a wireframe sphere during the simulation solution.

NOTES:

If the delegate starts out away from the surface to be followed then the target is most visible before the delegate reaches the surface where the target is positioned along the surface edge.

While the delegate is actually following the surface, the target is usually coincident with the delegate because Surface follow sets a new destination only a frame or two ahead.

<space_warp_behavior>.targetScale Float Default: 5.0

Specifies the overall size of the target icon.

<Surface_Follow_Behavior>.offset Float Default: 0.0 -- animatable

Specifies the delegate's distance above the surface, using the surface normal.

<Surface_Follow_Behavior>.displayOffset Boolean Default: False

When true, shows the .offset distance as lines emanating from each vertex in the surface object, perpendicular to the surface.

NOTES:

You can perform the following MAXScript operations:

deleteitem <array> <itemnumber>

<array> = #(item,item...)

<array> = append <array> <item>

on all of the properties containing an ArrayParamater of objects listed below. You can also undo/redo these operations.

<Surface_Follow_Behavior>.surfaces

The following MAXScript operations will cause Crowd to fail, either right away or later:

NEVER set a Crowd/Behavior ArrayParameter element to undefined.

See also

Crowd : Helper

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods

MAXScript Extensions in character studio


Wall_Repel_Behavior : MAXObject

Wall_Repel_Behavior : ReferenceTarget

Wall_Repel_Behavior - superclass: ReferenceTarget; super-superclass:MAXWrapper - 13:0 - classID: #(1562862216, 1902539325)

Constructor

Wall_Repel_Behavior ...

WallRepelBehavior ...

Properties

<Wall_Repel_Behavior>.name String Default: "Wall Repel"

Get/Set the name of the behavior.

<Wall_Repel_Behavior>.repelGrids ArrayParameter Default: #() -- node array

Set the repelling grid.

<Wall_Repel_Behavior>.repelMethod Integer Default: 0 -- animatable

Determines whether delegate direction as influenced by the behavior is calculated by an angular method or a force method.

0 - Angle: Applies a force to the delegate based on the angle between the delegate's current direction and the direction it would need to take in order to be moving directly away from the source. If the behavior's Weight is set to 1 the delegate will be given a force that points directly away from the source. If Weight is set to .5, the force will bisect the angle between its current direction and the direction opposite that of the source.

1 - Force: : Always applies a force directly away from the source, but at different magnitudes. If the behavior's Weight is 1, the magnitude of the force will be the average speed. If the Weight is .5, the magnitude of the force will be half the average speed.

<Wall_Repel_Behavior>.repelDirection Integer Default: 0 -- animatable

Determines whether the grid repels from its positive-axis side, its negative-axis side, or both.

0 - Positive Axis: The grid repels only from the positive-axis side.

1 - Negative Axis: The grid repels only from the negative-axis side.

2 - Both Axes: The grid repels from both sides.

<Wall_Repel_Behavior>.useDistance Boolean Default: True

When true, the behavior applies only to delegates closer to the target than the outerRadius value.

<Wall_Repel_Behavior>.innerDistance Float Default: 0.0 -- animatable

The distance from the target at which the force is applied at full strength.

<Wall_Repel_Behavior>.outerDistance Float Default: 10.0 -- animatable

The distance from the target at which the force begins to be applied.

<Wall_Repel_Behavior>.falloff Float Default: 2.0 -- animatable

<Wall_Repel_Behavior>.showDistance Boolean Default: True

Shows the inner and outer distance settings as grids offset from the target grid in the viewports. The .innerDistance grid is light blue, while .outerDistance grid is blue-white.

<Wall_Repel_Behavior>.gridSpacing Integer Default: 500

Specifies the spacing of grid lines used to draw the Inner/Outer Distance grids. The lower the value, the closer the spacing.

<Wall_Repel_Behavior>.gridEnd Boolean Default: True Alias: End_force_at_grid_edges

When true, the force emanates only from the grid object. When off, the force emanates from an imaginary infinite grid created by extending the grid plane in all directions.

<Wall_Repel_Behavior>.forceColor Color Default: (color 255 0 255)

Sets the color used to draw the Wall Repel force during the solution.

<Wall_Repel_Behavior>.displayForce Boolean Default: True

The force, when activated, is drawn in the viewports as a wireframe rectangle during the simulation solution.

See also

Crowd : Helper

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods

MAXScript Extensions in character studio


Wall_Seek_Behavior : MAXObject

Wall_Seek_Behavior : ReferenceTarget

Wall_Seek_Behavior - superclass: ReferenceTarget; super-superclass:MAXWrapper - 13:0 - classID: #(1204300713, 972582825)

Constructor

Wall_Seek_Behavior ...

WallSeekBehavior ...

Properties

<Wall_Seek_Behavior>.name String Default: "Wall Seek"

Get/Set the name of the behavior.

<Wall_Seek_Behavior>.seekGrids ArrayParameter Default: #() -- node array

Set the repelling grid.

<Wall_Seek_Behavior>.seekMethod Integer Default: 0 -- animatable

Determines whether delegate direction as influenced by the behavior is calculated by an angular method or a force method.

0 - Angle: Applies a force to the delegate based on the angle between the delegate's current direction and the direction it would need to take in order to be moving directly toward the target. If the behavior's Weight is set to 1, the delegate will be given a force that points directly away from the target. If Weight is set to .5, the force will bisect the angle between its current direction and the direction opposite that of the target.

1 - Force: Always applies a force directly toward the target. If the behavior's Weight is 1, the magnitude of the force will be the average speed. If the Weight is .5, the magnitude of the force will be half the average speed.

<Wall_Seek_Behavior>.seekDirection Integer Default: 0 -- animatable

Determines whether the grid attracts from its positive-axis side, its negative-axis side, or both.

0 - Positive Axis: The grid attracts only from the positive-axis side.

1 - Negative Axis: The grid attracts only from the negative-axis side.

2 - Both Axes: The grid attracts from both sides.

<Wall_Seek_Behavior>.useDistance Boolean Default: True

When true, the behavior applies only to delegates closer to the target than the Outer Distance value.

<Wall_Seek_Behavior>.innerDistance Float Default: 0.0 -- animatable

The distance from the target at which the force is applied at full strength.

<Wall_Seek_Behavior>.outerDistance Float Default: 10.0 -- animatable

The distance from the target at which the force begins to be applied.

<Wall_Seek_Behavior>.falloff Float Default: 2.0 -- animatable

<Wall_Seek_Behavior>.showDistance Boolean Default: True

<Wall_Seek_Behavior>.gridSpacing Integer Default: 500

<Wall_Seek_Behavior>.gridEnd Boolean Default: True Alias: End_force_at_grid_edges

When true, the force emanates only from the grid object. When off, the force emanates from an imaginary infinite grid created by extending the grid plane in all directions.

<Wall_Seek_Behavior>.forceColor Color Default: (color 255 0 255)

Sets the color used to draw the Seek force vector during the solution.

<Wall_Seek_Behavior>.displayForce Boolean Default: True

When true, force exerted on the delegate(s) by the Seek behavior is drawn in the viewports as a vector during the simulation solution. If useRadii is turned on, the radii are also displayed when the force is active.

See also

Crowd : Helper

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods

MAXScript Extensions in character studio


Wander_Behavior : MAXObject

Wander_Behavior - superclass: ReferenceTarget; super-superclass:MAXWrapper - 9:0 - classID: #(788099210, 485035844)

Constructor

Wander_Behavior ...

WanderBehavior ...

Properties

<wander_behavior>.name String Default: "Wander" -- string

Get/Set the name of the behavior.

<wander_behavior>.period Integer Default: 10 -- animatable; Alias: Wander_Period

Specifies how many frames should elapse before a new direction is chosen.

<wander_behavior>.periodDeviation Float Default: 0.5 -- animatable; Alias: Wander_Period_Deviation

Specifies the maximum amount by which Period should vary. Each time a period ends, character studio takes a random number between the negative and positive values of the Deviation setting, multiplies it by the Period setting, and adds the result to Period. Range=0.0 to 1.0.

<wander_behavior>.turnAngle Float Default: 0.5 -- animatable

Specifies how far to turn when changing direction. A small value means to change direction only by a small amount, while as the value approaches 1.0 it will randomly turn in any direction. Range=0.5 to 1.0.

<wander_behavior>.turnPeriod Float Default: 0.5 -- animatable

Specifies how long over the current period it takes to turn. A value of 0.0 means that it will rotate as quickly as possible to face a direction and then travel in that a direction, while a value of 1.0 means it will take the entire period to rotate in that direction. Range=0.5 to 1.0.

<wander_behavior>.turnPeriodDeviation Float Default: 0.5 -- animatable

Specifies the maximum amount by which Angle should vary. Each time a period ends, character studio takes a random number between the negative and positive values of the Deviation setting, multiplies it by the Angle setting, and adds the result to Angle. Range=0.0 to 1.0.

<wander_behavior>.seed Integer Default: 1 -- animatable

Specifies a seed value for randomizing the Wander behavior.

<wander_behavior>.forceColor Color Default: (color 0 255 255)

The color used to draw the Wander force vector during the solution.

<wander_behavior>.displayForce Boolean Default: True -- boolean; Alias: Display_Force

When true, force exerted on the delegate(s) by the Wander behavior is drawn in the viewports as a vector during the simulation solution.

See also

Crowd : Helper

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods

MAXScript Extensions in character studio


MotionClips and GlobalMotionClip

Global_Motion_Clip : MasterBlockController

Motion_Clip

Clip_Associations : ReferenceTarget

ClipAssigner : ReferenceTarget

ClipAssignerReferenceTarget : ReferenceTarget

ClipState : ReferenceTarget

StateCreator : ReferenceTarget

Global_Clip_Associations : ReferenceTarget

Motion Clip Controllers

Master_Motion_Clip : MasterBlockController

Max_MotionClip_Implementation : MasterBlockController

Motion_Clip_SlaveFloat : FloatController

Motion_Clip_SlavePoint3 : Point3Controller

Motion_Clip_SlavePos : PositionController

Motion_Clip_SlaveRotation : RotationController

Motion_Clip_SlaveScale : ScaleController

Motion_ClipFloatController

Containers

Global_Container : GeometryClass

ControlContainerGeometry : GeometryClass

See also

MAXScript Extensions in character studio


Global_Motion_Clip : MasterBlockController

Global_Motion_Clip - superclass: MasterBlockController; super-superclass:MAXWrapper - 0:0 - classID: #(936531797, 663513431)

Aliases:

Global_Motion_Clip

GlobalMotionClip

Related Methods

globalMotionClipOps.loadfile <global_motion_clip> <filename_string>

'loadfile' expects a GlobalMotionClip, then a filename for a "*.ant" GlobalMotionClip file to load.

globalMotionClipOps.savefile <global_motion_clip> <filename_string>

'savefile' expects a GlobalMotionClip, then a filename for the "*.ant" file to save.

globalMotionClipOps.synthesize <global_motion_clip>

'synthesize' expects a GlobalMotionClip and will synthesize it.

NOTE:

The GlobalMotionClip objects are found under the GlobalTracks.Block_Control list controller.

EXAMPLES

In order to call globalMotionClipOps.savefile, you could use

GlobalMotionClipOps.savefile GlobalTracks.Block_Control.global_Motion_Clip__XXXXXX "globalObject.ant"

--where XXXXXX is the name of the object.

The available global motion clips can be seen by using the following code:

for i = 1 to GlobalTracks.Block_Control.numsubs do

(

local controller = GlobalTracks.Block_Control[i].object

if (classof controller == Global_Motion_Clip) do print controller

)

See also

MAXScript Extensions in character studio


Motion_Clip

Class instances not creatable by MAXScript

See also

MAXScript Extensions in character studio


Clip_Associations : ReferenceTarget

Clip_Associations - superclass: ReferenceTarget; super-superclass:MAXWrapper - 0:0 - classID: #(1895712427, 890448321)

Aliases:

Clip_Associations

ClipAssociation

No Properties Exposed.

See also

MAXScript Extensions in character studio


ClipAssigner : ReferenceTarget

ClipAssigner : ReferenceTarget {49f14ffa,33801afd}

Class instances not creatable by MAXScript

Properties:

<ClipAssigner>.node () : node

<ClipAssigner>.masterblocks (Wave) : max object array

<ClipAssigner>.minmaxavg (Map_Range) : max object

<ClipAssigner>.minmaxavgs (Ray_Bias) : max object array

<ClipAssigner>.centerObjects (Map_Size) : boolean

<ClipAssigner>.createState (Create_Morph_Key) : boolean

<ClipAssigner>.localX () : boolean

<ClipAssigner>.localY () : boolean

<ClipAssigner>.localZ (Pick_Morph_Target) : boolean

<ClipAssigner>.orientation (Constant) : boolean

<ClipAssigner>.removeAnimation (Map_Bias) : boolean

See also

MAXScript Extensions in character studio


ClipAssignerReferenceTarget : ReferenceTarget

ClipAssignerReferenceTarget : ReferenceTarget {2cb93ce2,33825f4}

Class instances not creatable by MAXScript

Properties:

<ClipAssignerReferenceTarget>.elements (Height_Segments) : integer

<ClipAssignerReferenceTarget>.speedMin (Default_Ambient_Color) : float

<ClipAssignerReferenceTarget>.speedMax (Path_Controller) : float

<ClipAssignerReferenceTarget>.speedAvg (Using_this_path_would_create_a_circular_dependency) : float

<ClipAssignerReferenceTarget>.accelMin (Collapse) : float

<ClipAssignerReferenceTarget>.accelMax (Weld) : float

<ClipAssignerReferenceTarget>.accelAvg (Default_10) : float

<ClipAssignerReferenceTarget>.pitchMin (Stop) : float

<ClipAssignerReferenceTarget>.pitchMax (Cancel) : float

<ClipAssignerReferenceTarget>.pitchAvg (Explode) : float

<ClipAssignerReferenceTarget>.pitchRateMin () : float

<ClipAssignerReferenceTarget>.pitchRateMax () : float

<ClipAssignerReferenceTarget>.pitchRateAvg () : float

<ClipAssignerReferenceTarget>.headingRateMin () : float

<ClipAssignerReferenceTarget>.headingRateMax (Add_Note_Track) : float

<ClipAssignerReferenceTarget>.headingRateAvg (Delete_Note_Track) : float

See also

MAXScript Extensions in character studio


ClipState : ReferenceTarget

ClipState : ReferenceTarget {455d5a81,3dcb1dc2}

Class instances not creatable by MAXScript

Properties:

<ClipState>.name () : string

<ClipState>.clips (UVW_Map) : max object array

<ClipState>.priority () : integer

<ClipState>.weight (Near_Plane) : integer

<ClipState>.weight_list (Far_Plane) : int array

<ClipState>.percentage (ASCII_files___asc) : float

<ClipState>.deviation () : float

<ClipState>.statePercentage (Assign__s_Controller) : float

<ClipState>.seed (Convert_To_Spline) : integer

<ClipState>.speed_toggle (Normal) : boolean

<ClipState>.minspeed () : float

<ClipState>.maxspeed () : float

<ClipState>.speed_clip_toggle () : boolean

<ClipState>.speed_deviation () : float

<ClipState>.scale_speed_toggle () : boolean

<ClipState>.scale_speed (Symmetry) : float

<ClipState>.base_speed (Material) : float

<ClipState>.speed_range_unique (Threshold) : integer

<ClipState>.unique_speed (ASCII_Object_Output) : float

<ClipState>.speed_in_radio (Save_Object) : integer

<ClipState>.speed_out_radio (Color_Clipboard) : integer

<ClipState>.accel_toggle (Normal) : boolean

<ClipState>.minaccel () : float

<ClipState>.maxaccel () : float

<ClipState>.accel_clip_toggle () : boolean

<ClipState>.accel_deviation () : float

<ClipState>.accel_range_unique () : integer

<ClipState>.unique_accel (ASCII_Object_Output) : float

<ClipState>.accel_in_radio () : integer

<ClipState>.accel_out_radio () : integer

<ClipState>.scale_accelspeed_toggle () : boolean

<ClipState>.scale_accelspeed (Symmetry) : float

<ClipState>.base_accelspeed (Material) : float

<ClipState>.pitch_toggle (Normal) : boolean

<ClipState>.minpitch (Stop) : float

<ClipState>.maxpitch (Cancel) : float

<ClipState>.pitch_clip_toggle () : boolean

<ClipState>.pitch_deviation () : float

<ClipState>.scale_pitch_toggle () : boolean

<ClipState>.scale_pitch (Symmetry) : float

<ClipState>.base_pitch (Material) : float

<ClipState>.pitch_range_unique () : integer

<ClipState>.unique_pitch (ASCII_Object_Output) : float

<ClipState>.pitch_in_radio () : integer

<ClipState>.pitch_out_radio () : integer

<ClipState>.scale_pitchspeed_toggle () : boolean

<ClipState>.scale_pitchspeed (Symmetry) : float

<ClipState>.base_pitchspeed (Material) : float

<ClipState>.pitchrate_toggle (Normal) : boolean

<ClipState>.minpitchvelocity () : float

<ClipState>.maxpitchvelocity () : float

<ClipState>.pitchvelocity_clip_toggle () : boolean

<ClipState>.pitchvelocity_deviation () : float

<ClipState>.pitchvelocity_range_unique () : integer

<ClipState>.unique_pitchvelocity (ASCII_Object_Output) : float

<ClipState>.pitchvelocity_in_radio () : integer

<ClipState>.pitchvelocity_out_radio () : integer

<ClipState>.scale_pitchvelocityspeed_toggle () : boolean

<ClipState>.scale_pitchvelocityspeed (Symmetry) : float

<ClipState>.base_pitchvelocityspeed (Material) : float

<ClipState>.headingvelocity_toggle (Normal) : boolean

<ClipState>.minheadingvelocity () : float

<ClipState>.maxheadingvelocity () : float

<ClipState>.headingvelocity_clip_toggle () : boolean

<ClipState>.headingvelocity_deviation () : float

<ClipState>.headingvelocity_range_unique () : integer

<ClipState>.unique_headingvelocity (ASCII_Object_Output) : float

<ClipState>.headingvelocity_in_radio () : integer

<ClipState>.headingvelocity_out_radio () : integer

<ClipState>.scale_headingvelocityspeed_toggle () : boolean

<ClipState>.scale_headingvelocityspeed (Symmetry) : float

<ClipState>.base_headingvelocityspeed (Material) : float

<ClipState>.script_toggle (Normal) : boolean

<ClipState>.functionName (Wave_Binding) : string

<ClipState>.script (WaveMod) : string

See also

MAXScript Extensions in character studio


StateCreator : ReferenceTarget

StateCreator : ReferenceTarget {1d093b2b,58b67a6f}

Class instances not creatable by MAXScript

Properties:

<StateCreator>.clips_states () : max object array

<StateCreator>.stateseed (Convert_To_Spline) : integer

See also

MAXScript Extensions in character studio


Global_Clip_Associations : ReferenceTarget

Global_Clip_Associations - superclass: ReferenceTarget; super-superclass:MAXWrapper - 0:0 - classID: #(762000868, 1823349467)

Global_Clip_Associations

GlobalClipAssociation

See also

MAXScript Extensions in character studio


Master_Motion_Clip : MasterBlockController

Master_Motion_Clip - superclass: MasterBlockController; super-superclass:MAXWrapper - 1:1 - classID: #(1395269688, 1791834559)

Aliases:

Master_Motion_Clip

MasterClip

Properties:

<Master_Motion_Clip>.Blend Float default: 1.0 -- animatable; float

See also

MAXScript Extensions in character studio


Max_MotionClip_Implementation : MasterBlockController

Max_MotionClip_Implementation - superclass: MasterBlockController; super-superclass:MAXWrapper - 2:0 - classID: #(269574504, 502341912)

Properties:

<Max_MotionClip_Implementation>.clipassociations ArrayParameter default: #() -- max object array; Clip_Associations

<Max_MotionClip_Implementation>.globalclipassociations ArrayParameter default: #() -- max object array; Global_Clip_Associations

See also

MAXScript Extensions in character studio


Motion_Clip_SlaveFloat : FloatController

Motion_Clip_SlaveFloat - superclass: FloatController; super-superclass:MAXWrapper - 0:0 - classID: #(830614751, 55317611)

Properties:

No properties exposed.

See also

MAXScript Extensions in character studio


Motion_Clip_SlavePoint3 : Point3Controller

Motion_Clip_SlavePoint3 - superclass: Point3Controller; super-superclass:MAXWrapper - 0:0 - classID: #(1821725002, 8395599)

Properties:

No properties exposed.

See also

MAXScript Extensions in character studio


Motion_Clip_SlavePos : PositionController

Motion_Clip_SlavePos - superclass: PositionController; super-superclass:MAXWrapper - 0:0 - classID: #(415377216, 1378353849)

Properties:

No properties exposed.

See also

MAXScript Extensions in character studio


Motion_Clip_SlaveRotation : RotationController

Motion_Clip_SlaveRotation - superclass: RotationController; super-superclass:MAXWrapper - 0:0 - classID: #(70282502, 159146021)

Properties:

No properties exposed.

See also

MAXScript Extensions in character studio


Motion_Clip_SlaveScale : ScaleController

Motion_Clip_SlaveScale - superclass: ScaleController; super-superclass:MAXWrapper - 0:0 - classID: #(1896026949, 1997226823)

Properties:

No properties exposed.

See also

MAXScript Extensions in character studio


Motion_ClipFloatController

Class instances not creatable by MAXScript

See also

MAXScript Extensions in character studio


Global_Container : GeometryClass

Global_Container : GeometryClass {e80737c,206f4cd7}

Class instances not creatable by MAXScript

Properties:

<Global_Container>.refs (Ref) : max object

See also

MAXScript Extensions in character studio


ControlContainerGeometry : GeometryClass

ControlContainerGeometry : GeometryClass {3bb766e,23c6fcc}

Class instances not creatable by MAXScript

<ControlContainerGeometry>.refs (References) : max object array

<ControlContainerGeometry>.names (ReferencesNames) : string array

<ControlContainerGeometry>.color : point3

<ControlContainerGeometry>.start : time

<ControlContainerGeometry>.end : time

<ControlContainerGeometry>.name (ReferencesNames) : string

<ControlContainerGeometry>.matrix1 : point3 array

<ControlContainerGeometry>.matrix2 : point3 array

<ControlContainerGeometry>.matrix3 : point3 array

<ControlContainerGeometry>.matrix4 : point3 array

See also

MAXScript Extensions in character studio


Vector_Field: SpacewarpObject

Value > MAXWrapper > Node > SpacewarpObject > Particles & Dynamics > Vector_Field

Constructor

Vector_Field ...

VectorField ...

Properties

<Vector_Field>.Length Float Default: 0.0 -- world units

Specify the length dimension of the vector field lattice. The lattice should be larger than the vector field object.

<Vector_Field>.Width Float Default: 0.0 -- world units

Specify the width dimension of the vector field lattice. The lattice should be larger than the vector field object.

<Vector_Field>.Height Float Default: 0.0 -- world units

Specify the height dimension of the vector field lattice. The lattice should be larger than the vector field object.

<Vector_Field>.LenSegs Integer Default: 1 Alias: Length_Segments

Specify the resolution of the vector field lattice’s length segments. The greater the resolution, the higher the accuracy of the simulation.

<Vector_Field>.WidSegs Integer Default: 1 Alias: Width_Segments

Specify the resolution of the vector field lattice’s width segments. The greater the resolution, the higher the accuracy of the simulation.

<Vector_Field>.HgtSegs Integer Default: 1 Alias: Height_Segments

Specify the resolution of the vector field lattice’s height segments. The greater the resolution, the higher the accuracy of the simulation.

<Vector_Field>.showLattice Boolean Default: True

Set on to display the vector field lattice as a yellow wireframe box. The vectors are generated at lattice intersections inside the vector field range.

<Vector_Field>.showRange Boolean Default: True

Set on to display the volume about the obstacle object within which vectors are generated as an olive-colored wireframe.

<Vector_Field>.showVectors Boolean Default: False

Set on to display vectors, which appear as blue lines emanating outward from the lattice intersections within the range volume.

<Vector_Field>.showSurfSamps Boolean Default: False

Set on to display short green lines emanating from sample points on the surface of the obstacle object.

<Vector_Field>.vecScale Float Default: 1.0 -- world units

Scales the vectors so they're more visible or less obtrusive. This setting does not affect the strength of the vectors only their visibility.

<Vector_Field>.iconSize Float Default: 0.0 -- world units

Adjusts the size of the Vector Field space warp icon. The icon is a pair of crossed double-headed arrows. Increase the size for easier viewport selection.

<Vector_Field>.strength Float Default: 1.0 -- animatable; world units

Sets the degree of effect the vectors have on the movement of an object entering the vector field. Changing Strength does not require that you recalculate the vector field.

<Vector_Field>.falloff Float Default: 2.0 -- animatable; world units

Determines the rate at which the strength of the vectors falls off with distance from the surface of the object. A value of 0 will make all the vectors the same size. A value greater than 0 will make them get smaller as they get further away. A value less then 0 will make them get larger as they get further away.

<Vector_Field>.direction Integer Default: 1 -- animatable

Sets whether the force generated by the vectors works parallel or perpendicular to the vector field. Because the vectors are perpendicular to the object surface, and you typically would want delegates to travel parallel to the surface, you would normally use a perpendicular force.

0 - Parallel

1 - Perpendicular

<Vector_Field>.pull Float Default: 0.0 -- animatable; world units

Adjusts objects' position relative to the field. Available only when Perpendicular is chosen. Range=-1.0 to 1.0. Objects moving perpendicular to a vector field sometimes tend to drift away from it, due to lack of subsampling. The Pull parameter helps to pull objects back. Pull values greater than 0 create a pulling force towards the source of the vector field vector. Values less than 0 pull the force towards the direction in which the vector field's vector is pointing. A value of 0.0 produces a force perfectly perpendicular to the vector field's vector.

<Vector_Field>.object Node Default: Undefined Alias: Vector_Field_Object

The obstacle object around which the vector field is to be generated. Only primitives and unmodified editable mesh objects can be used as obstacles. The object should be fully enclosed in the Vector Field lattice.

<Vector_Field>.range Float Default: 1.0 -- world units

Determines the volume within which vectors are generated. The Range is represented in viewports as an olive-colored wireframe that starts out the same size and shape as the obstacle object. Increasing the Range setting moves the wireframe away from the obstacle object in the direction of its surface normals.

NOTE:

In crowd simulations, the Range outline is where the delegates start to "see" the obstacle object, and begin to turn to avoid it. If your crowd members are penetrating the obstacle, or even just coming too close to it before turning, increase the Range setting. Also try increasing the Vector Field lattice resolution and/or the Sample Res setting.

<Vector_Field>.resolution Integer Default: 1

Acts as a multiplier of the effective sampling rate used on the obstacle object's surface to calculate vector directions in the field. The basic sampling rate is determined by the program from the size of the lattice and the size of each polygon.

<Vector_Field>.flipFaces Boolean Default: False

Setting to true causes flipped normals to be used during the computation of the vector field. By default, vectors are generated in the same direction as the obstacle object's face normals, so that assuming its face normals point outward, objects move around its exterior in a crowd simulation. However, if you want objects to remain within an object's interior, turn on flipFaces.

<Vector_Field>.blendStart Float Default: 0.0 -- world units

The distance from the object at which blending the vectors starts.

<Vector_Field>.blendFalloff Float Default: 2.0 -- world units

The falloff of the blend of the surrounding vectors.

<Vector_Field>.blendWidSegs Integer Default: 1

The number of adjacent lattice points to blend on the X axis.

<Vector_Field>.blendLenSegs Integer Default: 1

The number of adjacent lattice points to blend on the Y axis.

<Vector_Field>.blendHgtSegs Integer Default: 1

The number of adjacent lattice points to blend on the Z axis.

Methods

vfields.computeVectors <Vector_Field>

Calculates the vector field using the current Vector Field parameters. Always recalculate the vector field after changing any of the non-display related parameters.

vfields.BlendVectors <Vector_Field>

Blends the vectors for reducing abrupt changes in angles of neighboring vectors.

Associated Methods

bindSpaceWarp <node> <Vector_Field_node>

Associated Binding Modifier

Vector_Field_Mod

This modifier is automatically created by the bindSpaceWarp() method, and is not otherwise creatable by MAXScript. There are no properties associated with this binding modifier.

See also

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods

MAXScript Extensions in character studio


WorkBench Core Interfaces in character studio 4

WorkBench Core Interfaces

BipWorkBench Core Interface

BipAnalyzer Core Interface

BipFixer Core Interface

BipFilter Core Interface

See also

MAXScript Extensions in character studio


BipWorkBench Core Interface

Interfaces > Core Interfaces > BipWorkBench

This Core Interface exposes the functionality of the Workbench to MAXScript.

NOTE:

All of the 'toggle' functions are listed as BipAnimationWB actions in the Customize UI section.

This gives users a quick way to mirror some workbench functionality in the trackview via quadmenus, etc.

Interface: BipWorkBench

Methods

<void>ToggleShowX()

Toggles the X function curve display checkbutton.

<boolean>GetShowX()

Returns true if the X function curve display checkbutton is checked, false otherwise.

<void>ToggleShowY()

Toggles the Y function curve display checkbutton.

<boolean>GetShowY()

Returns true if the Y function curve display checkbutton is checked, false otherwise.

<void>ToggleShowZ()

Toggles the Z function curve display checkbutton.

<boolean>getShowZ()

Returns true if the Z function curve display checkbutton is checked, false otherwise.

<void>ToggleLayerEdit()

Toggles the Show Layered Edit checkbutton

<boolean>GetLayerEdit()

Returns true if the Show Layered Edit checkbutton is checked, false otherwise.

<void>ToggleDrawDuringMove()

Toggles the Draw While Moving checkbutton.

<boolean>GetDrawDuringMove()

Returns true if the Draw While Moving checkbutton is checked, false otherwise.

<void>ToggleLimit180()

Toggles the Limit –180 to 180 checkbutton

<boolean>GetLimit180()

Returns true if the Limit –180 to 180 checkbutton is checked, false otherwise.

<void>ShowQuatCurve()

Sets the Curve drop-down list to Quat Curve.

<void>ShowPosCurve()

Sets the Curve drop-down list to Pos Curve.

<void>ShowAngSpeedCurve()

Sets the Curve drop-down list to Rot Speed.

<void>ShowAngAccelCurve()

Sets the Curve drop-down list to Rot Accel.

<void>ShowAngJerkCurve()

Sets the Curve drop-down list to Rot Jerk.

<void>ShowPosSpeedCurve()

Sets the Curve drop-down list to Pos Speed.

<void>ShowPosAccelCurve()

Sets the Curve drop-down list to Pos Accel.

<void>ShowPosJerkCurve()

Sets the Curve drop-down list to Pos Jerk.

<void>PosCurveToWorld()

Put the position curve relative to the World. Checks the World checkbutton.

<void>PosCurveToBipRoot()

Put the position curve relative to the Root. Checks the Parent checkbutton.

<void>PosCurveToThisNode <node>relativeToNode

Put the position curve relative to the specified node. Checks the Node checkbutton.

<void>Open()

Opens the Animation Workbench.

<void>ShowQuatXYZ()

Enables the Show Quat XYZ option. Available in 3ds Max 8 and higher.

<void>ShowQuatXZY()

Enables the Show Quat XZY option. Available in 3ds Max 8 and higher.

<void>ShowQuatYXZ()

Enables the Show Quat YXZ option. Available in 3ds Max 8 and higher.

<void>ShowQuatYZX()

Enables the Show Quat YZX option. Available in 3ds Max 8 and higher.

<void>ShowQuatZXY()

Enables the Show Quat ZXY option. Available in 3ds Max 8 and higher.

<void>ShowQuatZYX()

Enables the Show Quat ZYZ option. Available in 3ds Max 8 and higher.

See also

WorkBench Core Interfaces

MAXScript Extensions in character studio


BipAnalyzer Core Interface

Interfaces > Core Interfaces > BipAnalyzer

Interface: BipAnalyzer

Methods

<void>DoNoiseDetectorAnalysis <&node array>nodeTab <interval>range <float>deviation <boolean>angular <integer>noiseType <node>parentNode

nodeTab is In and Out parameter

noiseType is

0-speed,

1-acceleration,

2-jerk

Performs Noise Detector Analysis of the specified nodes in the given interval using the supplied deviation. If angular is true, the Rotation will be analysed, otherwise the Position will be analysed. The analysis will be performed relatively to the supplied parentNode.

EXAMPLE

nodesToAnalyse = #($'Bip01 Head',$'Bip01 Pelvis')

BipAnalyzer.doNoiseDetectorAnalysis nodesToAnalyse (interval 0 100) 3.0 true 0 $Bip01

<void>DoSpikeDetectorAnalysis <&node array>nodeTab <interval>range <float>deviation

nodeTab is In and Out parameter

Performs Spike Detector Analysis of the specified nodes in the given interval using the supplied deviation.

EXAMPLE

BipAnalyzer.doSpikeDetectorAnalysis $'Bip01 Head' (interval 0 100) 3.0

<void>DoKneeWobbleAnalysis <&node array>nodeTab <interval>range <float>frameThreshold <float>fluctuationThreshold

nodeTab is In and Out parameter

Performs Knee Wobble Analysis of the specified nodes in the given time interval using the supplied frame and fluctuation thresholds.

<void>DoKneeExtensionAnalysis <&node array>nodeTab <interval>range <float>kneeAngle

nodeTab is In and Out parameter

Performs Knee Extension Analysis of the specified nodes in the given time interval using the supplied knee angle.

<time array>GetResults <node>node

Returns a TimeValueTab.

<void>LoadAnalysisFile <filename>fileName

Loads the Analysis File with the given file name.

<void>SaveAnalysisFile <&node array>nodeTab <filename>fileName

nodeTab is In and Out parameter

Saves an Analysis File for the specified objects to the given file name.

<void>ClearAnalysisResults()

Clears all results.

See also

WorkBench Core Interfaces

MAXScript Extensions in character studio


BipFixer Core Interface

Interfaces > Core Interfaces > BipFixer

Interface: BipFixer

Methods:

<void>DoAngSmoothing <&node array>nodeTab <integer>width <float>damping

nodeTab is In and Out parameter

Fix the specified nodes with the Rot Smoothing Fixer using the supplied width and damping values.

<void>DoAngBlurring <&node array>nodeTab <integer>width <float>damping

nodeTab is In and Out parameter

Fix the specified nodes with the Rot Blurring Fixer using the supplied width and damping values.

<void>DoAdvAngSmoothing <&node array>nodeTab <integer>width <float>damping

nodeTab is In and Out parameter

Fix the specified nodes with the Adv Rot Smoothing Fixer using the supplied width and damping values.

<void>DoPosSmoothing <&node array>nodeTab <integer>width <float>damping

nodeTab is In and Out parameter

Fix the specified nodes with the Pos Smoothing Fixer using the supplied width and damping values.

<void>DoPosBlurring <&node array>nodeTab <integer>width <float>damping

nodeTab is In and Out parameter

Fix the specified nodes with the Pos Blurring Fixer using the supplied width and damping values.

<void>DoRemoveKeys <&node array>nodeTab <integer>intervalWidth <boolean>deleteKeys

nodeTab is In and Out parameter

Fix the specified nodes with the Remove Keys Fixer using the supplied interval width. When deleteKeys is supplied as true, keys will be deleted.

<void>DoKneeWobbleFix <&node array>nodeTab <float>frameThreshold <float>fluctuationThreshold

nodeTab is In and Out parameter

Fix the specified nodes with the Knee Wobble Fixer using the supplied frame and fluctuation thresholds.

<void>DoKneeExtensionFix <&node array>nodeTab <float>kneeAngle

nodeTab is In and Out parameter

Fix the specified nodes with the Knee Extension Fixer using the supplied knee angle.

See also

WorkBench Core Interfaces

MAXScript Extensions in character studio


BipFilter Core Interface

Interfaces > Core Interfaces > BipFilter

Interface: BipFilter

Methods:

<void>angSmoothing <&node array>nodeTab <integer>width <float>damping <interval>range

nodeTab is In and Out parameter

Filter the specified nodes with the Rot Smoothing Filter using the supplied width and damping values in the specified time range.

<void>angBlurring <&node array>nodeTab <integer>width <float>damping <interval>range

nodeTab is In and Out parameter

Filter the specified nodes with the Rot Blurring Filter using the supplied width and damping values values in the specified time range.

<void>angBoosting <&node array>nodeTab <integer>width <float>damping <interval>range

nodeTab is In and Out parameter

Filter the specified nodes with the Rot Boosting Filter using the supplied width and damping values values in the specified time range.

<void>advAngSmoothing <&node array>nodeTab <integer>width <float>damping <interval>range

nodeTab is In and Out parameter

Filter the specified nodes with the Adv Rot Smoothing Filter using the supplied width and damping values values in the specified time range.

<void>posSmoothing <&node array>nodeTab <integer>width <float>damping <interval>range

nodeTab is In and Out parameter

Filter the specified nodes with the Pos Smoothing Filter using the supplied width and damping values in the specified time range.

<void>posBlurring <&node array>nodeTab <integer>width <float>damping <interval>range

nodeTab is In and Out parameter

Filter the specified nodes with the Pos Blurring Filter using the supplied width and damping values values in the specified time range.

<void>posBoosting <&node array>nodeTab <integer>width <float>damping <interval>range

nodeTab is In and Out parameter

Filter the specified nodes with the Pos Boosting Filter using the supplied width and damping values values in the specified time range.

<void>keyReduction <&node array>nodeTab <float>tolerance <integer>keySpacing <float>COMTolerance <integer>COMKeySpacing <interval>range

nodeTab is In and Out parameter

Filter the specified nodes with the Key Reducer Filter using the supplied tolerance and key spacing for nodes and Center of Mass in the specified time range.

<void>keyPerFrame <&node array>nodeTab

nodeTab is In and Out parameter

Create a Key on every frame.

<void>enablePosSubAnim <&node array>nodeTab <boolean>enable

nodeTab is In and Out parameter

Enable/Disable Position Sub-Anims in the specified objects.

<void>enableRotSubAnim <&node array>nodeTab <boolean>enable

nodeTab is In and Out parameter

Enable/Disable Rotation Sub-Anims in the specified objects.

<void>enableScaleSubAnim <&node array>nodeTab <boolean>enable

nodeTab is In and Out parameter

Enable/Disable Scale Sub-Anims in the specified objects.

<void>collapsePosSubAnim <&node array>nodeTab <boolean>perFrame <boolean>delete

nodeTab is In and Out parameter

Collapse Position Sub-Anims in the specified objects. When perFrame is supplied as true, a key will be created on every frame, otherwise the existing keys will be used.

<void>collapseRotSubAnim <&node array>nodeTab <boolean>perFrame <boolean>delete

nodeTab is In and Out parameter

Collapse Rotation Sub-Anims in the specified objects. When perFrame is supplied as true, a key will be created on every frame, otherwise the existing keys will be used.

<void>createPosSubAnim <&node array>nodeTab <control>controlToClone <boolean>checkForExistence

nodeTab is In and Out parameter

Creates Position Sub-Anims in the specified objects by cloning the specified controlToClone controller. If checkForExistence is supplied as true, a check for existing controller will be performed.

<void>createRotSubAnim <&node array>nodeTab <control>controlToClone <boolean>checkForExistence

nodeTab is In and Out parameter

Creates Rotation Sub-Anims in the specified objects by cloning the specified controlToClone controller. If checkForExistence is supplied as true, a check for existing controller will be performed.

<void>createScaleSubAnim <&node array>nodeTab <control>controlToClone <boolean>checkForExistence

nodeTab is In and Out parameter

Creates Scale Sub-Anims in the specified objects by cloning the specified controlToClone controller. If checkForExistence is supplied as true, a check for existing controller will be performed.

<void>DoKneeWobbleFilter <&node array>nodeTab <float>frameThreshold <float>fluctuationThreshold <interval>range

nodeTab is In and Out parameter

Filter the specified nodes with the Knee Wobble Filter using the supplied frame and fluctuation thresholds in the specified time range.

<void>DoKneeExtensionFilter <&node array>nodeTab <float>kneeAngle <interval>range

nodeTab is In and Out parameter

Filter the specified nodes with the Knee Extension Filter using the supplied knee angle in the specified time range.

See also

WorkBench Core Interfaces

MAXScript Extensions in character studio


Mixer MAXScript Extensions

The following topics document the available methods providing access to the Character Studio Motion Mixer:

The Character Studio Motion Mixer

Mixer Class

MxTrackGroup Class

MxTrack Class

MxClip Class

themixer const StructDef

See also

MAXScript Extensions in character studio


The Character Studio Motion Mixer

This topic describes how to manipulate the Character Studio motion mixer using MAXScript.

There are five MAXScript classes which make up the mixer.

They are:

Mixer Class

MxTrackGroup Class

MxTrack Class

MxClip Class

Mixermanager - themixer

The first four classes access a single mixer and its various parts.

The last class, mixermanager, accesses the overall mixer display, affecting all mixers.

Most of the Mixer MAXScript methods work the same way as the mixer user interface. There are a few exceptions. The user interface does not allow the user to overlap clips, while some MAXScript properties and functions make it possible to overlap clips. This is not advisable. All mixer MAXScript properties and functions take into account the snap to frames variable as well as the lock transitions variable, both settable in the mixermanager or the user interface. They do not, however, take into account the snap to clips variable, both for technical reasons and because this is more of a user interface feature.

Below is some code to access a biped’s mixer. Once you have the mixer, you can manipulate it using its functions and properties. And you can go deeper into the mixer by using its functions to access trackgroups, then tracks, and then clips.

EXAMPLE

b = $bip01

c = b.transform.controller

m = c.mixer

See also

Mixer MAXScript Extensions

MAXScript Extensions in character studio


Mixer Class

Properties

.balanceMute : boolean

.balanceLateralRatio : float (0.0 - 1.0)

.balancePropagation : float (0.0 - 1.0)

.numTrackgroups : integer, not settable

.mixType : string (#mixdown | #rawmix)

Methods

getTrackgroup <mixer:mixer> <index:integer>,

If index is in correct range, this returns an mxtrackgroup. Otherwise, it returns false.

appendTrackgroup <mixer:mixer>

This appends a trackgroup to the end of the trackgroup array. The new trackgroup will appear at the top of all the trackgroups. Returns true.

insertTrackgroup <mixer:mixer> <index:integer>

If index is in the correct range, this inserts a new trackgroup at that index. An index of 1 is the lowest trackgroup. Returns true if the index is in the correct range. Otherwise it returns false.

deleteTrackgroup <mixer:mixer> <index:integer>

If index is in the correct range, this deletes the trackgroup at that index. An index of 1 is the lowest trackgroup. Returns true if trackgroup was deleted, false if not.

mixdown <mixer> <KeyPerFrame:boolean> <EnforceIkConstraints:boolean> <ContinuityRange:integer> <FilterHyperExtLegs:boolean> <MaxKneeAngle:float>

ContinuityRange must be between 0 and 100. MaxKneeAngle must be between 0 and 180. This will perform a mixdown. If successful, it returns true. Otherwise, it returns false.

copyMixdownToBiped <mixer:mixer>

This copies the mixdown to the biped. Returns false if there is no mixdown. Otherwise, returns true.

saveMixFile <filename:string>

This saves a .mix file. Returns true if successful, false if not.

loadMixFile <filename:string>

This loads a .mix file. Returns true if successful, false if not.

See also

Mixer MAXScript Extensions

MAXScript Extensions in character studio


MxTrackGroup Class

Properties

name : string

numTracks : integer, not settable

Methods

getTrack <trackgroup:mxtrackgroup> <index:integer>

If index is in the correct range, this returns an mxtrack. Otherwise, it returns false.

getFilter <trackgroup: mxtrackgroup> <trackid:string>

trackid must have one of the following values:

#lftArm, #rgtArm, #lftHand, #rgtHand, #lftFoot, #rgtFoot, #lftLeg, #rgtLeg, #lftPony, #rgtPony, #head, #horizontal, #vertical, #rotation, #spine, #pelvis, #tail, #prop1, #prop2, #prop3.

This returns true or false, depending on whether the indicated track is on or off in the trackgroup's filter.

setFilter <trackgroup: mxtrackgroup> <trackid:string> <onOff:boolean>

trackid must have one of the values listed above. This turns the filter on or off for one of the tracks. If the track is not one of the accepted strings, this returns false. Otherwise, it returns true.

cleartrackgroup <trackgroup: mxtrackgroup>

This deletes all clips from the trackgroup.

appendTrack <trackgroup: mxtrackgroup> <tracktype:string>

tracktype must be either #layertrack or #transtrack.

This appends a track of the specified type to the end of the track array. The new track will appear at the top of all the tracks in the trackgroup. Returns true.

insertTrack <trackgroup: mxtrackgroup > <index:integer> <tracktype:string>

tracktype must be either #layertrack or #transtrack.

If index is in the correct range, this inserts a new track of the specified type at that index. An index of 1 is the lowest track in the trackgroup. Returns true if the index is in the correct range. Otherwise returns false.

deleteTrack <trackgroup: mxtrackgroup > <index:integer>

If index is in the correct range, this deletes the track at that index.

An index of 1 is the lowest track in the trackgroup. You are not allowed to delete the last track in a trackgroup, since trackgroups without tracks are not allowed. You can clear the track of clips using ClearTrack(). Returns true if track was deleted, false if not..

See also

Mixer MAXScript Extensions

MAXScript Extensions in character studio


MxTrack Class

Properties

.tracktype : name (#layertrack | #transtrack)

Get/set the type of the track - layer or transition.

.mute : boolean

Get/set the muted state of the track. If set to true, the track will be muted.

If you turn solo on, mute will be turned off, and vice-versa.

.solo : boolean

Get/set the solo state of the track. If set to true, all other track will be muted.

If you turn mute on, solo will be turned off, and vice-versa.

.transPreserveHgt : boolean

Although this appears in the transition edit dialog, it is actually set for the entire track.

.numClips : integer

.numTransClips : integer

For a layer track, this property will always contain 0.

For a transition track, this property will contain the number of clips which are actually part of the transitioning clips in the track. A greyed out clip will not be counted. This value should be used to loop through the transition clips, in order, using the GetClip() function.

.numWeights : integer, not settable

The number of weights in the track’s weight curve (relevant for transition tracks only)

Methods

getclip <track:mxtrack> <index:integer>

This method will return the clip in the track specified by the index.

Indices start with 1.

In the case of a transition track, this will be an index into the set of clips, in order, which are actually part of the transitioning clips in the track.

A greyed out clip will not be counted.

Use the .numTransClips property to find out how many transitioning clips there are in the track.

cleartrack <track:mxtrack>

This method deletes all the clips in the track. It returns true.

appendClip <track:mxtrack > <fname:string> <ZeroFootHgt:boolean> <interval:timevalue>

The specified bip file will be loaded into the new clip, and the reservoir, using the ZeroFootHeight parameter.

For layer tracks, the start of the new clip will be appended interval time from the end of the last clip in the track.

The interval variable must be >= 0.

For transition tracks, the interval parameter is ignored. The start of the new clip will be at the inpoint of the last clip in the track, and it will be on the opposite row of the last clip. It will start later if it collides with another clip.

For both layer and transition tracks, if there are no clips in the track, the new clip will start at frame 0.

Returns false if the specified file could not be loaded. Otherwise, it returns true.

appendMaxClip <track:MXtrack> <fname:string> <interval:timevalue> <mapName:string>

Loads the specified max animation file as a clip onto the track. Only works for 3ds Max animation tracks, see appendTrack() above for a Biped-only method.

The fname argument defines the filename of the .xaf file to be loaded.

The interval argument defines the number of frames from the end of the last clip in the track that the new clip will be appended at in layer tracks. The interval must be greater or equal to 0.

For transistion tracks, the interval parameter is ingnored and the start of the new clip will be at the inpoint of the last clip in the track, and it will be on the opposite row of the last clip. The parameter is also ignored if there are no clips in the track - in that case, the clip will automatically start at frame 0.

The mapName argument defines the filename of the .xmm map file to be loaded.

The method returns true if the clip is created properly.

The method returns false if the files cannot be loaded or the mapping is not correct.

optimizeTransitions <track:mxtrack> <PreferredTransLength:integer> <SearchEntireClip:boolean> <SearchRangeBefore:integer> <SearchRangeAfter:integer>

This method optimizes transitions.

If this method is called for a layer track, it will return false and do nothing.

PreferredTransLength and the search ranges must be positive values. They are specified as frames. If they are negative values, the optimization will not be performed and the function will return false.

Otherwise, the function will return true on success and false on failure.

If optimization requires clips to be trimmed to avoid visual overlap, then they will be trimmed.

optimizeClipTransition <track:mxtrack > <PreferredTransLength:integer> <SearchEntireClip:boolean> <SearchRangeBefore:integer> <SearchRangeAfter:integer> <ClipIndex:integer>

See notes above about legal parameter values. This function optimizes only a single clip's transition.

The ClipIndex is an index into the track's trans clips and specifies which clip’s transition, from itself to the next clip, will be optimized.

If the ClipIndex is out of range of the trans clips, the optimization will not be performed and the function will return false.

getWeight <index::integer >

This method returns the weight at the specified index in the track’s weight curve. If the Index is out of bounds, the function will return 0.0.

getWeightTime <index::integer >

This method returns the time at the specified index in the track’s weight curve. If the Index is out of bounds, the function will return 0.

deleteWeight <index::integer >

This method deletes the weight at the specified index in the track’s weight curve. If the Index is out of bounds, the function will return false. Otherwise, it returns true.

setWeight <index::integer > <float::weight>

This method sets the weight at the specified index in the track’s weight curve. If the Index is out of bounds or weight is not between 0.0 and 1.0, the function will return false. Otherwise, it returns true.

setWeightTime <index::integer > <time::timevalue>

This method sets the time at the specified index in the track’s weight curve. If the Index is out of bounds or time is not between the time values of the previous and next values in the weight curve, the function will return false. Otherwise, it returns true.

setWeightAtTime <time::timevalue> <float::weight>

If there is a key at time time on the weight curve, this will reset the weight at that key. If not, this method will create a new key at time time with weight weight.

getWeightAtTime <time::timevalue>

If t is at a key at time time in the weight curve, this method returns the weight at that key. Otherwise, it returns the interpolated weight at time time. If there are no weights, it returns 1.0.

See also

Mixer MAXScript Extensions

MAXScript Extensions in character studio


MxClip Class

Properties

.orgstart : timevalue, Read-only

.orgend : timevalue, Read-only

These are the original time boundaries of the file loaded into the clip. These bounds never change unless a new file is loaded into the clip.

.trimstart : timevalue

.trimend : timevalue

These are the trimmed boundaries of the clip. They are the same as or within the original boundaries. These values do not change when you scale a clip. They simply tell you what subset of the original clip is being used. These boundaries are visible in the mixer when you are in trim mode. When you set these values, the weight curve and time warps will be trimmed appropriately.

.globstart : timevalue

.globend : timevalue

These are global frame values. They indicate where the trimmed bounds of the clip are mapped globally. The clip's scale is defined by the relationship between the trimmed interval (trimend - trimstart) and the global interval (globend - globstart). If those intervals are equal, the clip’s scale is 1. globstart must be less than globend.

.scale : float (must be > 0.0)

This is the clips' scale. When you change it, the clip will scale on the right edge. The left edge will not move.

.transInpt : timevalue

This is the inpoint of the transition from this clip to the next. The inpoint must be greater than the outpoint from the previous transition to this clip (prevTransOutpt). The inpoint must be less than the scaled local trimmed end of the clip. (see definition of scaled local below)

.transAngle : float

This is the transition angle for the transition from this clip to the next.

.transFocus : name

must be set to one of the following: #focusAuto, #focusCom, #focusLftFoot, #focusRgtFoot, #focusBthFeet

This is the transition focus for the transition from this clip to the next.

.transRolling : boolean

This describes whether or not this clip is rolling or fixed during the transition to the next clip.

.transEasein : float (0.0 - 1.0)

.transEaseout : float (0.0 - 1.0)

These are the ease values for the transition from this clip to the next. Each ease value, and the sum of the ease values, must be between 0.0 and 1.0, inclusive.

.prevTransOutpt : timevalue

This is the outpoint of the transition from the previous clip to this clip. The outpoint must be less than the inpoint from this clip to the next (transInpt). The outpoint must be greater than the scaled local trimmed start of the clip. . (see definition of scaled local below)

.prevTransRolling : boolean

This describes whether or not this clip is rolling or fixed during the transition from the previous clip to this clip.

.filename : string, not settable

This is the filename of the bip file used by this clip. You must use the loadFile function to change the file.

.numWeights : integer, not settable

The number of weights in the clip’s weight curve (relevant only when clip is in a layer track)

.numTimeWarps : integer, not settable

The number of time warp keys in the clip’s time warp.

Methods

Clips

loadFile <clip:mxclip> <loadOption:name> <filename:string> <ZeroFootHeight:boolean>

This loads a .bip file into a clip. loadOption must be one of the following:

#singleClip (means load the file only into this clip),

#instances (means load the file into this clip as well as all instances of this clip),

#adaptations (means load the file into this clip and all instances and adaptations of this clip).

Returns true or false, indicating whether or not the file load was successful.

moveClip <clip:mxclip> <timeInc:timevalue>

This moves the clip timeInc frames. It returns true. Using this function, you can overlap clips, unlike you can in the user interface. However, this is not advised.

scaleClip <clip:mxclip> <scale:float>

This scales the clip. This scale value must be greater than 0. This is different from the clip's scale property, which sets the absolute scale. Instead this will multiply the absolute scale by the specified amount. Using this function, you can overlap clips, unlike you can in the user interface. However, this is not advised.

Time Conversion Methods

The following functions return a time value. They are useful for converting between various time spaces described below:

local: a time between trimstart and trimend, inclusive

scaled local: a time between 0 and the length of the scaled clip, which can be found this way:

length = <mxclip>.globend - <mxclip>.globstart

Transition inpoints and outpoints are stored in scaled local time.

global: a global time value

LocalToScaledLocal <clip:mxclip> <frame:integer>

ScaledLocalToLocal <clip:mxclip> <frame:integer>

LocalToGlobal <clip:mxclip> <frame:integer>

GlobalToLocal <clip:mxclip> <frame:integer>

GlobalToScaledLocal <clip:mxclip> <frame:integer>

ScaledLocalToGlobal <clip:mxclip> <frame:integer>

GlobalInpoint <clip:mxclip>

GlobalOutpoint <clip:mxclip>

Weight Methods

getWeight <index::integer >

Returns the weight at the specified index in the clip’s weight curve. If the Index is out of bounds, the function will return 0.0.

getWeightTime <index::integer >

Returns the time at the specified index in the clip’s weight curve. If the Index is out of bounds, the function will return 0.

deleteWeight <index::integer >

Deletes the weight at the specified index in the clip’s weight curve. If the Index is out of bounds, the function will return false. Otherwise, it returns true.

setWeight <index::integer > <float::weight>

Sets the weight at the specified index in the clip’s weight curve. If the Index is out of bounds or weight is not between 0.0 and 1.0, the function will return false. Otherwise, it returns true.

setWeightTime <index::integer > <time::timevalue>

Sets the time at the specified index in the clip’s weight curve. If the Index is out of bounds or time is not between the time values of the previous and next values in the weight curve, the function will return false. If time is less than 0 or greater than the scaled local last frame of the clip, the function will also return false. Otherwise, it returns true.

setWeightAtTime <time::timevalue> <float::weight>

If there is a key at time time on the weight curve, this will reset the weight at that key. If not, this will create a new key at time time with weight weight. If time is less than 0 or greater than the scaled local last frame of the clip, the function will return false. Otherwise, it returns true.

getWeightAtTime <time::timevalue>

If t is at a key at time time in the weight curve, this returns the weight at that key. Otherwise, it returns the interpolated weight at time time. If there are no weights, this returns 1.0.

Time Warp Methods

isTimeWarpActive()

Returns true if time warp exists, false if not.

ActivateTimeWarp()

Activates the time warp for this clip.

DeactivateTimeWarp()

Deactivates the time warp for this clip.

InitializeTimeWarp()

Initializes the time warp for this clip, placing one time warp key at the beginning of the clip, and another at the end. This will also activate the time warp if it is not active.

getTwOrgTime <index::integer>

Returns the original time at index index. If index is out of bounds of the time warp, this returns 0.

getTwWarpTime <index::integer>

Returns the warped time at index index. If index is out of bounds of the time warp, this returns 0.

GetOrgTimeAtWarpedTime <wtime::timevalue>

This returns what original time has been warped to time wtime. If wtime is out of bounds of the time warp, this returns 0.

GetWarpedTimeAtOrgTime <otime::timevalue>

Returns what the original time, otime, has been warped to. If otime is out of bounds of the clip’s scaled local time, this returns 0.

DeleteTw <index::integer>

Deletes the time warp key at index index. If index is out of bounds of the time warp, this returns false. Otherwise it returns true.

SetTwOrgTime <index::integer> <otime::timevalue>

Sets the original time of the time warp key at index index to otime. This returns false if index is out of bounds of the time warp, or otime is not inbetween the two original times of the warp indices surrounding index. This also returns false if you attempt to change the original time of the first and last values in the time warp, since it must remain at the clip boundaries. Otherwise, this returns true.

SetTwWarpTime <index::integer> <wtime::timevalue>

Sets the warped time of the time warp key at index index to wtime. This returns false if index is out of bounds of the time warp, or wtime is not inbetween the two warped times of the warp indices surrounding index. This also returns false if wtime is less than 0 or greater than the scaled local last frame of the clip. Otherwise, this returns true.

InsertWarpAtOrgTime <otime::timevalue>

If otime is at an existing warp key's original time value, or otime is out of bounds of the clip's scaled local bounds, then this returns false. Otherwise it sets a new time warp key, computing the warped time for this key such that the flow is continuous, and it returns true.

See also

Mixer MAXScript Extensions

MAXScript Extensions in character studio


themixer const StructDef

This struct contains a number of system global variables and methods to access the mixerManager class which affects all Character Studio Animation Mixers.

System Global Variables

The following properties are seen as icons in the mixer user interface:

themixer.snapFrames SystemGlobal:snapFrames boolean default:true

themixer.snapToClips SystemGlobal:snapToClips boolean default:false

themixer.lockTransitions SystemGlobal:lockTransitions boolean default:false

The following properties appear in the Preferences dialog in the Mixer user interface:

themixer.showBalanceCurves SystemGlobal:showBalanceCurves boolean default:true

themixer.showClipBounds SystemGlobal:showClipBounds boolean default:true

themixer.showClipNames SystemGlobal:showClipNames boolean default:true

themixer.showClipScale SystemGlobal:showClipScale boolean default:false

themixer.showGlobalFrames SystemGlobal:showGlobalFrames boolean default:true

themixer.showInpoints SystemGlobal:showInpoints boolean default:true

themixer.showOutpoints SystemGlobal:showOutpoints boolean default:false

themixer.showTgRangebars SystemGlobal:showTgRangebars boolean default:true

themixer.showTimeWarps SystemGlobal:showTimeWarps boolean default:true

themixer.showWgtCurves SystemGlobal:showWgtCurves boolean default:true

Methods

<bool>themixer.showMixer()

Show the Mixer. Returns true on success.

<bool>themixer.hideMixer()

Hide the Mixer. Returns true on success.

themixer.addMixerToDisplay <biped_controller>

Adds the Biped the supplied controller belongs to to the Mixer. Returns true on success.

themixer.removeMixerFromDisplay <biped_controller>

Removes the Biped the supplied controller belongs to from the Mixer. Returns true on success.

The following functions are available through icons in the Mixer user interface:

themixer.setAnimationRange()

Sets the animation range. Returns true on success.

themixer.updateDisplay

Updates the Mixer's display. Returns true on success.

themixer.zoomExtents()

Zooms the Mixer's display to the extents of the animation. Returns true on success.

See also

Mixer MAXScript Extensions

MAXScript Extensions in character studio


MAXScript Extensions for Cloth

The following modifiers have been added to 3ds Max 7.5 as part of the Cloth Extension and are integral part of 3ds Max 8 and higher.

Cloth : Modifier

Garment_Maker : Modifier

See also

What was New in MAXScript in 3ds Max 8


Cloth : Modifier

Cloth - superclass: modifier; super-superclass:MAXWrapper - classID: #(1740754247, 2005071992)

The Cloth modifier implements the main element of the Cloth system introduced in 3ds Max 8. It provides access to all simulation parameters and controls the actual simulation process.

Constructor:

Cloth ...

Properties:

Object

.showCurrentState (Show_Current_State) : boolean

Get/Set the state of the Show Current State checkbox in the Object rollout.

.showTargetState (Show_Target_State) : boolean

Get/Set the state of the Show Target State checkbox in the Object rollout.

.showEnabledSolidCollision BooleanClass default: false -- boolean; Show_Enabled_Solid_Collision

Get/Set the state of the Show enabled solid collision checkbox in the Object rollout.

.showEnabledClothCollision BooleanClass default: false -- boolean; Show_Enabled_Cloth_Collision

Get/Set the state of the Show enabled self collision checkbox in the Object rollout.

Selected Object Rollout - Cache

.cacheFile (Cache_File) : string

Get/Set the name of the cache file.

.forceUnc (Force_UNC_path) : boolean

Get/Set the state of the Force UNC Path checkbox. When set to true, a UNC path will be used for the cache file.

.exportCacheAs (Extra_Cache) : boolean

Get/Set whether to export the cache.

.overWriteCache (Overwrite_Cache_File) : boolean

Get/Set whether to overwrite the cache file.

.extraCacheFile (Extra_Cache_File) : string

Get/Set the extra cache file name.

.overWriteExtraCache (Force_UNC_path) : boolean

Get/Set whether to overwrite the extra cache file.

Selected Object Rollout - Property Assignment

.method (Properties_Application_Method) : integer

Get/Set the material properties application method.

Possible values are:

0 - Interpolate (default)

1 - Texture Map

Corresponds to the radio buttons in the Material Params rollout.

.bias (Property_Bias) : float

Get/Set the material interpolation bias. Corresponds to the spinner/slider in the Material Params rollout.

.texture (TextureMap) : texmap

--Naming collision with the Group's .texture property.

.map (Map_Channel_Type) : integer

--Naming collision with the Group's .map property.

.mapChannel (Map_Channel) : integer

--Naming collision with the Group's .mapChannel property.

Selected Object Rollout - Bend Map

.useBendMap (Use_Bend_Map) : boolean

Enable/Disable the use of the Bend map. Corresponds to the checkbox in front of the Bend Map value in the Bend Map group of controls in the Selected Object Rollout.

.bendMapStrength (Bend_Map_Strength) : float

Get/Set the Bend map strenth. Corresponds to the Bend Map value spinner in the Bend Map group of controls in the Selected Object Rollout.

.bendMapSource (Bend_Map_Source) : integer

Get/Set the Bend map source. Corresponds to the radio buttons in the Bend Map group of controls in the Selected Object Rollout.

Possible values are:

0 - Vertex color (default)

1 - Map Channel

2 - Texture Map

.bendMapChannel (Bend_Map_Source_Vertex_Color_Channel) : integer

Get/Set the texture map channel when bendMapSource is set to 1. Corresponds to the Map Channel value in the Bend Map group of controls in the Selected Object Rollout.

.bendMap (Bend_Map) : texturemap

Get/Set the texture map to use as Bend Map. Corresponds to the map button in the Bend Map group of controls in the Selected Object Rollout.

Simulation Parameters Rollout

.scale (cm_per_unit) : float

Get/Set the Scale value in cm/unit.

.useGravity (Use_Gravity) : boolean

Controls the state of the Gravity checkbutton.

.gravity : float

Get/Set the Gravity value.

.timestep (time_step) : float

Get/Set the Step value.

.subsample : integer

Get/Set the Subsample value.

.startFrame (start_frame) : integer

Get/Set the Start Frame value.

.enableEndFrame : boolean

Controls the state of the End Frame checkbox. When set to true, the end frame will be used.

.endFrame (End_Frame) : integer

Get/Set the End Frame value.

.selfCollision (self_collision) : boolean

Controls the state of the Self Collision checkbox. When set to true, the cloth will calculate self-collisions. Animatable.

.clothclothMethod (Cloth_Cloth_Method) : integer

Get/Set the Self-Collision value.

.checkIntersections (Check_Intersections) : boolean

Controls the state of the Check Intersections checkbox. When set to true, the cloth will check for self-intersections.

.solidCollision (solid_collision) : boolean

Controls the state of the Solid Collision checkbox. When set to true, the collision will be calculated as solid.

.useSewingSprings (Use_sewing_springs) : boolean

Controls the state of the Use Sewing Springs checkbox. When set to true, the sewing springs will be used.

.showSewingSprings (Show_sewing_springs) : boolean

Controls the state of the Show Sewing Springs checkbox. When set to true, the sewing springs will be shown.

.simOnRender (Simulate_on_Render) : boolean

Controls the state of the Sim On Render checkbox. When set to true, the simulation will be performed before rendering.

.simPriority (Sim_Priority) : integer

Get/Set the Simulation Priority value.

.advancedPinching (Advanced_Pinching) : boolean

Controls the state of the Advanced Pinching checkbox.

.relativeVelocity (Relative_Velocity_Adjustment) : float

Get/set the relative velocity adjustment value. Not exposed to the UI. Animatable.

.timeScale (Time_Scale) : float

Get/set the time scale value. Not exposed to the UI.

Group - Constraint Parameters:

The following properties are accessible in Vertex Groups. By default, no Vertex Groups exist, resulting in an error message

-- Runtime error: Couldn't find a previously defined paramblock in Cloth

Be sure to create a vertex group before accessing vertex group parameters.

You can also access the properties by specifying the ReferenceTarget:ParamBlock2 as a property of the Cloth modifier. In this case, you might have to use the aliases given in brackets.

FOR EXAMPLE

$MyCloth.cloth.group01.Active

.groupName (Group_Name) : string

Get/Set the group name.

.ConstraintIsActive (Active) : boolean

Get/Set whether the constraint is active or not. Corresponds to the On checkbox in the Group Parameters rollout > Constraint Parameters group of controls.

.ConstraintIsSoft (Is_Soft) : boolean

Get/Set whether the constraint is soft. Corresponds to the Soft checkbox in the Group Parameters rollout > Constraint Parameters group of controls.

.ConstraintOffset (Offset) : float

Get/Set the constraint offset. Corresponds to the Offset spinner in the Group Parameters rollout > Constraint Parameters group of controls.

.OffsetRelative (Offset_is_Relative) : boolean

Get/Set whether the constraint is relative (true) or absolute (false). Corresponds to the rel checkbox in the Group Parameters rollout > Constraint Parameters group of controls.

.constraintStrength (Strength) : float

Get/Set the constraint strength. Corresponds to the Strength spinner in the Group Parameters rollout > Constraint Parameters group of controls.

.useVertexColors (Use_Vertex_Colors) : boolean

Get/Set whether the constraint strength uses the vertex colors. Corresponds to the vc checkbox in the Group Parameters rollout > Constraint Parameters group of controls.

.constraintDamping (Damping) : float

Get/Set the constraint damping. Corresponds to the Damping spinner in the Group Parameters rollout > Constraint Parameters group of controls.

.assigner_type (AssignerType) : integer

Get/Set the assigner type.

Possible values are:

0 - 1-to-1

1 - Blob

Corresponds to the radio buttons in the Group Parameters rollout.

.useRadius (Use_Radius) : boolean

Get/Set whether to use the radius value. Corresponds to the Radius checkbox in the Group Parameters rollout.

.radius : float

Get/Set the radius value. Corresponds to the Radius spinner in the Group Parameters rollout.

Group - Behavior Properties

.useGroupBehavior (Use_Group_Behavior) : boolean

Get/Set the Behavior Settings checkbox in the behavior group of controls.

.groupsolidCollision (Grp_Solid_Collision) : boolean

Get/Set whether the to process solid collisions in the group.

.groupselfCollision (Grp_Self_Collision) : boolean

Get/Set whether the to process self collisions in the group.

.Layer : integer

Get/Set the Layer value in the behavior group of controls.

.keepShape (Keep_Shape) : boolean

Get/Set whether to try to keep the shape. Corresponds to the Keep Shape checkbox in the Group Parameters rollout, behavior group of controls.

.keepShapeFactor (Keep_Shape_Factor) : float

Get/Set the Keep Shape Factor value in the behavior group of controls.

.useGroupProperties (Use_Group_Properties) : boolean

Get/Set whether to use the group properties. Corresponds to the Use These Properties checkbox in the Group Parameters rollout.

Group - Simulation Parameters

.UbendResistance (U_Bend_Resistance) : float

Get/Set the bend resistance along U. Corresponds to the U Bend spinner in the Group Parameters rollout.

.VbendResistance (V_Bend_Resistance) : float

Get/Set the bend resistance along V. Corresponds to the V Bend spinner in the Group Parameters rollout.

.uBendCurve (U_Bend_Curve) : float

Get/Set the bend curve along U. Corresponds to the U B-Curve spinner in the Group Parameters rollout.

.vBendCurve (V_Bend_Curve) : float

Get/Set the bend curve along V. Corresponds to the V B-Curve spinner in the Group Parameters rollout.

.UstretchResistance (U_Strech_Resistance) : float

Get/Set the stretch resistance along U. Corresponds to the U Stretch spinner in the Group Parameters rollout.

.VstretchResistance (V_Stretch_Resistance) : float

Get/Set the stretch resistance along V. Corresponds to the V Stretch spinner in the Group Parameters rollout.

.shearResistance (Shear_Resistance) : float

Get/Set the Shear resistance. Corresponds to the Shear spinner in the Group Parameters rollout.

.density : float

Get/Set the cloth Density. Corresponds to the Density spinner in the Group Parameters rollout.

.thickness : float

Get/Set the cloth thickness. Corresponds to the Thickness spinner in the Group Parameters rollout.

.clothClothForce (Cloth_cloth_force) : float

Get/Set the cloth-cloth force. Corresponds to the Repulsion spinner in the Group Parameters rollout.

.stretchDamping (Stretch_Damping) : float

Get/Set the stretch damping. Corresponds to the Damping spinner in the Group Parameters rollout.

.airDamping (Air_Resistance) : float

Get/Set the air resistance value. Corresponds to the Air Res. spinner in the Group Parameters rollout.

.dynamicFriction (Dynamic_Friction) : float

Get/Set the dynamic friction.

.staticFriction (Static_Friction) : float

Get/Set the static friction.

.clothClothFriction (Cloth_cloth_Friction) : float

Get/Set the cloth-cloth friction. Corresponds to the Self Fric. spinner in the Group Parameters rollout.

.uScale (U_Scale) : float

Get/Set the scale along U.

.vScale (V_Scale) : float

Get/Set the scale along V.

.seamForce (Seam_Force) : float

Get/Set the seam force. Corresponds to the Seam Force spinner in the Group Parameters rollout.

.collisionDepth (Collision_Depth) : float

Get/Set the collision offset. Corresponds to the Depth spinner in the Group Parameters rollout.

.collisionOffset (Collision_Offset) : float

Get/Set the collision offset. Corresponds to the Offset spinner in the Group Parameters rollout.

.Plasticity : float

Get/Set the Plasticity value. Corresponds to the Plasticity spinner in the Group Parameters rollout.

.anisotropic : boolean

Get/Set whether to simulate the cloth as anisotropic. Corresponds to the Anisotropic checkbox in the Group Parameters rollout.

.useEdgeSprings (Use_Edge_Springs) : boolean

Get/Set whether to use Edge Springs. Corresponds to the Use Edge Springs checkbox in the Group Parameters rollout.

.useSolidDepthOffset (Use_Solid_Depth_Offset) : boolean

Get/Set the state of the Use Cloth Depth/Offset checkbox.

.useSolidFricion (Use_Solid_Friction) : boolean

Get/Set whether to use solid friction or not. Not exposed to the UI.

Group - Soft Selection Properties

.useSoftSelection (Use_Soft_Selection) : boolean

Enable/Disable Soft Selection.

.softselUseEdgeDistance (Use_Edge_Distance) : boolean

Enable/Disable the use of Soft Selection distance.

.softselEdgeDist (Edge_Distance) : integer

Get/Set the Soft Selection Edge Distance value.

.softselAffectBackfacing (Affect_Backfacing) : boolean

When set to true, soft-selection affects vertices if back-facing faces.

.softselFalloff (Falloff) : world units

Get/Set the Soft Selection Falloff value.

.softselPinch (Pinch) : float

Get/Set the Soft Selection Pinch value.

.softselBubble (Bubble) : float

Get/Set the Soft Selection Bubble value.

Group - Texture Map Properties

.useTextureMap (Use_Texture_Map) : boolean

Get/Set whether to use the Texture map or not. Corresponds to the Use Texture Map checkbox in the Group Parameters rollout.

.texture (TextureMap) : texmap

Get/Set the Texture map to use. Corresponds to the Texture Map button in the Group Parameters rollout.

.mapChannel (Map_Channel) : integer

Get/Set the map channel to use. Corresponds to the Map Channel spinner in the Group Parameters rollout.

.map (Map_Channel_Type) : integer

Get/Set whether to use the specified Map channel or the Vertex Color channel. Corresponds to the Mapping Channel radio buttons in the Group Parameters rollout.

Group - Other Properties

.frictionVelocityCutoff (Friction_Velocity_Cutoff) : float

Get/Set the friction velocity cutoff. Default is 30.0.

.matID (Constraint_MatID) : integer

Get/Set the Constraint Material ID.

.dynamic_node () : max object

Get/Set the Dynamic node.

Cloth Interfaces:

Interface: clothOps

NOTE:

The clothOps Interface is exposed by the Cloth Modifier and is NOT a global interface.

The methods listed below can be accessed as methods of the Cloth Modifier itself without specifying the clotOps prefix.

Sometimes the methods require the node to be passed as argument because the modifier could be instanced across multiple nodes and MAXScript needs to know which node to use. See example below:

FOR EXAMPLE

$MyObject.modifiers[#Cloth].numberVertices $MyObject

--or

$MyObject.Cloth.numberVertices $MyObject

--which is equivalent to

$MyObject.Cloth.clothOps.numberVertices $MyObject

Methods:

<integer>numberVertices <node>node

Returns the number of vertices in the cloth

<void>selectVertices <bitArray>sel <node>node

Selects the vertices specified by the bitArray in the supplied node.

<bitArray>getSelectedVertices <node>node

Returns the selected vertices in the supplied node as bitArray.

<void>makeConstraint <string>groupname <string>type <node>target_node

Makes a constraint from the given group using the specified type and target node.

<integer>makePointGroup <bitArray>vertex_sel <node>node <string>name

Creates a Point Group with the supplied name from the vertices specified by the bitArray in the supplied node.

<void>deletePointgroup <string>groupname

Deletes the Point Group with the supplied name.

<void>initPointgroup <string>groupname

Initializes the Point Group with the supplied name.

<void>detachPointgroup <string>groupname

Detaches the Point Group with the supplied name.

<void>makeGroupConstraint <string>groupname <string>target_group

Constrains the Point Group with the supplied name to the target group with the supplied name.

<void>simulate <boolean>show_dialog

Starts the simulation. If the parameter is true, shows the simulation dialog.

<void>simulateLocal <integer>stop_condition <float>param <boolean>damped

Starts a local simulation.

<void>stopLocalSimulation()

Stops the local simulation.

<void>eraseSimulation()

Erases the current simulation. Corresponds to pressing the "Erase Simulation" button in the Cloth modifier's UI.

<void>truncateSimulation()

Truncates the current simulation. Corresponds to pressing the "Truncate Simulation" button in the Cloth modifier's UI.

<void>setInitialState <node>node

Sets the current cloth state as the initial state. Corresponds to pressing the "Set Initial State" button in the Cloth modifier's UI.

<void>resetState <node>node

Resets the cloth state. Corresponds to pressing the "Reset State" button in the Cloth modifier's UI.

<void>delObjectCache <node>node

Deletes the Object Cache. Corresponds to pressing the "Delete Object Cache" button in the Cloth modifier's UI.

<void>setObjectType <node>node <integer>type <boolean>updateSim

Sets the object type of the specified node to the type specified by the integer parameter. If updateSim is true, updates the simulation.

Possible type integer values are:

0 - Inactive

1 - Collision Object

2 - Cloth

<integer>getObjectType <node>node

Returns the object type of the specified node as integer.

Possible return values are:

0 - Inactive

1 - Collision Object

2 - Cloth

<void>setObjectProperty <node>node <string>property <fpvalue by value>value

Sets the object property specified by the string name to the supplied value in the specified node.

<string array>showObjectProperties()

Returns an array of strings containing all supported object property names.

<void>grabState <node>node

Grabs the state of the cloth. Corresponds to pressing the "Grab State" button in the Cloth modifier's UI.

<void>addForceField <node>node

Adds the specified Space Warp force to the list of Cloth Forces.

<void>removeForceField <node>node

Removes the specified Space Warp force from the list of Cloth Forces.

<void>flagParticles <bitArray>sel

For internal use only.

<void>exportCache <node>node <string>filename

Exports a cache file for the specified node to the given file name.

<void>importCache <node>node <string>filename

Imports a cache file for the specified node from the given file name.

<void>loadCache <node>node

Loads the cache for the specified node.

<void>loadAllCaches()

Loads all caches.

<void>saveCache <node>node

Saves the cache for the specified node.

<void>saveExtraCache <node>node

Saves an extra cache for the specified node.

<void>saveAllCaches()

Saves all caches.

<void>saveAllExtraCaches()

Saves all extra caches.

<paramBlock2>getObjectParamBlock <node>node

Returns the parameter block of the specified node.

<paramBlock2>getGroupParamBlock <string>groupname

Returns the parameter block of the specified named group.

See also

Garment_Maker : Modifier

MAXScript Extensions for Cloth

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Garment_Maker : Modifier

Garment_Maker - SuperClass:modifier; super-superclass:MAXWrapper - classID: #(940967468, 1610249612)

The Garment_Maker modifier turns a shape into a garment panel to be used in cloth simulations. It provides optimal meshing for achieving wrinkles and cloth-like behavior.

Constructor:

Garment_Maker ...

Properties:

<Garment_Maker>.density Float default: 1.0 -- float

Get/Set the Density value.

<Garment_Maker>.autoMesh BooleanClass default: true -- boolean

Get/Set the state of the Auto mesh checkbox. When true (default), the meshing will be performed automatically. When false, the meshing will be performed manually by either pressing the Mesh It button in the UI or by calling the gmakerOps.meshit() method documented below.

<Garment_Maker>.preserve BooleanClass default: true -- boolean

Get/Set the state of the Preserve checkbox.

<Garment_Maker>.'output type' Integer default: 0 -- integer; Output_Type

Get/Set the output type radio buttons state. Possible values are:

0 - Arranged Panels

1 - Preserved Surface

2 - Flat Panels

<Garment_Maker>.figure UndefinedClass default: undefined -- node

Get/Set the Figure object.

<Garment_Maker>.stretchMapping BooleanClass default: true -- boolean; Stretch_Mapping

Get/Set the state of the Stretch Mapping Coordinates checkbox.

<Garment_Maker>.striptexturescale Float default: 0.1 -- float; Stip_Texture_Scale

Get/Set the strip texture scale value.

<Garment_Maker>.stripwidth Float default: 0.5 -- float; Strip_Width

Get/Set the strip width value.

Garment Maker Interfaces:

Interface: gmakerOps

Methods:

<void>generateDescription()

Generates a new MAXScript description of the currently selected object and outputs it to a new MAXScript Editor window.

SAMPLE OUTPUT CAN LOOK LIKE:

$.modifiers[#garmentmaker].setDensity 0.364000

$.modifiers[#garmentmaker].setSeamTolerance 0.060000

$.modifiers[#garmentmaker].setPanelMatrix 1 (matrix3 [1.000000, 0.000000, 0.000000] [0.000000, 1.000000, 0.000000] [0.000000, 0.000000, 1.000000] [0.000000, 0.000000, 0.000000] )

$.modifiers[#garmentmaker].setFlatPanelMatrix 1 (matrix3 [1.000000, 0.000000, 0.000000] [0.000000, 1.000000, 0.000000] [0.000000, 0.000000, 1.000000] [0.000000, 0.000000, 0.000000] )

$.modifiers[#garmentmaker].setPanelParams 1 1.000000 0 0.001000 0 1

$.modifiers[#garmentmaker].meshIt()

Object Rollout

<void>setDensity <float>density

Sets the cloth density.

<float>getDensity()

Returns the cloth density.

<void>meshIT()

Corresponds to pressing the "Mesh It!" button.

<void>meshItPreserve()

Corresponds to pressing the "Mesh It and Preserve" button.

Panels Rollout

<void>setPanelParams <index>panel <float>density <integer>deform_type <float>curvature <integer>axis <integer>MatID

Sets all parameters of the indexed panel to the specified values.

<integer>getPanelDeformType <index>panel

Returns the deformation type of the indexed panel.

Possible values are:

0 - None

1 - Curved

<void>setPanelDeformType <index>panel <integer>deform_type

Sets the deformation type of the indexed panel to the specified value.

Possible values are:

0 - None

1 - Curved

<float>getPanelDensity <index>panel

Returns the density of the indexed panel.

<void>setPanelDensity <index>panel <float>density

Sets the density of the indexed panel to the specified value.

<integer>getPanelMatID <index>panel

Returns the Material ID of the indexed panel.

<void>setPanelMatID <index>panel <integer>MatID

Sets the Material ID of the indexed panel to the specified ID.

<float>getPanelCurvature <index>panel

Returns the Curvature of the indexed panel.

<void>setPanelCurvature <index>panel <float>curvature

Sets the Curvature of the indexed panel to the specified value.

<integer>getPanelAxis <index>panel

Returns the Axis of the indexed panel.

Possible values are:

0 - X-axis

1 - Y-axis

<void>setPanelAxis <index>panel <integer>axis

Sets the Axis of the indexed panel.

Possible values are:

0 - X-axis

1 - Y-axis

<index>getPanelFromSpline <index>spline

Returns the index of the panel defined by the supplied indexed spline.

<matrix3>getPanelMatrix <index>panel

Returns the matrix of the indexed panel.

<void>setPanelMatrix <index>panel <matrix3>matrix

Sets the matrix of the indexed panel to the supplied matrix3 value.

<matrix3>getFlatPanelMatrix <index>panel

Returns the matrix of the indexed flat panel.

<void>setFlatPanelMatrix <index>panel <matrix3>matrix

Sets the matrix of the indexed flat panel to the supplied matrix3 value.

Curves and Seams Rollouts

<void>setSeamParamsByIndex <index>seam <float>bend_angle <float>bend_stiffness <boolean>enabled <float>sewing_stiffness

Set all parameters of the indexed seam to the supplied values.

<void>ButtonCreateSeam()

Corresponds to pressing the "Create Seam" button.

<void>selectSplines <bitArray>sel

Selects the splines specified by bits set in the supplied bitArray.

FOR EXAMPLE:

theSpline = Donut()

addModifiers theSpline (Garment_Maker())

select theSpline

subObjectLevel = 1 --change to Spline SO mode

theSpline.Garment_Maker.selectSplines #{1} --select the outer spline

sleep 1 --wait a second

theSpline.Garment_Maker.selectSplines #{2} --select the inner spline

sleep 1 --wait another second

theSpline.Garment_Maker.selectSplines #{1,2} --select both splines

<integer>createSeamFromSplines <index>spline1 <index>spline2 <integer>orientation

Creates a seam from the supplied two indexed splines with the given orientation.

<string>makeMultiSegmentFromSplines <int array>indices

Corresponds to pressing the "Make MultiSegment" button for the indexed splines specified in the supplied array.

<float>getSeamTolerance()

Returns the seam tolerance value.

<void>setSeamTolerance <float>tolerance

Sets the seam tolerance to the specified value.

See also

Cloth : Modifier

MAXScript Extensions for Cloth

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


MAXScript Extensions for Hair

MAXScript Extensions for Hair & Fur

The following classes have been added to 3ds Max 7.5 as part of the Hair Extension and are now an integral part of 3ds Max 8 and higher.

HairMod : Modifier

HairEffect : RenderEffect

Interface: Hair

See also

What was New in MAXScript in 3ds Max 8


HairMod : Modifier

The HairMod modifier available since 3ds Max 8 is a world-space modifier controlling the hair generation parameters.

Properties:

Selection Rollout

.byVertex (By_Vertex) : boolean

Get/set the state of the "By Vertex" checkbox.

.ignoreBackfacing (Ignore_Backfacing) : boolean

Get/set the state of the "Ignore Backfacing" checkbox.

General Parameters Rollout

.HairCount (Count) : integer

Get/set the hair count. This is not the absolute number of hairs to be generated, as the final number of hairs is affected by other factors like density maps and cut maps.

.HairSegments (Segments) : integer

Get/set the segments along the length of each hair.

.HairPasses (Passes) : integer

Get/set the hair passes. Higher numbers increase the rendering time linearly and reduce the transparency of each pass.

.HairDensity (Density) : float

Get/set the Hair Density. Default is 100 percent. If a Density Map is assigned, the Hair Density value is used to scale the influence of the Density Map.

.HairScale (Scale) : float

Get/set the Hair Scale. Default is 100 percent. If a Scale Map is assigned, the Hair Scale value is used to scale the influence of the Scale Map.

.HairCutLength (Cut_Length) : float

Get/set the Cut Length. Default is 100 percent. If a Cut Map is assigned, the Hair Cut Length value is used to scale the influence of the Cut Map.

.HairRandScale (Random_Scale) : float

Get/set the Hair Random Scale value which controls the randomness of the hair scale. When this value is 0, all hairs are scaled according to the HairScale and Scale Map values. When set to 100, each hair can be scaled down between 0 and 100%. Default is 40 percent. If a Random Scale Map is assigned, the Hair Random Scale value is used to scale the influence of the Random Scale Map.

.HairRootThickness (Root_Thickness) : float

Get/set the Hair Root Thickness value which controls the thickness of the hair at the base. Default is 12. If a Root Thickness Map is assigned, the Hair Root Thickness value is used to scale the influence of the Root Thickness Map.

.HairTipThickness (Tip_Thickness) : float

Get/set the Hair Tip Thickness value which controls the thickness of the hair at the tip. Default is 0. If a Tip Thickness Map is assigned, the Hair Tip Thickness value is used to scale the influence of the Tip Thickness Map.

.HairDisplacement (Displacement) : float

Get/set the Hair Displacement value which controls the offset of the hair's root from the source surface. Default is 0. If a Displacement Map is assigned, the Hair Displacement value is used to scale the influence of the Displacement Map.

.HairInterpolateGuides (Hair_Interpolate_Guides) : boolean

Toggle the Guides Interpolation on and off. When turned on (default), the hair guides will be interpolated across the surface. When turned off, maximum one guide will be drawn from the center of each triangle face. In both cases, the Density value / map will be taken into account.

Material Parameters Rollout

.MaterialOccludedAmb (Ambient_Diffuse) : float

Get/set the Occluded Amb value. Default is 40.

.MaterialTipColor (Tip_Color) : RGB color

Get/set the Tip color. If a Tip Color Map is assigned, the Tip color will be multiplied by the Map color value to determine the final color.

.MaterialRootColor (Root_Color) : RGB color

Get/set the Root color. If a Root Color Map is assigned, the Root color will be multiplied by the Map color value to determine the final color.

.MaterialHueVariation (Hue_Variation) : float

Get/set the Hue Variation value. This parameter specifies the range within which the Hue value of the hair color should be varied. Higher values result in hair strands with different colors.

.MaterialValueVariation (Value_Variation) : float

Get/set the Value Variation value. This parameter specifies the range within which the Value of the hair color should be varied. Higher values result in brighter/darker strands.

.MaterialMutantHairColor (Mutant_Color) : RGB color

Get/set the Mutant Hair Color. Mutant Hairs are randomly selected and receive this color. Mutant hairs can be used to mix in hairs with a different (for example grey or white) color.

.MaterialPercentMutantHair (Mutant_Percent) : float

Get/set the Mutant Percentage value. This parameter controls the percentage of hairs to receive the Mutant Hair Color.

.MaterialSpecular (Specular) : float

Get/set the Specular value.

.MaterialGlossness (Gloss) : float

Get/set the Glossiness value.

.MaterialSelfShadow (Self_Shadow) : float

Get/set the Self Shadow value. This parameter controls the magnitude of the self shadowing. A value of 0.0 defeats self shadowing, while a value of 100.0 results in maximum self shadowing. Default is 100.0

.MaterialGeomShadow (Geom_Shadow) : float

Get/set the Geom. Shadow value. Default is 100.0

.MaterialGeomMtlID (Geom_Mtl_ID) : integer

Get/set the Geom. Mat. ID value. Default is 1

Frizz Parameters Rollout

The Frizz effect calculates two Perlin noise fields and displaces the root and the tip of the hair. Both noise fields share the same frequency settings, and the same tip/root amplitudes. One of the noise fields is static relative to the hair. The second field can be animated through the hair over time to achieve effects like grassy fields in the wind with small computational overhead compared to real dynamics.

.FrizzRoot (Frizz_Root) : float

Get/set the Frizz Root value. Default is 15.5. This parameter controls the displacement of the hair at its root relatively to the surface normal. When Frizz Root is set to 0, the root of the hair is parallel to the surface normal.

.FrizzTip (Frizz_Tip) : float

Get/set the Frizz Tip value. Default is 130.0. This parameter controls the displacement of the hair's tip.

.FrizzFreqX (Frizz_Freq_X) : float

.FrizzFreqY (Frizz_Freq_Y) : float

.FrizzFreqZ (Frizz_Freq_Z) : float

Get/set the Frizz Frequency values in all 3 axes. These parameters control the frequency of the Frizz displacement noise fields.

.FrizzAnim (Frizz_Anim) : float

Get/set the Frizz Anim value which adjusts the bias between the contributions of the static and animated noise fields. When set to 0, only the static field affects the hair. When set to 1, only the animated field affects the hair. If Anim Speed is set to 0, then a value of 1 will produce an identical result to a setting of 0 (if Anim Speed is set to 0, both noise fields will be coincident).

.FrizzAnimSpeed (Frizz_Anim_Speed) : float

Get/set the Anim Speed value. It is a multiplier controlling the speed at which the second (animated) noise field moves through space. When set to 0, there will be no effect when increasing the Frizz Anim parameter. This value is multiplied by the X, Y, and Z components of the Frizz Anim Dir to determine the per frame offset of the animated noise field.

.FrizzAnimDir (Frizz_Anim_Dir) : point3

Get/set the Frizz Anim Dir vector which controls the direction of the frizz animation. This vector is not normalized before use. This means that you can apply little tweaks to the values to achieve fine control over the speed of the animation on a given axes.

Kink Parameters Rollout

The kink displacement works similar to Frizz, but it evaluates noise lookups along the whole length of the guide.

.KinkRoot (Kink_Root) : float

Get/set the Kink Root value.

.KinkTip (Kink_Tip) : float

Get/set the Kink Tip value.

.KinkFreqX (Kink_Freq_X) : float

.KinkFreqY (Kink_Freq_Y) : float

.KinkFreqZ (Kink_Freq_Z) : float

Get/set the Kink Frequency values in all 3 axes.

Multi Strand Parameters Rollout

Multi Strand generates clumps of hair by scattering multiple hair strands per each hair strand that would normally be rendered.

.MultiStrandCount (Multi_Strand_Count) : integer

Get/set the Count value. This parameter controls how many hairs will be generated per clump.

.MultiStrandRootSplay (Root_Splay) : float

Get/set the Root Splay value. This parameter varies the offset from the center of the clump at the root.

.MultiStrandTipSplay (Multi_Strand_Tip_Splay) : float

Get/set the Root Splay value. This parameter varies the offset from the center of the clump at the tip.

.MultiRandomize (Multi_Strand_Random) : float

Get/set the Randomize value. This parameter varies the scale of each hair in the clump.

Dynamics Parameters Rollout

.dynamicsMode (Dynamics_Mode) : integer

Get/set the Dynamics Mode.

Possible values are:

0 - None

1 - Live

2 - Precomputed

.simulationStart (Simulation_Start) : integer

Get/set the Simulation Start value.

.simulationEnd (Simulation_End) : integer

Get/set the Simulation End value.

.DynamicsGravity (Gravity) : float

Get/set the Gravity value.

.DynamicsStiffness (Stiffness) : float

Get/set the Stiffness value.

.DynamicsRootHold (Root_Hold) : float

Get/set the Root Hold value.

.DynamicsDampen (Dampen) : float

Get/set the Dampen value.

.collisionMethod (Collision_Method) : integer

Get/set the Collision method.

Possible values are:

0 - None

1 - Sphere

2 - Polygon

.autoCollision : boolean

Toggle the "Use Growth Object" option on and off. Default is off.

.collisionNodes (Collision_Nodes) : node array

Get/set the list of collision nodes.

.forceFields (Force_Fields) : node array

Get/set the list of External Forces.

Display Parameters Rollout

.displayShowGuides (Display_Show_Guides) : boolean

Toggle the " Display Guides" option on and off. Default is off.

.DisplayGuideColor (Guide_Color) : RGB color

Get/set the Guide Color value.

.displayShowHairs (Display_Show_Hairs) : boolean

Toggle the "Display Hairs" option on and off. Default is on.

.DisplayHairColor (Hair_Color) : RGB color

Get/set the Hair Guide Color value.

.DisplayHairPercent (Hair_Percentage) : float

Get/set the Display Percentage value. This parameter controls the percentage of hairs to be displayed in the viewports.

.DisplayMaxHairs (Max_Display_Hairs) : integer

Get/set the Max. Hairs value. This parameter controls the absolute maximum number of hairs to be displayed in the viewports.

.displayHairAsGeometry (Display_Hairs_As_Geometry) : boolean

Toggle the "As Geometry" option on and off. Default is off. When set to true, the hair strands will be displayed as geometry. When set to false, the hairs will be displayed as lines.

Map Controls

.maps : texturemap array

Get/set the texture maps assigned to the hair controls.

Possible indices into the texture map array are:

1 - Density Map

2 - Cut Map

3 - Scale Map

4 - Rand. Scale Map

5 - Root Thickness Map

6 - Tip Thickness Map

7 - Self Shadow Map

8 - Geom.Shadow Map

9 - Specular Map

10 - Glossiness Map

11 - Occluded Amb. Map

12 - Tip Color Map

13 - Hue Variation Map

14 - Value Variation Map

15 - Root Color Map

16 - Mutant Color Map

17 - Mutant Percentage Map

18 - Frizz Root Map

19 - Frizz Tip Map

20 - Frizz X Frequency Map

21 - Frizz Y Frequency Map

22 - Frizz Z Frequency Map

23 - Frizz Anim Map

24 - Anim Speed Map

25 - Kink Root Map

26 - Kink Tip Map

27 - Kink X Frequency Map

28 - Kink Y Frequency Map

29 - Kink Z Frequency Map

30 - Multi Strand Count Map

31 - Multi Strand Root Splay Map

32 - Multi Strand Tip Splay Map

33 - Multi Strand Randomize Map

34 - Dynamic Stiffness Map

35 - Dynamic Root Hold Map

36 - Dynamic Dampen Map

37 - Displacement Map

.mapEnables (Maps_Enable) : boolean array

Get/set the elements of the array controlling whether to use the respective texture maps listed above. Setting the i-th element to false disables the texture map temporarily without removing it from the map slot - the capital "M" on the button turns into a lower-case "m". The indices into the array are identical to the ones listed above.

Instance Node

.mergeInstanceMaterial (Merge_Instance_Material) : boolean

Get/set the state of the "Merge Material" checkbox in the "Instance Node" group of controls in the Tools rollout. When set to true, the material assigned to the instance node will be used.

Hair Interfaces

Interface: Hair

Methods:

NOTE:

The same modifier can be applied as instance to multiple scene nodes.

Some of the methods below provide an optional instance: keyword parameter. If supplied, only the instance of the modifier applied to the specified node will be affected. If not supplied, all nodes sharing the modifier will be affected.

Tools Rollout

<void>LaunchGUI instance:<node>

instance default value: undefined

Opens the Hair Style editor window. If the optional instance keyword parameter is supplied, only the hair instance applied to the given node will be loaded in the Style editor.

Corresponds to pressing the "Style Hair..." button in the Tools rollout.

<void>RecombFromSplines <node>shapeNode instance:<node>

instance default value: undefined

Converts the Hair to Mesh. If the optional instance keyword parameter is supplied, the hair from the given node will be converted. Corresponds to pressing the "Hair -> Mesh" button in the Tools rollout.

<void>ResetRest instance:<node>

instance default value: undefined

Resets the Rest. If the optional instance keyword parameter is supplied, the hair from the given node will be reset. Corresponds to pressing the "Reset Rest" button in the Tools rollout.

<void>RegrowHair instance:<node>

instance default value: undefined

Regrows the Hair. If the optional instance keyword parameter is supplied, the hair from the given node will be regrown. Corresponds to pressing the "Regrow Hair" button in the Tools rollout.

Tools Rollout - Presets

<void>LoadPreset <filename>presetName

Loads the Preset with the given name. Corresponds to pressing the "Load" button in the "Presets:" group of controls in the Tools rollout.

<void>SavePreset <filename>presetName

Saves a Preset under the given name. Corresponds to pressing the "Save" button in the "Presets:" group of controls in the Tools rollout.

Tools Rollout - Hairdo

<void>CopyHairdo instance:<node>

instance default value: undefined

Copies the Hairdo. If the optional instance keyword parameter is supplied, the hair will be copied from the given node. Corresponds to pressing the "Copy" button in the "Hairdo:" group of controls in the Tools rollout.

<void>PasteHairdo instance:<node>

instance default value: undefined

Pastes the Hairdo. . If the optional instance keyword parameter is supplied, the hair will be pasted onto the given node. Corresponds to pressing the "Copy" button in the "Hairdo:" group of controls in the Tools rollout.

Tools Rollout - Instance Node

<boolean>SetInstance <node>instance

Sets the Instance to the given node.

<void>ClearInstance()

Removes the Instance node.

Tools Rollout - Convert

<node>ConvertGuidesToSplines instance:<node>

instance default value: undefined

Converts the Guides to Splines. If the optional instance keyword parameter is supplied, the hair from the given node will be converted. Corresponds to pressing the "Guides -> Splines" button in the Tools rollout.

<node>ConvertHairsToSplines instance:<node>

instance default value: undefined

Converts the Hair to Splines. If the optional instance keyword parameter is supplied, the hair from the given node will be converted. Corresponds to pressing the "Hair -> Splines" button in the Tools rollout.

<node>ConvertToMesh instance:<node>

instance default value: undefined

Converts the Hair to Mesh. If the optional instance keyword parameter is supplied, the hair from the given node will be converted. Corresponds to pressing the "Hair -> Mesh" button in the Tools rollout.

See also

MAXScript Extensions for Hair & Fur

What was New in MAXScript in 3ds Max 8


Interface: Hair

Interfaces > Core Interfaces > Hair

The Hair Interface available since 3ds Max 7.5 provides some useful utility functions related to the Hair Extension.

Interface: Hair

Methods:

<void>Purge()

Removes all traces of Hair elements from the current scene, including all HairMod WSMs from all "hairy" objects and the HairEffect RenderEffect from the Render Effects list in the Effects tab of the Environment and Effects dialog.

<void>AddMod <node array>nodes

Adds a HairMod to all supplied nodes. Shows the Presets dialog to pick a hair stile first.

<void>AddEffect <boolean>showGUI

Adds a HairEffect RenderEffect to the Effects dialog. If the showGUI argument is passed as true, also opens the Environment and Effects dialog to show the Hair Render user interface.

If a Hair Render effect already exists on the list of Effects and true is passed as argument, only opens the dialog with the User Interface.

<boolean>CanUseLights <node array>nodes

Returns true if at least one of the supplied lights can be used, false if none of the supplied light can be used by the hair renderer.

<void>AddHairProperties <node array>nodes

Adds a "Hair Light Attr" rollout to one or more spot lights passed as argument. If any of the nodes are not spot lights, they will be ignored. Corresponds to the "Add hair properties" button in the Lighting group of controls in the Hair & Fur Effect's rollout.

<void>RemoveHairProperties <node array>nodes

Removes the "Hair Light Attr" rollout from one or more spot lights passed as argument. If any of the nodes are not spot lights, they will be ignored.
Corresponds to the "Remove hair properties" button in the Lighting group of controls in the Hair & Fur Effect's rollout.

<void>ExportDRA <filename>draFileName <integer>voxels

Exports a DRA file to the specified file name using the supplied voxel count.

See also

MAXScript Extensions for Hair & Fur

What was New in MAXScript in 3ds Max 8


HairEffect : RenderEffect

HairEffect - superclass: renderEffect; super-superclass:MAXWrapper - classID: #(988153529, 337462665)

The HairEffect RenderEffect available since 3ds Max 8 is responsible for the rendering of the hair.

Constructor:

HairEffect...

USAGE

theHair = HairEffect() --create an instance of the effect

addEffect theHair --add to the list in the Effects dialog

--BUT!

--Adding a Hair WSM to a scene object will add

--a HairEffect to the list automatically!

--Thus, you can simply get the existing one:

addModifier $Sphere01 (HairMod()) --add Hair WSM to Sphere01

--At this point, if no HairEffect exists in the Effects dialog,

--it will be added automatically. Let's find it by going through

--all effects by index and asking each one for its class:

theEffects = for i = 1 to numEffects where \

classof getEffect i == HairEffect collect (getEffect i)

--At this point we should have at least one HairEffect.

--Let's take the first one:

if theEffects.count > 0 do theHair = theEffects[1]

Roll over and click a group of controls to jump to relevant properties:

Properties:

Hair Rendering Options

<HairEffect>.hairMode Integer default: 1 -- integer; Hair_Mode

Get/set the Hair Rendering Mode.

Possible values are:

1 - buffer (default)

2 - geometry

3 - MR prim

<HairEffect>.lightingMode Integer default: 1 -- integer; Lighting_Param

Get/set the Hair Lighting Mode.

Possible values are:

0 - emulation

1 - native (default)

<HairEffect>.mrVoxelRes Integer default: 5 -- integer; mr_Voxel_Res

Get/set the mental ray voxel resolution. Default is 1. This property is used when translating Hair to mental ray.

<HairEffect>.Raytrace_Reflections_Refractions BooleanClass default: false -- boolean; Raytrace_the_Reflections_and_Refractions

Get/set the state of the Raytrace Reflections/Refractions checkbox.

Motion Blur

<HairEffect>.mbDuration Float default: 0.5 -- float; MB_Duration

Get/set the Motion Blur duration value. Default is 0.5

<HairEffect>.mbIntervalType Integer default: 1 -- integer; MB_Interval_Type

Get/set the Motion Blur type.

Possible values are:

0 - start

1 - middle (default)

2 - end

Buffer Rendering Options

<HairEffect>.overSampling Integer default: 3 -- integer

Get/set the Oversampling option.

The values corresponding to the options in the User Interface are:

1 - draft

3 - low

8 - med

15 - high

23 - maximum

<HairEffect>.tileMemoryUsage Integer default: 70 -- integer; Tile_Memory_Usage_Param

NEW in 3ds Max 2009: Get/set the Tile Memory Usage value in MB.

<HairEffect>.transparencyDepth Integer default: 30 -- integer; Transparency_Depth_Param

NEW in 3ds Max 2009: Get/set the Transparency Depth value.

Composite Method

<HairEffect>.compositionMethod Integer default: 0 -- integer; Composition_Method

Get/set the Composite method when rendering in Buffer mode.

Possible values are:

0 - Normal (default)

1 - GBuffer

2 - None

3 - Off

Occlusion Objects

<HairEffect>.occlusionSetType Integer default: 0 -- integer; Occlusion_Set_Type

Get/set the Occlusion type.

Possible values are:

0 - Auto (default)

1 - All

2 - Custom

<HairEffect>.occlusionNodes ArrayParameter default: #() -- node array; Occlusion_Nodes; SubAnim

Get/set the Occlusion Nodes array. Default is #()

Global Illumination

<HairEffect>.applyGI BooleanClass default: false -- boolean; Apply_GI

NEW in 3ds Max 2009: Get/set the state of the Apply Skylight checkbox.

<HairEffect>.GI_Multiplier Float default: 2.0 -- float

NEW in 3ds Max 2009: Get/set the value of the Multiplier slider.

Lighting

<HairEffect>.shadowDensity Float default: 100.0 -- animatable; float; Shadow_Density

Get/set the Shadow Density value. Specifies the relative darkness of the shadows. At the default/highest value, 100.0, shadows are darkest. At the lowest value, 0.0, shadows are fully
transparent, so they don't render. Range 0.0 to 100.0. Default is 100.0.

<HairEffect>.useAllLights BooleanClass default: true -- boolean; Use_All_Lights

Get/set the state of the Use All Lights option. Corresponds to the "Use all lights at render time" checkbox in the UI.

When set to true (default), causes all spot lights in the scene to illuminate and cast shadows from hair when the scene is rendered. When set to false, only spot lights with Hair properties will affect hair.

For details on adding and removing Hair properties to/from spot lights, see the methods addHairProperties and removeHairProperties in Interface: Hair

See also

MAXScript Extensions for Hair & Fur

What was New in MAXScript in 3ds Max 8


Particle Flow and MAXScript

Particle Flow is an extremely versatile and powerful particle system for 3ds Max. Like with most components of 3ds Max, Particle Flow classes are largely exposed to MAXScript giving the user access to creation parameters, properties and methods. In addition, Particle Flow features MAXScript-based operators and tests and provides support for scripting control over certain values via Particle Flow’s value channels.

The following Chapters describe various aspects of Particle Flow access in MAXScript:

Using MAXScript with Particle Flow

Limitations on using MAXScript with Particle Flow

Particle Flow Interfaces

Particle Flow Classes

Particle View Access

Particle Flow Internal Classes

Using MAXScript in Script Actions

Particle Flow Sample Scripts


Using MAXScript with Particle Flow

MAXScript can be used with Particle Flow for the following tasks:

  • Creating new instances of exposed Particle Flow classes. See Particle Flow Classes for a list of all exposed classes.

  • Accessing properties and methods of existing Particle Flow objects (Sources, Events, Operators, Tests etc.), either created by the user via the UI or by MAXScript.

  • Controlling values in the Integer, Float, Vector etc. channels supported by Particle Flow. Certain Particle Flow actions have built-in options to access these channels to control some of their properties.

  • Updating particle values in the PF_Source using the Every Step Update and Final Step Update scripts.

  • Controlling particle creation using the Birth_Script action.

  • Creating custom Particle Flow operators using the Script_Operator action.

  • Creating custom tests using the Script_Test action.

  • Low-level access to the Particle Flow system components using their Interfaces ’ Properties and Methods.

See also

Particle Flow and MAXScript

Particle Flow Classes

Particle Flow Interfaces


Limitations on using MAXScript with Particle Flow

MAXScript can be used in the Every Step and Final Step scripts of the PF_Source and in the Scripted Actions – Birth_Script , Script_Operator and Script_Test .

These scripts are executed very often and in a very special environment, for example, during rendering. This is why it is not possible to use all MAXScript commands with Particle Flow.

Here are some known limitations:

  • You cannot reset 3ds Max from inside a Particle Flow script.

  • You cannot create a new 3ds Max scene.

  • You cannot open an existing .MAX file.

  • You cannot merge a MAX file with the current scene.

  • You cannot create or delete Particle Flow Operators.

  • You cannot excessively create objects during the evaluation of Particle Flow scripts (for example inside the on Proceed method).

  • You cannot delete objects from inside a Particle Flow script.

    • NOTE:

    There are techniques allowing the creation of a limited number of new objects as shown in the Fragmentation script example .

    • The MAXScript snapshotasmesh method should not be used during render time (like in the Proceed method), or all objects that the shapshotasmesh method is used upon should be hidden during render, otherwise a crash will occur.

    See also

    Particle Flow and MAXScript

    Using MAXScript with Particle Flow


Particle Flow Interfaces

The following Global Interface is exposed by Particle Flow:

particleFlow Global Interface

The following Interfaces are exposed by various Particle Flow Classes:

Interface: action

Interface: ActionList

Interface: initialEvents

Interface: integrator

Interface: MaxscriptParticleContainer

Interface: operator

Interface: particleObjectExt

Interface: pfSystem

Interface: PViewItem

Interface: test

See also

Particle Flow Classes


particleFlow Global Interface

Interfaces > Core Interfaces > ParticleFlow

Particle Flow provides the Core Interface particleFlow.

Methods:

<void>beginEdit()

<void>endEdit()

Block the Event encapsulation of Particle Flow Actions created via MAXScript.

When a Particle Flow Action (Operator or Test) is created, it is automatically encapsulated into a Particle Flow Event. This is done since all Particle Flow Actions should belong to an Event.

Sometimes this behavior can be undesired and become an obstacle when creating Actions via MAXScript. To avoid this, the pair beginEdit / endEdit can be used.

<node>openParticleView()

Opens the Particle View. Returns the Particle View node .

EXAMPLE:

--Disable Automatic Event Encapsulation

particleFlow.beginEdit()

OK

--Create a new Find_Target Action

ft = Find_Target()

$Find_Target:Find Target 01 @ [0.000000,0.000000,0.000000]

--Enable Automatic Event Encapsulation again

particleFlow.endEdit()

OK

--Open Particle View and take a look:

pview = particleFlow.openParticleView()

$Particle_View:Particle View 01 @ [0.000000,0.000000,0.000000]

--As expected, Find_Target will not appear inside

--an Event in Particle View

You can use the following short MacroScript to generate an ActionItem that can be placed on a Toolbar, Menu, QuadMenu or Keyboard Shortcut to quickly open Particle View even when there is no PF_Source in the scene.

SAMPLE SCRIPT:

macroScript PView_Open

category: "Particle View"

buttontext: "Open PView"

tooltip: "Open Particle View"

(

-- Open Particle View

particleFlow.openParticleView()

)

<node>scriptRunner()

This method is used in PF_Source Every Step Update and Final Step Update scripts to identify the actual PF_Source that is currently running the script.

EXAMPLE:

pf= particleFlow.ScriptRunner()

<int>getActionOrder()

Get the Particle Flow Action Order.

<void>setActionOrder <integer>order

Set the Particle Flow Action Order.

Possible values are:

0: Globals First - At each integration step, Particle Flow first applies actions in the global event, and then actions in the other (local) events. Typically, the result is that actions in the local events override comparable actions in the global event.

1: Locals First - At each integration step, Particle Flow first applies actions in the local events, and then actions in the global event. Typically, the result is that actions in the global event override comparable actions in the local events

NOTE:

For predictable results, don't use similar actions in the global and local events. However, if comparable actions do exist in both the global event and other events, Particle Flow applies them to the system in the order specified here. Typically, the effect that's applied last is the one that's visible in the particle system. Default is 1: Locals First.

<int>getUpdateType()

Get the Particle Flow Update Type.

<void>setUpdateType <integer>type

Set the Particle Flow Update Type.

Possible values are:

0 : Complete mode - the whole particle animation is recalculated starting at the first frame.

1 : Forward mode - particles aren't updated right away. At playback time the particle history is not recalculated. Only new events that will happen with the particles have new settings.

NOTE:

The Update Type determines how Particle Flow updates the system when you change a parameter during playback. Because the state of the particle system at any given frame can depend on events in previous frames, using the Complete option can provide a more accurate depiction of the result of the change, at a cost in speed; it takes more time to recalculate the entire system starting at the first frame. Default is 0: Complete.

See also

PF_Source : GeometryClass

Particle Flow Interfaces

Every Step Update Example

Final Step Update Example


Interface: action

The action Interface is exposed in all Particle Flow Action Classes.

Methods:

<bool>init <IObject>container <object>particleSystem <node>particleSystemNode <&object array>actions <&node array>actionNodes

actions is In and Out parameter

actionNodes is In and Out parameter

Initializes the Action. Lets you calls the Init method of an Action from inside a Script_Operator’s on Init... handler. For an example, see Speed Operator in Script Operator Example

<bool>release <IObject>container

Releases the specified particle container. Lets you call the Release method of an Action from inside a Script_Operator’s on Release... handler. For an example, see Speed Operator in Script Operator Example

<interval by value>activityInterval()

Returns the activity interval.

<bool>isFertile()

Returns true if the action is fertile (generates particles).

<bool>isNonExecutable()

Returns true if the action is non executable.

<bool>supportRand()

Returns true if the action supports randomization.

<integer>getRand()

Returns the current random seed value.

<void>setRand <integer>randomSeed

Sets the random seed to the supplied integer value.

<integer>newRand()

Generates a new random seed and returns its value.

<bool>isMaterialHolder()

Returns true if the action is a material holder.

<material>getMaterial()

Returns the material if the action is a material holder. This method is not supported by actions for which .isMaterialHolder() returns false.

<bool>setMaterial <material>material

Sets the material, returns true when successful. This method is not supported by actions for which .isMaterialHolder() returns false.

<bool>supportScriptWiring()

Returns true if the action supports script wiring.

<void>makeUnique()

Converts an instanced action to a copy that's unique to its event.

EXAMPLES AND RESULTS

--Create a Find_Target action

ft = find_target()

$Find_Target:Find Target 01 @ [0.000000,0.000000,0.000000]

--Create a Birth_Script action

bs = birth_script()

$Birth_Script:Birth Script 01 @ [0.000000,0.000000,0.000000]

–-Create a Material_Dynamic action

md = material_dynamic()

$Material_Dynamic:Material Dynamic 01 @ [0.000000,0.000000,0.000000]

--Create a Force action

fc = force()

$Force:Force 01 @ [0.000000,0.000000,0.000000]

--Does it create particle?

--No, Find_Target doesn’t

ft.isFertile()

false

bs.isFertile()

true

--Are they non-executable?

ft.isNonExecutable()

false

bs.isNonExecutable()

false

--Do they support randomization?

ft.supportRand()

true

--Does this Action support Randomization? Yes!

bs.supportRand()

true

--Get the current random seed of the Find_Target

ft.getRand()

12345

--Set a new random seed

ft.setRand 23456

OK

--Get the new random seed

ft.getRand()

23456

--Generate new random seed

ft.newRand()

30642

--Get the new random seed

ft.getRand()

30642

--Check if the action is a material holder - This one isn’t...

ft.isMaterialHolder()

false

--...But this one is

md.isMaterialHolder()

true

--This one doesn’t have a material assigned yet –

-- nothing to get yet.

md.getMaterial()

undefined

--Assign a new material

md.setMaterial (standard name:"PF")

true

--Now try to get the material again - It is there now!

md.getMaterial()

PF:Standard

--Does Find_Target support Wiring?

--No, it doesn’t.

ft.supportScriptWiring()

false

--Does Force support Wiring?

--Yes, it does!

fc.supportScriptWiring()

true

This Interface is available in:

Age_Test : Helper

Birth : Helper

Birth_Script : Helper

Cache : Helper

Collision : Helper

Collision_Spawn : Helper

DeleteParticles : Helper

Find_Target : Helper

Force : Helper

Go_To_Rotation : Helper

Keep_Apart : Helper

mapping : Helper

Material_Dynamic : Helper

Material_Frequency : Helper

Material_Static : Helper

Notes : Helper

PF_Source : GeometryClass

Position_Icon : Helper

Position_Object : Helper

rotation : Helper

Scale_Test : Helper

Script_Test : Helper

Script_Operator : Helper

Send_Out : Helper

shapeStandard : Helper

Shape_Facing : Helper

Shape_Instance : Helper

Shape_Mark : Helper

Spawn : Helper

speed : Helper

SpeedByIcon : Helper

Speed_By_Surface : Helper

Speed_Test : Helper

Split_Amount : Helper

Split_Selected : Helper

Split_Source : Helper

See also

Particle Flow Interfaces

Speed Operator in Script Operator Example


Interface: ActionList

The ActionList Interface is exposed by the Event Class.

It lets you add and removed Actions to/from the Event, test the type of the Actions on the list and control the Event’s appearance in the Particle View.

Methods:

<integer>numActions()

Returns the number of actions in the list.

<node>getAction <index>index

Returns the indexed action from the list.

<bool>appendAction <node>action

Appends the specified action to the list, returns true on success.

See VolumeDocking Sample Script for a complete example.

<bool>insertAction <node>action <index>index

Inserts the specified action in the list at the position defined by the index value. Returns true on success.

See VolumeDocking Sample Script for a complete example.

<bool>removeAction <index>index

Removes the indexed action from the list. Returns true on success.

<bool>hasAction <node>action <&index>index

index is In and Out parameter

Returns true if the specified action is on the list. When true, the by-reference index variable will contain the actual index of the existing action on the list.

<bool>isAction <node>action

Returns true if the specified node is an action.

<bool>isOperator <node>action

Returns true if the specified node is an operator.

<bool>isTest <node>action

Returns true if the specified node is a test.

<bool>isActivated()

Returns true if activated.

<void>activate <bool>active

Sets the active state to the boolean value specified by the active parameter.

<integer>isActionActive <index>index

Returns 1 if the indexed action is active, 0 otherwise.

<void>activateAction <index>index <integer>active

Sets the active flag of the indexed action. 0 = inactive, 1= active

<void>getPViewLocation <&integer>x <&integer>y

x is In and Out parameter

y is In and Out parameter

Returns the x and y location of the Particle View in the by-reference parameters.

<void>setPViewLocation <integer>x <integer>y

Sets the Particle View location to the specified integer values.

X and Y Range is from 0 to 64000.

<integer>getPViewZOrder()

Returns the Particle View Z order.

<void>setPViewZOrder <integer>z order

Sets the Particle View Z Order. Range is from 0 to 64000.

<integer>getListWidth()

Returns the List Width.

<void>setListWidth <integer>width

Sets the List width. Range is from 100 to 1000 pixels.

<integer>getPViewRightBoundary()

Returns the right boundary of the Particle View.

<bool>isCollapsed()

Returns true if the action list is collapsed.

NOTE:

Collapsing is not implemented yet.

<void>collapse()

Collapses the action list.

NOTE:

Collapsing is not implemented yet.

<void>expand()

Expands the action list.

NOTE:

Expanding is not implemented yet.

<bool>hasUpStream()

Returns true if the action list has an upstream list.

EXAMPLES AND RESULTS

--Open Particle View to see results

ParticleFlow.openParticleView()

--Create an empty event

ev = Event()

$Event:Event 02 @ [0.000000,0.000000,0.000000]

--Get the number of actions – the Event IS empty...

ev.numActions()

0

--Disable Automatic Event Encapsulation

particleFlow.beginEdit()

OK

--Create a new Find_Target Action

ft = find_target()

$Find_Target:Find Target 01 @ [0.000000,0.000000,0.000000]

--Enable Encapsulation again

particleFlow.endEdit()

OK

--Append the Find_Target to the Event

ev.appendAction ft

true

--Get the first action in the Event...

ev.getAction 1

$Find_Target:Find Target 01 @ [0.000000,0.000000,0.000000]

--Let’s create another Action...

particleFlow.beginEdit()

OK

--This time a Birth Action

bt = birth()

$Birth:Birth 01 @ [0.000000,0.000000,0.000000]

particleFlow.endEdit()

OK

--Insert the Birth at first position

ev.insertAction bt 1

true

--Try to insert the Find_Target –

--You cannot - it is already in the Event!

ev.insertAction ft 1

false

--Remove the second event (Find_Target)

ev.removeAction 2

true

--Initialize a variable to pass by reference

ind = 0

0

--Check if the Birth is in the Event - It is!

ev.hasAction bt &ind

true

--The by-reference variable has the index

ind

1

--See if Find_Target is also there -

--It isn’t anymore.

ev.hasAction ft &ind

false

--See if Birth is an Action...

ev.isAction bt

true

--See if Find_Target is an Action...

ev.isAction ft

true

--See if Birth is an Operator...

ev.isOperator bt

true

--See if Find_Target is an Operator...

ev.isOperator ft

false

--See if Birth is a Test...

ev.isTest bt

false

--See if Find_Target is a Test...

ev.isTest ft

true

--See if the Event is activated...

ev.isActivated()

true

--Deactivate it!

ev.activate false

OK

--Now it is deactivated.

ev.isActivated()

false

--Activate it again.

ev.activate true

OK

--Works!

ev.isActivated()

true

--See if the Birth action is active

ev.isActionActive 1

1

--Deactivate the Birth action

ev.activateAction 1 0

OK

--Did it work?

ev.isActionActive 1

0

--Back to Active

ev.activateAction 1 1

OK

--Birth is back to work!

ev.isActionActive 1

1

--Initialize some variables to pass by reference

x = y = 0

0

--Get the Event location in Particle View

ev.getPViewLocation &x &y

OK

--X now contains the X coordinate...

x

27

--...and Y the Y coordinate

y

14

--Let’s change the location to 40,40

ev.setPViewLocation 40 40

OK

--Get again to make sure it worked...

ev.getPViewLocation &x &y

OK

x

40

y

40

--Get the Z order of the Event

ev.getPViewZOrder()

1

--Set the Z order down to 0

ev.setPViewZOrder 0

OK

--Check that it worked

ev.getPViewZOrder()

0

--Get the width of the Event

ev.getListWidth()

180

--Set the width to something larger

ev.setListWidth 300

OK

--It worked (you should see it in PView)

ev.getPViewRightBoundary()

300

--Make it smaller

ev.setListWidth 100

OK

--Check where the right boundary is

ev.getPViewRightBoundary()

100

--Get the collapsed state of the Event – currently it will

--always return false, this is for Future Use.

ev.isCollapsed()

false

--Note: Not Implemented Yet!

ev.collapse()

OK

--Note: Not Implemented Yet!

ev.expand()

OK

--See if there are Events upstream – there are none

ev.hasUpStream()

false

This Interface is available in:

Event : Helper

See also

Particle Flow Interfaces


Interface: initialEvents

Methods:

<integer>getNumInitialActionLists()

Returns the number of initial Action Lists.

<node>getInitialActionList <index>index

Returns the indexed Action List node.

<bool>appendInitialActionList <node>actionList

Appends the specified Action List node, returns true on success.

<bool>insertInitialActionList <node>actionList <index>index

Inserts the specified Action List node at the specified indexed position, returns true on success.

<bool>removeInitialActionList <index>index

Removes the indexed Action List, returns true on success.

<bool>hasInitialActionList <node>actionList <&index>index

index is In and Out parameter

Returns true if the specified Action List node exists. In that case returns the index of the node in the index variable passed by reference.

EXAMPLE

--Open Particle View to watch the results

particleFlow.OpenParticleView()

$Particle_View:Particle View 01 @ [0.000000,0.000000,0.000000]

--Create a new Particle Flow Source

pfs = PF_Source()

$PF_Source:PF Source 01 @ [0.000000,0.000000,0.000000]

--Get the number of Events connected to the PF_Source –

--there are none so far

pfs.getNumInitialActionLists()

0

--Create a new empty event

new_event = Event()

$Event:Event 01 @ [0.000000,0.000000,0.000000]

--Connect the new Event to the PF_Source by appending it to

--the list of Initial Action Lists.

--In result, a binding appears

pfs.appendInitialActionList new_event

true

--Check again the number of Events connected to the PF_Source

--As expected, there is one now

pfs.getNumInitialActionLists()

1

--Get the one Event connected to PF_Source –

--it is the Event_01 we created

pfs.getInitialActionList 1

$Event:Event 01 @ [0.000000,0.000000,0.000000]

--Now let’s create a second Event

another_event = Event()

$Event:Event 02 @ [0.000000,0.000000,0.000000]

--This time we will not append to the list, but will insert the

--new Event to the first position of the list

pfs.insertInitialActionList another_event 1

true

--Checking again the number of connected Events,

--we see that there are two already

pfs.getNumInitialActionLists()

2

--Let’s see the result of the Insertion – the first indexed Event

--on the list is the second event we created...

pfs.getInitialActionList 1

$Event:Event 02 @ [0.000000,0.000000,0.000000]

--...while the first Event we created is now at indexed position 2

pfs.getInitialActionList 2

$Event:Event 01 @ [0.000000,0.000000,0.000000]

--We can remove the first Event and thus disconnect it

-- from the PF_Source

pfs.removeInitialActionList 1

true

--Checking the number of Events, there is only one connected now,

--the second event is still in Particle View, but the binding is not

--displayed anymore.

pfs.getNumInitialActionLists()

1

--Let’s see which Events are on the list and which are not.

--We will need a variable to pass by reference to get the results

ind = 0

0

--Calling this method with the first Event we created and the

--variable passed by reference returns true which means the event

--is actually on the list

pfs.hasInitialActionList new_event &ind

true

--Checking the content of the varaible shows the index 1

--of the Event on the list of connections

ind

1

--On the other hand, the second Event we removed before

--does not appear on the list – the method returns false.

pfs.hasInitialActionList another_event &ind

false

This Interface is available in:

PF_Source : GeometryClass

See also

Particle Flow Interfaces


Interface: integrator

Description:

The Integrator moves particles in time according to inertia rules. It is a must for Collision operators since they need to substitute the part of the data that the integrator calculates. Particularly, the Collision tests change the position/speed data by their own as calculated by deflectors.

All Test actions provide access to an Integrator interface via the Interface: MaxscriptParticleContainer and its getIntegrator_Method that can be accessed using pCont.GetIntegrator() in a Proceed() handler.

Methods:

<bool>proceedSync <IObject>container <time>timeTick <float>tickFraction <bool>selectedOnly <bitArray>selected

Returns true if the operation has been proceeded successfully.

<bool>proceedASync <IObject>container <time array>timeTick <float array>tickFraction <bool>selectedOnly <bitArray>selected

Returns true if the operation has been proceeded successfully.

timeTick,

timeFraction

The exact time for particles to come to.

The timeFraction value stays in the range between -0.5f and 0.5f

selectedOnly,

selected

If only part of the particles need to be time-advanced then set selectedOnly to true and supply a BitArray for selected

See Integrator ProceedSynch Example for usage example.

This Interface is available in:

Collision_Spawn : Helper

MaxscriptParticleContainer getIntegrator Method

See also

Particle Flow Interfaces

Integrator ProceedSynch Example


Interface: MaxscriptParticleContainer

The MaxscriptParticleContainer Interface is exposed by Particle Containers and is available in Particle Script handlers.

Properties:

The following properties can be used in the ChannelsUsed handler:

<particeContainer>.useTime : bool : Read|Write

When set to true, the Time channel will be available for scripting access.

<particeContainer>.useAge : bool : Read|Write

When set to true, the Age channel will be available for scripting access.

<particeContainer>.useLifespan : bool : Read|Write

When set to true, the Lifespan channel will be available for scripting access.

<particeContainer>.useEventTime : bool : Read|Write

When set to true, the EventTime channel will be available for scripting access.

<particeContainer>.usePosition : bool : Read|Write

When set to true, the Position channel will be available for scripting access.

<particeContainer>.useSpeed : bool : Read|Write

When set to true, the Speed channel will be available for scripting access.

<particeContainer>.useAcceleration : bool : Read|Write

When set to true, the Acceleration channel will be available for scripting access.

<particeContainer>.useOrientation : bool : Read|Write

When set to true, the Oritnation channel will be available for scripting access.

<particeContainer>.useSpin : bool : Read|Write

When set to true, the Spin channel will be available for scripting access.

<particeContainer>.useScale : bool : Read|Write

When set to true, the Scale channel will be available for scripting access.

<particeContainer>.useTM : bool : Read|Write

When set to true, the TM (Transformation Matrix) channel will be available for scripting access.

<particeContainer>.useSelected : bool : Read|Write

When set to true, the Selected channel will be available for scripting access.

<particeContainer>.useShape : bool : Read|Write

When set to true, the Shape channel will be available for scripting access.

<particeContainer>.useMtlIndex: bool: Read|Write

When set to true, the Material Index channel will be available for scripting access.

<particeContainer>.useMapping: bool: Read|Write

When set to true, the Mapping channel will be available for scripting access.

<particeContainer>.useInteger : bool : Read|Write

When set to true, the Integer channel will be available for scripting access.

<particeContainer>.useFloat : bool : Read|Write

When set to true, the Float channel will be available for scripting access.

<particeContainer>.useVector : bool : Read|Write

When set to true, the Vector channel will be available for scripting access.

<particeContainer>.useMatrix : bool : Read|Write

When set to true, the Matrix channel will be available for scripting access.

The following properties can be used in the Proceed handler:

<particeContainer>.particleIndex : index : Read|Write|Validated by Range: 1 to 100000000

Get/Set current particle index

<particeContainer>.particleID : index : Read|Write|Validated by Range: 1 to 100000000

Get/Set current particle ID

<particeContainer>.particleNew : bool : Read

Check if particle just arrived into the event

<particeContainer>.particleTime : time : Read|Write

Get/Set the Time of the current particle

<particeContainer>.particleAge : time : Read|Write|Validated by Range: 0f to 9e+006f

Get/Set the Age of the current particle

<particeContainer>.particleLifespan : time : Read|Write|Validated by Range: 0f to 9e+006f

Get/Set the Lifespan of the current particle

<particeContainer>.particleEventTime : time : Read|Write|Validated by Range: 0f to 9e+006f

Get/Set for how long the particle is present in the current event

<particeContainer>.particlePosition : point3 : Read|Write

Get/Set the current particle Position

<particeContainer>.particleSpeed : point3 : Read|Write

Get/Set the current particle Speed

<particeContainer>.particleAcceleration : point3 : Read|Write

Get/Set the current particle Acceleration

<particeContainer>.particleOrientation : point3 : Read|Write

Get/Set the current particle Orientation

<particeContainer>.particleSpin : angleAxis : Read|Write

Get/Set the current particle Spin

<particeContainer>.particleScale : float : Read|Write

Get/Set the current particle’s Size

<particeContainer>.particleScaleXYZ : point3 : Read|Write

Get/Set the current particle’s Scale

<particeContainer>.particleTM : matrix3 : Read|Write

Get/Set the current particle transformation matrix

<particeContainer>.particleSelected : bool : Read|Write

Get/Set whether the particle is selected.

<particeContainer>.particleShape : mesh : Read|Write

Get/Set the particle mesh

<particeContainer>.particleInteger : integer : Read|Write

Store/Retrieve custom integer data per particle.

<particeContainer>.particleTestStatus : bool : Read|Write

Get/set the particle's test status.

<particeContainer>.particleTestTime : time : Read|Write|Validated by Range: 0f to 9e+006f

Get/set the particle's test time.

<particeContainer>.particleFloat : float : Read|Write

Store/Retrieve custom float data per particle.

<particeContainer>.particleVector : point3 : Read|Write

Store/Retrieve custom vector data per particle.

<particeContainer>.particleMatrix : matrix3 : Read|Write

Store/Retrieve custom matrix data per particle.

NOTE:

The particleMatrix channel could be used to store either a matrix3 value or a set of 4 Point3 values, or 12 Float values. This makes it very versatile when a large number of values have to be stored. As noted in the matrix3 chapter, you cannot directly assign values to sub-elements of a matrix3 value. To write a Point3 or Float value to the particleMatrix channel, first store the particleMatrix value in a user variable, assign the Point3 to the respective row of the matrix or the Float value to the .x, .y or .z element of the Point3 and then assign the variable back to the particleMatrix channel.

Methods:

To use in Init, Release and Proceed handler:

<IObject>getParticleContainer()

Get particle container

To use in Init and Proceed handler:

<object>getParticleSystem()

Get the particle system object

<node>getParticleSystemNode()

Get the particle system node

To use in Init handler:

<object array>getInitActions()

Get list of all action objects in the action list

<node array>getInitActionNodes()

Get list of all action nodes in the action list

To use in Proceed handler:

<time>getTimeStart()

Get the start time of the proceed interval

<time>getTimeEnd()

Get the end time of the proceed interval

<void>setTimeEnd <time>time

If it is not possible to proceed all particles to the given timeEnd then set the closest possible time of the proceed interval

<void>setTimeEndPrecise <time>time <float>fraction

Set the end time with higher precision by supplying time and fraction

<node>getActionNode()

Get action node

<Interface>getIntegrator()

Get the interface of the procedure that integrates particle motion in time. See Interface: integrator

<integer>randSign()

Get random sign (-1 or +1)

<float>rand01()

Get random number from interval [0, 1]

<float>rand11()

Get random number from interval [-1, 1]

<float>rand55()

Get random number from interval [-0.5, 0.5]

<integer>rand0X <integer>maxNumber

Get random integer number from interval [0..maxNumber]

<point3>randSpherePoint()

Get random 3D point from surface of sphere with radius 1

<point3>randDivergeVector <point3>vectorToDiverge <angle>maxAngle

Get random vector that diverges from the given vector by no more than the specified maxAngle angle

<integer>numParticles()

Number of particles in the current event/actionList

<bool>addParticle()

Add a single particle.

Use .particleTime to define when particle is added. Use .particleAge=0 to set particle age to zero. Use other methods to define particle position, speed, orientation etc.

<bool>addParticles <integer>amount

Add 'amount' particles

<bool>deleteParticle <index>index

Delete a single particle with the given index

<bool>deleteParticles <index>startIndex <integer>amount

Delete 'amount' particles starting from startIndex

<index>getParticleID <index>particleIndex

Get the ID of the particle with the given index

<bool>hasParticleID <index>particleID <&index>particleIndex

particleIndex is In and Out parameter

Verify if the event has a particle with the given ID

If the particle is present then particleIndex is the index of the particle

<bool>isParticleNew <index>particleIndex

Check if a particle just arrived into the event

<bool>isParticleNewByID <index>particleID

Check if a particle with the given ID just arrived into the event

<time>getParticleTime <index>particleIndex

Get time of the current status of the particle

<time>getParticleTimeByID <index>particleID

Get the time of the the particle with the specified ID

<void>setParticleTime <index>particleIndex <time>time

Change time of the current status of the particle

<void>setParticleTimePrecise <index>particleIndex <time>time <float>fraction

Set the time of the indexed particle with sub-frame precision using the frame time and a fraction value.

<void>setParticleTimeByID <index>particleID <time>time

Set the time of the particle with the specified ID

<void>setParticleTimePreciseByID <index>particleID <time>time <float>fraction

Set the time of the particle with the specified ID with sub-frame precision by supplying a frame and a fraction value.

<time>getParticleAge <index>particleIndex

Returns the age of the indexed particle.

<time>getParticleAgeByID <index>particleID

Returns the age of the particle with the specified ID.

<void>setParticleAge <index>particleIndex <time>age

Sets the age of the indexed particle.

<void>setParticleAgeByID <index>particleID <time>age

Sets the age of the particle with the specified ID.

<time>getParticleLifespan <index>particleIndex

Returns the lifespan of the indexed particle.

<time>getParticleLifespanByID <index>particleID

Returns the lifespan of the particle with the specified ID.

<void>setParticleLifespan <index>particleIndex <time>lifespan

Sets the lifespan of the indexed particle to the supplied time value.

<void>setParticleLifespanByID <index>particleID <time>lifespan

Sets the lifespan of the particle with the specified ID to the supplied time value.

<time>getParticleEventTime <index>particleIndex

Returns the Event time of the indexed particle.

<time>getParticleEventTimeByID <index>particleID

Returns the Event time of the particle with the specified ID.

<void>setParticleEventTime <index>particleIndex <time>eventTime

Sets the Event time of the indexed particle.

<void>setParticleEventTimeByID <index>particleID <time>eventTime

Sets the Event time of the particle with the specified ID.

<point3>getParticlePosition <index>particleIndex

Returns the Position of the indexed particle.

<point3>getParticlePositionByID <index>particleID

Returns the Position of the particle with the specified ID.

<void>setParticlePosition <index>particleIndex <point3>position

Sets the Position of the indexed particle.

<void>setParticlePositionByID <index>particleID <point3>position

Sets the Position of the particle with the specified ID.

<point3>getParticleSpeed <index>particleIndex

Returns the Speed of the indexed particle.

<point3>getParticleSpeedByID <index>particleID

Returns the Speed of the particle with the specified ID.

<void>setParticleSpeed <index>particleIndex <point3>speed

Sets the Speed of the indexed particle.

<void>setParticleSpeedByID <index>particleID <point3>speed

Sets the Speed of the particle with the specified ID.

<point3>getParticleAcceleration <index>particleIndex

Returns the Acceleration of the indexed particle.

<point3>getParticleAccelerationByID <index>particleID

Returns the Acceleration of the particle with the specified ID.

<void>setParticleAcceleration <index>particleIndex <point3>acceleration

Sets the Acceleration of the indexed particle.

<void>setParticleAccelerationByID <index>particleID <point3>acceleration

Sets the Acceleration of the particle with the specified ID.

<point3>getParticleOrientation <index>particleIndex

Returns the Orientation of the indexed particle.

<point3>getParticleOrientationByID <index>particleID

Returns the Orientation of the particle with the specified ID.

<void>setParticleOrientation <index>particleIndex <point3>orientation

Sets the Orientation of the indexed particle.

<void>setParticleOrientationByID <index>particleID <point3>orientation

Sets the Orientation of the particle with the specified ID.

<angleAxis>getParticleSpin <index>particleIndex

Returns the Spin of the indexed particle.

<angleAxis>getParticleSpinByID <index>particleID

Returns the Spin of the particle with the specified ID.

<void>setParticleSpin <index>particleIndex <angleAxis>spin

Sets the Spin of the indexed particle.

<void>setParticleSpinByID <index>particleID <angleAxis>spin

Sets the Spin of the particle with the specified ID.

<float>getParticleScale <index>particleIndex

Returns the Scale of the indexed particle.

<float>getParticleScaleByID <index>particleID

Returns the Scale of the particle with the specified ID.

<void>setParticleScale <index>particleIndex <float>scale

Sets the Scale of the indexed particle.

<void>setParticleScaleByID <index>particleID <float>scale

Sets the Size of the particle with the specified ID.

<point3>getParticleScaleXYZ <index>particleIndex

Returns the Scale of the indexed particle.

<point3>getParticleScaleXYZByID <index>particleID

Returns the Scale of the particle with the specified ID.

<void>setParticleScaleXYZ <index>particleIndex <point3>scale

Sets the Scale of the indexed particle.

<void>setParticleScaleXYZByID <index>particleID <point3>scale

Sets the Scale of the particle with the specified ID.

<matrix3>getParticleTM <index>particleIndex

Returns the Transformation Matrix of the indexed particle.

<matrix3>getParticleTMByID <index>particleID

Returns the Transformation Matrix of the particle with the specified ID.

<void>setParticleTM <index>particleIndex <matrix3>transformationMatrix

Sets the Transformation Matrix of the indexed particle.

<void>setParticleTMByID <index>particleID <matrix3>transformationMatrix

Sets the Transformation Matrix of the particle with the specified ID.

<bool>getParticleSelected <index>particleIndex

Returns the Selected state of the indexed particle.

<bool>getParticleSelectedByID <index>particleID

Returns the Selected state of the particle with the specified ID.

<void>setParticleSelected <index>particleIndex <bool>selected

Sets the Selected state of the indexed particle.

<void>setParticleSelectedByID <index>particleID <bool>selected

Sets the Selected state of the particle with the specified ID.

<mesh>getParticleShape <index>particleIndex

Returns the shape of the indexed particle as mesh.

<mesh>getParticleShapeByID <index>particleID

Returns the shape of the particle with the specified ID as mesh.

<void>setParticleShape <index>particleIndex <mesh>shape

Sets the shape of the indexed particle to the supplied mesh.

<void>setParticleShapeByID <index>particleID <mesh>shape

Sets the shape of the particle with the specified ID to the supplied mesh.

<void>setShapeForAllParticles <mesh>shape

Sets the shape of all particles to the supplied mesh.

<void>setParticleMtlIndex <index>particleIndex <index>materialIndex

Sets the Material Index of the indexed particle.

<void>setParticleMtlIndexByID <index>particleID <index>materialIndex

Sets the Material Index of the particle with the specified ID

<void>setMtlIndexForAllParticles <index>materialIndex

Sets the Material Index of all particles to the specified index value.

<void>setParticleMapping <index>particleIndex <int>mapChannel <point3>mapValue

Sets the Mapping of the indexed particle to the specified Point3 value.

<void>setParticleMappingByID <index>particleID <int>mapChannel <point3>mapValue

Sets the Mapping of the particle with the specified ID to the specified Point3 value.

<void>setMappingForAllParticles <int>mapChannel <point3>mapValue

Sets the Mapping of all particles to the specified Point3 value.

<integer>getParticleInteger <index>particleIndex

Returns the integer channel value of the indexed particle

<integer>getParticleIntegerByID <index>particleID

Returns the integer channel value of the particle with the specified ID

<void>setParticleInteger <index>particleIndex <integer>integerValue

Sets the integer channel value of the indexed particle to the supplied integer value.

<void>setParticleIntegerByID <index>particleID <integer>integerValue

Sets the integer channel value of the particle with the specified ID to the supplied integer value.

<float>getParticleFloat <index>particleIndex

Returns the float channel value of the indexed particle

<float>getParticleFloatByID <index>particleID

Returns the float channel value of the particle with the specified ID

<void>setParticleFloat <index>particleIndex <float>floatValue

Sets the float channel value of the indexed particle

<void>setParticleFloatByID <index>particleID <float>floatValue

Sets the float channel value of the particle with the specified ID

<point3>getParticleVector <index>particleIndex

Returns the vector channel value of the indexed particle

<point3>getParticleVectorByID <index>particleID

Returns the vector channel value of the particle with the specified ID

<void>setParticleVector <index>particleIndex <point3>vectorValue

Sets the vector channel value of the indexed particle

<void>setParticleVectorByID <index>particleID <point3>vectorValue

Sets the vector channel value of the particle with the specified ID

<matrix3>getParticleMatrix <index>particleIndex

Returns the matrix channel value of the indexed particle

<matrix3>getParticleMatrixByID <index>particleID

Returns the matrix channel value of the particle with the specified ID

<void>setParticleMatrix <index>particleIndex <matrix3>matrixValue

Sets the matrix channel value of the indexed particle

<void>setParticleMatrixByID <index>particleID <matrix3>matrixValue

Sets the matrix channel value of the particle with the specified ID

<void>setParticleTestStatus <index>particleIndex <bool>satisfy?

Sets the Test Status of the indexed particle to the supplied boolean value.

<void>setParticleTestStatusByID <index>particleID <bool>satisfy?

Sets the Test Status of the particle with the specified ID to the supplied boolean value.

<void>setGlobalTestStatus <bool>satisfy?

Sets the Test Status of all particles to the supplied boolean value.

<void>setParticleTestTime <index>particleIndex <time>time

Sets the Test Time of the indexed particle to the supplied time value.

<void>setParticleTestTimePrecise <index>particleIndex <time>time <float>fraction

Sets the sub-frame Test Time of the indexed particle to the supplied time and fraction value.

<void>setParticleTestTimeByID <index>particleID <time>time

Sets the Test Time of the particle with the specified ID to the supplied time value.

<void>setParticleTestTimePreciseByID <index>particleID <time>time <float>fraction

Sets the sub-frame Test Time of the particle with the specified ID to the supplied time and fraction value.

<void>setGlobalTestTime <time>time

Sets the Test Time of all particles to the supplied time value.

<void>setGlobalTestTimePrecise <time>time <float>fraction

Sets the sub-frame Test Time of all particles to the supplied time and fraction value.

See also

Particle Flow Interfaces

Using MAXScript in Script Actions

Particle Flow Sample Scripts


Interface: operator

The operator Interface is exposed in all Particle Flow Operator Classes.

Methods:

<bool>proceed <IObject>container <time>timeStart <time>timeEnd <object>particleSystem <node>particleSystemNode <node>actionNode <Interface>integrator

Proceeds the Operator. Lets you calls the Proceed method of an Operator from inside a Script_Operator’s on Proceed... handler.

For an example, see Speed Operator in Script Operator Example

This Interface is available in:

Birth : Helper

Birth_Script : Helper

Cache : Helper

DeleteParticles : Helper

displayParticles : Helper

Force : Helper

Go_To_Rotation : Helper

Keep_Apart : Helper

mapping : Helper

Material_Dynamic : Helper

Material_Frequency : Helper

Material_Static : Helper

Notes : Helper

Position_Icon : Helper

Position_Object : Helper

renderParticles : Helper

rotation : Helper

scaleParticles : Helper

Script_Operator : Helper

shapeStandard : Helper

Shape_Facing : Helper

Shape_Instance : Helper

Shape_Mark : Helper

speed : Helper

SpeedByIcon : Helper

Speed_By_Surface : Helper

Spin : Helper

See also

Particle Flow Interfaces

Interface: action

Speed Operator in Script Operator Example


Interface: particleObjectExt

The particleObjectExt Interface is exposed in Particle Flow Source Classes.

Properties:

.particleIndex : index : Read|Write|Validated by Range: 1 to 100000000

Get/Set the current particle index.

.particleID : index : Read|Write|Validated by Range: 1 to 100000000

Get/Set the current particle ID.

.particleAge : time : Read|Write|Validated by Range: 0f to 625000f

Get/Set the current particle Age.

.particleGroupTime : time : Read|Write|Validated by Range: 0f to 625000f

Get/Set the current particle Group Time.

.particlePosition : point3 : Read|Write

Get/Set the current particle position.

.particleSpeed : point3 : Read|Write

Get/Set the current particle speed.

.particleOrientation : point3 : Read|Write

Get/Set the current particle orientation.

.particleSpin : angleAxis : Read|Write

Get/Set the current particle spin.

.particleScale : float : Read|Write|Validated by Range: 0.0 to 1e+009

Get/Set the size of the current particle.

.particleScaleXYZ : point3 : Read|Write

Get/Set the Scale of the current particle as Point3 value.

.particleTM : matrix3 : Read|Write

Get/Set the Transformation Matrix of the current particle.

.particleSelected : bool : Read|Write

Get/Set the Selected state of the current particle

.particleShape : mesh : Read|Write

Get/Set the current particle’s mesh.

EXAMPLES AND RESULTS:

--Create a default PF Source in the Scene from the Create Tab.

--Get the Source by name to test the Interface Properties:

pf = $'PF Source 01'

$PF_Source:PF Source 01 @ [2.536594,-48.031052,0.000000]

--Get the curren particle's index

pf.particleIndex

1

--Change the particle index. Any subsequent

--properties will be from particle 2

pf.particleIndex = 2

2

--Check to make sure it worked...

pf.particleIndex

2

--Get the Particle ID of particle 2

pf.particleID

0

--Get the Particle Age on frame 0

--This is a newborn particle, age is 0!

pf.particleAge

0f

--Now change the scene time to frame 10...

sliderTime = 10

10

--...and get the Age again –

--10 frames later, the Age is 9.7 frames!

pf.particleAge

9.7f

--Check whether particle 2 is selected –

--No, it is not

pf.particleSelected

false

--Change to Modify panel

max modify mode

OK

--Change to Particle sub-object level

subObjectLevel = 1

1

--Select Particle 2 - one particle

--should turn red in the viewport

pf.particleSelected = true

true

--Get the particle position

pf.particlePosition

[12.1301,-40.7149,-96.9697]

--You can change it -

--The Particle should move there...

pf.particlePosition = [10.0,-10.0,-40.0]

[10,-10,-40]

--Get the Speed of particle 2

pf.particleSpeed

[0,0,-0.0625]

--Get the Orientation of particle 2

pf.particleOrientation

[-2.75317,-1.18547,-0.402363]

--Get the Spin of particle 2

pf.particleSpin

(angleAxis 0 [1,0,0])

--Get the size of the particle

pf.particleScale

16.3299

--Get the Scale of the particle

pf.particleScaleXYZ

[1,1,1]

--Get the complete TM of the particle

pf.particleTM

(matrix3 [0.345842,-0.147184,0.926677] [-0.0394943,-0.989029,-0.142347] [0.937461,0.0126313,-0.34786] [12.1301,-40.7149,-96.9697])

--Get the Shape as TriMesh.

msh = pf.particleShape

TriMesh

--Take a look at the number of vertices

msh.numverts

4

--...and the number of faces

msh.numfaces

4

--Why not take a look at the actual TriMesh?

--Create a new empty Editable Mesh

new_mesh = Editable_mesh()

$Editable_Mesh:Object01 @ [0.000000,0.000000,0.000000]

--Assign the shape snapshot to the mesh

new_mesh.mesh = msh

TriMesh

--And finally update all caches of the Emesh to see the result:

update new_mesh

OK

Methods:

<void>updateParticles <node>particleSystem <time>time

Forces a particle update at the specified time.

<integer>numParticles()

Returns the number of particles.

<integer>numParticlesGenerated()

Returns the number of generated particles.

<void>setEveryStepUpdateScriptLine <string>script

Sets the script string to be executed on every update step.

<void>setEveryStepUpdateScriptFile <filename>fileName

Sets the script file to be executed on every update step.

<void>setFinalStepUpdateScriptLine <string>script

Sets the script string to be executed at the final update step.

<void>setFinalStepUpdateScriptFile <filename>fileName

Sets the script file to be executed at the final update step.

<time>getUpdateTime()

Returns the current update time.

<void>getUpdateInterval <&time>timeStart <&time>timeEnd

timeStart is In and Out parameter

timeEnd is In and Out parameter

Returns the update interval in the two by-reference variables.

<index>getParticleID <index>particleIndex

Returns the particle ID of the indexed particle.

<bool>hasParticleID <index>particleBornIndex <&index>particleIndex

particleIndex is In and Out parameter

Returns true if a particle with the specified particle birth ID exists. Returns the actual particle index in the specified by-reference variable.

<node>getParticleGroup <index>particleIndex

Returns the particle group node of the indexed particle.

<index>getParticleIndex <index>particleBornIndex

Returns the particle index of the particle with the specified birth index.

<time>getParticleAge <index>particleIndex

Returns the particle Age of the indexed particle.

<time>getParticleAgeByID <index>particleID

Returns the particle Age of the particle specified by particle ID.

<void>setParticleAge <index>particleIndex <time>age

Sets the particle age of the specified indexed particle to the specified age value.

<void>setParticleAgeByID <index>particleID <time>age

Sets the particle age of the particle specified by ID to the specified age value.

<time>getParticleLifeSpan <index>particleIndex

Returns the life span time of the specified indexed particle.

<time>getParticleLifeSpanByID <index>particleID

Returns the life span time of the particle specified by ID.

<void>setParticleLifeSpan <index>particleIndex <time>lifeSpan

Sets the life span time of the indexed particle to the specified lifeSpan value.

<void>setParticleLifeSpanByID <index>particleID <time>lifeSpan

Sets the life span time of the particle specified by ID to the specified lifeSpan value.

<time>getParticleGroupTime <index>particleIndex

Returns the Group Time of the indexed particle.

<time>getParticleGroupTimeByID <index>particleID

Returns the Group Time of the particle specified by ID.

<void>setParticleGroupTime <index>particleIndex <time>age

Sets the Group Time of the indexed particle to the specified age value.

<void>setParticleGroupTimeByID <index>particleID <time>age

Sets the Group Time of the particle specified by ID to the specified age value.

<point3>getParticlePosition <index>particleIndex

Returns the position of the indexed particle.

<point3>getParticlePositionByID <index>particleID

Returns the position of the particle specified by ID.

<void>setParticlePosition <index>particleIndex <point3>position

Sets the position of the indexed particle to the specified Point3 value.

<void>setParticlePositionByID <index>particleID <point3>position

Sets the position of the particle specified by ID to the specified Point3 value.

<point3>getParticleSpeed <index>particleIndex

Returns the speed of the indexed particle as Point3 value.

<point3>getParticleSpeedByID <index>particleID

Returns the speed of the particle specified by ID as Point3 value.

<void>setParticleSpeed <index>particleIndex <point3>speed

Sets the speed of the indexed particle to the specified Point3 value.

<void>setParticleSpeedByID <index>particleID <point3>speed

Sets the speed of the particle specified by ID to the specified Point3 value.

<point3>getParticleOrientation <index>particleIndex

Returns the orientation of the indexed particle as Point3 value.

<point3>getParticleOrientationByID <index>particleID

Returns the orientation of the particle specified by ID as Point3 value.

<void>setParticleOrientation <index>particleIndex <point3>orientation

Sets the orientation of the indexed particle to the specified Point3 value.

<void>setParticleOrientationByID <index>particleID <point3>orientation

Sets the orientation of the particle specified by ID to the specified Point3 value.

<angleAxis>getParticleSpin <index>particleIndex

Returns the Spin of the indexed particle as angleAxis value.

<angleAxis>getParticleSpinByID <index>particleID

Returns the Spin of the particle specified by ID as angleAxis value.

<void>setParticleSpin <index>particleIndex <angleAxis>spin

Sets the Spin of the indexed particle to the specified AngleAxis value.

<void>setParticleSpinByID <index>particleID <angleAxis>spin

Sets the Spin of the particle specified by ID to the specified angleAxis value.

<float>getParticleScale <index>particleIndex

Returns the size of the indexed particle as Float value.

<float>getParticleScaleByID <index>particleID

Returns the size of the particle specified by ID as Float value.

<void>setParticleScale <index>particleIndex <float>scale

Sets the size of the indexed particle to the specified Float value.

<void>setParticleScaleByID <index>particleID <float>scale

Sets the size of the particle specified by ID to the specified Float value.

<point3>getParticleScaleXYZ <index>particleIndex

Returns the Scale of the indexed particle as a Point3 value.

<point3>getParticleScaleXYZByID <index>particleID

Returns the Scale of the particle specified by ID as a Point3 value.

<void>setParticleScaleXYZ <index>particleIndex <point3>scaleXYZ

Sets the Scale of the indexed particle to the specified Point3 value.

<void>setParticleScaleXYZByID <index>particleID <point3>scaleXYZ

Sets the Scale of the particle specified by ID to the specified Point3 value.

<matrix3>getParticleTM <index>particleIndex

Returns the Transformation Matrix of the inexed particle.

<matrix3>getParticleTMByID <index>particleID

Returns the Transformation Matrix of the particle specified by ID.

<void>setParticleTM <index>particleIndex <matrix3>TM

Sets the Transformation Matrix of the indexed particle.

<void>setParticleTMByID <index>particleID <matrix3>TM

Sets the Transformation Matrix of the particle specified by ID.

<bool>getParticleSelected <index>particleIndex

Returns the selected state of the indexed particle.

<bool>getParticleSelectedByID <index>particleID

Returns the selected state of the particle specified by ID.

<void>setParticleSelected <index>particleIndex <bool>selected

Sets the selected state of the indexed particle.

<void>setParticleSelectedByID <index>particleID <bool>selected

Sets the selected state of the particle specified by ID.

<mesh>getParticleShape <index>particleIndex

Returns the shape of the indexed particle as mesh value.

<mesh>getParticleShapeByID <index>particleID

Returns the shape of the particle specified by ID as mesh value.

<void>setParticleShape <index>particleIndex <mesh>shape

Sets the shape of the indexed particle to the specified mesh value.

<void>setParticleShapeByID <index>particleID <mesh>shape

Sets the shape of the particle specified by ID to the specified mesh value.

<void>setShapeForAllParticles <mesh>shape

Sets the shape of all particles to the specified mesh value.

EXAMPLES AND RESULTS:

--Create a new Particle Flow Source in the Viewport,

--then get it by name from the scene

pf = $'PF Source 01'

$PF_Source:PF Source 01 @ [2.536594,-48.031052,0.000000]

--Set the scene time to frame 10

sliderTime = 10

10

--Update the particles at time 10

pf.updateParticles pf 10f

OK

--Get total number of particles at current time

pf.numParticles()

34

--Get the total number of particles generated up to the current time

pf.numParticlesGenerated()

34

--Get the particles update time

pf.getUpdateTime()

10f

--Initialize two user variables to 0

ts = te = 0

0

--Set scene time to frame 10

sliderTime = 10f

10f

--Get the update interval into the variables passed by reference

pf.getUpdateInterval &ts &te

OK

--Check the start time

ts

9f

--Check the end time

te

10f

pf.getParticleID 34 --Get the particle ID of the 34th particle

34

--Try to get the 35th particle.

--There are only 34 particles, so ID is 0

pf.getParticleID 35

0

--Initialize a variable to pass by reference

idx = 0

0

--Check if there is particle with ID 34 –

--Yes, there is one

pf.hasParticleID 34 &idx

true

--and its index is 34

idx

34

--Check the same about particle ID 35 –

--no, there is none

pf.hasParticleID 35 &idx

false

--Get the Particle Group node

pf.getParticleGroup 2

$Particle_Group:PF Source 01->Event 01 @ [0.000000,0.000000,0.000000]

--Get the index of particle 34

pf.getParticleIndex 34

34

--Get the index of particle 35

--No such particle ID, index is 0

pf.getParticleIndex 35

0

--Get the particle age of particle 2

pf.getParticleAge 2

9.7f

--Get the particle age of particle ID 2 –

--It is the same particle!

pf.getParticleAgeByID 2

9.7f

--Get the particle age of particle 34

--It was born later, age is smaller

pf.getParticleAge 34

9f

--Set age of particle 2 to 5 frames

pf.setParticleAge 2 5f

OK

--Check to see if it worked - It did!

pf.getParticleAge 2

5f

--Get the life span of particle 2

--Who wants to live forever? This one!

pf.getParticleLifeSpan 2

1.34218e+007f

--Change the life span of particle 2

pf.setParticleLifeSpan 2 10f

OK

--Check again – it changed!

pf.getParticleLifeSpan 2

10f

--Get the Group Time of Particle 2

pf.getParticleGroupTime 2

0f

–-Set the Particle Group Time to 10

pf.setParticleGroupTime 2 10f

OK

--Get the time again – it was set!

pf.getParticleGroupTime 2

10f

--Let’s change the mesh of particle 2 to a Geosphere

gs = (geosphere radius:5).mesh

TriMesh

--Change the Display to Geometry

pf.Event_01.Display_01.Type = 6

6

--Set the particle mesh

--One particle should become a Geosphere!

pf.setParticleShape 2 gs

OK

--Get the mesh of a teapot

tp = (teapot radius:5).mesh

TriMesh

--and assign to all particles – they should turn into teapots!

--IT’S TEA TIME!

pf.setShapeForAllParticles tp

OK

This Interface is available in:

PF_Source : GeometryClass

ParticleGroup : GeometryClass

See also

Particle Flow Interfaces


Interface: pfSystem

The pfSystem Interface is exposed by the Particle Flow Source Class.

Methods:

<float>getMultiplier <time>time

Returns the Qualtity multiplier depending on the Render State. See methods setRenderState and isRenderState below for more details on Render State.

A value of 1.0f means that the operator produces particles at 100% rate. A value of 0.5f means that the operator produces only half the particles that it is supposed to generate. For example, if a Birth operator is set to produce 1000 particles total, then when the multiplier is set to 0.5f, the operator will produce only 500 particles.

NOTE:

The time parameter is reserved for future use. Pass 0f or any time value to call the method.

EXAMPLE

--Create a new Particle Flow Source in the Viewport

--from the Create tab, then get it by name from the scene

pfs = $'PF Source 01'

$PF_Source:PF Source 01 @ [2.536594,-48.031052,0.000000]

--Get the Multiplier while in Viewport state

pfs.getMultiplier 0f

0.5

--Change the Particle Source State to Render

pfs.SetRenderState true

true

--Get the Multiplier again – when in Render State, the Source

--generates all particles!

pfs.getMultiplier 0f

1.0

<integer>getBornAllowance()

Returns the born allowance, which is currently the Upper Limit at time zero, same as <PF_Source>.Particle_Amount_Limit.

NOTE:

Implemented for future use.

<bool>hasEmitter()

Returns true if the Particle System has emitter(s), false otherwise.

<integer>getEmitterType <time>time

Returns the Emitter Type at the specified time.

<void>getEmitterDimensions <time>time <&float array>dimensions

dimensions is In and Out parameter

Returns the Emitter Dimensions at the specified time as an array of floats stored in the by-reference variable.

<mesh>getEmitterGeometry <time>time

Returns the Emitter geometry at the specified time as mesh.

<bool>isEmitterGeometryAnimated()

Returns true if the Emitter geometry is animated, false otherwise.

<void>setRenderState <bool>renderState

Sets the render State of the Particle System to the supplied boolean value. See explanation below.

<bool>isRenderState()

Returns true if the Particle System is in render state, false otherwise.

IMPORTANT:

A Particle Flow particle system has two states: render and viewport. At any given moment it is exclusively in the one state or the other. The particle system may have different parameters during render and viewport (i.e. Multiplier value, or emitter geometry etc.) therefore it's important to know what state it is in. It is possible to switch the state of a particle system using the setRenderState method. A Particle Flow particle system alternates its state automatically when the rendering starts and when the rendering ends

<time>getIntegrationStep()

Returns the Integration Step as time value.

<integer>getUpdateType()

Returns the Update Type as integer.

0: Complete

1: Forward

<integer>numParticlesSelected()

Returns the number of selected particles.

<index>getSelectedParticleID <index>index

Returns the particle ID of the indexed particle.

<bool>isParticleSelected <index>index

Returns true if the indexed particle is selected, false otherwise.

<integer>numActionListsSelected()

Returns the number of selected Action Lists.

<node>getSelectedActionList <index>index

Returns the indexed Action List.

<bool>isActionListSelected <index>index

Returns true if the indexed Action List is selected, false otherwise.

EXAMPLES AND RESULTS:

--Create a new Particle Flow Source in the Viewport

--from the Create tab, then get it by name from the scene

pf = $'PF Source 01'

$PF_Source:PF Source 01 @ [0.000000,0.000000,0.000000]

--Get the number of particles that the Source can give birth to

pf.getBornAllowance()

100000

--Check whether the Source has an emitter

pf.hasEmitter()

true

--Get the emitter type

pf.getEmitterType 0

0

dim = #() --define an empty array

#()

--get the Emitter dimensions,

--pass the empty array variable by reference

pf.getEmitterDimensions 0 &dim

OK

--look into the previously empty array –

--the dimensions are in it

Dim

#(20.0, 20.0)

--Get the Emitter Geometry as TriMesh on frame 0

m = pf.getEmitterGeometry 0

TriMesh

m.numverts --check the number of vertices

4

m.numfaces --check the number of faces

2

--Check if the emitter geometry is animated

pf.isEmitterGeometryAnimated()

false

--Set and get the render state

pf.setRenderState false

OK

pf.isRenderState()

false

pf.setRenderState true

OK

pf.isRenderState()

true

--Get the viewport integration step

pf.getIntegrationStep()

1f

--Get the update type – 0 means Complete!

pf.getUpdateType()

0

--Get the number of selected particles

pf.numParticlesSelected()

0

--Check if particle 1 is selected

pf.isParticleSelected 1

false

--Get the number of selected Action Lists in the UI

pf.numActionListsSelected()

0

--In the UI, select the first Action List and try again:

pf.numActionListsSelected()

1

--Get the node of the Action List you just selected:

pf.getSelectedActionList 1

$Event:Event 01 @ [0.000000,0.000000,0.000000]

This Interface is available in:

PF_Source : GeometryClass

See also

Particle Flow Interfaces


Interface: PViewItem

Methods:

<integer>numPViewParamBlocks()

Returns the number of Particle View ParameterBlocks.

<maxObject>getPViewParamBlock <index>index

Returns the indexed Particle View ParameterBlocks.

<bool>hasComments <node>actionNode

Returns true when the supplied action node has comments.

<string>getComments <node>actionNode

Returns the comment of the specified action node as string.

<void>setComments <node>actionNode <string>comments

Sets the comment of the specified action node to the supplied string.

EXAMPLES AND RESULTS:

ParticleFlow.openParticleView() --open Particle View to see results

ev = Event() --create an empty event

$Event:Event 02 @ [0.000000,0.000000,0.000000]

particleFlow.beginEdit() --Disable auto-event-encapsulation

OK

bt = birth() --A Birth Action!

$Birth:Birth 01 @ [0.000000,0.000000,0.000000]

particleFlow.endEdit() --Enable auto-event-encapsulation

OK

ev.appendAction bt --Insert the Birth in the Event

ev.numPViewParamBlocks() --Check the number of PBlocks

0

ev.hasComments bt --Check for comments - none

false

ev.setComments bt "Happy Birthday!" --Set a comment...

OK

ev.getComments bt --...and read it back

"Happy Birthday!"

This Interface is available in:

Age_Test : Helper

Birth : Helper

Birth_Script : Helper

Collision_Spawn : Helper

DeleteParticles : Helper

displayParticles : Helper

Event : Helper

Find_Target : Helper

Force : Helper

Go_To_Rotation : Helper

Keep_Apart : Helper

mapping : Helper

Material_Dynamic : Helper

Material_Frequency : Helper

Material_Static : Helper

Notes : Helper

PF_Source : GeometryClass

Position_Icon : Helper

Position_Object : Helper

renderParticles : Helper

rotation : Helper

scaleParticles : Helper

Scale_Test : Helper

Script_Test : Helper

Script_Operator : Helper

Send_Out : Helper

shapeStandard : Helper

Shape_Facing : Helper

Shape_Instance : Helper

Shape_Mark : Helper

Spawn : Helper

speed : Helper

Speed_Test : Helper

Speed_By_Surface : Helper

Spin : Helper

Split_Selected : Helper

Split_Source : Helper

Split_Amount : Helper

See also

Particle Flow Interfaces


Interface: test

The test Interface is exposed by all Test Classes.

Methods:

<void>proceedStep1 <IObject>container <object>particleSystem <node>particleSystemNode <node>actionNode <Interface>integrator

<IObject>container

The current particle container. Can be accessed via the Interface: MaxscriptParticleContainer inside a hander using pCont.GetParticleContainer()

<object>particleSystem

The particle system that generates the particle stream.

NOTE:

The same operator may get calls from different particle systems. If the result varies according to the particle system that generates particles, then this parameter defines which one to be used.

<node>particleSystemNode

Node of the particle system that generates the particles.

<node>actionNode

Node of the Test action.

<Interface>integrator

An operator to proceed particles according to "inertia" rules. The operator updates time, speed, position, spin, orientation channels on the basis of time, acceleration, speed, angular acceleration and spin channels. Each particle system has a default inertia operator. When an action wants to update the current time for particles, it uses the "inertia" operator. An Action in the ActionList stack may "switch" the suggested "inertia" operator by its own if the Action supports the "inertial" operator interface. The particle system recognizes such an Action as a holder of "inertia" interface, and uses it for "inertia" purposes later on. If the parameter is NULL then the particle system doesn't allow the test to advance particles in the time channel.

<bool>proceedStep2 <time>timeStartTick <float>timeStartFraction <&time>timeEndTick <&float>timeEndFraction <&bitArray>testResult <&float array>testTime

timeEndTick is In and Out parameter

timeEndFraction is In and Out parameter

testResult is In and Out parameter

testTime is In and Out parameter

Returns true if the test has been proceeded successfully.

The proceedStep1 and proceedStep2 verify the test condition and may change particle channels. Particles that satisfy the condition may be advanced to the time of the condition satisfaction according to the inertia operator integrator .

<time>timeStartTick

The time for a particle to start the simulation. Each particle may have its own current valid time greater than timeStart. In this case the test should consider the current particle time and timeEnd parameter.

<float>timeStartFraction

<&float>timeEndFraction

Float portion of the real TimeValue

<&bitArray>testResult

A bit array indicating which particles satisfy the test condition

<&float array>testTime

For particles that satisfy the condition, the list of time moments when a particle satisfies the condition. The tab has the same number of entry as particles in the container. Only for particles that satisfy the condition the entry is set.

See Speed Operator in Script Operator Example for sample usage.

<node>getNextActionList <node>testNode <*bool>linkActive

linkActive is In and Out parameter

Returns the next Action List of the specified testNode. This is basically the ActionList (Event) wired to the Test. If a particle satisfies the test then it is directed to this Action List. Since a Test may have several instances with different next events, it is necessary to pass the TestNode as parameter.

NOTE:

For future use only. The parameter <*bool>linkActive is passed by NULL as default in the current release of Particle Flow.

EXAMPLE

ev1_a11.GetNextActionList ev1_a11 false

For a complete example, see VolumeDocking Sample Script .

<bool>setNextActionList <node>actionList <node>testNode

Wires the specified testNode to the supplied actionList node. Returns true on success. The next actionList node can be rejected if it is not a real actionList.

<bool>clearNextActionList <node>testNode

Disconnects the specified testNode from its Action List.

<bool>setLinkActive <bool>linkActive <node>testNode

Will set the Active status of the Link to the supplied boolean value for the specified testNode. Returns true on success.

NOTE:

For future use only. Currently it can be used only to test if the Test Action has a link.

EXAMPLE

ev1_a11.setLinkActive true ev1_a11

For a complete example, see VolumeDocking Sample Script .

This Interface is available in:

Age_Test : Helper

Collision : Helper

Collision_Spawn : Helper

Find_Target : Helper

Send_Out : Helper

Go_To_Rotation : Helper

Scale_Test : Helper

Script_Test : Helper

Spawn : Helper

speed : Helper

Split_Amount : Helper

Split_Selected : Helper

Split_Source : Helper

See also

Particle Flow Interfaces

Speed Operator in Script Operator Example

VolumeDocking Sample Script


Particle Flow Classes

The following are the Particle Flow Classes exposed to MAXScript:

Sources:

PF_Source : GeometryClass

Operators:

Birth and Death:

Birth : Helper

Birth_Script : Helper

DeleteParticles : Helper

Transforms:

Position_Icon : Helper

Position_Object : Helper

rotation : Helper

scaleParticles : Helper

Spin : Helper

Speed:

Keep_Apart : Helper

speed : Helper

Speed_By_Surface : Helper

SpeedByIcon : Helper

Shape:

shapeStandard : Helper

Shape_Facing : Helper

Shape_Instance : Helper

Shape_Mark : Helper

Material and Mapping:

mapping : Helper

Material_Dynamic : Helper

Material_Frequency : Helper

Material_Static : Helper

Other:

Force : Helper

Script_Operator : Helper

Meta-Operators:

Cache : Helper

Notes : Helper

Event : Helper

renderParticles : Helper

displayParticles : Helper

Tests:

Age_Test : Helper

Collision : Helper

Collision_Spawn : Helper

Find_Target : Helper

Go_To_Rotation : Helper

Scale_Test : Helper

Script_Test : Helper

Send_Out : Helper

Spawn : Helper

Speed_Test : Helper

Split_Amount : Helper

Split_Selected : Helper

Split_Source : Helper

Particle View Access

Particle_View : Helper

PView_Manager : ReferenceTarget

PFActionListPool : ReferenceTarget

ParticleGroup : GeometryClass

Internal Classes

Standard_Flow (const MAXClass): Standard_Flow

Empty_Flow (const MAXClass): Empty_Flow

See also

Particle Flow Interfaces


PF_Source : GeometryClass

PF_Source - superclass: GeometryClass super-superclass:node - classID: #(1345457306, 0)

Value > MAXWrapper > Node > GeometryClass > PF_Source

Description:

The PF_Source is the viewport icon for a Particle Flow particle system, and also serves as the default emitter. It appears as a separate item in Particle View whose position and width can also be accessed using the properties below.

Constructor:

PF_Source...

Properties:

<PF_Source>.Enable_Particles Boolean default: true -- boolean

Controls the state of the Enbale Particle Emission checkbox in the UI. When set to true, the Particle Flow Source will generate particles.

<PF_Source>.Logo_Size Float default: 10.0 -- animatable; world units

Sets the size of the Particle Flow logo, which appears at the center of the source icon, as well as the arrow that indicates the default direction of particle motion.

<PF_Source>.Emitter_Type Integer default: 0 -- integer

Controls the state of tge Icon Type drop-down list in the UI. Specifies the type of the Icon.

Possible values are:

0: Rectangle

1: Box

2: Circle

3: Sphere

<PF_Source>.Emitter_Length Float default: 20.0 -- animatable; world units

Sets the length of the Rectangle and Box icon types, and the diameter of the Circle and Sphere icon types

<PF_Source>.Emitter_Width Float default: 20.0 -- animatable; world units

Sets the width of the Rectangle and Box icon types. Has no effect with the Circle and Sphere icon types.

<PF_Source>.Emitter_Height Float default: 20.0 -- animatable; world units

Sets the height of the Box icon type. Has no effect unless the Emitter_Type is set to 1 : Box.

<PF_Source>.Show_Logo Boolean default: true -- boolean

When set to true, turns display of the logo (with arrow) on. When false, no logo will be displayed.

<PF_Source>.Show_Emitter Boolean default: true -- boolean

When set to true, turns display of the emitter on. When false, no emitter will be displayed.

<PF_Source>.Quantity_Viewport Float default: 50.0 -- percentage

Sets the percentage of the total number of particles in the system produced in the viewports. Range is from 0.0 to 10000.0.

<PF_Source>.Quantity_Render Float default: 100.0 -- percentage

Sets the percentage of the total number of particles in the system produced at render time. Range is from 0.0 to 10000.0.

<PF_Source>.Select_By_Particle_ID Integer default: 1 -- integer

Corresponds to the ID field in the UI. Sets the ID number of the particle to select.

<PF_Source>.Clear_Selection Boolean default: false -- boolean

Corresponds to the Clear Selection checkbox in the UI. When checked, selecting a new particle by ID will clear the existing selection.

<PF_Source>.Selected_Particles ArrayParameter default: #() -- int array

Returns an array of selected particle indices.

<PF_Source>.Selection_ActionLists node array

Returns an array of selected ActionList nodes.

<PF_Source>.Selection_Level Integer default: 0 -- integer

Get/Set the selection level.

Possible values are:

0: Object Level

1: Particle Level

2: Event Level

<PF_Source>.Particle_Amount_Limit Integer default: 100000 -- integer

The maximum number of particles the system may have. Range is from 1 to 10000000.

<PF_Source>.Integration_for_Viewport Integer default: 0 -- integer

Set the integration step for animation playback in the viewports.

Possible values are:

0: Frame

1: Half Frame

2: 1/4

3: 1/8

<PF_Source>.Integration_for_Render Integer default: 1 -- integer

Set the integration step at render time.

Possible values are:

0: Frame

1: Half Frame

2: 1/4

3: 1/8

4: 8 Ticks

5: 4 Ticks

6: 2 Ticks

7: 1 Tick

<PF_Source>.Enable_Script_for_Every_Step_Update Boolean default: false -- boolean

When set to true causes the script assigned to .Every_Step_Update_Script to be executed at each integration step.

NOTE:

The Every Step Update script is evaluated at the end of each integration step, after all actions in the particle system are evaluated, and all particles are finally in their respective particle groups (events).

<PF_Source>.Every_Step_Update_Script String

Specifies the script to be executed at every integration step. The default script modifies particle speed and direction, causing particles to follow a wavy path.

<PF_Source>.Use_File_for_Every_Step_Update Boolean default: false -- boolean

When set to true causes the script file assigned to .EveryStepUpdateScriptFile to be executed at each integration step.

<PF_Source>.Every_Step_Update_Script_File Filename alias: everyStepUpdateScriptFile

Specifies the script file to be executed at every integration step.

<PF_Source>.Enable_Script_for_Final_Step_Update Boolean default: false -- boolean

When set to true causes the script assigned to .Final_Step_Update_Script to be executed after the final integration step.

NOTE:

The Final Step Update script is executed after the last integration step has been completed for each frame that you view (or render).

<PF_Source>.Final_Step_Update_Script String

Specifies the script to be executed after the final integration step.

<PF_Source>.Use_File_for_Final_Step_Update Boolean default: false -- boolean

When set to true causes the script file assigned to .EveryStepUpdateScriptFile to be executed at each integration step.

<PF_Source>.Final_Step_Update_Script_File UndefinedClass default: undefined -- filename

Specifies the script file to be executed after the final integration step.

<PF_Source>.X_Coordinate Integer default: 0 -- integer

Returns an X Coordinate of the Emitter in the Particle View

<PF_Source>.Y_Coordinate Integer default: 0 -- integer

Returns an Y Coordinate of the Emitter in the Particle View

<PF_Source>.Z_Order Integer default: 0 -- integer

Get/Set the Z Order for drawing the Emitter in the Particle View.

<PF_Source>.width Integer default: 180 -- integer

Get/Set the Width of the PF_Source item in Particle View.

PF_Source Interfaces:

Interface: action

Interface: initialEvents

Interface: particleObjectExt

Interface: pfSystem

Interface: PViewItem


Birth : Helper

Birth - superclass: helper; super-superclass:node - 7:0 - classID: #(1962490630, 515064320)

Value > MAXWrapper > Node > Helper > Birth

Description:

The Birth operator enables creation of particles within the Particle Flow system using a set of simple parameters. In general, use Birth as the first operator in any event connected directly to a Source event.

Constructor:

Birth...

Properties:

<Birth>.Amount Integer default: 200 -- integer

Get/Set the total number of particles emitted by the operator.

<Birth>.Emit_Start Integer default: 0 -- integer

Get/Set the time in ticks at which the operator begins emitting particles.

NOTE:

The time value is shown as frames in the UI.

<Birth>.Emit_Stop Integer default: 4800 -- integer

Get/Set the time in ticks at which the operator stops emitting particles.

NOTE:

The time value is shown as frames in the UI.

<Birth>.Rate Float default: 60.0 -- animatable; float

Get/Set the number of particles emitted per second.

<Birth>.Subframe_Sampling Boolean default: true -- boolean

Enable/Disable the Subframe Sampling. Turning it on helps avoiding particle "puffing" by emitting particles at a much higher subframe rather than using the relatively coarse frame resolution.

<Birth>.Type Integer default: 0 -- integer

Controls the state of the radio buttons in the UI. Possible values are:

0: Amount - Specifies the total number of particles emitted by the operator

1: Rate - Specifies the number of particles emitted per second. The operator emits this number of particles per second starting at the Emit Start frame and ending at the Emit Stop frame.

NOTE:

To determine the number of particles emitted per frame when using Amount, divide the Amount value by the number of emission frames (Emit Stop-Emit Start+1).

Birth Interfaces:

The following Interfaces are exposed by the Birth Class:

Interface: action

Interface: operator

Interface: PViewItem

See also

Birth_Script : Helper

DeleteParticles : Helper

Particle Flow Classes


Birth_Script : Helper

Birth_Script - superclass: helper; super-superclass:node - 5:0 - classID: #(1962490658, 515064320)

Value > MAXWrapper > Node > Helper > Birth_Script

Description:

The Birth_Script operator enables creation of particles within the Particle Flow system using a MAXScript script. The script can use most of the program functionality available to MAXScript. See Limitations on using MAXScript with Particle Flow for a general list of limitations.

Constructor:

Birth_Script...

Properties:

<Birth_Script>.Proceed_Script String default: "-- This is a script that can be used to generate particles ..."

Specifies the script as string to use for the Birth Script.

Note: The default script with additional detailed comments can be found under Birth Script Example

<Birth_Script>.Emit_Start Integer default: 0 -- integer

Get/Set the time in ticks at which the operator begins emitting particles.

Note: The time value is shown as frames in the UI.

<Birth_Script>.Random_Seed Integer default: 12345 -- integer

Specifies the randomization value.

Birth_Script Interfaces:

The following Interfaces are exposed by the Birth_Script Class:

Interface: action

Interface: operator

Interface: PViewItem

See also

Using MAXScript in Script Actions

Birth : Helper

DeleteParticles : Helper

Particle Flow Classes

Particle Flow Sample Scripts


DeleteParticles : Helper

deleteParticles - superclass: helper; super-superclass:node - 4:0 - classID: #(1962490645, 515064320)

Value > MAXWrapper > Node > Helper > DeleteParticles

Description:

The DeleteParticles operator is used to remove particles from the particle system. By default, particles live 'forever', that is, for the duration of the animation. The DeleteParticles operator lets you give them a finite life span. This is useful for eliminating particles once they've served their purpose in the animation.

Constructor:

deleteParticles...

Properties:

<deleteHelper>.Type Integer default: 0 -- integer

Controld the state of the Remove radio buttons in the UI. Possible values are:

0: All Particles - Deletes all particles in the event immediately.

1: Selected Particles Only - Deletes particles selected at the Particle sub-object level in the event immediately.

2: By Particle Age - Deletes particles in the event after they've existed for a specific length of time, with an optional random variation. Choosing this makes the Life Span and Variation settings available.

<deleteHelper>.Life_Span Integer default: 9600 -- integer

Get/Set the number of ticks the particles will live. After this period, particles are deleted.

NOTE:

9600 ticks equal 2 seconds or 60 frames at 30 fps. This value is exposed as frames in the UI. The default UI value is 60 frames.

<deleteHelper>.Variation Integer default: 1600 -- integer

Get/Set the maximum amount by which Life Span may vary. To get each particle's actual life span, this value is multiplied by a random number between -1.0 and 1.0, and then added to Life Span.

Note: The UI value is exposed as frames and defaults to 10 frames which is 1/3 second at 30 fps, or 1600 ticks .

<deleteHelper>.Random_Seed Integer default: 12345 -- integer

Specifies a randomization value.

deleteParticles Interfaces:

The following Interfaces are exposed by the deleteHelper Class:

Interface: action

Interface: operator

Interface: PViewItem

See also

Birth : Helper

Birth_Script : Helper

Particle Flow Classes


Position_Icon : Helper

Position_Icon - superclass: helper super-superclass:node - classID: #(1962490631, 515064320)

Value > MAXWrapper > Node > Helper > Position_Icon

Description:

The Position_Icon operator can be used to control the initial placement of particles on the emitter. You can set the emitter to emit particles from its surface, volume, edges, vertices, or center. And, if you animate the emitter, you can cause its motion to be imparted to the particles it emits.

Constructor:

Position_Icon...

Properties:

<Position_Icon>.Lock_On_Emitter Boolean default:false

When set to true, causes all particles to remain at their initial positions on the emitter. In effect, they're glued to the emitter. When set to false, each particle's birth position is determined by the emitter's current location.

<Position_Icon>.Inherit_Emitter_Movement Boolean default:false

When set to true, the software sets each particle's rate and direction of motion to that of the emitter at the time of birth. When off, the emitter movement doesn't affect that of the particles. Used only when Lock On Emitter is set to true.

<Position_Icon>.Multiplier Float default:100.0 --percentage

Determines the percentage to which particles inherit the emitter's motion. Used only when Inherit Emitter Movement is set to true.

<Position_Icon>.Location Integer default:4

Controls the selection of the Location drop-down list in the UI.

0: Pivot - Emits particles from the center of the icon.

1: Vertices - For the Box and Rectangle icon types, emits particles from the corners of the icon. For the Sphere icon type, emits particles from the six intersections of the three circles that define the sphere. For the Circle icon type, emits particles from the center.

2: Edges - Emits particles from random points along the edges of the icon.

3: Surface - Emits particles from random points on the surface of the icon.

4: Volume - Emits particles from random points within the volume of the icon.

<Position_Icon>.Distinct_Points_Only Boolean default:false

Limits emission to a specific number of points defined by the Total_Distinct_Points value on the specified Location type.

NOTE:

Emission points are still randomized; change the .Random_Seed value to alter these.

<Position_Icon>.Total_Distinct_Points Integer default:10

Sets the number of emission points. Used only when Distinct Points Only is set to true.

<Position_Icon>.Random_Seed Integer default:12345

Specifies a randomization value.

<Position_Icon>.Subframe_Sampling BooleanClass default: false -- boolean

Controls the state of the "Subframe Sampling" checkbox in the UI. When set to true, Subframe Sampling will be performed.

Position_Icon Interfaces:

Interface: action

Interface: operator

Interface: PViewItem

See also

Particle Flow Classes


Position_Object : Helper

Position_Object - superclass: helper super-superclass:node - classID: #(1962490647, 515064320)

Value > MAXWrapper > Node > Helper > Position_Object

Description:

By default, particles are born, or emitted, from the Particle Flow icon. The Position_Object operator lets you emit particles from any other object or objects in the scene instead. This topic uses the term emitter to refer to an object or objects used to emit particles with this operator.

Use the Position_Object settings to control the initial placement of particles on the emitter. You can set the emitter to emit particles from its surface, volume, edges, vertices, or pivot, or from a sub-object selection. You can also control particle emission with a material applied to the object.

Constructor:

Position_Object...

Properties:

<Position_Object>.Lock_On_Emitter Boolean default:false

When set to true, causes all particles to remain at their initial positions on the emitter. When set to false, each particle's birth position is determined by the emitter's current location.

<Position_Object>.Inherit_Emitter_Movement Boolean default:false

When set to true, the software sets each particle's speed and direction of motion to those of the emitter at the time of birth. When set to false, the emitter movement doesn't affect that of the particles. Used only when Lock_On_Emitter is set to false.

<Position_Object>.Multiplier Float default:100.0 --percentage

Determines, as a percentage, the extent to which particles inherit the emitter's motion. Available only when Inherit_Emitter_Movement is on.

<Position_Object>.Variation Float default:0.0 --percentage

Determines, as a percentage, the extent to which inherited emitter motion can vary per particle. To determine the final multiplier for each particle, the Variation value is multiplied by a random number between -1.0 and 1.0, and then added to the Multiplier value.

<Position_Object>.emitter_Objects node array default:#()

Specifies the list of emitter nodes to be used. When the list is empty, the world origin (0.0,0.0,0.0) will be used as the emitter source.

<Position_Object>.Animated_Shape Boolean default:false

When set to true, allows particles to follow the surface of an object whose form is animated by morphing or with modifiers.

<Position_Object>.Subframe_Sampling Boolean default:false

When set to true, the operator acquires animation of the emitter shape on a tick basis (every 1/4800th of a second) rather than a frame basis. This provides greater precision in allowing the particle positions to follow animation of the emitter object's form.

<Position_Object>.Location Integer default:3

Controls the state of the Location drop-down list. It lets you specify where on each emitter the particles appear. This choice applies to all emitter objects.

0: Pivot - Emits particles from the original position of the emitter object's pivot. Moving the pivot does not affect this option.

1: Vertices - Emits particles from randomly selected vertices of the emitter objects.

2: Edges - Emits particles from random points along the edge sub-objects of the emitter objects.

3: Surface - Emits particles from random points on the surface of the icon.

4: Volume - Emits particles from random points within the volume of the icon.

5: Selected Vertices - Emits particles from the current vertex sub-object selection.

6: Selected Edges - Emits particles from the current edge sub-object selection.

7: Selected Faces - Emits particles from the current face or polygon sub-object selection.

<Position_Object>.Use_Surface_Offset Boolean default:false

Lets you specify a range of distances from the object surface for particle placement.

Use_Surface_Offset is not used when Location is set to 0 : Pivot or 1 : Volume. Use the Surface_Offset_Minimum and Surface_Offset_Maximum parameters to set the range.

NOTE:

Negative values offset the particles below the surface.

<Position_Object>.Surface_Offset_Minimum Float default:-1.0 --world units;

<Position_Object>.Surface_Offset_Maximum Float default:1.0 --world units;

When Use_Surface_Offset is set to true, let you specify the range of offset distances from the object surface.

<Position_Object>.Density_By_Emitter_Material Boolean default:false

When set to true, enables the usage of the Density_Type option.

<Position_Object>.Density_Type Integer default:0

Varies emission over the emitter surface based on properties of the material applied to the emitter. For example, if the object is assigned a black-and-white checkered diffuse map and you choose the Grayscale option, particles are emitted only from the white checks.

Possible values are:

0: Grayscale - The software internally converts the material-based coloring (diffuse) to grayscale, and then emits more particles in lighter areas and fewer in darker areas.

1: Opacity - Particles are more likely to appear on opaque areas than on transparent areas.

2: Grayscale & Opacity - Combines the two: More particles appear on light, opaque areas than on dark, transparent areas.

3: Red/Green/Blue - Considers only the specified color channel. The higher its value at any given pixel, the more likely particles are to appear there.

<Position_Object>.Use_Sub_Material Boolean default:false

When set to true, uses a sub-material from the Multi/Sub-Object material assigned to the emitter to define density values.

<Position_Object>.Material_ID Integer default:1

Specifies the material ID of the sub-material to be used for particle emission.

<Position_Object>.Apart_Placement Boolean default:false

When set to true, the software attempts to keep the particles apart by the amount specified in Distance. The likelihood of successfully separating particles depends on the number of particles, the specified distance, and the .Maximum_Number_of_Attempts value.

<Position_Object>.Apart_Distance Float default:1.0 --world units

Specifies the distance, in system units, by which the software should try to keep the particles separate.

<Position_Object>.Distinct_Points_Only Integer default:0

Limits emission to a specific number of points on the specified Location type. Emission points are still randomized. Change the Random_Seed value to alter these.

<Position_Object>.Total_Distinct_Points Integer default:10

Sets the number of emission points. Available only when .Distinct_Points_Only is set to true.

<Position_Object>.delete Integer default:0

When set to true, if the software cannot place a particle according to the current option, it deletes the particle. When set to false, particle placement is undefined; that is, it depends on other variables.

<Position_Object>.Random_Seed Integer default:12345

Specifies the randomization value.

<Position_Object>.Maximum_Number_of_Attempts Integer default:100

When .Apart_Placement is set to true, this specifies the maximum number of times Particle Flow will try to set particle positions that maintain the requested distance. If unsuccessful within this number of attempts, particles might be closer together than the requested distance. Also affects placement with .Density_By_Emitter_Material when .Density_Type is set to either of the Grayscale options.

Position_Object Interfaces:

Interface: action

Interface: operator

Interface: PViewItem

See also

Particle Flow Classes


rotation : Helper

rotation - superclass: helper super-superclass:node - classID: #(1962490633, 515064320)

Value > MAXWrapper > Node > Helper > Rotation

Description:

The Rotation operator lets you set and animate particle orientation during an event, with optional random variation. You can apply orientation in any of five different matrices: two random and three explicit.

Constructor:

rotation...

Properties:

<rotation>.Direction Integer default:0

Controls the state of the drop-down list in the Orientation Matrix group. Possible values are:

0: Random 3D - Gives each particle an arbitrary, random 3D orientation.

1: Random Horizontal - Gives each particle an arbitrary, random 3D orientation about the Z axis only. Rotation about the X and Y axes doesn't change (unless Divergence is used), so the particles remain vertical.

2: World Space - Orientation is specified in the world coordinate space. Use the X/Y/Z settings to specify the orientation for all particles.

3: Speed Space - The coordinate space for particle orientation is determined by the particles' direction upon entering the event.

<rotation>.Euler_X Float default:0.0

<rotation>.Euler_Y Float default:0.0

<rotation>.Euler_Z Float default:0.0

Set the basic orientation about the particles' local axes. Unavailable when Direction is set to 0 : Random 3D or 1 : Random Horizontal

<rotation>.Divergence Float default:0.0

Defines the range of variation (in degrees) for particle orientation. The actual deviation is calculated at random within this range. Unavailable when Direction is set to 3 : Speed Space.

<rotation>.Restrict_Divergence_To_Axis BooleanClass default: false -- boolean

When set to true, the Divergence will be restricted to the specified axis.

<rotation>.Divergence_Axis_X Float default: 1.0 -- animatable; float

Defines the X component of the custom Divergence Axis used when Restrict_Divergence_To_Axis is set to True.

<rotation>.Divergence_Axis_Y Float default: 0.0 -- animatable; float

Defines the Y component of the custom Divergence Axis used when Restrict_Divergence_To_Axis is set to True.

<rotation>.Divergence_Axis_Z Float default: 0.0 -- animatable; float

Defines the Z component of the custom Divergence Axis used when Restrict_Divergence_To_Axis is set to True.

<rotation>.Random_Seed Integer default:12345

Specifies a randomization value.

rotation Interfaces:

Interface: action

Interface: operator

Interface: PViewItem

See also

Particle Flow Classes


scaleParticles : Helper

scaleParticles- superclass: helper super-superclass:node - classID: #(1962490636, 515064320)

Value > MAXWrapper > Node > Helper > scaleParticles

Description:

ScaleParticles Test lets the particle system check particle scaling, or particle size before or after scaling, and branch accordingly. The test provides a variety of axis options for measuring scale or size.

Constructior:

ScaleParticles...

Properties:

<scaleParticles>.Type Integer default:2

Controls the state of the Type drop-down list in the UI.

Possible values are:

0: Overwrite Once - Sets the scale one time only as an absolute percentage value, disregarding any previous scaling.

1: Inherit Once - Sets the scale one time only as a percentage of existing scaling. The existing scaling should be specified with a previous Scale operator, the Scale setting in the Shape operator, or a Shape Instance operator.

2: Absolute - Sets the scale continuously, while the particle is in the event, as an absolute percentage value, disregarding any previous scaling.

3: Relative First - Sets the scale continuously, while the particle is in the event, as a percentage of existing scaling. The existing scaling should be specified with a previous Scale operator, or a Shape Instance.

4: Relative Successive - Scales the particles continuously, relative to scaling set earlier in the same event.

<scaleParticles>.X_Scale_Factor Float default:100.0 --percentage

Sets the scaling of the X axis as a percentage of the particle's current size. To scale uniformly, set ConstrainScaleFactor to true, then change any axis setting. Range is 0.0 to 10000000.0

<scaleParticles>.Y_Scale_Factor Float --percentage

Sets the scaling of the Y axis as a percentage of the particle's current size. To scale uniformly, set ConstrainScaleFactor to true, then change any axis setting. Range is 0.0 to 10000000.0

<scaleParticles>.Z_Scale_Factor Float --percentage

Sets the scaling of the Z axis as a percentage of the particle's current size. To scale uniformly, set ConstrainScaleFactor to true, then change any axis setting. Range is 0.0 to 10000000.0

<scaleParticles>.Constrain_Scale Boolean; default:true

When set to true, retains the current ratio of scale factor settings, so that changing any axis setting changes all of them.

<scaleParticles>.X_Scale_Variation Float default:0.0 --percentage

Sets the scaling variation of the X axis as a percentage of the particle's previous size. To scale uniformly, turn on ConstrainScaleVariation, and then change any axis setting. Range is 0.0 to 100.0.

<scaleParticles>.Y_Scale_Variation Float --percentage

Sets the scaling variation of the Y axis as a percentage of the particle's previous size. To scale uniformly, turn on ConstrainScaleVariation, and then change any axis setting. Range is 0.0 to 100.0.

<scaleParticles>.Z_Scale_Variation Float --percentage

Sets the scaling variation of the Z axis as a percentage of the particle's previous size. To scale uniformly, turn on ConstrainScaleVariation, and then change any axis setting. Range is 0.0 to 100.0.

<scaleParticles>.Constrain_Scale_Variation Boolean default:true

When set to true, retains the current ratio of scale variation settings, so that changing any axis setting changes all of them.

<scaleParticles>.Bias Integer default:1

Lets you choose how to distribute the scaling variation within the specified range or ranges.

0: None - No bias; scaling variation is distributed equally through the range.

1: Centered - Scaling variation is concentrated near the middle of the range; that is, at 0.0%.

2: Towards Minimum - Scaling variation is concentrated near the lower end of the range (base-variation); that is, most scaling variants will be smaller than the scaling value.

3: Towards Maximum - Scaling variation is concentrated near the upper end of the range (base+variation); that is, most scaling variants will be larger than the scaling value.

<scaleParticles>.Sync_Type Integer

Specifies the time frame to use when animating Test_Value and Variation:

0: Absolute Time - Any keys set for parameters are applied at the actual frames for which they are set.

1: Particle Age - Any keys set for parameters are applied at the corresponding frames of each particle's existence.

2: Event Duration - Any keys set for parameters are applied to each particle starting when it first enters the event.

<scaleParticles>.Random_Seed Integer

Specifies the randomization value.

scaleParticles Interfaces:

Interface: action

Interface: operator

Interface: PViewItem

See also

Particle Flow Classes


Spin : Helper

Spin - superclass: helper super-superclass:node - classID: #(1962490634, 515064320)

Value > MAXWrapper > Node > Helper > Spin

Description:

The Spin operator gives an angular velocity to particles in an event, with optional random variation. Spin is applied once per event per particle, except when using the Speed Space Follow option; however, the settings can be animated.

Constructor:

Spin...

Properties:

<Spin>.SpinRate Float default:360.0 --angle

The rate of revolution in degrees per second.

<Spin>.Variation Float default:0.0 --angle

The maximum amount, in degrees per second, by which the spin rate can vary. The actual variation is calculated once, at random, for each particle.

<Spin>.Direction Integer default:0

Controls the state of the drop-down list in the UI. Lets you apply the spin on a random or specific axis, with optional random variation of the spin axis. Possible values are:

0: Random 3D - Spins each particle about an arbitrary, random 3D axis.

1: World Space - The spin axis is specified in the world coordinate space. Use the X/Y/Z settings to specify the spin axis.

2: Particle Space - The spin axis is specified in the local coordinate space of each particle. Use the X/Y/Z settings to specify the spin axis.

3: Speed Space - The coordinate space for particle orientation is determined by the particles' direction upon entering the event. The X axis is aligned with the particle direction, while the Z axis is perpendicular to the X axis and is pointed upward with respect to world space as much as possible. Use the X/Y/Z settings to specify the orientation for all particles.

4: Speed Space Follow - The coordinate space for particle orientation is determined by the particles' direction throughout the event. Use this option to allow particles that change direction during the event to keep the spin axis aligned with their direction. The X axis is aligned with the particle direction, while the Z axis is perpendicular to the X axis and is pointed upward with respect to world space as much as possible. Use the X/Y/Z settings to specify the orientation for all particles.

<Spin>.Spin_X_Axis Float default:0.0

<Spin>.Spin_Y_Axis Float default:0.0

<Spin>.Spin_Z_Axis Float default:1.0

These values define the spin axis. Unavailable when Direction is set to 0 : Random 3D. Range is from -1.0 to 1.0.

<Spin>.Divergence Float default:0.0 --angle

Defines the range of variation (in degrees) for spin-axis orientation. The actual deviation is calculated at random within this range. Unavailable when Direction is set to 0 : Random 3D. Range is from 0 to 180.

<Spin>.Random_Seed Integer default:12345

Specifies a randomization value.

Spin Interfaces:

Interface: action

Interface: operator

Interface: PViewItem

See also

Particle Flow Classes


Speed_Keep_Apart : Helper

Keep_Apart : Helper

Keep_Apart - superclass: helper super-superclass:node - classID: #(1962490652, 515064320)

Value > MAXWrapper > Node > Helper > Keep_Apart

Description:

The Keep_Apart operator lets you apply forces to particles to cause them to separate to prevent or minimize collisions among particles. Alternatively, you can use a negative force to keep particles from separating too much. The operator works by controlling particle speed and acceleration.

Constructor:

Keep_Apart...

Properties:

<Keep_Apart>.Force Float default:100.0 --world units

Get/Set the amount of force applied to the particles. Use positive values to separate particles, or negative values to move them closer together.

<Keep_Apart>.Use_Accel_Limit Boolean default:true

When set to true, the Accel_Limit value will be considered. When set to false, the software uses any necessary acceleration.

<Keep_Apart>.Accel_Limit Float default:1000.0 --world units

When Use_Accel_Limit is set to true, lets you set a maximum acceleration value that can be applied to particles' motion.

<Keep_Apart>.Use_Speed_Limit Boolean default:false

When set to true, the Speed_Limit value will be considered. When set to false, the software uses any necessary speed.

<Keep_Apart>.Speed_Limit Float default:600.0 --world units

When Use_Speed_Limit is set to true, lets you set a maximum speed value that can be applied to particles' motion.

<Keep_Apart>.Range_Type Integer default:0

Lets you set a volume and falloff within which the force takes effect, either as absolute distances or relative to particle size.

0: Absolute Size - Choose this to set the core radius and falloff zone as absolute distances, in system units, using the Core_Size and Falloff_Size values.

1: Relative to Particle Size - Choose this to set the core radius and falloff zone as percentages, relative to the radius of each particle. The particle radius is determined by measuring the distance from the pivot point to the farthest corner of its bounding box.

<Keep_Apart>.Core_Size Float default:10.0 --world units

The distance from each particle's pivot point, in system units, within which the force is applied at full strength. Used when Range_Type is set to 0 : Absolute Size.

<Keep_Apart>.Falloff_Size Float default:10.0 --world units

The distance beyond the core radius, in system units, over which the force diminishes from full strength to 0. Used when Range_Type is set to 0 : Absolute Size.

<Keep_Apart>.Core_Percentage Float default:200.0 --percentage

The distance from each particle, as a percentage of the particle radius, within which the force is applied at full strength. Used when Range_Type is set to 1 : Relative to Particle Size.

<Keep_Apart>.Falloff_Percentage Float default:100.0 --percentage

The distance beyond the core radius, as a percentage of the radius, over which the force diminishes from full strength to 0. Used when Range_Type is set to 1 : Relative to Particle Size.

<Keep_Apart>.Variation Float default:0.0 --percentage

The amount by which range values can vary randomly, as a percentage of the specified values. The software uses the same random variation value for both Core and Falloff values, whether absolute or relative.

<Keep_Apart>.Scope_Type Integer default:0

By default, the Keep Apart force affects only particles in the current event, or particle group. These settings let you widen the scope to other events or systems.

0: Particle Group - The operator affects only particles in the current event.

1: Particle System - The operator affects all particles in the current particle system.

2: Selected Particle Groups - The operator affects only highlighted events in the list below this choice. After choosing this option, click items in the list to highlight them.

3: Selected Particle Systems - The operator affects only highlighted particle systems in the list below this choice. After choosing this option, click items in the list to highlight them.

<Keep_Apart>.Selected_Groups int array default:#()

Get/Set the Groups to be affected when Scope_Type is set to 2 : Selected Particle Groups.

<Keep_Apart>.Selected_Systems int array default:#()

Get/Set the Systems to be affected when Scope_Type is set to 3 : Selected Particle Systems.

<Keep_Apart>.Use_Script_Float Integer

Possible values are:

0: Not Used - Particle Flow uses the Force setting specified in the Parameters rollout.

1: Influence - Particle Flow applies the script particleFloat value to the .Force value.

<Keep_Apart>.Use_Script_Vector Integer

Controls the state of the drop-down list in the additional Script Wiring rollout.

Possible values are:

0: Not Used - Particle Flow uses the Range settings specified in the Parameters rollout.

1: Absolute Size Range - Particle Flow applies the script particleVector values to the Absolute Size Range values. The X component of the vector value is used for the Core_Size value, and the Y component for the Falloff_Size value.

2: Relative Size Range - Particle Flow applies the script particleVector values to the Relative Size Range values. The X component of the vector value is used for the .Core_Percentage value, and the Y component for the .Falloff_Percentage value.

<Keep_Apart>.Random_Seed Integer

Specifies a randomization value.

Script Wiring:

Script Wiring lets you use a script to control the Force and Range parameters, which you normally specify in the operator's properties.

  • Place a Script Operator before the Speed_Keep_Apart operator in the event,

  • Enable Script Wiring using the .setUseScriptWiring method in the Interface: action

  • Use the Script_Operator to define values in the particleFloat and particleVector channels.

Channels:

ParticleFloat - Force

When Script Wiring is active, the values in the particleFloat channel will control the .Force value of the Keep_Apart operator. For an example of a script that sets particleFloat values, see particleFloat Sample Script .

ParticleVector – Absolute Size

When .Use_Script_Vector is set to 1, the values in the particleVector channel will control the Absolute Size Range values.

The X component of the vector will be used for the .Core_Size value.

The Y component of the vector will be used for the .Falloff_Size value.

ParticleVector – Relative Size

When .Use_Script_Vector is set to 2, the values in the particleVector channel will control the Relative Size Range values.

The X component of the vector will be used for the .Core_Percentage value.

The Y component of the vector will be used for the .Falloff_Percentage value.

Keep_Apart Interfaces:

Interface: action

Interface: operator

Interface: PViewItem

See also

Particle Flow Classes

particleFloat Sample Script

particleVector Sample Script


Speed : Helper

Speed - superclass: helper super-superclass:node - classID: #(1962490632, 515064320)

Value > MAXWrapper > Node > Helper > Speed

Description:

The Speed operator provides basic controls over particle speed and direction.

Constructor:

Speed...

Properties:

<Speed>.Speed Float default:300.0 --world units

Get/set the particle speed in system units per second.

<Speed>.Variation Float default:0.0 --world units

Get/set the amount by which particle speed can vary, in system units per second.

<Speed>.Direction Integer default:0

0: Along Icon Arrow - Particles move parallel to the icon arrow. Rotate the icon to change the direction.

1: Icon Center Out - Each particle moves along an imaginary line drawn between the particle's location and the icon center.

2: Icon Arrow Out - Each particle moves along an imaginary line drawn between the particle's location and the icon arrow. The line is perpendicular to the icon arrow, which is considered an infinite line for this purpose.

3: Random 3D - Particles move in all directions. This option is affected by the Random_Seed setting.

4: Random Horizontal - Each particle moves in a random horizontal direction; that is, parallel to the world XY plane. This option is affected by the Random_Seed value.

5: Inherit Previous - Uses the current direction of motion.

<Speed>.Reverse Boolean default:false

When set to true, the direction is reversed.

<Speed>.Divergence Float default:0.0

When set to true, spreads out the particle stream. Use the numeric setting to define the extent of the divergence, in degrees. Range is from 0 to 180. The value is animatable.

NOTE:

This value is not used when Direction is set to 3 : Random 3D.

<Speed>.Random_Seed Integer default:12345

Specifies a randomization value.

Speed Interfaces:

Interface: action

Interface: operator

Interface: PViewItem

See also

Particle Flow Classes


Speed_By_Surface : Helper

Speed_By_Surface - superclass: helper super-superclass:node - classID: #(1962490653, 515064320)

Value > MAXWrapper > Node > Helper > Speed_By_Surface

Description:

The Speed_By_Surface operator lets you control particle speed and direction with any object or objects in the scene.

Constructor:

Speed_By_Surface...

Properties:

<Speed_By_Surface>.Speed_Type Integer default:0

0: Set Speed Once - The operator sets the speed for each particle once: when the particle enters the event.

1: Control Speed Continuously - The operator sets particle speed throughout the event.

<Speed_By_Surface>.Set_Speed_Magnitude Boolean default:true

When set to false and Speed_Type is set to 1 : Control Speed Continuously, the current particle speed is used instead of the Speed_Value.

<Speed_By_Surface>.Speed_Value Float default:300.0 --world units

Get/set the particle speed in system units per second.

<Speed_By_Surface>.Speed_Variation Float default:0.0 --world units

Get/set the amount by which particle speed can vary, in system units per second.

<Speed_By_Surface>.Surface_Objects node array default:#()

Get/set the array of surface objects to use.

<Speed_By_Surface>.Animated_Shape Boolean default:false

When set to true allows particles to follow the surface of an object whose form is animated by morphing or with modifiers.

<Speed_By_Surface>.Subframe_Sampling Boolean default:false

When set to true, the operator acquires animation of the Surface Geometry shape on a tick basis (every 1/4800th of a second) rather than a frame basis. This provides greater precision in allowing the particle positions to follow animation of the Surface Geometry object's form

<Speed_By_Surface>.Set_Speed_by_Surface_Material Boolean default:false

Varies particles' existing speed and direction based on properties of the material applied to each Surface Geometry object.

<Speed_By_Surface>.Material_Type Integer default:3

0: Grayscale Multiplier - Lets material luminance control speed, with darker areas producing slower particles and lighter areas producing faster ones. The software multiplies the luminance of the material near each particle, converted to a percentage, by the particle's current speed. A luminance of 0 converts to 0%, of 128 converts to 50%, and of 255 converts to 100%.

1: Signed Grayscale - Works like Grayscale Multiplier, but the multiplier can be negative as well, causing reversal of motion. Signed Grayscale uses a material luminance value of 128 as the midpoint, and assigns it a multiplier of 0%. Luminance values from 0 to 127 result in multipliers of -100% to about -1%, respectively, and values of 129 to 255 result in multipliers of about 1% to 100%, respectively.

2: RGB as World XYZ Mult. - Works like Grayscale Multiplier, but uses the intensity of the material's red, green, and blue channels to affect particle speed on the world X, Y, and Z axes, respectively.

3: RGB as Local XYZ Mult. - Works like RGB as World XYZ Mult., but uses the object's local coordinates rather than world coordinates.

<Speed_By_Surface>.Use_Sub_Material Boolean default:false

When set to true, uses a sub-material from the Multi/Sub-Object material assigned to the Surface Geometry object to define speed.

<Speed_By_Surface>.Material_ID Integer default:1

Specifies the material ID of the sub-material to be used for particle speed control.

<Speed_By_Surface>.Direction_Type Integer default:0

Specifies which way the particles go after they are born.

0: Surface Normals - Each particle moves along a line perpendicular to the nearest face. The direction the surface faces doesn't matter.

1: Out Of Surface - Particles move away from the closest face.

2: Parallel To Surface - Each particle travels parallel to the nearest face.

<Speed_By_Surface>.Divergence Float default:0.0

When set to true, spreads out the particle stream. Use the numeric setting to define the extent of the divergence. Range is from 0 to 180. The value can be animated. This option is only used when Speed_Type is set to 0 : Set Speed Once.

<Speed_By_Surface>.Acceleration_Limit Float default:100.0 --world units

Sets the maximum acceleration. The higher this value, the more quickly particles can turn and change speed.

<Speed_By_Surface>.Unlimited_Range Boolean default:true

When set to true, the surface controls speed and direction of particles at any distance. When false, particles must be within the range specified by the Range value.

<Speed_By_Surface>.Range Float default:10.0 --world units;

The maximum distance, in system units, between the particles and controlling surface. The Surface Geometry will not control particles beyond this distance.

<Speed_By_Surface>.Falloff Float default:10.0 --world units;

The distance, in system units, beyond the Range value within which the Surface Geometry exerts partial control over particles. The degree of control diminishes from 100% at the Range distance to 0% at the Range+Falloff Zone distance.

<Speed_By_Surface>.Sync_Type Integer default:0

Controls the state of the Synch By drop-down list in the UI. Specifies the time frame for applying animated parameters.

0: Absolute Time - Any keys set for parameters are applied at the actual frames for which they're set.

1: Particle Age - Any keys set for parameters are applied at the corresponding frames of each particle's existence.

2: Event Duration - Any keys set for parameters are applied to each particle starting when it first enters the event.

<Speed_By_Surface>.Random_Seed Integer default:12345

Specifies a randomization value.

Speed_By_Surface Interfaces:

Interface: action

Interface: operator

Interface: PViewItem

See also

Particle Flow Classes


SpeedByIcon : Helper

SpeedByIcon - superclass: helper super-superclass:node - classID: #(1962490650, 515064320)

Value > MAXWrapper > Node > Helper > SpeedByIcon

Description:

The SpeedByIcon operator lets you use a special, non-rendering icon to control particle speed and direction. Its operator icon appears in the viewport when you add the operator to the system. When animated, the operator icon's motion is imparted to the particles.

Constructor:

SpeedByIcon...

Properties:

<SpeedByIcon>.Accel_Limit Float default:100.0 --world units

The maximum amount, in system units per second per second, by which the particles' speed can change in order to match the speed of the operator icon.

<SpeedByIcon>.Influence Float default:100.0 --percentage

Determines the mix of the previous speed with the speed of the operator icon. Range=0.0 to 100.0.

<SpeedByIcon>.Use_Speed_Variation Boolean default:false

When set to true, enables random variation of the particles' speed, so they don't all move at exactly the same rate as the icon.

<SpeedByIcon>.Speed_Minimum Float default:50.0 --percentage

Get/set the minimum percentage of particle speed variation when Use_Speed_Variation is set to true.

<SpeedByIcon>.Speed_Maximum Float default:100.0 --percentage

Get/set the maximum percentage of particle speed variation when Use_Speed_Variation is set to true.

<SpeedByIcon>.User_Icon_Orientation Boolean default:false

When set to true, applies animation of the icon's orientation to the particles.

<SpeedByIcon>.Steer_Towards_Trajectory Boolean default:false

When set to true, particles farther away than the Distance value (see below) from the icon are moved directly toward the icon.

<SpeedByIcon>.Distance Float default:10.0 --world units

Get/set the distance between the particles and the operator icon beyond which Steer_Towards_Trajectory takes effect.

<SpeedByIcon>.Sync_Type_Param_Animation Integer default:0

Controls the state of the Sync By drop-down list in the Parameters Animation group in the UI. Specifies the time frame for applying animated parameters:

0: Absolute Time - Any keys set for parameters are applied at the actual frames for which they're set.

1: Particle Age - Any keys set for parameters are applied at the corresponding frames of each particle's existence.

2: Event Duration - Any keys set for parameters are applied to each particle relative to the frame at which it first enters the event.

<SpeedByIcon>.Sync_Type_Icon_Animation Integer default:2

Controls the state of the Sync By drop-down list in the Icon Animation group in the UI. Specifies the time frame for applying animation of the icon to the particles:

0: Absolute Time - Any keys set for icon motion are applied at the actual frames for which they're set.

1: Particle Age - Any keys set for icon motion are applied at the corresponding frames of each particle's existence.

2: Event Duration - Any keys set for icon motion are applied to each particle relative to the frame at which it first enters the event.

<SpeedByIcon>.Icon_Size Float default:30.0 --world units

Get/Set the icon size.

<SpeedByIcon>.Color_Type Boolean default:true

Controls the state of the Color Coordinated checkbox in the UI.

<SpeedByIcon>.Random_Seed Integer default:12345

Specifies a randomization value.

SpeedByIcon Interfaces:

Interface: action

Interface: operator

See also

Particle Flow Classes


shapeStandard : Helper

shapeStandard - superclass: helper super-superclass:node - classID: #(1962490635, 515064320)

Value > MAXWrapper > Node > Helper > shapeStandard

Description:

ShapeStandard is the default operator for defining the geometry used in the particle system. You can use it to specify particles in the shape of pyramids, cubes, spheres, or vertices, as well as particle size.

NOTE:

All primitive particles created with Shape have pivot points in their geometric centers.

Constructor:

shapeStandard...

Properties:

<ShapeStandard>.Shape Integer default:0

Specifies the shape. Possible values are:

0: Tetra - These tetrahedron-shaped particles have a four triangular sides. Having only four polygons, the tetra is the simplest of the rendering particle shapes

1: Cube - These box-shaped particles have six square sides, all the same size

2: Sphere - Creates spherical particles. The sphere has the most polygons of the rendering particle shapes, and its orientation isn't obvious.

3: Vertex - Use this option to create non-rendering particles whose sole attribute is their location. This can be useful when using script operators

<ShapeStandard>.Size Float default:10.0 --world units

Sets the overall size of the particles in system units.

<ShapeStandard>.Use_Scale Boolean default:false

When set to true, the .Scale value will be used.

<ShapeStandard>.Scale_Value Float default:100.0 --percentage

Sets the size of the particles as a percentage of the .Size value.

shapehelper Interfaces:

Interface: action

Interface: operator

Interface: PViewItem

See also

Shape_Facing : Helper

Shape_Instance : Helper

Shape_Mark : Helper

Particle Flow Classes


Shape_Facing : Helper

Shape_Facing - superclass: helper super-superclass:node - classID: #(1962490641, 515064320)

Value > MAXWrapper > Node > Helper > Shape_Facing

Description:

The Shape_Facing operator creates each particle as a rectangle that always faces a particular object, camera, or direction. For effects like smoke, fire, water, bubbles, or snowflakes, use Shape_Facing with a material containing appropriate opacity and diffuse maps.

By default, the particles' top and bottom sides are parallel to the horizontal plane. The Orientation setting lets you change this default alignment.

Constructor:

Shape_Facing...

Properties:

<Shape_Facing>.Parallel Boolean default:false

When false, all particles continuously rotate to stay facing toward the Look At object. Each particle's orientation varies because its location differs from those of the others. When true, all particles face in the same direction, defined by an imaginary line between the Particle Source gizmo center and the Look At object.

<Shape_Facing>.Size_Space Integer default:0

Use these settings to specify the coordinate system for setting the size, as well as the size parameters. The numeric settings in this group are not animatable.

0: In World Space - Sets the absolute size in system units, using the World coordinate system.

1: In Local Space - Sets particle size relative to the existing size, in local space. The software uses the dimensions of the existing shape to determine the size of the "facing rectangle"

2: In Screen Space - Sets the facing particles' size as a percentage of the screen width. The actual size of each particle changes as necessary throughout the animation, depending its distance from the camera, to maintain a constant size from the camera's point of view. This option is available only when the Look At object is a camera, and Use Parallel Direction is off.

<Shape_Facing>.Units Float default:1.0 --world units

With the 0: In World Space option, sets the particle size in system units. Range is 0 to 1000000000.

<Shape_Facing>.Inherited_Scale Float default:100.0 --percentage; 'Inherited Scale'

Sets the facing particles' size as a percentage of the existing size. Range is 0 to 100.

<Shape_Facing>.Proportion Float default:1.0 --percentage

Sets the particle size as a percentage of the screen width.

<Shape_Facing>.Variation Float default:0.0 --percentage

Sets the percentage by which particle size can vary.

<Shape_Facing>.Pivot_At Integer default:1

Specifies the part of the particle around which rotation is performed when maintaining the facing direction.

Possible values are:

0: Top - the center of the top side is used as the particle center for rotation

1: Center

2: Bottom - the center of the bottom side is used as the particle center for rotation

<Shape_Facing>.WH_Ratio Float default:1.0

Defines the aspect (width-to-height) ratio of the shape rectangle.

<Shape_Facing>.Orientation Integer default:0

Get/Set the index of the Orientation drop-down list to choose how particles rotate on the axes not specified by the Look At direction. Default=0.

0: Align to Horizon - Keeps the top edge aligned with the horizon (the world XY plane).

1: Align to Speed Follow - Uses the right side of each particle as the leading edge, so the top and bottom edges are aligned with the direction of particle motion.

2: Random - Orients the top edge at random.

3: Allow Spinning - To spin the particles, choose this option, and in the same event use a Rotation Spin operator. In the latter, set Rotation Axis to Particle Space and use the default axis values: X=0, Y=0 , Z=1.

<Shape_Facing>.Random_Seed Integer default:12345

Specifies the randomization value.

shape_facing Interfaces:

The following Interfaces are exposed by the shape_facing Class:

Interface: action

Interface: operator

Interface: PViewItem

See also

Shape_Instance : Helper

Shape_Mark : Helper

Particle Flow Classes


Shape_Instance : Helper

Shape_Instance - superclass: helper super-superclass:node - classID: #(1962490639, 515064320)

Value > MAXWrapper > Node > Helper > Shape_Instance

Description:

Shape_Instance lets you use any geometry object in the scene as particles. You can effectively define only one particle shape per event, but using tests you can split the particle stream into any number of branches and define a different particle shape for each. You can also use combined objects as particle geometry and specify that Particle Flow is to use a separate member of the group for each particle.

Constructor:

Shape_Instance...

Properties:

<Shape_Instance>.Group_Members Boolean default:false

When set to true, group members are treated as separate particles.

<Shape_Instance>.Object_And_Children Boolean default:false

When set to true, linked objects are treated as separate particles.

<Shape_Instance>.Object_Elements Boolean default:false

When set to true, element sub-objects of a single mesh object are treated as separate particles.

<Shape_Instance>.Set_Scale Boolean default:true

When set to true, the Scale value will be applied.

<Shape_Instance>.Scale_Value Float default:100 --percentage

Specifies a uniform scaling factor for all particles. Range is from 0 to 100000.

<Shape_Instance>.Variation Float default:0.0 --percentage

Specifies a randomized percentage of scaling variation. Use the Uniqueness setting to change the randomization. Range=0 to 100.

<Shape_Instance>.Acquire_Mapping Boolean default:true

When set to true, all mapping data from the reference object is transferred to particles.

<Shape_Instance>.Acquire_Material Boolean default:true

When set to true, material data from the reference object is transferred to particles.

<Shape_Instance>.Random_Shape Boolean default:false

When set to true, assigns shapes to particles in random order. When off, Particle Flow emits each shape in the multi-shape object as a single particle, in the order of the shape's X coordinate. In other words, the shape with the lowest X-axis coordinate is emitted first, then the one with the next highest, and so on. The option is used only if at least one of the following is set to true: Group_Members, Object_And_Children, Object_Elements

<Shape_Instance>.Animated_Shape Boolean default:false

When set to true, particles use any animation in the reference object, including cyclic animation applied with the Parameter Curve Out-of-Range Types controls. When off, the particles are not animated.

<Shape_Instance>.Acquire_Shape Boolean default:false

When set to true, Particle Flow acquires the particle shape from the reference object as each particle enters the event. Thus, if the reference object is animated, particles that enter at different times get different shapes. However, these shapes are not animated. When the option is off, the shape is acquired from frame 0.

NOTE:

This option is available only when Animated Shape is off.

<Shape_Instance>.Sync_Type Integer default:0

Lets you choose how to synchronize reference-object animation with the particles.

0: Absolute Time - all particles have the same shape at any given time moment.

1: Particle Age - Animation of the reference object is synchronized with particle age: Frame 0 of the reference-object animation corresponds to the frame of each particle's birth.

2: Event Start - Frame 0 of the reference-object animation corresponds to the moment the particle enters the event.

<Shape_Instance>.Add_Random_Offset Boolean default:false

When set to true, randomly varies the start of each particle's animation. Use the numeric setting to specify the number of frames by which the animation start can vary.

<Shape_Instance>.Random_Offset Integer default:4800

When set to true, randomly varies the start of each particle's animation. Use the numeric setting to specify the number of frames by which the animation start can vary.

<Shape_Instance>.Random_Seed Integer default:12345

Specifies a randomization value.

Shape_Instance Interfaces:

The following Interfaces are exposed by the Shape_Instance Class:

Interface: action

Interface: operator

Interface: PViewItem

See also

Shape_Facing : Helper

Shape_Mark : Helper

Particle Flow Classes


Shape_Mark : Helper

Shape_Mark - superclass: helper super-superclass:node - classID: #(1962490640, 515064320)

Value > MAXWrapper > Node > Helper > Shape_Mark

Description:

Use the Shape_Mark operator to replace each particle with either rectangle or a box cut out from the particle geometry with an image mapped onto it. The image can be animated and the animation can be synchronized with particle events.

A typical application of Shape_Mark would be to leave marks after particles impact objects in the scene. For example, you could use it to leave scorch marks after a torpedo hits a boat and explodes.

Constructor:

Shape_Mark...

Properties:

<Shape_Mark>.Contact_Object Node default:undefined

Get/Set the Contact Object.

<Shape_Mark>.Surface_Animation Boolean default:false

When set to true, Shape_Mark takes into account surface changes due to vertex animation of the Contact object.

<Shape_Mark>.Align_To Integer default:0

Controls the state of the Align To drop-down list in the UI. Depending on the Shape setting, Shape_Mark creates either a rectangle or a box cutout on the Contact geometry. The Orientation setting specifies how the shape is oriented. In the mark's local coordinate system, the X axis is Length, the Y axis is Width, and with the box cutout, Z is height. The Z axis is perpendicular to the surface of the object at the contact point.

Possible values are:

0: Speed - The Length direction is parallel to the projection of the particles' speed vector onto the contact plane.

1: Particle X/Y/Z - The Length direction is parallel to the projection of the particle's local coordinate axis X, Y, or Z, respectively, as the particle moves towards the contact object.

2: Random - Uses a random Length direction in the contact plane.

<Shape_Mark>.Divergence Float default:0.0

Applies a range of random variation, in degrees, to the orientation of the Length direction. Unavailable when using the 2 : Random option for Align_To.

<Shape_Mark>.Size_Space Integer default:0

Corresponds to the Size group radio buttons. Possible values are:

0: In World Space - Sets the absolute size in system units, using the World coordinate system.

1: In Local Space - Sets the mark size relative to the existing particle size, in local space. The software uses the dimensions of the existing shape to determine the size of the facing rectangle.

<Shape_Mark>.Width Float default:1.0 --world units

When Size_Space is set to 0 : In World Space, sets the particles Width in system units. Range is from 0 to 1000000000

<Shape_Mark>.Length Float default:1.0 --world units

When Size_Space is set to 0 : In World Space, sets the particles Length in system units. Range is from 0 to 1000000000

<Shape_Mark>.Inherited_Scale Float default:100.0 --percentage

Sets the percentage of the mark size, relative to the existing particle size. Range is from 0 to 100.

<Shape_Mark>.Variation Float default:0.0 --percentage

Sets the percentage by which particle size can vary.

<Shape_Mark>.Angle_Distortion Boolean default:false

When set to true, increases the Length value of the mark according to the particle's angle of approach. This effectively stretches the mark shape if particle approaches the contact geometry at a low angle. Available only when Align_To is set to 0 : Speed.

<Shape_Mark>.Max_Distortion Float default:1000.0 --percentage

Sets the maximum percentage by which the software may stretch the mark. Available only when Angle_Distortion is set to true.

<Shape_Mark>.Mark_Type Integer default:0

These settings let you specify the mark-making object as a rectangle or a box.

Possible values are:

0: Rectangle - The mark shape is a two-faced rectangle.

NOTE:

When using a material with Shape Mark, always choose this option.

1: Box Intersection - With this option, the software creates a box for each particle that leaves a mark, and derives the mark shape from a Boolean intersection between the Contact object and the box.

<Shape_Mark>.Height Float default:10.0 --world units

Sets the height of the box used with the Box Intersection method. Used only when Mark_Type is set to 1 : Box Intersection.

<Shape_Mark>.Multi_Elements Boolean default:false

When set to true, particles can leave marks on all parts of Contact objects that contain multiple elements. When set to false, a particle marks only the first element it collides with. Available only when Mark_Type is set to 1 : Box Intersection.

<Shape_Mark>.Pivot_Offset Float default:0.0 --percentage

Shifts the position of the shape mark along its length dimension with respect to the pivot of the impacting particle. Range is from -50.0 to 50.0.

By default, the center of the mark's length dimension coincides with the point where the particle's pivot strikes the Contact object. This setting lets you offset the mark's position to anywhere along its length.

NOTE:

The Width dimension and the Box Intersection's height dimension are always centered at the intersection of the particle pivot and the Contact object's surface.

<Shape_Mark>.Surface_Offset Float default:0.001 --world units

Specifies the height of the shape mark above the Contact object's surface. The mark is slightly elevated above the contact geometry to achieve the visual effect of the mark spot overlapping the contact geometry. This parameter is not animatable.

<Shape_Mark>.Surface_Offset_Variation Float default: 0.0 -- world units

Specifies the surface offset variation value in world units.

<Shape_Mark>.Vertex_Noise Float default: 0.0 -- world units

Specifies the vertex noise value in world units.

<Shape_Mark>.Continuous_Update Boolean default:false

When set to true, the shape of the mark is recalculated at each frame, according to the current positions of the particle and the contact surface. This option can consume a great amount of CPU time. Available only when Mark_Type is set to 1 : Box Intersection.

<Shape_Mark>.Generate_Mapping_Coords Boolean default:true

When set to true, allows correct application of the shape mark when using a mapped material. When not using a mapped material, you can save memory by setting it to false.

<Shape_Mark>.Random_Seed Integer default:12345

Specifies the randomization value.

Shape_Mark Interfaces:

The following Interfaces are exposed by the Shape_Mark Class:

Interface: action

Interface: operator

Interface: PViewItem

See also

Shape_Facing : Helper

Shape_Instance : Helper

Particle Flow Classes


mapping : Helper

mapping - superclass: helper super-superclass:node - classID: #(1962490637, 515064320)

Value > MAXWrapper > Node > Helper > Mapping

Description:

The Mapping operator lets you assign a constant UVW mapping to the entire surface of the particles. It works in conjunction with a map specified in a material operator in the current event. By animating the mapping coordinates, you can vary the location on the material map from which the particle color is taken, thus changing the particle color in a predictable way over time.

Constructor:

Mapping...

Properties:

<Mapping>.U_Map Float default:0.0 alias: U_Map_Coordinate

<Mapping>.V_Map Float default:0.0 alias: V_Map_Coordinate

<Mapping>.W_Map Float default:0.0 alias: W_Map_Coordinate

Set the coordinates on the map from which the particle color is taken. One pixel from this location is used to color the entire particle.

<Mapping>.Sync_Type Integer default:0

Controls the state of the Synch By drop-down list in the UI. Specifies the time frame for applying animated parameters. Possible values are:

0: Absolute Time - Any keys set for parameters are applied at the actual frames for which they're set.

1: Particle Age - Any keys set for parameters are applied at the corresponding frames of each particle's existence.

2: Event Duration - Any keys set for parameters are applied to each particle starting when it first enters the event.

<Mapping>.Channel_Type Integer default:0

Controls the state of the Channel radio buttons in the UI. Possible values are:

0: Map Channel – Use the Map Channel specified by the Map_Channel value

1: Vertex Color Channel – Use the Vertex Color channel.

<Mapping>.Map_Channel Integer default:1

The mapping is applied to the specified map channel.

<Mapping>.Show_In_Viewport Boolean default:false

The mapping is visible in the viewports.

mapping Interfaces:

Interface: action

Interface: operator

Interface: PViewItem

See also

Particle Flow Classes


Material_Dynamic : Helper

Material_Dynamic - superclass: helper super-superclass:node - classID: #(1962490663, 515064320)

Value > MAXWrapper > Node > Helper > Material_Dynamic

Description:

The Material_Dynamic operator lets you give particles material IDs that can vary during the event. It also lets you assign a different material to each particle based on its material ID. When used with an animated texture, this lets you assign a different frame or map to each particle based on its total age or the amount of time it has spent in the current event.

Constructor:

Material_Dynamic...

Properties:

<Material_Dynamic>.Assign_Material Boolean default:true

When on, the operator assigns a material to the particles. Default=on.

<Material_Dynamic>.Material Material default:undefined

<Material_Dynamic>.Assign_Material_ID Boolean default:false

When on, the operator assigns a material to the particles. Default=on.

<Material_Dynamic>.Show_In_Viewport Boolean default:false

When on, the material is shown applied to the particles in the viewports.

<Material_Dynamic>.Type Integer default:0

0: Same As Particle ID - Choose this when using a material containing an animated texture, such as Particle Bitmap, Particle Age, or Particle MBlur.

1: Reset Particle Age - When on, sets each particle's age to 0 when it enters the event.

2: Randomize Age Offset - When on, the software varies the difference between the particle age and the starting material ID at random. The maximum difference is determined by the Max Offset parameter.

3: Max Offset - The maximum number of frames by which the software can randomly vary particle age.

<Material_Dynamic>.Reset_Particle_Age Boolean default:false

When on, sets each particle's age to 0 when it enters the event

<Material_Dynamic>.Randomize_Age Boolean default:false

When on, the software varies the difference between the particle age and the starting material ID at random. The maximum difference is determined by the Max Offset parameter.

<Material_Dynamic>.Max_Age_Offset Time default:30f

The maximum number of frames by which the software can randomly vary particle age.

<Material_Dynamic>.Material_ID Integer default:1

Assigns the same material ID to all particles. Use the numeric field to set the ID value.

<Material_Dynamic>.Number_of_Sub_Materials Integer default:0

The highest ID number assigned to particles using the Cycle or Random option.

<Material_Dynamic>.Sub_Materials_Rate Float default:30.0 alias: SubMtls_Rate

Sets the number of times per second that the assigned material ID is incremented. If this value is the same as the rate at which particles enter the event, then one ID is assigned per particle. If it's lower, then multiple particles are given the same ID, or if it's higher, then the software increments the assigned ID faster than 1 per particle.

<Material_Dynamic>.Loop Boolean default:true

Assigns each particle a material ID in the range 1 to N, where N=# Sub-Materials, in increasing sequential order. The first ID assigned is 1, then 2, then ..., then N, then 1 again, and so on.

<Material_Dynamic>.Sync_Type Integer default:0

Specifies the time frame for applying animated parameters. Used only when Assign_Material_ID and Loop properties are set to true.

0: Absolute Time - Any keys set for parameters are applied at the actual frames for which they're set.

1: Particle Age - Any keys set for parameters are applied at the corresponding frames of each particle's existence.

2: Event Duration - Any keys set for parameters are applied to each particle starting when it first enters the event.

<Material_Dynamic>.Add_Random_Offset Boolean default:false

When set to true, the software varies the difference between the particle age and the assigned material ID at random based on the Random_Offset value. Used only when Assign_Material_ID and Loop properties are set to true.

<Material_Dynamic>.Random_Offset Integer default:4800

Specifies the variation of the difference between the particle age and the assigned material ID at random. The maximum difference is determined by the numeric parameter. Used only when Assign_Material_ID and Loop properties are set to true.

<Material_Dynamic>.Random_Seed Integer default:12345

Specifies the randomization value.

Material_Dynamic Interfaces:

The following Interfaces are exposed by the Material_Dynamic Class:

Interface: action

Interface: operator

Interface: PViewItem

See also

Particle Flow Classes


Material_Frequency : Helper

Material_Frequency - superclass: helper super-superclass:node - classID: #(1962490664, 515064320)

Value > MAXWrapper > Node > Helper > Material_Frequency

Description:

The Material_Frequency operator lets you assign a material to an event, and specify the relative frequency with which each sub-material appears. Typically, the material is a Multi/Sub-Object material, and you specify the frequency by setting a percentage for each of up to 10 different sub-materials (or material ID). The software assigns IDs to particles in a random sequence, based on these percentages. You can also use other materials that use sub-materials, such as Double Sided and Top/Bottom.

Constructor:

Material_Frequency...

Properties:

<Material_Frequency>.Assign_Material Boolean default:true

When set to true, the operator assigns a material to the particles.

<Material_Frequency>.Material Material default:undefined

Get/set the Material to be assigned to the particles.

<Material_Frequency>.Assign_Material_ID Boolean default:false

When set to true, the operator defines a material ID number for each particle.

<Material_Frequency>.Show_In_Viewport Boolean default:false

When set to true, the material is shown applied to the particles in the viewports.

<Material_Frequency>.Mtl_ID_1 Float default:50.0 --percentage

<Material_Frequency>.Mtl_ID_2 Float default:50.0 --percentage

<Material_Frequency>.Mtl_ID_3 Float default:0.0 --percentage

<Material_Frequency>.Mtl_ID_4 Float default:0.0 --percentage

<Material_Frequency>.Mtl_ID_5 Float default:0.0 --percentage

<Material_Frequency>.Mtl_ID_6 Float default:0.0 --percentage

<Material_Frequency>.Mtl_ID_7 Float default:0.0 --percentage

<Material_Frequency>.Mtl_ID_8 Float default:0.0 --percentage

<Material_Frequency>.Mtl_ID_9 Float default:0.0 --percentage

<Material_Frequency>.Mtl_ID_10 Float default:0.0 --percentage

Specify the relative likelihood of particles to be assigned the corresponding material ID. Assign values for all IDs, or sub-materials, in the material that you want to have applied to the particles.

<Material_Frequency>.Random_Seed Integer default:12345

Specifies a randomization value.

Material_Frequency Interfaces:

Interface: action

Interface: operator

Interface: PViewItem

See also

Particle Flow Classes


Material_Static : Helper

Material_Static - superclass: helper super-superclass:node - classID: #(1962490662, 515064320)

Value > MAXWrapper > Node > Helper > Material_Static

Description:

The Material_Static operator lets you give particles material IDs that remain constant throughout the event. It also lets you assign a material to each particle based on its material ID. The operator can assign the same material ID to all particles, or different IDs to successive particles on a cyclical or random basis. The most common usage of this latter capability is with a Multi/Sub-Object material, for applying a different material to each particle.

Constructor:

Material_Static...

Properties:

<Material_Static>.Assign_Material Boolean default:true

When set to true, the operator assigns a material to the particles

<Material_Static>.Material Material default:undefined

Get/set the Material to be assigned to the particles.

<Material_Static>.Assign_Material_ID Boolean default:false

When set to true, the operator defines a material ID number for each particle.

<Material_Static>.Show_In_Viewport Boolean default:false

When set to true, the material is shown applied to the particles in the viewports.

<Material_Static>.Type Integer default:0

Controls the state of the radio buttons in the UI defining the method for assigning Material IDs to particles. Possible values are:

0: Material ID - Assigns the same material ID to all particles. Use the Material_ID value to set the ID value.

1: Cycle - Assigns each particle a material ID in the range 1 to N, where N is the Number_of_Sub_Materials value, in increasing sequential order. The first ID assigned is 1, then 2, then ..., then N, then 1 again, and so on.

2: Random - Assigns each particle a random material ID in the range 1 to N, where N in Number_of_Sub_Materials.

<Material_Static>.Material_ID Integer default:1

Defines the Material ID to assign to particles when Type is set to 0 : Material ID.

<Material_Static>.Number_of_Sub_Materials Integer default:0

The highest ID number assigned to particles using the Cycle or Random option.

<Material_Static>.Rate_Type Integer default:1

Conrols the state of the radio buttons in the Rate group in the UI. Possible values are:

0: Per Second

1: Per Particle

<Material_Static>.Rate_Per_Second Float default:30.0

Sets the number of times per second that the assigned material ID is incremented. If this value is the same as the rate at which particles enter the event, then one ID is assigned per particle. If it's lower, then multiple particles are given the same ID, or if it's higher, then the software increments the assigned ID faster than 1 per particle.

<Material_Static>.Rate_Per_Particle Float default:1.0

Sets the number of particles that must appear before material ID assignment changes. For example, If you set Per Particle=3, the material ID changes every three particles.

<Material_Static>.Loop Boolean default:true

When set to true and the last ID has been assigned, the software loops back to the first ID and continues the cycle. When set to false, the software assigns the last cycle ID to all subsequent particles. Available only when Type is set to 1 : Cycle.

<Material_Static>.Random_Seed Integer default:12345

Specifies a randomization value.

Material_Static Interfaces:

Interface: action

Interface: operator

Interface: PViewItem

See also

Particle Flow Classes


Force : Helper

Force - superclass: helper super-superclass:node - classID: #(1962490646, 515064320)

Value > MAXWrapper > Node > Helper > Force

Description:

The Force operator lets you influence particle motion with one or more Space Warps from the Force category. Use this operator along with different forces to simulate the effects of wind, gravity, and so on.

Constructor:

Force...

Properties:

<Force>.Force_Space_Warps ArrayParameter default:#() -- node array; SubAnim

Specifies the Space Warps used by the Force operator.

NOTE:

The following force Space Warps work with the Force operator: Motor , Push , Vortex , Drag , PBomb , Displace , Gravity , Wind .

<Force>.Influence Float default:1000.0 -- animatable; percentage

Specifies the strength with which the force or forces are applied to the particles as a percentage. A negative Influence value reverses the force effects.

<Force>.Sync Integer default:0 -- integer

Specifies the time frame for applying animated parameters.

Possible values are:

0: Absolute Time - Any keys set for parameters are applied at the actual frames for which they are set.

1: Particle Age - Any keys set for parameters are applied at the corresponding frames of each particle's existence.

2: Event Duration - Any keys set for parameters are applied to each particle starting when it first enters the event.

<Force>.Force_Space_Warps Array default:#() -- node array; SubAnim

Specifies the list of Space Warps to be used.

<Force>.Force_Overlapping Integer default:0 --radio button number

Resolves how multiple forces that occupy the same volume of space affect the particles.

Possible values are:

0: Additive - the forces are combined according to their relative strengths.

1: Maximum - only the force with the greatest strength affects the particles.

<Force>.Use_Script_Float Integer default:0 -- integer

Controls the state of the Use Script Float As drop-down list in the additional Script Wiring rollout.

Possible values are:

0: Not Used - Particle Flow uses the Force setting specified in the Parameters rollout.

1: Influence - Particle Flow applies the script particleFloat value to the .Force value.

Script Wiring:

Script Wiring lets you use a script to control the .Force property which you normally specify in the operator's parameters.

  • Place a Script Operator before the Force operator in the event,

  • Use the method .setUseScriptWiring in Interface: action to enable the Script Wiring and then

  • Use the Script_Operator to define values in the particleFloat channel:

Supported Channels:

ParticleFloat -> Force

When Script Wiring is enabled, the values in the particleFloat channel will control the .Force value of the Force operator. For an example of a script that sets particleFloat values, see particleFloat Sample Script .

Force Interfaces:

The following Interfaces are exposed by the Force Class:

Interface: action

Interface: operator

Interface: PViewItem

See also

Particle Flow Classes

particleFloat Sample Script


Script_Operator : Helper

Script_Operator - superclass: helper super-superclass:node - classID: #(1962490659, 515064320)

Value > MAXWrapper > Node > Helper > Script_Operator

Description:

The Script_Operator enables control of particles within the Particle Flow system using a MAXScript script. The script can use most of the program functionality available to MAXScript. See Limitations on using MAXScript with Particle Flow for a general list of limitations.

Constructor:

Script_Operator...

Properties:

.Proceed_Script String

Defines the script to be used by the Script_Operator.

The default script slows particles, and then, when they are slow enough, splits off the first 50 particles into a stream traveling in a negative direction on the world X axis, and the remainder traveling in the opposite direction.

.Random_Seed Integer default: 12345

Specifies a randomization value.

Script_Operator Interfaces:

Interface: action

Interface: operator

Interface: PViewItem

See also

Using MAXScript in Script Actions

Particle Flow Classes

Particle Flow Sample Scripts


Cache : Helper

Cache - superclass: helper; super-superclass:node - classID: #(1962490661, 515064320)

Value > MAXWrapper > Node > Helper > Cache

Description:

The Cache operator records and stores particle states to memory.

Constructor:

Cache...

Properties:

<Cache>.Use_At Integer default: 0 -- integer

Controls the state of Use At drop-down list.

Possible values are:

0: Viewport

1: Render

2: Viewport/Render

<Cache>.Update_Type Integer default: 0 -- integer

Controls the state of the Update drop-down list. Determines whether Particle Flow should update the cache automatically, or let you do it manually.

0: Always - Changing any parameter under the Cache operator's purview causes it automatically to update stored data from the start of the current range (see next parameter) to the current frame.

1: Manually - updating occurs only when you click the Update button, or clear the cache and then move to a different frame.

<Cache>.Range_Type Integer default: 1 -- integer

Controls the index of the Range drop-down list. Sets the frame range within which the Cache operator operates:

0: Complete - The software caches the entire animation.

1: Active Segment - The software caches only frames in the active segment, as defined by the Start Time and End Time settings on the Time Configuration dialog.

2: Custom - The software caches only frames in the custom range, as defined by the Cache operator's Start Time and End Time settings (see following).

<Cache>.Start_Time Time default: 0f -- time

The first frame of the range considered for caching when Range_Type is set to 2 : Custom

<Cache>.End_Time Time default: 30f -- time

The last frame of the range considered for caching when Range_Type is set to 2 : Custom

<Cache>.Sampling_Type Integer default: 0 -- integer

Controls the state of the Sampling drop-down list.

<Cache>.Every_Nth_Frame Integer default: 5 -- integer

Specifies the Nth frame to sample.

<Cache>.Cache_Test_Results BooleanClass default: true -- boolean

When caching particle data, setting this to true caches the results of test actions as well.

This is important if Cache is used as a local operator, and the next event doesn’t have a Cache operator. For the next event to work properly, it should receive particles from the current event. Those particles result from the activity of a test action. The Cache operator can record the test activity to play it back later.

If the Cache operator is used as a global operator, there is no need to cache the test results. This is because the system has cache data for every event, and is able to jump to an arbitrary frame without the need for test results.

<Cache>.Cache_With_Hold BooleanClass default: false -- boolean

When set to true, cached data will be saved with backup files.

<Cache>.Cache_With_File BooleanClass default: false -- boolean; alias: Record_Hold

When set to true, cached data will be saved in the Hold file.

<Cache>.Clear_Range_Type Integer default: 1 -- integer; alias: Range_Type

Controls the state of the Manual Update Range drop-down list in the UI. Specifies the frame range within which the Cache operator recalculates data when using Manual Update.

Possible values are:

0: Complete - The software clears the cache for entire animation. Choosing Complete makes the Update button unavailable; this option is for clearing the cache only.

1: Active Segment - The software updates the cache only for frames in the active segment, as defined by the Start Time and End Time settings on the Time Configuration dialog.

2: Custom - The software updates the cache only for only frames in the custom range, as defined by the Clear_ Start_Time and Clear_End_Time properties (see below).

<Cache>.Clear_Start_Time Time default: 0f -- time

The first frame of the range considered for caching when Clear_Range_Type is set to 1 : Custom (see above).

<Cache>.Clear_End_Time Time default: 30f -- time

The last frame of the range considered for caching when Clear_Range_Type is set to 1 : Custom (see above).

<Cache>.Memory_Limit Integer default: 100000 -- integer; alias: Memory_Limit__K

Get/Set the maximum amount of system memory used to cache particle data, in kilobytes.

<Cache>.Memory_Total Integer default: 0 -- integer; alias: Memory_Total__K

Returns the amount of memory currently used by the cached data, in kilobytes. Read-only.

<Cache>.Memory_for_Current_Frame Integer default: 0 -- animatable; integer alias: Memory_for_Current_Frame__K

Returns the amount of memory used by the data cached for the current frame, in kilobytes. Read-only.

Cache Interfaces:

The following Interfaces are exposed by the Cache Class:

Interface: action

Interface: operator

See also

Particle Flow Classes


Notes : Helper

Notes - superclass: helper; super-superclass:node - 1:0 - classID: #(1962490660, 515064320)

Value > MAXWrapper > Node > Helper > Notes

Description:

The Notes lets you add a textual comment to any event. It doesn't have any direct effect on the particle system, but it helps you keep track of the overall function of each event.

Constructor:

Notes...

Properties:

<Notes>.Comments String default: "Type your comments here" -- string

Get/Set the text string of the comment.

Comments_Operator Interfaces:

The following Interfaces are exposed by the Comments_Operator Class:

Interface: action

Interface: operator

Interface: PViewItem

See also

Particle Flow Classes


Event : Helper

Event - superclass: helper; super-superclass:node - 0:0 - classID: #(1962490627, 515064576)

Value > MAXWrapper > Node > Helper > Event

Description:

The Event lets you group Actions in Particle View to define the appearance of particles over a certain period of time. Creating instances of this class gives you empty holders that can be filled with Actions using the exposed Interfaces’ Methods.

Constructor:

Event...

Event Interfaces:

The following Interfaces are exposed by the Event Class:

Interface: ActionList

Interface: PViewItem

EXAMPLE

--Open the Particle View to watch the results:

particleFlow.openParticleView()

OK

ev = event() --Create an empty Event

$Event:Event 01 @ [0.000000,0.000000,0.000000]

--In order to fill in the empty Event, we have to disable

--the automatic Event encapsulation of newly created Actions.

particleFlow.beginEdit()

OK

--Now we can create a new Birth action to add to the Event.

br = birth()

$Birth:Birth 01 @ [0.000000,0.000000,0.000000]

--We can now append the new Birth Action to the empty Event:

ev.appendAction br

true

--We can also create Action class instances

--and append them to the Event in a single step:

ev.appendAction (Position_Icon())

true

ev.appendAction (Speed())

true

ev.appendAction (ShapeStandard())

true

ev.appendAction (DisplayParticles())

true

--Finally, we can exit the Edit mode to enable automatic

--Event encapsulation again:

particleFlow.endEdit()

OK

See also

Particle Flow Classes


renderParticles : Helper

renderParticles- superclass: helper super-superclass:node - classID: #(1962490627, 515064320)

Value > MAXWrapper > Node > Helper > renderParticles

Description:

The RenderParticles operator provides controls related to rendering particles. You can specify the form that rendered particles are to take, and how to convert the particles to individual mesh objects for rendering purposes.

Constructor:

RenderParticles...

Properties:

<renderParticles>.Type Integer default:2

Controls the state of the Type drop-down list. Possible values are:

0: None - Particles do not render.

1: BoundingBox - Particles render as boxes whose sizes represent the particle geometry extents.

2: Geometry - Particles render with their actual geometry.

<renderParticles>.Visible Float default:100.0 --percentage

Get/Set the percentage of particles that render

<renderParticles>.Split_Type Integer

Controls the state of the Render Result group radio buttons.

Possible values are:

0: Single Mesh - Sends the renderer one mesh object comprised of all particles in the system.

1: Multiple Meshes - Sends the renderer the specified number of mesh objects, each containing the specified number of particles. If the result of dividing the total number of particles by the Particles p/Mesh value is less than the specified Mesh Count value, some of the meshes might contain few or no faces.

2: Mesh Per Particle - Sends the renderer a separate mesh for each particle.

<renderParticles>.Mesh_Count Integer

Get/Set the maximum number of mesh objects that Particle Flow will send to the renderer.

<renderParticles>.Particles_Per_Mesh Integer

Get/Set the number of particles that each mesh object will contain.

renderParticles Interfaces:

Interface: action

Interface: operator

Interface: PViewItem

See also

displayParticles : Helper

Particle Flow Classes


displayParticles : Helper

displayParticles- superclass: helper super-superclass:node - classID: #(1962490626, 515064320)

Value > MAXWrapper > Node > Helper > displayParticles

Description:

The DisplayParticles object exposes the Display operator and lets you specify how particles appear in the viewports. In addition to geometry, it provides a variety of simple shapes that provide fast feedback in testing animation, as well as the ability to easily distinguish among particles in different events. It also lets you set the percentage of visible particles.

Constructor:

DisplayParticles...

Properties:

<displayParticles>.Type Integer default:2 -- integer

Controls how particles appear in the viewports. The two-dimensional particle markers depict position only. Geometry shows how particles will actually render, in three dimensions; Lines shows speed and direction of motion; and BoundingBox reflects scale and orientation.

Possible values are:

0: None - Particles do not appear in the viewports.

1: Dots - Each particle appears as a single pixel.

2: Ticks - Each particle appears as a + sign.

3: Circles - Each particle appears as a small circle.

4: Lines - Each particle appears as a line, one pixel thick. The line's length indicates particle speed, and its orientation reflects the direction of motion. Use this option for fast, accurate feedback when experimenting with the Speed operators.

5: BoundingBox - Each particle appears as a bounding box. Use this option for a good representation of the final animation, at a slight cost in computational speed.

6: Geometry - Each particle appears as its actual geometry. Use this option for the best representation of the final animation, at the greatest cost in computational speed.

7: Diamonds - Each particle appears as a diamond.

8: Boxes - Each particle appears as a small square.

9: Asterisks - Each particle appears as an asterisk (*).

10: Triangles - Each particle appears as a small triangle.

<displayParticles>.Visible Float default:100.0 --percentage

Specifies the percentage of particles visible in the viewports. This option lets you speed up viewport redrawing by reducing the number of visible particles

<displayParticles>.Color RGB color

Get/Set the color used to draw particles in the viewport.

<displayParticles>.Show_Numbering Boolean default:false

When set to true, each particle's unique index number is visible in the viewports. Particles are numbered in the order of their birth, starting with 1 for the first particle born

<displayParticles>.Selected_Type Integer default:2

Controls how selected particles appear in the viewports. The options are the same as in .Type.

displayParticles Interfaces:

Interface: action

Interface: operator

Interface: PViewItem

See also

renderParticles : Helper

Particle Flow Classes


Age_Test : Helper

Age_Test - superclass: helper; super-superclass:node - 10:0 - classID: #(1962490881, 515064320)

Value > MAXWrapper > Node > Helper > Age_Test

Description:

Age_Test lets the particle system check whether a specific amount of time has passed since the start of the animation or the current event, or whether particles have reached a certain age, and branch accordingly.

Constructor:

Age_Test...

Properties:

<Age_Test>.Condition_Type Integer default: 1 -- radio button number

Get/Set the index of the Age Test Condition drop-down list.

0: Absolute Age - Tests the current frame number in the animation.

1: Particle Age - Tests the current age of each particle in frames. This is the default test type.

2: Event Age - Tests the current duration of the current event in frames.

<Age_Test>.Random_Seed Integer default: 12345 -- integer

Specifies the randomization value.

<Age_Test>.Subframe_Sampling BooleanClass default: true -- boolean

Get/Set the state of the Subframe Sampling checkbox. Setting it to true helps avoid particle "puffing" when passing particles to the next event by testing the time at a much higher subframe resolution rather than using the relatively coarse frame resolution

<Age_Test>.Test_Type Integer default: 1 -- integer

<Age_Test>.Test_Value Integer default: 4800 -- integer

Get/Set the Test Value. Specifies the ticks number, particle age (in ticks), or event duration (in ticks) to test for.

NOTE:

The Test Value in the UI is shown in frames.

<Age_Test>.Variation Integer default: 800 -- integer

Get/Set the Variation. Defines the time in ticks by which the value tested for can vary randomly

Age_Test Interfaces:

The following Interfaces are exposed by the Age_Test Class:

Interface: action

Interface: test

Interface: PViewItem

See also

Particle Flow Classes


Collision : Helper

Collision - superclass: helper; super-superclass:node - 9:0 - classID: #(1962490883, 515064320)

Value > MAXWrapper > Node > Helper > Collision

Description:

Collision tests for particles that collide with one or more specified Deflector Space Warps. It can also test whether a particle has slowed down or sped up after one or more collisions, has collided more than once, and even whether it will collide with a deflector in a specified number of frames.

Constructor:

Collision...

Properties:

<Collision>.C ollision_Nodes ArrayParameter default: #() -- node array; alias: collisionNodes

Get/Set the list of Deflectors used as Collision Nodes.

<Collision>.test_Type Integer default: 0 -- integer; Collision_Test_Type

Controls the state of the Test True If Particle radiobuttons in the UI.

Possible values are:

0: Collides - Choose this option, and then set Speed_Option according to how particle speed should be affected by the collision.

1: Is Slow After Collision(s) - The test succeeds if, after collision, particle speed is less than the Min_Speed value.

2: Is Fast After Collision(s) - The test succeeds if, after collision, particle speed is greater than the Max_Speed value.

3: Collided Multiple Times - The test becomes True after a particle collides a specific number of times. The particle is moved to the point of the last collision and then redirected to the next event.

4: Will Collide - The software extrapolates particle motion in a linear fashion, based on the current direction and speed, and the test becomes True if the results suggest that the particle will collide with the deflector during a specified time interval. The particle is redirected to the next event without updating its speed or position.

<Collision>.Speed_Option Integer default: 0 -- integer; alias: speedOption

Controls the state of the Speed drop-down list. Determines the behavior of the particle after the collision when testType is set to 0 : Collides. Possible values are:

0: Bounce - The speed and direction after collision is determined by the deflector properties.

1: Continue - Particle speed and direction are unaffected by the collision.

2: Stop - Particle speed is set to 0 after the collision.

3: Random - Particles bounce off the deflector in random directions.

<Collision>.M in_Speed Float default: 1.0 -- world units; alias: minSpeed

Corresponds to the Speed Min value in the UI. Particles traveling at less than this speed, in system units per second, test True and become eligible for moving to the next event when testType is set to 1 : Is Slow After Collision.

<Collision>.M ax_Speed Float default: 1000.0 -- world units; alias: maxSpeed

Corresponds to the Speed Max value in the UI. Particles traveling faster than this speed, in system units per second, test True and become eligible for moving to the next event when testType is set to 2 : Is Fast After Collision.

<Collision>.C ollision_Count Integer default: 5 -- integer; alias: collisionCount

Get/Set the number of times a particle must collide in order to test True. Only used when testType is set to 3 : Collided Multiple Times.

<Collision>.collision_Count_Options Integer default: 0 -- integer; alias: collisionCountOptions

Controls the state of the Speed drop-down list under the Collided Multiple Times option. Determines the behavior of the particle after the collision.

0: Bounce - The speed and direction after collision is determined by the deflector properties.

1: Continue - Particle speed and direction are unaffected by the collision.

2: Stop - Particle speed is set to 0 after the collision.

3: Random - Particles bounce off the deflector in random directions.

<Collision>.W ill_Collide_Frame Integer default: 800 -- integer; alias: willCollideFrame

Get/Set the time ahead (in ticks) during which the software looks for an impending collision when testType is set to 4 : Will Collide.

NOTE:

The time value is shown as frames in the UI.

<Collision>.Random_Seed Integer default: 12345 -- integer

Specifies the randomization value.

Collision Interfaces:

The following Interfaces are exposed by the Collision Class:

Interface: action

Interface: test

See also

Particle Flow Classes


Collision_Spawn : Helper

Collision_Spawn - superclass: helper; super-superclass:node - 21:0 - classID: #(1962490884, 515064320)

Value > MAXWrapper > Node > Helper > Collision_Spawn

Description:

Collision_Spawn creates new particles from existing ones that collide with one or more Deflector Space Warps. You can specify different post-collision behavior for the colliding particles and their offspring. Each spawned particle is born at the same location as its parent, and has the same orientation and shape. Collision_Spawn can give the spawned particles a different speed and scaling factor. If you wire the Collision_Spawn test to another event, spawned particles are sent to that event, where you can specify different properties for the new particles.

Constructor:

Collision_Spawn...

Properties:

<Collision_Spawn>.True_for_Particles_Collided Boolean default: false -- boolean

When true, parent particles qualify for redirection when the test conditions are met. Available with the Spawn On First Collision option only when Delete Parent is false.

<Collision_Spawn>.True_for_Spawn_Particles Boolean default: true -- boolean

When true, spawned particles qualify for redirection when the test conditions are met.

<Collision_Spawn>.Collision_Nodes ArrayParameter default: #() -- node array; alias: deflectorNodes; SubAnim

Get/Set the list of Deflectors used as Collision Nodes.

<Collision_Spawn>.Spawn_Type Integer default: 0 -- radio button number

Controls the state of the Spawn On... radio buttons in the UI.

Possible values are:

0: Spawn On First Collision - Particles spawn only the first time they collide with a deflector.

1: Spawn On Each Collision - Particles spawn on each of multiple collisions, up to a limit specified with the Number of Collision parameter.

<Collision_Spawn>.Number_of_Collisions Integer default: 3 -- integer

Sets the number of collisions up to which particles will spawn when Spawn Type is set to 1 : Spawn On Each Collision.

<Collision_Spawn>.Delete_Parent Boolean default: true -- boolean

Controls the state of the Delete Parent checkbox in the UI. When set to true, deletes each original particle from which a new one is spawned. Available only when Spawn_Type is set to 0 : Spawn On First Collision option.

<Collision_Spawn>.Divergence Float default: 12.0 -- animatable; angle;

Spreads out the stream of spawned particles. The value defines the extent of the divergence in degrees. Range is from 0 to 180.

<Collision_Spawn>.Spawn_Able Float default: 100.0 -- animatable; percentage

Defines the percentage of particles in the current event that will spawn new particles. This is determined once for each particle, when it enters the event. However, the parameter is animatable.

<Collision_Spawn>.Number_of_Offsprings Integer default: 1 -- animatable; integer

The number of new particles the system creates from each parent particle for each spawning event.

<Collision_Spawn>.Offsprint_Variation Float default: 0.0 -- animatable; percentage

The amount by which the Number of Offsprings value can vary randomly.

<Collision_Spawn>.Sync_Type Integer default: 0 -- integer

Defines the time frame to use when animating Number of Offsprings and Offsprings Variation.

Possible values are:

0: Absolute Time - Any keys set for parameters are applied at the actual frames for which they're set.

1: Particle Age - Any keys set for parameters are applied at the corresponding frames of each particle's existence.

2: Event Duration - Any keys set for parameters are applied to each particle starting when it first enters the event.

<Collision_Spawn>.Restart_Particle_Age Boolean default: true -- boolean

When set to true, sets the age of each newly spawned particle at 0. When false, each spawned particle inherits its parent's age.

<Collision_Spawn>.Parent_Speed Integer default: 0 -- integer

Controls the state of the Parent drop-down list in the UI. Defines the parent's behavior. Available only when Delete Parent is off. Possible values are:

0: Bounce - The speed and direction after collision is determined by the deflector properties.

1: Continue - Particle speed and direction are unaffected by the collision.

<Collision_Spawn>.Offspring_Speed Integer default: 0 -- integer

Controls the state of the Offspring drop-down list in the UI. Defines the new spawned particles’ behavior.

Possible values are:

0: Bounce - The speed and direction of offspring after collision is determined by the deflector properties.

1: Continue - Speed and direction of offspring are unaffected by the collision.

<Collision_Spawn>.Speed_Type Integer default: 1 -- radio button number

Controls the state of the Speed Type radio buttons.

Possible values are:

0: In Units – Use the Speed value.

1: Inherited – Use the Speed_Inherited value.

<Collision_Spawn>.Speed Float default: 100.0 -- animatable; world units

Choose this to specify the speed of spawned particles in system units per second. A positive value inherits the parent's direction; a negative value reverses it.

<Collision_Spawn>.Speed_Inherited Float default: 100.0 -- animatable; percentage

Choose this to specify each spawned particle's speed as a percentage of its parent's speed. A positive value inherits the parent's direction; a negative value reverses it.

<Collision_Spawn>.Speed_Variation Float default: 0.0 -- animatable; percentage

The amount by which a spawned particle's speed can vary randomly.

<Collision_Spawn>.Scale_Factor Float default: 100.0 -- animatable; percentage

Controls the amount of uniform scaling to apply to each spawned particle, as a percentage of its parent's size.

<Collision_Spawn>.Scale_Variation Float default: 0.0 -- animatable; percentage

The amount by which a spawned particle's scale can vary randomly.

<Collision_Spawn>.Random_Seed Integer default: 12345 -- integer

Specifies a randomization value.

Collision_Spawn Interfaces:

The following Interfaces are exposed by the Collision_Spawn Class:

Interface: action

Interface: integrator

Interface: PViewItem

Interface: test

See also

Particle Flow Classes


Find_Target : Helper

Find_Target - superclass: helper super-superclass:node - classID: #(1962490886, 515064320)

Value > MAXWrapper > Node > Helper > Find_Target

Description:

By default, Find_Target sends particles to a specified target or targets. Upon reaching a target, the particles become eligible for redirection to another event. You can specify that the particles should use a particular speed or time frame in moving toward the target. You can also specify where on the target the particles should go.

Alternatively, you can use Find_Target as a simple proximity test: If a particle comes within a certain distance of its target, it becomes eligible for redirection to the next event.

Constructor:

Find_Target...

Properties:

<Find_Target>.Speed_Type Integer default:0 -- integer

Controls the state of the drop-down list at the top of the parameters panel. It lets you choose whether to send particles to a target by specifying the speed and acceleration, or by specifying the amount of time they should take. Alternatively, by choosing No Control, you can test particles' distance from a target.

Possible values are:

0: Control By Speed - Specify speed and acceleration settings for the particles to follow while traveling to the target.

1: Control By Time - Specify time-based settings for the particles to follow while traveling to the target.

2: No Control - With this option, Find Target functions only as a proximity test. When a particle comes within the specified distance of the target, the particles become eligible for redirection to the next event.

NOTE:

When you choose No Control, the Find_Target test does not affect particle speed or direction.

<Find_Target>.Test_Type Integer default:1 -- integer

These settings let you choose which distance the Find_Target Test measures and specify the measured distance. You can choose Target Pivot or Target Point, and specify a distance with the Is Less Than setting.

0: Target Pivot - Measures the distance between the particle and the target pivot.

1: Target Point - Measures the distance between the particle and the target point.

2: Is Less Than - When particles are closer than this distance from target pivot or point, they test True and become eligible for redirection to the next event. Measured in scene units.

<Find_Target>.Test_Distance Float default:1.0 -- animatable; world units

Specifies the distance to check against when Test_Type is set to 2 : Is Less Than.

<Find_Target>.Use_Cruise_Speed Boolean default:true -- boolean

When set to true, the software gives you explicit control over particle speed and speed variation. When set to false, the software calculates particle speed automatically using the Acceleration_Limit value.

<Find_Target>.Cruise_Speed Float default:300.0 -- animatable; world units

Get/Set the particle speed in scene units per second.

<Find_Target>.Cruise_Speed_Variation Float default:0.0 -- animatable; world units

The amount by which the actual Speed value can vary randomly.

<Find_Target>.Acceleration_Limit Float default:1000.0 -- animatable; world units

Sets the acceleration limit. This value impacts the inertia and speed of the particles.

<Find_Target>.Ease_In Float default:0.0 -- animatable; percentage

Controls the rate by which particles slow down when it approaches the target point.

<Find_Target>.Sync_Type Integer default:0 -- integer

Controls the state of the Sync By drop-down list in the UI. Specifies the time frame to use when animating Cruise_Speed, Cruise_Speed_Variation, and Acceleration_Limit.

Possible values are:

0: Absolute Time - Any keys set for parameters are applied at the actual frames for which they're set.

1: Particle Age - Any keys set for parameters are applied at the corresponding frames of each particle's existence.

2: Event Duration - Any keys set for parameters are applied to each particle starting when it first enters the event.

<Find_Target>.Target_Type Integer default:0 --radio button number

By default, Find_Target uses its own target icon, but you can use these controls to designate other scene objects as targets instead.

Possible values are:

0: Icon - Use the Find Target icon as the target.

1: Mesh Objects - Use one or more scene mesh objects as targets.

<Find_Target>.Timing_Type Integer default:2 -- integer

Determines how the software applies the specified timing, defined by the Time and Variation values. The possible options are:

0: Absolute Time - Refers to the overall time of the system. Each particle will reach its target at the frame number specified by Time.

1: Particle Age - Refers to the time elapsed since the birth of the particle. Each particle will reach its target when its age reaches the value specified by Time.

2: Event Duration - Refers to the time elapsed since the particle entered the current event. Each particle will reach its target when it has been in the current for the number of frames specified by Time.

<Find_Target>.Time Integer default:9600 -- integer

The time in ticks particles should take to reach the target.

NOTE:

The time value is shown as frames in the UI.

<Find_Target>.Time_Variation Integer default:800 -- integer

The time in ticks by which Time can vary randomly.

Note: The time value is shown as frames in the UI.

<Find_Target>.Subframe_Sampling Boolean default:true -- boolean

Turning this on helps avoid particle "puffing" by timing particles at a much higher subframe resolution (that is, throughout each frame), rather than using the relatively coarse frame resolution.

<Find_Target>.Use_Docking_Speed Boolean default:false --boolean

Lets you specify particles' speed when they reach the target.

A particle might be required to reach the target from a specific direction at a specific speed. When Use Docking Speed is off, the software calculates a path for particles to reach the target in the shortest distance with the least acceleration along the path. When Use Docking Speed is on, the software calculates particles' final speed when they reach the target using the Speed and Variation parameters.

<Find_Target>.Docking_Speed Float default:100.0 -- animatable; world units

The speed of particles when they reach the target in scene units per second.

<Find_Target>.Docking_Speed_Variation Float default:0.0 -- animatable; world units

The amount by which the actual Speed value can vary randomly.

<Find_Target>.Target_Objects Array default:#() --node array; SubAnim

Sets the list of target scene mesh objects.

<Find_Target>.Target_Sync_Type Integer default:0 -- integer

Specifies the time frame to use when sending particles toward animated objects when using Animated_Shape or Follow_Target.

Possible values are:

0: Absolute Time - Animation derived from the target is applied to particles immediately.

1. Particle Age - Animation derived from the target is applied to particles at the corresponding frames of each particle's existence.

2: Event Duration - Animation derived from the target is applied to particles is applied to each particle starting when it first enters the event.

<Find_Target>.Animated_Shape Boolean default:false

Turn on to allow particles to target the surface of an object whose form is animated by scaling, by morphing, or with modifiers. This requires more computation, because the destination must be updated at every integration step.

<Find_Target>.Follow_Target Boolean default:false -- boolean

Turn on to allow particles to follow a moving target; that is, a target whose location is animated. This requires more computation, because the destination must be updated at every integration step.

<Find_Target>.Lock_On_Target Boolean default:true --boolean

When on, the software calculates each particle's target point once: when the particle enters the event. Thereafter, the particle is "locked on" to its target. When off, the software can continually recalculate the target point for each particle. Available only when Follow Target Animation is on.

<Find_Target>.Aim_Point_Type Integer default:0

Lets you specify where on its target a particle should land.

Possible values are:

0: Random - Each particle targets a random point on the target.

1: Closest Surface - Each particle targets the nearest point of the target’s surface.

2: By Script Vector - The target point is defined using a script operator in the same event that sets a position. See particleVector Sample Script for an example.

<Find_Target>.Assignment_Type Integer default:0 -- integer

With multiple mesh targets, lets you specify how the software should choose among them. Available only when targeting more than one object.

0: Random - For each particle, the software chooses a target object at random.

1: Closest Pivot - For each particle, the software chooses as its target the object whose pivot is nearest to the particle.

2: Closest Surface - For each particle, the software chooses as its target the object whose surface is nearest to the particle.

3: Least Deviation - For each particle, the software chooses as its target the object that requires the least change in its current direction (or resteering) to reach.

4: By Script Integer - For each particle, the choice of a targeted object is defined by a script operator that sets an index. This index corresponds to a target-object entry position in the target list. See particleInteger Sample Script for an example.

<Find_Target>.Docking_Type Integer default:0 -- integer

Lets you specify from which direction particles should approach targets.

Possible values are:

0: None Specified - No docking constraints. Particles reach their targets in the most efficient way, based on their assigned parameters and their current attributes.

1: Along Icon Arrow - The final direction is the same as the Find Target icon arrow.

2: Icon Spherical - The final direction points toward the center of the operator icon.

3: Icon Cylindrical - The final direction points toward the icon arrow as a line, thus forming a cylindrical field with the arrow as the cylinder's main axis.

4: Surface Normals - Each particle reaches its target point from a direction perpendicular to the surface at that point.

<Find_Target>.Docking_Distance Float default:10.0 -- animatable; world units

The distance from the target at which particles begin docking behavior. This includes the docking direction, and, when using Control By Time, the docking speed.

<Find_Target>.Icon_Size Float default:30.0 --animatable; world units

Set the size of the Find Target icon. This affects particle behavior when using the icon as the target.

<Find_Target>.Color_Type Boolean default:true -- boolean

When set to true, the Find_Target icon uses the color of the event containing the test as defined by its local Display operator, if one exists. This applies even if the Display operator is turned off. When off, the Find Target icon uses the default Test Gizmos color as defined in Customize User Interface > Colors.

<Find_Target>.Random_Seed Integer default:12345 -- integer

Sets the randomization value.

Find_Target Interfaces:

The following Interfaces are exposed by the Find_Target Class:

Interface: action

Interface: test

Interface: PViewItem

See also

Particle Flow Classes


Go_To_Rotation : Helper

Go_To_Rotation - superclass: helper super-superclass:node - classID: #(1962490894, 515064320)

Value > MAXWrapper > Node > Helper > Got_To_Rotation

Description:

The Go_To_Rotation test enables a smooth transition in the rotational component of a particle, so that the particle can gradually rotate to a specific orientation over a specific period. An example of its usage would be with falling leaves, which spin chaotically as they fall, but land on a flat side rather than an edge. The test aspect lets you direct the particle to a new event when the transition period ends.

To set a target orientation, place the Go_To_Rotation test before an orientation-type operator (Rotation or Rotation Spin) in the same event. In this situation, the Go_To_Rotation test can grab the particle rotational component before the orientation-type operator overwrites it. The Go_To_Rotation operator modifies the particle orientation and spinning in the post-evaluation cycle.

Constructor:

Go_To_Rotation...

Properties:

<Go_To_Rotation>.Transition_Type Integer default:2

Corresponds to the Transition By drop-down list in the UI. Determines how the software applies the specified timing, defined by the Time and Variation values. Possible values are:

0: Absolute Time - Time refers to the overall time of the system. Each particle will reach its target orientation at the frame number specified by Time.

1: Particle Age - Time refers to the time elapsed since the birth of the particle. Each particle will reach its target orientation when its age reaches the value specified by Time.

2: Event Duration - Time refers to the time elapsed since the particle entered the current event. Each particle will reach its target orientation when it has been in the current for the number of frames specified by Time.

<Go_To_Rotation>.Time Integer default:30

The number of frames particles should take to reach the target orientation.

<Go_To_Rotation>.Variation Integer default:0

Defines a random variation in the Spin Rate value when a particle reaches the target orientation.

<Go_To_Rotation>.Send_Out Boolean default:true

When set to true, particles are sent out to the next event at the end of the transition. When set to false, the particles never leave the test.

<Go_To_Rotation>.Target_Rotation Integer default:0 --radio button number

Controls the state of the Target Rotation radio buttons. Possible values are:

0: Constant - Defines that the orientation-type operator sets a constant orientation for a particle.

1: Changing - Defines that the orientation-type operator sets a changing rotation for a particle. At each frame the desirable final rotation may be different.

<Go_To_Rotation>.Match_Initial_Spin Boolean default:True

Sets the angular velocity at the end of the transition period to the same as the angular velocity when particle enters the event.

<Go_To_Rotation>.SpinRate Float default:0.0 --angle

Defines each particle's angular velocity, in degrees per second, when it reaches the target orientation. Available only when Match_Initial_Spin is off.

<Go_To_Rotation>.Spin_Rate_Variation Float default:0.0 percentage

Defines each particle's angular velocity, in degrees per second, when it reaches the target orientation. Available only when Match Initial Spin is false.

NOTE:

For a smooth transition to the target orientation, set to 0.0.

<Go_To_Rotation>.Ease_In Foat default:0.0 --percentage

Defines a curve in achieving the final spin rate.

<Go_To_Rotation>.Stop_Spinning Boolean default:true

When on, halts particle rotation when it reaches the target orientation.

<Go_To_Rotation>.Random_Seed Integer default:12345

Specifies a randomization value.

Go_To_Rotation Interfaces:

The following Interfaces are exposed by the Go_To_Rotation Class:

Interface: action

Interface: operator

Interface: test

Interface: PViewItem

See also

Particle Flow Classes


Scale_Test : Helper

Scale_Test - superclass: helper super-superclass:node - classID: #(1962490887, 515064320)

Value > MAXWrapper > Node > Helper > Scale_Test

Description:

Scale_Test lets the particle system check particle scaling, or particle size before or after scaling, and branch accordingly. The test provides a variety of axis options for measuring scale or size.

Constructor:

Scale_Test...

Properties:

<Scale_Test>.Test_Type Integer default:2

Controls the state of the Type drop-down list in the UI. Possible values are:

0: PreScale Size - Tests the size before scaling.

1: PostScale Size - Tests the size after scaling.

2: Scale - Tests the scaling percentage.

<Scale_Test>.Axis_Type Integer default:0

Controls the state of the Axis drop-down list in the UI. Possible values are:

0: Average - Obtains an average measurement by adding the sizes on all three axes and then dividing by three.

1: Minimum - Uses the smallest dimension.

2: Median - Uses the middle dimension in order of size. For example, if the particle dimensions are X=5, Y=6, Z=12, then the number compared to Test Value would be 6.

3: Maximum - Uses the largest dimension.

4: X/Y/Z - Uses the specified dimension.

<Scale_Test>.Condition_Type Integer default:1

Controls the Text condition type.

Possible values are

0: If Less Than Test Value

1: If Greater Than Test Value

<Scale_Test>.Size_Value Float default:10.0 --world units

The specific size to test for. Used when .Test_Type is set to 0: PreScale Scale or 1: PostScale Size.

<Scale_Test>.Size_Variation Float default:0.0 --world units alias: Variation

The amount by which the value tested for can vary randomly.

<Scale_Test>.Scale_Value Float default:100.0 –percentage

The specific scaling factor to test for. Used only when .Test_Type is set to 2: Scale

<Scale_Test>.Scale_Variation Float default:0.0 --percentage

The amount by which the value tested for can vary randomly.

<Scale_Test>.Sync_Type Integer default 0

Controls the state of the Sync By drop-down list in the UI. Specifies the time frame for applying animated parameters:

0: Absolute Time - Any keys set for parameters are applied at the actual frames for which they're set.

1: Particle Age - Any keys set for parameters are applied at the corresponding frames of each particle's existence.

2: Event Duration - Any keys set for parameters are applied to each particle starting when it first enters the event.

<Scale_Test>.Random_Seed Integer default:12345

Specifies the randomization value.

Scale_Test Interfaces:

Interface: action

Interface: PViewItem

Interface: test

See also

Particle Flow Classes


Script_Test : Helper

Script_Test - superclass: helper super-superclass:node - classID: #(1962490889, 515064320)

Value > MAXWrapper > Node > Helper > Script_Test

Description:

The Script_Test operator lets you test particle conditions using a MAXScript script. The script can use most of the program functionality available to MAXScript. See Limitations on using MAXScript with Particle Flow for a general list of limitations.

Constructor:

Script_Test...

Properties:

.Proceed_Script String default:

Set the Test Script as string.

.Random_Seed Integer default:12345

Specifies the randomization value.

Script_Test Interfaces:

Interface: action

Interface: PViewItem

Interface: test

See also

Using MAXScript in Script Actions

Particle Flow Classes

Particle Flow Sample Scripts


Send_Out : Helper

Send_Out - superclass: helper super-superclass:node - classID: #(1962490890, 515064320)

Value > MAXWrapper > Node > Helper > Send_Out

Description:

The Send_Out test simply sends all particles to the next event, or, conversely, keeps all particles in the current event. Use Send_Out when you simply want to send particles to another event without any conditions.

Constructor:

Send_Out...

Properties:

<Send_Out>.Condition_Type Ineger default: 0 -- radio button number

Corresponds to the Test True For group radio buttons in the UI: Lets you specify whether the test passes all particles on to the next event or keeps them in the current event. Possible values are:

0: All Particles - All particles are passed on to the next event.

1: No Particles - All particles are retained in the current event

Send_Out Interfaces:

The following Interfaces are exposed by the Send_Out Class:

Interface: action

Interface: test

Interface: PViewItem

See also

Particle Flow Classes


Spawn : Helper

Spawn - superclass: helper super-superclass:node - classID: #(1962490882, 515064320)

Value > MAXWrapper > Node > Helper > Spawn

Description:

Spawn creates new particles from existing ones. Each spawned particle is born at the same location as its parent, and has the same orientation and shape. Spawn can give the spawned particles a different speed and scaling factor. If you wire the Spawn test to another event, spawned particles are sent to that event, where you can specify different properties for the new particles.

Constructor:

Spawn...

Properties:

<Spawn>.Spawn_Type Integer default:0

Controls the state of the radio buttons in the UI. Use these settings to specify how often particles are to spawn, the measurement system to use, and other values related to how many particles are spawned.

0: Once - Particles spawn one time only. For each existing particle, one new one is born.

1: Per Second - Lets you specify a number of particles to spawn every second. For example, if you use the default Rate setting of 10.0, at 30 fps a new particle is born every three frames.

2: By Travel Distance - Lets you spawn new particles at regular intervals over the path of a moving parent particle.

<Spawn>.Delete_Parent Boolean default:false

When on, deletes each original particle from which a new one is spawned. Available only with the Once option.

<Spawn>.Spawn_Rate Float default:10.0

The number of particles to spawn per second. Available only with the Per Second option.

<Spawn>.Spawn_Step_Size Float default:1.0 --world units

The system spawns a new particle every time the parent moves this distance, in system units.

<Spawn>.Spawn_Able Float default:100.0 --percentage

The percentage of particles in the current event that will spawn new particles. This is determined once for each particle, when it enters the event. However, the parameter is animatable.

<Spawn>.Number_of_Offsprings Integer default:1

The number of new particles the system creates from each parent particle for each spawning event

<Spawn>.Variation Float default:0.0 --percentage

The amount by which the Offspring # value can vary randomly

<Spawn>.Sync_Type Integer default:0

Choose the time frame to use when animating Spawn_Rate, Spawn_Step_Size, Number_of_Offsprings and Variation:

0: Absolute Time - Any keys set for parameters are applied at the actual frames for which they're set.

1: Particle Age - Any keys set for parameters are applied at the corresponding frames of each particle's existence.

2: Event Duration - Any keys set for parameters are applied to each particle starting when it first enters the event.

<Spawn>.Restart_Particle_Age Boolean default:true

When on, sets the age of each newly spawned particle at 0. When off, each spawned particle inherits its parent's age.

<Spawn>.Speed_Type Integer default:1

Controls the state of the Speed group radio buttons in the UI.

Possible values are:

0: In Units - Choose this to specify the speed of spawned particles in system units per second. A positive value inherits the parent's direction; a negative value reverses it.

1: Inherited - Choose this to specify each spawned particle's speed as a percentage of its parent's speed. A positive value inherits the parent's direction; a negative value reverses it.

<Spawn>.Speed Float default:100.0 --world units

Get/set the value used when Speed_Type is set to 0 : In Units.

<Spawn>.Speed_Inherited Float default:100.0 --percentage

Get/set the value used when Speed_Type is set to 1 : Inherited.

<Spawn>.Variation Float default:0.0 --percentage

Get/set the amount by which a spawned particle's speed can vary randomly.

<Spawn>.Divergence Float default:20.0 --angle;

When set to true, spreads out the stream of spawned particles. Defines the extent of the divergence in degrees. Range is from 0 to 180.

<Spawn>.Scale_Factor Float default:100.0 --percentage

Get/set the amount of uniform scaling to apply to each spawned particle, as a percentage of its parent's size

<Spawn>.Variation Float default:0.0 --percentage

Get/set the amount by which a spawned particle's scale can vary randomly.

<Spawn>.Random_Seed Integer default:12345

Specifies a randomization value.

Spawn Interfaces:

Interface: action

Interface: PViewItem

Interface: test

See also

Particle Flow Classes


Speed_Test : Helper

Speed_Test - superclass: helper super-superclass:node - classID: #(1962490885, 515064320)

Value > MAXWrapper > Node > Helper > Speed_Test

Description:

Speed_Test lets the particle system check particle speed, acceleration, or the rate of circular travel, and branch accordingly. The test provides a number of variants that let you test speed or acceleration on specific axes, or simply whether the particle is accelerating or decelerating.

Constructor:

Speed_Test...

Properties:

<Speed_Test>.Test_Type Integer default:0

0: Velocity Magnitude - Tests the particle velocity, in system units per second, without consideration of direction. This is the default test type.

1: Velocity X/Y/Z - Tests the particle velocity on the specified axis, in system units per second, using the world coordinate system.

2: Acceleration Magnitude - Tests the particle acceleration (change in velocity), in system units per second per second, without respect to direction.

3: Acceleration X/Y/Z - Tests the particle acceleration (change in velocity) on the specified axis, in system units per second per second, using the world coordinate system.

4: Steering Rate - Tests the circular component of particle travel in degrees per second, without consideration of rotation or spinning.

5: True When Accelerates - Returns a True value when the particle velocity is increasing in value.

6: True When Decelerates - Returns a True value when the particle velocity is decreasing in value.

<Speed_Test>.Condition_Type Integer default:1

Lets you specify whether the test passes particles on to the next event if the speed test succeeds or fails. Available for all tests except True When Accelerates/Decelerates.

<Speed_Test>.Unit_Value Float default:300.0 --world units

The specific speed or acceleration to test for.

<Speed_Test>.Unit_Variation Float default:0.0 --world units

The amount by which value tested for can vary randomly.

<Speed_Test>.Angle_Value Float default:360.0 --angle

The specific angular speed or acceleration to test for.

<Speed_Test>.Angle_Variation Float default:0.0 --angle

The amount by which the angular value tested for can vary randomly.

<Speed_Test>.Sync_Type Integer default:0

Specifies the time frame to use when animating the Test Values and Variations. Possible values are:

0: Absolute Time - Any keys set for parameters are applied at the actual frames for which they're set.

1: Particle Age - Any keys set for parameters are applied at the corresponding frames of each particle's existence.

2: Event Duration - Any keys set for parameters are applied to each particle starting when it first enters the event.

<Speed_Test>.Random_Seed Integer default:12345

Specifies a randomization value.

Speed_Test Interfaces:

Interface: action

Interface: PViewItem

Interface: test

See also

Particle Flow Classes


Split_Amount : Helper

Split_Amount - superclass: helper super-superclass:node - classID: #(1962490891, 515064320)

Value > MAXWrapper > Node > Helper > Split_Amount

Description:

The Split_Amount test lets you send a specific number of particles to the next event, keeping all remaining particles in the current event. You can split the particle stream by a specific number or percentage, or by every Nth particle. With a specific number of particles, the splitting takes place once per event, but you can animate the percentage and every Nth values to vary the amount of split-off particles over time.

Constructor:

Split_Amount...

Properties:

<Split_Amount>.Test_Type Integer default: 0

0: Fraction Of Particles - Split the particle stream on a percentage basis, specified with the Ratio value. With Ratio greater than 0.0, whether a particular particle is split off depends on a randomization factor; change this with the Uniqueness Seed value.

1: Every Nth Particle - Splits off a regular sample of particles.

2: First N Particles - Splits off the number of particles specified as the N value (below), starting with the first particle to enter the event, and retains the rest.

3: Particles After N First - Splits off all particles starting with the first one after N particles, as specified with the N parameter (below). All particles starting with the first to enter the event up to N are retained in the event.

<Split_Amount>.Ratio Float default: 50.0 --percentage

Specifies the percentage of particles that will test True. Animatable. Used only when Test_Type is set to 0 : Fraction Of Particles

<Split_Amount>.Every_Nth Integer default: 3

Specifies how often to split off a particle. Animatable. Used only when .Test_Type is set to 0 : Every Nth Particle.

<Split_Amount>.First_N Integer default: 100

Specifies the number of particles to split off, with 2 : First N Particles, or to retain in the event, with 3 : Particles After N First.

<Split_Amount>.Per_Emission_Source Boolean default: false

When set to true, the software applies the First_N value for the options First N Particles and Particles After N First separately for each emission source. Use this option with multiple Particle Flow sources converging into a single Split Amount test.

<Split_Amount>.Random_Seed Integer

Specifies the randomization value.

Split_Amount Interfaces:

Interface: action

Interface: PViewItem

Interface: test

See also

Particle Flow Classes


Split_Selected : Helper

Split_Selected - superclass: helper super-superclass:node - classID: #(1962490893, 515064320)

Value > MAXWrapper > Node > Helper > Split_Selected

Description:

The Split_Selected test lets you split the particle stream based on particles' selection status.

Constructor:

Split_Selected...

Properties:

<Split_Selected>.Condition_Type Integer default:0 -- radio button number

Controls the state of the radio buttons in the Test True If Particle group in the UI. Lets you choose how to split the particle stream. Possible values are:

0: Is Selected - All selected particles are eligible for redirection to another event.

1: Is Not Selected - All non-selected particles are eligible for redirection to another event.

Split_Selected Interfaces:

Interface: action

Interface: PViewItem

Interface: test

See also

Particle Flow Classes


Split_Source : Helper

Split_Source - superclass: helper super-superclass:node - classID: #(1962490892, 515064320)

Value > MAXWrapper > Node > Helper > Split_Source

Description:

The Split_Source test lets you split the particle stream based on particles' origin. You can specify that particles from one or more specific Particle Flow sources should or should not be eligible for redirection to the next event.

Constructor:

Split_Source...

Properties:

<Split_Source>.Condition_Type Integer default:0 --radio button number

Controls the state of the radio buttons in the Test True If Particle group in the UI. Lets you choose how to split the particle stream. Default Is From Selected Source.

0: Is From Selected Source - All particles from sources highlighted in the Selected Emission Sources list are eligible for redirection to another event.

1: Is Not From Selected Source - All particles from sources not highlighted in the Selected Emission Sources list are eligible for redirection to another event

<Split_Source>.Selected_Sources int array default:#()

Get/Set the list of selected sources to be considered by the Test.

Split_Source Interfaces:

Interface: action

Interface: PViewItem

Interface: test

See also

Particle Flow Classes


Particle View Access

The following classes provide MAXScript access to Particle View:

Particle_View : Helper

In addition, the ParticleFlow Global Interface provides a method for opening the Particle View.

See also

Particle Flow Classes


Particle_View : Helper

Particle_View - superclass: helper super-superclass:node - classID: #(1962490631, 515064576)

Value > MAXWrapper > Node > Helper > Particle_View

Description:

Instances of this internal class are created by Particle Flow when using the particleFlow.OpenParticleView() method and represent the Particle View. See particleFlow Global Interface for details.

NOTE:

Not creatable by MAXScript

Properties:

<Particle_View>.name String

Get/Set the name of the Particle View.

<Particle_View>.origin Point3

Get/Set the origin of the Particle View in screen pixel coordinates relatively to the upper left corner of the desktop.

<Particle_View>.width Integer

Get/Set the width of the Particle View in pixels

<Particle_View>.height Integer

Get/Set the height of the Particle View in pixels

<Particle_View>.divider Point3

Get/Set the location of the divider of the Particle View.

<Particle_View>.Show_Parameters Boolean default:true

Controls the visibility of the Parameters panel at the right side of Particle View.

<Particle_View>.Show_Action_Depot Boolean default:true

Controls the visibility of the Action Depot at the bottom of Particle View.

<Particle_View>.Show_Action_Description Boolean default:true

Controls the visibility of the Action Description in the bottom right corner of Particle View.

<Particle_View>.show_Particle_Count Integer default: 0

When set to 1, shows the Particle Count. Controls the checked state of the Particle View>Options>Track Update>Particle Count menu item.

<Particle_View>.show_Action_Update Integer default: 0

When set to 1, shows the Action Update. Controls the checked state of the Particle View>Options>Track Update>Update Progress menu item.

<Particle_View>.use_Dynamic_Names Integer default: 1

When set to 1, Particle View uses Dynamic names. Controls the checked state of the Particle View>Options>Use Dynamic Names menu item.

EXAMPLES AND RESULTS:

--Open a Particle View

pv = particleFlow.openParticleView()

$Particle_View:Particle View 01 @ [0.000000,0.000000,0.000000]

pv.Origin

[9,77,0]

pv.Origin = [100,0,0]

[100,0,0]

pv.Origin = [0,0,0]

[0,0,0]

--Get the current size of the Particle View

pv.Width

549

pv.Height

852

--Set the size of the Particle View to 800 x 600

pv.Width = 800

800

pv.Height = 600

600

pv.Divider

[1,261,0]

--Move the divider down to set Depot height to 100 pixels

pv.Divider = [1,100,0]

[1,100,0]

pv.Show_Particle_Count

0

pv.Show_Particle_Count = 1

1

pv.Show_Action_Update

0

pv.Show_Action_Update = 1

1

pv.Use_Dynamic_Names

1

pv.Use_Dynamic_Names = 0

0

The following MacroScript will open the Particle View on the right half of the desktop. If you are using a Dual Monitor setup with a single desktop on both monitors, this will open Particle View on the right monitor!

SCRIPT:

macroScript PView_TwoMonitors

category: "Particle View"

buttontext: "PView Half"

tooltip: "Open Particle View on Right Half of Desktop"

(

-- open Particle View, get the Particle View object

pv =ParticleFlow.openParticleView()

-- get desktop size

winsize = getMaxWindowSize()

-- set Origin of PView to half desktop width and 0 height

pv.origin = [winsize.x/2, 0,0]

-- set Width to half desktop width

pv.width = winsize.x/2

-- set Height to full desktop height

pv.height = winsize.y

)

See also

particleFlow Global Interface

Particle View Access


Particle Flow Internal Classes

NOTE:

The following classes are for Internal Use Only.
No instances of these classes can be created by MAXScript.

Standard_Flow (const MAXClass): Standard_Flow

Empty_Flow (const MAXClass): Empty_Flow

PFArrow (const MAXClass): PFArrow

PFEngine (const MAXClass): PFEngine

PFSystemPool (const MAXClass): PFSystemPool

ParticleContainer (const MAXClass): ParticleContainer

ParticleGroup : GeometryClass

Viewport_Render : Helper

See also

Particle Flow Classes


Standard_Flow (const MAXClass): Standard_Flow

NOTE:

For Internal Use Only. Not Creatable by MAXScript

See also

Particle Flow Internal Classes


Empty_Flow (const MAXClass): Empty_Flow

NOTE:

For Internal Use Only. Not Creatable by MAXScript

See also

Particle Flow Internal Classes


ParticleContainer (const MAXClass): ParticleContainer

NOTE:

For Internal Use Only. Not creatable by MAXScript

ParticleContainer Interfaces:

Interface: MaxscriptParticleContainer

See also

Particle Flow Internal Classes


ParticleGroup : GeometryClass

ParticleGroup - superclass: GeometryClass super-superclass:node - classID: #(1962490626, 515064576)

NOTE:

For Internal Use Only. Not creatable by MAXScript

PFSystemPool Interfaces:

Interface: particleObjectExt

See also

Particle Flow Internal Classes


PFActionListPool : ReferenceTarget

PFActionListPool - superclass: ReferenceTarget super-superclass:MAXWrapper - classID: #(1962490632, 515064576)

NOTE:

For Internal Use Only. Not creatable by MAXScript

PFActionListPool Interfaces:

Methods:

<integer>numActionLists()

<node>getActionList <index>index

<bool>hasActionList <node>node

<bool>hasActionListByHandle <integer>handle

See also

Particle Flow Classes


PFArrow (const MAXClass): PFArrow

NOTE:

For Internal Use Only. Not creatable by MAXScript

PFArrow Interfaces:

Methods:

<bool>setTest <node>action

<bool>setActionList <node>actionList

<node>getTest()

<node>getActionList()

<bool>activate()

<bool>deactivate()

<bool>isActive()

See also

Particle Flow Internal Classes


PFEngine (const MAXClass): PFEngine

NOTE:

For Internal Use Only. Not creatable by MAXScript

PFEngine Interfaces:

Methods:

<bool>init()

See also

Particle Flow Internal Classes


PFSystemPool (const MAXClass): PFSystemPool

NOTE:

For Internal Use Only. Not creatable by MAXScript

PFSystemPool Interfaces:

Methods:

<integer>numPFSystems()

<node>getPFSystem <index>index

<bool>hasPFSystem <node>node

<bool>hasPFSystemByHandle <integer>handle

See also

Particle Flow Internal Classes


PView_Manager : ReferenceTarget

PView_Manager - superclass: ReferenceTarget super-superclass:MAXWrapper - classID: #(1962490630, 515064576)

NOTE:

For Internal Use Only. Not creatable by MAXScript

PView_Manager Interfaces:

Methods:

<bool>openParticleView <object>pfEngine

<bool>updateParticleViews <bool>additionsOnly

<bool>preUpdateParticleViews <bool>additionsOnly

<bool>postUpdateParticleViews <bool>additionsOnly

<bool>updateOnHold()

<integer>numActionClasses()

<class>actionClass <index>index

<string>actionName <index>index

<bool>particleViewOpenClose()

<bool>particleFlowOnOff <bool>selectedOnly

See also

Particle Flow Internal Classes


Viewport_Render : Helper

Viewport_Render - superclass: helper super-superclass:node - classID: #(1962490625, 515064320)

Value > MAXWrapper > Node > Helper > Viewport_Render

NOTE:

For Internal Use. Not creatable by MAXScript

Properties:

<Viewport_Render>.Viewport_Type Integer

<Viewport_Render>.Viewport_Visible Float --precentage

<Viewport_Render>.Viewport_Color RGB color

<Viewport_Render>.Show_Numbering Boolean

<Viewport_Render>.Render_Type Integer

<Viewport_Render>.Render_Visible Float --precentage

<Viewport_Render>.Selection_Level Ineger

<Viewport_Render>.selected Int array

<Viewport_Render>.Selected_Viewport_Type Integer

<Viewport_Render>.Selected_Render_Type Integer

<Viewport_Render>.Selected_Color RGB color

<Viewport_Render>.Generate_Selection_Channel Boolean

<Viewport_Render>.hidden Int array

<Viewport_Render>.Hide_By_Numbers String

<Viewport_Render>.Unhide_By_Numbers String

Viewport_Render Interfaces:

Interface: action

Interface: operator

Interface: PViewItem

See also

Particle Flow Internal Classes

Particle Flow Classes


Using MAXScript in Script Actions

Particle Flow provides the following Script Actions:

Birth_Script : Helper

Script_Operator : Helper

Script_Test : Helper

These Actions can be used to give birth to particles, manipulate their properties and test properties against user-defined values.

Handlers:

All Script Actions implement four handlers to specify the channels used, perform initialization tasks, proceed and perform cleanup works.

These handlers are:

on ChannelsUsed pCont do ...

Defines the channels to be made available to the script. The list of all possible channels is available under Interface: MaxscriptParticleContainer .

The parameter passed to the handler contains the Particle Container the script is applied to.

EXAMPLE

on ChannelsUsed pCont do

(

pCont.useTime = true --enable the Time channel

pCont.useSpeed = true --enable the Speed channel

pCont.useInteger = true --enable the Integer channel

)

on Init pCont do ...

This hander is called when the Action is being initialized. It can be used to perform preparation tasks like defining variables, creating (limited) additional geometry etc.

For examples implementing the Init handler, see Fragmentation Sample Script and Metaball Sample Script

on Proceed pCont do ...

The Proceed handler is called whenever the Action is evaluated. The handler contains the main script applied to the Particles. In this handler, every particle can be modified by accessing its various properties. For a list of all properties and methods available inside the on Proceed handler, see Interface: MaxscriptParticleContainer

The parameter pCont passed to the handler contains the Particle Container the script is applied to.

on Release pCont do ...

The Release handler is called when the Action is released. It can be used to do cleanup work, but is typically empty.

See also

Particle Flow Sample Scripts

Interface: MaxscriptParticleContainer


Particle Flow Sample Scripts

The following Sample Scripts show how to use MAXScript to control Particle Flow particles.

Update Step Scripts:

Every Step Update Example

Final Step Update Example

Particle Channel Scripts:

particleInteger Sample Script

particleFloat Sample Script

particleVector Sample Script

Birth Script:

Birth Script Example

Fragmentation Sample Script

Script Operator:

Script Operator Example

Speed Operator in Script Operator Example

View-Dependent Particle Resolution Example

Metaball Sample Script

Flying Letters from a Custom Text

Script Test:

Script Test Example

Scripted Position Test Example

Age Test in Script Test Example

Integrator ProceedSynch Example

Proceed With Integrate Script_Test Example

Creating and Connecting Actions:

VolumeDocking Sample Script

Misc. Examples:

MacroScript: Open Particle View

MacroScript: Open Particle View on Second Monitor

See also

Using MAXScript in Script Actions

How To ... Transfer ParticleFlow Particle Motion To Scene Objects

How To ... Affect Particle Flow Particles by Mass


Every Step Update Example

Description:

The following example shows the default Every Step Update script with detailed comments.

Can Be Used With:

Used by PF_Source as default Every Step Update script.

Effect:

The script modifies particle speed and direction, causing particles to follow a spiral path:

EXAMPLE

--Get the current particle system executing the script

pf_node_current = particleFlow.scriptRunner()

--In case the current particle system is a valid node

if (pf_node_current != undefined) then

(

--Get the total number of particles

count = pf_node_current.NumParticles()

--Loop from 1 to the number of particles

for i in 1 to count do

(

--Set the particle index in the container to the current i value.

--This makes the i-th particle in the container the current one:

pf_node_current.particleIndex = i

--Get the age of the particle, multiply by 5 and use as angle

--to define the particle speed

--Decreasing the constant 5 will slow down the rotation

--Increasing the constant will speed up the rotation

age = 5*pf_node_current.particleAge

--Calculate the speed of the particle using the

--function of the circle.

--Info: In general, a circle can be drawn using an Angle

--going from 0 to 2*Pi and the following functions for X and Y:

--X = CenterX+Radius*Cos(Angle)

--Y = CenterY+Radius*Sin(Angle)

--In our case, CenterX and CenterY are 0, Radius is 0.05 units,

--and Angle is based on the Age of the particles (see above).

--Changing the constant 0.05 will change the radius of the path.

--Changing the –0.05 (Z speed) will change the height of the spiral.

pf_node_current.particleSpeed = [0.05*cos(age), 0.05*sin(age), -0.05]

)--end i loop

)--end if

See also

Final Step Update Example

PF_Source : GeometryClass

Particle Flow Sample Scripts


Final Step Update Example

Description:

The following example shows the default Final Step Update script with detailed comments.

Can Be Used With:

Used by PF_Source as default Final Step Update script.

Effect:

The default script modifies particle speed and direction, causing particles to follow a bulb-shaped path:

EXAMPLE

--Get the current particle system executing the script

pf_node_current = particleFlow.scriptRunner()

--In case the current particle system is a valid node...

if (pf_node_current != undefined) then (

--Get the total number of particles

count = pf_node_current.NumParticles()

--Loop from 1 to the number of particles

for i in 1 to count do(

--Set the particle index in the container to the current i value.

--This makes the i-th particle in the container the current one:

pf_node_current.particleIndex = i

--Get the age of the particle, multiply by 5 and use as angle

--to define the particle speed

--Decreasing the constant 5 will slow down the rotation

--Increasing the constant will speed up the rotation

age = 5*pf_node_current.particleAge

--Calculate a factor variable based on the particle age

--This variable will define the radius of the bulb and will vary

--thanks to the sine of the age over time.

--Change the constant 20 to change the radius.

factor = 20*(sin(2*age)+1)

--Finally, calculate and set the particle position

--using the factor as Radius and the particle index as Angle

--in the function of the circle. The position of the node has to be

--added to move the particles to the origin of the Source.

--Info: In general, a circle can be drawn using an Angle

--going from 0 to 2*Pi and the following functions for X and Y:

--X = CenterX+Radius*Cos(Angle)

--Y = CenterY+Radius*Sin(Angle)

--In our case, CenterX and CenterY are 0, Radius is set to factor,

--and Angle is based on the particle index multiplied by 77.

--The Z position is based on the age.

pf_node_current.particlePosition = [factor*cos(77*i), factor*sin(77*i), -age] + pf_node_current.pos

)--end i loop

)--end if

See also

Every Step Update Example

PF_Source : GeometryClass

Particle Flow Sample Scripts


particleFloat Sample Script

Description:

The following script sets each particle's float value as one tenth of its particle ID, or birth index number.

Can Be Used With:

Can be used to control the .Force value of Force and Speed_Keep_Apart Operators.

Force : Helper

Speed_Keep_Apart : Helper

Effect:

The first particles get a low float value, and thus a low Influence value, and each successive particle gets a larger float value than the one before. As a result, the later a particle is born, the more subject it is to the space warp(s) in the operator.

EXAMPLE

--The ChannelsUsed handler defines the channels

--to be made available to the script.

--For the list of all channels, see

--Interface: MaxscriptParticleContainer

--The parameter pCont passed to the handler

--contains the Particle Container the script is applied to

on ChannelsUsed pCont do

(

pCont.useFloat = true --enable the Float channel

)

--The Init hander is called on initialization.

--It is not used in this case.

on Init pCont do

(

)

--The Proceed handler contains the main script

--applied to the Particles.

--The parameter pCont passed to the handler

--contains the Particle Container the script is applied to:

on Proceed pCont do

(

--Get the number of particles

count = pCont.NumParticles()

--Loop from 1 to the number of particles:

for i in 1 to count do

(

--Set the particle index in the container to the current i value.

--This makes the i-th particle in the container the current one

pCont.particleIndex = i

--Set the particleFloat channel value of the current particle

--to the particleID of the current particle divided by 10.0.

--The younger the particle, the higher the particleFloat value.

pCont.particleFloat = pCont.particleID/10.0

)--end i loop

)--end Proceed

--The Release handler is used to do cleanup work.

--Not used in this case.

on Release pCont do

(

)

See also

Interface: MaxscriptParticleContainer

Force : Helper

Speed_Keep_Apart : Helper

Using MAXScript in Script Actions

Particle Flow Sample Scripts


particleInteger Sample Script

Description:

The following sample script assigns Integer values to the particleInteger channel according to particle speed.

Can Be Used With:

Can be used to choose targets in the Find_Target Test when .Assignment_Type is set to 4 : By Script Integer.

Effect:

When used with a Find_Target operator, the particleInteger channel can be used to specify the target objects by index.

If the speed is below 1 unit per frame, then the particle is assigned to the first target (index=0). If the speed is higher than 10 units per frame then the particle is assigned to the third target (index=2). All other particles are assigned to the second target (index = 1).

EXAMPLE

--The ChannelsUsed handler defines the channels

--to be made available to the script.

--For the list of all channels, see

--Interface: MaxscriptParticleContainer

--The parameter pCont passed to the handler

--contains the Particle Container the script is applied to

on ChannelsUsed pCont do

(

--Enable the Time channel:

pCont.useTime = true

--Enable the Speed channel:

pCont.useSpeed = true

--Enable the Integer channel:

pCont.useInteger = true

)

--The Init hander is called on initialization.

--It is not used in this case.

on Init pCont do

(

)

--The Proceed handler contains the main script

--applied to the Particles.

--The parameter pCont passed to the handler

--contains the Particle Container the script is applied to:

on Proceed pCont do

(

--get the number of particles

count = pCont.NumParticles()

--define two local variables slowSpeed and fastSpeed

--as 1 resp. 10 units per frame (in NTSC time 160 ticks are 1 frame)

slowSpeed = 1/160.0

fastSpeed = 10/160.0

--Loop from 1 to the number of particles:

for i in 1 to count do

(

--Set the particle index in the container to the current i value

pCont.particleIndex = i

--If the length of the particleSpeed vector is shorter than

--the defined slowSpeed value,

--then set the particleInteger value to 0:

if length(pCont.particleSpeed) < slowSpeed then

pCont.particleInteger = 0

--If the particle is faster than the slowSpeed value, test its

--speed against the fastSpeed value. If faster, assign 2, if slower,

--(between slowSpeed and fastSpeed), assign 1 to the

--particleInteger channel:

else

(

if (length(pCont.particleSpeed) > fastSpeed) then

pCont.particleInteger = 2

else

pCont.particleInteger = 1

)

)--end i loop

)--end Proceed

--The Release handler is used to do cleanup work.

--Not used in this case.

on Release pCont do

(

)

See also

Interface: MaxscriptParticleContainer

Find_Target : Helper

Using MAXScript in Script Actions

Particle Flow Sample Scripts


particleVector Sample Script

Description:

The following sample script assigns Vector values to the particleVector channel.

Can Be Used With:

Can be used in a Script_Operator to control the Target Point position of a Find_Target Test.

Effect:

Takes a scene geometry object, gets the position of its first vertex, adds a random offset to it and assigns to the particleVector channel of all particles. In result, all particles stream towards the vertex thanks to the Find_Target which is set to read the particleVector channel and send all particles to the position in the channel:

EXAMPLE

--The ChannelsUsed handler defines the channels

--to be made available to the script.

--For the list of all channels, see

--Interface: MaxscriptParticleContainer

--The parameter pCont passed to the handler

--contains the Particle Container the script is applied to

on ChannelsUsed pCont do

(

--Enable the Vector channel:

pCont.useVector = true

)

--The Init hander is called on initialization.

--It is not used in this case.

on Init pCont do

(

--Define a global variable with unique name and store the

--scene object which also has a unique name in it

global obj_19680217 = $Sphere_19680217

--If the scene object does not exist, create a sphere,

--give it the unique name and assign to the global variable

if obj_19680217 == undefined then

obj_19680217 = Sphere name:"$Sphere_19680217"

)

--The Proceed handler contains the main script

--applied to the Particles.

--The parameter pCont passed to the handler

--contains the Particle Container the script is applied to:

on Proceed pCont do

(

--Get the current number of particles

count = pCont.NumParticles()

--Loop from 1 to the number of particles:

for i in 1 to count do

(

--Set the particle index in the container to the current i value.

--This makes the i-th particle in the container the current one

pCont.particleIndex = i

--Get the position of the first vertex of the scene object.

vpos = (getVert obj_19680217.mesh 1)

--Add a random variation between –1 and +1 to all 3 axes

vpos += random [-1,-1,-1] [1,1,1]

--Set the particleVector channel value to the calculated value

pCont.particleVector = vpos

 )--end i loop

)--end Proceed

--The Release handler is used to do cleanup work.

--Not used in this case.

on Release pCont do

(

)

See also

Interface: MaxscriptParticleContainer

Script_Operator : Helper

Find_Target : Helper

Using MAXScript in Script Actions

Particle Flow Sample Scripts


Birth Script Example

Description:

The following example shows the default Birth_Script script with detailed comments.

Can Be Used With:

This script is used as the default script in the Birth_Script action.

Effect:

The script generates a nice particle pattern – a helix built by a fiine sine curve. In order to see the effect of the script, you should:

  • Create a default PF_Source in the scene from the Create Tab of 3ds Max.

  • Open Particle View

  • Replace the Birth action with a Birth_Script action

  • Delete the Speed, Position and Rotation operators.

  • Scrub the Time

EXAMPLE

--The ChannelsUsed handler defines the channels

--to be made available to the script.

--For the list of all channels, see

--Interface: MaxscriptParticleContainer

--The parameter pCont passed to the handler

--contains the Particle Container the script is applied to

on ChannelsUsed pCont do

(

pCont.useTime = true --enable the Time channel

pCont.useAge = true --enable the Age channel

pCont.usePosition = true --enable the Position channel

pCont.useSpeed = true --enable the Speed channel

)

--The Init hander is called on initialization.

--It is not used in this case.

on Init pCont do

(

)

--The Proceed handler contains the main script

--applied to the Particles.

--The parameter pCont passed to the handler

--contains the Particle Container the script is applied to:

on Proceed pCont do

(

--Get the Start Time as float. This converts the time to ticks.

t1 = pCont.getTimeStart() as float

--Get the End Time as float. This converts the time to ticks.

t2 = pCont.getTimeEnd() as float

--Clamp negative time values to 0

if (t1 < 0) then (t1 = 0)

--If the end time is less than 100 frames

--(100 frames * 160 ticks per frame in 30 fps NTSC)

if (t2 < 100*160) do

(

--then do a loop using the time values divided by 8

--this way a particle will be created every 8 ticks

for i in (t1/8+1) to (t2/8) do

(

--set the variable curTime to the actual time in ticks

curTime = 8*i as float

--give birth to a new particle

pCont.AddParticle()

--get the index of the last particle that was added

pCont.particleIndex = pCont.NumParticles()

--set the current time of the particle in frames

--(160 ticks in one frame at 30 fps NTSC animation)

pCont.particleTime = curTime/160

--Set the age of the particle to 0 – newborn!

pCont.particleAge = 0

--Define a radius variable based on the sine of the current time

sh = 2*sin(5*curTime)

--Define an angle variable based on the current time

ang = 0.2*curTime

--Set the particle position using the above variables

pCont.particlePosition = [sh*sin(ang), sh*cos(ang), 0]

--Define the speed using the same variables and falling down along Z

pCont.particleSpeed = [0.01*sin(ang), 0.01*cos(ang), -0.005]

)

)

)

--The Release handler is used to do cleanup work.

--Not used in this case.

on Release pCont do

(

)

See also

Interface: MaxscriptParticleContainer

Birth_Script : Helper

Using MAXScript in Script Actions

Particle Flow Sample Scripts


Fragmentation Sample Script

Description:

The following example shows a sample Fragmentation script using the Parray particle system and the Mesher Compound object to generate object fragments on the fly.

Can Be Used With:

Should be used in a Birth_Script Action to generate fragment particles.

Effect:

In the Init handler, the script prepares the fragment source object, a PArray, a Mesher Compound and two Editable meshes to hold the fragments. It then assigns the PArray to the Mesher.

In the Proceed handler, the script checks whether the particle system time is at frame 0 and no particles exist. In this case it gets the mesh of the PArray from the Mesher, splits the mesh into elements, gives birth to new particles and assigns them the mesh and position of the fragment.

After the script has created the particles with the fragments, they can be controlled by any Particle Flow operators as usual.

EXAMPLE

--The ChannelsUsed handler defines the channels

--to be made available to the script.

--For the list of all channels, see

--Interface: MaxscriptParticleContainer

--The parameter pCont passed to the handler

--contains the Particle Container the script is applied to

on ChannelsUsed pCont do

(

pCont.useTime = true --enable the Time channel

pCont.useAge = true --enable the Age channel

pCont.usePosition = true --enable the Position channel

pCont.useSpeed = true --enable the Speed channel

pCont.useShape = true --enable the Shape channel

)

--The Init hander is called on initialization.

--This is where preparation works can be performed.

--The parameter pCont passed to the handler

--contains the Particle Container the script is applied to

on Init pCont do

(

-- Create a geometry primitive to break into fragments.

global bb = $Teapot_69e13b6c -- a unique name

-- Create a PArray particle system to create the fragments.

global a = $PArray_36ce15a4 -- a unique name

-- Create a Mesher Compound object to turn PArray into mesh.

global mshr = $Mesher_23951616 -- a unique name

-- Create a mesh to hold the total mesh.

global totalMesh = $EMesh_5990501d -- a unique name

-- Create a mesh to hold separate fragments.

global fragmentMesh = $EMesh_1589735c -- a unique name

--Disable screen redraw to speed up execution

with redraw off(

-- If the source object does not exist in the scene...

if (bb == undefined) then(

-- create a Teapot for fragmentation, give it a unique name

bb = Teapot radius:20 smooth:on segs:6 body:on handle:on spout:on lid:on mapCoords:off

bb.name = "Teapot_69e13b6c"

hide bb -- hide the teapot

)

-- If the PArray object does not exist in the scene...

if (a == undefined) then

(

-- Create and setup a PArray

a = PArray()

a.name = "PArray_36ce15a4"a.speed = 0a.emitter = bba.particleType = 2a.viewtype = 2hide a

)

-- If the Mesher object does not exist in the scene...

if (mshr == undefined) then(

-- Create a Mesher Compound Object

-- The Mesher gets mesh data out of the PArray

mshr = mesher()

mshr.name = "Mesher_23951616"

mshr.pick = a -- Assign the Parray to the Mesher

select mshr

modPanel.addModToSelection (Edit_Mesh ()) ui:on

clearSelection()

hide mshr

)

-- If the total Emesh object does not exist in the scene...

if (totalMesh == undefined) then(

-- Create a new editable meshes with unique name

totalMesh = editable_mesh()

totalMesh.name = "EMesh_5990501d"

hide totalMesh

)

-- If the fragments Emesh object does not exist in the scene...

if (fragmentMesh == undefined) then(

-- to create editable meshes our of Mesher

fragmentMesh = editable_mesh()

fragmentMesh.name = "EMesh_1589735c"

hide fragmentMesh

)

)

)

--The Proceed handler contains the particle creating script

--The parameter pCont passed to the handler

--contains the Particle Container the script is applied to:

on Proceed pCont do (

-- Get the time range

t1 = pCont.getTimeStart() as float

t2 = pCont.getTimeEnd() as float

-- Only if the current time is at moment 0...

if ((t1 <= 0) and (t2 >= 0)) then (

-- Initialize a counter

i = 0

-- If there are still no particles in the system

if (pCont.NumParticles() <= 0) then

(

print("should be making fragments")

-- You can modify the fragmentation parameters here:

a.Fragment_Thickness = 1

a.fragmentmethod = 1

a.fragChunkMinimum = 202

-- Get the complete mesh from the mesher

totalMesh.mesh = mshr.mesh

-- Create a bitarray with all faces set

print("assigning particles")

-- Repeat while there are still faces in the mesh

while totalMesh.numfaces != 0 do

(

-- Get the mesh element the first face belongs to

el = meshop.getelementsusingface totalMesh #{1}

-- Detach the faces of the element

tMesh = meshop.detachFaces totalMesh el delete:true asMesh:true

-- Set the mesh of the fragment Emesh to the element

fragmentMesh.mesh = tMesh

-- Update the fragment Emesh

update fragmentMesh

-- Get the center of the fragment mesh

meshCenter = fragmentMesh.center

-- The original particle position is the center of the fragment

particlePos = fragmentMesh.center

-- Adjust vertex location to center around the chunk pivot

for j in 1 to fragmentMesh.verts.count do

(

curVert = getVert fragmentMesh.mesh j

curVert = curVert - meshCenter

setVert fragmentMesh.mesh j curVert

)

-- Move the pivot of the fragment to the original center

-- of the fragment

fragmentMesh.pivot = meshCenter

-- Give birth to a new particle

pCont.AddParticle()

-- Increase the counter

i += 1

-- Set the current particle index to the counter

pCont.particleIndex = i

-- Set particle time and age to 0 (newborn particle!)

pCont.particleTime = 0

pCont.particleAge = 0

-- Set the particle’s position to the original fragment position

pCont.particlePosition = particlePos

-- Reset the speed to 0

pCont.particleSpeed = [0,0,0]

-- Set the shape of the particle to the mesh of the fragment

pCont.particleShape = fragmentMesh.mesh

)

print("assigned particles " + (pCont.NumParticles() as string))

)

)

)

--The Release handler is used to do cleanup work.

--Not used in this case.

on Release pCont do

(

)

See also

PArray : GeometryClass

Mesher : GeometryClass

Using MAXScript in Script Actions

Particle Flow Sample Scripts


Script Operator Example

Description:

The following example shows the default Script Operator script with detailed comments.

Can Be Used With:

Used by the Script_Operator as default script.

Effect:

The script slows particles down, and then, when they are slow enough, splits off the first 50 particles into a stream traveling in a negative direction on the world X axis, and the remainder traveling in the opposite direction.

EXAMPLE

--The ChannelsUsed handler defines the channels

--to be made available to the script.

--For the list of all channels, see

--Interface: MaxscriptParticleContainer

--The parameter pCont passed to the handler

--contains the Particle Container the script is applied to

on ChannelsUsed pCont do

(

pCont.useTime = true --enable the Time channel

pCont.useSpeed = true --enable the Speed channel

)

--The Init hander is called on initialization.

--It is not used in this case.

on Init pCont do

(

)

--The Proceed handler contains the main script

--applied to the Particles.

--The parameter pCont passed to the handler

--contains the Particle Container the script is applied to:

on Proceed pCont do

(

--Get the total number of particles:

count = pCont.NumParticles()

--Define slow speed as one unit per frame:

slowSpeed = 1/160.0

--Define very slow speed as 0.01 units per frame:

verySlowSpeed = 0.01/160.0

--Define random angular deviation per frame

divAngle = 12.0

--Get the start time in ticks

--(when conerting time values to float, the result is ticks)

tStart = pCont.getTimeStart() as float

--Get the end time in ticks

tEnd = pCont.getTimeEnd() as float

--Calculate the length of the time interval in ticks

timeDif = tEnd – tStart

--Then convert to frames (160 ticks/frame when using 30 fps NTSC)

timeDif /= 160.0

--Define a drag coefficient

dragCoef = 0.08

--Loop from 1 to the number of particles...

for i in 1 to count do

(

--Set the particle index in the container to the current i value.

--This makes the i-th particle in the container the current one:

pCont.particleIndex = i

--If the particle is faster, then slow it down

if length(pCont.particleSpeed) > slowSpeed then

pCont.particleSpeed -= dragCoef*timeDif*pCont.particleSpeed

--Calculate the length of the particle speed vector

newLen = length(pCont.particleSpeed)

--If the current speed is higher than the defined very slow speed

--then calculate a random divergence using the deviation angle.

--If it is slower (very slow!), then don’t use the angle but a

--fixed value.

if newLen > verySlowSpeed then

pCont.particleSpeed = pCont.randDivergeVector(pCont.particleSpeed)(divAngle/(160*newLen))

else

pCont.particleSpeed = pCont.randDivergeVector(pCont.particleSpeed)(180.0)

--If slow enough, the first 50 particles go to the left.

--The particles with ID above 50 go to the right.

if length(pCont.particleSpeed) < 1.5*slowSpeed then

(

if pCont.particleID < 50 then

pCont.particleSpeed += [-0.005*timeDif, 0, 0]

else

pCont.particleSpeed += [0.005*timeDif, 0, 0]

)

)

)

--The Release handler is used to do cleanup work.

--Not used in this case.

on Release pCont do

(

)

See also

Interface: MaxscriptParticleContainer

Script_Operator : Helper

Using MAXScript in Script Actions

Particle Flow Sample Scripts


Speed Operator in Script Operator Example

Description:

The following example shows a Script_Operator that creates a Speed operator and uses it to simulate its own functionality. It is possible to create several standard operators in this manner, set their properties in the Init block, and use them all together in succession in the Proceed block.

Can Be Used With:

Should be used inside a Script_Operator .

Effect:

This is basically a scripted wrapped around a Speed Operator. The Script Operator has the same functionality as the encapsulated Speed Operator inside of it. Using this as the starting point, the script could be enhanced to add scripted functionality to the existing operator.

EXAMPLE

--The ChannelsUsed handler defines the channels

--to be made available to the script.

on ChannelsUsed pCont do

(

-- No channes specified because the script doesn't make direct

-- access to particle data

)

--The Init hander is called on initialization.

--It is used to get the Speed action or create a new one

--if there is not an existing one

on Init pCont do

(

--Get an existing Speed Action by its unique name.

bb = $Speed74b93a88

--If the unique action does not exist, create one and give it

--the unique name. If you are reusing the code in multiple

--Script Operators, change the name to have a unique ID!

if (bb == undefined) then

(

ParticleFlow.BeginEdit()

bb = Speed()

bb.name = "Speed74b93a88"

bb.speed = 100

ParticleFlow.EndEdit()

)

initActions = pCont.getInitActions()

--Call the Init method in the Speed Action and pass

--the Particle container, Particle System object and node

--and the init action objects and nodes from the Scripted Operator.

bb.Init (pCont.getParticleContainer()) (pCont.getParticleSystem()) (pCont.getParticleSystemNode()) (pCont.getInitActions()) (pCont.getInitActionNodes())

)

--In the Proceed handler, we can call the .Proceed method

--of the Operator Interface and pass the container,

--particle system object and node, and

--the Init Action objects and nodes

--This means that the exernal Speed action will proceed whenever

--the Script_Operator does.

on Proceed pCont do

(

t_start = pCont.GetTimeStart() as time

t_end = pCont.GetTimeEnd() as time

bb = $Speed74b93a88

if (bb != undefined) then

(

bb.Proceed (pCont.getParticleContainer()) t_start &t_end (pCont.getParticleSystem()) (pCont.getParticleSystemNode()) bb (pCont.GetIntegrator())

)

pCont.SetTimeEnd t_end

)

--In the Release hander of the Script_Operator,

--call the .Release method and pass the container of the

--Script_Operator.

on Release pCont do

(

bb = $Speed74b93a88

if (bb != undefined) then

bb.Release(pCont.getParticleContainer())

)

See also

Using MAXScript in Script Actions

Particle Flow Sample Scripts


View-Dependent Particle Resolution Example

Description:

The following example shows a possible way to control the resolution of particles based on the distance to a camera.

Can Be Used With:

Should be used in a Script_Operator

Effect:

The script uses a Sphere primitive from the scene as the shape of every particle and sets its segments based on the distance to a hard-coded camera $Camera01. As particles get farther from the camera, they get less polygons.

EXAMPLE

--The ChannelsUsed handler defines the channels

--to be made available to the script.

--For the list of all channels, see

--Interface: MaxscriptParticleContainer

--The parameter pCont passed to the handler

--contains the Particle Container the script is applied to

on ChannelsUsed pCont do

(

pCont.useShape = true  --Enable the Shape channel

pCont.usePosition = true --Enable the Position channel

pCont.useScale = true  --Enable the Scale channel

)

--The Init hander is called on initialization.

--In this case, it is used to define and, if necessary, create

--the source of particle shapes

on Init pCont do

(

-- Get the shape source primitive by name.

-- Use random name to avoid conflict with other objects in the scene

global sph = $SphereDynamic2468975

-- In case the object does not exist, create it

if sph == undefined then

(

sph = Sphere()

-- Give the object a unique name

sph.name = "SphereDynamic2468975"

-- Set the radius to one.

sph.radius = 1.0

-- Hide the Sphere

hide sph

)

)

--The Proceed handler contains the main script

--applied to the Particles.

--The parameter pCont passed to the handler

--contains the Particle Container the script is applied to:

on Proceed pCont do

(

--If there is a camera named Camera01 in the scene...

if $Camera01 != undefined then

(

--Get the current total particles count:

count = pCont.NumParticles()

--Loop through all particles:

for i in 1 to count do

(

--Set the current particle index:

pCont.particleIndex = i

--Modify the pre-created sphere with radius

--based on the particle size:

sph.radius = pCont.particleScale

--Modify segments based on the distance to the camera

--called $Camera01

--At distance of 500.0 units the segments will be set to 2

--At distance of 250.0 the segments will be 4, at 100 units 10 etc.

--Change the function to get the desired falloff

sph.segs = 1000.0/(length (pCont.particlePosition - $Camera01.pos))

--Set the shape of the particle to the TriMesh of the Sphere

pCont.particleShape = sph.mesh

)--end i loop

)--end if

)--end proceed

--The Release handler is used to do cleanup work.

--Not used in this case.

on Release pCont do

(

)

See also

Sphere : GeometryClass

Interface: MaxscriptParticleContainer

Script_Operator : Helper

Using MAXScript in Script Actions

Particle Flow Sample Scripts


Metaball Sample Script

Description:

The following example shows a sample Metaball script using the Parray particle system.

Can Be Used With:

Should be used in a Script_Operator .

Effect:

In the Proceed handler, a new Mesh object is created with a vertex at every particle. Then a PArray classical particle system is created and used to generate a metaball mesh out of all vertices of the supplied mesh. Then using a Mesher compound object, a snapshot of the metaball is made and used as the shape of the first particle.

EXAMPLE

--The ChannelsUsed handler defines the channels

--to be made available to the script.

--For the list of all channels, see

--Interface: MaxscriptParticleContainer

--The parameter pCont passed to the handler

--contains the Particle Container the script is applied to

on ChannelsUsed pCont do

(

pCont.usePosition = true

pCont.useTime = true

pCont.useSpeed = true

pCont.useShape = true

)

--The Init hander is called on initialization.

--It is not used in this case.

on Init pCont do

(

)

on Proceed pCont do

(

--Get the start and end times

t1 = pCont.getTimeStart() as float

t2 = pCont.getTimeEnd() as float

--As long as there are particles

if (pCont.NumParticles() > 0) then

(

--Disable screen redraws to keep speed up

with redraw off

(

-- create an empty mesh

nMesh = editable_mesh()

-- Set the number of vertices and faces to the

-- number of particles.

nMesh.numVerts = pCont.NumParticles()

nMesh.numFaces = pCont.NumParticles()

-- We will make a single vertex for each particle

for i in 1 to pCont.NumParticles() do

(

-- Time for the particle to travel at this integration step

timeStep = t2 - (pCont.getParticleTime(i) as float)

-- Speed is added to foresee the particle position at the end

-- of the integration step

nMesh.verts[i] = pCont.getParticlePosition(i) + timeStep*pCont.getParticleSpeed(i)

-- The faces references the same vertex 3 times!

nMesh.faces[i] = [i,i,i]

)

-- create PArray with particles on vertices of the mesh

a = PArray()

a.speed = 0

a.formation = 2 -- at all vertices

a.quantityMethod = 1 -- use Total

a.Total_Number = 1 -- just initializing

a.viewPercent = 100

a.Emitter_Start = 0f

a.Emitter_Stop = 0f

a.subsampleCreationTime = off

a.Display_Until = 2000f

a.life = 2000f

a.Growth_Time = 0f

a.Fade_Time = 0f

a.particleType = 1 -- metaballs

a.metaballAutoCoarsness = off

a.metaballRenderCoarsness = 0.9

a.metaballViewCoarsness = 0.9

a.Metaparticle_Tension = 1.0

a.size = 5

a.Total_Number = pCont.NumParticles() --use particles count

a.emitter = nMesh

-- acquire the metaball mesh from the PArray

mshr = mesher()  --create a Mesher Compound object

mshr.pick = a  --get the PArray

metaballMesh = snapshot mshr --make a snapshot of the Mesher

delete a   --delete the PArray

delete #(mshr, nMesh) --delete the Mesher and our mesh

-- speed is added to foresee the particle position at the end

-- of the integration step

timeStep = t2 - (pCont.getParticleTime(1) as float)

spaceOffset = pCont.getParticlePosition(1) + timeStep*pCont.getParticleSpeed(1)

-- adjust vertex location to center around the first particle

for i in 1 to metaballMesh.verts.count do

( move metaballMesh.verts[i] (-spaceOffset) )

--Create an empty mesh to assign to all particles

emptyMesh = editable_mesh()

--Assign the empty mesh to all particles.

--This makes them invisible

pCont.setShapeForAllParticles(emptyMesh.mesh)

--First particle carries all the mesh data

pCont.setParticleShape 1 metaballMesh.mesh

--Delete the empty mesh and the snapshot

delete #(emptyMesh, metaballMesh)

)

)

)

--The Release handler is used to do cleanup work.

--Not used in this case.

on Release pCont do

(

)

See also

Using MAXScript in Script Actions

Particle Flow Sample Scripts


Flying Letters from a Custom String

Flying Letters from a Custom Text

Description:

The following example uses a Script Operator to assign a single letter to each particle based on a scene text objects. You can type in any text you want, define the font and change the appearance of the text using modifiers like Extrude and Bevel and let Particle Flow generate a stream of letters showing the text.

Can Be Used With:

The scripts should be used inside a Script_Operator .

Effect:

  • The example uses a unique scene text object (with any modifiers on top) as instanced source.

  • The script makes copies of the source text and replaces the original text with a single letter from the text.This means that you can create any appearance (like for example adding custom Bevel to the source) and the particle system will inherit these settings.

  • Changing the Text of the Font of the Source and scrubbing the time back will automatically update the particle system.

  • Deleted letters from the scene will be detected and the particle system will regenerate to bring them back.

  • If the source object was removed, a new default text with extrude modifier will be created in the scene with the string "Enter Text Here" and renderable flag set to false. This means that you can start from scratch using this text object and edit its font,text and stack to get the look you want.

    • NOTE:

    The source object must be a text object with some meshing modifier on top. Do not collapse the stack to EMesh as the script needs access to the text baseobject's font and text properties!

    • You have to disable any Caches when changing the appearance in order to see the new look.

    • You can change the timing of the Birth operator to get more particles if your text is longer than the default

    • You can use any other PFlow operators to affect the particles. The Script is only responsible for the shape of the particles.

    • If you need multiple particle systems using the script, you should change the unique naming throughout the whole script to keep them apart.

    EXAMPLE

    --The ChannelsUsed handler defines the channels

    --to be made available to the script.

    --For the list of all channels, see

    --Interface: MaxscriptParticleContainer

    --The parameter pCont passed to the handler

    --contains the Particle Container the script is applied to

    on ChannelsUsed pCont do(

    pCont.useShape = true --enable changes to the shape

    )

    --The Init hander is called on initialization.

    --In this case, it is used to define the string, font name

    --and create the text objects for every letter

    on Init pCont do

    (

    --Define a global variable to store the array of letter objects

    --Use different unique ID if reusing the code

    --multiple times in the same scene

    global pflow_letter_array17b02b680

    local text_source = $PFlowText17b02b680

    --If the unique source is missing...

    if not isValidNode text_source do

    (

    --Create new text source object

    text_source = text text:"Enter Text Here"

    --Give it the unique name - use a different ID

    --throughout the script if you need to use multiple

    --scripts in the same scene

    text_source.name = "PFlowText17b02b680"

    --Add an extrude modifier to the text object

    addmodifier text_source (extrude amount:10)

    --make the source invisible to the renderer

    text_source.renderable = false

    )

    --If the array has been initialized before...

    if pflow_letter_array17b02b680 != undefined do

    (

    txtpos = 0

    --Go through all elements of the array

    for i in pflow_letter_array17b02b680 do

    (

    txtpos += 1

    --If any of the array nodes is invalid (deleted),

    --or the font does not match the source's font name,

    --or a letter does not match the letter in the source text,

    --reset the whole array so it can be reinitialized

    if not (isValidNode i) or i.font != text_source.font or i.text != (substring text_source.text txtpos 1) do

    pflow_letter_array = undefined

    )

    )

    --If the array is newly created or reset (see above)

    if pflow_letter_array17b02b680 == undefined do

    (

    --Initialize to empty array

    pflow_letter_array17b02b680 = #()

    --Get the string to display by the particle system from the

    --source text object in the scene. You can edit the

    --text's source to display any text you want!

    --Moving the time slider will update all letters!

    local str = text_source.text

    --Delete all possibly existing letter objects by name

    delete $PFlow_Letter_17b02b680_*

    --Loop from 1 to the number of letters in the string

    for i = 1 to str.count do

    (

    --Create a copy of the source object with

    --the i-th letter from the string

    letter = copy text_source

    letter.text = (substring str i 1)

    --Give the object a unique name

    letter.name = (uniquename "PFlow_Letter_17b02b680_")

    --Set the font to the font of the source

    letter.font = text_source.font

    --Append the new text object to the array

    append pflow_letter_array17b02b680 letter

    --Hide the text object

    hide letter

    )

    )

    )

    --In the Proceed handler, we will assign the letters to the

    --available particles

    on Proceed pCont do

    (

    --Get the current particle count

    count = pCont.numParticles()

    --Get the number of text objects in the global array

    maxcount = pflow_letter_array17b02b680.count

    --Create an empty mesh

    empty_mesh = triMesh()

    --Repeat for all particles

    for i = 1 to count do

    (

    --Set the current particle index

    pCont.particleIndex = i

    --If the particle index is less than the number of letters

    if i <= maxcount then

    (

    --If the node is not deleted, set the particle shape

    --to the mesh of the i-th text object

    if isValidNode pflow_letter_array17b02b680[i] do

    pCont.particleShape = pflow_letter_array17b02b680[i].mesh

    )

    else

    (

    --If there is no letter for this particle,

    --set the shape to an empty mesh

    pCont.particleShape = empty_mesh

    )

    )

    )

    --The Release handler is used to do cleanup work.

    --Not used in this case.

    on Release pCont do

    (

    )

    See also

    Using MAXScript in Script Actions

    Particle Flow Sample Scripts


Script Test Example

Description:

The following sample script is the default script of the Script Test. It shows how to test particles against a spherical volume.

Can Be Used With:

This script should be used in a Script_Test action.

Effect:

The script goes through all particles, compares the particle position with a radius of 20 and sets the particle’s test status to true when the particle is inside the radius.

In the above setup, the particles that pass through the sphere are sent to the next event where they change their color:

EXAMPLE

--The ChannelsUsed handler defines the channels

--to be made available to the script.

--For the list of all channels, see

--Interface: MaxscriptParticleContainer

--The parameter pCont passed to the handler

--contains the Particle Container the script is applied to

on ChannelsUsed pCont do

(

--Enable the Time channel:

pCont.useTime = true

--Enable the Position channel:

pCont.usePosition = true

)

--The Init hander is called on initialization.

--It is not used in this case.

on Init pCont do

(

)

--The Proceed handler contains the main script

--applied to the Particles.

--The parameter pCont passed to the handler

--contains the Particle Container the script is applied to:

on Proceed pCont do

(

--get the total number of particles

count = pCont.NumParticles()

--loop through all particles

for i in 1 to count do

(

--Set the particle index in the container to the current i value.

--This makes the i-th particle in the container the current one

pCont.particleIndex = i

-- all particles inside a sphere with radius 20 satisfy the test

if length(pCont.particlePosition) < 20 then

(

--set the Test Status of the particle to True

pCont.particleTestStatus = true

--set the Test Time of the particle to the current Particle Time

pCont.particleTestTime = pCont.particleTime

)

)--end i loop

)

--The Release handler is used to do cleanup work.

--Not used in this case.

on Release pCont do

(

)

See also

Interface: MaxscriptParticleContainer

Script_Test : Helper

Using MAXScript in Script Actions

Particle Flow Sample Scripts


Scripted Position Test Example

Description:

The following example uses Script_Test actions to implement scripted position tests with both relative offset and absolute position options.

Can Be Used With:

The two scripts should be used inside the Script_Test : Helper actions.

Effect:

  • The PF_Source generates particles which get tested for relative offset of –100 to their birth position along the Z axis.

  • If they pass the scripted offset test, the particles are moved to the second Event which stops them and tests them for Age above 30.

  • If they pass the Age Test, the particles are moved to the Third event which tests them for absolute offset of –200 along the world Z axis using the second script.

  • If they pass the scripted position test, the particles are moved to the last Event which stops them.

SCRIPT 1

--The ChannelsUsed handler defines the channels

--to be made available to the script.

--For the list of all channels, see

--Interface: MaxscriptParticleContainer

--The parameter pCont passed to the handler

--contains the Particle Container the script is applied to

on ChannelsUsed pCont do

(

pCont.useTime = true

pCont.usePosition = true

)

--The Init hander is called on initialization.

--In this case, it is used to define the offset parameters

on Init pCont do

(

--Data paramters definition

struct paramsStruct (cond_less, axis, testpos, offset)

global paramsData = paramsStruct()

--true means less than, false means greater then

paramsData_offset.cond_less = true

--Axis option: x=1, y=2, z=3

paramsData_offset.axis = 3

--When set to true, the offset test is relative

--When set to false, the offset test is absolute.

paramsData_offset.offset = true

--Set the offset value to test for

paramsData_offset.testpos = -100

-- collects inital pos of each particle for offset test

global pos_init_array =#()

)

--In the Proceed handler, the actual testing is performed

on Proceed pCont do

(

count = pCont.NumParticles()

for i in 1 to count do

(

pCont.particleIndex = i

-- get ID of active particle

id = pCont.getParticleID pCont.particleIndex

if paramsData.cond_less == true then

(

if paramsData.offset == true then

(

-- collect initial pos for new born particle

if pCont.particleNew == true then

append pos_init_array pCont.particlePosition[paramsData.axis]

pos_id = pCont.GetParticlePositionByID id

if pos_id[paramsData.axis] < (pos_init_array[id] + paramsData.testpos) then

 testSatisfied = true

)

else

(

if pCont.particlePosition[paramsData.axis] < paramsData.testpos then

testSatisfied = true

)

)

else

(

if paramsData.offset == true then

(

-- collect initial pos for new born particle

if pCont.particleNew == true then

append pos_init_array pCont.particlePosition[paramsData.axis]

pos_id = pCont.GetParticlePositionByID id

if pos_id[paramsData.axis] > (pos_init_array[id] + paramsData.testpos) then

testSatisfied = true

)

else

(

if pCont.particlePosition[paramsData.axis] > paramsData.testpos then

testSatisfied = true

)

)

if testSatisfied == true then

(

pCont.particleTestStatus = true

pCont.particleTestTime = pCont.particleTime

)

)

)

on Release pCont do

(

)

SCRIPT 2

on ChannelsUsed pCont do

(

pCont.useTime = true

pCont.usePosition = true

)

on Init pCont do

(

--Data paramters definition

struct paramsStruct (cond_less, axis, testpos, offset)

global paramsData = paramsStruct()

--true means less than, false means greater then

paramsData.cond_less = true

--Axis option: x=1, y=2, z=3

paramsData.axis = 3

--When set to false, the offset test is absolute.

--When set to true, the offset test is relative

paramsData.offset = false

--Set the position value to test

paramsData.testpos = -200

-- Collects inital pos of each particle for offset test:

global pos_init_array =#()

)

--The Proceed handler is identical to the one in the first script.

--Only the test parameters defined in the Init handler alter the

--behavior of the script!

on Proceed pCont do

(

count = pCont.NumParticles()

for i in 1 to count do

(

pCont.particleIndex = i

-- get ID of active particle

id = pCont.getParticleID pCont.particleIndex

if paramsData.cond_less == true then

(

if paramsData.offset == true then

(

-- collect initial pos for new born particle

if pCont.particleNew == true then

append pos_init_array pCont.particlePosition[paramsData.axis]

pos_id = pCont.GetParticlePositionByID id

if pos_id[paramsData.axis] < (pos_init_array[id] + paramsData.testpos) then

 testSatisfied = true

)

else

(

if pCont.particlePosition[paramsData.axis] < paramsData.testpos then

testSatisfied = true

)

)

else

(

if paramsData.offset == true then

(

-- collect initial pos for new born particle

if pCont.particleNew == true then

append pos_init_array pCont.particlePosition[paramsData.axis]

pos_id = pCont.GetParticlePositionByID id

if pos_id[paramsData.axis] > (pos_init_array[id] + paramsData.testpos) then

testSatisfied = true

)

else

(

if pCont.particlePosition[paramsData.axis] > paramsData.testpos then

testSatisfied = true

)

)

if testSatisfied == true then

(

pCont.particleTestStatus = true

pCont.particleTestTime = pCont.particleTime

)

)

)

on Release pCont do

(

)


Age Test in Script Test Example

Description:

The following example shows the access to the Proceed methods of an Age Test from the Proceed hander of a Script Test.

Can Be Used With:

Should be used inside a Script_Test : Helper to access an Age_Test : Helper

Effect:

In the Init hander, the Script_Test creates a unqiue Age Test action or accesses an existing one if already created before. It then calls the Proceed methods of the Age Test to acquire its test results. Then it takes only the particles that have not passed the Age Test and checks them against a spherical volume. Those that fall inside the volume pass the Script Test, too.

The particles that tested True are passed to a second Event which stops them. The final result is that all particles either stop because they are too old, or stop because they have entered the spherical volume.

In the sample scene, a Sphere with radius 20 represents the spherical volume tested by the script. The particles either rest on the surface of the sphere, or have passed it and have stopped because of their age outside the sphere.

EXAMPLE

--The ChannelsUsed handler defines the channels

--to be made available to the script.

--For the list of all channels, see

--Interface: MaxscriptParticleContainer

--The parameter pCont passed to the handler

--contains the Particle Container the script is applied to

on ChannelsUsed pCont do

(

pCont.useTime = true  --enable the Time channel

pCont.usePosition = true  --enable the Position channel

pCont.useAge = true  --enable the Age channel

)

--The Init hander is called on initialization.

--In this case, it is used to create the Age Test if it does not

--exist yet, or get the existing one.

on Init pCont do

(

global ageT

--If the unique object does not exist yet

if $ageTest77777 == undefined then

(

--Disable automatic event encapsulation

particleFlow.BeginEdit()

--Create a new Age Test

ageT = Age_Test()

--Give it a unique name! If you are reusing the code

--multiple times, change the number to have a unique ID

ageT.name = "ageTest77777"

--Disable editing mode, enable auto-encapsulation

particleFlow.EndEdit()

--Set the Age Test value to 1600 ticks, no variation

ageT.Test_Value = 1600

ageT.Variation = 0

)

else

ageT = $ageTest77777 --if the object exists, get it

)--end init handler

--In the Proceed handler, the Script Test calls the Proceed methods

--of the Age Test to acquire its results and then checks the

--the particles that have not passed the Age Test against

--a spherical volume

on Proceed pCont do

(

--Get the current number of particles

count = pCont.NumParticles()

--Get the exact start and end time

t_start = pCont.GetTimeStart() as time

t_end = pCont.GetTimeEnd() as time

t_start_frac = (pCont.GetTimeStart() as float) - (t_start as integer)

t_end_frac = (pCont.GetTimeEnd() as float) - (t_end as integer)

--Initialize a BitArray to store results

testResult = #{}

--Initialize an Array to store test times

testTime = #()

--Call the ProceedStep1 method of the Age Test

ageT.proceedStep1 (pCont.GetParticleContainer()) (pCont.GetParticleSystem()) (pCont.getParticleSystemNode()) (pCont.getActionNode()) (pCont.getIntegrator())

--Call the ProceedStep2 method of the Age Test

--The results will be returned in the by-reference variables

ageT.proceedStep2 t_start t_start_frac &t_end &t_end_frac &testResult &testTime

--If the particle system is not undefined

if pCont.GetParticleSystem() != undefined then

(

--Go through all particles

for i in 1 to count do

(

--If the i-th particle passed the Age Test

if (testResult[i]) then

(

--Set the current particle index

pCont.particleIndex = i

--Set the particle’s test status to true

pCont.particleTestStatus = true

--Set the particle’s Test time to the one returned by the

--Age Test

pCont.setParticleTestTimePrecise i t_start testTime[i]

)

else

(

--Set the current particle index

pCont.particleIndex = i

--Any particles inside a sphere with radius 20

--satisfy the test

if length(pCont.particlePosition) < 20 then

(

--Tell the particle it passed the test

pCont.particleTestStatus = true

--And set the test time to the current particle time

pCont.particleTestTime = pCont.particleTime

)

)

)

)

)

on Release pCont do

(

)

See also

Using MAXScript in Script Actions

Particle Flow Sample Scripts


Integrator ProceedSynch Example

Description:

The following examples show the difference in particle position in two PF_Sources using the Integrator Interface’s proceedSynch methods.

Can Be Used With:

These two sample scripts should be used inside of Script_Test actions.

  • Create a PF_Source in the viewport.

  • Open Particle View.

  • Add a Script_Test action to the end of Event01.

  • Clone the particle system but leave it at the exactly same position.

  • Change the color of the second particle system

  • Load the first sample in the Script_Test of the first particle system.

  • Load the second sample in the Script_Test of the second particle system.

Effect:

Allows the user to compare the effects of two ProceedSynch calls.

The resulting positions of all particles will be printed to the Listener.

EXAMPLE 1

--The ChannelsUsed handler defines the channels

--to be made available to the script.

--For the list of all channels, see

--Interface: MaxscriptParticleContainer

--The parameter pCont passed to the handler

--contains the Particle Container the script is applied to

on ChannelsUsed pCont do

(

pCont.useTime = true  --enable the Time channel

pCont.usePosition = true --enable the Position channel

)

--The Init hander is called on initialization.

--It is not used in this case.

on Init pCont do

(

)

--In the Proceed handler, we will call the ProceedSync method

--of the integrator.

on Proceed pCont do

(

end = pCont.GetTimeEnd() as float

_int = pCont.GetIntegrator()

count = pCont.NumParticles()

pCont_curr = pCont.GetParticleContainer()

for i in 1 to count do

(

pCont.particleIndex = i

if _int != undefined then

_int.proceedSync pCont_curr (end/160) 0.0 false #{}

format "p1.particle%=%\n" i (pCont.GetParticlePosition i)

)

)

--The Release handler is used to do cleanup work.

--Not used in this case.

on Release pCont do

(

)

EXAMPLE 2

--The ChannelsUsed handler defines the channels

--to be made available to the script.

--For the list of all channels, see

--Interface: MaxscriptParticleContainer

--The parameter pCont passed to the handler

--contains the Particle Container the script is applied to

on ChannelsUsed pCont do(

pCont.useTime = true  --enable the Time channel pCont.usePosition = true --enable the Position channel

)

--The Init hander is called on initialization.

--It is not used in this case.

on Init pCont do ( )on Proceed pCont do (

end = pCont.GetTimeEnd() as float_int = pCont.GetIntegrator()

count = pCont.NumParticles()pCont_curr = pCont.GetParticleContainer()

for i in 1 to count do

(

pCont.particleIndex = i

if _int != undefined then

_int.proceedSync pCont_curr (end/160) 0.5 false #{}

-- Array version to try out:

--_int.proceedASync pCont_curr #((end/160), (2*end/160), (3*end/160)) #(0.1, 0.2, 0.5) true #{1..3}

format "p2.particle%=%\n" i (pCont.GetParticlePosition i)

)

)

--The Release handler is used to do cleanup work.

--Not used in this case.

on Release pCont do

(

)

See also

Using MAXScript in Script Actions

Particle Flow Sample Scripts


Proceed With Integrate Script_Test Example

Description:

The following example shows the usage of the Inegrator interface in a Script_Test action.

Can Be Used With:

Should be used inside a Script_Test : Helper action.

Effect:

Shows the necessity of using the Integrator. Without the Integrator particles are stopped somewhere around the zero Z plane. The Integrator is able to stop particles exactly at the plane level (without any modification of the particle position).

In the example flow, the particles are born and accelerated. The Script_Test checks their position and if they pass the scripted test, they are moved to the second event which stops them.

EXAMPLE

--The ChannelsUsed handler defines the channels

--to be made available to the script.

--For the list of all channels, see

--Interface: MaxscriptParticleContainer

--The parameter pCont passed to the handler

--contains the Particle Container the script is applied to

on ChannelsUsed pCont do

(

pCont.useTime = true  --enable the Time channel

pCont.usePosition = true --enable the Position channel

pCont.useSpeed = true  --enable the Speed channel

)

--The Init hander is called on initialization.

--It is not used in this case.

on Init pCont do

(

)

on Proceed pCont do

(

--Get the End Time

end = pCont.GetTimeEnd() as float

--Get the interface to the Integrator

_int = pCont.GetIntegrator()

--Get the current particle count

count = pCont.NumParticles()

--Get the particle container

pCont_curr = pCont.GetParticleContainer()

--Initialize Arrays

timeToStopInt = #()

timeToStopFloat = #()

particlesToStop = #{}

--Initialize a flag to signal when

--there are particles to send to the integrator

hasParticlesToIntegrate = false

--Go through all particles

for i in 1 to count do

(

--Set the current particle index

pCont.particleIndex = i

--Calculate the remaining time to travel

timeForTravel = end - (pCont.particleTime as float)

-- format "time to travel % = %\n" i timeforTravel

--Get the current position and speed of the particle

curPos = pCont.particlePosition

curSpeed = pCont.particleSpeed

--Calculate the time to the XY plane. Because of the minus sign,

--when the Z coordinate is negative, the time will be positive

timeToPlane = -curPos.z / curSpeed.z

-- format "time to plane % = %\n" i timeToPlane

--Initialize a flag

stopThisParticle = 0

--Get the particle time in frames

curParticleTime = pCont.particleTime as time

--If the time to plane is positive or zero and shorter

--than the time to travel, then the particle has passed

--the plane already and has to be stopped!

if ((timeToPlane >= 0.0) and (timeToPlane <=timeForTravel)) do

(

--Set the Test status to true

pCont.particleTestStatus = true

--Set the precise particle time

pCont.setParticleTestTimePrecise i pCont.particleTime timeToPlane

--Append the particle index to the BitArray of particles

--to be stopped

append particlesToStop i

--Raise the flag to signal there is work for the integrator

hasParticlesToIntegrate = true

)

--Append the particle time frame and fraction to the two arrays

append timeToStopInt curParticleTime

append timeToStopFloat timeToPlane

)

--If the flag has been set

if hasParticlesToIntegrate then

(

--If the integrator can be accessed, send the particles to stop

--to the Integrator

if _int != undefined then

_int.proceedASync pCont_curr timeToStopInt timeToStopFloat true particlesToStop

)

-- format "time to stop Int= %\n" timeToStopInt

-- format "time to stop Float= %\n" timeToStopFloat

-- format "part to stop Index= %\n" particlesToStop

)

--The Release handler is used to do cleanup work.

--Not used in this case.

on Release pCont do

(

)

See also

Using MAXScript in Script Actions

Particle Flow Sample Scripts


VolumeDocking Sample Script

Description:

The following sample is based on Laszlo Sebo's VolumeDocking01.max scene and illustrates the following MAXScript operations with Particle Flow:

  • Common Action creation,

  • Appending Actions to an Event,

  • Inserting Actions to an Event,

  • Cloning Actions and Events

  • Wiring

  • Repositioning events in Particle View

Can Be Used With:

The script is self-contained and recreates all objects and Particle Flow Events and Actions on the fly:

Effect:

The script creates two geometry primitives and two PF_Sources with corresponding Actions and Events.

The geometry objects are used as volumes to be filled with particles. The initial positions of the particles are dumped to the particleVector channel. Using a Find_Target action, the particles find their way from the one volume to the other and switch places after swirling around.

EXAMPLE

-----------------

-- SCENE SETUP --

-----------------

-- Set scene animation range to 150 frames

animationRange = interval 0f 150f

-- Create Cylinder primitive

cyl=cylinder radius:44 height:44 heightsegs:5 sides:18 pos:[-60, -55, 0]

-- Create a Torus primitive

tor=torus radius1:55 radius2:20 smooth:2 pos:[135, 120, 0]

-- Create a Vortex Space Warp

vor=vortex timeOff:33 axialStrength:22 rotationStrength:33 iconSise:40 rotation:(quat -1 0 0 0) pos:[20,35,-5]

-- PF_Flow setup

pf=PF_Source Show_Logo:off Show_Emitter:off Quantity_Viewport:100 isSelected:true

-------------------------------------

-- Action List - Appending Example --

-------------------------------------

-- Disable automatic Event Encapsulation – begin editing:

ParticleFlow.BeginEdit()

a1 = RenderParticles() --define Action 1

pf.AppendAction a1 --append the Action to PF_Source

ParticleFlow.EndEdit() --End editing, enable Auto-Encapsulation

x=y=1 --Initialize two variables

--Get the location of the PF_Source in Particle View:

pf.GetPViewLocation &x &y

------------------------

-- Define First Event --

------------------------

ParticleFlow.BeginEdit() --start editing

-- Create a Birth Action for Event 1

ev1_a1 = Birth Emit_Start:0 Emit_Stop:0 Amount:300

-- Create a Position Object Action for Event 1

ev1_a2 = Position_Object Location:4 Emitter_Objects:#(tor) name: "PositionObjectFirst"

-- Comment the Position Object

pf.SetComments ev1_a2 "The operator defines the destination point inside the target volume"

-- Create a Script Operator

ev1_a3 = Script_Operator()

-- Set the script operator’s script code as string.

-- The code enables Position and Vector channels,

-- the writes the particle position in the Vector channel

-- for all new particles.

ev1_a3.proceed_script = "on ChannelsUsed pCont do

(

  pCont.usePosition = true

  pCont.useVector = true

)

on Init pCont do

(\n

)

on Proceed pCont do

(

 count = pCont.NumParticles()

 for i in 1 to count do

 (

  pCont.particleIndex = i

  if (pCont.particleNew) then

  ( pCont.particleVector = pCont.particlePosition)

 )

)

on Release pCont do

(\n

)"

-- Comment the action:

pf.SetComments ev1_a3 "The script is used to dump particle position to script vector channel"

-- Clone the Position_Object action from Event 1

-- The result of the cloning will be stored in the

-- by-reference variable dc.

maxOps.cloneNodes ev1_a2 newNodes:&dc

-- Get the clone (first element of array)

ev1_a4 = dc[1]

-- Set the name of the action

ev1_a4.name = "PositionObjectSecond"

-- Set the Cylinder as the Emitter

ev1_a4.Emitter_Objects = #(cyl)

-- Comment the action:

pf.SetComments ev1_a4 "The operator defines the initial position of a particle inside a start volume. The destination position is overwritten but the real value is kept in Script Vector channel"

-- Create some more actions needed to control the particle system

ev1_a5 = Speed Direction:3

ev1_a6 = Rotation()

ev1_a7 = ShapeStandard Shape:1

ev1_a8 = DisplayParticles Type:6 Color:(color 255 0 0)

-- Create a new empty event, then append all already created

-- actions to it:

ev1 = Event()

ev1.AppendAction ev1_a1

ev1.AppendAction ev1_a2

ev1.AppendAction ev1_a3

ev1.AppendAction ev1_a4

ev1.AppendAction ev1_a5

ev1.AppendAction ev1_a6

ev1.AppendAction ev1_a7

ev1.AppendAction ev1_a8

-- Disable editing, enable Auto-Event-Encapsulation

ParticleFlow.EndEdit()

-- Append the event as the Initial Action List to the PF_Source.

-- This will connect the Event to the PF_Source.

pf.appendInitialActionList ev1

-- Position the Event inside the Particle View

ev1.SetPViewLocation x (y+100)

-------------------------------------

-- Action List - Inserting Example --

-------------------------------------

--Begin Editing again

ParticleFlow.BeginEdit()

ev1_a9 = Spin SpinRate:200 Variation:55 --Create a Spin action

ev1_a10 = Force Influence:111 --Create a Force

--Set the Vortex as Space Warp in the Force

ev1_a10.Force_Space_Warps = #(vor)

--Create and setup a Find_Target action:

ev1_a11 = Find_Target()

ev1_a11.name = "FindTarget"

ev1_a11.Cruise_Speed_Variation = 1000

ev1_a11.Acceleration_Limit=3000

ev1_a11.Aim_Point_Type = 2

ev1_a11.Icon_Size = 0

-- Comment the action:

pf.SetComments ev1_a11 "The destination point is defined by script vector. The script vector value was defined by the Script Operator 01 from the Position Object 01"

-- Insert the new actions into the existing Event

ev1.InsertAction ev1_a9 8

ev1.InsertAction ev1_a10 9

ev1.InsertAction ev1_a11 10

ParticleFlow.EndEdit()

-- Create a Second Event and its actions:

ParticleFlow.BeginEdit()

ev2_a1 = Speed Speed:0

ev2 = Event()

ev2_a2 = DisplayParticles Type:6 Color:(color 0 255 0)

ev2.AppendAction ev2_a1

ev2.AppendAction ev2_a2

ParticleFlow.EndEdit()

--Connect the second Event to the Find_Target

ev1_a11.setNextActionList ev2 ev1_a11

--Reposition the even

ev2.SetPViewLocation x (y+400)

-- Make copy of PF_Source and exchange Emitter objects

-- for Position_Object operators:

-- Clone the PF_Source and the two Emitters,

-- store the clones in a by-reference variable

maxOps.CloneNodes #(pf, ev1, ev2) newNodes:&dc

-- Get the PF_Source and Emitter clones

pfc = dc[1]

ev1c = dc[2]

ev2c = dc[3]

-- Get the current position of the Particle View...

x=y=1

pfc.GetPViewLocation &x &y

-- Reposition the two Events

ev1c.SetPViewLocation x (y+100)

ev2c.SetPViewLocation x (y+400)

-- Copy the emitter objects from the original Position_Objects

if $PositionObjectFirst01 != undefined then (

 $PositionObjectFirst01.Emitter_Objects = ev1_a4.Emitter_Objects

)

if $PositionObjectSecond01 != undefined then (

 $PositionObjectSecond01.Emitter_Objects = ev1_a2.Emitter_Objects

)

-- Bind the Find_Target Test output to the clone of the Second Event

if $FindTarget01 != undefined then (

 $FindTarget01.setNextActionList ev2c $FindTarget01

)

-- Switch to Modify Tab

max modify mode

-- Open Particle View to see what happened...

ParticleFlow.OpenParticleView()

See also

particleFlow Global Interface

Particle Flow Sample Scripts

Particle Flow Classes


ProBoolean Extension

The ProBoolean Extension to 3ds Max 8 has been integrated in 3ds Max 9 and higher and has been completely exposed to MAXScript.

It consists of two compound objects - the ProBoolean Compound object which implements boolean operations like Union, Subtraction and Intersection of multiple operands, and the ProCutter Compound object used to cut "stock" objects with a "cutter" object.

These compound objects are exposed to MAXScript via the following Interfaces:

Interface: PolyBoolean

Interface: ProCutter


Interface: PolyBoolean

The PolyBoolean Interface is exposed by the ProBoolean class and provides methods to create and manage ProBoolean Compound Objects. Available in 3ds Max 9 and higher.

To access the methods listed below, you can use

ProBoolean.PolyBoolean.methodName()

or simply

ProBoolean.methodName()

Methods:

<void>CreateBooleanObjects <node>boolnode <&node array>nodes <integer>op <integer>addMethod <integer>matMethod

nodes is In and Out parameter

Creates a new ProBoolean object with two or more operands using the first argument as operand A and the array of nodes passed as second argument as multiple operands B.

The third argument is an integer controlling the operation to be performed and corresponding to the radio button state in the UI. Possible values are:

0 - Union

1 - Intersection

2 - Subtraction

3 - Merge

The fourth argument is an integer defining the method to add operands B, corresponding to the radio button state in the UI. Possible values are:

0 - Reference

1 - Copy

2 - Move

3 - Instance

The fifth argument is an integer controlling the material mdethod and corresponding to the radio button state in the UI. Possible values are:

0 - Apply Operand Method

1 - Retain Original Material

<void>CreateBooleanObject <node>boolnode <node>node <integer>op <integer>addMethod <integer>matMethod

Creates a new ProBoolean object with two operands using the first argument as operand A the second argument as operand B.

The third argument is an integer controlling the operation to be performed and corresponding to the radio button state in the UI. Possible values are:

0 - Union

1 - Intersection

2 - Subtraction

3 - Merge

The fourth argument is an integer defining the method to add operands B, corresponding to the radio button state in the UI. Possible values are:

0 - Reference

1 - Copy

2 - Move

3 - Instance

The fifth argument is an integer controlling the material mdethod and corresponding to the radio button state in the UI. Possible values are:

0 - Apply Operand Method

1 - Retain Original Material

<void>SetOperandA <node>boolnode

Creates a new ProBoolean object with one operand using the argument as operand A. This method can be used to start the creation of a ProBoolean compound object and then switch settings and add operand B using the methods described below.

<void>SetOperandB <node>boolnode <node>node <integer>addMethod <integer>matMethod

Adds operand B to the ProBoolean compound object. This is equivalent to using the Start Picking button in the UI to add more operands.

<boolean>GetOperandSel <node>node <integer>sel

Returns true if the indexed operand is selected in the UI, false otherwise.

<void>SetOperandSel <node>node <integer>sel <boolean>flag

Sets the selected state of the indexed operand in the given ProBoolean compound object to the specified boolean value.

<integer>GetBoolOp <node>node

Returns the current boolean operation set in the ProBoolean compound object.

<void>SetBoolOp <node>node <integer>op

Sets the current boolean operation in the ProBoolean compound object to the given value corresponding to the 0-based radio button state. Possible values are:

0 - Union

1 - Intersection

2 - Subtraction

3 - Merge

<integer>GetBoolCutType <node>node

Returns the boolean cut type.

<void>SetBoolCutType <node>node <integer>type

Sets the boolean cut type.

<boolean>GetDisplayResult <node>node

Returns the display result mode. When true, the result will be displayed. When false, the Operands will be displayed.

<void>SetDisplayResult <node>node <boolean>flag

Sets the display result mode. When true, the result will be displayed. When false, the Operands will be displayed.

<boolean>GetShowHiddenOps <node>node

Returns the state of the Show Hidden Operands option.

<void>SetShowHiddenOps <node>node <boolean>flag

Sets the state of the Show Hidden Operands option to the specified value.

<integer>GetUpdateMode <node>node

Returns the update mode. Possible values are:

0 - Always

1 - When Selected

2 - When Rendering

3 - Manually

<void>SetUpdateMode <node>node <integer>mode

Sets the update mode. Possible values are:

0 - Always

1 - When Selected

2 - When Rendering

3 - Manually

<boolean>GetOptimize <node>node

Returns the state of the Optimize option.

<void>SetOptimize <node>node <boolean>flag

Sets the state of the Optimize option to the specified value.

<boolean>GetCookieCut <node>node

Returns true if Cookie cut is enabled, false otherwise.

<void>SetCookieCut <node>node <boolean>flag

Sets the Cookie cut option to the specified state.

<boolean>GetImprint <node>node

Returns true if Imprint option is enabled, false otherwise.

<void>SetImprint <node>node <boolean>flag

Sets the Imprint option to the specified state.

<float>GetDecimationPercent <node>node

Returns the decimation percentage.

<void>SetDecimationPercent <node>boolnode <float>percent

percent Validated by Range: 0 to 1120403456

Sets the decimation percentage.

<boolean>GetMakeQuad <node>node

Returns true if the Make Quadrilaterals option is enabled, false otherwise.

<void>SetMakeQuad <node>boolnode <boolean>flag

Sets the Make Quadrilaterals option to the specified state.

<float>GetQuadSizePercent <node>node

Returns the Quad Size percentage.

<void>SetQuadSizePercent <node>boolnode <float>percent

percent Validated by Range: 0 to 1120403456

Sets the Quad Size percentage.

<integer>GetPlanarEdgeRemoval <node>node

Returns the Planar Edge Removal mode. Possible values are:

0 - Remove All

1 - Remove Only Invisible

2 - No Edge Removal

<void>SetPlanarEdgeRemoval <node>node <integer>mode

Sets the Planar Edge Removal mode. Possible values are:

0 - Remove All

1 - Remove Only Invisible

2 - No Edge Removal

EXAMPLE 1

--Creating a match using two consecutive boolean operations between

--a box, a cone and a sphere:

theBox = box height:100 width:10 length:10 --create a box

theCone = cone radius1:4 radius2:15 height:110 --create a cone

theSphere = sphere radius:6 --create a sphere

xf = xform() --create an XForm modifier

addModifier theSphere xf --add the XForm to the sphere

xf.gizmo.scale = [1,1,2] --scale the sphere along Z

--create an intersection of the box as operand A and the cone as operand B:

ProBoolean.createBooleanObject theBox theCone 1 0 0

--assign materials to the box and to the sphere:

theBox.material = standard diffuse:(color 255 200 100)

theSphere.material = standard diffuse:brown

ProBoolean.SetBoolOp theBox 0 --set the boolean operation to union

ProBoolean.setOperandB theBox theSphere 0 0 --add the sphere as new operand B

EXAMPLE 2

--Creating a Pencil using multiple boolean subtractions

--of a box, two cones and a cylinder:

--Step 1: create a box and two cones, assign materials:

theBox = box height:50 width:50 length:50 pos:[0,0,-2]

theCone1 = cone radius1:3 radius2:20 height:80 heightsegs:1 pos:[0,0,15]

theCone2 = cone radius1:0 radius2:15 height:80 heightsegs:1

theCone1.material = standard diffuse:(color 255 220 200)

theCone2.material = standard diffuse:black

--Step 2: Subtract both cones from the box

ProBoolean.createBooleanObjects theBox #(theCone2,theCone1) 2 0 0

--Step 3: Create a 6-sided cylinder and assign a material

theCyl = cylinder radius:10 sides:6 height:150 smooth:false pos:[0,0,1]

theCyl.material = standard diffuse:(color 255 200 100)

--Step 4: "sharpen" the cylinder using the box with the conical hole

ProBoolean.createBooleanObject theCyl theBox 2 0 0

See also

ProBoolean Extension


Interface: ProCutter

The ProCutter Compound Object is part of the ProBoolean Extension which is integral part of 3ds Max 9 and higher. It can be used to cut one or more stock objects using a cutter object:

Methods:

ProCutter.CreateCutter #( <object_1> { , <objectr_2> } ) <addMethod> <stockOutsideCutter> <stockInsideCutter> <cutterOutsideStock> <autoExtractMesh> <explodeByElements>

Creates a ProCutter object using node <operand_1> and multiple nodes
<operand_2>, all stored in an array.

#( <object_1> { , <object_2> } ) - Specifies the objects used to build the Cutter. Note that the cutter will take over the node and name from <object_1>. The object of the first node will become the first cutter sub-object.

<addMethod> specifies how the <operand_2> node(s) will be used. Possible values are: 1 - instance, operand is an instance of the original node

2 - reference, operand is a reference to original node

3 - copy, operand is a copy of original node

4 - move, original node should be deleted

One of the following three options must be set to true:

<stockOutsideCutter> specifies what to do with the portions of the Stock or Stocks outside the Cutter.

True - keep Stock outside the Cutter

False - remove Stock outside the Cutter

<stockInsideCutter> specifies what to do with the portions of the Stock or Stocks inside the Cutter.

True - keep Stock inside the Cutter

False - remove Stock inside the Cutter

<cutterOutsideStock> specifies what to do with the portions of the Cutter outside of the Stock or Stocks.

True - keep Cutter outside of the Stock(s)

False - remove Cutter outside of the Stock(s)

<autoExtractMesh> specifies whether the result of the operation should be maintained in the Cutter compound object or extracted into separate mesh.

True - don't modify the cutter object, just cut the stock mesh and extract it into a new object. Note that once the operation is done, the result is an editable mesh with no sub-objects. This flag is useful if you want to use the cutter like a cookie cutter where you reuse the cutter over and over to make holes in an object.

False - maintain all objects in the Cutter compound object. Once the operation is performed the result is a procedural Cutter object with both cutters and stocks as sub-objects that can be edited.

<explodeByElements> specifies whether mesh elements should be separated into individual meshes.

True - creates a separate mesh for each element. It is a good way to break apart an object into smaller volumes by setting this flag to true while <autoExtractMesh> along with <stockOutsideCutter> and <stockInsideCutter> are also set to true.

False - create a single mesh with a mesh element for each separate volume.

ProCutter.AddStocks <cutter_object> #( <stock_1> { , <stock_2> } ) <addMethod> <matMethod>

Adds one or more stock objects to an existing ProCutter compound object.

<cutter_object> is the original ProCutter node created using ProCutter.CreateCutter()

#( <stock_2> { , <stock_2> } ) - specifies one or more stock nodes in an array of nodes. Note that even if you have only one stock object, you need to use an array, for example #(stockb).

<mat_method> specifies how the materials of the two operands should be handled. Possible values are:

1 - applies operand material

2 - retains original material

ProCutter.getOperandSel <bool_obj> <integer>

Gets the index of the operand currently selected in the operands list.

ProCutter.setOperandSel <bool_obj> <integer> <boolean>

Sets the index of the operand to be selected in the operands list.

ProCutter.getDisplayResult <bool_obj>

ProCutter.setDisplayResult <bool_obj> <boolean>

These methods get and set whether Results or Operands are displayed. If true, Result is displayed. If false, Operands are displayed.

ProCutter.getShowHiddenOps <bool_obj>

ProCutter.setShowHiddenOps <bool_obj> <boolean>

these methods get and set whether Results + Hidden Operands are
displayed. If true, Results + Hidden Operands are displayed. If false,
the Results or Operands as specified using ProCutter.SetDisplayResult()
are displayed.

ProCutter.getUpdateMode <bool_obj>

ProCutter.setUpdateMode <bool_obj> <integer>

These methods get and set the Update mode as follows:

0 - Always

1 - When Selected

2 - When Rendering

3 - Manually

ProCutter.getDecimationPercent <bool_obj>

ProCutter.setDecimationPercent <bool_obj> <float>

These methods get and set the decimation percentage that determines the percentage of edges that will be removed from the total set of polygons on this Boolean.

ProCutter.getMakeQuad <bool_obj>

ProCutter.setMakeQuad <bool_obj> <boolean>

These methods get and set whether the operation will change the tessellation of the Boolean from triangles to quadrilaterals

ProCutter.getQuadSizePercent <bool_obj>

ProCutter.setQuadSizePercent <bool_obj> <float>

These methods get and set the percentage of the overall length of the quadrilaterals.

ProCutter.getPlanarEdgeRemoval<bool_obj>

ProCutter.setPlanarEdgeRemoval <bool_obj> <integer>

These methods determine how the polygons on planar faces will be handled:

1 - Removes all extra co-planar edges on a face

2 - Removes only invisible edges on each face

3 - No edge removal

Scripting ProCutter Operations

The ProCutter is a two stage operation for scripting. First you create the cutter then you add stocks to the existing cutter.

EXAMPLE 1

Create two boxes to be used in cutter and one box for stock. The resulting cutter object will contain 3 operands.

a = box length:10 height:10 width:10

b = box length:4 height:4 width:15

c = box length:13 height:15 width:10

ProCutter.CreateCutter #(a,b) 1 True False False False False

ProCutter.AddStocks a #(c) 1 1

EXAMPLE 2

This is the sort of set up to use when you want to break an object apart into separate little volumes.

--- Use cutter to break apart volumes of stock

--- into separate little volumes that are extracted

--- into separate meshes.  This is what you might do

--- if you want an object to "explode" into smaller

--- pieces.  Note that after the operation the original

--- cutter object stays around and can be used again.

a = box length:10 height:10 width:10

b = box length:4 height:4 width:15

c = box length:13 height:15 width:10

ProCutter.CreateCutter #(a,b) 1 True True False True True

ProCutter.AddStocks a #(c) 1 1

See also

ProBoolean Extension


MAXScript Extensions for Reactor

The reactorInterface provides access to the Reactor utility parameters and controls in 3ds Max 6 and higher:

Interface: reactorInterface

The following additional Interfaces and ReferenceTarget objects are exposed by Reactor:

Interface: rigidBodyInterface

Interface: primitiveInterface

Collision_Info : ReferenceTarget

The following Reactor Helpers are creatable and accessible through MAXScript:

RBCollection : Helper

CSolver : Helper

Point_Point : Helper

Point_Path : Helper

Hinge : Helper

Ragdoll : Helper

Carwheel : Helper

Prismatic : Helper

L_Dashpot : Helper

A_Dashpot : Helper

CLCollection : Helper

DMCollection : Helper

RPCollection : Helper

SBCollection : Helper

Fracture : Helper

Motorhelper : Helper

Planehelper : Helper

Springhelper : Helper

Toy_Car : Helper

Windhelper : Helper

The following Reactor Spacewarps are creatable and accessible through MAXScript:

WaterSpaceWarp : SpacewarpObject

The following Reactor Modifiers are creatable and accessible through MAXScript:

reactor_Cloth : Modifier

reactor_Rope : Modifier

reactor_SoftBody : Modifier


Interface: reactorInterface

The reactorInterface is exposed by the Reactor Utility. To access the properties and methods described below, you can use reactor.property.

You do not have to explicitly state the interface like reactor.reactorInterface.property - MAXScript will scan the utilityPlugin and its interfaces and locate the property automatically.

Interface: reactorInterface

Properties:

.gravity : point3 by value : Read|Write

Get/set the Gravity vector

.collisionTolerance : float : Read|Write

Get/set the Collision Tolerance value

.worldScale : float : Read|Write

Get/set the World Scale value

.useDragAction : boolean : Read|Write

Controls the state of the "Add Drag Action" checkbox in the "World" rollout.

.linearDrag : float : Read|Write

Get/set the Linear Drag value. Used when .useDragAction is set to True.

.angularDrag : float : Read|Write

Get/set the Angular Drag value. Used when .useDragAction is set to True.

.simulateFriction : boolean : Read|Write

When set to True, Reactor will simulate friction.

NOTE:

The value is the inverse of the "Do Not Simulate Friction" checkbox in the "World" rollout. When .simulateFriction is set to False, the checkbox will be checked and vice-versa.

.addDeactivator : boolean : Read|Write

Controls the state of the "Add Deactivator" checkbox in the "World" rollout.

.deactivatorShortFrequency : float : Read|Write

Get/set the Short Frequency value used by the Deactivator.

.deactivatorLongFrequency : float : Read|Write

Get/set the Long Frequency value used by the Deactivator.

.analyzeBeforeSimulation : boolean : Read|Write

Controls the state of the "Analyze Before Simulation" checkbox in the "Utils" rollout. When set to True, the Scene will be analyzed before performing the Simulation.

.backupBeforeSimulation : boolean : Read|Write

Controls the state of the "Save Before Simulation" checkbox in the "Utils" rollout. When set to True, the Scene will be saved before performing the Simulation.

.reductionThreshold : float : Read|Write

Get/set the Reduction Threshold value of the Simulation. Corresponds to the spinner value located in the "Key Management" group of the "Utils" rollout.

.reduceAfterSimulation : boolean : Read|Write

Controls the state of the "Reduce After Simulation" checkbox located in the "Key Management" group of the "Utils" rollout. When set to True, the Keyframes will be reduced after the Simulation has been performed.

.startFrame : integer : Read|Write

Get/set the Start Frame value of the Simulation. Corresponds to the spinner value located in the "Timing" group of the "Preview & Animation" rollout.

.endFrame : integer : Read|Write

Get/set the End Frame value of the Simulation. Corresponds to the spinner value located in the "Timing" group of the "Preview & Animation" rollout.

.substeps : integer : Read|Write

Get/set the Substeps per Key value. Corresponds to the spinner value located in the "Timing" group of the "Preview & Animation" rollout.

.framesPerKeyframe : integer : Read|Write

Get/set the Frames per Key value. Corresponds to the spinner value located in the "Timing" group of the "Preview & Animation" rollout.

.timeScale : float : Read|Write

Get/set the Time Scale value. Corresponds to the spinner value located in the "Timing" group of the "Preview & Animation" rollout.

.updateViewports : boolean : Read|Write

Controls the state of the "Update Viewports" checkbox in the "Preview & Animation" rollout. When set to True, the Keyframes will be reduced after the Simulation has been performed.

.camera : node : Read|Write

Get/set the Camera node used for display. Corresponds to the pickbutton located in the "Display" rollout.

.useDefaultCameraClippingPlanes : boolean : Read|Write

Controls the state of the "Use Defaults" checkbox in the "Camera Clipping Planes" group in the "Display" rollout. When set to True, the Clipping Planes of the selected Camera will be used. When set to False, the Clipping values defined by .nearCameraClippingPlane and .farCameraClippingPlane will be used istead.

.nearCameraClippingPlane : float : Read|Write

Get/set the Near Plane value. Corresponds to the spinner value located in the "Camera Clipping Planes" group of the "Display" rollout.

.farCameraClippingPlane : float : Read|Write

Get/set the Far Plane value. Corresponds to the spinner value located in the "Camera Clipping Planes" group of the "Display" rollout.

.mouseSpringRestitution : float : Read|Write

Get/set the Mouse Spring Restitution value. Corresponds to the "Stiffness" spinner value located in the "Mouse Spring" group of the "Display" rollout.

.mouseSpringRestLength : float : Read|Write

Get/set the Mouse Spring Restitution Length value. Corresponds to the "Rest Length" spinner value located in the "Mouse Spring" group of the "Display" rollout.

.mouseSpringDamping : float : Read|Write

Get/set the Mouse Spring Damping value. Corresponds to the "Damping" spinner value located in the "Mouse Spring" group of the "Display" rollout.

.textureQuality : integer : Read|Write

Get/set the Texture Quality. Corresponds to the radio button state in the "Texture Quality (pixels)" group of the "Display" rollout.

Possible values are

0 – 64x64 pixels

1 – 128x128 pixels

2 – 256x256 pixels

3 – 512x512 pixels

.lights : node by value array : Read|Write

Get/set the array of lights to be used by the interactive display. Corresponds to the list in the "Display" rollout.

.displayUsingDirectX : boolean : Read|Write

Controls the state of the "DirectX" checkbox in the "Display" rollout.

.storeCollisionInfoMethod : integer : Read|Write

Get/set the method for storing the Collision Information. Corresponds to radio buttons located in the "Store Collisions" group in the "Collisions" rollout.

Possible values are:

0 – Do not store

1 – Store once

2 – Always store

.filterBodiesForCollisionInfo : boolean : Read|Write

When set to true, collision info will be filtered. (See getFilteredCollisionPairsLists method below for access)

.filterVelocitiesForCollisionInfo : boolean : Read|Write

When set to true, collision velocity info will be filtered.

.minFilterVelocityForCollisionInfo : float : Read|Write

Get/set the min.velocity threshold for a collision info to be considered for filtering.

.createListLayer : boolean : Read|Write

Get/set the state of the "Create List/Layer" checkbox in the "Preview & Animation" rollout.

Methods:

<void>PreviewAnimation()

Presses the Preview in Window button located in the "Preview & Animation" rollout.

<void>AnalyzeWorld()

Presses the "Analyze World" button located in the "Utils" rollout, "World Analyzis" group

<void>ShowAbout()

Presses the "About " button located in the "About" rollout (? Icon)

<void>TestSelectedConvexity()

Presses the "Test Convexity" button located in the "Utils" rollout, "Selection group".

<boolean>GetIsConvex <node>bodyNode <time>time

Returns true if the specified node is convex at the specified time, false otherwise.

<void>CreateAnimation <boolean>quietCreate

Presses the "Create Animation" button located in the " Preview & Animation" rollout.

<void>ReduceKeysForSelectedObjects()

Presses the "Reduce Keys" button located in the "Utils" rollout, "Selection group".

<void>DeleteKeysForSelectedObjects()

Presses the "Delete Keys" button located in the "Utils" rollout, "Selection group".

<void>ReduceKeysForAllObjects()

Presses the "Reduce Now" button located in the "Utils" rollout, "Key Management".

<void>DeleteKeysForAllObjects()

Presses the "Delete All" button located in the "Utils" rollout, " Key Management".

<IObject>getRigidObject <node>bodyNode

Returns a rigidBodyInterface MixinInterface for the specified node.

The following methods are related to collision information access.

<integer>getNumStoredCollisions()

Returns the number of stored collisions

<maxObject by value array>getStoredCollisions()

Returns all stored collisions as an array of Collision_Info : ReferenceTarget objects.

<void>setStoredCollisions <maxObject by value array>newCollisions

Set the stored collisions to the specified array.

<void>addCollisions <maxObject by value array>newCollisions

Add the specified array to the stored collisions.

<void>clearStoredCollisions()

Clear the stored collisions.

<boolean>saveStoredCollisions <string>path <string>filename

Save the stored collisions to the specified path and file name. Returns true on success.

<void>getFilteredCollisionPairsLists <&node array>firstObjects <&node array>secondObjects

firstObjects is In and Out parameter

secondObjects is In and Out parameter

Returns filtered collision pairs into the two by-reference arrays. Elements from both arrays with the same index correspond to a collision pair.

<void>setFilteredCollisionPairsLists <&node array>firstObjects <&node array>secondObjects

firstObjects is In and Out parameter

secondObjects is In and Out parameter

Sets the filtered collision pairs lists to the two by-reference arrays. Elements from both arrays with the same index correspond to a collision pair.

<void>getDisabledCollisionPairsLists <&node array>firstObjects <&node array>secondObjects

firstObjects is In and Out parameter

secondObjects is In and Out parameter

Returns disabled collision pairs lists into the two by-reference arrays. Elements from both arrays with the same index correspond to a collision pair.

<void>setDisabledCollisionPairsLists <&node array>firstObjects <&node array>secondObjects

firstObjects is In and Out parameter

secondObjects is In and Out parameter

Sets the disabled collision pairs lists to the two by-reference arrays. Elements from both arrays with the same index correspond to a collision pair.

<void>enableCollisions <node>objectA <node>objectB

Enable collisions between the two specified objects.

<void>disableCollisions <node>objectA <node>objectB

Disable collisions between the two specified objects.

See also

MAXScript Extensions for Reactor

Interface: rigidBodyInterface

Interface: primitiveInterface

Collision_Info : ReferenceTarget


Collision_Info : ReferenceTarget

You can access all the collisions stored by Reactor - see Interface: reactorInterface for details on collision-related methods .

The following MAXScript code returns a list of Collision_Info ReferenceTarget objects, which in turn contain information about the single collisions:

EXAMPLE:

cols = reactor.getStoredCollisions()

#(ReferenceTarget:Collision_Info, ReferenceTarget:Collision_Info, ....)

firstCol = cols[1]

You can access the collision information via the following interface:

Collision_Info Interface:

Interface: collisionInterface

Properties:

.time : time : Read|Write

Get/Set the time of the collision.

.nodeA : node : Read|Write

Get/Set the first collision node.

.nodeB : node : Read|Write

Get/Set the second collision node.

.nameA : string : Read

Get/Set the name of the first collision node.

.nameB : string : Read

Get/Set the name of the second collision node.

.pointInWorldSpace : point3 by value : Read|Write

Get/Set the world space collision point.

.normalBToAInWorldSpace : point3 by value : Read|Write

Get/Set the world space normal vector from the second to the first node.

.normalRelativeVelocity : float : Read|Write

Get/Set the relative velocity between the two collision nodes along the normal vector.

.phantom : enum : Read|Write

phantom enums: {#notPhantom|#entering|#leaving}

Get/Set the phantom property of the collision.

Obviously, since all properties are both read and write enabled, you can not only access the actual collision parameters, but set up your own collisions and write the information back to Reactor using the .setStoredCollisions method in the Interface: reactorInterface

See also the Reactor Online Help for additional information and examples of Stored Collision Info and MAXScript access.

See also

Interface: reactorInterface

MAXScript Extensions for Reactor


Interface: rigidBodyInterface

The rigidBodyInterface MixinInterface is returned by the reactorInterface.getRigidObject method and provides access to rigid body properties of objects participating in the Reactor simulation.

Interface: rigidBodyInterface

Properties:

.elasticity : float : Read|Write

Get/Set the elasticity of the rigid body.

.friction : float : Read|Write

Get/Set the friction of the rigid body.

.unyielding : boolean : Read|Write

When set to true, the rigid body will be unyielding.

.disableAllCollisions : boolean : Read|Write

When set to true, the rigid body will not calculate collisions.

.useDisplayProxy : boolean : Read|Write

When set to true, the rigid body will display the proxy node set using .displayProxyNode.

.displayProxyNode : node : Read|Write

Get/Set the Proxy Node.

.inactive : boolean : Read|Write

When set to true, the rigid body will be excluded from Reactor simulations.

Methods:

<integer>GetNumPrimitives()

Returns the number of Primitives.

<IObject>GetPrimitive <integer>primitiveIndex

Returns the specified Primitive's primitiveInterface MixinInterface.

<node>GetPrimitiveINode <integer>primitiveIndex

Returns the specified Primitive's node.

EXAMPLES:

resetMaxFile #noprompt --reset the scene

OK

t = Teapot() --create a teapot

$Teapot:Teapot01 @ [0.000000,0.000000,0.000000]

select t --select the teapot

OK

rctMakeRBCollection() --create a RigidBodyCollection with the Teapot

OK

a = $RBCollection01.getRigidObject 1 --get the Teapot's RigidBodyObject

<IObject:RigidBodyObject>

b = a.rigidBodyInterface --get the Teapot's RigidBodyInterface

<MixinInterface:rigidBodyInterface>

b.elasticity --get the elasticity value

0.3

b.friction --get the friction value

0.3

b.unyielding --get the unyielding state

false

b.disableAllCollisions --get the collision state

false

b.useDisplayProxy --get the display proxy state

false

b.useDisplayProxy = true --set the display proxy state to true

true

See also

Interface: reactorInterface

Interface: primitiveInterface

MAXScript Extensions for Reactor


Interface: primitiveInterface

The primitiveInterface is returned by the rigidBodyInterface.GetPrimitive method.

Interface: primitiveInterface

Properties:

.mass : float : Read|Write

Get/Set the mass of the primitive.

.simulationGeometry : integer : Read|Write

Get/Set the simulation geometry of the primitive. Possible values are:

0 - Use Bounding Box

1 - Use Bounding Sphere

2 - Use Mesh Convex Hull

3 - Use Proxy Convex Hull

.proxyGeometryNode : node : Read|Write

Get/Set the Proxy Geometry Node.

.phantom : boolean : Read|Write

Get/Set the phantom property of the primitive.

EXAMPLES:

resetMaxFile #noprompt --reset the scene

OK

t = Teapot() --create a teapot

$Teapot:Teapot01 @ [0.000000,0.000000,0.000000]

select t --select the teapot

OK

rctMakeRBCollection() --create a RigidBodyCollection with the Teapot

OK

a = $RBCollection01.getRigidObject 1 --get the Teapot's RigidBodyObject

<IObject:RigidBodyObject>

b = a.rigidBodyInterface --get the Teapot's RigidBodyInterface

<MixinInterface:rigidBodyInterface>

c = b.GetPrimitive 1 --get the Teapot's primitiveInterface

<IObject:RigidBodyObject>

c.mass --get the mass

0.0

c.mass = 1.0 --set the mass

1.0

c.simulationGeometry --get the simulation geometry mode

2

c.simulationGeometry = 0 --set the geometry to Bounding Box

0

See also

Interface: reactorInterface

Interface: rigidBodyInterface

MAXScript Extensions for Reactor


RBCollection : Helper

RBCollection - superclass: Helper; super-superclass:Node - classID: #(72697407, 2075537247)

Value > MAXWrapper > Node > Helper > reactor > RBCollection

Description:

The Rigid Body Collection is a helper object that acts as a container for rigid bodies. At a lower level, a collection also allows you to specify which mathematical method will be used for solving the rigid body behaviors for bodies in that collection.

Constructors:

RBCollection ...

rctRBCollection ...

Properties

.disabled : boolean

When set to True, the RBCollection will be disabled.

.odeSolver (ODE_Solver) : integer

Specifies the ODE Solver. Corresponds to the radio buttons in the Advanced rollout, "ODE Solver" group.

Possible values are:

0 - Euler (default)

1 - Runge-Kutta

Interfaces

Interface: rctRBCollectionInterface

Properties

.rigidBodies : node by value array : Read|Write

Get/Set the array of rigid body objects in the RBCollection.

EXAMPLE:

rbc = RBCollection() --create an RBCollection

$RBCollection:RBCollection01 @ [0.000000,0.000000,0.000000]

s = Sphere pos:[100,0,0] --create a Sphere

$Sphere:Sphere01 @ [100.000000,0.000000,0.000000]

b = Box pos:[200,0,0] --create a Box

$Box:Box01 @ [200.000000,0.000000,0.000000]

rbc.rigidBodies = #(s,b) --add both objects to the RBCollection

#($Sphere:Sphere01 @ [100.000000,0.000000,0.000000], $Box:Box01 @ [200.000000,0.000000,0.000000])

select rbc --select the RBCollection

OK

max modify mode --change to Modify tab - the objects are on the list!

OK

rbc.rigidBodies --get the content of the list

#($Sphere:Sphere01 @ [100.000000,0.000000,0.000000], $Box:Box01 @ [200.000000,0.000000,0.000000])

Methods

<boolean>AddRigidBody <node>bodyNode

Add an object to the Collection. Returns true on success.

<boolean>RemoveRigidBody <integer>bodyIndex

Remove the indexed object from the Collection. Returns true on success.

<boolean>RemoveRigidBodyByINode <node>bodyNode

Remove the specified object from the Collection. Returns true on success.

<integer>GetNumRigidBodies()

Returns the number of object in the Collection.

<IObject>getRigidObject <integer>bodyIndex

Should return the object specified by the supplied index.

NOTE:

This method is currently broken - always returns undefined.

An existing workaround is to set the properties of the RigidObject as values in the User Properties of the node, for example

setUserProp $ "Mass" 123.4 --sets the mass to 123.4

The following is a list of the User Properties assigned by reactor:

Allowed_Penetration = 0.000000

Disable_Collisions = 0

Display_Proxy = Sphere01

Ellasticity = 0.21 --note incorrect spelling, required to set Elasticity.

Friction = 0.5

Inactive = 0

Mass = 123.4

Phantom = 0

Proxy_Geometry = Sphere01

Quality_Type = 3

Shell_Radius = 0.050000

Simulation_Geometry = 3

Unyielding = 0

Use_Display_Proxy = 0

See also

MAXScript Extensions for Reactor


CSolver : Helper

CSolver - superclass: Helper; super-superclass:Node - classID: #(501294697, 1749682153)

Value > MAXWrapper > Node > Helper > reactor > CSolver

Description:

The Constraint Solver acts as a container for the cooperative constraints in a particular rigid body collection, and performs all the calculations necessary for the constraints to work.

Constructors:

CSolver...

RctConstraintSolver...

Properties:

.deactivationThreshold (Deactivation_Threshold) : float

Get/Set the deactivation threshold value.

.disabled : boolean

When set to True, the CSolver will be disabled.

Interfaces

Interface: rctConstraintSolverInterface

Properties

.constraintsTab : node by value array : Read|Write

Get/Set the array of constraints.

.rbCollection : node : Read|Write

Get/Set the Rigid Body Collection to constrain.

.isDisabled : boolean : Read|Write

Get/set the disabled state of the Constraint Solver.

.deactivationThreshold : float : Read|Write

Get/Set the deactivation threshold value.

Methods

<boolean>AddConstraint <node>newConstraint

Add a new object to the array of Constraints.

<boolean>RemoveConstraint <integer>markerIndex

Remove the indexed object from the array of Constraints.

<boolean>RemoveConstraintByINode <node>deletedConstraint

Remove the specified object from the array of Constraints.

<integer>GetNumConstraints()

Returns the number of objects in the array of Constraints.

<boolean>GetIsValidConstraintSolver()

Returns True if the CSover is a valid Constraint Solver.

See also

MAXScript Extensions for Reactor


Point_Point : Helper

Point_Point - superclass: Helper; super-superclass:Node - classID: #(1607230723, 1091132200)

Value > MAXWrapper > Node > Helper > reactor > Point_Point

Description:

A Point_Point constraint lets you attach two objects together, or an object to a point in world space. It forces its objects to try to share a common point in space. The objects can rotate freely relative to each other, but always have the attachment point in common. When you set up the constraint, the point is defined in the object space of each object involved. During the simulation the constraint tries to apply forces to the objects so that the two pivot points defined by the two objects match.

Constructors:

Point_Point...

rctPointToPoint...

Properties:

.childBody (Child_Body) : node

Get/Set the Child Body node.

.parentBody (Parent_Body) : node

Get/Set the Parent Body node.

.hasParent (Has_Parent) : boolean

When set to True, the Parent node will be used.

.xMin (Min_X_Angle) : float

.xMax (Max_X_Angle) : float

.yMin (Min_Y_Angle) : float

.yMax (Max_Y_Angle) : float

.zMin (Min_Z_Angle) : float

.zMax (Max_Z_Angle) : float

Get/Set the Minimum and Maximum Angle. Only used when .constraintType is set to 1 - Limited.

.displayXAngle (Display_X_Angle) : boolean

.displayYAngle (Display_Y_Angle) : boolean

.displayZAngle (Display_Z_Angle) : boolean

Get/Set the Angles Display checkboxes state. Only used when .constraintType is set to 1 - Limited.

.constraintType (Point_to_Point_Type) : integer

Get/Set the Constraint Type. Corresponds to the Constraint Type radio buttons in the UI. Possible values are:

0 - Standard (default)

1 - Limited

2 - Stiff Spring

.length (Stiff_spring_length) : float

Get/Set the Stiff Spring Length value. Only used when .constraintType is set to 2.

.iconSize (Icon_Size) : float

Get/Set the Icon Size. Corresponds to the "Size" value in the Display group in the UI.

.isBreakable (Is_Breakable) : boolean

Get/Set the state of the "Breakable" checkbox in the UI. When set to true, the constaint will break when the linear or angular strengths are exceeded.

.linearBreakingStrength (Linear_Strength) : float

Get/Set the linear breaking strength. Corresponds to the "Linear" spinner in the Breakable group of UI controls.

.angularBreakingStrength (Angular_Strength) : float

Get/Set the angular breaking strength. Corresponds to the "Angular" spinner in the Breakable group of UI controls.

.strength : float

.tau : float

These two properties govern the impulses applied to the constraint's bodies in order to maintain the constraint, and so how strongly the constraint works to restrict their movement.

.lockSpaces (Lock_Spaces) : boolean

Get/Set the state of the "Lock Relative Transform" checkbox in the UI.

Interfaces

Interface: rctPointToPointInterface

Properties:

.parentBody : node : Read|Write

Get/Set the Parent Body node.

.childBody : node : Read|Write

Get/Set the Child Body node.

.hasParent : boolean : Read|Write

When set to True, the Body B node will be used.

.parentTransform : matrix3 by value : Read|Write

Get/Set the Parent node's transformation matrix.

.childTransform : matrix3 by value : Read|Write

Get/Set the Child node's transformation matrix.

.lockSpaces : boolean : Read|Write

Controls the state of the "Lock Relative Transform" checkbox in the UI.

.strength : float : Read|Write

.tau : float : Read|Write

These two properties govern the impulses applied to the constraint's bodies in order to maintain the constraint, and so how strongly the constraint works to restrict their movement.

.isBreakable : boolean : Read|Write

When set to true, the constraint is breakable.

.linearBreakingStrength : float : Read|Write

Get/Set the linear breaking strength.

.angularBreakingStrength : float : Read|Write

Get/Set the angular breaking strength.

.displaySize : float : Read|Write

Get/Set the display size.

.constraintType : integer : Read|Write

Get/Set the constraint type. Possible values are:

0 - Standard

1 - Limited

2 - Stiff Spring

.xLimitMin : float : Read|Write

Get/Set the min. X limit.

.xLimitMax : float : Read|Write

Get/Set the max. X limit.

.yLimitMin : float : Read|Write

Get/Set the min. Y limit.

.yLimitMax : float : Read|Write

Get/Set the max. Y limit.

.zLimitMin : float : Read|Write

Get/Set the min. Z limit.

.zLimitMax : float : Read|Write

Get/Set the max. Z limit.

.displayXLimits : boolean : Read|Write

Controls the display of the X limit.

.displayYLimits : boolean : Read|Write

Controls the display of the Y limit.

.displayZLimits : boolean : Read|Write

Controls the display of the Z limit.

.stiffSpringLength : float : Read|Write

Get/Set the Stiff Spring length value when .constraintType is set to 2.

Methods:

<void>alignToParentBody()

Aligns the Constraint to the Parent Body.

<void>alignToChildBody()

Aligns the Constraint to the Child Body.

<void>alignToParentSpace()

Aligns the Constraint to parent space.

<void>alignToChildSpace()

Aligns the Constraint to child space.

<void>alignToEachBody()

Aligns the Constraint to both bodies.

<boolean>isValid()

Returns true if the Constraint is valid, false otherwise. A valid Constraint has the correct number of rigid bodies attached and is included in a valid constraint solver.

See also

MAXScript Extensions for Reactor


Point_Path : Helper

Point_Path - superclass: Helper; super-superclass:Node - classID: #(446890147, 36713040)

Value > MAXWrapper > Node > Helper > reactor > Point_Path

Description:

The Point_Path Constraint allows you to constrain two bodies so that the child is free to move along a specified path relative to the parent. Alternatively, you can create a single-bodied version of the constraint, where the constrained body can move along a path in world space. The child body's orientation is not restricted by the constraint.

Constructors:

Point_Path ...

rctPointToPath ...

Properties:

.childBody (Child_Body) : node

Get/Set the Child Body node.

.path : node

Get/Set the Path node.

.parentBody (Parent_Body) : node

Get/Set the Parent Body node.

.iconSize (Icon_Size) : float

Get/Set the Icon Size. Corresponds to the "Size" value in the Display group in the UI.

.hasParent (Has_Parent) : boolean

When set to True, the Parent node will be used.

.isBreakable (Is_Breakable) : boolean

Get/Set the state of the "Breakable" checkbox in the UI. When set to true, the constaint will break when the linear or angular strengths are exceeded.

.linearBreakingStrength (Linear_Strength) : float

Get/Set the linear breaking strength. Corresponds to the "Linear" spinner in the Breakable group of UI controls.

.angularBreakingStrength (Angular_Strength) : float

Get/Set the angular breaking strength. Corresponds to the "Angular" spinner in the Breakable group of UI controls.

.strength : float

.tau : float

These two properties govern the impulses applied to the constraint's bodies in order to maintain the constraint, and so how strongly the constraint works to restrict their movement.

.lockSpaces (Lock_Spaces) : boolean

Get/Set the state of the "Lock Relative Transform" checkbox in the UI.

Interfaces

Interface: rctPointToPathInterface

Properties:

.parentBody : node : Read|Write

Get/Set the Parent Body node.

.childBody : node : Read|Write

Get/Set the Child Body node.

.hasParent : boolean : Read|Write

When set to True, the Parent node will be used.

.parentTransform : matrix3 by value : Read|Write

.childTransform : matrix3 by value : Read|Write

.lockSpaces : boolean : Read|Write

Get/Set the state of the "Lock Relative Transform" checkbox in the UI.

.strength : float : Read|Write

.tau : float : Read|Write

These two properties govern the impulses applied to the constraint's bodies in order to maintain the constraint, and so how strongly the constraint works to restrict their movement.

.isBreakable : boolean : Read|Write

Get/Set the state of the "Breakable" checkbox in the UI. When set to true, the constaint will break when the linear or angular strengths are exceeded.

.linearBreakingStrength : float : Read|Write

Get/Set the linear breaking strength. Corresponds to the "Linear" spinner in the Breakable group of UI controls.

.angularBreakingStrength : float : Read|Write

Get/Set the angular breaking strength. Corresponds to the "Angular" spinner in the Breakable group of UI controls.

.displaySize : float : Read|Write

Get/Set the Icon Size. Corresponds to the "Size" value in the Display group in the UI.

.path : node : Read|Write

Get/Set the Path node.

Methods:

<void>alignToParentBody()

Pressed the "Parent Body" button in the "Align Spaces To" group of UI controls.

<void>alignToChildBody()

Pressed the "Child Body" button in the "Align Spaces To" group of UI controls.

<void>alignToParentSpace()

Pressed the "Parent Space" button in the "Align Spaces To" group of UI controls.

<void>alignToChildSpace()

Pressed the "Child Space" button in the "Align Spaces To" group of UI controls.

<void>alignToEachBody()

Pressed both "Parent Body" and "Child Body" button in the "Align Spaces To" group of UI controls.

<boolean>getIsValid()

Returns true if the Constraint is valid, false otherwise. A valid Constraint has the correct number of rigid bodies attached and is included in a valid constraint solver.

See also

MAXScript Extensions for Reactor


Hinge : Helper

Hinge - superclass: Helper; super-superclass:Node - classID: #(1967289542, 1265062123)

Value > MAXWrapper > Node > Helper > reactor > Hinge

Description:

The Hinge constraint allows you to simulate a hinge-like action between two bodies. It lets you specify an axis in body space for each body which will attempt to match position and direction, thereby creating an axis around which the two bodies can rotate. Alternatively, you can hinge a single body to an axis in world space. Rotation can also be limited relative to the hinge axis.

Constructors:

Hinge ...

rctHinge ...

Properties:

.childBody (Child_Body) : node

Get/Set the Child Body.

.parentBody (Parent_Body) : node

Get/Set the Parent Body.

.hasParentBody (Has_Parent) : boolean

When set to true, the Parent Body will be used in the simulation.

.isLimited (Is_Hinge_Limited) : boolean

When set to true, the simulation will respect the limits.

.minLimitAngle (Hinge_Minimum_Limit_Angle) : float

Get/Set the min. limit angle to be used when .isLimited is set to true.

.maxLimitAngle (Hinge_Maximum_Limit_Angle) : float

Get/Set the max. limit angle to be used when .isLimited is set to true.

.limitFriction (Hinge_Limit_Friction) : float

Get/Set the friction applied to the objects as they try to rotate about the hinge axis. It is only applied to limited hinges.

.iconSize (Icon_Size) : float

Get/Set the icon size. Corresponds to the "Display Limits" > "Size" value in the UI.

.isBreakable (Is_Breakable) : boolean

When set to true, the Hinge will be breakable. If its breakable limits are exceeded during simulation it will cease to exert impulses on the attached objects.

.linearBreakingStrength (Linear_Strength) : float

The linear breaking limit value used to when .isBreakable is set to true.

.angularBreakingStrength (Angular_Strength) : float

The angular breaking limit value used to when .isBreakable is set to true.

.strength : float

.tau : float

These two properties govern the impulses applied to the constraint's bodies in order to maintain the constraint, and so how strongly the constraint works to restrict their movement.

.lockSpaces (Lock_Spaces) : boolean

When set to true, the relative transform between the child and parent constraint spaces is locked - if you move the child space in the viewport, the parent space will move with it, and vice-versa.

Interfaces

Interface: rctHingeInterface

Properties:

.parentBody : node : Read|Write

Get/Set the Parent Body.

.childBody : node : Read|Write

Get/Set the Child Body.

.hasParent : boolean : Read|Write

When set to true, the Parent Body will be used in the simulation.

.parentTransform : matrix3 by value : Read|Write

Get/Set the Parent Body's transformation matrix.

.childTransform : matrix3 by value : Read|Write

Get/Set the Child Body's transformation matrix.

.lockSpaces : boolean : Read|Write

When set to true, the relative transform between the child and parent constraint spaces is locked - if you move the child space in the viewport, the parent space will move with it, and vice-versa.

.strength : float : Read|Write

.tau : float : Read|Write

These two properties govern the impulses applied to the constraint's bodies in order to maintain the constraint, and so how strongly the constraint works to restrict their movement.

.isBreakable : boolean : Read|Write

When set to true, the Hinge will be breakable. If its breakable limits are exceeded during simulation it will cease to exert impulses on the attached objects.

.linearBreakingStrength : float : Read|Write

The linear breaking limit value used to when .isBreakable is set to true.

.angularBreakingStrength : float : Read|Write

The angular breaking limit value used to when .isBreakable is set to true.

.displaySize : float : Read|Write

Get/Set the icon size. Corresponds to the "Display Limits" > "Size" value in the UI.

.isLimited : boolean : Read|Write

When set to true, the simulation will respect the limits.

.limitFriction : float : Read|Write

Get/Set the friction applied to the objects as they try to rotate about the hinge axis. It is only applied to limited hinges.

.limitMinAngle : float : Read|Write

Get/Set the min. limit angle to be used when .isLimited is set to true.

.limitMaxAngle : float : Read|Write

Get/Set the max. limit angle to be used when .isLimited is set to true.

Methods:

<void>alignToParentBody()

Aligns the Constraint to the Parent Body.

<void>alignToChildBody()

Aligns the Constraint to the Child Body.

<void>alignToParentSpace()

Aligns the Constraint to parent space.

<void>alignToChildSpace()

Aligns the Constraint to child space.

<void>alignToEachBody()

Aligns the Constraint to both bodies.

<boolean>isValid()

Returns true if the Hinge is valid, false otherwise. A valid Hinge has the correct number of rigid bodies attached and is included in a valid constraint solver.

See also

MAXScript Extensions for Reactor


Ragdoll : Helper

Ragdoll - superclass: Helper; super-superclass:Node - classID: #(1993110585, 1724678066)

Value > MAXWrapper > Node > Helper > reactor > Ragdoll

Description:

Ragdoll constraints allow you to realistically simulate the behavior of body joints, such as hips, shoulders, and knees. Once you have decided what degree of movement a joint should have, you can model it by specifying limiting values for the ragdoll constraint.

Constructors:

Ragdoll ...

rctRagdoll ...

Properties

.parentBody (Parent_Body) : node

Get/Set the Parent Body.

.hasParent (Has_Parent) : boolean

When set to true, the Parent Body will be used in the simulation.

.childBody (Child_Body) : node

Get/Set the Child Body.

.twistMin (Twist_Axis_Range_Min) : float

Get/Set the minimum rotation about the twist axis the constraint will allow between the reference and attached objects constraint spaces.

.twistMax (Twist_Axis_Range_Max) : float

Get/Set the maximum rotation about the twist axis the constraint will allow between the reference and attached objects constraint spaces.

.coneMin (Cone_Range_Min) : float

Get/Set the minimum value used when creating the limit cone. It is combined with the max limit to generate a symmetrical cone. This cone is rotated about the plane normal by an offset calculated by combining these limits. The rotation of the child’s twist axis is then limited to being within this cone with respect to the parent.

.coneMax (Cone_Range_Max) : float

Get/Set defines the maximum value used when creating the limit cone. It is combined with the min limit to generate a symmetrical cone. This cone is rotated about the plane normal by an offset calculated by combining these limits. The rotation of the child’s twist axis is then limited to being within this cone with respect to the parent.

.planeMin (Plane_Range_Min) : float

Get/Set the angle between the plane and a reference line in the range [-90,0]. This line is swept about the plane normal to create a cone. The child’s twist axis is then restricted from entering this cone. If this cone intersects that produced by the cone limits it will further inhibit the motion of the child with respect to the parent.

.planeMax (Plane_Range_Max) : float

This value describes the angle between the plane and a reference line in the range [0,90]. This line is swept about the plane normal to create a cone. The child’s twist axis is then restricted from entering this cone. If this cone intersects that produced by the cone limits it will further inhibit the motion of the child with respect to the parent.

.iconSize (Icon_Size) : float

Get/Set the icon size.

.isBreakable (Is_Breakable) : boolean

When set to true, the constraint will be breakable. If its breakable limits are exceeded during simulation it will cease to exert impulses on the attached objects.

.linearBreakingStrength (Linear_Strength) : float

The linear breaking limit value used to when .isBreakable is set to true.

.angularBreakingStrength (Angular_Strength) : float

The angular breaking limit value used to when .isBreakable is set to true.

.showConePlaneVolume (Display_Boolean_of_Cone_and_Plane_limits) : boolean

When set to true, a representation of the allowed region of movement based on a combination of the plane and cone values will be calculated and displayed as part of the Parent Space visualization

.showCone (Display_Cone_Limits) : boolean

When set to true, the entire symmetrical cone produced by the min and max cone limits will be displayed as part of the Parent Space visualization.

.showPlane (Display_Plane_and_Normal) : boolean

When set to true, a representation of the plane and plane normal will be displayed as part of the Parent Space visualization

.showPlaneCones (Display_Cones_representing_Plane_Limits) : boolean

When set to true, the cones formed by the plane limits will be displayed as part of the Parent Space visualization.

.showTwistLimits (Display_Twist_Limits) : boolean

When set to true, the twist limits will be displayed as part of the Parent Space visualization. The representation is a cylinder section showing the restricted motion of the attached object with respect to rotation about the twist axis.

.strength : float

.tau : float

These two properties govern the impulses applied to the constraint's bodies in order to maintain the constraint, and so how strongly the constraint works to restrict their movement.

.lockSpaces (Lock_Spaces) : boolean

When set to true, the relative transform between the child and parent constraint spaces is locked - if you move the child space in the viewport, the parent space will move with it, and vice versa.

Interfaces

Interface: rctRagdollInterface

Properties

.parentBody : node : Read|Write

Get/Set the Parent Body.

.childBody : node : Read|Write

Get/Set the Child Body.

.hasParent : boolean : Read|Write

When set to true, the Parent Body will be used in the simulation.

.parentTransform : matrix3 by value : Read|Write

Get/Set the Parent Body's transformation matrix.

.childTransform : matrix3 by value : Read|Write

Get/Set the Child Body's transformation matrix.

.lockSpaces : boolean : Read|Write

When set to true, the relative transform between the child and parent constraint spaces is locked - if you move the child space in the viewport, the parent space will move with it, and vice-versa.

.strength : float : Read|Write

.tau : float : Read|Write

These two properties govern the impulses applied to the constraint's bodies in order to maintain the constraint, and so how strongly the constraint works to restrict their movement.

.isBreakable : boolean : Read|Write

When set to true, the constraint will be breakable. If its breakable limits are exceeded during simulation it will cease to exert impulses on the attached objects.

.linearBreakingStrength : float : Read|Write

The linear breaking limit value used to when .isBreakable is set to true.

.angularBreakingStrength : float : Read|Write

The angular breaking limit value used to when .isBreakable is set to true.

.displaySize : float : Read|Write

Get/Set the icon size.

.planeOffsetTransform : matrix3 by value : Read|Write

Get/Set the Plane offset's transformation matrix.

.twistLimitMinAngle : float : Read|Write

Get/Set the minimum rotation about the twist axis the constraint will allow between the reference and attached objects constraint spaces.

.twistLimitMaxAngle : float : Read|Write

Get/Set the maximum rotation about the twist axis the constraint will allow between the reference and attached objects constraint spaces.

.coneLimitMinAngle : float : Read|Write

Get/Set the minimum value used when creating the limit cone. It is combined with the max limit to generate a symmetrical cone. This cone is rotated about the plane normal by an offset calculated by combining these limits. The rotation of the child’s twist axis is then limited to being within this cone with respect to the parent.

.coneLimitMaxAngle : float : Read|Write

Get/Set defines the maximum value used when creating the limit cone. It is combined with the min limit to generate a symmetrical cone. This cone is rotated about the plane normal by an offset calculated by combining these limits. The rotation of the child’s twist axis is then limited to being within this cone with respect to the parent.

.planeLimitMinAngle : float : Read|Write

Get/Set the angle between the plane and a reference line in the range [-90,0]. This line is swept about the plane normal to create a cone. The child’s twist axis is then restricted from entering this cone. If this cone intersects that produced by the cone limits it will further inhibit the motion of the child with respect to the parent.

.planeLimitMaxAngle : float : Read|Write

This value describes the angle between the plane and a reference line in the range [0,90]. This line is swept about the plane normal to create a cone. The child’s twist axis is then restricted from entering this cone. If this cone intersects that produced by the cone limits it will further inhibit the motion of the child with respect to the parent.

.showTwistLimit : boolean : Read|Write

When set to true, the twist limits will be displayed as part of the Parent Space visualization. The representation is a cylinder section showing the restricted motion of the attached object with respect to rotation about the twist axis.

.showConeLimit : boolean : Read|Write

When set to true, the entire symmetrical cone produced by the min and max cone limits will be displayed as part of the Parent Space visualization.

.showPlaneLimit : boolean : Read|Write

When set to true, the cones formed by the plane limits will be displayed as part of the Parent Space visualization.

.showPlane : boolean : Read|Write

When set to true, a representation of the plane and plane normal will be displayed as part of the Parent Space visualization

.showConePlaneVolume : boolean : Read|Write

When set to true, a representation of the allowed region of movement based on a combination of the plane and cone values will be calculated and displayed as part of the Parent Space visualization

Methods:

<void>alignToParentBody()

Aligns the Constraint to the Parent Body.

<void>alignToChildBody()

Aligns the Constraint to the Child Body.

<void>alignToParentSpace()

Aligns the Constraint to parent space.

<void>alignToChildSpace()

Aligns the Constraint to child space.

<void>alignToEachBody()

Aligns the Constraint to both bodies.

<boolean>isValid()

Returns true if the Ragdoll Constraint is valid, false otherwise. A valid Ragdoll Constraint has the correct number of rigid bodies attached and is included in a valid constraint solver.

See also

MAXScript Extensions for Reactor


Carwheel : Helper

Carwheel - superclass: Helper; super-superclass:Node - classID: #(1127090218, 619653028)

Value > MAXWrapper > Node > Helper > reactor > Carwheel

Description:

You can use this constraint to attach a wheel to another object - for instance, a car chassis. You can also constrain a wheel to a position in world space. During the simulation, the wheel object is free to rotate around a spin axis defined in each object's space. Linear motion is allowed for the wheel along a suspension axis. You can also add limits to the wheel's movement along this axis. The constraint's child body will always act as the wheel, while the parent will act as the chassis.

Carwheel constraints also have spin parameters. If these are nonzero, the constraint will turn the wheel during the simulation. You can specify a target velocity and a target gain - this is the maximum angular impulse that the motor can apply to the rigid body in order to achieve the target velocity.

Constructors:

Carwheel ...

rctCarwheel ...

Properties:

.parentBody (Parent_Body) : node

Get/Set the Parent Body.

.hasParent (Has_Parent) : boolean

When set to true, the Parent Body will be used in the simulation.

.childBody (Child_Body) : node

Get/Set the Child Body.

.limitsMin (Min_Suspension_Limit) : float

.limitsMax (Max_Suspension_Limit) : float

Get/Set the suspension limits.

.suspensionFriction (Suspension_Friction) : float

Get/Set the suspension friction.

.velocity (Spin_Velocity) : float

Get/Set the wheel's velocity.

.gain (Gain_for_Spin_Velocity) : float

Get/Set the maximum angular impulse that the motor can apply to the rigid body in order to achieve the target velocity

.iconSize (Icon_Size) : float

Get/Set the icon size.

.isBreakable (Is_Breakable) : boolean

When set to true, the constraint will be breakable. If its breakable limits are exceeded during simulation it will cease to exert impulses on the attached objects.

.linearBreakingStrength (Linear_Strength) : float

The linear breaking limit value used to when .isBreakable is set to true.

.angularBreakingStrength (Angular_Strength) : float

The angular breaking limit value used to when .isBreakable is set to true.

.strength : float

.tau : float

These two properties govern the impulses applied to the constraint's bodies in order to maintain the constraint, and so how strongly the constraint works to restrict their movement.

.lockSpaces (Lock_Spaces) : boolean

When set to true, the relative transform between the child and parent constraint spaces is locked - if you move the child space in the viewport, the parent space will move with it, and vice versa.

Interfaces

Interface: rctCarwheelInterface

Properties:

.parentBody : node : Read|Write

Get/Set the Parent Body.

.childBody : node : Read|Write

Get/Set the Child Body.

.hasParent : boolean : Read|Write

When set to true, the Parent Body will be used in the simulation.

.parentTransform : matrix3 by value : Read|Write

Get/Set the Parent Body's transformation matrix.

.childTransform : matrix3 by value : Read|Write

Get/Set the Child Body's transformation matrix.

.lockSpaces : boolean : Read|Write

When set to true, the relative transform between the child and parent constraint spaces is locked - if you move the child space in the viewport, the parent space will move with it, and vice-versa.

.strength : float : Read|Write

.tau : float : Read|Write

These two properties govern the impulses applied to the constraint's bodies in order to maintain the constraint, and so how strongly the constraint works to restrict their movement.

.isBreakable : boolean : Read|Write

When set to true, the constraint will be breakable. If its breakable limits are exceeded during simulation it will cease to exert impulses on the attached objects.

.linearBreakingStrength : float : Read|Write

The linear breaking limit value used to when .isBreakable is set to true.

.angularBreakingStrength : float : Read|Write

The angular breaking limit value used to when .isBreakable is set to true.

.displaySize : float : Read|Write

Get/Set the icon size.

.suspensionTransform : matrix3 by value : Read|Write

Get/Set the transformation matrix of the suspension node.

.suspensionLimitMin : float : Read|Write

.suspensionLimitMax : float : Read|Write

Get/Set the suspension limits.

.suspensionFriction : float : Read|Write

Get/Set the suspension friction.

.velocity : float : Read|Write

Get/Set the wheel's velocity.

.gain : float : Read|Write

Get/Set the maximum angular impulse that the motor can apply to the rigid body in order to achieve the target velocity

Methods:

<void>alignToParentBody()

Aligns the Constraint to the Parent Body.

<void>alignToChildBody()

Aligns the Constraint to the Child Body.

<void>alignToParentSpace()

Aligns the Constraint to parent space.

<void>alignToChildSpace()

Aligns the Constraint to child space.

<void>alignToEachBody()

Aligns the Constraint to both bodies.

<boolean>isValid()

Returns true if the Carwheel Constraint is valid, false otherwise. A valid Carwheel Constraint has the correct number of rigid bodies attached and is included in a valid constraint solver.

See also

MAXScript Extensions for Reactor


Prismatic : Helper

Prismatic - superclass: Helper; super-superclass:Node - classID: #(1623345609, 1330667480)

Value > MAXWrapper > Node > Helper > reactor > Prismatic

Description:

A Prismatic Constraint is a constraint between two rigid bodies, or a rigid body and the world, that allows its bodies to move relative to each other along one axis only. Rotations as well as the remaining two translation axes are fixed.

Constructors:

Prismatic ...

rctPrismatic ...

Properties:

.parentBody (Parent_Body) : node

Get/Set the Parent Body.

.childBody (Child_Body) : node

Get/Set the Child Body.

.hasParent (Has_Parent) : boolean

When set to true, the Parent Body will be used in the simulation.

.iconSize (Icon_Size) : float

Get/Set the icon size.

.isBreakable (Is_Breakable) : boolean

When set to true, the constraint will be breakable. If its breakable limits are exceeded during simulation it will cease to exert impulses on the attached objects.

.linearBreakingStrength (Linear_Strength) : float

Get/Set the linear breaking limit value used to when .isBreakable is set to true.

.angularBreakingStrength (Angular_Strength) : float

The angular breaking limit value used to when .isBreakable is set to true.

.isLimited (Is_Limited) : boolean

When set to true, the simulation will respect the limits.

.limitMin (Prismatic_Limit_Min) : float

Get/Set the minimum distance the constraint will allow between the two prismatic spaces.

.limitMax (Prismatic_Limit_Max) : float

Get/Set the maximum distance the constraint will allow between the two prismatic spaces.

.limitFriction (Prismatic_Limit_Friction) : float

Get/Set the amount of friction applied to the objects as they try to move along the prismatic axis. It is only applied to limited hinges

.strength : float

.tau : float

These two properties govern the impulses applied to the constraint's bodies in order to maintain the constraint, and so how strongly the constraint works to restrict their movement.

.lockSpaces (Lock_Spaces) : boolean

When set to true, the relative transform between the child and parent constraint spaces is locked - if you move the child space in the viewport, the parent space will move with it, and vice versa.

Interfaces

Interface: rctPrismaticInterface

Properties

.parentBody : node : Read|Write

Get/Set the Parent Body.

.childBody : node : Read|Write

Get/Set the Child Body.

.hasParent : boolean : Read|Write

When set to true, the Parent Body will be used in the simulation.

.parentTransform : matrix3 by value : Read|Write

Get/Set the Parent Body's transformation matrix.

.childTransform : matrix3 by value : Read|Write

Get/Set the Child Body's transformation matrix.

.lockSpaces : boolean : Read|Write

When set to true, the relative transform between the child and parent constraint spaces is locked - if you move the child space in the viewport, the parent space will move with it, and vice versa.

.strength : float : Read|Write

.tau : float : Read|Write

These two properties govern the impulses applied to the constraint's bodies in order to maintain the constraint, and so how strongly the constraint works to restrict their movement.

.isBreakable : boolean : Read|Write

When set to true, the constraint will be breakable. If its breakable limits are exceeded during simulation it will cease to exert impulses on the attached objects.

.linearBreakingStrength : float : Read|Write

Get/Set the linear breaking limit value used to when .isBreakable is set to true.

.angularBreakingStrength : float : Read|Write

The angular breaking limit value used to when .isBreakable is set to true.

.displaySize : float : Read|Write

Get/Set the icon size.

.isLimited : boolean : Read|Write

When set to true, the simulation will respect the limits.

.limitFriction : float : Read|Write

Get/Set the amount of friction applied to the objects as they try to move along the prismatic axis. It is only applied to limited hinges

.limitMin : float : Read|Write

Get/Set the minimum distance the constraint will allow between the two prismatic spaces.

.limitMax : float : Read|Write

Get/Set the maximum distance the constraint will allow between the two prismatic spaces.

Methods:

<void>alignToParentBody()

Aligns the Constraint to the Parent Body.

<void>alignToChildBody()

Aligns the Constraint to the Child Body.

<void>alignToParentSpace()

Aligns the Constraint to parent space.

<void>alignToChildSpace()

Aligns the Constraint to child space.

<void>alignToEachBody()

Aligns the Constraint to both bodies.

<boolean>isValid()

Returns true if the Prismatic Constraint is valid, false otherwise. A valid Prismatic Constraint has the correct number of rigid bodies attached and is included in a valid constraint solver.

See also

MAXScript Extensions for Reactor


L_Dashpot : Helper

L_Dashpot - superclass: Helper; super-superclass:Node - classID: #(186413646, 1710298770)

Value > MAXWrapper > Node > Helper > reactor > L_Dashpot

Description:

The Linear Dashpot Constraint allows you to constrain two rigid bodies together in the simulation, or to constrain one body to a position in world space. It behaves very similarly to a heavily damped spring. You can specify the dashpot’s strength and damping, and whether collisions between the attached bodies are disabled. You can specify a dashpot attachment point in each body's local space. During the simulation, the dashpot exerts impulses on the attached bodies in an attempt to make these points match up in world space, thus keeping the bodies in the same positions relative to each other. The bodies are still free to rotate around the attachment point.

Constructors:

L_Dashpot ...

rctLinearDashpot ...

Properties:

.childBody (Child_Body) : node

Get/Set the Child Body.

.hasParent (Has_Parent) : boolean

When set to true, the Parent Body will be used in the simulation.

.parentBody (Parent_Body) : node

Get/Set the Parent Body.

.strength : float

Get/Set the strength value which governs the size of the impulse the dashpot will apply to each attached body, taking into account the distance between the attachment points. The strength value is mass dependent.

.damping : float

Get/Set the samping value which affects how quickly the oscillation of the linear dashpot settles down. It governs the impulse applied to the connected bodies due to the relative velocities of their dashpot connection points

.allowInterpenetration (Allow_Interpenetration) : boolean

When set to true, collisions are disabled between the dashpot’s objects - during the simulation, they will be able to pass through each other. Defaults to false.

.disabled : boolean

When set to true, the dashpot is not added to the simulation

.lockSpaces (Lock_Spaces) : boolean

When set to true, the relative transform between the child and parent constraint spaces is locked - if you move the child space in the viewport, the parent space will move with it, and vice versa.

Interfaces

Interface: rctLinearDashpotInterface

Properties:

.parentBody : node : Read|Write

Get/Set the Parent Body.

.childBody : node : Read|Write

Get/Set the Child Body.

.hasParent : boolean : Read|Write

When set to true, the Parent Body will be used in the simulation.

.parentTransform : matrix3 by value : Read|Write

Get/Set the Parent Body's transformation matrix.

.childTransform : matrix3 by value : Read|Write

Get/Set the Child Body's transformation matrix.

.lockSpaces : boolean : Read|Write

When set to true, the relative transform between the child and parent constraint spaces is locked - if you move the child space in the viewport, the parent space will move with it, and vice versa.

.strength : float : Read|Write

Get/Set the strength value which governs the size of the impulse the dashpot will apply to each attached body, taking into account the distance between the attachment points. The strength value is mass dependent.

.damping : float : Read|Write

Get/Set the samping value which affects how quickly the oscillation of the linear dashpot settles down. It governs the impulse applied to the connected bodies due to the relative velocities of their dashpot connection points

.allowInterpenetration : boolean : Read|Write

When set to true, collisions are disabled between the dashpot’s objects - during the simulation, they will be able to pass through each other. Defaults to false.

.isDisabled : boolean : Read|Write

When set to true, the dashpot is not added to the simulation

Methods:

<void>alignToParentBody()

Aligns the Constraint to the Parent Body.

<void>alignToChildBody()

Aligns the Constraint to the Child Body.

<void>alignToParentSpace()

Aligns the Constraint to parent space.

<void>alignToChildSpace()

Aligns the Constraint to child space.

<void>alignToEachBody()

Aligns the Constraint to both bodies.

<boolean>isValid()

Returns true if the Constraint is valid, false otherwise. A valid Constraint has the correct number of rigid bodies attached and is included in a valid constraint solver.

See also

MAXScript Extensions for Reactor


A_Dashpot : Helper

A_Dashpot - superclass: Helper; super-superclass:Node - classID: #(827136949, 706939865)

Value > MAXWrapper > Node > Helper > reactor > A_Dashpot

Description:

You can use an Angular Dashpot to constrain the relative orientation of two rigid bodies, or the absolute orientation of a rigid body in world space. When simulating, the dashpot exerts impulses on the bodies to which it is attached in an attempt to maintain the specified rotation between the objects. You can specify the dashpot’s strength and damping, and whether collisions between the system’s bodies are disabled.

An angular dashpot has two sets of axes as sub-objects. For two-bodied dashpots, these are specified as offset rotations from the dashpot’s bodies. For single-bodied dashpots, one sub-object is an offset rotation and the other is a world rotation. In a simulation, the dashpot tries to maintain a common rotation for these axes.

Constructors:

A_Dashpot ...

rctAngularDashpot ...

Properties

.childBody (Child_Body) : node

Get/Set the Child Body.

.hasParent (Has_Parent) : boolean

When set to true, the Parent Body will be used in the simulation.

.parentBody (Parent_Body) : node

Get/Set the Parent Body.

.strength : float

Get/Set the strength value which governs the size of the impulse the dashpot will apply to each attached body, taking into account the difference in their relative offset rotations (Child Space and Parent Space). The strength value is mass dependent.

.damping : float

Get/Set the samping value which affects how quickly the oscillation of the angular dashpot settles down. It governs the impulse applied to the connected bodies due to their relative angular velocities.

.allowInterpenetration (Allow_Interpenetration) : boolean

When set to true, collisions are disabled between the dashpot’s objects - during the simulation, they will be able to pass through each other. Defaults to false.

.disabled : boolean

When set to true, the dashpot is not added to the simulation

.lockSpaces (Lock_Spaces) : boolean

When set to true, the relative transform between the child and parent constraint spaces is locked - if you move the child space in the viewport, the parent space will move with it, and vice versa.

Interfaces

Interface: rctAngularDashpotInterface

Properties

.parentBody : node : Read|Write

Get/Set the Parent Body.

.childBody : node : Read|Write

Get/Set the Child Body.

.hasParent : boolean : Read|Write

When set to true, the Parent Body will be used in the simulation.

.parentTransform : matrix3 by value : Read|Write

Get/Set the Parent Body's transformation matrix.

.childTransform : matrix3 by value : Read|Write

Get/Set the Child Body's transformation matrix.

.lockSpaces : boolean : Read|Write

When set to true, the relative transform between the child and parent constraint spaces is locked - if you move the child space in the viewport, the parent space will move with it, and vice versa.

.strength : float : Read|Write

Get/Set the strength value which governs the size of the impulse the dashpot will apply to each attached body, taking into account the difference in their relative offset rotations (Child Space and Parent Space). The strength value is mass dependent.

.damping : float : Read|Write

Get/Set the samping value which affects how quickly the oscillation of the angular dashpot settles down. It governs the impulse applied to the connected bodies due to their relative angular velocities.

.allowInterpenetrations : boolean : Read|Write

When set to true, collisions are disabled between the dashpot’s objects - during the simulation, they will be able to pass through each other. Defaults to false.

.isDisabled : boolean : Read|Write

When set to true, the dashpot is not added to the simulation

Methods:

<void>alignToParentBody()

Aligns the Constraint to the Parent Body.

<void>alignToChildBody()

Aligns the Constraint to the Child Body.

<void>alignToParentSpace()

Aligns the Constraint to parent space.

<void>alignToChildSpace()

Aligns the Constraint to child space.

<void>alignToEachBody()

Aligns the Constraint to both bodies.

<boolean>isValid()

Returns true if the Constraint is valid, false otherwise. A valid Constraint has the correct number of rigid bodies attached and is included in a valid constraint solver.

See also

MAXScript Extensions for Reactor


CLCollection : Helper

CLCollection - superclass: Helper; super-superclass:Node - classID: #(998836098, 492768222)

Value > MAXWrapper > Node > Helper > reactor > CLCollection

Constructors:

CLCollection ...

rctCLCollection ...

Properties

.disabled : boolean

When set to True, the CLCollection will not be considered by the simulation.

.internalSteps (Internal_Steps) : integer

Controls the number of internal substeps per keyframe performed by the Cloth simulation - corresponds to the "Internal Steps" spinner in the Advanced rollout.

Interfaces

Interface: rctClothCollectionInterface

Properties:

.cloths : node by value array : Read|Write

Get/Set the array of cloth nodes in the collection.

.disabled : boolean : Read|Write

Enable/Disable the collection.

Methods:

<boolean>addCloth <node>node

Adds a cloth node to the collection. Returns true on success. Returns false if the node does not have a reactor_Cloth : Modifier applied.

<boolean>removeClothIndex <integer>index

Removes the indexed cloth node from the collection. Returns true on success.

<boolean>removeCloth <node>node

Removes the specified cloth node from the collection. Returns true on success.

<integer>getNumCloths()

Returns the number of cloth nodes in the collection.

EXAMPLE:

clc = CLCollection() --create a CLCollection

$CLCollection:CLCollection01 @ [0.000000,0.000000,0.000000]

b = Box() --create a Box

$Box:Box01 @ [0.000000,0.000000,0.000000]

clc.addCloth b --try to add the Box to the Cloth

false --you cannot - no reactor cloth modifier!

addModifier b (reactor_cloth()) --add reactor_cloth to the Box

OK

clc.addCloth b --and try again

true --this time it works!

clc.getNumCloths() --check the number of cloths in the collection

1 --there is one

clc.cloths --let's see the whole array

#($Editable_Mesh:Box01 @ [0.000000,0.000000,0.000000])

clc.removeClothIndex 1 --remove the one cloth from the list

true --gone!

clc.removeClothIndex 1 --try to remove it again

false --you cannot, there are none left...

See also

reactor_Cloth : Modifier

MAXScript Extensions for Reactor


DMCollection : Helper

DMCollection - superclass: Helper; super-superclass:Node - classID: #(847012812, 201466018)

Value > MAXWrapper > Node > Helper > reactor > DMCollection

Constructors:

DMCollection ...

rctDMCollection ...

Properties

.disabled : boolean

When set to True, the DMCollection will be disabled.

.freeze : boolean

When set to True, freezes the DMCollection. Corresponds to the "Freeze" checkbox in the "Advanced" rollout in the UI.

Interfaces

Interface: rctDeformingMeshCollectionInterface

Properties:

.defMeshes : node by value array : Read|Write

Get/Set the array of deforming mesh nodes in the collection.

.disabled : boolean : Read|Write

When set to True, the DMCollection will be disabled.

Methods:

<boolean>addDefMesh <node>node

Adds a Deforming Mesh node to the collection. Returns true on success.

<boolean>removeDefMeshIndex <integer>index

Removes the indexed Deforming Mesh node from the collection. Returns true on success.

<boolean>removeDefMesh <node>node

Removes the specified Deforming Mesh node from the collection. Returns true on success.

<integer>getNumDefMeshes()

Returns the number of Deforming Mesh nodes in the collection.

See also

MAXScript Extensions for Reactor


RPCollection : Helper

RPCollection - superclass: Helper; super-superclass:Node - classID: #(788030612, 1741385839)

Value > MAXWrapper > Node > Helper > reactor > RPCollection

Constructors:

RPCollection ...

rctRPCollection ...

Properties:

.disabled : boolean

When set to True, the RPCollection will be disabled.

.internalSteps (Internal_Steps) : integer

Controls the number of internal substeps per keyframe performed by the Rope simulation - corresponds to the "Internal Steps" spinner in the Advanced rollout.

Interfaces

Interface: rctRopeCollectionInterface

Properties:

.ropes : node by value array : Read|Write

Get/Set the array of rope nodes in the collection.

.disabled : boolean : Read|Write

When set to True, disables the collection.

Methods:

<boolean>addRope <node>node

Adds a rope node to the collection. Returns true on success. Returns false if the node does not have a reactor_Rope : Modifier applied.

<boolean>removeRopeIndex <integer>index

Removes the indexed rope node from the collection. Returns true on success.

<boolean>removeRope <node>node

Removes the specified rope node from the collection. Returns true on success.

<integer>getNumRope()

Returns the number of rope nodes in the collection.

EXAMPLE:

rpc = RPCollection() --create a Rope collection

$RPCollection:RPCollection01 @ [0.000000,0.000000,0.000000]

s = Helix() --create a Helix shape

$Helix:Helix01 @ [0.000000,0.000000,0.000000]

rpc.addRope s --try to add to collection

false --you cannot, no reactor_rope added

addmodifier s (reactor_Rope()) --add modifier to turn Helix to rope

OK

rpc.addRope s --try to add the Helix again

true --this time it worked.

rpc.ropes --take a look at the list of ropes

#($Editable_Spline:Helix01 @ [0.000000,0.000000,0.000000])

rpc.removeRope s --remove the rope by node

true --it is gone.

rpc.ropes = #($Helix01) --add it again, this time directly as array

#($Editable_Spline:Helix01 @ [0.000000,0.000000,0.000000])

rpc.getNumRopes() --see how many ropes there are

1 --one as expected!

See also

MAXScript Extensions for Reactor


SBCollection : Helper

SBCollection - superclass: Helper; super-superclass:Node - classID: #(1884502783, 1008678790)

Value > MAXWrapper > Node > Helper > reactor > SBCollection

Constructors:

SBCollection ...

rctSBCollection ...

Properties

.disabled : boolean

When set to True, the SBCollection will be disabled.

.internalSteps (Internal_Steps) : integer

Controls the number of internal substeps per keyframe performed by the Soft Body simulation - corresponds to the "Internal Steps" spinner in the Advanced rollout.

Interfaces

Interface: rctSoftBodyCollectionInterface

Properties:

.softBodies : node by value array : Read|Write

Get/Set the array of Soft Body nodes in the collection.

.disabled : boolean : Read|Write

When set to True, disables the collection.

Methods:

<boolean>addSoftBody <node>node

Adds a Soft Body node to the collection. Returns true on success. Returns false if the node does not have a reactor_SoftBody : Modifier applied.

<boolean>removeSoftBodyIndex <integer>index

Removes the indexed Soft Body node from the collection. Returns true on success.

<boolean>removeSoftBody <node>node

Removes the specified Soft Body node from the collection. Returns true on success.

<integer>getNumSoftBodies()

Returns the number of Soft Body nodes in the collection.

See also

MAXScript Extensions for Reactor


Fracture : Helper

Fracture - superclass: Helper; super-superclass:Node - classID: #(399051846, 1473446478)

Value > MAXWrapper > Node > Helper > reactor > Fracture

Description:

The fracture feature simulates the breaking of a rigid body into a number of smaller pieces as the result of an impact. To do this, you need to supply the pieces that are glued together to create the whole object. Rigid bodies that are part of a fracture helper move as one compound body. When a collision between a rigid body that belongs to a fracture helper and another body occurs, the collision information is analyzed and if a threshold is exceeded, the rigid body will be removed from the fracture helper. Once the rigid body has been removed, it will move independently of the fracture object and will be free to collide with the rigid bodies that are still part of the fracture object.

Constructors:

Fracture ...

rctFracture ...

Properties:

.impulse : float

Get/Set the breaking impulse value. Used when .breakAlgorithm is set to 0.

.energyLoss (Energy_Loss) : float

Get/Set the energy loss value.

.disabled : boolean

When set to true, disables the Fracture.

.showBoundingBox (Show_Bounding_Box) : boolean

When set to true, shows the bounding box of the Fracture.

.breakAlgorithm (Break_Algorithm) : integer

Get/Set the break algorithm. Possible values are:

0 - Break On Impulse

1 - Break On Velocity (default)

.velocity : float

Get/Set the breaking velocity value. Used when .breakAlgorithm is set to 1.

.useConnectivity (Use_Connectivity) : boolean

Corresponds to the "Use Connectivity" checkbox in the UI.

Interfaces:

Interface: rctFractureInterface

Properties:

.pieces : node by value array : Read|Write

Get/Set the array of Fracture pieces.

.disabled : boolean : Read|Write

When set to true, disables the Fracture.

Methods:

<boolean>addPiece <node>node

Adds a piece node to the Fracture. Returns true on success.

<boolean>removePieceIndex <integer>index

Removes the indexed piece node from the Fracture. Returns true on success.

<boolean>removePiece <node>node

Removes the specified piece node from the Fracture. Returns true on success.

<integer>getNumPieces()

Returns the number of pieces in the Fracture.

<enum>getPieceType <node>piece

getPieceType enums: {#normal|#unbreakable|#keystone|#autobreak}

Returns the type of the specified piece.

<void>setPieceType <node>piece <enum>type

type enums: {#normal|#unbreakable|#keystone|#autobreak}

Sets the type of the specified piece to the supplied enum name.

<time>getPieceAutoBreakTime <node>piece

Returns the Auto-Break Time of the specified piece as time value.

<void>setPieceAutoBreakTime <node>piece <time>time

Sets the Auto-Break Time of the specified piece to the supplied time value.

<time>getPieceBrokenTime <node>piece

Returns the Broken Time of the specified piece.

<void>resetPieceBroken <node>piece

Resets the Broken state of the specified piece. Same as pressing the "Reset" button in the UI.

<boolean>doesPieceBreak <node>piece

Returns true if the specified piece breaks.

See also

MAXScript Extensions for Reactor


Motorhelper : Helper

Motorhelper - superclass: Helper; super-superclass:Node - classID: #(1521418551, 1297775854)

Value > MAXWrapper > Node > Helper > reactor > Motorhelper

Description:

The motor helper allows you to apply a turning force to any non-fixed rigid body in the scene. You can specify the target angular velocity and the maximum angular impulse the motor can apply to achieve this velocity.

Constructors:

Motorhelper ...

rctMotor ...

Properties:

.RigidBody (Rigid_Body) : node

Get/Set the rigid body to apply impulse to.

.axis : integer

Get/Set the local axis for the rigid body about which the motor will apply impulses. Possible values are:

0 - X axis

1 - Y axis

2 - Z axis

.angularSpeed (Angular_Speed) : float

Get/Set the target angular velocity that the motor will work to achieve for the rigid body. It is specified in radians per second.

.gain : float

Get/Set the maximum angular impulse that the motor can apply to the rigid body in order to achieve the target velocity.

.iconSize (Icon_Size) : float

Get/Set the icon size.

.disabled : boolean

When set to True, the MotorHelper will not be considered by the simulation.

.showText (Show_Text) : boolean

.displayType (Display_Type) : integer

Interfaces

Interface: rctMotorInterface

Properties

.body : node : Read|Write

Get/Set the rigid body to apply impulse to.

.angularSpeed : float : Read|Write

Get/Set the target angular velocity that the motor will work to achieve for the rigid body. It is specified in radians per second.

.gain : float : Read|Write

Get/Set the maximum angular impulse that the motor can apply to the rigid body in order to achieve the target velocity.

.axis : integer : Read|Write

Get/Set the local axis for the rigid body about which the motor will apply impulses.

Possible values are:

0 - X axis

1 - Y axis

2 - Z axis

.isDisabled : boolean : Read|Write

When set to True, the MotorHelper will not be considered by the simulation.

Methods

<boolean>GetIsValidMotor()

Returns true if the MotorHelper is valid. A motor is valid if its rigid body property has been set to a valid rigid body in the scene.

<point3 by value>GetAxisInBodySpace()

Returns the rotation axis in body space as point3 vector.

See also

MAXScript Extensions for Reactor


Planehelper : Helper

Planehelper - superclass: Helper; super-superclass:Node - classID: #(1585659651, 2047819447)

Value > MAXWrapper > Node > Helper > reactor > Planehelper

Description:

The planeHelper object is a type of rigid body that acts as a fixed, infinite plane in the simulation.

Constructors:

Planehelper ...

rctPlane ...

Properties

.showNormal (Show_Normal) : boolean

When set to true, the planes normal vector will be displayed

See also

MAXScript Extensions for Reactor


Springhelper : Helper

Springhelper - superclass: Helper; super-superclass:Node - classID: #(74715456, 1431313522)

Value > MAXWrapper > Node > Helper > reactor > Springhelper

Description:

The Springhelper allows you to create a spring between two rigid bodies in the simulation, or between a rigid body and a point in space. During the simulation, the spring will exert forces on the attached bodies in an attempt to maintain its rest length.

Constructor

Springhelper ...

rctSpring ...

Properties

.childBody (Child_Body) : node

Get/Set the child rigid body.

.parentBody (Parent_Body) : node

Get/Set the child rigid body.

.hasParent (Has_Parent) : boolean

When set to true, the Parent rigid body will be considered by the simulation.

.restitution : float

Get/Set the strength of the spring that governs the force the spring will apply to each attached body for each unit difference between its current length and its rest length.

NOTE:

Exposed to the UI as "Stiffness".

.restLength (Rest_Length) : float

Get/Set the length the spring will attempt to reach by applying forces on the attached objects.

.damping : float

Get/Set the damping value.

.onCompression (Act_on_compression) : boolean

When set to true, the spring will apply forces on the attached objects when its length is less than its Rest Length. It defaults to true.

.onExtension (Act_on_extension) : boolean

When set to true, the spring will apply forces on the attached objects when its length is greater than its Rest Length. It defaults to true.

.disabled : boolean

When set to true, the spring is not be considered by the simulation.

.lockSpaces (Lock_Spaces) : boolean

When set to true, the relative transform between the child and parent constraint spaces is locked - if you move the child space in the viewport, the parent space will move with it, and vice-versa.

Interfaces

Interface: rctSpringInterface

Properties

.parentBody : node : Read|Write

Get/Set the child rigid body.

.childBody : node : Read|Write

Get/Set the child rigid body.

.hasParent : boolean : Read|Write

When set to true, the Parent rigid body will be considered by the simulation.

.parentTransform : matrix3 by value : Read|Write

Get/Set the parent's transformation matrix

.childTransform : matrix3 by value : Read|Write

Get/Set the child's transformation matrix

.lockSpaces : boolean : Read|Write

When set to true, the relative transform between the child and parent constraint spaces is locked - if you move the child space in the viewport, the parent space will move with it, and vice-versa.

.restitution : float : Read|Write

Get/Set the strength of the spring that governs the force the spring will apply to each attached body for each unit difference between its current length and its rest length.

NOTE:

Exposed to the UI as "Stiffness".

.damping : float : Read|Write

Get/Set the damping value.

.actOnCompression : boolean : Read|Write

When set to true, the spring will apply forces on the attached objects when its length is less than its Rest Length. It defaults to true.

.actOnExtension : boolean : Read|Write

When set to true, the spring will apply forces on the attached objects when its length is greater than its Rest Length. It defaults to true.

.isDisabled : boolean : Read|Write

When set to true, the spring is not be considered by the simulation.

.restLength : float : Read|Write

Get/Set the length the spring will attempt to reach by applying forces on the attached objects.

Methods

<float>calculateRestLength()

Returns the restLength value.

<boolean>isValid()

Returns true if the Spring is a valid constraint. A two-bodied spring is valid if it has two rigid bodies attached, a single-bodied spring is valid if it has one rigid body attached.

<void>alignToParentBody()

Pressed the "Parent Body" button in the "Align Spaces To" group of UI controls.

<void>alignToChildBody()

Pressed the "Child Body" button in the "Align Spaces To" group of UI controls.

<void>alignToParentSpace()

Pressed the "Parent Space" button in the "Align Spaces To" group of UI controls.

<void>alignToChildSpace()

Pressed the "Child Space" button in the "Align Spaces To" group of UI controls.

<void>alignToEachBody()

Aligns to both Parent and Child bodies.

See also

MAXScript Extensions for Reactor


Toy_Car : Helper

Toy_Car - superclass: Helper; super-superclass:Node - classID: #(784217882, 1128155991)

Value > MAXWrapper > Node > Helper > reactor > Toy_Car

Description:

The Toy_Car Helper creates a simple car. It lets you choose a chassis and wheels for your car, tweak various properties such as the strength of its suspension, and specify whether you would like Reactor to turn its wheels during the simulation. All necessary constraints will be sets up automatically to simulate the car.

Constructor:

Toy_Car ...

rctToyCar ...

Properties:

.chassis (Car_Chassis) : node

Get/Set the chassis node.

.wheelsTab (Wheels_Tab) : node array

Get/Set the array of wheels.

.angularStrength (Angular_Strength) : float

This indicates the strength of the corrective forces applied to keep the wheels upright and pointing forwards

.linearStrength (Linear_Strength) : float

Get/Set the strength of the forces applied to keep the wheels in position relative to the chassis.

.suspension : float

Get/Set the suspension strength for the car. The lower the value, the more the chassis will bounce when forces are applied to it.

.allowInterpenetration (Allow_Interpenetration) : boolean

When set to true, collision detection is switched off between the chassis and the wheels.

.spinWheels (Spin_Wheels) : boolean

When set to true, the car's wheels will spin during the simulation

.angularSpeed (Angular_Speed) : float

Get/Set the target angular velocity that Reactor will work to achieve for the wheels when Spin Wheels is set to 1. Specified in radians per second

.gain : float

Get/Set the maximum angular impulse that can be applied to the wheels in order to achieve the target velocity.

.disabled : boolean

When set to True, the Toy_Car will be disabled.

.carOrientation (Car_Orientation) : integer

Get/Set the car orientation mode. Possible values are:

0 - Icon Orientation

1 - Common Local Orientation

.suspensionAxis (Suspension_Axis) : integer

Get/Set the suspension axis. Possible values are

0 - X axis

1 - Y axis

2 - Z axis

.spinAxis (Spin_Axis) : integer

Get/Set the spin axis. Possible values are

0 - X axis

1 - Y axis

2 - Z axis

.internalSubsteps (Internal_Substeps) : integer

Get/Set the number of internal substeps per keyframe.

See also

MAXScript Extensions for Reactor


Windhelper : Helper

Windhelper - superclass: Helper; super-superclass:Node - classID: #(1103585298, 1387146322)

Value > MAXWrapper > Node > Helper > reactor > Winghelper

Description:

The Wind Helper allows you to add wind effects to Reactor sumulations.

Constructor:

Windhelper ...

rctWind ...

Properties:

.windSpeed (Wind_Speed) : float

The strength of the wind.

.perturbSpeed (Perturb_Speed) : boolean

When set to true, the strength of the wind will vary over time, using the parameters below:

.speedVariance (Variance) : float

Get/Set the smooth speed value variation over time.

.speedTimeScale (Time_Scale) : float

Get/Set how quickly the speed changes occur. Small values produce a slow change, large values produce a rapid change.

.ripple : boolean

When set to true, the wind direction becomes a function of space and time, allowing you to add rippling effects to cloth objects affected by the wind.

.rippleAxis (Ripple_Axis) : integer

Get/Set the wind axis. Possible values are:

0 - Left/Right

1 - Up/Down

2 - Back/Forward

.rippleMagnitude (Magnitude) : float

Get/Set the directional variance for the ripples

.rippleFrequency (Frequency) : float

Get/Set the regularity of ripple formation

.perturbTime (Perturb_Time) : boolean

When set to true, the spatial perturbation itself is perturbed over time, meaning that the ripples move back and forth.

.rippleTimeMagnitude : float

Get/Set the ripple magnitude used when .perturbTime is enabled.

.rippleTimeFrequency : float

Get/Set the ripple frequency used when .perturbTime is enabled.

.appliesToRigidBodies (Applies_To_Rigid_Bodies) : boolean

When set to true, the Wind will affect Rigid Bodies.

.appliesToCloth (Applies_To_Cloth) : boolean

When set to true, the Wind will affect Cloth.

.appliesToSoftBodies (Applies_To_Soft_Bodies) : boolean

When set to true, the Wind will affect Soft Bodies.

.appliesToRopes (Applies_To_Ropes) : boolean

When set to true, the Wind will affect Ropes.

.enableSheltering (Enable_Sheltering) : boolean

When set to true, sheltering will be enabled - objects sheltered by other objects will not be affected by the Wind.

.disabled : boolean

When set to True, the Windhelper will be disabled.

.useRange (Use_Range) : boolean

When set to true, the wind effect will have the specified range of action, starting from the icon.

.range : float

Get/Set the wind range value.

.falloffType (Falloff_Type) : integer

Get/Set how the wind effect will fall off towards its range limit. Possible values are:

0 - No Falloff

1 - Inverse

2 - Inverse Squared

.isWindOn (Is_Wind_On) : boolean

Enable/Disable the wind effect.

.iconSize (Icon_Size) : float

Get/Set the icon size.

Interfaces:

Interface: rctWindInterface

Properties:

.speed : float : Read|Write

The strength of the wind.

.perturbSpeed : boolean : Read|Write

When set to true, the strength of the wind will vary over time, using the parameters below:

.speedVariance : float : Read|Write

Get/Set the smooth speed value variation over time.

.speedTimeScale : float : Read|Write

Get/Set how quickly the speed changes occur. Small values produce a slow change, large values produce a rapid change.

.ripple : boolean : Read|Write

When set to true, the wind direction becomes a function of space and time, allowing you to add rippling effects to cloth objects affected by the wind.

.rippleDirection : enum : Read|Write

rippleDirection enums: {#upDown|#leftRight|#backForward}

Get/Set the wind axis to the specified enum value.

.rippleMagnitude : float : Read|Write

Get/Set the directional variance for the ripples

.rippleFrequency : float : Read|Write

Get/Set the regularity of ripple formation

.perturbRippleOverTime : boolean : Read|Write

When set to true, the spatial perturbation itself is perturbed over time, meaning that the ripples move back and forth.

.perturbRippleOverTimeMagnitude : float : Read|Write

Get/Set the directional variance for the perturbed ripples

.perturbRippleOverTimeFrequency : float : Read|Write

Get/Set the regularity of the perturbed ripple formation

.appliesToRigidBodies : boolean : Read|Write

When set to true, the Wind will affect Rigid Bodies.

.appliesToCloths : boolean : Read|Write

When set to true, the Wind will affect Cloth.

.appliesToSoftBodies : boolean : Read|Write

When set to true, the Wind will affect Soft Bodies.

.appliesToRopes : boolean : Read|Write

When set to true, the Wind will affect Ropes.

.enableSheltering : boolean : Read|Write

When set to true, sheltering will be enabled - objects sheltered by other objects will not be affected by the Wind.

.useRange : boolean : Read|Write

When set to true, the wind effect will have the specified range of action, starting from the icon.

.range : float : Read|Write

Get/Set the wind range value.

.rangeFalloffType : enum : Read|Write

rangeFalloffType enums: {#noFalloff|#inverse|#inverseSquared}

Get/Set how the wind effect will fall off towards its range limit.

.isWindOn : boolean : Read|Write

Enable/Disable the wind effect.

.isDisabled : boolean : Read|Write

When set to true, the Wind will not be considered by the simulation.

See also

MAXScript Extensions for Reactor


WaterSpaceWarp : SpacewarpObject

WaterSpaceWarp - superclass: SpacewarpObject; super-superclass:Node - classID: #(1192955369, 72894388)

Value > MAXWrapper > Node > SpacewarpObject > WaterSpaceWarp

Description:

You can use the WaterSpaceWarp to simulate the behavior of a body of liquid. You can specify a size for the water, and physical properties such as density, wave speed, and viscosity.

Constructors:

WaterSpaceWarp ...

rctWaterWSMObject ...

Properties:

.sizeX (Size_X) : float

.sizeY (Size_Y) : float

Get/Set the dimensions for the water

.subdivisionsX (Subdivisions_X) : integer

.subdivisionsY (Subdivisions_Y) : integer

Get/Set the subdivisions for the water

.useLandscape (Landscape) : boolean

When set to true, the landscape rigid body will be considered.

.landscape : node

Get/Set the landscape rigid body.

.waveSpeed (Wave_Speed) : float

Get/Set the speed at which wave crests propagate across the surface of the water.

.minRipple (Min_Ripple) : float

.maxRipple (Max_Ripple) : float

Get/Set the bounds on the size of the waves generated in the water.

.density : float

Get/Set the density of the liquid. This determines which objects will sink into the water, and at what height objects of a lesser density will float. The default density is that of real-world water: 1.0.

.viscosity : float

Get/Set the resistance to flow, in other words how difficult it is for objects to move through the liquid. A large value means that the motion of objects through the water is highly damped.

.showText (Show_Text) : boolean

When set to true (default), a label "Water" will appear beside the space warp in the viewport.

.useCurrentState (Use_Current_State) : boolean

.disabled : boolean

When set to true, the space warp will not be considered by the simulation.

.useDepth (Use_Depth) : boolean

When set to true, the depth value will be considered by the simulation.

.depth (Density) : float

Get/Set the depth of the water. Buoyancy is only applied to objects that are inside the water's depth.

Interfaces:

Interface: rctWaterInterface

Methods:

<float>getNumKeyframes()

Returns the number of keyframes.

<time by value array>getKeyframeTimes()

Returns an array of keyframe times.

<float by value array>getWaterHeightsAtTime <time>time

Returns an array of height values at the specified time.

<boolean>setWaterHeightsAtTime <time>time <&float array>heights

heights is In and Out parameter

Sets the height values at the specified time to the values supplied with the by-reference array.

<void>clearStoredKeyframes()

Clears the stored keyframes.

<integer>getPointIndex <integer>xIndex <integer>yIndex

Returns the index of the point at row xIndex and column yIndex.

EXAMPLE

w = $Water01 --get an existing WaterSpaceWarp

w.clearStoredKeyframes() --clear any existing keyframes

for t = 0 to 100 by 2 do --animate from frame 0 to 100 with step 2

(

heights = #() --init. an array to store heights

for x = 0 to w.subdivisionsX do --loop through X subdivisions

(

for y = 0 to w.subdivisionsY do --loop through Y subdivisions

(

--get the index of the vertex at the specified X and Y subdivision:

index = w.getPointIndex x y

--calculate a height value based on sine of time and X position:

newheight = 10 * sin ((10.0*t+x*20.0))

append heights newheight --add height to the array

)--end y loop

)--end x loop

w.setWaterHeightsAtTime t &heights --assign heights at current time

sliderTime = t --watch the process in viewport

)--end t loop

w.getNumKeyframes() --show the number of keyframes

print ( w.getWaterHeightsAtTime 0 ) --print the heights on frame 0

See also

MAXScript Extensions for Reactor


reactor_Cloth : Modifier

reactor_Cloth - superclass: Modifier; super-superclass:MAXWrapper - classID: #(929247493, 1302554794)

Value > MAXWrapper > Modifier > reactor_Cloth

Description:

The Cloth Modifier lets you to turn any 2d geometry into a deformable mesh, allowing you to simulate the behavior of objects such as curtains, clothes, metal sheets, and flags. You can specify a number of special properties for your cloth objects, including stiffness and how the object folds.

Constructor:

reactor_Cloth...

Properties:

.adm_defMesh (Deformable_Mesh) : node

Get/Set the Deformable Mesh node.

.adm_ignoreCollisions (Ignore_Collisions) : boolean

When set to true, Deformable Mesh collisions will not be calculated.

.arb_rigidBody (Rigid_Body) : node

Get/Set the Rigid Body node.

.arb_doNotAffectRigidBody (Do_Not_Affect_RigidBody) : boolean

When set to true, the Rigid Body will not be calculated.

.arb_ignoreCollisions (Ignore_Collisions) : boolean

When set to true, Rigid Body collisions will not be calculated.

.kf_useStoredKeyframes (Use_Stored_Keyframes) : boolean

When set to true, stored keyframes will be used.

.mass : float

Get/Set the Mass value.

.simpleStiffness (Stiffness) : float

The stiffness of the cloth used by the Simple Force Model.

.friction : float

Get/Set the coefficient of friction for the cloth's surface. As with rigid bodies, this affects how smoothly the cloth will move relative to surfaces it’s in contact with. The friction values for both objects are combined to produce a coefficient for the interaction

.avoidSelfIntersections (Avoid_Self_Intersections) : boolean

When set to true, the cloth will not appear to intersect with itself during the simulation. This results in a more realistic-looking simulation, but may increase simulation time.

.useCurrentState (Use_Current_State) : boolean

When set to true, the cloth object will start the simulation in its current state in the viewport.

.constrainDeformation (Constrain_Deformation) : boolean

When set to true, limits how much the cloth can stretch.

.maxDeformation (Max_Deformation) : float

Get/Set the max. deformation percentage value which indicates how stretchy the cloth is - cloth with a low value will hardly stretch at all

.simpleDamping (Damping) : float

Get/Set the damping value which governs how quickly the cloth dissipates energy as it changes shape.

NOTE:

A value specified here will not have the same effect as the same damping value using the complex force model.

.relativeDensity (Relative_Density) : float

Get/Set the relative density value.

.airResistance (Air_Resistance) : float

Get/Set the air resistance value which governs the extent to which the cloth will lose energy as it moves.

.forceModel (Force_Model) : integer

Get/Set the Force Model. Possible values are

0 - Simple Force Model

1 - Complex Force Model

.complexStretch (Stretch) : float

This value governs how easy it is to stretch the cloth when using the Complex Force Method.

.complexBend (Bend) : float

This value governs how easy it is to bend the cloth when using the Complex Force Method.

.complexShear (Shear) : float

This value governs how easy it is to exert a shear effect on the cloth when using the Complex Force Method.

.complexDamping (Damping) : float

This governs how quickly the cloth dissipates energy as it changes shape when using the Complex Force Method.

.foldStiffnessModel : integer

Fold stiffness governs how easily the cloth folds. By default, cloth objects have no fold stiffness, and will behave like a loose material such as silk.

0 - None (default)

1 - Uniform Model

2 - Spatial Model

.simpleFoldStiffness (Fold_Stiffness) : float

The fold stiffness used by the Uniform Model.

.complexFoldStiffness (Fold_Stiffness) : float

The fold stiffness used by the Spatial Model.

.foldStiffnessDistance (Distance) : float

Get/Set the degree of fold stiffness per unit area. A Distance value of 2 refers to twice the average triangle edge length in the cloth - so a large Distance value results in a large concentration of fold stiffness per unit area.

.foldStifnessSpreadAngle (Spread_Angle) : float

Get/Set the degree to which fold stiffness is added to cloth when it has a non-flat shape. The angle relates to the threshold angle between two parts of the cloth, below which stiffness is added. If this value is zero, fold stiffness will only be added to flat parts of the cloth.

.foldStifnessSplitAngle (Split_Angle) : float

Get/Set the degree to which fold stiffness is added, specifically how fold stiffness is concentrated along the grid lines of the cloth's original mesh.

.useSoftSelection (Use_Soft_Selection) : boolean

When set to true, the Soft Selection will be used to smooth the transition between keyframed and simulated vertices for this deformable object.

Interfaces:

Interface: rctClothInterface

Properties:

.currentVertexSelection : bitArray by value : Read|Write

Get/Set the current vertex selection as bitArray.

.currentConstraintIndex : integer : Read|Write

Get/Set the index of the current constraint in the list.

.currentConstraintName : string : Read|Write

Get/Set the name of the current constraint in the list.

Methods:

<string>currentConstraintDescription()

Returns the description of the current Constraint as string.

<integer>addAttachToRigidBodyConstraint()

Corresponds to pressing the "Attach To Rigid Body" button in the UI. Returns the list index of the new constraint.

<integer>addAttachToDefMeshConstraint()

Corresponds to pressing the "Attach To DefMesh" button in the UI. Returns the list index of the new constraint.

<integer>addFixVerticesConstraint()

Corresponds to pressing the "Fix Vertices" button in the UI. Returns the list index of the new constraint.

<integer>addKeyframeVerticesConstraint()

Corresponds to pressing the "Keyframe Vertices" button in the UI. Returns the list index of the new constraint.

<boolean>deleteConstraint()

Corresponds to pressing the "Delete Constraint" button in the UI. Returns true on success.

<integer>getNumStoredKeyframes()

Returns the number of stored keyframes.

<void>clearStoredKeyframes()

Removes the stored keyframes.

See also

CLCollection : Helper

MAXScript Extensions for Reactor


reactor_Rope : Modifier

reactor_Rope - superclass: Modifier; super-superclass:MAXWrapper - classID: #(841627188, 1926716125)

Value > MAXWrapper > Modifier > reactor_Rope

Constructor

reactor_SoftBody...

Properties:

.adm_defMesh (Deformable_Mesh) : node

Get/Set the Deformable Mesh node.

.adm_ignoreCollisions (Ignore_Collisions) : boolean

Get/Set the state of the "Ignore Collisions" checkbox in the "Attach To DefMesh" rollout.

.arb_rigidBody (Rigid_Body) : node

Get/Set the Rigid Body node.

.arb_doNotAffectRigidBody (Do_Not_Affect_Rigid_Body) : boolean

When set to true, the Rigid Body will not be affected.

.arb_ignoreCollisions (Ignore_Collisions) : boolean

When set to true, Rigid Body collisions will not be calculated.

.kf_useStoredKeyframes (Use_Stored_Keyframes) : boolean

When set to true, stored keyframes will be used.

.mass : float

Get/Set the Mass value.

.simpleStiffness (Stiffness) : float

Get/Set the Stiffness value which governs how much the rope can stretch.

.friction : float

Get/Set the Friction value.

.avoidSelfIntersections (Avoid_Self_Intersections) : boolean

Get/Set the state of the "Avoid Self-Intersection" checkbox in the "Properties" rollout.

.useCurrentState (Use_Current_State) : boolean

When set to true, the rope will start the simulation in its current state in the viewport.

.damping : float

Get/Set the damping value which governs how quickly oscillations settle down when the rope is compressed or expands.

.airResistance (Air_Resistance) : float

Get/Set the air resistance value which governs the extent to which the rope will lose energy as it moves.

.type : integer

Get/Set the Rope Type. Possible values are

0 - Spring

1 - Constraint

.thickness : float

Get/Set the Thickness value.

.numWeaves (Num_Weaves) : integer

Get/Set the Num Weaves value which determines to what extent the rope's inflexibility extends across vertices. For example, a Num Weaves value of 3 ensures that all vertices 3 sections or less apart are subject to extra forces to stop bending. This means that large Num Weaves value produce a very inflexible rope, whereas small values (like the default) mean that only sections very close to each other will have restricted relative movement.

.keepShape (Keep_Shape) : boolean

When set to true, the rope will try to keep its original shape rather than returning to a straight line

.useSoftSelection (Use_Soft_Selection) : boolean

When set to true, Soft Selection will be used to smooth the transition between keyframed and simulated vertices for this deformable object.

Interfaces:

Interface: rctRopeInterface

Properties:

.currentVertexSelection : bitArray by value : Read|Write

Get/Set the current vertex selection as bitArray.

.currentConstraintIndex : integer : Read|Write

Get/Set the index of the current constraint in the list.

.currentConstraintName : string : Read|Write

Get/Set the name of the current constraint in the list.

Methods:

<string>currentConstraintDescription()

Returns the description of the current Constraint as string.

<integer>addAttachToRigidBodyConstraint()

Corresponds to pressing the "Attach To Rigid Body" button in the UI. Returns the list index of the new constraint.

<integer>addAttachToDefMeshConstraint()

Corresponds to pressing the "Attach To DefMesh" button in the UI. Returns the list index of the new constraint.

<integer>addFixVerticesConstraint()

Corresponds to pressing the "Fix Vertices" button in the UI. Returns the list index of the new constraint.

<integer>addKeyframeVerticesConstraint()

Corresponds to pressing the "Keyframe Vertices" button in the UI. Returns the list index of the new constraint.

<boolean>deleteConstraint()

Corresponds to pressing the "Delete Constraint" button in the UI. Returns true on success.

<integer>getNumStoredKeyframes()

Returns the number of stored keyframes.

<void>clearStoredKeyframes()

Removes the stored keyframes.

See also

RBCollection : Helper

MAXScript Extensions for Reactor


reactor_SoftBody : Modifier

reactor_SoftBody - superclass: Modifier; super-superclass:MAXWrapper - classID: #(1023033509, 867046762)

Value > MAXWrapper > Modifier > reactor_SoftBody

Constructor

reactor_SoftBody...

Properties

.adm_defMesh (Deformable_Mesh) : node

Get/Set the Deformable Mesh node.

.adm_ignoreCollisions (Ignore_Collisions) : boolean

When set to true, Deformable Mesh collisions will not be calculated.

.arb_rigidBody (RigidBody) : node

Get/Set the Rigid Body node.

.arb_doNotAffectRigidBody (Do_Not_Affect_RigidBody) : boolean

When set to true, the Rigid Body will not be affected.

.arb_ignoreCollisions (Ignore_Collisions) : boolean

When set to true, Rigid Body collisions will not be calculated.

.kf_useStoredKeyframes (Use_Stored_Keyframes) : boolean

When set to true, stored keyframes will be used.

.mass : float

Get/Set the Mass value.

.stiffness : float

The stiffness of the soft body - this governs how stretchy the body is.

.friction : float

Get/Set the Friction value.

.useCurrentState (Use_Current_State) : boolean

When set to true, the Soft Body object will start the simulation in its current state in the viewport.

.damping : float

Get/Set the damping coefficient for the oscillation of the soft body's compression and expansion

.method : integer

Get/Set the simulation method. Possible values are:

0 - Mesh-based

1 - FFD-Based

.ffdStableConfiguration (Stable_Configuration) : integer

Get/Set the stable configuration source. Possible values are:

0 - Original Box

1 - Frame

.ffdStableFrame (Stable_Frame) : integer

Get/Set the stable configuration frame:

.avoidSelfIntersections (Avoid_Self_Intersections) : boolean

When set to true, the Soft Body will not appear to intersect with itself during the simulation. This results in a more realistic-looking simulation, but may increase simulation time.

.useSoftSelection (Use_Soft_Selection) : boolean

When set to true, the Soft Selection will be used to smooth the transition between keyframed and simulated vertices for this deformable object.

.animateTransform (Animate_Transform) : boolean

When set to true, animated object transformations will be taken into account by the simulation.

Interfaces:

Interface: rctSoftBodyInterface

Properties:

.currentVertexSelection : bitArray by value : Read|Write

Get/Set the current vertex selection as bitArray.

.currentConstraintIndex : integer : Read|Write

Get/Set the index of the current constraint in the list.

.currentConstraintName : string : Read|Write

Get/Set the name of the current constraint in the list.

Methods:

<string>currentConstraintDescription()

Returns the description of the current Constraint as string.

<integer>addAttachToRigidBodyConstraint()

Corresponds to pressing the "Attach To Rigid Body" button in the UI. Returns the list index of the new constraint.

<integer>addAttachToDefMeshConstraint()

Corresponds to pressing the "Attach To DefMesh" button in the UI. Returns the list index of the new constraint.

<integer>addFixVerticesConstraint()

Corresponds to pressing the "Fix Vertices" button in the UI. Returns the list index of the new constraint.

<integer>addKeyframeVerticesConstraint()

Corresponds to pressing the "Keyframe Vertices" button in the UI. Returns the list index of the new constraint.

<boolean>deleteConstraint()

Corresponds to pressing the "Delete Constraint" button in the UI. Returns true on success.

<integer>getNumStoredKeyframes()

Returns the number of stored keyframes.

<void>clearStoredKeyframes()

Removes the stored keyframes.

See also

SBCollection : Helper

MAXScript Extensions for Reactor


MAXScript Extensions for mental ray

This page shows some of the mental ray related classes and interfaces.

mental ray Renderer

mental_ray_renderer : RendererClass

mental ray Preferences

Interface: mental_ray_Preferences

mental ray Arch and Design Material and Physical Sky Shaders:

Arch___Design__mi: material

mr_Physical_Sky : textureMap

mental ray Material:

mental_ray : material

mental ray Custom Attributes:

mental_ray__Area_Light_custom_attribute : CustAttrib

mental_ray__Indirect_Illumination_custom_attribute : CustAttrib

mental_ray__light_shader_custom_attribute : CustAttrib

mental_ray__material_custom_attribute : CustAttrib

mental ray Lights and Shadows:

miAreaLight : light

miAreaLightomni : light

mental_ray_Shadow_Map : Shadow

mental ray Sub-Surface Scattering (SSS) Shaders:

Sub-Surface Scattering - mental ray Shaders

mental ray Ambient Occlusion Shaders:

Ambient_Reflective_Occlusion__3dsmax : textureMap

mental ray Shaders Indices:

mental ray Shaders Index

max mental ray Shaders Index

3dsmax mental ray Shaders Index

lume mental ray Shaders Index


mental ray Shaders Index

NEW in 3ds Max 2009: The following mental ray shaders have been added to 3ds Max 2009 and are largely part of an Autodesk-wide shader set ensuring interoperability between the Autodesk applications supporting mental ray as their renderer.

adsk Shaders

The following shaders implement Autodesk cross-application features:

adsk_aspect_ratio_height_per_width : textureMap

adsk_aspect_ratio_width_per_height : textureMap

adsk_blurred_reflection_multiplier : textureMap

adsk_blurred_refraction_multiplier : textureMap

adsk_decal : textureMap

adsk_environment : textureMap

adsk_Metal_Cutouts__Round : textureMap

adsk_Metal_Cutouts__Square : textureMap

adsk_Metal_Noise_Anodized : textureMap

adsk_Metal_Patterns__Knurls : textureMap

adsk_Metal_switch_color_shader : textureMap

adsk_scale_internal_to_meters : textureMap

adsk_scale_meters_to_internal_inverse : textureMap

adsk_scale_meters_to_internal : textureMap

adsk_Shd_Ceramic : textureMap

adsk_Shd_Ceramic_spider : textureMap

adsk_Shd_Concrete : textureMap

adsk_Shd_Concrete_spider : textureMap

adsk_Shd_Fabric_spider : textureMap

adsk_Shd_Glazing : textureMap

adsk_Shd_Glazing_spider : textureMap

adsk_Shd_Hardwood : textureMap

adsk_Shd_Hardwood_spider : textureMap

adsk_Shd_Lightmap : textureMap

adsk_Shd_MasonryCMU : textureMap

adsk_Shd_MasonryCMU_spider : textureMap

adsk_Shd_Metal__Bronze : textureMap

adsk_Shd_Metal__Copper : textureMap

adsk_Shd_Metal_spider : textureMap

adsk_Shd_MetallicPaint__adsk : textureMap

adsk_Shd_MetallicPaint_spider : textureMap

adsk_Shd_Mirror_spider : textureMap

adsk_Shd_PlasticVinyl : textureMap

adsk_Shd_PlasticVinyl_spider : textureMap

adsk_Shd_SolidGlass : textureMap

adsk_Shd_SolidGlass_spider : textureMap

adsk_Shd_Stone : textureMap

adsk_Shd_Stone_spider : textureMap

adsk_Shd_WallPaint : textureMap

adsk_Shd_WallPaint_spider : textureMap

adsk_Shd_Water_spider : textureMap

adsk_Tex_Concrete_SmoothBumpTex : textureMap

adsk_texture_lookup : textureMap

adsk_texture_placer : textureMap

adsk_Utility_Bitmap : textureMap

adsk_Utility_Bitmap_Tweak : textureMap

adsk_Utility_GenericNoise : textureMap

adsk_Utility_LightmapSwitcher : textureMap

adsk_Utility_Noise_Tweakable : textureMap

adsk_uvsetid_translator : textureMap

Bump_Combiner__adsk : material

Bump_Combiner__adsktextureMap : textureMap

Color_Correction__adsk : textureMap

Displace_Combiner__adsk : material

max Shaders

The following shaders implement 3ds Max features, materials and textures:

max mental ray Shaders Index

3dsmax mental ray Shaders Index

maya Shaders

The following shaders implement Autodesk Maya features required for data interchange with 3ds Max:

mayabase_version : textureMap

A

maya_ambientlight : textureMap

maya_anisotropic : textureMap

maya_arealight : textureMap

B

maya_bakelightmap : textureMap

maya_bakevertices : textureMap

maya_blend : textureMap

maya_blinn : textureMap

maya_blobbyparticles : textureMap

maya_box : textureMap

maya_bulge : textureMap

maya_bump2d : textureMap

maya_bump3d : textureMap

C

maya_cameradata : textureMap

maya_checker : textureMap

maya_clamp : textureMap

maya_cloth : textureMap

maya_cloud : textureMap

maya_cloudparticles : textureMap

maya_color_to_hsv : textureMap

maya_color_to_rgb : textureMap

maya_color_to_vector : textureMap

maya_condition : textureMap

maya_cone : textureMap

maya_contour : textureMap

maya_contourcontrast : textureMap

maya_contouroutput : textureMap

maya_contourstore : textureMap

maya_contrast : textureMap

maya_crater : textureMap

maya_curve : textureMap

D

maya_directionallight : textureMap

maya_displace : textureMap

maya_distancebetween : textureMap

maya_dof : textureMap

maya_doubleswitch : textureMap

E

maya_envball : textureMap

maya_envchrome : textureMap

maya_envcolor : textureMap

maya_envcube : textureMap

maya_envfog : textureMap

maya_envsky : textureMap

maya_envsphere : textureMap

F

maya_file : textureMap

maya_float_to_int : textureMap

maya_fluidshader : textureMap

maya_fluidtexture2d : textureMap

maya_fluidtexture3d : textureMap

maya_fractal : textureMap

maya_fur : textureMap

G

maya_gamma : textureMap

maya_granite : textureMap

maya_grid : textureMap

H

maya_hairshader : textureMap

maya_hairtubeshader : textureMap

maya_hardwareparticles : textureMap

maya_hsv_to_color : textureMap

maya_hsvtorgb : textureMap

I

maya_iblemitter : textureMap

maya_iblenv : textureMap

maya_ibllight : textureMap

maya_imageplane : textureMap

maya_imageplanedata : textureMap

maya_int_to_float : textureMap

L

maya_lambert : textureMap

maya_layeredshader : textureMap

maya_layeredtexture : textureMap

maya_leather : textureMap

maya_lenslightmap : textureMap

maya_lightdata : textureMap

maya_lightfog : textureMap

maya_lightinfo : textureMap

maya_lightlink : textureMap

maya_luminance : textureMap

M

maya_marble : textureMap

maya_material_displace : textureMap

maya_mountain : textureMap

maya_multdiv : textureMap

N

maya_noise : textureMap

O

maya_objectdata : textureMap

maya_ocean : textureMap

maya_oceanshader : textureMap

maya_options : textureMap

P

maya_particlecloud : textureMap

maya_particlesamplerinfo : textureMap

maya_phong : textureMap

maya_phongE : textureMap

maya_photonsurface : textureMap

maya_place2dtex : textureMap

maya_place3dtex : textureMap

maya_plusminusavg : textureMap

maya_pointlight : textureMap

maya_postlightmap : textureMap

maya_projection : textureMap

Q

maya_quadswitch : textureMap

R

maya_ramp : textureMap

maya_rampshader : textureMap

maya_remapcolor : textureMap

maya_remaphsv : textureMap

maya_remapvalue : textureMap

maya_reverse : textureMap

maya_rgb_to_color : textureMap

maya_rgbtohsv : textureMap

maya_rock : textureMap

S

maya_samplerinfo : textureMap

maya_scalar_curve : textureMap

maya_setrange : textureMap

maya_shaderglow : textureMap

maya_shadingengine : textureMap

maya_shadingmap : textureMap

maya_shadow : textureMap

maya_shapelight : textureMap

maya_singleswitch : textureMap

maya_snow : textureMap

maya_solidfractal : textureMap

maya_sphere : textureMap

maya_spotlight : textureMap

maya_state : textureMap

maya_stencil : textureMap

maya_stucco : textureMap

maya_surfaceluminance : textureMap

maya_surfaceshader : textureMap

T

maya_time_curve : textureMap

maya_tripleswitch : textureMap

maya_tubeparticles : textureMap

U

maya_unitconversion : textureMap

maya_usebackground : textureMap

maya_uvchooser : textureMap

maya_uvw_to_vector : textureMap

V

maya_vector_to_color : textureMap

maya_vector_to_uvw : textureMap

maya_vector_to_xyz : textureMap

maya_vectorproduct : textureMap

maya_vertexcolors : textureMap

maya_vertexdata : textureMap

maya_volumefog : textureMap

maya_volumelight : textureMap

maya_volumenoise : textureMap

maya_volumesampler : textureMap

maya_volumeshader : textureMap

W

maya_w10fur : textureMap

maya_water : textureMap

maya_wood : textureMap

maya_woodgrain : textureMap

X

maya_xyz_to_vector : textureMap

mi Shaders

Environment_Background_Camera_Map__mi : textureMap

Environment_Background_Switcher__mi : textureMap

Environment_Probe_Chrome_Ball__mi : textureMap

Environment_Probe_Gray_Ball__mi : textureMap

Simple_Mtl Shaders

Simple_Mtl_Ceramic__adsk : material

Simple_Mtl_Concrete__adsk : material

Simple_Mtl_Generic__adsk : material

Simple_Mtl_Glazing__adsk : material

Simple_Mtl_Hardwood__adsk : material

Simple_Mtl_Masonry_CMU__adsk : material

Simple_Mtl_Metal__adsk : material

Simple_Mtl_Metal__adsktextureMap : textureMap

Simple_Mtl_MetallicPaint__adsk : material

Simple_Mtl_Mirror__adsk : material

Simple_Mtl_Plastic_Vinyl__adsk : material

Simple_Mtl_Solid_Glass__adsk : material

Simple_Mtl_Stone__adsk : material

Simple_Mtl_Wall_Paint__adsk : material

Simple_Mtl_Water__adsk : material

Simple Texture Maps

Simple_Checker_Map__adsk : textureMap

Simple_Hemispherical_Map__adsk : textureMap

Simple_Image_Map__Bitmap___adsk : textureMap

Simple_Marble_Map__adsk : textureMap

Simple_Noise_Map__adsk : textureMap

Simple_Speckle_Map__adsk : textureMap

Simple_Tile_Map__adsk : textureMap

Simple_Wave_Map__adsk : textureMap

Simple_Wood_Map__adsk : textureMap

Utility Shaders

Utility_BumpLookup__protein : textureMap

Utility_Color_Correction_Internal__protein : textureMap

Utility_ColorCorrection_Maya_Shaders__protein : textureMap

Utility_ColorPassThrough__protein : textureMap

Utility_Combine3Bump__protein : textureMap

Utility_Elliptical_Bump__protein : textureMap

Utility_Elliptical_Tex__protein : textureMap

Utility_Gamma___Gain__mi : textureMap

Utility_Mia_Material__protein : textureMap

Utility_Mix2Shader__protein : textureMap

Utility_MultiMixer__protein : textureMap

Utility_ShaderPassThrough__protein : textureMap

Utility_Switch8Shader__protein : textureMap

Utility_TexLookup__protein : textureMap

Other mental ray Shaders

RGB_to_BW : textureMap

Render_Subset_of_Scene_Masking__mi : textureMap

mental ray Render Elements

A&D Level Render Elements

mr_A_D_Level__Diffuse : RenderElement

mr_A_D_Level__Opacity : RenderElement

mr_A_D_Level__Reflections : RenderElement

mr_A_D_Level__Specular : RenderElement

mr_A_D_Level__Translucency : RenderElement

mr_A_D_Level__Transparency : RenderElement

A&D Level Render Elements

mr_A_D_Output__Beauty : RenderElement

mr_A_D_Output__Diffuse_Direct_Illumination : RenderElement

mr_A_D_Output__Diffuse_Indirect_Illumination : RenderElement

mr_A_D_Output__Opacity_Background : RenderElement

mr_A_D_Output__Reflections : RenderElement

mr_A_D_Output__Self_Illumination : RenderElement

mr_A_D_Output__Specular : RenderElement

mr_A_D_Output__Translucency : RenderElement

mr_A_D_Output__Transparency : RenderElement

A&D Raw Render Elements

mr_A_D_Raw__Ambient_Occlusion : RenderElement

mr_A_D_Raw__Diffuse_Direct_Illumination : RenderElement

mr_A_D_Raw__Diffuse_Indirect_Illumination : RenderElement

mr_A_D_Raw__Opacity_Background : RenderElement

mr_A_D_Raw__Reflections : RenderElement

mr_A_D_Raw__Specular : RenderElement

mr_A_D_Raw__Translucency : RenderElement

mr_A_D_Raw__Transparency : RenderElement

Other mental ray Render Elements

mr_A_D_Xtra__Diffuse_Indirect_Illumination_with_AO : RenderElement

mr_Shader_Element : RenderElement

See also

MAXScript Extensions for mental ray


mental_ray : material

mental_ray - superclass: material; super-superclass:MAXWrapper - 21:0 - classID: #(1764145697, 2047913125)

NOTE: Unsupported feature.

Constructors:

mental_ray...

mrMaterial...

Properties:

<mental_ray>.Opaque BooleanClass default: false -- animatable; Boolean

<mental_ray>.Surface UndefinedClass default: undefined -- texmap; Surface_Shader

<mental_ray>.Bump UndefinedClass default: undefined -- texmap; Bump_Shader

<mental_ray>.Displacement UndefinedClass default: undefined -- texmap; Displacement_Shader

<mental_ray>.Shadow UndefinedClass default: undefined -- texmap; Shadow_Shader

<mental_ray>.Volume UndefinedClass default: undefined -- texmap; Volume_Shader

<mental_ray>.Environment UndefinedClass default: undefined -- texmap; Environment_Shader

<mental_ray>.Photon UndefinedClass default: undefined -- texmap; Photon_Shader

<mental_ray>.PhotonVolume UndefinedClass default: undefined -- texmap; Photon_Volume_Shader

<mental_ray>.SurfaceOn BooleanClass default: true -- Boolean; Surface_Shader_On

<mental_ray>.BumpOn BooleanClass default: true -- Boolean; Bump_Shader_On

<mental_ray>.DisplaceOn BooleanClass default: true -- Boolean; Displacement_Shader_On

<mental_ray>.ShadowOn BooleanClass default: true -- Boolean; Shadow_Shader_On

<mental_ray>.VolumeOn BooleanClass default: true -- Boolean; Volume_Shader_On

<mental_ray>.EnvironmentOn BooleanClass default: true -- Boolean; Environment_Shader_On

<mental_ray>.PhotonOn BooleanClass default: true -- Boolean; Photon_Shader_On

<mental_ray>.PhotonVolOn BooleanClass default: true -- Boolean; Photon_Volume_Shader_On

<mental_ray>.Contour UndefinedClass default: undefined -- texmap; Contour_Shader

<mental_ray>.LightMap UndefinedClass default: undefined -- texmap; Light_Map_Shader

<mental_ray>.ContourOn BooleanClass default: true -- Boolean; Contour_Shader_On

<mental_ray>.LightMapOn BooleanClass default: true -- Boolean; Light_Shader_On

mental_ray interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

MAXScript Extensions for mental ray


miAreaLight : light

miAreaLight - superclass: light; super-superclass:node - 9:1 - classID: #(112233, 554434)

NOTE: Unsupported feature.

Constructors:

miAreaLight...

Properties:

<miAreaLight>.Area_Enable BooleanClass default: true -- animatable; Boolean

<miAreaLight>.Area_Visible BooleanClass default: false -- animatable; Boolean

<miAreaLight>.Area_Type Integer default: 1 -- animatable; integer

<miAreaLight>.Disc_Radius Float default: 1.0 -- animatable; world units

<miAreaLight>.Rectangle_Height Float default: 1.0 -- animatable; world units

<miAreaLight>.Rectangle_Width Float default: 1.0 -- animatable; world units

<miAreaLight>.Area_U_Samples Integer default: 5 -- animatable; integer

<miAreaLight>.Area_V_Samples Integer default: 5 -- animatable; integer

<miAreaLight>.target_spot targetSpot default: Target Spot -- SubAnim

miAreaLight interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

MAXScript Extensions for mental ray


miAreaLightomni : light

miAreaLightomni - superclass: light; super-superclass:node - 8:1 - classID: #(112233, 554433)

NOTE: Unsupported feature.

Constructors:

MiAreaLightomni...

Properties:

<miAreaLightomni>.Area_Enable BooleanClass default: true -- animatable; Boolean

<miAreaLightomni>.Area_Visible BooleanClass default: false -- animatable; Boolean

<miAreaLightomni>.Area_Type Integer default: 1 -- animatable; integer

<miAreaLightomni>.Sphere_Radius Float default: 1.0 -- animatable; world units

<miAreaLightomni>.Cylinder_Height Float default: 1.0 -- animatable; world units

<miAreaLightomni>.Area_U_Samples Integer default: 5 -- animatable; integer

<miAreaLightomni>.Area_V_Samples Integer default: 5 -- animatable; integer

<miAreaLightomni>.omni_light Omnilight default: Omni Light -- !error setting value!; SubAnim

miAreaLightomni interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

MAXScript Extensions for mental ray


mr_Sky_Portal : light

mr_sky_portal - superclass: light; super-superclass:node - classID: #(861693276, 941707697)

Value > MAXWrapper > Node > Light > Photometric > mr_Sky_Portal

The mr_Sky_Portal light allows light from outdoors sources like skylight or HDRI environment maps to be transferred indoors. Available in 3ds Max 2008 and higher.

Constructors:

mr_sky_portal...

mrSkylightPortal…

Properties:

<mr_Sky_Portal>.on BooleanClass default: true -- animatable; boolean; Portal_Enabled

Get/Set the enabled state of the portal.

<mr_Sky_Portal>.Multiplier Float default: 1.0 -- animatable; float

Get/Set the multiplier value of the Portal.

<mr_Sky_Portal>.rgbFilter Color default: (color 255 255 255) -- animatable; fRGBA color; Filter_Color; Controller Scaling: ([1,1,1,1] : (color 255 255 255)); WeirdScaled ([1,1,1,1])

Get/Set the filter color.

Shadows

<mr_Sky_Portal>.castShadows BooleanClass default: true -- boolean

Get/Set the whether light transmitted by the portal will cast shadows.

<mr_Sky_Portal>.extend_shadows BooleanClass default: false -- boolean

Get/Set the whether light from "Outdoors" will cast shadows.

<mr_Sky_Portal>.shadow_samples Integer default: 3 -- integer; shadowSamples

Get/Set the selection of the shadow samples drop-down list.

Possible values are:

0 - 2

1 - 4

2 - 8

3 - 16

4 - 32

5 - 64

6 - 128

7 - 256

8 - 512

9 - 1024

Dimensions

<mr_Sky_Portal>.light_length Float default: 100.0 -- animatable; float; Length

Get/Set the length of the portal.

<mr_Sky_Portal>.light_width Float default: 100.0 -- animatable; float; Width

Get/Set the width of the portal.

<mr_Sky_Portal>.reversed BooleanClass default: false -- boolean; Reversed_Flux_Direction

Get/set the Flip Light Flux Direction option. When set to true, light will be transmitted in the opposite direction of the portal's arrow.

Advanced Parameterts

<mr_Sky_Portal>.Area_Visible BooleanClass default: false -- animatable; boolean; Visible

Get/Set whether the Portal will be visible to the rendered or not.

<mr_Sky_Portal>.transparency Color default: (color 255 255 255) -- animatable; fRGBA color; Controller Scaling: ([1,1,1,1] : (color 255 255 255));

Get/Set the transparency of the portal when visible to the renderer.

<mr_Sky_Portal>.mode Integer default: 2 -- integer

Get/Set the state of the Color Source radio button.

Possible values are:

0 - Custom

1 - Use Scene Environment

2 - Use existing Skylight

Other Properties

<mr_Sky_Portal>.cutoff Float default: 0.0 -- animatable; float; Cutoff_level

Get/Set the Cutoff level.

<mr_Sky_Portal>.cutoff_rr BooleanClass default: false -- boolean; Unbiased_Cutoff__RR

Get/Set whether to use Biased or Unbiased Cutoff.

<mr_Sky_Portal>.Map UndefinedClass default: undefined -- texturemap

See also

MAXScript Extensions for mental ray


mental_ray_Shadow_Map : Shadow

mental_ray_Shadow_Map - superclass: Shadow; super-superclass:MAXWrapper - 9:0 - classID: #(1354802990, 1043063653)

Constructors:

mental_ray_Shadow_Map...

mrShadowMap...

Properties:

<mental_ray_Shadow_Map>.Map_Size Integer default: 512 -- animatable; integer

Get/Set the shadow map size in pixels.

<mental_ray_Shadow_Map>.Sample_Range Float default: 0.0 -- animatable; float

Get/Set the shadow map sampling range.

<mental_ray_Shadow_Map>.EnableTransparency BooleanClass default: false -- animatable; boolean; Enable_Transparency

Toggle transparency support on and off.

<mental_ray_Shadow_Map>.Samples Integer default: 4 -- animatable; integer

Get/Set the shadow map samples count.

<mental_ray_Shadow_Map>.TransparencyAccuracy Float default: 0.0 -- animatable; world units; Transparency_Accuracy

Get/Set the transparency accuracy.

<mental_ray_Shadow_Map>.TransparencyDoColor BooleanClass default: true -- animatable; boolean; Transparency_Do_Color

When set to true, transparent shadows will pick up the color of the transparent surface. When false, the shadow will ignore color.

<mental_ray_Shadow_Map>.TransparencyMaxSamples Integer default: 4 -- animatable; integer; Transparency_Maximum_Samples

Get/Set the max. number of transparency samples.

<mental_ray_Shadow_Map>.Bias Float default: 10.0 -- animatable; worldUnits

Get/Set the Shadow Map Bias value. Available in 3ds Max 8 and higher.

<mental_ray_Shadow_Map>.UseBias BooleanClass default: false -- animatable; boolean; Use_Bias

When set to true, the Bias value will be used. Available in 3ds Max 8 and higher.

See also

MAXScript Extensions for mental ray


mental_ray__Area_Light_custom_attribute : CustAttrib

mental_ray__Area_Light_custom_attribute - superclass: CustAttrib; super-superclass:MAXWrapper - 2:0 - classID: #(1431068166, 844117948)

NOTE: Unsupported feature.

Constructors:

mental_ray__Area_Light_custom_attribute...

mrAreaLightCustAttrib ...

Properties:

<mental_ray__Area_Light_custom_attribute>.mr_EnableAreaSampling BooleanClass default: true -- Boolean; mr_Enable_Area_Sampling

<mental_ray__Area_Light_custom_attribute>.mr_NumAreaSamples Integer default: 32 -- integer; mr_Number_of_Area_Samples

See also

MAXScript Extensions for mental ray


mental_ray__Indirect_Illumination_custom_attribute : CustAttrib

mental_ray__Indirect_Illumination_custom_attribute - superclass: CustAttrib; super-superclass:MAXWrapper - 9:0 - classID: #(967576263, 1518354347)

NOTE: Unsupported feature.

Constructors:

mental_ray__Indirect_Illumination_custom_attribute...

mrIICustAttrib...

Properties:

<mental_ray__Indirect_Illumination_custom_attribute>.mrII_On BooleanClass default: false -- animatable; Boolean

<mental_ray__Indirect_Illumination_custom_attribute>.mrII_Energy Float default: 50000.0 -- animatable; float

<mental_ray__Indirect_Illumination_custom_attribute>.mrII_Decay Float default: 2.0 -- animatable; float

<mental_ray__Indirect_Illumination_custom_attribute>.mrII_CausticsPhotons Integer default: 10000 -- animatable; integer; mrII_Caustics_Photons

<mental_ray__Indirect_Illumination_custom_attribute>.mrII_GIPhotons Integer default: 10000 -- animatable; integer; mrII_GI_Photons

<mental_ray__Indirect_Illumination_custom_attribute>.mrII_UseGlobals BooleanClass default: true -- animatable; Boolean; mrII_Use_Globals

<mental_ray__Indirect_Illumination_custom_attribute>.mrII_GlobalEnergyMultiplier Float default: 1.0 -- animatable; float; mrII_Global_Energy_Multiplier

<mental_ray__Indirect_Illumination_custom_attribute>.mrII_GlobalCausticPhotonMultiplier Float default: 1.0 -- animatable; float; mrII_Global_Caustic_Photon_Multiplier

<mental_ray__Indirect_Illumination_custom_attribute>.mrII_GlobalGIPhotonMultiplier Float default: 1.0 -- animatable; float; mrII_Global_GI_Photon_Multiplier

See also

MAXScript Extensions for mental ray


mental_ray__light_shader_custom_attribute : CustAttrib

mental_ray__light_shader_custom_attribute - superclass: CustAttrib; super-superclass:MAXWrapper - 3:0 - classID: #(967576520, 1518555053)

NOTE: Unsupported feature.

Constructors:

mental_ray__light_shader_custom_attribute...

mrLightShaderCustAttrib

Properties:

<mental_ray__light_shader_custom_attribute>.mr_EnableLightShader BooleanClass default: false -- Boolean; mr_Enable_Light_Shader

<mental_ray__light_shader_custom_attribute>.mr_LightShader UndefinedClass default: undefined -- texmap; mr_Light_Shader

<mental_ray__light_shader_custom_attribute>.mr_EmitterShader UndefinedClass default: undefined -- texmap; mr_Emitter_Shader

See also

MAXScript Extensions for mental ray


mental_ray__material_custom_attribute : CustAttrib

mental_ray__material_custom_attribute - superclass: CustAttrib; super-superclass:MAXWrapper - 37:0 - classID: #(562738265, 635210112)

NOTE: Unsupported feature.

Constructors:

mental_ray__material_custom_attribute...

mrMaterialCustAttrib...

Properties:

<mental_ray__material_custom_attribute>.Opaque BooleanClass default: false -- animatable; Boolean

<mental_ray__material_custom_attribute>.Surface UndefinedClass default: undefined -- texmap

<mental_ray__material_custom_attribute>.Displacement UndefinedClass default: undefined -- texmap

<mental_ray__material_custom_attribute>.Shadow UndefinedClass default: undefined -- texmap

<mental_ray__material_custom_attribute>.Volume UndefinedClass default: undefined -- texmap

<mental_ray__material_custom_attribute>.Environment UndefinedClass default: undefined -- texmap

<mental_ray__material_custom_attribute>.Contour UndefinedClass default: undefined -- texmap

<mental_ray__material_custom_attribute>.Photon UndefinedClass default: undefined -- texmap

<mental_ray__material_custom_attribute>.PhotonVolume UndefinedClass default: undefined -- texmap; Photon_Volume

<mental_ray__material_custom_attribute>.LightMap UndefinedClass default: undefined -- texmap; Light_Map

<mental_ray__material_custom_attribute>.SurfaceLocked BooleanClass default: true -- Boolean; Surface_Locked

<mental_ray__material_custom_attribute>.DisplacementLocked BooleanClass default: true -- Boolean; Displacement_Locked

<mental_ray__material_custom_attribute>.ShadowLocked BooleanClass default: true -- Boolean; Shadow_Locked

<mental_ray__material_custom_attribute>.VolumeLocked BooleanClass default: true -- Boolean; Volume_Locked

<mental_ray__material_custom_attribute>.EnvironmentLocked BooleanClass default: true -- Boolean; Environment_Locked

<mental_ray__material_custom_attribute>.ContourLocked BooleanClass default: true -- Boolean; Contour_Locked

<mental_ray__material_custom_attribute>.PhotonLocked BooleanClass default: true -- Boolean; Photon_Locked

<mental_ray__material_custom_attribute>.PhotonVolumeLocked BooleanClass default: true -- Boolean; PhotonVolume_Locked

<mental_ray__material_custom_attribute>.LightMapLocked BooleanClass default: true -- Boolean; LightMap_Locked

<mental_ray__material_custom_attribute>.SurfaceLockShow BooleanClass default: false -- Boolean; Show_Surface_Lock

<mental_ray__material_custom_attribute>.DisplacementLockShow BooleanClass default: false -- Boolean; Show_Displacement_Lock

<mental_ray__material_custom_attribute>.ShadowLockShow BooleanClass default: false -- Boolean; Show_Shadow_Lock

<mental_ray__material_custom_attribute>.VolumeLockShow BooleanClass default: false -- Boolean; Show_Volume_Lock

<mental_ray__material_custom_attribute>.EnvironmentLockShow BooleanClass default: false -- Boolean; Show_Environment_Lock

<mental_ray__material_custom_attribute>.ContourLockShow BooleanClass default: false -- Boolean; Show_Contour_Lock

<mental_ray__material_custom_attribute>.PhotonLockShow BooleanClass default: false -- Boolean; Show_Photon_Lock

<mental_ray__material_custom_attribute>.PhotonVolumeLockShow BooleanClass default: false -- Boolean; Show_PhotonVolume_Lock

<mental_ray__material_custom_attribute>.LightMapLockShow BooleanClass default: false -- Boolean; Show_LightMap_Lock

<mental_ray__material_custom_attribute>.SurfaceON BooleanClass default: true -- Boolean; Surface_On

<mental_ray__material_custom_attribute>.DisplacementON BooleanClass default: true -- Boolean; Displacement_On

<mental_ray__material_custom_attribute>.ShadowON BooleanClass default: true -- Boolean; Shadow_On

<mental_ray__material_custom_attribute>.VolumeON BooleanClass default: true -- Boolean; Volume_On

<mental_ray__material_custom_attribute>.EnvironmentON BooleanClass default: true -- Boolean; Environment_On

<mental_ray__material_custom_attribute>.ContourON BooleanClass default: true -- Boolean; Contour_On

<mental_ray__material_custom_attribute>.PhotonON BooleanClass default: true -- Boolean; Photon_On

<mental_ray__material_custom_attribute>.ON BooleanClass default: true -- Boolean; Photon_Volume_On

<mental_ray__material_custom_attribute>.LightMapON BooleanClass default: true -- Boolean; Light_Map_On

See also

MAXScript Extensions for mental ray


mr_Physical_Sky : textureMap

mr_Physical_Sky - superclass: textureMap; super-superclass:material - 25:0 - classID: #(1653483166, 1916299967)

This shader provides means to render realistic physical sky using mental ray.

Available in 3ds Max 9 and higher.

Constructors:

mr_physical_sky...

Properties:

Roll over and click a rollout area to jump to description:

<mr_Physical_Sky>.BackgroundMapOn BooleanClass default: false -- animatable; boolean; Background_Map_On

Get/set the state of the Use Custom Background Map checkbox.

<mr_Physical_Sky>.BackgroundMap UndefinedClass default: undefined -- texturemap; Background_Map

Get/set the Custom Background Map.

Sun Disk Appearance

<mr_Physical_Sky>.SunIntensity Float default: 1.0 -- animatable; float; Sun_Intensity

Get/set the Sun Disk Intensity value.

<mr_Physical_Sky>.SunScale Float default: 4.0 -- animatable; float; Sun_Scale

Get/set the Sun Scale value.

<mr_Physical_Sky>.SunGlow Float default: 1.0 -- animatable; float; Glow_Intensity

Get/set the Sun Glow Intensity value.

Inherit from mr Sky

<mr_Physical_Sky>.InheritFromSky BooleanClass default: true -- animatable; boolean; Inherit_from_mr_Sky

Get/set the state of the Inherit from mr_Sky checkbox.

<mr_Physical_Sky>.multiplier Float default: 1.0 -- animatable; float

Get/set the Multiplier value.

<mr_Physical_Sky>.Haze Float default: 0.0 -- animatable; float

Get/set the Haze value.

<mr_Physical_Sky>.HazeMapOn BooleanClass default: true -- animatable; boolean; Haze_Map_On

Get/set the state of the Use Haze Map checkbox.

<mr_Physical_Sky>.HazeMap UndefinedClass default: undefined -- texturemap

Get/set the Haze Map.

Horizon and Ground

<mr_Physical_Sky>.HorizonHeight Float default: 0.0 -- animatable; float; Horizon_Height

Get/set the Horizon Height value.

<mr_Physical_Sky>.HorizonBlur Float default: 0.1 -- animatable; float; Horizon_Blur

Get/set the Horizon Blur value.

<mr_Physical_Sky>.GroundColor Color default: (color 51 51 51) -- animatable; fRGBA color; Ground_Color; Controller Scaling: ([1,1,1,1] : (color 255 255 255));

Get/set the Ground Color value.

<mr_Physical_Sky>.GroundColorMapOn BooleanClass default: true -- animatable; boolean; Ground_Map_On

Get/set the state of the Use Ground Color Map checkbox.

<mr_Physical_Sky>.GroundColorMap UndefinedClass default: undefined -- texturemap; Ground_Map

Get/set the Ground Color value.

After Dark

<mr_Physical_Sky>.NightColor Color default: (color 0 0 0) -- animatable; fRGBA color; Night_Color

Get/set the Night Color value.

<mr_Physical_Sky>.NightColorMapOn BooleanClass default: true -- animatable; boolean; Night_Color_Map_On

Get/set the state of the Use Night Color Map checkbox.

<mr_Physical_Sky>.NightColorMap UndefinedClass default: undefined -- texturemap; Night_Color_Map

Get/set the Night Color Map.

Non-Physical Tuning

<mr_Physical_Sky>.Redness Float default: 0.0 -- animatable; float

Get/set the Red/Blue Tint value.

<mr_Physical_Sky>.RednessMapOn BooleanClass default: true -- animatable; boolean; Redness_Map_On

Get/set the state of the Use Red/Blue Tint Map checkbox.

<mr_Physical_Sky>.RednessMap UndefinedClass default: undefined -- texturemap; Redness_Map

Get/set the Red/Blue Tint Map.

<mr_Physical_Sky>.Saturation Float default: 1.0 -- animatable; float

Get/set the Saturation value.

<mr_Physical_Sky>.SaturationMapOn BooleanClass default: true -- animatable; boolean; Saturation_Map_On

Get/set the state of the Use Saturation Map checkbox.

<mr_Physical_Sky>.SaturationMap UndefinedClass default: undefined -- texturemap; Saturation_Map

Get/set the Saturation Map.

Aerial Perspective (when used as lens / volume shader only)

<mr_Physical_Sky>.AerialPerspective Float default: 0.0 -- animatable; float; Aerial_Perspective

Get/set the Visibility Distance (10% haze) value.

mr_Physical_Sky interfaces:

Interface: imrShaderTranslation_ClassInfo

Properties:

Methods:

Actions:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

MAXScript Extensions for mental ray


Sub-Surface Scattering - mental ray Shaders

The following shaders implement physical and fast (non-physical) Sub-Surface Scattering in mental ray:

SSS_Fast_Material__mi : Material

SSS_Fast_Render_Shader__mi : textureMap

SSS_Fast_Skin_Material__mi : Material

SSS_Lambert_Gamma__mi : textureMap

SSS_Lightmap_Write__mi : textureMap

SSS_Physical_Material__mi : Material

SSS_Physical_Shader__mi : textureMap

SSS_Specular_Reflections_for_Skin__mi : textureMap

See also

MAXScript Extensions for mental ray

Mental_Ray_Renderer : RendererClass


SSS_Fast_Material__mi : Material

SSS_Fast_Material__mi - superclass: material; super-superclass:MAXWrapper - 84:0 - classID: #(2004030991, -1422106089)

Unsupported MAXScript Feature.

Constructors:

SSS_Fast_Material__mi ...

misss_fast_simple_phen ...

Properties:

<SSS_Fast_Material__mi>.a UndefinedClass default: undefined -- null

<SSS_Fast_Material__mi>.ambient Color default: (color 0 0 0) -- animatable; RGB color; null;

<SSS_Fast_Material__mi>.'ambient.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Material__mi>.'ambient.paramName' UndefinedClass default: undefined -- string; null;

<SSS_Fast_Material__mi>.'ambient.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Material__mi>.back_sss_color Color default: (color 204 102 25.5) -- animatable; RGB color; null;

<SSS_Fast_Material__mi>.'back_sss_color.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Material__mi>.'back_sss_color.paramName' UndefinedClass default: undefined -- string; null;

<SSS_Fast_Material__mi>.'back_sss_color.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Material__mi>.back_sss_depth Float default: 10.0 -- animatable; world units; null

<SSS_Fast_Material__mi>.'back_sss_depth.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Material__mi>.'back_sss_depth.paramName' UndefinedClass default: undefined -- string; null;

<SSS_Fast_Material__mi>.'back_sss_depth.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Material__mi>.back_sss_radius Float default: 10.0 -- animatable; world units; null

<SSS_Fast_Material__mi>.'back_sss_radius.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Material__mi>.'back_sss_radius.paramName' UndefinedClass default: undefined -- string; null;

<SSS_Fast_Material__mi>.'back_sss_radius.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Material__mi>.back_sss_weight Float default: 0.5 -- animatable; float; null

<SSS_Fast_Material__mi>.'back_sss_weight.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Material__mi>.'back_sss_weight.paramName' UndefinedClass default: undefined -- string; null;

<SSS_Fast_Material__mi>.'back_sss_weight.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Material__mi>.bump Bump__3dsmax default: Bump (3dsmax):Bump (3dsmax) -- texmap; null; SubAnim

SSS_Fast_Material__mi.bump - superclass: textureMap; super-superclass:material - 7:0 - classID: #(2004031007, 1963415618)

<SSS_Fast_Material__mi.bump>.Map UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Material__mi.bump>.Multiplier Float default: 1.0 -- animatable; float; null

<SSS_Fast_Material__mi.bump>.'Multiplier.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Material__mi.bump>.'Multiplier.paramName' UndefinedClass default: undefined -- string; null;

<SSS_Fast_Material__mi.bump>.'Multiplier.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Material__mi>.d UndefinedClass default: undefined -- null

<SSS_Fast_Material__mi>.depthmap String default: "" -- filename; null

<SSS_Fast_Material__mi>.diffuse_color Color default: (color 255 255 255) -- animatable; RGB color; null;

<SSS_Fast_Material__mi>.'diffuse_color.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Material__mi>.'diffuse_color.paramName' UndefinedClass default: undefined -- string; null

<SSS_Fast_Material__mi>.'diffuse_color.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Material__mi>.diffuse_weight Float default: 0.5 -- animatable; float; null

<SSS_Fast_Material__mi>.'diffuse_weight.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Material__mi>.'diffuse_weight.paramName' UndefinedClass default: undefined -- string; null

<SSS_Fast_Material__mi>.'diffuse_weight.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Material__mi>.exponent Float default: 33.0 -- animatable; float; null

<SSS_Fast_Material__mi>.'exponent.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Material__mi>.'exponent.paramName' UndefinedClass default: undefined -- string; null

<SSS_Fast_Material__mi>.'exponent.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Material__mi>.falloff Float default: 2.0 -- animatable; float; null

<SSS_Fast_Material__mi>.'falloff.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Material__mi>.'falloff.paramName' UndefinedClass default: undefined -- string; null

<SSS_Fast_Material__mi>.'falloff.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Material__mi>.front_sss_color Color default: (color 204 102 25.5) -- animatable; RGB color; null

<SSS_Fast_Material__mi>.'front_sss_color.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Material__mi>.'front_sss_color.paramName' UndefinedClass default: undefined -- string; null

<SSS_Fast_Material__mi>.'front_sss_color.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Material__mi>.front_sss_radius Float default: 10.0 -- animatable; world units; null

<SSS_Fast_Material__mi>.'front_sss_radius.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Material__mi>.'front_sss_radius.paramName' UndefinedClass default: undefined -- string; null

<SSS_Fast_Material__mi>.'front_sss_radius.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Material__mi>.front_sss_weight Float default: 0.5 -- animatable; float; null

<SSS_Fast_Material__mi>.'front_sss_weight.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Material__mi>.'front_sss_weight.paramName' UndefinedClass default: undefined -- string; null;

<SSS_Fast_Material__mi>.'front_sss_weight.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Material__mi>.ImplicitLights ArrayParameter default: #() -- node array; null; SubAnim

<SSS_Fast_Material__mi>.indirect BooleanClass default: false -- animatable; boolean; null

<SSS_Fast_Material__mi>.lightmap String default: "" -- filename; null

<SSS_Fast_Material__mi>.lightmap_gamma Float default: 0.75 -- animatable; float; null

<SSS_Fast_Material__mi>.lightmap_group String default: "A" -- string; null

<SSS_Fast_Material__mi>.lightmap_size Float default: 50.0 -- animatable; float; null

<SSS_Fast_Material__mi>.Lights ArrayParameter default: #() -- node array; null; SubAnim

<SSS_Fast_Material__mi>.mode Integer default: 0 -- animatable; integer; null

<SSS_Fast_Material__mi>.overall_color Color default: (color 255 255 255) -- animatable; RGB color; null

<SSS_Fast_Material__mi>.'overall_color.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Material__mi>.'overall_color.paramName' UndefinedClass default: undefined -- string; null

<SSS_Fast_Material__mi>.'overall_color.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Material__mi>.s UndefinedClass default: undefined -- null

<SSS_Fast_Material__mi>.Samples Integer default: 64 -- animatable; integer; null

<SSS_Fast_Material__mi>.'Samples.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Material__mi>.'Samples.paramName' UndefinedClass default: undefined -- string; null

<SSS_Fast_Material__mi>.'Samples.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Material__mi>.scale_conversion Float default: 1.0 -- animatable; float; null

<SSS_Fast_Material__mi>.'scale_conversion.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Material__mi>.'scale_conversion.paramName' UndefinedClass default: undefined -- string; null

<SSS_Fast_Material__mi>.'scale_conversion.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Material__mi>.scatter_bias Float default: 0.1 -- animatable; float; null

<SSS_Fast_Material__mi>.specular Color default: (color 127.5 127.5 127.5) -- animatable; RGB color; null

<SSS_Fast_Material__mi>.'specular.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Material__mi>.'specular.paramName' UndefinedClass default: undefined -- string; null

<SSS_Fast_Material__mi>.'specular.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Material__mi>.'Use lights' BooleanClass default: false -- boolean; null

SSS_Fast_Material__mi interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

MAXScript Extensions for mental ray


SSS_Fast_Render_Shader__mi : textureMap

SSS_Fast_Render_Shader__mi : textureMap {7773161f,4a20678a}

Unsupported MAXScript Feature.

Class instances not creatable by MAXScript

Aliases:

SSS_Fast_Render_Shader__mi

misss_fast_shader

Properties:

<SSS_Fast_Render_Shader__mi>.lightmap ((null)) : filename

<SSS_Fast_Render_Shader__mi>.'Image Frame Number' ((null)) : integer

<SSS_Fast_Render_Shader__mi>.depthmap ((null)) : filename

<SSS_Fast_Render_Shader__mi>.'Image Frame Number' ((null)) : integer

<SSS_Fast_Render_Shader__mi>.bump ((null)) : texmap

<SSS_Fast_Render_Shader__mi>.diffuse_illum ((null)) : texmap

<SSS_Fast_Render_Shader__mi>.diffuse_color ((null)) : RGB color

<SSS_Fast_Render_Shader__mi>.specular_illum ((null)) : texmap

<SSS_Fast_Render_Shader__mi>.diffuse_weight ((null)) : float

<SSS_Fast_Render_Shader__mi>.front_sss_color ((null)) : RGB color

<SSS_Fast_Render_Shader__mi>.front_sss_weight ((null)) : float

<SSS_Fast_Render_Shader__mi>.front_sss_radius ((null)) : world units

<SSS_Fast_Render_Shader__mi>.back_sss_color ((null)) : RGB color

<SSS_Fast_Render_Shader__mi>.back_sss_weight ((null)) : float

<SSS_Fast_Render_Shader__mi>.back_sss_radius ((null)) : world units

<SSS_Fast_Render_Shader__mi>.back_sss_depth ((null)) : world units

<SSS_Fast_Render_Shader__mi>.scale_conversion ((null)) : float

<SSS_Fast_Render_Shader__mi>.screen_composit ((null)) : boolean

<SSS_Fast_Render_Shader__mi>.output_sss_only ((null)) : boolean

<SSS_Fast_Render_Shader__mi>.falloff ((null)) : float

<SSS_Fast_Render_Shader__mi>.samples ((null)) : integer

<SSS_Fast_Render_Shader__mi>.diffuse_color.connected ((null)) : boolean

<SSS_Fast_Render_Shader__mi>.diffuse_color.shader ((null)) : texmap

<SSS_Fast_Render_Shader__mi>.diffuse_color.paramName ((null)) : string

<SSS_Fast_Render_Shader__mi>.diffuse_weight.connected ((null)) : boolean

<SSS_Fast_Render_Shader__mi>.diffuse_weight.shader ((null)) : texmap

<SSS_Fast_Render_Shader__mi>.diffuse_weight.paramName ((null)) : string

<SSS_Fast_Render_Shader__mi>.front_sss_color.connected ((null)) : boolean

<SSS_Fast_Render_Shader__mi>.front_sss_color.shader ((null)) : texmap

<SSS_Fast_Render_Shader__mi>.front_sss_color.paramName ((null)) : string

<SSS_Fast_Render_Shader__mi>.front_sss_weight.connected ((null)) : boolean

<SSS_Fast_Render_Shader__mi>.front_sss_weight.shader ((null)) : texmap

<SSS_Fast_Render_Shader__mi>.front_sss_weight.paramName ((null)) : string

<SSS_Fast_Render_Shader__mi>.front_sss_radius.connected ((null)) : boolean

<SSS_Fast_Render_Shader__mi>.front_sss_radius.shader ((null)) : texmap

<SSS_Fast_Render_Shader__mi>.front_sss_radius.paramName ((null)) : string

<SSS_Fast_Render_Shader__mi>.back_sss_color.connected ((null)) : boolean

<SSS_Fast_Render_Shader__mi>.back_sss_color.shader ((null)) : texmap

<SSS_Fast_Render_Shader__mi>.back_sss_color.paramName ((null)) : string

<SSS_Fast_Render_Shader__mi>.back_sss_weight.connected ((null)) : boolean

<SSS_Fast_Render_Shader__mi>.back_sss_weight.shader ((null)) : texmap

<SSS_Fast_Render_Shader__mi>.back_sss_weight.paramName ((null)) : string

<SSS_Fast_Render_Shader__mi>.back_sss_radius.connected ((null)) : boolean

<SSS_Fast_Render_Shader__mi>.back_sss_radius.shader ((null)) : texmap

<SSS_Fast_Render_Shader__mi>.back_sss_radius.paramName ((null)) : string

<SSS_Fast_Render_Shader__mi>.back_sss_depth.connected ((null)) : boolean

<SSS_Fast_Render_Shader__mi>.back_sss_depth.shader ((null)) : texmap

<SSS_Fast_Render_Shader__mi>.back_sss_depth.paramName ((null)) : string

<SSS_Fast_Render_Shader__mi>.scale_conversion.connected ((null)) : boolean

<SSS_Fast_Render_Shader__mi>.scale_conversion.shader ((null)) : texmap

<SSS_Fast_Render_Shader__mi>.scale_conversion.paramName ((null)) : string

<SSS_Fast_Render_Shader__mi>.falloff.connected ((null)) : boolean

<SSS_Fast_Render_Shader__mi>.falloff.shader ((null)) : texmap

<SSS_Fast_Render_Shader__mi>.falloff.paramName ((null)) : string

<SSS_Fast_Render_Shader__mi>.samples.connected ((null)) : boolean

<SSS_Fast_Render_Shader__mi>.samples.shader ((null)) : texmap

<SSS_Fast_Render_Shader__mi>.samples.paramName ((null)) : string

<SSS_Fast_Render_Shader__mi>.TheList ((null)) : max object array

<SSS_Fast_Render_Shader__mi>.'Shader Version' ((null)) : integer

SSS_Fast_Render_Shader__mi interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

MAXScript Extensions for mental ray


SSS_Fast_Skin_Material__mi : Material

SSS_Fast_Skin_Material__mi - superclass: material; super-superclass:MAXWrapper - 145:0 - classID: #(2004030991, -1775007863)

Unsupported MAXScript Feature.

Constructors:

SSS_Fast_Skin_Material__mi ...

misss_fast_skin_phen ...

Properties:

<SSS_Fast_Skin_Material__mi>.a UndefinedClass default: undefined -- null

<SSS_Fast_Skin_Material__mi>.ambient Color default: (color 0 0 0) -- animatable; RGB color; null

<SSS_Fast_Skin_Material__mi>.'ambient.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Skin_Material__mi>.'ambient.paramName' UndefinedClass default: undefined -- string; null

<SSS_Fast_Skin_Material__mi>.'ambient.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Skin_Material__mi>.back_sss_color Color default: (color 178.5 25.5 25.5) -- animatable; RGB color; null

<SSS_Fast_Skin_Material__mi>.'back_sss_color.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Skin_Material__mi>.'back_sss_color.paramName' UndefinedClass default: undefined -- string; null

<SSS_Fast_Skin_Material__mi>.'back_sss_color.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Skin_Material__mi>.back_sss_depth Float default: 25.0 -- animatable; world units; null

<SSS_Fast_Skin_Material__mi>.'back_sss_depth.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Skin_Material__mi>.'back_sss_depth.paramName' UndefinedClass default: undefined -- string; null

<SSS_Fast_Skin_Material__mi>.'back_sss_depth.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Skin_Material__mi>.back_sss_radius Float default: 25.0 -- animatable; world units; null

<SSS_Fast_Skin_Material__mi>.'back_sss_radius.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Skin_Material__mi>.'back_sss_radius.paramName' UndefinedClass default: undefined -- string; null

<SSS_Fast_Skin_Material__mi>.'back_sss_radius.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Skin_Material__mi>.back_sss_weight Float default: 0.5 -- animatable; float; null

<SSS_Fast_Skin_Material__mi>.'back_sss_weight.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Skin_Material__mi>.'back_sss_weight.paramName' UndefinedClass default: undefined -- string; null

<SSS_Fast_Skin_Material__mi>.'back_sss_weight.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Skin_Material__mi>.bump Bump__3dsmax default: Bump (3dsmax):Bump (3dsmax) -- texmap; null; SubAnim

SSS_Fast_Skin_Material__mi.bump - superclass: textureMap; super-superclass:material - 7:0 - classID: #(2004031007, 1963415618)

<SSS_Fast_Skin_Material__mi.bump>.Map UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Skin_Material__mi.bump>.Multiplier Float default: 1.0 -- animatable; float; null

<SSS_Fast_Skin_Material__mi.bump>.'Multiplier.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Skin_Material__mi.bump>.'Multiplier.paramName' UndefinedClass default: undefined -- string; null

<SSS_Fast_Skin_Material__mi.bump>.'Multiplier.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Skin_Material__mi>.d UndefinedClass default: undefined -- null

<SSS_Fast_Skin_Material__mi>.depthmap String default: "" -- filename; null

<SSS_Fast_Skin_Material__mi>.diffuse_color Color default: (color 242.25 242.25 255) -- animatable; RGB color; null

<SSS_Fast_Skin_Material__mi>.'diffuse_color.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Skin_Material__mi>.'diffuse_color.paramName' UndefinedClass default: undefined -- string; null

<SSS_Fast_Skin_Material__mi>.'diffuse_color.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Skin_Material__mi>.diffuse_weight Float default: 0.3 -- animatable; float; null

<SSS_Fast_Skin_Material__mi>.'diffuse_weight.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Skin_Material__mi>.'diffuse_weight.paramName' UndefinedClass default: undefined -- string; null

<SSS_Fast_Skin_Material__mi>.'diffuse_weight.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Skin_Material__mi>.edge_factor Float default: 5.0 -- animatable; float; null

<SSS_Fast_Skin_Material__mi>.'edge_factor.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Skin_Material__mi>.'edge_factor.paramName' UndefinedClass default: undefined -- string; null

<SSS_Fast_Skin_Material__mi>.'edge_factor.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Skin_Material__mi>.environment UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Skin_Material__mi>.falloff Float default: 2.0 -- animatable; float; null

<SSS_Fast_Skin_Material__mi>.'falloff.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Skin_Material__mi>.'falloff.paramName' UndefinedClass default: undefined -- string; null

<SSS_Fast_Skin_Material__mi>.'falloff.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Skin_Material__mi>.front_sss_color Color default: (color 255 216.75 153) -- animatable; RGB color; null

<SSS_Fast_Skin_Material__mi>.'front_sss_color.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Skin_Material__mi>.'front_sss_color.paramName' UndefinedClass default: undefined -- string; null

<SSS_Fast_Skin_Material__mi>.'front_sss_color.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Skin_Material__mi>.front_sss_radius Float default: 8.0 -- animatable; world units; null

<SSS_Fast_Skin_Material__mi>.'front_sss_radius.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Skin_Material__mi>.'front_sss_radius.paramName' UndefinedClass default: undefined -- string; null

<SSS_Fast_Skin_Material__mi>.'front_sss_radius.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Skin_Material__mi>.front_sss_weight Float default: 0.5 -- animatable; float; null

<SSS_Fast_Skin_Material__mi>.'front_sss_weight.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Skin_Material__mi>.'front_sss_weight.paramName' UndefinedClass default: undefined -- string; null

<SSS_Fast_Skin_Material__mi>.'front_sss_weight.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Skin_Material__mi>.ImplicitLights ArrayParameter default: #() -- node array; null; SubAnim

<SSS_Fast_Skin_Material__mi>.indirect BooleanClass default: false -- animatable; boolean; null

<SSS_Fast_Skin_Material__mi>.lightmap String default: "" -- filename; null

<SSS_Fast_Skin_Material__mi>.lightmap_gamma Float default: 0.75 -- animatable; float; null

<SSS_Fast_Skin_Material__mi>.lightmap_group String default: "A" -- string; null

<SSS_Fast_Skin_Material__mi>.lightmap_size Float default: 50.0 -- animatable; float; null

<SSS_Fast_Skin_Material__mi>.Lights ArrayParameter default: #() -- node array; null; SubAnim

<SSS_Fast_Skin_Material__mi>.mid_sss_color Color default: (color 242.25 127.5 51) -- animatable; RGB color; null

<SSS_Fast_Skin_Material__mi>.'mid_sss_color.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Skin_Material__mi>.'mid_sss_color.paramName' UndefinedClass default: undefined -- string; null

<SSS_Fast_Skin_Material__mi>.'mid_sss_color.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Skin_Material__mi>.mid_sss_radius Float default: 25.0 -- animatable; world units; null

<SSS_Fast_Skin_Material__mi>.'mid_sss_radius.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Skin_Material__mi>.'mid_sss_radius.paramName' UndefinedClass default: undefined -- string; null

<SSS_Fast_Skin_Material__mi>.'mid_sss_radius.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Skin_Material__mi>.mid_sss_weight Float default: 0.4 -- animatable; float; null

<SSS_Fast_Skin_Material__mi>.'mid_sss_weight.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Skin_Material__mi>.'mid_sss_weight.paramName' UndefinedClass default: undefined -- string; null

<SSS_Fast_Skin_Material__mi>.'mid_sss_weight.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Skin_Material__mi>.mode Integer default: 0 -- animatable; integer; null

<SSS_Fast_Skin_Material__mi>.overall_color Color default: (color 255 255 255) -- animatable; RGB color; null

<SSS_Fast_Skin_Material__mi>.'overall_color.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Skin_Material__mi>.'overall_color.paramName' UndefinedClass default: undefined -- string; null

<SSS_Fast_Skin_Material__mi>.'overall_color.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Skin_Material__mi>.overall_weight Float default: 1.0 -- animatable; float; null

<SSS_Fast_Skin_Material__mi>.'overall_weight.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Skin_Material__mi>.'overall_weight.paramName' UndefinedClass default: undefined -- string; null

<SSS_Fast_Skin_Material__mi>.'overall_weight.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Skin_Material__mi>.primary_edge_weight Float default: 1.0 -- animatable; float; null

<SSS_Fast_Skin_Material__mi>.'primary_edge_weight.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Skin_Material__mi>.'primary_edge_weight.paramName' UndefinedClass default: undefined -- string; null

<SSS_Fast_Skin_Material__mi>.'primary_edge_weight.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Skin_Material__mi>.primary_shinyness Float default: 5.0 -- animatable; float; null

<SSS_Fast_Skin_Material__mi>.'primary_shinyness.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Skin_Material__mi>.'primary_shinyness.paramName' UndefinedClass default: undefined -- string; null

<SSS_Fast_Skin_Material__mi>.'primary_shinyness.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Skin_Material__mi>.primary_spec_color Color default: (color 191.25 229.5 255) -- animatable; RGB color; null

<SSS_Fast_Skin_Material__mi>.'primary_spec_color.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Skin_Material__mi>.'primary_spec_color.paramName' UndefinedClass default: undefined -- string; null

<SSS_Fast_Skin_Material__mi>.'primary_spec_color.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Skin_Material__mi>.primary_weight Float default: 0.3 -- animatable; float; null

<SSS_Fast_Skin_Material__mi>.'primary_weight.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Skin_Material__mi>.'primary_weight.paramName' UndefinedClass default: undefined -- string; null

<SSS_Fast_Skin_Material__mi>.'primary_weight.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Skin_Material__mi>.reflect_edge_weight Float default: 0.0 -- animatable; float; null

<SSS_Fast_Skin_Material__mi>.'reflect_edge_weight.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Skin_Material__mi>.'reflect_edge_weight.paramName' UndefinedClass default: undefined -- string; null

<SSS_Fast_Skin_Material__mi>.'reflect_edge_weight.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Skin_Material__mi>.reflect_environment_only BooleanClass default: false -- animatable; boolean; null

<SSS_Fast_Skin_Material__mi>.'reflect_environment_only.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Skin_Material__mi>.'reflect_environment_only.paramName' UndefinedClass default: undefined -- string; null

<SSS_Fast_Skin_Material__mi>.'reflect_environment_only.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Skin_Material__mi>.reflect_shinyness Float default: 2.0 -- animatable; float; null

<SSS_Fast_Skin_Material__mi>.'reflect_shinyness.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Skin_Material__mi>.'reflect_shinyness.paramName' UndefinedClass default: undefined -- string; null

<SSS_Fast_Skin_Material__mi>.'reflect_shinyness.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Skin_Material__mi>.reflect_weight Float default: 0.0 -- animatable; float; null

<SSS_Fast_Skin_Material__mi>.'reflect_weight.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Skin_Material__mi>.'reflect_weight.paramName' UndefinedClass default: undefined -- string; null

<SSS_Fast_Skin_Material__mi>.'reflect_weight.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Skin_Material__mi>.s UndefinedClass default: undefined -- null

<SSS_Fast_Skin_Material__mi>.Samples Integer default: 64 -- animatable; integer; null

<SSS_Fast_Skin_Material__mi>.'Samples.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Skin_Material__mi>.'Samples.paramName' UndefinedClass default: undefined -- string; null

<SSS_Fast_Skin_Material__mi>.'Samples.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Skin_Material__mi>.scale_conversion Float default: 1.0 -- animatable; float; null

<SSS_Fast_Skin_Material__mi>.'scale_conversion.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Skin_Material__mi>.'scale_conversion.paramName' UndefinedClass default: undefined -- string; null

<SSS_Fast_Skin_Material__mi>.'scale_conversion.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Skin_Material__mi>.scatter_bias Float default: 0.12 -- animatable; float; null

<SSS_Fast_Skin_Material__mi>.screen_composit BooleanClass default: true -- animatable; boolean; null

<SSS_Fast_Skin_Material__mi>.secondary_edge_weight Float default: 0.0 -- animatable; float; null

<SSS_Fast_Skin_Material__mi>.'secondary_edge_weight.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Skin_Material__mi>.'secondary_edge_weight.paramName' UndefinedClass default: undefined -- string; null

<SSS_Fast_Skin_Material__mi>.'secondary_edge_weight.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Skin_Material__mi>.secondary_shinyness Float default: 33.0 -- animatable; float; null

<SSS_Fast_Skin_Material__mi>.'secondary_shinyness.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Skin_Material__mi>.'secondary_shinyness.paramName' UndefinedClass default: undefined -- string; null

<SSS_Fast_Skin_Material__mi>.'secondary_shinyness.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Skin_Material__mi>.secondary_spec_color Color default: (color 229.5 242.25 255) -- animatable; RGB color; null

<SSS_Fast_Skin_Material__mi>.'secondary_spec_color.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Skin_Material__mi>.'secondary_spec_color.paramName' UndefinedClass default: undefined -- string; null

<SSS_Fast_Skin_Material__mi>.'secondary_spec_color.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Skin_Material__mi>.secondary_weight Float default: 0.3 -- animatable; float; null

<SSS_Fast_Skin_Material__mi>.'secondary_weight.connected' BooleanClass default: false -- boolean; null

<SSS_Fast_Skin_Material__mi>.'secondary_weight.paramName' UndefinedClass default: undefined -- string; null

<SSS_Fast_Skin_Material__mi>.'secondary_weight.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Fast_Skin_Material__mi>.'Use lights' BooleanClass default: false -- boolean; null

SSS_Fast_Skin_Material__mi interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

MAXScript Extensions for mental ray


SSS_Lambert_Gamma__mi : textureMap

SSS_Lambert_Gamma__mi : textureMap {7773161f,476eaa7d}

Unsupported MAXScript Feature.

Class instances not creatable by MAXScript

Aliases:

SSS_Lambert_Gamma__mi

misss_lambert_gamma

Properties:

<SSS_Lambert_Gamma__mi>.ambient ((null)) : fRGBA color

<SSS_Lambert_Gamma__mi>.ambience ((null)) : fRGBA color

<SSS_Lambert_Gamma__mi>.diffuse ((null)) : fRGBA color

<SSS_Lambert_Gamma__mi>.indirect ((null)) : boolean

<SSS_Lambert_Gamma__mi>.diffuse_curve ((null)) : float

<SSS_Lambert_Gamma__mi>.flip ((null)) : integer

<SSS_Lambert_Gamma__mi>.mode ((null)) : integer

<SSS_Lambert_Gamma__mi>.lights ((null)) : node array

<SSS_Lambert_Gamma__mi>.'Use lights' ((null)) : boolean

<SSS_Lambert_Gamma__mi>.ImplicitLights ((null)) : node array

<SSS_Lambert_Gamma__mi>.ambient.connected ((null)) : boolean

<SSS_Lambert_Gamma__mi>.ambient.shader ((null)) : texmap

<SSS_Lambert_Gamma__mi>.ambient.paramName ((null)) : string

<SSS_Lambert_Gamma__mi>.ambience.connected ((null)) : boolean

<SSS_Lambert_Gamma__mi>.ambience.shader ((null)) : texmap

<SSS_Lambert_Gamma__mi>.ambience.paramName ((null)) : string

<SSS_Lambert_Gamma__mi>.diffuse.connected ((null)) : boolean

<SSS_Lambert_Gamma__mi>.diffuse.shader ((null)) : texmap

<SSS_Lambert_Gamma__mi>.diffuse.paramName ((null)) : string

<SSS_Lambert_Gamma__mi>.diffuse_curve.connected ((null)) : boolean

<SSS_Lambert_Gamma__mi>.diffuse_curve.shader ((null)) : texmap

<SSS_Lambert_Gamma__mi>.diffuse_curve.paramName ((null)) : string

<SSS_Lambert_Gamma__mi>.TheList ((null)) : max object array

<SSS_Lambert_Gamma__mi>.'Shader Version' ((null)) : integer

SSS_Lambert_Gamma__mi interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

MAXScript Extensions for mental ray


SSS_Lightmap_Write__mi : textureMap

SSS_Lightmap_Write__mi : textureMap {7773161f,ab328b7d}

Unsupported MAXScript Feature.

Class instances not creatable by MAXScript

Aliases:

SSS_Lightmap_Write__mi

misss_lightmap_write

Properties:

<SSS_Lightmap_Write__mi>.lightmap ((null)) : filename

<SSS_Lightmap_Write__mi>.depthmap ((null)) : filename

<SSS_Lightmap_Write__mi>.lightmap_group ((null)) : string

<SSS_Lightmap_Write__mi>.lightmap_size ((null)) : float

<SSS_Lightmap_Write__mi>.write_lightmap ((null)) : integer

<SSS_Lightmap_Write__mi>.scatter_bias ((null)) : float

<SSS_Lightmap_Write__mi>.input ((null)) : texmap

<SSS_Lightmap_Write__mi>.Structure ((null))

<SSS_Lightmap_Write__mi>.point ((null)) : point3

<SSS_Lightmap_Write__mi>.normal ((null)) : point3

<SSS_Lightmap_Write__mi>.scatter_bias.connected ((null)) : boolean

<SSS_Lightmap_Write__mi>.scatter_bias.shader ((null)) : texmap

<SSS_Lightmap_Write__mi>.scatter_bias.paramName ((null)) : string

<SSS_Lightmap_Write__mi>.TheList ((null)) : max object array

<SSS_Lightmap_Write__mi>.'Shader Version' ((null)) : integer

SSS_Lightmap_Write__mi interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

MAXScript Extensions for mental ray


SSS_Physical_Material__mi : Material

SSS_Physical_Material__mi - superclass: material; super-superclass:MAXWrapper - 52:0 - classID: #(2004030991, 1313706113)

Unsupported MAXScript Feature.

Constructors:

SSS_Physical_Material__mi...

misss_physical_phen ...

Properties:

<SSS_Physical_Material__mi>.absorption_coeff Point3 default: [0.1,0.1,0.1] -- animatable; point3; null

<SSS_Physical_Material__mi>.'absorption_coeff.connected' BooleanClass default: false -- boolean; null

<SSS_Physical_Material__mi>.'absorption_coeff.paramName' UndefinedClass default: undefined -- string; null

<SSS_Physical_Material__mi>.'absorption_coeff.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Physical_Material__mi>.approx_diffusion BooleanClass default: true -- animatable; boolean; null

<SSS_Physical_Material__mi>.approx_multiple_scatter BooleanClass default: true -- animatable; boolean; null

<SSS_Physical_Material__mi>.approx_single_scatter BooleanClass default: true -- animatable; boolean; null

<SSS_Physical_Material__mi>.depth Float default: 1.0 -- animatable; float; null

<SSS_Physical_Material__mi>.'depth.connected' BooleanClass default: false -- boolean; null

<SSS_Physical_Material__mi>.'depth.paramName' UndefinedClass default: undefined -- string; null

<SSS_Physical_Material__mi>.'depth.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Physical_Material__mi>.ImplicitLights ArrayParameter default: #() -- node array; null; SubAnim

<SSS_Physical_Material__mi>.ior Float default: 1.0 -- animatable; float; null

<SSS_Physical_Material__mi>.'ior.connected' BooleanClass default: false -- boolean; null

<SSS_Physical_Material__mi>.'ior.paramName' UndefinedClass default: undefined -- string; null

<SSS_Physical_Material__mi>.'ior.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Physical_Material__mi>.Lights ArrayParameter default: #() -- node array; null; SubAnim

<SSS_Physical_Material__mi>.material Color default: (color 25.5 25.5 25.5) -- animatable; fRGBA color; null

<SSS_Physical_Material__mi>.'material.connected' BooleanClass default: false -- boolean; null

<SSS_Physical_Material__mi>.'material.paramName' UndefinedClass default: undefined -- string; null

<SSS_Physical_Material__mi>.'material.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Physical_Material__mi>.max_photons Integer default: 64 -- animatable; integer; null

<SSS_Physical_Material__mi>.'max_photons.connected' BooleanClass default: false -- boolean; null

<SSS_Physical_Material__mi>.'max_photons.paramName' UndefinedClass default: undefined -- string; null

<SSS_Physical_Material__mi>.'max_photons.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Physical_Material__mi>.max_radius Float default: 3.0 -- animatable; float; null

<SSS_Physical_Material__mi>.'max_radius.connected' BooleanClass default: false -- boolean; null

<SSS_Physical_Material__mi>.'max_radius.paramName' UndefinedClass default: undefined -- string; null

<SSS_Physical_Material__mi>.'max_radius.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Physical_Material__mi>.max_samples Integer default: 16 -- animatable; integer; null

<SSS_Physical_Material__mi>.'max_samples.connected' BooleanClass default: false -- boolean; null

<SSS_Physical_Material__mi>.'max_samples.paramName' UndefinedClass default: undefined -- string; null

<SSS_Physical_Material__mi>.'max_samples.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Physical_Material__mi>.scale_conversion Float default: 1.0 -- animatable; float; null

<SSS_Physical_Material__mi>.'scale_conversion.connected' BooleanClass default: false -- boolean; null

<SSS_Physical_Material__mi>.'scale_conversion.paramName' UndefinedClass default: undefined -- string; null

<SSS_Physical_Material__mi>.'scale_conversion.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Physical_Material__mi>.scattering_anisotropy Float default: 0.8 -- animatable; float; null

<SSS_Physical_Material__mi>.'scattering_anisotropy.connected' BooleanClass default: false -- boolean; null

<SSS_Physical_Material__mi>.'scattering_anisotropy.paramName' UndefinedClass default: undefined -- string; null

<SSS_Physical_Material__mi>.'scattering_anisotropy.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Physical_Material__mi>.scattering_coeff Point3 default: [1,1,1] -- animatable; point3; null

<SSS_Physical_Material__mi>.'scattering_coeff.connected' BooleanClass default: false -- boolean; null

<SSS_Physical_Material__mi>.'scattering_coeff.paramName' UndefinedClass default: undefined -- string; null

<SSS_Physical_Material__mi>.'scattering_coeff.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Physical_Material__mi>.transmission Color default: (color 204 204 204) -- animatable; fRGBA color; null

<SSS_Physical_Material__mi>.'transmission.connected' BooleanClass default: false -- boolean; null

<SSS_Physical_Material__mi>.'transmission.paramName' UndefinedClass default: undefined -- string; null

<SSS_Physical_Material__mi>.'transmission.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Physical_Material__mi>.'Use lights' BooleanClass default: false -- boolean; null

SSS_Physical_Material__mi interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

MAXScript Extensions for mental ray


SSS_Physical_Shader__mi : textureMap

SSS_Physical_Shader__mi - superclass: textureMap; super-superclass:material - 52:0 - classID: #(2004031007, -1101239015)

Unsupported MAXScript Feature.

Constructors:

SSS_Physical_Render_Shader__mi ...

misss_physical ...

Properties:

<SSS_Physical_Shader__mi>.absorption_coeff Point3 default: [0.1,0.1,0.1] -- animatable; point3; null

<SSS_Physical_Shader__mi>.'absorption_coeff.connected' BooleanClass default: false -- boolean; null

<SSS_Physical_Shader__mi>.'absorption_coeff.paramName' UndefinedClass default: undefined -- string; null

<SSS_Physical_Shader__mi>.'absorption_coeff.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Physical_Shader__mi>.approx_diffusion BooleanClass default: true -- animatable; boolean; null

<SSS_Physical_Shader__mi>.approx_multiple_scatter BooleanClass default: true -- animatable; boolean; null

<SSS_Physical_Shader__mi>.approx_single_scatter BooleanClass default: true -- animatable; boolean; null

<SSS_Physical_Shader__mi>.depth Float default: 1.0 -- animatable; float; null

<SSS_Physical_Shader__mi>.'depth.connected' BooleanClass default: false -- boolean; null

<SSS_Physical_Shader__mi>.'depth.paramName' UndefinedClass default: undefined -- string; null

<SSS_Physical_Shader__mi>.'depth.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Physical_Shader__mi>.ImplicitLights ArrayParameter default: #() -- node array; null; SubAnim

<SSS_Physical_Shader__mi>.ior Float default: 1.0 -- animatable; float; null

<SSS_Physical_Shader__mi>.'ior.connected' BooleanClass default: false -- boolean; null

<SSS_Physical_Shader__mi>.'ior.paramName' UndefinedClass default: undefined -- string; null

<SSS_Physical_Shader__mi>.'ior.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Physical_Shader__mi>.Lights ArrayParameter default: #() -- node array; null; SubAnim

<SSS_Physical_Shader__mi>.material Color default: (color 25.5 25.5 25.5) -- animatable; fRGBA color; null

<SSS_Physical_Shader__mi>.'material.connected' BooleanClass default: false -- boolean; null

<SSS_Physical_Shader__mi>.'material.paramName' UndefinedClass default: undefined -- string; null

<SSS_Physical_Shader__mi>.'material.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Physical_Shader__mi>.max_photons Integer default: 64 -- animatable; integer; null

<SSS_Physical_Shader__mi>.'max_photons.connected' BooleanClass default: false -- boolean; null

<SSS_Physical_Shader__mi>.'max_photons.paramName' UndefinedClass default: undefined -- string; null

<SSS_Physical_Shader__mi>.'max_photons.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Physical_Shader__mi>.max_radius Float default: 3.0 -- animatable; float; null

<SSS_Physical_Shader__mi>.'max_radius.connected' BooleanClass default: false -- boolean; null

<SSS_Physical_Shader__mi>.'max_radius.paramName' UndefinedClass default: undefined -- string; null

<SSS_Physical_Shader__mi>.'max_radius.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Physical_Shader__mi>.max_samples Integer default: 16 -- animatable; integer; null

<SSS_Physical_Shader__mi>.'max_samples.connected' BooleanClass default: false -- boolean; null

<SSS_Physical_Shader__mi>.'max_samples.paramName' UndefinedClass default: undefined -- string; null

<SSS_Physical_Shader__mi>.'max_samples.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Physical_Shader__mi>.scale_conversion Float default: 1.0 -- animatable; float; null

<SSS_Physical_Shader__mi>.'scale_conversion.connected' BooleanClass default: false -- boolean; null

<SSS_Physical_Shader__mi>.'scale_conversion.paramName' UndefinedClass default: undefined -- string; null

<SSS_Physical_Shader__mi>.'scale_conversion.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Physical_Shader__mi>.scattering_anisotropy Float default: 0.8 -- animatable; float; null

<SSS_Physical_Shader__mi>.'scattering_anisotropy.connected' BooleanClass default: false -- boolean; null

<SSS_Physical_Shader__mi>.'scattering_anisotropy.paramName' UndefinedClass default: undefined -- string; null

<SSS_Physical_Shader__mi>.'scattering_anisotropy.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Physical_Shader__mi>.scattering_coeff Point3 default: [1,1,1] -- animatable; point3; null

<SSS_Physical_Shader__mi>.'scattering_coeff.connected' BooleanClass default: false -- boolean; null

<SSS_Physical_Shader__mi>.'scattering_coeff.paramName' UndefinedClass default: undefined -- string; null

<SSS_Physical_Shader__mi>.'scattering_coeff.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Physical_Shader__mi>.transmission Color default: (color 204 204 204) -- animatable; fRGBA color; null

<SSS_Physical_Shader__mi>.'transmission.connected' BooleanClass default: false -- boolean; null

<SSS_Physical_Shader__mi>.'transmission.paramName' UndefinedClass default: undefined -- string; null

<SSS_Physical_Shader__mi>.'transmission.shader' UndefinedClass default: undefined -- texmap; null

<SSS_Physical_Shader__mi>.'Use lights' BooleanClass default: false -- boolean; null

SSS_Physical_Shader__mi interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

MAXScript Extensions for mental ray


SSS_Specular_Reflections_for_Skin__mi : textureMap

SSS_Specular_Reflections_for_Skin__mi : textureMap {7773161f,6440a07e}

Unsupported MAXScript Feature.

Class instances not creatable by MAXScript

Aliases:

SSS_Specular_Reflections_for_Skin__mi

misss_skin_specular

Properties:

<SSS_Specular_Reflections_for_Skin__mi>.overall_weight ((null)) : float

<SSS_Specular_Reflections_for_Skin__mi>.edge_factor ((null)) : float

<SSS_Specular_Reflections_for_Skin__mi>.primary_spec_color ((null)) : RGB color

<SSS_Specular_Reflections_for_Skin__mi>.primary_weight ((null)) : float

<SSS_Specular_Reflections_for_Skin__mi>.primary_edge_weight ((null)) : float

<SSS_Specular_Reflections_for_Skin__mi>.primary_shinyness ((null)) : float

<SSS_Specular_Reflections_for_Skin__mi>.secondary_spec_color ((null)) : RGB color

<SSS_Specular_Reflections_for_Skin__mi>.secondary_weight ((null)) : float

<SSS_Specular_Reflections_for_Skin__mi>.secondary_edge_weight ((null)) : float

<SSS_Specular_Reflections_for_Skin__mi>.secondary_shinyness ((null)) : float

<SSS_Specular_Reflections_for_Skin__mi>.reflect_weight ((null)) : float

<SSS_Specular_Reflections_for_Skin__mi>.reflect_edge_weight ((null)) : float

<SSS_Specular_Reflections_for_Skin__mi>.reflect_shinyness ((null)) : float

<SSS_Specular_Reflections_for_Skin__mi>.reflect_environment_only ((null)) : boolean

<SSS_Specular_Reflections_for_Skin__mi>.mode ((null)) : integer

<SSS_Specular_Reflections_for_Skin__mi>.lights ((null)) : node array

<SSS_Specular_Reflections_for_Skin__mi>.Use lights ((null)) : boolean

<SSS_Specular_Reflections_for_Skin__mi>.ImplicitLights ((null)) : node array

<SSS_Specular_Reflections_for_Skin__mi>.overall_weight.connected ((null)) : boolean

<SSS_Specular_Reflections_for_Skin__mi>.overall_weight.shader ((null)) : texmap

<SSS_Specular_Reflections_for_Skin__mi>.overall_weight.paramName ((null)) : string

<SSS_Specular_Reflections_for_Skin__mi>.edge_factor.connected ((null)) : boolean

<SSS_Specular_Reflections_for_Skin__mi>.edge_factor.shader ((null)) : texmap

<SSS_Specular_Reflections_for_Skin__mi>.edge_factor.paramName ((null)) : string

<SSS_Specular_Reflections_for_Skin__mi>.primary_spec_color.connected ((null)) : boolean

<SSS_Specular_Reflections_for_Skin__mi>.primary_spec_color.shader ((null)) : texmap

<SSS_Specular_Reflections_for_Skin__mi>.primary_spec_color.paramName ((null)) : string

<SSS_Specular_Reflections_for_Skin__mi>.primary_weight.connected ((null)) : boolean

<SSS_Specular_Reflections_for_Skin__mi>.primary_weight.shader ((null)) : texmap

<SSS_Specular_Reflections_for_Skin__mi>.primary_weight.paramName ((null)) : string

<SSS_Specular_Reflections_for_Skin__mi>.primary_edge_weight.connected ((null)) : boolean

<SSS_Specular_Reflections_for_Skin__mi>.primary_edge_weight.shader ((null)) : texmap

<SSS_Specular_Reflections_for_Skin__mi>.primary_edge_weight.paramName ((null)) : string

<SSS_Specular_Reflections_for_Skin__mi>.primary_shinyness.connected ((null)) : boolean

<SSS_Specular_Reflections_for_Skin__mi>.primary_shinyness.shader ((null)) : texmap

<SSS_Specular_Reflections_for_Skin__mi>.primary_shinyness.paramName ((null)) : string

<SSS_Specular_Reflections_for_Skin__mi>.secondary_spec_color.connected ((null)) : boolean

<SSS_Specular_Reflections_for_Skin__mi>.secondary_spec_color.shader ((null)) : texmap

<SSS_Specular_Reflections_for_Skin__mi>.secondary_spec_color.paramName ((null)) : string

<SSS_Specular_Reflections_for_Skin__mi>.secondary_weight.connected ((null)) : boolean

<SSS_Specular_Reflections_for_Skin__mi>.secondary_weight.shader ((null)) : texmap

<SSS_Specular_Reflections_for_Skin__mi>.secondary_weight.paramName ((null)) : string

<SSS_Specular_Reflections_for_Skin__mi>.secondary_edge_weight.connected ((null)) : boolean

<SSS_Specular_Reflections_for_Skin__mi>.secondary_edge_weight.shader ((null)) : texmap

<SSS_Specular_Reflections_for_Skin__mi>.secondary_edge_weight.paramName ((null)) : string

<SSS_Specular_Reflections_for_Skin__mi>.secondary_shinyness.connected ((null)) : boolean

<SSS_Specular_Reflections_for_Skin__mi>.secondary_shinyness.shader ((null)) : texmap

<SSS_Specular_Reflections_for_Skin__mi>.secondary_shinyness.paramName ((null)) : string

<SSS_Specular_Reflections_for_Skin__mi>.reflect_weight.connected ((null)) : boolean

<SSS_Specular_Reflections_for_Skin__mi>.reflect_weight.shader ((null)) : texmap

<SSS_Specular_Reflections_for_Skin__mi>.reflect_weight.paramName ((null)) : string

<SSS_Specular_Reflections_for_Skin__mi>.reflect_edge_weight.connected ((null)) : boolean

<SSS_Specular_Reflections_for_Skin__mi>.reflect_edge_weight.shader ((null)) : texmap

<SSS_Specular_Reflections_for_Skin__mi>.reflect_edge_weight.paramName ((null)) : string

<SSS_Specular_Reflections_for_Skin__mi>.reflect_shinyness.connected ((null)) : boolean

<SSS_Specular_Reflections_for_Skin__mi>.reflect_shinyness.shader ((null)) : texmap

<SSS_Specular_Reflections_for_Skin__mi>.reflect_shinyness.paramName ((null)) : string

<SSS_Specular_Reflections_for_Skin__mi>.reflect_environment_only.connected ((null)) : boolean

<SSS_Specular_Reflections_for_Skin__mi>.reflect_environment_only.shader ((null)) : texmap

<SSS_Specular_Reflections_for_Skin__mi>.reflect_environment_only.paramName ((null)) : string

<SSS_Specular_Reflections_for_Skin__mi>.mode.connected ((null)) : boolean

<SSS_Specular_Reflections_for_Skin__mi>.mode.shader ((null)) : texmap

<SSS_Specular_Reflections_for_Skin__mi>.mode.paramName ((null)) : string

<SSS_Specular_Reflections_for_Skin__mi>.TheList ((null)) : max object array

<SSS_Specular_Reflections_for_Skin__mi>.Shader Version ((null)) : integer

SSS_Specular_Reflections_for_Skin__mi interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

MAXScript Extensions for mental ray


3dsmax mental ray Shaders Index

The following is a list of mental ray shaders implementing 3ds Max maps and volumetic effects. These shaders provide identical results in mental ray to the native 3ds Max maps and effects rendered in the Default Scanline renderer.

Ambient_Reflective_Occlusion__3dsmax : textureMap

Bricks__3dsmax : textureMap

Bump__3dsmax : textureMap

Cellular__3dsmax : textureMap

Checker__3dsmax : textureMap

ColorCorrection__3dsmax : textureMap

Composite__3dsmax : textureMap

Dent__3dsmax : textureMap

DGS_Material__3dsmax : textureMap

DGS_Material_Photon__3dsmax : textureMap

Dielectric_Material__3dsmax : textureMap

Dielectric_Material_Photon__3dsmax : textureMap

Displacement_3D__3dsmax : textureMap

Environment__3dsmax : textureMap

Falloff__3dsmax : textureMap

Falloff2__3dsmax : textureMap

Fire_Effect__3dsmax : textureMap

Flat_Mirror__3dsmax : textureMap

Fog__3dsmax : textureMap

Gradient__3dsmax : textureMap

Gradient_Ramp__3dsmax : textureMap

Height_Map_Displacement__3dsmax : textureMap

Ink__N_Paint__3dsmax : textureMap

Logarithmic_Camera_Exposure__3dsmax : textureMap

Marble__3dsmax : textureMap

Mask__3dsmax : textureMap

Max_Bitmap__3dsmax : textureMap

Mix__3dsmax : textureMap

Noise__3dsmax : textureMap

Output__3dsmax : textureMap

Particle_Age__3dsmax : textureMap

Particle_Blur__3dsmax : textureMap

Perlin_Marble__3dsmax : textureMap

Planet__3dsmax : textureMap

Pseudo_Color_Camera_Exposure__3dsmax : textureMap

Pseudo_Color_Camera_Exposure__3dsmaxtextureMap : textureMap

Reflect_Refract__3dsmax : textureMap

RGB_Multiply__3dsmax : textureMap

Smoke__3dsmax : textureMap

Speckle__3dsmax : textureMap

Splat__3dsmax : textureMap

Stucco__3dsmax : textureMap

Swirl__3dsmax : textureMap

Thin_Wall_Refraction__3dsmax : textureMap

Tint__3dsmax : textureMap

UV_Coordinate__3dsmax : textureMap

UV_Generator__3dsmax : textureMap

Vertex_Color__3dsmax : textureMap

Volume_Fog__3dsmax : textureMap

Volume_Light__3dsmax : textureMap

Water__3dsmax : textureMap

Wood__3dsmax : textureMap

XYZ_Coordinate__3dsmax : textureMap

XYZ_Generator__3dsmax : textureMap

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Ambient_Reflective_Occlusion__3dsmax : textureMap

Ambient_Reflective_Occlusion__3dsmax - superclass: textureMap; super-superclass:material - 46:0 - classID: #(2004031007, 1224892555)

Constructors:

Ambient_Reflective_Occlusion__3dsmax ...

max_amb_occlusion ...

Properties:

<Ambient_Reflective_Occlusion__3dsmax>.'#TheList'

Error accessing property

<Ambient_Reflective_Occlusion__3dsmax>.'#Shader Version'

Error accessing property

<Ambient_Reflective_Occlusion__3dsmax>.bright Color default: (color 255 255 255) -- animatable; fRGBA color; null

<Ambient_Reflective_Occlusion__3dsmax>.'bright.connected' BooleanClass default: false -- boolean; null

<Ambient_Reflective_Occlusion__3dsmax>.'bright.paramName' UndefinedClass default: undefined -- string; null;

<Ambient_Reflective_Occlusion__3dsmax>.'bright.shader' UndefinedClass default: undefined -- texmap; null

<Ambient_Reflective_Occlusion__3dsmax>.dark Color default: (color 0 0 0) -- animatable; fRGBA color; null

<Ambient_Reflective_Occlusion__3dsmax>.'dark.connected' BooleanClass default: false -- boolean; null

<Ambient_Reflective_Occlusion__3dsmax>.'dark.paramName' UndefinedClass default: undefined -- string; null;

<Ambient_Reflective_Occlusion__3dsmax>.'dark.shader' UndefinedClass default: undefined -- texmap; null

<Ambient_Reflective_Occlusion__3dsmax>.falloff Float default: 1.0 -- animatable; float

<Ambient_Reflective_Occlusion__3dsmax>.falloff_connected BooleanClass default: false -- boolean

<Ambient_Reflective_Occlusion__3dsmax>.falloff_paramName UndefinedClass default: undefined -- string;

<Ambient_Reflective_Occlusion__3dsmax>.falloff_shader UndefinedClass default: undefined -- texturemap

<Ambient_Reflective_Occlusion__3dsmax>.id_inclexcl Integer default: 0 -- animatable; integer

<Ambient_Reflective_Occlusion__3dsmax>.id_inclexcl_connected BooleanClass default: false -- boolean

<Ambient_Reflective_Occlusion__3dsmax>.id_inclexcl_paramName UndefinedClass default: undefined -- string;

<Ambient_Reflective_Occlusion__3dsmax>.id_inclexcl_shader UndefinedClass default: undefined -- texturemap

<Ambient_Reflective_Occlusion__3dsmax>.id_nonself Integer default: 0 -- animatable; integer

<Ambient_Reflective_Occlusion__3dsmax>.id_nonself_connected BooleanClass default: false -- boolean

<Ambient_Reflective_Occlusion__3dsmax>.id_nonself_paramName UndefinedClass default: undefined -- string;

<Ambient_Reflective_Occlusion__3dsmax>.id_nonself_shader UndefinedClass default: undefined -- texturemap

<Ambient_Reflective_Occlusion__3dsmax>.max_distance Float default: 0.0 -- animatable; float; null

<Ambient_Reflective_Occlusion__3dsmax>.'max_distance.connected' BooleanClass default: false -- boolean; null

<Ambient_Reflective_Occlusion__3dsmax>.'max_distance.paramName' UndefinedClass default: undefined -- string; null;

<Ambient_Reflective_Occlusion__3dsmax>.'max_distance.shader' UndefinedClass default: undefined -- texmap; null

<Ambient_Reflective_Occlusion__3dsmax>.occlusion_in_alpha BooleanClass default: false -- animatable; boolean; null

<Ambient_Reflective_Occlusion__3dsmax>.'occlusion_in_alpha.connected' BooleanClass default: false -- boolean; null

<Ambient_Reflective_Occlusion__3dsmax>.'occlusion_in_alpha.paramName' UndefinedClass default: undefined -- string; null;

<Ambient_Reflective_Occlusion__3dsmax>.'occlusion_in_alpha.shader' UndefinedClass default: undefined -- texmap; null

<Ambient_Reflective_Occlusion__3dsmax>.output_mode Integer default: 0 -- animatable; integer; null

<Ambient_Reflective_Occlusion__3dsmax>.'output_mode.connected' BooleanClass default: false -- boolean; null

<Ambient_Reflective_Occlusion__3dsmax>.'output_mode.paramName' UndefinedClass default: undefined -- string; null;

<Ambient_Reflective_Occlusion__3dsmax>.'output_mode.shader' UndefinedClass default: undefined -- texmap; null

<Ambient_Reflective_Occlusion__3dsmax>.reflective BooleanClass default: false -- animatable; boolean; null

<Ambient_Reflective_Occlusion__3dsmax>.'reflective.connected' BooleanClass default: false -- boolean; null

<Ambient_Reflective_Occlusion__3dsmax>.'reflective.paramName' UndefinedClass default: undefined -- string; null;

<Ambient_Reflective_Occlusion__3dsmax>.'reflective.shader' UndefinedClass default: undefined -- texmap; null

<Ambient_Reflective_Occlusion__3dsmax>.samples Integer default: 16 -- animatable; integer; null

<Ambient_Reflective_Occlusion__3dsmax>.'samples.connected' BooleanClass default: false -- boolean; null

<Ambient_Reflective_Occlusion__3dsmax>.'samples.paramName' UndefinedClass default: undefined -- string; null;

<Ambient_Reflective_Occlusion__3dsmax>.'samples.shader' UndefinedClass default: undefined -- texmap; null

error accessing parameter: Shader Version

<Ambient_Reflective_Occlusion__3dsmax>.spread Float default: 0.75 -- animatable; float; null

<Ambient_Reflective_Occlusion__3dsmax>.'spread.connected' BooleanClass default: false -- boolean; null

<Ambient_Reflective_Occlusion__3dsmax>.'spread.paramName' UndefinedClass default: undefined -- string; null;

<Ambient_Reflective_Occlusion__3dsmax>.'spread.shader' UndefinedClass default: undefined -- texmap; null

Ambient_Reflective_Occlusion__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

MAXScript Extensions for mental ray


Bricks__3dsmax : textureMap

Bricks__3dsmax : textureMap {7773161f,8203a457}

Constructors:

Bricks__3dsmax: class instances not creatable by MAXScript

Alias:

max_Bricks

Properties:

<Bricks__3dsmax>.Parameters : paramBlock2

<Bricks__3dsmax>.ExtraParameters : paramBlock2

<Bricks__3dsmax>.MortarColor : fRGBA color

<Bricks__3dsmax>.BrickColor : fRGBA color

<Bricks__3dsmax>.HorizontalCount : float

<Bricks__3dsmax>.VerticalCount : float

<Bricks__3dsmax>.ColorVariance : float

<Bricks__3dsmax>.VerticalGap : float

<Bricks__3dsmax>.HorizontalGap : float

<Bricks__3dsmax>.LineShift : float

<Bricks__3dsmax>.RandomShift : float

<Bricks__3dsmax>.Holes : integer

<Bricks__3dsmax>.RandomSeed : integer

<Bricks__3dsmax>.LockGapSymmetry : integer

<Bricks__3dsmax>.FadeVariance : float

<Bricks__3dsmax>.EdgeRoughness : float

<Bricks__3dsmax>.ShowTextureSwatches : boolean

<Bricks__3dsmax>.UseRowEdit : boolean

<Bricks__3dsmax>.UseColumnEdit : boolean

<Bricks__3dsmax>.ChangeRow : float

<Bricks__3dsmax>.ChangeColumn : float

<Bricks__3dsmax>.PerColumn : integer

<Bricks__3dsmax>.PerRow : integer

<Bricks__3dsmax>.BrickType : integer

<Bricks__3dsmax>.Coords : maxObject

<Bricks__3dsmax>.MortarMap : texturemap

<Bricks__3dsmax>.BrickMap : texturemap

<Bricks__3dsmax>.MortarMapEnabled : boolean

<Bricks__3dsmax>.BrickMapEnabled : boolean

<Bricks__3dsmax>.GBufferID : integer

<Bricks__3dsmax>.Connection_struct__0000__Parameters : paramBlock2

<Bricks__3dsmax>.Connection_struct__0001__ExtraParameters : paramBlock2

<Bricks__3dsmax>.MortarColor_connected : boolean

<Bricks__3dsmax>.MortarColor_shader : texturemap

<Bricks__3dsmax>.MortarColor_paramName : string

<Bricks__3dsmax>.BrickColor_connected : boolean

<Bricks__3dsmax>.BrickColor_shader : texturemap

<Bricks__3dsmax>.BrickColor_paramName : string

<Bricks__3dsmax>.HorizontalCount_connected : boolean

<Bricks__3dsmax>.HorizontalCount_shader : texturemap

<Bricks__3dsmax>.HorizontalCount_paramName : string

<Bricks__3dsmax>.VerticalCount_connected : boolean

<Bricks__3dsmax>.VerticalCount_shader : texturemap

<Bricks__3dsmax>.VerticalCount_paramName : string

<Bricks__3dsmax>.ColorVariance_connected : boolean

<Bricks__3dsmax>.ColorVariance_shader : texturemap

<Bricks__3dsmax>.ColorVariance_paramName : string

<Bricks__3dsmax>.VerticalGap_connected : boolean

<Bricks__3dsmax>.VerticalGap_shader : texturemap

<Bricks__3dsmax>.VerticalGap_paramName : string

<Bricks__3dsmax>.HorizontalGap_connected : boolean

<Bricks__3dsmax>.HorizontalGap_shader : texturemap

<Bricks__3dsmax>.HorizontalGap_paramName : string

<Bricks__3dsmax>.LineShift_connected : boolean

<Bricks__3dsmax>.LineShift_shader : texturemap

<Bricks__3dsmax>.LineShift_paramName : string

<Bricks__3dsmax>.RandomShift_connected : boolean

<Bricks__3dsmax>.RandomShift_shader : texturemap

<Bricks__3dsmax>.RandomShift_paramName : string

<Bricks__3dsmax>.Holes_connected : boolean

<Bricks__3dsmax>.Holes_shader : texturemap

<Bricks__3dsmax>.Holes_paramName : string

<Bricks__3dsmax>.RandomSeed_connected : boolean

<Bricks__3dsmax>.RandomSeed_shader : texturemap

<Bricks__3dsmax>.RandomSeed_paramName : string

<Bricks__3dsmax>.LockGapSymmetry_connected : boolean

<Bricks__3dsmax>.LockGapSymmetry_shader : texturemap

<Bricks__3dsmax>.LockGapSymmetry_paramName : string

<Bricks__3dsmax>.FadeVariance_connected : boolean

<Bricks__3dsmax>.FadeVariance_shader : texturemap

<Bricks__3dsmax>.FadeVariance_paramName : string

<Bricks__3dsmax>.EdgeRoughness_connected : boolean

<Bricks__3dsmax>.EdgeRoughness_shader : texturemap

<Bricks__3dsmax>.EdgeRoughness_paramName : string

<Bricks__3dsmax>.ShowTextureSwatches_connected : boolean

<Bricks__3dsmax>.ShowTextureSwatches_shader : texturemap

<Bricks__3dsmax>.ShowTextureSwatches_paramName : string

<Bricks__3dsmax>.UseRowEdit_connected : boolean

<Bricks__3dsmax>.UseRowEdit_shader : texturemap

<Bricks__3dsmax>.UseRowEdit_paramName : string

<Bricks__3dsmax>.UseColumnEdit_connected : boolean

<Bricks__3dsmax>.UseColumnEdit_shader : texturemap

<Bricks__3dsmax>.UseColumnEdit_paramName : string

<Bricks__3dsmax>.ChangeRow_connected : boolean

<Bricks__3dsmax>.ChangeRow_shader : texturemap

<Bricks__3dsmax>.ChangeRow_paramName : string

<Bricks__3dsmax>.ChangeColumn_connected : boolean

<Bricks__3dsmax>.ChangeColumn_shader : texturemap

<Bricks__3dsmax>.ChangeColumn_paramName : string

<Bricks__3dsmax>.PerColumn_connected : boolean

<Bricks__3dsmax>.PerColumn_shader : texturemap

<Bricks__3dsmax>.PerColumn_paramName : string

<Bricks__3dsmax>.PerRow_connected : boolean

<Bricks__3dsmax>.PerRow_shader : texturemap

<Bricks__3dsmax>.PerRow_paramName : string

<Bricks__3dsmax>.BrickType_connected : boolean

<Bricks__3dsmax>.BrickType_shader : texturemap

<Bricks__3dsmax>.BrickType_paramName : string

<Bricks__3dsmax>.MortarMapEnabled_connected : boolean

<Bricks__3dsmax>.MortarMapEnabled_shader : texturemap

<Bricks__3dsmax>.MortarMapEnabled_paramName : string

<Bricks__3dsmax>.BrickMapEnabled_connected : boolean

<Bricks__3dsmax>.BrickMapEnabled_shader : texturemap

<Bricks__3dsmax>.BrickMapEnabled_paramName : string

<Bricks__3dsmax>.GBufferID_connected : boolean

<Bricks__3dsmax>.GBufferID_shader : texturemap

<Bricks__3dsmax>.GBufferID_paramName : string

<Bricks__3dsmax>.TheList : maxObject array

<Bricks__3dsmax>.Shader_Version : integer

Bricks__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


Bump__3dsmax : textureMap

Bump__3dsmax - superclass: textureMap; super-superclass:material - 7:0 - classID: #(2004031007, 1963415618)

Constructors:

Bump__3dsmax ...

max_Bump ...

Properties:

<Bump__3dsmax>.Map UndefinedClass default: undefined -- texturemap

<Bump__3dsmax>.Multiplier Float default: 1.0 -- animatable; float

<Bump__3dsmax>.Multiplier_connected BooleanClass default: false -- boolean

<Bump__3dsmax>.Multiplier_paramName UndefinedClass default: undefined -- string;

<Bump__3dsmax>.Multiplier_shader UndefinedClass default: undefined -- texturemap

Bump__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


Cellular__3dsmax : textureMap

Cellular__3dsmax : textureMap {7773161f,8767ac6e}

Constructors:

Cellular__3dsmax: class instances not creatable by MAXScript

Alias:

max_Cellular

Properties:

<Cellular__3dsmax>.Parameters : paramBlock2

<Cellular__3dsmax>.ExtraParameters : paramBlock2

<Cellular__3dsmax>.CellColor : fRGBA color

<Cellular__3dsmax>.DivColor1 : fRGBA color

<Cellular__3dsmax>.DivColor2 : fRGBA color

<Cellular__3dsmax>.CellMap : texturemap

<Cellular__3dsmax>.DivMap1 : texturemap

<Cellular__3dsmax>.DivMap2 : texturemap

<Cellular__3dsmax>.Map1Enabled : boolean

<Cellular__3dsmax>.Map2Enabled : boolean

<Cellular__3dsmax>.Map3Enabled : boolean

<Cellular__3dsmax>.Variation : float

<Cellular__3dsmax>.Size : float

<Cellular__3dsmax>.Spread : float

<Cellular__3dsmax>.LowThresh : float

<Cellular__3dsmax>.MidThresh : float

<Cellular__3dsmax>.HighThresh : float

<Cellular__3dsmax>.type : integer

<Cellular__3dsmax>.Fractal : boolean

<Cellular__3dsmax>.Iteration : float

<Cellular__3dsmax>.Roughness : float

<Cellular__3dsmax>.Smooth : float

<Cellular__3dsmax>.Adaptive : boolean

<Cellular__3dsmax>.Coords : maxObject

<Cellular__3dsmax>.Output : maxObject

<Cellular__3dsmax>.GBufferID : integer

<Cellular__3dsmax>.Connection_struct__0000__Parameters : paramBlock2

<Cellular__3dsmax>.Connection_struct__0001__ExtraParameters : paramBlock2

<Cellular__3dsmax>.CellColor_connected : boolean

<Cellular__3dsmax>.CellColor_shader : texturemap

<Cellular__3dsmax>.CellColor_paramName : string

<Cellular__3dsmax>.DivColor1_connected : boolean

<Cellular__3dsmax>.DivColor1_shader : texturemap

<Cellular__3dsmax>.DivColor1_paramName : string

<Cellular__3dsmax>.DivColor2_connected : boolean

<Cellular__3dsmax>.DivColor2_shader : texturemap

<Cellular__3dsmax>.DivColor2_paramName : string

<Cellular__3dsmax>.Map1Enabled_connected : boolean

<Cellular__3dsmax>.Map1Enabled_shader : texturemap

<Cellular__3dsmax>.Map1Enabled_paramName : string

<Cellular__3dsmax>.Map2Enabled_connected : boolean

<Cellular__3dsmax>.Map2Enabled_shader : texturemap

<Cellular__3dsmax>.Map2Enabled_paramName : string

<Cellular__3dsmax>.Map3Enabled_connected : boolean

<Cellular__3dsmax>.Map3Enabled_shader : texturemap

<Cellular__3dsmax>.Map3Enabled_paramName : string

<Cellular__3dsmax>.Variation_connected : boolean

<Cellular__3dsmax>.Variation_shader : texturemap

<Cellular__3dsmax>.Variation_paramName : string

<Cellular__3dsmax>.Size_connected : boolean

<Cellular__3dsmax>.Size_shader : texturemap

<Cellular__3dsmax>.Size_paramName : string

<Cellular__3dsmax>.Spread_connected : boolean

<Cellular__3dsmax>.Spread_shader : texturemap

<Cellular__3dsmax>.Spread_paramName : string

<Cellular__3dsmax>.LowThresh_connected : boolean

<Cellular__3dsmax>.LowThresh_shader : texturemap

<Cellular__3dsmax>.LowThresh_paramName : string

<Cellular__3dsmax>.MidThresh_connected : boolean

<Cellular__3dsmax>.MidThresh_shader : texturemap

<Cellular__3dsmax>.MidThresh_paramName : string

<Cellular__3dsmax>.HighThresh_connected : boolean

<Cellular__3dsmax>.HighThresh_shader : texturemap

<Cellular__3dsmax>.HighThresh_paramName : string

<Cellular__3dsmax>.type_connected : boolean

<Cellular__3dsmax>.type_shader : texturemap

<Cellular__3dsmax>.type_paramName : string

<Cellular__3dsmax>.Fractal_connected : boolean

<Cellular__3dsmax>.Fractal_shader : texturemap

<Cellular__3dsmax>.Fractal_paramName : string

<Cellular__3dsmax>.Iteration_connected : boolean

<Cellular__3dsmax>.Iteration_shader : texturemap

<Cellular__3dsmax>.Iteration_paramName : string

<Cellular__3dsmax>.Roughness_connected : boolean

<Cellular__3dsmax>.Roughness_shader : texturemap

<Cellular__3dsmax>.Roughness_paramName : string

<Cellular__3dsmax>.Smooth_connected : boolean

<Cellular__3dsmax>.Smooth_shader : texturemap

<Cellular__3dsmax>.Smooth_paramName : string

<Cellular__3dsmax>.Adaptive_connected : boolean

<Cellular__3dsmax>.Adaptive_shader : texturemap

<Cellular__3dsmax>.Adaptive_paramName : string

<Cellular__3dsmax>.GBufferID_connected : boolean

<Cellular__3dsmax>.GBufferID_shader : texturemap

<Cellular__3dsmax>.GBufferID_paramName : string

<Cellular__3dsmax>.TheList : maxObject array

<Cellular__3dsmax>.Shader_Version : integer

Cellular__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


Checker__3dsmax : textureMap

Checker__3dsmax : textureMap {7773161f,8261b058}

Constructors:

Checker__3dsmax: class instances not creatable by MAXScript

Alias:

max_Checker

Properties:

<Checker__3dsmax>.Parameters : paramBlock2

<Checker__3dsmax>.ExtraParameters : paramBlock2

<Checker__3dsmax>.Soften : float

<Checker__3dsmax>.Color1 : fRGBA color

<Checker__3dsmax>.Color2 : fRGBA color

<Checker__3dsmax>.Map1 : texturemap

<Checker__3dsmax>.Map2 : texturemap

<Checker__3dsmax>.Map1Enabled : boolean

<Checker__3dsmax>.Map2Enabled : boolean

<Checker__3dsmax>.Coords : maxObject

<Checker__3dsmax>.GBufferID : integer

<Checker__3dsmax>.Connection_struct__0000__Parameters : paramBlock2

<Checker__3dsmax>.Connection_struct__0001__ExtraParameters : paramBlock2

<Checker__3dsmax>.Soften_connected : boolean

<Checker__3dsmax>.Soften_shader : texturemap

<Checker__3dsmax>.Soften_paramName : string

<Checker__3dsmax>.Color1_connected : boolean

<Checker__3dsmax>.Color1_shader : texturemap

<Checker__3dsmax>.Color1_paramName : string

<Checker__3dsmax>.Color2_connected : boolean

<Checker__3dsmax>.Color2_shader : texturemap

<Checker__3dsmax>.Color2_paramName : string

<Checker__3dsmax>.Map1Enabled_connected : boolean

<Checker__3dsmax>.Map1Enabled_shader : texturemap

<Checker__3dsmax>.Map1Enabled_paramName : string

<Checker__3dsmax>.Map2Enabled_connected : boolean

<Checker__3dsmax>.Map2Enabled_shader : texturemap

<Checker__3dsmax>.Map2Enabled_paramName : string

<Checker__3dsmax>.GBufferID_connected : boolean

<Checker__3dsmax>.GBufferID_shader : texturemap

<Checker__3dsmax>.GBufferID_paramName : string

<Checker__3dsmax>.TheList : maxObject array

<Checker__3dsmax>.Shader_Version : integer

Checker__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


ColorCorrection__3dsmax : textureMap

ColorCorrection__3dsmax : textureMap {7773161f,7c688b5a}

Constructors:

ColorCorrection__3dsmax: class instances not creatable by MAXScript

Alias:

max_ColorCorrection

Properties:

<ColorCorrection__3dsmax>.Parameters : paramBlock2

<ColorCorrection__3dsmax>.ExtraParameters : paramBlock2

<ColorCorrection__3dsmax>.color : fRGBA color

<ColorCorrection__3dsmax>.map : texturemap

<ColorCorrection__3dsmax>.rewireR : integer

<ColorCorrection__3dsmax>.rewireG : integer

<ColorCorrection__3dsmax>.rewireB : integer

<ColorCorrection__3dsmax>.rewireA : integer

<ColorCorrection__3dsmax>.hueShift : float

<ColorCorrection__3dsmax>.saturation : float

<ColorCorrection__3dsmax>.tint : fRGBA color

<ColorCorrection__3dsmax>.tintStrength : float

<ColorCorrection__3dsmax>.lightnessMode : integer

<ColorCorrection__3dsmax>.contrast : float

<ColorCorrection__3dsmax>.brightness : float

<ColorCorrection__3dsmax>.exposureMode : integer

<ColorCorrection__3dsmax>.enableR : boolean

<ColorCorrection__3dsmax>.enableG : boolean

<ColorCorrection__3dsmax>.enableB : boolean

<ColorCorrection__3dsmax>.gainRGB : float

<ColorCorrection__3dsmax>.gainR : float

<ColorCorrection__3dsmax>.gainG : float

<ColorCorrection__3dsmax>.gainB : float

<ColorCorrection__3dsmax>.gammaRGB : float

<ColorCorrection__3dsmax>.gammaR : float

<ColorCorrection__3dsmax>.gammaG : float

<ColorCorrection__3dsmax>.gammaB : float

<ColorCorrection__3dsmax>.pivotRGB : float

<ColorCorrection__3dsmax>.pivotR : float

<ColorCorrection__3dsmax>.pivotG : float

<ColorCorrection__3dsmax>.pivotB : float

<ColorCorrection__3dsmax>.liftRGB : float

<ColorCorrection__3dsmax>.liftR : float

<ColorCorrection__3dsmax>.liftG : float

<ColorCorrection__3dsmax>.liftB : float

<ColorCorrection__3dsmax>.printerLights : float

<ColorCorrection__3dsmax>.GBufferID : integer

<ColorCorrection__3dsmax>.Connection_struct__0000__Parameters : paramBlock2

<ColorCorrection__3dsmax>.Connection_struct__0001__ExtraParameters : paramBlock2

<ColorCorrection__3dsmax>.color_connected : boolean

<ColorCorrection__3dsmax>.color_shader : texturemap

<ColorCorrection__3dsmax>.color_paramName : string

<ColorCorrection__3dsmax>.rewireR_connected : boolean

<ColorCorrection__3dsmax>.rewireR_shader : texturemap

<ColorCorrection__3dsmax>.rewireR_paramName : string

<ColorCorrection__3dsmax>.rewireG_connected : boolean

<ColorCorrection__3dsmax>.rewireG_shader : texturemap

<ColorCorrection__3dsmax>.rewireG_paramName : string

<ColorCorrection__3dsmax>.rewireB_connected : boolean

<ColorCorrection__3dsmax>.rewireB_shader : texturemap

<ColorCorrection__3dsmax>.rewireB_paramName : string

<ColorCorrection__3dsmax>.rewireA_connected : boolean

<ColorCorrection__3dsmax>.rewireA_shader : texturemap

<ColorCorrection__3dsmax>.rewireA_paramName : string

<ColorCorrection__3dsmax>.hueShift_connected : boolean

<ColorCorrection__3dsmax>.hueShift_shader : texturemap

<ColorCorrection__3dsmax>.hueShift_paramName : string

<ColorCorrection__3dsmax>.saturation_connected : boolean

<ColorCorrection__3dsmax>.saturation_shader : texturemap

<ColorCorrection__3dsmax>.saturation_paramName : string

<ColorCorrection__3dsmax>.tint_connected : boolean

<ColorCorrection__3dsmax>.tint_shader : texturemap

<ColorCorrection__3dsmax>.tint_paramName : string

<ColorCorrection__3dsmax>.tintStrength_connected : boolean

<ColorCorrection__3dsmax>.tintStrength_shader : texturemap

<ColorCorrection__3dsmax>.tintStrength_paramName : string

<ColorCorrection__3dsmax>.lightnessMode_connected : boolean

<ColorCorrection__3dsmax>.lightnessMode_shader : texturemap

<ColorCorrection__3dsmax>.lightnessMode_paramName : string

<ColorCorrection__3dsmax>.contrast_connected : boolean

<ColorCorrection__3dsmax>.contrast_shader : texturemap

<ColorCorrection__3dsmax>.contrast_paramName : string

<ColorCorrection__3dsmax>.brightness_connected : boolean

<ColorCorrection__3dsmax>.brightness_shader : texturemap

<ColorCorrection__3dsmax>.brightness_paramName : string

<ColorCorrection__3dsmax>.exposureMode_connected : boolean

<ColorCorrection__3dsmax>.exposureMode_shader : texturemap

<ColorCorrection__3dsmax>.exposureMode_paramName : string

<ColorCorrection__3dsmax>.enableR_connected : boolean

<ColorCorrection__3dsmax>.enableR_shader : texturemap

<ColorCorrection__3dsmax>.enableR_paramName : string

<ColorCorrection__3dsmax>.enableG_connected : boolean

<ColorCorrection__3dsmax>.enableG_shader : texturemap

<ColorCorrection__3dsmax>.enableG_paramName : string

<ColorCorrection__3dsmax>.enableB_connected : boolean

<ColorCorrection__3dsmax>.enableB_shader : texturemap

<ColorCorrection__3dsmax>.enableB_paramName : string

<ColorCorrection__3dsmax>.gainRGB_connected : boolean

<ColorCorrection__3dsmax>.gainRGB_shader : texturemap

<ColorCorrection__3dsmax>.gainRGB_paramName : string

<ColorCorrection__3dsmax>.gainR_connected : boolean

<ColorCorrection__3dsmax>.gainR_shader : texturemap

<ColorCorrection__3dsmax>.gainR_paramName : string

<ColorCorrection__3dsmax>.gainG_connected : boolean

<ColorCorrection__3dsmax>.gainG_shader : texturemap

<ColorCorrection__3dsmax>.gainG_paramName : string

<ColorCorrection__3dsmax>.gainB_connected : boolean

<ColorCorrection__3dsmax>.gainB_shader : texturemap

<ColorCorrection__3dsmax>.gainB_paramName : string

<ColorCorrection__3dsmax>.gammaRGB_connected : boolean

<ColorCorrection__3dsmax>.gammaRGB_shader : texturemap

<ColorCorrection__3dsmax>.gammaRGB_paramName : string

<ColorCorrection__3dsmax>.gammaR_connected : boolean

<ColorCorrection__3dsmax>.gammaR_shader : texturemap

<ColorCorrection__3dsmax>.gammaR_paramName : string

<ColorCorrection__3dsmax>.gammaG_connected : boolean

<ColorCorrection__3dsmax>.gammaG_shader : texturemap

<ColorCorrection__3dsmax>.gammaG_paramName : string

<ColorCorrection__3dsmax>.gammaB_connected : boolean

<ColorCorrection__3dsmax>.gammaB_shader : texturemap

<ColorCorrection__3dsmax>.gammaB_paramName : string

<ColorCorrection__3dsmax>.pivotRGB_connected : boolean

<ColorCorrection__3dsmax>.pivotRGB_shader : texturemap

<ColorCorrection__3dsmax>.pivotRGB_paramName : string

<ColorCorrection__3dsmax>.pivotR_connected : boolean

<ColorCorrection__3dsmax>.pivotR_shader : texturemap

<ColorCorrection__3dsmax>.pivotR_paramName : string

<ColorCorrection__3dsmax>.pivotG_connected : boolean

<ColorCorrection__3dsmax>.pivotG_shader : texturemap

<ColorCorrection__3dsmax>.pivotG_paramName : string

<ColorCorrection__3dsmax>.pivotB_connected : boolean

<ColorCorrection__3dsmax>.pivotB_shader : texturemap

<ColorCorrection__3dsmax>.pivotB_paramName : string

<ColorCorrection__3dsmax>.liftRGB_connected : boolean

<ColorCorrection__3dsmax>.liftRGB_shader : texturemap

<ColorCorrection__3dsmax>.liftRGB_paramName : string

<ColorCorrection__3dsmax>.liftR_connected : boolean

<ColorCorrection__3dsmax>.liftR_shader : texturemap

<ColorCorrection__3dsmax>.liftR_paramName : string

<ColorCorrection__3dsmax>.liftG_connected : boolean

<ColorCorrection__3dsmax>.liftG_shader : texturemap

<ColorCorrection__3dsmax>.liftG_paramName : string

<ColorCorrection__3dsmax>.liftB_connected : boolean

<ColorCorrection__3dsmax>.liftB_shader : texturemap

<ColorCorrection__3dsmax>.liftB_paramName : string

<ColorCorrection__3dsmax>.printerLights_connected : boolean

<ColorCorrection__3dsmax>.printerLights_shader : texturemap

<ColorCorrection__3dsmax>.printerLights_paramName : string

<ColorCorrection__3dsmax>.GBufferID_connected : boolean

<ColorCorrection__3dsmax>.GBufferID_shader : texturemap

<ColorCorrection__3dsmax>.GBufferID_paramName : string

<ColorCorrection__3dsmax>.TheList : maxObject array

<ColorCorrection__3dsmax>.Shader_Version : integer

ColorCorrection__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


Composite__3dsmax : textureMap

Composite__3dsmax : textureMap {7773161f,a16ec137}

Constructor:

Composite__3dsmax: class instances not creatable by MAXScript

Alias:

max_Composite

Properties:

<Composite__3dsmax>.Parameters : paramBlock2

<Composite__3dsmax>.ExtraParameters : paramBlock2

<Composite__3dsmax>.mapList : maxObject array

<Composite__3dsmax>.mapEnabled : boolean array

<Composite__3dsmax>.mask : maxObject array

<Composite__3dsmax>.maskEnabled : boolean array

<Composite__3dsmax>.opacity : int array

<Composite__3dsmax>.blendMode : int array

<Composite__3dsmax>.GBufferID : integer

<Composite__3dsmax>.Connection_struct__0000__Parameters : paramBlock2

<Composite__3dsmax>.Connection_struct__0001__ExtraParameters : paramBlock2

<Composite__3dsmax>.GBufferID_connected : boolean

<Composite__3dsmax>.GBufferID_shader : texturemap

<Composite__3dsmax>.GBufferID_paramName : string

<Composite__3dsmax>.TheList : maxObject array

<Composite__3dsmax>.Shader_Version : integer

Composite__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Dent__3dsmax : textureMap

Dent__3dsmax : textureMap {7773161f,7108483c}

Constructors:

Dent__3dsmax: class instances not creatable by MAXScript

Alias:

max_Dent

Properties:

<Dent__3dsmax>.Parameters : paramBlock2

<Dent__3dsmax>.ExtraParameters : paramBlock2

<Dent__3dsmax>.Map1 : texturemap

<Dent__3dsmax>.Map2 : texturemap

<Dent__3dsmax>.Color1 : fRGBA color

<Dent__3dsmax>.Color2 : fRGBA color

<Dent__3dsmax>.Map1Enabled : boolean

<Dent__3dsmax>.Map2Enabled : boolean

<Dent__3dsmax>.Size : float

<Dent__3dsmax>.Strength : float

<Dent__3dsmax>.Iterations : integer

<Dent__3dsmax>.Coords : maxObject

<Dent__3dsmax>.GBufferID : integer

<Dent__3dsmax>.Connection_struct__0000__Parameters : paramBlock2

<Dent__3dsmax>.Connection_struct__0001__ExtraParameters : paramBlock2

<Dent__3dsmax>.Color1_connected : boolean

<Dent__3dsmax>.Color1_shader : texturemap

<Dent__3dsmax>.Color1_paramName : string

<Dent__3dsmax>.Color2_connected : boolean

<Dent__3dsmax>.Color2_shader : texturemap

<Dent__3dsmax>.Color2_paramName : string

<Dent__3dsmax>.Map1Enabled_connected : boolean

<Dent__3dsmax>.Map1Enabled_shader : texturemap

<Dent__3dsmax>.Map1Enabled_paramName : string

<Dent__3dsmax>.Map2Enabled_connected : boolean

<Dent__3dsmax>.Map2Enabled_shader : texturemap

<Dent__3dsmax>.Map2Enabled_paramName : string

<Dent__3dsmax>.Size_connected : boolean

<Dent__3dsmax>.Size_shader : texturemap

<Dent__3dsmax>.Size_paramName : string

<Dent__3dsmax>.Strength_connected : boolean

<Dent__3dsmax>.Strength_shader : texturemap

<Dent__3dsmax>.Strength_paramName : string

<Dent__3dsmax>.Iterations_connected : boolean

<Dent__3dsmax>.Iterations_shader : texturemap

<Dent__3dsmax>.Iterations_paramName : string

<Dent__3dsmax>.GBufferID_connected : boolean

<Dent__3dsmax>.GBufferID_shader : texturemap

<Dent__3dsmax>.GBufferID_paramName : string

<Dent__3dsmax>.TheList : maxObject array

<Dent__3dsmax>.Shader_Version : integer

Dent__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


DGS_Material__3dsmax : textureMap

DGS_Material__3dsmax - superclass: textureMap; super-superclass:material - 31:0 - classID: #(2004031007, -1710662025)

Constructors:

DGS_Material__3dsmax ...

max2_dgs_material ...

Properties:

<DGS_Material__3dsmax>.diffuse Color default: (color 76.5 76.5 76.5) -- animatable; fRGBA color

<DGS_Material__3dsmax>.diffuse_connected BooleanClass default: false -- boolean

<DGS_Material__3dsmax>.diffuse_paramName UndefinedClass default: undefined -- string;

<DGS_Material__3dsmax>.diffuse_shader UndefinedClass default: undefined -- texturemap

<DGS_Material__3dsmax>.glossy Color default: (color 76.5 76.5 76.5) -- animatable; fRGBA color

<DGS_Material__3dsmax>.glossy_connected BooleanClass default: false -- boolean

<DGS_Material__3dsmax>.glossy_paramName UndefinedClass default: undefined -- string;

<DGS_Material__3dsmax>.glossy_shader UndefinedClass default: undefined -- texturemap

<DGS_Material__3dsmax>.ImplicitLights ArrayParameter default: #() -- node array; SubAnim

<DGS_Material__3dsmax>.ior Float default: 1.5 -- animatable; float

<DGS_Material__3dsmax>.ior_connected BooleanClass default: false -- boolean

<DGS_Material__3dsmax>.ior_paramName UndefinedClass default: undefined -- string;

<DGS_Material__3dsmax>.ior_shader UndefinedClass default: undefined -- texturemap

<DGS_Material__3dsmax>.Lights ArrayParameter default: #() -- node array; SubAnim

<DGS_Material__3dsmax>.shiny Float default: 30.0 -- animatable; float

<DGS_Material__3dsmax>.shiny_connected BooleanClass default: false -- boolean

<DGS_Material__3dsmax>.shiny_paramName UndefinedClass default: undefined -- string;

<DGS_Material__3dsmax>.shiny_shader UndefinedClass default: undefined -- texturemap

<DGS_Material__3dsmax>.shiny_u Float default: 0.0 -- animatable; float

<DGS_Material__3dsmax>.shiny_v Float default: 0.0 -- animatable; float

<DGS_Material__3dsmax>.specular Color default: (color 0 0 0) -- animatable; fRGBA color

<DGS_Material__3dsmax>.specular_connected BooleanClass default: false -- boolean

<DGS_Material__3dsmax>.specular_paramName UndefinedClass default: undefined -- string;

<DGS_Material__3dsmax>.specular_shader UndefinedClass default: undefined -- texturemap

<DGS_Material__3dsmax>.transp Float default: 0.0 -- animatable; float

<DGS_Material__3dsmax>.transp_connected BooleanClass default: false -- boolean

<DGS_Material__3dsmax>.transp_paramName UndefinedClass default: undefined -- string;

<DGS_Material__3dsmax>.transp_shader UndefinedClass default: undefined -- texturemap

<DGS_Material__3dsmax>.Use_lights BooleanClass default: false -- boolean

DGS_Material__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


DGS_Material_Photon__3dsmax : textureMap

DGS_Material_Photon__3dsmax : textureMap {7773161f,97fa751e}

Constructor:

DGS_Material_Photon__3dsmax: class instances not creatable by MAXScript

Alias:

max2_dgs_material_photon

Properties:

<DGS_Material_Photon__3dsmax>.diffuse : fRGBA color

<DGS_Material_Photon__3dsmax>.glossy : fRGBA color

<DGS_Material_Photon__3dsmax>.specular : fRGBA color

<DGS_Material_Photon__3dsmax>.shiny : float

<DGS_Material_Photon__3dsmax>.shiny_u : float

<DGS_Material_Photon__3dsmax>.shiny_v : float

<DGS_Material_Photon__3dsmax>.transp : float

<DGS_Material_Photon__3dsmax>.ior : float

<DGS_Material_Photon__3dsmax>.lights : node array

<DGS_Material_Photon__3dsmax>.Use_lights : boolean

<DGS_Material_Photon__3dsmax>.ImplicitLights : node array

<DGS_Material_Photon__3dsmax>.diffuse_connected : boolean

<DGS_Material_Photon__3dsmax>.diffuse_shader : texturemap

<DGS_Material_Photon__3dsmax>.diffuse_paramName : string

<DGS_Material_Photon__3dsmax>.glossy_connected : boolean

<DGS_Material_Photon__3dsmax>.glossy_shader : texturemap

<DGS_Material_Photon__3dsmax>.glossy_paramName : string

<DGS_Material_Photon__3dsmax>.specular_connected : boolean

<DGS_Material_Photon__3dsmax>.specular_shader : texturemap

<DGS_Material_Photon__3dsmax>.specular_paramName : string

<DGS_Material_Photon__3dsmax>.shiny_connected : boolean

<DGS_Material_Photon__3dsmax>.shiny_shader : texturemap

<DGS_Material_Photon__3dsmax>.shiny_paramName : string

<DGS_Material_Photon__3dsmax>.transp_connected : boolean

<DGS_Material_Photon__3dsmax>.transp_shader : texturemap

<DGS_Material_Photon__3dsmax>.transp_paramName : string

<DGS_Material_Photon__3dsmax>.ior_connected : boolean

<DGS_Material_Photon__3dsmax>.ior_shader : texturemap

<DGS_Material_Photon__3dsmax>.ior_paramName : string

<DGS_Material_Photon__3dsmax>.TheList : maxObject array

<DGS_Material_Photon__3dsmax>.Shader_Version : integer

DGS_Material_Photon__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


Dielectric_Material__3dsmax : textureMap

Dielectric_Material__3dsmax - superclass: textureMap; super-superclass:material - 13:0 - classID: #(2004031007, -1158265530)

Constructors:

Dielectric_Material__3dsmax ...

max2_dielectric_material ...

Properties:

<Dielectric_Material__3dsmax>.col Color default: (color 255 255 255) -- animatable; fRGBA color

<Dielectric_Material__3dsmax>.col_out Color default: (color 0 0 0) -- animatable; fRGBA color

<Dielectric_Material__3dsmax>.distance Float default: 1.0 -- animatable; worldUnits

<Dielectric_Material__3dsmax>.ignore_normals BooleanClass default: false -- animatable; boolean

<Dielectric_Material__3dsmax>.ImplicitLights ArrayParameter default: #() -- node array; SubAnim

<Dielectric_Material__3dsmax>.ior Float default: 1.5 -- animatable; float

<Dielectric_Material__3dsmax>.ior_out Float default: 0.0 -- animatable; float

<Dielectric_Material__3dsmax>.Lights ArrayParameter default: #() -- node array; SubAnim

<Dielectric_Material__3dsmax>.opaque_alpha BooleanClass default: false -- animatable; boolean

<Dielectric_Material__3dsmax>.phong_coef Float default: 0.0 -- animatable; float

<Dielectric_Material__3dsmax>.Use_lights BooleanClass default: false -- Boolean

Dielectric_Material__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


Dielectric_Material_Photon__3dsmax : textureMap

Dielectric_Material_Photon__3dsmax : textureMap {7773161f,5ff4622b}

Constructor:

Dielectric_Material_Photon__3dsmax: class instances not creatable by MAXScript

Alias:

max2_dielectric_material_photon

Properties:

<Dielectric_Material_Photon__3dsmax>.col : fRGBA color

<Dielectric_Material_Photon__3dsmax>.ior : float

<Dielectric_Material_Photon__3dsmax>.col_out : fRGBA color

<Dielectric_Material_Photon__3dsmax>.ior_out : float

<Dielectric_Material_Photon__3dsmax>.distance : worldUnits

<Dielectric_Material_Photon__3dsmax>.ignore_normals : boolean

<Dielectric_Material_Photon__3dsmax>.opaque_alpha : boolean

<Dielectric_Material_Photon__3dsmax>.phong_coef : float

<Dielectric_Material_Photon__3dsmax>.lights : node array

<Dielectric_Material_Photon__3dsmax>.Use_lights : boolean

<Dielectric_Material_Photon__3dsmax>.ImplicitLights : node array

<Dielectric_Material_Photon__3dsmax>.TheList : maxObject array

<Dielectric_Material_Photon__3dsmax>.Shader_Version : integer

Dielectric_Material_Photon__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


Displacement_3D__3dsmax : textureMap

Displacement_3D__3dsmax - superclass: textureMap; super-superclass:material - 14:0 - classID: #(2004031007, -2080878533)

Constructors:

Displacement_3D__3dsmax ...

max_Displacement ...

Properties:

<Displacement_3D__3dsmax>.direction UndefinedClass default: undefined -- texturemap

<Displacement_3D__3dsmax>.directionStrength Float default: 0.0 -- animatable; float

<Displacement_3D__3dsmax>.directionStrength_connected BooleanClass default: false -- boolean

<Displacement_3D__3dsmax>.directionStrength_paramName UndefinedClass default: undefined -- string;

<Displacement_3D__3dsmax>.directionStrength_shader UndefinedClass default: undefined -- texturemap

<Displacement_3D__3dsmax>.fullDisplaceLength Float default: 1.0 -- animatable; worldUnits

<Displacement_3D__3dsmax>.Map UndefinedClass default: undefined -- texturemap

<Displacement_3D__3dsmax>.mapAmount Float default: 1.0 -- animatable; float

<Displacement_3D__3dsmax>.mapAmount_connected BooleanClass default: false -- boolean

<Displacement_3D__3dsmax>.mapAmount_paramName UndefinedClass default: undefined -- string;

<Displacement_3D__3dsmax>.mapAmount_shader UndefinedClass default: undefined -- texturemap

<Displacement_3D__3dsmax>.objectIndependent BooleanClass default: true -- animatable; boolean

Displacement_3D__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


Environment__3dsmax : textureMap

Environment__3dsmax - superclass: textureMap; super-superclass:material - 13:0 - classID: #(2004031007, -1593421230)

Constructors:

Environment__3dsmax ...

max_Environment ...

Properties:

<Environment__3dsmax>.Color Color default: (color 0 0 0) -- animatable; fRGBA color

<Environment__3dsmax>.Color_connected BooleanClass default: false -- boolean

<Environment__3dsmax>.Color_paramName UndefinedClass default: undefined -- string;

<Environment__3dsmax>.Color_shader UndefinedClass default: undefined -- texturemap

<Environment__3dsmax>.Map UndefinedClass default: undefined -- texturemap

<Environment__3dsmax>.Sky UndefinedClass default: undefined -- texturemap

<Environment__3dsmax>.skylights ArrayParameter default: #() -- node array; SubAnim

<Environment__3dsmax>.UseAlpha BooleanClass default: false -- animatable; boolean

<Environment__3dsmax>.UseAlpha_connected BooleanClass default: false -- boolean

<Environment__3dsmax>.UseAlpha_paramName UndefinedClass default: undefined -- string;

<Environment__3dsmax>.UseAlpha_shader UndefinedClass default: undefined -- texturemap

Environment__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


Falloff2__3dsmax : textureMap

Falloff2__3dsmax : textureMap {7773161f,4764aa57}

Constructor:

Falloff2__3dsmax: class instances not creatable by MAXScript

Alias:

max_Falloff2

Properties:

<Falloff2__3dsmax>.Parameters : paramBlock2

<Falloff2__3dsmax>.ExtraParameters : paramBlock2

<Falloff2__3dsmax>.Color1 : fRGBA color

<Falloff2__3dsmax>.Map1Amount : float

<Falloff2__3dsmax>.Map1 : texturemap

<Falloff2__3dsmax>.Map1On : boolean

<Falloff2__3dsmax>.Color2 : fRGBA color

<Falloff2__3dsmax>.Map2Amount : float

<Falloff2__3dsmax>.Map2 : texturemap

<Falloff2__3dsmax>.Map2On : boolean

<Falloff2__3dsmax>.Type : integer

<Falloff2__3dsmax>.Direction : integer

<Falloff2__3dsmax>.MtlIOROverride : boolean

<Falloff2__3dsmax>.Ior : float

<Falloff2__3dsmax>.ExtrapolateOn : boolean

<Falloff2__3dsmax>.NearDistance : float

<Falloff2__3dsmax>.FarDistance : float

<Falloff2__3dsmax>.GBufferID : integer

<Falloff2__3dsmax>.Position : point3

<Falloff2__3dsmax>.Output : maxObject

<Falloff2__3dsmax>.CurveControl : maxObject

<Falloff2__3dsmax>.Self : boolean

<Falloff2__3dsmax>.Connection_struct__0000__Parameters : paramBlock2

<Falloff2__3dsmax>.Connection_struct__0001__ExtraParameters : paramBlock2

<Falloff2__3dsmax>.Color1_connected : boolean

<Falloff2__3dsmax>.Color1_shader : texturemap

<Falloff2__3dsmax>.Color1_paramName : string

<Falloff2__3dsmax>.Map1Amount_connected : boolean

<Falloff2__3dsmax>.Map1Amount_shader : texturemap

<Falloff2__3dsmax>.Map1Amount_paramName : string

<Falloff2__3dsmax>.Map1On_connected : boolean

<Falloff2__3dsmax>.Map1On_shader : texturemap

<Falloff2__3dsmax>.Map1On_paramName : string

<Falloff2__3dsmax>.Color2_connected : boolean

<Falloff2__3dsmax>.Color2_shader : texturemap

<Falloff2__3dsmax>.Color2_paramName : string

<Falloff2__3dsmax>.Map2Amount_connected : boolean

<Falloff2__3dsmax>.Map2Amount_shader : texturemap

<Falloff2__3dsmax>.Map2Amount_paramName : string

<Falloff2__3dsmax>.Map2On_connected : boolean

<Falloff2__3dsmax>.Map2On_shader : texturemap

<Falloff2__3dsmax>.Map2On_paramName : string

<Falloff2__3dsmax>.Type_connected : boolean

<Falloff2__3dsmax>.Type_shader : texturemap

<Falloff2__3dsmax>.Type_paramName : string

<Falloff2__3dsmax>.Direction_connected : boolean

<Falloff2__3dsmax>.Direction_shader : texturemap

<Falloff2__3dsmax>.Direction_paramName : string

<Falloff2__3dsmax>.MtlIOROverride_connected : boolean

<Falloff2__3dsmax>.MtlIOROverride_shader : texturemap

<Falloff2__3dsmax>.MtlIOROverride_paramName : string

<Falloff2__3dsmax>.Ior_connected : boolean

<Falloff2__3dsmax>.Ior_shader : texturemap

<Falloff2__3dsmax>.Ior_paramName : string

<Falloff2__3dsmax>.ExtrapolateOn_connected : boolean

<Falloff2__3dsmax>.ExtrapolateOn_shader : texturemap

<Falloff2__3dsmax>.ExtrapolateOn_paramName : string

<Falloff2__3dsmax>.NearDistance_connected : boolean

<Falloff2__3dsmax>.NearDistance_shader : texturemap

<Falloff2__3dsmax>.NearDistance_paramName : string

<Falloff2__3dsmax>.FarDistance_connected : boolean

<Falloff2__3dsmax>.FarDistance_shader : texturemap

<Falloff2__3dsmax>.FarDistance_paramName : string

<Falloff2__3dsmax>.GBufferID_connected : boolean

<Falloff2__3dsmax>.GBufferID_shader : texturemap

<Falloff2__3dsmax>.GBufferID_paramName : string

<Falloff2__3dsmax>.Position_connected : boolean

<Falloff2__3dsmax>.Position_shader : texturemap

<Falloff2__3dsmax>.Position_paramName : string

<Falloff2__3dsmax>.Self_connected : boolean

<Falloff2__3dsmax>.Self_shader : texturemap

<Falloff2__3dsmax>.Self_paramName : string

<Falloff2__3dsmax>.TheList : maxObject array

<Falloff2__3dsmax>.Shader_Version : integer

Falloff2__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


Falloff__3dsmax : textureMap

Falloff__3dsmax : textureMap {7773161f,7964aa57}

Constructor:

Falloff__3dsmax: class instances not creatable by MAXScript

Alias:

max_Falloff

Properties:

<Falloff__3dsmax>.Parameters : paramBlock2

<Falloff__3dsmax>.ExtraParameters : paramBlock2

<Falloff__3dsmax>.PerpendicularValue : float

<Falloff__3dsmax>.ParallelValue : float

<Falloff__3dsmax>.Type : integer

<Falloff__3dsmax>.Direction : integer

<Falloff__3dsmax>.GBufferID : integer

<Falloff__3dsmax>.Position : point3

<Falloff__3dsmax>.Connection_struct__0000__Parameters : paramBlock2

<Falloff__3dsmax>.Connection_struct__0001__ExtraParameters : paramBlock2

<Falloff__3dsmax>.PerpendicularValue_connected : boolean

<Falloff__3dsmax>.PerpendicularValue_shader : texturemap

<Falloff__3dsmax>.PerpendicularValue_paramName : string

<Falloff__3dsmax>.ParallelValue_connected : boolean

<Falloff__3dsmax>.ParallelValue_shader : texturemap

<Falloff__3dsmax>.ParallelValue_paramName : string

<Falloff__3dsmax>.Type_connected : boolean

<Falloff__3dsmax>.Type_shader : texturemap

<Falloff__3dsmax>.Type_paramName : string

<Falloff__3dsmax>.Direction_connected : boolean

<Falloff__3dsmax>.Direction_shader : texturemap

<Falloff__3dsmax>.Direction_paramName : string

<Falloff__3dsmax>.GBufferID_connected : boolean

<Falloff__3dsmax>.GBufferID_shader : texturemap

<Falloff__3dsmax>.GBufferID_paramName : string

<Falloff__3dsmax>.Position_connected : boolean

<Falloff__3dsmax>.Position_shader : texturemap

<Falloff__3dsmax>.Position_paramName : string

<Falloff__3dsmax>.TheList : maxObject array

<Falloff__3dsmax>.Shader_Version : integer

Falloff__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


Fire_Effect__3dsmax : textureMap

Fire_Effect__3dsmax : textureMap {7773161f,a55e5e20}

Constructor:

Fire_Effect__3dsmax: class instances not creatable by MAXScript

Alias:

max_FireEffect

Properties:

<Fire_Effect__3dsmax>.Parameters : paramBlock2

<Fire_Effect__3dsmax>.ExtraParameters : paramBlock2

<Fire_Effect__3dsmax>.Color1 : fRGBA color

<Fire_Effect__3dsmax>.Color2 : fRGBA color

<Fire_Effect__3dsmax>.Color3 : fRGBA color

<Fire_Effect__3dsmax>.Type : integer

<Fire_Effect__3dsmax>.Stretch : float

<Fire_Effect__3dsmax>.Regularity : float

<Fire_Effect__3dsmax>.Scale : float

<Fire_Effect__3dsmax>.Levels : float

<Fire_Effect__3dsmax>.Density : float

<Fire_Effect__3dsmax>.Samples : integer

<Fire_Effect__3dsmax>.Phase : float

<Fire_Effect__3dsmax>.Drift : float

<Fire_Effect__3dsmax>.Explode : boolean

<Fire_Effect__3dsmax>.Smoke : boolean

<Fire_Effect__3dsmax>.Fury : float

<Fire_Effect__3dsmax>.Active : boolean

<Fire_Effect__3dsmax>.Gizmos : maxObject array

<Fire_Effect__3dsmax>.Connection_struct__0000__Parameters : paramBlock2

<Fire_Effect__3dsmax>.Connection_struct__0001__ExtraParameters : paramBlock2

<Fire_Effect__3dsmax>.Color1_connected : boolean

<Fire_Effect__3dsmax>.Color1_shader : texturemap

<Fire_Effect__3dsmax>.Color1_paramName : string

<Fire_Effect__3dsmax>.Color2_connected : boolean

<Fire_Effect__3dsmax>.Color2_shader : texturemap

<Fire_Effect__3dsmax>.Color2_paramName : string

<Fire_Effect__3dsmax>.Color3_connected : boolean

<Fire_Effect__3dsmax>.Color3_shader : texturemap

<Fire_Effect__3dsmax>.Color3_paramName : string

<Fire_Effect__3dsmax>.Type_connected : boolean

<Fire_Effect__3dsmax>.Type_shader : texturemap

<Fire_Effect__3dsmax>.Type_paramName : string

<Fire_Effect__3dsmax>.Stretch_connected : boolean

<Fire_Effect__3dsmax>.Stretch_shader : texturemap

<Fire_Effect__3dsmax>.Stretch_paramName : string

<Fire_Effect__3dsmax>.Regularity_connected : boolean

<Fire_Effect__3dsmax>.Regularity_shader : texturemap

<Fire_Effect__3dsmax>.Regularity_paramName : string

<Fire_Effect__3dsmax>.Scale_connected : boolean

<Fire_Effect__3dsmax>.Scale_shader : texturemap

<Fire_Effect__3dsmax>.Scale_paramName : string

<Fire_Effect__3dsmax>.Levels_connected : boolean

<Fire_Effect__3dsmax>.Levels_shader : texturemap

<Fire_Effect__3dsmax>.Levels_paramName : string

<Fire_Effect__3dsmax>.Density_connected : boolean

<Fire_Effect__3dsmax>.Density_shader : texturemap

<Fire_Effect__3dsmax>.Density_paramName : string

<Fire_Effect__3dsmax>.Samples_connected : boolean

<Fire_Effect__3dsmax>.Samples_shader : texturemap

<Fire_Effect__3dsmax>.Samples_paramName : string

<Fire_Effect__3dsmax>.Phase_connected : boolean

<Fire_Effect__3dsmax>.Phase_shader : texturemap

<Fire_Effect__3dsmax>.Phase_paramName : string

<Fire_Effect__3dsmax>.Drift_connected : boolean

<Fire_Effect__3dsmax>.Drift_shader : texturemap

<Fire_Effect__3dsmax>.Drift_paramName : string

<Fire_Effect__3dsmax>.Explode_connected : boolean

<Fire_Effect__3dsmax>.Explode_shader : texturemap

<Fire_Effect__3dsmax>.Explode_paramName : string

<Fire_Effect__3dsmax>.Smoke_connected : boolean

<Fire_Effect__3dsmax>.Smoke_shader : texturemap

<Fire_Effect__3dsmax>.Smoke_paramName : string

<Fire_Effect__3dsmax>.Fury_connected : boolean

<Fire_Effect__3dsmax>.Fury_shader : texturemap

<Fire_Effect__3dsmax>.Fury_paramName : string

<Fire_Effect__3dsmax>.Active_connected : boolean

<Fire_Effect__3dsmax>.Active_shader : texturemap

<Fire_Effect__3dsmax>.Active_paramName : string

<Fire_Effect__3dsmax>.TheList : maxObject array

<Fire_Effect__3dsmax>.Shader_Version : integer

Fire_Effect__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


Flat_Mirror__3dsmax : textureMap

Flat_Mirror__3dsmax : textureMap {7773161f,9f5d5a1c}

Constructor:

Flat_Mirror__3dsmax: class instances not creatable by MAXScript

Alias:

max_FlatMirror

Properties:

<Flat_Mirror__3dsmax>.Parameters : paramBlock2

<Flat_Mirror__3dsmax>.ExtraParameters : paramBlock2

<Flat_Mirror__3dsmax>.BlurAmount : float

<Flat_Mirror__3dsmax>.DistortionAmount : float

<Flat_Mirror__3dsmax>.Level : float

<Flat_Mirror__3dsmax>.Size : float

<Flat_Mirror__3dsmax>.Phase : float

<Flat_Mirror__3dsmax>.ApplyBlur : boolean

<Flat_Mirror__3dsmax>.NthFrame : integer

<Flat_Mirror__3dsmax>.Frame : integer

<Flat_Mirror__3dsmax>.UseEnviroment : boolean

<Flat_Mirror__3dsmax>.ApplyToFaceID : boolean

<Flat_Mirror__3dsmax>.FaceID : integer

<Flat_Mirror__3dsmax>.DistortionType : integer

<Flat_Mirror__3dsmax>.NoiseType : integer

<Flat_Mirror__3dsmax>.GBufferID : integer

<Flat_Mirror__3dsmax>.Connection_struct__0000__Parameters : paramBlock2

<Flat_Mirror__3dsmax>.Connection_struct__0001__ExtraParameters : paramBlock2

<Flat_Mirror__3dsmax>.BlurAmount_connected : boolean

<Flat_Mirror__3dsmax>.BlurAmount_shader : texturemap

<Flat_Mirror__3dsmax>.BlurAmount_paramName : string

<Flat_Mirror__3dsmax>.DistortionAmount_connected : boolean

<Flat_Mirror__3dsmax>.DistortionAmount_shader : texturemap

<Flat_Mirror__3dsmax>.DistortionAmount_paramName : string

<Flat_Mirror__3dsmax>.Level_connected : boolean

<Flat_Mirror__3dsmax>.Level_shader : texturemap

<Flat_Mirror__3dsmax>.Level_paramName : string

<Flat_Mirror__3dsmax>.Size_connected : boolean

<Flat_Mirror__3dsmax>.Size_shader : texturemap

<Flat_Mirror__3dsmax>.Size_paramName : string

<Flat_Mirror__3dsmax>.Phase_connected : boolean

<Flat_Mirror__3dsmax>.Phase_shader : texturemap

<Flat_Mirror__3dsmax>.Phase_paramName : string

<Flat_Mirror__3dsmax>.ApplyBlur_connected : boolean

<Flat_Mirror__3dsmax>.ApplyBlur_shader : texturemap

<Flat_Mirror__3dsmax>.ApplyBlur_paramName : string

<Flat_Mirror__3dsmax>.NthFrame_connected : boolean

<Flat_Mirror__3dsmax>.NthFrame_shader : texturemap

<Flat_Mirror__3dsmax>.NthFrame_paramName : string

<Flat_Mirror__3dsmax>.Frame_connected : boolean

<Flat_Mirror__3dsmax>.Frame_shader : texturemap

<Flat_Mirror__3dsmax>.Frame_paramName : string

<Flat_Mirror__3dsmax>.UseEnviroment_connected : boolean

<Flat_Mirror__3dsmax>.UseEnviroment_shader : texturemap

<Flat_Mirror__3dsmax>.UseEnviroment_paramName : string

<Flat_Mirror__3dsmax>.ApplyToFaceID_connected : boolean

<Flat_Mirror__3dsmax>.ApplyToFaceID_shader : texturemap

<Flat_Mirror__3dsmax>.ApplyToFaceID_paramName : string

<Flat_Mirror__3dsmax>.FaceID_connected : boolean

<Flat_Mirror__3dsmax>.FaceID_shader : texturemap

<Flat_Mirror__3dsmax>.FaceID_paramName : string

<Flat_Mirror__3dsmax>.DistortionType_connected : boolean

<Flat_Mirror__3dsmax>.DistortionType_shader : texturemap

<Flat_Mirror__3dsmax>.DistortionType_paramName : string

<Flat_Mirror__3dsmax>.NoiseType_connected : boolean

<Flat_Mirror__3dsmax>.NoiseType_shader : texturemap

<Flat_Mirror__3dsmax>.NoiseType_paramName : string

<Flat_Mirror__3dsmax>.GBufferID_connected : boolean

<Flat_Mirror__3dsmax>.GBufferID_shader : texturemap

<Flat_Mirror__3dsmax>.GBufferID_paramName : string

<Flat_Mirror__3dsmax>.TheList : maxObject array

<Flat_Mirror__3dsmax>.Shader_Version : integer

Flat_Mirror__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


Fog__3dsmax : textureMap

Fog__3dsmax : textureMap {7773161f,a511523e}

Constructor:

Fog__3dsmax: class instances not creatable by MAXScript

Alias:

max_Fog

Properties:

<Fog__3dsmax>.Parameters : paramBlock2

<Fog__3dsmax>.ExtraParameters : paramBlock2

<Fog__3dsmax>.Color : fRGBA color

<Fog__3dsmax>.UseMap : boolean

<Fog__3dsmax>.UseOpacity : boolean

<Fog__3dsmax>.FogBackground : boolean

<Fog__3dsmax>.Type : integer

<Fog__3dsmax>.Near : float

<Fog__3dsmax>.Far : float

<Fog__3dsmax>.LayerTop : float

<Fog__3dsmax>.LayerBottom : float

<Fog__3dsmax>.LayerDensity : float

<Fog__3dsmax>.LayerFalloff : integer

<Fog__3dsmax>.HNoise : integer

<Fog__3dsmax>.NoiseScale : float

<Fog__3dsmax>.NoiseAngle : float

<Fog__3dsmax>.NoisePhase : float

<Fog__3dsmax>.NoiseExponential : integer

<Fog__3dsmax>.Active : boolean

<Fog__3dsmax>.Map : texturemap

<Fog__3dsmax>.Opacity : texturemap

<Fog__3dsmax>.Connection_struct__0000__Parameters : paramBlock2

<Fog__3dsmax>.Connection_struct__0001__ExtraParameters : paramBlock2

<Fog__3dsmax>.Color_connected : boolean

<Fog__3dsmax>.Color_shader : texturemap

<Fog__3dsmax>.Color_paramName : string

<Fog__3dsmax>.UseMap_connected : boolean

<Fog__3dsmax>.UseMap_shader : texturemap

<Fog__3dsmax>.UseMap_paramName : string

<Fog__3dsmax>.UseOpacity_connected : boolean

<Fog__3dsmax>.UseOpacity_shader : texturemap

<Fog__3dsmax>.UseOpacity_paramName : string

<Fog__3dsmax>.FogBackground_connected : boolean

<Fog__3dsmax>.FogBackground_shader : texturemap

<Fog__3dsmax>.FogBackground_paramName : string

<Fog__3dsmax>.Type_connected : boolean

<Fog__3dsmax>.Type_shader : texturemap

<Fog__3dsmax>.Type_paramName : string

<Fog__3dsmax>.Near_connected : boolean

<Fog__3dsmax>.Near_shader : texturemap

<Fog__3dsmax>.Near_paramName : string

<Fog__3dsmax>.Far_connected : boolean

<Fog__3dsmax>.Far_shader : texturemap

<Fog__3dsmax>.Far_paramName : string

<Fog__3dsmax>.LayerTop_connected : boolean

<Fog__3dsmax>.LayerTop_shader : texturemap

<Fog__3dsmax>.LayerTop_paramName : string

<Fog__3dsmax>.LayerBottom_connected : boolean

<Fog__3dsmax>.LayerBottom_shader : texturemap

<Fog__3dsmax>.LayerBottom_paramName : string

<Fog__3dsmax>.LayerDensity_connected : boolean

<Fog__3dsmax>.LayerDensity_shader : texturemap

<Fog__3dsmax>.LayerDensity_paramName : string

<Fog__3dsmax>.LayerFalloff_connected : boolean

<Fog__3dsmax>.LayerFalloff_shader : texturemap

<Fog__3dsmax>.LayerFalloff_paramName : string

<Fog__3dsmax>.HNoise_connected : boolean

<Fog__3dsmax>.HNoise_shader : texturemap

<Fog__3dsmax>.HNoise_paramName : string

<Fog__3dsmax>.NoiseScale_connected : boolean

<Fog__3dsmax>.NoiseScale_shader : texturemap

<Fog__3dsmax>.NoiseScale_paramName : string

<Fog__3dsmax>.NoiseAngle_connected : boolean

<Fog__3dsmax>.NoiseAngle_shader : texturemap

<Fog__3dsmax>.NoiseAngle_paramName : string

<Fog__3dsmax>.NoisePhase_connected : boolean

<Fog__3dsmax>.NoisePhase_shader : texturemap

<Fog__3dsmax>.NoisePhase_paramName : string

<Fog__3dsmax>.NoiseExponential_connected : boolean

<Fog__3dsmax>.NoiseExponential_shader : texturemap

<Fog__3dsmax>.NoiseExponential_paramName : string

<Fog__3dsmax>.Active_connected : boolean

<Fog__3dsmax>.Active_shader : texturemap

<Fog__3dsmax>.Active_paramName : string

<Fog__3dsmax>.TheList : maxObject array

<Fog__3dsmax>.Shader_Version : integer

Fog__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


Gradient__3dsmax : textureMap

Gradient__3dsmax : textureMap {7773161f,9569ba56}

Constructor:

Gradient__3dsmax: class instances not creatable by MAXScript

Alias:

max_Gradient

Properties:

<Gradient__3dsmax>.Parameters : paramBlock2

<Gradient__3dsmax>.ExtraParameters : paramBlock2

<Gradient__3dsmax>.Color1 : fRGBA color

<Gradient__3dsmax>.Color2 : fRGBA color

<Gradient__3dsmax>.Color3 : fRGBA color

<Gradient__3dsmax>.Map1 : texturemap

<Gradient__3dsmax>.Map2 : texturemap

<Gradient__3dsmax>.Map3 : texturemap

<Gradient__3dsmax>.Map1Enabled : boolean

<Gradient__3dsmax>.Map2Enabled : boolean

<Gradient__3dsmax>.Map3Enabled : boolean

<Gradient__3dsmax>.Color2Pos : float

<Gradient__3dsmax>.GradientType : integer

<Gradient__3dsmax>.NoiseAmount : float

<Gradient__3dsmax>.NoiseType : integer

<Gradient__3dsmax>.NoiseSize : float

<Gradient__3dsmax>.NoisePhase : float

<Gradient__3dsmax>.NoiseLevels : float

<Gradient__3dsmax>.NoiseThresholdLow : float

<Gradient__3dsmax>.NoiseThresholdHigh : float

<Gradient__3dsmax>.NoiseThresholdSmooth : float

<Gradient__3dsmax>.Coords : maxObject

<Gradient__3dsmax>.Output : maxObject

<Gradient__3dsmax>.GBufferID : integer

<Gradient__3dsmax>.Connection_struct__0000__Parameters : paramBlock2

<Gradient__3dsmax>.Connection_struct__0001__ExtraParameters : paramBlock2

<Gradient__3dsmax>.Color1_connected : boolean

<Gradient__3dsmax>.Color1_shader : texturemap

<Gradient__3dsmax>.Color1_paramName : string

<Gradient__3dsmax>.Color2_connected : boolean

<Gradient__3dsmax>.Color2_shader : texturemap

<Gradient__3dsmax>.Color2_paramName : string

<Gradient__3dsmax>.Color3_connected : boolean

<Gradient__3dsmax>.Color3_shader : texturemap

<Gradient__3dsmax>.Color3_paramName : string

<Gradient__3dsmax>.Map1Enabled_connected : boolean

<Gradient__3dsmax>.Map1Enabled_shader : texturemap

<Gradient__3dsmax>.Map1Enabled_paramName : string

<Gradient__3dsmax>.Map2Enabled_connected : boolean

<Gradient__3dsmax>.Map2Enabled_shader : texturemap

<Gradient__3dsmax>.Map2Enabled_paramName : string

<Gradient__3dsmax>.Map3Enabled_connected : boolean

<Gradient__3dsmax>.Map3Enabled_shader : texturemap

<Gradient__3dsmax>.Map3Enabled_paramName : string

<Gradient__3dsmax>.Color2Pos_connected : boolean

<Gradient__3dsmax>.Color2Pos_shader : texturemap

<Gradient__3dsmax>.Color2Pos_paramName : string

<Gradient__3dsmax>.GradientType_connected : boolean

<Gradient__3dsmax>.GradientType_shader : texturemap

<Gradient__3dsmax>.GradientType_paramName : string

<Gradient__3dsmax>.NoiseAmount_connected : boolean

<Gradient__3dsmax>.NoiseAmount_shader : texturemap

<Gradient__3dsmax>.NoiseAmount_paramName : string

<Gradient__3dsmax>.NoiseType_connected : boolean

<Gradient__3dsmax>.NoiseType_shader : texturemap

<Gradient__3dsmax>.NoiseType_paramName : string

<Gradient__3dsmax>.NoiseSize_connected : boolean

<Gradient__3dsmax>.NoiseSize_shader : texturemap

<Gradient__3dsmax>.NoiseSize_paramName : string

<Gradient__3dsmax>.NoisePhase_connected : boolean

<Gradient__3dsmax>.NoisePhase_shader : texturemap

<Gradient__3dsmax>.NoisePhase_paramName : string

<Gradient__3dsmax>.NoiseLevels_connected : boolean

<Gradient__3dsmax>.NoiseLevels_shader : texturemap

<Gradient__3dsmax>.NoiseLevels_paramName : string

<Gradient__3dsmax>.NoiseThresholdLow_connected : boolean

<Gradient__3dsmax>.NoiseThresholdLow_shader : texturemap

<Gradient__3dsmax>.NoiseThresholdLow_paramName : string

<Gradient__3dsmax>.NoiseThresholdHigh_connected : boolean

<Gradient__3dsmax>.NoiseThresholdHigh_shader : texturemap

<Gradient__3dsmax>.NoiseThresholdHigh_paramName : string

<Gradient__3dsmax>.NoiseThresholdSmooth_connected : boolean

<Gradient__3dsmax>.NoiseThresholdSmooth_shader : texturemap

<Gradient__3dsmax>.NoiseThresholdSmooth_paramName : string

<Gradient__3dsmax>.GBufferID_connected : boolean

<Gradient__3dsmax>.GBufferID_shader : texturemap

<Gradient__3dsmax>.GBufferID_paramName : string

<Gradient__3dsmax>.TheList : maxObject array

<Gradient__3dsmax>.Shader_Version : integer

Gradient__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


Gradient_Ramp__3dsmax : textureMap

Gradient_Ramp__3dsmax : textureMap {7773161f,850c5b24}

Constructor:

Gradient_Ramp__3dsmax: class instances not creatable by MAXScript

Alias:

max_GradientRamp

Properties:

<Gradient_Ramp__3dsmax>.Parameters : paramBlock2

<Gradient_Ramp__3dsmax>.ExtraParameters : paramBlock2

<Gradient_Ramp__3dsmax>.Position : float

<Gradient_Ramp__3dsmax>.Number : integer

<Gradient_Ramp__3dsmax>.Interp : integer

<Gradient_Ramp__3dsmax>.Color : fRGBA color

<Gradient_Ramp__3dsmax>.Shader : texturemap

<Gradient_Ramp__3dsmax>.Type : integer

<Gradient_Ramp__3dsmax>.Amount : float

<Gradient_Ramp__3dsmax>.Size : float

<Gradient_Ramp__3dsmax>.Phase : float

<Gradient_Ramp__3dsmax>.NoiseType : integer

<Gradient_Ramp__3dsmax>.NoiseLevels : float

<Gradient_Ramp__3dsmax>.NoiseThresholdLow : float

<Gradient_Ramp__3dsmax>.NoiseThresholdHigh : float

<Gradient_Ramp__3dsmax>.NoiseThresholdSmooth : float

<Gradient_Ramp__3dsmax>.VOID : integer

<Gradient_Ramp__3dsmax>.MapOn : boolean

<Gradient_Ramp__3dsmax>.Coords : maxObject

<Gradient_Ramp__3dsmax>.Output : maxObject

<Gradient_Ramp__3dsmax>.SourceMap : texturemap

<Gradient_Ramp__3dsmax>.InterpType : integer

<Gradient_Ramp__3dsmax>.Mode : integer

<Gradient_Ramp__3dsmax>.Bitmap : filename

<Gradient_Ramp__3dsmax>.Image_Frame_Number : integer

<Gradient_Ramp__3dsmax>.Flags : paramBlock2 array

<Gradient_Ramp__3dsmax>.GBufferID : integer

<Gradient_Ramp__3dsmax>.Connection_struct__0000__Parameters : paramBlock2

<Gradient_Ramp__3dsmax>.Connection_struct__0001__ExtraParameters : paramBlock2

<Gradient_Ramp__3dsmax>.Type_connected : boolean

<Gradient_Ramp__3dsmax>.Type_shader : texturemap

<Gradient_Ramp__3dsmax>.Type_paramName : string

<Gradient_Ramp__3dsmax>.Amount_connected : boolean

<Gradient_Ramp__3dsmax>.Amount_shader : texturemap

<Gradient_Ramp__3dsmax>.Amount_paramName : string

<Gradient_Ramp__3dsmax>.Size_connected : boolean

<Gradient_Ramp__3dsmax>.Size_shader : texturemap

<Gradient_Ramp__3dsmax>.Size_paramName : string

<Gradient_Ramp__3dsmax>.Phase_connected : boolean

<Gradient_Ramp__3dsmax>.Phase_shader : texturemap

<Gradient_Ramp__3dsmax>.Phase_paramName : string

<Gradient_Ramp__3dsmax>.NoiseType_connected : boolean

<Gradient_Ramp__3dsmax>.NoiseType_shader : texturemap

<Gradient_Ramp__3dsmax>.NoiseType_paramName : string

<Gradient_Ramp__3dsmax>.NoiseLevels_connected : boolean

<Gradient_Ramp__3dsmax>.NoiseLevels_shader : texturemap

<Gradient_Ramp__3dsmax>.NoiseLevels_paramName : string

<Gradient_Ramp__3dsmax>.NoiseThresholdLow_connected : boolean

<Gradient_Ramp__3dsmax>.NoiseThresholdLow_shader : texturemap

<Gradient_Ramp__3dsmax>.NoiseThresholdLow_paramName : string

<Gradient_Ramp__3dsmax>.NoiseThresholdHigh_connected : boolean

<Gradient_Ramp__3dsmax>.NoiseThresholdHigh_shader : texturemap

<Gradient_Ramp__3dsmax>.NoiseThresholdHigh_paramName : string

<Gradient_Ramp__3dsmax>.NoiseThresholdSmooth_connected : boolean

<Gradient_Ramp__3dsmax>.NoiseThresholdSmooth_shader : texturemap

<Gradient_Ramp__3dsmax>.NoiseThresholdSmooth_paramName : string

<Gradient_Ramp__3dsmax>.VOID_connected : boolean

<Gradient_Ramp__3dsmax>.VOID_shader : texturemap

<Gradient_Ramp__3dsmax>.VOID_paramName : string

<Gradient_Ramp__3dsmax>.MapOn_connected : boolean

<Gradient_Ramp__3dsmax>.MapOn_shader : texturemap

<Gradient_Ramp__3dsmax>.MapOn_paramName : string

<Gradient_Ramp__3dsmax>.InterpType_connected : boolean

<Gradient_Ramp__3dsmax>.InterpType_shader : texturemap

<Gradient_Ramp__3dsmax>.InterpType_paramName : string

<Gradient_Ramp__3dsmax>.Mode_connected : boolean

<Gradient_Ramp__3dsmax>.Mode_shader : texturemap

<Gradient_Ramp__3dsmax>.Mode_paramName : string

<Gradient_Ramp__3dsmax>.Bitmap_connected : boolean

<Gradient_Ramp__3dsmax>.Bitmap_shader : texturemap

<Gradient_Ramp__3dsmax>.Bitmap_paramName : string

<Gradient_Ramp__3dsmax>.GBufferID_connected : boolean

<Gradient_Ramp__3dsmax>.GBufferID_shader : texturemap

<Gradient_Ramp__3dsmax>.GBufferID_paramName : string

<Gradient_Ramp__3dsmax>.TheList : maxObject array

<Gradient_Ramp__3dsmax>.Shader_Version : integer

Gradient_Ramp__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


Height_Map_Displacement__3dsmax : textureMap

Height_Map_Displacement__3dsmax - superclass: textureMap; super-superclass:material - 6:0 - classID: #(2004031007, 1831041391)

Constructors:

Height_Map_Displacement__3dsmax ...

max_HeightMapDisplacement ...

Properties:

<Height_Map_Displacement__3dsmax>.heightMap UndefinedClass default: undefined -- texturemap

<Height_Map_Displacement__3dsmax>.mapIsInObjectSpace BooleanClass default: false -- animatable; boolean

<Height_Map_Displacement__3dsmax>.maxHeight Float default: 10.0 -- animatable; worldUnits

<Height_Map_Displacement__3dsmax>.minHeight Float default: -10.0 -- animatable; worldUnits

Height_Map_Displacement__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


Ink__N_Paint__3dsmax : textureMap

Ink__N_Paint__3dsmax : textureMap {7773161f,c56cb213}

Constructor:

Ink__N_Paint__3dsmax: class instances not creatable by MAXScript

Alias:

max_InkNPaint

Properties:

<Ink__N_Paint__3dsmax>.basic_parameters : paramBlock2

<Ink__N_Paint__3dsmax>.paint_parameters : paramBlock2

<Ink__N_Paint__3dsmax>.ink_parameters : paramBlock2

<Ink__N_Paint__3dsmax>.ExtraParameters : paramBlock2

<Ink__N_Paint__3dsmax>.fog_bg : boolean

<Ink__N_Paint__3dsmax>.bump_map_on : boolean

<Ink__N_Paint__3dsmax>.dsp_map_on : boolean

<Ink__N_Paint__3dsmax>.face_map_on : boolean

<Ink__N_Paint__3dsmax>.two_side_on : boolean

<Ink__N_Paint__3dsmax>.faceted_on : boolean

<Ink__N_Paint__3dsmax>.bump_map_amt : float

<Ink__N_Paint__3dsmax>.dsp_map_amt : float

<Ink__N_Paint__3dsmax>.bump_map : texturemap

<Ink__N_Paint__3dsmax>.dsp_map : texturemap

<Ink__N_Paint__3dsmax>.pixel_grid_on : boolean

<Ink__N_Paint__3dsmax>.opaque_alpha_on : boolean

<Ink__N_Paint__3dsmax>.paint_on : boolean

<Ink__N_Paint__3dsmax>.paint_color : fRGBA color

<Ink__N_Paint__3dsmax>.paint_map_amt : float

<Ink__N_Paint__3dsmax>.paint_map_on : boolean

<Ink__N_Paint__3dsmax>.paint_map : texturemap

<Ink__N_Paint__3dsmax>.paint_levels : integer

<Ink__N_Paint__3dsmax>.shade_amt_on : boolean

<Ink__N_Paint__3dsmax>.shade_amt : float

<Ink__N_Paint__3dsmax>.shade_color : fRGBA color

<Ink__N_Paint__3dsmax>.shade_color_map_amt : float

<Ink__N_Paint__3dsmax>.shade_color_map_on : boolean

<Ink__N_Paint__3dsmax>.shade_color_map : texturemap

<Ink__N_Paint__3dsmax>.spec_gloss : float

<Ink__N_Paint__3dsmax>.spec_on : boolean

<Ink__N_Paint__3dsmax>.spec_color : fRGBA color

<Ink__N_Paint__3dsmax>.spec_map_amt : float

<Ink__N_Paint__3dsmax>.spec_map_on : boolean

<Ink__N_Paint__3dsmax>.spec_map : texturemap

<Ink__N_Paint__3dsmax>.ink_on : boolean

<Ink__N_Paint__3dsmax>.ink_width_clamp_on : boolean

<Ink__N_Paint__3dsmax>.ink_auto_vary_on : boolean

<Ink__N_Paint__3dsmax>.ink_quality : integer

<Ink__N_Paint__3dsmax>.min_ink_width : float

<Ink__N_Paint__3dsmax>.max_ink_width : float

<Ink__N_Paint__3dsmax>.self_overlap_ink_on : boolean

<Ink__N_Paint__3dsmax>.self_underlap_ink_on : boolean

<Ink__N_Paint__3dsmax>.out_ink_on : boolean

<Ink__N_Paint__3dsmax>.internal_ink : boolean

<Ink__N_Paint__3dsmax>.matid_ink_on : boolean

<Ink__N_Paint__3dsmax>.smgroup_edge_ink_on : boolean

<Ink__N_Paint__3dsmax>.matid_adj_req_on : boolean

<Ink__N_Paint__3dsmax>.self_overlap_ink_color : fRGBA color

<Ink__N_Paint__3dsmax>.self_underlap_ink_color : fRGBA color

<Ink__N_Paint__3dsmax>.color1 : fRGBA color

<Ink__N_Paint__3dsmax>.internal_ink_color : fRGBA color

<Ink__N_Paint__3dsmax>.matid_ink_color : fRGBA color

<Ink__N_Paint__3dsmax>.smgroup_edge_ink_color : fRGBA color

<Ink__N_Paint__3dsmax>.intersect_bias : float

<Ink__N_Paint__3dsmax>.self_overlap_bias : float

<Ink__N_Paint__3dsmax>.self_underlap_bias : float

<Ink__N_Paint__3dsmax>.matid_intersect_bias : float

<Ink__N_Paint__3dsmax>.width_map : texturemap

<Ink__N_Paint__3dsmax>.out_ink_map : texturemap

<Ink__N_Paint__3dsmax>.smgroup_edge_map : texturemap

<Ink__N_Paint__3dsmax>.matid_map : texturemap

<Ink__N_Paint__3dsmax>.self_underlap_ink_map : texturemap

<Ink__N_Paint__3dsmax>.self_overlap_ink_map : texturemap

<Ink__N_Paint__3dsmax>.width_map_on : boolean

<Ink__N_Paint__3dsmax>.out_ink_map_on : boolean

<Ink__N_Paint__3dsmax>.smgroup_edge_map_on : boolean

<Ink__N_Paint__3dsmax>.matid_map_on : boolean

<Ink__N_Paint__3dsmax>.self_underlap_ink_map_on : boolean

<Ink__N_Paint__3dsmax>.self_overlap_ink_map_on : boolean

<Ink__N_Paint__3dsmax>.out_ink_map_amt : float

<Ink__N_Paint__3dsmax>.smgroup_edge_map_amt : float

<Ink__N_Paint__3dsmax>.matid_map_amt : float

<Ink__N_Paint__3dsmax>.width_map_amt : float

<Ink__N_Paint__3dsmax>.self_overlap_ink_map_amt : float

<Ink__N_Paint__3dsmax>.self_underlap_ink_map_amt : float

<Ink__N_Paint__3dsmax>.GBufferId : integer

<Ink__N_Paint__3dsmax>.Connection_struct__0000__basic_parameters : paramBlock2

<Ink__N_Paint__3dsmax>.Connection_struct__0001__paint_parameters : paramBlock2

<Ink__N_Paint__3dsmax>.Connection_struct__0002__ink_parameters : paramBlock2

<Ink__N_Paint__3dsmax>.Connection_struct__0003__ExtraParameters : paramBlock2

<Ink__N_Paint__3dsmax>.fog_bg_connected : boolean

<Ink__N_Paint__3dsmax>.fog_bg_shader : texturemap

<Ink__N_Paint__3dsmax>.fog_bg_paramName : string

<Ink__N_Paint__3dsmax>.bump_map_on_connected : boolean

<Ink__N_Paint__3dsmax>.bump_map_on_shader : texturemap

<Ink__N_Paint__3dsmax>.bump_map_on_paramName : string

<Ink__N_Paint__3dsmax>.dsp_map_on_connected : boolean

<Ink__N_Paint__3dsmax>.dsp_map_on_shader : texturemap

<Ink__N_Paint__3dsmax>.dsp_map_on_paramName : string

<Ink__N_Paint__3dsmax>.face_map_on_connected : boolean

<Ink__N_Paint__3dsmax>.face_map_on_shader : texturemap

<Ink__N_Paint__3dsmax>.face_map_on_paramName : string

<Ink__N_Paint__3dsmax>.two_side_on_connected : boolean

<Ink__N_Paint__3dsmax>.two_side_on_shader : texturemap

<Ink__N_Paint__3dsmax>.two_side_on_paramName : string

<Ink__N_Paint__3dsmax>.faceted_on_connected : boolean

<Ink__N_Paint__3dsmax>.faceted_on_shader : texturemap

<Ink__N_Paint__3dsmax>.faceted_on_paramName : string

<Ink__N_Paint__3dsmax>.bump_map_amt_connected : boolean

<Ink__N_Paint__3dsmax>.bump_map_amt_shader : texturemap

<Ink__N_Paint__3dsmax>.bump_map_amt_paramName : string

<Ink__N_Paint__3dsmax>.dsp_map_amt_connected : boolean

<Ink__N_Paint__3dsmax>.dsp_map_amt_shader : texturemap

<Ink__N_Paint__3dsmax>.dsp_map_amt_paramName : string

<Ink__N_Paint__3dsmax>.pixel_grid_on_connected : boolean

<Ink__N_Paint__3dsmax>.pixel_grid_on_shader : texturemap

<Ink__N_Paint__3dsmax>.pixel_grid_on_paramName : string

<Ink__N_Paint__3dsmax>.opaque_alpha_on_connected : boolean

<Ink__N_Paint__3dsmax>.opaque_alpha_on_shader : texturemap

<Ink__N_Paint__3dsmax>.opaque_alpha_on_paramName : string

<Ink__N_Paint__3dsmax>.paint_on_connected : boolean

<Ink__N_Paint__3dsmax>.paint_on_shader : texturemap

<Ink__N_Paint__3dsmax>.paint_on_paramName : string

<Ink__N_Paint__3dsmax>.paint_color_connected : boolean

<Ink__N_Paint__3dsmax>.paint_color_shader : texturemap

<Ink__N_Paint__3dsmax>.paint_color_paramName : string

<Ink__N_Paint__3dsmax>.paint_map_amt_connected : boolean

<Ink__N_Paint__3dsmax>.paint_map_amt_shader : texturemap

<Ink__N_Paint__3dsmax>.paint_map_amt_paramName : string

<Ink__N_Paint__3dsmax>.paint_map_on_connected : boolean

<Ink__N_Paint__3dsmax>.paint_map_on_shader : texturemap

<Ink__N_Paint__3dsmax>.paint_map_on_paramName : string

<Ink__N_Paint__3dsmax>.paint_levels_connected : boolean

<Ink__N_Paint__3dsmax>.paint_levels_shader : texturemap

<Ink__N_Paint__3dsmax>.paint_levels_paramName : string

<Ink__N_Paint__3dsmax>.shade_amt_on_connected : boolean

<Ink__N_Paint__3dsmax>.shade_amt_on_shader : texturemap

<Ink__N_Paint__3dsmax>.shade_amt_on_paramName : string

<Ink__N_Paint__3dsmax>.shade_amt_connected : boolean

<Ink__N_Paint__3dsmax>.shade_amt_shader : texturemap

<Ink__N_Paint__3dsmax>.shade_amt_paramName : string

<Ink__N_Paint__3dsmax>.shade_color_connected : boolean

<Ink__N_Paint__3dsmax>.shade_color_shader : texturemap

<Ink__N_Paint__3dsmax>.shade_color_paramName : string

<Ink__N_Paint__3dsmax>.shade_color_map_amt_connected : boolean

<Ink__N_Paint__3dsmax>.shade_color_map_amt_shader : texturemap

<Ink__N_Paint__3dsmax>.shade_color_map_amt_paramName : string

<Ink__N_Paint__3dsmax>.shade_color_map_on_connected : boolean

<Ink__N_Paint__3dsmax>.shade_color_map_on_shader : texturemap

<Ink__N_Paint__3dsmax>.shade_color_map_on_paramName : string

<Ink__N_Paint__3dsmax>.spec_gloss_connected : boolean

<Ink__N_Paint__3dsmax>.spec_gloss_shader : texturemap

<Ink__N_Paint__3dsmax>.spec_gloss_paramName : string

<Ink__N_Paint__3dsmax>.spec_on_connected : boolean

<Ink__N_Paint__3dsmax>.spec_on_shader : texturemap

<Ink__N_Paint__3dsmax>.spec_on_paramName : string

<Ink__N_Paint__3dsmax>.spec_color_connected : boolean

<Ink__N_Paint__3dsmax>.spec_color_shader : texturemap

<Ink__N_Paint__3dsmax>.spec_color_paramName : string

<Ink__N_Paint__3dsmax>.spec_map_amt_connected : boolean

<Ink__N_Paint__3dsmax>.spec_map_amt_shader : texturemap

<Ink__N_Paint__3dsmax>.spec_map_amt_paramName : string

<Ink__N_Paint__3dsmax>.spec_map_on_connected : boolean

<Ink__N_Paint__3dsmax>.spec_map_on_shader : texturemap

<Ink__N_Paint__3dsmax>.spec_map_on_paramName : string

<Ink__N_Paint__3dsmax>.ink_on_connected : boolean

<Ink__N_Paint__3dsmax>.ink_on_shader : texturemap

<Ink__N_Paint__3dsmax>.ink_on_paramName : string

<Ink__N_Paint__3dsmax>.ink_width_clamp_on_connected : boolean

<Ink__N_Paint__3dsmax>.ink_width_clamp_on_shader : texturemap

<Ink__N_Paint__3dsmax>.ink_width_clamp_on_paramName : string

<Ink__N_Paint__3dsmax>.ink_auto_vary_on_connected : boolean

<Ink__N_Paint__3dsmax>.ink_auto_vary_on_shader : texturemap

<Ink__N_Paint__3dsmax>.ink_auto_vary_on_paramName : string

<Ink__N_Paint__3dsmax>.ink_quality_connected : boolean

<Ink__N_Paint__3dsmax>.ink_quality_shader : texturemap

<Ink__N_Paint__3dsmax>.ink_quality_paramName : string

<Ink__N_Paint__3dsmax>.min_ink_width_connected : boolean

<Ink__N_Paint__3dsmax>.min_ink_width_shader : texturemap

<Ink__N_Paint__3dsmax>.min_ink_width_paramName : string

<Ink__N_Paint__3dsmax>.max_ink_width_connected : boolean

<Ink__N_Paint__3dsmax>.max_ink_width_shader : texturemap

<Ink__N_Paint__3dsmax>.max_ink_width_paramName : string

<Ink__N_Paint__3dsmax>.self_overlap_ink_on_connected : boolean

<Ink__N_Paint__3dsmax>.self_overlap_ink_on_shader : texturemap

<Ink__N_Paint__3dsmax>.self_overlap_ink_on_paramName : string

<Ink__N_Paint__3dsmax>.self_underlap_ink_on_connected : boolean

<Ink__N_Paint__3dsmax>.self_underlap_ink_on_shader : texturemap

<Ink__N_Paint__3dsmax>.self_underlap_ink_on_paramName : string

<Ink__N_Paint__3dsmax>.out_ink_on_connected : boolean

<Ink__N_Paint__3dsmax>.out_ink_on_shader : texturemap

<Ink__N_Paint__3dsmax>.out_ink_on_paramName : string

<Ink__N_Paint__3dsmax>.internal_ink_connected : boolean

<Ink__N_Paint__3dsmax>.internal_ink_shader : texturemap

<Ink__N_Paint__3dsmax>.internal_ink_paramName : string

<Ink__N_Paint__3dsmax>.matid_ink_on_connected : boolean

<Ink__N_Paint__3dsmax>.matid_ink_on_shader : texturemap

<Ink__N_Paint__3dsmax>.matid_ink_on_paramName : string

<Ink__N_Paint__3dsmax>.smgroup_edge_ink_on_connected : boolean

<Ink__N_Paint__3dsmax>.smgroup_edge_ink_on_shader : texturemap

<Ink__N_Paint__3dsmax>.smgroup_edge_ink_on_paramName : string

<Ink__N_Paint__3dsmax>.matid_adj_req_on_connected : boolean

<Ink__N_Paint__3dsmax>.matid_adj_req_on_shader : texturemap

<Ink__N_Paint__3dsmax>.matid_adj_req_on_paramName : string

<Ink__N_Paint__3dsmax>.self_overlap_ink_color_connected : boolean

<Ink__N_Paint__3dsmax>.self_overlap_ink_color_shader : texturemap

<Ink__N_Paint__3dsmax>.self_overlap_ink_color_paramName : string

<Ink__N_Paint__3dsmax>.self_underlap_ink_color_connected : boolean

<Ink__N_Paint__3dsmax>.self_underlap_ink_color_shader : texturemap

<Ink__N_Paint__3dsmax>.self_underlap_ink_color_paramName : string

<Ink__N_Paint__3dsmax>.color1_connected : boolean

<Ink__N_Paint__3dsmax>.color1_shader : texturemap

<Ink__N_Paint__3dsmax>.color1_paramName : string

<Ink__N_Paint__3dsmax>.internal_ink_color_connected : boolean

<Ink__N_Paint__3dsmax>.internal_ink_color_shader : texturemap

<Ink__N_Paint__3dsmax>.internal_ink_color_paramName : string

<Ink__N_Paint__3dsmax>.matid_ink_color_connected : boolean

<Ink__N_Paint__3dsmax>.matid_ink_color_shader : texturemap

<Ink__N_Paint__3dsmax>.matid_ink_color_paramName : string

<Ink__N_Paint__3dsmax>.smgroup_edge_ink_color_connected : boolean

<Ink__N_Paint__3dsmax>.smgroup_edge_ink_color_shader : texturemap

<Ink__N_Paint__3dsmax>.smgroup_edge_ink_color_paramName : string

<Ink__N_Paint__3dsmax>.intersect_bias_connected : boolean

<Ink__N_Paint__3dsmax>.intersect_bias_shader : texturemap

<Ink__N_Paint__3dsmax>.intersect_bias_paramName : string

<Ink__N_Paint__3dsmax>.self_overlap_bias_connected : boolean

<Ink__N_Paint__3dsmax>.self_overlap_bias_shader : texturemap

<Ink__N_Paint__3dsmax>.self_overlap_bias_paramName : string

<Ink__N_Paint__3dsmax>.self_underlap_bias_connected : boolean

<Ink__N_Paint__3dsmax>.self_underlap_bias_shader : texturemap

<Ink__N_Paint__3dsmax>.self_underlap_bias_paramName : string

<Ink__N_Paint__3dsmax>.matid_intersect_bias_connected : boolean

<Ink__N_Paint__3dsmax>.matid_intersect_bias_shader : texturemap

<Ink__N_Paint__3dsmax>.matid_intersect_bias_paramName : string

<Ink__N_Paint__3dsmax>.width_map_on_connected : boolean

<Ink__N_Paint__3dsmax>.width_map_on_shader : texturemap

<Ink__N_Paint__3dsmax>.width_map_on_paramName : string

<Ink__N_Paint__3dsmax>.out_ink_map_on_connected : boolean

<Ink__N_Paint__3dsmax>.out_ink_map_on_shader : texturemap

<Ink__N_Paint__3dsmax>.out_ink_map_on_paramName : string

<Ink__N_Paint__3dsmax>.smgroup_edge_map_on_connected : boolean

<Ink__N_Paint__3dsmax>.smgroup_edge_map_on_shader : texturemap

<Ink__N_Paint__3dsmax>.smgroup_edge_map_on_paramName : string

<Ink__N_Paint__3dsmax>.matid_map_on_connected : boolean

<Ink__N_Paint__3dsmax>.matid_map_on_shader : texturemap

<Ink__N_Paint__3dsmax>.matid_map_on_paramName : string

<Ink__N_Paint__3dsmax>.self_underlap_ink_map_on_connected : boolean

<Ink__N_Paint__3dsmax>.self_underlap_ink_map_on_shader : texturemap

<Ink__N_Paint__3dsmax>.self_underlap_ink_map_on_paramName : string

<Ink__N_Paint__3dsmax>.self_overlap_ink_map_on_connected : boolean

<Ink__N_Paint__3dsmax>.self_overlap_ink_map_on_shader : texturemap

<Ink__N_Paint__3dsmax>.self_overlap_ink_map_on_paramName : string

<Ink__N_Paint__3dsmax>.out_ink_map_amt_connected : boolean

<Ink__N_Paint__3dsmax>.out_ink_map_amt_shader : texturemap

<Ink__N_Paint__3dsmax>.out_ink_map_amt_paramName : string

<Ink__N_Paint__3dsmax>.smgroup_edge_map_amt_connected : boolean

<Ink__N_Paint__3dsmax>.smgroup_edge_map_amt_shader : texturemap

<Ink__N_Paint__3dsmax>.smgroup_edge_map_amt_paramName : string

<Ink__N_Paint__3dsmax>.matid_map_amt_connected : boolean

<Ink__N_Paint__3dsmax>.matid_map_amt_shader : texturemap

<Ink__N_Paint__3dsmax>.matid_map_amt_paramName : string

<Ink__N_Paint__3dsmax>.width_map_amt_connected : boolean

<Ink__N_Paint__3dsmax>.width_map_amt_shader : texturemap

<Ink__N_Paint__3dsmax>.width_map_amt_paramName : string

<Ink__N_Paint__3dsmax>.self_overlap_ink_map_amt_connected : boolean

<Ink__N_Paint__3dsmax>.self_overlap_ink_map_amt_shader : texturemap

<Ink__N_Paint__3dsmax>.self_overlap_ink_map_amt_paramName : string

<Ink__N_Paint__3dsmax>.self_underlap_ink_map_amt_connected : boolean

<Ink__N_Paint__3dsmax>.self_underlap_ink_map_amt_shader : texturemap

<Ink__N_Paint__3dsmax>.self_underlap_ink_map_amt_paramName : string

<Ink__N_Paint__3dsmax>.GBufferId_connected : boolean

<Ink__N_Paint__3dsmax>.GBufferId_shader : texturemap

<Ink__N_Paint__3dsmax>.GBufferId_paramName : string

<Ink__N_Paint__3dsmax>.TheList : maxObject array

<Ink__N_Paint__3dsmax>.Shader_Version : integer

Ink__N_Paint__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


Logarithmic_Camera_Exposure__3dsmax : textureMap

Logarithmic_Camera_Exposure__3dsmax : textureMap {7773161f,9b4cc224}

Constructor:

Logarithmic_Camera_Exposure__3dsmax: class instances not creatable by MAXScript

Properties:

<Logarithmic_Camera_Exposure__3dsmax>.LightscapeExposureControlParamsBlock : paramBlock2

<Logarithmic_Camera_Exposure__3dsmax>.active : boolean

<Logarithmic_Camera_Exposure__3dsmax>.physicalScale : float

<Logarithmic_Camera_Exposure__3dsmax>.chromaticAdaptation : boolean

<Logarithmic_Camera_Exposure__3dsmax>.colorDifferentiation : boolean

<Logarithmic_Camera_Exposure__3dsmax>.whiteColor : fRGBA color

<Logarithmic_Camera_Exposure__3dsmax>.processBG : boolean

<Logarithmic_Camera_Exposure__3dsmax>.brightness : float

<Logarithmic_Camera_Exposure__3dsmax>.contrast : float

<Logarithmic_Camera_Exposure__3dsmax>.midTones : float

<Logarithmic_Camera_Exposure__3dsmax>.daylight : boolean

<Logarithmic_Camera_Exposure__3dsmax>.exterior : boolean

<Logarithmic_Camera_Exposure__3dsmax>.useLegacyAlgorithm : boolean

<Logarithmic_Camera_Exposure__3dsmax>.Connection_struct__0000__LightscapeExposureControlParamsBlock : paramBlock2

<Logarithmic_Camera_Exposure__3dsmax>.active_connected : boolean

<Logarithmic_Camera_Exposure__3dsmax>.active_shader : texturemap

<Logarithmic_Camera_Exposure__3dsmax>.active_paramName : string

<Logarithmic_Camera_Exposure__3dsmax>.physicalScale_connected : boolean

<Logarithmic_Camera_Exposure__3dsmax>.physicalScale_shader : texturemap

<Logarithmic_Camera_Exposure__3dsmax>.physicalScale_paramName : string

<Logarithmic_Camera_Exposure__3dsmax>.chromaticAdaptation_connected : boolean

<Logarithmic_Camera_Exposure__3dsmax>.chromaticAdaptation_shader : texturemap

<Logarithmic_Camera_Exposure__3dsmax>.chromaticAdaptation_paramName : string

<Logarithmic_Camera_Exposure__3dsmax>.colorDifferentiation_connected : boolean

<Logarithmic_Camera_Exposure__3dsmax>.colorDifferentiation_shader : texturemap

<Logarithmic_Camera_Exposure__3dsmax>.colorDifferentiation_paramName : string

<Logarithmic_Camera_Exposure__3dsmax>.whiteColor_connected : boolean

<Logarithmic_Camera_Exposure__3dsmax>.whiteColor_shader : texturemap

<Logarithmic_Camera_Exposure__3dsmax>.whiteColor_paramName : string

<Logarithmic_Camera_Exposure__3dsmax>.processBG_connected : boolean

<Logarithmic_Camera_Exposure__3dsmax>.processBG_shader : texturemap

<Logarithmic_Camera_Exposure__3dsmax>.processBG_paramName : string

<Logarithmic_Camera_Exposure__3dsmax>.brightness_connected : boolean

<Logarithmic_Camera_Exposure__3dsmax>.brightness_shader : texturemap

<Logarithmic_Camera_Exposure__3dsmax>.brightness_paramName : string

<Logarithmic_Camera_Exposure__3dsmax>.contrast_connected : boolean

<Logarithmic_Camera_Exposure__3dsmax>.contrast_shader : texturemap

<Logarithmic_Camera_Exposure__3dsmax>.contrast_paramName : string

<Logarithmic_Camera_Exposure__3dsmax>.midTones_connected : boolean

<Logarithmic_Camera_Exposure__3dsmax>.midTones_shader : texturemap

<Logarithmic_Camera_Exposure__3dsmax>.midTones_paramName : string

<Logarithmic_Camera_Exposure__3dsmax>.daylight_connected : boolean

<Logarithmic_Camera_Exposure__3dsmax>.daylight_shader : texturemap

<Logarithmic_Camera_Exposure__3dsmax>.daylight_paramName : string

<Logarithmic_Camera_Exposure__3dsmax>.exterior_connected : boolean

<Logarithmic_Camera_Exposure__3dsmax>.exterior_shader : texturemap

<Logarithmic_Camera_Exposure__3dsmax>.exterior_paramName : string

<Logarithmic_Camera_Exposure__3dsmax>.useLegacyAlgorithm_connected : boolean

<Logarithmic_Camera_Exposure__3dsmax>.useLegacyAlgorithm_shader : texturemap

<Logarithmic_Camera_Exposure__3dsmax>.useLegacyAlgorithm_paramName : string

<Logarithmic_Camera_Exposure__3dsmax>.TheList : maxObject array

<Logarithmic_Camera_Exposure__3dsmax>.Shader_Version : integer

Logarithmic_Camera_Exposure__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


Marble__3dsmax : textureMap

Marble__3dsmax : textureMap {7773161f,82fca95f}

Constructor:

Marble__3dsmax: class instances not creatable by MAXScript

Alias:

max_Marble

Properties:

<Marble__3dsmax>.Parameters : paramBlock2

<Marble__3dsmax>.ExtraParameters : paramBlock2

<Marble__3dsmax>.Map1 : texturemap

<Marble__3dsmax>.Map2 : texturemap

<Marble__3dsmax>.Color1 : fRGBA color

<Marble__3dsmax>.Color2 : fRGBA color

<Marble__3dsmax>.Map1Enabled : boolean

<Marble__3dsmax>.Map2Enabled : boolean

<Marble__3dsmax>.Size : float

<Marble__3dsmax>.Width : float

<Marble__3dsmax>.Coords : maxObject

<Marble__3dsmax>.GBufferID : integer

<Marble__3dsmax>.Connection_struct__0000__Parameters : paramBlock2

<Marble__3dsmax>.Connection_struct__0001__ExtraParameters : paramBlock2

<Marble__3dsmax>.Color1_connected : boolean

<Marble__3dsmax>.Color1_shader : texturemap

<Marble__3dsmax>.Color1_paramName : string

<Marble__3dsmax>.Color2_connected : boolean

<Marble__3dsmax>.Color2_shader : texturemap

<Marble__3dsmax>.Color2_paramName : string

<Marble__3dsmax>.Map1Enabled_connected : boolean

<Marble__3dsmax>.Map1Enabled_shader : texturemap

<Marble__3dsmax>.Map1Enabled_paramName : string

<Marble__3dsmax>.Map2Enabled_connected : boolean

<Marble__3dsmax>.Map2Enabled_shader : texturemap

<Marble__3dsmax>.Map2Enabled_paramName : string

<Marble__3dsmax>.Size_connected : boolean

<Marble__3dsmax>.Size_shader : texturemap

<Marble__3dsmax>.Size_paramName : string

<Marble__3dsmax>.Width_connected : boolean

<Marble__3dsmax>.Width_shader : texturemap

<Marble__3dsmax>.Width_paramName : string

<Marble__3dsmax>.GBufferID_connected : boolean

<Marble__3dsmax>.GBufferID_shader : texturemap

<Marble__3dsmax>.GBufferID_paramName : string

<Marble__3dsmax>.TheList : maxObject array

<Marble__3dsmax>.Shader_Version : integer

Marble__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


Mask__3dsmax : textureMap

Mask__3dsmax : textureMap {7773161f,79fd4433}

Constructor:

Mask__3dsmax: class instances not creatable by MAXScript

Alias:

max_Mask

Properties:

<Mask__3dsmax>.Parameters : paramBlock2

<Mask__3dsmax>.ExtraParameters : paramBlock2

<Mask__3dsmax>.Map : texturemap

<Mask__3dsmax>.Mask : texturemap

<Mask__3dsmax>.MapEnabled : boolean

<Mask__3dsmax>.MaskEnabled : boolean

<Mask__3dsmax>.MaskInverted : boolean

<Mask__3dsmax>.GBufferID : integer

<Mask__3dsmax>.Connection_struct__0000__Parameters : paramBlock2

<Mask__3dsmax>.Connection_struct__0001__ExtraParameters : paramBlock2

<Mask__3dsmax>.MapEnabled_connected : boolean

<Mask__3dsmax>.MapEnabled_shader : texturemap

<Mask__3dsmax>.MapEnabled_paramName : string

<Mask__3dsmax>.MaskEnabled_connected : boolean

<Mask__3dsmax>.MaskEnabled_shader : texturemap

<Mask__3dsmax>.MaskEnabled_paramName : string

<Mask__3dsmax>.MaskInverted_connected : boolean

<Mask__3dsmax>.MaskInverted_shader : texturemap

<Mask__3dsmax>.MaskInverted_paramName : string

<Mask__3dsmax>.GBufferID_connected : boolean

<Mask__3dsmax>.GBufferID_shader : texturemap

<Mask__3dsmax>.GBufferID_paramName : string

<Mask__3dsmax>.TheList : maxObject array

<Mask__3dsmax>.Shader_Version : integer

Mask__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


Max_Bitmap__3dsmax : textureMap

Max_Bitmap__3dsmax : textureMap {7773161f,77febc61}

Constructor:

Max_Bitmap__3dsmax: class instances not creatable by MAXScript

Alias:

max_Bitmap

Properties:

<Max_Bitmap__3dsmax>.Parameters : paramBlock2

<Max_Bitmap__3dsmax>.time_parameters : paramBlock2

<Max_Bitmap__3dsmax>.ExtraParameters : paramBlock2

<Max_Bitmap__3dsmax>.ClipU : float

<Max_Bitmap__3dsmax>.ClipV : float

<Max_Bitmap__3dsmax>.ClipW : float

<Max_Bitmap__3dsmax>.ClipH : float

<Max_Bitmap__3dsmax>.Jitter : float

<Max_Bitmap__3dsmax>.UseJitter : boolean

<Max_Bitmap__3dsmax>.Apply : boolean

<Max_Bitmap__3dsmax>.CropPlace : integer

<Max_Bitmap__3dsmax>.Filtering : integer

<Max_Bitmap__3dsmax>.MonoOutput : integer

<Max_Bitmap__3dsmax>.RGBOutput : integer

<Max_Bitmap__3dsmax>.AlphaSource : integer

<Max_Bitmap__3dsmax>.PreMultAlpha : boolean

<Max_Bitmap__3dsmax>.Bitmap : filename

<Max_Bitmap__3dsmax>.Image_Frame_Number : integer

<Max_Bitmap__3dsmax>.Coords : maxObject

<Max_Bitmap__3dsmax>.Output : maxObject

<Max_Bitmap__3dsmax>.startTime : integer

<Max_Bitmap__3dsmax>.playBackRate : float

<Max_Bitmap__3dsmax>.endCondition : integer

<Max_Bitmap__3dsmax>.tieTimeToMatIDs : boolean

<Max_Bitmap__3dsmax>.GBufferID : integer

<Max_Bitmap__3dsmax>.currentTime : integer

<Max_Bitmap__3dsmax>.firstFrame : integer

<Max_Bitmap__3dsmax>.lastFrame : integer

<Max_Bitmap__3dsmax>.ticksPerFrame : integer

<Max_Bitmap__3dsmax>.bitmapFrames : filename array

<Max_Bitmap__3dsmax>.Image_Frame_Number : int array

<Max_Bitmap__3dsmax>.bitmapFrames_Padding : integer

<Max_Bitmap__3dsmax>.useBitmapEvalCallback : boolean

<Max_Bitmap__3dsmax>.bitmapEvalCallback : integer

<Max_Bitmap__3dsmax>.bitmapEvalArg : integer

<Max_Bitmap__3dsmax>.bitmapType : integer

<Max_Bitmap__3dsmax>.bitmapEvalArgFrames : int array

<Max_Bitmap__3dsmax>.bitmapEvalArgFrames_Padding : integer

<Max_Bitmap__3dsmax>.bitmapWidth : integer

<Max_Bitmap__3dsmax>.bitmapHeight : integer

<Max_Bitmap__3dsmax>.filterEvalCallback : integer

<Max_Bitmap__3dsmax>.bitmapEvalCallbackHi64 : integer

<Max_Bitmap__3dsmax>.bitmapEvalArgHi64 : integer

<Max_Bitmap__3dsmax>.filterEvalCallbackHi64 : integer

<Max_Bitmap__3dsmax>.bitmapEvalArgFramesHi64 : int array

<Max_Bitmap__3dsmax>.bitmapEvalArgsFramesHi64_Padding : integer

<Max_Bitmap__3dsmax>.Connection_struct__0000__Parameters : paramBlock2

<Max_Bitmap__3dsmax>.Connection_struct__0001__time_parameters : paramBlock2

<Max_Bitmap__3dsmax>.Connection_struct__0002__ExtraParameters : paramBlock2

<Max_Bitmap__3dsmax>.ClipU_connected : boolean

<Max_Bitmap__3dsmax>.ClipU_shader : texturemap

<Max_Bitmap__3dsmax>.ClipU_paramName : string

<Max_Bitmap__3dsmax>.ClipV_connected : boolean

<Max_Bitmap__3dsmax>.ClipV_shader : texturemap

<Max_Bitmap__3dsmax>.ClipV_paramName : string

<Max_Bitmap__3dsmax>.ClipW_connected : boolean

<Max_Bitmap__3dsmax>.ClipW_shader : texturemap

<Max_Bitmap__3dsmax>.ClipW_paramName : string

<Max_Bitmap__3dsmax>.ClipH_connected : boolean

<Max_Bitmap__3dsmax>.ClipH_shader : texturemap

<Max_Bitmap__3dsmax>.ClipH_paramName : string

<Max_Bitmap__3dsmax>.Jitter_connected : boolean

<Max_Bitmap__3dsmax>.Jitter_shader : texturemap

<Max_Bitmap__3dsmax>.Jitter_paramName : string

<Max_Bitmap__3dsmax>.UseJitter_connected : boolean

<Max_Bitmap__3dsmax>.UseJitter_shader : texturemap

<Max_Bitmap__3dsmax>.UseJitter_paramName : string

<Max_Bitmap__3dsmax>.Apply_connected : boolean

<Max_Bitmap__3dsmax>.Apply_shader : texturemap

<Max_Bitmap__3dsmax>.Apply_paramName : string

<Max_Bitmap__3dsmax>.CropPlace_connected : boolean

<Max_Bitmap__3dsmax>.CropPlace_shader : texturemap

<Max_Bitmap__3dsmax>.CropPlace_paramName : string

<Max_Bitmap__3dsmax>.Filtering_connected : boolean

<Max_Bitmap__3dsmax>.Filtering_shader : texturemap

<Max_Bitmap__3dsmax>.Filtering_paramName : string

<Max_Bitmap__3dsmax>.MonoOutput_connected : boolean

<Max_Bitmap__3dsmax>.MonoOutput_shader : texturemap

<Max_Bitmap__3dsmax>.MonoOutput_paramName : string

<Max_Bitmap__3dsmax>.RGBOutput_connected : boolean

<Max_Bitmap__3dsmax>.RGBOutput_shader : texturemap

<Max_Bitmap__3dsmax>.RGBOutput_paramName : string

<Max_Bitmap__3dsmax>.AlphaSource_connected : boolean

<Max_Bitmap__3dsmax>.AlphaSource_shader : texturemap

<Max_Bitmap__3dsmax>.AlphaSource_paramName : string

<Max_Bitmap__3dsmax>.PreMultAlpha_connected : boolean

<Max_Bitmap__3dsmax>.PreMultAlpha_shader : texturemap

<Max_Bitmap__3dsmax>.PreMultAlpha_paramName : string

<Max_Bitmap__3dsmax>.Bitmap_connected : boolean

<Max_Bitmap__3dsmax>.Bitmap_shader : texturemap

<Max_Bitmap__3dsmax>.Bitmap_paramName : string

<Max_Bitmap__3dsmax>.startTime_connected : boolean

<Max_Bitmap__3dsmax>.startTime_shader : texturemap

<Max_Bitmap__3dsmax>.startTime_paramName : string

<Max_Bitmap__3dsmax>.playBackRate_connected : boolean

<Max_Bitmap__3dsmax>.playBackRate_shader : texturemap

<Max_Bitmap__3dsmax>.playBackRate_paramName : string

<Max_Bitmap__3dsmax>.endCondition_connected : boolean

<Max_Bitmap__3dsmax>.endCondition_shader : texturemap

<Max_Bitmap__3dsmax>.endCondition_paramName : string

<Max_Bitmap__3dsmax>.tieTimeToMatIDs_connected : boolean

<Max_Bitmap__3dsmax>.tieTimeToMatIDs_shader : texturemap

<Max_Bitmap__3dsmax>.tieTimeToMatIDs_paramName : string

<Max_Bitmap__3dsmax>.GBufferID_connected : boolean

<Max_Bitmap__3dsmax>.GBufferID_shader : texturemap

<Max_Bitmap__3dsmax>.GBufferID_paramName : string

<Max_Bitmap__3dsmax>.currentTime_connected : boolean

<Max_Bitmap__3dsmax>.currentTime_shader : texturemap

<Max_Bitmap__3dsmax>.currentTime_paramName : string

<Max_Bitmap__3dsmax>.firstFrame_connected : boolean

<Max_Bitmap__3dsmax>.firstFrame_shader : texturemap

<Max_Bitmap__3dsmax>.firstFrame_paramName : string

<Max_Bitmap__3dsmax>.lastFrame_connected : boolean

<Max_Bitmap__3dsmax>.lastFrame_shader : texturemap

<Max_Bitmap__3dsmax>.lastFrame_paramName : string

<Max_Bitmap__3dsmax>.ticksPerFrame_connected : boolean

<Max_Bitmap__3dsmax>.ticksPerFrame_shader : texturemap

<Max_Bitmap__3dsmax>.ticksPerFrame_paramName : string

<Max_Bitmap__3dsmax>.bitmapFrames_Padding_connected : boolean

<Max_Bitmap__3dsmax>.bitmapFrames_Padding_shader : texturemap

<Max_Bitmap__3dsmax>.bitmapFrames_Padding_paramName : string

<Max_Bitmap__3dsmax>.useBitmapEvalCallback_connected : boolean

<Max_Bitmap__3dsmax>.useBitmapEvalCallback_shader : texturemap

<Max_Bitmap__3dsmax>.useBitmapEvalCallback_paramName : string

<Max_Bitmap__3dsmax>.bitmapEvalCallback_connected : boolean

<Max_Bitmap__3dsmax>.bitmapEvalCallback_shader : texturemap

<Max_Bitmap__3dsmax>.bitmapEvalCallback_paramName : string

<Max_Bitmap__3dsmax>.bitmapEvalArg_connected : boolean

<Max_Bitmap__3dsmax>.bitmapEvalArg_shader : texturemap

<Max_Bitmap__3dsmax>.bitmapEvalArg_paramName : string

<Max_Bitmap__3dsmax>.bitmapType_connected : boolean

<Max_Bitmap__3dsmax>.bitmapType_shader : texturemap

<Max_Bitmap__3dsmax>.bitmapType_paramName : string

<Max_Bitmap__3dsmax>.bitmapEvalArgFrames_Padding_connected : boolean

<Max_Bitmap__3dsmax>.bitmapEvalArgFrames_Padding_shader : texturemap

<Max_Bitmap__3dsmax>.bitmapEvalArgFrames_Padding_paramName : string

<Max_Bitmap__3dsmax>.bitmapWidth_connected : boolean

<Max_Bitmap__3dsmax>.bitmapWidth_shader : texturemap

<Max_Bitmap__3dsmax>.bitmapWidth_paramName : string

<Max_Bitmap__3dsmax>.bitmapHeight_connected : boolean

<Max_Bitmap__3dsmax>.bitmapHeight_shader : texturemap

<Max_Bitmap__3dsmax>.bitmapHeight_paramName : string

<Max_Bitmap__3dsmax>.filterEvalCallback_connected : boolean

<Max_Bitmap__3dsmax>.filterEvalCallback_shader : texturemap

<Max_Bitmap__3dsmax>.filterEvalCallback_paramName : string

<Max_Bitmap__3dsmax>.bitmapEvalCallbackHi64_connected : boolean

<Max_Bitmap__3dsmax>.bitmapEvalCallbackHi64_shader : texturemap

<Max_Bitmap__3dsmax>.bitmapEvalCallbackHi64_paramName : string

<Max_Bitmap__3dsmax>.bitmapEvalArgHi64_connected : boolean

<Max_Bitmap__3dsmax>.bitmapEvalArgHi64_shader : texturemap

<Max_Bitmap__3dsmax>.bitmapEvalArgHi64_paramName : string

<Max_Bitmap__3dsmax>.filterEvalCallbackHi64_connected : boolean

<Max_Bitmap__3dsmax>.filterEvalCallbackHi64_shader : texturemap

<Max_Bitmap__3dsmax>.filterEvalCallbackHi64_paramName : string

<Max_Bitmap__3dsmax>.bitmapEvalArgsFramesHi64_Padding_connected : boolean

<Max_Bitmap__3dsmax>.bitmapEvalArgsFramesHi64_Padding_shader : texturemap

<Max_Bitmap__3dsmax>.bitmapEvalArgsFramesHi64_Padding_paramName : string

<Max_Bitmap__3dsmax>.TheList : maxObject array

<Max_Bitmap__3dsmax>.Shader_Version : integer

Max_Bitmap__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Mix__3dsmax : textureMap

Mix__3dsmax : textureMap {7773161f,a4f24c33}

Constructor:

Mix__3dsmax: class instances not creatable by MAXScript

Alias:

max_Mix

Properties:

<Mix__3dsmax>.Parameters : paramBlock2

<Mix__3dsmax>.ExtraParameters : paramBlock2

<Mix__3dsmax>.MixAmount : float

<Mix__3dsmax>.Lower : float

<Mix__3dsmax>.Upper : float

<Mix__3dsmax>.UseCurve : boolean

<Mix__3dsmax>.Color1 : fRGBA color

<Mix__3dsmax>.Color2 : fRGBA color

<Mix__3dsmax>.Map1 : texturemap

<Mix__3dsmax>.Map2 : texturemap

<Mix__3dsmax>.Mask : texturemap

<Mix__3dsmax>.Map1Enabled : boolean

<Mix__3dsmax>.Map2Enabled : boolean

<Mix__3dsmax>.MaskEnabled : boolean

<Mix__3dsmax>.Output : maxObject

<Mix__3dsmax>.GBufferID : integer

<Mix__3dsmax>.Connection_struct__0000__Parameters : paramBlock2

<Mix__3dsmax>.Connection_struct__0001__ExtraParameters : paramBlock2

<Mix__3dsmax>.MixAmount_connected : boolean

<Mix__3dsmax>.MixAmount_shader : texturemap

<Mix__3dsmax>.MixAmount_paramName : string

<Mix__3dsmax>.Lower_connected : boolean

<Mix__3dsmax>.Lower_shader : texturemap

<Mix__3dsmax>.Lower_paramName : string

<Mix__3dsmax>.Upper_connected : boolean

<Mix__3dsmax>.Upper_shader : texturemap

<Mix__3dsmax>.Upper_paramName : string

<Mix__3dsmax>.UseCurve_connected : boolean

<Mix__3dsmax>.UseCurve_shader : texturemap

<Mix__3dsmax>.UseCurve_paramName : string

<Mix__3dsmax>.Color1_connected : boolean

<Mix__3dsmax>.Color1_shader : texturemap

<Mix__3dsmax>.Color1_paramName : string

<Mix__3dsmax>.Color2_connected : boolean

<Mix__3dsmax>.Color2_shader : texturemap

<Mix__3dsmax>.Color2_paramName : string

<Mix__3dsmax>.Map1Enabled_connected : boolean

<Mix__3dsmax>.Map1Enabled_shader : texturemap

<Mix__3dsmax>.Map1Enabled_paramName : string

<Mix__3dsmax>.Map2Enabled_connected : boolean

<Mix__3dsmax>.Map2Enabled_shader : texturemap

<Mix__3dsmax>.Map2Enabled_paramName : string

<Mix__3dsmax>.MaskEnabled_connected : boolean

<Mix__3dsmax>.MaskEnabled_shader : texturemap

<Mix__3dsmax>.MaskEnabled_paramName : string

<Mix__3dsmax>.GBufferID_connected : boolean

<Mix__3dsmax>.GBufferID_shader : texturemap

<Mix__3dsmax>.GBufferID_paramName : string

<Mix__3dsmax>.TheList : maxObject array

<Mix__3dsmax>.Shader_Version : integer

Mix__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


Noise__3dsmax : textureMap

Noise__3dsmax : textureMap {7773161f,72035259}

Constructor:

Noise__3dsmax: class instances not creatable by MAXScript

Alias:

max_Noise

Properties:

<Noise__3dsmax>.Parameters : paramBlock2

<Noise__3dsmax>.ExtraParameters : paramBlock2

<Noise__3dsmax>.Color1 : fRGBA color

<Noise__3dsmax>.Color2 : fRGBA color

<Noise__3dsmax>.Map1 : texturemap

<Noise__3dsmax>.Map2 : texturemap

<Noise__3dsmax>.Map1Enabled : boolean

<Noise__3dsmax>.Map2Enabled : boolean

<Noise__3dsmax>.Size : float

<Noise__3dsmax>.Phase : float

<Noise__3dsmax>.Levels : float

<Noise__3dsmax>.ThresholdLow : float

<Noise__3dsmax>.ThresholdHigh : float

<Noise__3dsmax>.Type : integer

<Noise__3dsmax>.Coords : maxObject

<Noise__3dsmax>.Output : maxObject

<Noise__3dsmax>.GBufferID : integer

<Noise__3dsmax>.Connection_struct__0000__Parameters : paramBlock2

<Noise__3dsmax>.Connection_struct__0001__ExtraParameters : paramBlock2

<Noise__3dsmax>.Color1_connected : boolean

<Noise__3dsmax>.Color1_shader : texturemap

<Noise__3dsmax>.Color1_paramName : string

<Noise__3dsmax>.Color2_connected : boolean

<Noise__3dsmax>.Color2_shader : texturemap

<Noise__3dsmax>.Color2_paramName : string

<Noise__3dsmax>.Map1Enabled_connected : boolean

<Noise__3dsmax>.Map1Enabled_shader : texturemap

<Noise__3dsmax>.Map1Enabled_paramName : string

<Noise__3dsmax>.Map2Enabled_connected : boolean

<Noise__3dsmax>.Map2Enabled_shader : texturemap

<Noise__3dsmax>.Map2Enabled_paramName : string

<Noise__3dsmax>.Size_connected : boolean

<Noise__3dsmax>.Size_shader : texturemap

<Noise__3dsmax>.Size_paramName : string

<Noise__3dsmax>.Phase_connected : boolean

<Noise__3dsmax>.Phase_shader : texturemap

<Noise__3dsmax>.Phase_paramName : string

<Noise__3dsmax>.Levels_connected : boolean

<Noise__3dsmax>.Levels_shader : texturemap

<Noise__3dsmax>.Levels_paramName : string

<Noise__3dsmax>.ThresholdLow_connected : boolean

<Noise__3dsmax>.ThresholdLow_shader : texturemap

<Noise__3dsmax>.ThresholdLow_paramName : string

<Noise__3dsmax>.ThresholdHigh_connected : boolean

<Noise__3dsmax>.ThresholdHigh_shader : texturemap

<Noise__3dsmax>.ThresholdHigh_paramName : string

<Noise__3dsmax>.Type_connected : boolean

<Noise__3dsmax>.Type_shader : texturemap

<Noise__3dsmax>.Type_paramName : string

<Noise__3dsmax>.GBufferID_connected : boolean

<Noise__3dsmax>.GBufferID_shader : texturemap

<Noise__3dsmax>.GBufferID_paramName : string

<Noise__3dsmax>.TheList : maxObject array

<Noise__3dsmax>.Shader_Version : integer

Noise__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


Output__3dsmax : textureMap

Output__3dsmax : textureMap {7773161f,74fea46a}

Constructor:

Output__3dsmax: class instances not creatable by MAXScript

Alias:

max_Output

Properties:

<Output__3dsmax>.Parameters : paramBlock2

<Output__3dsmax>.ExtraParameters : paramBlock2

<Output__3dsmax>.Map1 : texturemap

<Output__3dsmax>.Map1Enabled : boolean

<Output__3dsmax>.Output : maxObject

<Output__3dsmax>.GBufferID : integer

<Output__3dsmax>.Connection_struct__0000__Parameters : paramBlock2

<Output__3dsmax>.Connection_struct__0001__ExtraParameters : paramBlock2

<Output__3dsmax>.Map1Enabled_connected : boolean

<Output__3dsmax>.Map1Enabled_shader : texturemap

<Output__3dsmax>.Map1Enabled_paramName : string

<Output__3dsmax>.GBufferID_connected : boolean

<Output__3dsmax>.GBufferID_shader : texturemap

<Output__3dsmax>.GBufferID_paramName : string

<Output__3dsmax>.TheList : maxObject array

<Output__3dsmax>.Shader_Version : integer

Output__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


Particle_Age__3dsmax : textureMap

Particle_Age__3dsmax : textureMap {7773161f,93f54828}

Constructor:

Particle_Age__3dsmax: class instances not creatable by MAXScript

Alias:

max_ParticleAge

Properties:

<Particle_Age__3dsmax>.Parameters : paramBlock2

<Particle_Age__3dsmax>.ExtraParameters : paramBlock2

<Particle_Age__3dsmax>.Color1 : fRGBA color

<Particle_Age__3dsmax>.Color2 : fRGBA color

<Particle_Age__3dsmax>.Color3 : fRGBA color

<Particle_Age__3dsmax>.Map1 : texturemap

<Particle_Age__3dsmax>.Map2 : texturemap

<Particle_Age__3dsmax>.Map3 : texturemap

<Particle_Age__3dsmax>.Map1Enabled : boolean

<Particle_Age__3dsmax>.Map2Enabled : boolean

<Particle_Age__3dsmax>.Map3Enabled : boolean

<Particle_Age__3dsmax>.Age1 : float

<Particle_Age__3dsmax>.Age2 : float

<Particle_Age__3dsmax>.Age3 : float

<Particle_Age__3dsmax>.Output : maxObject

<Particle_Age__3dsmax>.GBufferID : integer

<Particle_Age__3dsmax>.Connection_struct__0000__Parameters : paramBlock2

<Particle_Age__3dsmax>.Connection_struct__0001__ExtraParameters : paramBlock2

<Particle_Age__3dsmax>.Color1_connected : boolean

<Particle_Age__3dsmax>.Color1_shader : texturemap

<Particle_Age__3dsmax>.Color1_paramName : string

<Particle_Age__3dsmax>.Color2_connected : boolean

<Particle_Age__3dsmax>.Color2_shader : texturemap

<Particle_Age__3dsmax>.Color2_paramName : string

<Particle_Age__3dsmax>.Color3_connected : boolean

<Particle_Age__3dsmax>.Color3_shader : texturemap

<Particle_Age__3dsmax>.Color3_paramName : string

<Particle_Age__3dsmax>.Map1Enabled_connected : boolean

<Particle_Age__3dsmax>.Map1Enabled_shader : texturemap

<Particle_Age__3dsmax>.Map1Enabled_paramName : string

<Particle_Age__3dsmax>.Map2Enabled_connected : boolean

<Particle_Age__3dsmax>.Map2Enabled_shader : texturemap

<Particle_Age__3dsmax>.Map2Enabled_paramName : string

<Particle_Age__3dsmax>.Map3Enabled_connected : boolean

<Particle_Age__3dsmax>.Map3Enabled_shader : texturemap

<Particle_Age__3dsmax>.Map3Enabled_paramName : string

<Particle_Age__3dsmax>.Age1_connected : boolean

<Particle_Age__3dsmax>.Age1_shader : texturemap

<Particle_Age__3dsmax>.Age1_paramName : string

<Particle_Age__3dsmax>.Age2_connected : boolean

<Particle_Age__3dsmax>.Age2_shader : texturemap

<Particle_Age__3dsmax>.Age2_paramName : string

<Particle_Age__3dsmax>.Age3_connected : boolean

<Particle_Age__3dsmax>.Age3_shader : texturemap

<Particle_Age__3dsmax>.Age3_paramName : string

<Particle_Age__3dsmax>.GBufferID_connected : boolean

<Particle_Age__3dsmax>.GBufferID_shader : texturemap

<Particle_Age__3dsmax>.GBufferID_paramName : string

<Particle_Age__3dsmax>.TheList : maxObject array

<Particle_Age__3dsmax>.Shader_Version : integer

Particle_Age__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


Particle_Blur__3dsmax : textureMap

Particle_Blur__3dsmax : textureMap {7773161f,82055329}

Constructor:

Particle_Blur__3dsmax: class instances not creatable by MAXScript

Alias:

max_ParticleBlur

Properties:

<Particle_Blur__3dsmax>.Parameters : paramBlock2

<Particle_Blur__3dsmax>.ExtraParameters : paramBlock2

<Particle_Blur__3dsmax>.Color1 : fRGBA color

<Particle_Blur__3dsmax>.Color2 : fRGBA color

<Particle_Blur__3dsmax>.Sharp : float

<Particle_Blur__3dsmax>.GBufferID : integer

<Particle_Blur__3dsmax>.Connection_struct__0000__Parameters : paramBlock2

<Particle_Blur__3dsmax>.Connection_struct__0001__ExtraParameters : paramBlock2

<Particle_Blur__3dsmax>.Color1_connected : boolean

<Particle_Blur__3dsmax>.Color1_shader : texturemap

<Particle_Blur__3dsmax>.Color1_paramName : string

<Particle_Blur__3dsmax>.Color2_connected : boolean

<Particle_Blur__3dsmax>.Color2_shader : texturemap

<Particle_Blur__3dsmax>.Color2_paramName : string

<Particle_Blur__3dsmax>.Sharp_connected : boolean

<Particle_Blur__3dsmax>.Sharp_shader : texturemap

<Particle_Blur__3dsmax>.Sharp_paramName : string

<Particle_Blur__3dsmax>.GBufferID_connected : boolean

<Particle_Blur__3dsmax>.GBufferID_shader : texturemap

<Particle_Blur__3dsmax>.GBufferID_paramName : string

<Particle_Blur__3dsmax>.TheList : maxObject array

<Particle_Blur__3dsmax>.Shader_Version : integer

Particle_Blur__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


Perlin_Marble__3dsmax : textureMap

Perlin_Marble__3dsmax : textureMap {7773161f,7d1d4c39}

Constructor:

Perlin_Marble__3dsmax: class instances not creatable by MAXScript

Alias:

max_PerlinMarble

Properties:

<Perlin_Marble__3dsmax>.Parameters : paramBlock2

<Perlin_Marble__3dsmax>.ExtraParameters : paramBlock2

<Perlin_Marble__3dsmax>.Map1 : texturemap

<Perlin_Marble__3dsmax>.Map2 : texturemap

<Perlin_Marble__3dsmax>.Color1 : fRGBA color

<Perlin_Marble__3dsmax>.Color2 : fRGBA color

<Perlin_Marble__3dsmax>.Map1Enabled : boolean

<Perlin_Marble__3dsmax>.Map2Enabled : boolean

<Perlin_Marble__3dsmax>.Saturation1 : float

<Perlin_Marble__3dsmax>.Saturation2 : float

<Perlin_Marble__3dsmax>.Size : float

<Perlin_Marble__3dsmax>.Level : float

<Perlin_Marble__3dsmax>.Coords : maxObject

<Perlin_Marble__3dsmax>.GBufferID : integer

<Perlin_Marble__3dsmax>.Connection_struct__0000__Parameters : paramBlock2

<Perlin_Marble__3dsmax>.Connection_struct__0001__ExtraParameters : paramBlock2

<Perlin_Marble__3dsmax>.Color1_connected : boolean

<Perlin_Marble__3dsmax>.Color1_shader : texturemap

<Perlin_Marble__3dsmax>.Color1_paramName : string

<Perlin_Marble__3dsmax>.Color2_connected : boolean

<Perlin_Marble__3dsmax>.Color2_shader : texturemap

<Perlin_Marble__3dsmax>.Color2_paramName : string

<Perlin_Marble__3dsmax>.Map1Enabled_connected : boolean

<Perlin_Marble__3dsmax>.Map1Enabled_shader : texturemap

<Perlin_Marble__3dsmax>.Map1Enabled_paramName : string

<Perlin_Marble__3dsmax>.Map2Enabled_connected : boolean

<Perlin_Marble__3dsmax>.Map2Enabled_shader : texturemap

<Perlin_Marble__3dsmax>.Map2Enabled_paramName : string

<Perlin_Marble__3dsmax>.Saturation1_connected : boolean

<Perlin_Marble__3dsmax>.Saturation1_shader : texturemap

<Perlin_Marble__3dsmax>.Saturation1_paramName : string

<Perlin_Marble__3dsmax>.Saturation2_connected : boolean

<Perlin_Marble__3dsmax>.Saturation2_shader : texturemap

<Perlin_Marble__3dsmax>.Saturation2_paramName : string

<Perlin_Marble__3dsmax>.Size_connected : boolean

<Perlin_Marble__3dsmax>.Size_shader : texturemap

<Perlin_Marble__3dsmax>.Size_paramName : string

<Perlin_Marble__3dsmax>.Level_connected : boolean

<Perlin_Marble__3dsmax>.Level_shader : texturemap

<Perlin_Marble__3dsmax>.Level_paramName : string

<Perlin_Marble__3dsmax>.GBufferID_connected : boolean

<Perlin_Marble__3dsmax>.GBufferID_shader : texturemap

<Perlin_Marble__3dsmax>.GBufferID_paramName : string

<Perlin_Marble__3dsmax>.TheList : maxObject array

<Perlin_Marble__3dsmax>.Shader_Version : integer

Perlin_Marble__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


Planet__3dsmax : textureMap

Planet__3dsmax : textureMap {7773161f,770bbd6b}

Constructor:

Planet__3dsmax: class instances not creatable by MAXScript

Alias:

max_Planet

Properties:

<Planet__3dsmax>.Parameters : paramBlock2

<Planet__3dsmax>.ExtraParameters : paramBlock2

<Planet__3dsmax>.Color1 : fRGBA color

<Planet__3dsmax>.Color2 : fRGBA color

<Planet__3dsmax>.Color3 : fRGBA color

<Planet__3dsmax>.Color4 : fRGBA color

<Planet__3dsmax>.Color5 : fRGBA color

<Planet__3dsmax>.Color6 : fRGBA color

<Planet__3dsmax>.Color7 : fRGBA color

<Planet__3dsmax>.Color8 : fRGBA color

<Planet__3dsmax>.ContinentSize : float

<Planet__3dsmax>.IslandFactor : float

<Planet__3dsmax>.OceanPercent : float

<Planet__3dsmax>.RandomSeed : integer

<Planet__3dsmax>.BlendWaterLand : boolean

<Planet__3dsmax>.Coords : maxObject

<Planet__3dsmax>.GBufferID : integer

<Planet__3dsmax>.Connection_struct__0000__Parameters : paramBlock2

<Planet__3dsmax>.Connection_struct__0001__ExtraParameters : paramBlock2

<Planet__3dsmax>.Color1_connected : boolean

<Planet__3dsmax>.Color1_shader : texturemap

<Planet__3dsmax>.Color1_paramName : string

<Planet__3dsmax>.Color2_connected : boolean

<Planet__3dsmax>.Color2_shader : texturemap

<Planet__3dsmax>.Color2_paramName : string

<Planet__3dsmax>.Color3_connected : boolean

<Planet__3dsmax>.Color3_shader : texturemap

<Planet__3dsmax>.Color3_paramName : string

<Planet__3dsmax>.Color4_connected : boolean

<Planet__3dsmax>.Color4_shader : texturemap

<Planet__3dsmax>.Color4_paramName : string

<Planet__3dsmax>.Color5_connected : boolean

<Planet__3dsmax>.Color5_shader : texturemap

<Planet__3dsmax>.Color5_paramName : string

<Planet__3dsmax>.Color6_connected : boolean

<Planet__3dsmax>.Color6_shader : texturemap

<Planet__3dsmax>.Color6_paramName : string

<Planet__3dsmax>.Color7_connected : boolean

<Planet__3dsmax>.Color7_shader : texturemap

<Planet__3dsmax>.Color7_paramName : string

<Planet__3dsmax>.Color8_connected : boolean

<Planet__3dsmax>.Color8_shader : texturemap

<Planet__3dsmax>.Color8_paramName : string

<Planet__3dsmax>.ContinentSize_connected : boolean

<Planet__3dsmax>.ContinentSize_shader : texturemap

<Planet__3dsmax>.ContinentSize_paramName : string

<Planet__3dsmax>.IslandFactor_connected : boolean

<Planet__3dsmax>.IslandFactor_shader : texturemap

<Planet__3dsmax>.IslandFactor_paramName : string

<Planet__3dsmax>.OceanPercent_connected : boolean

<Planet__3dsmax>.OceanPercent_shader : texturemap

<Planet__3dsmax>.OceanPercent_paramName : string

<Planet__3dsmax>.RandomSeed_connected : boolean

<Planet__3dsmax>.RandomSeed_shader : texturemap

<Planet__3dsmax>.RandomSeed_paramName : string

<Planet__3dsmax>.BlendWaterLand_connected : boolean

<Planet__3dsmax>.BlendWaterLand_shader : texturemap

<Planet__3dsmax>.BlendWaterLand_paramName : string

<Planet__3dsmax>.GBufferID_connected : boolean

<Planet__3dsmax>.GBufferID_shader : texturemap

<Planet__3dsmax>.GBufferID_paramName : string

<Planet__3dsmax>.TheList : maxObject array

<Planet__3dsmax>.Shader_Version : integer

Planet__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


Pseudo_Color_Camera_Exposure__3dsmax : textureMap

Pseudo_Color_Camera_Exposure__3dsmax : textureMap {7773161f,9244be4f}

Constructor:

Pseudo_Color_Camera_Exposure__3dsmax: class instances not creatable by MAXScript

Properties:

<Pseudo_Color_Camera_Exposure__3dsmax>.Pseudo_color_Radiance_Map_Parameters : paramBlock2

<Pseudo_Color_Camera_Exposure__3dsmax>.minimum : float

<Pseudo_Color_Camera_Exposure__3dsmax>.maximum : float

<Pseudo_Color_Camera_Exposure__3dsmax>.quantity : integer

<Pseudo_Color_Camera_Exposure__3dsmax>.display : integer

<Pseudo_Color_Camera_Exposure__3dsmax>.physicalscale : float

<Pseudo_Color_Camera_Exposure__3dsmax>.automatic : boolean

<Pseudo_Color_Camera_Exposure__3dsmax>.scalefunction : integer

<Pseudo_Color_Camera_Exposure__3dsmax>.unitsystemused : integer

<Pseudo_Color_Camera_Exposure__3dsmax>.active : boolean

<Pseudo_Color_Camera_Exposure__3dsmax>.processBG : boolean

<Pseudo_Color_Camera_Exposure__3dsmax>.nbcolors : integer

<Pseudo_Color_Camera_Exposure__3dsmax>.Connection_struct__0000__Pseudo_color_Radiance_Map_Parameters : paramBlock2

<Pseudo_Color_Camera_Exposure__3dsmax>.minimum_connected : boolean

<Pseudo_Color_Camera_Exposure__3dsmax>.minimum_shader : texturemap

<Pseudo_Color_Camera_Exposure__3dsmax>.minimum_paramName : string

<Pseudo_Color_Camera_Exposure__3dsmax>.maximum_connected : boolean

<Pseudo_Color_Camera_Exposure__3dsmax>.maximum_shader : texturemap

<Pseudo_Color_Camera_Exposure__3dsmax>.maximum_paramName : string

<Pseudo_Color_Camera_Exposure__3dsmax>.quantity_connected : boolean

<Pseudo_Color_Camera_Exposure__3dsmax>.quantity_shader : texturemap

<Pseudo_Color_Camera_Exposure__3dsmax>.quantity_paramName : string

<Pseudo_Color_Camera_Exposure__3dsmax>.display_connected : boolean

<Pseudo_Color_Camera_Exposure__3dsmax>.display_shader : texturemap

<Pseudo_Color_Camera_Exposure__3dsmax>.display_paramName : string

<Pseudo_Color_Camera_Exposure__3dsmax>.physicalscale_connected : boolean

<Pseudo_Color_Camera_Exposure__3dsmax>.physicalscale_shader : texturemap

<Pseudo_Color_Camera_Exposure__3dsmax>.physicalscale_paramName : string

<Pseudo_Color_Camera_Exposure__3dsmax>.automatic_connected : boolean

<Pseudo_Color_Camera_Exposure__3dsmax>.automatic_shader : texturemap

<Pseudo_Color_Camera_Exposure__3dsmax>.automatic_paramName : string

<Pseudo_Color_Camera_Exposure__3dsmax>.scalefunction_connected : boolean

<Pseudo_Color_Camera_Exposure__3dsmax>.scalefunction_shader : texturemap

<Pseudo_Color_Camera_Exposure__3dsmax>.scalefunction_paramName : string

<Pseudo_Color_Camera_Exposure__3dsmax>.unitsystemused_connected : boolean

<Pseudo_Color_Camera_Exposure__3dsmax>.unitsystemused_shader : texturemap

<Pseudo_Color_Camera_Exposure__3dsmax>.unitsystemused_paramName : string

<Pseudo_Color_Camera_Exposure__3dsmax>.active_connected : boolean

<Pseudo_Color_Camera_Exposure__3dsmax>.active_shader : texturemap

<Pseudo_Color_Camera_Exposure__3dsmax>.active_paramName : string

<Pseudo_Color_Camera_Exposure__3dsmax>.processBG_connected : boolean

<Pseudo_Color_Camera_Exposure__3dsmax>.processBG_shader : texturemap

<Pseudo_Color_Camera_Exposure__3dsmax>.processBG_paramName : string

<Pseudo_Color_Camera_Exposure__3dsmax>.nbcolors_connected : boolean

<Pseudo_Color_Camera_Exposure__3dsmax>.nbcolors_shader : texturemap

<Pseudo_Color_Camera_Exposure__3dsmax>.nbcolors_paramName : string

<Pseudo_Color_Camera_Exposure__3dsmax>.TheList : maxObject array

<Pseudo_Color_Camera_Exposure__3dsmax>.Shader_Version : integer

Pseudo_Color_Camera_Exposure__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


Pseudo_Color_Camera_Exposure__3dsmaxtextureMap : textureMap

Pseudo_Color_Camera_Exposure__3dsmaxtextureMap : textureMap {7773161f,6c144f26}

Constructor:

Pseudo_Color_Camera_Exposure__3dsmaxtextureMap: class instances not creatable by MAXScript

Properties:

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.Pseudo_color_Radiance_Map_Parameters : paramBlock2

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.minimum : float

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.maximum : float

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.quantity : integer

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.display : integer

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.physicalscale : float

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.automatic : boolean

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.scalefunction : integer

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.unitsystemused : integer

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.active : boolean

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.processBG : boolean

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.nbcolors : integer

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.Connection_struct__0000__Pseudo_color_Radiance_Map_Parameters : paramBlock2

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.minimum_connected : boolean

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.minimum_shader : texturemap

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.minimum_paramName : string

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.maximum_connected : boolean

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.maximum_shader : texturemap

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.maximum_paramName : string

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.quantity_connected : boolean

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.quantity_shader : texturemap

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.quantity_paramName : string

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.display_connected : boolean

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.display_shader : texturemap

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.display_paramName : string

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.physicalscale_connected : boolean

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.physicalscale_shader : texturemap

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.physicalscale_paramName : string

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.automatic_connected : boolean

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.automatic_shader : texturemap

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.automatic_paramName : string

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.scalefunction_connected : boolean

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.scalefunction_shader : texturemap

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.scalefunction_paramName : string

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.unitsystemused_connected : boolean

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.unitsystemused_shader : texturemap

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.unitsystemused_paramName : string

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.active_connected : boolean

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.active_shader : texturemap

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.active_paramName : string

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.processBG_connected : boolean

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.processBG_shader : texturemap

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.processBG_paramName : string

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.nbcolors_connected : boolean

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.nbcolors_shader : texturemap

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.nbcolors_paramName : string

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.TheList : maxObject array

<Pseudo_Color_Camera_Exposure__3dsmaxtextureMap>.Shader_Version : integer

Pseudo_Color_Camera_Exposure__3dsmaxtextureMap interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


Reflect_Refract__3dsmax : textureMap

Reflect_Refract__3dsmax : textureMap {7773161f,460ab96f}

Constructor:

Reflect_Refract__3dsmax: class instances not creatable by MAXScript

Alias:

max_ReflectRefract

Properties:

<Reflect_Refract__3dsmax>.Parameters : paramBlock2

<Reflect_Refract__3dsmax>.ExtraParameters : paramBlock2

<Reflect_Refract__3dsmax>.Size : integer

<Reflect_Refract__3dsmax>.Blur : float

<Reflect_Refract__3dsmax>.BlurOffset : float

<Reflect_Refract__3dsmax>.Near : float

<Reflect_Refract__3dsmax>.Far : float

<Reflect_Refract__3dsmax>.Source : integer

<Reflect_Refract__3dsmax>.UseAtmosphericMap : boolean

<Reflect_Refract__3dsmax>.Apply : boolean

<Reflect_Refract__3dsmax>.FrameType : integer

<Reflect_Refract__3dsmax>.NthFrame : integer

<Reflect_Refract__3dsmax>.BitmapName : int array

<Reflect_Refract__3dsmax>.GBufferID : integer

<Reflect_Refract__3dsmax>.Connection_struct__0000__Parameters : paramBlock2

<Reflect_Refract__3dsmax>.Connection_struct__0001__ExtraParameters : paramBlock2

<Reflect_Refract__3dsmax>.Size_connected : boolean

<Reflect_Refract__3dsmax>.Size_shader : texturemap

<Reflect_Refract__3dsmax>.Size_paramName : string

<Reflect_Refract__3dsmax>.Blur_connected : boolean

<Reflect_Refract__3dsmax>.Blur_shader : texturemap

<Reflect_Refract__3dsmax>.Blur_paramName : string

<Reflect_Refract__3dsmax>.BlurOffset_connected : boolean

<Reflect_Refract__3dsmax>.BlurOffset_shader : texturemap

<Reflect_Refract__3dsmax>.BlurOffset_paramName : string

<Reflect_Refract__3dsmax>.Near_connected : boolean

<Reflect_Refract__3dsmax>.Near_shader : texturemap

<Reflect_Refract__3dsmax>.Near_paramName : string

<Reflect_Refract__3dsmax>.Far_connected : boolean

<Reflect_Refract__3dsmax>.Far_shader : texturemap

<Reflect_Refract__3dsmax>.Far_paramName : string

<Reflect_Refract__3dsmax>.Source_connected : boolean

<Reflect_Refract__3dsmax>.Source_shader : texturemap

<Reflect_Refract__3dsmax>.Source_paramName : string

<Reflect_Refract__3dsmax>.UseAtmosphericMap_connected : boolean

<Reflect_Refract__3dsmax>.UseAtmosphericMap_shader : texturemap

<Reflect_Refract__3dsmax>.UseAtmosphericMap_paramName : string

<Reflect_Refract__3dsmax>.Apply_connected : boolean

<Reflect_Refract__3dsmax>.Apply_shader : texturemap

<Reflect_Refract__3dsmax>.Apply_paramName : string

<Reflect_Refract__3dsmax>.FrameType_connected : boolean

<Reflect_Refract__3dsmax>.FrameType_shader : texturemap

<Reflect_Refract__3dsmax>.FrameType_paramName : string

<Reflect_Refract__3dsmax>.NthFrame_connected : boolean

<Reflect_Refract__3dsmax>.NthFrame_shader : texturemap

<Reflect_Refract__3dsmax>.NthFrame_paramName : string

<Reflect_Refract__3dsmax>.GBufferID_connected : boolean

<Reflect_Refract__3dsmax>.GBufferID_shader : texturemap

<Reflect_Refract__3dsmax>.GBufferID_paramName : string

<Reflect_Refract__3dsmax>.TheList : maxObject array

<Reflect_Refract__3dsmax>.Shader_Version : integer

Reflect_Refract__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


RGB_Multiply__3dsmax : textureMap

RGB_Multiply__3dsmax : textureMap {7773161f,64196a5b}

Constructor:

RGB_Multiply__3dsmax: class instances not creatable by MAXScript

Alias:

max_RGBMultiplier

Properties:

<RGB_Multiply__3dsmax>.Parameters : paramBlock2

<RGB_Multiply__3dsmax>.ExtraParameters : paramBlock2

<RGB_Multiply__3dsmax>.Color1 : fRGBA color

<RGB_Multiply__3dsmax>.Color2 : fRGBA color

<RGB_Multiply__3dsmax>.Map1 : texturemap

<RGB_Multiply__3dsmax>.Map2 : texturemap

<RGB_Multiply__3dsmax>.Map1Enabled : boolean

<RGB_Multiply__3dsmax>.Map2Enabled : boolean

<RGB_Multiply__3dsmax>.AlphaFrom : integer

<RGB_Multiply__3dsmax>.GBufferID : integer

<RGB_Multiply__3dsmax>.Connection_struct__0000__Parameters : paramBlock2

<RGB_Multiply__3dsmax>.Connection_struct__0001__ExtraParameters : paramBlock2

<RGB_Multiply__3dsmax>.Color1_connected : boolean

<RGB_Multiply__3dsmax>.Color1_shader : texturemap

<RGB_Multiply__3dsmax>.Color1_paramName : string

<RGB_Multiply__3dsmax>.Color2_connected : boolean

<RGB_Multiply__3dsmax>.Color2_shader : texturemap

<RGB_Multiply__3dsmax>.Color2_paramName : string

<RGB_Multiply__3dsmax>.Map1Enabled_connected : boolean

<RGB_Multiply__3dsmax>.Map1Enabled_shader : texturemap

<RGB_Multiply__3dsmax>.Map1Enabled_paramName : string

<RGB_Multiply__3dsmax>.Map2Enabled_connected : boolean

<RGB_Multiply__3dsmax>.Map2Enabled_shader : texturemap

<RGB_Multiply__3dsmax>.Map2Enabled_paramName : string

<RGB_Multiply__3dsmax>.AlphaFrom_connected : boolean

<RGB_Multiply__3dsmax>.AlphaFrom_shader : texturemap

<RGB_Multiply__3dsmax>.AlphaFrom_paramName : string

<RGB_Multiply__3dsmax>.GBufferID_connected : boolean

<RGB_Multiply__3dsmax>.GBufferID_shader : texturemap

<RGB_Multiply__3dsmax>.GBufferID_paramName : string

<RGB_Multiply__3dsmax>.TheList : maxObject array

<RGB_Multiply__3dsmax>.Shader_Version : integer

RGB_Multiply__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


Smoke__3dsmax : textureMap

Smoke__3dsmax : textureMap {7773161f,7a09506e}

Constructor:

Smoke__3dsmax: class instances not creatable by MAXScript

Alias:

max_Smoke

Properties:

<Smoke__3dsmax>.Parameters : paramBlock2

<Smoke__3dsmax>.ExtraParameters : paramBlock2

<Smoke__3dsmax>.Size : float

<Smoke__3dsmax>.Iterations : integer

<Smoke__3dsmax>.Exponent : float

<Smoke__3dsmax>.Phase : float

<Smoke__3dsmax>.Color1 : fRGBA color

<Smoke__3dsmax>.Color2 : fRGBA color

<Smoke__3dsmax>.Map1 : texturemap

<Smoke__3dsmax>.Map2 : texturemap

<Smoke__3dsmax>.Map1On : boolean

<Smoke__3dsmax>.Map2On : boolean

<Smoke__3dsmax>.Coords : maxObject

<Smoke__3dsmax>.GBufferID : integer

<Smoke__3dsmax>.Connection_struct__0000__Parameters : paramBlock2

<Smoke__3dsmax>.Connection_struct__0001__ExtraParameters : paramBlock2

<Smoke__3dsmax>.Size_connected : boolean

<Smoke__3dsmax>.Size_shader : texturemap

<Smoke__3dsmax>.Size_paramName : string

<Smoke__3dsmax>.Iterations_connected : boolean

<Smoke__3dsmax>.Iterations_shader : texturemap

<Smoke__3dsmax>.Iterations_paramName : string

<Smoke__3dsmax>.Exponent_connected : boolean

<Smoke__3dsmax>.Exponent_shader : texturemap

<Smoke__3dsmax>.Exponent_paramName : string

<Smoke__3dsmax>.Phase_connected : boolean

<Smoke__3dsmax>.Phase_shader : texturemap

<Smoke__3dsmax>.Phase_paramName : string

<Smoke__3dsmax>.Color1_connected : boolean

<Smoke__3dsmax>.Color1_shader : texturemap

<Smoke__3dsmax>.Color1_paramName : string

<Smoke__3dsmax>.Color2_connected : boolean

<Smoke__3dsmax>.Color2_shader : texturemap

<Smoke__3dsmax>.Color2_paramName : string

<Smoke__3dsmax>.Map1On_connected : boolean

<Smoke__3dsmax>.Map1On_shader : texturemap

<Smoke__3dsmax>.Map1On_paramName : string

<Smoke__3dsmax>.Map2On_connected : boolean

<Smoke__3dsmax>.Map2On_shader : texturemap

<Smoke__3dsmax>.Map2On_paramName : string

<Smoke__3dsmax>.GBufferID_connected : boolean

<Smoke__3dsmax>.GBufferID_shader : texturemap

<Smoke__3dsmax>.GBufferID_paramName : string

<Smoke__3dsmax>.TheList : maxObject array

<Smoke__3dsmax>.Shader_Version : integer

Smoke__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


Speckle__3dsmax : textureMap

Speckle__3dsmax : textureMap {7773161f,826ac168}

Constructor:

Speckle__3dsmax: class instances not creatable by MAXScript

Alias:

max_Speckle

Properties:

<Speckle__3dsmax>.Parameters : paramBlock2

<Speckle__3dsmax>.ExtraParameters : paramBlock2

<Speckle__3dsmax>.Size : float

<Speckle__3dsmax>.Color1 : fRGBA color

<Speckle__3dsmax>.Color2 : fRGBA color

<Speckle__3dsmax>.Map1 : texturemap

<Speckle__3dsmax>.Map2 : texturemap

<Speckle__3dsmax>.Map1On : boolean

<Speckle__3dsmax>.Map2On : boolean

<Speckle__3dsmax>.Coords : maxObject

<Speckle__3dsmax>.GBufferID : integer

<Speckle__3dsmax>.Connection_struct__0000__Parameters : paramBlock2

<Speckle__3dsmax>.Connection_struct__0001__ExtraParameters : paramBlock2

<Speckle__3dsmax>.Size_connected : boolean

<Speckle__3dsmax>.Size_shader : texturemap

<Speckle__3dsmax>.Size_paramName : string

<Speckle__3dsmax>.Color1_connected : boolean

<Speckle__3dsmax>.Color1_shader : texturemap

<Speckle__3dsmax>.Color1_paramName : string

<Speckle__3dsmax>.Color2_connected : boolean

<Speckle__3dsmax>.Color2_shader : texturemap

<Speckle__3dsmax>.Color2_paramName : string

<Speckle__3dsmax>.Map1On_connected : boolean

<Speckle__3dsmax>.Map1On_shader : texturemap

<Speckle__3dsmax>.Map1On_paramName : string

<Speckle__3dsmax>.Map2On_connected : boolean

<Speckle__3dsmax>.Map2On_shader : texturemap

<Speckle__3dsmax>.Map2On_paramName : string

<Speckle__3dsmax>.GBufferID_connected : boolean

<Speckle__3dsmax>.GBufferID_shader : texturemap

<Speckle__3dsmax>.GBufferID_paramName : string

<Speckle__3dsmax>.TheList : maxObject array

<Speckle__3dsmax>.Shader_Version : integer

Speckle__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


Splat__3dsmax : textureMap

Splat__3dsmax : textureMap {7773161f,8406555d}

Constructor:

Splat__3dsmax: class instances not creatable by MAXScript

Alias:

max_Splat

Properties:

<Splat__3dsmax>.Parameters : paramBlock2

<Splat__3dsmax>.ExtraParameters : paramBlock2

<Splat__3dsmax>.Size : float

<Splat__3dsmax>.Iterations : integer

<Splat__3dsmax>.Threshold : float

<Splat__3dsmax>.Color1 : fRGBA color

<Splat__3dsmax>.Color2 : fRGBA color

<Splat__3dsmax>.Map1 : texturemap

<Splat__3dsmax>.Map2 : texturemap

<Splat__3dsmax>.Map1On : boolean

<Splat__3dsmax>.Map2On : boolean

<Splat__3dsmax>.Coords : maxObject

<Splat__3dsmax>.GBufferID : integer

<Splat__3dsmax>.Connection_struct__0000__Parameters : paramBlock2

<Splat__3dsmax>.Connection_struct__0001__ExtraParameters : paramBlock2

<Splat__3dsmax>.Size_connected : boolean

<Splat__3dsmax>.Size_shader : texturemap

<Splat__3dsmax>.Size_paramName : string

<Splat__3dsmax>.Iterations_connected : boolean

<Splat__3dsmax>.Iterations_shader : texturemap

<Splat__3dsmax>.Iterations_paramName : string

<Splat__3dsmax>.Threshold_connected : boolean

<Splat__3dsmax>.Threshold_shader : texturemap

<Splat__3dsmax>.Threshold_paramName : string

<Splat__3dsmax>.Color1_connected : boolean

<Splat__3dsmax>.Color1_shader : texturemap

<Splat__3dsmax>.Color1_paramName : string

<Splat__3dsmax>.Color2_connected : boolean

<Splat__3dsmax>.Color2_shader : texturemap

<Splat__3dsmax>.Color2_paramName : string

<Splat__3dsmax>.Map1On_connected : boolean

<Splat__3dsmax>.Map1On_shader : texturemap

<Splat__3dsmax>.Map1On_paramName : string

<Splat__3dsmax>.Map2On_connected : boolean

<Splat__3dsmax>.Map2On_shader : texturemap

<Splat__3dsmax>.Map2On_paramName : string

<Splat__3dsmax>.GBufferID_connected : boolean

<Splat__3dsmax>.GBufferID_shader : texturemap

<Splat__3dsmax>.GBufferID_paramName : string

<Splat__3dsmax>.TheList : maxObject array

<Splat__3dsmax>.Shader_Version : integer

Splat__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


Stucco__3dsmax : textureMap

Stucco__3dsmax : textureMap {7773161f,81ffbe70}

Constructor:

Stucco__3dsmax: class instances not creatable by MAXScript

Alias:

max_Stucco

Properties:

<Stucco__3dsmax>.Parameters : paramBlock2

<Stucco__3dsmax>.ExtraParameters : paramBlock2

<Stucco__3dsmax>.Size : float

<Stucco__3dsmax>.Thickness : float

<Stucco__3dsmax>.Threshold : float

<Stucco__3dsmax>.Color1 : fRGBA color

<Stucco__3dsmax>.Color2 : fRGBA color

<Stucco__3dsmax>.Map1 : texturemap

<Stucco__3dsmax>.Map2 : texturemap

<Stucco__3dsmax>.Map1On : boolean

<Stucco__3dsmax>.Map2On : boolean

<Stucco__3dsmax>.Coords : maxObject

<Stucco__3dsmax>.GBufferID : integer

<Stucco__3dsmax>.Connection_struct__0000__Parameters : paramBlock2

<Stucco__3dsmax>.Connection_struct__0001__ExtraParameters : paramBlock2

<Stucco__3dsmax>.Size_connected : boolean

<Stucco__3dsmax>.Size_shader : texturemap

<Stucco__3dsmax>.Size_paramName : string

<Stucco__3dsmax>.Thickness_connected : boolean

<Stucco__3dsmax>.Thickness_shader : texturemap

<Stucco__3dsmax>.Thickness_paramName : string

<Stucco__3dsmax>.Threshold_connected : boolean

<Stucco__3dsmax>.Threshold_shader : texturemap

<Stucco__3dsmax>.Threshold_paramName : string

<Stucco__3dsmax>.Color1_connected : boolean

<Stucco__3dsmax>.Color1_shader : texturemap

<Stucco__3dsmax>.Color1_paramName : string

<Stucco__3dsmax>.Color2_connected : boolean

<Stucco__3dsmax>.Color2_shader : texturemap

<Stucco__3dsmax>.Color2_paramName : string

<Stucco__3dsmax>.Map1On_connected : boolean

<Stucco__3dsmax>.Map1On_shader : texturemap

<Stucco__3dsmax>.Map1On_paramName : string

<Stucco__3dsmax>.Map2On_connected : boolean

<Stucco__3dsmax>.Map2On_shader : texturemap

<Stucco__3dsmax>.Map2On_paramName : string

<Stucco__3dsmax>.GBufferID_connected : boolean

<Stucco__3dsmax>.GBufferID_shader : texturemap

<Stucco__3dsmax>.GBufferID_paramName : string

<Stucco__3dsmax>.TheList : maxObject array

<Stucco__3dsmax>.Shader_Version : integer

Stucco__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


Swirl__3dsmax : textureMap

Swirl__3dsmax : textureMap {7773161f,73035a65}

Constructor:

Swirl__3dsmax: class instances not creatable by MAXScript

Alias:

max_Swirl

Properties:

<Swirl__3dsmax>.Parameters : paramBlock2

<Swirl__3dsmax>.ExtraParameters : paramBlock2

<Swirl__3dsmax>.SwirlColor : fRGBA color

<Swirl__3dsmax>.BaseColor : fRGBA color

<Swirl__3dsmax>.Intensity : float

<Swirl__3dsmax>.Twist : float

<Swirl__3dsmax>.ColorContrast : float

<Swirl__3dsmax>.XCenter : float

<Swirl__3dsmax>.YCenter : float

<Swirl__3dsmax>.Amount : float

<Swirl__3dsmax>.ConstantDetail : integer

<Swirl__3dsmax>.RandomSeed : float

<Swirl__3dsmax>.LockBackground : boolean

<Swirl__3dsmax>.Coords : maxObject

<Swirl__3dsmax>.SwirlMap : texturemap

<Swirl__3dsmax>.BaseMap : texturemap

<Swirl__3dsmax>.SwirlMapEnabled : boolean

<Swirl__3dsmax>.BaseMapEnabled : boolean

<Swirl__3dsmax>.GBufferID : integer

<Swirl__3dsmax>.Connection_struct__0000__Parameters : paramBlock2

<Swirl__3dsmax>.Connection_struct__0001__ExtraParameters : paramBlock2

<Swirl__3dsmax>.SwirlColor_connected : boolean

<Swirl__3dsmax>.SwirlColor_shader : texturemap

<Swirl__3dsmax>.SwirlColor_paramName : string

<Swirl__3dsmax>.BaseColor_connected : boolean

<Swirl__3dsmax>.BaseColor_shader : texturemap

<Swirl__3dsmax>.BaseColor_paramName : string

<Swirl__3dsmax>.Intensity_connected : boolean

<Swirl__3dsmax>.Intensity_shader : texturemap

<Swirl__3dsmax>.Intensity_paramName : string

<Swirl__3dsmax>.Twist_connected : boolean

<Swirl__3dsmax>.Twist_shader : texturemap

<Swirl__3dsmax>.Twist_paramName : string

<Swirl__3dsmax>.ColorContrast_connected : boolean

<Swirl__3dsmax>.ColorContrast_shader : texturemap

<Swirl__3dsmax>.ColorContrast_paramName : string

<Swirl__3dsmax>.XCenter_connected : boolean

<Swirl__3dsmax>.XCenter_shader : texturemap

<Swirl__3dsmax>.XCenter_paramName : string

<Swirl__3dsmax>.YCenter_connected : boolean

<Swirl__3dsmax>.YCenter_shader : texturemap

<Swirl__3dsmax>.YCenter_paramName : string

<Swirl__3dsmax>.Amount_connected : boolean

<Swirl__3dsmax>.Amount_shader : texturemap

<Swirl__3dsmax>.Amount_paramName : string

<Swirl__3dsmax>.ConstantDetail_connected : boolean

<Swirl__3dsmax>.ConstantDetail_shader : texturemap

<Swirl__3dsmax>.ConstantDetail_paramName : string

<Swirl__3dsmax>.RandomSeed_connected : boolean

<Swirl__3dsmax>.RandomSeed_shader : texturemap

<Swirl__3dsmax>.RandomSeed_paramName : string

<Swirl__3dsmax>.LockBackground_connected : boolean

<Swirl__3dsmax>.LockBackground_shader : texturemap

<Swirl__3dsmax>.LockBackground_paramName : string

<Swirl__3dsmax>.SwirlMapEnabled_connected : boolean

<Swirl__3dsmax>.SwirlMapEnabled_shader : texturemap

<Swirl__3dsmax>.SwirlMapEnabled_paramName : string

<Swirl__3dsmax>.BaseMapEnabled_connected : boolean

<Swirl__3dsmax>.BaseMapEnabled_shader : texturemap

<Swirl__3dsmax>.BaseMapEnabled_paramName : string

<Swirl__3dsmax>.GBufferID_connected : boolean

<Swirl__3dsmax>.GBufferID_shader : texturemap

<Swirl__3dsmax>.GBufferID_paramName : string

<Swirl__3dsmax>.TheList : maxObject array

<Swirl__3dsmax>.Shader_Version : integer

Swirl__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


Thin_Wall_Refraction__3dsmax : textureMap

Thin_Wall_Refraction__3dsmax : textureMap {7773161f,8c614445}

Constructor:

Thin_Wall_Refraction__3dsmax: class instances not creatable by MAXScript

Alias:

max_ThinWallRefraction

Properties:

<Thin_Wall_Refraction__3dsmax>.Parameters : paramBlock2

<Thin_Wall_Refraction__3dsmax>.ExtraParameters : paramBlock2

<Thin_Wall_Refraction__3dsmax>.Blur : float

<Thin_Wall_Refraction__3dsmax>.ThicknessOffset : float

<Thin_Wall_Refraction__3dsmax>.BumpMapEffect : float

<Thin_Wall_Refraction__3dsmax>.ApplyBlur : boolean

<Thin_Wall_Refraction__3dsmax>.NthFrame : integer

<Thin_Wall_Refraction__3dsmax>.UseEnviroment : boolean

<Thin_Wall_Refraction__3dsmax>.Frame : integer

<Thin_Wall_Refraction__3dsmax>.GBufferID : integer

<Thin_Wall_Refraction__3dsmax>.Connection_struct__0000__Parameters : paramBlock2

<Thin_Wall_Refraction__3dsmax>.Connection_struct__0001__ExtraParameters : paramBlock2

<Thin_Wall_Refraction__3dsmax>.Blur_connected : boolean

<Thin_Wall_Refraction__3dsmax>.Blur_shader : texturemap

<Thin_Wall_Refraction__3dsmax>.Blur_paramName : string

<Thin_Wall_Refraction__3dsmax>.ThicknessOffset_connected : boolean

<Thin_Wall_Refraction__3dsmax>.ThicknessOffset_shader : texturemap

<Thin_Wall_Refraction__3dsmax>.ThicknessOffset_paramName : string

<Thin_Wall_Refraction__3dsmax>.BumpMapEffect_connected : boolean

<Thin_Wall_Refraction__3dsmax>.BumpMapEffect_shader : texturemap

<Thin_Wall_Refraction__3dsmax>.BumpMapEffect_paramName : string

<Thin_Wall_Refraction__3dsmax>.ApplyBlur_connected : boolean

<Thin_Wall_Refraction__3dsmax>.ApplyBlur_shader : texturemap

<Thin_Wall_Refraction__3dsmax>.ApplyBlur_paramName : string

<Thin_Wall_Refraction__3dsmax>.NthFrame_connected : boolean

<Thin_Wall_Refraction__3dsmax>.NthFrame_shader : texturemap

<Thin_Wall_Refraction__3dsmax>.NthFrame_paramName : string

<Thin_Wall_Refraction__3dsmax>.UseEnviroment_connected : boolean

<Thin_Wall_Refraction__3dsmax>.UseEnviroment_shader : texturemap

<Thin_Wall_Refraction__3dsmax>.UseEnviroment_paramName : string

<Thin_Wall_Refraction__3dsmax>.Frame_connected : boolean

<Thin_Wall_Refraction__3dsmax>.Frame_shader : texturemap

<Thin_Wall_Refraction__3dsmax>.Frame_paramName : string

<Thin_Wall_Refraction__3dsmax>.GBufferID_connected : boolean

<Thin_Wall_Refraction__3dsmax>.GBufferID_shader : texturemap

<Thin_Wall_Refraction__3dsmax>.GBufferID_paramName : string

<Thin_Wall_Refraction__3dsmax>.TheList : maxObject array

<Thin_Wall_Refraction__3dsmax>.Shader_Version : integer

Thin_Wall_Refraction__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


Tint__3dsmax : textureMap

Tint__3dsmax : textureMap {7773161f,71084c4c}

Constructor:

Tint__3dsmax: class instances not creatable by MAXScript

Alias:

max_Tint

Properties:

<Tint__3dsmax>.Parameters : paramBlock2

<Tint__3dsmax>.ExtraParameters : paramBlock2

<Tint__3dsmax>.Red : fRGBA color

<Tint__3dsmax>.Green : fRGBA color

<Tint__3dsmax>.Blue : fRGBA color

<Tint__3dsmax>.Map1 : texturemap

<Tint__3dsmax>.Map1Enabled : boolean

<Tint__3dsmax>.GBufferID : integer

<Tint__3dsmax>.Connection_struct__0000__Parameters : paramBlock2

<Tint__3dsmax>.Connection_struct__0001__ExtraParameters : paramBlock2

<Tint__3dsmax>.Red_connected : boolean

<Tint__3dsmax>.Red_shader : texturemap

<Tint__3dsmax>.Red_paramName : string

<Tint__3dsmax>.Green_connected : boolean

<Tint__3dsmax>.Green_shader : texturemap

<Tint__3dsmax>.Green_paramName : string

<Tint__3dsmax>.Blue_connected : boolean

<Tint__3dsmax>.Blue_shader : texturemap

<Tint__3dsmax>.Blue_paramName : string

<Tint__3dsmax>.Map1Enabled_connected : boolean

<Tint__3dsmax>.Map1Enabled_shader : texturemap

<Tint__3dsmax>.Map1Enabled_paramName : string

<Tint__3dsmax>.GBufferID_connected : boolean

<Tint__3dsmax>.GBufferID_shader : texturemap

<Tint__3dsmax>.GBufferID_paramName : string

<Tint__3dsmax>.TheList : maxObject array

<Tint__3dsmax>.Shader_Version : integer

Tint__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


UV_Coordinate__3dsmax : textureMap

UV_Coordinate__3dsmax - superclass: textureMap; super-superclass:material - 113:0 - classID: #(2004031007, -2112001972)

Constructors:

UV_Coordinate__3dsmax ...

max_UVCoordinate ...

Properties:

<UV_Coordinate__3dsmax>.amount Float default: 0.0 -- animatable; float

<UV_Coordinate__3dsmax>.Amount_connected BooleanClass default: false -- boolean

<UV_Coordinate__3dsmax>.Amount_paramName UndefinedClass default: undefined -- string;

<UV_Coordinate__3dsmax>.Amount_shader UndefinedClass default: undefined -- texturemap

<UV_Coordinate__3dsmax>.animate BooleanClass default: false -- animatable; boolean

<UV_Coordinate__3dsmax>.Animate_connected BooleanClass default: false -- boolean

<UV_Coordinate__3dsmax>.Animate_paramName UndefinedClass default: undefined -- string;

<UV_Coordinate__3dsmax>.Animate_shader UndefinedClass default: undefined -- texturemap

<UV_Coordinate__3dsmax>.blur Float default: 0.0 -- animatable; float

<UV_Coordinate__3dsmax>.Blur_connected BooleanClass default: false -- boolean

<UV_Coordinate__3dsmax>.Blur_paramName UndefinedClass default: undefined -- string;

<UV_Coordinate__3dsmax>.Blur_shader UndefinedClass default: undefined -- texturemap

<UV_Coordinate__3dsmax>.BlurOffset Float default: 0.0 -- animatable; float

<UV_Coordinate__3dsmax>.BlurOffset_connected BooleanClass default: false -- boolean

<UV_Coordinate__3dsmax>.BlurOffset_paramName UndefinedClass default: undefined -- string;

<UV_Coordinate__3dsmax>.BlurOffset_shader UndefinedClass default: undefined -- texturemap

<UV_Coordinate__3dsmax>.Clip BooleanClass default: false -- animatable; boolean

<UV_Coordinate__3dsmax>.Clip_connected BooleanClass default: false -- boolean

<UV_Coordinate__3dsmax>.Clip_paramName UndefinedClass default: undefined -- string;

<UV_Coordinate__3dsmax>.Clip_shader UndefinedClass default: undefined -- texturemap

<UV_Coordinate__3dsmax>.dUV Point3 default: [0,0,0] -- point3

<UV_Coordinate__3dsmax>.EnvType Integer default: 0 -- animatable; integer

<UV_Coordinate__3dsmax>.EnvType_connected BooleanClass default: false -- boolean

<UV_Coordinate__3dsmax>.EnvType_paramName UndefinedClass default: undefined -- string;

<UV_Coordinate__3dsmax>.EnvType_shader UndefinedClass default: undefined -- texturemap

<UV_Coordinate__3dsmax>.level Integer default: 0 -- animatable; integer

<UV_Coordinate__3dsmax>.Level_connected BooleanClass default: false -- boolean

<UV_Coordinate__3dsmax>.Level_paramName UndefinedClass default: undefined -- string;

<UV_Coordinate__3dsmax>.Level_shader UndefinedClass default: undefined -- texturemap

<UV_Coordinate__3dsmax>.mapChannel Integer default: 0 -- animatable; integer

<UV_Coordinate__3dsmax>.MapChannel_connected BooleanClass default: false -- boolean

<UV_Coordinate__3dsmax>.MapChannel_paramName UndefinedClass default: undefined -- string;

<UV_Coordinate__3dsmax>.MapChannel_shader UndefinedClass default: undefined -- texturemap

<UV_Coordinate__3dsmax>.MapSlotType Integer default: 0 -- animatable; integer

<UV_Coordinate__3dsmax>.MapSlotType_connected BooleanClass default: false -- boolean

<UV_Coordinate__3dsmax>.MapSlotType_paramName UndefinedClass default: undefined -- string;

<UV_Coordinate__3dsmax>.MapSlotType_shader UndefinedClass default: undefined -- texturemap

<UV_Coordinate__3dsmax>.Noise BooleanClass default: false -- animatable; boolean

<UV_Coordinate__3dsmax>.Noise_connected BooleanClass default: false -- boolean

<UV_Coordinate__3dsmax>.Noise_paramName UndefinedClass default: undefined -- string;

<UV_Coordinate__3dsmax>.Noise_shader UndefinedClass default: undefined -- texturemap

<UV_Coordinate__3dsmax>.phase Float default: 0.0 -- animatable; float

<UV_Coordinate__3dsmax>.Phase_connected BooleanClass default: false -- boolean

<UV_Coordinate__3dsmax>.Phase_paramName UndefinedClass default: undefined -- string;

<UV_Coordinate__3dsmax>.Phase_shader UndefinedClass default: undefined -- texturemap

<UV_Coordinate__3dsmax>.realWorldMapSize BooleanClass default: false -- animatable; boolean

<UV_Coordinate__3dsmax>.RealWorldMapSize_connected BooleanClass default: false -- boolean

<UV_Coordinate__3dsmax>.RealWorldMapSize_paramName UndefinedClass default: undefined -- string;

<UV_Coordinate__3dsmax>.RealWorldMapSize_shader UndefinedClass default: undefined -- texturemap

<UV_Coordinate__3dsmax>.showMapOnBack BooleanClass default: false -- animatable; boolean

<UV_Coordinate__3dsmax>.ShowMapOnBack_connected BooleanClass default: false -- boolean

<UV_Coordinate__3dsmax>.ShowMapOnBack_paramName UndefinedClass default: undefined -- string;

<UV_Coordinate__3dsmax>.ShowMapOnBack_shader UndefinedClass default: undefined -- texturemap

<UV_Coordinate__3dsmax>.size Float default: 0.0 -- animatable; float

<UV_Coordinate__3dsmax>.Size_connected BooleanClass default: false -- boolean

<UV_Coordinate__3dsmax>.Size_paramName UndefinedClass default: undefined -- string;

<UV_Coordinate__3dsmax>.Size_shader UndefinedClass default: undefined -- texturemap

<UV_Coordinate__3dsmax>.Structure UndefinedClass default: undefined -- paramBlock2

<UV_Coordinate__3dsmax>.UAngle Float default: 0.0 -- animatable; float

<UV_Coordinate__3dsmax>.UAngle_connected BooleanClass default: false -- boolean

<UV_Coordinate__3dsmax>.UAngle_paramName UndefinedClass default: undefined -- string;

<UV_Coordinate__3dsmax>.UAngle_shader UndefinedClass default: undefined -- texturemap

<UV_Coordinate__3dsmax>.UMirror BooleanClass default: false -- animatable; boolean

<UV_Coordinate__3dsmax>.UMirror_connected BooleanClass default: false -- boolean

<UV_Coordinate__3dsmax>.UMirror_paramName UndefinedClass default: undefined -- string;

<UV_Coordinate__3dsmax>.UMirror_shader UndefinedClass default: undefined -- texturemap

<UV_Coordinate__3dsmax>.uOffset Float default: 0.0 -- animatable; float

<UV_Coordinate__3dsmax>.UOffset_connected BooleanClass default: false -- boolean

<UV_Coordinate__3dsmax>.UOffset_paramName UndefinedClass default: undefined -- string;

<UV_Coordinate__3dsmax>.UOffset_shader UndefinedClass default: undefined -- texturemap

<UV_Coordinate__3dsmax>.UScale Float default: 0.0 -- animatable; float

<UV_Coordinate__3dsmax>.UScale_connected BooleanClass default: false -- boolean

<UV_Coordinate__3dsmax>.UScale_paramName UndefinedClass default: undefined -- string;

<UV_Coordinate__3dsmax>.UScale_shader UndefinedClass default: undefined -- texturemap

<UV_Coordinate__3dsmax>.UV Point3 default: [0,0,0] -- point3

<UV_Coordinate__3dsmax>.UVAxis Integer default: 0 -- animatable; integer

<UV_Coordinate__3dsmax>.UVAxis_connected BooleanClass default: false -- boolean

<UV_Coordinate__3dsmax>.UVAxis_paramName UndefinedClass default: undefined -- string;

<UV_Coordinate__3dsmax>.UVAxis_shader UndefinedClass default: undefined -- texturemap

<UV_Coordinate__3dsmax>.UVWSource Integer default: 0 -- animatable; integer

<UV_Coordinate__3dsmax>.UVWSource_connected BooleanClass default: false -- boolean

<UV_Coordinate__3dsmax>.UVWSource_paramName UndefinedClass default: undefined -- string;

<UV_Coordinate__3dsmax>.UVWSource_shader UndefinedClass default: undefined -- texturemap

<UV_Coordinate__3dsmax>.UWrap BooleanClass default: false -- animatable; boolean

<UV_Coordinate__3dsmax>.UWrap_connected BooleanClass default: false -- boolean

<UV_Coordinate__3dsmax>.UWrap_paramName UndefinedClass default: undefined -- string;

<UV_Coordinate__3dsmax>.UWrap_shader UndefinedClass default: undefined -- texturemap

<UV_Coordinate__3dsmax>.VAngle Float default: 0.0 -- animatable; float

<UV_Coordinate__3dsmax>.VAngle_connected BooleanClass default: false -- boolean

<UV_Coordinate__3dsmax>.VAngle_paramName UndefinedClass default: undefined -- string;

<UV_Coordinate__3dsmax>.VAngle_shader UndefinedClass default: undefined -- texturemap

<UV_Coordinate__3dsmax>.VMirror BooleanClass default: false -- animatable; boolean

<UV_Coordinate__3dsmax>.VMirror_connected BooleanClass default: false -- boolean

<UV_Coordinate__3dsmax>.VMirror_paramName UndefinedClass default: undefined -- string;

<UV_Coordinate__3dsmax>.VMirror_shader UndefinedClass default: undefined -- texturemap

<UV_Coordinate__3dsmax>.vOffset Float default: 0.0 -- animatable; float

<UV_Coordinate__3dsmax>.VOffset_connected BooleanClass default: false -- boolean

<UV_Coordinate__3dsmax>.VOffset_paramName UndefinedClass default: undefined -- string;

<UV_Coordinate__3dsmax>.VOffset_shader UndefinedClass default: undefined -- texturemap

<UV_Coordinate__3dsmax>.VScale Float default: 0.0 -- animatable; float

<UV_Coordinate__3dsmax>.VScale_connected BooleanClass default: false -- boolean

<UV_Coordinate__3dsmax>.VScale_paramName UndefinedClass default: undefined -- string;

<UV_Coordinate__3dsmax>.VScale_shader UndefinedClass default: undefined -- texturemap

<UV_Coordinate__3dsmax>.VWrap BooleanClass default: false -- animatable; boolean

<UV_Coordinate__3dsmax>.VWrap_connected BooleanClass default: false -- boolean

<UV_Coordinate__3dsmax>.VWrap_paramName UndefinedClass default: undefined -- string;

<UV_Coordinate__3dsmax>.VWrap_shader UndefinedClass default: undefined -- texturemap

<UV_Coordinate__3dsmax>.WAngle Float default: 0.0 -- animatable; float

<UV_Coordinate__3dsmax>.WAngle_connected BooleanClass default: false -- boolean

<UV_Coordinate__3dsmax>.WAngle_paramName UndefinedClass default: undefined -- string;

<UV_Coordinate__3dsmax>.WAngle_shader UndefinedClass default: undefined -- texturemap

UV_Coordinate__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


UV_Generator__3dsmax : textureMap

UV_Generator__3dsmax - superclass: textureMap; super-superclass:material - 118:0 - classID: #(2004031007, -1018588313)

Constructors:

UV_Generator__3dsmax ...

max_base_UVGenerator ...

Properties:

<UV_Generator__3dsmax>.amount Float default: 1.0 -- animatable; float

<UV_Generator__3dsmax>.Amount_connected BooleanClass default: false -- boolean

<UV_Generator__3dsmax>.Amount_paramName UndefinedClass default: undefined -- string;

<UV_Generator__3dsmax>.Amount_shader UndefinedClass default: undefined -- texturemap

<UV_Generator__3dsmax>.animate BooleanClass default: false -- animatable; boolean

<UV_Generator__3dsmax>.Animate_connected BooleanClass default: false -- boolean

<UV_Generator__3dsmax>.Animate_paramName UndefinedClass default: undefined -- string;

<UV_Generator__3dsmax>.Animate_shader UndefinedClass default: undefined -- texturemap

<UV_Generator__3dsmax>.blur Float default: 1.0 -- animatable; float

<UV_Generator__3dsmax>.Blur_connected BooleanClass default: false -- boolean

<UV_Generator__3dsmax>.Blur_paramName UndefinedClass default: undefined -- string;

<UV_Generator__3dsmax>.Blur_shader UndefinedClass default: undefined -- texturemap

<UV_Generator__3dsmax>.BlurOffset Float default: 0.0 -- animatable; float

<UV_Generator__3dsmax>.BlurOffset_connected BooleanClass default: false -- boolean

<UV_Generator__3dsmax>.BlurOffset_paramName UndefinedClass default: undefined -- string;

<UV_Generator__3dsmax>.BlurOffset_shader UndefinedClass default: undefined -- texturemap

<UV_Generator__3dsmax>.Clip BooleanClass default: true -- animatable; boolean

<UV_Generator__3dsmax>.Clip_connected BooleanClass default: false -- boolean

<UV_Generator__3dsmax>.Clip_paramName UndefinedClass default: undefined -- string;

<UV_Generator__3dsmax>.Clip_shader UndefinedClass default: undefined -- texturemap

<UV_Generator__3dsmax>.EnvType Integer default: 4 -- animatable; integer

<UV_Generator__3dsmax>.EnvType_connected BooleanClass default: false -- boolean

<UV_Generator__3dsmax>.EnvType_paramName UndefinedClass default: undefined -- string;

<UV_Generator__3dsmax>.EnvType_shader UndefinedClass default: undefined -- texturemap

<UV_Generator__3dsmax>.level Integer default: 1 -- animatable; integer

<UV_Generator__3dsmax>.Level_connected BooleanClass default: false -- boolean

<UV_Generator__3dsmax>.Level_paramName UndefinedClass default: undefined -- string;

<UV_Generator__3dsmax>.Level_shader UndefinedClass default: undefined -- texturemap

<UV_Generator__3dsmax>.mapChannel Integer default: 1 -- animatable; integer

<UV_Generator__3dsmax>.MapChannel_connected BooleanClass default: false -- boolean

<UV_Generator__3dsmax>.MapChannel_paramName UndefinedClass default: undefined -- string;

<UV_Generator__3dsmax>.MapChannel_shader UndefinedClass default: undefined -- texturemap

<UV_Generator__3dsmax>.MapSlotType Integer default: 0 -- animatable; integer

<UV_Generator__3dsmax>.MapSlotType_connected BooleanClass default: false -- boolean

<UV_Generator__3dsmax>.MapSlotType_paramName UndefinedClass default: undefined -- string;

<UV_Generator__3dsmax>.MapSlotType_shader UndefinedClass default: undefined -- texturemap

<UV_Generator__3dsmax>.Noise BooleanClass default: false -- animatable; boolean

<UV_Generator__3dsmax>.Noise_connected BooleanClass default: false -- boolean

<UV_Generator__3dsmax>.Noise_paramName UndefinedClass default: undefined -- string;

<UV_Generator__3dsmax>.Noise_shader UndefinedClass default: undefined -- texturemap

<UV_Generator__3dsmax>.phase Float default: 0.0 -- animatable; float

<UV_Generator__3dsmax>.Phase_connected BooleanClass default: false -- boolean

<UV_Generator__3dsmax>.Phase_paramName UndefinedClass default: undefined -- string;

<UV_Generator__3dsmax>.Phase_shader UndefinedClass default: undefined -- texturemap

<UV_Generator__3dsmax>.realWorldMapSize BooleanClass default: false -- animatable; boolean

<UV_Generator__3dsmax>.RealWorldMapSize_connected BooleanClass default: false -- boolean

<UV_Generator__3dsmax>.RealWorldMapSize_paramName UndefinedClass default: undefined -- string;

<UV_Generator__3dsmax>.RealWorldMapSize_shader UndefinedClass default: undefined -- texturemap

error accessing parameter: Shader_Version

<UV_Generator__3dsmax>.showMapOnBack BooleanClass default: true -- animatable; boolean

<UV_Generator__3dsmax>.ShowMapOnBack_connected BooleanClass default: false -- boolean

<UV_Generator__3dsmax>.ShowMapOnBack_paramName UndefinedClass default: undefined -- string;

<UV_Generator__3dsmax>.ShowMapOnBack_shader UndefinedClass default: undefined -- texturemap

<UV_Generator__3dsmax>.size Float default: 1.0 -- animatable; float

<UV_Generator__3dsmax>.Size_connected BooleanClass default: false -- boolean

<UV_Generator__3dsmax>.Size_paramName UndefinedClass default: undefined -- string;

<UV_Generator__3dsmax>.Size_shader UndefinedClass default: undefined -- texturemap

error accessing parameter: TheList

<UV_Generator__3dsmax>.UAngle Float default: 0.0 -- animatable; float

<UV_Generator__3dsmax>.UAngle_connected BooleanClass default: false -- boolean

<UV_Generator__3dsmax>.UAngle_paramName UndefinedClass default: undefined -- string;

<UV_Generator__3dsmax>.UAngle_shader UndefinedClass default: undefined -- texturemap

<UV_Generator__3dsmax>.UMirror BooleanClass default: false -- animatable; boolean

<UV_Generator__3dsmax>.UMirror_connected BooleanClass default: false -- boolean

<UV_Generator__3dsmax>.UMirror_paramName UndefinedClass default: undefined -- string;

<UV_Generator__3dsmax>.UMirror_shader UndefinedClass default: undefined -- texturemap

<UV_Generator__3dsmax>.uOffset Float default: 0.0 -- animatable; float

<UV_Generator__3dsmax>.UOffset_connected BooleanClass default: false -- boolean

<UV_Generator__3dsmax>.UOffset_paramName UndefinedClass default: undefined -- string;

<UV_Generator__3dsmax>.UOffset_shader UndefinedClass default: undefined -- texturemap

<UV_Generator__3dsmax>.UScale Float default: 1.0 -- animatable; float

<UV_Generator__3dsmax>.UScale_connected BooleanClass default: false -- boolean

<UV_Generator__3dsmax>.UScale_paramName UndefinedClass default: undefined -- string;

<UV_Generator__3dsmax>.UScale_shader UndefinedClass default: undefined -- texturemap

<UV_Generator__3dsmax>.UVAxis Integer default: 0 -- animatable; integer

<UV_Generator__3dsmax>.UVAxis_connected BooleanClass default: false -- boolean

<UV_Generator__3dsmax>.UVAxis_paramName UndefinedClass default: undefined -- string;

<UV_Generator__3dsmax>.UVAxis_shader UndefinedClass default: undefined -- texturemap

<UV_Generator__3dsmax>.UVWSource Integer default: 0 -- animatable; integer

<UV_Generator__3dsmax>.UVWSource_connected BooleanClass default: false -- boolean

<UV_Generator__3dsmax>.UVWSource_paramName UndefinedClass default: undefined -- string;

<UV_Generator__3dsmax>.UVWSource_shader UndefinedClass default: undefined -- texturemap

<UV_Generator__3dsmax>.UWrap BooleanClass default: true -- animatable; boolean

<UV_Generator__3dsmax>.UWrap_connected BooleanClass default: false -- boolean

<UV_Generator__3dsmax>.UWrap_paramName UndefinedClass default: undefined -- string;

<UV_Generator__3dsmax>.UWrap_shader UndefinedClass default: undefined -- texturemap

<UV_Generator__3dsmax>.VAngle Float default: 0.0 -- animatable; float

<UV_Generator__3dsmax>.VAngle_connected BooleanClass default: false -- boolean

<UV_Generator__3dsmax>.VAngle_paramName UndefinedClass default: undefined -- string;

<UV_Generator__3dsmax>.VAngle_shader UndefinedClass default: undefined -- texturemap

<UV_Generator__3dsmax>.VMirror BooleanClass default: false -- animatable; boolean

<UV_Generator__3dsmax>.VMirror_connected BooleanClass default: false -- boolean

<UV_Generator__3dsmax>.VMirror_paramName UndefinedClass default: undefined -- string;

<UV_Generator__3dsmax>.VMirror_shader UndefinedClass default: undefined -- texturemap

<UV_Generator__3dsmax>.vOffset Float default: 0.0 -- animatable; float

<UV_Generator__3dsmax>.VOffset_connected BooleanClass default: false -- boolean

<UV_Generator__3dsmax>.VOffset_paramName UndefinedClass default: undefined -- string;

<UV_Generator__3dsmax>.VOffset_shader UndefinedClass default: undefined -- texturemap

<UV_Generator__3dsmax>.VScale Float default: 1.0 -- animatable; float

<UV_Generator__3dsmax>.VScale_connected BooleanClass default: false -- boolean

<UV_Generator__3dsmax>.VScale_paramName UndefinedClass default: undefined -- string;

<UV_Generator__3dsmax>.VScale_shader UndefinedClass default: undefined -- texturemap

<UV_Generator__3dsmax>.VWrap BooleanClass default: true -- animatable; boolean

<UV_Generator__3dsmax>.VWrap_connected BooleanClass default: false -- boolean

<UV_Generator__3dsmax>.VWrap_paramName UndefinedClass default: undefined -- string;

<UV_Generator__3dsmax>.VWrap_shader UndefinedClass default: undefined -- texturemap

<UV_Generator__3dsmax>.WAngle Float default: 0.0 -- animatable; float

<UV_Generator__3dsmax>.WAngle_connected BooleanClass default: false -- boolean

<UV_Generator__3dsmax>.WAngle_paramName UndefinedClass default: undefined -- string;

<UV_Generator__3dsmax>.WAngle_shader UndefinedClass default: undefined -- texturemap

<UV_Generator__3dsmax>.XCanvasSize Integer default: 0 -- animatable; integer

<UV_Generator__3dsmax>.XCanvasSize_connected BooleanClass default: false -- boolean

<UV_Generator__3dsmax>.XCanvasSize_paramName UndefinedClass default: undefined -- string;

<UV_Generator__3dsmax>.XCanvasSize_shader UndefinedClass default: undefined -- texturemap

<UV_Generator__3dsmax>.YCanvasSize Integer default: 0 -- animatable; integer

<UV_Generator__3dsmax>.YCanvasSize_connected BooleanClass default: false -- boolean

<UV_Generator__3dsmax>.YCanvasSize_paramName UndefinedClass default: undefined -- string;

<UV_Generator__3dsmax>.YCanvasSize_shader UndefinedClass default: undefined -- texturemap

UV_Generator__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


Vertex_Color__3dsmax : textureMap

Vertex_Color__3dsmax : textureMap {7773161f,8a2d5745}

Constructor:

Vertex_Color__3dsmax: class instances not creatable by MAXScript

Alias:

max_VertexColor

Properties:

<Vertex_Color__3dsmax>.Parameters : paramBlock2

<Vertex_Color__3dsmax>.ExtraParameters : paramBlock2

<Vertex_Color__3dsmax>.map : integer

<Vertex_Color__3dsmax>.subid : integer

<Vertex_Color__3dsmax>.GBufferID : integer

<Vertex_Color__3dsmax>.Connection_struct__0000__Parameters : paramBlock2

<Vertex_Color__3dsmax>.Connection_struct__0001__ExtraParameters : paramBlock2

<Vertex_Color__3dsmax>.map_connected : boolean

<Vertex_Color__3dsmax>.map_shader : texturemap

<Vertex_Color__3dsmax>.map_paramName : string

<Vertex_Color__3dsmax>.subid_connected : boolean

<Vertex_Color__3dsmax>.subid_shader : texturemap

<Vertex_Color__3dsmax>.subid_paramName : string

<Vertex_Color__3dsmax>.GBufferID_connected : boolean

<Vertex_Color__3dsmax>.GBufferID_shader : texturemap

<Vertex_Color__3dsmax>.GBufferID_paramName : string

<Vertex_Color__3dsmax>.TheList : maxObject array

<Vertex_Color__3dsmax>.Shader_Version : integer

Vertex_Color__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


Volume_Fog__3dsmax : textureMap

Volume_Fog__3dsmax : textureMap {7773161f,8b44af44}

Constructor:

Volume_Fog__3dsmax: class instances not creatable by MAXScript

Alias:

max_VolumeFog

Properties:

<Volume_Fog__3dsmax>.Parameters : paramBlock2

<Volume_Fog__3dsmax>.ExtraParameters : paramBlock2

<Volume_Fog__3dsmax>.Color : fRGBA color

<Volume_Fog__3dsmax>.Scale : float

<Volume_Fog__3dsmax>.Density : float

<Volume_Fog__3dsmax>.Shift : float

<Volume_Fog__3dsmax>.Phase : float

<Volume_Fog__3dsmax>.StepSize : float

<Volume_Fog__3dsmax>.MaximumSteps : integer

<Volume_Fog__3dsmax>.WindDirection : integer

<Volume_Fog__3dsmax>.WindStrength : float

<Volume_Fog__3dsmax>.Exponential : integer

<Volume_Fog__3dsmax>.NoiseType : integer

<Volume_Fog__3dsmax>.Invert : boolean

<Volume_Fog__3dsmax>.Levels : float

<Volume_Fog__3dsmax>.MinimumThreshold : float

<Volume_Fog__3dsmax>.MaximumThreshold : float

<Volume_Fog__3dsmax>.Taper : float

<Volume_Fog__3dsmax>.FogBackground : boolean

<Volume_Fog__3dsmax>.Active : boolean

<Volume_Fog__3dsmax>.Gizmos : maxObject array

<Volume_Fog__3dsmax>.Connection_struct__0000__Parameters : paramBlock2

<Volume_Fog__3dsmax>.Connection_struct__0001__ExtraParameters : paramBlock2

<Volume_Fog__3dsmax>.Color_connected : boolean

<Volume_Fog__3dsmax>.Color_shader : texturemap

<Volume_Fog__3dsmax>.Color_paramName : string

<Volume_Fog__3dsmax>.Scale_connected : boolean

<Volume_Fog__3dsmax>.Scale_shader : texturemap

<Volume_Fog__3dsmax>.Scale_paramName : string

<Volume_Fog__3dsmax>.Density_connected : boolean

<Volume_Fog__3dsmax>.Density_shader : texturemap

<Volume_Fog__3dsmax>.Density_paramName : string

<Volume_Fog__3dsmax>.Shift_connected : boolean

<Volume_Fog__3dsmax>.Shift_shader : texturemap

<Volume_Fog__3dsmax>.Shift_paramName : string

<Volume_Fog__3dsmax>.Phase_connected : boolean

<Volume_Fog__3dsmax>.Phase_shader : texturemap

<Volume_Fog__3dsmax>.Phase_paramName : string

<Volume_Fog__3dsmax>.StepSize_connected : boolean

<Volume_Fog__3dsmax>.StepSize_shader : texturemap

<Volume_Fog__3dsmax>.StepSize_paramName : string

<Volume_Fog__3dsmax>.MaximumSteps_connected : boolean

<Volume_Fog__3dsmax>.MaximumSteps_shader : texturemap

<Volume_Fog__3dsmax>.MaximumSteps_paramName : string

<Volume_Fog__3dsmax>.WindDirection_connected : boolean

<Volume_Fog__3dsmax>.WindDirection_shader : texturemap

<Volume_Fog__3dsmax>.WindDirection_paramName : string

<Volume_Fog__3dsmax>.WindStrength_connected : boolean

<Volume_Fog__3dsmax>.WindStrength_shader : texturemap

<Volume_Fog__3dsmax>.WindStrength_paramName : string

<Volume_Fog__3dsmax>.Exponential_connected : boolean

<Volume_Fog__3dsmax>.Exponential_shader : texturemap

<Volume_Fog__3dsmax>.Exponential_paramName : string

<Volume_Fog__3dsmax>.NoiseType_connected : boolean

<Volume_Fog__3dsmax>.NoiseType_shader : texturemap

<Volume_Fog__3dsmax>.NoiseType_paramName : string

<Volume_Fog__3dsmax>.Invert_connected : boolean

<Volume_Fog__3dsmax>.Invert_shader : texturemap

<Volume_Fog__3dsmax>.Invert_paramName : string

<Volume_Fog__3dsmax>.Levels_connected : boolean

<Volume_Fog__3dsmax>.Levels_shader : texturemap

<Volume_Fog__3dsmax>.Levels_paramName : string

<Volume_Fog__3dsmax>.MinimumThreshold_connected : boolean

<Volume_Fog__3dsmax>.MinimumThreshold_shader : texturemap

<Volume_Fog__3dsmax>.MinimumThreshold_paramName : string

<Volume_Fog__3dsmax>.MaximumThreshold_connected : boolean

<Volume_Fog__3dsmax>.MaximumThreshold_shader : texturemap

<Volume_Fog__3dsmax>.MaximumThreshold_paramName : string

<Volume_Fog__3dsmax>.Taper_connected : boolean

<Volume_Fog__3dsmax>.Taper_shader : texturemap

<Volume_Fog__3dsmax>.Taper_paramName : string

<Volume_Fog__3dsmax>.FogBackground_connected : boolean

<Volume_Fog__3dsmax>.FogBackground_shader : texturemap

<Volume_Fog__3dsmax>.FogBackground_paramName : string

<Volume_Fog__3dsmax>.Active_connected : boolean

<Volume_Fog__3dsmax>.Active_shader : texturemap

<Volume_Fog__3dsmax>.Active_paramName : string

<Volume_Fog__3dsmax>.TheList : maxObject array

<Volume_Fog__3dsmax>.Shader_Version : integer

Volume_Fog__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


Volume_Light__3dsmax : textureMap

Volume_Light__3dsmax : textureMap {7773161f,891e4744}

Constructor:

Volume_Light__3dsmax: class instances not creatable by MAXScript

Alias:

max_VolumeLight

Properties:

<Volume_Light__3dsmax>.Parameters : paramBlock2

<Volume_Light__3dsmax>.ExtraParameters : paramBlock2

<Volume_Light__3dsmax>.Color : fRGBA color

<Volume_Light__3dsmax>.Density : float

<Volume_Light__3dsmax>.Maximum : float

<Volume_Light__3dsmax>.Minimum : float

<Volume_Light__3dsmax>.Scale : float

<Volume_Light__3dsmax>.Shift : float

<Volume_Light__3dsmax>.Noise : boolean

<Volume_Light__3dsmax>.Start : float

<Volume_Light__3dsmax>.End : float

<Volume_Light__3dsmax>.Filter : integer

<Volume_Light__3dsmax>.NoiseAmount : float

<Volume_Light__3dsmax>.WindDirection : integer

<Volume_Light__3dsmax>.WindStrength : float

<Volume_Light__3dsmax>.Phase : float

<Volume_Light__3dsmax>.Samples : integer

<Volume_Light__3dsmax>.AutoSample : boolean

<Volume_Light__3dsmax>.Exponential : integer

<Volume_Light__3dsmax>.NoiseType : integer

<Volume_Light__3dsmax>.Invert : boolean

<Volume_Light__3dsmax>.Levels : float

<Volume_Light__3dsmax>.MinimumThreshold : float

<Volume_Light__3dsmax>.MaximumThreshold : float

<Volume_Light__3dsmax>.UseLightSpace : boolean

<Volume_Light__3dsmax>.AttenuationColor : fRGBA color

<Volume_Light__3dsmax>.UseAttenuation : boolean

<Volume_Light__3dsmax>.AttenuationMultiplier : float

<Volume_Light__3dsmax>.Animated : boolean

<Volume_Light__3dsmax>.Active : boolean

<Volume_Light__3dsmax>.LightNodes : node array

<Volume_Light__3dsmax>.Connection_struct__0000__Parameters : paramBlock2

<Volume_Light__3dsmax>.Connection_struct__0001__ExtraParameters : paramBlock2

<Volume_Light__3dsmax>.Color_connected : boolean

<Volume_Light__3dsmax>.Color_shader : texturemap

<Volume_Light__3dsmax>.Color_paramName : string

<Volume_Light__3dsmax>.Density_connected : boolean

<Volume_Light__3dsmax>.Density_shader : texturemap

<Volume_Light__3dsmax>.Density_paramName : string

<Volume_Light__3dsmax>.Maximum_connected : boolean

<Volume_Light__3dsmax>.Maximum_shader : texturemap

<Volume_Light__3dsmax>.Maximum_paramName : string

<Volume_Light__3dsmax>.Minimum_connected : boolean

<Volume_Light__3dsmax>.Minimum_shader : texturemap

<Volume_Light__3dsmax>.Minimum_paramName : string

<Volume_Light__3dsmax>.Scale_connected : boolean

<Volume_Light__3dsmax>.Scale_shader : texturemap

<Volume_Light__3dsmax>.Scale_paramName : string

<Volume_Light__3dsmax>.Shift_connected : boolean

<Volume_Light__3dsmax>.Shift_shader : texturemap

<Volume_Light__3dsmax>.Shift_paramName : string

<Volume_Light__3dsmax>.Noise_connected : boolean

<Volume_Light__3dsmax>.Noise_shader : texturemap

<Volume_Light__3dsmax>.Noise_paramName : string

<Volume_Light__3dsmax>.Start_connected : boolean

<Volume_Light__3dsmax>.Start_shader : texturemap

<Volume_Light__3dsmax>.Start_paramName : string

<Volume_Light__3dsmax>.End_connected : boolean

<Volume_Light__3dsmax>.End_shader : texturemap

<Volume_Light__3dsmax>.End_paramName : string

<Volume_Light__3dsmax>.Filter_connected : boolean

<Volume_Light__3dsmax>.Filter_shader : texturemap

<Volume_Light__3dsmax>.Filter_paramName : string

<Volume_Light__3dsmax>.NoiseAmount_connected : boolean

<Volume_Light__3dsmax>.NoiseAmount_shader : texturemap

<Volume_Light__3dsmax>.NoiseAmount_paramName : string

<Volume_Light__3dsmax>.WindDirection_connected : boolean

<Volume_Light__3dsmax>.WindDirection_shader : texturemap

<Volume_Light__3dsmax>.WindDirection_paramName : string

<Volume_Light__3dsmax>.WindStrength_connected : boolean

<Volume_Light__3dsmax>.WindStrength_shader : texturemap

<Volume_Light__3dsmax>.WindStrength_paramName : string

<Volume_Light__3dsmax>.Phase_connected : boolean

<Volume_Light__3dsmax>.Phase_shader : texturemap

<Volume_Light__3dsmax>.Phase_paramName : string

<Volume_Light__3dsmax>.Samples_connected : boolean

<Volume_Light__3dsmax>.Samples_shader : texturemap

<Volume_Light__3dsmax>.Samples_paramName : string

<Volume_Light__3dsmax>.AutoSample_connected : boolean

<Volume_Light__3dsmax>.AutoSample_shader : texturemap

<Volume_Light__3dsmax>.AutoSample_paramName : string

<Volume_Light__3dsmax>.Exponential_connected : boolean

<Volume_Light__3dsmax>.Exponential_shader : texturemap

<Volume_Light__3dsmax>.Exponential_paramName : string

<Volume_Light__3dsmax>.NoiseType_connected : boolean

<Volume_Light__3dsmax>.NoiseType_shader : texturemap

<Volume_Light__3dsmax>.NoiseType_paramName : string

<Volume_Light__3dsmax>.Invert_connected : boolean

<Volume_Light__3dsmax>.Invert_shader : texturemap

<Volume_Light__3dsmax>.Invert_paramName : string

<Volume_Light__3dsmax>.Levels_connected : boolean

<Volume_Light__3dsmax>.Levels_shader : texturemap

<Volume_Light__3dsmax>.Levels_paramName : string

<Volume_Light__3dsmax>.MinimumThreshold_connected : boolean

<Volume_Light__3dsmax>.MinimumThreshold_shader : texturemap

<Volume_Light__3dsmax>.MinimumThreshold_paramName : string

<Volume_Light__3dsmax>.MaximumThreshold_connected : boolean

<Volume_Light__3dsmax>.MaximumThreshold_shader : texturemap

<Volume_Light__3dsmax>.MaximumThreshold_paramName : string

<Volume_Light__3dsmax>.UseLightSpace_connected : boolean

<Volume_Light__3dsmax>.UseLightSpace_shader : texturemap

<Volume_Light__3dsmax>.UseLightSpace_paramName : string

<Volume_Light__3dsmax>.AttenuationColor_connected : boolean

<Volume_Light__3dsmax>.AttenuationColor_shader : texturemap

<Volume_Light__3dsmax>.AttenuationColor_paramName : string

<Volume_Light__3dsmax>.UseAttenuation_connected : boolean

<Volume_Light__3dsmax>.UseAttenuation_shader : texturemap

<Volume_Light__3dsmax>.UseAttenuation_paramName : string

<Volume_Light__3dsmax>.AttenuationMultiplier_connected : boolean

<Volume_Light__3dsmax>.AttenuationMultiplier_shader : texturemap

<Volume_Light__3dsmax>.AttenuationMultiplier_paramName : string

<Volume_Light__3dsmax>.Animated_connected : boolean

<Volume_Light__3dsmax>.Animated_shader : texturemap

<Volume_Light__3dsmax>.Animated_paramName : string

<Volume_Light__3dsmax>.Active_connected : boolean

<Volume_Light__3dsmax>.Active_shader : texturemap

<Volume_Light__3dsmax>.Active_paramName : string

<Volume_Light__3dsmax>.TheList : maxObject array

<Volume_Light__3dsmax>.Shader_Version : integer

Volume_Light__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


Water__3dsmax : textureMap

Water__3dsmax : textureMap {7773161f,7ffe445b}

Constructor:

Water__3dsmax: class instances not creatable by MAXScript

Alias:

max_Water

Properties:

<Water__3dsmax>.Parameters : paramBlock2

<Water__3dsmax>.ExtraParameters : paramBlock2

<Water__3dsmax>.NumWaveSets : integer

<Water__3dsmax>.WaveRadius : float

<Water__3dsmax>.WaveLenMin : float

<Water__3dsmax>.WaveLenMax : float

<Water__3dsmax>.Amplitude : float

<Water__3dsmax>.Phase : float

<Water__3dsmax>.Distribution : integer

<Water__3dsmax>.RandomSeed : integer

<Water__3dsmax>.Color1 : fRGBA color

<Water__3dsmax>.Color2 : fRGBA color

<Water__3dsmax>.Map1 : texturemap

<Water__3dsmax>.Map2 : texturemap

<Water__3dsmax>.Map1On : boolean

<Water__3dsmax>.Map2On : boolean

<Water__3dsmax>.Coords : maxObject

<Water__3dsmax>.GBufferID : integer

<Water__3dsmax>.Connection_struct__0000__Parameters : paramBlock2

<Water__3dsmax>.Connection_struct__0001__ExtraParameters : paramBlock2

<Water__3dsmax>.NumWaveSets_connected : boolean

<Water__3dsmax>.NumWaveSets_shader : texturemap

<Water__3dsmax>.NumWaveSets_paramName : string

<Water__3dsmax>.WaveRadius_connected : boolean

<Water__3dsmax>.WaveRadius_shader : texturemap

<Water__3dsmax>.WaveRadius_paramName : string

<Water__3dsmax>.WaveLenMin_connected : boolean

<Water__3dsmax>.WaveLenMin_shader : texturemap

<Water__3dsmax>.WaveLenMin_paramName : string

<Water__3dsmax>.WaveLenMax_connected : boolean

<Water__3dsmax>.WaveLenMax_shader : texturemap

<Water__3dsmax>.WaveLenMax_paramName : string

<Water__3dsmax>.Amplitude_connected : boolean

<Water__3dsmax>.Amplitude_shader : texturemap

<Water__3dsmax>.Amplitude_paramName : string

<Water__3dsmax>.Phase_connected : boolean

<Water__3dsmax>.Phase_shader : texturemap

<Water__3dsmax>.Phase_paramName : string

<Water__3dsmax>.Distribution_connected : boolean

<Water__3dsmax>.Distribution_shader : texturemap

<Water__3dsmax>.Distribution_paramName : string

<Water__3dsmax>.RandomSeed_connected : boolean

<Water__3dsmax>.RandomSeed_shader : texturemap

<Water__3dsmax>.RandomSeed_paramName : string

<Water__3dsmax>.Color1_connected : boolean

<Water__3dsmax>.Color1_shader : texturemap

<Water__3dsmax>.Color1_paramName : string

<Water__3dsmax>.Color2_connected : boolean

<Water__3dsmax>.Color2_shader : texturemap

<Water__3dsmax>.Color2_paramName : string

<Water__3dsmax>.Map1On_connected : boolean

<Water__3dsmax>.Map1On_shader : texturemap

<Water__3dsmax>.Map1On_paramName : string

<Water__3dsmax>.Map2On_connected : boolean

<Water__3dsmax>.Map2On_shader : texturemap

<Water__3dsmax>.Map2On_paramName : string

<Water__3dsmax>.GBufferID_connected : boolean

<Water__3dsmax>.GBufferID_shader : texturemap

<Water__3dsmax>.GBufferID_paramName : string

<Water__3dsmax>.TheList : maxObject array

<Water__3dsmax>.Shader_Version : integer

Water__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


Wood__3dsmax : textureMap

Wood__3dsmax : textureMap {7773161f,8109524d}

Constructor:

Wood__3dsmax: class instances not creatable by MAXScript

Alias:

max_Wood

Properties:

<Wood__3dsmax>.Parameters : paramBlock2

<Wood__3dsmax>.ExtraParameters : paramBlock2

<Wood__3dsmax>.Map1 : texturemap

<Wood__3dsmax>.Map2 : texturemap

<Wood__3dsmax>.Color1 : fRGBA color

<Wood__3dsmax>.Color2 : fRGBA color

<Wood__3dsmax>.Map1Enabled : boolean

<Wood__3dsmax>.Map2Enabled : boolean

<Wood__3dsmax>.Thickness : float

<Wood__3dsmax>.RadialNoise : float

<Wood__3dsmax>.AxialNoise : float

<Wood__3dsmax>.Coords : maxObject

<Wood__3dsmax>.GBufferID : integer

<Wood__3dsmax>.Connection_struct__0000__Parameters : paramBlock2

<Wood__3dsmax>.Connection_struct__0001__ExtraParameters : paramBlock2

<Wood__3dsmax>.Color1_connected : boolean

<Wood__3dsmax>.Color1_shader : texturemap

<Wood__3dsmax>.Color1_paramName : string

<Wood__3dsmax>.Color2_connected : boolean

<Wood__3dsmax>.Color2_shader : texturemap

<Wood__3dsmax>.Color2_paramName : string

<Wood__3dsmax>.Map1Enabled_connected : boolean

<Wood__3dsmax>.Map1Enabled_shader : texturemap

<Wood__3dsmax>.Map1Enabled_paramName : string

<Wood__3dsmax>.Map2Enabled_connected : boolean

<Wood__3dsmax>.Map2Enabled_shader : texturemap

<Wood__3dsmax>.Map2Enabled_paramName : string

<Wood__3dsmax>.Thickness_connected : boolean

<Wood__3dsmax>.Thickness_shader : texturemap

<Wood__3dsmax>.Thickness_paramName : string

<Wood__3dsmax>.RadialNoise_connected : boolean

<Wood__3dsmax>.RadialNoise_shader : texturemap

<Wood__3dsmax>.RadialNoise_paramName : string

<Wood__3dsmax>.AxialNoise_connected : boolean

<Wood__3dsmax>.AxialNoise_shader : texturemap

<Wood__3dsmax>.AxialNoise_paramName : string

<Wood__3dsmax>.GBufferID_connected : boolean

<Wood__3dsmax>.GBufferID_shader : texturemap

<Wood__3dsmax>.GBufferID_paramName : string

<Wood__3dsmax>.TheList : maxObject array

<Wood__3dsmax>.Shader_Version : integer

Wood__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


XYZ_Coordinate__3dsmax : textureMap

XYZ_Coordinate__3dsmax - superclass: textureMap; super-superclass:material - 33:0 - classID: #(2004031007, 1378057577)

Constructors:

XYZ_Coordinate__3dsmax ...

max_XYZCoordinate ...

Properties:

<XYZ_Coordinate__3dsmax>.Angle Point3 default: [0,0,0] -- animatable; point3

<XYZ_Coordinate__3dsmax>.Angle_connected BooleanClass default: false -- boolean

<XYZ_Coordinate__3dsmax>.Angle_paramName UndefinedClass default: undefined -- string;

<XYZ_Coordinate__3dsmax>.Angle_shader UndefinedClass default: undefined -- texturemap

<XYZ_Coordinate__3dsmax>.blur Float default: 0.0 -- animatable; float

<XYZ_Coordinate__3dsmax>.Blur_connected BooleanClass default: false -- boolean

<XYZ_Coordinate__3dsmax>.Blur_paramName UndefinedClass default: undefined -- string;

<XYZ_Coordinate__3dsmax>.Blur_shader UndefinedClass default: undefined -- texturemap

<XYZ_Coordinate__3dsmax>.BlurOffset Float default: 0.0 -- animatable; float

<XYZ_Coordinate__3dsmax>.BlurOffset_connected BooleanClass default: false -- boolean

<XYZ_Coordinate__3dsmax>.BlurOffset_paramName UndefinedClass default: undefined -- string;

<XYZ_Coordinate__3dsmax>.BlurOffset_shader UndefinedClass default: undefined -- texturemap

<XYZ_Coordinate__3dsmax>.CoordinateSystem Integer default: 0 -- animatable; integer

<XYZ_Coordinate__3dsmax>.CoordinateSystem_connected BooleanClass default: false -- boolean

<XYZ_Coordinate__3dsmax>.CoordinateSystem_paramName UndefinedClass default: undefined -- string;

<XYZ_Coordinate__3dsmax>.CoordinateSystem_shader UndefinedClass default: undefined -- texturemap

<XYZ_Coordinate__3dsmax>.dXYZ Point3 default: [0,0,0] -- point3

<XYZ_Coordinate__3dsmax>.mapChannel Integer default: 0 -- animatable; integer

<XYZ_Coordinate__3dsmax>.MapChannel_connected BooleanClass default: false -- boolean

<XYZ_Coordinate__3dsmax>.MapChannel_paramName UndefinedClass default: undefined -- string;

<XYZ_Coordinate__3dsmax>.MapChannel_shader UndefinedClass default: undefined -- texturemap

<XYZ_Coordinate__3dsmax>.offset Point3 default: [0,0,0] -- animatable; point3

<XYZ_Coordinate__3dsmax>.offset_connected BooleanClass default: false -- boolean

<XYZ_Coordinate__3dsmax>.offset_paramName UndefinedClass default: undefined -- string;

<XYZ_Coordinate__3dsmax>.offset_shader UndefinedClass default: undefined -- texturemap

error accessing parameter: Shader_Version

<XYZ_Coordinate__3dsmax>.Structure UndefinedClass default: undefined -- paramBlock2

error accessing parameter: TheList

<XYZ_Coordinate__3dsmax>.tiling Point3 default: [0,0,0] -- animatable; point3

<XYZ_Coordinate__3dsmax>.Tiling_connected BooleanClass default: false -- boolean

<XYZ_Coordinate__3dsmax>.Tiling_paramName UndefinedClass default: undefined -- string;

<XYZ_Coordinate__3dsmax>.Tiling_shader UndefinedClass default: undefined -- texturemap

<XYZ_Coordinate__3dsmax>.XYZ Point3 default: [0,0,0] -- point3

XYZ_Coordinate__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


XYZ_Generator__3dsmax : textureMap

XYZ_Generator__3dsmax - superclass: textureMap; super-superclass:material - 30:0 - classID: #(2004031007, -1338335190)

Constructors:

XYZ_Generator__3dsmax ...

max_base_XYZGenerator ...

Properties:

<XYZ_Generator__3dsmax>.Angle Point3 default: [0,0,0] -- animatable; point3

<XYZ_Generator__3dsmax>.Angle_connected BooleanClass default: false -- boolean

<XYZ_Generator__3dsmax>.Angle_paramName UndefinedClass default: undefined -- string;

<XYZ_Generator__3dsmax>.Angle_shader UndefinedClass default: undefined -- texturemap

<XYZ_Generator__3dsmax>.blur Float default: 1.0 -- animatable; float

<XYZ_Generator__3dsmax>.Blur_connected BooleanClass default: false -- boolean

<XYZ_Generator__3dsmax>.Blur_paramName UndefinedClass default: undefined -- string;

<XYZ_Generator__3dsmax>.Blur_shader UndefinedClass default: undefined -- texturemap

<XYZ_Generator__3dsmax>.BlurOffset Float default: 0.0 -- animatable; float

<XYZ_Generator__3dsmax>.BlurOffset_connected BooleanClass default: false -- boolean

<XYZ_Generator__3dsmax>.BlurOffset_paramName UndefinedClass default: undefined -- string;

<XYZ_Generator__3dsmax>.BlurOffset_shader UndefinedClass default: undefined -- texturemap

<XYZ_Generator__3dsmax>.CoordinateSystem Integer default: 0 -- animatable; integer

<XYZ_Generator__3dsmax>.CoordinateSystem_connected BooleanClass default: false -- boolean

<XYZ_Generator__3dsmax>.CoordinateSystem_paramName UndefinedClass default: undefined -- string;

<XYZ_Generator__3dsmax>.CoordinateSystem_shader UndefinedClass default: undefined -- texturemap

<XYZ_Generator__3dsmax>.mapChannel Integer default: 1 -- animatable; integer

<XYZ_Generator__3dsmax>.MapChannel_connected BooleanClass default: false -- boolean

<XYZ_Generator__3dsmax>.MapChannel_paramName UndefinedClass default: undefined -- string;

<XYZ_Generator__3dsmax>.MapChannel_shader UndefinedClass default: undefined -- texturemap

<XYZ_Generator__3dsmax>.offset Point3 default: [0,0,0] -- animatable; point3

<XYZ_Generator__3dsmax>.offset_connected BooleanClass default: false -- boolean

<XYZ_Generator__3dsmax>.offset_paramName UndefinedClass default: undefined -- string;

<XYZ_Generator__3dsmax>.offset_shader UndefinedClass default: undefined -- texturemap

error accessing parameter: Shader_Version

error accessing parameter: TheList

<XYZ_Generator__3dsmax>.tiling Point3 default: [1,1,1] -- animatable; point3

<XYZ_Generator__3dsmax>.Tiling_connected BooleanClass default: false -- boolean

<XYZ_Generator__3dsmax>.Tiling_paramName UndefinedClass default: undefined -- string;

<XYZ_Generator__3dsmax>.Tiling_shader UndefinedClass default: undefined -- texturemap

XYZ_Generator__3dsmax interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:


adsk_aspect_ratio_height_per_width : textureMap

adsk_aspect_ratio_height_per_width : textureMap {7773161f,6ffe946e}

Constructor:

adsk_aspect_ratio_height_per_width: class instances not creatable by MAXScript

Properties:

<adsk_aspect_ratio_height_per_width>.image_color : filename

<adsk_aspect_ratio_height_per_width>.Image_Frame_Number : integer

<adsk_aspect_ratio_height_per_width>.scaling_value : float

<adsk_aspect_ratio_height_per_width>.image_color_connected : boolean

<adsk_aspect_ratio_height_per_width>.image_color_shader : texturemap

<adsk_aspect_ratio_height_per_width>.image_color_paramName : string

<adsk_aspect_ratio_height_per_width>.scaling_value_connected : boolean

<adsk_aspect_ratio_height_per_width>.scaling_value_shader : texturemap

<adsk_aspect_ratio_height_per_width>.scaling_value_paramName : string

<adsk_aspect_ratio_height_per_width>.TheList : maxObject array

<adsk_aspect_ratio_height_per_width>.Shader_Version : integer

adsk_aspect_ratio_height_per_width interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_aspect_ratio_width_per_height : textureMap

adsk_aspect_ratio_width_per_height : textureMap {7773161f,68f69c65}

Constructor:

adsk_aspect_ratio_width_per_height: class instances not creatable by MAXScript

Properties:

<adsk_aspect_ratio_width_per_height>.image_color : filename

<adsk_aspect_ratio_width_per_height>.Image_Frame_Number : integer

<adsk_aspect_ratio_width_per_height>.scaling_value : float

<adsk_aspect_ratio_width_per_height>.image_color_connected : boolean

<adsk_aspect_ratio_width_per_height>.image_color_shader : texturemap

<adsk_aspect_ratio_width_per_height>.image_color_paramName : string

<adsk_aspect_ratio_width_per_height>.scaling_value_connected : boolean

<adsk_aspect_ratio_width_per_height>.scaling_value_shader : texturemap

<adsk_aspect_ratio_width_per_height>.scaling_value_paramName : string

<adsk_aspect_ratio_width_per_height>.TheList : maxObject array

<adsk_aspect_ratio_width_per_height>.Shader_Version : integer

adsk_aspect_ratio_width_per_height interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_blurred_reflection_multiplier : textureMap

adsk_blurred_reflection_multiplier : textureMap {7773161f,7004bf8a}

Constructor:

adsk_blurred_reflection_multiplier: class instances not creatable by MAXScript

Properties:

<adsk_blurred_reflection_multiplier>.blurred_reflection_value : integer

<adsk_blurred_reflection_multiplier>.blurred_reflection_value_connected : boolean

<adsk_blurred_reflection_multiplier>.blurred_reflection_value_shader : texturemap

<adsk_blurred_reflection_multiplier>.blurred_reflection_value_paramName : string

<adsk_blurred_reflection_multiplier>.TheList : maxObject array

<adsk_blurred_reflection_multiplier>.Shader_Version : integer

adsk_blurred_reflection_multiplier interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_blurred_refraction_multiplier : textureMap

adsk_blurred_refraction_multiplier : textureMap {7773161f,7004c37c}

Constructor:

adsk_blurred_refraction_multiplier: class instances not creatable by MAXScript

Properties:

<adsk_blurred_refraction_multiplier>.blurred_refraction_value : integer

<adsk_blurred_refraction_multiplier>.blurred_refraction_value_connected : boolean

<adsk_blurred_refraction_multiplier>.blurred_refraction_value_shader : texturemap

<adsk_blurred_refraction_multiplier>.blurred_refraction_value_paramName : string

<adsk_blurred_refraction_multiplier>.TheList : maxObject array

<adsk_blurred_refraction_multiplier>.Shader_Version : integer

adsk_blurred_refraction_multiplier interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_decal : textureMap

adsk_decal : textureMap {7773161f,4e08b072}

Constructor:

adsk_decal: class instances not creatable by MAXScript

Properties:

<adsk_decal>.surface_material : material

<adsk_decal>.projection : integer

<adsk_decal>.decal : material array

<adsk_decal>.top_left : point3 array

<adsk_decal>.top_right : point3 array

<adsk_decal>.bottom_right : point3 array

<adsk_decal>.bottom_left : point3 array

<adsk_decal>.projection_connected : boolean

<adsk_decal>.projection_shader : texturemap

<adsk_decal>.projection_paramName : string

<adsk_decal>.TheList : maxObject array

<adsk_decal>.Shader_Version : integer

adsk_decal interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_environment : textureMap

adsk_environment : textureMap {7773161f,4d0e5a4d}

Constructor:

adsk_environment: class instances not creatable by MAXScript

Properties:

<adsk_environment>.Shader : texturemap

<adsk_environment>.OverrideBackgroundColor : boolean

<adsk_environment>.BackgroundColor : fRGBA color

<adsk_environment>.OverrideBackgroundColor_connected : boolean

<adsk_environment>.OverrideBackgroundColor_shader : texturemap

<adsk_environment>.OverrideBackgroundColor_paramName : string

<adsk_environment>.BackgroundColor_connected : boolean

<adsk_environment>.BackgroundColor_shader : texturemap

<adsk_environment>.BackgroundColor_paramName : string

<adsk_environment>.TheList : maxObject array

<adsk_environment>.Shader_Version : integer

adsk_environment interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_Metal_Cutouts__Round : textureMap

adsk_Metal_Cutouts__Round : textureMap {7773161f,5dfe717b}

Constructor:

adsk_Metal_Cutouts__Round: class instances not creatable by MAXScript

Properties:

<adsk_Metal_Cutouts__Round>.TheList : maxObject array

<adsk_Metal_Cutouts__Round>.Shader_Version : integer

adsk_Metal_Cutouts__Round interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_Metal_Cutouts__Square : textureMap

adsk_Metal_Cutouts__Square : textureMap {7773161f,5cfe9a92}

Constructor:

adsk_Metal_Cutouts__Square: class instances not creatable by MAXScript

Properties:

<adsk_Metal_Cutouts__Square>.TheList : maxObject array

<adsk_Metal_Cutouts__Square>.Shader_Version : integer

adsk_Metal_Cutouts__Square interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_Metal_Noise_Anodized : textureMap

adsk_Metal_Noise_Anodized : textureMap {7773161f,84204882}

Constructor:

adsk_Metal_Noise_Anodized: class instances not creatable by MAXScript

Properties:

<adsk_Metal_Noise_Anodized>.tiling : point3

<adsk_Metal_Noise_Anodized>.tiling_connected : boolean

<adsk_Metal_Noise_Anodized>.tiling_shader : texturemap

<adsk_Metal_Noise_Anodized>.tiling_paramName : string

<adsk_Metal_Noise_Anodized>.TheList : maxObject array

<adsk_Metal_Noise_Anodized>.Shader_Version : integer

adsk_Metal_Noise_Anodized interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_Metal_Patterns__Knurls : textureMap

adsk_Metal_Patterns__Knurls : textureMap {7773161f,4645bc74}

Constructor:

adsk_Metal_Patterns__Knurls: class instances not creatable by MAXScript

Properties:

<adsk_Metal_Patterns__Knurls>.Scale : float

<adsk_Metal_Patterns__Knurls>.Scale_connected : boolean

<adsk_Metal_Patterns__Knurls>.Scale_shader : texturemap

<adsk_Metal_Patterns__Knurls>.Scale_paramName : string

<adsk_Metal_Patterns__Knurls>.TheList : maxObject array

<adsk_Metal_Patterns__Knurls>.Shader_Version : integer

adsk_Metal_Patterns__Knurls interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_Metal_switch_color_shader : textureMap

adsk_Metal_switch_color_shader : textureMap {7773161f,a13f4a4d}

Constructor:

adsk_Metal_switch_color_shader: class instances not creatable by MAXScript

Properties:

<adsk_Metal_switch_color_shader>.switcher : integer

<adsk_Metal_switch_color_shader>.color : fRGBA color

<adsk_Metal_switch_color_shader>.user_map : texturemap

<adsk_Metal_switch_color_shader>.default_map01 : filename

<adsk_Metal_switch_color_shader>.Image_Frame_Number : integer

<adsk_Metal_switch_color_shader>.default_map02 : filename

<adsk_Metal_switch_color_shader>.Image_Frame_Number : integer

<adsk_Metal_switch_color_shader>.map_amount : float

<adsk_Metal_switch_color_shader>.Uscale : float

<adsk_Metal_switch_color_shader>.Vscale : float

<adsk_Metal_switch_color_shader>.extra_map_01 : texturemap

<adsk_Metal_switch_color_shader>.switcher_connected : boolean

<adsk_Metal_switch_color_shader>.switcher_shader : texturemap

<adsk_Metal_switch_color_shader>.switcher_paramName : string

<adsk_Metal_switch_color_shader>.color_connected : boolean

<adsk_Metal_switch_color_shader>.color_shader : texturemap

<adsk_Metal_switch_color_shader>.color_paramName : string

<adsk_Metal_switch_color_shader>.default_map01_connected : boolean

<adsk_Metal_switch_color_shader>.default_map01_shader : texturemap

<adsk_Metal_switch_color_shader>.default_map01_paramName : string

<adsk_Metal_switch_color_shader>.default_map02_connected : boolean

<adsk_Metal_switch_color_shader>.default_map02_shader : texturemap

<adsk_Metal_switch_color_shader>.default_map02_paramName : string

<adsk_Metal_switch_color_shader>.map_amount_connected : boolean

<adsk_Metal_switch_color_shader>.map_amount_shader : texturemap

<adsk_Metal_switch_color_shader>.map_amount_paramName : string

<adsk_Metal_switch_color_shader>.Uscale_connected : boolean

<adsk_Metal_switch_color_shader>.Uscale_shader : texturemap

<adsk_Metal_switch_color_shader>.Uscale_paramName : string

<adsk_Metal_switch_color_shader>.Vscale_connected : boolean

<adsk_Metal_switch_color_shader>.Vscale_shader : texturemap

<adsk_Metal_switch_color_shader>.Vscale_paramName : string

<adsk_Metal_switch_color_shader>.TheList : maxObject array

<adsk_Metal_switch_color_shader>.Shader_Version : integer

adsk_Metal_switch_color_shader interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_scale_internal_to_meters : textureMap

adsk_scale_internal_to_meters : textureMap {7773161f,976ec043}

Constructor:

adsk_scale_internal_to_meters: class instances not creatable by MAXScript

Properties:

<adsk_scale_internal_to_meters>.internalValue : float

<adsk_scale_internal_to_meters>.internalValue_connected : boolean

<adsk_scale_internal_to_meters>.internalValue_shader : texturemap

<adsk_scale_internal_to_meters>.internalValue_paramName : string

<adsk_scale_internal_to_meters>.TheList : maxObject array

<adsk_scale_internal_to_meters>.Shader_Version : integer

adsk_scale_internal_to_meters interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_scale_meters_to_internal : textureMap

adsk_scale_meters_to_internal : textureMap {7773161f,b5508625}

Constructor:

adsk_scale_meters_to_internal: class instances not creatable by MAXScript

Properties:

<adsk_scale_meters_to_internal>.meterValue : float

<adsk_scale_meters_to_internal>.meterValue_connected : boolean

<adsk_scale_meters_to_internal>.meterValue_shader : texturemap

<adsk_scale_meters_to_internal>.meterValue_paramName : string

<adsk_scale_meters_to_internal>.TheList : maxObject array

<adsk_scale_meters_to_internal>.Shader_Version : integer

adsk_scale_meters_to_internal interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_scale_meters_to_internal_inverse : textureMap

adsk_scale_meters_to_internal_inverse : textureMap {7773161f,b837bc14}

Constructor:

adsk_scale_meters_to_internal_inverse: class instances not creatable by MAXScript

Properties:

<adsk_scale_meters_to_internal_inverse>.meterValue : float

<adsk_scale_meters_to_internal_inverse>.meterValue_connected : boolean

<adsk_scale_meters_to_internal_inverse>.meterValue_shader : texturemap

<adsk_scale_meters_to_internal_inverse>.meterValue_paramName : string

<adsk_scale_meters_to_internal_inverse>.TheList : maxObject array

<adsk_scale_meters_to_internal_inverse>.Shader_Version : integer

adsk_scale_meters_to_internal_inverse interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_Shd_Ceramic : textureMap

adsk_Shd_Ceramic : textureMap {7773161f,64095d13}

Constructor:

adsk_Shd_Ceramic: class instances not creatable by MAXScript

Properties:

<adsk_Shd_Ceramic>.lightmap : filename

<adsk_Shd_Ceramic>.depthmap : filename

<adsk_Shd_Ceramic>.m : paramBlock2

<adsk_Shd_Ceramic>.s : paramBlock2

<adsk_Shd_Ceramic>.l : paramBlock2

<adsk_Shd_Ceramic>.o : paramBlock2

<adsk_Shd_Ceramic>.r : paramBlock2

<adsk_Shd_Ceramic>.p : paramBlock2

<adsk_Shd_Ceramic>.k : paramBlock2

<adsk_Shd_Ceramic>.mode : integer

<adsk_Shd_Ceramic>.lights : node array

<adsk_Shd_Ceramic>.Use_lights : boolean

<adsk_Shd_Ceramic>.ImplicitLights : node array

<adsk_Shd_Ceramic>.diffuse_color : fRGBA color

<adsk_Shd_Ceramic>.diffuse_roughness : float

<adsk_Shd_Ceramic>.reflectivity : float

<adsk_Shd_Ceramic>.refl_gloss : float

<adsk_Shd_Ceramic>.brdf_curve : float

<adsk_Shd_Ceramic>.bump_enable : integer

<adsk_Shd_Ceramic>.bump_amount : float

<adsk_Shd_Ceramic>.bump_map : texturemap

<adsk_Shd_Ceramic>.pattern_enable : integer

<adsk_Shd_Ceramic>.pattern_amount : float

<adsk_Shd_Ceramic>.pattern_map : texturemap

<adsk_Shd_Ceramic>.mia_sss_switcher : integer

<adsk_Shd_Ceramic>.disable_misss : boolean

<adsk_Shd_Ceramic>.front_sss_color : fRGBA color

<adsk_Shd_Ceramic>.front_sss_weight : float

<adsk_Shd_Ceramic>.front_sss_radius : float

<adsk_Shd_Ceramic>.mid_sss_color : fRGBA color

<adsk_Shd_Ceramic>.mid_sss_weight : float

<adsk_Shd_Ceramic>.mid_sss_radius : float

<adsk_Shd_Ceramic>.back_sss_color : fRGBA color

<adsk_Shd_Ceramic>.back_sss_weight : float

<adsk_Shd_Ceramic>.back_sss_radius : float

<adsk_Shd_Ceramic>.back_sss_depth : float

<adsk_Shd_Ceramic>.screen_composit : boolean

<adsk_Shd_Ceramic>.scale_conversion : float

<adsk_Shd_Ceramic>.falloff : float

<adsk_Shd_Ceramic>.ao_on : boolean

<adsk_Shd_Ceramic>.ao_samples : integer

<adsk_Shd_Ceramic>.ao_distance : float

<adsk_Shd_Ceramic>.ao_do_details : integer

<adsk_Shd_Ceramic>.roundcorners_radius : float

<adsk_Shd_Ceramic>.roundcorners_allow_different_materials : boolean

<adsk_Shd_Ceramic>.reflection_glossy_samples : integer

<adsk_Shd_Ceramic>.refl_depth : integer

<adsk_Shd_Ceramic>.sss_samples : integer

<adsk_Shd_Ceramic>.noise_tiling : point3

<adsk_Shd_Ceramic>.Structure : paramBlock2

<adsk_Shd_Ceramic>.result : fRGBA color

<adsk_Shd_Ceramic>.diffuse_result : fRGBA color

<adsk_Shd_Ceramic>.diffuse_raw : fRGBA color

<adsk_Shd_Ceramic>.diffuse_level : fRGBA color

<adsk_Shd_Ceramic>.spec_result : fRGBA color

<adsk_Shd_Ceramic>.spec_raw : fRGBA color

<adsk_Shd_Ceramic>.spec_level : fRGBA color

<adsk_Shd_Ceramic>.refl_result : fRGBA color

<adsk_Shd_Ceramic>.refl_raw : fRGBA color

<adsk_Shd_Ceramic>.refl_level : fRGBA color

<adsk_Shd_Ceramic>.refr_result : fRGBA color

<adsk_Shd_Ceramic>.refr_raw : fRGBA color

<adsk_Shd_Ceramic>.refr_level : fRGBA color

<adsk_Shd_Ceramic>.tran_result : fRGBA color

<adsk_Shd_Ceramic>.tran_raw : fRGBA color

<adsk_Shd_Ceramic>.tran_level : fRGBA color

<adsk_Shd_Ceramic>.indirect_result : fRGBA color

<adsk_Shd_Ceramic>.indirect_raw : fRGBA color

<adsk_Shd_Ceramic>.indirect_post_ao : fRGBA color

<adsk_Shd_Ceramic>.ao_raw : fRGBA color

<adsk_Shd_Ceramic>.add_result : fRGBA color

<adsk_Shd_Ceramic>.opacity_result : fRGBA color

<adsk_Shd_Ceramic>.opacity_raw : fRGBA color

<adsk_Shd_Ceramic>.opacity : float

<adsk_Shd_Ceramic>.Connection_struct__0000__m : paramBlock2

<adsk_Shd_Ceramic>.Connection_struct__0001__s : paramBlock2

<adsk_Shd_Ceramic>.Connection_struct__0002__l : paramBlock2

<adsk_Shd_Ceramic>.Connection_struct__0003__o : paramBlock2

<adsk_Shd_Ceramic>.Connection_struct__0004__r : paramBlock2

<adsk_Shd_Ceramic>.Connection_struct__0005__p : paramBlock2

<adsk_Shd_Ceramic>.Connection_struct__0006__k : paramBlock2

<adsk_Shd_Ceramic>.diffuse_color_connected : boolean

<adsk_Shd_Ceramic>.diffuse_color_shader : texturemap

<adsk_Shd_Ceramic>.diffuse_color_paramName : string

<adsk_Shd_Ceramic>.diffuse_roughness_connected : boolean

<adsk_Shd_Ceramic>.diffuse_roughness_shader : texturemap

<adsk_Shd_Ceramic>.diffuse_roughness_paramName : string

<adsk_Shd_Ceramic>.reflectivity_connected : boolean

<adsk_Shd_Ceramic>.reflectivity_shader : texturemap

<adsk_Shd_Ceramic>.reflectivity_paramName : string

<adsk_Shd_Ceramic>.refl_gloss_connected : boolean

<adsk_Shd_Ceramic>.refl_gloss_shader : texturemap

<adsk_Shd_Ceramic>.refl_gloss_paramName : string

<adsk_Shd_Ceramic>.brdf_curve_connected : boolean

<adsk_Shd_Ceramic>.brdf_curve_shader : texturemap

<adsk_Shd_Ceramic>.brdf_curve_paramName : string

<adsk_Shd_Ceramic>.bump_enable_connected : boolean

<adsk_Shd_Ceramic>.bump_enable_shader : texturemap

<adsk_Shd_Ceramic>.bump_enable_paramName : string

<adsk_Shd_Ceramic>.bump_amount_connected : boolean

<adsk_Shd_Ceramic>.bump_amount_shader : texturemap

<adsk_Shd_Ceramic>.bump_amount_paramName : string

<adsk_Shd_Ceramic>.pattern_enable_connected : boolean

<adsk_Shd_Ceramic>.pattern_enable_shader : texturemap

<adsk_Shd_Ceramic>.pattern_enable_paramName : string

<adsk_Shd_Ceramic>.pattern_amount_connected : boolean

<adsk_Shd_Ceramic>.pattern_amount_shader : texturemap

<adsk_Shd_Ceramic>.pattern_amount_paramName : string

<adsk_Shd_Ceramic>.mia_sss_switcher_connected : boolean

<adsk_Shd_Ceramic>.mia_sss_switcher_shader : texturemap

<adsk_Shd_Ceramic>.mia_sss_switcher_paramName : string

<adsk_Shd_Ceramic>.disable_misss_connected : boolean

<adsk_Shd_Ceramic>.disable_misss_shader : texturemap

<adsk_Shd_Ceramic>.disable_misss_paramName : string

<adsk_Shd_Ceramic>.front_sss_color_connected : boolean

<adsk_Shd_Ceramic>.front_sss_color_shader : texturemap

<adsk_Shd_Ceramic>.front_sss_color_paramName : string

<adsk_Shd_Ceramic>.front_sss_weight_connected : boolean

<adsk_Shd_Ceramic>.front_sss_weight_shader : texturemap

<adsk_Shd_Ceramic>.front_sss_weight_paramName : string

<adsk_Shd_Ceramic>.front_sss_radius_connected : boolean

<adsk_Shd_Ceramic>.front_sss_radius_shader : texturemap

<adsk_Shd_Ceramic>.front_sss_radius_paramName : string

<adsk_Shd_Ceramic>.mid_sss_color_connected : boolean

<adsk_Shd_Ceramic>.mid_sss_color_shader : texturemap

<adsk_Shd_Ceramic>.mid_sss_color_paramName : string

<adsk_Shd_Ceramic>.mid_sss_weight_connected : boolean

<adsk_Shd_Ceramic>.mid_sss_weight_shader : texturemap

<adsk_Shd_Ceramic>.mid_sss_weight_paramName : string

<adsk_Shd_Ceramic>.mid_sss_radius_connected : boolean

<adsk_Shd_Ceramic>.mid_sss_radius_shader : texturemap

<adsk_Shd_Ceramic>.mid_sss_radius_paramName : string

<adsk_Shd_Ceramic>.back_sss_color_connected : boolean

<adsk_Shd_Ceramic>.back_sss_color_shader : texturemap

<adsk_Shd_Ceramic>.back_sss_color_paramName : string

<adsk_Shd_Ceramic>.back_sss_weight_connected : boolean

<adsk_Shd_Ceramic>.back_sss_weight_shader : texturemap

<adsk_Shd_Ceramic>.back_sss_weight_paramName : string

<adsk_Shd_Ceramic>.back_sss_radius_connected : boolean

<adsk_Shd_Ceramic>.back_sss_radius_shader : texturemap

<adsk_Shd_Ceramic>.back_sss_radius_paramName : string

<adsk_Shd_Ceramic>.back_sss_depth_connected : boolean

<adsk_Shd_Ceramic>.back_sss_depth_shader : texturemap

<adsk_Shd_Ceramic>.back_sss_depth_paramName : string

<adsk_Shd_Ceramic>.screen_composit_connected : boolean

<adsk_Shd_Ceramic>.screen_composit_shader : texturemap

<adsk_Shd_Ceramic>.screen_composit_paramName : string

<adsk_Shd_Ceramic>.scale_conversion_connected : boolean

<adsk_Shd_Ceramic>.scale_conversion_shader : texturemap

<adsk_Shd_Ceramic>.scale_conversion_paramName : string

<adsk_Shd_Ceramic>.falloff_connected : boolean

<adsk_Shd_Ceramic>.falloff_shader : texturemap

<adsk_Shd_Ceramic>.falloff_paramName : string

<adsk_Shd_Ceramic>.ao_on_connected : boolean

<adsk_Shd_Ceramic>.ao_on_shader : texturemap

<adsk_Shd_Ceramic>.ao_on_paramName : string

<adsk_Shd_Ceramic>.ao_samples_connected : boolean

<adsk_Shd_Ceramic>.ao_samples_shader : texturemap

<adsk_Shd_Ceramic>.ao_samples_paramName : string

<adsk_Shd_Ceramic>.ao_distance_connected : boolean

<adsk_Shd_Ceramic>.ao_distance_shader : texturemap

<adsk_Shd_Ceramic>.ao_distance_paramName : string

<adsk_Shd_Ceramic>.ao_do_details_connected : boolean

<adsk_Shd_Ceramic>.ao_do_details_shader : texturemap

<adsk_Shd_Ceramic>.ao_do_details_paramName : string

<adsk_Shd_Ceramic>.roundcorners_radius_connected : boolean

<adsk_Shd_Ceramic>.roundcorners_radius_shader : texturemap

<adsk_Shd_Ceramic>.roundcorners_radius_paramName : string

<adsk_Shd_Ceramic>.roundcorners_allow_different_materials_connected : boolean

<adsk_Shd_Ceramic>.roundcorners_allow_different_materials_shader : texturemap

<adsk_Shd_Ceramic>.roundcorners_allow_different_materials_paramName : string

<adsk_Shd_Ceramic>.reflection_glossy_samples_connected : boolean

<adsk_Shd_Ceramic>.reflection_glossy_samples_shader : texturemap

<adsk_Shd_Ceramic>.reflection_glossy_samples_paramName : string

<adsk_Shd_Ceramic>.refl_depth_connected : boolean

<adsk_Shd_Ceramic>.refl_depth_shader : texturemap

<adsk_Shd_Ceramic>.refl_depth_paramName : string

<adsk_Shd_Ceramic>.sss_samples_connected : boolean

<adsk_Shd_Ceramic>.sss_samples_shader : texturemap

<adsk_Shd_Ceramic>.sss_samples_paramName : string

<adsk_Shd_Ceramic>.noise_tiling_connected : boolean

<adsk_Shd_Ceramic>.noise_tiling_shader : texturemap

<adsk_Shd_Ceramic>.noise_tiling_paramName : string

<adsk_Shd_Ceramic>.TheList : maxObject array

<adsk_Shd_Ceramic>.Shader_Version : integer

adsk_Shd_Ceramic interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_Shd_Ceramic_spider : textureMap

adsk_Shd_Ceramic_spider : textureMap {7773161f,bd07534e}

Constructor:

adsk_Shd_Ceramic_spider: class instances not creatable by MAXScript

Properties:

<adsk_Shd_Ceramic_spider>.type : integer

<adsk_Shd_Ceramic_spider>.application : integer

<adsk_Shd_Ceramic_spider>.roundcorners_on : boolean

<adsk_Shd_Ceramic_spider>.roundcorners_radius : float

<adsk_Shd_Ceramic_spider>.ao_do_details : boolean

<adsk_Shd_Ceramic_spider>.front_sss_radius : float

<adsk_Shd_Ceramic_spider>.sss_overall_color : fRGBA color

<adsk_Shd_Ceramic_spider>.Structure : paramBlock2

<adsk_Shd_Ceramic_spider>.diffuse_roughness : float

<adsk_Shd_Ceramic_spider>.reflectivity : float

<adsk_Shd_Ceramic_spider>.refl_gloss : float

<adsk_Shd_Ceramic_spider>.brdf_curve : float

<adsk_Shd_Ceramic_spider>.noise_tiling : point3

<adsk_Shd_Ceramic_spider>.roundcorners_radius : float

<adsk_Shd_Ceramic_spider>.ao_do_details : integer

<adsk_Shd_Ceramic_spider>.front_sss_radius : float

<adsk_Shd_Ceramic_spider>.mid_sss_radius : float

<adsk_Shd_Ceramic_spider>.back_sss_radius : float

<adsk_Shd_Ceramic_spider>.back_sss_depth : float

<adsk_Shd_Ceramic_spider>.screen_composit : boolean

<adsk_Shd_Ceramic_spider>.mia_sss_switcher : integer

<adsk_Shd_Ceramic_spider>.disable_misss : boolean

<adsk_Shd_Ceramic_spider>.mid_sss_color : fRGBA color

<adsk_Shd_Ceramic_spider>.back_sss_color : fRGBA color

<adsk_Shd_Ceramic_spider>.type_connected : boolean

<adsk_Shd_Ceramic_spider>.type_shader : texturemap

<adsk_Shd_Ceramic_spider>.type_paramName : string

<adsk_Shd_Ceramic_spider>.application_connected : boolean

<adsk_Shd_Ceramic_spider>.application_shader : texturemap

<adsk_Shd_Ceramic_spider>.application_paramName : string

<adsk_Shd_Ceramic_spider>.roundcorners_on_connected : boolean

<adsk_Shd_Ceramic_spider>.roundcorners_on_shader : texturemap

<adsk_Shd_Ceramic_spider>.roundcorners_on_paramName : string

<adsk_Shd_Ceramic_spider>.roundcorners_radius_connected : boolean

<adsk_Shd_Ceramic_spider>.roundcorners_radius_shader : texturemap

<adsk_Shd_Ceramic_spider>.roundcorners_radius_paramName : string

<adsk_Shd_Ceramic_spider>.ao_do_details_connected : boolean

<adsk_Shd_Ceramic_spider>.ao_do_details_shader : texturemap

<adsk_Shd_Ceramic_spider>.ao_do_details_paramName : string

<adsk_Shd_Ceramic_spider>.front_sss_radius_connected : boolean

<adsk_Shd_Ceramic_spider>.front_sss_radius_shader : texturemap

<adsk_Shd_Ceramic_spider>.front_sss_radius_paramName : string

<adsk_Shd_Ceramic_spider>.sss_overall_color_connected : boolean

<adsk_Shd_Ceramic_spider>.sss_overall_color_shader : texturemap

<adsk_Shd_Ceramic_spider>.sss_overall_color_paramName : string

<adsk_Shd_Ceramic_spider>.TheList : maxObject array

<adsk_Shd_Ceramic_spider>.Shader_Version : integer

adsk_Shd_Ceramic_spider interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_Shd_Concrete : textureMap

adsk_Shd_Concrete : textureMap {7773161f,5b034a7a}

Constructor:

adsk_Shd_Concrete: class instances not creatable by MAXScript

Properties:

<adsk_Shd_Concrete>.m : paramBlock2

<adsk_Shd_Concrete>.o : paramBlock2

<adsk_Shd_Concrete>.r : paramBlock2

<adsk_Shd_Concrete>.p : paramBlock2

<adsk_Shd_Concrete>.t : paramBlock2

<adsk_Shd_Concrete>.k : paramBlock2

<adsk_Shd_Concrete>.u : paramBlock2

<adsk_Shd_Concrete>.mode : integer

<adsk_Shd_Concrete>.lights : node array

<adsk_Shd_Concrete>.Use_lights : boolean

<adsk_Shd_Concrete>.ImplicitLights : node array

<adsk_Shd_Concrete>.diffuse_color : fRGBA color

<adsk_Shd_Concrete>.brightvar_enable : float

<adsk_Shd_Concrete>.brightmode_switcher : integer

<adsk_Shd_Concrete>.bright_custom : texturemap

<adsk_Shd_Concrete>.diffuse_roughness : float

<adsk_Shd_Concrete>.reflectivity_noiseCol1 : fRGBA color

<adsk_Shd_Concrete>.reflectivity_noiseCol2 : fRGBA color

<adsk_Shd_Concrete>.reflectivity_noiseSize : float

<adsk_Shd_Concrete>.refl_hl_only : boolean

<adsk_Shd_Concrete>.refl_gloss_noiseCol1 : fRGBA color

<adsk_Shd_Concrete>.refl_gloss_noiseCol2 : fRGBA color

<adsk_Shd_Concrete>.refl_gloss_noiseSize : float

<adsk_Shd_Concrete>.brdf_0_degree_refl : float

<adsk_Shd_Concrete>.brdf_90_degree_refl : float

<adsk_Shd_Concrete>.brdf_curve : float

<adsk_Shd_Concrete>.bump_amount : float

<adsk_Shd_Concrete>.bump_switcher : integer

<adsk_Shd_Concrete>.bump_map : texturemap

<adsk_Shd_Concrete>.ao_on : boolean

<adsk_Shd_Concrete>.ao_samples : integer

<adsk_Shd_Concrete>.ao_distance : float

<adsk_Shd_Concrete>.ao_do_details : integer

<adsk_Shd_Concrete>.roundcorners_radius : float

<adsk_Shd_Concrete>.roundcorners_allow_different_materials : boolean

<adsk_Shd_Concrete>.reflection_glossy_samples : integer

<adsk_Shd_Concrete>.refl_depth : integer

<adsk_Shd_Concrete>.broomstraight_tex : filename

<adsk_Shd_Concrete>.Image_Frame_Number : integer

<adsk_Shd_Concrete>.broomcurved_tex : filename

<adsk_Shd_Concrete>.Image_Frame_Number : integer

<adsk_Shd_Concrete>.brightauto_tiling : point3

<adsk_Shd_Concrete>.noisereflect_tiling : point3

<adsk_Shd_Concrete>.noiseglossy_tiling : point3

<adsk_Shd_Concrete>.concretesmooth_tiling : point3

<adsk_Shd_Concrete>.polished_tex_tiling : point3

<adsk_Shd_Concrete>.oceanbump_largest : float

<adsk_Shd_Concrete>.oceanbump_smallest : float

<adsk_Shd_Concrete>.oceanbump_size : float

<adsk_Shd_Concrete>.uv_channel : integer

<adsk_Shd_Concrete>.u_scale : float

<adsk_Shd_Concrete>.v_scale : float

<adsk_Shd_Concrete>.Structure : paramBlock2

<adsk_Shd_Concrete>.result : fRGBA color

<adsk_Shd_Concrete>.diffuse_result : fRGBA color

<adsk_Shd_Concrete>.diffuse_raw : fRGBA color

<adsk_Shd_Concrete>.diffuse_level : fRGBA color

<adsk_Shd_Concrete>.spec_result : fRGBA color

<adsk_Shd_Concrete>.spec_raw : fRGBA color

<adsk_Shd_Concrete>.spec_level : fRGBA color

<adsk_Shd_Concrete>.refl_result : fRGBA color

<adsk_Shd_Concrete>.refl_raw : fRGBA color

<adsk_Shd_Concrete>.refl_level : fRGBA color

<adsk_Shd_Concrete>.refr_result : fRGBA color

<adsk_Shd_Concrete>.refr_raw : fRGBA color

<adsk_Shd_Concrete>.refr_level : fRGBA color

<adsk_Shd_Concrete>.tran_result : fRGBA color

<adsk_Shd_Concrete>.tran_raw : fRGBA color

<adsk_Shd_Concrete>.tran_level : fRGBA color

<adsk_Shd_Concrete>.indirect_result : fRGBA color

<adsk_Shd_Concrete>.indirect_raw : fRGBA color

<adsk_Shd_Concrete>.indirect_post_ao : fRGBA color

<adsk_Shd_Concrete>.ao_raw : fRGBA color

<adsk_Shd_Concrete>.add_result : fRGBA color

<adsk_Shd_Concrete>.opacity_result : fRGBA color

<adsk_Shd_Concrete>.opacity_raw : fRGBA color

<adsk_Shd_Concrete>.opacity : float

<adsk_Shd_Concrete>.Connection_struct__0000__m : paramBlock2

<adsk_Shd_Concrete>.Connection_struct__0001__o : paramBlock2

<adsk_Shd_Concrete>.Connection_struct__0002__r : paramBlock2

<adsk_Shd_Concrete>.Connection_struct__0003__p : paramBlock2

<adsk_Shd_Concrete>.Connection_struct__0004__t : paramBlock2

<adsk_Shd_Concrete>.Connection_struct__0005__k : paramBlock2

<adsk_Shd_Concrete>.Connection_struct__0006__u : paramBlock2

<adsk_Shd_Concrete>.mode_connected : boolean

<adsk_Shd_Concrete>.mode_shader : texturemap

<adsk_Shd_Concrete>.mode_paramName : string

<adsk_Shd_Concrete>.diffuse_color_connected : boolean

<adsk_Shd_Concrete>.diffuse_color_shader : texturemap

<adsk_Shd_Concrete>.diffuse_color_paramName : string

<adsk_Shd_Concrete>.brightvar_enable_connected : boolean

<adsk_Shd_Concrete>.brightvar_enable_shader : texturemap

<adsk_Shd_Concrete>.brightvar_enable_paramName : string

<adsk_Shd_Concrete>.brightmode_switcher_connected : boolean

<adsk_Shd_Concrete>.brightmode_switcher_shader : texturemap

<adsk_Shd_Concrete>.brightmode_switcher_paramName : string

<adsk_Shd_Concrete>.diffuse_roughness_connected : boolean

<adsk_Shd_Concrete>.diffuse_roughness_shader : texturemap

<adsk_Shd_Concrete>.diffuse_roughness_paramName : string

<adsk_Shd_Concrete>.reflectivity_noiseCol1_connected : boolean

<adsk_Shd_Concrete>.reflectivity_noiseCol1_shader : texturemap

<adsk_Shd_Concrete>.reflectivity_noiseCol1_paramName : string

<adsk_Shd_Concrete>.reflectivity_noiseCol2_connected : boolean

<adsk_Shd_Concrete>.reflectivity_noiseCol2_shader : texturemap

<adsk_Shd_Concrete>.reflectivity_noiseCol2_paramName : string

<adsk_Shd_Concrete>.reflectivity_noiseSize_connected : boolean

<adsk_Shd_Concrete>.reflectivity_noiseSize_shader : texturemap

<adsk_Shd_Concrete>.reflectivity_noiseSize_paramName : string

<adsk_Shd_Concrete>.refl_hl_only_connected : boolean

<adsk_Shd_Concrete>.refl_hl_only_shader : texturemap

<adsk_Shd_Concrete>.refl_hl_only_paramName : string

<adsk_Shd_Concrete>.refl_gloss_noiseCol1_connected : boolean

<adsk_Shd_Concrete>.refl_gloss_noiseCol1_shader : texturemap

<adsk_Shd_Concrete>.refl_gloss_noiseCol1_paramName : string

<adsk_Shd_Concrete>.refl_gloss_noiseCol2_connected : boolean

<adsk_Shd_Concrete>.refl_gloss_noiseCol2_shader : texturemap

<adsk_Shd_Concrete>.refl_gloss_noiseCol2_paramName : string

<adsk_Shd_Concrete>.refl_gloss_noiseSize_connected : boolean

<adsk_Shd_Concrete>.refl_gloss_noiseSize_shader : texturemap

<adsk_Shd_Concrete>.refl_gloss_noiseSize_paramName : string

<adsk_Shd_Concrete>.brdf_0_degree_refl_connected : boolean

<adsk_Shd_Concrete>.brdf_0_degree_refl_shader : texturemap

<adsk_Shd_Concrete>.brdf_0_degree_refl_paramName : string

<adsk_Shd_Concrete>.brdf_90_degree_refl_connected : boolean

<adsk_Shd_Concrete>.brdf_90_degree_refl_shader : texturemap

<adsk_Shd_Concrete>.brdf_90_degree_refl_paramName : string

<adsk_Shd_Concrete>.brdf_curve_connected : boolean

<adsk_Shd_Concrete>.brdf_curve_shader : texturemap

<adsk_Shd_Concrete>.brdf_curve_paramName : string

<adsk_Shd_Concrete>.bump_amount_connected : boolean

<adsk_Shd_Concrete>.bump_amount_shader : texturemap

<adsk_Shd_Concrete>.bump_amount_paramName : string

<adsk_Shd_Concrete>.bump_switcher_connected : boolean

<adsk_Shd_Concrete>.bump_switcher_shader : texturemap

<adsk_Shd_Concrete>.bump_switcher_paramName : string

<adsk_Shd_Concrete>.ao_on_connected : boolean

<adsk_Shd_Concrete>.ao_on_shader : texturemap

<adsk_Shd_Concrete>.ao_on_paramName : string

<adsk_Shd_Concrete>.ao_samples_connected : boolean

<adsk_Shd_Concrete>.ao_samples_shader : texturemap

<adsk_Shd_Concrete>.ao_samples_paramName : string

<adsk_Shd_Concrete>.ao_distance_connected : boolean

<adsk_Shd_Concrete>.ao_distance_shader : texturemap

<adsk_Shd_Concrete>.ao_distance_paramName : string

<adsk_Shd_Concrete>.ao_do_details_connected : boolean

<adsk_Shd_Concrete>.ao_do_details_shader : texturemap

<adsk_Shd_Concrete>.ao_do_details_paramName : string

<adsk_Shd_Concrete>.roundcorners_radius_connected : boolean

<adsk_Shd_Concrete>.roundcorners_radius_shader : texturemap

<adsk_Shd_Concrete>.roundcorners_radius_paramName : string

<adsk_Shd_Concrete>.roundcorners_allow_different_materials_connected : boolean

<adsk_Shd_Concrete>.roundcorners_allow_different_materials_shader : texturemap

<adsk_Shd_Concrete>.roundcorners_allow_different_materials_paramName : string

<adsk_Shd_Concrete>.reflection_glossy_samples_connected : boolean

<adsk_Shd_Concrete>.reflection_glossy_samples_shader : texturemap

<adsk_Shd_Concrete>.reflection_glossy_samples_paramName : string

<adsk_Shd_Concrete>.refl_depth_connected : boolean

<adsk_Shd_Concrete>.refl_depth_shader : texturemap

<adsk_Shd_Concrete>.refl_depth_paramName : string

<adsk_Shd_Concrete>.broomstraight_tex_connected : boolean

<adsk_Shd_Concrete>.broomstraight_tex_shader : texturemap

<adsk_Shd_Concrete>.broomstraight_tex_paramName : string

<adsk_Shd_Concrete>.broomcurved_tex_connected : boolean

<adsk_Shd_Concrete>.broomcurved_tex_shader : texturemap

<adsk_Shd_Concrete>.broomcurved_tex_paramName : string

<adsk_Shd_Concrete>.brightauto_tiling_connected : boolean

<adsk_Shd_Concrete>.brightauto_tiling_shader : texturemap

<adsk_Shd_Concrete>.brightauto_tiling_paramName : string

<adsk_Shd_Concrete>.noisereflect_tiling_connected : boolean

<adsk_Shd_Concrete>.noisereflect_tiling_shader : texturemap

<adsk_Shd_Concrete>.noisereflect_tiling_paramName : string

<adsk_Shd_Concrete>.noiseglossy_tiling_connected : boolean

<adsk_Shd_Concrete>.noiseglossy_tiling_shader : texturemap

<adsk_Shd_Concrete>.noiseglossy_tiling_paramName : string

<adsk_Shd_Concrete>.concretesmooth_tiling_connected : boolean

<adsk_Shd_Concrete>.concretesmooth_tiling_shader : texturemap

<adsk_Shd_Concrete>.concretesmooth_tiling_paramName : string

<adsk_Shd_Concrete>.polished_tex_tiling_connected : boolean

<adsk_Shd_Concrete>.polished_tex_tiling_shader : texturemap

<adsk_Shd_Concrete>.polished_tex_tiling_paramName : string

<adsk_Shd_Concrete>.oceanbump_largest_connected : boolean

<adsk_Shd_Concrete>.oceanbump_largest_shader : texturemap

<adsk_Shd_Concrete>.oceanbump_largest_paramName : string

<adsk_Shd_Concrete>.oceanbump_smallest_connected : boolean

<adsk_Shd_Concrete>.oceanbump_smallest_shader : texturemap

<adsk_Shd_Concrete>.oceanbump_smallest_paramName : string

<adsk_Shd_Concrete>.oceanbump_size_connected : boolean

<adsk_Shd_Concrete>.oceanbump_size_shader : texturemap

<adsk_Shd_Concrete>.oceanbump_size_paramName : string

<adsk_Shd_Concrete>.uv_channel_connected : boolean

<adsk_Shd_Concrete>.uv_channel_shader : texturemap

<adsk_Shd_Concrete>.uv_channel_paramName : string

<adsk_Shd_Concrete>.u_scale_connected : boolean

<adsk_Shd_Concrete>.u_scale_shader : texturemap

<adsk_Shd_Concrete>.u_scale_paramName : string

<adsk_Shd_Concrete>.v_scale_connected : boolean

<adsk_Shd_Concrete>.v_scale_shader : texturemap

<adsk_Shd_Concrete>.v_scale_paramName : string

<adsk_Shd_Concrete>.TheList : maxObject array

<adsk_Shd_Concrete>.Shader_Version : integer

adsk_Shd_Concrete interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_Shd_Concrete_spider : textureMap

adsk_Shd_Concrete_spider : textureMap {7773161f,5cf98121}

Constructor:

adsk_Shd_Concrete_spider: class instances not creatable by MAXScript

Properties:

<adsk_Shd_Concrete_spider>.surfacefinish : integer

<adsk_Shd_Concrete_spider>.sealant : integer

<adsk_Shd_Concrete_spider>.brightness_variation : integer

<adsk_Shd_Concrete_spider>.roundcorners_on : boolean

<adsk_Shd_Concrete_spider>.roundcorners_radius : float

<adsk_Shd_Concrete_spider>.ao_do_details : boolean

<adsk_Shd_Concrete_spider>.bump_amount : float

<adsk_Shd_Concrete_spider>.Structure : paramBlock2

<adsk_Shd_Concrete_spider>.brightvar_enable : float

<adsk_Shd_Concrete_spider>.brightmode_switcher : integer

<adsk_Shd_Concrete_spider>.diffuse_roughness : float

<adsk_Shd_Concrete_spider>.reflectivity_noiseCol1 : fRGBA color

<adsk_Shd_Concrete_spider>.reflectivity_noiseCol2 : fRGBA color

<adsk_Shd_Concrete_spider>.reflectivity_noiseSize : float

<adsk_Shd_Concrete_spider>.refl_hl_only : boolean

<adsk_Shd_Concrete_spider>.refl_gloss_noiseCol1 : fRGBA color

<adsk_Shd_Concrete_spider>.refl_gloss_noiseCol2 : fRGBA color

<adsk_Shd_Concrete_spider>.refl_gloss_noiseSize : float

<adsk_Shd_Concrete_spider>.brdf_0_degree_refl : float

<adsk_Shd_Concrete_spider>.brdf_90_degree_refl : float

<adsk_Shd_Concrete_spider>.brdf_curve : float

<adsk_Shd_Concrete_spider>.bump_amount : float

<adsk_Shd_Concrete_spider>.bump_switcher : integer

<adsk_Shd_Concrete_spider>.roundcorners_radius : float

<adsk_Shd_Concrete_spider>.ao_do_details : integer

<adsk_Shd_Concrete_spider>.brightauto_tiling : point3

<adsk_Shd_Concrete_spider>.noisereflect_tiling : point3

<adsk_Shd_Concrete_spider>.noiseglossy_tiling : point3

<adsk_Shd_Concrete_spider>.concretesmooth_tiling : point3

<adsk_Shd_Concrete_spider>.polished_tex_tiling : point3

<adsk_Shd_Concrete_spider>.oceanbump_largest : float

<adsk_Shd_Concrete_spider>.oceanbump_smallest : float

<adsk_Shd_Concrete_spider>.oceanbump_size : float

<adsk_Shd_Concrete_spider>.surfacefinish_connected : boolean

<adsk_Shd_Concrete_spider>.surfacefinish_shader : texturemap

<adsk_Shd_Concrete_spider>.surfacefinish_paramName : string

<adsk_Shd_Concrete_spider>.sealant_connected : boolean

<adsk_Shd_Concrete_spider>.sealant_shader : texturemap

<adsk_Shd_Concrete_spider>.sealant_paramName : string

<adsk_Shd_Concrete_spider>.brightness_variation_connected : boolean

<adsk_Shd_Concrete_spider>.brightness_variation_shader : texturemap

<adsk_Shd_Concrete_spider>.brightness_variation_paramName : string

<adsk_Shd_Concrete_spider>.roundcorners_on_connected : boolean

<adsk_Shd_Concrete_spider>.roundcorners_on_shader : texturemap

<adsk_Shd_Concrete_spider>.roundcorners_on_paramName : string

<adsk_Shd_Concrete_spider>.roundcorners_radius_connected : boolean

<adsk_Shd_Concrete_spider>.roundcorners_radius_shader : texturemap

<adsk_Shd_Concrete_spider>.roundcorners_radius_paramName : string

<adsk_Shd_Concrete_spider>.ao_do_details_connected : boolean

<adsk_Shd_Concrete_spider>.ao_do_details_shader : texturemap

<adsk_Shd_Concrete_spider>.ao_do_details_paramName : string

<adsk_Shd_Concrete_spider>.bump_amount_connected : boolean

<adsk_Shd_Concrete_spider>.bump_amount_shader : texturemap

<adsk_Shd_Concrete_spider>.bump_amount_paramName : string

<adsk_Shd_Concrete_spider>.TheList : maxObject array

<adsk_Shd_Concrete_spider>.Shader_Version : integer

adsk_Shd_Concrete_spider interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_Shd_Fabric_spider : textureMap

adsk_Shd_Fabric_spider : textureMap {7773161f,9c625e18}

Constructor:

adsk_Shd_Fabric_spider: class instances not creatable by MAXScript

Properties:

<adsk_Shd_Fabric_spider>.type : integer

<adsk_Shd_Fabric_spider>.application : integer

<adsk_Shd_Fabric_spider>.ao_distance : float

<adsk_Shd_Fabric_spider>.roundcorners_radius : float

<adsk_Shd_Fabric_spider>.Structure : paramBlock2

<adsk_Shd_Fabric_spider>.diffuse_roughness : float

<adsk_Shd_Fabric_spider>.refl_gloss : float

<adsk_Shd_Fabric_spider>.brdf_0_degree_refl : float

<adsk_Shd_Fabric_spider>.brdf_90_degree_refl : float

<adsk_Shd_Fabric_spider>.transparency : float

<adsk_Shd_Fabric_spider>.refr_trans_weight : float

<adsk_Shd_Fabric_spider>.ao_distance : float

<adsk_Shd_Fabric_spider>.roundcorners_radius : float

<adsk_Shd_Fabric_spider>.type_connected : boolean

<adsk_Shd_Fabric_spider>.type_shader : texturemap

<adsk_Shd_Fabric_spider>.type_paramName : string

<adsk_Shd_Fabric_spider>.application_connected : boolean

<adsk_Shd_Fabric_spider>.application_shader : texturemap

<adsk_Shd_Fabric_spider>.application_paramName : string

<adsk_Shd_Fabric_spider>.ao_distance_connected : boolean

<adsk_Shd_Fabric_spider>.ao_distance_shader : texturemap

<adsk_Shd_Fabric_spider>.ao_distance_paramName : string

<adsk_Shd_Fabric_spider>.roundcorners_radius_connected : boolean

<adsk_Shd_Fabric_spider>.roundcorners_radius_shader : texturemap

<adsk_Shd_Fabric_spider>.roundcorners_radius_paramName : string

<adsk_Shd_Fabric_spider>.TheList : maxObject array

<adsk_Shd_Fabric_spider>.Shader_Version : integer

adsk_Shd_Fabric_spider interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_Shd_Glazing : textureMap

adsk_Shd_Glazing : textureMap {7773161f,4f0b5d2e}

Constructor:

adsk_Shd_Glazing: class instances not creatable by MAXScript

Properties:

<adsk_Shd_Glazing>.m : paramBlock2

<adsk_Shd_Glazing>.p : paramBlock2

<adsk_Shd_Glazing>.mode : integer

<adsk_Shd_Glazing>.lights : node array

<adsk_Shd_Glazing>.Use_lights : boolean

<adsk_Shd_Glazing>.ImplicitLights : node array

<adsk_Shd_Glazing>.refl_color : fRGBA color

<adsk_Shd_Glazing>.brdf_0_degree_refl : float

<adsk_Shd_Glazing>.refr_color : fRGBA color

<adsk_Shd_Glazing>.refl_depth : integer

<adsk_Shd_Glazing>.refr_depth : integer

<adsk_Shd_Glazing>.Connection_struct__0000__m : paramBlock2

<adsk_Shd_Glazing>.Connection_struct__0001__p : paramBlock2

<adsk_Shd_Glazing>.refl_color_connected : boolean

<adsk_Shd_Glazing>.refl_color_shader : texturemap

<adsk_Shd_Glazing>.refl_color_paramName : string

<adsk_Shd_Glazing>.brdf_0_degree_refl_connected : boolean

<adsk_Shd_Glazing>.brdf_0_degree_refl_shader : texturemap

<adsk_Shd_Glazing>.brdf_0_degree_refl_paramName : string

<adsk_Shd_Glazing>.refr_color_connected : boolean

<adsk_Shd_Glazing>.refr_color_shader : texturemap

<adsk_Shd_Glazing>.refr_color_paramName : string

<adsk_Shd_Glazing>.refl_depth_connected : boolean

<adsk_Shd_Glazing>.refl_depth_shader : texturemap

<adsk_Shd_Glazing>.refl_depth_paramName : string

<adsk_Shd_Glazing>.refr_depth_connected : boolean

<adsk_Shd_Glazing>.refr_depth_shader : texturemap

<adsk_Shd_Glazing>.refr_depth_paramName : string

<adsk_Shd_Glazing>.TheList : maxObject array

<adsk_Shd_Glazing>.Shader_Version : integer

adsk_Shd_Glazing interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_Shd_Glazing_spider : textureMap

adsk_Shd_Glazing_spider : textureMap {7773161f,a60d5333}

Constructor:

adsk_Shd_Glazing_spider: class instances not creatable by MAXScript

Properties:

<adsk_Shd_Glazing_spider>.no_levels : integer

<adsk_Shd_Glazing_spider>.transmittance_color : integer

<adsk_Shd_Glazing_spider>.transmittance_map : fRGBA color

<adsk_Shd_Glazing_spider>.reflectance : float

<adsk_Shd_Glazing_spider>.Structure : paramBlock2

<adsk_Shd_Glazing_spider>.refl_color : fRGBA color

<adsk_Shd_Glazing_spider>.brdf_0_degree_refl : float

<adsk_Shd_Glazing_spider>.refr_color : fRGBA color

<adsk_Shd_Glazing_spider>.dummy : integer

<adsk_Shd_Glazing_spider>.no_levels_connected : boolean

<adsk_Shd_Glazing_spider>.no_levels_shader : texturemap

<adsk_Shd_Glazing_spider>.no_levels_paramName : string

<adsk_Shd_Glazing_spider>.transmittance_color_connected : boolean

<adsk_Shd_Glazing_spider>.transmittance_color_shader : texturemap

<adsk_Shd_Glazing_spider>.transmittance_color_paramName : string

<adsk_Shd_Glazing_spider>.transmittance_map_connected : boolean

<adsk_Shd_Glazing_spider>.transmittance_map_shader : texturemap

<adsk_Shd_Glazing_spider>.transmittance_map_paramName : string

<adsk_Shd_Glazing_spider>.reflectance_connected : boolean

<adsk_Shd_Glazing_spider>.reflectance_shader : texturemap

<adsk_Shd_Glazing_spider>.reflectance_paramName : string

<adsk_Shd_Glazing_spider>.TheList : maxObject array

<adsk_Shd_Glazing_spider>.Shader_Version : integer

adsk_Shd_Glazing_spider interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_Shd_Hardwood : textureMap

adsk_Shd_Hardwood : textureMap {7773161f,58074c74}

Constructor:

adsk_Shd_Hardwood: class instances not creatable by MAXScript

Properties:

<adsk_Shd_Hardwood>.m : paramBlock2

<adsk_Shd_Hardwood>.o : paramBlock2

<adsk_Shd_Hardwood>.r : paramBlock2

<adsk_Shd_Hardwood>.p : paramBlock2

<adsk_Shd_Hardwood>.k : paramBlock2

<adsk_Shd_Hardwood>.mode : integer

<adsk_Shd_Hardwood>.lights : node array

<adsk_Shd_Hardwood>.Use_lights : boolean

<adsk_Shd_Hardwood>.ImplicitLights : node array

<adsk_Shd_Hardwood>.diffuse_color : texturemap

<adsk_Shd_Hardwood>.tint_enable : float

<adsk_Shd_Hardwood>.tint_color : fRGBA color

<adsk_Shd_Hardwood>.application_type : float

<adsk_Shd_Hardwood>.diffuse_roughness : float

<adsk_Shd_Hardwood>.reflectivity : float

<adsk_Shd_Hardwood>.refl_hl_only : boolean

<adsk_Shd_Hardwood>.refl_gloss : float

<adsk_Shd_Hardwood>.brdf_0_degree_refl : float

<adsk_Shd_Hardwood>.brdf_90_degree_refl : float

<adsk_Shd_Hardwood>.brdf_curve : float

<adsk_Shd_Hardwood>.bump_amount : float

<adsk_Shd_Hardwood>.no_diffuse_bump : boolean

<adsk_Shd_Hardwood>.bump_enable : integer

<adsk_Shd_Hardwood>.bump_map : texturemap

<adsk_Shd_Hardwood>.ao_on : boolean

<adsk_Shd_Hardwood>.ao_samples : integer

<adsk_Shd_Hardwood>.ao_distance : float

<adsk_Shd_Hardwood>.ao_do_details : integer

<adsk_Shd_Hardwood>.roundcorners_radius : float

<adsk_Shd_Hardwood>.roundcorners_allow_different_materials : boolean

<adsk_Shd_Hardwood>.reflection_glossy_samples : integer

<adsk_Shd_Hardwood>.refl_depth : integer

<adsk_Shd_Hardwood>.oceanbump_largest : float

<adsk_Shd_Hardwood>.oceanbump_smallest : float

<adsk_Shd_Hardwood>.oceanbump_size : float

<adsk_Shd_Hardwood>.Structure : paramBlock2

<adsk_Shd_Hardwood>.result : fRGBA color

<adsk_Shd_Hardwood>.diffuse_result : fRGBA color

<adsk_Shd_Hardwood>.diffuse_raw : fRGBA color

<adsk_Shd_Hardwood>.diffuse_level : fRGBA color

<adsk_Shd_Hardwood>.spec_result : fRGBA color

<adsk_Shd_Hardwood>.spec_raw : fRGBA color

<adsk_Shd_Hardwood>.spec_level : fRGBA color

<adsk_Shd_Hardwood>.refl_result : fRGBA color

<adsk_Shd_Hardwood>.refl_raw : fRGBA color

<adsk_Shd_Hardwood>.refl_level : fRGBA color

<adsk_Shd_Hardwood>.refr_result : fRGBA color

<adsk_Shd_Hardwood>.refr_raw : fRGBA color

<adsk_Shd_Hardwood>.refr_level : fRGBA color

<adsk_Shd_Hardwood>.tran_result : fRGBA color

<adsk_Shd_Hardwood>.tran_raw : fRGBA color

<adsk_Shd_Hardwood>.tran_level : fRGBA color

<adsk_Shd_Hardwood>.indirect_result : fRGBA color

<adsk_Shd_Hardwood>.indirect_raw : fRGBA color

<adsk_Shd_Hardwood>.indirect_post_ao : fRGBA color

<adsk_Shd_Hardwood>.ao_raw : fRGBA color

<adsk_Shd_Hardwood>.add_result : fRGBA color

<adsk_Shd_Hardwood>.opacity_result : fRGBA color

<adsk_Shd_Hardwood>.opacity_raw : fRGBA color

<adsk_Shd_Hardwood>.opacity : float

<adsk_Shd_Hardwood>.Connection_struct__0000__m : paramBlock2

<adsk_Shd_Hardwood>.Connection_struct__0001__o : paramBlock2

<adsk_Shd_Hardwood>.Connection_struct__0002__r : paramBlock2

<adsk_Shd_Hardwood>.Connection_struct__0003__p : paramBlock2

<adsk_Shd_Hardwood>.Connection_struct__0004__k : paramBlock2

<adsk_Shd_Hardwood>.tint_enable_connected : boolean

<adsk_Shd_Hardwood>.tint_enable_shader : texturemap

<adsk_Shd_Hardwood>.tint_enable_paramName : string

<adsk_Shd_Hardwood>.tint_color_connected : boolean

<adsk_Shd_Hardwood>.tint_color_shader : texturemap

<adsk_Shd_Hardwood>.tint_color_paramName : string

<adsk_Shd_Hardwood>.application_type_connected : boolean

<adsk_Shd_Hardwood>.application_type_shader : texturemap

<adsk_Shd_Hardwood>.application_type_paramName : string

<adsk_Shd_Hardwood>.diffuse_roughness_connected : boolean

<adsk_Shd_Hardwood>.diffuse_roughness_shader : texturemap

<adsk_Shd_Hardwood>.diffuse_roughness_paramName : string

<adsk_Shd_Hardwood>.reflectivity_connected : boolean

<adsk_Shd_Hardwood>.reflectivity_shader : texturemap

<adsk_Shd_Hardwood>.reflectivity_paramName : string

<adsk_Shd_Hardwood>.refl_hl_only_connected : boolean

<adsk_Shd_Hardwood>.refl_hl_only_shader : texturemap

<adsk_Shd_Hardwood>.refl_hl_only_paramName : string

<adsk_Shd_Hardwood>.refl_gloss_connected : boolean

<adsk_Shd_Hardwood>.refl_gloss_shader : texturemap

<adsk_Shd_Hardwood>.refl_gloss_paramName : string

<adsk_Shd_Hardwood>.brdf_0_degree_refl_connected : boolean

<adsk_Shd_Hardwood>.brdf_0_degree_refl_shader : texturemap

<adsk_Shd_Hardwood>.brdf_0_degree_refl_paramName : string

<adsk_Shd_Hardwood>.brdf_90_degree_refl_connected : boolean

<adsk_Shd_Hardwood>.brdf_90_degree_refl_shader : texturemap

<adsk_Shd_Hardwood>.brdf_90_degree_refl_paramName : string

<adsk_Shd_Hardwood>.brdf_curve_connected : boolean

<adsk_Shd_Hardwood>.brdf_curve_shader : texturemap

<adsk_Shd_Hardwood>.brdf_curve_paramName : string

<adsk_Shd_Hardwood>.bump_amount_connected : boolean

<adsk_Shd_Hardwood>.bump_amount_shader : texturemap

<adsk_Shd_Hardwood>.bump_amount_paramName : string

<adsk_Shd_Hardwood>.no_diffuse_bump_connected : boolean

<adsk_Shd_Hardwood>.no_diffuse_bump_shader : texturemap

<adsk_Shd_Hardwood>.no_diffuse_bump_paramName : string

<adsk_Shd_Hardwood>.bump_enable_connected : boolean

<adsk_Shd_Hardwood>.bump_enable_shader : texturemap

<adsk_Shd_Hardwood>.bump_enable_paramName : string

<adsk_Shd_Hardwood>.ao_on_connected : boolean

<adsk_Shd_Hardwood>.ao_on_shader : texturemap

<adsk_Shd_Hardwood>.ao_on_paramName : string

<adsk_Shd_Hardwood>.ao_samples_connected : boolean

<adsk_Shd_Hardwood>.ao_samples_shader : texturemap

<adsk_Shd_Hardwood>.ao_samples_paramName : string

<adsk_Shd_Hardwood>.ao_distance_connected : boolean

<adsk_Shd_Hardwood>.ao_distance_shader : texturemap

<adsk_Shd_Hardwood>.ao_distance_paramName : string

<adsk_Shd_Hardwood>.ao_do_details_connected : boolean

<adsk_Shd_Hardwood>.ao_do_details_shader : texturemap

<adsk_Shd_Hardwood>.ao_do_details_paramName : string

<adsk_Shd_Hardwood>.roundcorners_radius_connected : boolean

<adsk_Shd_Hardwood>.roundcorners_radius_shader : texturemap

<adsk_Shd_Hardwood>.roundcorners_radius_paramName : string

<adsk_Shd_Hardwood>.roundcorners_allow_different_materials_connected : boolean

<adsk_Shd_Hardwood>.roundcorners_allow_different_materials_shader : texturemap

<adsk_Shd_Hardwood>.roundcorners_allow_different_materials_paramName : string

<adsk_Shd_Hardwood>.reflection_glossy_samples_connected : boolean

<adsk_Shd_Hardwood>.reflection_glossy_samples_shader : texturemap

<adsk_Shd_Hardwood>.reflection_glossy_samples_paramName : string

<adsk_Shd_Hardwood>.refl_depth_connected : boolean

<adsk_Shd_Hardwood>.refl_depth_shader : texturemap

<adsk_Shd_Hardwood>.refl_depth_paramName : string

<adsk_Shd_Hardwood>.oceanbump_largest_connected : boolean

<adsk_Shd_Hardwood>.oceanbump_largest_shader : texturemap

<adsk_Shd_Hardwood>.oceanbump_largest_paramName : string

<adsk_Shd_Hardwood>.oceanbump_smallest_connected : boolean

<adsk_Shd_Hardwood>.oceanbump_smallest_shader : texturemap

<adsk_Shd_Hardwood>.oceanbump_smallest_paramName : string

<adsk_Shd_Hardwood>.oceanbump_size_connected : boolean

<adsk_Shd_Hardwood>.oceanbump_size_shader : texturemap

<adsk_Shd_Hardwood>.oceanbump_size_paramName : string

<adsk_Shd_Hardwood>.TheList : maxObject array

<adsk_Shd_Hardwood>.Shader_Version : integer

adsk_Shd_Hardwood interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_Shd_Hardwood_spider : textureMap

adsk_Shd_Hardwood_spider : textureMap {7773161f,55f5771b}

Constructor:

adsk_Shd_Hardwood_spider: class instances not creatable by MAXScript

Properties:

<adsk_Shd_Hardwood_spider>.tint : integer

<adsk_Shd_Hardwood_spider>.finish : integer

<adsk_Shd_Hardwood_spider>.application : integer

<adsk_Shd_Hardwood_spider>.roundcorners_on : boolean

<adsk_Shd_Hardwood_spider>.roundcorners_radius : float

<adsk_Shd_Hardwood_spider>.ao_do_details : boolean

<adsk_Shd_Hardwood_spider>.Structure : paramBlock2

<adsk_Shd_Hardwood_spider>.tint_enable : float

<adsk_Shd_Hardwood_spider>.application_type : float

<adsk_Shd_Hardwood_spider>.roughness : float

<adsk_Shd_Hardwood_spider>.reflectivity : float

<adsk_Shd_Hardwood_spider>.refl_hl_only : boolean

<adsk_Shd_Hardwood_spider>.glossiness : float

<adsk_Shd_Hardwood_spider>.brdf_0_degree_refl : float

<adsk_Shd_Hardwood_spider>.brdf_90_degree_refl : float

<adsk_Shd_Hardwood_spider>.brdf_curve : float

<adsk_Shd_Hardwood_spider>.no_diffuse_bump : boolean

<adsk_Shd_Hardwood_spider>.oceanbump_largest : float

<adsk_Shd_Hardwood_spider>.oceanbump_smallest : float

<adsk_Shd_Hardwood_spider>.oceanbump_size : float

<adsk_Shd_Hardwood_spider>.roundcorners_radius : float

<adsk_Shd_Hardwood_spider>.ao_do_details : integer

<adsk_Shd_Hardwood_spider>.tint_connected : boolean

<adsk_Shd_Hardwood_spider>.tint_shader : texturemap

<adsk_Shd_Hardwood_spider>.tint_paramName : string

<adsk_Shd_Hardwood_spider>.finish_connected : boolean

<adsk_Shd_Hardwood_spider>.finish_shader : texturemap

<adsk_Shd_Hardwood_spider>.finish_paramName : string

<adsk_Shd_Hardwood_spider>.application_connected : boolean

<adsk_Shd_Hardwood_spider>.application_shader : texturemap

<adsk_Shd_Hardwood_spider>.application_paramName : string

<adsk_Shd_Hardwood_spider>.roundcorners_on_connected : boolean

<adsk_Shd_Hardwood_spider>.roundcorners_on_shader : texturemap

<adsk_Shd_Hardwood_spider>.roundcorners_on_paramName : string

<adsk_Shd_Hardwood_spider>.roundcorners_radius_connected : boolean

<adsk_Shd_Hardwood_spider>.roundcorners_radius_shader : texturemap

<adsk_Shd_Hardwood_spider>.roundcorners_radius_paramName : string

<adsk_Shd_Hardwood_spider>.ao_do_details_connected : boolean

<adsk_Shd_Hardwood_spider>.ao_do_details_shader : texturemap

<adsk_Shd_Hardwood_spider>.ao_do_details_paramName : string

<adsk_Shd_Hardwood_spider>.TheList : maxObject array

<adsk_Shd_Hardwood_spider>.Shader_Version : integer

adsk_Shd_Hardwood_spider interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_Shd_Lightmap : textureMap

adsk_Shd_Lightmap : textureMap {7773161f,4f11538c}

Constructor:

adsk_Shd_Lightmap: class instances not creatable by MAXScript

Properties:

<adsk_Shd_Lightmap>.lightmap : filename

<adsk_Shd_Lightmap>.Image_Frame_Number : integer

<adsk_Shd_Lightmap>.depthmap : filename

<adsk_Shd_Lightmap>.Image_Frame_Number : integer

<adsk_Shd_Lightmap>.lightmap_gamma : float

<adsk_Shd_Lightmap>.lightmap_group : string

<adsk_Shd_Lightmap>.lightmap_size : float

<adsk_Shd_Lightmap>.indirect : boolean

<adsk_Shd_Lightmap>.scatter_bias : float

<adsk_Shd_Lightmap>.switcher : integer

<adsk_Shd_Lightmap>.mode : integer

<adsk_Shd_Lightmap>.lights : node array

<adsk_Shd_Lightmap>.Use_lights : boolean

<adsk_Shd_Lightmap>.ImplicitLights : node array

<adsk_Shd_Lightmap>.Structure : paramBlock2

<adsk_Shd_Lightmap>.point : point3

<adsk_Shd_Lightmap>.normal : point3

<adsk_Shd_Lightmap>.lightmap_connected : boolean

<adsk_Shd_Lightmap>.lightmap_shader : texturemap

<adsk_Shd_Lightmap>.lightmap_paramName : string

<adsk_Shd_Lightmap>.depthmap_connected : boolean

<adsk_Shd_Lightmap>.depthmap_shader : texturemap

<adsk_Shd_Lightmap>.depthmap_paramName : string

<adsk_Shd_Lightmap>.lightmap_gamma_connected : boolean

<adsk_Shd_Lightmap>.lightmap_gamma_shader : texturemap

<adsk_Shd_Lightmap>.lightmap_gamma_paramName : string

<adsk_Shd_Lightmap>.lightmap_group_connected : boolean

<adsk_Shd_Lightmap>.lightmap_group_shader : texturemap

<adsk_Shd_Lightmap>.lightmap_group_paramName : string

<adsk_Shd_Lightmap>.lightmap_size_connected : boolean

<adsk_Shd_Lightmap>.lightmap_size_shader : texturemap

<adsk_Shd_Lightmap>.lightmap_size_paramName : string

<adsk_Shd_Lightmap>.indirect_connected : boolean

<adsk_Shd_Lightmap>.indirect_shader : texturemap

<adsk_Shd_Lightmap>.indirect_paramName : string

<adsk_Shd_Lightmap>.scatter_bias_connected : boolean

<adsk_Shd_Lightmap>.scatter_bias_shader : texturemap

<adsk_Shd_Lightmap>.scatter_bias_paramName : string

<adsk_Shd_Lightmap>.switcher_connected : boolean

<adsk_Shd_Lightmap>.switcher_shader : texturemap

<adsk_Shd_Lightmap>.switcher_paramName : string

<adsk_Shd_Lightmap>.TheList : maxObject array

<adsk_Shd_Lightmap>.Shader_Version : integer

adsk_Shd_Lightmap interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_Shd_MasonryCMU : textureMap

adsk_Shd_MasonryCMU : textureMap {7773161f,4b4f9d60}

Constructor:

adsk_Shd_MasonryCMU: class instances not creatable by MAXScript

Properties:

<adsk_Shd_MasonryCMU>.m : paramBlock2

<adsk_Shd_MasonryCMU>.o : paramBlock2

<adsk_Shd_MasonryCMU>.r : paramBlock2

<adsk_Shd_MasonryCMU>.p : paramBlock2

<adsk_Shd_MasonryCMU>.k : paramBlock2

<adsk_Shd_MasonryCMU>.mode : integer

<adsk_Shd_MasonryCMU>.lights : node array

<adsk_Shd_MasonryCMU>.Use_lights : boolean

<adsk_Shd_MasonryCMU>.ImplicitLights : node array

<adsk_Shd_MasonryCMU>.diffuse_color : fRGBA color

<adsk_Shd_MasonryCMU>.diffuse_roughness : float

<adsk_Shd_MasonryCMU>.reflectivity : float

<adsk_Shd_MasonryCMU>.refl_gloss : float

<adsk_Shd_MasonryCMU>.brdf_0_degree_refl : float

<adsk_Shd_MasonryCMU>.brdf_curve : float

<adsk_Shd_MasonryCMU>.refl_hl_only : boolean

<adsk_Shd_MasonryCMU>.pattern_enable : integer

<adsk_Shd_MasonryCMU>.pattern_amount : float

<adsk_Shd_MasonryCMU>.pattern_map : texturemap

<adsk_Shd_MasonryCMU>.ao_on : boolean

<adsk_Shd_MasonryCMU>.ao_samples : integer

<adsk_Shd_MasonryCMU>.ao_distance : float

<adsk_Shd_MasonryCMU>.ao_do_details : integer

<adsk_Shd_MasonryCMU>.roundcorners_radius : float

<adsk_Shd_MasonryCMU>.roundcorners_allow_different_materials : boolean

<adsk_Shd_MasonryCMU>.reflection_glossy_samples : integer

<adsk_Shd_MasonryCMU>.refl_depth : integer

<adsk_Shd_MasonryCMU>.noise_tiling : point3

<adsk_Shd_MasonryCMU>.Structure : paramBlock2

<adsk_Shd_MasonryCMU>.result : fRGBA color

<adsk_Shd_MasonryCMU>.diffuse_result : fRGBA color

<adsk_Shd_MasonryCMU>.diffuse_raw : fRGBA color

<adsk_Shd_MasonryCMU>.diffuse_level : fRGBA color

<adsk_Shd_MasonryCMU>.spec_result : fRGBA color

<adsk_Shd_MasonryCMU>.spec_raw : fRGBA color

<adsk_Shd_MasonryCMU>.spec_level : fRGBA color

<adsk_Shd_MasonryCMU>.refl_result : fRGBA color

<adsk_Shd_MasonryCMU>.refl_raw : fRGBA color

<adsk_Shd_MasonryCMU>.refl_level : fRGBA color

<adsk_Shd_MasonryCMU>.refr_result : fRGBA color

<adsk_Shd_MasonryCMU>.refr_raw : fRGBA color

<adsk_Shd_MasonryCMU>.refr_level : fRGBA color

<adsk_Shd_MasonryCMU>.tran_result : fRGBA color

<adsk_Shd_MasonryCMU>.tran_raw : fRGBA color

<adsk_Shd_MasonryCMU>.tran_level : fRGBA color

<adsk_Shd_MasonryCMU>.indirect_result : fRGBA color

<adsk_Shd_MasonryCMU>.indirect_raw : fRGBA color

<adsk_Shd_MasonryCMU>.indirect_post_ao : fRGBA color

<adsk_Shd_MasonryCMU>.ao_raw : fRGBA color

<adsk_Shd_MasonryCMU>.add_result : fRGBA color

<adsk_Shd_MasonryCMU>.opacity_result : fRGBA color

<adsk_Shd_MasonryCMU>.opacity_raw : fRGBA color

<adsk_Shd_MasonryCMU>.opacity : float

<adsk_Shd_MasonryCMU>.Connection_struct__0000__m : paramBlock2

<adsk_Shd_MasonryCMU>.Connection_struct__0001__o : paramBlock2

<adsk_Shd_MasonryCMU>.Connection_struct__0002__r : paramBlock2

<adsk_Shd_MasonryCMU>.Connection_struct__0003__p : paramBlock2

<adsk_Shd_MasonryCMU>.Connection_struct__0004__k : paramBlock2

<adsk_Shd_MasonryCMU>.diffuse_color_connected : boolean

<adsk_Shd_MasonryCMU>.diffuse_color_shader : texturemap

<adsk_Shd_MasonryCMU>.diffuse_color_paramName : string

<adsk_Shd_MasonryCMU>.diffuse_roughness_connected : boolean

<adsk_Shd_MasonryCMU>.diffuse_roughness_shader : texturemap

<adsk_Shd_MasonryCMU>.diffuse_roughness_paramName : string

<adsk_Shd_MasonryCMU>.reflectivity_connected : boolean

<adsk_Shd_MasonryCMU>.reflectivity_shader : texturemap

<adsk_Shd_MasonryCMU>.reflectivity_paramName : string

<adsk_Shd_MasonryCMU>.refl_gloss_connected : boolean

<adsk_Shd_MasonryCMU>.refl_gloss_shader : texturemap

<adsk_Shd_MasonryCMU>.refl_gloss_paramName : string

<adsk_Shd_MasonryCMU>.brdf_0_degree_refl_connected : boolean

<adsk_Shd_MasonryCMU>.brdf_0_degree_refl_shader : texturemap

<adsk_Shd_MasonryCMU>.brdf_0_degree_refl_paramName : string

<adsk_Shd_MasonryCMU>.brdf_curve_connected : boolean

<adsk_Shd_MasonryCMU>.brdf_curve_shader : texturemap

<adsk_Shd_MasonryCMU>.brdf_curve_paramName : string

<adsk_Shd_MasonryCMU>.refl_hl_only_connected : boolean

<adsk_Shd_MasonryCMU>.refl_hl_only_shader : texturemap

<adsk_Shd_MasonryCMU>.refl_hl_only_paramName : string

<adsk_Shd_MasonryCMU>.pattern_enable_connected : boolean

<adsk_Shd_MasonryCMU>.pattern_enable_shader : texturemap

<adsk_Shd_MasonryCMU>.pattern_enable_paramName : string

<adsk_Shd_MasonryCMU>.pattern_amount_connected : boolean

<adsk_Shd_MasonryCMU>.pattern_amount_shader : texturemap

<adsk_Shd_MasonryCMU>.pattern_amount_paramName : string

<adsk_Shd_MasonryCMU>.ao_on_connected : boolean

<adsk_Shd_MasonryCMU>.ao_on_shader : texturemap

<adsk_Shd_MasonryCMU>.ao_on_paramName : string

<adsk_Shd_MasonryCMU>.ao_samples_connected : boolean

<adsk_Shd_MasonryCMU>.ao_samples_shader : texturemap

<adsk_Shd_MasonryCMU>.ao_samples_paramName : string

<adsk_Shd_MasonryCMU>.ao_distance_connected : boolean

<adsk_Shd_MasonryCMU>.ao_distance_shader : texturemap

<adsk_Shd_MasonryCMU>.ao_distance_paramName : string

<adsk_Shd_MasonryCMU>.ao_do_details_connected : boolean

<adsk_Shd_MasonryCMU>.ao_do_details_shader : texturemap

<adsk_Shd_MasonryCMU>.ao_do_details_paramName : string

<adsk_Shd_MasonryCMU>.roundcorners_radius_connected : boolean

<adsk_Shd_MasonryCMU>.roundcorners_radius_shader : texturemap

<adsk_Shd_MasonryCMU>.roundcorners_radius_paramName : string

<adsk_Shd_MasonryCMU>.roundcorners_allow_different_materials_connected : boolean

<adsk_Shd_MasonryCMU>.roundcorners_allow_different_materials_shader : texturemap

<adsk_Shd_MasonryCMU>.roundcorners_allow_different_materials_paramName : string

<adsk_Shd_MasonryCMU>.reflection_glossy_samples_connected : boolean

<adsk_Shd_MasonryCMU>.reflection_glossy_samples_shader : texturemap

<adsk_Shd_MasonryCMU>.reflection_glossy_samples_paramName : string

<adsk_Shd_MasonryCMU>.refl_depth_connected : boolean

<adsk_Shd_MasonryCMU>.refl_depth_shader : texturemap

<adsk_Shd_MasonryCMU>.refl_depth_paramName : string

<adsk_Shd_MasonryCMU>.noise_tiling_connected : boolean

<adsk_Shd_MasonryCMU>.noise_tiling_shader : texturemap

<adsk_Shd_MasonryCMU>.noise_tiling_paramName : string

<adsk_Shd_MasonryCMU>.TheList : maxObject array

<adsk_Shd_MasonryCMU>.Shader_Version : integer

adsk_Shd_MasonryCMU interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_Shd_MasonryCMU_spider : textureMap

adsk_Shd_MasonryCMU_spider : textureMap {7773161f,84269f6e}

Constructor:

adsk_Shd_MasonryCMU_spider: class instances not creatable by MAXScript

Properties:

<adsk_Shd_MasonryCMU_spider>.type : integer

<adsk_Shd_MasonryCMU_spider>.application : integer

<adsk_Shd_MasonryCMU_spider>.roundcorners_on : boolean

<adsk_Shd_MasonryCMU_spider>.roundcorners_radius : float

<adsk_Shd_MasonryCMU_spider>.ao_do_details : boolean

<adsk_Shd_MasonryCMU_spider>.Structure : paramBlock2

<adsk_Shd_MasonryCMU_spider>.diffuse_roughness : float

<adsk_Shd_MasonryCMU_spider>.reflectivity : float

<adsk_Shd_MasonryCMU_spider>.refl_gloss : float

<adsk_Shd_MasonryCMU_spider>.brdf_0_degree_refl : float

<adsk_Shd_MasonryCMU_spider>.brdf_curve : float

<adsk_Shd_MasonryCMU_spider>.refl_hl_only : boolean

<adsk_Shd_MasonryCMU_spider>.noise_tiling : point3

<adsk_Shd_MasonryCMU_spider>.roundcorners_radius : float

<adsk_Shd_MasonryCMU_spider>.ao_do_details : integer

<adsk_Shd_MasonryCMU_spider>.type_connected : boolean

<adsk_Shd_MasonryCMU_spider>.type_shader : texturemap

<adsk_Shd_MasonryCMU_spider>.type_paramName : string

<adsk_Shd_MasonryCMU_spider>.application_connected : boolean

<adsk_Shd_MasonryCMU_spider>.application_shader : texturemap

<adsk_Shd_MasonryCMU_spider>.application_paramName : string

<adsk_Shd_MasonryCMU_spider>.roundcorners_on_connected : boolean

<adsk_Shd_MasonryCMU_spider>.roundcorners_on_shader : texturemap

<adsk_Shd_MasonryCMU_spider>.roundcorners_on_paramName : string

<adsk_Shd_MasonryCMU_spider>.roundcorners_radius_connected : boolean

<adsk_Shd_MasonryCMU_spider>.roundcorners_radius_shader : texturemap

<adsk_Shd_MasonryCMU_spider>.roundcorners_radius_paramName : string

<adsk_Shd_MasonryCMU_spider>.ao_do_details_connected : boolean

<adsk_Shd_MasonryCMU_spider>.ao_do_details_shader : texturemap

<adsk_Shd_MasonryCMU_spider>.ao_do_details_paramName : string

<adsk_Shd_MasonryCMU_spider>.TheList : maxObject array

<adsk_Shd_MasonryCMU_spider>.Shader_Version : integer

adsk_Shd_MasonryCMU_spider interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_Shd_Metal__Bronze : textureMap

adsk_Shd_Metal__Bronze : textureMap {7773161f,9040454b}

Constructor:

adsk_Shd_Metal__Bronze: class instances not creatable by MAXScript

Properties:

<adsk_Shd_Metal__Bronze>.m : paramBlock2

<adsk_Shd_Metal__Bronze>.o : paramBlock2

<adsk_Shd_Metal__Bronze>.p : paramBlock2

<adsk_Shd_Metal__Bronze>.t : paramBlock2

<adsk_Shd_Metal__Bronze>.u : paramBlock2

<adsk_Shd_Metal__Bronze>.x : paramBlock2

<adsk_Shd_Metal__Bronze>.mode : integer

<adsk_Shd_Metal__Bronze>.lights : node array

<adsk_Shd_Metal__Bronze>.Use_lights : boolean

<adsk_Shd_Metal__Bronze>.ImplicitLights : node array

<adsk_Shd_Metal__Bronze>.brightness_var : float

<adsk_Shd_Metal__Bronze>.bump_enable : integer

<adsk_Shd_Metal__Bronze>.bump_amount : float

<adsk_Shd_Metal__Bronze>.bump_map : texturemap

<adsk_Shd_Metal__Bronze>.cutouts_enable : integer

<adsk_Shd_Metal__Bronze>.cutouts_map : texturemap

<adsk_Shd_Metal__Bronze>.ao_on : boolean

<adsk_Shd_Metal__Bronze>.ao_samples : integer

<adsk_Shd_Metal__Bronze>.ao_distance : float

<adsk_Shd_Metal__Bronze>.ao_dark : fRGBA color

<adsk_Shd_Metal__Bronze>.ao_ambient : fRGBA color

<adsk_Shd_Metal__Bronze>.ao_do_details : boolean

<adsk_Shd_Metal__Bronze>.refl_gloss_samples : integer

<adsk_Shd_Metal__Bronze>.refl_depth : integer

<adsk_Shd_Metal__Bronze>.brush_def_map : filename

<adsk_Shd_Metal__Bronze>.Image_Frame_Number : integer

<adsk_Shd_Metal__Bronze>.break_def_map : filename

<adsk_Shd_Metal__Bronze>.Image_Frame_Number : integer

<adsk_Shd_Metal__Bronze>.bump_diamond_map : filename

<adsk_Shd_Metal__Bronze>.Image_Frame_Number : integer

<adsk_Shd_Metal__Bronze>.bump_checker_map : filename

<adsk_Shd_Metal__Bronze>.Image_Frame_Number : integer

<adsk_Shd_Metal__Bronze>.uv_channel : integer

<adsk_Shd_Metal__Bronze>.u_scale : float

<adsk_Shd_Metal__Bronze>.v_scale : float

<adsk_Shd_Metal__Bronze>.shapebasednoise_scale : float

<adsk_Shd_Metal__Bronze>.shapebasednoisevertical_scale : float

<adsk_Shd_Metal__Bronze>.Connection_struct__0000__m : paramBlock2

<adsk_Shd_Metal__Bronze>.Connection_struct__0001__o : paramBlock2

<adsk_Shd_Metal__Bronze>.Connection_struct__0002__p : paramBlock2

<adsk_Shd_Metal__Bronze>.Connection_struct__0003__t : paramBlock2

<adsk_Shd_Metal__Bronze>.Connection_struct__0004__u : paramBlock2

<adsk_Shd_Metal__Bronze>.Connection_struct__0005__x : paramBlock2

<adsk_Shd_Metal__Bronze>.mode_connected : boolean

<adsk_Shd_Metal__Bronze>.mode_shader : texturemap

<adsk_Shd_Metal__Bronze>.mode_paramName : string

<adsk_Shd_Metal__Bronze>.brightness_var_connected : boolean

<adsk_Shd_Metal__Bronze>.brightness_var_shader : texturemap

<adsk_Shd_Metal__Bronze>.brightness_var_paramName : string

<adsk_Shd_Metal__Bronze>.bump_enable_connected : boolean

<adsk_Shd_Metal__Bronze>.bump_enable_shader : texturemap

<adsk_Shd_Metal__Bronze>.bump_enable_paramName : string

<adsk_Shd_Metal__Bronze>.bump_amount_connected : boolean

<adsk_Shd_Metal__Bronze>.bump_amount_shader : texturemap

<adsk_Shd_Metal__Bronze>.bump_amount_paramName : string

<adsk_Shd_Metal__Bronze>.cutouts_enable_connected : boolean

<adsk_Shd_Metal__Bronze>.cutouts_enable_shader : texturemap

<adsk_Shd_Metal__Bronze>.cutouts_enable_paramName : string

<adsk_Shd_Metal__Bronze>.ao_on_connected : boolean

<adsk_Shd_Metal__Bronze>.ao_on_shader : texturemap

<adsk_Shd_Metal__Bronze>.ao_on_paramName : string

<adsk_Shd_Metal__Bronze>.ao_samples_connected : boolean

<adsk_Shd_Metal__Bronze>.ao_samples_shader : texturemap

<adsk_Shd_Metal__Bronze>.ao_samples_paramName : string

<adsk_Shd_Metal__Bronze>.ao_distance_connected : boolean

<adsk_Shd_Metal__Bronze>.ao_distance_shader : texturemap

<adsk_Shd_Metal__Bronze>.ao_distance_paramName : string

<adsk_Shd_Metal__Bronze>.ao_dark_connected : boolean

<adsk_Shd_Metal__Bronze>.ao_dark_shader : texturemap

<adsk_Shd_Metal__Bronze>.ao_dark_paramName : string

<adsk_Shd_Metal__Bronze>.ao_ambient_connected : boolean

<adsk_Shd_Metal__Bronze>.ao_ambient_shader : texturemap

<adsk_Shd_Metal__Bronze>.ao_ambient_paramName : string

<adsk_Shd_Metal__Bronze>.ao_do_details_connected : boolean

<adsk_Shd_Metal__Bronze>.ao_do_details_shader : texturemap

<adsk_Shd_Metal__Bronze>.ao_do_details_paramName : string

<adsk_Shd_Metal__Bronze>.refl_gloss_samples_connected : boolean

<adsk_Shd_Metal__Bronze>.refl_gloss_samples_shader : texturemap

<adsk_Shd_Metal__Bronze>.refl_gloss_samples_paramName : string

<adsk_Shd_Metal__Bronze>.refl_depth_connected : boolean

<adsk_Shd_Metal__Bronze>.refl_depth_shader : texturemap

<adsk_Shd_Metal__Bronze>.refl_depth_paramName : string

<adsk_Shd_Metal__Bronze>.brush_def_map_connected : boolean

<adsk_Shd_Metal__Bronze>.brush_def_map_shader : texturemap

<adsk_Shd_Metal__Bronze>.brush_def_map_paramName : string

<adsk_Shd_Metal__Bronze>.break_def_map_connected : boolean

<adsk_Shd_Metal__Bronze>.break_def_map_shader : texturemap

<adsk_Shd_Metal__Bronze>.break_def_map_paramName : string

<adsk_Shd_Metal__Bronze>.bump_diamond_map_connected : boolean

<adsk_Shd_Metal__Bronze>.bump_diamond_map_shader : texturemap

<adsk_Shd_Metal__Bronze>.bump_diamond_map_paramName : string

<adsk_Shd_Metal__Bronze>.bump_checker_map_connected : boolean

<adsk_Shd_Metal__Bronze>.bump_checker_map_shader : texturemap

<adsk_Shd_Metal__Bronze>.bump_checker_map_paramName : string

<adsk_Shd_Metal__Bronze>.uv_channel_connected : boolean

<adsk_Shd_Metal__Bronze>.uv_channel_shader : texturemap

<adsk_Shd_Metal__Bronze>.uv_channel_paramName : string

<adsk_Shd_Metal__Bronze>.u_scale_connected : boolean

<adsk_Shd_Metal__Bronze>.u_scale_shader : texturemap

<adsk_Shd_Metal__Bronze>.u_scale_paramName : string

<adsk_Shd_Metal__Bronze>.v_scale_connected : boolean

<adsk_Shd_Metal__Bronze>.v_scale_shader : texturemap

<adsk_Shd_Metal__Bronze>.v_scale_paramName : string

<adsk_Shd_Metal__Bronze>.shapebasednoise_scale_connected : boolean

<adsk_Shd_Metal__Bronze>.shapebasednoise_scale_shader : texturemap

<adsk_Shd_Metal__Bronze>.shapebasednoise_scale_paramName : string

<adsk_Shd_Metal__Bronze>.shapebasednoisevertical_scale_connected : boolean

<adsk_Shd_Metal__Bronze>.shapebasednoisevertical_scale_shader : texturemap

<adsk_Shd_Metal__Bronze>.shapebasednoisevertical_scale_paramName : string

<adsk_Shd_Metal__Bronze>.TheList : maxObject array

<adsk_Shd_Metal__Bronze>.Shader_Version : integer

adsk_Shd_Metal__Bronze interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_Shd_Metal__Copper : textureMap

adsk_Shd_Metal__Copper : textureMap {7773161f,9a434f39}

Constructor:

adsk_Shd_Metal__Copper: class instances not creatable by MAXScript

Properties:

<adsk_Shd_Metal__Copper>.m : paramBlock2

<adsk_Shd_Metal__Copper>.o : paramBlock2

<adsk_Shd_Metal__Copper>.p : paramBlock2

<adsk_Shd_Metal__Copper>.t : paramBlock2

<adsk_Shd_Metal__Copper>.u : paramBlock2

<adsk_Shd_Metal__Copper>.x : paramBlock2

<adsk_Shd_Metal__Copper>.mode : integer

<adsk_Shd_Metal__Copper>.lights : node array

<adsk_Shd_Metal__Copper>.Use_lights : boolean

<adsk_Shd_Metal__Copper>.ImplicitLights : node array

<adsk_Shd_Metal__Copper>.brightness_var : float

<adsk_Shd_Metal__Copper>.bump_enable : integer

<adsk_Shd_Metal__Copper>.bump_amount : float

<adsk_Shd_Metal__Copper>.bump_map : texturemap

<adsk_Shd_Metal__Copper>.cutouts_enable : integer

<adsk_Shd_Metal__Copper>.cutouts_map : texturemap

<adsk_Shd_Metal__Copper>.ao_on : boolean

<adsk_Shd_Metal__Copper>.ao_samples : integer

<adsk_Shd_Metal__Copper>.ao_distance : float

<adsk_Shd_Metal__Copper>.ao_dark : fRGBA color

<adsk_Shd_Metal__Copper>.ao_ambient : fRGBA color

<adsk_Shd_Metal__Copper>.ao_do_details : boolean

<adsk_Shd_Metal__Copper>.refl_gloss_samples : integer

<adsk_Shd_Metal__Copper>.refl_depth : integer

<adsk_Shd_Metal__Copper>.brush_def_map : filename

<adsk_Shd_Metal__Copper>.Image_Frame_Number : integer

<adsk_Shd_Metal__Copper>.break_def_map : filename

<adsk_Shd_Metal__Copper>.Image_Frame_Number : integer

<adsk_Shd_Metal__Copper>.bump_diamond_map : filename

<adsk_Shd_Metal__Copper>.Image_Frame_Number : integer

<adsk_Shd_Metal__Copper>.bump_checker_map : filename

<adsk_Shd_Metal__Copper>.Image_Frame_Number : integer

<adsk_Shd_Metal__Copper>.uv_channel : integer

<adsk_Shd_Metal__Copper>.u_scale : float

<adsk_Shd_Metal__Copper>.v_scale : float

<adsk_Shd_Metal__Copper>.shapebasednoise_scale : float

<adsk_Shd_Metal__Copper>.shapebasednoisevertical_scale : float

<adsk_Shd_Metal__Copper>.Connection_struct__0000__m : paramBlock2

<adsk_Shd_Metal__Copper>.Connection_struct__0001__o : paramBlock2

<adsk_Shd_Metal__Copper>.Connection_struct__0002__p : paramBlock2

<adsk_Shd_Metal__Copper>.Connection_struct__0003__t : paramBlock2

<adsk_Shd_Metal__Copper>.Connection_struct__0004__u : paramBlock2

<adsk_Shd_Metal__Copper>.Connection_struct__0005__x : paramBlock2

<adsk_Shd_Metal__Copper>.mode_connected : boolean

<adsk_Shd_Metal__Copper>.mode_shader : texturemap

<adsk_Shd_Metal__Copper>.mode_paramName : string

<adsk_Shd_Metal__Copper>.brightness_var_connected : boolean

<adsk_Shd_Metal__Copper>.brightness_var_shader : texturemap

<adsk_Shd_Metal__Copper>.brightness_var_paramName : string

<adsk_Shd_Metal__Copper>.bump_enable_connected : boolean

<adsk_Shd_Metal__Copper>.bump_enable_shader : texturemap

<adsk_Shd_Metal__Copper>.bump_enable_paramName : string

<adsk_Shd_Metal__Copper>.bump_amount_connected : boolean

<adsk_Shd_Metal__Copper>.bump_amount_shader : texturemap

<adsk_Shd_Metal__Copper>.bump_amount_paramName : string

<adsk_Shd_Metal__Copper>.cutouts_enable_connected : boolean

<adsk_Shd_Metal__Copper>.cutouts_enable_shader : texturemap

<adsk_Shd_Metal__Copper>.cutouts_enable_paramName : string

<adsk_Shd_Metal__Copper>.ao_on_connected : boolean

<adsk_Shd_Metal__Copper>.ao_on_shader : texturemap

<adsk_Shd_Metal__Copper>.ao_on_paramName : string

<adsk_Shd_Metal__Copper>.ao_samples_connected : boolean

<adsk_Shd_Metal__Copper>.ao_samples_shader : texturemap

<adsk_Shd_Metal__Copper>.ao_samples_paramName : string

<adsk_Shd_Metal__Copper>.ao_distance_connected : boolean

<adsk_Shd_Metal__Copper>.ao_distance_shader : texturemap

<adsk_Shd_Metal__Copper>.ao_distance_paramName : string

<adsk_Shd_Metal__Copper>.ao_dark_connected : boolean

<adsk_Shd_Metal__Copper>.ao_dark_shader : texturemap

<adsk_Shd_Metal__Copper>.ao_dark_paramName : string

<adsk_Shd_Metal__Copper>.ao_ambient_connected : boolean

<adsk_Shd_Metal__Copper>.ao_ambient_shader : texturemap

<adsk_Shd_Metal__Copper>.ao_ambient_paramName : string

<adsk_Shd_Metal__Copper>.ao_do_details_connected : boolean

<adsk_Shd_Metal__Copper>.ao_do_details_shader : texturemap

<adsk_Shd_Metal__Copper>.ao_do_details_paramName : string

<adsk_Shd_Metal__Copper>.refl_gloss_samples_connected : boolean

<adsk_Shd_Metal__Copper>.refl_gloss_samples_shader : texturemap

<adsk_Shd_Metal__Copper>.refl_gloss_samples_paramName : string

<adsk_Shd_Metal__Copper>.refl_depth_connected : boolean

<adsk_Shd_Metal__Copper>.refl_depth_shader : texturemap

<adsk_Shd_Metal__Copper>.refl_depth_paramName : string

<adsk_Shd_Metal__Copper>.brush_def_map_connected : boolean

<adsk_Shd_Metal__Copper>.brush_def_map_shader : texturemap

<adsk_Shd_Metal__Copper>.brush_def_map_paramName : string

<adsk_Shd_Metal__Copper>.break_def_map_connected : boolean

<adsk_Shd_Metal__Copper>.break_def_map_shader : texturemap

<adsk_Shd_Metal__Copper>.break_def_map_paramName : string

<adsk_Shd_Metal__Copper>.bump_diamond_map_connected : boolean

<adsk_Shd_Metal__Copper>.bump_diamond_map_shader : texturemap

<adsk_Shd_Metal__Copper>.bump_diamond_map_paramName : string

<adsk_Shd_Metal__Copper>.bump_checker_map_connected : boolean

<adsk_Shd_Metal__Copper>.bump_checker_map_shader : texturemap

<adsk_Shd_Metal__Copper>.bump_checker_map_paramName : string

<adsk_Shd_Metal__Copper>.uv_channel_connected : boolean

<adsk_Shd_Metal__Copper>.uv_channel_shader : texturemap

<adsk_Shd_Metal__Copper>.uv_channel_paramName : string

<adsk_Shd_Metal__Copper>.u_scale_connected : boolean

<adsk_Shd_Metal__Copper>.u_scale_shader : texturemap

<adsk_Shd_Metal__Copper>.u_scale_paramName : string

<adsk_Shd_Metal__Copper>.v_scale_connected : boolean

<adsk_Shd_Metal__Copper>.v_scale_shader : texturemap

<adsk_Shd_Metal__Copper>.v_scale_paramName : string

<adsk_Shd_Metal__Copper>.shapebasednoise_scale_connected : boolean

<adsk_Shd_Metal__Copper>.shapebasednoise_scale_shader : texturemap

<adsk_Shd_Metal__Copper>.shapebasednoise_scale_paramName : string

<adsk_Shd_Metal__Copper>.shapebasednoisevertical_scale_connected : boolean

<adsk_Shd_Metal__Copper>.shapebasednoisevertical_scale_shader : texturemap

<adsk_Shd_Metal__Copper>.shapebasednoisevertical_scale_paramName : string

<adsk_Shd_Metal__Copper>.TheList : maxObject array

<adsk_Shd_Metal__Copper>.Shader_Version : integer

adsk_Shd_Metal__Copper interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_Shd_Metal_spider : textureMap

adsk_Shd_Metal_spider : textureMap {7773161f,b337c315}

Constructor:

adsk_Shd_Metal_spider: class instances not creatable by MAXScript

Properties:

<adsk_Shd_Metal_spider>.type : integer

<adsk_Shd_Metal_spider>.diffuse_color : fRGBA color

<adsk_Shd_Metal_spider>.brightness_var : float

<adsk_Shd_Metal_spider>.application : integer

<adsk_Shd_Metal_spider>.patterns : integer

<adsk_Shd_Metal_spider>.cutouts : integer

<adsk_Shd_Metal_spider>.ao_distance : float

<adsk_Shd_Metal_spider>.roundcorners_radius : float

<adsk_Shd_Metal_spider>.Structure : paramBlock2

<adsk_Shd_Metal_spider>.diffuse_weight : float

<adsk_Shd_Metal_spider>.diffuse_roughness : float

<adsk_Shd_Metal_spider>.brightness_var : float

<adsk_Shd_Metal_spider>.reflectivity : float

<adsk_Shd_Metal_spider>.refl_gloss : float

<adsk_Shd_Metal_spider>.refl_interpolate : boolean

<adsk_Shd_Metal_spider>.refl_is_metal : boolean

<adsk_Shd_Metal_spider>.brdf_0_degree_refl : float

<adsk_Shd_Metal_spider>.brdf_90_degree_refl : float

<adsk_Shd_Metal_spider>.brdf_curve : float

<adsk_Shd_Metal_spider>.bump_global_amount : float

<adsk_Shd_Metal_spider>.bump_local_amount : float

<adsk_Shd_Metal_spider>.diffuse_switcher : integer

<adsk_Shd_Metal_spider>.reflect_switcher : integer

<adsk_Shd_Metal_spider>.bump_switcher : integer

<adsk_Shd_Metal_spider>.aniso_switcher : integer

<adsk_Shd_Metal_spider>.anisorot_switcher : integer

<adsk_Shd_Metal_spider>.map_scale : float

<adsk_Shd_Metal_spider>.diffuse_color : fRGBA color

<adsk_Shd_Metal_spider>.reflect_color : fRGBA color

<adsk_Shd_Metal_spider>.reflect_map_amount : float

<adsk_Shd_Metal_spider>.aniso_color : fRGBA color

<adsk_Shd_Metal_spider>.aniso_map_amount : float

<adsk_Shd_Metal_spider>.anisorot_color : fRGBA color

<adsk_Shd_Metal_spider>.anisorot_map_amount : float

<adsk_Shd_Metal_spider>.ao_distance : float

<adsk_Shd_Metal_spider>.roundcorners_radius : float

<adsk_Shd_Metal_spider>.noise_tiling : point3

<adsk_Shd_Metal_spider>.noiseanodized_tiling : point3

<adsk_Shd_Metal_spider>.bumpnoise_tiling : point3

<adsk_Shd_Metal_spider>.shapebasednoise_scale : float

<adsk_Shd_Metal_spider>.shapebasednoisevertical_scale : float

<adsk_Shd_Metal_spider>.u_scale : float

<adsk_Shd_Metal_spider>.v_scale : float

<adsk_Shd_Metal_spider>.type_connected : boolean

<adsk_Shd_Metal_spider>.type_shader : texturemap

<adsk_Shd_Metal_spider>.type_paramName : string

<adsk_Shd_Metal_spider>.diffuse_color_connected : boolean

<adsk_Shd_Metal_spider>.diffuse_color_shader : texturemap

<adsk_Shd_Metal_spider>.diffuse_color_paramName : string

<adsk_Shd_Metal_spider>.brightness_var_connected : boolean

<adsk_Shd_Metal_spider>.brightness_var_shader : texturemap

<adsk_Shd_Metal_spider>.brightness_var_paramName : string

<adsk_Shd_Metal_spider>.application_connected : boolean

<adsk_Shd_Metal_spider>.application_shader : texturemap

<adsk_Shd_Metal_spider>.application_paramName : string

<adsk_Shd_Metal_spider>.patterns_connected : boolean

<adsk_Shd_Metal_spider>.patterns_shader : texturemap

<adsk_Shd_Metal_spider>.patterns_paramName : string

<adsk_Shd_Metal_spider>.cutouts_connected : boolean

<adsk_Shd_Metal_spider>.cutouts_shader : texturemap

<adsk_Shd_Metal_spider>.cutouts_paramName : string

<adsk_Shd_Metal_spider>.ao_distance_connected : boolean

<adsk_Shd_Metal_spider>.ao_distance_shader : texturemap

<adsk_Shd_Metal_spider>.ao_distance_paramName : string

<adsk_Shd_Metal_spider>.roundcorners_radius_connected : boolean

<adsk_Shd_Metal_spider>.roundcorners_radius_shader : texturemap

<adsk_Shd_Metal_spider>.roundcorners_radius_paramName : string

<adsk_Shd_Metal_spider>.TheList : maxObject array

<adsk_Shd_Metal_spider>.Shader_Version : integer

adsk_Shd_Metal_spider interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_Shd_MetallicPaint__adsk : textureMap

adsk_Shd_MetallicPaint__adsk : textureMap {7773161f,c1657620}

Constructor:

adsk_Shd_MetallicPaint__adsk: class instances not creatable by MAXScript

Alias:

adsk_Shd_MetallicPaint

Properties:

<adsk_Shd_MetallicPaint__adsk>.m : paramBlock2

<adsk_Shd_MetallicPaint__adsk>.l : paramBlock2

<adsk_Shd_MetallicPaint__adsk>.f : paramBlock2

<adsk_Shd_MetallicPaint__adsk>.o : paramBlock2

<adsk_Shd_MetallicPaint__adsk>.r : paramBlock2

<adsk_Shd_MetallicPaint__adsk>.p : paramBlock2

<adsk_Shd_MetallicPaint__adsk>.mode : integer

<adsk_Shd_MetallicPaint__adsk>.lights : node array

<adsk_Shd_MetallicPaint__adsk>.Use_lights : boolean

<adsk_Shd_MetallicPaint__adsk>.ImplicitLights : node array

<adsk_Shd_MetallicPaint__adsk>.base_color : RGB color

<adsk_Shd_MetallicPaint__adsk>.edge_color_bias : float

<adsk_Shd_MetallicPaint__adsk>.lit_color : RGB color

<adsk_Shd_MetallicPaint__adsk>.lit_color_bias : float

<adsk_Shd_MetallicPaint__adsk>.diffuse_weight : float

<adsk_Shd_MetallicPaint__adsk>.diffuse_bias : float

<adsk_Shd_MetallicPaint__adsk>.reflectivity : float

<adsk_Shd_MetallicPaint__adsk>.refl_color : fRGBA color

<adsk_Shd_MetallicPaint__adsk>.refl_gloss : float

<adsk_Shd_MetallicPaint__adsk>.brdf_0_degree_refl : float

<adsk_Shd_MetallicPaint__adsk>.brdf_90_degree_refl : float

<adsk_Shd_MetallicPaint__adsk>.brdf_curve : float

<adsk_Shd_MetallicPaint__adsk>.flake_color : RGB color

<adsk_Shd_MetallicPaint__adsk>.flake_weight : float

<adsk_Shd_MetallicPaint__adsk>.flake_exp : float

<adsk_Shd_MetallicPaint__adsk>.flake_reflect : float

<adsk_Shd_MetallicPaint__adsk>.flake_decay : float

<adsk_Shd_MetallicPaint__adsk>.flake_density : float

<adsk_Shd_MetallicPaint__adsk>.flake_strength : float

<adsk_Shd_MetallicPaint__adsk>.flake_scale : float

<adsk_Shd_MetallicPaint__adsk>.spec_glazing : boolean

<adsk_Shd_MetallicPaint__adsk>.ao_on : boolean

<adsk_Shd_MetallicPaint__adsk>.ao_samples : integer

<adsk_Shd_MetallicPaint__adsk>.ao_distance : float

<adsk_Shd_MetallicPaint__adsk>.ao_dark : fRGBA color

<adsk_Shd_MetallicPaint__adsk>.ao_switcher : float

<adsk_Shd_MetallicPaint__adsk>.roundcorners_radius : float

<adsk_Shd_MetallicPaint__adsk>.roundcorners_allow_different_materials : boolean

<adsk_Shd_MetallicPaint__adsk>.reflection_glossy_samples : integer

<adsk_Shd_MetallicPaint__adsk>.refl_depth : integer

<adsk_Shd_MetallicPaint__adsk>.Connection_struct__0000__m : paramBlock2

<adsk_Shd_MetallicPaint__adsk>.Connection_struct__0001__l : paramBlock2

<adsk_Shd_MetallicPaint__adsk>.Connection_struct__0002__f : paramBlock2

<adsk_Shd_MetallicPaint__adsk>.Connection_struct__0003__o : paramBlock2

<adsk_Shd_MetallicPaint__adsk>.Connection_struct__0004__r : paramBlock2

<adsk_Shd_MetallicPaint__adsk>.Connection_struct__0005__p : paramBlock2

<adsk_Shd_MetallicPaint__adsk>.base_color_connected : boolean

<adsk_Shd_MetallicPaint__adsk>.base_color_shader : texturemap

<adsk_Shd_MetallicPaint__adsk>.base_color_paramName : string

<adsk_Shd_MetallicPaint__adsk>.edge_color_bias_connected : boolean

<adsk_Shd_MetallicPaint__adsk>.edge_color_bias_shader : texturemap

<adsk_Shd_MetallicPaint__adsk>.edge_color_bias_paramName : string

<adsk_Shd_MetallicPaint__adsk>.lit_color_connected : boolean

<adsk_Shd_MetallicPaint__adsk>.lit_color_shader : texturemap

<adsk_Shd_MetallicPaint__adsk>.lit_color_paramName : string

<adsk_Shd_MetallicPaint__adsk>.lit_color_bias_connected : boolean

<adsk_Shd_MetallicPaint__adsk>.lit_color_bias_shader : texturemap

<adsk_Shd_MetallicPaint__adsk>.lit_color_bias_paramName : string

<adsk_Shd_MetallicPaint__adsk>.diffuse_weight_connected : boolean

<adsk_Shd_MetallicPaint__adsk>.diffuse_weight_shader : texturemap

<adsk_Shd_MetallicPaint__adsk>.diffuse_weight_paramName : string

<adsk_Shd_MetallicPaint__adsk>.diffuse_bias_connected : boolean

<adsk_Shd_MetallicPaint__adsk>.diffuse_bias_shader : texturemap

<adsk_Shd_MetallicPaint__adsk>.diffuse_bias_paramName : string

<adsk_Shd_MetallicPaint__adsk>.reflectivity_connected : boolean

<adsk_Shd_MetallicPaint__adsk>.reflectivity_shader : texturemap

<adsk_Shd_MetallicPaint__adsk>.reflectivity_paramName : string

<adsk_Shd_MetallicPaint__adsk>.refl_color_connected : boolean

<adsk_Shd_MetallicPaint__adsk>.refl_color_shader : texturemap

<adsk_Shd_MetallicPaint__adsk>.refl_color_paramName : string

<adsk_Shd_MetallicPaint__adsk>.refl_gloss_connected : boolean

<adsk_Shd_MetallicPaint__adsk>.refl_gloss_shader : texturemap

<adsk_Shd_MetallicPaint__adsk>.refl_gloss_paramName : string

<adsk_Shd_MetallicPaint__adsk>.brdf_0_degree_refl_connected : boolean

<adsk_Shd_MetallicPaint__adsk>.brdf_0_degree_refl_shader : texturemap

<adsk_Shd_MetallicPaint__adsk>.brdf_0_degree_refl_paramName : string

<adsk_Shd_MetallicPaint__adsk>.brdf_90_degree_refl_connected : boolean

<adsk_Shd_MetallicPaint__adsk>.brdf_90_degree_refl_shader : texturemap

<adsk_Shd_MetallicPaint__adsk>.brdf_90_degree_refl_paramName : string

<adsk_Shd_MetallicPaint__adsk>.brdf_curve_connected : boolean

<adsk_Shd_MetallicPaint__adsk>.brdf_curve_shader : texturemap

<adsk_Shd_MetallicPaint__adsk>.brdf_curve_paramName : string

<adsk_Shd_MetallicPaint__adsk>.flake_color_connected : boolean

<adsk_Shd_MetallicPaint__adsk>.flake_color_shader : texturemap

<adsk_Shd_MetallicPaint__adsk>.flake_color_paramName : string

<adsk_Shd_MetallicPaint__adsk>.flake_weight_connected : boolean

<adsk_Shd_MetallicPaint__adsk>.flake_weight_shader : texturemap

<adsk_Shd_MetallicPaint__adsk>.flake_weight_paramName : string

<adsk_Shd_MetallicPaint__adsk>.flake_exp_connected : boolean

<adsk_Shd_MetallicPaint__adsk>.flake_exp_shader : texturemap

<adsk_Shd_MetallicPaint__adsk>.flake_exp_paramName : string

<adsk_Shd_MetallicPaint__adsk>.flake_reflect_connected : boolean

<adsk_Shd_MetallicPaint__adsk>.flake_reflect_shader : texturemap

<adsk_Shd_MetallicPaint__adsk>.flake_reflect_paramName : string

<adsk_Shd_MetallicPaint__adsk>.flake_decay_connected : boolean

<adsk_Shd_MetallicPaint__adsk>.flake_decay_shader : texturemap

<adsk_Shd_MetallicPaint__adsk>.flake_decay_paramName : string

<adsk_Shd_MetallicPaint__adsk>.flake_density_connected : boolean

<adsk_Shd_MetallicPaint__adsk>.flake_density_shader : texturemap

<adsk_Shd_MetallicPaint__adsk>.flake_density_paramName : string

<adsk_Shd_MetallicPaint__adsk>.flake_strength_connected : boolean

<adsk_Shd_MetallicPaint__adsk>.flake_strength_shader : texturemap

<adsk_Shd_MetallicPaint__adsk>.flake_strength_paramName : string

<adsk_Shd_MetallicPaint__adsk>.flake_scale_connected : boolean

<adsk_Shd_MetallicPaint__adsk>.flake_scale_shader : texturemap

<adsk_Shd_MetallicPaint__adsk>.flake_scale_paramName : string

<adsk_Shd_MetallicPaint__adsk>.spec_glazing_connected : boolean

<adsk_Shd_MetallicPaint__adsk>.spec_glazing_shader : texturemap

<adsk_Shd_MetallicPaint__adsk>.spec_glazing_paramName : string

<adsk_Shd_MetallicPaint__adsk>.ao_samples_connected : boolean

<adsk_Shd_MetallicPaint__adsk>.ao_samples_shader : texturemap

<adsk_Shd_MetallicPaint__adsk>.ao_samples_paramName : string

<adsk_Shd_MetallicPaint__adsk>.ao_distance_connected : boolean

<adsk_Shd_MetallicPaint__adsk>.ao_distance_shader : texturemap

<adsk_Shd_MetallicPaint__adsk>.ao_distance_paramName : string

<adsk_Shd_MetallicPaint__adsk>.ao_dark_connected : boolean

<adsk_Shd_MetallicPaint__adsk>.ao_dark_shader : texturemap

<adsk_Shd_MetallicPaint__adsk>.ao_dark_paramName : string

<adsk_Shd_MetallicPaint__adsk>.ao_switcher_connected : boolean

<adsk_Shd_MetallicPaint__adsk>.ao_switcher_shader : texturemap

<adsk_Shd_MetallicPaint__adsk>.ao_switcher_paramName : string

<adsk_Shd_MetallicPaint__adsk>.roundcorners_radius_connected : boolean

<adsk_Shd_MetallicPaint__adsk>.roundcorners_radius_shader : texturemap

<adsk_Shd_MetallicPaint__adsk>.roundcorners_radius_paramName : string

<adsk_Shd_MetallicPaint__adsk>.roundcorners_allow_different_materials_connected : boolean

<adsk_Shd_MetallicPaint__adsk>.roundcorners_allow_different_materials_shader : texturemap

<adsk_Shd_MetallicPaint__adsk>.roundcorners_allow_different_materials_paramName : string

<adsk_Shd_MetallicPaint__adsk>.TheList : maxObject array

<adsk_Shd_MetallicPaint__adsk>.Shader_Version : integer

adsk_Shd_MetallicPaint__adsk interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_Shd_MetallicPaint_spider : textureMap

adsk_Shd_MetallicPaint_spider : textureMap {7773161f,b33a9f22}

Constructor:

adsk_Shd_MetallicPaint_spider: class instances not creatable by MAXScript

Properties:

<adsk_Shd_MetallicPaint_spider>.type : integer

<adsk_Shd_MetallicPaint_spider>.ao_on : boolean

<adsk_Shd_MetallicPaint_spider>.flake_enable : integer

<adsk_Shd_MetallicPaint_spider>.ao_distance : float

<adsk_Shd_MetallicPaint_spider>.roundcorners_radius : float

<adsk_Shd_MetallicPaint_spider>.Structure : paramBlock2

<adsk_Shd_MetallicPaint_spider>.refl_gloss : float

<adsk_Shd_MetallicPaint_spider>.glazing_enable : boolean

<adsk_Shd_MetallicPaint_spider>.flake_switcher : float

<adsk_Shd_MetallicPaint_spider>.ao_switcher : float

<adsk_Shd_MetallicPaint_spider>.flake_scale : float

<adsk_Shd_MetallicPaint_spider>.ao_distance : float

<adsk_Shd_MetallicPaint_spider>.roundcorners_radius : float

<adsk_Shd_MetallicPaint_spider>.type_connected : boolean

<adsk_Shd_MetallicPaint_spider>.type_shader : texturemap

<adsk_Shd_MetallicPaint_spider>.type_paramName : string

<adsk_Shd_MetallicPaint_spider>.ao_on_connected : boolean

<adsk_Shd_MetallicPaint_spider>.ao_on_shader : texturemap

<adsk_Shd_MetallicPaint_spider>.ao_on_paramName : string

<adsk_Shd_MetallicPaint_spider>.flake_enable_connected : boolean

<adsk_Shd_MetallicPaint_spider>.flake_enable_shader : texturemap

<adsk_Shd_MetallicPaint_spider>.flake_enable_paramName : string

<adsk_Shd_MetallicPaint_spider>.ao_distance_connected : boolean

<adsk_Shd_MetallicPaint_spider>.ao_distance_shader : texturemap

<adsk_Shd_MetallicPaint_spider>.ao_distance_paramName : string

<adsk_Shd_MetallicPaint_spider>.roundcorners_radius_connected : boolean

<adsk_Shd_MetallicPaint_spider>.roundcorners_radius_shader : texturemap

<adsk_Shd_MetallicPaint_spider>.roundcorners_radius_paramName : string

<adsk_Shd_MetallicPaint_spider>.TheList : maxObject array

<adsk_Shd_MetallicPaint_spider>.Shader_Version : integer

adsk_Shd_MetallicPaint_spider interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_Shd_Mirror_spider : textureMap

adsk_Shd_Mirror_spider : textureMap {7773161f,8c5b5b18}

Constructor:

adsk_Shd_Mirror_spider: class instances not creatable by MAXScript

Properties:

<adsk_Shd_Mirror_spider>.roundcorners_on : boolean

<adsk_Shd_Mirror_spider>.roundcorners_radius : float

<adsk_Shd_Mirror_spider>.Structure : paramBlock2

<adsk_Shd_Mirror_spider>.roundcorners_on_connected : boolean

<adsk_Shd_Mirror_spider>.roundcorners_on_shader : texturemap

<adsk_Shd_Mirror_spider>.roundcorners_on_paramName : string

<adsk_Shd_Mirror_spider>.roundcorners_radius : float

<adsk_Shd_Mirror_spider>.roundcorners_radius_connected : boolean

<adsk_Shd_Mirror_spider>.roundcorners_radius_shader : texturemap

<adsk_Shd_Mirror_spider>.roundcorners_radius_paramName : string

<adsk_Shd_Mirror_spider>.TheList : maxObject array

<adsk_Shd_Mirror_spider>.Shader_Version : integer

adsk_Shd_Mirror_spider interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_Shd_PlasticVinyl : textureMap

adsk_Shd_PlasticVinyl : textureMap {7773161f,ba62be3b}

Constructor:

adsk_Shd_PlasticVinyl: class instances not creatable by MAXScript

Properties:

<adsk_Shd_PlasticVinyl>.m : paramBlock2

<adsk_Shd_PlasticVinyl>.o : paramBlock2

<adsk_Shd_PlasticVinyl>.r : paramBlock2

<adsk_Shd_PlasticVinyl>.p : paramBlock2

<adsk_Shd_PlasticVinyl>.mode : integer

<adsk_Shd_PlasticVinyl>.lights : node array

<adsk_Shd_PlasticVinyl>.Use_lights : boolean

<adsk_Shd_PlasticVinyl>.ImplicitLights : node array

<adsk_Shd_PlasticVinyl>.diffuse_color : fRGBA color

<adsk_Shd_PlasticVinyl>.diffuse_roughness : float

<adsk_Shd_PlasticVinyl>.reflectivity : float

<adsk_Shd_PlasticVinyl>.refl_gloss : float

<adsk_Shd_PlasticVinyl>.brdf_0_degree_refl : float

<adsk_Shd_PlasticVinyl>.brdf_curve : float

<adsk_Shd_PlasticVinyl>.transparency : float

<adsk_Shd_PlasticVinyl>.refr_gloss : float

<adsk_Shd_PlasticVinyl>.refr_translucency : boolean

<adsk_Shd_PlasticVinyl>.refr_trans_weight : float

<adsk_Shd_PlasticVinyl>.bump_enable : integer

<adsk_Shd_PlasticVinyl>.bump_map : texturemap

<adsk_Shd_PlasticVinyl>.bump_amount : float

<adsk_Shd_PlasticVinyl>.pattern_enable : integer

<adsk_Shd_PlasticVinyl>.pattern_map : texturemap

<adsk_Shd_PlasticVinyl>.pattern_amount : float

<adsk_Shd_PlasticVinyl>.ao_on : boolean

<adsk_Shd_PlasticVinyl>.ao_samples : integer

<adsk_Shd_PlasticVinyl>.ao_distance : float

<adsk_Shd_PlasticVinyl>.ao_do_details : integer

<adsk_Shd_PlasticVinyl>.roundcorners_radius : float

<adsk_Shd_PlasticVinyl>.roundcorners_allow_different_materials : boolean

<adsk_Shd_PlasticVinyl>.reflection_glossy_samples : integer

<adsk_Shd_PlasticVinyl>.refraction_glossy_samples : integer

<adsk_Shd_PlasticVinyl>.refl_depth : integer

<adsk_Shd_PlasticVinyl>.refr_depth : integer

<adsk_Shd_PlasticVinyl>.Structure : paramBlock2

<adsk_Shd_PlasticVinyl>.result : fRGBA color

<adsk_Shd_PlasticVinyl>.diffuse_result : fRGBA color

<adsk_Shd_PlasticVinyl>.diffuse_raw : fRGBA color

<adsk_Shd_PlasticVinyl>.diffuse_level : fRGBA color

<adsk_Shd_PlasticVinyl>.spec_result : fRGBA color

<adsk_Shd_PlasticVinyl>.spec_raw : fRGBA color

<adsk_Shd_PlasticVinyl>.spec_level : fRGBA color

<adsk_Shd_PlasticVinyl>.refl_result : fRGBA color

<adsk_Shd_PlasticVinyl>.refl_raw : fRGBA color

<adsk_Shd_PlasticVinyl>.refl_level : fRGBA color

<adsk_Shd_PlasticVinyl>.refr_result : fRGBA color

<adsk_Shd_PlasticVinyl>.refr_raw : fRGBA color

<adsk_Shd_PlasticVinyl>.refr_level : fRGBA color

<adsk_Shd_PlasticVinyl>.tran_result : fRGBA color

<adsk_Shd_PlasticVinyl>.tran_raw : fRGBA color

<adsk_Shd_PlasticVinyl>.tran_level : fRGBA color

<adsk_Shd_PlasticVinyl>.indirect_result : fRGBA color

<adsk_Shd_PlasticVinyl>.indirect_raw : fRGBA color

<adsk_Shd_PlasticVinyl>.indirect_post_ao : fRGBA color

<adsk_Shd_PlasticVinyl>.ao_raw : fRGBA color

<adsk_Shd_PlasticVinyl>.add_result : fRGBA color

<adsk_Shd_PlasticVinyl>.opacity_result : fRGBA color

<adsk_Shd_PlasticVinyl>.opacity_raw : fRGBA color

<adsk_Shd_PlasticVinyl>.opacity : float

<adsk_Shd_PlasticVinyl>.Connection_struct__0000__m : paramBlock2

<adsk_Shd_PlasticVinyl>.Connection_struct__0001__o : paramBlock2

<adsk_Shd_PlasticVinyl>.Connection_struct__0002__r : paramBlock2

<adsk_Shd_PlasticVinyl>.Connection_struct__0003__p : paramBlock2

<adsk_Shd_PlasticVinyl>.diffuse_color_connected : boolean

<adsk_Shd_PlasticVinyl>.diffuse_color_shader : texturemap

<adsk_Shd_PlasticVinyl>.diffuse_color_paramName : string

<adsk_Shd_PlasticVinyl>.diffuse_roughness_connected : boolean

<adsk_Shd_PlasticVinyl>.diffuse_roughness_shader : texturemap

<adsk_Shd_PlasticVinyl>.diffuse_roughness_paramName : string

<adsk_Shd_PlasticVinyl>.reflectivity_connected : boolean

<adsk_Shd_PlasticVinyl>.reflectivity_shader : texturemap

<adsk_Shd_PlasticVinyl>.reflectivity_paramName : string

<adsk_Shd_PlasticVinyl>.refl_gloss_connected : boolean

<adsk_Shd_PlasticVinyl>.refl_gloss_shader : texturemap

<adsk_Shd_PlasticVinyl>.refl_gloss_paramName : string

<adsk_Shd_PlasticVinyl>.brdf_0_degree_refl_connected : boolean

<adsk_Shd_PlasticVinyl>.brdf_0_degree_refl_shader : texturemap

<adsk_Shd_PlasticVinyl>.brdf_0_degree_refl_paramName : string

<adsk_Shd_PlasticVinyl>.brdf_curve_connected : boolean

<adsk_Shd_PlasticVinyl>.brdf_curve_shader : texturemap

<adsk_Shd_PlasticVinyl>.brdf_curve_paramName : string

<adsk_Shd_PlasticVinyl>.transparency_connected : boolean

<adsk_Shd_PlasticVinyl>.transparency_shader : texturemap

<adsk_Shd_PlasticVinyl>.transparency_paramName : string

<adsk_Shd_PlasticVinyl>.refr_gloss_connected : boolean

<adsk_Shd_PlasticVinyl>.refr_gloss_shader : texturemap

<adsk_Shd_PlasticVinyl>.refr_gloss_paramName : string

<adsk_Shd_PlasticVinyl>.refr_translucency_connected : boolean

<adsk_Shd_PlasticVinyl>.refr_translucency_shader : texturemap

<adsk_Shd_PlasticVinyl>.refr_translucency_paramName : string

<adsk_Shd_PlasticVinyl>.refr_trans_weight_connected : boolean

<adsk_Shd_PlasticVinyl>.refr_trans_weight_shader : texturemap

<adsk_Shd_PlasticVinyl>.refr_trans_weight_paramName : string

<adsk_Shd_PlasticVinyl>.bump_enable_connected : boolean

<adsk_Shd_PlasticVinyl>.bump_enable_shader : texturemap

<adsk_Shd_PlasticVinyl>.bump_enable_paramName : string

<adsk_Shd_PlasticVinyl>.bump_amount_connected : boolean

<adsk_Shd_PlasticVinyl>.bump_amount_shader : texturemap

<adsk_Shd_PlasticVinyl>.bump_amount_paramName : string

<adsk_Shd_PlasticVinyl>.pattern_enable_connected : boolean

<adsk_Shd_PlasticVinyl>.pattern_enable_shader : texturemap

<adsk_Shd_PlasticVinyl>.pattern_enable_paramName : string

<adsk_Shd_PlasticVinyl>.pattern_amount_connected : boolean

<adsk_Shd_PlasticVinyl>.pattern_amount_shader : texturemap

<adsk_Shd_PlasticVinyl>.pattern_amount_paramName : string

<adsk_Shd_PlasticVinyl>.ao_on_connected : boolean

<adsk_Shd_PlasticVinyl>.ao_on_shader : texturemap

<adsk_Shd_PlasticVinyl>.ao_on_paramName : string

<adsk_Shd_PlasticVinyl>.ao_samples_connected : boolean

<adsk_Shd_PlasticVinyl>.ao_samples_shader : texturemap

<adsk_Shd_PlasticVinyl>.ao_samples_paramName : string

<adsk_Shd_PlasticVinyl>.ao_distance_connected : boolean

<adsk_Shd_PlasticVinyl>.ao_distance_shader : texturemap

<adsk_Shd_PlasticVinyl>.ao_distance_paramName : string

<adsk_Shd_PlasticVinyl>.ao_do_details_connected : boolean

<adsk_Shd_PlasticVinyl>.ao_do_details_shader : texturemap

<adsk_Shd_PlasticVinyl>.ao_do_details_paramName : string

<adsk_Shd_PlasticVinyl>.roundcorners_radius_connected : boolean

<adsk_Shd_PlasticVinyl>.roundcorners_radius_shader : texturemap

<adsk_Shd_PlasticVinyl>.roundcorners_radius_paramName : string

<adsk_Shd_PlasticVinyl>.roundcorners_allow_different_materials_connected : boolean

<adsk_Shd_PlasticVinyl>.roundcorners_allow_different_materials_shader : texturemap

<adsk_Shd_PlasticVinyl>.roundcorners_allow_different_materials_paramName : string

<adsk_Shd_PlasticVinyl>.reflection_glossy_samples_connected : boolean

<adsk_Shd_PlasticVinyl>.reflection_glossy_samples_shader : texturemap

<adsk_Shd_PlasticVinyl>.reflection_glossy_samples_paramName : string

<adsk_Shd_PlasticVinyl>.refraction_glossy_samples_connected : boolean

<adsk_Shd_PlasticVinyl>.refraction_glossy_samples_shader : texturemap

<adsk_Shd_PlasticVinyl>.refraction_glossy_samples_paramName : string

<adsk_Shd_PlasticVinyl>.refl_depth_connected : boolean

<adsk_Shd_PlasticVinyl>.refl_depth_shader : texturemap

<adsk_Shd_PlasticVinyl>.refl_depth_paramName : string

<adsk_Shd_PlasticVinyl>.refr_depth_connected : boolean

<adsk_Shd_PlasticVinyl>.refr_depth_shader : texturemap

<adsk_Shd_PlasticVinyl>.refr_depth_paramName : string

<adsk_Shd_PlasticVinyl>.TheList : maxObject array

<adsk_Shd_PlasticVinyl>.Shader_Version : integer

adsk_Shd_PlasticVinyl interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_Shd_PlasticVinyl_spider : textureMap

adsk_Shd_PlasticVinyl_spider : textureMap {7773161f,bc588554}

Constructor:

adsk_Shd_PlasticVinyl_spider: class instances not creatable by MAXScript

Properties:

<adsk_Shd_PlasticVinyl_spider>.type : integer

<adsk_Shd_PlasticVinyl_spider>.application : integer

<adsk_Shd_PlasticVinyl_spider>.roundcorners_on : boolean

<adsk_Shd_PlasticVinyl_spider>.roundcorners_radius : float

<adsk_Shd_PlasticVinyl_spider>.ao_do_details : boolean

<adsk_Shd_PlasticVinyl_spider>.Structure : paramBlock2

<adsk_Shd_PlasticVinyl_spider>.diffuse_roughness : float

<adsk_Shd_PlasticVinyl_spider>.reflectivity : float

<adsk_Shd_PlasticVinyl_spider>.refl_gloss : float

<adsk_Shd_PlasticVinyl_spider>.brdf_0_degree_refl : float

<adsk_Shd_PlasticVinyl_spider>.brdf_curve : float

<adsk_Shd_PlasticVinyl_spider>.transparency : float

<adsk_Shd_PlasticVinyl_spider>.refr_gloss : float

<adsk_Shd_PlasticVinyl_spider>.refr_translucency : boolean

<adsk_Shd_PlasticVinyl_spider>.refr_trans_weight : float

<adsk_Shd_PlasticVinyl_spider>.roundcorners_radius : float

<adsk_Shd_PlasticVinyl_spider>.ao_do_details : integer

<adsk_Shd_PlasticVinyl_spider>.type_connected : boolean

<adsk_Shd_PlasticVinyl_spider>.type_shader : texturemap

<adsk_Shd_PlasticVinyl_spider>.type_paramName : string

<adsk_Shd_PlasticVinyl_spider>.application_connected : boolean

<adsk_Shd_PlasticVinyl_spider>.application_shader : texturemap

<adsk_Shd_PlasticVinyl_spider>.application_paramName : string

<adsk_Shd_PlasticVinyl_spider>.roundcorners_on_connected : boolean

<adsk_Shd_PlasticVinyl_spider>.roundcorners_on_shader : texturemap

<adsk_Shd_PlasticVinyl_spider>.roundcorners_on_paramName : string

<adsk_Shd_PlasticVinyl_spider>.roundcorners_radius_connected : boolean

<adsk_Shd_PlasticVinyl_spider>.roundcorners_radius_shader : texturemap

<adsk_Shd_PlasticVinyl_spider>.roundcorners_radius_paramName : string

<adsk_Shd_PlasticVinyl_spider>.ao_do_details_connected : boolean

<adsk_Shd_PlasticVinyl_spider>.ao_do_details_shader : texturemap

<adsk_Shd_PlasticVinyl_spider>.ao_do_details_paramName : string

<adsk_Shd_PlasticVinyl_spider>.TheList : maxObject array

<adsk_Shd_PlasticVinyl_spider>.Shader_Version : integer

adsk_Shd_PlasticVinyl_spider interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_Shd_SolidGlass : textureMap

adsk_Shd_SolidGlass : textureMap {7773161f,5532b77c}

Constructor:

adsk_Shd_SolidGlass: class instances not creatable by MAXScript

Properties:

<adsk_Shd_SolidGlass>.m : paramBlock2

<adsk_Shd_SolidGlass>.r : paramBlock2

<adsk_Shd_SolidGlass>.p : paramBlock2

<adsk_Shd_SolidGlass>.k : paramBlock2

<adsk_Shd_SolidGlass>.mode : integer

<adsk_Shd_SolidGlass>.lights : node array

<adsk_Shd_SolidGlass>.Use_lights : boolean

<adsk_Shd_SolidGlass>.ImplicitLights : node array

<adsk_Shd_SolidGlass>.refl_color : fRGBA color

<adsk_Shd_SolidGlass>.brdf_0_degree_refl : float

<adsk_Shd_SolidGlass>.refr_color : fRGBA color

<adsk_Shd_SolidGlass>.refr_ior : float

<adsk_Shd_SolidGlass>.refr_falloff_dist : float

<adsk_Shd_SolidGlass>.refr_falloff_color : fRGBA color

<adsk_Shd_SolidGlass>.refl_gloss : float

<adsk_Shd_SolidGlass>.refr_gloss : float

<adsk_Shd_SolidGlass>.bump_enable : integer

<adsk_Shd_SolidGlass>.bump_amount : float

<adsk_Shd_SolidGlass>.bump_map : texturemap

<adsk_Shd_SolidGlass>.roundcorners_radius : float

<adsk_Shd_SolidGlass>.roundcorners_allow_different_materials : boolean

<adsk_Shd_SolidGlass>.reflection_glossy_samples : integer

<adsk_Shd_SolidGlass>.refraction_glossy_samples : integer

<adsk_Shd_SolidGlass>.refl_depth : integer

<adsk_Shd_SolidGlass>.refr_depth : integer

<adsk_Shd_SolidGlass>.bumpwavy_tiling : point3

<adsk_Shd_SolidGlass>.bumprippled_tiling : point3

<adsk_Shd_SolidGlass>.Structure : paramBlock2

<adsk_Shd_SolidGlass>.result : fRGBA color

<adsk_Shd_SolidGlass>.diffuse_result : fRGBA color

<adsk_Shd_SolidGlass>.diffuse_raw : fRGBA color

<adsk_Shd_SolidGlass>.diffuse_level : fRGBA color

<adsk_Shd_SolidGlass>.spec_result : fRGBA color

<adsk_Shd_SolidGlass>.spec_raw : fRGBA color

<adsk_Shd_SolidGlass>.spec_level : fRGBA color

<adsk_Shd_SolidGlass>.refl_result : fRGBA color

<adsk_Shd_SolidGlass>.refl_raw : fRGBA color

<adsk_Shd_SolidGlass>.refl_level : fRGBA color

<adsk_Shd_SolidGlass>.refr_result : fRGBA color

<adsk_Shd_SolidGlass>.refr_raw : fRGBA color

<adsk_Shd_SolidGlass>.refr_level : fRGBA color

<adsk_Shd_SolidGlass>.tran_result : fRGBA color

<adsk_Shd_SolidGlass>.tran_raw : fRGBA color

<adsk_Shd_SolidGlass>.tran_level : fRGBA color

<adsk_Shd_SolidGlass>.indirect_result : fRGBA color

<adsk_Shd_SolidGlass>.indirect_raw : fRGBA color

<adsk_Shd_SolidGlass>.indirect_post_ao : fRGBA color

<adsk_Shd_SolidGlass>.ao_raw : fRGBA color

<adsk_Shd_SolidGlass>.add_result : fRGBA color

<adsk_Shd_SolidGlass>.opacity_result : fRGBA color

<adsk_Shd_SolidGlass>.opacity_raw : fRGBA color

<adsk_Shd_SolidGlass>.opacity : float

<adsk_Shd_SolidGlass>.Connection_struct__0000__m : paramBlock2

<adsk_Shd_SolidGlass>.Connection_struct__0001__r : paramBlock2

<adsk_Shd_SolidGlass>.Connection_struct__0002__p : paramBlock2

<adsk_Shd_SolidGlass>.Connection_struct__0003__k : paramBlock2

<adsk_Shd_SolidGlass>.refl_color_connected : boolean

<adsk_Shd_SolidGlass>.refl_color_shader : texturemap

<adsk_Shd_SolidGlass>.refl_color_paramName : string

<adsk_Shd_SolidGlass>.brdf_0_degree_refl_connected : boolean

<adsk_Shd_SolidGlass>.brdf_0_degree_refl_shader : texturemap

<adsk_Shd_SolidGlass>.brdf_0_degree_refl_paramName : string

<adsk_Shd_SolidGlass>.refr_color_connected : boolean

<adsk_Shd_SolidGlass>.refr_color_shader : texturemap

<adsk_Shd_SolidGlass>.refr_color_paramName : string

<adsk_Shd_SolidGlass>.refr_ior_connected : boolean

<adsk_Shd_SolidGlass>.refr_ior_shader : texturemap

<adsk_Shd_SolidGlass>.refr_ior_paramName : string

<adsk_Shd_SolidGlass>.refr_falloff_dist_connected : boolean

<adsk_Shd_SolidGlass>.refr_falloff_dist_shader : texturemap

<adsk_Shd_SolidGlass>.refr_falloff_dist_paramName : string

<adsk_Shd_SolidGlass>.refr_falloff_color_connected : boolean

<adsk_Shd_SolidGlass>.refr_falloff_color_shader : texturemap

<adsk_Shd_SolidGlass>.refr_falloff_color_paramName : string

<adsk_Shd_SolidGlass>.refl_gloss_connected : boolean

<adsk_Shd_SolidGlass>.refl_gloss_shader : texturemap

<adsk_Shd_SolidGlass>.refl_gloss_paramName : string

<adsk_Shd_SolidGlass>.refr_gloss_connected : boolean

<adsk_Shd_SolidGlass>.refr_gloss_shader : texturemap

<adsk_Shd_SolidGlass>.refr_gloss_paramName : string

<adsk_Shd_SolidGlass>.bump_enable_connected : boolean

<adsk_Shd_SolidGlass>.bump_enable_shader : texturemap

<adsk_Shd_SolidGlass>.bump_enable_paramName : string

<adsk_Shd_SolidGlass>.bump_amount_connected : boolean

<adsk_Shd_SolidGlass>.bump_amount_shader : texturemap

<adsk_Shd_SolidGlass>.bump_amount_paramName : string

<adsk_Shd_SolidGlass>.roundcorners_radius_connected : boolean

<adsk_Shd_SolidGlass>.roundcorners_radius_shader : texturemap

<adsk_Shd_SolidGlass>.roundcorners_radius_paramName : string

<adsk_Shd_SolidGlass>.roundcorners_allow_different_materials_connected : boolean

<adsk_Shd_SolidGlass>.roundcorners_allow_different_materials_shader : texturemap

<adsk_Shd_SolidGlass>.roundcorners_allow_different_materials_paramName : string

<adsk_Shd_SolidGlass>.reflection_glossy_samples_connected : boolean

<adsk_Shd_SolidGlass>.reflection_glossy_samples_shader : texturemap

<adsk_Shd_SolidGlass>.reflection_glossy_samples_paramName : string

<adsk_Shd_SolidGlass>.refraction_glossy_samples_connected : boolean

<adsk_Shd_SolidGlass>.refraction_glossy_samples_shader : texturemap

<adsk_Shd_SolidGlass>.refraction_glossy_samples_paramName : string

<adsk_Shd_SolidGlass>.refl_depth_connected : boolean

<adsk_Shd_SolidGlass>.refl_depth_shader : texturemap

<adsk_Shd_SolidGlass>.refl_depth_paramName : string

<adsk_Shd_SolidGlass>.refr_depth_connected : boolean

<adsk_Shd_SolidGlass>.refr_depth_shader : texturemap

<adsk_Shd_SolidGlass>.refr_depth_paramName : string

<adsk_Shd_SolidGlass>.bumpwavy_tiling_connected : boolean

<adsk_Shd_SolidGlass>.bumpwavy_tiling_shader : texturemap

<adsk_Shd_SolidGlass>.bumpwavy_tiling_paramName : string

<adsk_Shd_SolidGlass>.bumprippled_tiling_connected : boolean

<adsk_Shd_SolidGlass>.bumprippled_tiling_shader : texturemap

<adsk_Shd_SolidGlass>.bumprippled_tiling_paramName : string

<adsk_Shd_SolidGlass>.TheList : maxObject array

<adsk_Shd_SolidGlass>.Shader_Version : integer

adsk_Shd_SolidGlass interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_Shd_SolidGlass_spider : textureMap

adsk_Shd_SolidGlass_spider : textureMap {7773161f,7a1bb592}

Constructor:

adsk_Shd_SolidGlass_spider: class instances not creatable by MAXScript

Properties:

<adsk_Shd_SolidGlass_spider>.transmittance_color : integer

<adsk_Shd_SolidGlass_spider>.transmittance_map : fRGBA color

<adsk_Shd_SolidGlass_spider>.reflectance : float

<adsk_Shd_SolidGlass_spider>.refr_falloff_dist : float

<adsk_Shd_SolidGlass_spider>.glossiness : float

<adsk_Shd_SolidGlass_spider>.roundcorners_on : boolean

<adsk_Shd_SolidGlass_spider>.roundcorners_radius : float

<adsk_Shd_SolidGlass_spider>.Structure : paramBlock2

<adsk_Shd_SolidGlass_spider>.refl_color : fRGBA color

<adsk_Shd_SolidGlass_spider>.brdf_0_degree_refl : float

<adsk_Shd_SolidGlass_spider>.refr_color : fRGBA color

<adsk_Shd_SolidGlass_spider>.refr_falloff_dist : float

<adsk_Shd_SolidGlass_spider>.refr_falloff_color : fRGBA color

<adsk_Shd_SolidGlass_spider>.glossiness : float

<adsk_Shd_SolidGlass_spider>.ao_distance : float

<adsk_Shd_SolidGlass_spider>.roundcorners_radius : float

<adsk_Shd_SolidGlass_spider>.bumpwavy_tiling : point3

<adsk_Shd_SolidGlass_spider>.bumprippled_tiling : point3

<adsk_Shd_SolidGlass_spider>.dummy : integer

<adsk_Shd_SolidGlass_spider>.transmittance_color_connected : boolean

<adsk_Shd_SolidGlass_spider>.transmittance_color_shader : texturemap

<adsk_Shd_SolidGlass_spider>.transmittance_color_paramName : string

<adsk_Shd_SolidGlass_spider>.transmittance_map_connected : boolean

<adsk_Shd_SolidGlass_spider>.transmittance_map_shader : texturemap

<adsk_Shd_SolidGlass_spider>.transmittance_map_paramName : string

<adsk_Shd_SolidGlass_spider>.reflectance_connected : boolean

<adsk_Shd_SolidGlass_spider>.reflectance_shader : texturemap

<adsk_Shd_SolidGlass_spider>.reflectance_paramName : string

<adsk_Shd_SolidGlass_spider>.refr_falloff_dist_connected : boolean

<adsk_Shd_SolidGlass_spider>.refr_falloff_dist_shader : texturemap

<adsk_Shd_SolidGlass_spider>.refr_falloff_dist_paramName : string

<adsk_Shd_SolidGlass_spider>.glossiness_connected : boolean

<adsk_Shd_SolidGlass_spider>.glossiness_shader : texturemap

<adsk_Shd_SolidGlass_spider>.glossiness_paramName : string

<adsk_Shd_SolidGlass_spider>.roundcorners_on_connected : boolean

<adsk_Shd_SolidGlass_spider>.roundcorners_on_shader : texturemap

<adsk_Shd_SolidGlass_spider>.roundcorners_on_paramName : string

<adsk_Shd_SolidGlass_spider>.roundcorners_radius_connected : boolean

<adsk_Shd_SolidGlass_spider>.roundcorners_radius_shader : texturemap

<adsk_Shd_SolidGlass_spider>.roundcorners_radius_paramName : string

<adsk_Shd_SolidGlass_spider>.TheList : maxObject array

<adsk_Shd_SolidGlass_spider>.Shader_Version : integer

adsk_Shd_SolidGlass_spider interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_Shd_Stone : textureMap

adsk_Shd_Stone : textureMap {7773161f,a6614522}

Constructor:

adsk_Shd_Stone: class instances not creatable by MAXScript

Properties:

<adsk_Shd_Stone>.m : paramBlock2

<adsk_Shd_Stone>.o : paramBlock2

<adsk_Shd_Stone>.r : paramBlock2

<adsk_Shd_Stone>.p : paramBlock2

<adsk_Shd_Stone>.t : paramBlock2

<adsk_Shd_Stone>.u : paramBlock2

<adsk_Shd_Stone>.mode : integer

<adsk_Shd_Stone>.lights : node array

<adsk_Shd_Stone>.Use_lights : boolean

<adsk_Shd_Stone>.ImplicitLights : node array

<adsk_Shd_Stone>.diffuse_color : fRGBA color

<adsk_Shd_Stone>.diffuse_roughness : float

<adsk_Shd_Stone>.reflectivity : float

<adsk_Shd_Stone>.refl_gloss : float

<adsk_Shd_Stone>.brdf_0_degree_refl : float

<adsk_Shd_Stone>.brdf_curve : float

<adsk_Shd_Stone>.refl_hl_only : boolean

<adsk_Shd_Stone>.bump_enable : integer

<adsk_Shd_Stone>.bump_amount : float

<adsk_Shd_Stone>.bump_map : texturemap

<adsk_Shd_Stone>.pattern_enable : integer

<adsk_Shd_Stone>.pattern_amount : float

<adsk_Shd_Stone>.pattern_map : texturemap

<adsk_Shd_Stone>.ao_on : boolean

<adsk_Shd_Stone>.ao_samples : integer

<adsk_Shd_Stone>.ao_distance : float

<adsk_Shd_Stone>.ao_do_details : integer

<adsk_Shd_Stone>.roundcorners_radius : float

<adsk_Shd_Stone>.roundcorners_allow_different_materials : boolean

<adsk_Shd_Stone>.reflection_glossy_samples : integer

<adsk_Shd_Stone>.refl_depth : integer

<adsk_Shd_Stone>.granite_tex : filename

<adsk_Shd_Stone>.Image_Frame_Number : integer

<adsk_Shd_Stone>.stonewall_tex : filename

<adsk_Shd_Stone>.Image_Frame_Number : integer

<adsk_Shd_Stone>.marble_tex : filename

<adsk_Shd_Stone>.Image_Frame_Number : integer

<adsk_Shd_Stone>.uv_channel : integer

<adsk_Shd_Stone>.u_scale : float

<adsk_Shd_Stone>.v_scale : float

<adsk_Shd_Stone>.Structure : paramBlock2

<adsk_Shd_Stone>.result : fRGBA color

<adsk_Shd_Stone>.diffuse_result : fRGBA color

<adsk_Shd_Stone>.diffuse_raw : fRGBA color

<adsk_Shd_Stone>.diffuse_level : fRGBA color

<adsk_Shd_Stone>.spec_result : fRGBA color

<adsk_Shd_Stone>.spec_raw : fRGBA color

<adsk_Shd_Stone>.spec_level : fRGBA color

<adsk_Shd_Stone>.refl_result : fRGBA color

<adsk_Shd_Stone>.refl_raw : fRGBA color

<adsk_Shd_Stone>.refl_level : fRGBA color

<adsk_Shd_Stone>.refr_result : fRGBA color

<adsk_Shd_Stone>.refr_raw : fRGBA color

<adsk_Shd_Stone>.refr_level : fRGBA color

<adsk_Shd_Stone>.tran_result : fRGBA color

<adsk_Shd_Stone>.tran_raw : fRGBA color

<adsk_Shd_Stone>.tran_level : fRGBA color

<adsk_Shd_Stone>.indirect_result : fRGBA color

<adsk_Shd_Stone>.indirect_raw : fRGBA color

<adsk_Shd_Stone>.indirect_post_ao : fRGBA color

<adsk_Shd_Stone>.ao_raw : fRGBA color

<adsk_Shd_Stone>.add_result : fRGBA color

<adsk_Shd_Stone>.opacity_result : fRGBA color

<adsk_Shd_Stone>.opacity_raw : fRGBA color

<adsk_Shd_Stone>.opacity : float

<adsk_Shd_Stone>.Connection_struct__0000__m : paramBlock2

<adsk_Shd_Stone>.Connection_struct__0001__o : paramBlock2

<adsk_Shd_Stone>.Connection_struct__0002__r : paramBlock2

<adsk_Shd_Stone>.Connection_struct__0003__p : paramBlock2

<adsk_Shd_Stone>.Connection_struct__0004__t : paramBlock2

<adsk_Shd_Stone>.Connection_struct__0005__u : paramBlock2

<adsk_Shd_Stone>.diffuse_color_connected : boolean

<adsk_Shd_Stone>.diffuse_color_shader : texturemap

<adsk_Shd_Stone>.diffuse_color_paramName : string

<adsk_Shd_Stone>.diffuse_roughness_connected : boolean

<adsk_Shd_Stone>.diffuse_roughness_shader : texturemap

<adsk_Shd_Stone>.diffuse_roughness_paramName : string

<adsk_Shd_Stone>.reflectivity_connected : boolean

<adsk_Shd_Stone>.reflectivity_shader : texturemap

<adsk_Shd_Stone>.reflectivity_paramName : string

<adsk_Shd_Stone>.refl_gloss_connected : boolean

<adsk_Shd_Stone>.refl_gloss_shader : texturemap

<adsk_Shd_Stone>.refl_gloss_paramName : string

<adsk_Shd_Stone>.brdf_0_degree_refl_connected : boolean

<adsk_Shd_Stone>.brdf_0_degree_refl_shader : texturemap

<adsk_Shd_Stone>.brdf_0_degree_refl_paramName : string

<adsk_Shd_Stone>.brdf_curve_connected : boolean

<adsk_Shd_Stone>.brdf_curve_shader : texturemap

<adsk_Shd_Stone>.brdf_curve_paramName : string

<adsk_Shd_Stone>.refl_hl_only_connected : boolean

<adsk_Shd_Stone>.refl_hl_only_shader : texturemap

<adsk_Shd_Stone>.refl_hl_only_paramName : string

<adsk_Shd_Stone>.bump_enable_connected : boolean

<adsk_Shd_Stone>.bump_enable_shader : texturemap

<adsk_Shd_Stone>.bump_enable_paramName : string

<adsk_Shd_Stone>.bump_amount_connected : boolean

<adsk_Shd_Stone>.bump_amount_shader : texturemap

<adsk_Shd_Stone>.bump_amount_paramName : string

<adsk_Shd_Stone>.pattern_enable_connected : boolean

<adsk_Shd_Stone>.pattern_enable_shader : texturemap

<adsk_Shd_Stone>.pattern_enable_paramName : string

<adsk_Shd_Stone>.pattern_amount_connected : boolean

<adsk_Shd_Stone>.pattern_amount_shader : texturemap

<adsk_Shd_Stone>.pattern_amount_paramName : string

<adsk_Shd_Stone>.ao_on_connected : boolean

<adsk_Shd_Stone>.ao_on_shader : texturemap

<adsk_Shd_Stone>.ao_on_paramName : string

<adsk_Shd_Stone>.ao_samples_connected : boolean

<adsk_Shd_Stone>.ao_samples_shader : texturemap

<adsk_Shd_Stone>.ao_samples_paramName : string

<adsk_Shd_Stone>.ao_distance_connected : boolean

<adsk_Shd_Stone>.ao_distance_shader : texturemap

<adsk_Shd_Stone>.ao_distance_paramName : string

<adsk_Shd_Stone>.ao_do_details_connected : boolean

<adsk_Shd_Stone>.ao_do_details_shader : texturemap

<adsk_Shd_Stone>.ao_do_details_paramName : string

<adsk_Shd_Stone>.roundcorners_radius_connected : boolean

<adsk_Shd_Stone>.roundcorners_radius_shader : texturemap

<adsk_Shd_Stone>.roundcorners_radius_paramName : string

<adsk_Shd_Stone>.roundcorners_allow_different_materials_connected : boolean

<adsk_Shd_Stone>.roundcorners_allow_different_materials_shader : texturemap

<adsk_Shd_Stone>.roundcorners_allow_different_materials_paramName : string

<adsk_Shd_Stone>.reflection_glossy_samples_connected : boolean

<adsk_Shd_Stone>.reflection_glossy_samples_shader : texturemap

<adsk_Shd_Stone>.reflection_glossy_samples_paramName : string

<adsk_Shd_Stone>.refl_depth_connected : boolean

<adsk_Shd_Stone>.refl_depth_shader : texturemap

<adsk_Shd_Stone>.refl_depth_paramName : string

<adsk_Shd_Stone>.granite_tex_connected : boolean

<adsk_Shd_Stone>.granite_tex_shader : texturemap

<adsk_Shd_Stone>.granite_tex_paramName : string

<adsk_Shd_Stone>.stonewall_tex_connected : boolean

<adsk_Shd_Stone>.stonewall_tex_shader : texturemap

<adsk_Shd_Stone>.stonewall_tex_paramName : string

<adsk_Shd_Stone>.marble_tex_connected : boolean

<adsk_Shd_Stone>.marble_tex_shader : texturemap

<adsk_Shd_Stone>.marble_tex_paramName : string

<adsk_Shd_Stone>.uv_channel_connected : boolean

<adsk_Shd_Stone>.uv_channel_shader : texturemap

<adsk_Shd_Stone>.uv_channel_paramName : string

<adsk_Shd_Stone>.u_scale_connected : boolean

<adsk_Shd_Stone>.u_scale_shader : texturemap

<adsk_Shd_Stone>.u_scale_paramName : string

<adsk_Shd_Stone>.v_scale_connected : boolean

<adsk_Shd_Stone>.v_scale_shader : texturemap

<adsk_Shd_Stone>.v_scale_paramName : string

<adsk_Shd_Stone>.TheList : maxObject array

<adsk_Shd_Stone>.Shader_Version : integer

adsk_Shd_Stone interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_Shd_Stone_spider : textureMap

adsk_Shd_Stone_spider : textureMap {7773161f,bc46ac20}

Constructor:

adsk_Shd_Stone_spider: class instances not creatable by MAXScript

Properties:

<adsk_Shd_Stone_spider>.type : integer

<adsk_Shd_Stone_spider>.application : integer

<adsk_Shd_Stone_spider>.roundcorners_on : boolean

<adsk_Shd_Stone_spider>.roundcorners_radius : float

<adsk_Shd_Stone_spider>.ao_do_details : boolean

<adsk_Shd_Stone_spider>.Structure : paramBlock2

<adsk_Shd_Stone_spider>.diffuse_roughness : float

<adsk_Shd_Stone_spider>.reflectivity : float

<adsk_Shd_Stone_spider>.refl_gloss : float

<adsk_Shd_Stone_spider>.brdf_0_degree_refl : float

<adsk_Shd_Stone_spider>.brdf_curve : float

<adsk_Shd_Stone_spider>.refl_hl_only : boolean

<adsk_Shd_Stone_spider>.noise_tiling : point3

<adsk_Shd_Stone_spider>.roundcorners_radius : float

<adsk_Shd_Stone_spider>.type_connected : boolean

<adsk_Shd_Stone_spider>.type_shader : texturemap

<adsk_Shd_Stone_spider>.type_paramName : string

<adsk_Shd_Stone_spider>.application_connected : boolean

<adsk_Shd_Stone_spider>.application_shader : texturemap

<adsk_Shd_Stone_spider>.application_paramName : string

<adsk_Shd_Stone_spider>.ao_distance_connected : boolean

<adsk_Shd_Stone_spider>.ao_distance_shader : texturemap

<adsk_Shd_Stone_spider>.ao_distance_paramName : string

<adsk_Shd_Stone_spider>.roundcorners_on_connected : boolean

<adsk_Shd_Stone_spider>.roundcorners_on_shader : texturemap

<adsk_Shd_Stone_spider>.roundcorners_on_paramName : string

<adsk_Shd_Stone_spider>.roundcorners_radius_connected : boolean

<adsk_Shd_Stone_spider>.roundcorners_radius_shader : texturemap

<adsk_Shd_Stone_spider>.roundcorners_radius_paramName : string

<adsk_Shd_Stone_spider>.ao_do_details_connected : boolean

<adsk_Shd_Stone_spider>.ao_do_details_shader : texturemap

<adsk_Shd_Stone_spider>.ao_do_details_paramName : string

<adsk_Shd_Stone_spider>.TheList : maxObject array

<adsk_Shd_Stone_spider>.Shader_Version : integer

adsk_Shd_Stone_spider interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_Shd_WallPaint : textureMap

adsk_Shd_WallPaint : textureMap {7773161f,500d8876}

Constructor:

adsk_Shd_WallPaint: class instances not creatable by MAXScript

Properties:

<adsk_Shd_WallPaint>.m : paramBlock2

<adsk_Shd_WallPaint>.o : paramBlock2

<adsk_Shd_WallPaint>.r : paramBlock2

<adsk_Shd_WallPaint>.p : paramBlock2

<adsk_Shd_WallPaint>.x : paramBlock2

<adsk_Shd_WallPaint>.mode : integer

<adsk_Shd_WallPaint>.lights : node array

<adsk_Shd_WallPaint>.Use_lights : boolean

<adsk_Shd_WallPaint>.ImplicitLights : node array

<adsk_Shd_WallPaint>.diffuse_color : fRGBA color

<adsk_Shd_WallPaint>.diffuse_roughness : float

<adsk_Shd_WallPaint>.reflectivity : float

<adsk_Shd_WallPaint>.refl_gloss : float

<adsk_Shd_WallPaint>.brdf_curve : float

<adsk_Shd_WallPaint>.refl_hl_only : boolean

<adsk_Shd_WallPaint>.bump_amount : float

<adsk_Shd_WallPaint>.bump_map : float

<adsk_Shd_WallPaint>.ao_on : boolean

<adsk_Shd_WallPaint>.ao_samples : integer

<adsk_Shd_WallPaint>.ao_distance : float

<adsk_Shd_WallPaint>.ao_do_details : integer

<adsk_Shd_WallPaint>.roundcorners_radius : float

<adsk_Shd_WallPaint>.roundcorners_allow_different_materials : boolean

<adsk_Shd_WallPaint>.reflection_glossy_samples : integer

<adsk_Shd_WallPaint>.refl_depth : integer

<adsk_Shd_WallPaint>.noise_tiling : point3

<adsk_Shd_WallPaint>.brush_tiling : point3

<adsk_Shd_WallPaint>.cellular_tiling : point3

<adsk_Shd_WallPaint>.roller_tiling : point3

<adsk_Shd_WallPaint>.Structure : paramBlock2

<adsk_Shd_WallPaint>.result : fRGBA color

<adsk_Shd_WallPaint>.diffuse_result : fRGBA color

<adsk_Shd_WallPaint>.diffuse_raw : fRGBA color

<adsk_Shd_WallPaint>.diffuse_level : fRGBA color

<adsk_Shd_WallPaint>.spec_result : fRGBA color

<adsk_Shd_WallPaint>.spec_raw : fRGBA color

<adsk_Shd_WallPaint>.spec_level : fRGBA color

<adsk_Shd_WallPaint>.refl_result : fRGBA color

<adsk_Shd_WallPaint>.refl_raw : fRGBA color

<adsk_Shd_WallPaint>.refl_level : fRGBA color

<adsk_Shd_WallPaint>.refr_result : fRGBA color

<adsk_Shd_WallPaint>.refr_raw : fRGBA color

<adsk_Shd_WallPaint>.refr_level : fRGBA color

<adsk_Shd_WallPaint>.tran_result : fRGBA color

<adsk_Shd_WallPaint>.tran_raw : fRGBA color

<adsk_Shd_WallPaint>.tran_level : fRGBA color

<adsk_Shd_WallPaint>.indirect_result : fRGBA color

<adsk_Shd_WallPaint>.indirect_raw : fRGBA color

<adsk_Shd_WallPaint>.indirect_post_ao : fRGBA color

<adsk_Shd_WallPaint>.ao_raw : fRGBA color

<adsk_Shd_WallPaint>.add_result : fRGBA color

<adsk_Shd_WallPaint>.opacity_result : fRGBA color

<adsk_Shd_WallPaint>.opacity_raw : fRGBA color

<adsk_Shd_WallPaint>.opacity : float

<adsk_Shd_WallPaint>.Connection_struct__0000__m : paramBlock2

<adsk_Shd_WallPaint>.Connection_struct__0001__o : paramBlock2

<adsk_Shd_WallPaint>.Connection_struct__0002__r : paramBlock2

<adsk_Shd_WallPaint>.Connection_struct__0003__p : paramBlock2

<adsk_Shd_WallPaint>.Connection_struct__0004__x : paramBlock2

<adsk_Shd_WallPaint>.mode_connected : boolean

<adsk_Shd_WallPaint>.mode_shader : texturemap

<adsk_Shd_WallPaint>.mode_paramName : string

<adsk_Shd_WallPaint>.diffuse_color_connected : boolean

<adsk_Shd_WallPaint>.diffuse_color_shader : texturemap

<adsk_Shd_WallPaint>.diffuse_color_paramName : string

<adsk_Shd_WallPaint>.diffuse_roughness_connected : boolean

<adsk_Shd_WallPaint>.diffuse_roughness_shader : texturemap

<adsk_Shd_WallPaint>.diffuse_roughness_paramName : string

<adsk_Shd_WallPaint>.reflectivity_connected : boolean

<adsk_Shd_WallPaint>.reflectivity_shader : texturemap

<adsk_Shd_WallPaint>.reflectivity_paramName : string

<adsk_Shd_WallPaint>.refl_gloss_connected : boolean

<adsk_Shd_WallPaint>.refl_gloss_shader : texturemap

<adsk_Shd_WallPaint>.refl_gloss_paramName : string

<adsk_Shd_WallPaint>.brdf_curve_connected : boolean

<adsk_Shd_WallPaint>.brdf_curve_shader : texturemap

<adsk_Shd_WallPaint>.brdf_curve_paramName : string

<adsk_Shd_WallPaint>.refl_hl_only_connected : boolean

<adsk_Shd_WallPaint>.refl_hl_only_shader : texturemap

<adsk_Shd_WallPaint>.refl_hl_only_paramName : string

<adsk_Shd_WallPaint>.bump_amount_connected : boolean

<adsk_Shd_WallPaint>.bump_amount_shader : texturemap

<adsk_Shd_WallPaint>.bump_amount_paramName : string

<adsk_Shd_WallPaint>.bump_map_connected : boolean

<adsk_Shd_WallPaint>.bump_map_shader : texturemap

<adsk_Shd_WallPaint>.bump_map_paramName : string

<adsk_Shd_WallPaint>.ao_on_connected : boolean

<adsk_Shd_WallPaint>.ao_on_shader : texturemap

<adsk_Shd_WallPaint>.ao_on_paramName : string

<adsk_Shd_WallPaint>.ao_samples_connected : boolean

<adsk_Shd_WallPaint>.ao_samples_shader : texturemap

<adsk_Shd_WallPaint>.ao_samples_paramName : string

<adsk_Shd_WallPaint>.ao_distance_connected : boolean

<adsk_Shd_WallPaint>.ao_distance_shader : texturemap

<adsk_Shd_WallPaint>.ao_distance_paramName : string

<adsk_Shd_WallPaint>.ao_do_details_connected : boolean

<adsk_Shd_WallPaint>.ao_do_details_shader : texturemap

<adsk_Shd_WallPaint>.ao_do_details_paramName : string

<adsk_Shd_WallPaint>.roundcorners_radius_connected : boolean

<adsk_Shd_WallPaint>.roundcorners_radius_shader : texturemap

<adsk_Shd_WallPaint>.roundcorners_radius_paramName : string

<adsk_Shd_WallPaint>.roundcorners_allow_different_materials_connected : boolean

<adsk_Shd_WallPaint>.roundcorners_allow_different_materials_shader : texturemap

<adsk_Shd_WallPaint>.roundcorners_allow_different_materials_paramName : string

<adsk_Shd_WallPaint>.reflection_glossy_samples_connected : boolean

<adsk_Shd_WallPaint>.reflection_glossy_samples_shader : texturemap

<adsk_Shd_WallPaint>.reflection_glossy_samples_paramName : string

<adsk_Shd_WallPaint>.refl_depth_connected : boolean

<adsk_Shd_WallPaint>.refl_depth_shader : texturemap

<adsk_Shd_WallPaint>.refl_depth_paramName : string

<adsk_Shd_WallPaint>.noise_tiling_connected : boolean

<adsk_Shd_WallPaint>.noise_tiling_shader : texturemap

<adsk_Shd_WallPaint>.noise_tiling_paramName : string

<adsk_Shd_WallPaint>.brush_tiling_connected : boolean

<adsk_Shd_WallPaint>.brush_tiling_shader : texturemap

<adsk_Shd_WallPaint>.brush_tiling_paramName : string

<adsk_Shd_WallPaint>.cellular_tiling_connected : boolean

<adsk_Shd_WallPaint>.cellular_tiling_shader : texturemap

<adsk_Shd_WallPaint>.cellular_tiling_paramName : string

<adsk_Shd_WallPaint>.roller_tiling_connected : boolean

<adsk_Shd_WallPaint>.roller_tiling_shader : texturemap

<adsk_Shd_WallPaint>.roller_tiling_paramName : string

<adsk_Shd_WallPaint>.TheList : maxObject array

<adsk_Shd_WallPaint>.Shader_Version : integer

adsk_Shd_WallPaint interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_Shd_WallPaint_spider : textureMap

adsk_Shd_WallPaint_spider : textureMap {7773161f,62127174}

Constructor:

adsk_Shd_WallPaint_spider: class instances not creatable by MAXScript

Properties:

<adsk_Shd_WallPaint_spider>.finish : integer

<adsk_Shd_WallPaint_spider>.application : integer

<adsk_Shd_WallPaint_spider>.roundcorners_on : boolean

<adsk_Shd_WallPaint_spider>.roundcorners_radius : float

<adsk_Shd_WallPaint_spider>.ao_do_details : boolean

<adsk_Shd_WallPaint_spider>.Structure : paramBlock2

<adsk_Shd_WallPaint_spider>.diffuse_roughness : float

<adsk_Shd_WallPaint_spider>.reflectivity : float

<adsk_Shd_WallPaint_spider>.refl_gloss : float

<adsk_Shd_WallPaint_spider>.brdf_curve : float

<adsk_Shd_WallPaint_spider>.refl_hl_only : boolean

<adsk_Shd_WallPaint_spider>.bump_amount : float

<adsk_Shd_WallPaint_spider>.bump_map : float

<adsk_Shd_WallPaint_spider>.roundcorners_radius : float

<adsk_Shd_WallPaint_spider>.ao_do_details : integer

<adsk_Shd_WallPaint_spider>.noise_tiling : point3

<adsk_Shd_WallPaint_spider>.brush_tiling : point3

<adsk_Shd_WallPaint_spider>.cellular_tiling : point3

<adsk_Shd_WallPaint_spider>.roller_tiling : point3

<adsk_Shd_WallPaint_spider>.finish_connected : boolean

<adsk_Shd_WallPaint_spider>.finish_shader : texturemap

<adsk_Shd_WallPaint_spider>.finish_paramName : string

<adsk_Shd_WallPaint_spider>.application_connected : boolean

<adsk_Shd_WallPaint_spider>.application_shader : texturemap

<adsk_Shd_WallPaint_spider>.application_paramName : string

<adsk_Shd_WallPaint_spider>.roundcorners_on_connected : boolean

<adsk_Shd_WallPaint_spider>.roundcorners_on_shader : texturemap

<adsk_Shd_WallPaint_spider>.roundcorners_on_paramName : string

<adsk_Shd_WallPaint_spider>.roundcorners_radius_connected : boolean

<adsk_Shd_WallPaint_spider>.roundcorners_radius_shader : texturemap

<adsk_Shd_WallPaint_spider>.roundcorners_radius_paramName : string

<adsk_Shd_WallPaint_spider>.ao_do_details_connected : boolean

<adsk_Shd_WallPaint_spider>.ao_do_details_shader : texturemap

<adsk_Shd_WallPaint_spider>.ao_do_details_paramName : string

<adsk_Shd_WallPaint_spider>.TheList : maxObject array

<adsk_Shd_WallPaint_spider>.Shader_Version : integer

adsk_Shd_WallPaint_spider interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_Shd_Water_spider : textureMap

adsk_Shd_Water_spider : textureMap {7773161f,b333bf19}

adsk_Shd_Water_spider: class instances not creatable by MAXScript

Properties:

<adsk_Shd_Water_spider>.type : integer

<adsk_Shd_Water_spider>.color_tint : integer

<adsk_Shd_Water_spider>.custom_color : fRGBA color

<adsk_Shd_Water_spider>.roundcorners_on : boolean

<adsk_Shd_Water_spider>.roundcorners_radius : float

<adsk_Shd_Water_spider>.ao_do_details : boolean

<adsk_Shd_Water_spider>.Structure : paramBlock2

<adsk_Shd_Water_spider>.refr_color : fRGBA color

<adsk_Shd_Water_spider>.refr_gloss : float

<adsk_Shd_Water_spider>.refr_falloff_on : boolean

<adsk_Shd_Water_spider>.refr_falloff_dist : float

<adsk_Shd_Water_spider>.refr_falloff_color_on : boolean

<adsk_Shd_Water_spider>.refr_falloff_color : fRGBA color

<adsk_Shd_Water_spider>.submerge_color : fRGBA color

<adsk_Shd_Water_spider>.submerge_rgblevel : float

<adsk_Shd_Water_spider>.submerge_density : float

<adsk_Shd_Water_spider>.submerge_distance : float

<adsk_Shd_Water_spider>.ocean_largest : float

<adsk_Shd_Water_spider>.ocean_smallest : float

<adsk_Shd_Water_spider>.ocean_quantity : integer

<adsk_Shd_Water_spider>.ocean_size : float

<adsk_Shd_Water_spider>.roundcorners_radius : float

<adsk_Shd_Water_spider>.ao_do_details : integer

<adsk_Shd_Water_spider>.type_connected : boolean

<adsk_Shd_Water_spider>.type_shader : texturemap

<adsk_Shd_Water_spider>.type_paramName : string

<adsk_Shd_Water_spider>.color_tint_connected : boolean

<adsk_Shd_Water_spider>.color_tint_shader : texturemap

<adsk_Shd_Water_spider>.color_tint_paramName : string

<adsk_Shd_Water_spider>.custom_color_connected : boolean

<adsk_Shd_Water_spider>.custom_color_shader : texturemap

<adsk_Shd_Water_spider>.custom_color_paramName : string

<adsk_Shd_Water_spider>.roundcorners_on_connected : boolean

<adsk_Shd_Water_spider>.roundcorners_on_shader : texturemap

<adsk_Shd_Water_spider>.roundcorners_on_paramName : string

<adsk_Shd_Water_spider>.roundcorners_radius_connected : boolean

<adsk_Shd_Water_spider>.roundcorners_radius_shader : texturemap

<adsk_Shd_Water_spider>.roundcorners_radius_paramName : string

<adsk_Shd_Water_spider>.ao_do_details_connected : boolean

<adsk_Shd_Water_spider>.ao_do_details_shader : texturemap

<adsk_Shd_Water_spider>.ao_do_details_paramName : string

<adsk_Shd_Water_spider>.TheList : maxObject array

<adsk_Shd_Water_spider>.Shader_Version : integer

adsk_Shd_Water_spider interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_Tex_Concrete_SmoothBumpTex : textureMap

adsk_Tex_Concrete_SmoothBumpTex : textureMap {7773161f,c2206531}

Constructor:

adsk_Tex_Concrete_SmoothBumpTex: class instances not creatable by MAXScript

Properties:

<adsk_Tex_Concrete_SmoothBumpTex>.tiling : point3

<adsk_Tex_Concrete_SmoothBumpTex>.tiling_connected : boolean

<adsk_Tex_Concrete_SmoothBumpTex>.tiling_shader : texturemap

<adsk_Tex_Concrete_SmoothBumpTex>.tiling_paramName : string

<adsk_Tex_Concrete_SmoothBumpTex>.TheList : maxObject array

<adsk_Tex_Concrete_SmoothBumpTex>.Shader_Version : integer

adsk_Tex_Concrete_SmoothBumpTex interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_texture_lookup : textureMap

adsk_texture_lookup : textureMap {7773161f,5f6dc091}

Constructor:

adsk_texture_lookup: class instances not creatable by MAXScript

Properties:

<adsk_texture_lookup>.tex : filename

<adsk_texture_lookup>.Image_Frame_Number : integer

<adsk_texture_lookup>.coord : point3

<adsk_texture_lookup>.tex_connected : boolean

<adsk_texture_lookup>.tex_shader : texturemap

<adsk_texture_lookup>.tex_paramName : string

<adsk_texture_lookup>.coord_connected : boolean

<adsk_texture_lookup>.coord_shader : texturemap

<adsk_texture_lookup>.coord_paramName : string

<adsk_texture_lookup>.TheList : maxObject array

<adsk_texture_lookup>.Shader_Version : integer

adsk_texture_lookup interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_texture_placer : textureMap

adsk_texture_placer : textureMap {7773161f,5d6cb489}

Constructor:

adsk_texture_placer: class instances not creatable by MAXScript

Properties:

<adsk_texture_placer>.coord : point3

<adsk_texture_placer>.wrapU : boolean

<adsk_texture_placer>.wrapV : boolean

<adsk_texture_placer>.swapUV : boolean

<adsk_texture_placer>.translation : point3

<adsk_texture_placer>.rotation : point3

<adsk_texture_placer>.scaling : point3

<adsk_texture_placer>.rotationPivot : point3

<adsk_texture_placer>.scalingPivot : point3

<adsk_texture_placer>.coord_connected : boolean

<adsk_texture_placer>.coord_shader : texturemap

<adsk_texture_placer>.coord_paramName : string

<adsk_texture_placer>.wrapU_connected : boolean

<adsk_texture_placer>.wrapU_shader : texturemap

<adsk_texture_placer>.wrapU_paramName : string

<adsk_texture_placer>.wrapV_connected : boolean

<adsk_texture_placer>.wrapV_shader : texturemap

<adsk_texture_placer>.wrapV_paramName : string

<adsk_texture_placer>.swapUV_connected : boolean

<adsk_texture_placer>.swapUV_shader : texturemap

<adsk_texture_placer>.swapUV_paramName : string

<adsk_texture_placer>.translation_connected : boolean

<adsk_texture_placer>.translation_shader : texturemap

<adsk_texture_placer>.translation_paramName : string

<adsk_texture_placer>.rotation_connected : boolean

<adsk_texture_placer>.rotation_shader : texturemap

<adsk_texture_placer>.rotation_paramName : string

<adsk_texture_placer>.scaling_connected : boolean

<adsk_texture_placer>.scaling_shader : texturemap

<adsk_texture_placer>.scaling_paramName : string

<adsk_texture_placer>.rotationPivot_connected : boolean

<adsk_texture_placer>.rotationPivot_shader : texturemap

<adsk_texture_placer>.rotationPivot_paramName : string

<adsk_texture_placer>.scalingPivot_connected : boolean

<adsk_texture_placer>.scalingPivot_shader : texturemap

<adsk_texture_placer>.scalingPivot_paramName : string

<adsk_texture_placer>.TheList : maxObject array

<adsk_texture_placer>.Shader_Version : integer

adsk_texture_placer interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_Utility_Bitmap : textureMap

adsk_Utility_Bitmap : textureMap {7773161f,555cbf73}

Constructor:

adsk_Utility_Bitmap: class instances not creatable by MAXScript

Properties:

<adsk_Utility_Bitmap>.color_texture : filename

<adsk_Utility_Bitmap>.Image_Frame_Number : integer

<adsk_Utility_Bitmap>.UScale : float

<adsk_Utility_Bitmap>.VScale : float

<adsk_Utility_Bitmap>.color_texture_connected : boolean

<adsk_Utility_Bitmap>.color_texture_shader : texturemap

<adsk_Utility_Bitmap>.color_texture_paramName : string

<adsk_Utility_Bitmap>.UScale_connected : boolean

<adsk_Utility_Bitmap>.UScale_shader : texturemap

<adsk_Utility_Bitmap>.UScale_paramName : string

<adsk_Utility_Bitmap>.VScale_connected : boolean

<adsk_Utility_Bitmap>.VScale_shader : texturemap

<adsk_Utility_Bitmap>.VScale_paramName : string

<adsk_Utility_Bitmap>.TheList : maxObject array

<adsk_Utility_Bitmap>.Shader_Version : integer

adsk_Utility_Bitmap interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_Utility_Bitmap_Tweak : textureMap

adsk_Utility_Bitmap_Tweak : textureMap {7773161f,77015072}

Constructor:

adsk_Utility_Bitmap_Tweak: class instances not creatable by MAXScript

Properties:

<adsk_Utility_Bitmap_Tweak>.color_texture : filename

<adsk_Utility_Bitmap_Tweak>.Image_Frame_Number : integer

<adsk_Utility_Bitmap_Tweak>.RGBAmount : float

<adsk_Utility_Bitmap_Tweak>.RGBOffset : float

<adsk_Utility_Bitmap_Tweak>.OutputAmount : float

<adsk_Utility_Bitmap_Tweak>.Uscale : float

<adsk_Utility_Bitmap_Tweak>.Vscale : float

<adsk_Utility_Bitmap_Tweak>.UVchannel : integer

<adsk_Utility_Bitmap_Tweak>.color_texture_connected : boolean

<adsk_Utility_Bitmap_Tweak>.color_texture_shader : texturemap

<adsk_Utility_Bitmap_Tweak>.color_texture_paramName : string

<adsk_Utility_Bitmap_Tweak>.RGBAmount_connected : boolean

<adsk_Utility_Bitmap_Tweak>.RGBAmount_shader : texturemap

<adsk_Utility_Bitmap_Tweak>.RGBAmount_paramName : string

<adsk_Utility_Bitmap_Tweak>.RGBOffset_connected : boolean

<adsk_Utility_Bitmap_Tweak>.RGBOffset_shader : texturemap

<adsk_Utility_Bitmap_Tweak>.RGBOffset_paramName : string

<adsk_Utility_Bitmap_Tweak>.OutputAmount_connected : boolean

<adsk_Utility_Bitmap_Tweak>.OutputAmount_shader : texturemap

<adsk_Utility_Bitmap_Tweak>.OutputAmount_paramName : string

<adsk_Utility_Bitmap_Tweak>.Uscale_connected : boolean

<adsk_Utility_Bitmap_Tweak>.Uscale_shader : texturemap

<adsk_Utility_Bitmap_Tweak>.Uscale_paramName : string

<adsk_Utility_Bitmap_Tweak>.Vscale_connected : boolean

<adsk_Utility_Bitmap_Tweak>.Vscale_shader : texturemap

<adsk_Utility_Bitmap_Tweak>.Vscale_paramName : string

<adsk_Utility_Bitmap_Tweak>.UVchannel_connected : boolean

<adsk_Utility_Bitmap_Tweak>.UVchannel_shader : texturemap

<adsk_Utility_Bitmap_Tweak>.UVchannel_paramName : string

<adsk_Utility_Bitmap_Tweak>.TheList : maxObject array

<adsk_Utility_Bitmap_Tweak>.Shader_Version : integer

adsk_Utility_Bitmap_Tweak interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_Utility_GenericNoise : textureMap

adsk_Utility_GenericNoise : textureMap {7773161f,4b084656}

Constructor:

adsk_Utility_GenericNoise: class instances not creatable by MAXScript

Properties:

<adsk_Utility_GenericNoise>.noise_size : float

<adsk_Utility_GenericNoise>.noise_color1 : fRGBA color

<adsk_Utility_GenericNoise>.noise_color2 : fRGBA color

<adsk_Utility_GenericNoise>.noise_size_connected : boolean

<adsk_Utility_GenericNoise>.noise_size_shader : texturemap

<adsk_Utility_GenericNoise>.noise_size_paramName : string

<adsk_Utility_GenericNoise>.noise_color1_connected : boolean

<adsk_Utility_GenericNoise>.noise_color1_shader : texturemap

<adsk_Utility_GenericNoise>.noise_color1_paramName : string

<adsk_Utility_GenericNoise>.noise_color2_connected : boolean

<adsk_Utility_GenericNoise>.noise_color2_shader : texturemap

<adsk_Utility_GenericNoise>.noise_color2_paramName : string

<adsk_Utility_GenericNoise>.TheList : maxObject array

<adsk_Utility_GenericNoise>.Shader_Version : integer

adsk_Utility_GenericNoise interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_Utility_LightmapSwitcher : textureMap

adsk_Utility_LightmapSwitcher : textureMap {7773161f,b75a9426}

Constructor:

adsk_Utility_LightmapSwitcher: class instances not creatable by MAXScript

Properties:

<adsk_Utility_LightmapSwitcher>.lightmap_shader : texturemap

<adsk_Utility_LightmapSwitcher>.switcher : integer

<adsk_Utility_LightmapSwitcher>.Structure : paramBlock2

<adsk_Utility_LightmapSwitcher>.point : point3

<adsk_Utility_LightmapSwitcher>.normal : point3

<adsk_Utility_LightmapSwitcher>.switcher_connected : boolean

<adsk_Utility_LightmapSwitcher>.switcher_shader : texturemap

<adsk_Utility_LightmapSwitcher>.switcher_paramName : string

<adsk_Utility_LightmapSwitcher>.TheList : maxObject array

<adsk_Utility_LightmapSwitcher>.Shader_Version : integer

adsk_Utility_LightmapSwitcher interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_Utility_Noise_Tweakable : textureMap

adsk_Utility_Noise_Tweakable : textureMap {7773161f,8e40b87b}

Constructor:

adsk_Utility_Noise_Tweakable: class instances not creatable by MAXScript

Properties:

<adsk_Utility_Noise_Tweakable>.noise_size : float

<adsk_Utility_Noise_Tweakable>.noise_color1 : fRGBA color

<adsk_Utility_Noise_Tweakable>.noise_color2 : fRGBA color

<adsk_Utility_Noise_Tweakable>.low : float

<adsk_Utility_Noise_Tweakable>.high : float

<adsk_Utility_Noise_Tweakable>.tiling : point3

<adsk_Utility_Noise_Tweakable>.angle : point3

<adsk_Utility_Noise_Tweakable>.noise_size_connected : boolean

<adsk_Utility_Noise_Tweakable>.noise_size_shader : texturemap

<adsk_Utility_Noise_Tweakable>.noise_size_paramName : string

<adsk_Utility_Noise_Tweakable>.noise_color1_connected : boolean

<adsk_Utility_Noise_Tweakable>.noise_color1_shader : texturemap

<adsk_Utility_Noise_Tweakable>.noise_color1_paramName : string

<adsk_Utility_Noise_Tweakable>.noise_color2_connected : boolean

<adsk_Utility_Noise_Tweakable>.noise_color2_shader : texturemap

<adsk_Utility_Noise_Tweakable>.noise_color2_paramName : string

<adsk_Utility_Noise_Tweakable>.low_connected : boolean

<adsk_Utility_Noise_Tweakable>.low_shader : texturemap

<adsk_Utility_Noise_Tweakable>.low_paramName : string

<adsk_Utility_Noise_Tweakable>.high_connected : boolean

<adsk_Utility_Noise_Tweakable>.high_shader : texturemap

<adsk_Utility_Noise_Tweakable>.high_paramName : string

<adsk_Utility_Noise_Tweakable>.tiling_connected : boolean

<adsk_Utility_Noise_Tweakable>.tiling_shader : texturemap

<adsk_Utility_Noise_Tweakable>.tiling_paramName : string

<adsk_Utility_Noise_Tweakable>.angle_connected : boolean

<adsk_Utility_Noise_Tweakable>.angle_shader : texturemap

<adsk_Utility_Noise_Tweakable>.angle_paramName : string

<adsk_Utility_Noise_Tweakable>.TheList : maxObject array

<adsk_Utility_Noise_Tweakable>.Shader_Version : integer

adsk_Utility_Noise_Tweakable interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


adsk_uvsetid_translator : textureMap

adsk_uvsetid_translator : textureMap {7773161f,c1f25131}

Constructor:

adsk_uvsetid_translator: class instances not creatable by MAXScript

Properties:

<adsk_uvsetid_translator>.uvsetid : integer

<adsk_uvsetid_translator>.uvsetid_connected : boolean

<adsk_uvsetid_translator>.uvsetid_shader : texturemap

<adsk_uvsetid_translator>.uvsetid_paramName : string

<adsk_uvsetid_translator>.TheList : maxObject array

<adsk_uvsetid_translator>.Shader_Version : integer

adsk_uvsetid_translator interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Bump_Combiner__adsk : material

Bump_Combiner__adsk - superclass: material; super-superclass:MAXWrapper - 22:0 - classID: #(2004030991, 1677292672)

Constructor:

Bump_Combiner__adsk ...

Properties:

<Bump_Combiner__adsk>.bump_1 UndefinedClass default: undefined -- texturemap

<Bump_Combiner__adsk>.bump_2 UndefinedClass default: undefined -- texturemap

<Bump_Combiner__adsk>.bump_3 UndefinedClass default: undefined -- texturemap

<Bump_Combiner__adsk>.factor_1 Float default: 1.0 -- animatable; float

<Bump_Combiner__adsk>.factor_1_connected BooleanClass default: false -- boolean

<Bump_Combiner__adsk>.factor_1_paramName UndefinedClass default: undefined -- string;

<Bump_Combiner__adsk>.factor_1_shader UndefinedClass default: undefined -- texturemap

<Bump_Combiner__adsk>.factor_2 Float default: 1.0 -- animatable; float

<Bump_Combiner__adsk>.factor_2_connected BooleanClass default: false -- boolean

<Bump_Combiner__adsk>.factor_2_paramName UndefinedClass default: undefined -- string;

<Bump_Combiner__adsk>.factor_2_shader UndefinedClass default: undefined -- texturemap

<Bump_Combiner__adsk>.factor_3 Float default: 1.0 -- animatable; float

<Bump_Combiner__adsk>.factor_3_connected BooleanClass default: false -- boolean

<Bump_Combiner__adsk>.factor_3_paramName UndefinedClass default: undefined -- string;

<Bump_Combiner__adsk>.factor_3_shader UndefinedClass default: undefined -- texturemap

<Bump_Combiner__adsk>.factor_global Float default: 1.0 -- animatable; float

<Bump_Combiner__adsk>.factor_global_connected BooleanClass default: false -- boolean

<Bump_Combiner__adsk>.factor_global_paramName UndefinedClass default: undefined -- string

<Bump_Combiner__adsk>.factor_global_shader UndefinedClass default: undefined -- texturemap

<Bump_Combiner__adsk>.material UndefinedClass default: undefined -- material

Bump_Combiner__adsk interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Bump_Combiner__adsktextureMap : textureMap

Bump_Combiner__adsktextureMap - superclass: textureMap; super-superclass:material - 17:0 - classID: #(2004031007, -1268671647)

Constructor:

Bump_Combiner__adsktextureMap ...

Properties:

<Bump_Combiner__adsktextureMap>.bump_1 UndefinedClass default: undefined -- texturemap

<Bump_Combiner__adsktextureMap>.bump_2 UndefinedClass default: undefined -- texturemap

<Bump_Combiner__adsktextureMap>.bump_3 UndefinedClass default: undefined -- texturemap

<Bump_Combiner__adsktextureMap>.factor_1 Float default: 1.0 -- animatable; float

<Bump_Combiner__adsktextureMap>.factor_1_connected BooleanClass default: false -- boolean

<Bump_Combiner__adsktextureMap>.factor_1_paramName UndefinedClass default: undefined -- string

<Bump_Combiner__adsktextureMap>.factor_1_shader UndefinedClass default: undefined -- texturemap

<Bump_Combiner__adsktextureMap>.factor_2 Float default: 1.0 -- animatable; float

<Bump_Combiner__adsktextureMap>.factor_2_connected BooleanClass default: false -- boolean

<Bump_Combiner__adsktextureMap>.factor_2_paramName UndefinedClass default: undefined -- string;

<Bump_Combiner__adsktextureMap>.factor_2_shader UndefinedClass default: undefined -- texturemap

<Bump_Combiner__adsktextureMap>.factor_3 Float default: 1.0 -- animatable; float

<Bump_Combiner__adsktextureMap>.factor_3_connected BooleanClass default: false -- boolean

<Bump_Combiner__adsktextureMap>.factor_3_paramName UndefinedClass default: undefined -- string;

<Bump_Combiner__adsktextureMap>.factor_3_shader UndefinedClass default: undefined -- texturemap

Bump_Combiner__adsktextureMap interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Color_Correction__adsk : textureMap

Color_Correction__adsk : textureMap {7773161f,a44ab313}

Constructor:

Color_Correction__adsk: class instances not creatable by MAXScript

Properties:

<Color_Correction__adsk>.input : fRGBA color

<Color_Correction__adsk>.g : paramBlock2

<Color_Correction__adsk>.h : paramBlock2

<Color_Correction__adsk>.d : paramBlock2

<Color_Correction__adsk>.gamma : float

<Color_Correction__adsk>.gain : float

<Color_Correction__adsk>.bias : float

<Color_Correction__adsk>.invert : boolean

<Color_Correction__adsk>.hue : float

<Color_Correction__adsk>.sat : float

<Color_Correction__adsk>.value : float

<Color_Correction__adsk>.dynRangeEnable : boolean

<Color_Correction__adsk>.dynRangeExpand : float

<Color_Correction__adsk>.dynRangeStartLum : float

<Color_Correction__adsk>.dynRangeExponent : float

<Color_Correction__adsk>.input_connected : boolean

<Color_Correction__adsk>.input_shader : texturemap

<Color_Correction__adsk>.input_paramName : string

<Color_Correction__adsk>.Connection_struct__0000__g : paramBlock2

<Color_Correction__adsk>.Connection_struct__0001__h : paramBlock2

<Color_Correction__adsk>.Connection_struct__0002__d : paramBlock2

<Color_Correction__adsk>.gamma_connected : boolean

<Color_Correction__adsk>.gamma_shader : texturemap

<Color_Correction__adsk>.gamma_paramName : string

<Color_Correction__adsk>.gain_connected : boolean

<Color_Correction__adsk>.gain_shader : texturemap

<Color_Correction__adsk>.gain_paramName : string

<Color_Correction__adsk>.bias_connected : boolean

<Color_Correction__adsk>.bias_shader : texturemap

<Color_Correction__adsk>.bias_paramName : string

<Color_Correction__adsk>.invert_connected : boolean

<Color_Correction__adsk>.invert_shader : texturemap

<Color_Correction__adsk>.invert_paramName : string

<Color_Correction__adsk>.hue_connected : boolean

<Color_Correction__adsk>.hue_shader : texturemap

<Color_Correction__adsk>.hue_paramName : string

<Color_Correction__adsk>.sat_connected : boolean

<Color_Correction__adsk>.sat_shader : texturemap

<Color_Correction__adsk>.sat_paramName : string

<Color_Correction__adsk>.value_connected : boolean

<Color_Correction__adsk>.value_shader : texturemap

<Color_Correction__adsk>.value_paramName : string

<Color_Correction__adsk>.dynRangeEnable_connected : boolean

<Color_Correction__adsk>.dynRangeEnable_shader : texturemap

<Color_Correction__adsk>.dynRangeEnable_paramName : string

<Color_Correction__adsk>.dynRangeExpand_connected : boolean

<Color_Correction__adsk>.dynRangeExpand_shader : texturemap

<Color_Correction__adsk>.dynRangeExpand_paramName : string

<Color_Correction__adsk>.dynRangeStartLum_connected : boolean

<Color_Correction__adsk>.dynRangeStartLum_shader : texturemap

<Color_Correction__adsk>.dynRangeStartLum_paramName : string

<Color_Correction__adsk>.dynRangeExponent_connected : boolean

<Color_Correction__adsk>.dynRangeExponent_shader : texturemap

<Color_Correction__adsk>.dynRangeExponent_paramName : string

<Color_Correction__adsk>.TheList : maxObject array

<Color_Correction__adsk>.Shader_Version : integer

Color_Correction__adsk interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Displace_Combiner__adsk : material

Displace_Combiner__adsk - superclass: material; super-superclass:MAXWrapper - 22:0 - classID: #(2004030991, -1452499429)

Constructor:

Displace_Combiner__adsk ...

Properties:

<Displace_Combiner__adsk>.factor_1 Float default: 1.0 -- animatable; float

<Displace_Combiner__adsk>.factor_1_connected BooleanClass default: false -- boolean

<Displace_Combiner__adsk>.factor_1_paramName UndefinedClass default: undefined -- string;

<Displace_Combiner__adsk>.factor_1_shader UndefinedClass default: undefined -- texturemap

<Displace_Combiner__adsk>.factor_2 Float default: 1.0 -- animatable; float

<Displace_Combiner__adsk>.factor_2_connected BooleanClass default: false -- boolean

<Displace_Combiner__adsk>.factor_2_paramName UndefinedClass default: undefined -- string;

<Displace_Combiner__adsk>.factor_2_shader UndefinedClass default: undefined -- texturemap

<Displace_Combiner__adsk>.factor_3 Float default: 1.0 -- animatable; float

<Displace_Combiner__adsk>.factor_3_connected BooleanClass default: false -- boolean

<Displace_Combiner__adsk>.factor_3_paramName UndefinedClass default: undefined -- string;

<Displace_Combiner__adsk>.factor_3_shader UndefinedClass default: undefined -- texturemap

<Displace_Combiner__adsk>.factor_global Float default: 1.0 -- animatable; float

<Displace_Combiner__adsk>.factor_global_connected BooleanClass default: false -- boolean

<Displace_Combiner__adsk>.factor_global_paramName UndefinedClass default: undefined -- string;

<Displace_Combiner__adsk>.factor_global_shader UndefinedClass default: undefined -- texturemap

<Displace_Combiner__adsk>.material UndefinedClass default: undefined -- material

<Displace_Combiner__adsk>.shader_1 UndefinedClass default: undefined -- texturemap

<Displace_Combiner__adsk>.shader_2 UndefinedClass default: undefined -- texturemap

<Displace_Combiner__adsk>.shader_3 UndefinedClass default: undefined -- texturemap

Displace_Combiner__adsk interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Arch___Design__mi: material

Arch___Design__mi - superclass: material; super-superclass:MAXWrapper - 146:0 - classID: #(1890604853, 1242969684)

The Arch and Design Material available in 3ds Max 9 and higher provides advanced features for the architectural visualization and design industry including useful presets, glossy reflections, custom BRDF reflectivity functions, built-in environment occlusion and edge rounding effects and more.

Constructors:

Arch___Design__mi...

Properties:

Main Material Parameters Rollout

Roll over and click a rollout area to jump to description:

Diffuse

<Arch___Design__mi>.diff_weight Float default: 1.0 -- animatable; float; Diffuse_Weight

Get/set the Diffuse Level value.

<Arch___Design__mi>.diff_color Color default: (color 127.5 127.5 127.5) -- animatable; fRGBA color; Diffuse

Get/set the Color value.

<Arch___Design__mi>.mapM0 UndefinedClass default: undefined -- texturemap; Diffuse_Color_Map

Get/set the Diffuse Color Map texturemap.

<Arch___Design__mi>.diff_rough Float default: 0.0 -- animatable; float; Diffuse_Roughness

Get/set the Roughness value.

<Arch___Design__mi>.mapM1 UndefinedClass default: undefined -- texturemap; Roughness_Map

Get/set the Roughness Map texturemap.

Reflection

<Arch___Design__mi>.refl_weight Float default: 0.6 -- animatable; float; Reflectivity

Get/set the Reflectivity value.

<Arch___Design__mi>.refl_color Color default: (color 255 255 255) -- animatable; fRGBA color; Reflection_Color

Get/set the Reflection Color value.

<Arch___Design__mi>.mapM2 UndefinedClass default: undefined -- texturemap; Reflection_Color_Map

Get/set the Reflection Color Map texturemap.

<Arch___Design__mi>.refl_gloss Float default: 1.0 -- animatable; float; Reflection_Glossiness

Get/set the Reflection Glossiness value.

<Arch___Design__mi>.mapM3 UndefinedClass default: undefined -- texturemap; Reflection_Glossiness_Map

Get/set the Reflection Glossiness Map texturemap.

<Arch___Design__mi>.refl_samples Integer default: 8 -- animatable; integer; Reflection_Samples

Get/set the Reflection Samples value.

<Arch___Design__mi>.refl_interp BooleanClass default: false -- boolean; Reflection_Interpolation

Get/set the state of the Fast (Interpolate) checkbox.

<Arch___Design__mi>.refl_hlonly BooleanClass default: false -- boolean; Highlights_Only

Get/set the state of the Highlights + FG Only checkbox.

<Arch___Design__mi>.refl_metal BooleanClass default: false -- boolean; Metallic_Reflections

Get/set the state of the Metal Material checkbox.

Refraction

<Arch___Design__mi>.refr_weight Float default: 0.0 -- animatable; float; Transparency

Get/set the Transparency value.

<Arch___Design__mi>.refr_color Color default: (color 255 255 255) -- animatable; fRGBA color; Refraction_Color

Get/set the Refraction Color value.

<Arch___Design__mi>.mapM4 UndefinedClass default: undefined -- texturemap; Refraction_Color_Map

Get/set the Refraction Color Map texturemap.

<Arch___Design__mi>.refr_gloss Float default: 1.0 -- animatable; float; Refraction_Glossiness

Get/set the Refraction Glossiness value.

<Arch___Design__mi>.mapM5 UndefinedClass default: undefined -- texturemap; Refraction_Glossiness_Map

Get/set the Refraction Glossiness Map texturemap.

<Arch___Design__mi>.refr_interp BooleanClass default: false -- boolean; Refraction_Interpolation

Get/set the state of the Fast (Interpolate) checkbox.

<Arch___Design__mi>.refr_samples Integer default: 8 -- animatable; integer; Refraction_Samples

Get/set the Refraction Samples value.

<Arch___Design__mi>.refr_ior Float default: 1.4 -- animatable; float; Refraction_IOR

Get/set the Refraction IOR value.

<Arch___Design__mi>.mapM6 UndefinedClass default: undefined -- texturemap; IOR_Map

Get/set the IOR Map texturemap.

<Arch___Design__mi>.refr_trans_on BooleanClass default: false -- boolean; Translucency_On

Get/set the state of the Translucency checkbox.

<Arch___Design__mi>.refr_transw Float default: 0.5 -- animatable; float; Translulcency_Weight

Get/set the Translucency Weight value.

<Arch___Design__mi>.mapM8 UndefinedClass default: undefined -- texturemap; Translucency_Weight_Map

Get/set the Translucency Weight Map texturemap.

<Arch___Design__mi>.refr_transc Color default: (color 178.5 127.5 51) -- animatable; fRGBA color; Translucency_Color

Get/set the Translucency Color value.

<Arch___Design__mi>.mapM7 UndefinedClass default: undefined -- texturemap; Translucency_Color_Map

Get/set the Translucency Color Map texturemap.

Anisotropy

<Arch___Design__mi>.anisotropy Float default: 1.0 -- animatable; float

Get/set the Anisotropy value.

<Arch___Design__mi>.mapM9 UndefinedClass default: undefined -- texturemap; Anisotropy_Map

Get/set the Anisotropy Map.

<Arch___Design__mi>.anisoangle Float default: 0.0 -- animatable; float; Anisotropy_Angle

Get/set the Anisotropy Angle value.

<Arch___Design__mi>.mapM10 UndefinedClass default: undefined -- texturemap; Anisotropy_Angle_Map

Get/set the Anisotropy Angle Map.

<Arch___Design__mi>.aniso_mode Integer default: 0 -- integer; Anisotropy_Mode

Get/set the Anisotropy Mode. Possible values are

0 - Automatic

1 - Mapping Channel

<Arch___Design__mi>.aniso_channel Integer default: 0 -- integer; Anisotropy_Channel

Get/set the Anisotropy Mapping Channel used when .aniso_mode is set to 1.

BRDF Rollout

Roll over and click a rollout area to jump to description:

<Arch___Design__mi>.refl_func_fresnel BooleanClass default: false -- boolean; Angular_Function_Fresnel

Get/set the state of the radio buttons.

When set to true, the "By IOR (Fresnel reflections)" mode will be used.

When set to false (default), the "Custom Reflectivity Function" mode will be used.

<Arch___Design__mi>.refl_func_low Float default: 0.2 -- animatable; float; Angular_Function_Low

Get/set the "0 deg. refl" value.

<Arch___Design__mi>.refl_func_high Float default: 1.0 -- animatable; float; Angular_Function_High

Get/set the "90 deg. refl" value.

<Arch___Design__mi>.refl_func_curve Float default: 5.0 -- animatable; float; Angular_Function_Curve

Get/set the "Curve shape" value.

Self Illumination (Glow) Rollout

Roll over and click a rollout area to jump to description:

<Arch___Design__mi>.self_illum_on BooleanClass default: false -- boolean; Self_Illumination_On

Get/set the state of the "Self Illumination (Glow)" checkbox.

Color

<Arch___Design__mi>.self_illum_color_mode BooleanClass default: true -- boolean; Self_Illumination_Color_Mode

Get/set the Self Illumination Color Mode.

When set to true, the "Kelvin" mode will be used.

When set to false, the Light Color mode will be used.

<Arch___Design__mi>.self_illum_color_filter Color default: (color 255 255 255) -- animatable; fRGBA color; Filter_Color

Get/set the Filter Color value.

<Arch___Design__mi>.self_illum_color_kelvin Float default: 6500.0 -- animatable; float; Self_Illumination_Color_Kelvin

Get/set the Kelvin Color value.

<Arch___Design__mi>.mapM23 UndefinedClass default: undefined -- texturemap; Self_Illumination_Map

Get/set the Self Illumination Map.

Luminance

<Arch___Design__mi>.self_illum_int_mode BooleanClass default: true -- boolean; Self_Illumination_Intensity_Mode

Get/set the Self Illumination Intensity Mode.

When set to false, the "Physical Units cd/m2" mode will be used.

When set to true, the "Unitless" mode will be used.

<Arch___Design__mi>.self_illum_int_physical Float default: 1500.0 -- animatable; float; Self_Illumination_Physical_Intensity

Get/set the Self Illumination Physical Intentisy value.

<Arch___Design__mi>.self_illum_int_arbitrary Float default: 1.0 -- animatable; float; Self_Illumination_Arbitrary_Intensity

Get/set the Self Illumination Unitless (Arbitrary) value.

Glow Options

<Arch___Design__mi>.self_illum_in_reflections BooleanClass default: true -- boolean; Self_Illumination___visible_in_Reflections

Get/set the state of the "Visible In Reflections" checkbox.

<Arch___Design__mi>.self_illum_in_fg BooleanClass default: false -- boolean; Self_Illumination___visible_to_FG

Get/set the state of the "Illuminate the Scene (when using FG)" checkbox.

Special Effects Rollout

Roll over and click a rollout area to jump to description:

Ambient Occlusion

<Arch___Design__mi>.opts_ao_on BooleanClass default: false -- boolean; AO_Enabled

Get/set the state of the Ambient Occlusion checkbox.

<Arch___Design__mi>.opts_ao_samples Integer default: 16 -- animatable; integer; AO_Samples

Get/set the Ambient Occlusion Samples value.

<Arch___Design__mi>.opts_ao_exact BooleanClass default: false -- boolean; AO_picks_up_colors_from_other_materials__Exact_AO

Get/set the state of the "Use Color From Other Materials (Exact AO)" checkbox.

<Arch___Design__mi>.opts_ao_distance Float default: 10.0 -- animatable; float; AO_Distance

Get/set the Ambient Occlusion Max. Distance value.

<Arch___Design__mi>.opts_ao_dark Color default: (color 51 51 51) -- animatable; fRGBA color; AO_Shadow_Color

Get/set the Ambient Occlusion Shadow Color.

<Arch___Design__mi>.mapM15 UndefinedClass default: undefined -- texturemap; AO_Shadow_Color_Map

Get/set the Ambient Occlusion Shadow Color Map.

<Arch___Design__mi>.opts_ao_use_global_ambient BooleanClass default: false -- boolean; Use_Global_Ambient_Light

Get/set whether to use the Global Ambient Color or the Custom Ambient Color (see below)

<Arch___Design__mi>.opts_ao_ambient Color default: (color 0 0 0) -- animatable; fRGBA color; AO_Ambient_Light_Color

Get/set the Custom Ambient Light Color used by Ambient Occlusion when .opts_ao_use_global_ambient is set to false.

<Arch___Design__mi>.mapM16 UndefinedClass default: undefined -- texturemap; AO_Ambient_Light_Color_Map

Get/set the Ambient Light Color Map.

<Arch___Design__mi>.opts_ao_do_details BooleanClass default: true -- boolean; AO_for_GI_FG_detail_enhancement

Round Corners

<Arch___Design__mi>.opts_round_corners_on BooleanClass default: false -- boolean; Round_Corners_On

Get/set the state of the Round Corners checkbox.

<Arch___Design__mi>.opts_round_corners_radius Float default: 0.5 -- animatable; float; Round_Corners_Radius

Get/set the "Fillet Radius" value.

<Arch___Design__mi>.mapM22 UndefinedClass default: undefined -- texturemap; Radius_Map

Get/set the "Fillet Radius" map.

<Arch___Design__mi>.opts_round_corners_any_mtl BooleanClass default: false -- boolean; Fillet_against_Any_Material

Get/set the state of the "Blend With Other Materials" checkbox.

Advanced Rendering Options Rollout

Roll over and click a rollout area to jump to description:

Reflection

<Arch___Design__mi>.refl_falloff_on BooleanClass default: false -- boolean; Reflection_Max_Dist_On

Get/set the state of the Reflection Max. Distance checkbox.

<Arch___Design__mi>.refl_falloff_dist Float default: 0.0 -- animatable; float; Reflection_Max_Dist

Get/set the Reflection Max. Distance value.

<Arch___Design__mi>.refl_falloff_color_on BooleanClass default: false -- boolean; Reflection_Max_Dist_Color_On

Get/set the state of the Reflection Fade to End Color checkbox.

<Arch___Design__mi>.refl_falloff_color Color default: (color 51 51 51) -- animatable; fRGBA color; Reflection_Max_Dist_Color

Get/set the Reflection Fade to End Color value.

<Arch___Design__mi>.mapM11 UndefinedClass default: undefined -- texturemap; Reflection_Fade_Color_Map

Get/set the Reflection Fade to End Color Map.

<Arch___Design__mi>.opts_refl_depth Integer default: 4 -- animatable; integer; Reflection_Max_Depth

Get/set the Reflection Max. Trace Depth value.

<Arch___Design__mi>.refl_cutoff Float default: 0.01 -- animatable; float; Reflection_Cutoff_Threshold

Get/set the Reflection Cutoff Threshold value.

Refraction

<Arch___Design__mi>.refr_falloff_on BooleanClass default: false -- boolean; Refraction_Max_Dist_On

Get/set the state of the Refraction Max. Distance checkbox.

<Arch___Design__mi>.refr_falloff_dist Float default: 0.0 -- animatable; float; Refraction_Max_Dist

Get/set the Refraction Max. Distance value.

<Arch___Design__mi>.refr_falloff_color_on BooleanClass default: false -- boolean; Refraction_Max_Dist_Color_On

Get/set the state of the Refraction Color at Max. Distance checkbox.

<Arch___Design__mi>.refr_falloff_color Color default: (color 51 51 51) -- animatable; fRGBA color; Refraction_Max_Dist_Color

Get/set the Refraction Color at Max. Distance value.

<Arch___Design__mi>.mapM12 UndefinedClass default: undefined -- texturemap; Refraction_Fade_Color_Map

Get/set the Refraction Color at Max. Distance Map.

<Arch___Design__mi>.opts_refr_depth Integer default: 6 -- animatable; integer; Refraction_Max_Depth

Get/set the Refraction Max. Trace Depth value.

<Arch___Design__mi>.refr_cutoff Float default: 0.01 -- animatable; float; Refraction_Cutoff_Threshold

Get/set the Refraction Cutoff Threshold value.

Advanced Reflectivity Options

<Arch___Design__mi>.opts_no_area_hl BooleanClass default: true -- boolean; Supress_Highlights_for_visible_area_lights

Get/set the state of the "Visible area lights cause no highlights" checkbox.

<Arch___Design__mi>.opts_skip_inside BooleanClass default: true -- boolean; Skip_internal_reflections_in_glass__except_TIR

Get/set the state of the "Skip Reflection on the inside (except total internal reflection" checkbox.

<Arch___Design__mi>.opts_hl_to_refl_balance Float default: 1.0 -- animatable; float; Highlight_vs__Reflection_Balance

Get/set the "Relative Intensity of Highlights" value.

Advanced Transparency Options

<Arch___Design__mi>.opts_1sided BooleanClass default: false -- boolean; Single_sided_glass___translucency

Get/set the state of the "Glass/Translucency treat objects as" radiobuttons.

When set to false, the "Solid" mode will be used.

When set to true, the "Thin-walled" mode will be used.

<Arch___Design__mi>.opts_do_refractive_caustics BooleanClass default: false -- boolean; Do_refractive_caustics

Get/set the state of the "When Caustics are enabled, transparent objects" radiobuttons.

When set to false, the "Refract light and generate caustic effect" mode will be used.

When set to true, the "Use Transparent Shadows" mode will be used.

<Arch___Design__mi>.opts_backface_cull BooleanClass default: false -- boolean; Back_Face_Culling

Get/set the state of the Backface Culling checkbox.

<Arch___Design__mi>.opts_propagate_alpha BooleanClass default: false -- boolean; Propagate_Alpha

Get/set the state of the "Transparency propagates Alpha channel" checkbox.

Indirect Illumination Options

<Arch___Design__mi>.opts_indirect_multiplier Float default: 1.0 -- animatable; float; Indirect_Multiplier

Get/set the FG/GI multiplier value.

<Arch___Design__mi>.mapM13 UndefinedClass default: undefined -- texturemap; FG_Multiplier_Map

Get/set the FG/GI multiplier map.

<Arch___Design__mi>.opts_fg_quality Float default: 1.0 -- animatable; float; FG_Quality

Get/set the FG Quality value.

<Arch___Design__mi>.mapM14 UndefinedClass default: undefined -- texturemap; FG_Quality_Map

Get/set the FG Quality Map.

Fast Glossy Interpolation Rollout

Roll over and click a rollout area to jump to description:

<Arch___Design__mi>.inter_density Integer default: 2 -- integer; Interpolation_Density

Get/set the Interpolation Grid Densoty mode. Possible values are:

0 - 2 (double)

1 - 1 (same as rendering)

2 - 1/2 (half resolution)

3 - 1/3 (third resolution)

4 - 1/4 (quarter resolution)

5 - 1/5 (fifth resolution)

Reflective Interpolation

<Arch___Design__mi>.intr_refl_samples Integer default: 2 -- integer; Reflection__Interpolation_points_to_look_up

Get/set the Reflection "Neighbouring points to look up" value.

<Arch___Design__mi>.intr_refl_ddist_on BooleanClass default: false -- boolean; Use_detail_distance

Get/set the state of the "High detail distance" checkbox.

<Arch___Design__mi>.intr_refl_ddist Float default: 0.0 -- animatable; float; Detail_distance

Get/set the "High detail distance" value.

<Arch___Design__mi>.single_env_sample BooleanClass default: false -- boolean; Single_Environment_Sample

Get/set the "Single Sample from Environment" value.

Refractive Interpolation

<Arch___Design__mi>.intr_refr_samples Integer default: 2 -- integer; Refraction__Interpolation_points_to_look_up

Get/set the Refraction "Neighbouring points to look up" value.

Special Purpose Maps Rollout

Roll over and click a rollout area to jump to description:

<Arch___Design__mi>.bump_map_on BooleanClass default: true -- boolean

Get/set the state of the Bump checkbox.

<Arch___Design__mi>.bump_map_amt Float default: 0.3 -- animatable; float; Bump_Map_Amount

Get/set the Bump amount value.

<Arch___Design__mi>.bump_map UndefinedClass default: undefined -- texturemap

Get/set the Bump map.

<Arch___Design__mi>.no_diffuse_bump BooleanClass default: false -- boolean; No_bumps_on_diffuse_shading

Get/set the state of the "Do not apply bumps to the diffuse shading" checkbox.

<Arch___Design__mi>.displacement_map_on BooleanClass default: true -- boolean

Get/set the state of the Displacement checkbox.

<Arch___Design__mi>.displacement_map_amt Float default: 1.0 -- animatable; float; Displacement_Map_Amount

Get/set the Displacement map amount.

<Arch___Design__mi>.displacement_map UndefinedClass default: undefined -- texturemap

Get/set the Displacement map.

<Arch___Design__mi>.cutout_map_on BooleanClass default: true -- boolean

Get/set the state of the Cutout checkbox.

<Arch___Design__mi>.cutout_map UndefinedClass default: undefined -- texturemap

Get/set the Cutout map.

<Arch___Design__mi>.environment_map_on BooleanClass default: true -- boolean

Get/set the state of the Environment checkbox.

<Arch___Design__mi>.environment_map UndefinedClass default: undefined -- texturemap

Get/set the Environment map.

<Arch___Design__mi>.add_color_map_on BooleanClass default: true -- boolean; Additional_Color_Map_On

Get/set the state of the Additional Color checkbox.

<Arch___Design__mi>.add_color_map UndefinedClass default: undefined -- texturemap; Additional_Color_Map

Get/set the Additional Color map.

<Arch___Design__mi>.self_illum_map_on BooleanClass default: true -- boolean

Get/set the state of the Self Illumination checkbox.

<Arch___Design__mi>.self_illum_map UndefinedClass default: undefined -- texturemap; Self_Illumination_Map

Get/set the Self Illumination map.

General Maps Rollout

Roll over and click a rollout area to jump to description:

Main Maps

<Arch___Design__mi>.diff_color_map_on BooleanClass default: true -- boolean; Diffuse_Color_Map_On

Get/set the state of the Diffuse Color checkbox.

<Arch___Design__mi>.diff_color_map UndefinedClass default: undefined -- texturemap; Diffuse_Color_Map

Get/set the Diffuse Color map.

<Arch___Design__mi>.diff_rough_map_on BooleanClass default: true -- boolean; Roughness_Map_On

Get/set the state of the Diffuse Roughness checkbox.

<Arch___Design__mi>.diff_rough_map UndefinedClass default: undefined -- texturemap; Roughness_Map

Get/set the Diffuse Roughness map.

<Arch___Design__mi>.refl_color_map_on BooleanClass default: true -- boolean; Reflection_Color_Map_On

Get/set the state of the Reflection Color checkbox.

<Arch___Design__mi>.refl_color_map UndefinedClass default: undefined -- texturemap; Reflection_Color_Map

Get/set the Diffuse Reflection Color map.

<Arch___Design__mi>.refl_gloss_map_on BooleanClass default: true -- boolean; Reflection_Glossiness_Map_On

Get/set the state of the Reflection Glossiness checkbox.

<Arch___Design__mi>.refl_gloss_map UndefinedClass default: undefined -- texturemap; Reflection_Glossiness_Map

Get/set the Reflection Glossiness map.

<Arch___Design__mi>.refr_color_map_on BooleanClass default: true -- boolean; Refraction_Color_Map_On

Get/set the state of the Refraction Color checkbox.

<Arch___Design__mi>.refr_color_map UndefinedClass default: undefined -- texturemap; Refraction_Color_Map

Get/set the Refraction Color map.

<Arch___Design__mi>.refr_gloss_map_on BooleanClass default: true -- boolean; Refraction_Glossiness_Map_On

Get/set the state of the Refraction Glossiness checkbox.

<Arch___Design__mi>.refr_gloss_map UndefinedClass default: undefined -- texturemap; Refraction_Glossiness_Map

Get/set the Refraction Glossiness map.

<Arch___Design__mi>.refr_transc_map_on BooleanClass default: true -- boolean; Translucency_Color_Map_On

Get/set the state of the Refraction Translucency Color checkbox.

<Arch___Design__mi>.refr_transc_map UndefinedClass default: undefined -- texturemap; Translucency_Color_Map

Get/set the Refraction Translucency Color map.

<Arch___Design__mi>.refr_transw_map_on BooleanClass default: true -- boolean; Translucency_Weight_Map_On

Get/set the state of the Refraction Translucency Weight checkbox.

<Arch___Design__mi>.refr_transw_map UndefinedClass default: undefined -- texturemap; Translucency_Weight_Map

Get/set the Refraction Translucency Weight map.

Surface Property Maps

<Arch___Design__mi>.refr_ior_map_on BooleanClass default: true -- boolean; IOR_Map_On

Get/set the state of the IOR (Index Of Refraction) checkbox.

<Arch___Design__mi>.refr_ior_map UndefinedClass default: undefined -- texturemap; IOR_Map

Get/set the IOR map.

<Arch___Design__mi>.anisotropy_map_on BooleanClass default: true -- boolean

Get/set the state of the Anisotropy checkbox.

<Arch___Design__mi>.anisotropy_map UndefinedClass default: undefined -- texturemap

Get/set the Anisotropy map.

<Arch___Design__mi>.anisoangle_map_on BooleanClass default: true -- boolean; Anisotropy_Angle_Map_On

Get/set the state of the Anisotropy Angle checkbox.

<Arch___Design__mi>.anisoangle_map UndefinedClass default: undefined -- texturemap; Anisotropy_Angle_Map

Get/set the Anisotropy Angle map.

<Arch___Design__mi>.refl_falloff_color_map_on BooleanClass default: true -- boolean; Reflection_Fade_Color_Map_On

Get/set the state of the "Reflection - fade to Color" checkbox.

<Arch___Design__mi>.refl_falloff_color_map UndefinedClass default: undefined -- texturemap; Reflection_Fade_Color_Map

Get/set the "Reflection - fade to Color" map.

<Arch___Design__mi>.refr_falloff_color_map_on BooleanClass default: true -- boolean; Refraction_Fade_Color_Map_On

Get/set the state of the "Refraction - fade to Color" checkbox.

<Arch___Design__mi>.refr_falloff_color_map UndefinedClass default: undefined -- texturemap; Refraction_Fade_Color_Map

Get/set the " Refraction - fade to Color" map.

Rendering Options Maps

<Arch___Design__mi>.indirect_multiplier_map_on BooleanClass default: true -- boolean; FG_Multiplier_Map_On

Get/set the state of the "FG/GI multiplier" checkbox.

<Arch___Design__mi>.indirect_multiplier_map UndefinedClass default: undefined -- texturemap; FG_Multiplier_Map

Get/set the "FG/GI multiplier" map.

<Arch___Design__mi>.fg_quality_map_on BooleanClass default: true -- boolean

Get/set the state of the "FG Quality" checkbox.

<Arch___Design__mi>.fg_quality_map_amt Float default: 1.0 -- animatable; float; FG_Quality_Map_Amount

Get/set the "FG Quality" amount value.

<Arch___Design__mi>.fg_quality_map UndefinedClass default: undefined -- texturemap

Get/set the "FG Quality" map.

Special Effects Maps

<Arch___Design__mi>.ao_dark_map_on BooleanClass default: true -- boolean; AO_Shadow_Color_Map_On

Get/set the state of the "AO Shadow Color" checkbox.

<Arch___Design__mi>.ao_dark_map UndefinedClass default: undefined -- texturemap; AO_Shadow_Color_Map

Get/set the "AO Shadow Color" map.

<Arch___Design__mi>.ao_ambient_map_on BooleanClass default: true -- boolean; AO_Ambient_Light_Color_Map_On

Get/set the state of the "AO Ambient Light Color" checkbox.

<Arch___Design__mi>.ao_ambient_map UndefinedClass default: undefined -- texturemap; AO_Ambient_Light_Color_Map

Get/set the "AO Ambient Light Color" map.

<Arch___Design__mi>.radius_map_on BooleanClass default: true -- boolean

Get/set the state of the "Round Corner Radius" checkbox.

<Arch___Design__mi>.radius_map UndefinedClass default: undefined -- texturemap

Get/set the "Round Corner Radius" map.

See also

MAXScript Extensions for mental ray


Arch__Environment_Blur : textureMap

Arch__Environment_Blur - superclass: textureMap; super-superclass:material - 15:0 - classID: #(2004031007, -2091403657)

Constructor:

Arch__Environment_Blur...

Properties:

<Arch__Environment_Blur>.blur Float default: 0.0 -- animatable; float

<Arch__Environment_Blur>.blur_connected BooleanClass default: false -- boolean

<Arch__Environment_Blur>.blur_paramName UndefinedClass default: undefined -- string

<Arch__Environment_Blur>.blur_shader UndefinedClass default: undefined -- texturemap

<Arch__Environment_Blur>.environment UndefinedClass default: undefined -- texturemap

<Arch__Environment_Blur>.mia_material_blur BooleanClass default: false -- animatable; boolean

<Arch__Environment_Blur>.mia_material_blur_connected BooleanClass default: false -- boolean

<Arch__Environment_Blur>.mia_material_blur_paramName UndefinedClass default: undefined -- string

<Arch__Environment_Blur>.mia_material_blur_shader UndefinedClass default: undefined -- texturemap

<Arch__Environment_Blur>.resolution Integer default: 256 -- animatable; integer

<Arch__Environment_Blur>.resolution_connected BooleanClass default: false -- boolean

<Arch__Environment_Blur>.resolution_paramName UndefinedClass default: undefined -- string

<Arch__Environment_Blur>.resolution_shader UndefinedClass default: undefined -- texturemap

Arch__Environment_Blur interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

MAXScript Extensions for mental ray


lume mental ray Shaders Index

Adjustments__lume : textureMap

Beam__lume : textureMap

Bump_Capture__lume : textureMap

Distortion__lume : textureMap

Edge__lume : textureMap

Edge_Shadow__lume : textureMap

Facade__lume : textureMap

Glare__lume : textureMap

Glass__lume : textureMap

Glow__lume : textureMap

Illumination__lume : textureMap

Landscape__lume : textureMap

Metal__lume : textureMap

Mist__lume : textureMap

Night__lume : textureMap

Ocean__lume : textureMap

Stain__lume : textureMap

Submerge__lume : textureMap

Translucency__lume : textureMap

Water_Surface__lume : textureMap

Water_Surface_Shadow__lume : textureMap

Wet_Dry_Mixer__lume : textureMap

WrapAround__lume : textureMap

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Adjustments__lume : textureMap

Adjustments__lume : textureMap {7773161f,5666a86f}

Constructor:

Adjustments__lume: class instances not creatable by MAXScript

Properties:

<Adjustments__lume>.Brightness : float

<Adjustments__lume>.Contrast : float

<Adjustments__lume>.Hue : float

<Adjustments__lume>.Saturation : float

<Adjustments__lume>.Lightness : float

<Adjustments__lume>.Input_High : integer

<Adjustments__lume>.Input_Low : integer

<Adjustments__lume>.Input_Shift : float

<Adjustments__lume>.Output_High : integer

<Adjustments__lume>.Output_Low : integer

<Adjustments__lume>.Specific_Region : boolean

<Adjustments__lume>.Region_Labels : int array

<Adjustments__lume>.Brightness_connected : boolean

<Adjustments__lume>.Brightness_shader : texturemap

<Adjustments__lume>.Brightness_paramName : string

<Adjustments__lume>.Contrast_connected : boolean

<Adjustments__lume>.Contrast_shader : texturemap

<Adjustments__lume>.Contrast_paramName : string

<Adjustments__lume>.Hue_connected : boolean

<Adjustments__lume>.Hue_shader : texturemap

<Adjustments__lume>.Hue_paramName : string

<Adjustments__lume>.Saturation_connected : boolean

<Adjustments__lume>.Saturation_shader : texturemap

<Adjustments__lume>.Saturation_paramName : string

<Adjustments__lume>.Lightness_connected : boolean

<Adjustments__lume>.Lightness_shader : texturemap

<Adjustments__lume>.Lightness_paramName : string

<Adjustments__lume>.Input_High_connected : boolean

<Adjustments__lume>.Input_High_shader : texturemap

<Adjustments__lume>.Input_High_paramName : string

<Adjustments__lume>.Input_Low_connected : boolean

<Adjustments__lume>.Input_Low_shader : texturemap

<Adjustments__lume>.Input_Low_paramName : string

<Adjustments__lume>.Input_Shift_connected : boolean

<Adjustments__lume>.Input_Shift_shader : texturemap

<Adjustments__lume>.Input_Shift_paramName : string

<Adjustments__lume>.Output_High_connected : boolean

<Adjustments__lume>.Output_High_shader : texturemap

<Adjustments__lume>.Output_High_paramName : string

<Adjustments__lume>.Output_Low_connected : boolean

<Adjustments__lume>.Output_Low_shader : texturemap

<Adjustments__lume>.Output_Low_paramName : string

<Adjustments__lume>.Specific_Region_connected : boolean

<Adjustments__lume>.Specific_Region_shader : texturemap

<Adjustments__lume>.Specific_Region_paramName : string

<Adjustments__lume>.TheList : maxObject array

<Adjustments__lume>.Shader_Version : integer

Adjustments__lume interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

lume mental ray Shaders Index

MAXScript Extensions for mental ray


Beam__lume : textureMap

Beam__lume - superclass: textureMap; super-superclass:material - 13:0 - classID: #(2004031007, -1286362795)

Constructor:

Beam__lume ...

Properties:

<Beam__lume>.Color Color default: (color 102 102 127.5) -- animatable; fRGBA color

<Beam__lume>.Color_connected BooleanClass default: false -- boolean

<Beam__lume>.Color_paramName UndefinedClass default: undefined -- string;

<Beam__lume>.Color_shader UndefinedClass default: undefined -- texturemap

<Beam__lume>.Density Float default: 5.0 -- animatable; float

<Beam__lume>.Density_connected BooleanClass default: false -- boolean

<Beam__lume>.Density_paramName UndefinedClass default: undefined -- string;

<Beam__lume>.Density_shader UndefinedClass default: undefined -- texturemap

<Beam__lume>.ImplicitLights ArrayParameter default: #() -- node array; SubAnim

<Beam__lume>.Lights ArrayParameter default: #() -- node array; SubAnim

<Beam__lume>.Use_lights BooleanClass default: false -- boolean

Beam__lume interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

lume mental ray Shaders Index

MAXScript Extensions for mental ray


Bump_Capture__lume : textureMap

Bump_Capture__lume : textureMap {7773161f,4a6aaa87}

Constructor:

Bump_Capture__lume: class instances not creatable by MAXScript

Aliases:

Bump_Capture__lume

BumpCapture

Properties:

<Bump_Capture__lume>.Store_in_RGB_Channels : boolean

<Bump_Capture__lume>.Store_in_Alpha_Channel : boolean

<Bump_Capture__lume>.Store_in_RGB_Channels_connected : boolean

<Bump_Capture__lume>.Store_in_RGB_Channels_shader : texturemap

<Bump_Capture__lume>.Store_in_RGB_Channels_paramName : string

<Bump_Capture__lume>.Store_in_Alpha_Channel_connected : boolean

<Bump_Capture__lume>.Store_in_Alpha_Channel_shader : texturemap

<Bump_Capture__lume>.Store_in_Alpha_Channel_paramName : string

<Bump_Capture__lume>.TheList : maxObject array

<Bump_Capture__lume>.Shader_Version : integer

Bump_Capture__lume interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

lume mental ray Shaders Index

MAXScript Extensions for mental ray


Distortion__lume : textureMap

Distortion__lume - superclass: textureMap; super-superclass:material - 14:0 - classID: #(2004031007, 1660533079)

Constructors:

Distortion__lume ...

Distortion ...

Properties:

<Distortion__lume>.amount Float default: 1.5 -- animatable; float

<Distortion__lume>.Amount_connected BooleanClass default: false -- boolean

<Distortion__lume>.Amount_paramName UndefinedClass default: undefined -- string;

<Distortion__lume>.Amount_shader UndefinedClass default: undefined -- texturemap

<Distortion__lume>.Barrel BooleanClass default: false -- animatable; boolean

<Distortion__lume>.Barrel_connected BooleanClass default: false -- boolean

<Distortion__lume>.Barrel_paramName UndefinedClass default: undefined -- string;

<Distortion__lume>.Barrel_shader UndefinedClass default: undefined -- texturemap

<Distortion__lume>.Pin_Cushion BooleanClass default: true -- animatable; boolean

<Distortion__lume>.Pin_Cushion_connected BooleanClass default: false -- boolean

<Distortion__lume>.Pin_Cushion_paramName UndefinedClass default: undefined -- string;

<Distortion__lume>.Pin_Cushion_shader UndefinedClass default: undefined -- texturemap

Distortion__lume interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

lume mental ray Shaders Index

MAXScript Extensions for mental ray


Edge__lume : textureMap

Edge__lume - superclass: textureMap; super-superclass:material - 51:0 - classID: #(2004031007, -1420187560)

Constructors:

Edge__lume ...

edge ...

Properties:

<Edge__lume>.amount Float default: 1.0 -- animatable; float

<Edge__lume>.Amount_connected BooleanClass default: false -- boolean

<Edge__lume>.Amount_paramName UndefinedClass default: undefined -- string;

<Edge__lume>.Amount_shader UndefinedClass default: undefined -- texturemap

<Edge__lume>.blur Float default: 0.0 -- animatable; float

<Edge__lume>.Blur_connected BooleanClass default: false -- boolean

<Edge__lume>.Blur_paramName UndefinedClass default: undefined -- string;

<Edge__lume>.Blur_shader UndefinedClass default: undefined -- texturemap

<Edge__lume>.diffuse Color default: (color 76.5 76.5 76.5) -- animatable; fRGBA color

<Edge__lume>.diffuse_connected BooleanClass default: false -- boolean

<Edge__lume>.Diffuse_Influence BooleanClass default: false -- animatable; boolean

<Edge__lume>.Diffuse_Influence_connected BooleanClass default: false -- boolean

<Edge__lume>.Diffuse_Influence_paramName UndefinedClass default: undefined -- string;

<Edge__lume>.Diffuse_Influence_shader UndefinedClass default: undefined -- texturemap

<Edge__lume>.diffuse_paramName UndefinedClass default: undefined -- string;

<Edge__lume>.diffuse_shader UndefinedClass default: undefined -- texturemap

<Edge__lume>.Noise_Influence BooleanClass default: false -- animatable; boolean

<Edge__lume>.Noise_Influence_connected BooleanClass default: false -- boolean

<Edge__lume>.Noise_Influence_paramName UndefinedClass default: undefined -- string;

<Edge__lume>.Noise_Influence_shader UndefinedClass default: undefined -- texturemap

<Edge__lume>.Relative_Color_Influence Float default: 1.0 -- animatable; float

<Edge__lume>.Relative_Color_Influence_connected BooleanClass default: false -- boolean

<Edge__lume>.Relative_Color_Influence_paramName UndefinedClass default: undefined -- string;

<Edge__lume>.Relative_Color_Influence_shader UndefinedClass default: undefined -- texturemap

<Edge__lume>.Relative_Noise_Influence Float default: 1.0 -- animatable; float

<Edge__lume>.Relative_Noise_Influence_connected BooleanClass default: false -- boolean

<Edge__lume>.Relative_Noise_Influence_paramName UndefinedClass default: undefined -- string;

<Edge__lume>.Relative_Noise_Influence_shader UndefinedClass default: undefined -- texturemap

<Edge__lume>.Relative_to_Object BooleanClass default: true -- animatable; boolean

<Edge__lume>.Relative_to_Object_connected BooleanClass default: false -- boolean

<Edge__lume>.Relative_to_Object_paramName UndefinedClass default: undefined -- string;

<Edge__lume>.Relative_to_Object_shader UndefinedClass default: undefined -- texturemap

<Edge__lume>.Relative_to_World BooleanClass default: false -- animatable; boolean

<Edge__lume>.Relative_to_World_connected BooleanClass default: false -- boolean

<Edge__lume>.Relative_to_World_paramName UndefinedClass default: undefined -- string;

<Edge__lume>.Relative_to_World_shader UndefinedClass default: undefined -- texturemap

<Edge__lume>.roughness Float default: 0.5 -- animatable; float

<Edge__lume>.Roughness_connected BooleanClass default: false -- boolean

<Edge__lume>.Roughness_paramName UndefinedClass default: undefined -- string;

<Edge__lume>.Roughness_shader UndefinedClass default: undefined -- texturemap

<Edge__lume>.Scale Float default: 1.0 -- animatable; float

<Edge__lume>.Scale_connected BooleanClass default: false -- boolean

<Edge__lume>.Scale_paramName UndefinedClass default: undefined -- string;

<Edge__lume>.Scale_shader UndefinedClass default: undefined -- texturemap

<Edge__lume>.Surface_Material Color default: (color 76.5 76.5 76.5) -- animatable; fRGBA color

<Edge__lume>.Surface_Material_connected BooleanClass default: false -- boolean

<Edge__lume>.Surface_Material_paramName UndefinedClass default: undefined -- string;

<Edge__lume>.Surface_Material_shader UndefinedClass default: undefined -- texturemap

<Edge__lume>.Transparency Float default: 1.0 -- animatable; float

Edge__lume interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

lume mental ray Shaders Index

MAXScript Extensions for mental ray


Edge_Shadow__lume : textureMap

Edge_Shadow__lume - superclass: textureMap; super-superclass:material - 51:0 - classID: #(2004031007, 1190707084)

Constructors:

Edge_Shadow__lume ...

EdgeShadow ...

Properties:

<Edge_Shadow__lume>.amount Float default: 10.0 -- animatable; float

<Edge_Shadow__lume>.Amount_connected BooleanClass default: false -- boolean

<Edge_Shadow__lume>.Amount_paramName UndefinedClass default: undefined -- string;

<Edge_Shadow__lume>.Amount_shader UndefinedClass default: undefined -- texturemap

<Edge_Shadow__lume>.blur Float default: 0.0 -- animatable; float

<Edge_Shadow__lume>.Blur_connected BooleanClass default: false -- boolean

<Edge_Shadow__lume>.Blur_paramName UndefinedClass default: undefined -- string;

<Edge_Shadow__lume>.Blur_shader UndefinedClass default: undefined -- texturemap

<Edge_Shadow__lume>.diffuse Color default: (color 76.5 76.5 76.5) -- animatable; fRGBA color

<Edge_Shadow__lume>.diffuse_connected BooleanClass default: false -- boolean

<Edge_Shadow__lume>.Diffuse_Influence BooleanClass default: false -- animatable; boolean

<Edge_Shadow__lume>.Diffuse_Influence_Amount Float default: 0.0 -- animatable; float

<Edge_Shadow__lume>.Diffuse_Influence_Amount_connected BooleanClass default: false -- boolean

<Edge_Shadow__lume>.Diffuse_Influence_Amount_paramName UndefinedClass default: undefined -- string;

<Edge_Shadow__lume>.Diffuse_Influence_Amount_shader UndefinedClass default: undefined -- texturemap

<Edge_Shadow__lume>.Diffuse_Influence_connected BooleanClass default: false -- boolean

<Edge_Shadow__lume>.Diffuse_Influence_paramName UndefinedClass default: undefined -- string;

<Edge_Shadow__lume>.Diffuse_Influence_shader UndefinedClass default: undefined -- texturemap

<Edge_Shadow__lume>.diffuse_paramName UndefinedClass default: undefined -- string;

<Edge_Shadow__lume>.diffuse_shader UndefinedClass default: undefined -- texturemap

<Edge_Shadow__lume>.Noise_Influence BooleanClass default: false -- animatable; boolean

<Edge_Shadow__lume>.Noise_Influence_Amount Float default: 0.0 -- animatable; float

<Edge_Shadow__lume>.Noise_Influence_Amount_connected BooleanClass default: false -- boolean

<Edge_Shadow__lume>.Noise_Influence_Amount_paramName UndefinedClass default: undefined -- string;

<Edge_Shadow__lume>.Noise_Influence_Amount_shader UndefinedClass default: undefined -- texturemap

<Edge_Shadow__lume>.Noise_Influence_connected BooleanClass default: false -- boolean

<Edge_Shadow__lume>.Noise_Influence_paramName UndefinedClass default: undefined -- string;

<Edge_Shadow__lume>.Noise_Influence_shader UndefinedClass default: undefined -- texturemap

<Edge_Shadow__lume>.Relative_to_Object BooleanClass default: true -- animatable; boolean

<Edge_Shadow__lume>.Relative_to_Object_connected BooleanClass default: false -- boolean

<Edge_Shadow__lume>.Relative_to_Object_paramName UndefinedClass default: undefined -- string;

<Edge_Shadow__lume>.Relative_to_Object_shader UndefinedClass default: undefined -- texturemap

<Edge_Shadow__lume>.Relative_to_World BooleanClass default: false -- animatable; boolean

<Edge_Shadow__lume>.Relative_to_World_connected BooleanClass default: false -- boolean

<Edge_Shadow__lume>.Relative_to_World_paramName UndefinedClass default: undefined -- string;

<Edge_Shadow__lume>.Relative_to_World_shader UndefinedClass default: undefined -- texturemap

<Edge_Shadow__lume>.roughness Float default: 0.5 -- animatable; float

<Edge_Shadow__lume>.Roughness_connected BooleanClass default: false -- boolean

<Edge_Shadow__lume>.Roughness_paramName UndefinedClass default: undefined -- string;

<Edge_Shadow__lume>.Roughness_shader UndefinedClass default: undefined -- texturemap

<Edge_Shadow__lume>.Scale Float default: 1.0 -- animatable; float

<Edge_Shadow__lume>.Scale_connected BooleanClass default: false -- boolean

<Edge_Shadow__lume>.Scale_paramName UndefinedClass default: undefined -- string;

<Edge_Shadow__lume>.Scale_shader UndefinedClass default: undefined -- texturemap

<Edge_Shadow__lume>.Surface_Material Color default: (color 76.5 76.5 76.5) -- animatable; fRGBA color

<Edge_Shadow__lume>.Surface_Material_connected BooleanClass default: false -- boolean

<Edge_Shadow__lume>.Surface_Material_paramName UndefinedClass default: undefined -- string;

<Edge_Shadow__lume>.Surface_Material_shader UndefinedClass default: undefined -- texturemap

<Edge_Shadow__lume>.Transparency Float default: 1.0 -- animatable; float

Edge_Shadow__lume interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

lume mental ray Shaders Index

MAXScript Extensions for mental ray


Facade__lume : textureMap

Facade__lume - superclass: textureMap; super-superclass:material - 20:0 - classID: #(2004031007, -1487583179)

Constructors:

Facade__lume ...

Façade ...

Properties:

<Facade__lume>.Bitmap String default: "" -- filename

<Facade__lume>.Bitmap_connected BooleanClass default: false -- boolean

<Facade__lume>.Bitmap_paramName UndefinedClass default: undefined -- string;

<Facade__lume>.Bitmap_shader UndefinedClass default: undefined -- texturemap

<Facade__lume>.Cylindrical_Rotation BooleanClass default: true -- animatable; boolean

<Facade__lume>.Cylindrical_Rotation_connected BooleanClass default: false -- boolean

<Facade__lume>.Cylindrical_Rotation_paramName UndefinedClass default: undefined -- string;

<Facade__lume>.Cylindrical_Rotation_shader UndefinedClass default: undefined -- texturemap

<Facade__lume>.Image_Frame_Number Integer default: 0 -- integer

<Facade__lume>.size Float default: 1.0 -- animatable; worldUnits

<Facade__lume>.Size_connected BooleanClass default: false -- boolean

<Facade__lume>.Size_paramName UndefinedClass default: undefined -- string;

<Facade__lume>.Size_shader UndefinedClass default: undefined -- texturemap

<Facade__lume>.Spherical_Rotation BooleanClass default: false -- animatable; boolean

<Facade__lume>.Up_Direction Point3 default: [0,0,1] -- animatable; point3

<Facade__lume>.Up_Direction_connected BooleanClass default: false -- boolean

<Facade__lume>.Up_Direction_paramName UndefinedClass default: undefined -- string;

<Facade__lume>.Up_Direction_shader UndefinedClass default: undefined -- texturemap

Facade__lume interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

lume mental ray Shaders Index

MAXScript Extensions for mental ray


Glare__lume : textureMap

Glare__lume : textureMap {7773161f,b853b035}

Constructor:

Glare__lume: class instances not creatable by MAXScript

Aliases:

Glare__lume

Glare

Properties:

<Glare__lume>.Quality : integer

<Glare__lume>.Spread : float

<Glare__lume>.Overlay_Only : boolean

<Glare__lume>.Verbose : boolean

<Glare__lume>.Streaks : boolean

<Glare__lume>.Streak_Image : texturemap

<Glare__lume>.Scale : float

<Glare__lume>.Contrast : float

<Glare__lume>.Specific_Objects : boolean

<Glare__lume>.Object_Labels : int array

<Glare__lume>.Specific_Objects_Buffer : string

<Glare__lume>.Calculation_Resolution : integer

<Glare__lume>.TheList : maxObject array

<Glare__lume>.Shader_Version : integer

Glare__lume interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

lume mental ray Shaders Index

MAXScript Extensions for mental ray


Glass__lume : textureMap

Glass__lume - superclass: textureMap; super-superclass:material - 141:0 - classID: #(2004031007, -1185697721)

Constructors:

Glass__lume ...

Glass ...

Properties:

<Glass__lume>.Blur_Reflection UndefinedClass default: undefined -- paramBlock2

<Glass__lume>.Blur_Transparency UndefinedClass default: undefined -- paramBlock2

<Glass__lume>.Color Color default: (color 255 255 255) -- animatable; fRGBA color

<Glass__lume>.Color_connected BooleanClass default: false -- boolean

<Glass__lume>.Color_paramName UndefinedClass default: undefined -- string;

<Glass__lume>.Color_shader UndefinedClass default: undefined -- texturemap

<Glass__lume>.Connection_struct__0000__Transparency_Tint UndefinedClass default: undefined -- paramBlock2

<Glass__lume>.Connection_struct__0001__Blur_Transparency UndefinedClass default: undefined -- paramBlock2

<Glass__lume>.Connection_struct__0002__Blur_Reflection UndefinedClass default: undefined -- paramBlock2

<Glass__lume>.Connection_struct__0003__Edge_Transparency UndefinedClass default: undefined -- paramBlock2

<Glass__lume>.Connection_struct__0004__Edge_Shadow UndefinedClass default: undefined -- paramBlock2

<Glass__lume>.Connection_struct__0005__Translucency UndefinedClass default: undefined -- paramBlock2

<Glass__lume>.Custom_Effect BooleanClass default: false -- animatable; boolean

<Glass__lume>.Custom_Effect_connected BooleanClass default: false -- boolean

<Glass__lume>.Custom_Effect_paramName UndefinedClass default: undefined -- string;

<Glass__lume>.Custom_Effect_shader UndefinedClass default: undefined -- texturemap

<Glass__lume>.diffuse Color default: (color 253.725 255 255) -- animatable; fRGBA color

<Glass__lume>.diffuse_connected BooleanClass default: false -- boolean

<Glass__lume>.diffuse_paramName UndefinedClass default: undefined -- string;

<Glass__lume>.diffuse_shader UndefinedClass default: undefined -- texturemap

<Glass__lume>.Edge Float default: 0.0 -- animatable; float

<Glass__lume>.Edge_connected BooleanClass default: false -- boolean

<Glass__lume>.Edge_paramName UndefinedClass default: undefined -- string;

<Glass__lume>.Edge_shader UndefinedClass default: undefined -- texturemap

<Glass__lume>.Edge_Shadow UndefinedClass default: undefined -- paramBlock2

<Glass__lume>.Edge_Transparency UndefinedClass default: undefined -- paramBlock2

<Glass__lume>.Fixed BooleanClass default: false -- animatable; boolean

<Glass__lume>.Fixed_connected BooleanClass default: false -- boolean

<Glass__lume>.Fixed_paramName UndefinedClass default: undefined -- string;

<Glass__lume>.Fixed_shader UndefinedClass default: undefined -- texturemap

<Glass__lume>.Fresnel_Effect BooleanClass default: true -- animatable; boolean

<Glass__lume>.Fresnel_Effect_connected BooleanClass default: false -- boolean

<Glass__lume>.Fresnel_Effect_paramName UndefinedClass default: undefined -- string;

<Glass__lume>.Fresnel_Effect_shader UndefinedClass default: undefined -- texturemap

<Glass__lume>.ImplicitLights ArrayParameter default: #() -- node array; SubAnim

<Glass__lume>.Index_Of_Refraction Float default: 1.5 -- animatable; float

<Glass__lume>.Index_Of_Refraction_connected BooleanClass default: false -- boolean

<Glass__lume>.Index_Of_Refraction_paramName UndefinedClass default: undefined -- string;

<Glass__lume>.Index_Of_Refraction_shader UndefinedClass default: undefined -- texturemap

<Glass__lume>.Lights ArrayParameter default: #() -- node array; SubAnim

<Glass__lume>.Middle Float default: 0.5 -- animatable; float

<Glass__lume>.Middle_connected BooleanClass default: false -- boolean

<Glass__lume>.Middle_paramName UndefinedClass default: undefined -- string;

<Glass__lume>.Middle_shader UndefinedClass default: undefined -- texturemap

<Glass__lume>.None BooleanClass default: false -- animatable; boolean

<Glass__lume>.None_connected BooleanClass default: false -- boolean

<Glass__lume>.None_paramName UndefinedClass default: undefined -- string;

<Glass__lume>.None_shader UndefinedClass default: undefined -- texturemap

<Glass__lume>.on BooleanClass default: true -- animatable; boolean

<Glass__lume>.On_connected BooleanClass default: false -- boolean

<Glass__lume>.On_paramName UndefinedClass default: undefined -- string;

<Glass__lume>.On_shader UndefinedClass default: undefined -- texturemap

<Glass__lume>.Reflectivity Float default: 1.0 -- animatable; float

<Glass__lume>.Reflectivity_connected BooleanClass default: false -- boolean

<Glass__lume>.Reflectivity_paramName UndefinedClass default: undefined -- string;

<Glass__lume>.Reflectivity_shader UndefinedClass default: undefined -- texturemap

<Glass__lume>.samples Integer default: 2 -- animatable; integer

<Glass__lume>.samples_connected BooleanClass default: false -- boolean

<Glass__lume>.samples_paramName UndefinedClass default: undefined -- string;

<Glass__lume>.samples_shader UndefinedClass default: undefined -- texturemap

<Glass__lume>.samples_shader UndefinedClass default: undefined -- texturemap

<Glass__lume>.Scale BooleanClass default: false -- animatable; boolean

<Glass__lume>.Scale_Amount Float default: 1.0 -- animatable; float

<Glass__lume>.Scale_Amount_connected BooleanClass default: false -- boolean

<Glass__lume>.Scale_Amount_paramName UndefinedClass default: undefined -- string;

<Glass__lume>.Scale_Amount_shader UndefinedClass default: undefined -- texturemap

<Glass__lume>.Scale_connected BooleanClass default: false -- boolean

<Glass__lume>.Scale_paramName UndefinedClass default: undefined -- string;

<Glass__lume>.Scale_shader UndefinedClass default: undefined -- texturemap

<Glass__lume>.Shift Float default: 1.0 -- animatable; float

<Glass__lume>.Shift_connected BooleanClass default: false -- boolean

<Glass__lume>.Shift_paramName UndefinedClass default: undefined -- string;

<Glass__lume>.Shift_shader UndefinedClass default: undefined -- texturemap

<Glass__lume>.spread Float default: 1.0 -- animatable; float

<Glass__lume>.spread_connected BooleanClass default: false -- boolean

<Glass__lume>.spread_paramName UndefinedClass default: undefined -- string;

<Glass__lume>.spread_shader UndefinedClass default: undefined -- texturemap

<Glass__lume>.Surface_Material Color default: (color 253.725 255 255) -- animatable; fRGBA color

<Glass__lume>.Surface_Material_connected BooleanClass default: false -- boolean

<Glass__lume>.Surface_Material_paramName UndefinedClass default: undefined -- string;

<Glass__lume>.Surface_Material_shader UndefinedClass default: undefined -- texturemap

<Glass__lume>.Translucency UndefinedClass default: undefined -- paramBlock2

<Glass__lume>.Transparency Float default: 1.0 -- animatable; float

<Glass__lume>.Transparency_connected BooleanClass default: false -- boolean

<Glass__lume>.Transparency_paramName UndefinedClass default: undefined -- string;

<Glass__lume>.Transparency_shader UndefinedClass default: undefined -- texturemap

<Glass__lume>.Transparency_Tint UndefinedClass default: undefined -- paramBlock2

<Glass__lume>.Use_Color BooleanClass default: false -- animatable; boolean

<Glass__lume>.Use_Color_connected BooleanClass default: false -- boolean

<Glass__lume>.Use_Color_paramName UndefinedClass default: undefined -- string;

<Glass__lume>.Use_Color_shader UndefinedClass default: undefined -- texturemap

<Glass__lume>.Use_Diffuse BooleanClass default: true -- animatable; boolean

<Glass__lume>.Use_Diffuse_connected BooleanClass default: false -- boolean

<Glass__lume>.Use_Diffuse_paramName UndefinedClass default: undefined -- string;

<Glass__lume>.Use_Diffuse_shader UndefinedClass default: undefined -- texturemap

<Glass__lume>.Use_lights BooleanClass default: false -- boolean

<Glass__lume>.Value Float default: 0.5 -- animatable; float

<Glass__lume>.Value_connected BooleanClass default: false -- boolean

<Glass__lume>.Value_paramName UndefinedClass default: undefined -- string;

<Glass__lume>.Value_shader UndefinedClass default: undefined -- texturemap

Glass__lume interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

lume mental ray Shaders Index

MAXScript Extensions for mental ray


Glow__lume : textureMap

Glow__lume - superclass: textureMap; super-superclass:material - 26:0 - classID: #(2004031007, -1117671334)

Constructors:

Glow__lume ...

Glow ...

Properties:

<Glow__lume>.brightness Float default: 3.0 -- animatable; float

<Glow__lume>.Brightness_connected BooleanClass default: false -- boolean

<Glow__lume>.Brightness_paramName UndefinedClass default: undefined -- string;

<Glow__lume>.Brightness_shader UndefinedClass default: undefined -- texturemap

<Glow__lume>.diffuse Color default: (color 76.5 76.5 76.5) -- animatable; fRGBA color

<Glow__lume>.diffuse_connected BooleanClass default: false -- boolean

<Glow__lume>.diffuse_paramName UndefinedClass default: undefined -- string;

<Glow__lume>.diffuse_shader UndefinedClass default: undefined -- texturemap

<Glow__lume>.Glow Color default: (color 102 76.5 51) -- animatable; fRGBA color

<Glow__lume>.Glow_connected BooleanClass default: false -- boolean

<Glow__lume>.Glow_paramName UndefinedClass default: undefined -- string;

<Glow__lume>.Glow_shader UndefinedClass default: undefined -- texturemap

<Glow__lume>.Mix_Diffuse BooleanClass default: true -- animatable; boolean

<Glow__lume>.Mix_Diffuse_connected BooleanClass default: false -- boolean

<Glow__lume>.Mix_Diffuse_paramName UndefinedClass default: undefined -- string;

<Glow__lume>.Mix_Diffuse_shader UndefinedClass default: undefined -- texturemap

<Glow__lume>.Surface_Material Color default: (color 76.5 76.5 76.5) -- animatable; fRGBA color

<Glow__lume>.Surface_Material_connected BooleanClass default: false -- boolean

<Glow__lume>.Surface_Material_paramName UndefinedClass default: undefined -- string;

<Glow__lume>.Surface_Material_shader UndefinedClass default: undefined -- texturemap

<Glow__lume>.Transparency Float default: 0.0 -- animatable; float

<Glow__lume>.Transparency_connected BooleanClass default: false -- boolean

<Glow__lume>.Transparency_paramName UndefinedClass default: undefined -- string;

<Glow__lume>.Transparency_shader UndefinedClass default: undefined -- texturemap

Glow__lume interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

lume mental ray Shaders Index

MAXScript Extensions for mental ray


Illumination__lume : textureMap

Illumination__lume : textureMap {7773161f,c05fb063}

Constructor:

Illumination__lume: class instances not creatable by MAXScript

Aliases:

Illumination__lume

Illumination

Properties:

<Illumination__lume>.Brightness : float

<Illumination__lume>.No_Falloff : boolean

<Illumination__lume>.Real_Falloff : boolean

<Illumination__lume>.Linear_Falloff : boolean

<Illumination__lume>.Linear_Start : float

<Illumination__lume>.Linear_End : float

<Illumination__lume>.Custom_Falloff : boolean

<Illumination__lume>.Custom_Start : float

<Illumination__lume>.Custom_Mid : float

<Illumination__lume>.Custom_End : float

<Illumination__lume>.Brightness_connected : boolean

<Illumination__lume>.Brightness_shader : texturemap

<Illumination__lume>.Brightness_paramName : string

<Illumination__lume>.No_Falloff_connected : boolean

<Illumination__lume>.No_Falloff_shader : texturemap

<Illumination__lume>.No_Falloff_paramName : string

<Illumination__lume>.Real_Falloff_connected : boolean

<Illumination__lume>.Real_Falloff_shader : texturemap

<Illumination__lume>.Real_Falloff_paramName : string

<Illumination__lume>.Linear_Falloff_connected : boolean

<Illumination__lume>.Linear_Falloff_shader : texturemap

<Illumination__lume>.Linear_Falloff_paramName : string

<Illumination__lume>.Linear_Start_connected : boolean

<Illumination__lume>.Linear_Start_shader : texturemap

<Illumination__lume>.Linear_Start_paramName : string

<Illumination__lume>.Linear_End_connected : boolean

<Illumination__lume>.Linear_End_shader : texturemap

<Illumination__lume>.Linear_End_paramName : string

<Illumination__lume>.Custom_Falloff_connected : boolean

<Illumination__lume>.Custom_Falloff_shader : texturemap

<Illumination__lume>.Custom_Falloff_paramName : string

<Illumination__lume>.Custom_Start_connected : boolean

<Illumination__lume>.Custom_Start_shader : texturemap

<Illumination__lume>.Custom_Start_paramName : string

<Illumination__lume>.Custom_Mid_connected : boolean

<Illumination__lume>.Custom_Mid_shader : texturemap

<Illumination__lume>.Custom_Mid_paramName : string

<Illumination__lume>.Custom_End_connected : boolean

<Illumination__lume>.Custom_End_shader : texturemap

<Illumination__lume>.Custom_End_paramName : string

<Illumination__lume>.TheList : maxObject array

<Illumination__lume>.Shader_Version : integer

Illumination__lume interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

lume mental ray Shaders Index

MAXScript Extensions for mental ray


Landscape__lume : textureMap

Landscape__lume - superclass: textureMap; super-superclass:material - 162:0 - classID: #(2004031007, 1510033005)

Constructors:

Landscape__lume ...

Landscape ...

Properties:

<Landscape__lume>.active BooleanClass default: false -- animatable; boolean

<Landscape__lume>.Active_connected BooleanClass default: false -- boolean

<Landscape__lume>.Active_paramName UndefinedClass default: undefined -- string;

<Landscape__lume>.Active_shader UndefinedClass default: undefined -- texturemap

<Landscape__lume>.angle Float default: 40.0 -- animatable; float

<Landscape__lume>.Angle_connected BooleanClass default: false -- boolean

<Landscape__lume>.Angle_paramName UndefinedClass default: undefined -- string;

<Landscape__lume>.Angle_shader UndefinedClass default: undefined -- texturemap

<Landscape__lume>.Base_Color Color default: (color 178.5 153 102) -- animatable; fRGBA color

<Landscape__lume>.base_color_connected BooleanClass default: false -- boolean

<Landscape__lume>.base_color_paramName UndefinedClass default: undefined -- string;

<Landscape__lume>.base_color_shader UndefinedClass default: undefined -- texturemap

<Landscape__lume>.Base_Plane_Distance Float default: 0.0 -- animatable; worldUnits

<Landscape__lume>.Base_Plane_Distance_connected BooleanClass default: false -- boolean

<Landscape__lume>.Base_Plane_Distance_paramName UndefinedClass default: undefined -- string;

<Landscape__lume>.Base_Plane_Distance_shader UndefinedClass default: undefined -- texturemap

<Landscape__lume>.Base_Plane_Normal Point3 default: [0,0,1] -- animatable; point3

<Landscape__lume>.Base_Plane_Normal_connected BooleanClass default: false -- boolean

<Landscape__lume>.Base_Plane_Normal_paramName UndefinedClass default: undefined -- string;

<Landscape__lume>.Base_Plane_Normal_shader UndefinedClass default: undefined -- texturemap

<Landscape__lume>.blur Float default: 0.3 -- animatable; float

<Landscape__lume>.Blur_connected BooleanClass default: false -- boolean

<Landscape__lume>.Blur_paramName UndefinedClass default: undefined -- string;

<Landscape__lume>.Blur_shader UndefinedClass default: undefined -- texturemap

<Landscape__lume>.Connection_struct__0000__Texture UndefinedClass default: undefined -- paramBlock2

<Landscape__lume>.Connection_struct__0001__Height UndefinedClass default: undefined -- paramBlock2

<Landscape__lume>.Connection_struct__0002__Slope UndefinedClass default: undefined -- paramBlock2

<Landscape__lume>.Connection_struct__0003__Positional_Noise UndefinedClass default: undefined -- paramBlock2

<Landscape__lume>.Connection_struct__0004__Shape_Based_Noise UndefinedClass default: undefined -- paramBlock2

<Landscape__lume>.Connection_struct__0005__Stain UndefinedClass default: undefined -- paramBlock2

<Landscape__lume>.Coverage Float default: 0.0 -- animatable; float

<Landscape__lume>.Coverage_connected BooleanClass default: false -- boolean

<

<Landscape__lume>.Coverage_paramName UndefinedClass default: undefined -- string;

<Landscape__lume>.Coverage_shader UndefinedClass default: undefined -- texturemap

<Landscape__lume>.Height UndefinedClass default: undefined -- paramBlock2

<Landscape__lume>.height UndefinedClass default: undefined -- worldUnits

<Landscape__lume>.Height_connected BooleanClass default: false -- boolean

<Landscape__lume>.Height_paramName UndefinedClass default: undefined -- string;

<Landscape__lume>.Height_shader UndefinedClass default: undefined -- texturemap

<Landscape__lume>.Influence Float default: 1.0 -- animatable; float

<Landscape__lume>.Influence_connected BooleanClass default: false -- boolean

<Landscape__lume>.Influence_paramName UndefinedClass default: undefined -- string;

<Landscape__lume>.Influence_shader UndefinedClass default: undefined -- texturemap

<Landscape__lume>.Overlay_Color Color default: (color 51 102 51) -- animatable; fRGBA color

<Landscape__lume>.Overlay_Color_connected BooleanClass default: false -- boolean

<Landscape__lume>.Overlay_Color_paramName UndefinedClass default: undefined -- string;

<Landscape__lume>.Overlay_Color_shader UndefinedClass default: undefined -- texturemap

<Landscape__lume>.Positional_Noise UndefinedClass default: undefined -- paramBlock2

<Landscape__lume>.Relative_to_Object BooleanClass default: false -- animatable; boolean

<Landscape__lume>.Relative_to_Object_connected BooleanClass default: false -- boolean

<Landscape__lume>.Relative_to_Object_paramName UndefinedClass default: undefined -- string;

<Landscape__lume>.Relative_to_Object_shader UndefinedClass default: undefined -- texturemap

<Landscape__lume>.Relative_to_World BooleanClass default: true -- animatable; boolean

<Landscape__lume>.Relative_to_World_connected BooleanClass default: false -- boolean

<Landscape__lume>.Relative_to_World_paramName UndefinedClass default: undefined -- string;

<Landscape__lume>.Relative_to_World_shader UndefinedClass default: undefined -- texturemap

<Landscape__lume>.roughness Float default: 0.0 -- animatable; float

<Landscape__lume>.Roughness_connected BooleanClass default: false -- boolean

<Landscape__lume>.Roughness_paramName UndefinedClass default: undefined -- string;

<Landscape__lume>.Roughness_shader UndefinedClass default: undefined -- texturemap

<Landscape__lume>.Scale Float default: 1.0 -- animatable; float

<Landscape__lume>.Scale_connected BooleanClass default: false -- boolean

<Landscape__lume>.Scale_paramName UndefinedClass default: undefined -- string;

<Landscape__lume>.Scale_shader UndefinedClass default: undefined -- texturemap

<Landscape__lume>.Shape_Based_Noise UndefinedClass default: undefined -- paramBlock2

<Landscape__lume>.Slope UndefinedClass default: undefined -- paramBlock2

<Landscape__lume>.spread Float default: 2.0 -- animatable; float

<Landscape__lume>.spread_connected BooleanClass default: false -- boolean

<Landscape__lume>.spread_paramName UndefinedClass default: undefined -- string;

<Landscape__lume>.spread_shader UndefinedClass default: undefined -- texturemap

<Landscape__lume>.Stain UndefinedClass default: undefined -- paramBlock2

<Landscape__lume>.Texture UndefinedClass default: undefined -- paramBlock2

<Landscape__lume>.Thickness Float default: 0.0 -- animatable; worldUnits

<Landscape__lume>.Thickness_connected BooleanClass default: false -- boolean

<Landscape__lume>.Thickness_paramName UndefinedClass default: undefined -- string;

<Landscape__lume>.Thickness_shader UndefinedClass default: undefined -- texturemap

<Landscape__lume>.Upside_Down BooleanClass default: false -- animatable; boolean

<Landscape__lume>.Upside_Down BooleanClass default: false -- animatable; boolean

<Landscape__lume>.Upside_Down_connected BooleanClass default: false -- boolean

<Landscape__lume>.Upside_Down_connected BooleanClass default: false -- boolean

<Landscape__lume>.Upside_Down_paramName UndefinedClass default: undefined -- string;

<Landscape__lume>.Upside_Down_paramName UndefinedClass default: undefined -- string;

<Landscape__lume>.Upside_Down_shader UndefinedClass default: undefined -- texturemap

<Landscape__lume>.Upside_Down_shader UndefinedClass default: undefined -- texturemap

<Landscape__lume>.Use_Alpha_Component BooleanClass default: false -- animatable; boolean

<Landscape__lume>.Use_Alpha_Component_connected BooleanClass default: false -- boolean

<Landscape__lume>.Use_Alpha_Component_paramName UndefinedClass default: undefined -- string;

<Landscape__lume>.Use_Alpha_Component_shader UndefinedClass default: undefined -- texturemap

<Landscape__lume>.Use_Blue_Component BooleanClass default: true -- animatable; boolean

<Landscape__lume>.Use_Blue_Component_connected BooleanClass default: false -- boolean

<Landscape__lume>.Use_Blue_Component_paramName UndefinedClass default: undefined -- string;

<Landscape__lume>.Use_Blue_Component_shader UndefinedClass default: undefined -- texturemap

<Landscape__lume>.Use_Green_Component BooleanClass default: true -- animatable; boolean

<Landscape__lume>.Use_Green_Component_connected BooleanClass default: false -- boolean

<Landscape__lume>.Use_Green_Component_paramName UndefinedClass default: undefined -- string;

<Landscape__lume>.Use_Green_Component_shader UndefinedClass default: undefined -- texturemap

<Landscape__lume>.Use_Red_Component BooleanClass default: true -- animatable; boolean

<Landscape__lume>.Use_Red_Component_connected BooleanClass default: false -- boolean

<Landscape__lume>.Use_Red_Component_paramName UndefinedClass default: undefined -- string;

<Landscape__lume>.Use_Red_Component_shader UndefinedClass default: undefined -- texturemap

<Landscape__lume>.Vertical_Scale Float default: 1.0 -- animatable; float

<Landscape__lume>.Vertical_Scale Float default: 1.0 -- animatable; float

<Landscape__lume>.Vertical_Scale_connected BooleanClass default: false -- boolean

<Landscape__lume>.Vertical_Scale_connected BooleanClass default: false -- boolean

<Landscape__lume>.Vertical_Scale_paramName UndefinedClass default: undefined -- string;

<Landscape__lume>.Vertical_Scale_paramName UndefinedClass default: undefined -- string;

<Landscape__lume>.Vertical_Scale_shader UndefinedClass default: undefined -- texturemap

<Landscape__lume>.Vertical_Scale_shader UndefinedClass default: undefined -- texturemap

Landscape__lume interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

lume mental ray Shaders Index

MAXScript Extensions for mental ray


Metal__lume : textureMap

Metal__lume - superclass: textureMap; super-superclass:material - 26:0 - classID: #(2004031007, -1486444236)

Constructors:

Metal__lume ...

Metal ...

Properties:

<Metal__lume>.Blur_Reflection BooleanClass default: false -- animatable; boolean

<Metal__lume>.Blur_Reflection_connected BooleanClass default: false -- boolean

<Metal__lume>.Blur_Reflection_paramName UndefinedClass default: undefined -- string;

<Metal__lume>.Blur_Reflection_shader UndefinedClass default: undefined -- texturemap

<Metal__lume>.Reflect_Color Color default: (color 153 153 153) -- animatable; fRGBA color

<Metal__lume>.Reflect_Color_connected BooleanClass default: false -- boolean

<Metal__lume>.Reflect_Color_paramName UndefinedClass default: undefined -- string;

<Metal__lume>.Reflect_Color_shader UndefinedClass default: undefined -- texturemap

<Metal__lume>.Reflectivity Float default: 0.9 -- animatable; float

<Metal__lume>.Reflectivity_connected BooleanClass default: false -- boolean

<Metal__lume>.Reflectivity_paramName UndefinedClass default: undefined -- string;

<Metal__lume>.Reflectivity_shader UndefinedClass default: undefined -- texturemap

<Metal__lume>.samples Integer default: 10 -- animatable; integer

<Metal__lume>.samples_connected BooleanClass default: false -- boolean

<Metal__lume>.samples_paramName UndefinedClass default: undefined -- string;

<Metal__lume>.samples_shader UndefinedClass default: undefined -- texturemap

<Metal__lume>.spread Float default: 10.0 -- animatable; float

<Metal__lume>.spread_connected BooleanClass default: false -- boolean

<Metal__lume>.spread_paramName UndefinedClass default: undefined -- string

<Metal__lume>.spread_shader UndefinedClass default: undefined -- texturemap

<Metal__lume>.Surface_Material Color default: (color 204 216.75 216.75) -- animatable; fRGBA color

<Metal__lume>.Surface_Material_connected BooleanClass default: false -- boolean

<Metal__lume>.Surface_Material_paramName UndefinedClass default: undefined -- string

<Metal__lume>.Surface_Material_shader UndefinedClass default: undefined -- texturemap

Metal__lume interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

lume mental ray Shaders Index

MAXScript Extensions for mental ray


Mist__lume : textureMap

Mist__lume - superclass: textureMap; super-superclass:material - 79:0 - classID: #(2004031007, -1167741600)

Constructors:

Mist__lume ...

Mist ...

Properties:

<Mist__lume>.Affect_Alpha BooleanClass default: false -- animatable; boolean

<Mist__lume>.Affect_Alpha_connected BooleanClass default: false -- boolean

<Mist__lume>.Affect_Alpha_paramName UndefinedClass default: undefined -- string

<Mist__lume>.Affect_Alpha_shader UndefinedClass default: undefined -- texturemap

<Mist__lume>.Base_Plane_Distance Float default: 0.0 -- animatable; worldUnits

<Mist__lume>.Base_Plane_Distance_connected BooleanClass default: false -- boolean

<Mist__lume>.Base_Plane_Distance_paramName UndefinedClass default: undefined -- string

<Mist__lume>.Base_Plane_Distance_shader UndefinedClass default: undefined -- texturemap

<Mist__lume>.Base_Plane_Normal Point3 default: [0,0,1] -- animatable; point3

<Mist__lume>.Base_Plane_Normal_connected BooleanClass default: false -- boolean

<Mist__lume>.Base_Plane_Normal_paramName UndefinedClass default: undefined -- string

<Mist__lume>.Base_Plane_Normal_shader UndefinedClass default: undefined -- texturemap

<Mist__lume>.Bitmap String default: "" -- filename

<Mist__lume>.Bitmap_connected BooleanClass default: false -- boolean

<Mist__lume>.Bitmap_paramName UndefinedClass default: undefined -- string

<Mist__lume>.Bitmap_shader UndefinedClass default: undefined -- texturemap

<Mist__lume>.Custom_End Float default: 1000.0 -- animatable; worldUnits

<Mist__lume>.Custom_End_connected BooleanClass default: false -- boolean

<Mist__lume>.Custom_End_paramName UndefinedClass default: undefined -- string

<Mist__lume>.Custom_End_shader UndefinedClass default: undefined -- texturemap

<Mist__lume>.Custom_Falloff BooleanClass default: false -- animatable; boolean

<Mist__lume>.Custom_Falloff_connected BooleanClass default: false -- boolean

<Mist__lume>.Custom_Falloff_paramName UndefinedClass default: undefined -- string

<Mist__lume>.Custom_Falloff_shader UndefinedClass default: undefined -- texturemap

<Mist__lume>.Custom_Middle Float default: 500.0 -- animatable; worldUnits

<Mist__lume>.Custom_Middle_connected BooleanClass default: false -- boolean

<Mist__lume>.Custom_Middle_paramName UndefinedClass default: undefined -- string

<Mist__lume>.Custom_Middle_shader UndefinedClass default: undefined -- texturemap

<Mist__lume>.Custom_Start Float default: 0.0 -- animatable; worldUnits

<Mist__lume>.Custom_Start_connected BooleanClass default: false -- boolean

<Mist__lume>.Custom_Start_paramName UndefinedClass default: undefined -- string

<Mist__lume>.Custom_Start_shader UndefinedClass default: undefined -- texturemap

<Mist__lume>.Density Float default: 0.5 -- animatable; float

<Mist__lume>.Density_connected BooleanClass default: false -- boolean

<Mist__lume>.Density_paramName UndefinedClass default: undefined -- string;

<Mist__lume>.Density_shader UndefinedClass default: undefined -- texturemap

<Mist__lume>.Image_Frame_Number Integer default: 0 -- integer

<Mist__lume>.Layering BooleanClass default: false -- animatable; boolean

<Mist__lume>.Layering_connected BooleanClass default: false -- boolean

<Mist__lume>.Layering_paramName UndefinedClass default: undefined -- string

<Mist__lume>.Layering_shader UndefinedClass default: undefined -- texturemap

<Mist__lume>.Linear_End Float default: 1000.0 -- animatable; float

<Mist__lume>.Linear_End_connected BooleanClass default: false -- boolean

<Mist__lume>.Linear_End_paramName UndefinedClass default: undefined -- string

<Mist__lume>.Linear_End_shader UndefinedClass default: undefined -- texturemap

<Mist__lume>.Linear_Falloff BooleanClass default: false -- animatable; boolean

<Mist__lume>.Linear_Falloff_connected BooleanClass default: false -- boolean

<Mist__lume>.Linear_Falloff_paramName UndefinedClass default: undefined -- string

<Mist__lume>.Linear_Falloff_shader UndefinedClass default: undefined -- texturemap

<Mist__lume>.Linear_Start Float default: 0.0 -- animatable; float

<Mist__lume>.Linear_Start_connected BooleanClass default: false -- boolean

<Mist__lume>.Linear_Start_paramName UndefinedClass default: undefined -- string

<Mist__lume>.Linear_Start_shader UndefinedClass default: undefined -- texturemap

<Mist__lume>.Realistic_Falloff BooleanClass default: true -- animatable; boolean

<Mist__lume>.Realistic_Falloff_connected BooleanClass default: false -- boolean

<Mist__lume>.Realistic_Falloff_paramName UndefinedClass default: undefined -- string

<Mist__lume>.Realistic_Falloff_shader UndefinedClass default: undefined -- texturemap

<Mist__lume>.Solid_Color Color default: (color 15.3 15.3 15.3) -- animatable; fRGBA color

<Mist__lume>.Solid_Color_connected BooleanClass default: false -- boolean

<Mist__lume>.Solid_Color_paramName UndefinedClass default: undefined -- string

<Mist__lume>.Solid_Color_shader UndefinedClass default: undefined -- texturemap

error accessing parameter: TheList

<Mist__lume>.Transition_Height Float default: 100.0 -- animatable; float

<Mist__lume>.Transition_Height_connected BooleanClass default: false -- boolean

<Mist__lume>.Transition_Height_paramName UndefinedClass default: undefined -- string

<Mist__lume>.Transition_Height_shader UndefinedClass default: undefined -- texturemap

<Mist__lume>.Transparency Float default: 0.5 -- animatable; float

<Mist__lume>.Transparency_connected BooleanClass default: false -- boolean

<Mist__lume>.Transparency_paramName UndefinedClass default: undefined -- string

<Mist__lume>.Transparency_shader UndefinedClass default: undefined -- texturemap

<Mist__lume>.Use_Map BooleanClass default: false -- animatable; boolean

<Mist__lume>.Use_Map_connected BooleanClass default: false -- boolean

<Mist__lume>.Use_Map_paramName UndefinedClass default: undefined -- string

<Mist__lume>.Use_Map_shader UndefinedClass default: undefined -- texturemap

<Mist__lume>.Use_Solid_Color BooleanClass default: true -- animatable; boolean

<Mist__lume>.Use_Solid_Color_connected BooleanClass default: false -- boolean

<Mist__lume>.Use_Solid_Color_paramName UndefinedClass default: undefined -- string

<Mist__lume>.Use_Solid_Color_shader UndefinedClass default: undefined -- texturemap

Mist__lume interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

lume mental ray Shaders Index

MAXScript Extensions for mental ray


Night__lume : textureMap

Night__lume - superclass: textureMap; super-superclass:material - 10:0 - classID: #(2004031007, -1369854643)

Constructors:

Night__lume ...

Night ...

Properties:

<Night__lume>.Cutoff Float default: 1.0 -- animatable; float

<Night__lume>.Cutoff_connected BooleanClass default: false -- boolean

<Night__lume>.Cutoff_paramName UndefinedClass default: undefined -- string

<Night__lume>.Cutoff_shader UndefinedClass default: undefined -- texturemap

<Night__lume>.Multiplier Float default: 1.0 -- animatable; float

<Night__lume>.Multiplier_connected BooleanClass default: false -- boolean

<Night__lume>.Multiplier_paramName UndefinedClass default: undefined -- string

<Night__lume>.Multiplier_shader UndefinedClass default: undefined -- texturemap

Night__lume interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

lume mental ray Shaders Index

MAXScript Extensions for mental ray


Ocean__lume : textureMap

Ocean__lume - superclass: textureMap; super-superclass:material - 70:0 - classID: #(2004031007, -1487427788)

Constructors:

Ocean__lume ...

Ocean ...

Properties:

<Ocean__lume>.Base_Plane_Distance Float default: 0.0 -- animatable; worldUnits

<Ocean__lume>.Base_Plane_Distance_connected BooleanClass default: false -- boolean

<Ocean__lume>.Base_Plane_Distance_paramName UndefinedClass default: undefined -- string

<Ocean__lume>.Base_Plane_Distance_shader UndefinedClass default: undefined -- texturemap

<Ocean__lume>.Base_Plane_Normal Point3 default: [0,0,1] -- animatable; point3

<Ocean__lume>.Base_Plane_Normal_connected BooleanClass default: false -- boolean

<Ocean__lume>.Base_Plane_Normal_paramName UndefinedClass default: undefined -- string

<Ocean__lume>.Base_Plane_Normal_shader UndefinedClass default: undefined -- texturemap

<Ocean__lume>.Bump BooleanClass default: true -- animatable; boolean

<Ocean__lume>.Bump_connected BooleanClass default: false -- boolean

<Ocean__lume>.Bump_paramName UndefinedClass default: undefined -- string

<Ocean__lume>.Bump_shader UndefinedClass default: undefined -- texturemap

<Ocean__lume>.Directed BooleanClass default: false -- animatable; boolean

<Ocean__lume>.Directed_connected BooleanClass default: false -- boolean

<Ocean__lume>.Directed_paramName UndefinedClass default: undefined -- string

<Ocean__lume>.Directed_shader UndefinedClass default: undefined -- texturemap

<Ocean__lume>.Direction_Angle Float default: 0.0 -- animatable; float

<Ocean__lume>.Direction_Angle_connected BooleanClass default: false -- boolean

<Ocean__lume>.Direction_Angle_paramName UndefinedClass default: undefined -- string

<Ocean__lume>.Direction_Angle_shader UndefinedClass default: undefined -- texturemap

<Ocean__lume>.Flats BooleanClass default: true -- animatable; boolean

<Ocean__lume>.Flats_connected BooleanClass default: false -- boolean

<Ocean__lume>.Flats_paramName UndefinedClass default: undefined -- string

<Ocean__lume>.Flats_shader UndefinedClass default: undefined -- texturemap

<Ocean__lume>.Largest Float default: 100.0 -- animatable; worldUnits

<Ocean__lume>.Largest_connected BooleanClass default: false -- boolean

<Ocean__lume>.Largest_paramName UndefinedClass default: undefined -- string

<Ocean__lume>.Largest_shader UndefinedClass default: undefined -- texturemap

<Ocean__lume>.Loop_Animation BooleanClass default: true -- animatable; boolean

<Ocean__lume>.Loop_Animation_connected BooleanClass default: false -- boolean

<Ocean__lume>.Loop_Animation_paramName UndefinedClass default: undefined -- string

<Ocean__lume>.Loop_Animation_shader UndefinedClass default: undefined -- texturemap

<Ocean__lume>.Loop_Frames Integer default: 100 -- animatable; integer

<Ocean__lume>.Loop_Frames_connected BooleanClass default: false -- boolean

<Ocean__lume>.Loop_Frames_paramName UndefinedClass default: undefined -- string

<Ocean__lume>.Loop_Frames_shader UndefinedClass default: undefined -- texturemap

<Ocean__lume>.quantity Integer default: 10 -- animatable; integer

<Ocean__lume>.Quantity_connected BooleanClass default: false -- boolean

<Ocean__lume>.Quantity_paramName UndefinedClass default: undefined -- string

<Ocean__lume>.Quantity_shader UndefinedClass default: undefined -- texturemap

<Ocean__lume>.Relative_to_Object BooleanClass default: false -- animatable; boolean

<Ocean__lume>.Relative_to_Object_connected BooleanClass default: false -- boolean

<Ocean__lume>.Relative_to_Object_paramName UndefinedClass default: undefined -- string

<Ocean__lume>.Relative_to_Object_shader UndefinedClass default: undefined -- texturemap

<Ocean__lume>.Relative_to_World BooleanClass default: true -- animatable; boolean

<Ocean__lume>.Relative_to_World_connected BooleanClass default: false -- boolean

<Ocean__lume>.Relative_to_World_paramName UndefinedClass default: undefined -- string

<Ocean__lume>.Relative_to_World_shader UndefinedClass default: undefined -- texturemap

<Ocean__lume>.size Float default: 1.0 -- animatable; worldUnits

<Ocean__lume>.Size_connected BooleanClass default: false -- boolean

<Ocean__lume>.Size_paramName UndefinedClass default: undefined -- string

<Ocean__lume>.Size_shader UndefinedClass default: undefined -- texturemap

<Ocean__lume>.Smallest Float default: 1.0 -- animatable; worldUnits

<Ocean__lume>.Smallest_connected BooleanClass default: false -- boolean

<Ocean__lume>.Smallest_paramName UndefinedClass default: undefined -- string

<Ocean__lume>.Smallest_shader UndefinedClass default: undefined -- texturemap

<Ocean__lume>.Steepness Float default: 5.0 -- animatable; float

<Ocean__lume>.Steepness_connected BooleanClass default: false -- boolean

<Ocean__lume>.Steepness_paramName UndefinedClass default: undefined -- string

<Ocean__lume>.Steepness_shader UndefinedClass default: undefined -- texturemap

<Ocean__lume>.variation Float default: 1.0 -- animatable; float

<Ocean__lume>.Variation_connected BooleanClass default: false -- boolean

<Ocean__lume>.Variation_paramName UndefinedClass default: undefined -- string

<Ocean__lume>.Variation_shader UndefinedClass default: undefined -- texturemap

<Ocean__lume>.Wave_Speed Float default: 1.0 -- animatable; float

<Ocean__lume>.Wave_Speed_connected BooleanClass default: false -- boolean

<Ocean__lume>.Wave_Speed_paramName UndefinedClass default: undefined -- string

<Ocean__lume>.Wave_Speed_shader UndefinedClass default: undefined -- texturemap

Ocean__lume interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

lume mental ray Shaders Index

MAXScript Extensions for mental ray


Stain__lume : textureMap

Stain__lume - superclass: textureMap; super-superclass:material - 2:0 - classID: #(2004031007, -1353467824)

Constructors:

Stain__lume ...

Stain ...

Properties:

--None--

Stain__lume interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

lume mental ray Shaders Index

MAXScript Extensions for mental ray


Submerge__lume : textureMap

Submerge__lume - superclass: textureMap; super-superclass:material - 22:0 - classID: #(2004031007, 1308052297)

Constructors:

Submerge__lume ...

Submerge ...

Properties:

<Submerge__lume>.Base_Plane_Distance Float default: -0.001 -- animatable; worldUnits

<Submerge__lume>.Base_Plane_Distance_connected BooleanClass default: false -- boolean

<Submerge__lume>.Base_Plane_Distance_paramName UndefinedClass default: undefined -- string

<Submerge__lume>.Base_Plane_Distance_shader UndefinedClass default: undefined -- texturemap

<Submerge__lume>.Base_Plane_Normal Point3 default: [0,0,1] -- animatable; point3

<Submerge__lume>.Base_Plane_Normal_connected BooleanClass default: false -- boolean

<Submerge__lume>.Base_Plane_Normal_paramName UndefinedClass default: undefined -- string

<Submerge__lume>.Base_Plane_Normal_shader UndefinedClass default: undefined -- texturemap

<Submerge__lume>.Density Float default: 0.1 -- animatable; float

<Submerge__lume>.Density_connected BooleanClass default: false -- boolean

<Submerge__lume>.Density_paramName UndefinedClass default: undefined -- string

<Submerge__lume>.Density_shader UndefinedClass default: undefined -- texturemap

<Submerge__lume>.Vertical_Gradation Float default: 0.5 -- animatable; float

<Submerge__lume>.Vertical_Gradation_connected BooleanClass default: false -- boolean

<Submerge__lume>.Vertical_Gradation_paramName UndefinedClass default: undefined -- string

<Submerge__lume>.Vertical_Gradation_shader UndefinedClass default: undefined -- texturemap

<Submerge__lume>.Water_Color Color default: (color 0 178.5 178.5) -- animatable; fRGBA color

<Submerge__lume>.Water_Color_connected BooleanClass default: false -- boolean

<Submerge__lume>.Water_Color_paramName UndefinedClass default: undefined -- string

<Submerge__lume>.Water_Color_shader UndefinedClass default: undefined -- texturemap

Submerge__lume interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

lume mental ray Shaders Index

MAXScript Extensions for mental ray


Translucency__lume : textureMap

Translucency__lume - superclass: textureMap; super-superclass:material - 17:0 - classID: #(2004031007, -1167477675)

Constructors:

Translucency__lume ...

Translucency ...

Properties:

<Translucency__lume>.diffuse Color default: (color 153 178.5 204) -- animatable; fRGBA color

<Translucency__lume>.diffuse_connected BooleanClass default: false -- boolean

<Translucency__lume>.diffuse_paramName UndefinedClass default: undefined -- string

<Translucency__lume>.diffuse_shader UndefinedClass default: undefined -- texturemap

<Translucency__lume>.ImplicitLights ArrayParameter default: #() -- node array; SubAnim

<Translucency__lume>.Lights ArrayParameter default: #() -- node array; SubAnim

<Translucency__lume>.Surface_Material Color default: (color 76.5 76.5 76.5) -- animatable; fRGBA color

<Translucency__lume>.Surface_Material_connected BooleanClass default: false -- boolean

<Translucency__lume>.Surface_Material_paramName UndefinedClass default: undefined -- string

<Translucency__lume>.Surface_Material_shader UndefinedClass default: undefined -- texturemap

<Translucency__lume>.Transparency Float default: 0.5 -- animatable; float

<Translucency__lume>.Transparency_connected BooleanClass default: false -- boolean

<Translucency__lume>.Transparency_paramName UndefinedClass default: undefined -- string

<Translucency__lume>.Transparency_shader UndefinedClass default: undefined -- texturemap

<Translucency__lume>.Use_lights BooleanClass default: false -- boolean

Translucency__lume interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

lume mental ray Shaders Index

MAXScript Extensions for mental ray


Water_Surface__lume : textureMap

Water_Surface__lume - superclass: textureMap; super-superclass:material - 26:0 - classID: #(2004031007, -1202415786)

Constructors:

Water_Surface__lume ...

WaterSurface ...

Properties:

<Water_Surface__lume>.Index_Of_Refraction Float default: 1.33 -- animatable; float

<Water_Surface__lume>.Index_Of_Refraction_connected BooleanClass default: false -- boolean

<Water_Surface__lume>.Index_Of_Refraction_paramName UndefinedClass default: undefined -- string

<Water_Surface__lume>.Index_Of_Refraction_shader UndefinedClass default: undefined -- texturemap

<Water_Surface__lume>.Looking_Into_Water BooleanClass default: true -- animatable; boolean

<Water_Surface__lume>.Looking_Into_Water_connected BooleanClass default: false -- boolean

<Water_Surface__lume>.Looking_Into_Water_paramName UndefinedClass default: undefined -- string

<Water_Surface__lume>.Looking_Into_Water_shader UndefinedClass default: undefined -- texturemap

<Water_Surface__lume>.Looking_Out_of_Water BooleanClass default: false -- animatable; boolean

<Water_Surface__lume>.Looking_Out_of_Water_connected BooleanClass default: false -- boolean

<Water_Surface__lume>.Looking_Out_of_Water_paramName UndefinedClass default: undefined -- string

<Water_Surface__lume>.Looking_Out_of_Water_shader UndefinedClass default: undefined -- texturemap

<Water_Surface__lume>.Stain_Underneath BooleanClass default: true -- animatable; boolean

<Water_Surface__lume>.Stain_Underneath_connected BooleanClass default: false -- boolean

<Water_Surface__lume>.Stain_Underneath_paramName UndefinedClass default: undefined -- string

<Water_Surface__lume>.Stain_Underneath_shader UndefinedClass default: undefined -- texturemap

<Water_Surface__lume>.Surface_Material Color default: (color 76.5 76.5 76.5) -- animatable; fRGBA color

<Water_Surface__lume>.Surface_Material_connected BooleanClass default: false -- boolean

<Water_Surface__lume>.Surface_Material_paramName UndefinedClass default: undefined -- string

<Water_Surface__lume>.Surface_Material_shader UndefinedClass default: undefined -- texturemap

<Water_Surface__lume>.transparency Color default: (color 127.5 127.5 127.5) -- animatable; fRGBA color

<Water_Surface__lume>.Transparency_connected BooleanClass default: false -- boolean

<Water_Surface__lume>.Transparency_paramName UndefinedClass default: undefined -- string;

<Water_Surface__lume>.Transparency_shader UndefinedClass default: undefined -- texturemap

Water_Surface__lume interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

lume mental ray Shaders Index

MAXScript Extensions for mental ray


Water_Surface_Shadow__lume : textureMap

Water_Surface_Shadow__lume - superclass: textureMap; super-superclass:material - 23:0 - classID: #(2004031007, 1542819986)

Constructors:

Water_Surface_Shadow__lume ...

WaterSurfaceShadow ...

Properties:

<Water_Surface_Shadow__lume>.Index_Of_Refraction Float default: 1.33 -- animatable; float

<Water_Surface_Shadow__lume>.Look_In BooleanClass default: false -- animatable; boolean

<Water_Surface_Shadow__lume>.Look_In_connected BooleanClass default: false -- boolean

<Water_Surface_Shadow__lume>.Look_In_paramName UndefinedClass default: undefined -- string

<Water_Surface_Shadow__lume>.Look_In_shader UndefinedClass default: undefined -- texturemap

<Water_Surface_Shadow__lume>.Look_Out BooleanClass default: false -- animatable; boolean

<Water_Surface_Shadow__lume>.Look_Out_connected BooleanClass default: false -- boolean

<Water_Surface_Shadow__lume>.Look_Out_paramName UndefinedClass default: undefined -- string

<Water_Surface_Shadow__lume>.Look_Out_shader UndefinedClass default: undefined -- texturemap

<Water_Surface_Shadow__lume>.Stain BooleanClass default: false -- animatable; boolean

<Water_Surface_Shadow__lume>.Stain_connected BooleanClass default: false -- boolean

<Water_Surface_Shadow__lume>.Stain_paramName UndefinedClass default: undefined -- string

<Water_Surface_Shadow__lume>.Stain_shader UndefinedClass default: undefined -- texturemap

<Water_Surface_Shadow__lume>.Surface_Material Color default: (color 178.5 204 204) -- animatable; fRGBA color

<Water_Surface_Shadow__lume>.Surface_Material_connected BooleanClass default: false -- boolean

<Water_Surface_Shadow__lume>.Surface_Material_paramName UndefinedClass default: undefined -- string;

<Water_Surface_Shadow__lume>.Surface_Material_shader UndefinedClass default: undefined -- texturemap

<Water_Surface_Shadow__lume>.transparency Color default: (color 255 255 255) -- animatable; fRGBA color

<Water_Surface_Shadow__lume>.Transparency_connected BooleanClass default: false -- boolean

<Water_Surface_Shadow__lume>.Transparency_paramName UndefinedClass default: undefined -- string;

<Water_Surface_Shadow__lume>.Transparency_shader UndefinedClass default: undefined -- texturemap

Water_Surface_Shadow__lume interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

lume mental ray Shaders Index

MAXScript Extensions for mental ray


Wet_Dry_Mixer__lume : textureMap

Wet_Dry_Mixer__lume - superclass: textureMap; super-superclass:material - 10:0 - classID: #(2004031007, 1181133162)

Constructors:

Wet_Dry_Mixer__lume ...

Wet ...

Properties:

<Wet_Dry_Mixer__lume>.Dry Color default: (color 178.5 178.5 178.5) -- animatable; fRGBA color

<Wet_Dry_Mixer__lume>.Dry_connected BooleanClass default: false -- boolean

<Wet_Dry_Mixer__lume>.Dry_paramName UndefinedClass default: undefined -- string

<Wet_Dry_Mixer__lume>.Dry_shader UndefinedClass default: undefined -- texturemap

<Wet_Dry_Mixer__lume>.Wet Color default: (color 0 76.5 178.5) -- animatable; fRGBA color

<Wet_Dry_Mixer__lume>.Wet_connected BooleanClass default: false -- boolean

<Wet_Dry_Mixer__lume>.Wet_paramName UndefinedClass default: undefined -- string

<Wet_Dry_Mixer__lume>.Wet_shader UndefinedClass default: undefined -- texturemap

Wet_Dry_Mixer__lume interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

lume mental ray Shaders Index

MAXScript Extensions for mental ray


WrapAround__lume : textureMap

WrapAround__lume - superclass: textureMap; super-superclass:material - 2:0 - classID: #(2004031007, 1258334347)

Constructors:

WrapAround__lume ...

WrapAround ...

Properties:

--None--

WrapAround__lume interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

lume mental ray Shaders Index

MAXScript Extensions for mental ray


max mental ray Shaders Index

max_ArchitecturalMaterial : textureMap

max_base_AnisotropicIllumination : textureMap

max_base_BlinnIllumination : textureMap

max_base_ConstantIllumination : textureMap

max_base_Curve : textureMap

max_base_GBuffer_lens : textureMap

max_base_GBuffer : textureMap

max_base_ImageCollector : textureMap

max_base_MeditBackground : textureMap

max_base_MetalIllumination : textureMap

max_base_MultiLayerIllumination : textureMap

max_base_OrenNayarBlinnIllumination : textureMap

max_base_Output : textureMap

max_base_PhongIllumination : textureMap

max_base_StraussIllumination : textureMap

max_base_TranslucentIllumination : textureMap

max_base_VideoColorCorrect : textureMap

max_base_VideoSuperBlack : textureMap

max_base_WardIllumination : textureMap

Max_Bitmap__3dsmax : textureMap

max_BlendBakeElement : textureMap

max_BlendMaterial : textureMap

max_BlendMaterial_Contour : textureMap

max_CameraMap : textureMap

max_CompleteBakeElement : textureMap

max_CompositeMaterial : textureMap

max_CompositeMaterial_Contour : textureMap

max_default_mtl_phen : material

max_DefaultLight : textureMap

max_DefaultMaterial : textureMap

max_DefaultShadow : textureMap

max_DiffuseBakeElement : textureMap

max_DirectionalLight : textureMap

max_DoubleSidedMaterial_Contour : textureMap

max_DoubleSidedMaterial : textureMap

max_dummy : textureMap

max_GenericBakeElement : textureMap

max_GizmoData : textureMap

max_GNormal : textureMap

max_HeightBakeElement : textureMap

max_IesSkylight : textureMap

max_is_material_editor : textureMap

max_LightBakeElement : textureMap

max_LightMeterMaterial : textureMap

max_MatteMaterial : textureMap

max_mia_material_renderelements : textureMap

max_mrRenderElement : textureMap

max_mrStoreElements : textureMap

max_MultiMaterial : textureMap

max_MultiMaterial_Contour : textureMap

max_NodeData : textureMap

max_NormalsBakeElement : textureMap

max_ObjectData : textureMap

max_OmniLight : textureMap

max_ParticleData : textureMap

max_PhotometricPointLight : textureMap

max_PhysicalSun : textureMap

max_Raytrace : textureMap

max_RaytraceMaterial : textureMap

max_ReflectRefractBakeElement : textureMap

max_RenderElementHandler : textureMap

max_rtt_lens : textureMap

max_rtt_output : textureMap

max_RTTCageData : textureMap

max_SceneData : textureMap

max_ShaderList : textureMap

max_ShadowBakeElement : textureMap

max_ShellacMaterial : textureMap

max_ShellacMaterial_Contour : textureMap

max_SpecularBakeElement : textureMap

max_SpotLight : textureMap

max_StandardMaterial : textureMap

max_StdRenderElements : textureMap

max_TexturedSkylight : textureMap

max_TopBottomMaterial : textureMap

max_TopBottomMaterial_Contour : textureMap

max_UnknownMaterial : textureMap

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_ArchitecturalMaterial : textureMap

max_ArchitecturalMaterial : textureMap {7773161f,65f67167}

Constructor:

max_ArchitecturalMaterial: class instances not creatable by MAXScript

Properties:

<max_ArchitecturalMaterial>.ArchitecturalMaterialParams : paramBlock2

<max_ArchitecturalMaterial>.ExtraParameters : paramBlock2

<max_ArchitecturalMaterial>.twoSided : boolean

<max_ArchitecturalMaterial>.emitLuminance : boolean

<max_ArchitecturalMaterial>.rawDiffuseTexture : boolean

<max_ArchitecturalMaterial>.diffuse : fRGBA color

<max_ArchitecturalMaterial>.diffuseMapAmount : float

<max_ArchitecturalMaterial>.diffuseMapEnable : boolean

<max_ArchitecturalMaterial>.diffuseMap : texturemap

<max_ArchitecturalMaterial>.shininess : float

<max_ArchitecturalMaterial>.shininessMapEnable : boolean

<max_ArchitecturalMaterial>.shininessMap : texturemap

<max_ArchitecturalMaterial>.transparency : float

<max_ArchitecturalMaterial>.transparencyMapEnable : boolean

<max_ArchitecturalMaterial>.filterMap : texturemap

<max_ArchitecturalMaterial>.translucency : float

<max_ArchitecturalMaterial>.translucencyEnable : boolean

<max_ArchitecturalMaterial>.translucencyMap : texturemap

<max_ArchitecturalMaterial>.ior : float

<max_ArchitecturalMaterial>.luminance : float

<max_ArchitecturalMaterial>.luminanceMapEnable : boolean

<max_ArchitecturalMaterial>.luminanceMap : texturemap

<max_ArchitecturalMaterial>.bumpMapAmount : float

<max_ArchitecturalMaterial>.bumpMapEnable : boolean

<max_ArchitecturalMaterial>.bumpMap : texturemap

<max_ArchitecturalMaterial>.intensityMapAmount : float

<max_ArchitecturalMaterial>.intensityMapEnable : boolean

<max_ArchitecturalMaterial>.intensityMap : texturemap

<max_ArchitecturalMaterial>.cutoutMapAmount : float

<max_ArchitecturalMaterial>.cutoutMapEnable : boolean

<max_ArchitecturalMaterial>.cutoutMap : texturemap

<max_ArchitecturalMaterial>.colorBleed : float

<max_ArchitecturalMaterial>.indirectBumpAmount : float

<max_ArchitecturalMaterial>.reflectanceScale : float

<max_ArchitecturalMaterial>.transmittanceScale : float

<max_ArchitecturalMaterial>.useTextureSize : boolean

<max_ArchitecturalMaterial>.textureWidth : float

<max_ArchitecturalMaterial>.textureHeight : float

<max_ArchitecturalMaterial>.textureUOffset : float

<max_ArchitecturalMaterial>.textureVOffset : float

<max_ArchitecturalMaterial>.GBufferId : integer

<max_ArchitecturalMaterial>.shaderType : integer

<max_ArchitecturalMaterial>.physicalScale : float

<max_ArchitecturalMaterial>.Connection_struct__0000__ArchitecturalMaterialParams : paramBlock2

<max_ArchitecturalMaterial>.Connection_struct__0001__ExtraParameters : paramBlock2

<max_ArchitecturalMaterial>.twoSided_connected : boolean

<max_ArchitecturalMaterial>.twoSided_shader : texturemap

<max_ArchitecturalMaterial>.twoSided_paramName : string

<max_ArchitecturalMaterial>.emitLuminance_connected : boolean

<max_ArchitecturalMaterial>.emitLuminance_shader : texturemap

<max_ArchitecturalMaterial>.emitLuminance_paramName : string

<max_ArchitecturalMaterial>.rawDiffuseTexture_connected : boolean

<max_ArchitecturalMaterial>.rawDiffuseTexture_shader : texturemap

<max_ArchitecturalMaterial>.rawDiffuseTexture_paramName : string

<max_ArchitecturalMaterial>.diffuse_connected : boolean

<max_ArchitecturalMaterial>.diffuse_shader : texturemap

<max_ArchitecturalMaterial>.diffuse_paramName : string

<max_ArchitecturalMaterial>.diffuseMapAmount_connected : boolean

<max_ArchitecturalMaterial>.diffuseMapAmount_shader : texturemap

<max_ArchitecturalMaterial>.diffuseMapAmount_paramName : string

<max_ArchitecturalMaterial>.diffuseMapEnable_connected : boolean

<max_ArchitecturalMaterial>.diffuseMapEnable_shader : texturemap

<max_ArchitecturalMaterial>.diffuseMapEnable_paramName : string

<max_ArchitecturalMaterial>.shininess_connected : boolean

<max_ArchitecturalMaterial>.shininess_shader : texturemap

<max_ArchitecturalMaterial>.shininess_paramName : string

<max_ArchitecturalMaterial>.shininessMapEnable_connected : boolean

<max_ArchitecturalMaterial>.shininessMapEnable_shader : texturemap

<max_ArchitecturalMaterial>.shininessMapEnable_paramName : string

<max_ArchitecturalMaterial>.transparency_connected : boolean

<max_ArchitecturalMaterial>.transparency_shader : texturemap

<max_ArchitecturalMaterial>.transparency_paramName : string

<max_ArchitecturalMaterial>.transparencyMapEnable_connected : boolean

<max_ArchitecturalMaterial>.transparencyMapEnable_shader : texturemap

<max_ArchitecturalMaterial>.transparencyMapEnable_paramName : string

<max_ArchitecturalMaterial>.translucency_connected : boolean

<max_ArchitecturalMaterial>.translucency_shader : texturemap

<max_ArchitecturalMaterial>.translucency_paramName : string

<max_ArchitecturalMaterial>.translucencyEnable_connected : boolean

<max_ArchitecturalMaterial>.translucencyEnable_shader : texturemap

<max_ArchitecturalMaterial>.translucencyEnable_paramName : string

<max_ArchitecturalMaterial>.ior_connected : boolean

<max_ArchitecturalMaterial>.ior_shader : texturemap

<max_ArchitecturalMaterial>.ior_paramName : string

<max_ArchitecturalMaterial>.luminance_connected : boolean

<max_ArchitecturalMaterial>.luminance_shader : texturemap

<max_ArchitecturalMaterial>.luminance_paramName : string

<max_ArchitecturalMaterial>.luminanceMapEnable_connected : boolean

<max_ArchitecturalMaterial>.luminanceMapEnable_shader : texturemap

<max_ArchitecturalMaterial>.luminanceMapEnable_paramName : string

<max_ArchitecturalMaterial>.bumpMapAmount_connected : boolean

<max_ArchitecturalMaterial>.bumpMapAmount_shader : texturemap

<max_ArchitecturalMaterial>.bumpMapAmount_paramName : string

<max_ArchitecturalMaterial>.bumpMapEnable_connected : boolean

<max_ArchitecturalMaterial>.bumpMapEnable_shader : texturemap

<max_ArchitecturalMaterial>.bumpMapEnable_paramName : string

<max_ArchitecturalMaterial>.intensityMapAmount_connected : boolean

<max_ArchitecturalMaterial>.intensityMapAmount_shader : texturemap

<max_ArchitecturalMaterial>.intensityMapAmount_paramName : string

<max_ArchitecturalMaterial>.intensityMapEnable_connected : boolean

<max_ArchitecturalMaterial>.intensityMapEnable_shader : texturemap

<max_ArchitecturalMaterial>.intensityMapEnable_paramName : string

<max_ArchitecturalMaterial>.cutoutMapAmount_connected : boolean

<max_ArchitecturalMaterial>.cutoutMapAmount_shader : texturemap

<max_ArchitecturalMaterial>.cutoutMapAmount_paramName : string

<max_ArchitecturalMaterial>.cutoutMapEnable_connected : boolean

<max_ArchitecturalMaterial>.cutoutMapEnable_shader : texturemap

<max_ArchitecturalMaterial>.cutoutMapEnable_paramName : string

<max_ArchitecturalMaterial>.colorBleed_connected : boolean

<max_ArchitecturalMaterial>.colorBleed_shader : texturemap

<max_ArchitecturalMaterial>.colorBleed_paramName : string

<max_ArchitecturalMaterial>.indirectBumpAmount_connected : boolean

<max_ArchitecturalMaterial>.indirectBumpAmount_shader : texturemap

<max_ArchitecturalMaterial>.indirectBumpAmount_paramName : string

<max_ArchitecturalMaterial>.reflectanceScale_connected : boolean

<max_ArchitecturalMaterial>.reflectanceScale_shader : texturemap

<max_ArchitecturalMaterial>.reflectanceScale_paramName : string

<max_ArchitecturalMaterial>.transmittanceScale_connected : boolean

<max_ArchitecturalMaterial>.transmittanceScale_shader : texturemap

<max_ArchitecturalMaterial>.transmittanceScale_paramName : string

<max_ArchitecturalMaterial>.useTextureSize_connected : boolean

<max_ArchitecturalMaterial>.useTextureSize_shader : texturemap

<max_ArchitecturalMaterial>.useTextureSize_paramName : string

<max_ArchitecturalMaterial>.textureWidth_connected : boolean

<max_ArchitecturalMaterial>.textureWidth_shader : texturemap

<max_ArchitecturalMaterial>.textureWidth_paramName : string

<max_ArchitecturalMaterial>.textureHeight_connected : boolean

<max_ArchitecturalMaterial>.textureHeight_shader : texturemap

<max_ArchitecturalMaterial>.textureHeight_paramName : string

<max_ArchitecturalMaterial>.textureUOffset_connected : boolean

<max_ArchitecturalMaterial>.textureUOffset_shader : texturemap

<max_ArchitecturalMaterial>.textureUOffset_paramName : string

<max_ArchitecturalMaterial>.textureVOffset_connected : boolean

<max_ArchitecturalMaterial>.textureVOffset_shader : texturemap

<max_ArchitecturalMaterial>.textureVOffset_paramName : string

<max_ArchitecturalMaterial>.GBufferId_connected : boolean

<max_ArchitecturalMaterial>.GBufferId_shader : texturemap

<max_ArchitecturalMaterial>.GBufferId_paramName : string

<max_ArchitecturalMaterial>.shaderType_connected : boolean

<max_ArchitecturalMaterial>.shaderType_shader : texturemap

<max_ArchitecturalMaterial>.shaderType_paramName : string

<max_ArchitecturalMaterial>.physicalScale_connected : boolean

<max_ArchitecturalMaterial>.physicalScale_shader : texturemap

<max_ArchitecturalMaterial>.physicalScale_paramName : string

<max_ArchitecturalMaterial>.TheList : maxObject array

<max_ArchitecturalMaterial>.Shader_Version : integer

max_ArchitecturalMaterial interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_base_AnisotropicIllumination : textureMap

max_base_AnisotropicIllumination : textureMap {7773161f,7e07762f}

Constructor:

max_base_AnisotropicIllumination: class instances not creatable by MAXScript

Properties:

<max_base_AnisotropicIllumination>.ShaderParameters : paramBlock2

<max_base_AnisotropicIllumination>.Ambient : fRGBA color

<max_base_AnisotropicIllumination>.Diffuse : fRGBA color

<max_base_AnisotropicIllumination>.Specular : fRGBA color

<max_base_AnisotropicIllumination>.SelfIllumColor : fRGBA color

<max_base_AnisotropicIllumination>.DiffuseLevel : float

<max_base_AnisotropicIllumination>.SpecularLevel : float

<max_base_AnisotropicIllumination>.SelfIllumAmount : float

<max_base_AnisotropicIllumination>.Glossiness : float

<max_base_AnisotropicIllumination>.Anisotropy : float

<max_base_AnisotropicIllumination>.Orientation : float

<max_base_AnisotropicIllumination>.ADTextureLock : boolean

<max_base_AnisotropicIllumination>.ADLock : boolean

<max_base_AnisotropicIllumination>.DSLock : boolean

<max_base_AnisotropicIllumination>.UseSelfIllumColor : boolean

<max_base_AnisotropicIllumination>.Connection_struct__0000__ShaderParameters : paramBlock2

<max_base_AnisotropicIllumination>.Ambient_connected : boolean

<max_base_AnisotropicIllumination>.Ambient_shader : texturemap

<max_base_AnisotropicIllumination>.Ambient_paramName : string

<max_base_AnisotropicIllumination>.Diffuse_connected : boolean

<max_base_AnisotropicIllumination>.Diffuse_shader : texturemap

<max_base_AnisotropicIllumination>.Diffuse_paramName : string

<max_base_AnisotropicIllumination>.Specular_connected : boolean

<max_base_AnisotropicIllumination>.Specular_shader : texturemap

<max_base_AnisotropicIllumination>.Specular_paramName : string

<max_base_AnisotropicIllumination>.SelfIllumColor_connected : boolean

<max_base_AnisotropicIllumination>.SelfIllumColor_shader : texturemap

<max_base_AnisotropicIllumination>.SelfIllumColor_paramName : string

<max_base_AnisotropicIllumination>.DiffuseLevel_connected : boolean

<max_base_AnisotropicIllumination>.DiffuseLevel_shader : texturemap

<max_base_AnisotropicIllumination>.DiffuseLevel_paramName : string

<max_base_AnisotropicIllumination>.SpecularLevel_connected : boolean

<max_base_AnisotropicIllumination>.SpecularLevel_shader : texturemap

<max_base_AnisotropicIllumination>.SpecularLevel_paramName : string

<max_base_AnisotropicIllumination>.SelfIllumAmount_connected : boolean

<max_base_AnisotropicIllumination>.SelfIllumAmount_shader : texturemap

<max_base_AnisotropicIllumination>.SelfIllumAmount_paramName : string

<max_base_AnisotropicIllumination>.Glossiness_connected : boolean

<max_base_AnisotropicIllumination>.Glossiness_shader : texturemap

<max_base_AnisotropicIllumination>.Glossiness_paramName : string

<max_base_AnisotropicIllumination>.Anisotropy_connected : boolean

<max_base_AnisotropicIllumination>.Anisotropy_shader : texturemap

<max_base_AnisotropicIllumination>.Anisotropy_paramName : string

<max_base_AnisotropicIllumination>.Orientation_connected : boolean

<max_base_AnisotropicIllumination>.Orientation_shader : texturemap

<max_base_AnisotropicIllumination>.Orientation_paramName : string

<max_base_AnisotropicIllumination>.ADTextureLock_connected : boolean

<max_base_AnisotropicIllumination>.ADTextureLock_shader : texturemap

<max_base_AnisotropicIllumination>.ADTextureLock_paramName : string

<max_base_AnisotropicIllumination>.ADLock_connected : boolean

<max_base_AnisotropicIllumination>.ADLock_shader : texturemap

<max_base_AnisotropicIllumination>.ADLock_paramName : string

<max_base_AnisotropicIllumination>.DSLock_connected : boolean

<max_base_AnisotropicIllumination>.DSLock_shader : texturemap

<max_base_AnisotropicIllumination>.DSLock_paramName : string

<max_base_AnisotropicIllumination>.UseSelfIllumColor_connected : boolean

<max_base_AnisotropicIllumination>.UseSelfIllumColor_shader : texturemap

<max_base_AnisotropicIllumination>.UseSelfIllumColor_paramName : string

<max_base_AnisotropicIllumination>.TheList : maxObject array

<max_base_AnisotropicIllumination>.Shader_Version : integer

max_base_AnisotropicIllumination interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_base_BlinnIllumination : textureMap

max_base_BlinnIllumination : textureMap {7773161f,85299a66}

Constructor:

max_base_BlinnIllumination: class instances not creatable by MAXScript

Properties:

<max_base_BlinnIllumination>.Parameters : paramBlock2

<max_base_BlinnIllumination>.Ambient : fRGBA color

<max_base_BlinnIllumination>.Diffuse : fRGBA color

<max_base_BlinnIllumination>.Specular : fRGBA color

<max_base_BlinnIllumination>.ADTextureLock : boolean

<max_base_BlinnIllumination>.ADLock : boolean

<max_base_BlinnIllumination>.DSLock : boolean

<max_base_BlinnIllumination>.UseSelfIllumColor : boolean

<max_base_BlinnIllumination>.SelfIllumAmount : float

<max_base_BlinnIllumination>.SelfIllumColor : fRGBA color

<max_base_BlinnIllumination>.SpecularLevel : float

<max_base_BlinnIllumination>.Glossiness : float

<max_base_BlinnIllumination>.Soften : float

<max_base_BlinnIllumination>.Connection_struct__0000__Parameters : paramBlock2

<max_base_BlinnIllumination>.Ambient_connected : boolean

<max_base_BlinnIllumination>.Ambient_shader : texturemap

<max_base_BlinnIllumination>.Ambient_paramName : string

<max_base_BlinnIllumination>.Diffuse_connected : boolean

<max_base_BlinnIllumination>.Diffuse_shader : texturemap

<max_base_BlinnIllumination>.Diffuse_paramName : string

<max_base_BlinnIllumination>.Specular_connected : boolean

<max_base_BlinnIllumination>.Specular_shader : texturemap

<max_base_BlinnIllumination>.Specular_paramName : string

<max_base_BlinnIllumination>.ADTextureLock_connected : boolean

<max_base_BlinnIllumination>.ADTextureLock_shader : texturemap

<max_base_BlinnIllumination>.ADTextureLock_paramName : string

<max_base_BlinnIllumination>.ADLock_connected : boolean

<max_base_BlinnIllumination>.ADLock_shader : texturemap

<max_base_BlinnIllumination>.ADLock_paramName : string

<max_base_BlinnIllumination>.DSLock_connected : boolean

<max_base_BlinnIllumination>.DSLock_shader : texturemap

<max_base_BlinnIllumination>.DSLock_paramName : string

<max_base_BlinnIllumination>.UseSelfIllumColor_connected : boolean

<max_base_BlinnIllumination>.UseSelfIllumColor_shader : texturemap

<max_base_BlinnIllumination>.UseSelfIllumColor_paramName : string

<max_base_BlinnIllumination>.SelfIllumAmount_connected : boolean

<max_base_BlinnIllumination>.SelfIllumAmount_shader : texturemap

<max_base_BlinnIllumination>.SelfIllumAmount_paramName : string

<max_base_BlinnIllumination>.SelfIllumColor_connected : boolean

<max_base_BlinnIllumination>.SelfIllumColor_shader : texturemap

<max_base_BlinnIllumination>.SelfIllumColor_paramName : string

<max_base_BlinnIllumination>.SpecularLevel_connected : boolean

<max_base_BlinnIllumination>.SpecularLevel_shader : texturemap

<max_base_BlinnIllumination>.SpecularLevel_paramName : string

<max_base_BlinnIllumination>.Glossiness_connected : boolean

<max_base_BlinnIllumination>.Glossiness_shader : texturemap

<max_base_BlinnIllumination>.Glossiness_paramName : string

<max_base_BlinnIllumination>.Soften_connected : boolean

<max_base_BlinnIllumination>.Soften_shader : texturemap

<max_base_BlinnIllumination>.Soften_paramName : string

<max_base_BlinnIllumination>.TheList : maxObject array

<max_base_BlinnIllumination>.Shader_Version : integer

max_base_BlinnIllumination interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_base_ConstantIllumination : textureMap

max_base_ConstantIllumination : textureMap {7773161f,9d5bab40}

Constructor:

max_base_ConstantIllumination: class instances not creatable by MAXScript

Properties:

<max_base_ConstantIllumination>.Parameters : paramBlock2

<max_base_ConstantIllumination>.Ambient : fRGBA color

<max_base_ConstantIllumination>.Diffuse : fRGBA color

<max_base_ConstantIllumination>.Specular : fRGBA color

<max_base_ConstantIllumination>.ADTextureLock : boolean

<max_base_ConstantIllumination>.ADLock : boolean

<max_base_ConstantIllumination>.DSLock : boolean

<max_base_ConstantIllumination>.UseSelfIllumColor : boolean

<max_base_ConstantIllumination>.SelfIllumAmount : float

<max_base_ConstantIllumination>.SelfIllumColor : fRGBA color

<max_base_ConstantIllumination>.SpecularLevel : float

<max_base_ConstantIllumination>.Glossiness : float

<max_base_ConstantIllumination>.Soften : float

<max_base_ConstantIllumination>.Connection_struct__0000__Parameters : paramBlock2

<max_base_ConstantIllumination>.Ambient_connected : boolean

<max_base_ConstantIllumination>.Ambient_shader : texturemap

<max_base_ConstantIllumination>.Ambient_paramName : string

<max_base_ConstantIllumination>.Diffuse_connected : boolean

<max_base_ConstantIllumination>.Diffuse_shader : texturemap

<max_base_ConstantIllumination>.Diffuse_paramName : string

<max_base_ConstantIllumination>.Specular_connected : boolean

<max_base_ConstantIllumination>.Specular_shader : texturemap

<max_base_ConstantIllumination>.Specular_paramName : string

<max_base_ConstantIllumination>.ADTextureLock_connected : boolean

<max_base_ConstantIllumination>.ADTextureLock_shader : texturemap

<max_base_ConstantIllumination>.ADTextureLock_paramName : string

<max_base_ConstantIllumination>.ADLock_connected : boolean

<max_base_ConstantIllumination>.ADLock_shader : texturemap

<max_base_ConstantIllumination>.ADLock_paramName : string

<max_base_ConstantIllumination>.DSLock_connected : boolean

<max_base_ConstantIllumination>.DSLock_shader : texturemap

<max_base_ConstantIllumination>.DSLock_paramName : string

<max_base_ConstantIllumination>.UseSelfIllumColor_connected : boolean

<max_base_ConstantIllumination>.UseSelfIllumColor_shader : texturemap

<max_base_ConstantIllumination>.UseSelfIllumColor_paramName : string

<max_base_ConstantIllumination>.SelfIllumAmount_connected : boolean

<max_base_ConstantIllumination>.SelfIllumAmount_shader : texturemap

<max_base_ConstantIllumination>.SelfIllumAmount_paramName : string

<max_base_ConstantIllumination>.SelfIllumColor_connected : boolean

<max_base_ConstantIllumination>.SelfIllumColor_shader : texturemap

<max_base_ConstantIllumination>.SelfIllumColor_paramName : string

<max_base_ConstantIllumination>.SpecularLevel_connected : boolean

<max_base_ConstantIllumination>.SpecularLevel_shader : texturemap

<max_base_ConstantIllumination>.SpecularLevel_paramName : string

<max_base_ConstantIllumination>.Glossiness_connected : boolean

<max_base_ConstantIllumination>.Glossiness_shader : texturemap

<max_base_ConstantIllumination>.Glossiness_paramName : string

<max_base_ConstantIllumination>.Soften_connected : boolean

<max_base_ConstantIllumination>.Soften_shader : texturemap

<max_base_ConstantIllumination>.Soften_paramName : string

<max_base_ConstantIllumination>.TheList : maxObject array

<max_base_ConstantIllumination>.Shader_Version : integer

max_base_ConstantIllumination interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_base_Curve : textureMap

max_base_Curve : textureMap {7773161f,8e706a39}

Constructor:

max_base_Curve: class instances not creatable by MAXScript

Properties:

<max_base_Curve>.Flags : integer

<max_base_Curve>.LookupTableSize : integer

<max_base_Curve>.Points : paramBlock2 array

<max_base_Curve>.x : float

<max_base_Curve>.y : float

<max_base_Curve>.xIn : float

<max_base_Curve>.yIn : float

<max_base_Curve>.xOut : float

<max_base_Curve>.yOut : float

<max_base_Curve>.Flags : integer

<max_base_Curve>.Flags_connected : boolean

<max_base_Curve>.Flags_shader : texturemap

<max_base_Curve>.Flags_paramName : string

<max_base_Curve>.LookupTableSize_connected : boolean

<max_base_Curve>.LookupTableSize_shader : texturemap

<max_base_Curve>.LookupTableSize_paramName : string

<max_base_Curve>.TheList : maxObject array

<max_base_Curve>.Shader_Version : integer

max_base_Curve interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_base_CurveControl : textureMap

max_base_CurveControl : textureMap {7773161f,8e419637}

Constructor:

max_base_CurveControl: class instances not creatable by MAXScript

Properties:

<max_base_CurveControl>.Flags : integer

<max_base_CurveControl>.XMin : float

<max_base_CurveControl>.XMax : float

<max_base_CurveControl>.YMin : float

<max_base_CurveControl>.YMax : float

<max_base_CurveControl>.Curves : maxObject array

<max_base_CurveControl>.Flags_connected : boolean

<max_base_CurveControl>.Flags_shader : texturemap

<max_base_CurveControl>.Flags_paramName : string

<max_base_CurveControl>.XMin_connected : boolean

<max_base_CurveControl>.XMin_shader : texturemap

<max_base_CurveControl>.XMin_paramName : string

<max_base_CurveControl>.XMax_connected : boolean

<max_base_CurveControl>.XMax_shader : texturemap

<max_base_CurveControl>.XMax_paramName : string

<max_base_CurveControl>.YMin_connected : boolean

<max_base_CurveControl>.YMin_shader : texturemap

<max_base_CurveControl>.YMin_paramName : string

<max_base_CurveControl>.YMax_connected : boolean

<max_base_CurveControl>.YMax_shader : texturemap

<max_base_CurveControl>.YMax_paramName : string

<max_base_CurveControl>.TheList : maxObject array

<max_base_CurveControl>.Shader_Version : integer

max_base_CurveControl interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_base_GBuffer : textureMap

max_base_GBuffer : textureMap {7773161f,831e6549}

Constructor:

max_base_GBuffer: class instances not creatable by MAXScript

Properties:

<max_base_GBuffer>.MtlID : boolean

<max_base_GBuffer>.NodeID : boolean

<max_base_GBuffer>.NodeRenderID : boolean

<max_base_GBuffer>.RealColor : boolean

<max_base_GBuffer>.UV : boolean

<max_base_GBuffer>.Velocity : boolean

<max_base_GBuffer>.MtlID_connected : boolean

<max_base_GBuffer>.MtlID_shader : texturemap

<max_base_GBuffer>.MtlID_paramName : string

<max_base_GBuffer>.NodeID_connected : boolean

<max_base_GBuffer>.NodeID_shader : texturemap

<max_base_GBuffer>.NodeID_paramName : string

<max_base_GBuffer>.NodeRenderID_connected : boolean

<max_base_GBuffer>.NodeRenderID_shader : texturemap

<max_base_GBuffer>.NodeRenderID_paramName : string

<max_base_GBuffer>.RealColor_connected : boolean

<max_base_GBuffer>.RealColor_shader : texturemap

<max_base_GBuffer>.RealColor_paramName : string

<max_base_GBuffer>.UV_connected : boolean

<max_base_GBuffer>.UV_shader : texturemap

<max_base_GBuffer>.UV_paramName : string

<max_base_GBuffer>.Velocity_connected : boolean

<max_base_GBuffer>.Velocity_shader : texturemap

<max_base_GBuffer>.Velocity_paramName : string

<max_base_GBuffer>.TheList : maxObject array

<max_base_GBuffer>.Shader_Version : integer

max_base_GBuffer interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_base_GBuffer_lens : textureMap

max_base_GBuffer_lens : textureMap {7773161f,993b912d}

Constructor:

max_base_GBuffer_lens: class instances not creatable by MAXScript

Properties:

<max_base_GBuffer_lens>.MtlID : boolean

<max_base_GBuffer_lens>.NodeID : boolean

<max_base_GBuffer_lens>.NodeRenderID : boolean

<max_base_GBuffer_lens>.RealColor : boolean

<max_base_GBuffer_lens>.UV : boolean

<max_base_GBuffer_lens>.Velocity : boolean

<max_base_GBuffer_lens>.MtlID_connected : boolean

<max_base_GBuffer_lens>.MtlID_shader : texturemap

<max_base_GBuffer_lens>.MtlID_paramName : string

<max_base_GBuffer_lens>.NodeID_connected : boolean

<max_base_GBuffer_lens>.NodeID_shader : texturemap

<max_base_GBuffer_lens>.NodeID_paramName : string

<max_base_GBuffer_lens>.NodeRenderID_connected : boolean

<max_base_GBuffer_lens>.NodeRenderID_shader : texturemap

<max_base_GBuffer_lens>.NodeRenderID_paramName : string

<max_base_GBuffer_lens>.RealColor_connected : boolean

<max_base_GBuffer_lens>.RealColor_shader : texturemap

<max_base_GBuffer_lens>.RealColor_paramName : string

<max_base_GBuffer_lens>.UV_connected : boolean

<max_base_GBuffer_lens>.UV_shader : texturemap

<max_base_GBuffer_lens>.UV_paramName : string

<max_base_GBuffer_lens>.Velocity_connected : boolean

<max_base_GBuffer_lens>.Velocity_shader : texturemap

<max_base_GBuffer_lens>.Velocity_paramName : string

<max_base_GBuffer_lens>.TheList : maxObject array

<max_base_GBuffer_lens>.Shader_Version : integer

max_base_GBuffer_lens interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_base_ImageCollector : textureMap

max_base_ImageCollector : textureMap {7773161f,9d247342}

Constructor:

max_base_ImageCollector: class instances not creatable by MAXScript

Properties:

<max_base_ImageCollector>.TheList : maxObject array

<max_base_ImageCollector>.Shader_Version : integer

max_base_ImageCollector interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_base_MeditBackground : textureMap

max_base_MeditBackground : textureMap {7773161f,6f176b48}

Constructor:

max_base_MeditBackground: class instances not creatable by MAXScript

Properties:

<max_base_MeditBackground>.Type : integer

<max_base_MeditBackground>.Color : fRGBA color

<max_base_MeditBackground>.Image : filename

<max_base_MeditBackground>.Image_Frame_Number : integer

<max_base_MeditBackground>.Type_connected : boolean

<max_base_MeditBackground>.Type_shader : texturemap

<max_base_MeditBackground>.Type_paramName : string

<max_base_MeditBackground>.Color_connected : boolean

<max_base_MeditBackground>.Color_shader : texturemap

<max_base_MeditBackground>.Color_paramName : string

<max_base_MeditBackground>.Image_connected : boolean

<max_base_MeditBackground>.Image_shader : texturemap

<max_base_MeditBackground>.Image_paramName : string

<max_base_MeditBackground>.TheList : maxObject array

<max_base_MeditBackground>.Shader_Version : integer

max_base_MeditBackground interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_base_MetalIllumination : textureMap

max_base_MetalIllumination : textureMap {7773161f,68309f6f}

Constructor:

max_base_MetalIllumination: class instances not creatable by MAXScript

Properties:

<max_base_MetalIllumination>.Parameters : paramBlock2

<max_base_MetalIllumination>.Ambient : fRGBA color

<max_base_MetalIllumination>.Diffuse : fRGBA color

<max_base_MetalIllumination>.Specular : fRGBA color

<max_base_MetalIllumination>.ADTextureLock : boolean

<max_base_MetalIllumination>.ADLock : boolean

<max_base_MetalIllumination>.DSLock : boolean

<max_base_MetalIllumination>.UseSelfIllumColor : boolean

<max_base_MetalIllumination>.SelfIllumAmount : float

<max_base_MetalIllumination>.SelfIllumColor : fRGBA color

<max_base_MetalIllumination>.SpecularLevel : float

<max_base_MetalIllumination>.Glossiness : float

<max_base_MetalIllumination>.Soften : float

<max_base_MetalIllumination>.Connection_struct__0000__Parameters : paramBlock2

<max_base_MetalIllumination>.Ambient_connected : boolean

<max_base_MetalIllumination>.Ambient_shader : texturemap

<max_base_MetalIllumination>.Ambient_paramName : string

<max_base_MetalIllumination>.Diffuse_connected : boolean

<max_base_MetalIllumination>.Diffuse_shader : texturemap

<max_base_MetalIllumination>.Diffuse_paramName : string

<max_base_MetalIllumination>.Specular_connected : boolean

<max_base_MetalIllumination>.Specular_shader : texturemap

<max_base_MetalIllumination>.Specular_paramName : string

<max_base_MetalIllumination>.ADTextureLock_connected : boolean

<max_base_MetalIllumination>.ADTextureLock_shader : texturemap

<max_base_MetalIllumination>.ADTextureLock_paramName : string

<max_base_MetalIllumination>.ADLock_connected : boolean

<max_base_MetalIllumination>.ADLock_shader : texturemap

<max_base_MetalIllumination>.ADLock_paramName : string

<max_base_MetalIllumination>.DSLock_connected : boolean

<max_base_MetalIllumination>.DSLock_shader : texturemap

<max_base_MetalIllumination>.DSLock_paramName : string

<max_base_MetalIllumination>.UseSelfIllumColor_connected : boolean

<max_base_MetalIllumination>.UseSelfIllumColor_shader : texturemap

<max_base_MetalIllumination>.UseSelfIllumColor_paramName : string

<max_base_MetalIllumination>.SelfIllumAmount_connected : boolean

<max_base_MetalIllumination>.SelfIllumAmount_shader : texturemap

<max_base_MetalIllumination>.SelfIllumAmount_paramName : string

<max_base_MetalIllumination>.SelfIllumColor_connected : boolean

<max_base_MetalIllumination>.SelfIllumColor_shader : texturemap

<max_base_MetalIllumination>.SelfIllumColor_paramName : string

<max_base_MetalIllumination>.SpecularLevel_connected : boolean

<max_base_MetalIllumination>.SpecularLevel_shader : texturemap

<max_base_MetalIllumination>.SpecularLevel_paramName : string

<max_base_MetalIllumination>.Glossiness_connected : boolean

<max_base_MetalIllumination>.Glossiness_shader : texturemap

<max_base_MetalIllumination>.Glossiness_paramName : string

<max_base_MetalIllumination>.Soften_connected : boolean

<max_base_MetalIllumination>.Soften_shader : texturemap

<max_base_MetalIllumination>.Soften_paramName : string

<max_base_MetalIllumination>.TheList : maxObject array

<max_base_MetalIllumination>.Shader_Version : integer

max_base_MetalIllumination interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_base_MultiLayerIllumination : textureMap

max_base_MultiLayerIllumination : textureMap {7773161f,ad2c7044}

Constructor:

max_base_MultiLayerIllumination: class instances not creatable by MAXScript

Properties:

<max_base_MultiLayerIllumination>.ShaderParameters : paramBlock2

<max_base_MultiLayerIllumination>.Ambient : fRGBA color

<max_base_MultiLayerIllumination>.Diffuse : fRGBA color

<max_base_MultiLayerIllumination>.SelfIllumColor : fRGBA color

<max_base_MultiLayerIllumination>.SelfIllumAmount : float

<max_base_MultiLayerIllumination>.DiffuseLevel : float

<max_base_MultiLayerIllumination>.DiffuseRoughness : float

<max_base_MultiLayerIllumination>.Specular : fRGBA color

<max_base_MultiLayerIllumination>.SpecularLevel : float

<max_base_MultiLayerIllumination>.Glossiness : float

<max_base_MultiLayerIllumination>.Anisotropy : float

<max_base_MultiLayerIllumination>.Orientation : float

<max_base_MultiLayerIllumination>.Specular2 : fRGBA color

<max_base_MultiLayerIllumination>.SpecularLevel2 : float

<max_base_MultiLayerIllumination>.Glossiness2 : float

<max_base_MultiLayerIllumination>.Anisotropy2 : float

<max_base_MultiLayerIllumination>.Orientation2 : float

<max_base_MultiLayerIllumination>.ADTextureLock : boolean

<max_base_MultiLayerIllumination>.ADLock : boolean

<max_base_MultiLayerIllumination>.UseSelfIllumColor : boolean

<max_base_MultiLayerIllumination>.Connection_struct__0000__ShaderParameters : paramBlock2

<max_base_MultiLayerIllumination>.Ambient_connected : boolean

<max_base_MultiLayerIllumination>.Ambient_shader : texturemap

<max_base_MultiLayerIllumination>.Ambient_paramName : string

<max_base_MultiLayerIllumination>.Diffuse_connected : boolean

<max_base_MultiLayerIllumination>.Diffuse_shader : texturemap

<max_base_MultiLayerIllumination>.Diffuse_paramName : string

<max_base_MultiLayerIllumination>.SelfIllumColor_connected : boolean

<max_base_MultiLayerIllumination>.SelfIllumColor_shader : texturemap

<max_base_MultiLayerIllumination>.SelfIllumColor_paramName : string

<max_base_MultiLayerIllumination>.SelfIllumAmount_connected : boolean

<max_base_MultiLayerIllumination>.SelfIllumAmount_shader : texturemap

<max_base_MultiLayerIllumination>.SelfIllumAmount_paramName : string

<max_base_MultiLayerIllumination>.DiffuseLevel_connected : boolean

<max_base_MultiLayerIllumination>.DiffuseLevel_shader : texturemap

<max_base_MultiLayerIllumination>.DiffuseLevel_paramName : string

<max_base_MultiLayerIllumination>.DiffuseRoughness_connected : boolean

<max_base_MultiLayerIllumination>.DiffuseRoughness_shader : texturemap

<max_base_MultiLayerIllumination>.DiffuseRoughness_paramName : string

<max_base_MultiLayerIllumination>.Specular_connected : boolean

<max_base_MultiLayerIllumination>.Specular_shader : texturemap

<max_base_MultiLayerIllumination>.Specular_paramName : string

<max_base_MultiLayerIllumination>.SpecularLevel_connected : boolean

<max_base_MultiLayerIllumination>.SpecularLevel_shader : texturemap

<max_base_MultiLayerIllumination>.SpecularLevel_paramName : string

<max_base_MultiLayerIllumination>.Glossiness_connected : boolean

<max_base_MultiLayerIllumination>.Glossiness_shader : texturemap

<max_base_MultiLayerIllumination>.Glossiness_paramName : string

<max_base_MultiLayerIllumination>.Anisotropy_connected : boolean

<max_base_MultiLayerIllumination>.Anisotropy_shader : texturemap

<max_base_MultiLayerIllumination>.Anisotropy_paramName : string

<max_base_MultiLayerIllumination>.Orientation_connected : boolean

<max_base_MultiLayerIllumination>.Orientation_shader : texturemap

<max_base_MultiLayerIllumination>.Orientation_paramName : string

<max_base_MultiLayerIllumination>.Specular2_connected : boolean

<max_base_MultiLayerIllumination>.Specular2_shader : texturemap

<max_base_MultiLayerIllumination>.Specular2_paramName : string

<max_base_MultiLayerIllumination>.SpecularLevel2_connected : boolean

<max_base_MultiLayerIllumination>.SpecularLevel2_shader : texturemap

<max_base_MultiLayerIllumination>.SpecularLevel2_paramName : string

<max_base_MultiLayerIllumination>.Glossiness2_connected : boolean

<max_base_MultiLayerIllumination>.Glossiness2_shader : texturemap

<max_base_MultiLayerIllumination>.Glossiness2_paramName : string

<max_base_MultiLayerIllumination>.Anisotropy2_connected : boolean

<max_base_MultiLayerIllumination>.Anisotropy2_shader : texturemap

<max_base_MultiLayerIllumination>.Anisotropy2_paramName : string

<max_base_MultiLayerIllumination>.Orientation2_connected : boolean

<max_base_MultiLayerIllumination>.Orientation2_shader : texturemap

<max_base_MultiLayerIllumination>.Orientation2_paramName : string

<max_base_MultiLayerIllumination>.ADTextureLock_connected : boolean

<max_base_MultiLayerIllumination>.ADTextureLock_shader : texturemap

<max_base_MultiLayerIllumination>.ADTextureLock_paramName : string

<max_base_MultiLayerIllumination>.ADLock_connected : boolean

<max_base_MultiLayerIllumination>.ADLock_shader : texturemap

<max_base_MultiLayerIllumination>.ADLock_paramName : string

<max_base_MultiLayerIllumination>.UseSelfIllumColor_connected : boolean

<max_base_MultiLayerIllumination>.UseSelfIllumColor_shader : texturemap

<max_base_MultiLayerIllumination>.UseSelfIllumColor_paramName : string

<max_base_MultiLayerIllumination>.TheList : maxObject array

<max_base_MultiLayerIllumination>.Shader_Version : integer

max_base_MultiLayerIllumination interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_base_OrenNayarBlinnIllumination : textureMap

max_base_OrenNayarBlinnIllumination : textureMap {7773161f,6040b46d}

Constructor:

max_base_OrenNayarBlinnIllumination: class instances not creatable by MAXScript

Properties:

<max_base_OrenNayarBlinnIllumination>.ShaderParameters : paramBlock2

<max_base_OrenNayarBlinnIllumination>.Ambient : fRGBA color

<max_base_OrenNayarBlinnIllumination>.Diffuse : fRGBA color

<max_base_OrenNayarBlinnIllumination>.Specular : fRGBA color

<max_base_OrenNayarBlinnIllumination>.ADTextureLock : boolean

<max_base_OrenNayarBlinnIllumination>.ADLock : boolean

<max_base_OrenNayarBlinnIllumination>.DSLock : boolean

<max_base_OrenNayarBlinnIllumination>.UseSelfIllumColor : boolean

<max_base_OrenNayarBlinnIllumination>.SelfIllumAmount : float

<max_base_OrenNayarBlinnIllumination>.SelfIllumColor : fRGBA color

<max_base_OrenNayarBlinnIllumination>.SpecularLevel : float

<max_base_OrenNayarBlinnIllumination>.Glossiness : float

<max_base_OrenNayarBlinnIllumination>.Soften : float

<max_base_OrenNayarBlinnIllumination>.DiffuseLevel : float

<max_base_OrenNayarBlinnIllumination>.DiffuseRoughness : float

<max_base_OrenNayarBlinnIllumination>.Connection_struct__0000__ShaderParameters : paramBlock2

<max_base_OrenNayarBlinnIllumination>.Ambient_connected : boolean

<max_base_OrenNayarBlinnIllumination>.Ambient_shader : texturemap

<max_base_OrenNayarBlinnIllumination>.Ambient_paramName : string

<max_base_OrenNayarBlinnIllumination>.Diffuse_connected : boolean

<max_base_OrenNayarBlinnIllumination>.Diffuse_shader : texturemap

<max_base_OrenNayarBlinnIllumination>.Diffuse_paramName : string

<max_base_OrenNayarBlinnIllumination>.Specular_connected : boolean

<max_base_OrenNayarBlinnIllumination>.Specular_shader : texturemap

<max_base_OrenNayarBlinnIllumination>.Specular_paramName : string

<max_base_OrenNayarBlinnIllumination>.ADTextureLock_connected : boolean

<max_base_OrenNayarBlinnIllumination>.ADTextureLock_shader : texturemap

<max_base_OrenNayarBlinnIllumination>.ADTextureLock_paramName : string

<max_base_OrenNayarBlinnIllumination>.ADLock_connected : boolean

<max_base_OrenNayarBlinnIllumination>.ADLock_shader : texturemap

<max_base_OrenNayarBlinnIllumination>.ADLock_paramName : string

<max_base_OrenNayarBlinnIllumination>.DSLock_connected : boolean

<max_base_OrenNayarBlinnIllumination>.DSLock_shader : texturemap

<max_base_OrenNayarBlinnIllumination>.DSLock_paramName : string

<max_base_OrenNayarBlinnIllumination>.UseSelfIllumColor_connected : boolean

<max_base_OrenNayarBlinnIllumination>.UseSelfIllumColor_shader : texturemap

<max_base_OrenNayarBlinnIllumination>.UseSelfIllumColor_paramName : string

<max_base_OrenNayarBlinnIllumination>.SelfIllumAmount_connected : boolean

<max_base_OrenNayarBlinnIllumination>.SelfIllumAmount_shader : texturemap

<max_base_OrenNayarBlinnIllumination>.SelfIllumAmount_paramName : string

<max_base_OrenNayarBlinnIllumination>.SelfIllumColor_connected : boolean

<max_base_OrenNayarBlinnIllumination>.SelfIllumColor_shader : texturemap

<max_base_OrenNayarBlinnIllumination>.SelfIllumColor_paramName : string

<max_base_OrenNayarBlinnIllumination>.SpecularLevel_connected : boolean

<max_base_OrenNayarBlinnIllumination>.SpecularLevel_shader : texturemap

<max_base_OrenNayarBlinnIllumination>.SpecularLevel_paramName : string

<max_base_OrenNayarBlinnIllumination>.Glossiness_connected : boolean

<max_base_OrenNayarBlinnIllumination>.Glossiness_shader : texturemap

<max_base_OrenNayarBlinnIllumination>.Glossiness_paramName : string

<max_base_OrenNayarBlinnIllumination>.Soften_connected : boolean

<max_base_OrenNayarBlinnIllumination>.Soften_shader : texturemap

<max_base_OrenNayarBlinnIllumination>.Soften_paramName : string

<max_base_OrenNayarBlinnIllumination>.DiffuseLevel_connected : boolean

<max_base_OrenNayarBlinnIllumination>.DiffuseLevel_shader : texturemap

<max_base_OrenNayarBlinnIllumination>.DiffuseLevel_paramName : string

<max_base_OrenNayarBlinnIllumination>.DiffuseRoughness_connected : boolean

<max_base_OrenNayarBlinnIllumination>.DiffuseRoughness_shader : texturemap

<max_base_OrenNayarBlinnIllumination>.DiffuseRoughness_paramName : string

<max_base_OrenNayarBlinnIllumination>.TheList : maxObject array

<max_base_OrenNayarBlinnIllumination>.Shader_Version : integer

max_base_OrenNayarBlinnIllumination interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_base_Output : textureMap

max_base_Output : textureMap {7773161f,93fc7e33}

Constructor:

max_base_Output: class instances not creatable by MAXScript

Properties:

<max_base_Output>.RGBAmount : float

<max_base_Output>.RGBOffset : float

<max_base_Output>.OutputAmount : float

<max_base_Output>.BumpAmount : float

<max_base_Output>.Invert : boolean

<max_base_Output>.Clamp : boolean

<max_base_Output>.AlphaFromRGB : boolean

<max_base_Output>.UseColorMap : boolean

<max_base_Output>.UseRGBCurve : boolean

<max_base_Output>.RGBCurve : maxObject

<max_base_Output>.IntensityCurve : maxObject

<max_base_Output>.RGBAmount_connected : boolean

<max_base_Output>.RGBAmount_shader : texturemap

<max_base_Output>.RGBAmount_paramName : string

<max_base_Output>.RGBOffset_connected : boolean

<max_base_Output>.RGBOffset_shader : texturemap

<max_base_Output>.RGBOffset_paramName : string

<max_base_Output>.OutputAmount_connected : boolean

<max_base_Output>.OutputAmount_shader : texturemap

<max_base_Output>.OutputAmount_paramName : string

<max_base_Output>.BumpAmount_connected : boolean

<max_base_Output>.BumpAmount_shader : texturemap

<max_base_Output>.BumpAmount_paramName : string

<max_base_Output>.Invert_connected : boolean

<max_base_Output>.Invert_shader : texturemap

<max_base_Output>.Invert_paramName : string

<max_base_Output>.Clamp_connected : boolean

<max_base_Output>.Clamp_shader : texturemap

<max_base_Output>.Clamp_paramName : string

<max_base_Output>.AlphaFromRGB_connected : boolean

<max_base_Output>.AlphaFromRGB_shader : texturemap

<max_base_Output>.AlphaFromRGB_paramName : string

<max_base_Output>.UseColorMap_connected : boolean

<max_base_Output>.UseColorMap_shader : texturemap

<max_base_Output>.UseColorMap_paramName : string

<max_base_Output>.UseRGBCurve_connected : boolean

<max_base_Output>.UseRGBCurve_shader : texturemap

<max_base_Output>.UseRGBCurve_paramName : string

<max_base_Output>.TheList : maxObject array

<max_base_Output>.Shader_Version : integer

max_base_Output interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_base_PhongIllumination : textureMap

max_base_PhongIllumination : textureMap {7773161f,7f259166}

Constructor:

max_base_PhongIllumination: class instances not creatable by MAXScript

Properties:

<max_base_PhongIllumination>.Parameters : paramBlock2

<max_base_PhongIllumination>.Ambient : fRGBA color

<max_base_PhongIllumination>.Diffuse : fRGBA color

<max_base_PhongIllumination>.Specular : fRGBA color

<max_base_PhongIllumination>.ADTextureLock : boolean

<max_base_PhongIllumination>.ADLock : boolean

<max_base_PhongIllumination>.DSLock : boolean

<max_base_PhongIllumination>.UseSelfIllumColor : boolean

<max_base_PhongIllumination>.SelfIllumAmount : float

<max_base_PhongIllumination>.SelfIllumColor : fRGBA color

<max_base_PhongIllumination>.SpecularLevel : float

<max_base_PhongIllumination>.Glossiness : float

<max_base_PhongIllumination>.Soften : float

<max_base_PhongIllumination>.Connection_struct__0000__Parameters : paramBlock2

<max_base_PhongIllumination>.Ambient_connected : boolean

<max_base_PhongIllumination>.Ambient_shader : texturemap

<max_base_PhongIllumination>.Ambient_paramName : string

<max_base_PhongIllumination>.Diffuse_connected : boolean

<max_base_PhongIllumination>.Diffuse_shader : texturemap

<max_base_PhongIllumination>.Diffuse_paramName : string

<max_base_PhongIllumination>.Specular_connected : boolean

<max_base_PhongIllumination>.Specular_shader : texturemap

<max_base_PhongIllumination>.Specular_paramName : string

<max_base_PhongIllumination>.ADTextureLock_connected : boolean

<max_base_PhongIllumination>.ADTextureLock_shader : texturemap

<max_base_PhongIllumination>.ADTextureLock_paramName : string

<max_base_PhongIllumination>.ADLock_connected : boolean

<max_base_PhongIllumination>.ADLock_shader : texturemap

<max_base_PhongIllumination>.ADLock_paramName : string

<max_base_PhongIllumination>.DSLock_connected : boolean

<max_base_PhongIllumination>.DSLock_shader : texturemap

<max_base_PhongIllumination>.DSLock_paramName : string

<max_base_PhongIllumination>.UseSelfIllumColor_connected : boolean

<max_base_PhongIllumination>.UseSelfIllumColor_shader : texturemap

<max_base_PhongIllumination>.UseSelfIllumColor_paramName : string

<max_base_PhongIllumination>.SelfIllumAmount_connected : boolean

<max_base_PhongIllumination>.SelfIllumAmount_shader : texturemap

<max_base_PhongIllumination>.SelfIllumAmount_paramName : string

<max_base_PhongIllumination>.SelfIllumColor_connected : boolean

<max_base_PhongIllumination>.SelfIllumColor_shader : texturemap

<max_base_PhongIllumination>.SelfIllumColor_paramName : string

<max_base_PhongIllumination>.SpecularLevel_connected : boolean

<max_base_PhongIllumination>.SpecularLevel_shader : texturemap

<max_base_PhongIllumination>.SpecularLevel_paramName : string

<max_base_PhongIllumination>.Glossiness_connected : boolean

<max_base_PhongIllumination>.Glossiness_shader : texturemap

<max_base_PhongIllumination>.Glossiness_paramName : string

<max_base_PhongIllumination>.Soften_connected : boolean

<max_base_PhongIllumination>.Soften_shader : texturemap

<max_base_PhongIllumination>.Soften_paramName : string

<max_base_PhongIllumination>.TheList : maxObject array

<max_base_PhongIllumination>.Shader_Version : integer

max_base_PhongIllumination interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_base_StraussIllumination : textureMap

max_base_StraussIllumination : textureMap {7773161f,87538e74}

Constructor:

max_base_StraussIllumination: class instances not creatable by MAXScript

Properties:

<max_base_StraussIllumination>.ShaderParameters : paramBlock2

<max_base_StraussIllumination>.Diffuse : fRGBA color

<max_base_StraussIllumination>.Glossiness : float

<max_base_StraussIllumination>.Metalness : float

<max_base_StraussIllumination>.Connection_struct__0000__ShaderParameters : paramBlock2

<max_base_StraussIllumination>.Diffuse_connected : boolean

<max_base_StraussIllumination>.Diffuse_shader : texturemap

<max_base_StraussIllumination>.Diffuse_paramName : string

<max_base_StraussIllumination>.Glossiness_connected : boolean

<max_base_StraussIllumination>.Glossiness_shader : texturemap

<max_base_StraussIllumination>.Glossiness_paramName : string

<max_base_StraussIllumination>.Metalness_connected : boolean

<max_base_StraussIllumination>.Metalness_shader : texturemap

<max_base_StraussIllumination>.Metalness_paramName : string

<max_base_StraussIllumination>.TheList : maxObject array

<max_base_StraussIllumination>.Shader_Version : integer

max_base_StraussIllumination interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_base_TranslucentIllumination : textureMap

max_base_TranslucentIllumination : textureMap {7773161f,66087220}

Constructor:

max_base_TranslucentIllumination: class instances not creatable by MAXScript

Properties:

<max_base_TranslucentIllumination>.shaderParameters : paramBlock2

<max_base_TranslucentIllumination>.ambient : fRGBA color

<max_base_TranslucentIllumination>.diffuse : fRGBA color

<max_base_TranslucentIllumination>.specular : fRGBA color

<max_base_TranslucentIllumination>.filter : fRGBA color

<max_base_TranslucentIllumination>.translucentColor : fRGBA color

<max_base_TranslucentIllumination>.backSideSpecular : boolean

<max_base_TranslucentIllumination>.adTextureLock : boolean

<max_base_TranslucentIllumination>.adLock : boolean

<max_base_TranslucentIllumination>.dsLock : boolean

<max_base_TranslucentIllumination>.useSelfIllumColor : boolean

<max_base_TranslucentIllumination>.selfIllumAmount : float

<max_base_TranslucentIllumination>.selfIllumColor : fRGBA color

<max_base_TranslucentIllumination>.specularLevel : float

<max_base_TranslucentIllumination>.glossiness : float

<max_base_TranslucentIllumination>.diffuseLevel : float

<max_base_TranslucentIllumination>.Connection_struct__0000__shaderParameters : paramBlock2

<max_base_TranslucentIllumination>.ambient_connected : boolean

<max_base_TranslucentIllumination>.ambient_shader : texturemap

<max_base_TranslucentIllumination>.ambient_paramName : string

<max_base_TranslucentIllumination>.diffuse_connected : boolean

<max_base_TranslucentIllumination>.diffuse_shader : texturemap

<max_base_TranslucentIllumination>.diffuse_paramName : string

<max_base_TranslucentIllumination>.specular_connected : boolean

<max_base_TranslucentIllumination>.specular_shader : texturemap

<max_base_TranslucentIllumination>.specular_paramName : string

<max_base_TranslucentIllumination>.filter_connected : boolean

<max_base_TranslucentIllumination>.filter_shader : texturemap

<max_base_TranslucentIllumination>.filter_paramName : string

<max_base_TranslucentIllumination>.translucentColor_connected : boolean

<max_base_TranslucentIllumination>.translucentColor_shader : texturemap

<max_base_TranslucentIllumination>.translucentColor_paramName : string

<max_base_TranslucentIllumination>.backSideSpecular_connected : boolean

<max_base_TranslucentIllumination>.backSideSpecular_shader : texturemap

<max_base_TranslucentIllumination>.backSideSpecular_paramName : string

<max_base_TranslucentIllumination>.adTextureLock_connected : boolean

<max_base_TranslucentIllumination>.adTextureLock_shader : texturemap

<max_base_TranslucentIllumination>.adTextureLock_paramName : string

<max_base_TranslucentIllumination>.adLock_connected : boolean

<max_base_TranslucentIllumination>.adLock_shader : texturemap

<max_base_TranslucentIllumination>.adLock_paramName : string

<max_base_TranslucentIllumination>.dsLock_connected : boolean

<max_base_TranslucentIllumination>.dsLock_shader : texturemap

<max_base_TranslucentIllumination>.dsLock_paramName : string

<max_base_TranslucentIllumination>.useSelfIllumColor_connected : boolean

<max_base_TranslucentIllumination>.useSelfIllumColor_shader : texturemap

<max_base_TranslucentIllumination>.useSelfIllumColor_paramName : string

<max_base_TranslucentIllumination>.selfIllumAmount_connected : boolean

<max_base_TranslucentIllumination>.selfIllumAmount_shader : texturemap

<max_base_TranslucentIllumination>.selfIllumAmount_paramName : string

<max_base_TranslucentIllumination>.selfIllumColor_connected : boolean

<max_base_TranslucentIllumination>.selfIllumColor_shader : texturemap

<max_base_TranslucentIllumination>.selfIllumColor_paramName : string

<max_base_TranslucentIllumination>.specularLevel_connected : boolean

<max_base_TranslucentIllumination>.specularLevel_shader : texturemap

<max_base_TranslucentIllumination>.specularLevel_paramName : string

<max_base_TranslucentIllumination>.glossiness_connected : boolean

<max_base_TranslucentIllumination>.glossiness_shader : texturemap

<max_base_TranslucentIllumination>.glossiness_paramName : string

<max_base_TranslucentIllumination>.diffuseLevel_connected : boolean

<max_base_TranslucentIllumination>.diffuseLevel_shader : texturemap

<max_base_TranslucentIllumination>.diffuseLevel_paramName : string

<max_base_TranslucentIllumination>.TheList : maxObject array

<max_base_TranslucentIllumination>.Shader_Version : integer

max_base_TranslucentIllumination interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_base_VideoColorCorrect : textureMap

max_base_VideoColorCorrect : textureMap {7773161f,5d139468}

Constructor:

max_base_VideoColorCorrect: class instances not creatable by MAXScript

Properties:

<max_base_VideoColorCorrect>.type : integer

<max_base_VideoColorCorrect>.standard : integer

<max_base_VideoColorCorrect>.type_connected : boolean

<max_base_VideoColorCorrect>.type_shader : texturemap

<max_base_VideoColorCorrect>.type_paramName : string

<max_base_VideoColorCorrect>.standard_connected : boolean

<max_base_VideoColorCorrect>.standard_shader : texturemap

<max_base_VideoColorCorrect>.standard_paramName : string

<max_base_VideoColorCorrect>.TheList : maxObject array

<max_base_VideoColorCorrect>.Shader_Version : integer

max_base_VideoColorCorrect interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_base_VideoSuperBlack : textureMap

max_base_VideoSuperBlack : textureMap {7773161f,4812813c}

Constructor:

max_base_VideoSuperBlack: class instances not creatable by MAXScript

Properties:

<max_base_VideoSuperBlack>.threshold : integer

<max_base_VideoSuperBlack>.threshold_connected : boolean

<max_base_VideoSuperBlack>.threshold_shader : texturemap

<max_base_VideoSuperBlack>.threshold_paramName : string

<max_base_VideoSuperBlack>.TheList : maxObject array

<max_base_VideoSuperBlack>.Shader_Version : integer

max_base_VideoSuperBlack interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_base_WardIllumination : textureMap

max_base_WardIllumination : textureMap {7773161f,6af84b61}

Constructor:

max_base_WardIllumination: class instances not creatable by MAXScript

Properties:

<max_base_WardIllumination>.Parameters : paramBlock2

<max_base_WardIllumination>.Ambient : fRGBA color

<max_base_WardIllumination>.Diffuse : fRGBA color

<max_base_WardIllumination>.Specular : fRGBA color

<max_base_WardIllumination>.DiffuseLevel : float

<max_base_WardIllumination>.SpecularLevel : float

<max_base_WardIllumination>.XGlossiness : float

<max_base_WardIllumination>.YGlossiness : float

<max_base_WardIllumination>.Connection_struct__0000__Parameters : paramBlock2

<max_base_WardIllumination>.Ambient_connected : boolean

<max_base_WardIllumination>.Ambient_shader : texturemap

<max_base_WardIllumination>.Ambient_paramName : string

<max_base_WardIllumination>.Diffuse_connected : boolean

<max_base_WardIllumination>.Diffuse_shader : texturemap

<max_base_WardIllumination>.Diffuse_paramName : string

<max_base_WardIllumination>.Specular_connected : boolean

<max_base_WardIllumination>.Specular_shader : texturemap

<max_base_WardIllumination>.Specular_paramName : string

<max_base_WardIllumination>.DiffuseLevel_connected : boolean

<max_base_WardIllumination>.DiffuseLevel_shader : texturemap

<max_base_WardIllumination>.DiffuseLevel_paramName : string

<max_base_WardIllumination>.SpecularLevel_connected : boolean

<max_base_WardIllumination>.SpecularLevel_shader : texturemap

<max_base_WardIllumination>.SpecularLevel_paramName : string

<max_base_WardIllumination>.XGlossiness_connected : boolean

<max_base_WardIllumination>.XGlossiness_shader : texturemap

<max_base_WardIllumination>.XGlossiness_paramName : string

<max_base_WardIllumination>.YGlossiness_connected : boolean

<max_base_WardIllumination>.YGlossiness_shader : texturemap

<max_base_WardIllumination>.YGlossiness_paramName : string

<max_base_WardIllumination>.TheList : maxObject array

<max_base_WardIllumination>.Shader_Version : integer

max_base_WardIllumination interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_BlendBakeElement : textureMap

max_BlendBakeElement : textureMap {7773161f,9170b356}

Constructor:

max_BlendBakeElement: class instances not creatable by MAXScript

Properties:

<max_BlendBakeElement>.applyAtmosphere : boolean

<max_BlendBakeElement>.applyShadows : boolean

<max_BlendBakeElement>.applyLight : boolean

<max_BlendBakeElement>.diffuseOn : boolean

<max_BlendBakeElement>.ambientOn : boolean

<max_BlendBakeElement>.emissionOn : boolean

<max_BlendBakeElement>.specularOn : boolean

<max_BlendBakeElement>.reflectionOn : boolean

<max_BlendBakeElement>.refractionOn : boolean

<max_BlendBakeElement>.applyAtmosphere_connected : boolean

<max_BlendBakeElement>.applyAtmosphere_shader : texturemap

<max_BlendBakeElement>.applyAtmosphere_paramName : string

<max_BlendBakeElement>.applyShadows_connected : boolean

<max_BlendBakeElement>.applyShadows_shader : texturemap

<max_BlendBakeElement>.applyShadows_paramName : string

<max_BlendBakeElement>.applyLight_connected : boolean

<max_BlendBakeElement>.applyLight_shader : texturemap

<max_BlendBakeElement>.applyLight_paramName : string

<max_BlendBakeElement>.diffuseOn_connected : boolean

<max_BlendBakeElement>.diffuseOn_shader : texturemap

<max_BlendBakeElement>.diffuseOn_paramName : string

<max_BlendBakeElement>.ambientOn_connected : boolean

<max_BlendBakeElement>.ambientOn_shader : texturemap

<max_BlendBakeElement>.ambientOn_paramName : string

<max_BlendBakeElement>.emissionOn_connected : boolean

<max_BlendBakeElement>.emissionOn_shader : texturemap

<max_BlendBakeElement>.emissionOn_paramName : string

<max_BlendBakeElement>.specularOn_connected : boolean

<max_BlendBakeElement>.specularOn_shader : texturemap

<max_BlendBakeElement>.specularOn_paramName : string

<max_BlendBakeElement>.reflectionOn_connected : boolean

<max_BlendBakeElement>.reflectionOn_shader : texturemap

<max_BlendBakeElement>.reflectionOn_paramName : string

<max_BlendBakeElement>.refractionOn_connected : boolean

<max_BlendBakeElement>.refractionOn_shader : texturemap

<max_BlendBakeElement>.refractionOn_paramName : string

<max_BlendBakeElement>.TheList : maxObject array

<max_BlendBakeElement>.Shader_Version : integer

max_BlendBakeElement interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_BlendMaterial : textureMap

max_BlendMaterial : textureMap {7773161f,6a077655}

Constructor:

max_BlendMaterial: class instances not creatable by MAXScript

Properties:

<max_BlendMaterial>.Parameters : paramBlock2

<max_BlendMaterial>.ExtraParameters : paramBlock2

<max_BlendMaterial>.MixAmount : float

<max_BlendMaterial>.Lower : float

<max_BlendMaterial>.Upper : float

<max_BlendMaterial>.UseCurve : boolean

<max_BlendMaterial>.Interactive : integer

<max_BlendMaterial>.Map1 : material

<max_BlendMaterial>.Map2 : material

<max_BlendMaterial>.Mask : texturemap

<max_BlendMaterial>.Map1Enabled : boolean

<max_BlendMaterial>.Map2Enabled : boolean

<max_BlendMaterial>.MaskEnabled : boolean

<max_BlendMaterial>.GBufferID : integer

<max_BlendMaterial>.Connection_struct__0000__Parameters : paramBlock2

<max_BlendMaterial>.Connection_struct__0001__ExtraParameters : paramBlock2

<max_BlendMaterial>.MixAmount_connected : boolean

<max_BlendMaterial>.MixAmount_shader : texturemap

<max_BlendMaterial>.MixAmount_paramName : string

<max_BlendMaterial>.Lower_connected : boolean

<max_BlendMaterial>.Lower_shader : texturemap

<max_BlendMaterial>.Lower_paramName : string

<max_BlendMaterial>.Upper_connected : boolean

<max_BlendMaterial>.Upper_shader : texturemap

<max_BlendMaterial>.Upper_paramName : string

<max_BlendMaterial>.UseCurve_connected : boolean

<max_BlendMaterial>.UseCurve_shader : texturemap

<max_BlendMaterial>.UseCurve_paramName : string

<max_BlendMaterial>.Interactive_connected : boolean

<max_BlendMaterial>.Interactive_shader : texturemap

<max_BlendMaterial>.Interactive_paramName : string

<max_BlendMaterial>.Map1Enabled_connected : boolean

<max_BlendMaterial>.Map1Enabled_shader : texturemap

<max_BlendMaterial>.Map1Enabled_paramName : string

<max_BlendMaterial>.Map2Enabled_connected : boolean

<max_BlendMaterial>.Map2Enabled_shader : texturemap

<max_BlendMaterial>.Map2Enabled_paramName : string

<max_BlendMaterial>.MaskEnabled_connected : boolean

<max_BlendMaterial>.MaskEnabled_shader : texturemap

<max_BlendMaterial>.MaskEnabled_paramName : string

<max_BlendMaterial>.GBufferID_connected : boolean

<max_BlendMaterial>.GBufferID_shader : texturemap

<max_BlendMaterial>.GBufferID_paramName : string

<max_BlendMaterial>.TheList : maxObject array

<max_BlendMaterial>.Shader_Version : integer

max_BlendMaterial interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_BlendMaterial_Contour : textureMap

max_BlendMaterial_Contour : textureMap {7773161f,842b5d71}

Constructor:

max_BlendMaterial_Contour: class instances not creatable by MAXScript

Properties:

<max_BlendMaterial_Contour>.Parameters : paramBlock2

<max_BlendMaterial_Contour>.MixAmount : float

<max_BlendMaterial_Contour>.Lower : float

<max_BlendMaterial_Contour>.Upper : float

<max_BlendMaterial_Contour>.UseCurve : boolean

<max_BlendMaterial_Contour>.Interactive : integer

<max_BlendMaterial_Contour>.Map1 : material

<max_BlendMaterial_Contour>.Map2 : material

<max_BlendMaterial_Contour>.Mask : texturemap

<max_BlendMaterial_Contour>.Map1Enabled : boolean

<max_BlendMaterial_Contour>.Map2Enabled : boolean

<max_BlendMaterial_Contour>.MaskEnabled : boolean

<max_BlendMaterial_Contour>.Connection_struct__0000__Parameters : paramBlock2

<max_BlendMaterial_Contour>.MixAmount_connected : boolean

<max_BlendMaterial_Contour>.MixAmount_shader : texturemap

<max_BlendMaterial_Contour>.MixAmount_paramName : string

<max_BlendMaterial_Contour>.Lower_connected : boolean

<max_BlendMaterial_Contour>.Lower_shader : texturemap

<max_BlendMaterial_Contour>.Lower_paramName : string

<max_BlendMaterial_Contour>.Upper_connected : boolean

<max_BlendMaterial_Contour>.Upper_shader : texturemap

<max_BlendMaterial_Contour>.Upper_paramName : string

<max_BlendMaterial_Contour>.UseCurve_connected : boolean

<max_BlendMaterial_Contour>.UseCurve_shader : texturemap

<max_BlendMaterial_Contour>.UseCurve_paramName : string

<max_BlendMaterial_Contour>.Interactive_connected : boolean

<max_BlendMaterial_Contour>.Interactive_shader : texturemap

<max_BlendMaterial_Contour>.Interactive_paramName : string

<max_BlendMaterial_Contour>.Map1Enabled_connected : boolean

<max_BlendMaterial_Contour>.Map1Enabled_shader : texturemap

<max_BlendMaterial_Contour>.Map1Enabled_paramName : string

<max_BlendMaterial_Contour>.Map2Enabled_connected : boolean

<max_BlendMaterial_Contour>.Map2Enabled_shader : texturemap

<max_BlendMaterial_Contour>.Map2Enabled_paramName : string

<max_BlendMaterial_Contour>.MaskEnabled_connected : boolean

<max_BlendMaterial_Contour>.MaskEnabled_shader : texturemap

<max_BlendMaterial_Contour>.MaskEnabled_paramName : string

<max_BlendMaterial_Contour>.TheList : maxObject array

<max_BlendMaterial_Contour>.Shader_Version : integer

max_BlendMaterial_Contour interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_CameraMap : textureMap

max_CameraMap : textureMap {7773161f,a14aa53f}

Constructor:

max_CameraMap: class instances not creatable by MAXScript

Properties:

<max_CameraMap>.worldToCameraTM : matrix3

<max_CameraMap>.cameraFOV : float

<max_CameraMap>.cameraPos : point3

<max_CameraMap>.map_channel : integer

<max_CameraMap>.textureShader : texturemap

<max_CameraMap>.backface : boolean

<max_CameraMap>.useZBuffer : boolean

<max_CameraMap>.zbuffer : float array

<max_CameraMap>.zbufferWidth : integer

<max_CameraMap>.zbufferHeight : integer

<max_CameraMap>.zfudge : float

<max_CameraMap>.angleThreshold : float

<max_CameraMap>.maskShader : texturemap

<max_CameraMap>.useMask : boolean

<max_CameraMap>.maskUsesProjection : boolean

<max_CameraMap>.worldToCameraTM_connected : boolean

<max_CameraMap>.worldToCameraTM_shader : texturemap

<max_CameraMap>.worldToCameraTM_paramName : string

<max_CameraMap>.cameraFOV_connected : boolean

<max_CameraMap>.cameraFOV_shader : texturemap

<max_CameraMap>.cameraFOV_paramName : string

<max_CameraMap>.cameraPos_connected : boolean

<max_CameraMap>.cameraPos_shader : texturemap

<max_CameraMap>.cameraPos_paramName : string

<max_CameraMap>.map_channel_connected : boolean

<max_CameraMap>.map_channel_shader : texturemap

<max_CameraMap>.map_channel_paramName : string

<max_CameraMap>.backface_connected : boolean

<max_CameraMap>.backface_shader : texturemap

<max_CameraMap>.backface_paramName : string

<max_CameraMap>.useZBuffer_connected : boolean

<max_CameraMap>.useZBuffer_shader : texturemap

<max_CameraMap>.useZBuffer_paramName : string

<max_CameraMap>.zbufferWidth_connected : boolean

<max_CameraMap>.zbufferWidth_shader : texturemap

<max_CameraMap>.zbufferWidth_paramName : string

<max_CameraMap>.zbufferHeight_connected : boolean

<max_CameraMap>.zbufferHeight_shader : texturemap

<max_CameraMap>.zbufferHeight_paramName : string

<max_CameraMap>.zfudge_connected : boolean

<max_CameraMap>.zfudge_shader : texturemap

<max_CameraMap>.zfudge_paramName : string

<max_CameraMap>.angleThreshold_connected : boolean

<max_CameraMap>.angleThreshold_shader : texturemap

<max_CameraMap>.angleThreshold_paramName : string

<max_CameraMap>.useMask_connected : boolean

<max_CameraMap>.useMask_shader : texturemap

<max_CameraMap>.useMask_paramName : string

<max_CameraMap>.maskUsesProjection_connected : boolean

<max_CameraMap>.maskUsesProjection_shader : texturemap

<max_CameraMap>.maskUsesProjection_paramName : string

<max_CameraMap>.TheList : maxObject array

<max_CameraMap>.Shader_Version : integer

max_CameraMap interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_CompleteBakeElement : textureMap

max_CompleteBakeElement : textureMap {7773161f,880d4c33}

Constructor:

max_CompleteBakeElement: class instances not creatable by MAXScript

Properties:

<max_CompleteBakeElement>.applyAtmosphere : boolean

<max_CompleteBakeElement>.applyShadows : boolean

<max_CompleteBakeElement>.applyAtmosphere_connected : boolean

<max_CompleteBakeElement>.applyAtmosphere_shader : texturemap

<max_CompleteBakeElement>.applyAtmosphere_paramName : string

<max_CompleteBakeElement>.applyShadows_connected : boolean

<max_CompleteBakeElement>.applyShadows_shader : texturemap

<max_CompleteBakeElement>.applyShadows_paramName : string

<max_CompleteBakeElement>.TheList : maxObject array

<max_CompleteBakeElement>.Shader_Version : integer

max_CompleteBakeElement interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_CompositeMaterial : textureMap

max_CompositeMaterial : textureMap {7773161f,94668640}

Constructor:

max_CompositeMaterial: class instances not creatable by MAXScript

Properties:

<max_CompositeMaterial>.Parameters : paramBlock2

<max_CompositeMaterial>.ExtraParameters : paramBlock2

<max_CompositeMaterial>.MaterialList : material array

<max_CompositeMaterial>.MixType : int array

<max_CompositeMaterial>.MapEnables : boolean array

<max_CompositeMaterial>.Amount : float array

<max_CompositeMaterial>.GBufferID : integer

<max_CompositeMaterial>.Connection_struct__0000__Parameters : paramBlock2

<max_CompositeMaterial>.Connection_struct__0001__ExtraParameters : paramBlock2

<max_CompositeMaterial>.GBufferID_connected : boolean

<max_CompositeMaterial>.GBufferID_shader : texturemap

<max_CompositeMaterial>.GBufferID_paramName : string

<max_CompositeMaterial>.TheList : maxObject array

<max_CompositeMaterial>.Shader_Version : integer

max_CompositeMaterial interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_CompositeMaterial_Contour : textureMap

max_CompositeMaterial_Contour : textureMap {7773161f,9a4aad44}

Constructor:

max_CompositeMaterial_Contour: class instances not creatable by MAXScript

Properties:

<max_CompositeMaterial_Contour>.Parameters : paramBlock2

<max_CompositeMaterial_Contour>.MaterialList : material array

<max_CompositeMaterial_Contour>.MixType : int array

<max_CompositeMaterial_Contour>.MapEnables : boolean array

<max_CompositeMaterial_Contour>.Amount : float array

<max_CompositeMaterial_Contour>.Connection_struct__0000__Parameters : paramBlock2

<max_CompositeMaterial_Contour>.TheList : maxObject array

<max_CompositeMaterial_Contour>.Shader_Version : integer

max_CompositeMaterial_Contour interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_default_mtl_phen : material

max_default_mtl_phen : material {7773160f,9655b874}

Constructor:

max_default_mtl_phen: class instances not creatable by MAXScript

Properties:

<max_default_mtl_phen>.opaque : boolean

<max_default_mtl_phen>.surface : texturemap

<max_default_mtl_phen>.displace : texturemap

<max_default_mtl_phen>.shadow : texturemap

<max_default_mtl_phen>.volume : texturemap

<max_default_mtl_phen>.environment : texturemap

<max_default_mtl_phen>.contour : texturemap

<max_default_mtl_phen>.photon : texturemap

<max_default_mtl_phen>.photonvol : texturemap

<max_default_mtl_phen>.lightmap : texturemap

<max_default_mtl_phen>.shadow_shader_supports_caustics : boolean

<max_default_mtl_phen>.opaque_connected : boolean

<max_default_mtl_phen>.opaque_shader : texturemap

<max_default_mtl_phen>.opaque_paramName : string

<max_default_mtl_phen>.shadow_shader_supports_caustics_connected : boolean

<max_default_mtl_phen>.shadow_shader_supports_caustics_shader : texturemap

<max_default_mtl_phen>.shadow_shader_supports_caustics_paramName : string

<max_default_mtl_phen>.TheList : maxObject array

<max_default_mtl_phen>.Shader_Version : integer

max_default_mtl_phen interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_DefaultLight : textureMap

max_DefaultLight : textureMap {7773161f,4bf45348}

Constructor:

max_DefaultLight: class instances not creatable by MAXScript

Properties:

<max_DefaultLight>.color : fRGBA color

<max_DefaultLight>.multiplier : float

<max_DefaultLight>.color_connected : boolean

<max_DefaultLight>.color_shader : texturemap

<max_DefaultLight>.color_paramName : string

<max_DefaultLight>.multiplier_connected : boolean

<max_DefaultLight>.multiplier_shader : texturemap

<max_DefaultLight>.multiplier_paramName : string

<max_DefaultLight>.TheList : maxObject array

<max_DefaultLight>.Shader_Version : integer

max_DefaultLight interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_DefaultMaterial : textureMap

max_DefaultMaterial : textureMap {7773161f,4755c167}

Constructor:

max_DefaultMaterial: class instances not creatable by MAXScript

Properties:

<max_DefaultMaterial>.Parameters : paramBlock2

<max_DefaultMaterial>.ambient : fRGBA color

<max_DefaultMaterial>.specular : fRGBA color

<max_DefaultMaterial>.shinyness : float

<max_DefaultMaterial>.Connection_struct__0000__Parameters : paramBlock2

<max_DefaultMaterial>.ambient_connected : boolean

<max_DefaultMaterial>.ambient_shader : texturemap

<max_DefaultMaterial>.ambient_paramName : string

<max_DefaultMaterial>.specular_connected : boolean

<max_DefaultMaterial>.specular_shader : texturemap

<max_DefaultMaterial>.specular_paramName : string

<max_DefaultMaterial>.shinyness_connected : boolean

<max_DefaultMaterial>.shinyness_shader : texturemap

<max_DefaultMaterial>.shinyness_paramName : string

<max_DefaultMaterial>.TheList : maxObject array

<max_DefaultMaterial>.Shader_Version : integer

max_DefaultMaterial interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_DefaultShadow : textureMap

max_DefaultShadow : textureMap {7773161f,48004d56}

Constructor:

max_DefaultShadow: class instances not creatable by MAXScript

Properties:

<max_DefaultShadow>.TheList : maxObject array

<max_DefaultShadow>.Shader_Version : integer

max_DefaultShadow interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_DiffuseBakeElement : textureMap

max_DiffuseBakeElement : textureMap {7773161f,a1654552}

Constructor:

max_DiffuseBakeElement: class instances not creatable by MAXScript

Properties:

<max_DiffuseBakeElement>.applyAtmosphere : boolean

<max_DiffuseBakeElement>.applyShadows : boolean

<max_DiffuseBakeElement>.applyLighting : boolean

<max_DiffuseBakeElement>.applyAtmosphere_connected : boolean

<max_DiffuseBakeElement>.applyAtmosphere_shader : texturemap

<max_DiffuseBakeElement>.applyAtmosphere_paramName : string

<max_DiffuseBakeElement>.applyShadows_connected : boolean

<max_DiffuseBakeElement>.applyShadows_shader : texturemap

<max_DiffuseBakeElement>.applyShadows_paramName : string

<max_DiffuseBakeElement>.applyLighting_connected : boolean

<max_DiffuseBakeElement>.applyLighting_shader : texturemap

<max_DiffuseBakeElement>.applyLighting_paramName : string

<max_DiffuseBakeElement>.TheList : maxObject array

<max_DiffuseBakeElement>.Shader_Version : integer

max_DiffuseBakeElement interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_DirectionalLight : textureMap

max_DirectionalLight : textureMap {7773161f,b359be60}

Constructor:

max_DirectionalLight: class instances not creatable by MAXScript

Properties:

<max_DirectionalLight>.GeneralParameters : paramBlock2

<max_DirectionalLight>.DirectionalParameters : paramBlock2

<max_DirectionalLight>.AttenuationParameters : paramBlock2

<max_DirectionalLight>.ShadowParameters : paramBlock2

<max_DirectionalLight>.ProjectorParameters : paramBlock2

<max_DirectionalLight>.AtmosphericShadows : paramBlock2

<max_DirectionalLight>.LightIncludeExclude : paramBlock2

<max_DirectionalLight>.On : boolean

<max_DirectionalLight>.Color : fRGBA color

<max_DirectionalLight>.Multiplier : float

<max_DirectionalLight>.Contrast : float

<max_DirectionalLight>.SoftenDiffuseEdge : float

<max_DirectionalLight>.AffectDiffuse : boolean

<max_DirectionalLight>.AffectSpecular : boolean

<max_DirectionalLight>.AmbientOnly : boolean

<max_DirectionalLight>.HotSpot : float

<max_DirectionalLight>.Falloff : float

<max_DirectionalLight>.Overshoot : integer

<max_DirectionalLight>.Shape : integer

<max_DirectionalLight>.Aspect : float

<max_DirectionalLight>.UseNearAttenuation : boolean

<max_DirectionalLight>.NearStart : float

<max_DirectionalLight>.NearEnd : float

<max_DirectionalLight>.UseFarAttenuation : boolean

<max_DirectionalLight>.FarStart : float

<max_DirectionalLight>.FarEnd : float

<max_DirectionalLight>.Decay : integer

<max_DirectionalLight>.DecayRadius : float

<max_DirectionalLight>.CastShadows : boolean

<max_DirectionalLight>.ShadowColor : fRGBA color

<max_DirectionalLight>.ShadowDensity : float

<max_DirectionalLight>.ShadowAffected : boolean

<max_DirectionalLight>.UseShadowProjector : boolean

<max_DirectionalLight>.ShadowProjector : texturemap

<max_DirectionalLight>.UseProjector : boolean

<max_DirectionalLight>.Projector : texturemap

<max_DirectionalLight>.AtmospheresCastShadows : boolean

<max_DirectionalLight>.ShadowOpacity : float

<max_DirectionalLight>.ShadowAmount : float

<max_DirectionalLight>.exclusionList : boolean array

<max_DirectionalLight>.Connection_struct__0000__GeneralParameters : paramBlock2

<max_DirectionalLight>.Connection_struct__0001__DirectionalParameters : paramBlock2

<max_DirectionalLight>.Connection_struct__0002__AttenuationParameters : paramBlock2

<max_DirectionalLight>.Connection_struct__0003__ShadowParameters : paramBlock2

<max_DirectionalLight>.Connection_struct__0004__ProjectorParameters : paramBlock2

<max_DirectionalLight>.Connection_struct__0005__AtmosphericShadows : paramBlock2

<max_DirectionalLight>.Connection_struct__0006__LightIncludeExclude : paramBlock2

<max_DirectionalLight>.On_connected : boolean

<max_DirectionalLight>.On_shader : texturemap

<max_DirectionalLight>.On_paramName : string

<max_DirectionalLight>.Color_connected : boolean

<max_DirectionalLight>.Color_shader : texturemap

<max_DirectionalLight>.Color_paramName : string

<max_DirectionalLight>.Multiplier_connected : boolean

<max_DirectionalLight>.Multiplier_shader : texturemap

<max_DirectionalLight>.Multiplier_paramName : string

<max_DirectionalLight>.Contrast_connected : boolean

<max_DirectionalLight>.Contrast_shader : texturemap

<max_DirectionalLight>.Contrast_paramName : string

<max_DirectionalLight>.SoftenDiffuseEdge_connected : boolean

<max_DirectionalLight>.SoftenDiffuseEdge_shader : texturemap

<max_DirectionalLight>.SoftenDiffuseEdge_paramName : string

<max_DirectionalLight>.AffectDiffuse_connected : boolean

<max_DirectionalLight>.AffectDiffuse_shader : texturemap

<max_DirectionalLight>.AffectDiffuse_paramName : string

<max_DirectionalLight>.AffectSpecular_connected : boolean

<max_DirectionalLight>.AffectSpecular_shader : texturemap

<max_DirectionalLight>.AffectSpecular_paramName : string

<max_DirectionalLight>.AmbientOnly_connected : boolean

<max_DirectionalLight>.AmbientOnly_shader : texturemap

<max_DirectionalLight>.AmbientOnly_paramName : string

<max_DirectionalLight>.HotSpot_connected : boolean

<max_DirectionalLight>.HotSpot_shader : texturemap

<max_DirectionalLight>.HotSpot_paramName : string

<max_DirectionalLight>.Falloff_connected : boolean

<max_DirectionalLight>.Falloff_shader : texturemap

<max_DirectionalLight>.Falloff_paramName : string

<max_DirectionalLight>.Overshoot_connected : boolean

<max_DirectionalLight>.Overshoot_shader : texturemap

<max_DirectionalLight>.Overshoot_paramName : string

<max_DirectionalLight>.Shape_connected : boolean

<max_DirectionalLight>.Shape_shader : texturemap

<max_DirectionalLight>.Shape_paramName : string

<max_DirectionalLight>.Aspect_connected : boolean

<max_DirectionalLight>.Aspect_shader : texturemap

<max_DirectionalLight>.Aspect_paramName : string

<max_DirectionalLight>.UseNearAttenuation_connected : boolean

<max_DirectionalLight>.UseNearAttenuation_shader : texturemap

<max_DirectionalLight>.UseNearAttenuation_paramName : string

<max_DirectionalLight>.NearStart_connected : boolean

<max_DirectionalLight>.NearStart_shader : texturemap

<max_DirectionalLight>.NearStart_paramName : string

<max_DirectionalLight>.NearEnd_connected : boolean

<max_DirectionalLight>.NearEnd_shader : texturemap

<max_DirectionalLight>.NearEnd_paramName : string

<max_DirectionalLight>.UseFarAttenuation_connected : boolean

<max_DirectionalLight>.UseFarAttenuation_shader : texturemap

<max_DirectionalLight>.UseFarAttenuation_paramName : string

<max_DirectionalLight>.FarStart_connected : boolean

<max_DirectionalLight>.FarStart_shader : texturemap

<max_DirectionalLight>.FarStart_paramName : string

<max_DirectionalLight>.FarEnd_connected : boolean

<max_DirectionalLight>.FarEnd_shader : texturemap

<max_DirectionalLight>.FarEnd_paramName : string

<max_DirectionalLight>.Decay_connected : boolean

<max_DirectionalLight>.Decay_shader : texturemap

<max_DirectionalLight>.Decay_paramName : string

<max_DirectionalLight>.DecayRadius_connected : boolean

<max_DirectionalLight>.DecayRadius_shader : texturemap

<max_DirectionalLight>.DecayRadius_paramName : string

<max_DirectionalLight>.CastShadows_connected : boolean

<max_DirectionalLight>.CastShadows_shader : texturemap

<max_DirectionalLight>.CastShadows_paramName : string

<max_DirectionalLight>.ShadowColor_connected : boolean

<max_DirectionalLight>.ShadowColor_shader : texturemap

<max_DirectionalLight>.ShadowColor_paramName : string

<max_DirectionalLight>.ShadowDensity_connected : boolean

<max_DirectionalLight>.ShadowDensity_shader : texturemap

<max_DirectionalLight>.ShadowDensity_paramName : string

<max_DirectionalLight>.ShadowAffected_connected : boolean

<max_DirectionalLight>.ShadowAffected_shader : texturemap

<max_DirectionalLight>.ShadowAffected_paramName : string

<max_DirectionalLight>.UseShadowProjector_connected : boolean

<max_DirectionalLight>.UseShadowProjector_shader : texturemap

<max_DirectionalLight>.UseShadowProjector_paramName : string

<max_DirectionalLight>.UseProjector_connected : boolean

<max_DirectionalLight>.UseProjector_shader : texturemap

<max_DirectionalLight>.UseProjector_paramName : string

<max_DirectionalLight>.AtmospheresCastShadows_connected : boolean

<max_DirectionalLight>.AtmospheresCastShadows_shader : texturemap

<max_DirectionalLight>.AtmospheresCastShadows_paramName : string

<max_DirectionalLight>.ShadowOpacity_connected : boolean

<max_DirectionalLight>.ShadowOpacity_shader : texturemap

<max_DirectionalLight>.ShadowOpacity_paramName : string

<max_DirectionalLight>.ShadowAmount_connected : boolean

<max_DirectionalLight>.ShadowAmount_shader : texturemap

<max_DirectionalLight>.ShadowAmount_paramName : string

<max_DirectionalLight>.TheList : maxObject array

<max_DirectionalLight>.Shader_Version : integer

max_DirectionalLight interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_DoubleSidedMaterial : textureMap

max_DoubleSidedMaterial : textureMap {7773161f,b1255f3c}

Constructor:

max_DoubleSidedMaterial: class instances not creatable by MAXScript

Properties:

<max_DoubleSidedMaterial>.Parameters : paramBlock2

<max_DoubleSidedMaterial>.ExtraParameters : paramBlock2

<max_DoubleSidedMaterial>.Material1 : material

<max_DoubleSidedMaterial>.Material2 : material

<max_DoubleSidedMaterial>.Map1Enabled : boolean

<max_DoubleSidedMaterial>.Map2Enabled : boolean

<max_DoubleSidedMaterial>.Translucency : float

<max_DoubleSidedMaterial>.GBufferID : integer

<max_DoubleSidedMaterial>.Connection_struct__0000__Parameters : paramBlock2

<max_DoubleSidedMaterial>.Connection_struct__0001__ExtraParameters : paramBlock2

<max_DoubleSidedMaterial>.Map1Enabled_connected : boolean

<max_DoubleSidedMaterial>.Map1Enabled_shader : texturemap

<max_DoubleSidedMaterial>.Map1Enabled_paramName : string

<max_DoubleSidedMaterial>.Map2Enabled_connected : boolean

<max_DoubleSidedMaterial>.Map2Enabled_shader : texturemap

<max_DoubleSidedMaterial>.Map2Enabled_paramName : string

<max_DoubleSidedMaterial>.Translucency_connected : boolean

<max_DoubleSidedMaterial>.Translucency_shader : texturemap

<max_DoubleSidedMaterial>.Translucency_paramName : string

<max_DoubleSidedMaterial>.GBufferID_connected : boolean

<max_DoubleSidedMaterial>.GBufferID_shader : texturemap

<max_DoubleSidedMaterial>.GBufferID_paramName : string

<max_DoubleSidedMaterial>.TheList : maxObject array

<max_DoubleSidedMaterial>.Shader_Version : integer

max_DoubleSidedMaterial interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_DoubleSidedMaterial_Contour : textureMap

max_DoubleSidedMaterial_Contour : textureMap {7773161f,86214518}

Constructor:

max_DoubleSidedMaterial_Contour: class instances not creatable by MAXScript

Properties:

<max_DoubleSidedMaterial_Contour>.Parameters : paramBlock2

<max_DoubleSidedMaterial_Contour>.Material1 : material

<max_DoubleSidedMaterial_Contour>.Material2 : material

<max_DoubleSidedMaterial_Contour>.Map1Enabled : boolean

<max_DoubleSidedMaterial_Contour>.Map2Enabled : boolean

<max_DoubleSidedMaterial_Contour>.Translucency : float

<max_DoubleSidedMaterial_Contour>.Connection_struct__0000__Parameters : paramBlock2

<max_DoubleSidedMaterial_Contour>.Map1Enabled_connected : boolean

<max_DoubleSidedMaterial_Contour>.Map1Enabled_shader : texturemap

<max_DoubleSidedMaterial_Contour>.Map1Enabled_paramName : string

<max_DoubleSidedMaterial_Contour>.Map2Enabled_connected : boolean

<max_DoubleSidedMaterial_Contour>.Map2Enabled_shader : texturemap

<max_DoubleSidedMaterial_Contour>.Map2Enabled_paramName : string

<max_DoubleSidedMaterial_Contour>.Translucency_connected : boolean

<max_DoubleSidedMaterial_Contour>.Translucency_shader : texturemap

<max_DoubleSidedMaterial_Contour>.Translucency_paramName : string

<max_DoubleSidedMaterial_Contour>.TheList : maxObject array

<max_DoubleSidedMaterial_Contour>.Shader_Version : integer

max_DoubleSidedMaterial_Contour interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_dummy : textureMap

max_dummy : textureMap {7773161f,78075883}

Constructor:

max_dummy: class instances not creatable by MAXScript

Properties:

<max_dummy>.TheList : maxObject array

<max_dummy>.Shader_Version : integer

max_dummy interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_GenericBakeElement : textureMap

max_GenericBakeElement : textureMap {7773161f,9e6f5b4e}

Constructor:

max_GenericBakeElement: class instances not creatable by MAXScript

Properties:

<max_GenericBakeElement>.subShader : texturemap

<max_GenericBakeElement>.TheList : maxObject array

<max_GenericBakeElement>.Shader_Version : integer

max_GenericBakeElement interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_GizmoData : textureMap

max_GizmoData : textureMap {7773161f,8c559037}

Constructor:

max_GizmoData: class instances not creatable by MAXScript

Properties:

<max_GizmoData>.Type : integer

<max_GizmoData>.Seed : integer

<max_GizmoData>.Radius : float

<max_GizmoData>.Height : float

<max_GizmoData>.Width : float

<max_GizmoData>.Length : float

<max_GizmoData>.tm : matrix3

<max_GizmoData>.Type_connected : boolean

<max_GizmoData>.Type_shader : texturemap

<max_GizmoData>.Type_paramName : string

<max_GizmoData>.Seed_connected : boolean

<max_GizmoData>.Seed_shader : texturemap

<max_GizmoData>.Seed_paramName : string

<max_GizmoData>.Radius_connected : boolean

<max_GizmoData>.Radius_shader : texturemap

<max_GizmoData>.Radius_paramName : string

<max_GizmoData>.Height_connected : boolean

<max_GizmoData>.Height_shader : texturemap

<max_GizmoData>.Height_paramName : string

<max_GizmoData>.Width_connected : boolean

<max_GizmoData>.Width_shader : texturemap

<max_GizmoData>.Width_paramName : string

<max_GizmoData>.Length_connected : boolean

<max_GizmoData>.Length_shader : texturemap

<max_GizmoData>.Length_paramName : string

<max_GizmoData>.tm_connected : boolean

<max_GizmoData>.tm_shader : texturemap

<max_GizmoData>.tm_paramName : string

<max_GizmoData>.TheList : maxObject array

<max_GizmoData>.Shader_Version : integer

max_GizmoData interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_GNormal : textureMap

max_GNormal : textureMap {7773161f,736d925a}

Constructor:

max_GNormal: class instances not creatable by MAXScript

Properties:

<max_GNormal>.multiplier : float

<max_GNormal>.bumpMultiplier : float

<max_GNormal>.flip_red : boolean

<max_GNormal>.flip_green : boolean

<max_GNormal>.swap_rg : boolean

<max_GNormal>.normalMapOn : boolean

<max_GNormal>.normalMapShader : texturemap

<max_GNormal>.bumpMapOn : boolean

<max_GNormal>.bumpMapShader : texturemap

<max_GNormal>.method : integer

<max_GNormal>.grey : fRGBA color

<max_GNormal>.normalMap_MapChannel : integer

<max_GNormal>.gbufID : integer

<max_GNormal>.multiplier_connected : boolean

<max_GNormal>.multiplier_shader : texturemap

<max_GNormal>.multiplier_paramName : string

<max_GNormal>.bumpMultiplier_connected : boolean

<max_GNormal>.bumpMultiplier_shader : texturemap

<max_GNormal>.bumpMultiplier_paramName : string

<max_GNormal>.flip_red_connected : boolean

<max_GNormal>.flip_red_shader : texturemap

<max_GNormal>.flip_red_paramName : string

<max_GNormal>.flip_green_connected : boolean

<max_GNormal>.flip_green_shader : texturemap

<max_GNormal>.flip_green_paramName : string

<max_GNormal>.swap_rg_connected : boolean

<max_GNormal>.swap_rg_shader : texturemap

<max_GNormal>.swap_rg_paramName : string

<max_GNormal>.normalMapOn_connected : boolean

<max_GNormal>.normalMapOn_shader : texturemap

<max_GNormal>.normalMapOn_paramName : string

<max_GNormal>.bumpMapOn_connected : boolean

<max_GNormal>.bumpMapOn_shader : texturemap

<max_GNormal>.bumpMapOn_paramName : string

<max_GNormal>.method_connected : boolean

<max_GNormal>.method_shader : texturemap

<max_GNormal>.method_paramName : string

<max_GNormal>.grey_connected : boolean

<max_GNormal>.grey_shader : texturemap

<max_GNormal>.grey_paramName : string

<max_GNormal>.normalMap_MapChannel_connected : boolean

<max_GNormal>.normalMap_MapChannel_shader : texturemap

<max_GNormal>.normalMap_MapChannel_paramName : string

<max_GNormal>.gbufID_connected : boolean

<max_GNormal>.gbufID_shader : texturemap

<max_GNormal>.gbufID_paramName : string

<max_GNormal>.TheList : maxObject array

<max_GNormal>.Shader_Version : integer

max_GNormal interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_HeightBakeElement : textureMap

max_HeightBakeElement : textureMap {7773161f,a165bc4a}

Constructor:

max_HeightBakeElement: class instances not creatable by MAXScript

Properties:

<max_HeightBakeElement>.applyAtmosphere : boolean

<max_HeightBakeElement>.applyShadows : boolean

<max_HeightBakeElement>.applyAtmosphere_connected : boolean

<max_HeightBakeElement>.applyAtmosphere_shader : texturemap

<max_HeightBakeElement>.applyAtmosphere_paramName : string

<max_HeightBakeElement>.applyShadows_connected : boolean

<max_HeightBakeElement>.applyShadows_shader : texturemap

<max_HeightBakeElement>.applyShadows_paramName : string

<max_HeightBakeElement>.TheList : maxObject array

<max_HeightBakeElement>.Shader_Version : integer

max_HeightBakeElement interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_IesSkylight : textureMap

max_IesSkylight : textureMap {7773161f,ab05593b}

Constructor:

max_IesSkylight: class instances not creatable by MAXScript

Properties:

<max_IesSkylight>.IesSkyParams : paramBlock2

<max_IesSkylight>.ExtaParams : paramBlock2

<max_IesSkylight>.on : boolean

<max_IesSkylight>.multiplier : float

<max_IesSkylight>.color : fRGBA color

<max_IesSkylight>.sky_cover : float

<max_IesSkylight>.lightToWorld : matrix3

<max_IesSkylight>.Connection_struct__0000__IesSkyParams : paramBlock2

<max_IesSkylight>.Connection_struct__0001__ExtaParams : paramBlock2

<max_IesSkylight>.on_connected : boolean

<max_IesSkylight>.on_shader : texturemap

<max_IesSkylight>.on_paramName : string

<max_IesSkylight>.multiplier_connected : boolean

<max_IesSkylight>.multiplier_shader : texturemap

<max_IesSkylight>.multiplier_paramName : string

<max_IesSkylight>.color_connected : boolean

<max_IesSkylight>.color_shader : texturemap

<max_IesSkylight>.color_paramName : string

<max_IesSkylight>.sky_cover_connected : boolean

<max_IesSkylight>.sky_cover_shader : texturemap

<max_IesSkylight>.sky_cover_paramName : string

<max_IesSkylight>.lightToWorld_connected : boolean

<max_IesSkylight>.lightToWorld_shader : texturemap

<max_IesSkylight>.lightToWorld_paramName : string

<max_IesSkylight>.TheList : maxObject array

<max_IesSkylight>.Shader_Version : integer

max_IesSkylight interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_is_material_editor : textureMap

max_is_material_editor : textureMap {7773161f,b1395519}

Constructor:

max_is_material_editor: class instances not creatable by MAXScript

Properties:

<max_is_material_editor>.TheList : maxObject array

<max_is_material_editor>.Shader_Version : integer

max_is_material_editor interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_LightBakeElement : textureMap

max_LightBakeElement : textureMap {7773161f,936eae70}

Constructor:

max_LightBakeElement: class instances not creatable by MAXScript

Properties:

<max_LightBakeElement>.applyAtmosphere : boolean

<max_LightBakeElement>.applyShadows : boolean

<max_LightBakeElement>.isDirectOn : boolean

<max_LightBakeElement>.isIndirectOn : boolean

<max_LightBakeElement>.applyAtmosphere_connected : boolean

<max_LightBakeElement>.applyAtmosphere_shader : texturemap

<max_LightBakeElement>.applyAtmosphere_paramName : string

<max_LightBakeElement>.applyShadows_connected : boolean

<max_LightBakeElement>.applyShadows_shader : texturemap

<max_LightBakeElement>.applyShadows_paramName : string

<max_LightBakeElement>.isDirectOn_connected : boolean

<max_LightBakeElement>.isDirectOn_shader : texturemap

<max_LightBakeElement>.isDirectOn_paramName : string

<max_LightBakeElement>.isIndirectOn_connected : boolean

<max_LightBakeElement>.isIndirectOn_shader : texturemap

<max_LightBakeElement>.isIndirectOn_paramName : string

<max_LightBakeElement>.TheList : maxObject array

<max_LightBakeElement>.Shader_Version : integer

max_LightBakeElement interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_LightMeterMaterial : textureMap

max_LightMeterMaterial : textureMap {7773161f,91378238}

Constructor:

max_LightMeterMaterial: class instances not creatable by MAXScript

Properties:

<max_LightMeterMaterial>.Parameters : paramBlock2

<max_LightMeterMaterial>.pseudoColor : boolean

<max_LightMeterMaterial>.scaleFactor : float

<max_LightMeterMaterial>.localFG : boolean

<max_LightMeterMaterial>.Connection_struct__0000__Parameters : paramBlock2

<max_LightMeterMaterial>.pseudoColor_connected : boolean

<max_LightMeterMaterial>.pseudoColor_shader : texturemap

<max_LightMeterMaterial>.pseudoColor_paramName : string

<max_LightMeterMaterial>.scaleFactor_connected : boolean

<max_LightMeterMaterial>.scaleFactor_shader : texturemap

<max_LightMeterMaterial>.scaleFactor_paramName : string

<max_LightMeterMaterial>.localFG_connected : boolean

<max_LightMeterMaterial>.localFG_shader : texturemap

<max_LightMeterMaterial>.localFG_paramName : string

<max_LightMeterMaterial>.TheList : maxObject array

<max_LightMeterMaterial>.Shader_Version : integer

max_LightMeterMaterial interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_MatteMaterial : textureMap

max_MatteMaterial : textureMap {7773161f,83f6835f}

Constructor:

max_MatteMaterial: class instances not creatable by MAXScript

Properties:

<max_MatteMaterial>.Parameters : paramBlock2

<max_MatteMaterial>.ExtraParameters : paramBlock2

<max_MatteMaterial>.OpaqueAlpha : boolean

<max_MatteMaterial>.ApplyAtmosphere : boolean

<max_MatteMaterial>.AtmosphereDepth : integer

<max_MatteMaterial>.ReceiveShadows : boolean

<max_MatteMaterial>.AffectAlpha : boolean

<max_MatteMaterial>.ShadowBrightness : float

<max_MatteMaterial>.Color : fRGBA color

<max_MatteMaterial>.Amount : float

<max_MatteMaterial>.Map : texturemap

<max_MatteMaterial>.UseReflMap : boolean

<max_MatteMaterial>.GBufferID : integer

<max_MatteMaterial>.Connection_struct__0000__Parameters : paramBlock2

<max_MatteMaterial>.Connection_struct__0001__ExtraParameters : paramBlock2

<max_MatteMaterial>.OpaqueAlpha_connected : boolean

<max_MatteMaterial>.OpaqueAlpha_shader : texturemap

<max_MatteMaterial>.OpaqueAlpha_paramName : string

<max_MatteMaterial>.ApplyAtmosphere_connected : boolean

<max_MatteMaterial>.ApplyAtmosphere_shader : texturemap

<max_MatteMaterial>.ApplyAtmosphere_paramName : string

<max_MatteMaterial>.AtmosphereDepth_connected : boolean

<max_MatteMaterial>.AtmosphereDepth_shader : texturemap

<max_MatteMaterial>.AtmosphereDepth_paramName : string

<max_MatteMaterial>.ReceiveShadows_connected : boolean

<max_MatteMaterial>.ReceiveShadows_shader : texturemap

<max_MatteMaterial>.ReceiveShadows_paramName : string

<max_MatteMaterial>.AffectAlpha_connected : boolean

<max_MatteMaterial>.AffectAlpha_shader : texturemap

<max_MatteMaterial>.AffectAlpha_paramName : string

<max_MatteMaterial>.ShadowBrightness_connected : boolean

<max_MatteMaterial>.ShadowBrightness_shader : texturemap

<max_MatteMaterial>.ShadowBrightness_paramName : string

<max_MatteMaterial>.Color_connected : boolean

<max_MatteMaterial>.Color_shader : texturemap

<max_MatteMaterial>.Color_paramName : string

<max_MatteMaterial>.Amount_connected : boolean

<max_MatteMaterial>.Amount_shader : texturemap

<max_MatteMaterial>.Amount_paramName : string

<max_MatteMaterial>.UseReflMap_connected : boolean

<max_MatteMaterial>.UseReflMap_shader : texturemap

<max_MatteMaterial>.UseReflMap_paramName : string

<max_MatteMaterial>.GBufferID_connected : boolean

<max_MatteMaterial>.GBufferID_shader : texturemap

<max_MatteMaterial>.GBufferID_paramName : string

<max_MatteMaterial>.TheList : maxObject array

<max_MatteMaterial>.Shader_Version : integer

max_MatteMaterial interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_mia_material_renderelements : textureMap

max_mia_material_renderelements : textureMap {7773161f,acf74a39}

Constructor:

max_mia_material_renderelements: class instances not creatable by MAXScript

Properties:

<max_mia_material_renderelements>.mia_material : texturemap

<max_mia_material_renderelements>.GBufferID : integer

<max_mia_material_renderelements>.GBufferID_connected : boolean

<max_mia_material_renderelements>.GBufferID_shader : texturemap

<max_mia_material_renderelements>.GBufferID_paramName : string

<max_mia_material_renderelements>.TheList : maxObject array

<max_mia_material_renderelements>.Shader_Version : integer

max_mia_material_renderelements interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_mrRenderElement : textureMap

max_mrRenderElement : textureMap {7773161f,6b50b961}

Constructor:

max_mrRenderElement: class instances not creatable by MAXScript

Properties:

<max_mrRenderElement>.mode : integer

<max_mrRenderElement>.multiplier : float

<max_mrRenderElement>.arbitrary : fRGBA color

<max_mrRenderElement>.label : string

<max_mrRenderElement>.mode_connected : boolean

<max_mrRenderElement>.mode_shader : texturemap

<max_mrRenderElement>.mode_paramName : string

<max_mrRenderElement>.multiplier_connected : boolean

<max_mrRenderElement>.multiplier_shader : texturemap

<max_mrRenderElement>.multiplier_paramName : string

<max_mrRenderElement>.arbitrary_connected : boolean

<max_mrRenderElement>.arbitrary_shader : texturemap

<max_mrRenderElement>.arbitrary_paramName : string

<max_mrRenderElement>.label_connected : boolean

<max_mrRenderElement>.label_shader : texturemap

<max_mrRenderElement>.label_paramName : string

<max_mrRenderElement>.TheList : maxObject array

<max_mrRenderElement>.Shader_Version : integer

max_mrRenderElement interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_mrStoreElements : textureMap

max_mrStoreElements : textureMap {7773161f,5142b480}

Constructor:

max_mrStoreElements: class instances not creatable by MAXScript

Properties:

<max_mrStoreElements>.main_input : fRGBA color

<max_mrStoreElements>.main_label : string

<max_mrStoreElements>.apply_render_elements : boolean

<max_mrStoreElements>.inputs : paramBlock2 array

<max_mrStoreElements>.input : fRGBA color

<max_mrStoreElements>.label : string

<max_mrStoreElements>.mr_element : integer

<max_mrStoreElements>.max_element : integer

<max_mrStoreElements>.main_input_connected : boolean

<max_mrStoreElements>.main_input_shader : texturemap

<max_mrStoreElements>.main_input_paramName : string

<max_mrStoreElements>.main_label_connected : boolean

<max_mrStoreElements>.main_label_shader : texturemap

<max_mrStoreElements>.main_label_paramName : string

<max_mrStoreElements>.apply_render_elements_connected : boolean

<max_mrStoreElements>.apply_render_elements_shader : texturemap

<max_mrStoreElements>.apply_render_elements_paramName : string

<max_mrStoreElements>.TheList : maxObject array

<max_mrStoreElements>.Shader_Version : integer

max_mrStoreElements interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_MultiMaterial : textureMap

max_MultiMaterial : textureMap {7773161f,840e6f53}

Constructor:

max_MultiMaterial: class instances not creatable by MAXScript

Properties:

<max_MultiMaterial>.Parameters : paramBlock2

<max_MultiMaterial>.ExtraParameters : paramBlock2

<max_MultiMaterial>.MaterialList : material array

<max_MultiMaterial>.MapEnabled : boolean array

<max_MultiMaterial>.MaterialIDList : int array

<max_MultiMaterial>.GBufferID : integer

<max_MultiMaterial>.Connection_struct__0000__Parameters : paramBlock2

<max_MultiMaterial>.Connection_struct__0001__ExtraParameters : paramBlock2

<max_MultiMaterial>.GBufferID_connected : boolean

<max_MultiMaterial>.GBufferID_shader : texturemap

<max_MultiMaterial>.GBufferID_paramName : string

<max_MultiMaterial>.TheList : maxObject array

<max_MultiMaterial>.Shader_Version : integer

max_MultiMaterial interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_MultiMaterial_Contour : textureMap

max_MultiMaterial_Contour : textureMap {7773161f,6a22446f}

Constructor:

max_MultiMaterial_Contour: class instances not creatable by MAXScript

Properties:

<max_MultiMaterial_Contour>.Parameters : paramBlock2

<max_MultiMaterial_Contour>.MaterialList : material array

<max_MultiMaterial_Contour>.MapEnabled : boolean array

<max_MultiMaterial_Contour>.MaterialIDList : int array

<max_MultiMaterial_Contour>.Connection_struct__0000__Parameters : paramBlock2

<max_MultiMaterial_Contour>.TheList : maxObject array

<max_MultiMaterial_Contour>.Shader_Version : integer

max_MultiMaterial_Contour interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_NodeData : textureMap

max_NodeData : textureMap {7773161f,a15ab37a}

Constructor:

max_NodeData: class instances not creatable by MAXScript

Properties:

<max_NodeData>.WireColor : fRGBA color

<max_NodeData>.NodeID : integer

<max_NodeData>.NodeRenderID : integer

<max_NodeData>.illuminators : node array

<max_NodeData>.shadowmakers : node array

<max_NodeData>.useGlobalLights : boolean

<max_NodeData>.materialRequirements : int array

<max_NodeData>.lightIncludeExcludeID : integer

<max_NodeData>.WireColor_connected : boolean

<max_NodeData>.WireColor_shader : texturemap

<max_NodeData>.WireColor_paramName : string

<max_NodeData>.NodeID_connected : boolean

<max_NodeData>.NodeID_shader : texturemap

<max_NodeData>.NodeID_paramName : string

<max_NodeData>.NodeRenderID_connected : boolean

<max_NodeData>.NodeRenderID_shader : texturemap

<max_NodeData>.NodeRenderID_paramName : string

<max_NodeData>.useGlobalLights_connected : boolean

<max_NodeData>.useGlobalLights_shader : texturemap

<max_NodeData>.useGlobalLights_paramName : string

<max_NodeData>.lightIncludeExcludeID_connected : boolean

<max_NodeData>.lightIncludeExcludeID_shader : texturemap

<max_NodeData>.lightIncludeExcludeID_paramName : string

<max_NodeData>.TheList : maxObject array

<max_NodeData>.Shader_Version : integer

max_NodeData interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_NormalsBakeElement : textureMap

max_NormalsBakeElement : textureMap {7773161f,96635c34}

Constructor:

max_NormalsBakeElement: class instances not creatable by MAXScript

Properties:

<max_NormalsBakeElement>.applyAtmosphere : boolean

<max_NormalsBakeElement>.applyShadows : boolean

<max_NormalsBakeElement>.applyAtmosphere_connected : boolean

<max_NormalsBakeElement>.applyAtmosphere_shader : texturemap

<max_NormalsBakeElement>.applyAtmosphere_paramName : string

<max_NormalsBakeElement>.applyShadows_connected : boolean

<max_NormalsBakeElement>.applyShadows_shader : texturemap

<max_NormalsBakeElement>.applyShadows_paramName : string

<max_NormalsBakeElement>.TheList : maxObject array

<max_NormalsBakeElement>.Shader_Version : integer

max_NormalsBakeElement interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_ObjectData : textureMap

max_ObjectData : textureMap {7773161f,a1485a48}

Constructor:

max_ObjectData: class instances not creatable by MAXScript

Properties:

<max_ObjectData>.bvmin : point3

<max_ObjectData>.bvmax : point3

<max_ObjectData>.mapchannels : int array

<max_ObjectData>.particleData : maxObject

<max_ObjectData>.bvmin_connected : boolean

<max_ObjectData>.bvmin_shader : texturemap

<max_ObjectData>.bvmin_paramName : string

<max_ObjectData>.bvmax_connected : boolean

<max_ObjectData>.bvmax_shader : texturemap

<max_ObjectData>.bvmax_paramName : string

<max_ObjectData>.TheList : maxObject array

<max_ObjectData>.Shader_Version : integer

max_ObjectData interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_OmniLight : textureMap

max_OmniLight : textureMap {7773161f,a463a92d}

Constructor:

max_OmniLight: class instances not creatable by MAXScript

Properties:

<max_OmniLight>.GeneralParameters : paramBlock2

<max_OmniLight>.AttenuationParameters : paramBlock2

<max_OmniLight>.ShadowParameters : paramBlock2

<max_OmniLight>.ProjectorParameters : paramBlock2

<max_OmniLight>.AtmosphericShadows : paramBlock2

<max_OmniLight>.LightIncludeExclude : paramBlock2

<max_OmniLight>.On : boolean

<max_OmniLight>.Color : fRGBA color

<max_OmniLight>.Multiplier : float

<max_OmniLight>.Contrast : float

<max_OmniLight>.SoftenDiffuseEdge : float

<max_OmniLight>.AffectDiffuse : boolean

<max_OmniLight>.AffectSpecular : boolean

<max_OmniLight>.AmbientOnly : boolean

<max_OmniLight>.UseNearAttenuation : boolean

<max_OmniLight>.NearStart : float

<max_OmniLight>.NearEnd : float

<max_OmniLight>.UseFarAttenuation : boolean

<max_OmniLight>.FarStart : float

<max_OmniLight>.FarEnd : float

<max_OmniLight>.Decay : integer

<max_OmniLight>.DecayRadius : float

<max_OmniLight>.CastShadows : boolean

<max_OmniLight>.ShadowColor : fRGBA color

<max_OmniLight>.ShadowDensity : float

<max_OmniLight>.ShadowAffected : boolean

<max_OmniLight>.UseShadowProjector : boolean

<max_OmniLight>.ShadowProjector : texturemap

<max_OmniLight>.UseProjector : boolean

<max_OmniLight>.Projector : texturemap

<max_OmniLight>.AtmospheresCastShadows : boolean

<max_OmniLight>.ShadowOpacity : float

<max_OmniLight>.ShadowAmount : float

<max_OmniLight>.exclusionList : boolean array

<max_OmniLight>.Connection_struct__0000__GeneralParameters : paramBlock2

<max_OmniLight>.Connection_struct__0001__AttenuationParameters : paramBlock2

<max_OmniLight>.Connection_struct__0002__ShadowParameters : paramBlock2

<max_OmniLight>.Connection_struct__0003__ProjectorParameters : paramBlock2

<max_OmniLight>.Connection_struct__0004__AtmosphericShadows : paramBlock2

<max_OmniLight>.Connection_struct__0005__LightIncludeExclude : paramBlock2

<max_OmniLight>.On_connected : boolean

<max_OmniLight>.On_shader : texturemap

<max_OmniLight>.On_paramName : string

<max_OmniLight>.Color_connected : boolean

<max_OmniLight>.Color_shader : texturemap

<max_OmniLight>.Color_paramName : string

<max_OmniLight>.Multiplier_connected : boolean

<max_OmniLight>.Multiplier_shader : texturemap

<max_OmniLight>.Multiplier_paramName : string

<max_OmniLight>.Contrast_connected : boolean

<max_OmniLight>.Contrast_shader : texturemap

<max_OmniLight>.Contrast_paramName : string

<max_OmniLight>.SoftenDiffuseEdge_connected : boolean

<max_OmniLight>.SoftenDiffuseEdge_shader : texturemap

<max_OmniLight>.SoftenDiffuseEdge_paramName : string

<max_OmniLight>.AffectDiffuse_connected : boolean

<max_OmniLight>.AffectDiffuse_shader : texturemap

<max_OmniLight>.AffectDiffuse_paramName : string

<max_OmniLight>.AffectSpecular_connected : boolean

<max_OmniLight>.AffectSpecular_shader : texturemap

<max_OmniLight>.AffectSpecular_paramName : string

<max_OmniLight>.AmbientOnly_connected : boolean

<max_OmniLight>.AmbientOnly_shader : texturemap

<max_OmniLight>.AmbientOnly_paramName : string

<max_OmniLight>.UseNearAttenuation_connected : boolean

<max_OmniLight>.UseNearAttenuation_shader : texturemap

<max_OmniLight>.UseNearAttenuation_paramName : string

<max_OmniLight>.NearStart_connected : boolean

<max_OmniLight>.NearStart_shader : texturemap

<max_OmniLight>.NearStart_paramName : string

<max_OmniLight>.NearEnd_connected : boolean

<max_OmniLight>.NearEnd_shader : texturemap

<max_OmniLight>.NearEnd_paramName : string

<max_OmniLight>.UseFarAttenuation_connected : boolean

<max_OmniLight>.UseFarAttenuation_shader : texturemap

<max_OmniLight>.UseFarAttenuation_paramName : string

<max_OmniLight>.FarStart_connected : boolean

<max_OmniLight>.FarStart_shader : texturemap

<max_OmniLight>.FarStart_paramName : string

<max_OmniLight>.FarEnd_connected : boolean

<max_OmniLight>.FarEnd_shader : texturemap

<max_OmniLight>.FarEnd_paramName : string

<max_OmniLight>.Decay_connected : boolean

<max_OmniLight>.Decay_shader : texturemap

<max_OmniLight>.Decay_paramName : string

<max_OmniLight>.DecayRadius_connected : boolean

<max_OmniLight>.DecayRadius_shader : texturemap

<max_OmniLight>.DecayRadius_paramName : string

<max_OmniLight>.CastShadows_connected : boolean

<max_OmniLight>.CastShadows_shader : texturemap

<max_OmniLight>.CastShadows_paramName : string

<max_OmniLight>.ShadowColor_connected : boolean

<max_OmniLight>.ShadowColor_shader : texturemap

<max_OmniLight>.ShadowColor_paramName : string

<max_OmniLight>.ShadowDensity_connected : boolean

<max_OmniLight>.ShadowDensity_shader : texturemap

<max_OmniLight>.ShadowDensity_paramName : string

<max_OmniLight>.ShadowAffected_connected : boolean

<max_OmniLight>.ShadowAffected_shader : texturemap

<max_OmniLight>.ShadowAffected_paramName : string

<max_OmniLight>.UseShadowProjector_connected : boolean

<max_OmniLight>.UseShadowProjector_shader : texturemap

<max_OmniLight>.UseShadowProjector_paramName : string

<max_OmniLight>.UseProjector_connected : boolean

<max_OmniLight>.UseProjector_shader : texturemap

<max_OmniLight>.UseProjector_paramName : string

<max_OmniLight>.AtmospheresCastShadows_connected : boolean

<max_OmniLight>.AtmospheresCastShadows_shader : texturemap

<max_OmniLight>.AtmospheresCastShadows_paramName : string

<max_OmniLight>.ShadowOpacity_connected : boolean

<max_OmniLight>.ShadowOpacity_shader : texturemap

<max_OmniLight>.ShadowOpacity_paramName : string

<max_OmniLight>.ShadowAmount_connected : boolean

<max_OmniLight>.ShadowAmount_shader : texturemap

<max_OmniLight>.ShadowAmount_paramName : string

<max_OmniLight>.TheList : maxObject array

<max_OmniLight>.Shader_Version : integer

max_OmniLight interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_ParticleData : textureMap

max_ParticleData : textureMap {7773161f,75044623}

Constructor:

max_ParticleData: class instances not creatable by MAXScript

Properties:

<max_ParticleData>.numParticles : integer

<max_ParticleData>.particleAge : int array

<max_ParticleData>.particleLife : int array

<max_ParticleData>.particleSize : float array

<max_ParticleData>.particlePosition : point3 array

<max_ParticleData>.particleVelocity : point3 array

<max_ParticleData>.particleCenter : int array

<max_ParticleData>.numParticles_connected : boolean

<max_ParticleData>.numParticles_shader : texturemap

<max_ParticleData>.numParticles_paramName : string

<max_ParticleData>.TheList : maxObject array

<max_ParticleData>.Shader_Version : integer

max_ParticleData interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_PhotometricPointLight : textureMap

max_PhotometricPointLight : textureMap {7773161f,590a518a}

Constructor:

max_PhotometricPointLight: class instances not creatable by MAXScript

Properties:

<max_PhotometricPointLight>.on : boolean

<max_PhotometricPointLight>.shadowOn : boolean

<max_PhotometricPointLight>.distribution : integer

<max_PhotometricPointLight>.lightColor : fRGBA color

<max_PhotometricPointLight>.filterColor : fRGBA color

<max_PhotometricPointLight>.intensity : float

<max_PhotometricPointLight>.cutoff_start_farattenuation : float

<max_PhotometricPointLight>.cutoff_end_farattenuation : float

<max_PhotometricPointLight>.shadowCol : fRGBA color

<max_PhotometricPointLight>.shadowDensity : float

<max_PhotometricPointLight>.useShadowColMap : boolean

<max_PhotometricPointLight>.shadowColMap : texturemap

<max_PhotometricPointLight>.lightAffectShadowCol : boolean

<max_PhotometricPointLight>.atmosShadowOn : boolean

<max_PhotometricPointLight>.atmosShadowOpacity : float

<max_PhotometricPointLight>.atmosShadowColAmnt : float

<max_PhotometricPointLight>.contrast : float

<max_PhotometricPointLight>.softDiffEdges : float

<max_PhotometricPointLight>.diffuse : boolean

<max_PhotometricPointLight>.specular : boolean

<max_PhotometricPointLight>.ambientOnly : boolean

<max_PhotometricPointLight>.projMapOn : boolean

<max_PhotometricPointLight>.projMap : texturemap

<max_PhotometricPointLight>.traceTransparent : integer

<max_PhotometricPointLight>.visibleBrightness : float

<max_PhotometricPointLight>.hotSpot : float

<max_PhotometricPointLight>.fallOff : float

<max_PhotometricPointLight>.lightProfile : string

<max_PhotometricPointLight>.webTransform : matrix3

<max_PhotometricPointLight>.physicalScale : float

<max_PhotometricPointLight>.meterScale : float

<max_PhotometricPointLight>.webHasSymmetry : boolean

<max_PhotometricPointLight>.exclusionList : boolean array

<max_PhotometricPointLight>.on_connected : boolean

<max_PhotometricPointLight>.on_shader : texturemap

<max_PhotometricPointLight>.on_paramName : string

<max_PhotometricPointLight>.shadowOn_connected : boolean

<max_PhotometricPointLight>.shadowOn_shader : texturemap

<max_PhotometricPointLight>.shadowOn_paramName : string

<max_PhotometricPointLight>.distribution_connected : boolean

<max_PhotometricPointLight>.distribution_shader : texturemap

<max_PhotometricPointLight>.distribution_paramName : string

<max_PhotometricPointLight>.lightColor_connected : boolean

<max_PhotometricPointLight>.lightColor_shader : texturemap

<max_PhotometricPointLight>.lightColor_paramName : string

<max_PhotometricPointLight>.filterColor_connected : boolean

<max_PhotometricPointLight>.filterColor_shader : texturemap

<max_PhotometricPointLight>.filterColor_paramName : string

<max_PhotometricPointLight>.intensity_connected : boolean

<max_PhotometricPointLight>.intensity_shader : texturemap

<max_PhotometricPointLight>.intensity_paramName : string

<max_PhotometricPointLight>.cutoff_start_farattenuation_connected : boolean

<max_PhotometricPointLight>.cutoff_start_farattenuation_shader : texturemap

<max_PhotometricPointLight>.cutoff_start_farattenuation_paramName : string

<max_PhotometricPointLight>.cutoff_end_farattenuation_connected : boolean

<max_PhotometricPointLight>.cutoff_end_farattenuation_shader : texturemap

<max_PhotometricPointLight>.cutoff_end_farattenuation_paramName : string

<max_PhotometricPointLight>.shadowCol_connected : boolean

<max_PhotometricPointLight>.shadowCol_shader : texturemap

<max_PhotometricPointLight>.shadowCol_paramName : string

<max_PhotometricPointLight>.shadowDensity_connected : boolean

<max_PhotometricPointLight>.shadowDensity_shader : texturemap

<max_PhotometricPointLight>.shadowDensity_paramName : string

<max_PhotometricPointLight>.useShadowColMap_connected : boolean

<max_PhotometricPointLight>.useShadowColMap_shader : texturemap

<max_PhotometricPointLight>.useShadowColMap_paramName : string

<max_PhotometricPointLight>.lightAffectShadowCol_connected : boolean

<max_PhotometricPointLight>.lightAffectShadowCol_shader : texturemap

<max_PhotometricPointLight>.lightAffectShadowCol_paramName : string

<max_PhotometricPointLight>.atmosShadowOn_connected : boolean

<max_PhotometricPointLight>.atmosShadowOn_shader : texturemap

<max_PhotometricPointLight>.atmosShadowOn_paramName : string

<max_PhotometricPointLight>.atmosShadowOpacity_connected : boolean

<max_PhotometricPointLight>.atmosShadowOpacity_shader : texturemap

<max_PhotometricPointLight>.atmosShadowOpacity_paramName : string

<max_PhotometricPointLight>.atmosShadowColAmnt_connected : boolean

<max_PhotometricPointLight>.atmosShadowColAmnt_shader : texturemap

<max_PhotometricPointLight>.atmosShadowColAmnt_paramName : string

<max_PhotometricPointLight>.contrast_connected : boolean

<max_PhotometricPointLight>.contrast_shader : texturemap

<max_PhotometricPointLight>.contrast_paramName : string

<max_PhotometricPointLight>.softDiffEdges_connected : boolean

<max_PhotometricPointLight>.softDiffEdges_shader : texturemap

<max_PhotometricPointLight>.softDiffEdges_paramName : string

<max_PhotometricPointLight>.diffuse_connected : boolean

<max_PhotometricPointLight>.diffuse_shader : texturemap

<max_PhotometricPointLight>.diffuse_paramName : string

<max_PhotometricPointLight>.specular_connected : boolean

<max_PhotometricPointLight>.specular_shader : texturemap

<max_PhotometricPointLight>.specular_paramName : string

<max_PhotometricPointLight>.ambientOnly_connected : boolean

<max_PhotometricPointLight>.ambientOnly_shader : texturemap

<max_PhotometricPointLight>.ambientOnly_paramName : string

<max_PhotometricPointLight>.projMapOn_connected : boolean

<max_PhotometricPointLight>.projMapOn_shader : texturemap

<max_PhotometricPointLight>.projMapOn_paramName : string

<max_PhotometricPointLight>.hotSpot_connected : boolean

<max_PhotometricPointLight>.hotSpot_shader : texturemap

<max_PhotometricPointLight>.hotSpot_paramName : string

<max_PhotometricPointLight>.fallOff_connected : boolean

<max_PhotometricPointLight>.fallOff_shader : texturemap

<max_PhotometricPointLight>.fallOff_paramName : string

<max_PhotometricPointLight>.webTransform_connected : boolean

<max_PhotometricPointLight>.webTransform_shader : texturemap

<max_PhotometricPointLight>.webTransform_paramName : string

<max_PhotometricPointLight>.physicalScale_connected : boolean

<max_PhotometricPointLight>.physicalScale_shader : texturemap

<max_PhotometricPointLight>.physicalScale_paramName : string

<max_PhotometricPointLight>.meterScale_connected : boolean

<max_PhotometricPointLight>.meterScale_shader : texturemap

<max_PhotometricPointLight>.meterScale_paramName : string

<max_PhotometricPointLight>.webHasSymmetry_connected : boolean

<max_PhotometricPointLight>.webHasSymmetry_shader : texturemap

<max_PhotometricPointLight>.webHasSymmetry_paramName : string

<max_PhotometricPointLight>.TheList : maxObject array

<max_PhotometricPointLight>.Shader_Version : integer

max_PhotometricPointLight interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_PhysicalSun : textureMap

max_PhysicalSun : textureMap {7773161f,8600631a}

Constructor:

max_PhysicalSun: class instances not creatable by MAXScript

Properties:

<max_PhysicalSun>.useLight : boolean

<max_PhysicalSun>.color : fRGBA color

<max_PhysicalSun>.shadow : integer

<max_PhysicalSun>.intensity : float

<max_PhysicalSun>.contrast : float

<max_PhysicalSun>.diffuseSoft : float

<max_PhysicalSun>.shadMult : float

<max_PhysicalSun>.atmosShadows : boolean

<max_PhysicalSun>.atmosOpacity : float

<max_PhysicalSun>.atmosColAmt : float

<max_PhysicalSun>.affectDiffuse : boolean

<max_PhysicalSun>.affectSpecular : boolean

<max_PhysicalSun>.sceneBBox_Min : point3

<max_PhysicalSun>.sceneBBox_Max : point3

<max_PhysicalSun>.exclusionList : boolean array

<max_PhysicalSun>.useLight_connected : boolean

<max_PhysicalSun>.useLight_shader : texturemap

<max_PhysicalSun>.useLight_paramName : string

<max_PhysicalSun>.color_connected : boolean

<max_PhysicalSun>.color_shader : texturemap

<max_PhysicalSun>.color_paramName : string

<max_PhysicalSun>.shadow_connected : boolean

<max_PhysicalSun>.shadow_shader : texturemap

<max_PhysicalSun>.shadow_paramName : string

<max_PhysicalSun>.intensity_connected : boolean

<max_PhysicalSun>.intensity_shader : texturemap

<max_PhysicalSun>.intensity_paramName : string

<max_PhysicalSun>.contrast_connected : boolean

<max_PhysicalSun>.contrast_shader : texturemap

<max_PhysicalSun>.contrast_paramName : string

<max_PhysicalSun>.diffuseSoft_connected : boolean

<max_PhysicalSun>.diffuseSoft_shader : texturemap

<max_PhysicalSun>.diffuseSoft_paramName : string

<max_PhysicalSun>.shadMult_connected : boolean

<max_PhysicalSun>.shadMult_shader : texturemap

<max_PhysicalSun>.shadMult_paramName : string

<max_PhysicalSun>.atmosShadows_connected : boolean

<max_PhysicalSun>.atmosShadows_shader : texturemap

<max_PhysicalSun>.atmosShadows_paramName : string

<max_PhysicalSun>.atmosOpacity_connected : boolean

<max_PhysicalSun>.atmosOpacity_shader : texturemap

<max_PhysicalSun>.atmosOpacity_paramName : string

<max_PhysicalSun>.atmosColAmt_connected : boolean

<max_PhysicalSun>.atmosColAmt_shader : texturemap

<max_PhysicalSun>.atmosColAmt_paramName : string

<max_PhysicalSun>.affectDiffuse_connected : boolean

<max_PhysicalSun>.affectDiffuse_shader : texturemap

<max_PhysicalSun>.affectDiffuse_paramName : string

<max_PhysicalSun>.affectSpecular_connected : boolean

<max_PhysicalSun>.affectSpecular_shader : texturemap

<max_PhysicalSun>.affectSpecular_paramName : string

<max_PhysicalSun>.sceneBBox_Min_connected : boolean

<max_PhysicalSun>.sceneBBox_Min_shader : texturemap

<max_PhysicalSun>.sceneBBox_Min_paramName : string

<max_PhysicalSun>.sceneBBox_Max_connected : boolean

<max_PhysicalSun>.sceneBBox_Max_shader : texturemap

<max_PhysicalSun>.sceneBBox_Max_paramName : string

<max_PhysicalSun>.TheList : maxObject array

<max_PhysicalSun>.Shader_Version : integer

max_PhysicalSun interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_Raytrace : textureMap

max_Raytrace : textureMap {7773161f,9454a560}

Constructor:

max_Raytrace: class instances not creatable by MAXScript

Properties:

<max_Raytrace>.Parameters : paramBlock2

<max_Raytrace>.ExtraParameters : paramBlock2

<max_Raytrace>.raytraceON : boolean

<max_Raytrace>.atmosphereON : boolean

<max_Raytrace>.selfreflON : boolean

<max_Raytrace>.matidON : boolean

<max_Raytrace>.traceMode : integer

<max_Raytrace>.bgMode : integer

<max_Raytrace>.bgCol : fRGBA color

<max_Raytrace>.antialiasON : boolean

<max_Raytrace>.antialias_overrideON : boolean

<max_Raytrace>.lAdaptiveON : boolean

<max_Raytrace>.lMinRays : integer

<max_Raytrace>.lMaxRays : integer

<max_Raytrace>.lThreshold : float

<max_Raytrace>.lBlur : float

<max_Raytrace>.lBlurAsp : float

<max_Raytrace>.lDefocus : float

<max_Raytrace>.lDefocusAsp : float

<max_Raytrace>.blurmapON : boolean

<max_Raytrace>.defocusmapON : boolean

<max_Raytrace>.attenMode : integer

<max_Raytrace>.attenStart : float

<max_Raytrace>.attenEnd : float

<max_Raytrace>.attenExp : float

<max_Raytrace>.attenNear : float

<max_Raytrace>.attenCtrl1 : float

<max_Raytrace>.attenCtrl2 : float

<max_Raytrace>.attenFar : float

<max_Raytrace>.attencolorMode : integer

<max_Raytrace>.attenCol : fRGBA color

<max_Raytrace>.reflmapON : boolean

<max_Raytrace>.reflmapAmt : float

<max_Raytrace>.tintON : boolean

<max_Raytrace>.tintAmt : float

<max_Raytrace>.tintCol : fRGBA color

<max_Raytrace>.tintmapON : boolean

<max_Raytrace>.tint_map_amt : float

<max_Raytrace>.bump_mult : float

<max_Raytrace>.coldensityON : boolean

<max_Raytrace>.coldensityStart : float

<max_Raytrace>.coldensityEnd : float

<max_Raytrace>.coldensityAmt : float

<max_Raytrace>.coldensityCol : fRGBA color

<max_Raytrace>.coldensitymapON : boolean

<max_Raytrace>.colden_map_amt : float

<max_Raytrace>.fogON : boolean

<max_Raytrace>.fogStart : float

<max_Raytrace>.fodEnd : float

<max_Raytrace>.fodAmt : float

<max_Raytrace>.fogCol : fRGBA color

<max_Raytrace>.fogmapON : boolean

<max_Raytrace>.fog_map_amt : float

<max_Raytrace>.objinglassON : boolean

<max_Raytrace>.atmosinglassON : boolean

<max_Raytrace>.fresnel_on : boolean

<max_Raytrace>.bgMap : texturemap

<max_Raytrace>.blurMap : texturemap

<max_Raytrace>.defocusMap : texturemap

<max_Raytrace>.reflMap : texturemap

<max_Raytrace>.tintMap : texturemap

<max_Raytrace>.coldensityMap : texturemap

<max_Raytrace>.fogMap : texturemap

<max_Raytrace>.isIncludeList : boolean

<max_Raytrace>.exclList : string array

<max_Raytrace>.GBufferID : integer

<max_Raytrace>.Connection_struct__0000__Parameters : paramBlock2

<max_Raytrace>.Connection_struct__0001__ExtraParameters : paramBlock2

<max_Raytrace>.raytraceON_connected : boolean

<max_Raytrace>.raytraceON_shader : texturemap

<max_Raytrace>.raytraceON_paramName : string

<max_Raytrace>.atmosphereON_connected : boolean

<max_Raytrace>.atmosphereON_shader : texturemap

<max_Raytrace>.atmosphereON_paramName : string

<max_Raytrace>.selfreflON_connected : boolean

<max_Raytrace>.selfreflON_shader : texturemap

<max_Raytrace>.selfreflON_paramName : string

<max_Raytrace>.matidON_connected : boolean

<max_Raytrace>.matidON_shader : texturemap

<max_Raytrace>.matidON_paramName : string

<max_Raytrace>.traceMode_connected : boolean

<max_Raytrace>.traceMode_shader : texturemap

<max_Raytrace>.traceMode_paramName : string

<max_Raytrace>.bgMode_connected : boolean

<max_Raytrace>.bgMode_shader : texturemap

<max_Raytrace>.bgMode_paramName : string

<max_Raytrace>.bgCol_connected : boolean

<max_Raytrace>.bgCol_shader : texturemap

<max_Raytrace>.bgCol_paramName : string

<max_Raytrace>.antialiasON_connected : boolean

<max_Raytrace>.antialiasON_shader : texturemap

<max_Raytrace>.antialiasON_paramName : string

<max_Raytrace>.antialias_overrideON_connected : boolean

<max_Raytrace>.antialias_overrideON_shader : texturemap

<max_Raytrace>.antialias_overrideON_paramName : string

<max_Raytrace>.lAdaptiveON_connected : boolean

<max_Raytrace>.lAdaptiveON_shader : texturemap

<max_Raytrace>.lAdaptiveON_paramName : string

<max_Raytrace>.lMinRays_connected : boolean

<max_Raytrace>.lMinRays_shader : texturemap

<max_Raytrace>.lMinRays_paramName : string

<max_Raytrace>.lMaxRays_connected : boolean

<max_Raytrace>.lMaxRays_shader : texturemap

<max_Raytrace>.lMaxRays_paramName : string

<max_Raytrace>.lThreshold_connected : boolean

<max_Raytrace>.lThreshold_shader : texturemap

<max_Raytrace>.lThreshold_paramName : string

<max_Raytrace>.lBlur_connected : boolean

<max_Raytrace>.lBlur_shader : texturemap

<max_Raytrace>.lBlur_paramName : string

<max_Raytrace>.lBlurAsp_connected : boolean

<max_Raytrace>.lBlurAsp_shader : texturemap

<max_Raytrace>.lBlurAsp_paramName : string

<max_Raytrace>.lDefocus_connected : boolean

<max_Raytrace>.lDefocus_shader : texturemap

<max_Raytrace>.lDefocus_paramName : string

<max_Raytrace>.lDefocusAsp_connected : boolean

<max_Raytrace>.lDefocusAsp_shader : texturemap

<max_Raytrace>.lDefocusAsp_paramName : string

<max_Raytrace>.blurmapON_connected : boolean

<max_Raytrace>.blurmapON_shader : texturemap

<max_Raytrace>.blurmapON_paramName : string

<max_Raytrace>.defocusmapON_connected : boolean

<max_Raytrace>.defocusmapON_shader : texturemap

<max_Raytrace>.defocusmapON_paramName : string

<max_Raytrace>.attenMode_connected : boolean

<max_Raytrace>.attenMode_shader : texturemap

<max_Raytrace>.attenMode_paramName : string

<max_Raytrace>.attenStart_connected : boolean

<max_Raytrace>.attenStart_shader : texturemap

<max_Raytrace>.attenStart_paramName : string

<max_Raytrace>.attenEnd_connected : boolean

<max_Raytrace>.attenEnd_shader : texturemap

<max_Raytrace>.attenEnd_paramName : string

<max_Raytrace>.attenExp_connected : boolean

<max_Raytrace>.attenExp_shader : texturemap

<max_Raytrace>.attenExp_paramName : string

<max_Raytrace>.attenNear_connected : boolean

<max_Raytrace>.attenNear_shader : texturemap

<max_Raytrace>.attenNear_paramName : string

<max_Raytrace>.attenCtrl1_connected : boolean

<max_Raytrace>.attenCtrl1_shader : texturemap

<max_Raytrace>.attenCtrl1_paramName : string

<max_Raytrace>.attenCtrl2_connected : boolean

<max_Raytrace>.attenCtrl2_shader : texturemap

<max_Raytrace>.attenCtrl2_paramName : string

<max_Raytrace>.attenFar_connected : boolean

<max_Raytrace>.attenFar_shader : texturemap

<max_Raytrace>.attenFar_paramName : string

<max_Raytrace>.attencolorMode_connected : boolean

<max_Raytrace>.attencolorMode_shader : texturemap

<max_Raytrace>.attencolorMode_paramName : string

<max_Raytrace>.attenCol_connected : boolean

<max_Raytrace>.attenCol_shader : texturemap

<max_Raytrace>.attenCol_paramName : string

<max_Raytrace>.reflmapON_connected : boolean

<max_Raytrace>.reflmapON_shader : texturemap

<max_Raytrace>.reflmapON_paramName : string

<max_Raytrace>.reflmapAmt_connected : boolean

<max_Raytrace>.reflmapAmt_shader : texturemap

<max_Raytrace>.reflmapAmt_paramName : string

<max_Raytrace>.tintON_connected : boolean

<max_Raytrace>.tintON_shader : texturemap

<max_Raytrace>.tintON_paramName : string

<max_Raytrace>.tintAmt_connected : boolean

<max_Raytrace>.tintAmt_shader : texturemap

<max_Raytrace>.tintAmt_paramName : string

<max_Raytrace>.tintCol_connected : boolean

<max_Raytrace>.tintCol_shader : texturemap

<max_Raytrace>.tintCol_paramName : string

<max_Raytrace>.tintmapON_connected : boolean

<max_Raytrace>.tintmapON_shader : texturemap

<max_Raytrace>.tintmapON_paramName : string

<max_Raytrace>.tint_map_amt_connected : boolean

<max_Raytrace>.tint_map_amt_shader : texturemap

<max_Raytrace>.tint_map_amt_paramName : string

<max_Raytrace>.bump_mult_connected : boolean

<max_Raytrace>.bump_mult_shader : texturemap

<max_Raytrace>.bump_mult_paramName : string

<max_Raytrace>.coldensityON_connected : boolean

<max_Raytrace>.coldensityON_shader : texturemap

<max_Raytrace>.coldensityON_paramName : string

<max_Raytrace>.coldensityStart_connected : boolean

<max_Raytrace>.coldensityStart_shader : texturemap

<max_Raytrace>.coldensityStart_paramName : string

<max_Raytrace>.coldensityEnd_connected : boolean

<max_Raytrace>.coldensityEnd_shader : texturemap

<max_Raytrace>.coldensityEnd_paramName : string

<max_Raytrace>.coldensityAmt_connected : boolean

<max_Raytrace>.coldensityAmt_shader : texturemap

<max_Raytrace>.coldensityAmt_paramName : string

<max_Raytrace>.coldensityCol_connected : boolean

<max_Raytrace>.coldensityCol_shader : texturemap

<max_Raytrace>.coldensityCol_paramName : string

<max_Raytrace>.coldensitymapON_connected : boolean

<max_Raytrace>.coldensitymapON_shader : texturemap

<max_Raytrace>.coldensitymapON_paramName : string

<max_Raytrace>.colden_map_amt_connected : boolean

<max_Raytrace>.colden_map_amt_shader : texturemap

<max_Raytrace>.colden_map_amt_paramName : string

<max_Raytrace>.fogON_connected : boolean

<max_Raytrace>.fogON_shader : texturemap

<max_Raytrace>.fogON_paramName : string

<max_Raytrace>.fogStart_connected : boolean

<max_Raytrace>.fogStart_shader : texturemap

<max_Raytrace>.fogStart_paramName : string

<max_Raytrace>.fodEnd_connected : boolean

<max_Raytrace>.fodEnd_shader : texturemap

<max_Raytrace>.fodEnd_paramName : string

<max_Raytrace>.fodAmt_connected : boolean

<max_Raytrace>.fodAmt_shader : texturemap

<max_Raytrace>.fodAmt_paramName : string

<max_Raytrace>.fogCol_connected : boolean

<max_Raytrace>.fogCol_shader : texturemap

<max_Raytrace>.fogCol_paramName : string

<max_Raytrace>.fogmapON_connected : boolean

<max_Raytrace>.fogmapON_shader : texturemap

<max_Raytrace>.fogmapON_paramName : string

<max_Raytrace>.fog_map_amt_connected : boolean

<max_Raytrace>.fog_map_amt_shader : texturemap

<max_Raytrace>.fog_map_amt_paramName : string

<max_Raytrace>.objinglassON_connected : boolean

<max_Raytrace>.objinglassON_shader : texturemap

<max_Raytrace>.objinglassON_paramName : string

<max_Raytrace>.atmosinglassON_connected : boolean

<max_Raytrace>.atmosinglassON_shader : texturemap

<max_Raytrace>.atmosinglassON_paramName : string

<max_Raytrace>.fresnel_on_connected : boolean

<max_Raytrace>.fresnel_on_shader : texturemap

<max_Raytrace>.fresnel_on_paramName : string

<max_Raytrace>.isIncludeList_connected : boolean

<max_Raytrace>.isIncludeList_shader : texturemap

<max_Raytrace>.isIncludeList_paramName : string

<max_Raytrace>.GBufferID_connected : boolean

<max_Raytrace>.GBufferID_shader : texturemap

<max_Raytrace>.GBufferID_paramName : string

<max_Raytrace>.TheList : maxObject array

<max_Raytrace>.Shader_Version : integer

max_Raytrace interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_RaytraceMaterial : textureMap

max_RaytraceMaterial : textureMap {7773161f,8d69ad85}

Constructor:

max_RaytraceMaterial: class instances not creatable by MAXScript

Properties:

<max_RaytraceMaterial>.Parameters : paramBlock2

<max_RaytraceMaterial>.ExtendedParameters : paramBlock2

<max_RaytraceMaterial>.RaytracingControls : paramBlock2

<max_RaytraceMaterial>.Maps : paramBlock2

<max_RaytraceMaterial>.ExtraParameters : paramBlock2

<max_RaytraceMaterial>.TwoSided : boolean

<max_RaytraceMaterial>.FaceMap : boolean

<max_RaytraceMaterial>.Wire : boolean

<max_RaytraceMaterial>.Faceted : boolean

<max_RaytraceMaterial>.Ambient : fRGBA color

<max_RaytraceMaterial>.AmbientAmount : float

<max_RaytraceMaterial>.AmbientOn : boolean

<max_RaytraceMaterial>.Diffuse : fRGBA color

<max_RaytraceMaterial>.Reflect : fRGBA color

<max_RaytraceMaterial>.ReflectAmount : float

<max_RaytraceMaterial>.ReflectColorMode : integer

<max_RaytraceMaterial>.Luminosity : fRGBA color

<max_RaytraceMaterial>.LuminosityAmount : float

<max_RaytraceMaterial>.LuminosityOn : boolean

<max_RaytraceMaterial>.Transparency : fRGBA color

<max_RaytraceMaterial>.TransparencyAmount : float

<max_RaytraceMaterial>.TransparencyOn : boolean

<max_RaytraceMaterial>.IndexOfRefraction : float

<max_RaytraceMaterial>.Specular : fRGBA color

<max_RaytraceMaterial>.Shininess : float

<max_RaytraceMaterial>.ShininessStrength : float

<max_RaytraceMaterial>.Soften : float

<max_RaytraceMaterial>.Anisotropy : float

<max_RaytraceMaterial>.AnisotropyOrientation : float

<max_RaytraceMaterial>.FilterDensityColor : fRGBA color

<max_RaytraceMaterial>.addReflType : integer

<max_RaytraceMaterial>.ReflectionGain : float

<max_RaytraceMaterial>.env_map_locks_on : boolean

<max_RaytraceMaterial>.coldensityON : boolean

<max_RaytraceMaterial>.coldensityStart : float

<max_RaytraceMaterial>.coldensityEnd : float

<max_RaytraceMaterial>.coldensityAmt : float

<max_RaytraceMaterial>.attencolorMode : integer

<max_RaytraceMaterial>.attenCol : fRGBA color

<max_RaytraceMaterial>.rl_attenMode : integer

<max_RaytraceMaterial>.rr_attenMode : integer

<max_RaytraceMaterial>.attenStart : float

<max_RaytraceMaterial>.rl_attenEnd : float

<max_RaytraceMaterial>.rr_attenEnd : float

<max_RaytraceMaterial>.attenExp : float

<max_RaytraceMaterial>.attenNear : float

<max_RaytraceMaterial>.attenCtrl1 : float

<max_RaytraceMaterial>.attenCtrl2 : float

<max_RaytraceMaterial>.attenFar : float

<max_RaytraceMaterial>.ExtraLighting : fRGBA color

<max_RaytraceMaterial>.Translucency : fRGBA color

<max_RaytraceMaterial>.Fluorescence : fRGBA color

<max_RaytraceMaterial>.FluorescenceBias : float

<max_RaytraceMaterial>.WireSize : float

<max_RaytraceMaterial>.WireUnits : integer

<max_RaytraceMaterial>.FogColor : fRGBA color

<max_RaytraceMaterial>.FogOn : boolean

<max_RaytraceMaterial>.FogStart : float

<max_RaytraceMaterial>.FogEnd : float

<max_RaytraceMaterial>.FogAmount : float

<max_RaytraceMaterial>.RaytraceReflections : boolean

<max_RaytraceMaterial>.RaytraceRefractions : boolean

<max_RaytraceMaterial>.selfReflectRefract : boolean

<max_RaytraceMaterial>.isIncludeList : boolean

<max_RaytraceMaterial>.exclList : string array

<max_RaytraceMaterial>.MapEnables : boolean array

<max_RaytraceMaterial>.MapEnables_Padding : integer

<max_RaytraceMaterial>.Maps : texturemap array

<max_RaytraceMaterial>.Maps_Padding : integer

<max_RaytraceMaterial>.MapAmounts : float array

<max_RaytraceMaterial>.MapAmounts_Padding : integer

<max_RaytraceMaterial>.GBufferID : integer

<max_RaytraceMaterial>.ShadingMode : integer

<max_RaytraceMaterial>.atmosphereOn : boolean

<max_RaytraceMaterial>.atmosInGlass : boolean

<max_RaytraceMaterial>.Connection_struct__0000__Parameters : paramBlock2

<max_RaytraceMaterial>.Connection_struct__0001__ExtendedParameters : paramBlock2

<max_RaytraceMaterial>.Connection_struct__0002__RaytracingControls : paramBlock2

<max_RaytraceMaterial>.Connection_struct__0003__Maps : paramBlock2

<max_RaytraceMaterial>.Connection_struct__0004__ExtraParameters : paramBlock2

<max_RaytraceMaterial>.TwoSided_connected : boolean

<max_RaytraceMaterial>.TwoSided_shader : texturemap

<max_RaytraceMaterial>.TwoSided_paramName : string

<max_RaytraceMaterial>.FaceMap_connected : boolean

<max_RaytraceMaterial>.FaceMap_shader : texturemap

<max_RaytraceMaterial>.FaceMap_paramName : string

<max_RaytraceMaterial>.Wire_connected : boolean

<max_RaytraceMaterial>.Wire_shader : texturemap

<max_RaytraceMaterial>.Wire_paramName : string

<max_RaytraceMaterial>.Faceted_connected : boolean

<max_RaytraceMaterial>.Faceted_shader : texturemap

<max_RaytraceMaterial>.Faceted_paramName : string

<max_RaytraceMaterial>.Ambient_connected : boolean

<max_RaytraceMaterial>.Ambient_shader : texturemap

<max_RaytraceMaterial>.Ambient_paramName : string

<max_RaytraceMaterial>.AmbientAmount_connected : boolean

<max_RaytraceMaterial>.AmbientAmount_shader : texturemap

<max_RaytraceMaterial>.AmbientAmount_paramName : string

<max_RaytraceMaterial>.AmbientOn_connected : boolean

<max_RaytraceMaterial>.AmbientOn_shader : texturemap

<max_RaytraceMaterial>.AmbientOn_paramName : string

<max_RaytraceMaterial>.Diffuse_connected : boolean

<max_RaytraceMaterial>.Diffuse_shader : texturemap

<max_RaytraceMaterial>.Diffuse_paramName : string

<max_RaytraceMaterial>.Reflect_connected : boolean

<max_RaytraceMaterial>.Reflect_shader : texturemap

<max_RaytraceMaterial>.Reflect_paramName : string

<max_RaytraceMaterial>.ReflectAmount_connected : boolean

<max_RaytraceMaterial>.ReflectAmount_shader : texturemap

<max_RaytraceMaterial>.ReflectAmount_paramName : string

<max_RaytraceMaterial>.ReflectColorMode_connected : boolean

<max_RaytraceMaterial>.ReflectColorMode_shader : texturemap

<max_RaytraceMaterial>.ReflectColorMode_paramName : string

<max_RaytraceMaterial>.Luminosity_connected : boolean

<max_RaytraceMaterial>.Luminosity_shader : texturemap

<max_RaytraceMaterial>.Luminosity_paramName : string

<max_RaytraceMaterial>.LuminosityAmount_connected : boolean

<max_RaytraceMaterial>.LuminosityAmount_shader : texturemap

<max_RaytraceMaterial>.LuminosityAmount_paramName : string

<max_RaytraceMaterial>.LuminosityOn_connected : boolean

<max_RaytraceMaterial>.LuminosityOn_shader : texturemap

<max_RaytraceMaterial>.LuminosityOn_paramName : string

<max_RaytraceMaterial>.Transparency_connected : boolean

<max_RaytraceMaterial>.Transparency_shader : texturemap

<max_RaytraceMaterial>.Transparency_paramName : string

<max_RaytraceMaterial>.TransparencyAmount_connected : boolean

<max_RaytraceMaterial>.TransparencyAmount_shader : texturemap

<max_RaytraceMaterial>.TransparencyAmount_paramName : string

<max_RaytraceMaterial>.TransparencyOn_connected : boolean

<max_RaytraceMaterial>.TransparencyOn_shader : texturemap

<max_RaytraceMaterial>.TransparencyOn_paramName : string

<max_RaytraceMaterial>.IndexOfRefraction_connected : boolean

<max_RaytraceMaterial>.IndexOfRefraction_shader : texturemap

<max_RaytraceMaterial>.IndexOfRefraction_paramName : string

<max_RaytraceMaterial>.Specular_connected : boolean

<max_RaytraceMaterial>.Specular_shader : texturemap

<max_RaytraceMaterial>.Specular_paramName : string

<max_RaytraceMaterial>.Shininess_connected : boolean

<max_RaytraceMaterial>.Shininess_shader : texturemap

<max_RaytraceMaterial>.Shininess_paramName : string

<max_RaytraceMaterial>.ShininessStrength_connected : boolean

<max_RaytraceMaterial>.ShininessStrength_shader : texturemap

<max_RaytraceMaterial>.ShininessStrength_paramName : string

<max_RaytraceMaterial>.Soften_connected : boolean

<max_RaytraceMaterial>.Soften_shader : texturemap

<max_RaytraceMaterial>.Soften_paramName : string

<max_RaytraceMaterial>.Anisotropy_connected : boolean

<max_RaytraceMaterial>.Anisotropy_shader : texturemap

<max_RaytraceMaterial>.Anisotropy_paramName : string

<max_RaytraceMaterial>.AnisotropyOrientation_connected : boolean

<max_RaytraceMaterial>.AnisotropyOrientation_shader : texturemap

<max_RaytraceMaterial>.AnisotropyOrientation_paramName : string

<max_RaytraceMaterial>.FilterDensityColor_connected : boolean

<max_RaytraceMaterial>.FilterDensityColor_shader : texturemap

<max_RaytraceMaterial>.FilterDensityColor_paramName : string

<max_RaytraceMaterial>.addReflType_connected : boolean

<max_RaytraceMaterial>.addReflType_shader : texturemap

<max_RaytraceMaterial>.addReflType_paramName : string

<max_RaytraceMaterial>.ReflectionGain_connected : boolean

<max_RaytraceMaterial>.ReflectionGain_shader : texturemap

<max_RaytraceMaterial>.ReflectionGain_paramName : string

<max_RaytraceMaterial>.env_map_locks_on_connected : boolean

<max_RaytraceMaterial>.env_map_locks_on_shader : texturemap

<max_RaytraceMaterial>.env_map_locks_on_paramName : string

<max_RaytraceMaterial>.coldensityON_connected : boolean

<max_RaytraceMaterial>.coldensityON_shader : texturemap

<max_RaytraceMaterial>.coldensityON_paramName : string

<max_RaytraceMaterial>.coldensityStart_connected : boolean

<max_RaytraceMaterial>.coldensityStart_shader : texturemap

<max_RaytraceMaterial>.coldensityStart_paramName : string

<max_RaytraceMaterial>.coldensityEnd_connected : boolean

<max_RaytraceMaterial>.coldensityEnd_shader : texturemap

<max_RaytraceMaterial>.coldensityEnd_paramName : string

<max_RaytraceMaterial>.coldensityAmt_connected : boolean

<max_RaytraceMaterial>.coldensityAmt_shader : texturemap

<max_RaytraceMaterial>.coldensityAmt_paramName : string

<max_RaytraceMaterial>.attencolorMode_connected : boolean

<max_RaytraceMaterial>.attencolorMode_shader : texturemap

<max_RaytraceMaterial>.attencolorMode_paramName : string

<max_RaytraceMaterial>.attenCol_connected : boolean

<max_RaytraceMaterial>.attenCol_shader : texturemap

<max_RaytraceMaterial>.attenCol_paramName : string

<max_RaytraceMaterial>.rl_attenMode_connected : boolean

<max_RaytraceMaterial>.rl_attenMode_shader : texturemap

<max_RaytraceMaterial>.rl_attenMode_paramName : string

<max_RaytraceMaterial>.rr_attenMode_connected : boolean

<max_RaytraceMaterial>.rr_attenMode_shader : texturemap

<max_RaytraceMaterial>.rr_attenMode_paramName : string

<max_RaytraceMaterial>.attenStart_connected : boolean

<max_RaytraceMaterial>.attenStart_shader : texturemap

<max_RaytraceMaterial>.attenStart_paramName : string

<max_RaytraceMaterial>.rl_attenEnd_connected : boolean

<max_RaytraceMaterial>.rl_attenEnd_shader : texturemap

<max_RaytraceMaterial>.rl_attenEnd_paramName : string

<max_RaytraceMaterial>.rr_attenEnd_connected : boolean

<max_RaytraceMaterial>.rr_attenEnd_shader : texturemap

<max_RaytraceMaterial>.rr_attenEnd_paramName : string

<max_RaytraceMaterial>.attenExp_connected : boolean

<max_RaytraceMaterial>.attenExp_shader : texturemap

<max_RaytraceMaterial>.attenExp_paramName : string

<max_RaytraceMaterial>.attenNear_connected : boolean

<max_RaytraceMaterial>.attenNear_shader : texturemap

<max_RaytraceMaterial>.attenNear_paramName : string

<max_RaytraceMaterial>.attenCtrl1_connected : boolean

<max_RaytraceMaterial>.attenCtrl1_shader : texturemap

<max_RaytraceMaterial>.attenCtrl1_paramName : string

<max_RaytraceMaterial>.attenCtrl2_connected : boolean

<max_RaytraceMaterial>.attenCtrl2_shader : texturemap

<max_RaytraceMaterial>.attenCtrl2_paramName : string

<max_RaytraceMaterial>.attenFar_connected : boolean

<max_RaytraceMaterial>.attenFar_shader : texturemap

<max_RaytraceMaterial>.attenFar_paramName : string

<max_RaytraceMaterial>.ExtraLighting_connected : boolean

<max_RaytraceMaterial>.ExtraLighting_shader : texturemap

<max_RaytraceMaterial>.ExtraLighting_paramName : string

<max_RaytraceMaterial>.Translucency_connected : boolean

<max_RaytraceMaterial>.Translucency_shader : texturemap

<max_RaytraceMaterial>.Translucency_paramName : string

<max_RaytraceMaterial>.Fluorescence_connected : boolean

<max_RaytraceMaterial>.Fluorescence_shader : texturemap

<max_RaytraceMaterial>.Fluorescence_paramName : string

<max_RaytraceMaterial>.FluorescenceBias_connected : boolean

<max_RaytraceMaterial>.FluorescenceBias_shader : texturemap

<max_RaytraceMaterial>.FluorescenceBias_paramName : string

<max_RaytraceMaterial>.WireSize_connected : boolean

<max_RaytraceMaterial>.WireSize_shader : texturemap

<max_RaytraceMaterial>.WireSize_paramName : string

<max_RaytraceMaterial>.WireUnits_connected : boolean

<max_RaytraceMaterial>.WireUnits_shader : texturemap

<max_RaytraceMaterial>.WireUnits_paramName : string

<max_RaytraceMaterial>.FogColor_connected : boolean

<max_RaytraceMaterial>.FogColor_shader : texturemap

<max_RaytraceMaterial>.FogColor_paramName : string

<max_RaytraceMaterial>.FogOn_connected : boolean

<max_RaytraceMaterial>.FogOn_shader : texturemap

<max_RaytraceMaterial>.FogOn_paramName : string

<max_RaytraceMaterial>.FogStart_connected : boolean

<max_RaytraceMaterial>.FogStart_shader : texturemap

<max_RaytraceMaterial>.FogStart_paramName : string

<max_RaytraceMaterial>.FogEnd_connected : boolean

<max_RaytraceMaterial>.FogEnd_shader : texturemap

<max_RaytraceMaterial>.FogEnd_paramName : string

<max_RaytraceMaterial>.FogAmount_connected : boolean

<max_RaytraceMaterial>.FogAmount_shader : texturemap

<max_RaytraceMaterial>.FogAmount_paramName : string

<max_RaytraceMaterial>.RaytraceReflections_connected : boolean

<max_RaytraceMaterial>.RaytraceReflections_shader : texturemap

<max_RaytraceMaterial>.RaytraceReflections_paramName : string

<max_RaytraceMaterial>.RaytraceRefractions_connected : boolean

<max_RaytraceMaterial>.RaytraceRefractions_shader : texturemap

<max_RaytraceMaterial>.RaytraceRefractions_paramName : string

<max_RaytraceMaterial>.selfReflectRefract_connected : boolean

<max_RaytraceMaterial>.selfReflectRefract_shader : texturemap

<max_RaytraceMaterial>.selfReflectRefract_paramName : string

<max_RaytraceMaterial>.isIncludeList_connected : boolean

<max_RaytraceMaterial>.isIncludeList_shader : texturemap

<max_RaytraceMaterial>.isIncludeList_paramName : string

<max_RaytraceMaterial>.MapEnables_Padding_connected : boolean

<max_RaytraceMaterial>.MapEnables_Padding_shader : texturemap

<max_RaytraceMaterial>.MapEnables_Padding_paramName : string

<max_RaytraceMaterial>.Maps_Padding_connected : boolean

<max_RaytraceMaterial>.Maps_Padding_shader : texturemap

<max_RaytraceMaterial>.Maps_Padding_paramName : string

<max_RaytraceMaterial>.MapAmounts_Padding_connected : boolean

<max_RaytraceMaterial>.MapAmounts_Padding_shader : texturemap

<max_RaytraceMaterial>.MapAmounts_Padding_paramName : string

<max_RaytraceMaterial>.GBufferID_connected : boolean

<max_RaytraceMaterial>.GBufferID_shader : texturemap

<max_RaytraceMaterial>.GBufferID_paramName : string

<max_RaytraceMaterial>.ShadingMode_connected : boolean

<max_RaytraceMaterial>.ShadingMode_shader : texturemap

<max_RaytraceMaterial>.ShadingMode_paramName : string

<max_RaytraceMaterial>.atmosphereOn_connected : boolean

<max_RaytraceMaterial>.atmosphereOn_shader : texturemap

<max_RaytraceMaterial>.atmosphereOn_paramName : string

<max_RaytraceMaterial>.atmosInGlass_connected : boolean

<max_RaytraceMaterial>.atmosInGlass_shader : texturemap

<max_RaytraceMaterial>.atmosInGlass_paramName : string

<max_RaytraceMaterial>.TheList : maxObject array

<max_RaytraceMaterial>.Shader_Version : integer

max_RaytraceMaterial interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_ReflectRefractBakeElement : textureMap

max_ReflectRefractBakeElement : textureMap {7773161f,a96cc139}

Constructor:

max_ReflectRefractBakeElement: class instances not creatable by MAXScript

Properties:

<max_ReflectRefractBakeElement>.applyAtmosphere : boolean

<max_ReflectRefractBakeElement>.applyShadows : boolean

<max_ReflectRefractBakeElement>.applyAtmosphere_connected : boolean

<max_ReflectRefractBakeElement>.applyAtmosphere_shader : texturemap

<max_ReflectRefractBakeElement>.applyAtmosphere_paramName : string

<max_ReflectRefractBakeElement>.applyShadows_connected : boolean

<max_ReflectRefractBakeElement>.applyShadows_shader : texturemap

<max_ReflectRefractBakeElement>.applyShadows_paramName : string

<max_ReflectRefractBakeElement>.TheList : maxObject array

<max_ReflectRefractBakeElement>.Shader_Version : integer

max_ReflectRefractBakeElement interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_RenderElementHandler : textureMap

max_RenderElementHandler : textureMap {7773161f,6b248342}

Constructor:

max_RenderElementHandler: class instances not creatable by MAXScript

Properties:

<max_RenderElementHandler>.renderElementShaders : maxObject array

<max_RenderElementHandler>.renderElementCurrentlyActive : boolean array

<max_RenderElementHandler>.renderElementFBIndices : int array

<max_RenderElementHandler>.renderElementIsUnshadowed : boolean array

<max_RenderElementHandler>.renderElementAtmosphereApplied : boolean array

<max_RenderElementHandler>.renderElementFBTypes : int array

<max_RenderElementHandler>.renderElementRevertsToBeautyPass : boolean array

<max_RenderElementHandler>.TheList : maxObject array

<max_RenderElementHandler>.Shader_Version : integer

max_RenderElementHandler interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_rtt_lens : textureMap

max_rtt_lens : textureMap {7773161f,b954b486}

Constructor:

max_rtt_lens: class instances not creatable by MAXScript

Properties:

<max_rtt_lens>.targetInstance : node

<max_rtt_lens>.mapChannel : integer

<max_rtt_lens>.doProjection : boolean

<max_rtt_lens>.projCageDataTag : maxObject

<max_rtt_lens>.projNoCageRayOffset : float

<max_rtt_lens>.projInstances : node array

<max_rtt_lens>.projIncludeWorkingModel : boolean

<max_rtt_lens>.projSOSelectionDataTag : maxObject

<max_rtt_lens>.projTriSelectionDataTag : maxObject

<max_rtt_lens>.projMissColor : fRGBA color

<max_rtt_lens>.projMatchMtlID : boolean

<max_rtt_lens>.projHitFurthest : boolean

<max_rtt_lens>.projNormalRenderSpace : integer

<max_rtt_lens>.projNormalRender_TangentXLeft : boolean

<max_rtt_lens>.projNormalRender_TangentYDown : boolean

<max_rtt_lens>.projHeightMapMin : float

<max_rtt_lens>.projHeightMapMax : float

<max_rtt_lens>.allTargetInstances : node array

<max_rtt_lens>.allProjInstances : node array

<max_rtt_lens>.mapChannel_connected : boolean

<max_rtt_lens>.mapChannel_shader : texturemap

<max_rtt_lens>.mapChannel_paramName : string

<max_rtt_lens>.doProjection_connected : boolean

<max_rtt_lens>.doProjection_shader : texturemap

<max_rtt_lens>.doProjection_paramName : string

<max_rtt_lens>.projNoCageRayOffset_connected : boolean

<max_rtt_lens>.projNoCageRayOffset_shader : texturemap

<max_rtt_lens>.projNoCageRayOffset_paramName : string

<max_rtt_lens>.projIncludeWorkingModel_connected : boolean

<max_rtt_lens>.projIncludeWorkingModel_shader : texturemap

<max_rtt_lens>.projIncludeWorkingModel_paramName : string

<max_rtt_lens>.projMissColor_connected : boolean

<max_rtt_lens>.projMissColor_shader : texturemap

<max_rtt_lens>.projMissColor_paramName : string

<max_rtt_lens>.projMatchMtlID_connected : boolean

<max_rtt_lens>.projMatchMtlID_shader : texturemap

<max_rtt_lens>.projMatchMtlID_paramName : string

<max_rtt_lens>.projHitFurthest_connected : boolean

<max_rtt_lens>.projHitFurthest_shader : texturemap

<max_rtt_lens>.projHitFurthest_paramName : string

<max_rtt_lens>.projNormalRenderSpace_connected : boolean

<max_rtt_lens>.projNormalRenderSpace_shader : texturemap

<max_rtt_lens>.projNormalRenderSpace_paramName : string

<max_rtt_lens>.projNormalRender_TangentXLeft_connected : boolean

<max_rtt_lens>.projNormalRender_TangentXLeft_shader : texturemap

<max_rtt_lens>.projNormalRender_TangentXLeft_paramName : string

<max_rtt_lens>.projNormalRender_TangentYDown_connected : boolean

<max_rtt_lens>.projNormalRender_TangentYDown_shader : texturemap

<max_rtt_lens>.projNormalRender_TangentYDown_paramName : string

<max_rtt_lens>.projHeightMapMin_connected : boolean

<max_rtt_lens>.projHeightMapMin_shader : texturemap

<max_rtt_lens>.projHeightMapMin_paramName : string

<max_rtt_lens>.projHeightMapMax_connected : boolean

<max_rtt_lens>.projHeightMapMax_shader : texturemap

<max_rtt_lens>.projHeightMapMax_paramName : string

<max_rtt_lens>.TheList : maxObject array

<max_rtt_lens>.Shader_Version : integer

max_rtt_lens interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_rtt_output : textureMap

max_rtt_output : textureMap {7773161f,b66a5818}

Constructor:

max_rtt_output: class instances not creatable by MAXScript

Properties:

<max_rtt_output>.frameBufferIndices : int array

<max_rtt_output>.frameBufferBackgroundColor : fRGBA color array

<max_rtt_output>.TheList : maxObject array

<max_rtt_output>.Shader_Version : integer

max_rtt_output interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_RTTCageData : textureMap

max_RTTCageData : textureMap {7773161f,9e1a6a52}

Constructor:

max_RTTCageData: class instances not creatable by MAXScript

<max_RTTCageData>.vertices : point3 array

<max_RTTCageData>.faces : int array

<max_RTTCageData>.TheList : maxObject array

<max_RTTCageData>.Shader_Version : integer

max_RTTCageData interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_SceneData : textureMap

max_SceneData : textureMap {7773161f,8b6e8a4d}

Constructor:

max_SceneData: class instances not creatable by MAXScript

Properties:

<max_SceneData>.IsMtlEdit : boolean

<max_SceneData>.AmbientLight : fRGBA color

<max_SceneData>.GlobalLightLevel : fRGBA color

<max_SceneData>.ForceDoubleSided : boolean

<max_SceneData>.GammaCorrection : float

<max_SceneData>.NearRange : float

<max_SceneData>.FarRange : float

<max_SceneData>.PhysicalScale : float

<max_SceneData>.PixelAspectRatio : float

<max_SceneData>.ToneOpShader : maxObject

<max_SceneData>.backgroundColor : fRGBA color

<max_SceneData>.doingBakeToTexture : boolean

<max_SceneData>.ToneOpInactive : boolean

<max_SceneData>.InternalToMeterScale : float

<max_SceneData>.IsProtein : boolean

<max_SceneData>.IsYUp : boolean

<max_SceneData>.BlurredReflectionMultiplier : float

<max_SceneData>.BlurredRefractionMultiplier : float

<max_SceneData>.AreaShadowSamples : integer

<max_SceneData>.IsMtlEdit_connected : boolean

<max_SceneData>.IsMtlEdit_shader : texturemap

<max_SceneData>.IsMtlEdit_paramName : string

<max_SceneData>.AmbientLight_connected : boolean

<max_SceneData>.AmbientLight_shader : texturemap

<max_SceneData>.AmbientLight_paramName : string

<max_SceneData>.GlobalLightLevel_connected : boolean

<max_SceneData>.GlobalLightLevel_shader : texturemap

<max_SceneData>.GlobalLightLevel_paramName : string

<max_SceneData>.ForceDoubleSided_connected : boolean

<max_SceneData>.ForceDoubleSided_shader : texturemap

<max_SceneData>.ForceDoubleSided_paramName : string

<max_SceneData>.GammaCorrection_connected : boolean

<max_SceneData>.GammaCorrection_shader : texturemap

<max_SceneData>.GammaCorrection_paramName : string

<max_SceneData>.NearRange_connected : boolean

<max_SceneData>.NearRange_shader : texturemap

<max_SceneData>.NearRange_paramName : string

<max_SceneData>.FarRange_connected : boolean

<max_SceneData>.FarRange_shader : texturemap

<max_SceneData>.FarRange_paramName : string

<max_SceneData>.PhysicalScale_connected : boolean

<max_SceneData>.PhysicalScale_shader : texturemap

<max_SceneData>.PhysicalScale_paramName : string

<max_SceneData>.PixelAspectRatio_connected : boolean

<max_SceneData>.PixelAspectRatio_shader : texturemap

<max_SceneData>.PixelAspectRatio_paramName : string

<max_SceneData>.backgroundColor_connected : boolean

<max_SceneData>.backgroundColor_shader : texturemap

<max_SceneData>.backgroundColor_paramName : string

<max_SceneData>.doingBakeToTexture_connected : boolean

<max_SceneData>.doingBakeToTexture_shader : texturemap

<max_SceneData>.doingBakeToTexture_paramName : string

<max_SceneData>.ToneOpInactive_connected : boolean

<max_SceneData>.ToneOpInactive_shader : texturemap

<max_SceneData>.ToneOpInactive_paramName : string

<max_SceneData>.InternalToMeterScale_connected : boolean

<max_SceneData>.InternalToMeterScale_shader : texturemap

<max_SceneData>.InternalToMeterScale_paramName : string

<max_SceneData>.IsProtein_connected : boolean

<max_SceneData>.IsProtein_shader : texturemap

<max_SceneData>.IsProtein_paramName : string

<max_SceneData>.IsYUp_connected : boolean

<max_SceneData>.IsYUp_shader : texturemap

<max_SceneData>.IsYUp_paramName : string

<max_SceneData>.BlurredReflectionMultiplier_connected : boolean

<max_SceneData>.BlurredReflectionMultiplier_shader : texturemap

<max_SceneData>.BlurredReflectionMultiplier_paramName : string

<max_SceneData>.BlurredRefractionMultiplier_connected : boolean

<max_SceneData>.BlurredRefractionMultiplier_shader : texturemap

<max_SceneData>.BlurredRefractionMultiplier_paramName : string

<max_SceneData>.AreaShadowSamples_connected : boolean

<max_SceneData>.AreaShadowSamples_shader : texturemap

<max_SceneData>.AreaShadowSamples_paramName : string

<max_SceneData>.TheList : maxObject array

<max_SceneData>.Shader_Version : integer

max_SceneData interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_ShaderList : textureMap

max_ShaderList : textureMap {7773161f,9847533b}

Constructor:

max_ShaderList: class instances not creatable by MAXScript

Properties:

<max_ShaderList>.shaderList : texturemap array

<max_ShaderList>.TheList : maxObject array

<max_ShaderList>.Shader_Version : integer

max_ShaderList interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_ShadowBakeElement : textureMap

max_ShadowBakeElement : textureMap {7773161f,9e6dba3e}

Constructor:

max_ShadowBakeElement: class instances not creatable by MAXScript

Properties:

<max_ShadowBakeElement>.applyAtmosphere : boolean

<max_ShadowBakeElement>.applyShadows : boolean

<max_ShadowBakeElement>.applyAtmosphere_connected : boolean

<max_ShadowBakeElement>.applyAtmosphere_shader : texturemap

<max_ShadowBakeElement>.applyAtmosphere_paramName : string

<max_ShadowBakeElement>.applyShadows_connected : boolean

<max_ShadowBakeElement>.applyShadows_shader : texturemap

<max_ShadowBakeElement>.applyShadows_paramName : string

<max_ShadowBakeElement>.TheList : maxObject array

<max_ShadowBakeElement>.Shader_Version : integer

max_ShadowBakeElement interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_ShellacMaterial : textureMap

max_ShellacMaterial : textureMap {7773161f,5269c16d}

Constructor:

max_ShellacMaterial: class instances not creatable by MAXScript

Properties:

<max_ShellacMaterial>.Parameters : paramBlock2

<max_ShellacMaterial>.ExtraParameters : paramBlock2

<max_ShellacMaterial>.ShellacMtl1 : material

<max_ShellacMaterial>.ShellacMtl2 : material

<max_ShellacMaterial>.ShellacColorBlend : float

<max_ShellacMaterial>.GBufferID : integer

<max_ShellacMaterial>.Connection_struct__0000__Parameters : paramBlock2

<max_ShellacMaterial>.Connection_struct__0001__ExtraParameters : paramBlock2

<max_ShellacMaterial>.ShellacColorBlend_connected : boolean

<max_ShellacMaterial>.ShellacColorBlend_shader : texturemap

<max_ShellacMaterial>.ShellacColorBlend_paramName : string

<max_ShellacMaterial>.GBufferID_connected : boolean

<max_ShellacMaterial>.GBufferID_shader : texturemap

<max_ShellacMaterial>.GBufferID_paramName : string

<max_ShellacMaterial>.TheList : maxObject array

<max_ShellacMaterial>.Shader_Version : integer

max_ShellacMaterial interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_ShellacMaterial_Contour : textureMap

max_ShellacMaterial_Contour : textureMap {7773161f,6d5dab89}

Constructor:

max_ShellacMaterial_Contour: class instances not creatable by MAXScript

Properties:

<max_ShellacMaterial_Contour>.Parameters : paramBlock2

<max_ShellacMaterial_Contour>.ShellacMtl1 : material

<max_ShellacMaterial_Contour>.ShellacMtl2 : material

<max_ShellacMaterial_Contour>.ShellacColorBlend : float

<max_ShellacMaterial_Contour>.Connection_struct__0000__Parameters : paramBlock2

<max_ShellacMaterial_Contour>.ShellacColorBlend_connected : boolean

<max_ShellacMaterial_Contour>.ShellacColorBlend_shader : texturemap

<max_ShellacMaterial_Contour>.ShellacColorBlend_paramName : string

<max_ShellacMaterial_Contour>.TheList : maxObject array

<max_ShellacMaterial_Contour>.Shader_Version : integer

max_ShellacMaterial_Contour interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_SpecularBakeElement : textureMap

max_SpecularBakeElement : textureMap {7773161f,8bf8623c}

Constructor:

max_SpecularBakeElement: class instances not creatable by MAXScript

Properties:

<max_SpecularBakeElement>.applyAtmosphere : boolean

<max_SpecularBakeElement>.applyShadows : boolean

<max_SpecularBakeElement>.applyLighting : boolean

<max_SpecularBakeElement>.applyAtmosphere_connected : boolean

<max_SpecularBakeElement>.applyAtmosphere_shader : texturemap

<max_SpecularBakeElement>.applyAtmosphere_paramName : string

<max_SpecularBakeElement>.applyShadows_connected : boolean

<max_SpecularBakeElement>.applyShadows_shader : texturemap

<max_SpecularBakeElement>.applyShadows_paramName : string

<max_SpecularBakeElement>.applyLighting_connected : boolean

<max_SpecularBakeElement>.applyLighting_shader : texturemap

<max_SpecularBakeElement>.applyLighting_paramName : string

<max_SpecularBakeElement>.TheList : maxObject array

<max_SpecularBakeElement>.Shader_Version : integer

max_SpecularBakeElement interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_SpotLight : textureMap

max_SpotLight : textureMap {7773161f,8962bc19}

Constructor:

max_SpotLight: class instances not creatable by MAXScript

Properties:

<max_SpotLight>.GeneralParameters : paramBlock2

<max_SpotLight>.DirectionalParameters : paramBlock2

<max_SpotLight>.AttenuationParameters : paramBlock2

<max_SpotLight>.ShadowParameters : paramBlock2

<max_SpotLight>.ProjectorParameters : paramBlock2

<max_SpotLight>.AtmosphericShadows : paramBlock2

<max_SpotLight>.LightIncludeExclude : paramBlock2

<max_SpotLight>.On : boolean

<max_SpotLight>.Color : fRGBA color

<max_SpotLight>.Multiplier : float

<max_SpotLight>.Contrast : float

<max_SpotLight>.SoftenDiffuseEdge : float

<max_SpotLight>.AffectDiffuse : boolean

<max_SpotLight>.AffectSpecular : boolean

<max_SpotLight>.AmbientOnly : boolean

<max_SpotLight>.HotSpot : float

<max_SpotLight>.Falloff : float

<max_SpotLight>.Overshoot : integer

<max_SpotLight>.Shape : integer

<max_SpotLight>.Aspect : float

<max_SpotLight>.UseNearAttenuation : boolean

<max_SpotLight>.NearStart : float

<max_SpotLight>.NearEnd : float

<max_SpotLight>.UseFarAttenuation : boolean

<max_SpotLight>.FarStart : float

<max_SpotLight>.FarEnd : float

<max_SpotLight>.Decay : integer

<max_SpotLight>.DecayRadius : float

<max_SpotLight>.CastShadows : boolean

<max_SpotLight>.ShadowColor : fRGBA color

<max_SpotLight>.ShadowDensity : float

<max_SpotLight>.ShadowAffected : boolean

<max_SpotLight>.UseShadowProjector : boolean

<max_SpotLight>.ShadowProjector : texturemap

<max_SpotLight>.UseProjector : boolean

<max_SpotLight>.Projector : texturemap

<max_SpotLight>.AtmospheresCastShadows : boolean

<max_SpotLight>.ShadowOpacity : float

<max_SpotLight>.ShadowAmount : float

<max_SpotLight>.exclusionList : boolean array

<max_SpotLight>.Connection_struct__0000__GeneralParameters : paramBlock2

<max_SpotLight>.Connection_struct__0001__DirectionalParameters : paramBlock2

<max_SpotLight>.Connection_struct__0002__AttenuationParameters : paramBlock2

<max_SpotLight>.Connection_struct__0003__ShadowParameters : paramBlock2

<max_SpotLight>.Connection_struct__0004__ProjectorParameters : paramBlock2

<max_SpotLight>.Connection_struct__0005__AtmosphericShadows : paramBlock2

<max_SpotLight>.Connection_struct__0006__LightIncludeExclude : paramBlock2

<max_SpotLight>.On_connected : boolean

<max_SpotLight>.On_shader : texturemap

<max_SpotLight>.On_paramName : string

<max_SpotLight>.Color_connected : boolean

<max_SpotLight>.Color_shader : texturemap

<max_SpotLight>.Color_paramName : string

<max_SpotLight>.Multiplier_connected : boolean

<max_SpotLight>.Multiplier_shader : texturemap

<max_SpotLight>.Multiplier_paramName : string

<max_SpotLight>.Contrast_connected : boolean

<max_SpotLight>.Contrast_shader : texturemap

<max_SpotLight>.Contrast_paramName : string

<max_SpotLight>.SoftenDiffuseEdge_connected : boolean

<max_SpotLight>.SoftenDiffuseEdge_shader : texturemap

<max_SpotLight>.SoftenDiffuseEdge_paramName : string

<max_SpotLight>.AffectDiffuse_connected : boolean

<max_SpotLight>.AffectDiffuse_shader : texturemap

<max_SpotLight>.AffectDiffuse_paramName : string

<max_SpotLight>.AffectSpecular_connected : boolean

<max_SpotLight>.AffectSpecular_shader : texturemap

<max_SpotLight>.AffectSpecular_paramName : string

<max_SpotLight>.AmbientOnly_connected : boolean

<max_SpotLight>.AmbientOnly_shader : texturemap

<max_SpotLight>.AmbientOnly_paramName : string

<max_SpotLight>.HotSpot_connected : boolean

<max_SpotLight>.HotSpot_shader : texturemap

<max_SpotLight>.HotSpot_paramName : string

<max_SpotLight>.Falloff_connected : boolean

<max_SpotLight>.Falloff_shader : texturemap

<max_SpotLight>.Falloff_paramName : string

<max_SpotLight>.Overshoot_connected : boolean

<max_SpotLight>.Overshoot_shader : texturemap

<max_SpotLight>.Overshoot_paramName : string

<max_SpotLight>.Shape_connected : boolean

<max_SpotLight>.Shape_shader : texturemap

<max_SpotLight>.Shape_paramName : string

<max_SpotLight>.Aspect_connected : boolean

<max_SpotLight>.Aspect_shader : texturemap

<max_SpotLight>.Aspect_paramName : string

<max_SpotLight>.UseNearAttenuation_connected : boolean

<max_SpotLight>.UseNearAttenuation_shader : texturemap

<max_SpotLight>.UseNearAttenuation_paramName : string

<max_SpotLight>.NearStart_connected : boolean

<max_SpotLight>.NearStart_shader : texturemap

<max_SpotLight>.NearStart_paramName : string

<max_SpotLight>.NearEnd_connected : boolean

<max_SpotLight>.NearEnd_shader : texturemap

<max_SpotLight>.NearEnd_paramName : string

<max_SpotLight>.UseFarAttenuation_connected : boolean

<max_SpotLight>.UseFarAttenuation_shader : texturemap

<max_SpotLight>.UseFarAttenuation_paramName : string

<max_SpotLight>.FarStart_connected : boolean

<max_SpotLight>.FarStart_shader : texturemap

<max_SpotLight>.FarStart_paramName : string

<max_SpotLight>.FarEnd_connected : boolean

<max_SpotLight>.FarEnd_shader : texturemap

<max_SpotLight>.FarEnd_paramName : string

<max_SpotLight>.Decay_connected : boolean

<max_SpotLight>.Decay_shader : texturemap

<max_SpotLight>.Decay_paramName : string

<max_SpotLight>.DecayRadius_connected : boolean

<max_SpotLight>.DecayRadius_shader : texturemap

<max_SpotLight>.DecayRadius_paramName : string

<max_SpotLight>.CastShadows_connected : boolean

<max_SpotLight>.CastShadows_shader : texturemap

<max_SpotLight>.CastShadows_paramName : string

<max_SpotLight>.ShadowColor_connected : boolean

<max_SpotLight>.ShadowColor_shader : texturemap

<max_SpotLight>.ShadowColor_paramName : string

<max_SpotLight>.ShadowDensity_connected : boolean

<max_SpotLight>.ShadowDensity_shader : texturemap

<max_SpotLight>.ShadowDensity_paramName : string

<max_SpotLight>.ShadowAffected_connected : boolean

<max_SpotLight>.ShadowAffected_shader : texturemap

<max_SpotLight>.ShadowAffected_paramName : string

<max_SpotLight>.UseShadowProjector_connected : boolean

<max_SpotLight>.UseShadowProjector_shader : texturemap

<max_SpotLight>.UseShadowProjector_paramName : string

<max_SpotLight>.UseProjector_connected : boolean

<max_SpotLight>.UseProjector_shader : texturemap

<max_SpotLight>.UseProjector_paramName : string

<max_SpotLight>.AtmospheresCastShadows_connected : boolean

<max_SpotLight>.AtmospheresCastShadows_shader : texturemap

<max_SpotLight>.AtmospheresCastShadows_paramName : string

<max_SpotLight>.ShadowOpacity_connected : boolean

<max_SpotLight>.ShadowOpacity_shader : texturemap

<max_SpotLight>.ShadowOpacity_paramName : string

<max_SpotLight>.ShadowAmount_connected : boolean

<max_SpotLight>.ShadowAmount_shader : texturemap

<max_SpotLight>.ShadowAmount_paramName : string

<max_SpotLight>.TheList : maxObject array

<max_SpotLight>.Shader_Version : integer

max_SpotLight interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_StandardMaterial : textureMap

max_StandardMaterial : textureMap {7773161f,a270c078}

Constructor:

max_StandardMaterial: class instances not creatable by MAXScript

Properties:

<max_StandardMaterial>.ShaderParameters : paramBlock2

<max_StandardMaterial>.ExtendedParameters : paramBlock2

<max_StandardMaterial>.Maps : paramBlock2

<max_StandardMaterial>.DynamicParameters : paramBlock2

<max_StandardMaterial>.ExtraParameters : paramBlock2

<max_StandardMaterial>.Wire : boolean

<max_StandardMaterial>.TwoSided : boolean

<max_StandardMaterial>.FaceMap : boolean

<max_StandardMaterial>.Faceted : boolean

<max_StandardMaterial>.OpacityType : integer

<max_StandardMaterial>.Opacity : float

<max_StandardMaterial>.FilterColor : fRGBA color

<max_StandardMaterial>.FilterMap : texturemap

<max_StandardMaterial>.OpacityFallOffType : integer

<max_StandardMaterial>.OpacityFallOff : float

<max_StandardMaterial>.Ior : float

<max_StandardMaterial>.WireSize : float

<max_StandardMaterial>.WireUnits : integer

<max_StandardMaterial>.ApplyReflectionDimming : boolean

<max_StandardMaterial>.DimLevel : float

<max_StandardMaterial>.ReflectionLevel : float

<max_StandardMaterial>.MapEnables : boolean array

<max_StandardMaterial>.Maps : texturemap array

<max_StandardMaterial>.MapAmounts : float array

<max_StandardMaterial>.ADTextureLock : boolean

<max_StandardMaterial>.Bounce : float

<max_StandardMaterial>.StaticFriction : float

<max_StandardMaterial>.SlidingFriction : float

<max_StandardMaterial>.GBufferID : integer

<max_StandardMaterial>.IlluminationShader : maxObject

<max_StandardMaterial>.Connection_struct__0000__ShaderParameters : paramBlock2

<max_StandardMaterial>.Connection_struct__0001__ExtendedParameters : paramBlock2

<max_StandardMaterial>.Connection_struct__0002__Maps : paramBlock2

<max_StandardMaterial>.Connection_struct__0003__DynamicParameters : paramBlock2

<max_StandardMaterial>.Connection_struct__0004__ExtraParameters : paramBlock2

<max_StandardMaterial>.Wire_connected : boolean

<max_StandardMaterial>.Wire_shader : texturemap

<max_StandardMaterial>.Wire_paramName : string

<max_StandardMaterial>.TwoSided_connected : boolean

<max_StandardMaterial>.TwoSided_shader : texturemap

<max_StandardMaterial>.TwoSided_paramName : string

<max_StandardMaterial>.FaceMap_connected : boolean

<max_StandardMaterial>.FaceMap_shader : texturemap

<max_StandardMaterial>.FaceMap_paramName : string

<max_StandardMaterial>.Faceted_connected : boolean

<max_StandardMaterial>.Faceted_shader : texturemap

<max_StandardMaterial>.Faceted_paramName : string

<max_StandardMaterial>.OpacityType_connected : boolean

<max_StandardMaterial>.OpacityType_shader : texturemap

<max_StandardMaterial>.OpacityType_paramName : string

<max_StandardMaterial>.Opacity_connected : boolean

<max_StandardMaterial>.Opacity_shader : texturemap

<max_StandardMaterial>.Opacity_paramName : string

<max_StandardMaterial>.FilterColor_connected : boolean

<max_StandardMaterial>.FilterColor_shader : texturemap

<max_StandardMaterial>.FilterColor_paramName : string

<max_StandardMaterial>.OpacityFallOffType_connected : boolean

<max_StandardMaterial>.OpacityFallOffType_shader : texturemap

<max_StandardMaterial>.OpacityFallOffType_paramName : string

<max_StandardMaterial>.OpacityFallOff_connected : boolean

<max_StandardMaterial>.OpacityFallOff_shader : texturemap

<max_StandardMaterial>.OpacityFallOff_paramName : string

<max_StandardMaterial>.Ior_connected : boolean

<max_StandardMaterial>.Ior_shader : texturemap

<max_StandardMaterial>.Ior_paramName : string

<max_StandardMaterial>.WireSize_connected : boolean

<max_StandardMaterial>.WireSize_shader : texturemap

<max_StandardMaterial>.WireSize_paramName : string

<max_StandardMaterial>.WireUnits_connected : boolean

<max_StandardMaterial>.WireUnits_shader : texturemap

<max_StandardMaterial>.WireUnits_paramName : string

<max_StandardMaterial>.ApplyReflectionDimming_connected : boolean

<max_StandardMaterial>.ApplyReflectionDimming_shader : texturemap

<max_StandardMaterial>.ApplyReflectionDimming_paramName : string

<max_StandardMaterial>.DimLevel_connected : boolean

<max_StandardMaterial>.DimLevel_shader : texturemap

<max_StandardMaterial>.DimLevel_paramName : string

<max_StandardMaterial>.ReflectionLevel_connected : boolean

<max_StandardMaterial>.ReflectionLevel_shader : texturemap

<max_StandardMaterial>.ReflectionLevel_paramName : string

<max_StandardMaterial>.ADTextureLock_connected : boolean

<max_StandardMaterial>.ADTextureLock_shader : texturemap

<max_StandardMaterial>.ADTextureLock_paramName : string

<max_StandardMaterial>.Bounce_connected : boolean

<max_StandardMaterial>.Bounce_shader : texturemap

<max_StandardMaterial>.Bounce_paramName : string

<max_StandardMaterial>.StaticFriction_connected : boolean

<max_StandardMaterial>.StaticFriction_shader : texturemap

<max_StandardMaterial>.StaticFriction_paramName : string

<max_StandardMaterial>.SlidingFriction_connected : boolean

<max_StandardMaterial>.SlidingFriction_shader : texturemap

<max_StandardMaterial>.SlidingFriction_paramName : string

<max_StandardMaterial>.GBufferID_connected : boolean

<max_StandardMaterial>.GBufferID_shader : texturemap

<max_StandardMaterial>.GBufferID_paramName : string

<max_StandardMaterial>.TheList : maxObject array

<max_StandardMaterial>.Shader_Version : integer

max_StandardMaterial interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_StdRenderElements : textureMap

max_StdRenderElements : textureMap {7773161f,bf6c9f4a}

Constructor:

max_StdRenderElements: class instances not creatable by MAXScript

Properties:

<max_StdRenderElements>.mode : integer

<max_StdRenderElements>.DiffuseParams : paramBlock2

<max_StdRenderElements>.BlendParams : paramBlock2

<max_StdRenderElements>.LightingParams : paramBlock2

<max_StdRenderElements>.ZParams : paramBlock2

<max_StdRenderElements>.MatteParams : paramBlock2

<max_StdRenderElements>.MotionParams : paramBlock2

<max_StdRenderElements>.ObjectIDParams : paramBlock2

<max_StdRenderElements>.LuminanceIlluminanceParams : paramBlock2

<max_StdRenderElements>.LightingAnalysisParams : paramBlock2

<max_StdRenderElements>.lighting : boolean

<max_StdRenderElements>.ambient : boolean

<max_StdRenderElements>.diffuse : boolean

<max_StdRenderElements>.specular : boolean

<max_StdRenderElements>.selfIllum : boolean

<max_StdRenderElements>.reflection : boolean

<max_StdRenderElements>.refraction : boolean

<max_StdRenderElements>.paint : boolean

<max_StdRenderElements>.ink : boolean

<max_StdRenderElements>.directLightOn : boolean

<max_StdRenderElements>.indirectLightOn : boolean

<max_StdRenderElements>.zmin : float

<max_StdRenderElements>.zmax : float

<max_StdRenderElements>.zminUpdate : integer

<max_StdRenderElements>.zmaxUpdate : integer

<max_StdRenderElements>.zminUpdateHi64 : integer

<max_StdRenderElements>.zmaxUpdateHi64 : integer

<max_StdRenderElements>.mtlIDFilterApplied : boolean

<max_StdRenderElements>.mtlID : integer

<max_StdRenderElements>.gbufIDFilterApplied : boolean

<max_StdRenderElements>.gbufID : integer

<max_StdRenderElements>.includeListApplied : boolean

<max_StdRenderElements>.isIncludeList : boolean

<max_StdRenderElements>.exclList : node array

<max_StdRenderElements>.velocityMax : float

<max_StdRenderElements>.velocityUpdate : integer

<max_StdRenderElements>.velocityUpdateHi64 : integer

<max_StdRenderElements>.colorMode : integer

<max_StdRenderElements>.scaleFactorMult : float

<max_StdRenderElements>.scaleToRGB : boolean

<max_StdRenderElements>.scaleFactorMult : float

<max_StdRenderElements>.mode_connected : boolean

<max_StdRenderElements>.mode_shader : texturemap

<max_StdRenderElements>.mode_paramName : string

<max_StdRenderElements>.Connection_struct__0000__DiffuseParams : paramBlock2

<max_StdRenderElements>.Connection_struct__0001__BlendParams : paramBlock2

<max_StdRenderElements>.Connection_struct__0002__LightingParams : paramBlock2

<max_StdRenderElements>.Connection_struct__0003__ZParams : paramBlock2

<max_StdRenderElements>.Connection_struct__0004__MatteParams : paramBlock2

<max_StdRenderElements>.Connection_struct__0005__MotionParams : paramBlock2

<max_StdRenderElements>.Connection_struct__0006__ObjectIDParams : paramBlock2

<max_StdRenderElements>.Connection_struct__0007__LuminanceIlluminanceParams : paramBlock2

<max_StdRenderElements>.Connection_struct__0008__LightingAnalysisParams : paramBlock2

<max_StdRenderElements>.lighting_connected : boolean

<max_StdRenderElements>.lighting_shader : texturemap

<max_StdRenderElements>.lighting_paramName : string

<max_StdRenderElements>.ambient_connected : boolean

<max_StdRenderElements>.ambient_shader : texturemap

<max_StdRenderElements>.ambient_paramName : string

<max_StdRenderElements>.diffuse_connected : boolean

<max_StdRenderElements>.diffuse_shader : texturemap

<max_StdRenderElements>.diffuse_paramName : string

<max_StdRenderElements>.specular_connected : boolean

<max_StdRenderElements>.specular_shader : texturemap

<max_StdRenderElements>.specular_paramName : string

<max_StdRenderElements>.selfIllum_connected : boolean

<max_StdRenderElements>.selfIllum_shader : texturemap

<max_StdRenderElements>.selfIllum_paramName : string

<max_StdRenderElements>.reflection_connected : boolean

<max_StdRenderElements>.reflection_shader : texturemap

<max_StdRenderElements>.reflection_paramName : string

<max_StdRenderElements>.refraction_connected : boolean

<max_StdRenderElements>.refraction_shader : texturemap

<max_StdRenderElements>.refraction_paramName : string

<max_StdRenderElements>.paint_connected : boolean

<max_StdRenderElements>.paint_shader : texturemap

<max_StdRenderElements>.paint_paramName : string

<max_StdRenderElements>.ink_connected : boolean

<max_StdRenderElements>.ink_shader : texturemap

<max_StdRenderElements>.ink_paramName : string

<max_StdRenderElements>.directLightOn_connected : boolean

<max_StdRenderElements>.directLightOn_shader : texturemap

<max_StdRenderElements>.directLightOn_paramName : string

<max_StdRenderElements>.indirectLightOn_connected : boolean

<max_StdRenderElements>.indirectLightOn_shader : texturemap

<max_StdRenderElements>.indirectLightOn_paramName : string

<max_StdRenderElements>.zmin_connected : boolean

<max_StdRenderElements>.zmin_shader : texturemap

<max_StdRenderElements>.zmin_paramName : string

<max_StdRenderElements>.zmax_connected : boolean

<max_StdRenderElements>.zmax_shader : texturemap

<max_StdRenderElements>.zmax_paramName : string

<max_StdRenderElements>.zminUpdate_connected : boolean

<max_StdRenderElements>.zminUpdate_shader : texturemap

<max_StdRenderElements>.zminUpdate_paramName : string

<max_StdRenderElements>.zmaxUpdate_connected : boolean

<max_StdRenderElements>.zmaxUpdate_shader : texturemap

<max_StdRenderElements>.zmaxUpdate_paramName : string

<max_StdRenderElements>.zminUpdateHi64_connected : boolean

<max_StdRenderElements>.zminUpdateHi64_shader : texturemap

<max_StdRenderElements>.zminUpdateHi64_paramName : string

<max_StdRenderElements>.zmaxUpdateHi64_connected : boolean

<max_StdRenderElements>.zmaxUpdateHi64_shader : texturemap

<max_StdRenderElements>.zmaxUpdateHi64_paramName : string

<max_StdRenderElements>.mtlIDFilterApplied_connected : boolean

<max_StdRenderElements>.mtlIDFilterApplied_shader : texturemap

<max_StdRenderElements>.mtlIDFilterApplied_paramName : string

<max_StdRenderElements>.mtlID_connected : boolean

<max_StdRenderElements>.mtlID_shader : texturemap

<max_StdRenderElements>.mtlID_paramName : string

<max_StdRenderElements>.gbufIDFilterApplied_connected : boolean

<max_StdRenderElements>.gbufIDFilterApplied_shader : texturemap

<max_StdRenderElements>.gbufIDFilterApplied_paramName : string

<max_StdRenderElements>.gbufID_connected : boolean

<max_StdRenderElements>.gbufID_shader : texturemap

<max_StdRenderElements>.gbufID_paramName : string

<max_StdRenderElements>.includeListApplied_connected : boolean

<max_StdRenderElements>.includeListApplied_shader : texturemap

<max_StdRenderElements>.includeListApplied_paramName : string

<max_StdRenderElements>.isIncludeList_connected : boolean

<max_StdRenderElements>.isIncludeList_shader : texturemap

<max_StdRenderElements>.isIncludeList_paramName : string

<max_StdRenderElements>.velocityMax_connected : boolean

<max_StdRenderElements>.velocityMax_shader : texturemap

<max_StdRenderElements>.velocityMax_paramName : string

<max_StdRenderElements>.velocityUpdate_connected : boolean

<max_StdRenderElements>.velocityUpdate_shader : texturemap

<max_StdRenderElements>.velocityUpdate_paramName : string

<max_StdRenderElements>.velocityUpdateHi64_connected : boolean

<max_StdRenderElements>.velocityUpdateHi64_shader : texturemap

<max_StdRenderElements>.velocityUpdateHi64_paramName : string

<max_StdRenderElements>.colorMode_connected : boolean

<max_StdRenderElements>.colorMode_shader : texturemap

<max_StdRenderElements>.colorMode_paramName : string

<max_StdRenderElements>.scaleFactorMult_connected : boolean

<max_StdRenderElements>.scaleFactorMult_shader : texturemap

<max_StdRenderElements>.scaleFactorMult_paramName : string

<max_StdRenderElements>.scaleToRGB_connected : boolean

<max_StdRenderElements>.scaleToRGB_shader : texturemap

<max_StdRenderElements>.scaleToRGB_paramName : string

<max_StdRenderElements>.scaleFactorMult_connected : boolean

<max_StdRenderElements>.scaleFactorMult_shader : texturemap

<max_StdRenderElements>.scaleFactorMult_paramName : string

<max_StdRenderElements>.TheList : maxObject array

<max_StdRenderElements>.Shader_Version : integer

max_StdRenderElements interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_TexturedSkylight : textureMap

max_TexturedSkylight : textureMap {7773161f,9d66be89}

Constructor:

max_TexturedSkylight: class instances not creatable by MAXScript

Properties:

<max_TexturedSkylight>.TexSkyParams : paramBlock2

<max_TexturedSkylight>.on : boolean

<max_TexturedSkylight>.multiplier : float

<max_TexturedSkylight>.color : fRGBA color

<max_TexturedSkylight>.sky_color_map : texturemap

<max_TexturedSkylight>.sky_color_map_on : boolean

<max_TexturedSkylight>.sky_color_map_amt : float

<max_TexturedSkylight>.sky_mode : integer

<max_TexturedSkylight>.Connection_struct__0000__TexSkyParams : paramBlock2

<max_TexturedSkylight>.on_connected : boolean

<max_TexturedSkylight>.on_shader : texturemap

<max_TexturedSkylight>.on_paramName : string

<max_TexturedSkylight>.multiplier_connected : boolean

<max_TexturedSkylight>.multiplier_shader : texturemap

<max_TexturedSkylight>.multiplier_paramName : string

<max_TexturedSkylight>.color_connected : boolean

<max_TexturedSkylight>.color_shader : texturemap

<max_TexturedSkylight>.color_paramName : string

<max_TexturedSkylight>.sky_color_map_on_connected : boolean

<max_TexturedSkylight>.sky_color_map_on_shader : texturemap

<max_TexturedSkylight>.sky_color_map_on_paramName : string

<max_TexturedSkylight>.sky_color_map_amt_connected : boolean

<max_TexturedSkylight>.sky_color_map_amt_shader : texturemap

<max_TexturedSkylight>.sky_color_map_amt_paramName : string

<max_TexturedSkylight>.sky_mode_connected : boolean

<max_TexturedSkylight>.sky_mode_shader : texturemap

<max_TexturedSkylight>.sky_mode_paramName : string

<max_TexturedSkylight>.TheList : maxObject array

<max_TexturedSkylight>.Shader_Version : integer

max_TexturedSkylight interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_TopBottomMaterial : textureMap

max_TopBottomMaterial : textureMap {7773161f,ad668945}

Constructor:

max_TopBottomMaterial: class instances not creatable by MAXScript

Properties:

<max_TopBottomMaterial>.Parameters : paramBlock2

<max_TopBottomMaterial>.ExtraParameters : paramBlock2

<max_TopBottomMaterial>.TopMaterial : material

<max_TopBottomMaterial>.BottomMaterial : material

<max_TopBottomMaterial>.Map1Enabled : boolean

<max_TopBottomMaterial>.Map2Enabled : boolean

<max_TopBottomMaterial>.Blend : float

<max_TopBottomMaterial>.Position : float

<max_TopBottomMaterial>.Coordinates : integer

<max_TopBottomMaterial>.GBufferID : integer

<max_TopBottomMaterial>.Connection_struct__0000__Parameters : paramBlock2

<max_TopBottomMaterial>.Connection_struct__0001__ExtraParameters : paramBlock2

<max_TopBottomMaterial>.Map1Enabled_connected : boolean

<max_TopBottomMaterial>.Map1Enabled_shader : texturemap

<max_TopBottomMaterial>.Map1Enabled_paramName : string

<max_TopBottomMaterial>.Map2Enabled_connected : boolean

<max_TopBottomMaterial>.Map2Enabled_shader : texturemap

<max_TopBottomMaterial>.Map2Enabled_paramName : string

<max_TopBottomMaterial>.Blend_connected : boolean

<max_TopBottomMaterial>.Blend_shader : texturemap

<max_TopBottomMaterial>.Blend_paramName : string

<max_TopBottomMaterial>.Position_connected : boolean

<max_TopBottomMaterial>.Position_shader : texturemap

<max_TopBottomMaterial>.Position_paramName : string

<max_TopBottomMaterial>.Coordinates_connected : boolean

<max_TopBottomMaterial>.Coordinates_shader : texturemap

<max_TopBottomMaterial>.Coordinates_paramName : string

<max_TopBottomMaterial>.GBufferID_connected : boolean

<max_TopBottomMaterial>.GBufferID_shader : texturemap

<max_TopBottomMaterial>.GBufferID_paramName : string

<max_TopBottomMaterial>.TheList : maxObject array

<max_TopBottomMaterial>.Shader_Version : integer

max_TopBottomMaterial interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_TopBottomMaterial_Contour : textureMap

max_TopBottomMaterial_Contour : textureMap {7773161f,c34ab241}

Constructor:

max_TopBottomMaterial_Contour: class instances not creatable by MAXScript

Properties:

<max_TopBottomMaterial_Contour>.Parameters : paramBlock2

<max_TopBottomMaterial_Contour>.TopMaterial : material

<max_TopBottomMaterial_Contour>.BottomMaterial : material

<max_TopBottomMaterial_Contour>.Map1Enabled : boolean

<max_TopBottomMaterial_Contour>.Map2Enabled : boolean

<max_TopBottomMaterial_Contour>.Blend : float

<max_TopBottomMaterial_Contour>.Position : float

<max_TopBottomMaterial_Contour>.Coordinates : integer

<max_TopBottomMaterial_Contour>.Connection_struct__0000__Parameters : paramBlock2

<max_TopBottomMaterial_Contour>.Map1Enabled_connected : boolean

<max_TopBottomMaterial_Contour>.Map1Enabled_shader : texturemap

<max_TopBottomMaterial_Contour>.Map1Enabled_paramName : string

<max_TopBottomMaterial_Contour>.Map2Enabled_connected : boolean

<max_TopBottomMaterial_Contour>.Map2Enabled_shader : texturemap

<max_TopBottomMaterial_Contour>.Map2Enabled_paramName : string

<max_TopBottomMaterial_Contour>.Blend_connected : boolean

<max_TopBottomMaterial_Contour>.Blend_shader : texturemap

<max_TopBottomMaterial_Contour>.Blend_paramName : string

<max_TopBottomMaterial_Contour>.Position_connected : boolean

<max_TopBottomMaterial_Contour>.Position_shader : texturemap

<max_TopBottomMaterial_Contour>.Position_paramName : string

<max_TopBottomMaterial_Contour>.Coordinates_connected : boolean

<max_TopBottomMaterial_Contour>.Coordinates_shader : texturemap

<max_TopBottomMaterial_Contour>.Coordinates_paramName : string

<max_TopBottomMaterial_Contour>.TheList : maxObject array

<max_TopBottomMaterial_Contour>.Shader_Version : integer

max_TopBottomMaterial_Contour interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


max_UnknownMaterial : textureMap

max_UnknownMaterial : textureMap {7773161f,5466b172}

Constructor

max_UnknownMaterial: class instances not creatable by MAXScript

Properties:

<max_UnknownMaterial>.TheList : maxObject array

<max_UnknownMaterial>.Shader_Version : integer

max_UnknownMaterial interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


mayabase_version : textureMap

mayabase_version : textureMap {7773161f,5df26336}

Constructor:

mayabase_version: class instances not creatable by MAXScript

Properties:

<mayabase_version>.Structure : paramBlock2

<mayabase_version>.hi : integer

<mayabase_version>.lo : integer

<mayabase_version>.TheList : maxObject array

<mayabase_version>.Shader_Version : integer

mayabase_version interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_ambientlight : textureMap

maya_ambientlight : textureMap {7773161f,650f5056}

Constructor:

maya_ambientlight: class instances not creatable by MAXScript

Properties:

<maya_ambientlight>.ambientShade : float

<maya_ambientlight>.shadowRadius : float

<maya_ambientlight>.color : fRGBA color

<maya_ambientlight>.intensity : float

<maya_ambientlight>.useRayTraceShadows : boolean

<maya_ambientlight>.shadowColor : fRGBA color

<maya_ambientlight>.shadowRays : integer

<maya_ambientlight>.rayDepthLimit : integer

<maya_ambientlight>.ambientShade_connected : boolean

<maya_ambientlight>.ambientShade_shader : texturemap

<maya_ambientlight>.ambientShade_paramName : string

<maya_ambientlight>.shadowRadius_connected : boolean

<maya_ambientlight>.shadowRadius_shader : texturemap

<maya_ambientlight>.shadowRadius_paramName : string

<maya_ambientlight>.color_connected : boolean

<maya_ambientlight>.color_shader : texturemap

<maya_ambientlight>.color_paramName : string

<maya_ambientlight>.intensity_connected : boolean

<maya_ambientlight>.intensity_shader : texturemap

<maya_ambientlight>.intensity_paramName : string

<maya_ambientlight>.useRayTraceShadows_connected : boolean

<maya_ambientlight>.useRayTraceShadows_shader : texturemap

<maya_ambientlight>.useRayTraceShadows_paramName : string

<maya_ambientlight>.shadowColor_connected : boolean

<maya_ambientlight>.shadowColor_shader : texturemap

<maya_ambientlight>.shadowColor_paramName : string

<maya_ambientlight>.shadowRays_connected : boolean

<maya_ambientlight>.shadowRays_shader : texturemap

<maya_ambientlight>.shadowRays_paramName : string

<maya_ambientlight>.rayDepthLimit_connected : boolean

<maya_ambientlight>.rayDepthLimit_shader : texturemap

<maya_ambientlight>.rayDepthLimit_paramName : string

<maya_ambientlight>.TheList : maxObject array

<maya_ambientlight>.Shader_Version : integer

maya_ambientlight interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_anisotropic : textureMap

maya_anisotropic : textureMap {7773161f,5efc6341}

Constructor:

maya_anisotropic: class instances not creatable by MAXScript

Properties:

<maya_anisotropic>.spreadX : float

<maya_anisotropic>.spreadY : float

<maya_anisotropic>.roughness : float

<maya_anisotropic>.angle : float

<maya_anisotropic>.fresnelRefractiveIndex : float

<maya_anisotropic>.anisotropicReflectivity : boolean

<maya_anisotropic>.reflectionLimit : integer

<maya_anisotropic>.specularColor : fRGBA color

<maya_anisotropic>.reflectivity : float

<maya_anisotropic>.reflectedColor : fRGBA color

<maya_anisotropic>.reflectionSpecularity : float

<maya_anisotropic>.refractionLimit : integer

<maya_anisotropic>.refractiveIndex : float

<maya_anisotropic>.refractions : boolean

<maya_anisotropic>.diffuse : float

<maya_anisotropic>.color : fRGBA color

<maya_anisotropic>.transparency : fRGBA color

<maya_anisotropic>.ambientColor : fRGBA color

<maya_anisotropic>.incandescence : fRGBA color

<maya_anisotropic>.translucence : float

<maya_anisotropic>.translucenceFocus : float

<maya_anisotropic>.translucenceDepth : float

<maya_anisotropic>.opacityGain : float

<maya_anisotropic>.glowIntensity : float

<maya_anisotropic>.hideSource : boolean

<maya_anisotropic>.surfaceThickness : float

<maya_anisotropic>.shadowAttenuation : float

<maya_anisotropic>.transparencyDepth : float

<maya_anisotropic>.lightAbsorbance : float

<maya_anisotropic>.chromaticAberration : boolean

<maya_anisotropic>.normalCamera : point3

<maya_anisotropic>.matteOpacityMode : integer

<maya_anisotropic>.matteOpacity : float

<maya_anisotropic>.irradiance : fRGBA color

<maya_anisotropic>.irradianceColor : fRGBA color

<maya_anisotropic>.refractionBlur : float

<maya_anisotropic>.refractionBlurLimit : integer

<maya_anisotropic>.refractionRays : integer

<maya_anisotropic>.reflectionBlur : float

<maya_anisotropic>.reflectionBlurLimit : integer

<maya_anisotropic>.reflectionRays : integer

<maya_anisotropic>.tangentUCamera : point3

<maya_anisotropic>.tangentVCamera : point3

<maya_anisotropic>.scatterColor : fRGBA color

<maya_anisotropic>.scatterRadius : float

<maya_anisotropic>.scatterAccuracy : integer

<maya_anisotropic>.scatterFalloff : integer

<maya_anisotropic>.scatterLimit : integer

<maya_anisotropic>.scatterCache : integer

<maya_anisotropic>.Structure : paramBlock2

<maya_anisotropic>.outColor : fRGBA color

<maya_anisotropic>.outGlowColor : fRGBA color

<maya_anisotropic>.outMatteOpacity : fRGBA color

<maya_anisotropic>.outTransparency : fRGBA color

<maya_anisotropic>.outAmbient : fRGBA color

<maya_anisotropic>.outIncandescence : fRGBA color

<maya_anisotropic>.outIrradiance : fRGBA color

<maya_anisotropic>.outDiffuseShadowed : fRGBA color

<maya_anisotropic>.outDiffuseNoShadow : fRGBA color

<maya_anisotropic>.outShadow : fRGBA color

<maya_anisotropic>.outSpecularShadowed : fRGBA color

<maya_anisotropic>.outSpecularNoShadow : fRGBA color

<maya_anisotropic>.outReflection : fRGBA color

<maya_anisotropic>.outRefraction : fRGBA color

<maya_anisotropic>.outScatter : fRGBA color

<maya_anisotropic>.outOpacity : fRGBA color

<maya_anisotropic>.spreadX_connected : boolean

<maya_anisotropic>.spreadX_shader : texturemap

<maya_anisotropic>.spreadX_paramName : string

<maya_anisotropic>.spreadY_connected : boolean

<maya_anisotropic>.spreadY_shader : texturemap

<maya_anisotropic>.spreadY_paramName : string

<maya_anisotropic>.roughness_connected : boolean

<maya_anisotropic>.roughness_shader : texturemap

<maya_anisotropic>.roughness_paramName : string

<maya_anisotropic>.angle_connected : boolean

<maya_anisotropic>.angle_shader : texturemap

<maya_anisotropic>.angle_paramName : string

<maya_anisotropic>.fresnelRefractiveIndex_connected : boolean

<maya_anisotropic>.fresnelRefractiveIndex_shader : texturemap

<maya_anisotropic>.fresnelRefractiveIndex_paramName : string

<maya_anisotropic>.anisotropicReflectivity_connected : boolean

<maya_anisotropic>.anisotropicReflectivity_shader : texturemap

<maya_anisotropic>.anisotropicReflectivity_paramName : string

<maya_anisotropic>.reflectionLimit_connected : boolean

<maya_anisotropic>.reflectionLimit_shader : texturemap

<maya_anisotropic>.reflectionLimit_paramName : string

<maya_anisotropic>.specularColor_connected : boolean

<maya_anisotropic>.specularColor_shader : texturemap

<maya_anisotropic>.specularColor_paramName : string

<maya_anisotropic>.reflectivity_connected : boolean

<maya_anisotropic>.reflectivity_shader : texturemap

<maya_anisotropic>.reflectivity_paramName : string

<maya_anisotropic>.reflectedColor_connected : boolean

<maya_anisotropic>.reflectedColor_shader : texturemap

<maya_anisotropic>.reflectedColor_paramName : string

<maya_anisotropic>.reflectionSpecularity_connected : boolean

<maya_anisotropic>.reflectionSpecularity_shader : texturemap

<maya_anisotropic>.reflectionSpecularity_paramName : string

<maya_anisotropic>.refractionLimit_connected : boolean

<maya_anisotropic>.refractionLimit_shader : texturemap

<maya_anisotropic>.refractionLimit_paramName : string

<maya_anisotropic>.refractiveIndex_connected : boolean

<maya_anisotropic>.refractiveIndex_shader : texturemap

<maya_anisotropic>.refractiveIndex_paramName : string

<maya_anisotropic>.refractions_connected : boolean

<maya_anisotropic>.refractions_shader : texturemap

<maya_anisotropic>.refractions_paramName : string

<maya_anisotropic>.diffuse_connected : boolean

<maya_anisotropic>.diffuse_shader : texturemap

<maya_anisotropic>.diffuse_paramName : string

<maya_anisotropic>.color_connected : boolean

<maya_anisotropic>.color_shader : texturemap

<maya_anisotropic>.color_paramName : string

<maya_anisotropic>.transparency_connected : boolean

<maya_anisotropic>.transparency_shader : texturemap

<maya_anisotropic>.transparency_paramName : string

<maya_anisotropic>.ambientColor_connected : boolean

<maya_anisotropic>.ambientColor_shader : texturemap

<maya_anisotropic>.ambientColor_paramName : string

<maya_anisotropic>.incandescence_connected : boolean

<maya_anisotropic>.incandescence_shader : texturemap

<maya_anisotropic>.incandescence_paramName : string

<maya_anisotropic>.translucence_connected : boolean

<maya_anisotropic>.translucence_shader : texturemap

<maya_anisotropic>.translucence_paramName : string

<maya_anisotropic>.translucenceFocus_connected : boolean

<maya_anisotropic>.translucenceFocus_shader : texturemap

<maya_anisotropic>.translucenceFocus_paramName : string

<maya_anisotropic>.translucenceDepth_connected : boolean

<maya_anisotropic>.translucenceDepth_shader : texturemap

<maya_anisotropic>.translucenceDepth_paramName : string

<maya_anisotropic>.opacityGain_connected : boolean

<maya_anisotropic>.opacityGain_shader : texturemap

<maya_anisotropic>.opacityGain_paramName : string

<maya_anisotropic>.glowIntensity_connected : boolean

<maya_anisotropic>.glowIntensity_shader : texturemap

<maya_anisotropic>.glowIntensity_paramName : string

<maya_anisotropic>.hideSource_connected : boolean

<maya_anisotropic>.hideSource_shader : texturemap

<maya_anisotropic>.hideSource_paramName : string

<maya_anisotropic>.surfaceThickness_connected : boolean

<maya_anisotropic>.surfaceThickness_shader : texturemap

<maya_anisotropic>.surfaceThickness_paramName : string

<maya_anisotropic>.shadowAttenuation_connected : boolean

<maya_anisotropic>.shadowAttenuation_shader : texturemap

<maya_anisotropic>.shadowAttenuation_paramName : string

<maya_anisotropic>.transparencyDepth_connected : boolean

<maya_anisotropic>.transparencyDepth_shader : texturemap

<maya_anisotropic>.transparencyDepth_paramName : string

<maya_anisotropic>.lightAbsorbance_connected : boolean

<maya_anisotropic>.lightAbsorbance_shader : texturemap

<maya_anisotropic>.lightAbsorbance_paramName : string

<maya_anisotropic>.chromaticAberration_connected : boolean

<maya_anisotropic>.chromaticAberration_shader : texturemap

<maya_anisotropic>.chromaticAberration_paramName : string

<maya_anisotropic>.normalCamera_connected : boolean

<maya_anisotropic>.normalCamera_shader : texturemap

<maya_anisotropic>.normalCamera_paramName : string

<maya_anisotropic>.matteOpacityMode_connected : boolean

<maya_anisotropic>.matteOpacityMode_shader : texturemap

<maya_anisotropic>.matteOpacityMode_paramName : string

<maya_anisotropic>.matteOpacity_connected : boolean

<maya_anisotropic>.matteOpacity_shader : texturemap

<maya_anisotropic>.matteOpacity_paramName : string

<maya_anisotropic>.irradiance_connected : boolean

<maya_anisotropic>.irradiance_shader : texturemap

<maya_anisotropic>.irradiance_paramName : string

<maya_anisotropic>.irradianceColor_connected : boolean

<maya_anisotropic>.irradianceColor_shader : texturemap

<maya_anisotropic>.irradianceColor_paramName : string

<maya_anisotropic>.refractionBlur_connected : boolean

<maya_anisotropic>.refractionBlur_shader : texturemap

<maya_anisotropic>.refractionBlur_paramName : string

<maya_anisotropic>.refractionBlurLimit_connected : boolean

<maya_anisotropic>.refractionBlurLimit_shader : texturemap

<maya_anisotropic>.refractionBlurLimit_paramName : string

<maya_anisotropic>.refractionRays_connected : boolean

<maya_anisotropic>.refractionRays_shader : texturemap

<maya_anisotropic>.refractionRays_paramName : string

<maya_anisotropic>.reflectionBlur_connected : boolean

<maya_anisotropic>.reflectionBlur_shader : texturemap

<maya_anisotropic>.reflectionBlur_paramName : string

<maya_anisotropic>.reflectionBlurLimit_connected : boolean

<maya_anisotropic>.reflectionBlurLimit_shader : texturemap

<maya_anisotropic>.reflectionBlurLimit_paramName : string

<maya_anisotropic>.reflectionRays_connected : boolean

<maya_anisotropic>.reflectionRays_shader : texturemap

<maya_anisotropic>.reflectionRays_paramName : string

<maya_anisotropic>.tangentUCamera_connected : boolean

<maya_anisotropic>.tangentUCamera_shader : texturemap

<maya_anisotropic>.tangentUCamera_paramName : string

<maya_anisotropic>.tangentVCamera_connected : boolean

<maya_anisotropic>.tangentVCamera_shader : texturemap

<maya_anisotropic>.tangentVCamera_paramName : string

<maya_anisotropic>.scatterColor_connected : boolean

<maya_anisotropic>.scatterColor_shader : texturemap

<maya_anisotropic>.scatterColor_paramName : string

<maya_anisotropic>.scatterRadius_connected : boolean

<maya_anisotropic>.scatterRadius_shader : texturemap

<maya_anisotropic>.scatterRadius_paramName : string

<maya_anisotropic>.scatterAccuracy_connected : boolean

<maya_anisotropic>.scatterAccuracy_shader : texturemap

<maya_anisotropic>.scatterAccuracy_paramName : string

<maya_anisotropic>.scatterFalloff_connected : boolean

<maya_anisotropic>.scatterFalloff_shader : texturemap

<maya_anisotropic>.scatterFalloff_paramName : string

<maya_anisotropic>.scatterLimit_connected : boolean

<maya_anisotropic>.scatterLimit_shader : texturemap

<maya_anisotropic>.scatterLimit_paramName : string

<maya_anisotropic>.scatterCache_connected : boolean

<maya_anisotropic>.scatterCache_shader : texturemap

<maya_anisotropic>.scatterCache_paramName : string

<maya_anisotropic>.TheList : maxObject array

<maya_anisotropic>.Shader_Version : integer

maya_anisotropic interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_arealight : textureMap

maya_arealight : textureMap {7773161f,a9545c4e}

Constructor:

maya_arealight: class instances not creatable by MAXScript

Properties:

<maya_arealight>.decayRate : integer

<maya_arealight>.useDepthMapShadows : boolean

<maya_arealight>.emitDiffuse : boolean

<maya_arealight>.emitSpecular : boolean

<maya_arealight>.color : fRGBA color

<maya_arealight>.intensity : float

<maya_arealight>.useRayTraceShadows : boolean

<maya_arealight>.shadowColor : fRGBA color

<maya_arealight>.shadowRays : integer

<maya_arealight>.rayDepthLimit : integer

<maya_arealight>.decayRate_connected : boolean

<maya_arealight>.decayRate_shader : texturemap

<maya_arealight>.decayRate_paramName : string

<maya_arealight>.useDepthMapShadows_connected : boolean

<maya_arealight>.useDepthMapShadows_shader : texturemap

<maya_arealight>.useDepthMapShadows_paramName : string

<maya_arealight>.emitDiffuse_connected : boolean

<maya_arealight>.emitDiffuse_shader : texturemap

<maya_arealight>.emitDiffuse_paramName : string

<maya_arealight>.emitSpecular_connected : boolean

<maya_arealight>.emitSpecular_shader : texturemap

<maya_arealight>.emitSpecular_paramName : string

<maya_arealight>.color_connected : boolean

<maya_arealight>.color_shader : texturemap

<maya_arealight>.color_paramName : string

<maya_arealight>.intensity_connected : boolean

<maya_arealight>.intensity_shader : texturemap

<maya_arealight>.intensity_paramName : string

<maya_arealight>.useRayTraceShadows_connected : boolean

<maya_arealight>.useRayTraceShadows_shader : texturemap

<maya_arealight>.useRayTraceShadows_paramName : string

<maya_arealight>.shadowColor_connected : boolean

<maya_arealight>.shadowColor_shader : texturemap

<maya_arealight>.shadowColor_paramName : string

<maya_arealight>.shadowRays_connected : boolean

<maya_arealight>.shadowRays_shader : texturemap

<maya_arealight>.shadowRays_paramName : string

<maya_arealight>.rayDepthLimit_connected : boolean

<maya_arealight>.rayDepthLimit_shader : texturemap

<maya_arealight>.rayDepthLimit_paramName : string

<maya_arealight>.TheList : maxObject array

<maya_arealight>.Shader_Version : integer

maya_arealight interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_bakelightmap : textureMap

maya_bakelightmap : textureMap {7773161f,520e5f62}

Constructor:

maya_bakelightmap: class instances not creatable by MAXScript

Properties:

<maya_bakelightmap>.content : integer

<maya_bakelightmap>.storage : texturemap

<maya_bakelightmap>.uvSpace : integer

<maya_bakelightmap>.uvRange : boolean

<maya_bakelightmap>.uvMin : point3

<maya_bakelightmap>.uvMax : point3

<maya_bakelightmap>.uvFit : integer

<maya_bakelightmap>.samples : integer

<maya_bakelightmap>.alphaMode : integer

<maya_bakelightmap>.overbake : float

<maya_bakelightmap>.rayDirection : integer

<maya_bakelightmap>.normalDirection : integer

<maya_bakelightmap>.prebakeFgQuality : float

<maya_bakelightmap>.prebakeFgReflect : float

<maya_bakelightmap>.occlusionRays : integer

<maya_bakelightmap>.occlusionFalloff : float

<maya_bakelightmap>.customShader : texturemap

<maya_bakelightmap>.backgroundMode : integer

<maya_bakelightmap>.backgroundColor : fRGBA color

<maya_bakelightmap>.Structure : paramBlock2

<maya_bakelightmap>.point : point3

<maya_bakelightmap>.normal : point3

<maya_bakelightmap>.tex : point3

<maya_bakelightmap>.content_connected : boolean

<maya_bakelightmap>.content_shader : texturemap

<maya_bakelightmap>.content_paramName : string

<maya_bakelightmap>.uvSpace_connected : boolean

<maya_bakelightmap>.uvSpace_shader : texturemap

<maya_bakelightmap>.uvSpace_paramName : string

<maya_bakelightmap>.uvRange_connected : boolean

<maya_bakelightmap>.uvRange_shader : texturemap

<maya_bakelightmap>.uvRange_paramName : string

<maya_bakelightmap>.uvMin_connected : boolean

<maya_bakelightmap>.uvMin_shader : texturemap

<maya_bakelightmap>.uvMin_paramName : string

<maya_bakelightmap>.uvMax_connected : boolean

<maya_bakelightmap>.uvMax_shader : texturemap

<maya_bakelightmap>.uvMax_paramName : string

<maya_bakelightmap>.uvFit_connected : boolean

<maya_bakelightmap>.uvFit_shader : texturemap

<maya_bakelightmap>.uvFit_paramName : string

<maya_bakelightmap>.samples_connected : boolean

<maya_bakelightmap>.samples_shader : texturemap

<maya_bakelightmap>.samples_paramName : string

<maya_bakelightmap>.alphaMode_connected : boolean

<maya_bakelightmap>.alphaMode_shader : texturemap

<maya_bakelightmap>.alphaMode_paramName : string

<maya_bakelightmap>.overbake_connected : boolean

<maya_bakelightmap>.overbake_shader : texturemap

<maya_bakelightmap>.overbake_paramName : string

<maya_bakelightmap>.rayDirection_connected : boolean

<maya_bakelightmap>.rayDirection_shader : texturemap

<maya_bakelightmap>.rayDirection_paramName : string

<maya_bakelightmap>.normalDirection_connected : boolean

<maya_bakelightmap>.normalDirection_shader : texturemap

<maya_bakelightmap>.normalDirection_paramName : string

<maya_bakelightmap>.prebakeFgQuality_connected : boolean

<maya_bakelightmap>.prebakeFgQuality_shader : texturemap

<maya_bakelightmap>.prebakeFgQuality_paramName : string

<maya_bakelightmap>.prebakeFgReflect_connected : boolean

<maya_bakelightmap>.prebakeFgReflect_shader : texturemap

<maya_bakelightmap>.prebakeFgReflect_paramName : string

<maya_bakelightmap>.occlusionRays_connected : boolean

<maya_bakelightmap>.occlusionRays_shader : texturemap

<maya_bakelightmap>.occlusionRays_paramName : string

<maya_bakelightmap>.occlusionFalloff_connected : boolean

<maya_bakelightmap>.occlusionFalloff_shader : texturemap

<maya_bakelightmap>.occlusionFalloff_paramName : string

<maya_bakelightmap>.backgroundMode_connected : boolean

<maya_bakelightmap>.backgroundMode_shader : texturemap

<maya_bakelightmap>.backgroundMode_paramName : string

<maya_bakelightmap>.backgroundColor_connected : boolean

<maya_bakelightmap>.backgroundColor_shader : texturemap

<maya_bakelightmap>.backgroundColor_paramName : string

<maya_bakelightmap>.TheList : maxObject array

<maya_bakelightmap>.Shader_Version : integer

maya_bakelightmap interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_bakevertices : textureMap

maya_bakevertices : textureMap {7773161f,63106063}

Constructor:

maya_bakevertices: class instances not creatable by MAXScript

Properties:

<maya_bakevertices>.content : integer

<maya_bakevertices>.storage : texturemap

<maya_bakevertices>.rayDirection : integer

<maya_bakevertices>.normalDirection : integer

<maya_bakevertices>.occlusionRays : integer

<maya_bakevertices>.occlusionFalloff : float

<maya_bakevertices>.customShader : texturemap

<maya_bakevertices>.Structure : paramBlock2

<maya_bakevertices>.point : point3

<maya_bakevertices>.normal : point3

<maya_bakevertices>.content_connected : boolean

<maya_bakevertices>.content_shader : texturemap

<maya_bakevertices>.content_paramName : string

<maya_bakevertices>.rayDirection_connected : boolean

<maya_bakevertices>.rayDirection_shader : texturemap

<maya_bakevertices>.rayDirection_paramName : string

<maya_bakevertices>.normalDirection_connected : boolean

<maya_bakevertices>.normalDirection_shader : texturemap

<maya_bakevertices>.normalDirection_paramName : string

<maya_bakevertices>.occlusionRays_connected : boolean

<maya_bakevertices>.occlusionRays_shader : texturemap

<maya_bakevertices>.occlusionRays_paramName : string

<maya_bakevertices>.occlusionFalloff_connected : boolean

<maya_bakevertices>.occlusionFalloff_shader : texturemap

<maya_bakevertices>.occlusionFalloff_paramName : string

<maya_bakevertices>.TheList : maxObject array

<maya_bakevertices>.Shader_Version : integer

maya_bakevertices interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_blend : textureMap

maya_blend : textureMap {7773161f,4a07ab6f}

Constructor:

maya_blend: class instances not creatable by MAXScript

Properties:

<maya_blend>.blender : float

<maya_blend>.color1 : fRGBA color

<maya_blend>.color2 : fRGBA color

<maya_blend>.Structure : paramBlock2

<maya_blend>.output : fRGBA color

<maya_blend>.blender_connected : boolean

<maya_blend>.blender_shader : texturemap

<maya_blend>.blender_paramName : string

<maya_blend>.color1_connected : boolean

<maya_blend>.color1_shader : texturemap

<maya_blend>.color1_paramName : string

<maya_blend>.color2_connected : boolean

<maya_blend>.color2_shader : texturemap

<maya_blend>.color2_paramName : string

<maya_blend>.TheList : maxObject array

<maya_blend>.Shader_Version : integer

maya_blend interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_blinn : textureMap

maya_blinn : textureMap {7773161f,4e07b16f}

Constructor:

maya_blinn: class instances not creatable by MAXScript

Properties:

<maya_blinn>.eccentricity : float

<maya_blinn>.specularRollOff : float

<maya_blinn>.reflectionLimit : integer

<maya_blinn>.specularColor : fRGBA color

<maya_blinn>.reflectivity : float

<maya_blinn>.reflectedColor : fRGBA color

<maya_blinn>.reflectionSpecularity : float

<maya_blinn>.refractionLimit : integer

<maya_blinn>.refractiveIndex : float

<maya_blinn>.refractions : boolean

<maya_blinn>.diffuse : float

<maya_blinn>.color : fRGBA color

<maya_blinn>.transparency : fRGBA color

<maya_blinn>.ambientColor : fRGBA color

<maya_blinn>.incandescence : fRGBA color

<maya_blinn>.translucence : float

<maya_blinn>.translucenceFocus : float

<maya_blinn>.translucenceDepth : float

<maya_blinn>.opacityGain : float

<maya_blinn>.glowIntensity : float

<maya_blinn>.hideSource : boolean

<maya_blinn>.surfaceThickness : float

<maya_blinn>.shadowAttenuation : float

<maya_blinn>.transparencyDepth : float

<maya_blinn>.lightAbsorbance : float

<maya_blinn>.chromaticAberration : boolean

<maya_blinn>.normalCamera : point3

<maya_blinn>.matteOpacityMode : integer

<maya_blinn>.matteOpacity : float

<maya_blinn>.irradiance : fRGBA color

<maya_blinn>.irradianceColor : fRGBA color

<maya_blinn>.reflectionRolloff : boolean

<maya_blinn>.refractionBlur : float

<maya_blinn>.refractionBlurLimit : integer

<maya_blinn>.refractionRays : integer

<maya_blinn>.reflectionBlur : float

<maya_blinn>.reflectionBlurLimit : integer

<maya_blinn>.reflectionRays : integer

<maya_blinn>.scatterColor : fRGBA color

<maya_blinn>.scatterRadius : float

<maya_blinn>.scatterAccuracy : integer

<maya_blinn>.scatterFalloff : integer

<maya_blinn>.scatterLimit : integer

<maya_blinn>.scatterCache : integer

<maya_blinn>.Structure : paramBlock2

<maya_blinn>.outColor : fRGBA color

<maya_blinn>.outGlowColor : fRGBA color

<maya_blinn>.outMatteOpacity : fRGBA color

<maya_blinn>.outTransparency : fRGBA color

<maya_blinn>.outAmbient : fRGBA color

<maya_blinn>.outIncandescence : fRGBA color

<maya_blinn>.outIrradiance : fRGBA color

<maya_blinn>.outDiffuseShadowed : fRGBA color

<maya_blinn>.outDiffuseNoShadow : fRGBA color

<maya_blinn>.outShadow : fRGBA color

<maya_blinn>.outSpecularShadowed : fRGBA color

<maya_blinn>.outSpecularNoShadow : fRGBA color

<maya_blinn>.outReflection : fRGBA color

<maya_blinn>.outRefraction : fRGBA color

<maya_blinn>.outScatter : fRGBA color

<maya_blinn>.outOpacity : fRGBA color

<maya_blinn>.eccentricity_connected : boolean

<maya_blinn>.eccentricity_shader : texturemap

<maya_blinn>.eccentricity_paramName : string

<maya_blinn>.specularRollOff_connected : boolean

<maya_blinn>.specularRollOff_shader : texturemap

<maya_blinn>.specularRollOff_paramName : string

<maya_blinn>.reflectionLimit_connected : boolean

<maya_blinn>.reflectionLimit_shader : texturemap

<maya_blinn>.reflectionLimit_paramName : string

<maya_blinn>.specularColor_connected : boolean

<maya_blinn>.specularColor_shader : texturemap

<maya_blinn>.specularColor_paramName : string

<maya_blinn>.reflectivity_connected : boolean

<maya_blinn>.reflectivity_shader : texturemap

<maya_blinn>.reflectivity_paramName : string

<maya_blinn>.reflectedColor_connected : boolean

<maya_blinn>.reflectedColor_shader : texturemap

<maya_blinn>.reflectedColor_paramName : string

<maya_blinn>.reflectionSpecularity_connected : boolean

<maya_blinn>.reflectionSpecularity_shader : texturemap

<maya_blinn>.reflectionSpecularity_paramName : string

<maya_blinn>.refractionLimit_connected : boolean

<maya_blinn>.refractionLimit_shader : texturemap

<maya_blinn>.refractionLimit_paramName : string

<maya_blinn>.refractiveIndex_connected : boolean

<maya_blinn>.refractiveIndex_shader : texturemap

<maya_blinn>.refractiveIndex_paramName : string

<maya_blinn>.refractions_connected : boolean

<maya_blinn>.refractions_shader : texturemap

<maya_blinn>.refractions_paramName : string

<maya_blinn>.diffuse_connected : boolean

<maya_blinn>.diffuse_shader : texturemap

<maya_blinn>.diffuse_paramName : string

<maya_blinn>.color_connected : boolean

<maya_blinn>.color_shader : texturemap

<maya_blinn>.color_paramName : string

<maya_blinn>.transparency_connected : boolean

<maya_blinn>.transparency_shader : texturemap

<maya_blinn>.transparency_paramName : string

<maya_blinn>.ambientColor_connected : boolean

<maya_blinn>.ambientColor_shader : texturemap

<maya_blinn>.ambientColor_paramName : string

<maya_blinn>.incandescence_connected : boolean

<maya_blinn>.incandescence_shader : texturemap

<maya_blinn>.incandescence_paramName : string

<maya_blinn>.translucence_connected : boolean

<maya_blinn>.translucence_shader : texturemap

<maya_blinn>.translucence_paramName : string

<maya_blinn>.translucenceFocus_connected : boolean

<maya_blinn>.translucenceFocus_shader : texturemap

<maya_blinn>.translucenceFocus_paramName : string

<maya_blinn>.translucenceDepth_connected : boolean

<maya_blinn>.translucenceDepth_shader : texturemap

<maya_blinn>.translucenceDepth_paramName : string

<maya_blinn>.opacityGain_connected : boolean

<maya_blinn>.opacityGain_shader : texturemap

<maya_blinn>.opacityGain_paramName : string

<maya_blinn>.glowIntensity_connected : boolean

<maya_blinn>.glowIntensity_shader : texturemap

<maya_blinn>.glowIntensity_paramName : string

<maya_blinn>.hideSource_connected : boolean

<maya_blinn>.hideSource_shader : texturemap

<maya_blinn>.hideSource_paramName : string

<maya_blinn>.surfaceThickness_connected : boolean

<maya_blinn>.surfaceThickness_shader : texturemap

<maya_blinn>.surfaceThickness_paramName : string

<maya_blinn>.shadowAttenuation_connected : boolean

<maya_blinn>.shadowAttenuation_shader : texturemap

<maya_blinn>.shadowAttenuation_paramName : string

<maya_blinn>.transparencyDepth_connected : boolean

<maya_blinn>.transparencyDepth_shader : texturemap

<maya_blinn>.transparencyDepth_paramName : string

<maya_blinn>.lightAbsorbance_connected : boolean

<maya_blinn>.lightAbsorbance_shader : texturemap

<maya_blinn>.lightAbsorbance_paramName : string

<maya_blinn>.chromaticAberration_connected : boolean

<maya_blinn>.chromaticAberration_shader : texturemap

<maya_blinn>.chromaticAberration_paramName : string

<maya_blinn>.normalCamera_connected : boolean

<maya_blinn>.normalCamera_shader : texturemap

<maya_blinn>.normalCamera_paramName : string

<maya_blinn>.matteOpacityMode_connected : boolean

<maya_blinn>.matteOpacityMode_shader : texturemap

<maya_blinn>.matteOpacityMode_paramName : string

<maya_blinn>.matteOpacity_connected : boolean

<maya_blinn>.matteOpacity_shader : texturemap

<maya_blinn>.matteOpacity_paramName : string

<maya_blinn>.irradiance_connected : boolean

<maya_blinn>.irradiance_shader : texturemap

<maya_blinn>.irradiance_paramName : string

<maya_blinn>.irradianceColor_connected : boolean

<maya_blinn>.irradianceColor_shader : texturemap

<maya_blinn>.irradianceColor_paramName : string

<maya_blinn>.reflectionRolloff_connected : boolean

<maya_blinn>.reflectionRolloff_shader : texturemap

<maya_blinn>.reflectionRolloff_paramName : string

<maya_blinn>.refractionBlur_connected : boolean

<maya_blinn>.refractionBlur_shader : texturemap

<maya_blinn>.refractionBlur_paramName : string

<maya_blinn>.refractionBlurLimit_connected : boolean

<maya_blinn>.refractionBlurLimit_shader : texturemap

<maya_blinn>.refractionBlurLimit_paramName : string

<maya_blinn>.refractionRays_connected : boolean

<maya_blinn>.refractionRays_shader : texturemap

<maya_blinn>.refractionRays_paramName : string

<maya_blinn>.reflectionBlur_connected : boolean

<maya_blinn>.reflectionBlur_shader : texturemap

<maya_blinn>.reflectionBlur_paramName : string

<maya_blinn>.reflectionBlurLimit_connected : boolean

<maya_blinn>.reflectionBlurLimit_shader : texturemap

<maya_blinn>.reflectionBlurLimit_paramName : string

<maya_blinn>.reflectionRays_connected : boolean

<maya_blinn>.reflectionRays_shader : texturemap

<maya_blinn>.reflectionRays_paramName : string

<maya_blinn>.scatterColor_connected : boolean

<maya_blinn>.scatterColor_shader : texturemap

<maya_blinn>.scatterColor_paramName : string

<maya_blinn>.scatterRadius_connected : boolean

<maya_blinn>.scatterRadius_shader : texturemap

<maya_blinn>.scatterRadius_paramName : string

<maya_blinn>.scatterAccuracy_connected : boolean

<maya_blinn>.scatterAccuracy_shader : texturemap

<maya_blinn>.scatterAccuracy_paramName : string

<maya_blinn>.scatterFalloff_connected : boolean

<maya_blinn>.scatterFalloff_shader : texturemap

<maya_blinn>.scatterFalloff_paramName : string

<maya_blinn>.scatterLimit_connected : boolean

<maya_blinn>.scatterLimit_shader : texturemap

<maya_blinn>.scatterLimit_paramName : string

<maya_blinn>.scatterCache_connected : boolean

<maya_blinn>.scatterCache_shader : texturemap

<maya_blinn>.scatterCache_paramName : string

<maya_blinn>.TheList : maxObject array

<maya_blinn>.Shader_Version : integer

maya_blinn interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_blobbyparticles : textureMap

maya_blobbyparticles : textureMap {7773161f,aa6fc365}

Constructor:

maya_blobbyparticles: class instances not creatable by MAXScript

Properties:

<maya_blobbyparticles>.surfaceShader : texturemap

<maya_blobbyparticles>.shadowShader : texturemap

<maya_blobbyparticles>.threshold : float

<maya_blobbyparticles>.particleSystem : node

<maya_blobbyparticles>.visibleInReflections : boolean

<maya_blobbyparticles>.visibleInRefractions : boolean

<maya_blobbyparticles>.threshold_connected : boolean

<maya_blobbyparticles>.threshold_shader : texturemap

<maya_blobbyparticles>.threshold_paramName : string

<maya_blobbyparticles>.visibleInReflections_connected : boolean

<maya_blobbyparticles>.visibleInReflections_shader : texturemap

<maya_blobbyparticles>.visibleInReflections_paramName : string

<maya_blobbyparticles>.visibleInRefractions_connected : boolean

<maya_blobbyparticles>.visibleInRefractions_shader : texturemap

<maya_blobbyparticles>.visibleInRefractions_paramName : string

<maya_blobbyparticles>.TheList : maxObject array

<maya_blobbyparticles>.Shader_Version : integer

maya_blobbyparticles interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_box : textureMap

maya_box : textureMap {7773161f,5f084745}

Constructor:

maya_box: class instances not creatable by MAXScript

Properties:

<maya_box>.size : point3

<maya_box>.renderableObjectType : integer

<maya_box>.volumeSamplesOverride : boolean

<maya_box>.volumeSamples : integer

<maya_box>.depthJitter : boolean

<maya_box>.size_connected : boolean

<maya_box>.size_shader : texturemap

<maya_box>.size_paramName : string

<maya_box>.renderableObjectType_connected : boolean

<maya_box>.renderableObjectType_shader : texturemap

<maya_box>.renderableObjectType_paramName : string

<maya_box>.volumeSamplesOverride_connected : boolean

<maya_box>.volumeSamplesOverride_shader : texturemap

<maya_box>.volumeSamplesOverride_paramName : string

<maya_box>.volumeSamples_connected : boolean

<maya_box>.volumeSamples_shader : texturemap

<maya_box>.volumeSamples_paramName : string

<maya_box>.depthJitter_connected : boolean

<maya_box>.depthJitter_shader : texturemap

<maya_box>.depthJitter_paramName : string

<maya_box>.TheList : maxObject array

<maya_box>.Shader_Version : integer

maya_box interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_brownian : textureMap

maya_brownian : textureMap {7773161f,b554b13e}

Constructor:

maya_brownian: class instances not creatable by MAXScript

Properties:

<maya_brownian>.lacunarity : float

<maya_brownian>.increment : float

<maya_brownian>.octaves : float

<maya_brownian>.weight3d : point3

<maya_brownian>.filter : float

<maya_brownian>.filterSize : point3

<maya_brownian>.filterOffset : float

<maya_brownian>.blend : float

<maya_brownian>.wrap : boolean

<maya_brownian>.invert : boolean

<maya_brownian>.alphaIsLuminance : boolean

<maya_brownian>.colorGain : fRGBA color

<maya_brownian>.colorOffset : fRGBA color

<maya_brownian>.alphaGain : float

<maya_brownian>.alphaOffset : float

<maya_brownian>.defaultColor : fRGBA color

<maya_brownian>.normalCamera : point3

<maya_brownian>.placementMatrix : matrix3

<maya_brownian>.local : boolean

<maya_brownian>.Structure : paramBlock2

<maya_brownian>.outColor : fRGBA color

<maya_brownian>.outAlpha : float

<maya_brownian>.lacunarity_connected : boolean

<maya_brownian>.lacunarity_shader : texturemap

<maya_brownian>.lacunarity_paramName : string

<maya_brownian>.increment_connected : boolean

<maya_brownian>.increment_shader : texturemap

<maya_brownian>.increment_paramName : string

<maya_brownian>.octaves_connected : boolean

<maya_brownian>.octaves_shader : texturemap

<maya_brownian>.octaves_paramName : string

<maya_brownian>.weight3d_connected : boolean

<maya_brownian>.weight3d_shader : texturemap

<maya_brownian>.weight3d_paramName : string

<maya_brownian>.filter_connected : boolean

<maya_brownian>.filter_shader : texturemap

<maya_brownian>.filter_paramName : string

<maya_brownian>.filterSize_connected : boolean

<maya_brownian>.filterSize_shader : texturemap

<maya_brownian>.filterSize_paramName : string

<maya_brownian>.filterOffset_connected : boolean

<maya_brownian>.filterOffset_shader : texturemap

<maya_brownian>.filterOffset_paramName : string

<maya_brownian>.blend_connected : boolean

<maya_brownian>.blend_shader : texturemap

<maya_brownian>.blend_paramName : string

<maya_brownian>.wrap_connected : boolean

<maya_brownian>.wrap_shader : texturemap

<maya_brownian>.wrap_paramName : string

<maya_brownian>.invert_connected : boolean

<maya_brownian>.invert_shader : texturemap

<maya_brownian>.invert_paramName : string

<maya_brownian>.alphaIsLuminance_connected : boolean

<maya_brownian>.alphaIsLuminance_shader : texturemap

<maya_brownian>.alphaIsLuminance_paramName : string

<maya_brownian>.colorGain_connected : boolean

<maya_brownian>.colorGain_shader : texturemap

<maya_brownian>.colorGain_paramName : string

<maya_brownian>.colorOffset_connected : boolean

<maya_brownian>.colorOffset_shader : texturemap

<maya_brownian>.colorOffset_paramName : string

<maya_brownian>.alphaGain_connected : boolean

<maya_brownian>.alphaGain_shader : texturemap

<maya_brownian>.alphaGain_paramName : string

<maya_brownian>.alphaOffset_connected : boolean

<maya_brownian>.alphaOffset_shader : texturemap

<maya_brownian>.alphaOffset_paramName : string

<maya_brownian>.defaultColor_connected : boolean

<maya_brownian>.defaultColor_shader : texturemap

<maya_brownian>.defaultColor_paramName : string

<maya_brownian>.normalCamera_connected : boolean

<maya_brownian>.normalCamera_shader : texturemap

<maya_brownian>.normalCamera_paramName : string

<maya_brownian>.placementMatrix_connected : boolean

<maya_brownian>.placementMatrix_shader : texturemap

<maya_brownian>.placementMatrix_paramName : string

<maya_brownian>.local_connected : boolean

<maya_brownian>.local_shader : texturemap

<maya_brownian>.local_paramName : string

<maya_brownian>.TheList : maxObject array

<maya_brownian>.Shader_Version : integer

maya_brownian interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_bulge : textureMap

maya_bulge : textureMap {7773161f,52feaa68}

Constructor:

maya_bulge: class instances not creatable by MAXScript

Properties:

<maya_bulge>.uWidth : float

<maya_bulge>.vWidth : float

<maya_bulge>.uvCoord : point3

<maya_bulge>.uvFilterSize : point3

<maya_bulge>.filter : float

<maya_bulge>.filterOffset : float

<maya_bulge>.invert : boolean

<maya_bulge>.alphaIsLuminance : boolean

<maya_bulge>.colorGain : fRGBA color

<maya_bulge>.colorOffset : fRGBA color

<maya_bulge>.alphaGain : float

<maya_bulge>.alphaOffset : float

<maya_bulge>.defaultColor : fRGBA color

<maya_bulge>.Structure : paramBlock2

<maya_bulge>.outColor : fRGBA color

<maya_bulge>.outAlpha : float

<maya_bulge>.uWidth_connected : boolean

<maya_bulge>.uWidth_shader : texturemap

<maya_bulge>.uWidth_paramName : string

<maya_bulge>.vWidth_connected : boolean

<maya_bulge>.vWidth_shader : texturemap

<maya_bulge>.vWidth_paramName : string

<maya_bulge>.uvCoord_connected : boolean

<maya_bulge>.uvCoord_shader : texturemap

<maya_bulge>.uvCoord_paramName : string

<maya_bulge>.uvFilterSize_connected : boolean

<maya_bulge>.uvFilterSize_shader : texturemap

<maya_bulge>.uvFilterSize_paramName : string

<maya_bulge>.filter_connected : boolean

<maya_bulge>.filter_shader : texturemap

<maya_bulge>.filter_paramName : string

<maya_bulge>.filterOffset_connected : boolean

<maya_bulge>.filterOffset_shader : texturemap

<maya_bulge>.filterOffset_paramName : string

<maya_bulge>.invert_connected : boolean

<maya_bulge>.invert_shader : texturemap

<maya_bulge>.invert_paramName : string

<maya_bulge>.alphaIsLuminance_connected : boolean

<maya_bulge>.alphaIsLuminance_shader : texturemap

<maya_bulge>.alphaIsLuminance_paramName : string

<maya_bulge>.colorGain_connected : boolean

<maya_bulge>.colorGain_shader : texturemap

<maya_bulge>.colorGain_paramName : string

<maya_bulge>.colorOffset_connected : boolean

<maya_bulge>.colorOffset_shader : texturemap

<maya_bulge>.colorOffset_paramName : string

<maya_bulge>.alphaGain_connected : boolean

<maya_bulge>.alphaGain_shader : texturemap

<maya_bulge>.alphaGain_paramName : string

<maya_bulge>.alphaOffset_connected : boolean

<maya_bulge>.alphaOffset_shader : texturemap

<maya_bulge>.alphaOffset_paramName : string

<maya_bulge>.defaultColor_connected : boolean

<maya_bulge>.defaultColor_shader : texturemap

<maya_bulge>.defaultColor_paramName : string

<maya_bulge>.TheList : maxObject array

<maya_bulge>.Shader_Version : integer

maya_bulge interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_bump2d : textureMap

maya_bump2d : textureMap {7773161f,525a7555}

Constructor:

maya_bump2d: class instances not creatable by MAXScript

Properties:

<maya_bump2d>.normalCamera : point3

<maya_bump2d>.bumpValue : float

<maya_bump2d>.bumpDepth : float

<maya_bump2d>.bumpFilter : float

<maya_bump2d>.bumpFilterOffset : float

<maya_bump2d>.adjustEdges : boolean

<maya_bump2d>.provide3dInfo : boolean

<maya_bump2d>.uvCoord : point3

<maya_bump2d>.uvFilterSize : point3

<maya_bump2d>.tangentUCamera : point3

<maya_bump2d>.tangentVCamera : point3

<maya_bump2d>.Structure : paramBlock2

<maya_bump2d>.outNormal : point3

<maya_bump2d>.normalCamera_connected : boolean

<maya_bump2d>.normalCamera_shader : texturemap

<maya_bump2d>.normalCamera_paramName : string

<maya_bump2d>.bumpValue_connected : boolean

<maya_bump2d>.bumpValue_shader : texturemap

<maya_bump2d>.bumpValue_paramName : string

<maya_bump2d>.bumpDepth_connected : boolean

<maya_bump2d>.bumpDepth_shader : texturemap

<maya_bump2d>.bumpDepth_paramName : string

<maya_bump2d>.bumpFilter_connected : boolean

<maya_bump2d>.bumpFilter_shader : texturemap

<maya_bump2d>.bumpFilter_paramName : string

<maya_bump2d>.bumpFilterOffset_connected : boolean

<maya_bump2d>.bumpFilterOffset_shader : texturemap

<maya_bump2d>.bumpFilterOffset_paramName : string

<maya_bump2d>.adjustEdges_connected : boolean

<maya_bump2d>.adjustEdges_shader : texturemap

<maya_bump2d>.adjustEdges_paramName : string

<maya_bump2d>.provide3dInfo_connected : boolean

<maya_bump2d>.provide3dInfo_shader : texturemap

<maya_bump2d>.provide3dInfo_paramName : string

<maya_bump2d>.uvCoord_connected : boolean

<maya_bump2d>.uvCoord_shader : texturemap

<maya_bump2d>.uvCoord_paramName : string

<maya_bump2d>.uvFilterSize_connected : boolean

<maya_bump2d>.uvFilterSize_shader : texturemap

<maya_bump2d>.uvFilterSize_paramName : string

<maya_bump2d>.tangentUCamera_connected : boolean

<maya_bump2d>.tangentUCamera_shader : texturemap

<maya_bump2d>.tangentUCamera_paramName : string

<maya_bump2d>.tangentVCamera_connected : boolean

<maya_bump2d>.tangentVCamera_shader : texturemap

<maya_bump2d>.tangentVCamera_paramName : string

<maya_bump2d>.TheList : maxObject array

<maya_bump2d>.Shader_Version : integer

maya_bump2d interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_bump3d : textureMap

maya_bump3d : textureMap {7773161f,525a7455}

Constructor:

maya_bump3d: class instances not creatable by MAXScript

Properties:

<maya_bump3d>.normalCamera : point3

<maya_bump3d>.bumpValue : float

<maya_bump3d>.bumpDepth : float

<maya_bump3d>.bumpFilter : float

<maya_bump3d>.bumpFilterOffset : float

<maya_bump3d>.tangentUCamera : point3

<maya_bump3d>.tangentVCamera : point3

<maya_bump3d>.Structure : paramBlock2

<maya_bump3d>.outNormal : point3

<maya_bump3d>.normalCamera_connected : boolean

<maya_bump3d>.normalCamera_shader : texturemap

<maya_bump3d>.normalCamera_paramName : string

<maya_bump3d>.bumpValue_connected : boolean

<maya_bump3d>.bumpValue_shader : texturemap

<maya_bump3d>.bumpValue_paramName : string

<maya_bump3d>.bumpDepth_connected : boolean

<maya_bump3d>.bumpDepth_shader : texturemap

<maya_bump3d>.bumpDepth_paramName : string

<maya_bump3d>.bumpFilter_connected : boolean

<maya_bump3d>.bumpFilter_shader : texturemap

<maya_bump3d>.bumpFilter_paramName : string

<maya_bump3d>.bumpFilterOffset_connected : boolean

<maya_bump3d>.bumpFilterOffset_shader : texturemap

<maya_bump3d>.bumpFilterOffset_paramName : string

<maya_bump3d>.tangentUCamera_connected : boolean

<maya_bump3d>.tangentUCamera_shader : texturemap

<maya_bump3d>.tangentUCamera_paramName : string

<maya_bump3d>.tangentVCamera_connected : boolean

<maya_bump3d>.tangentVCamera_shader : texturemap

<maya_bump3d>.tangentVCamera_paramName : string

<maya_bump3d>.TheList : maxObject array

<maya_bump3d>.Shader_Version : integer

maya_bump3d interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_cameradata : textureMap

maya_cameradata : textureMap {7773161f,ae0a4849}

Constructor:

maya_cameradata: class instances not creatable by MAXScript

Properties:

<maya_cameradata>.magic : integer

<maya_cameradata>.xPixelAngle : float

<maya_cameradata>.horizontalFilmAperture : float

<maya_cameradata>.verticalFilmAperture : float

<maya_cameradata>.horizontalFilmOffset : float

<maya_cameradata>.verticalFilmOffset : float

<maya_cameradata>.lensSqueezeRatio : float

<maya_cameradata>.orthographicWidth : float

<maya_cameradata>.volumeSamples : integer

<maya_cameradata>.depthJitter : boolean

<maya_cameradata>.depth : boolean

<maya_cameradata>.transparencyBasedDepth : boolean

<maya_cameradata>.threshold : float

<maya_cameradata>.depthType : integer

<maya_cameradata>.shutterOpen : float

<maya_cameradata>.shutterClose : float

<maya_cameradata>.backgroundColor : fRGBA color

<maya_cameradata>.magic_connected : boolean

<maya_cameradata>.magic_shader : texturemap

<maya_cameradata>.magic_paramName : string

<maya_cameradata>.xPixelAngle_connected : boolean

<maya_cameradata>.xPixelAngle_shader : texturemap

<maya_cameradata>.xPixelAngle_paramName : string

<maya_cameradata>.horizontalFilmAperture_connected : boolean

<maya_cameradata>.horizontalFilmAperture_shader : texturemap

<maya_cameradata>.horizontalFilmAperture_paramName : string

<maya_cameradata>.verticalFilmAperture_connected : boolean

<maya_cameradata>.verticalFilmAperture_shader : texturemap

<maya_cameradata>.verticalFilmAperture_paramName : string

<maya_cameradata>.horizontalFilmOffset_connected : boolean

<maya_cameradata>.horizontalFilmOffset_shader : texturemap

<maya_cameradata>.horizontalFilmOffset_paramName : string

<maya_cameradata>.verticalFilmOffset_connected : boolean

<maya_cameradata>.verticalFilmOffset_shader : texturemap

<maya_cameradata>.verticalFilmOffset_paramName : string

<maya_cameradata>.lensSqueezeRatio_connected : boolean

<maya_cameradata>.lensSqueezeRatio_shader : texturemap

<maya_cameradata>.lensSqueezeRatio_paramName : string

<maya_cameradata>.orthographicWidth_connected : boolean

<maya_cameradata>.orthographicWidth_shader : texturemap

<maya_cameradata>.orthographicWidth_paramName : string

<maya_cameradata>.volumeSamples_connected : boolean

<maya_cameradata>.volumeSamples_shader : texturemap

<maya_cameradata>.volumeSamples_paramName : string

<maya_cameradata>.depthJitter_connected : boolean

<maya_cameradata>.depthJitter_shader : texturemap

<maya_cameradata>.depthJitter_paramName : string

<maya_cameradata>.depth_connected : boolean

<maya_cameradata>.depth_shader : texturemap

<maya_cameradata>.depth_paramName : string

<maya_cameradata>.transparencyBasedDepth_connected : boolean

<maya_cameradata>.transparencyBasedDepth_shader : texturemap

<maya_cameradata>.transparencyBasedDepth_paramName : string

<maya_cameradata>.threshold_connected : boolean

<maya_cameradata>.threshold_shader : texturemap

<maya_cameradata>.threshold_paramName : string

<maya_cameradata>.depthType_connected : boolean

<maya_cameradata>.depthType_shader : texturemap

<maya_cameradata>.depthType_paramName : string

<maya_cameradata>.shutterOpen_connected : boolean

<maya_cameradata>.shutterOpen_shader : texturemap

<maya_cameradata>.shutterOpen_paramName : string

<maya_cameradata>.shutterClose_connected : boolean

<maya_cameradata>.shutterClose_shader : texturemap

<maya_cameradata>.shutterClose_paramName : string

<maya_cameradata>.backgroundColor_connected : boolean

<maya_cameradata>.backgroundColor_shader : texturemap

<maya_cameradata>.backgroundColor_paramName : string

<maya_cameradata>.TheList : maxObject array

<maya_cameradata>.Shader_Version : integer

maya_cameradata interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_checker : textureMap

maya_checker : textureMap {7773161f,bc66ad64}

Constructor:

maya_checker: class instances not creatable by MAXScript

Properties:

<maya_checker>.contrast : float

<maya_checker>.color1 : fRGBA color

<maya_checker>.color2 : fRGBA color

<maya_checker>.uvCoord : point3

<maya_checker>.uvFilterSize : point3

<maya_checker>.filter : float

<maya_checker>.filterOffset : float

<maya_checker>.invert : boolean

<maya_checker>.alphaIsLuminance : boolean

<maya_checker>.colorGain : fRGBA color

<maya_checker>.colorOffset : fRGBA color

<maya_checker>.alphaGain : float

<maya_checker>.alphaOffset : float

<maya_checker>.defaultColor : fRGBA color

<maya_checker>.Structure : paramBlock2

<maya_checker>.outColor : fRGBA color

<maya_checker>.outAlpha : float

<maya_checker>.contrast_connected : boolean

<maya_checker>.contrast_shader : texturemap

<maya_checker>.contrast_paramName : string

<maya_checker>.color1_connected : boolean

<maya_checker>.color1_shader : texturemap

<maya_checker>.color1_paramName : string

<maya_checker>.color2_connected : boolean

<maya_checker>.color2_shader : texturemap

<maya_checker>.color2_paramName : string

<maya_checker>.uvCoord_connected : boolean

<maya_checker>.uvCoord_shader : texturemap

<maya_checker>.uvCoord_paramName : string

<maya_checker>.uvFilterSize_connected : boolean

<maya_checker>.uvFilterSize_shader : texturemap

<maya_checker>.uvFilterSize_paramName : string

<maya_checker>.filter_connected : boolean

<maya_checker>.filter_shader : texturemap

<maya_checker>.filter_paramName : string

<maya_checker>.filterOffset_connected : boolean

<maya_checker>.filterOffset_shader : texturemap

<maya_checker>.filterOffset_paramName : string

<maya_checker>.invert_connected : boolean

<maya_checker>.invert_shader : texturemap

<maya_checker>.invert_paramName : string

<maya_checker>.alphaIsLuminance_connected : boolean

<maya_checker>.alphaIsLuminance_shader : texturemap

<maya_checker>.alphaIsLuminance_paramName : string

<maya_checker>.colorGain_connected : boolean

<maya_checker>.colorGain_shader : texturemap

<maya_checker>.colorGain_paramName : string

<maya_checker>.colorOffset_connected : boolean

<maya_checker>.colorOffset_shader : texturemap

<maya_checker>.colorOffset_paramName : string

<maya_checker>.alphaGain_connected : boolean

<maya_checker>.alphaGain_shader : texturemap

<maya_checker>.alphaGain_paramName : string

<maya_checker>.alphaOffset_connected : boolean

<maya_checker>.alphaOffset_shader : texturemap

<maya_checker>.alphaOffset_paramName : string

<maya_checker>.defaultColor_connected : boolean

<maya_checker>.defaultColor_shader : texturemap

<maya_checker>.defaultColor_paramName : string

<maya_checker>.TheList : maxObject array

<maya_checker>.Shader_Version : integer

maya_checker interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_clamp : textureMap

maya_clamp : textureMap {7773161f,4607b672}

Constructor:

maya_clamp: class instances not creatable by MAXScript

Properties:

<maya_clamp>.input : fRGBA color

<maya_clamp>.min : fRGBA color

<maya_clamp>.max : fRGBA color

<maya_clamp>.Structure : paramBlock2

<maya_clamp>.output : fRGBA color

<maya_clamp>.input_connected : boolean

<maya_clamp>.input_shader : texturemap

<maya_clamp>.input_paramName : string

<maya_clamp>.min_connected : boolean

<maya_clamp>.min_shader : texturemap

<maya_clamp>.min_paramName : string

<maya_clamp>.max_connected : boolean

<maya_clamp>.max_shader : texturemap

<maya_clamp>.max_paramName : string

<maya_clamp>.TheList : maxObject array

<maya_clamp>.Shader_Version : integer

maya_clamp interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_cloth : textureMap

maya_cloth : textureMap {7773161f,5407ae59}

Constructor:

maya_cloth: class instances not creatable by MAXScript

Properties:

<maya_cloth>.gapColor : fRGBA color

<maya_cloth>.uColor : fRGBA color

<maya_cloth>.vColor : fRGBA color

<maya_cloth>.uWidth : float

<maya_cloth>.vWidth : float

<maya_cloth>.uWave : float

<maya_cloth>.vWave : float

<maya_cloth>.randomness : float

<maya_cloth>.widthSpread : float

<maya_cloth>.brightSpread : float

<maya_cloth>.uvCoord : point3

<maya_cloth>.uvFilterSize : point3

<maya_cloth>.filter : float

<maya_cloth>.filterOffset : float

<maya_cloth>.invert : boolean

<maya_cloth>.alphaIsLuminance : boolean

<maya_cloth>.colorGain : fRGBA color

<maya_cloth>.colorOffset : fRGBA color

<maya_cloth>.alphaGain : float

<maya_cloth>.alphaOffset : float

<maya_cloth>.defaultColor : fRGBA color

<maya_cloth>.Structure : paramBlock2

<maya_cloth>.outColor : fRGBA color

<maya_cloth>.outAlpha : float

<maya_cloth>.gapColor_connected : boolean

<maya_cloth>.gapColor_shader : texturemap

<maya_cloth>.gapColor_paramName : string

<maya_cloth>.uColor_connected : boolean

<maya_cloth>.uColor_shader : texturemap

<maya_cloth>.uColor_paramName : string

<maya_cloth>.vColor_connected : boolean

<maya_cloth>.vColor_shader : texturemap

<maya_cloth>.vColor_paramName : string

<maya_cloth>.uWidth_connected : boolean

<maya_cloth>.uWidth_shader : texturemap

<maya_cloth>.uWidth_paramName : string

<maya_cloth>.vWidth_connected : boolean

<maya_cloth>.vWidth_shader : texturemap

<maya_cloth>.vWidth_paramName : string

<maya_cloth>.uWave_connected : boolean

<maya_cloth>.uWave_shader : texturemap

<maya_cloth>.uWave_paramName : string

<maya_cloth>.vWave_connected : boolean

<maya_cloth>.vWave_shader : texturemap

<maya_cloth>.vWave_paramName : string

<maya_cloth>.randomness_connected : boolean

<maya_cloth>.randomness_shader : texturemap

<maya_cloth>.randomness_paramName : string

<maya_cloth>.widthSpread_connected : boolean

<maya_cloth>.widthSpread_shader : texturemap

<maya_cloth>.widthSpread_paramName : string

<maya_cloth>.brightSpread_connected : boolean

<maya_cloth>.brightSpread_shader : texturemap

<maya_cloth>.brightSpread_paramName : string

<maya_cloth>.uvCoord_connected : boolean

<maya_cloth>.uvCoord_shader : texturemap

<maya_cloth>.uvCoord_paramName : string

<maya_cloth>.uvFilterSize_connected : boolean

<maya_cloth>.uvFilterSize_shader : texturemap

<maya_cloth>.uvFilterSize_paramName : string

<maya_cloth>.filter_connected : boolean

<maya_cloth>.filter_shader : texturemap

<maya_cloth>.filter_paramName : string

<maya_cloth>.filterOffset_connected : boolean

<maya_cloth>.filterOffset_shader : texturemap

<maya_cloth>.filterOffset_paramName : string

<maya_cloth>.invert_connected : boolean

<maya_cloth>.invert_shader : texturemap

<maya_cloth>.invert_paramName : string

<maya_cloth>.alphaIsLuminance_connected : boolean

<maya_cloth>.alphaIsLuminance_shader : texturemap

<maya_cloth>.alphaIsLuminance_paramName : string

<maya_cloth>.colorGain_connected : boolean

<maya_cloth>.colorGain_shader : texturemap

<maya_cloth>.colorGain_paramName : string

<maya_cloth>.colorOffset_connected : boolean

<maya_cloth>.colorOffset_shader : texturemap

<maya_cloth>.colorOffset_paramName : string

<maya_cloth>.alphaGain_connected : boolean

<maya_cloth>.alphaGain_shader : texturemap

<maya_cloth>.alphaGain_paramName : string

<maya_cloth>.alphaOffset_connected : boolean

<maya_cloth>.alphaOffset_shader : texturemap

<maya_cloth>.alphaOffset_paramName : string

<maya_cloth>.defaultColor_connected : boolean

<maya_cloth>.defaultColor_shader : texturemap

<maya_cloth>.defaultColor_paramName : string

<maya_cloth>.TheList : maxObject array

<maya_cloth>.Shader_Version : integer

maya_cloth interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_cloud : textureMap

maya_cloud : textureMap {7773161f,5407aa5a}

Constructor:

maya_cloud: class instances not creatable by MAXScript

Properties:

<maya_cloud>.color1 : fRGBA color

<maya_cloud>.color2 : fRGBA color

<maya_cloud>.contrast : float

<maya_cloud>.softEdges : boolean

<maya_cloud>.transpRange : float

<maya_cloud>.centerThresh : float

<maya_cloud>.edgeThresh : float

<maya_cloud>.ripples : point3

<maya_cloud>.depth : point3

<maya_cloud>.amplitude : float

<maya_cloud>.ratio : float

<maya_cloud>.filter : float

<maya_cloud>.filterSize : point3

<maya_cloud>.filterOffset : float

<maya_cloud>.blend : float

<maya_cloud>.wrap : boolean

<maya_cloud>.invert : boolean

<maya_cloud>.alphaIsLuminance : boolean

<maya_cloud>.colorGain : fRGBA color

<maya_cloud>.colorOffset : fRGBA color

<maya_cloud>.alphaGain : float

<maya_cloud>.alphaOffset : float

<maya_cloud>.defaultColor : fRGBA color

<maya_cloud>.normalCamera : point3

<maya_cloud>.placementMatrix : matrix3

<maya_cloud>.local : boolean

<maya_cloud>.Structure : paramBlock2

<maya_cloud>.outColor : fRGBA color

<maya_cloud>.outAlpha : float

<maya_cloud>.color1_connected : boolean

<maya_cloud>.color1_shader : texturemap

<maya_cloud>.color1_paramName : string

<maya_cloud>.color2_connected : boolean

<maya_cloud>.color2_shader : texturemap

<maya_cloud>.color2_paramName : string

<maya_cloud>.contrast_connected : boolean

<maya_cloud>.contrast_shader : texturemap

<maya_cloud>.contrast_paramName : string

<maya_cloud>.softEdges_connected : boolean

<maya_cloud>.softEdges_shader : texturemap

<maya_cloud>.softEdges_paramName : string

<maya_cloud>.transpRange_connected : boolean

<maya_cloud>.transpRange_shader : texturemap

<maya_cloud>.transpRange_paramName : string

<maya_cloud>.centerThresh_connected : boolean

<maya_cloud>.centerThresh_shader : texturemap

<maya_cloud>.centerThresh_paramName : string

<maya_cloud>.edgeThresh_connected : boolean

<maya_cloud>.edgeThresh_shader : texturemap

<maya_cloud>.edgeThresh_paramName : string

<maya_cloud>.ripples_connected : boolean

<maya_cloud>.ripples_shader : texturemap

<maya_cloud>.ripples_paramName : string

<maya_cloud>.depth_connected : boolean

<maya_cloud>.depth_shader : texturemap

<maya_cloud>.depth_paramName : string

<maya_cloud>.amplitude_connected : boolean

<maya_cloud>.amplitude_shader : texturemap

<maya_cloud>.amplitude_paramName : string

<maya_cloud>.ratio_connected : boolean

<maya_cloud>.ratio_shader : texturemap

<maya_cloud>.ratio_paramName : string

<maya_cloud>.filter_connected : boolean

<maya_cloud>.filter_shader : texturemap

<maya_cloud>.filter_paramName : string

<maya_cloud>.filterSize_connected : boolean

<maya_cloud>.filterSize_shader : texturemap

<maya_cloud>.filterSize_paramName : string

<maya_cloud>.filterOffset_connected : boolean

<maya_cloud>.filterOffset_shader : texturemap

<maya_cloud>.filterOffset_paramName : string

<maya_cloud>.blend_connected : boolean

<maya_cloud>.blend_shader : texturemap

<maya_cloud>.blend_paramName : string

<maya_cloud>.wrap_connected : boolean

<maya_cloud>.wrap_shader : texturemap

<maya_cloud>.wrap_paramName : string

<maya_cloud>.invert_connected : boolean

<maya_cloud>.invert_shader : texturemap

<maya_cloud>.invert_paramName : string

<maya_cloud>.alphaIsLuminance_connected : boolean

<maya_cloud>.alphaIsLuminance_shader : texturemap

<maya_cloud>.alphaIsLuminance_paramName : string

<maya_cloud>.colorGain_connected : boolean

<maya_cloud>.colorGain_shader : texturemap

<maya_cloud>.colorGain_paramName : string

<maya_cloud>.colorOffset_connected : boolean

<maya_cloud>.colorOffset_shader : texturemap

<maya_cloud>.colorOffset_paramName : string

<maya_cloud>.alphaGain_connected : boolean

<maya_cloud>.alphaGain_shader : texturemap

<maya_cloud>.alphaGain_paramName : string

<maya_cloud>.alphaOffset_connected : boolean

<maya_cloud>.alphaOffset_shader : texturemap

<maya_cloud>.alphaOffset_paramName : string

<maya_cloud>.defaultColor_connected : boolean

<maya_cloud>.defaultColor_shader : texturemap

<maya_cloud>.defaultColor_paramName : string

<maya_cloud>.normalCamera_connected : boolean

<maya_cloud>.normalCamera_shader : texturemap

<maya_cloud>.normalCamera_paramName : string

<maya_cloud>.placementMatrix_connected : boolean

<maya_cloud>.placementMatrix_shader : texturemap

<maya_cloud>.placementMatrix_paramName : string

<maya_cloud>.local_connected : boolean

<maya_cloud>.local_shader : texturemap

<maya_cloud>.local_paramName : string

<maya_cloud>.TheList : maxObject array

<maya_cloud>.Shader_Version : integer

maya_cloud interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_cloudparticles : textureMap

maya_cloudparticles : textureMap {7773161f,5271bb6c}

Constructor:

maya_cloudparticles: class instances not creatable by MAXScript

Properties:

<maya_cloudparticles>.betterIllumination : boolean

<maya_cloudparticles>.disableCloudAxis : boolean

<maya_cloudparticles>.surfaceShading : float

<maya_cloudparticles>.surfaceShader : texturemap

<maya_cloudparticles>.shadowShader : texturemap

<maya_cloudparticles>.threshold : float

<maya_cloudparticles>.filterRadius : float

<maya_cloudparticles>.volumeShader : texturemap

<maya_cloudparticles>.particleSystem : node

<maya_cloudparticles>.visibleInReflections : boolean

<maya_cloudparticles>.visibleInRefractions : boolean

<maya_cloudparticles>.betterIllumination_connected : boolean

<maya_cloudparticles>.betterIllumination_shader : texturemap

<maya_cloudparticles>.betterIllumination_paramName : string

<maya_cloudparticles>.disableCloudAxis_connected : boolean

<maya_cloudparticles>.disableCloudAxis_shader : texturemap

<maya_cloudparticles>.disableCloudAxis_paramName : string

<maya_cloudparticles>.surfaceShading_connected : boolean

<maya_cloudparticles>.surfaceShading_shader : texturemap

<maya_cloudparticles>.surfaceShading_paramName : string

<maya_cloudparticles>.threshold_connected : boolean

<maya_cloudparticles>.threshold_shader : texturemap

<maya_cloudparticles>.threshold_paramName : string

<maya_cloudparticles>.filterRadius_connected : boolean

<maya_cloudparticles>.filterRadius_shader : texturemap

<maya_cloudparticles>.filterRadius_paramName : string

<maya_cloudparticles>.visibleInReflections_connected : boolean

<maya_cloudparticles>.visibleInReflections_shader : texturemap

<maya_cloudparticles>.visibleInReflections_paramName : string

<maya_cloudparticles>.visibleInRefractions_connected : boolean

<maya_cloudparticles>.visibleInRefractions_shader : texturemap

<maya_cloudparticles>.visibleInRefractions_paramName : string

<maya_cloudparticles>.TheList : maxObject array

<maya_cloudparticles>.Shader_Version : integer

maya_cloudparticles interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_color_to_hsv : textureMap

maya_color_to_hsv : textureMap {7773161f,50137357}

Constructor:

maya_color_to_hsv: class instances not creatable by MAXScript

Properties:

<maya_color_to_hsv>.color : fRGBA color

<maya_color_to_hsv>.Structure : paramBlock2

<maya_color_to_hsv>.h : float

<maya_color_to_hsv>.s : float

<maya_color_to_hsv>.v : float

<maya_color_to_hsv>.a : float

<maya_color_to_hsv>.color_connected : boolean

<maya_color_to_hsv>.color_shader : texturemap

<maya_color_to_hsv>.color_paramName : string

<maya_color_to_hsv>.TheList : maxObject array

<maya_color_to_hsv>.Shader_Version : integer

maya_color_to_hsv interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_color_to_rgb : textureMap

maya_color_to_rgb : textureMap {7773161f,642d7363}

Constructor:

maya_color_to_rgb: class instances not creatable by MAXScript

Properties:

<maya_color_to_rgb>.color : fRGBA color

<maya_color_to_rgb>.Structure : paramBlock2

<maya_color_to_rgb>.r : float

<maya_color_to_rgb>.g : float

<maya_color_to_rgb>.b : float

<maya_color_to_rgb>.a : float

<maya_color_to_rgb>.color_connected : boolean

<maya_color_to_rgb>.color_shader : texturemap

<maya_color_to_rgb>.color_paramName : string

<maya_color_to_rgb>.TheList : maxObject array

<maya_color_to_rgb>.Shader_Version : integer

maya_color_to_rgb interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_color_to_vector : textureMap

maya_color_to_vector : textureMap {7773161f,b4429f64}

Constructor:

maya_color_to_vector: class instances not creatable by MAXScript

Properties:

<maya_color_to_vector>.color : fRGBA color

<maya_color_to_vector>.Structure : paramBlock2

<maya_color_to_vector>.vector : point3

<maya_color_to_vector>.a : float

<maya_color_to_vector>.color_connected : boolean

<maya_color_to_vector>.color_shader : texturemap

<maya_color_to_vector>.color_paramName : string

<maya_color_to_vector>.TheList : maxObject array

<maya_color_to_vector>.Shader_Version : integer

maya_color_to_vector interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_condition : textureMap

maya_condition : textureMap {7773161f,ac54494c}

Constructor:

maya_condition: class instances not creatable by MAXScript

Properties:

<maya_condition>.operation : integer

<maya_condition>.firstTerm : float

<maya_condition>.secondTerm : float

<maya_condition>.color1 : fRGBA color

<maya_condition>.color2 : fRGBA color

<maya_condition>.Structure : paramBlock2

<maya_condition>.outColor : fRGBA color

<maya_condition>.operation_connected : boolean

<maya_condition>.operation_shader : texturemap

<maya_condition>.operation_paramName : string

<maya_condition>.firstTerm_connected : boolean

<maya_condition>.firstTerm_shader : texturemap

<maya_condition>.firstTerm_paramName : string

<maya_condition>.secondTerm_connected : boolean

<maya_condition>.secondTerm_shader : texturemap

<maya_condition>.secondTerm_paramName : string

<maya_condition>.color1_connected : boolean

<maya_condition>.color1_shader : texturemap

<maya_condition>.color1_paramName : string

<maya_condition>.color2_connected : boolean

<maya_condition>.color2_shader : texturemap

<maya_condition>.color2_paramName : string

<maya_condition>.TheList : maxObject array

<maya_condition>.Shader_Version : integer

maya_condition interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_cone : textureMap

maya_cone : textureMap {7773161f,5508466a}

Constructor:

maya_cone: class instances not creatable by MAXScript

Properties:

<maya_cone>.coneAngle : float

<maya_cone>.coneCap : float

<maya_cone>.uSpans : integer

<maya_cone>.vSpans : integer

<maya_cone>.renderableObjectType : integer

<maya_cone>.volumeSamplesOverride : boolean

<maya_cone>.volumeSamples : integer

<maya_cone>.depthJitter : boolean

<maya_cone>.coneAngle_connected : boolean

<maya_cone>.coneAngle_shader : texturemap

<maya_cone>.coneAngle_paramName : string

<maya_cone>.coneCap_connected : boolean

<maya_cone>.coneCap_shader : texturemap

<maya_cone>.coneCap_paramName : string

<maya_cone>.uSpans_connected : boolean

<maya_cone>.uSpans_shader : texturemap

<maya_cone>.uSpans_paramName : string

<maya_cone>.vSpans_connected : boolean

<maya_cone>.vSpans_shader : texturemap

<maya_cone>.vSpans_paramName : string

<maya_cone>.renderableObjectType_connected : boolean

<maya_cone>.renderableObjectType_shader : texturemap

<maya_cone>.renderableObjectType_paramName : string

<maya_cone>.volumeSamplesOverride_connected : boolean

<maya_cone>.volumeSamplesOverride_shader : texturemap

<maya_cone>.volumeSamplesOverride_paramName : string

<maya_cone>.volumeSamples_connected : boolean

<maya_cone>.volumeSamples_shader : texturemap

<maya_cone>.volumeSamples_paramName : string

<maya_cone>.depthJitter_connected : boolean

<maya_cone>.depthJitter_shader : texturemap

<maya_cone>.depthJitter_paramName : string

<maya_cone>.TheList : maxObject array

<maya_cone>.Shader_Version : integer

maya_cone interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_contour : textureMap

maya_contour : textureMap {7773161f,c355b159}

Constructor:

maya_contour: class instances not creatable by MAXScript

Properties:

<maya_contour>.color : fRGBA color

<maya_contour>.alpha : float

<maya_contour>.width : float

<maya_contour>.relativeWidth : boolean

<maya_contour>.color_connected : boolean

<maya_contour>.color_shader : texturemap

<maya_contour>.color_paramName : string

<maya_contour>.alpha_connected : boolean

<maya_contour>.alpha_shader : texturemap

<maya_contour>.alpha_paramName : string

<maya_contour>.width_connected : boolean

<maya_contour>.width_shader : texturemap

<maya_contour>.width_paramName : string

<maya_contour>.relativeWidth_connected : boolean

<maya_contour>.relativeWidth_shader : texturemap

<maya_contour>.relativeWidth_paramName : string

<maya_contour>.TheList : maxObject array

<maya_contour>.Shader_Version : integer

maya_contour interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_contourcontrast : textureMap

maya_contourcontrast : textureMap {7773161f,c370a76a}

Constructor:

maya_contourcontrast: class instances not creatable by MAXScript

Properties:

<maya_contourcontrast>.background : boolean

<maya_contourcontrast>.color : fRGBA color

<maya_contourcontrast>.pri_idx : boolean

<maya_contourcontrast>.pri_data : boolean

<maya_contourcontrast>.instance : boolean

<maya_contourcontrast>.material : boolean

<maya_contourcontrast>.label : boolean

<maya_contourcontrast>.dist : float

<maya_contourcontrast>.depth : float

<maya_contourcontrast>.normal : float

<maya_contourcontrast>.normal_geom : boolean

<maya_contourcontrast>.inv_normal : boolean

<maya_contourcontrast>.tex : point3

<maya_contourcontrast>.background_connected : boolean

<maya_contourcontrast>.background_shader : texturemap

<maya_contourcontrast>.background_paramName : string

<maya_contourcontrast>.color_connected : boolean

<maya_contourcontrast>.color_shader : texturemap

<maya_contourcontrast>.color_paramName : string

<maya_contourcontrast>.pri_idx_connected : boolean

<maya_contourcontrast>.pri_idx_shader : texturemap

<maya_contourcontrast>.pri_idx_paramName : string

<maya_contourcontrast>.pri_data_connected : boolean

<maya_contourcontrast>.pri_data_shader : texturemap

<maya_contourcontrast>.pri_data_paramName : string

<maya_contourcontrast>.instance_connected : boolean

<maya_contourcontrast>.instance_shader : texturemap

<maya_contourcontrast>.instance_paramName : string

<maya_contourcontrast>.material_connected : boolean

<maya_contourcontrast>.material_shader : texturemap

<maya_contourcontrast>.material_paramName : string

<maya_contourcontrast>.label_connected : boolean

<maya_contourcontrast>.label_shader : texturemap

<maya_contourcontrast>.label_paramName : string

<maya_contourcontrast>.dist_connected : boolean

<maya_contourcontrast>.dist_shader : texturemap

<maya_contourcontrast>.dist_paramName : string

<maya_contourcontrast>.depth_connected : boolean

<maya_contourcontrast>.depth_shader : texturemap

<maya_contourcontrast>.depth_paramName : string

<maya_contourcontrast>.normal_connected : boolean

<maya_contourcontrast>.normal_shader : texturemap

<maya_contourcontrast>.normal_paramName : string

<maya_contourcontrast>.normal_geom_connected : boolean

<maya_contourcontrast>.normal_geom_shader : texturemap

<maya_contourcontrast>.normal_geom_paramName : string

<maya_contourcontrast>.inv_normal_connected : boolean

<maya_contourcontrast>.inv_normal_shader : texturemap

<maya_contourcontrast>.inv_normal_paramName : string

<maya_contourcontrast>.tex_connected : boolean

<maya_contourcontrast>.tex_shader : texturemap

<maya_contourcontrast>.tex_paramName : string

<maya_contourcontrast>.TheList : maxObject array

<maya_contourcontrast>.Shader_Version : integer

maya_contourcontrast interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_contouroutput : textureMap

maya_contouroutput : textureMap {7773161f,5309b06f}

Constructor:

maya_contouroutput: class instances not creatable by MAXScript

Properties:

<maya_contouroutput>.samples : integer

<maya_contouroutput>.filter : integer

<maya_contouroutput>.filterSupport : float

<maya_contouroutput>.clearImage : boolean

<maya_contouroutput>.clearColor : fRGBA color

<maya_contouroutput>.samples_connected : boolean

<maya_contouroutput>.samples_shader : texturemap

<maya_contouroutput>.samples_paramName : string

<maya_contouroutput>.filter_connected : boolean

<maya_contouroutput>.filter_shader : texturemap

<maya_contouroutput>.filter_paramName : string

<maya_contouroutput>.filterSupport_connected : boolean

<maya_contouroutput>.filterSupport_shader : texturemap

<maya_contouroutput>.filterSupport_paramName : string

<maya_contouroutput>.clearImage_connected : boolean

<maya_contouroutput>.clearImage_shader : texturemap

<maya_contouroutput>.clearImage_paramName : string

<maya_contouroutput>.clearColor_connected : boolean

<maya_contouroutput>.clearColor_shader : texturemap

<maya_contouroutput>.clearColor_paramName : string

<maya_contouroutput>.TheList : maxObject array

<maya_contouroutput>.Shader_Version : integer

maya_contouroutput interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_contourstore : textureMap

maya_contourstore : textureMap {7773161f,54fe5d63}

Constructor:

maya_contourstore: class instances not creatable by MAXScript

Properties:

<maya_contourstore>.Structure : paramBlock2

<maya_contourstore>.color : fRGBA color

<maya_contourstore>.pri_idx : integer

<maya_contourstore>.pri_data : integer

<maya_contourstore>.instance : node

<maya_contourstore>.material : material

<maya_contourstore>.label : integer

<maya_contourstore>.dist : float

<maya_contourstore>.point : point3

<maya_contourstore>.normal : point3

<maya_contourstore>.normal_geom : point3

<maya_contourstore>.inv_normal : boolean

<maya_contourstore>.tex : point3

<maya_contourstore>.TheList : maxObject array

<maya_contourstore>.Shader_Version : integer

maya_contourstore interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_contrast : textureMap

maya_contrast : textureMap {7773161f,c269b445}

Constructor:

maya_contrast: class instances not creatable by MAXScript

Properties:

<maya_contrast>.value : point3

<maya_contrast>.contrast : point3

<maya_contrast>.bias : point3

<maya_contrast>.Structure : paramBlock2

<maya_contrast>.outValue : point3

<maya_contrast>.value_connected : boolean

<maya_contrast>.value_shader : texturemap

<maya_contrast>.value_paramName : string

<maya_contrast>.contrast_connected : boolean

<maya_contrast>.contrast_shader : texturemap

<maya_contrast>.contrast_paramName : string

<maya_contrast>.bias_connected : boolean

<maya_contrast>.bias_shader : texturemap

<maya_contrast>.bias_paramName : string

<maya_contrast>.TheList : maxObject array

<maya_contrast>.Shader_Version : integer

maya_contrast interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_crater : textureMap

maya_crater : textureMap {7773161f,466bab59}

Constructor:

maya_crater: class instances not creatable by MAXScript

Properties:

<maya_crater>.shaker : float

<maya_crater>.channel1 : fRGBA color

<maya_crater>.channel2 : fRGBA color

<maya_crater>.channel3 : fRGBA color

<maya_crater>.melt : float

<maya_crater>.balance : float

<maya_crater>.frequency : float

<maya_crater>.normDepth : float

<maya_crater>.normMelt : float

<maya_crater>.normBalance : float

<maya_crater>.normFrequency : float

<maya_crater>.filter : float

<maya_crater>.filterSize : point3

<maya_crater>.filterOffset : float

<maya_crater>.blend : float

<maya_crater>.wrap : boolean

<maya_crater>.invert : boolean

<maya_crater>.alphaIsLuminance : boolean

<maya_crater>.colorGain : fRGBA color

<maya_crater>.colorOffset : fRGBA color

<maya_crater>.alphaGain : float

<maya_crater>.alphaOffset : float

<maya_crater>.defaultColor : fRGBA color

<maya_crater>.normalCamera : point3

<maya_crater>.placementMatrix : matrix3

<maya_crater>.local : boolean

<maya_crater>.Structure : paramBlock2

<maya_crater>.outColor : fRGBA color

<maya_crater>.outAlpha : float

<maya_crater>.outNormal : point3

<maya_crater>.shaker_connected : boolean

<maya_crater>.shaker_shader : texturemap

<maya_crater>.shaker_paramName : string

<maya_crater>.channel1_connected : boolean

<maya_crater>.channel1_shader : texturemap

<maya_crater>.channel1_paramName : string

<maya_crater>.channel2_connected : boolean

<maya_crater>.channel2_shader : texturemap

<maya_crater>.channel2_paramName : string

<maya_crater>.channel3_connected : boolean

<maya_crater>.channel3_shader : texturemap

<maya_crater>.channel3_paramName : string

<maya_crater>.melt_connected : boolean

<maya_crater>.melt_shader : texturemap

<maya_crater>.melt_paramName : string

<maya_crater>.balance_connected : boolean

<maya_crater>.balance_shader : texturemap

<maya_crater>.balance_paramName : string

<maya_crater>.frequency_connected : boolean

<maya_crater>.frequency_shader : texturemap

<maya_crater>.frequency_paramName : string

<maya_crater>.normDepth_connected : boolean

<maya_crater>.normDepth_shader : texturemap

<maya_crater>.normDepth_paramName : string

<maya_crater>.normMelt_connected : boolean

<maya_crater>.normMelt_shader : texturemap

<maya_crater>.normMelt_paramName : string

<maya_crater>.normBalance_connected : boolean

<maya_crater>.normBalance_shader : texturemap

<maya_crater>.normBalance_paramName : string

<maya_crater>.normFrequency_connected : boolean

<maya_crater>.normFrequency_shader : texturemap

<maya_crater>.normFrequency_paramName : string

<maya_crater>.filter_connected : boolean

<maya_crater>.filter_shader : texturemap

<maya_crater>.filter_paramName : string

<maya_crater>.filterSize_connected : boolean

<maya_crater>.filterSize_shader : texturemap

<maya_crater>.filterSize_paramName : string

<maya_crater>.filterOffset_connected : boolean

<maya_crater>.filterOffset_shader : texturemap

<maya_crater>.filterOffset_paramName : string

<maya_crater>.blend_connected : boolean

<maya_crater>.blend_shader : texturemap

<maya_crater>.blend_paramName : string

<maya_crater>.wrap_connected : boolean

<maya_crater>.wrap_shader : texturemap

<maya_crater>.wrap_paramName : string

<maya_crater>.invert_connected : boolean

<maya_crater>.invert_shader : texturemap

<maya_crater>.invert_paramName : string

<maya_crater>.alphaIsLuminance_connected : boolean

<maya_crater>.alphaIsLuminance_shader : texturemap

<maya_crater>.alphaIsLuminance_paramName : string

<maya_crater>.colorGain_connected : boolean

<maya_crater>.colorGain_shader : texturemap

<maya_crater>.colorGain_paramName : string

<maya_crater>.colorOffset_connected : boolean

<maya_crater>.colorOffset_shader : texturemap

<maya_crater>.colorOffset_paramName : string

<maya_crater>.alphaGain_connected : boolean

<maya_crater>.alphaGain_shader : texturemap

<maya_crater>.alphaGain_paramName : string

<maya_crater>.alphaOffset_connected : boolean

<maya_crater>.alphaOffset_shader : texturemap

<maya_crater>.alphaOffset_paramName : string

<maya_crater>.defaultColor_connected : boolean

<maya_crater>.defaultColor_shader : texturemap

<maya_crater>.defaultColor_paramName : string

<maya_crater>.normalCamera_connected : boolean

<maya_crater>.normalCamera_shader : texturemap

<maya_crater>.normalCamera_paramName : string

<maya_crater>.placementMatrix_connected : boolean

<maya_crater>.placementMatrix_shader : texturemap

<maya_crater>.placementMatrix_paramName : string

<maya_crater>.local_connected : boolean

<maya_crater>.local_shader : texturemap

<maya_crater>.local_paramName : string

<maya_crater>.TheList : maxObject array

<maya_crater>.Shader_Version : integer

maya_crater interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_curve : textureMap

maya_curve : textureMap {7773161f,58feab57}

Constructor:

maya_curve: class instances not creatable by MAXScript

Properties:

<maya_curve>.keys : paramBlock2 array

<maya_curve>.isWeighted : boolean

<maya_curve>.preInfinity : integer

<maya_curve>.postInfinity : integer

<maya_curve>.time : float

<maya_curve>.value : float

<maya_curve>.tanInX : float

<maya_curve>.tanInY : float

<maya_curve>.tanOutX : float

<maya_curve>.tanOutY : float

<maya_curve>.isWeighted_connected : boolean

<maya_curve>.isWeighted_shader : texturemap

<maya_curve>.isWeighted_paramName : string

<maya_curve>.preInfinity_connected : boolean

<maya_curve>.preInfinity_shader : texturemap

<maya_curve>.preInfinity_paramName : string

<maya_curve>.postInfinity_connected : boolean

<maya_curve>.postInfinity_shader : texturemap

<maya_curve>.postInfinity_paramName : string

<maya_curve>.TheList : maxObject array

<maya_curve>.Shader_Version : integer

maya_curve interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_directionallight : textureMap

maya_directionallight : textureMap {7773161f,c454a533}

Constructor:

maya_directionallight: class instances not creatable by MAXScript

Properties:

<maya_directionallight>.useLightPosition : boolean

<maya_directionallight>.lightAngle : float

<maya_directionallight>.useDepthMapShadows : boolean

<maya_directionallight>.emitDiffuse : boolean

<maya_directionallight>.emitSpecular : boolean

<maya_directionallight>.color : fRGBA color

<maya_directionallight>.intensity : float

<maya_directionallight>.useRayTraceShadows : boolean

<maya_directionallight>.shadowColor : fRGBA color

<maya_directionallight>.shadowRays : integer

<maya_directionallight>.rayDepthLimit : integer

<maya_directionallight>.useLightPosition_connected : boolean

<maya_directionallight>.useLightPosition_shader : texturemap

<maya_directionallight>.useLightPosition_paramName : string

<maya_directionallight>.lightAngle_connected : boolean

<maya_directionallight>.lightAngle_shader : texturemap

<maya_directionallight>.lightAngle_paramName : string

<maya_directionallight>.useDepthMapShadows_connected : boolean

<maya_directionallight>.useDepthMapShadows_shader : texturemap

<maya_directionallight>.useDepthMapShadows_paramName : string

<maya_directionallight>.emitDiffuse_connected : boolean

<maya_directionallight>.emitDiffuse_shader : texturemap

<maya_directionallight>.emitDiffuse_paramName : string

<maya_directionallight>.emitSpecular_connected : boolean

<maya_directionallight>.emitSpecular_shader : texturemap

<maya_directionallight>.emitSpecular_paramName : string

<maya_directionallight>.color_connected : boolean

<maya_directionallight>.color_shader : texturemap

<maya_directionallight>.color_paramName : string

<maya_directionallight>.intensity_connected : boolean

<maya_directionallight>.intensity_shader : texturemap

<maya_directionallight>.intensity_paramName : string

<maya_directionallight>.useRayTraceShadows_connected : boolean

<maya_directionallight>.useRayTraceShadows_shader : texturemap

<maya_directionallight>.useRayTraceShadows_paramName : string

<maya_directionallight>.shadowColor_connected : boolean

<maya_directionallight>.shadowColor_shader : texturemap

<maya_directionallight>.shadowColor_paramName : string

<maya_directionallight>.shadowRays_connected : boolean

<maya_directionallight>.shadowRays_shader : texturemap

<maya_directionallight>.shadowRays_paramName : string

<maya_directionallight>.rayDepthLimit_connected : boolean

<maya_directionallight>.rayDepthLimit_shader : texturemap

<maya_directionallight>.rayDepthLimit_paramName : string

<maya_directionallight>.TheList : maxObject array

<maya_directionallight>.Shader_Version : integer

maya_directionallight interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_displace : textureMap

maya_displace : textureMap {7773161f,b763ad3a}

Constructor:

maya_displace: class instances not creatable by MAXScript

Properties:

<maya_displace>.displacement : float

<maya_displace>.Structure : paramBlock2

<maya_displace>.displacement : float

<maya_displace>.displacement_connected : boolean

<maya_displace>.displacement_shader : texturemap

<maya_displace>.displacement_paramName : string

<maya_displace>.TheList : maxObject array

<maya_displace>.Shader_Version : integer

maya_displace interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_distancebetween : textureMap

maya_distancebetween : textureMap {7773161f,b170a767}

Constructor:

maya_distancebetween: class instances not creatable by MAXScript

Properties:

<maya_distancebetween>.point1 : point3

<maya_distancebetween>.matrix1 : matrix3

<maya_distancebetween>.point2 : point3

<maya_distancebetween>.matrix2 : matrix3

<maya_distancebetween>.Structure : paramBlock2

<maya_distancebetween>.distance : float

<maya_distancebetween>.point1_connected : boolean

<maya_distancebetween>.point1_shader : texturemap

<maya_distancebetween>.point1_paramName : string

<maya_distancebetween>.matrix1_connected : boolean

<maya_distancebetween>.matrix1_shader : texturemap

<maya_distancebetween>.matrix1_paramName : string

<maya_distancebetween>.point2_connected : boolean

<maya_distancebetween>.point2_shader : texturemap

<maya_distancebetween>.point2_paramName : string

<maya_distancebetween>.matrix2_connected : boolean

<maya_distancebetween>.matrix2_shader : texturemap

<maya_distancebetween>.matrix2_paramName : string

<maya_distancebetween>.TheList : maxObject array

<maya_distancebetween>.Shader_Version : integer

maya_distancebetween interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_dof : textureMap

maya_dof : textureMap {7773161f,4d084945}

Constructor:

maya_dof: class instances not creatable by MAXScript

Properties:

<maya_dof>.focusDistance : float

<maya_dof>.fStop : float

<maya_dof>.focusRegionScale : float

<maya_dof>.lensSamples : integer

<maya_dof>.focusDistance_connected : boolean

<maya_dof>.focusDistance_shader : texturemap

<maya_dof>.focusDistance_paramName : string

<maya_dof>.fStop_connected : boolean

<maya_dof>.fStop_shader : texturemap

<maya_dof>.fStop_paramName : string

<maya_dof>.focusRegionScale_connected : boolean

<maya_dof>.focusRegionScale_shader : texturemap

<maya_dof>.focusRegionScale_paramName : string

<maya_dof>.lensSamples_connected : boolean

<maya_dof>.lensSamples_shader : texturemap

<maya_dof>.lensSamples_paramName : string

<maya_dof>.TheList : maxObject array

<maya_dof>.Shader_Version : integer

maya_dof interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_doubleswitch : textureMap

maya_doubleswitch : textureMap {7773161f,49f94462}

Constructor:

maya_doubleswitch: class instances not creatable by MAXScript

Properties:

<maya_doubleswitch>.default : point3

<maya_doubleswitch>.input : paramBlock2 array

<maya_doubleswitch>.inShape : node

<maya_doubleswitch>.inDouble : point3

<maya_doubleswitch>.Structure : paramBlock2

<maya_doubleswitch>.output : point3

<maya_doubleswitch>.default_connected : boolean

<maya_doubleswitch>.default_shader : texturemap

<maya_doubleswitch>.default_paramName : string

<maya_doubleswitch>.TheList : maxObject array

<maya_doubleswitch>.Shader_Version : integer

maya_doubleswitch interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_envball : textureMap

maya_envball : textureMap {7773161f,c16da963}

Constructor:

maya_envball: class instances not creatable by MAXScript

Properties:

<maya_envball>.image : fRGBA color

<maya_envball>.inclination : float

<maya_envball>.elevation : float

<maya_envball>.skyRadius : float

<maya_envball>.bottom : float

<maya_envball>.top : float

<maya_envball>.left : float

<maya_envball>.right : float

<maya_envball>.front : float

<maya_envball>.back : float

<maya_envball>.reflect : boolean

<maya_envball>.eyeSpace : boolean

<maya_envball>.placementMatrix : matrix3

<maya_envball>.Structure : paramBlock2

<maya_envball>.outColor : fRGBA color

<maya_envball>.outAlpha : float

<maya_envball>.image_connected : boolean

<maya_envball>.image_shader : texturemap

<maya_envball>.image_paramName : string

<maya_envball>.inclination_connected : boolean

<maya_envball>.inclination_shader : texturemap

<maya_envball>.inclination_paramName : string

<maya_envball>.elevation_connected : boolean

<maya_envball>.elevation_shader : texturemap

<maya_envball>.elevation_paramName : string

<maya_envball>.skyRadius_connected : boolean

<maya_envball>.skyRadius_shader : texturemap

<maya_envball>.skyRadius_paramName : string

<maya_envball>.bottom_connected : boolean

<maya_envball>.bottom_shader : texturemap

<maya_envball>.bottom_paramName : string

<maya_envball>.top_connected : boolean

<maya_envball>.top_shader : texturemap

<maya_envball>.top_paramName : string

<maya_envball>.left_connected : boolean

<maya_envball>.left_shader : texturemap

<maya_envball>.left_paramName : string

<maya_envball>.right_connected : boolean

<maya_envball>.right_shader : texturemap

<maya_envball>.right_paramName : string

<maya_envball>.front_connected : boolean

<maya_envball>.front_shader : texturemap

<maya_envball>.front_paramName : string

<maya_envball>.back_connected : boolean

<maya_envball>.back_shader : texturemap

<maya_envball>.back_paramName : string

<maya_envball>.reflect_connected : boolean

<maya_envball>.reflect_shader : texturemap

<maya_envball>.reflect_paramName : string

<maya_envball>.eyeSpace_connected : boolean

<maya_envball>.eyeSpace_shader : texturemap

<maya_envball>.eyeSpace_paramName : string

<maya_envball>.placementMatrix_connected : boolean

<maya_envball>.placementMatrix_shader : texturemap

<maya_envball>.placementMatrix_paramName : string

<maya_envball>.TheList : maxObject array

<maya_envball>.Shader_Version : integer

maya_envball interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_envchrome : textureMap

maya_envchrome : textureMap {7773161f,be574d4f}

Constructor:

maya_envchrome: class instances not creatable by MAXScript

Properties:

<maya_envchrome>.skyColor : fRGBA color

<maya_envchrome>.zenithColor : fRGBA color

<maya_envchrome>.lightColor : fRGBA color

<maya_envchrome>.lightWidth : float

<maya_envchrome>.lightWidthGain : float

<maya_envchrome>.lightWidthOffset : float

<maya_envchrome>.lightDepth : float

<maya_envchrome>.lightDepthGain : float

<maya_envchrome>.lightDepthOffset : float

<maya_envchrome>.realFloor : boolean

<maya_envchrome>.floorColor : fRGBA color

<maya_envchrome>.floorAltitude : float

<maya_envchrome>.horizonColor : fRGBA color

<maya_envchrome>.gridColor : fRGBA color

<maya_envchrome>.gridWidth : float

<maya_envchrome>.gridWidthGain : float

<maya_envchrome>.gridWidthOffset : float

<maya_envchrome>.gridDepth : float

<maya_envchrome>.gridDepthGain : float

<maya_envchrome>.gridDepthOffset : float

<maya_envchrome>.placementMatrix : matrix3

<maya_envchrome>.Structure : paramBlock2

<maya_envchrome>.outColor : fRGBA color

<maya_envchrome>.outAlpha : float

<maya_envchrome>.skyColor_connected : boolean

<maya_envchrome>.skyColor_shader : texturemap

<maya_envchrome>.skyColor_paramName : string

<maya_envchrome>.zenithColor_connected : boolean

<maya_envchrome>.zenithColor_shader : texturemap

<maya_envchrome>.zenithColor_paramName : string

<maya_envchrome>.lightColor_connected : boolean

<maya_envchrome>.lightColor_shader : texturemap

<maya_envchrome>.lightColor_paramName : string

<maya_envchrome>.lightWidth_connected : boolean

<maya_envchrome>.lightWidth_shader : texturemap

<maya_envchrome>.lightWidth_paramName : string

<maya_envchrome>.lightWidthGain_connected : boolean

<maya_envchrome>.lightWidthGain_shader : texturemap

<maya_envchrome>.lightWidthGain_paramName : string

<maya_envchrome>.lightWidthOffset_connected : boolean

<maya_envchrome>.lightWidthOffset_shader : texturemap

<maya_envchrome>.lightWidthOffset_paramName : string

<maya_envchrome>.lightDepth_connected : boolean

<maya_envchrome>.lightDepth_shader : texturemap

<maya_envchrome>.lightDepth_paramName : string

<maya_envchrome>.lightDepthGain_connected : boolean

<maya_envchrome>.lightDepthGain_shader : texturemap

<maya_envchrome>.lightDepthGain_paramName : string

<maya_envchrome>.lightDepthOffset_connected : boolean

<maya_envchrome>.lightDepthOffset_shader : texturemap

<maya_envchrome>.lightDepthOffset_paramName : string

<maya_envchrome>.realFloor_connected : boolean

<maya_envchrome>.realFloor_shader : texturemap

<maya_envchrome>.realFloor_paramName : string

<maya_envchrome>.floorColor_connected : boolean

<maya_envchrome>.floorColor_shader : texturemap

<maya_envchrome>.floorColor_paramName : string

<maya_envchrome>.floorAltitude_connected : boolean

<maya_envchrome>.floorAltitude_shader : texturemap

<maya_envchrome>.floorAltitude_paramName : string

<maya_envchrome>.horizonColor_connected : boolean

<maya_envchrome>.horizonColor_shader : texturemap

<maya_envchrome>.horizonColor_paramName : string

<maya_envchrome>.gridColor_connected : boolean

<maya_envchrome>.gridColor_shader : texturemap

<maya_envchrome>.gridColor_paramName : string

<maya_envchrome>.gridWidth_connected : boolean

<maya_envchrome>.gridWidth_shader : texturemap

<maya_envchrome>.gridWidth_paramName : string

<maya_envchrome>.gridWidthGain_connected : boolean

<maya_envchrome>.gridWidthGain_shader : texturemap

<maya_envchrome>.gridWidthGain_paramName : string

<maya_envchrome>.gridWidthOffset_connected : boolean

<maya_envchrome>.gridWidthOffset_shader : texturemap

<maya_envchrome>.gridWidthOffset_paramName : string

<maya_envchrome>.gridDepth_connected : boolean

<maya_envchrome>.gridDepth_shader : texturemap

<maya_envchrome>.gridDepth_paramName : string

<maya_envchrome>.gridDepthGain_connected : boolean

<maya_envchrome>.gridDepthGain_shader : texturemap

<maya_envchrome>.gridDepthGain_paramName : string

<maya_envchrome>.gridDepthOffset_connected : boolean

<maya_envchrome>.gridDepthOffset_shader : texturemap

<maya_envchrome>.gridDepthOffset_paramName : string

<maya_envchrome>.placementMatrix_connected : boolean

<maya_envchrome>.placementMatrix_shader : texturemap

<maya_envchrome>.placementMatrix_paramName : string

<maya_envchrome>.TheList : maxObject array

<maya_envchrome>.Shader_Version : integer

maya_envchrome interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_envcolor : textureMap

maya_envcolor : textureMap {7773161f,be6daf36}

Constructor:

maya_envcolor: class instances not creatable by MAXScript

Properties:

<maya_envcolor>.color : fRGBA color

<maya_envcolor>.color_connected : boolean

<maya_envcolor>.color_shader : texturemap

<maya_envcolor>.color_paramName : string

<maya_envcolor>.TheList : maxObject array

<maya_envcolor>.Shader_Version : integer

maya_envcolor interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_envcube : textureMap

maya_envcube : textureMap {7773161f,b867b564}

Constructor:

maya_envcube: class instances not creatable by MAXScript

Properties:

<maya_envcube>.infiniteSize : boolean

<maya_envcube>.left : fRGBA color

<maya_envcube>.right : fRGBA color

<maya_envcube>.top : fRGBA color

<maya_envcube>.bottom : fRGBA color

<maya_envcube>.front : fRGBA color

<maya_envcube>.back : fRGBA color

<maya_envcube>.placementMatrix : matrix3

<maya_envcube>.Structure : paramBlock2

<maya_envcube>.outColor : fRGBA color

<maya_envcube>.outAlpha : float

<maya_envcube>.infiniteSize_connected : boolean

<maya_envcube>.infiniteSize_shader : texturemap

<maya_envcube>.infiniteSize_paramName : string

<maya_envcube>.left_connected : boolean

<maya_envcube>.left_shader : texturemap

<maya_envcube>.left_paramName : string

<maya_envcube>.right_connected : boolean

<maya_envcube>.right_shader : texturemap

<maya_envcube>.right_paramName : string

<maya_envcube>.top_connected : boolean

<maya_envcube>.top_shader : texturemap

<maya_envcube>.top_paramName : string

<maya_envcube>.bottom_connected : boolean

<maya_envcube>.bottom_shader : texturemap

<maya_envcube>.bottom_paramName : string

<maya_envcube>.front_connected : boolean

<maya_envcube>.front_shader : texturemap

<maya_envcube>.front_paramName : string

<maya_envcube>.back_connected : boolean

<maya_envcube>.back_shader : texturemap

<maya_envcube>.back_paramName : string

<maya_envcube>.placementMatrix_connected : boolean

<maya_envcube>.placementMatrix_shader : texturemap

<maya_envcube>.placementMatrix_paramName : string

<maya_envcube>.TheList : maxObject array

<maya_envcube>.Shader_Version : integer

maya_envcube interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_envfog : textureMap

maya_envfog : textureMap {7773161f,5d62af67}

Constructor:

maya_envfog: class instances not creatable by MAXScript

Properties:

<maya_envfog>.distanceClipPlanes : integer

<maya_envfog>.useLayer : boolean

<maya_envfog>.useHeight : boolean

<maya_envfog>.blendRange : float

<maya_envfog>.saturationDistance : float

<maya_envfog>.fogNearDistance : float

<maya_envfog>.fogFarDistance : float

<maya_envfog>.layer : float

<maya_envfog>.minHeight : float

<maya_envfog>.maxHeight : float

<maya_envfog>.physicalFog : boolean

<maya_envfog>.fogType : integer

<maya_envfog>.fogDensity : float

<maya_envfog>.fogColor : fRGBA color

<maya_envfog>.fogOpacity : fRGBA color

<maya_envfog>.fogMinHeight : float

<maya_envfog>.fogMaxHeight : float

<maya_envfog>.fogDecay : float

<maya_envfog>.fogLightScatter : float

<maya_envfog>.airDensity : float

<maya_envfog>.airColor : fRGBA color

<maya_envfog>.airOpacity : fRGBA color

<maya_envfog>.airMinHeight : float

<maya_envfog>.airMaxHeight : float

<maya_envfog>.airDecay : float

<maya_envfog>.airLightScatter : float

<maya_envfog>.waterDensity : float

<maya_envfog>.waterColor : fRGBA color

<maya_envfog>.waterOpacity : fRGBA color

<maya_envfog>.waterLevel : float

<maya_envfog>.waterDepth : float

<maya_envfog>.waterLightDecay : float

<maya_envfog>.waterLightScatter : float

<maya_envfog>.planetRadius : float

<maya_envfog>.fogAxis : integer

<maya_envfog>.sunIntensity : float

<maya_envfog>.sunAzimuth : float

<maya_envfog>.sunElevation : float

<maya_envfog>.sunColor : fRGBA color

<maya_envfog>.light : node

<maya_envfog>.color : fRGBA color

<maya_envfog>.density : float

<maya_envfog>.fastDropOff : boolean

<maya_envfog>.colorBasedTransparency : boolean

<maya_envfog>.matteOpacityMode : integer

<maya_envfog>.matteOpacity : float

<maya_envfog>.visibleInReflections : boolean

<maya_envfog>.visibleInRefractions : boolean

<maya_envfog>.Structure : paramBlock2

<maya_envfog>.outColor : fRGBA color

<maya_envfog>.outGlowColor : fRGBA color

<maya_envfog>.outMatteOpacity : fRGBA color

<maya_envfog>.outTransparency : fRGBA color

<maya_envfog>.distanceClipPlanes_connected : boolean

<maya_envfog>.distanceClipPlanes_shader : texturemap

<maya_envfog>.distanceClipPlanes_paramName : string

<maya_envfog>.useLayer_connected : boolean

<maya_envfog>.useLayer_shader : texturemap

<maya_envfog>.useLayer_paramName : string

<maya_envfog>.useHeight_connected : boolean

<maya_envfog>.useHeight_shader : texturemap

<maya_envfog>.useHeight_paramName : string

<maya_envfog>.blendRange_connected : boolean

<maya_envfog>.blendRange_shader : texturemap

<maya_envfog>.blendRange_paramName : string

<maya_envfog>.saturationDistance_connected : boolean

<maya_envfog>.saturationDistance_shader : texturemap

<maya_envfog>.saturationDistance_paramName : string

<maya_envfog>.fogNearDistance_connected : boolean

<maya_envfog>.fogNearDistance_shader : texturemap

<maya_envfog>.fogNearDistance_paramName : string

<maya_envfog>.fogFarDistance_connected : boolean

<maya_envfog>.fogFarDistance_shader : texturemap

<maya_envfog>.fogFarDistance_paramName : string

<maya_envfog>.layer_connected : boolean

<maya_envfog>.layer_shader : texturemap

<maya_envfog>.layer_paramName : string

<maya_envfog>.minHeight_connected : boolean

<maya_envfog>.minHeight_shader : texturemap

<maya_envfog>.minHeight_paramName : string

<maya_envfog>.maxHeight_connected : boolean

<maya_envfog>.maxHeight_shader : texturemap

<maya_envfog>.maxHeight_paramName : string

<maya_envfog>.physicalFog_connected : boolean

<maya_envfog>.physicalFog_shader : texturemap

<maya_envfog>.physicalFog_paramName : string

<maya_envfog>.fogType_connected : boolean

<maya_envfog>.fogType_shader : texturemap

<maya_envfog>.fogType_paramName : string

<maya_envfog>.fogDensity_connected : boolean

<maya_envfog>.fogDensity_shader : texturemap

<maya_envfog>.fogDensity_paramName : string

<maya_envfog>.fogColor_connected : boolean

<maya_envfog>.fogColor_shader : texturemap

<maya_envfog>.fogColor_paramName : string

<maya_envfog>.fogOpacity_connected : boolean

<maya_envfog>.fogOpacity_shader : texturemap

<maya_envfog>.fogOpacity_paramName : string

<maya_envfog>.fogMinHeight_connected : boolean

<maya_envfog>.fogMinHeight_shader : texturemap

<maya_envfog>.fogMinHeight_paramName : string

<maya_envfog>.fogMaxHeight_connected : boolean

<maya_envfog>.fogMaxHeight_shader : texturemap

<maya_envfog>.fogMaxHeight_paramName : string

<maya_envfog>.fogDecay_connected : boolean

<maya_envfog>.fogDecay_shader : texturemap

<maya_envfog>.fogDecay_paramName : string

<maya_envfog>.fogLightScatter_connected : boolean

<maya_envfog>.fogLightScatter_shader : texturemap

<maya_envfog>.fogLightScatter_paramName : string

<maya_envfog>.airDensity_connected : boolean

<maya_envfog>.airDensity_shader : texturemap

<maya_envfog>.airDensity_paramName : string

<maya_envfog>.airColor_connected : boolean

<maya_envfog>.airColor_shader : texturemap

<maya_envfog>.airColor_paramName : string

<maya_envfog>.airOpacity_connected : boolean

<maya_envfog>.airOpacity_shader : texturemap

<maya_envfog>.airOpacity_paramName : string

<maya_envfog>.airMinHeight_connected : boolean

<maya_envfog>.airMinHeight_shader : texturemap

<maya_envfog>.airMinHeight_paramName : string

<maya_envfog>.airMaxHeight_connected : boolean

<maya_envfog>.airMaxHeight_shader : texturemap

<maya_envfog>.airMaxHeight_paramName : string

<maya_envfog>.airDecay_connected : boolean

<maya_envfog>.airDecay_shader : texturemap

<maya_envfog>.airDecay_paramName : string

<maya_envfog>.airLightScatter_connected : boolean

<maya_envfog>.airLightScatter_shader : texturemap

<maya_envfog>.airLightScatter_paramName : string

<maya_envfog>.waterDensity_connected : boolean

<maya_envfog>.waterDensity_shader : texturemap

<maya_envfog>.waterDensity_paramName : string

<maya_envfog>.waterColor_connected : boolean

<maya_envfog>.waterColor_shader : texturemap

<maya_envfog>.waterColor_paramName : string

<maya_envfog>.waterOpacity_connected : boolean

<maya_envfog>.waterOpacity_shader : texturemap

<maya_envfog>.waterOpacity_paramName : string

<maya_envfog>.waterLevel_connected : boolean

<maya_envfog>.waterLevel_shader : texturemap

<maya_envfog>.waterLevel_paramName : string

<maya_envfog>.waterDepth_connected : boolean

<maya_envfog>.waterDepth_shader : texturemap

<maya_envfog>.waterDepth_paramName : string

<maya_envfog>.waterLightDecay_connected : boolean

<maya_envfog>.waterLightDecay_shader : texturemap

<maya_envfog>.waterLightDecay_paramName : string

<maya_envfog>.waterLightScatter_connected : boolean

<maya_envfog>.waterLightScatter_shader : texturemap

<maya_envfog>.waterLightScatter_paramName : string

<maya_envfog>.planetRadius_connected : boolean

<maya_envfog>.planetRadius_shader : texturemap

<maya_envfog>.planetRadius_paramName : string

<maya_envfog>.fogAxis_connected : boolean

<maya_envfog>.fogAxis_shader : texturemap

<maya_envfog>.fogAxis_paramName : string

<maya_envfog>.sunIntensity_connected : boolean

<maya_envfog>.sunIntensity_shader : texturemap

<maya_envfog>.sunIntensity_paramName : string

<maya_envfog>.sunAzimuth_connected : boolean

<maya_envfog>.sunAzimuth_shader : texturemap

<maya_envfog>.sunAzimuth_paramName : string

<maya_envfog>.sunElevation_connected : boolean

<maya_envfog>.sunElevation_shader : texturemap

<maya_envfog>.sunElevation_paramName : string

<maya_envfog>.sunColor_connected : boolean

<maya_envfog>.sunColor_shader : texturemap

<maya_envfog>.sunColor_paramName : string

<maya_envfog>.color_connected : boolean

<maya_envfog>.color_shader : texturemap

<maya_envfog>.color_paramName : string

<maya_envfog>.density_connected : boolean

<maya_envfog>.density_shader : texturemap

<maya_envfog>.density_paramName : string

<maya_envfog>.fastDropOff_connected : boolean

<maya_envfog>.fastDropOff_shader : texturemap

<maya_envfog>.fastDropOff_paramName : string

<maya_envfog>.colorBasedTransparency_connected : boolean

<maya_envfog>.colorBasedTransparency_shader : texturemap

<maya_envfog>.colorBasedTransparency_paramName : string

<maya_envfog>.matteOpacityMode_connected : boolean

<maya_envfog>.matteOpacityMode_shader : texturemap

<maya_envfog>.matteOpacityMode_paramName : string

<maya_envfog>.matteOpacity_connected : boolean

<maya_envfog>.matteOpacity_shader : texturemap

<maya_envfog>.matteOpacity_paramName : string

<maya_envfog>.visibleInReflections_connected : boolean

<maya_envfog>.visibleInReflections_shader : texturemap

<maya_envfog>.visibleInReflections_paramName : string

<maya_envfog>.visibleInRefractions_connected : boolean

<maya_envfog>.visibleInRefractions_shader : texturemap

<maya_envfog>.visibleInRefractions_paramName : string

<maya_envfog>.TheList : maxObject array

<maya_envfog>.Shader_Version : integer

maya_envfog interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_envsky : textureMap

maya_envsky : textureMap {7773161f,5d60b354}

Constructor:

maya_envsky: class instances not creatable by MAXScript

Properties:

<maya_envsky>.totalBrightness : float

<maya_envsky>.sunBrightness : fRGBA color

<maya_envsky>.haloBrightness : fRGBA color

<maya_envsky>.elevation : float

<maya_envsky>.azimuth : float

<maya_envsky>.size : float

<maya_envsky>.blur : float

<maya_envsky>.skyBrightness : fRGBA color

<maya_envsky>.airDensity : float

<maya_envsky>.dustDensity : float

<maya_envsky>.skyThickness : float

<maya_envsky>.skyRadius : float

<maya_envsky>.hasFloor : boolean

<maya_envsky>.floorColor : fRGBA color

<maya_envsky>.floorAltitude : float

<maya_envsky>.useTexture : boolean

<maya_envsky>.cloudTexture : float

<maya_envsky>.cloudBrightness : fRGBA color

<maya_envsky>.sunsetBrightness : fRGBA color

<maya_envsky>.density : float

<maya_envsky>.threshold : float

<maya_envsky>.power : float

<maya_envsky>.altitude : float

<maya_envsky>.haloSize : float

<maya_envsky>.skySamples : float

<maya_envsky>.floorSamples : float

<maya_envsky>.cloudSamples : float

<maya_envsky>.placementMatrix : matrix3

<maya_envsky>.Structure : paramBlock2

<maya_envsky>.outColor : fRGBA color

<maya_envsky>.outAlpha : float

<maya_envsky>.totalBrightness_connected : boolean

<maya_envsky>.totalBrightness_shader : texturemap

<maya_envsky>.totalBrightness_paramName : string

<maya_envsky>.sunBrightness_connected : boolean

<maya_envsky>.sunBrightness_shader : texturemap

<maya_envsky>.sunBrightness_paramName : string

<maya_envsky>.haloBrightness_connected : boolean

<maya_envsky>.haloBrightness_shader : texturemap

<maya_envsky>.haloBrightness_paramName : string

<maya_envsky>.elevation_connected : boolean

<maya_envsky>.elevation_shader : texturemap

<maya_envsky>.elevation_paramName : string

<maya_envsky>.azimuth_connected : boolean

<maya_envsky>.azimuth_shader : texturemap

<maya_envsky>.azimuth_paramName : string

<maya_envsky>.size_connected : boolean

<maya_envsky>.size_shader : texturemap

<maya_envsky>.size_paramName : string

<maya_envsky>.blur_connected : boolean

<maya_envsky>.blur_shader : texturemap

<maya_envsky>.blur_paramName : string

<maya_envsky>.skyBrightness_connected : boolean

<maya_envsky>.skyBrightness_shader : texturemap

<maya_envsky>.skyBrightness_paramName : string

<maya_envsky>.airDensity_connected : boolean

<maya_envsky>.airDensity_shader : texturemap

<maya_envsky>.airDensity_paramName : string

<maya_envsky>.dustDensity_connected : boolean

<maya_envsky>.dustDensity_shader : texturemap

<maya_envsky>.dustDensity_paramName : string

<maya_envsky>.skyThickness_connected : boolean

<maya_envsky>.skyThickness_shader : texturemap

<maya_envsky>.skyThickness_paramName : string

<maya_envsky>.skyRadius_connected : boolean

<maya_envsky>.skyRadius_shader : texturemap

<maya_envsky>.skyRadius_paramName : string

<maya_envsky>.hasFloor_connected : boolean

<maya_envsky>.hasFloor_shader : texturemap

<maya_envsky>.hasFloor_paramName : string

<maya_envsky>.floorColor_connected : boolean

<maya_envsky>.floorColor_shader : texturemap

<maya_envsky>.floorColor_paramName : string

<maya_envsky>.floorAltitude_connected : boolean

<maya_envsky>.floorAltitude_shader : texturemap

<maya_envsky>.floorAltitude_paramName : string

<maya_envsky>.useTexture_connected : boolean

<maya_envsky>.useTexture_shader : texturemap

<maya_envsky>.useTexture_paramName : string

<maya_envsky>.cloudTexture_connected : boolean

<maya_envsky>.cloudTexture_shader : texturemap

<maya_envsky>.cloudTexture_paramName : string

<maya_envsky>.cloudBrightness_connected : boolean

<maya_envsky>.cloudBrightness_shader : texturemap

<maya_envsky>.cloudBrightness_paramName : string

<maya_envsky>.sunsetBrightness_connected : boolean

<maya_envsky>.sunsetBrightness_shader : texturemap

<maya_envsky>.sunsetBrightness_paramName : string

<maya_envsky>.density_connected : boolean

<maya_envsky>.density_shader : texturemap

<maya_envsky>.density_paramName : string

<maya_envsky>.threshold_connected : boolean

<maya_envsky>.threshold_shader : texturemap

<maya_envsky>.threshold_paramName : string

<maya_envsky>.power_connected : boolean

<maya_envsky>.power_shader : texturemap

<maya_envsky>.power_paramName : string

<maya_envsky>.altitude_connected : boolean

<maya_envsky>.altitude_shader : texturemap

<maya_envsky>.altitude_paramName : string

<maya_envsky>.haloSize_connected : boolean

<maya_envsky>.haloSize_shader : texturemap

<maya_envsky>.haloSize_paramName : string

<maya_envsky>.skySamples_connected : boolean

<maya_envsky>.skySamples_shader : texturemap

<maya_envsky>.skySamples_paramName : string

<maya_envsky>.floorSamples_connected : boolean

<maya_envsky>.floorSamples_shader : texturemap

<maya_envsky>.floorSamples_paramName : string

<maya_envsky>.cloudSamples_connected : boolean

<maya_envsky>.cloudSamples_shader : texturemap

<maya_envsky>.cloudSamples_paramName : string

<maya_envsky>.placementMatrix_connected : boolean

<maya_envsky>.placementMatrix_shader : texturemap

<maya_envsky>.placementMatrix_paramName : string

<maya_envsky>.TheList : maxObject array

<maya_envsky>.Shader_Version : integer

maya_envsky interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_envsphere : textureMap

maya_envsphere : textureMap {7773161f,b8715546}

Constructor:

maya_envsphere: class instances not creatable by MAXScript

Properties:

<maya_envsphere>.image : fRGBA color

<maya_envsphere>.shearUV : point3

<maya_envsphere>.flip : boolean

<maya_envsphere>.placementMatrix : matrix3

<maya_envsphere>.Structure : paramBlock2

<maya_envsphere>.outColor : fRGBA color

<maya_envsphere>.outAlpha : float

<maya_envsphere>.image_connected : boolean

<maya_envsphere>.image_shader : texturemap

<maya_envsphere>.image_paramName : string

<maya_envsphere>.shearUV_connected : boolean

<maya_envsphere>.shearUV_shader : texturemap

<maya_envsphere>.shearUV_paramName : string

<maya_envsphere>.flip_connected : boolean

<maya_envsphere>.flip_shader : texturemap

<maya_envsphere>.flip_paramName : string

<maya_envsphere>.placementMatrix_connected : boolean

<maya_envsphere>.placementMatrix_shader : texturemap

<maya_envsphere>.placementMatrix_paramName : string

<maya_envsphere>.TheList : maxObject array

<maya_envsphere>.Shader_Version : integer

maya_envsphere interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_file : textureMap

maya_file : textureMap {7773161f,53024b6a}

Constructor:

maya_file: class instances not creatable by MAXScript

Properties:

<maya_file>.fileTextureName : filename

<maya_file>.Image_Frame_Number : integer

<maya_file>.filterType : integer

<maya_file>.filterWidth : float

<maya_file>.useMaximumRes : boolean

<maya_file>.uvCoord : point3

<maya_file>.uvFilterSize : point3

<maya_file>.filter : float

<maya_file>.filterOffset : float

<maya_file>.invert : boolean

<maya_file>.alphaIsLuminance : boolean

<maya_file>.colorGain : fRGBA color

<maya_file>.colorOffset : fRGBA color

<maya_file>.alphaGain : float

<maya_file>.alphaOffset : float

<maya_file>.defaultColor : fRGBA color

<maya_file>.fileHasAlpha : boolean

<maya_file>.disableFileLoad : boolean

<maya_file>.coverage : point3

<maya_file>.translateFrame : point3

<maya_file>.rotateFrame : float

<maya_file>.doTransform : boolean

<maya_file>.mirrorU : boolean

<maya_file>.mirrorV : boolean

<maya_file>.stagger : boolean

<maya_file>.wrapU : boolean

<maya_file>.wrapV : boolean

<maya_file>.repeatUV : point3

<maya_file>.offset : point3

<maya_file>.rotateUV : float

<maya_file>.noiseUV : point3

<maya_file>.blurPixelation : boolean

<maya_file>.vertexUvOne : point3

<maya_file>.vertexUvTwo : point3

<maya_file>.vertexUvThree : point3

<maya_file>.normalEncoding : integer

<maya_file>.normalSpace : integer

<maya_file>.missingAlphaOpaque : boolean

<maya_file>.Structure : paramBlock2

<maya_file>.outColor : fRGBA color

<maya_file>.outAlpha : float

<maya_file>.outSize : point3

<maya_file>.fileHasAlpha : boolean

<maya_file>.outTransparency : fRGBA color

<maya_file>.outNormal : point3

<maya_file>.fileTextureName_connected : boolean

<maya_file>.fileTextureName_shader : texturemap

<maya_file>.fileTextureName_paramName : string

<maya_file>.filterType_connected : boolean

<maya_file>.filterType_shader : texturemap

<maya_file>.filterType_paramName : string

<maya_file>.filterWidth_connected : boolean

<maya_file>.filterWidth_shader : texturemap

<maya_file>.filterWidth_paramName : string

<maya_file>.useMaximumRes_connected : boolean

<maya_file>.useMaximumRes_shader : texturemap

<maya_file>.useMaximumRes_paramName : string

<maya_file>.uvCoord_connected : boolean

<maya_file>.uvCoord_shader : texturemap

<maya_file>.uvCoord_paramName : string

<maya_file>.uvFilterSize_connected : boolean

<maya_file>.uvFilterSize_shader : texturemap

<maya_file>.uvFilterSize_paramName : string

<maya_file>.filter_connected : boolean

<maya_file>.filter_shader : texturemap

<maya_file>.filter_paramName : string

<maya_file>.filterOffset_connected : boolean

<maya_file>.filterOffset_shader : texturemap

<maya_file>.filterOffset_paramName : string

<maya_file>.invert_connected : boolean

<maya_file>.invert_shader : texturemap

<maya_file>.invert_paramName : string

<maya_file>.alphaIsLuminance_connected : boolean

<maya_file>.alphaIsLuminance_shader : texturemap

<maya_file>.alphaIsLuminance_paramName : string

<maya_file>.colorGain_connected : boolean

<maya_file>.colorGain_shader : texturemap

<maya_file>.colorGain_paramName : string

<maya_file>.colorOffset_connected : boolean

<maya_file>.colorOffset_shader : texturemap

<maya_file>.colorOffset_paramName : string

<maya_file>.alphaGain_connected : boolean

<maya_file>.alphaGain_shader : texturemap

<maya_file>.alphaGain_paramName : string

<maya_file>.alphaOffset_connected : boolean

<maya_file>.alphaOffset_shader : texturemap

<maya_file>.alphaOffset_paramName : string

<maya_file>.defaultColor_connected : boolean

<maya_file>.defaultColor_shader : texturemap

<maya_file>.defaultColor_paramName : string

<maya_file>.fileHasAlpha_connected : boolean

<maya_file>.fileHasAlpha_shader : texturemap

<maya_file>.fileHasAlpha_paramName : string

<maya_file>.disableFileLoad_connected : boolean

<maya_file>.disableFileLoad_shader : texturemap

<maya_file>.disableFileLoad_paramName : string

<maya_file>.coverage_connected : boolean

<maya_file>.coverage_shader : texturemap

<maya_file>.coverage_paramName : string

<maya_file>.translateFrame_connected : boolean

<maya_file>.translateFrame_shader : texturemap

<maya_file>.translateFrame_paramName : string

<maya_file>.rotateFrame_connected : boolean

<maya_file>.rotateFrame_shader : texturemap

<maya_file>.rotateFrame_paramName : string

<maya_file>.doTransform_connected : boolean

<maya_file>.doTransform_shader : texturemap

<maya_file>.doTransform_paramName : string

<maya_file>.mirrorU_connected : boolean

<maya_file>.mirrorU_shader : texturemap

<maya_file>.mirrorU_paramName : string

<maya_file>.mirrorV_connected : boolean

<maya_file>.mirrorV_shader : texturemap

<maya_file>.mirrorV_paramName : string

<maya_file>.stagger_connected : boolean

<maya_file>.stagger_shader : texturemap

<maya_file>.stagger_paramName : string

<maya_file>.wrapU_connected : boolean

<maya_file>.wrapU_shader : texturemap

<maya_file>.wrapU_paramName : string

<maya_file>.wrapV_connected : boolean

<maya_file>.wrapV_shader : texturemap

<maya_file>.wrapV_paramName : string

<maya_file>.repeatUV_connected : boolean

<maya_file>.repeatUV_shader : texturemap

<maya_file>.repeatUV_paramName : string

<maya_file>.offset_connected : boolean

<maya_file>.offset_shader : texturemap

<maya_file>.offset_paramName : string

<maya_file>.rotateUV_connected : boolean

<maya_file>.rotateUV_shader : texturemap

<maya_file>.rotateUV_paramName : string

<maya_file>.noiseUV_connected : boolean

<maya_file>.noiseUV_shader : texturemap

<maya_file>.noiseUV_paramName : string

<maya_file>.blurPixelation_connected : boolean

<maya_file>.blurPixelation_shader : texturemap

<maya_file>.blurPixelation_paramName : string

<maya_file>.vertexUvOne_connected : boolean

<maya_file>.vertexUvOne_shader : texturemap

<maya_file>.vertexUvOne_paramName : string

<maya_file>.vertexUvTwo_connected : boolean

<maya_file>.vertexUvTwo_shader : texturemap

<maya_file>.vertexUvTwo_paramName : string

<maya_file>.vertexUvThree_connected : boolean

<maya_file>.vertexUvThree_shader : texturemap

<maya_file>.vertexUvThree_paramName : string

<maya_file>.normalEncoding_connected : boolean

<maya_file>.normalEncoding_shader : texturemap

<maya_file>.normalEncoding_paramName : string

<maya_file>.normalSpace_connected : boolean

<maya_file>.normalSpace_shader : texturemap

<maya_file>.normalSpace_paramName : string

<maya_file>.missingAlphaOpaque_connected : boolean

<maya_file>.missingAlphaOpaque_shader : texturemap

<maya_file>.missingAlphaOpaque_paramName : string

<maya_file>.TheList : maxObject array

<maya_file>.Shader_Version : integer

maya_file interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_float_to_int : textureMap

maya_float_to_int : textureMap {7773161f,5a15705b}

Constructor:

maya_float_to_int: class instances not creatable by MAXScript

Properties:

<maya_float_to_int>.float : float

<maya_float_to_int>.float_connected : boolean

<maya_float_to_int>.float_shader : texturemap

<maya_float_to_int>.float_paramName : string

<maya_float_to_int>.TheList : maxObject array

<maya_float_to_int>.Shader_Version : integer

maya_float_to_int interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_fluidshader : textureMap

maya_fluidshader : textureMap {7773161f,53f54b4d}

Constructor:

maya_fluidshader: class instances not creatable by MAXScript

Properties:

<maya_fluidshader>.lightReleased : float

<maya_fluidshader>.lightColor : fRGBA color

<maya_fluidshader>.matteOpacityMode : integer

<maya_fluidshader>.matteOpacity : float

<maya_fluidshader>.selfShadowing : boolean

<maya_fluidshader>.quality : float

<maya_fluidshader>.renderInterpolator : integer

<maya_fluidshader>.color : paramBlock2 array

<maya_fluidshader>.colorInput : integer

<maya_fluidshader>.colorInputBias : float

<maya_fluidshader>.opacity : paramBlock2 array

<maya_fluidshader>.opacityInput : integer

<maya_fluidshader>.opacityInputBias : float

<maya_fluidshader>.transparency : fRGBA color

<maya_fluidshader>.shadowOpacity : float

<maya_fluidshader>.incandescence : paramBlock2 array

<maya_fluidshader>.incandescenceInput : integer

<maya_fluidshader>.incandescenceInputBias : float

<maya_fluidshader>.glowIntensity : float

<maya_fluidshader>.specularColor : fRGBA color

<maya_fluidshader>.cosinePower : float

<maya_fluidshader>.environment : paramBlock2 array

<maya_fluidshader>.dropoffShape : integer

<maya_fluidshader>.edgeDropoff : float

<maya_fluidshader>.contrastTolerance : float

<maya_fluidshader>.heightField : boolean

<maya_fluidshader>.surfaceRender : boolean

<maya_fluidshader>.surfaceThreshold : float

<maya_fluidshader>.surfaceTolerance : float

<maya_fluidshader>.softSurface : boolean

<maya_fluidshader>.refractiveIndex : float

<maya_fluidshader>.sampleMethod : integer

<maya_fluidshader>.realLights : boolean

<maya_fluidshader>.directionalLight : point3

<maya_fluidshader>.textureType : integer

<maya_fluidshader>.colorTexture : boolean

<maya_fluidshader>.colorTexGain : float

<maya_fluidshader>.incandTexture : boolean

<maya_fluidshader>.incandTexGain : float

<maya_fluidshader>.opacityTexture : boolean

<maya_fluidshader>.opacityTexGain : float

<maya_fluidshader>.invertTexture : boolean

<maya_fluidshader>.amplitude : float

<maya_fluidshader>.ratio : float

<maya_fluidshader>.threshold : float

<maya_fluidshader>.textureScale : point3

<maya_fluidshader>.textureOrigin : point3

<maya_fluidshader>.depthMax : integer

<maya_fluidshader>.frequency : float

<maya_fluidshader>.frequencyRatio : float

<maya_fluidshader>.inflection : float

<maya_fluidshader>.textureTime : float

<maya_fluidshader>.billowDensity : float

<maya_fluidshader>.spottyness : float

<maya_fluidshader>.sizeRand : float

<maya_fluidshader>.randomness : float

<maya_fluidshader>.falloff : integer

<maya_fluidshader>.numWaves : integer

<maya_fluidshader>.implode : float

<maya_fluidshader>.implodeCenter : point3

<maya_fluidshader>.fluidTag : node

<maya_fluidshader>.visibleInReflections : boolean

<maya_fluidshader>.visibleInRefractions : boolean

<maya_fluidshader>.position : float

<maya_fluidshader>.color : fRGBA color

<maya_fluidshader>.interp : integer

<maya_fluidshader>.position : float

<maya_fluidshader>.floatValue : float

<maya_fluidshader>.interp : integer

<maya_fluidshader>.position : float

<maya_fluidshader>.color : fRGBA color

<maya_fluidshader>.interp : integer

<maya_fluidshader>.position : float

<maya_fluidshader>.color : fRGBA color

<maya_fluidshader>.interp : integer

<maya_fluidshader>.Structure : paramBlock2

<maya_fluidshader>.outColor : fRGBA color

<maya_fluidshader>.outGlowColor : fRGBA color

<maya_fluidshader>.outMatteOpacity : fRGBA color

<maya_fluidshader>.outTransparency : fRGBA color

<maya_fluidshader>.lightReleased_connected : boolean

<maya_fluidshader>.lightReleased_shader : texturemap

<maya_fluidshader>.lightReleased_paramName : string

<maya_fluidshader>.lightColor_connected : boolean

<maya_fluidshader>.lightColor_shader : texturemap

<maya_fluidshader>.lightColor_paramName : string

<maya_fluidshader>.matteOpacityMode_connected : boolean

<maya_fluidshader>.matteOpacityMode_shader : texturemap

<maya_fluidshader>.matteOpacityMode_paramName : string

<maya_fluidshader>.matteOpacity_connected : boolean

<maya_fluidshader>.matteOpacity_shader : texturemap

<maya_fluidshader>.matteOpacity_paramName : string

<maya_fluidshader>.selfShadowing_connected : boolean

<maya_fluidshader>.selfShadowing_shader : texturemap

<maya_fluidshader>.selfShadowing_paramName : string

<maya_fluidshader>.quality_connected : boolean

<maya_fluidshader>.quality_shader : texturemap

<maya_fluidshader>.quality_paramName : string

<maya_fluidshader>.renderInterpolator_connected : boolean

<maya_fluidshader>.renderInterpolator_shader : texturemap

<maya_fluidshader>.renderInterpolator_paramName : string

<maya_fluidshader>.colorInput_connected : boolean

<maya_fluidshader>.colorInput_shader : texturemap

<maya_fluidshader>.colorInput_paramName : string

<maya_fluidshader>.colorInputBias_connected : boolean

<maya_fluidshader>.colorInputBias_shader : texturemap

<maya_fluidshader>.colorInputBias_paramName : string

<maya_fluidshader>.opacityInput_connected : boolean

<maya_fluidshader>.opacityInput_shader : texturemap

<maya_fluidshader>.opacityInput_paramName : string

<maya_fluidshader>.opacityInputBias_connected : boolean

<maya_fluidshader>.opacityInputBias_shader : texturemap

<maya_fluidshader>.opacityInputBias_paramName : string

<maya_fluidshader>.transparency_connected : boolean

<maya_fluidshader>.transparency_shader : texturemap

<maya_fluidshader>.transparency_paramName : string

<maya_fluidshader>.shadowOpacity_connected : boolean

<maya_fluidshader>.shadowOpacity_shader : texturemap

<maya_fluidshader>.shadowOpacity_paramName : string

<maya_fluidshader>.incandescenceInput_connected : boolean

<maya_fluidshader>.incandescenceInput_shader : texturemap

<maya_fluidshader>.incandescenceInput_paramName : string

<maya_fluidshader>.incandescenceInputBias_connected : boolean

<maya_fluidshader>.incandescenceInputBias_shader : texturemap

<maya_fluidshader>.incandescenceInputBias_paramName : string

<maya_fluidshader>.glowIntensity_connected : boolean

<maya_fluidshader>.glowIntensity_shader : texturemap

<maya_fluidshader>.glowIntensity_paramName : string

<maya_fluidshader>.specularColor_connected : boolean

<maya_fluidshader>.specularColor_shader : texturemap

<maya_fluidshader>.specularColor_paramName : string

<maya_fluidshader>.cosinePower_connected : boolean

<maya_fluidshader>.cosinePower_shader : texturemap

<maya_fluidshader>.cosinePower_paramName : string

<maya_fluidshader>.dropoffShape_connected : boolean

<maya_fluidshader>.dropoffShape_shader : texturemap

<maya_fluidshader>.dropoffShape_paramName : string

<maya_fluidshader>.edgeDropoff_connected : boolean

<maya_fluidshader>.edgeDropoff_shader : texturemap

<maya_fluidshader>.edgeDropoff_paramName : string

<maya_fluidshader>.contrastTolerance_connected : boolean

<maya_fluidshader>.contrastTolerance_shader : texturemap

<maya_fluidshader>.contrastTolerance_paramName : string

<maya_fluidshader>.heightField_connected : boolean

<maya_fluidshader>.heightField_shader : texturemap

<maya_fluidshader>.heightField_paramName : string

<maya_fluidshader>.surfaceRender_connected : boolean

<maya_fluidshader>.surfaceRender_shader : texturemap

<maya_fluidshader>.surfaceRender_paramName : string

<maya_fluidshader>.surfaceThreshold_connected : boolean

<maya_fluidshader>.surfaceThreshold_shader : texturemap

<maya_fluidshader>.surfaceThreshold_paramName : string

<maya_fluidshader>.surfaceTolerance_connected : boolean

<maya_fluidshader>.surfaceTolerance_shader : texturemap

<maya_fluidshader>.surfaceTolerance_paramName : string

<maya_fluidshader>.softSurface_connected : boolean

<maya_fluidshader>.softSurface_shader : texturemap

<maya_fluidshader>.softSurface_paramName : string

<maya_fluidshader>.refractiveIndex_connected : boolean

<maya_fluidshader>.refractiveIndex_shader : texturemap

<maya_fluidshader>.refractiveIndex_paramName : string

<maya_fluidshader>.sampleMethod_connected : boolean

<maya_fluidshader>.sampleMethod_shader : texturemap

<maya_fluidshader>.sampleMethod_paramName : string

<maya_fluidshader>.realLights_connected : boolean

<maya_fluidshader>.realLights_shader : texturemap

<maya_fluidshader>.realLights_paramName : string

<maya_fluidshader>.directionalLight_connected : boolean

<maya_fluidshader>.directionalLight_shader : texturemap

<maya_fluidshader>.directionalLight_paramName : string

<maya_fluidshader>.textureType_connected : boolean

<maya_fluidshader>.textureType_shader : texturemap

<maya_fluidshader>.textureType_paramName : string

<maya_fluidshader>.colorTexture_connected : boolean

<maya_fluidshader>.colorTexture_shader : texturemap

<maya_fluidshader>.colorTexture_paramName : string

<maya_fluidshader>.colorTexGain_connected : boolean

<maya_fluidshader>.colorTexGain_shader : texturemap

<maya_fluidshader>.colorTexGain_paramName : string

<maya_fluidshader>.incandTexture_connected : boolean

<maya_fluidshader>.incandTexture_shader : texturemap

<maya_fluidshader>.incandTexture_paramName : string

<maya_fluidshader>.incandTexGain_connected : boolean

<maya_fluidshader>.incandTexGain_shader : texturemap

<maya_fluidshader>.incandTexGain_paramName : string

<maya_fluidshader>.opacityTexture_connected : boolean

<maya_fluidshader>.opacityTexture_shader : texturemap

<maya_fluidshader>.opacityTexture_paramName : string

<maya_fluidshader>.opacityTexGain_connected : boolean

<maya_fluidshader>.opacityTexGain_shader : texturemap

<maya_fluidshader>.opacityTexGain_paramName : string

<maya_fluidshader>.invertTexture_connected : boolean

<maya_fluidshader>.invertTexture_shader : texturemap

<maya_fluidshader>.invertTexture_paramName : string

<maya_fluidshader>.amplitude_connected : boolean

<maya_fluidshader>.amplitude_shader : texturemap

<maya_fluidshader>.amplitude_paramName : string

<maya_fluidshader>.ratio_connected : boolean

<maya_fluidshader>.ratio_shader : texturemap

<maya_fluidshader>.ratio_paramName : string

<maya_fluidshader>.threshold_connected : boolean

<maya_fluidshader>.threshold_shader : texturemap

<maya_fluidshader>.threshold_paramName : string

<maya_fluidshader>.textureScale_connected : boolean

<maya_fluidshader>.textureScale_shader : texturemap

<maya_fluidshader>.textureScale_paramName : string

<maya_fluidshader>.textureOrigin_connected : boolean

<maya_fluidshader>.textureOrigin_shader : texturemap

<maya_fluidshader>.textureOrigin_paramName : string

<maya_fluidshader>.depthMax_connected : boolean

<maya_fluidshader>.depthMax_shader : texturemap

<maya_fluidshader>.depthMax_paramName : string

<maya_fluidshader>.frequency_connected : boolean

<maya_fluidshader>.frequency_shader : texturemap

<maya_fluidshader>.frequency_paramName : string

<maya_fluidshader>.frequencyRatio_connected : boolean

<maya_fluidshader>.frequencyRatio_shader : texturemap

<maya_fluidshader>.frequencyRatio_paramName : string

<maya_fluidshader>.inflection_connected : boolean

<maya_fluidshader>.inflection_shader : texturemap

<maya_fluidshader>.inflection_paramName : string

<maya_fluidshader>.textureTime_connected : boolean

<maya_fluidshader>.textureTime_shader : texturemap

<maya_fluidshader>.textureTime_paramName : string

<maya_fluidshader>.billowDensity_connected : boolean

<maya_fluidshader>.billowDensity_shader : texturemap

<maya_fluidshader>.billowDensity_paramName : string

<maya_fluidshader>.spottyness_connected : boolean

<maya_fluidshader>.spottyness_shader : texturemap

<maya_fluidshader>.spottyness_paramName : string

<maya_fluidshader>.sizeRand_connected : boolean

<maya_fluidshader>.sizeRand_shader : texturemap

<maya_fluidshader>.sizeRand_paramName : string

<maya_fluidshader>.randomness_connected : boolean

<maya_fluidshader>.randomness_shader : texturemap

<maya_fluidshader>.randomness_paramName : string

<maya_fluidshader>.falloff_connected : boolean

<maya_fluidshader>.falloff_shader : texturemap

<maya_fluidshader>.falloff_paramName : string

<maya_fluidshader>.numWaves_connected : boolean

<maya_fluidshader>.numWaves_shader : texturemap

<maya_fluidshader>.numWaves_paramName : string

<maya_fluidshader>.implode_connected : boolean

<maya_fluidshader>.implode_shader : texturemap

<maya_fluidshader>.implode_paramName : string

<maya_fluidshader>.implodeCenter_connected : boolean

<maya_fluidshader>.implodeCenter_shader : texturemap

<maya_fluidshader>.implodeCenter_paramName : string

<maya_fluidshader>.visibleInReflections_connected : boolean

<maya_fluidshader>.visibleInReflections_shader : texturemap

<maya_fluidshader>.visibleInReflections_paramName : string

<maya_fluidshader>.visibleInRefractions_connected : boolean

<maya_fluidshader>.visibleInRefractions_shader : texturemap

<maya_fluidshader>.visibleInRefractions_paramName : string

<maya_fluidshader>.TheList : maxObject array

<maya_fluidshader>.Shader_Version : integer

maya_fluidshader interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_fluidtexture2d : textureMap

maya_fluidtexture2d : textureMap {7773161f,49626959}

Constructor:

maya_fluidtexture2d: class instances not creatable by MAXScript

Properties:

<maya_fluidtexture2d>.uvCoord : point3

<maya_fluidtexture2d>.uvFilterSize : point3

<maya_fluidtexture2d>.defaultColor : fRGBA color

<maya_fluidtexture2d>.alphaGain : float

<maya_fluidtexture2d>.alphaOffset : float

<maya_fluidtexture2d>.lightReleased : float

<maya_fluidtexture2d>.lightColor : fRGBA color

<maya_fluidtexture2d>.matteOpacityMode : integer

<maya_fluidtexture2d>.matteOpacity : float

<maya_fluidtexture2d>.renderInterpolator : integer

<maya_fluidtexture2d>.color : paramBlock2 array

<maya_fluidtexture2d>.colorInput : integer

<maya_fluidtexture2d>.colorInputBias : float

<maya_fluidtexture2d>.opacity : paramBlock2 array

<maya_fluidtexture2d>.opacityInput : integer

<maya_fluidtexture2d>.opacityInputBias : float

<maya_fluidtexture2d>.transparency : fRGBA color

<maya_fluidtexture2d>.incandescence : paramBlock2 array

<maya_fluidtexture2d>.incandescenceInput : integer

<maya_fluidtexture2d>.incandescenceInputBias : float

<maya_fluidtexture2d>.glowIntensity : float

<maya_fluidtexture2d>.dropoffShape : integer

<maya_fluidtexture2d>.edgeDropoff : float

<maya_fluidtexture2d>.heightField : boolean

<maya_fluidtexture2d>.textureType : integer

<maya_fluidtexture2d>.colorTexture : boolean

<maya_fluidtexture2d>.colorTexGain : float

<maya_fluidtexture2d>.incandTexture : boolean

<maya_fluidtexture2d>.incandTexGain : float

<maya_fluidtexture2d>.opacityTexture : boolean

<maya_fluidtexture2d>.opacityTexGain : float

<maya_fluidtexture2d>.invertTexture : boolean

<maya_fluidtexture2d>.amplitude : float

<maya_fluidtexture2d>.ratio : float

<maya_fluidtexture2d>.threshold : float

<maya_fluidtexture2d>.textureScale : point3

<maya_fluidtexture2d>.textureOrigin : point3

<maya_fluidtexture2d>.depthMax : integer

<maya_fluidtexture2d>.frequency : float

<maya_fluidtexture2d>.frequencyRatio : float

<maya_fluidtexture2d>.inflection : float

<maya_fluidtexture2d>.textureTime : float

<maya_fluidtexture2d>.billowDensity : float

<maya_fluidtexture2d>.spottyness : float

<maya_fluidtexture2d>.sizeRand : float

<maya_fluidtexture2d>.randomness : float

<maya_fluidtexture2d>.falloff : integer

<maya_fluidtexture2d>.numWaves : integer

<maya_fluidtexture2d>.implode : float

<maya_fluidtexture2d>.implodeCenter : point3

<maya_fluidtexture2d>.fluidTag : node

<maya_fluidtexture2d>.position : float

<maya_fluidtexture2d>.color : fRGBA color

<maya_fluidtexture2d>.interp : integer

<maya_fluidtexture2d>.position : float

<maya_fluidtexture2d>.floatValue : float

<maya_fluidtexture2d>.interp : integer

<maya_fluidtexture2d>.position : float

<maya_fluidtexture2d>.color : fRGBA color

<maya_fluidtexture2d>.interp : integer

<maya_fluidtexture2d>.Structure : paramBlock2

<maya_fluidtexture2d>.outColor : fRGBA color

<maya_fluidtexture2d>.outGlowColor : fRGBA color

<maya_fluidtexture2d>.outMatteOpacity : fRGBA color

<maya_fluidtexture2d>.outTransparency : fRGBA color

<maya_fluidtexture2d>.outAlpha : float

<maya_fluidtexture2d>.outUV : point3

<maya_fluidtexture2d>.uvCoord_connected : boolean

<maya_fluidtexture2d>.uvCoord_shader : texturemap

<maya_fluidtexture2d>.uvCoord_paramName : string

<maya_fluidtexture2d>.uvFilterSize_connected : boolean

<maya_fluidtexture2d>.uvFilterSize_shader : texturemap

<maya_fluidtexture2d>.uvFilterSize_paramName : string

<maya_fluidtexture2d>.defaultColor_connected : boolean

<maya_fluidtexture2d>.defaultColor_shader : texturemap

<maya_fluidtexture2d>.defaultColor_paramName : string

<maya_fluidtexture2d>.alphaGain_connected : boolean

<maya_fluidtexture2d>.alphaGain_shader : texturemap

<maya_fluidtexture2d>.alphaGain_paramName : string

<maya_fluidtexture2d>.alphaOffset_connected : boolean

<maya_fluidtexture2d>.alphaOffset_shader : texturemap

<maya_fluidtexture2d>.alphaOffset_paramName : string

<maya_fluidtexture2d>.lightReleased_connected : boolean

<maya_fluidtexture2d>.lightReleased_shader : texturemap

<maya_fluidtexture2d>.lightReleased_paramName : string

<maya_fluidtexture2d>.lightColor_connected : boolean

<maya_fluidtexture2d>.lightColor_shader : texturemap

<maya_fluidtexture2d>.lightColor_paramName : string

<maya_fluidtexture2d>.matteOpacityMode_connected : boolean

<maya_fluidtexture2d>.matteOpacityMode_shader : texturemap

<maya_fluidtexture2d>.matteOpacityMode_paramName : string

<maya_fluidtexture2d>.matteOpacity_connected : boolean

<maya_fluidtexture2d>.matteOpacity_shader : texturemap

<maya_fluidtexture2d>.matteOpacity_paramName : string

<maya_fluidtexture2d>.renderInterpolator_connected : boolean

<maya_fluidtexture2d>.renderInterpolator_shader : texturemap

<maya_fluidtexture2d>.renderInterpolator_paramName : string

<maya_fluidtexture2d>.colorInput_connected : boolean

<maya_fluidtexture2d>.colorInput_shader : texturemap

<maya_fluidtexture2d>.colorInput_paramName : string

<maya_fluidtexture2d>.colorInputBias_connected : boolean

<maya_fluidtexture2d>.colorInputBias_shader : texturemap

<maya_fluidtexture2d>.colorInputBias_paramName : string

<maya_fluidtexture2d>.opacityInput_connected : boolean

<maya_fluidtexture2d>.opacityInput_shader : texturemap

<maya_fluidtexture2d>.opacityInput_paramName : string

<maya_fluidtexture2d>.opacityInputBias_connected : boolean

<maya_fluidtexture2d>.opacityInputBias_shader : texturemap

<maya_fluidtexture2d>.opacityInputBias_paramName : string

<maya_fluidtexture2d>.transparency_connected : boolean

<maya_fluidtexture2d>.transparency_shader : texturemap

<maya_fluidtexture2d>.transparency_paramName : string

<maya_fluidtexture2d>.incandescenceInput_connected : boolean

<maya_fluidtexture2d>.incandescenceInput_shader : texturemap

<maya_fluidtexture2d>.incandescenceInput_paramName : string

<maya_fluidtexture2d>.incandescenceInputBias_connected : boolean

<maya_fluidtexture2d>.incandescenceInputBias_shader : texturemap

<maya_fluidtexture2d>.incandescenceInputBias_paramName : string

<maya_fluidtexture2d>.glowIntensity_connected : boolean

<maya_fluidtexture2d>.glowIntensity_shader : texturemap

<maya_fluidtexture2d>.glowIntensity_paramName : string

<maya_fluidtexture2d>.dropoffShape_connected : boolean

<maya_fluidtexture2d>.dropoffShape_shader : texturemap

<maya_fluidtexture2d>.dropoffShape_paramName : string

<maya_fluidtexture2d>.edgeDropoff_connected : boolean

<maya_fluidtexture2d>.edgeDropoff_shader : texturemap

<maya_fluidtexture2d>.edgeDropoff_paramName : string

<maya_fluidtexture2d>.heightField_connected : boolean

<maya_fluidtexture2d>.heightField_shader : texturemap

<maya_fluidtexture2d>.heightField_paramName : string

<maya_fluidtexture2d>.textureType_connected : boolean

<maya_fluidtexture2d>.textureType_shader : texturemap

<maya_fluidtexture2d>.textureType_paramName : string

<maya_fluidtexture2d>.colorTexture_connected : boolean

<maya_fluidtexture2d>.colorTexture_shader : texturemap

<maya_fluidtexture2d>.colorTexture_paramName : string

<maya_fluidtexture2d>.colorTexGain_connected : boolean

<maya_fluidtexture2d>.colorTexGain_shader : texturemap

<maya_fluidtexture2d>.colorTexGain_paramName : string

<maya_fluidtexture2d>.incandTexture_connected : boolean

<maya_fluidtexture2d>.incandTexture_shader : texturemap

<maya_fluidtexture2d>.incandTexture_paramName : string

<maya_fluidtexture2d>.incandTexGain_connected : boolean

<maya_fluidtexture2d>.incandTexGain_shader : texturemap

<maya_fluidtexture2d>.incandTexGain_paramName : string

<maya_fluidtexture2d>.opacityTexture_connected : boolean

<maya_fluidtexture2d>.opacityTexture_shader : texturemap

<maya_fluidtexture2d>.opacityTexture_paramName : string

<maya_fluidtexture2d>.opacityTexGain_connected : boolean

<maya_fluidtexture2d>.opacityTexGain_shader : texturemap

<maya_fluidtexture2d>.opacityTexGain_paramName : string

<maya_fluidtexture2d>.invertTexture_connected : boolean

<maya_fluidtexture2d>.invertTexture_shader : texturemap

<maya_fluidtexture2d>.invertTexture_paramName : string

<maya_fluidtexture2d>.amplitude_connected : boolean

<maya_fluidtexture2d>.amplitude_shader : texturemap

<maya_fluidtexture2d>.amplitude_paramName : string

<maya_fluidtexture2d>.ratio_connected : boolean

<maya_fluidtexture2d>.ratio_shader : texturemap

<maya_fluidtexture2d>.ratio_paramName : string

<maya_fluidtexture2d>.threshold_connected : boolean

<maya_fluidtexture2d>.threshold_shader : texturemap

<maya_fluidtexture2d>.threshold_paramName : string

<maya_fluidtexture2d>.textureScale_connected : boolean

<maya_fluidtexture2d>.textureScale_shader : texturemap

<maya_fluidtexture2d>.textureScale_paramName : string

<maya_fluidtexture2d>.textureOrigin_connected : boolean

<maya_fluidtexture2d>.textureOrigin_shader : texturemap

<maya_fluidtexture2d>.textureOrigin_paramName : string

<maya_fluidtexture2d>.depthMax_connected : boolean

<maya_fluidtexture2d>.depthMax_shader : texturemap

<maya_fluidtexture2d>.depthMax_paramName : string

<maya_fluidtexture2d>.frequency_connected : boolean

<maya_fluidtexture2d>.frequency_shader : texturemap

<maya_fluidtexture2d>.frequency_paramName : string

<maya_fluidtexture2d>.frequencyRatio_connected : boolean

<maya_fluidtexture2d>.frequencyRatio_shader : texturemap

<maya_fluidtexture2d>.frequencyRatio_paramName : string

<maya_fluidtexture2d>.inflection_connected : boolean

<maya_fluidtexture2d>.inflection_shader : texturemap

<maya_fluidtexture2d>.inflection_paramName : string

<maya_fluidtexture2d>.textureTime_connected : boolean

<maya_fluidtexture2d>.textureTime_shader : texturemap

<maya_fluidtexture2d>.textureTime_paramName : string

<maya_fluidtexture2d>.billowDensity_connected : boolean

<maya_fluidtexture2d>.billowDensity_shader : texturemap

<maya_fluidtexture2d>.billowDensity_paramName : string

<maya_fluidtexture2d>.spottyness_connected : boolean

<maya_fluidtexture2d>.spottyness_shader : texturemap

<maya_fluidtexture2d>.spottyness_paramName : string

<maya_fluidtexture2d>.sizeRand_connected : boolean

<maya_fluidtexture2d>.sizeRand_shader : texturemap

<maya_fluidtexture2d>.sizeRand_paramName : string

<maya_fluidtexture2d>.randomness_connected : boolean

<maya_fluidtexture2d>.randomness_shader : texturemap

<maya_fluidtexture2d>.randomness_paramName : string

<maya_fluidtexture2d>.falloff_connected : boolean

<maya_fluidtexture2d>.falloff_shader : texturemap

<maya_fluidtexture2d>.falloff_paramName : string

<maya_fluidtexture2d>.numWaves_connected : boolean

<maya_fluidtexture2d>.numWaves_shader : texturemap

<maya_fluidtexture2d>.numWaves_paramName : string

<maya_fluidtexture2d>.implode_connected : boolean

<maya_fluidtexture2d>.implode_shader : texturemap

<maya_fluidtexture2d>.implode_paramName : string

<maya_fluidtexture2d>.implodeCenter_connected : boolean

<maya_fluidtexture2d>.implodeCenter_shader : texturemap

<maya_fluidtexture2d>.implodeCenter_paramName : string

<maya_fluidtexture2d>.TheList : maxObject array

<maya_fluidtexture2d>.Shader_Version : integer

maya_fluidtexture2d interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_fluidtexture3d : textureMap

maya_fluidtexture3d : textureMap {7773161f,49626859}

Constructor:

maya_fluidtexture3d: class instances not creatable by MAXScript

Properties:

<maya_fluidtexture3d>.defaultColor : fRGBA color

<maya_fluidtexture3d>.alphaGain : float

<maya_fluidtexture3d>.alphaOffset : float

<maya_fluidtexture3d>.placementMatrix : matrix3

<maya_fluidtexture3d>.lightReleased : float

<maya_fluidtexture3d>.lightColor : fRGBA color

<maya_fluidtexture3d>.matteOpacityMode : integer

<maya_fluidtexture3d>.matteOpacity : float

<maya_fluidtexture3d>.renderInterpolator : integer

<maya_fluidtexture3d>.color : paramBlock2 array

<maya_fluidtexture3d>.colorInput : integer

<maya_fluidtexture3d>.colorInputBias : float

<maya_fluidtexture3d>.opacity : paramBlock2 array

<maya_fluidtexture3d>.opacityInput : integer

<maya_fluidtexture3d>.opacityInputBias : float

<maya_fluidtexture3d>.transparency : fRGBA color

<maya_fluidtexture3d>.incandescence : paramBlock2 array

<maya_fluidtexture3d>.incandescenceInput : integer

<maya_fluidtexture3d>.incandescenceInputBias : float

<maya_fluidtexture3d>.glowIntensity : float

<maya_fluidtexture3d>.dropoffShape : integer

<maya_fluidtexture3d>.edgeDropoff : float

<maya_fluidtexture3d>.heightField : boolean

<maya_fluidtexture3d>.textureType : integer

<maya_fluidtexture3d>.colorTexture : boolean

<maya_fluidtexture3d>.colorTexGain : float

<maya_fluidtexture3d>.incandTexture : boolean

<maya_fluidtexture3d>.incandTexGain : float

<maya_fluidtexture3d>.opacityTexture : boolean

<maya_fluidtexture3d>.opacityTexGain : float

<maya_fluidtexture3d>.invertTexture : boolean

<maya_fluidtexture3d>.amplitude : float

<maya_fluidtexture3d>.ratio : float

<maya_fluidtexture3d>.threshold : float

<maya_fluidtexture3d>.textureScale : point3

<maya_fluidtexture3d>.textureOrigin : point3

<maya_fluidtexture3d>.depthMax : integer

<maya_fluidtexture3d>.frequency : float

<maya_fluidtexture3d>.frequencyRatio : float

<maya_fluidtexture3d>.inflection : float

<maya_fluidtexture3d>.textureTime : float

<maya_fluidtexture3d>.billowDensity : float

<maya_fluidtexture3d>.spottyness : float

<maya_fluidtexture3d>.sizeRand : float

<maya_fluidtexture3d>.randomness : float

<maya_fluidtexture3d>.falloff : integer

<maya_fluidtexture3d>.numWaves : integer

<maya_fluidtexture3d>.implode : float

<maya_fluidtexture3d>.implodeCenter : point3

<maya_fluidtexture3d>.fluidTag : node

<maya_fluidtexture3d>.position : float

<maya_fluidtexture3d>.color : fRGBA color

<maya_fluidtexture3d>.interp : integer

<maya_fluidtexture3d>.position : float

<maya_fluidtexture3d>.floatValue : float

<maya_fluidtexture3d>.interp : integer

<maya_fluidtexture3d>.position : float

<maya_fluidtexture3d>.color : fRGBA color

<maya_fluidtexture3d>.interp : integer

<maya_fluidtexture3d>.Structure : paramBlock2

<maya_fluidtexture3d>.outColor : fRGBA color

<maya_fluidtexture3d>.outGlowColor : fRGBA color

<maya_fluidtexture3d>.outMatteOpacity : fRGBA color

<maya_fluidtexture3d>.outTransparency : fRGBA color

<maya_fluidtexture3d>.outAlpha : float

<maya_fluidtexture3d>.outCoord : point3

<maya_fluidtexture3d>.defaultColor_connected : boolean

<maya_fluidtexture3d>.defaultColor_shader : texturemap

<maya_fluidtexture3d>.defaultColor_paramName : string

<maya_fluidtexture3d>.alphaGain_connected : boolean

<maya_fluidtexture3d>.alphaGain_shader : texturemap

<maya_fluidtexture3d>.alphaGain_paramName : string

<maya_fluidtexture3d>.alphaOffset_connected : boolean

<maya_fluidtexture3d>.alphaOffset_shader : texturemap

<maya_fluidtexture3d>.alphaOffset_paramName : string

<maya_fluidtexture3d>.placementMatrix_connected : boolean

<maya_fluidtexture3d>.placementMatrix_shader : texturemap

<maya_fluidtexture3d>.placementMatrix_paramName : string

<maya_fluidtexture3d>.lightReleased_connected : boolean

<maya_fluidtexture3d>.lightReleased_shader : texturemap

<maya_fluidtexture3d>.lightReleased_paramName : string

<maya_fluidtexture3d>.lightColor_connected : boolean

<maya_fluidtexture3d>.lightColor_shader : texturemap

<maya_fluidtexture3d>.lightColor_paramName : string

<maya_fluidtexture3d>.matteOpacityMode_connected : boolean

<maya_fluidtexture3d>.matteOpacityMode_shader : texturemap

<maya_fluidtexture3d>.matteOpacityMode_paramName : string

<maya_fluidtexture3d>.matteOpacity_connected : boolean

<maya_fluidtexture3d>.matteOpacity_shader : texturemap

<maya_fluidtexture3d>.matteOpacity_paramName : string

<maya_fluidtexture3d>.renderInterpolator_connected : boolean

<maya_fluidtexture3d>.renderInterpolator_shader : texturemap

<maya_fluidtexture3d>.renderInterpolator_paramName : string

<maya_fluidtexture3d>.colorInput_connected : boolean

<maya_fluidtexture3d>.colorInput_shader : texturemap

<maya_fluidtexture3d>.colorInput_paramName : string

<maya_fluidtexture3d>.colorInputBias_connected : boolean

<maya_fluidtexture3d>.colorInputBias_shader : texturemap

<maya_fluidtexture3d>.colorInputBias_paramName : string

<maya_fluidtexture3d>.opacityInput_connected : boolean

<maya_fluidtexture3d>.opacityInput_shader : texturemap

<maya_fluidtexture3d>.opacityInput_paramName : string

<maya_fluidtexture3d>.opacityInputBias_connected : boolean

<maya_fluidtexture3d>.opacityInputBias_shader : texturemap

<maya_fluidtexture3d>.opacityInputBias_paramName : string

<maya_fluidtexture3d>.transparency_connected : boolean

<maya_fluidtexture3d>.transparency_shader : texturemap

<maya_fluidtexture3d>.transparency_paramName : string

<maya_fluidtexture3d>.incandescenceInput_connected : boolean

<maya_fluidtexture3d>.incandescenceInput_shader : texturemap

<maya_fluidtexture3d>.incandescenceInput_paramName : string

<maya_fluidtexture3d>.incandescenceInputBias_connected : boolean

<maya_fluidtexture3d>.incandescenceInputBias_shader : texturemap

<maya_fluidtexture3d>.incandescenceInputBias_paramName : string

<maya_fluidtexture3d>.glowIntensity_connected : boolean

<maya_fluidtexture3d>.glowIntensity_shader : texturemap

<maya_fluidtexture3d>.glowIntensity_paramName : string

<maya_fluidtexture3d>.dropoffShape_connected : boolean

<maya_fluidtexture3d>.dropoffShape_shader : texturemap

<maya_fluidtexture3d>.dropoffShape_paramName : string

<maya_fluidtexture3d>.edgeDropoff_connected : boolean

<maya_fluidtexture3d>.edgeDropoff_shader : texturemap

<maya_fluidtexture3d>.edgeDropoff_paramName : string

<maya_fluidtexture3d>.heightField_connected : boolean

<maya_fluidtexture3d>.heightField_shader : texturemap

<maya_fluidtexture3d>.heightField_paramName : string

<maya_fluidtexture3d>.textureType_connected : boolean

<maya_fluidtexture3d>.textureType_shader : texturemap

<maya_fluidtexture3d>.textureType_paramName : string

<maya_fluidtexture3d>.colorTexture_connected : boolean

<maya_fluidtexture3d>.colorTexture_shader : texturemap

<maya_fluidtexture3d>.colorTexture_paramName : string

<maya_fluidtexture3d>.colorTexGain_connected : boolean

<maya_fluidtexture3d>.colorTexGain_shader : texturemap

<maya_fluidtexture3d>.colorTexGain_paramName : string

<maya_fluidtexture3d>.incandTexture_connected : boolean

<maya_fluidtexture3d>.incandTexture_shader : texturemap

<maya_fluidtexture3d>.incandTexture_paramName : string

<maya_fluidtexture3d>.incandTexGain_connected : boolean

<maya_fluidtexture3d>.incandTexGain_shader : texturemap

<maya_fluidtexture3d>.incandTexGain_paramName : string

<maya_fluidtexture3d>.opacityTexture_connected : boolean

<maya_fluidtexture3d>.opacityTexture_shader : texturemap

<maya_fluidtexture3d>.opacityTexture_paramName : string

<maya_fluidtexture3d>.opacityTexGain_connected : boolean

<maya_fluidtexture3d>.opacityTexGain_shader : texturemap

<maya_fluidtexture3d>.opacityTexGain_paramName : string

<maya_fluidtexture3d>.invertTexture_connected : boolean

<maya_fluidtexture3d>.invertTexture_shader : texturemap

<maya_fluidtexture3d>.invertTexture_paramName : string

<maya_fluidtexture3d>.amplitude_connected : boolean

<maya_fluidtexture3d>.amplitude_shader : texturemap

<maya_fluidtexture3d>.amplitude_paramName : string

<maya_fluidtexture3d>.ratio_connected : boolean

<maya_fluidtexture3d>.ratio_shader : texturemap

<maya_fluidtexture3d>.ratio_paramName : string

<maya_fluidtexture3d>.threshold_connected : boolean

<maya_fluidtexture3d>.threshold_shader : texturemap

<maya_fluidtexture3d>.threshold_paramName : string

<maya_fluidtexture3d>.textureScale_connected : boolean

<maya_fluidtexture3d>.textureScale_shader : texturemap

<maya_fluidtexture3d>.textureScale_paramName : string

<maya_fluidtexture3d>.textureOrigin_connected : boolean

<maya_fluidtexture3d>.textureOrigin_shader : texturemap

<maya_fluidtexture3d>.textureOrigin_paramName : string

<maya_fluidtexture3d>.depthMax_connected : boolean

<maya_fluidtexture3d>.depthMax_shader : texturemap

<maya_fluidtexture3d>.depthMax_paramName : string

<maya_fluidtexture3d>.frequency_connected : boolean

<maya_fluidtexture3d>.frequency_shader : texturemap

<maya_fluidtexture3d>.frequency_paramName : string

<maya_fluidtexture3d>.frequencyRatio_connected : boolean

<maya_fluidtexture3d>.frequencyRatio_shader : texturemap

<maya_fluidtexture3d>.frequencyRatio_paramName : string

<maya_fluidtexture3d>.inflection_connected : boolean

<maya_fluidtexture3d>.inflection_shader : texturemap

<maya_fluidtexture3d>.inflection_paramName : string

<maya_fluidtexture3d>.textureTime_connected : boolean

<maya_fluidtexture3d>.textureTime_shader : texturemap

<maya_fluidtexture3d>.textureTime_paramName : string

<maya_fluidtexture3d>.billowDensity_connected : boolean

<maya_fluidtexture3d>.billowDensity_shader : texturemap

<maya_fluidtexture3d>.billowDensity_paramName : string

<maya_fluidtexture3d>.spottyness_connected : boolean

<maya_fluidtexture3d>.spottyness_shader : texturemap

<maya_fluidtexture3d>.spottyness_paramName : string

<maya_fluidtexture3d>.sizeRand_connected : boolean

<maya_fluidtexture3d>.sizeRand_shader : texturemap

<maya_fluidtexture3d>.sizeRand_paramName : string

<maya_fluidtexture3d>.randomness_connected : boolean

<maya_fluidtexture3d>.randomness_shader : texturemap

<maya_fluidtexture3d>.randomness_paramName : string

<maya_fluidtexture3d>.falloff_connected : boolean

<maya_fluidtexture3d>.falloff_shader : texturemap

<maya_fluidtexture3d>.falloff_paramName : string

<maya_fluidtexture3d>.numWaves_connected : boolean

<maya_fluidtexture3d>.numWaves_shader : texturemap

<maya_fluidtexture3d>.numWaves_paramName : string

<maya_fluidtexture3d>.implode_connected : boolean

<maya_fluidtexture3d>.implode_shader : texturemap

<maya_fluidtexture3d>.implode_paramName : string

<maya_fluidtexture3d>.implodeCenter_connected : boolean

<maya_fluidtexture3d>.implodeCenter_shader : texturemap

<maya_fluidtexture3d>.implodeCenter_paramName : string

<maya_fluidtexture3d>.TheList : maxObject array

<maya_fluidtexture3d>.Shader_Version : integer

maya_fluidtexture3d interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_fractal : textureMap

maya_fractal : textureMap {7773161f,b25cb764}

Constructor:

maya_fractal: class instances not creatable by MAXScript

Properties:

<maya_fractal>.amplitude : float

<maya_fractal>.ratio : float

<maya_fractal>.threshold : float

<maya_fractal>.levelMin : float

<maya_fractal>.levelMax : float

<maya_fractal>.animated : boolean

<maya_fractal>.time : float

<maya_fractal>.uvCoord : point3

<maya_fractal>.uvFilterSize : point3

<maya_fractal>.filter : float

<maya_fractal>.filterOffset : float

<maya_fractal>.invert : boolean

<maya_fractal>.alphaIsLuminance : boolean

<maya_fractal>.colorGain : fRGBA color

<maya_fractal>.colorOffset : fRGBA color

<maya_fractal>.alphaGain : float

<maya_fractal>.alphaOffset : float

<maya_fractal>.defaultColor : fRGBA color

<maya_fractal>.frequencyRatio : float

<maya_fractal>.timeRatio : float

<maya_fractal>.bias : float

<maya_fractal>.inflection : boolean

<maya_fractal>.Structure : paramBlock2

<maya_fractal>.outColor : fRGBA color

<maya_fractal>.outAlpha : float

<maya_fractal>.amplitude_connected : boolean

<maya_fractal>.amplitude_shader : texturemap

<maya_fractal>.amplitude_paramName : string

<maya_fractal>.ratio_connected : boolean

<maya_fractal>.ratio_shader : texturemap

<maya_fractal>.ratio_paramName : string

<maya_fractal>.threshold_connected : boolean

<maya_fractal>.threshold_shader : texturemap

<maya_fractal>.threshold_paramName : string

<maya_fractal>.levelMin_connected : boolean

<maya_fractal>.levelMin_shader : texturemap

<maya_fractal>.levelMin_paramName : string

<maya_fractal>.levelMax_connected : boolean

<maya_fractal>.levelMax_shader : texturemap

<maya_fractal>.levelMax_paramName : string

<maya_fractal>.animated_connected : boolean

<maya_fractal>.animated_shader : texturemap

<maya_fractal>.animated_paramName : string

<maya_fractal>.time_connected : boolean

<maya_fractal>.time_shader : texturemap

<maya_fractal>.time_paramName : string

<maya_fractal>.uvCoord_connected : boolean

<maya_fractal>.uvCoord_shader : texturemap

<maya_fractal>.uvCoord_paramName : string

<maya_fractal>.uvFilterSize_connected : boolean

<maya_fractal>.uvFilterSize_shader : texturemap

<maya_fractal>.uvFilterSize_paramName : string

<maya_fractal>.filter_connected : boolean

<maya_fractal>.filter_shader : texturemap

<maya_fractal>.filter_paramName : string

<maya_fractal>.filterOffset_connected : boolean

<maya_fractal>.filterOffset_shader : texturemap

<maya_fractal>.filterOffset_paramName : string

<maya_fractal>.invert_connected : boolean

<maya_fractal>.invert_shader : texturemap

<maya_fractal>.invert_paramName : string

<maya_fractal>.alphaIsLuminance_connected : boolean

<maya_fractal>.alphaIsLuminance_shader : texturemap

<maya_fractal>.alphaIsLuminance_paramName : string

<maya_fractal>.colorGain_connected : boolean

<maya_fractal>.colorGain_shader : texturemap

<maya_fractal>.colorGain_paramName : string

<maya_fractal>.colorOffset_connected : boolean

<maya_fractal>.colorOffset_shader : texturemap

<maya_fractal>.colorOffset_paramName : string

<maya_fractal>.alphaGain_connected : boolean

<maya_fractal>.alphaGain_shader : texturemap

<maya_fractal>.alphaGain_paramName : string

<maya_fractal>.alphaOffset_connected : boolean

<maya_fractal>.alphaOffset_shader : texturemap

<maya_fractal>.alphaOffset_paramName : string

<maya_fractal>.defaultColor_connected : boolean

<maya_fractal>.defaultColor_shader : texturemap

<maya_fractal>.defaultColor_paramName : string

<maya_fractal>.frequencyRatio_connected : boolean

<maya_fractal>.frequencyRatio_shader : texturemap

<maya_fractal>.frequencyRatio_paramName : string

<maya_fractal>.timeRatio_connected : boolean

<maya_fractal>.timeRatio_shader : texturemap

<maya_fractal>.timeRatio_paramName : string

<maya_fractal>.bias_connected : boolean

<maya_fractal>.bias_shader : texturemap

<maya_fractal>.bias_paramName : string

<maya_fractal>.inflection_connected : boolean

<maya_fractal>.inflection_shader : texturemap

<maya_fractal>.inflection_paramName : string

<maya_fractal>.TheList : maxObject array

<maya_fractal>.Shader_Version : integer

maya_fractal interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_fur : textureMap

maya_fur : textureMap {7773161f,58fe4b45}

Constructor:

maya_fur: class instances not creatable by MAXScript

Properties:

<maya_fur>.baseColor : fRGBA color

<maya_fur>.baseMap : integer

<maya_fur>.baseNoise : float

<maya_fur>.baseNoiseFreq : float

<maya_fur>.tipColor : fRGBA color

<maya_fur>.tipMap : integer

<maya_fur>.tipNoise : float

<maya_fur>.tipNoiseFreq : float

<maya_fur>.baseAmbientColor : fRGBA color

<maya_fur>.baseAmbientMap : integer

<maya_fur>.baseAmbientNoise : float

<maya_fur>.baseAmbientNoiseFreq : float

<maya_fur>.tipAmbientColor : fRGBA color

<maya_fur>.tipAmbientMap : integer

<maya_fur>.tipAmbientNoise : float

<maya_fur>.tipAmbientNoiseFreq : float

<maya_fur>.specularColor : fRGBA color

<maya_fur>.specularMap : integer

<maya_fur>.specularNoise : float

<maya_fur>.specularNoiseFreq : float

<maya_fur>.specularSharpness : float

<maya_fur>.specularSharpnessMap : integer

<maya_fur>.specularSharpnessNoise : float

<maya_fur>.specularSharpnessNoiseFreq : float

<maya_fur>.baseOpacity : float

<maya_fur>.baseOpacityMap : integer

<maya_fur>.baseOpacityNoise : float

<maya_fur>.baseOpacityNoiseFreq : float

<maya_fur>.tipOpacity : float

<maya_fur>.tipOpacityMap : integer

<maya_fur>.tipOpacityNoise : float

<maya_fur>.tipOpacityNoiseFreq : float

<maya_fur>.lightModel : integer

<maya_fur>.Structure : paramBlock2

<maya_fur>.outColor : fRGBA color

<maya_fur>.outGlowColor : fRGBA color

<maya_fur>.outMatteOpacity : fRGBA color

<maya_fur>.outTransparency : fRGBA color

<maya_fur>.outAmbient : fRGBA color

<maya_fur>.outIncandescence : fRGBA color

<maya_fur>.outIrradiance : fRGBA color

<maya_fur>.outDiffuseShadowed : fRGBA color

<maya_fur>.outDiffuseNoShadow : fRGBA color

<maya_fur>.outShadow : fRGBA color

<maya_fur>.outSpecularShadowed : fRGBA color

<maya_fur>.outSpecularNoShadow : fRGBA color

<maya_fur>.outReflection : fRGBA color

<maya_fur>.outRefraction : fRGBA color

<maya_fur>.outScatter : fRGBA color

<maya_fur>.outOpacity : fRGBA color

<maya_fur>.baseColor_connected : boolean

<maya_fur>.baseColor_shader : texturemap

<maya_fur>.baseColor_paramName : string

<maya_fur>.baseMap_connected : boolean

<maya_fur>.baseMap_shader : texturemap

<maya_fur>.baseMap_paramName : string

<maya_fur>.baseNoise_connected : boolean

<maya_fur>.baseNoise_shader : texturemap

<maya_fur>.baseNoise_paramName : string

<maya_fur>.baseNoiseFreq_connected : boolean

<maya_fur>.baseNoiseFreq_shader : texturemap

<maya_fur>.baseNoiseFreq_paramName : string

<maya_fur>.tipColor_connected : boolean

<maya_fur>.tipColor_shader : texturemap

<maya_fur>.tipColor_paramName : string

<maya_fur>.tipMap_connected : boolean

<maya_fur>.tipMap_shader : texturemap

<maya_fur>.tipMap_paramName : string

<maya_fur>.tipNoise_connected : boolean

<maya_fur>.tipNoise_shader : texturemap

<maya_fur>.tipNoise_paramName : string

<maya_fur>.tipNoiseFreq_connected : boolean

<maya_fur>.tipNoiseFreq_shader : texturemap

<maya_fur>.tipNoiseFreq_paramName : string

<maya_fur>.baseAmbientColor_connected : boolean

<maya_fur>.baseAmbientColor_shader : texturemap

<maya_fur>.baseAmbientColor_paramName : string

<maya_fur>.baseAmbientMap_connected : boolean

<maya_fur>.baseAmbientMap_shader : texturemap

<maya_fur>.baseAmbientMap_paramName : string

<maya_fur>.baseAmbientNoise_connected : boolean

<maya_fur>.baseAmbientNoise_shader : texturemap

<maya_fur>.baseAmbientNoise_paramName : string

<maya_fur>.baseAmbientNoiseFreq_connected : boolean

<maya_fur>.baseAmbientNoiseFreq_shader : texturemap

<maya_fur>.baseAmbientNoiseFreq_paramName : string

<maya_fur>.tipAmbientColor_connected : boolean

<maya_fur>.tipAmbientColor_shader : texturemap

<maya_fur>.tipAmbientColor_paramName : string

<maya_fur>.tipAmbientMap_connected : boolean

<maya_fur>.tipAmbientMap_shader : texturemap

<maya_fur>.tipAmbientMap_paramName : string

<maya_fur>.tipAmbientNoise_connected : boolean

<maya_fur>.tipAmbientNoise_shader : texturemap

<maya_fur>.tipAmbientNoise_paramName : string

<maya_fur>.tipAmbientNoiseFreq_connected : boolean

<maya_fur>.tipAmbientNoiseFreq_shader : texturemap

<maya_fur>.tipAmbientNoiseFreq_paramName : string

<maya_fur>.specularColor_connected : boolean

<maya_fur>.specularColor_shader : texturemap

<maya_fur>.specularColor_paramName : string

<maya_fur>.specularMap_connected : boolean

<maya_fur>.specularMap_shader : texturemap

<maya_fur>.specularMap_paramName : string

<maya_fur>.specularNoise_connected : boolean

<maya_fur>.specularNoise_shader : texturemap

<maya_fur>.specularNoise_paramName : string

<maya_fur>.specularNoiseFreq_connected : boolean

<maya_fur>.specularNoiseFreq_shader : texturemap

<maya_fur>.specularNoiseFreq_paramName : string

<maya_fur>.specularSharpness_connected : boolean

<maya_fur>.specularSharpness_shader : texturemap

<maya_fur>.specularSharpness_paramName : string

<maya_fur>.specularSharpnessMap_connected : boolean

<maya_fur>.specularSharpnessMap_shader : texturemap

<maya_fur>.specularSharpnessMap_paramName : string

<maya_fur>.specularSharpnessNoise_connected : boolean

<maya_fur>.specularSharpnessNoise_shader : texturemap

<maya_fur>.specularSharpnessNoise_paramName : string

<maya_fur>.specularSharpnessNoiseFreq_connected : boolean

<maya_fur>.specularSharpnessNoiseFreq_shader : texturemap

<maya_fur>.specularSharpnessNoiseFreq_paramName : string

<maya_fur>.baseOpacity_connected : boolean

<maya_fur>.baseOpacity_shader : texturemap

<maya_fur>.baseOpacity_paramName : string

<maya_fur>.baseOpacityMap_connected : boolean

<maya_fur>.baseOpacityMap_shader : texturemap

<maya_fur>.baseOpacityMap_paramName : string

<maya_fur>.baseOpacityNoise_connected : boolean

<maya_fur>.baseOpacityNoise_shader : texturemap

<maya_fur>.baseOpacityNoise_paramName : string

<maya_fur>.baseOpacityNoiseFreq_connected : boolean

<maya_fur>.baseOpacityNoiseFreq_shader : texturemap

<maya_fur>.baseOpacityNoiseFreq_paramName : string

<maya_fur>.tipOpacity_connected : boolean

<maya_fur>.tipOpacity_shader : texturemap

<maya_fur>.tipOpacity_paramName : string

<maya_fur>.tipOpacityMap_connected : boolean

<maya_fur>.tipOpacityMap_shader : texturemap

<maya_fur>.tipOpacityMap_paramName : string

<maya_fur>.tipOpacityNoise_connected : boolean

<maya_fur>.tipOpacityNoise_shader : texturemap

<maya_fur>.tipOpacityNoise_paramName : string

<maya_fur>.tipOpacityNoiseFreq_connected : boolean

<maya_fur>.tipOpacityNoiseFreq_shader : texturemap

<maya_fur>.tipOpacityNoiseFreq_paramName : string

<maya_fur>.lightModel_connected : boolean

<maya_fur>.lightModel_shader : texturemap

<maya_fur>.lightModel_paramName : string

<maya_fur>.TheList : maxObject array

<maya_fur>.Shader_Version : integer

maya_fur interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_gamma : textureMap

maya_gamma : textureMap {7773161f,520aab72}

Constructor:

maya_gamma: class instances not creatable by MAXScript

Properties:

<maya_gamma>.value : point3

<maya_gamma>.gamma : point3

<maya_gamma>.Structure : paramBlock2

<maya_gamma>.outValue : point3

<maya_gamma>.value_connected : boolean

<maya_gamma>.value_shader : texturemap

<maya_gamma>.value_paramName : string

<maya_gamma>.gamma_connected : boolean

<maya_gamma>.gamma_shader : texturemap

<maya_gamma>.gamma_paramName : string

<maya_gamma>.TheList : maxObject array

<maya_gamma>.Shader_Version : integer

maya_gamma interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_granite : textureMap

maya_granite : textureMap {7773161f,ab71b36f}

Constructor:

maya_granite: class instances not creatable by MAXScript

Properties:

<maya_granite>.color1 : fRGBA color

<maya_granite>.color2 : fRGBA color

<maya_granite>.color3 : fRGBA color

<maya_granite>.fillerColor : fRGBA color

<maya_granite>.cellSize : float

<maya_granite>.density : float

<maya_granite>.mixRatio : float

<maya_granite>.spottyness : float

<maya_granite>.randomness : float

<maya_granite>.threshold : float

<maya_granite>.creases : boolean

<maya_granite>.filter : float

<maya_granite>.filterSize : point3

<maya_granite>.filterOffset : float

<maya_granite>.blend : float

<maya_granite>.wrap : boolean

<maya_granite>.invert : boolean

<maya_granite>.alphaIsLuminance : boolean

<maya_granite>.colorGain : fRGBA color

<maya_granite>.colorOffset : fRGBA color

<maya_granite>.alphaGain : float

<maya_granite>.alphaOffset : float

<maya_granite>.defaultColor : fRGBA color

<maya_granite>.placementMatrix : matrix3

<maya_granite>.local : boolean

<maya_granite>.Structure : paramBlock2

<maya_granite>.outColor : fRGBA color

<maya_granite>.outAlpha : float

<maya_granite>.color1_connected : boolean

<maya_granite>.color1_shader : texturemap

<maya_granite>.color1_paramName : string

<maya_granite>.color2_connected : boolean

<maya_granite>.color2_shader : texturemap

<maya_granite>.color2_paramName : string

<maya_granite>.color3_connected : boolean

<maya_granite>.color3_shader : texturemap

<maya_granite>.color3_paramName : string

<maya_granite>.fillerColor_connected : boolean

<maya_granite>.fillerColor_shader : texturemap

<maya_granite>.fillerColor_paramName : string

<maya_granite>.cellSize_connected : boolean

<maya_granite>.cellSize_shader : texturemap

<maya_granite>.cellSize_paramName : string

<maya_granite>.density_connected : boolean

<maya_granite>.density_shader : texturemap

<maya_granite>.density_paramName : string

<maya_granite>.mixRatio_connected : boolean

<maya_granite>.mixRatio_shader : texturemap

<maya_granite>.mixRatio_paramName : string

<maya_granite>.spottyness_connected : boolean

<maya_granite>.spottyness_shader : texturemap

<maya_granite>.spottyness_paramName : string

<maya_granite>.randomness_connected : boolean

<maya_granite>.randomness_shader : texturemap

<maya_granite>.randomness_paramName : string

<maya_granite>.threshold_connected : boolean

<maya_granite>.threshold_shader : texturemap

<maya_granite>.threshold_paramName : string

<maya_granite>.creases_connected : boolean

<maya_granite>.creases_shader : texturemap

<maya_granite>.creases_paramName : string

<maya_granite>.filter_connected : boolean

<maya_granite>.filter_shader : texturemap

<maya_granite>.filter_paramName : string

<maya_granite>.filterSize_connected : boolean

<maya_granite>.filterSize_shader : texturemap

<maya_granite>.filterSize_paramName : string

<maya_granite>.filterOffset_connected : boolean

<maya_granite>.filterOffset_shader : texturemap

<maya_granite>.filterOffset_paramName : string

<maya_granite>.blend_connected : boolean

<maya_granite>.blend_shader : texturemap

<maya_granite>.blend_paramName : string

<maya_granite>.wrap_connected : boolean

<maya_granite>.wrap_shader : texturemap

<maya_granite>.wrap_paramName : string

<maya_granite>.invert_connected : boolean

<maya_granite>.invert_shader : texturemap

<maya_granite>.invert_paramName : string

<maya_granite>.alphaIsLuminance_connected : boolean

<maya_granite>.alphaIsLuminance_shader : texturemap

<maya_granite>.alphaIsLuminance_paramName : string

<maya_granite>.colorGain_connected : boolean

<maya_granite>.colorGain_shader : texturemap

<maya_granite>.colorGain_paramName : string

<maya_granite>.colorOffset_connected : boolean

<maya_granite>.colorOffset_shader : texturemap

<maya_granite>.colorOffset_paramName : string

<maya_granite>.alphaGain_connected : boolean

<maya_granite>.alphaGain_shader : texturemap

<maya_granite>.alphaGain_paramName : string

<maya_granite>.alphaOffset_connected : boolean

<maya_granite>.alphaOffset_shader : texturemap

<maya_granite>.alphaOffset_paramName : string

<maya_granite>.defaultColor_connected : boolean

<maya_granite>.defaultColor_shader : texturemap

<maya_granite>.defaultColor_paramName : string

<maya_granite>.placementMatrix_connected : boolean

<maya_granite>.placementMatrix_shader : texturemap

<maya_granite>.placementMatrix_paramName : string

<maya_granite>.local_connected : boolean

<maya_granite>.local_shader : texturemap

<maya_granite>.local_paramName : string

<maya_granite>.TheList : maxObject array

<maya_granite>.Shader_Version : integer

maya_granite interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_grid : textureMap

maya_grid : textureMap {7773161f,4dfd4a69}

Constructor:

maya_grid: class instances not creatable by MAXScript

Properties:

<maya_grid>.fillerColor : fRGBA color

<maya_grid>.lineColor : fRGBA color

<maya_grid>.contrast : float

<maya_grid>.uWidth : float

<maya_grid>.vWidth : float

<maya_grid>.uvCoord : point3

<maya_grid>.uvFilterSize : point3

<maya_grid>.filter : float

<maya_grid>.filterOffset : float

<maya_grid>.invert : boolean

<maya_grid>.alphaIsLuminance : boolean

<maya_grid>.colorGain : fRGBA color

<maya_grid>.colorOffset : fRGBA color

<maya_grid>.alphaGain : float

<maya_grid>.alphaOffset : float

<maya_grid>.defaultColor : fRGBA color

<maya_grid>.Structure : paramBlock2

<maya_grid>.outColor : fRGBA color

<maya_grid>.outAlpha : float

<maya_grid>.fillerColor_connected : boolean

<maya_grid>.fillerColor_shader : texturemap

<maya_grid>.fillerColor_paramName : string

<maya_grid>.lineColor_connected : boolean

<maya_grid>.lineColor_shader : texturemap

<maya_grid>.lineColor_paramName : string

<maya_grid>.contrast_connected : boolean

<maya_grid>.contrast_shader : texturemap

<maya_grid>.contrast_paramName : string

<maya_grid>.uWidth_connected : boolean

<maya_grid>.uWidth_shader : texturemap

<maya_grid>.uWidth_paramName : string

<maya_grid>.vWidth_connected : boolean

<maya_grid>.vWidth_shader : texturemap

<maya_grid>.vWidth_paramName : string

<maya_grid>.uvCoord_connected : boolean

<maya_grid>.uvCoord_shader : texturemap

<maya_grid>.uvCoord_paramName : string

<maya_grid>.uvFilterSize_connected : boolean

<maya_grid>.uvFilterSize_shader : texturemap

<maya_grid>.uvFilterSize_paramName : string

<maya_grid>.filter_connected : boolean

<maya_grid>.filter_shader : texturemap

<maya_grid>.filter_paramName : string

<maya_grid>.filterOffset_connected : boolean

<maya_grid>.filterOffset_shader : texturemap

<maya_grid>.filterOffset_paramName : string

<maya_grid>.invert_connected : boolean

<maya_grid>.invert_shader : texturemap

<maya_grid>.invert_paramName : string

<maya_grid>.alphaIsLuminance_connected : boolean

<maya_grid>.alphaIsLuminance_shader : texturemap

<maya_grid>.alphaIsLuminance_paramName : string

<maya_grid>.colorGain_connected : boolean

<maya_grid>.colorGain_shader : texturemap

<maya_grid>.colorGain_paramName : string

<maya_grid>.colorOffset_connected : boolean

<maya_grid>.colorOffset_shader : texturemap

<maya_grid>.colorOffset_paramName : string

<maya_grid>.alphaGain_connected : boolean

<maya_grid>.alphaGain_shader : texturemap

<maya_grid>.alphaGain_paramName : string

<maya_grid>.alphaOffset_connected : boolean

<maya_grid>.alphaOffset_shader : texturemap

<maya_grid>.alphaOffset_paramName : string

<maya_grid>.defaultColor_connected : boolean

<maya_grid>.defaultColor_shader : texturemap

<maya_grid>.defaultColor_paramName : string

<maya_grid>.TheList : maxObject array

<maya_grid>.Shader_Version : integer

maya_grid interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_hairshader : textureMap

maya_hairshader : textureMap {7773161f,aef46337}

Constructor:

maya_hairshader: class instances not creatable by MAXScript

Properties:

<maya_hairshader>.colorScale : paramBlock2 array

<maya_hairshader>.specularPower : float

<maya_hairshader>.specularColor : fRGBA color

<maya_hairshader>.translucence : float

<maya_hairshader>.color : fRGBA color

<maya_hairshader>.opacity : float

<maya_hairshader>.matteOpacityMode : integer

<maya_hairshader>.matteOpacity : float

<maya_hairshader>.position : float

<maya_hairshader>.color : fRGBA color

<maya_hairshader>.interp : integer

<maya_hairshader>.Structure : paramBlock2

<maya_hairshader>.outColor : fRGBA color

<maya_hairshader>.outGlowColor : fRGBA color

<maya_hairshader>.outMatteOpacity : fRGBA color

<maya_hairshader>.outTransparency : fRGBA color

<maya_hairshader>.outAmbient : fRGBA color

<maya_hairshader>.outIncandescence : fRGBA color

<maya_hairshader>.outIrradiance : fRGBA color

<maya_hairshader>.outDiffuseShadowed : fRGBA color

<maya_hairshader>.outDiffuseNoShadow : fRGBA color

<maya_hairshader>.outShadow : fRGBA color

<maya_hairshader>.outSpecularShadowed : fRGBA color

<maya_hairshader>.outSpecularNoShadow : fRGBA color

<maya_hairshader>.outReflection : fRGBA color

<maya_hairshader>.outRefraction : fRGBA color

<maya_hairshader>.outScatter : fRGBA color

<maya_hairshader>.outOpacity : fRGBA color

<maya_hairshader>.specularPower_connected : boolean

<maya_hairshader>.specularPower_shader : texturemap

<maya_hairshader>.specularPower_paramName : string

<maya_hairshader>.specularColor_connected : boolean

<maya_hairshader>.specularColor_shader : texturemap

<maya_hairshader>.specularColor_paramName : string

<maya_hairshader>.translucence_connected : boolean

<maya_hairshader>.translucence_shader : texturemap

<maya_hairshader>.translucence_paramName : string

<maya_hairshader>.color_connected : boolean

<maya_hairshader>.color_shader : texturemap

<maya_hairshader>.color_paramName : string

<maya_hairshader>.opacity_connected : boolean

<maya_hairshader>.opacity_shader : texturemap

<maya_hairshader>.opacity_paramName : string

<maya_hairshader>.matteOpacityMode_connected : boolean

<maya_hairshader>.matteOpacityMode_shader : texturemap

<maya_hairshader>.matteOpacityMode_paramName : string

<maya_hairshader>.matteOpacity_connected : boolean

<maya_hairshader>.matteOpacity_shader : texturemap

<maya_hairshader>.matteOpacity_paramName : string

<maya_hairshader>.TheList : maxObject array

<maya_hairshader>.Shader_Version : integer

maya_hairshader interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_hairtubeshader : textureMap

maya_hairtubeshader : textureMap {7773161f,5169af54}

Constructor:

maya_hairtubeshader: class instances not creatable by MAXScript

Properties:

<maya_hairtubeshader>.tubeDirection : integer

<maya_hairtubeshader>.colorScale : paramBlock2 array

<maya_hairtubeshader>.specularPower : float

<maya_hairtubeshader>.specularShift : float

<maya_hairtubeshader>.scatterPower : float

<maya_hairtubeshader>.scatter : float

<maya_hairtubeshader>.uvCoord : point3

<maya_hairtubeshader>.reflectionLimit : integer

<maya_hairtubeshader>.specularColor : fRGBA color

<maya_hairtubeshader>.reflectivity : float

<maya_hairtubeshader>.reflectedColor : fRGBA color

<maya_hairtubeshader>.reflectionSpecularity : float

<maya_hairtubeshader>.refractionLimit : integer

<maya_hairtubeshader>.refractiveIndex : float

<maya_hairtubeshader>.refractions : boolean

<maya_hairtubeshader>.diffuse : float

<maya_hairtubeshader>.color : fRGBA color

<maya_hairtubeshader>.transparency : fRGBA color

<maya_hairtubeshader>.ambientColor : fRGBA color

<maya_hairtubeshader>.incandescence : fRGBA color

<maya_hairtubeshader>.translucence : float

<maya_hairtubeshader>.translucenceFocus : float

<maya_hairtubeshader>.translucenceDepth : float

<maya_hairtubeshader>.opacityGain : float

<maya_hairtubeshader>.glowIntensity : float

<maya_hairtubeshader>.hideSource : boolean

<maya_hairtubeshader>.surfaceThickness : float

<maya_hairtubeshader>.shadowAttenuation : float

<maya_hairtubeshader>.transparencyDepth : float

<maya_hairtubeshader>.lightAbsorbance : float

<maya_hairtubeshader>.chromaticAberration : boolean

<maya_hairtubeshader>.normalCamera : point3

<maya_hairtubeshader>.matteOpacityMode : integer

<maya_hairtubeshader>.matteOpacity : float

<maya_hairtubeshader>.irradiance : fRGBA color

<maya_hairtubeshader>.irradianceColor : fRGBA color

<maya_hairtubeshader>.refractionBlur : float

<maya_hairtubeshader>.refractionBlurLimit : integer

<maya_hairtubeshader>.refractionRays : integer

<maya_hairtubeshader>.reflectionBlur : float

<maya_hairtubeshader>.reflectionBlurLimit : integer

<maya_hairtubeshader>.reflectionRays : integer

<maya_hairtubeshader>.tangentUCamera : point3

<maya_hairtubeshader>.tangentVCamera : point3

<maya_hairtubeshader>.scatterColor : fRGBA color

<maya_hairtubeshader>.scatterRadius : float

<maya_hairtubeshader>.scatterAccuracy : integer

<maya_hairtubeshader>.scatterFalloff : integer

<maya_hairtubeshader>.scatterLimit : integer

<maya_hairtubeshader>.scatterCache : integer

<maya_hairtubeshader>.position : float

<maya_hairtubeshader>.color : fRGBA color

<maya_hairtubeshader>.interp : integer

<maya_hairtubeshader>.Structure : paramBlock2

<maya_hairtubeshader>.outColor : fRGBA color

<maya_hairtubeshader>.outGlowColor : fRGBA color

<maya_hairtubeshader>.outMatteOpacity : fRGBA color

<maya_hairtubeshader>.outTransparency : fRGBA color

<maya_hairtubeshader>.outAmbient : fRGBA color

<maya_hairtubeshader>.outIncandescence : fRGBA color

<maya_hairtubeshader>.outIrradiance : fRGBA color

<maya_hairtubeshader>.outDiffuseShadowed : fRGBA color

<maya_hairtubeshader>.outDiffuseNoShadow : fRGBA color

<maya_hairtubeshader>.outShadow : fRGBA color

<maya_hairtubeshader>.outSpecularShadowed : fRGBA color

<maya_hairtubeshader>.outSpecularNoShadow : fRGBA color

<maya_hairtubeshader>.outReflection : fRGBA color

<maya_hairtubeshader>.outRefraction : fRGBA color

<maya_hairtubeshader>.outScatter : fRGBA color

<maya_hairtubeshader>.outOpacity : fRGBA color

<maya_hairtubeshader>.tubeDirection_connected : boolean

<maya_hairtubeshader>.tubeDirection_shader : texturemap

<maya_hairtubeshader>.tubeDirection_paramName : string

<maya_hairtubeshader>.specularPower_connected : boolean

<maya_hairtubeshader>.specularPower_shader : texturemap

<maya_hairtubeshader>.specularPower_paramName : string

<maya_hairtubeshader>.specularShift_connected : boolean

<maya_hairtubeshader>.specularShift_shader : texturemap

<maya_hairtubeshader>.specularShift_paramName : string

<maya_hairtubeshader>.scatterPower_connected : boolean

<maya_hairtubeshader>.scatterPower_shader : texturemap

<maya_hairtubeshader>.scatterPower_paramName : string

<maya_hairtubeshader>.scatter_connected : boolean

<maya_hairtubeshader>.scatter_shader : texturemap

<maya_hairtubeshader>.scatter_paramName : string

<maya_hairtubeshader>.uvCoord_connected : boolean

<maya_hairtubeshader>.uvCoord_shader : texturemap

<maya_hairtubeshader>.uvCoord_paramName : string

<maya_hairtubeshader>.reflectionLimit_connected : boolean

<maya_hairtubeshader>.reflectionLimit_shader : texturemap

<maya_hairtubeshader>.reflectionLimit_paramName : string

<maya_hairtubeshader>.specularColor_connected : boolean

<maya_hairtubeshader>.specularColor_shader : texturemap

<maya_hairtubeshader>.specularColor_paramName : string

<maya_hairtubeshader>.reflectivity_connected : boolean

<maya_hairtubeshader>.reflectivity_shader : texturemap

<maya_hairtubeshader>.reflectivity_paramName : string

<maya_hairtubeshader>.reflectedColor_connected : boolean

<maya_hairtubeshader>.reflectedColor_shader : texturemap

<maya_hairtubeshader>.reflectedColor_paramName : string

<maya_hairtubeshader>.reflectionSpecularity_connected : boolean

<maya_hairtubeshader>.reflectionSpecularity_shader : texturemap

<maya_hairtubeshader>.reflectionSpecularity_paramName : string

<maya_hairtubeshader>.refractionLimit_connected : boolean

<maya_hairtubeshader>.refractionLimit_shader : texturemap

<maya_hairtubeshader>.refractionLimit_paramName : string

<maya_hairtubeshader>.refractiveIndex_connected : boolean

<maya_hairtubeshader>.refractiveIndex_shader : texturemap

<maya_hairtubeshader>.refractiveIndex_paramName : string

<maya_hairtubeshader>.refractions_connected : boolean

<maya_hairtubeshader>.refractions_shader : texturemap

<maya_hairtubeshader>.refractions_paramName : string

<maya_hairtubeshader>.diffuse_connected : boolean

<maya_hairtubeshader>.diffuse_shader : texturemap

<maya_hairtubeshader>.diffuse_paramName : string

<maya_hairtubeshader>.color_connected : boolean

<maya_hairtubeshader>.color_shader : texturemap

<maya_hairtubeshader>.color_paramName : string

<maya_hairtubeshader>.transparency_connected : boolean

<maya_hairtubeshader>.transparency_shader : texturemap

<maya_hairtubeshader>.transparency_paramName : string

<maya_hairtubeshader>.ambientColor_connected : boolean

<maya_hairtubeshader>.ambientColor_shader : texturemap

<maya_hairtubeshader>.ambientColor_paramName : string

<maya_hairtubeshader>.incandescence_connected : boolean

<maya_hairtubeshader>.incandescence_shader : texturemap

<maya_hairtubeshader>.incandescence_paramName : string

<maya_hairtubeshader>.translucence_connected : boolean

<maya_hairtubeshader>.translucence_shader : texturemap

<maya_hairtubeshader>.translucence_paramName : string

<maya_hairtubeshader>.translucenceFocus_connected : boolean

<maya_hairtubeshader>.translucenceFocus_shader : texturemap

<maya_hairtubeshader>.translucenceFocus_paramName : string

<maya_hairtubeshader>.translucenceDepth_connected : boolean

<maya_hairtubeshader>.translucenceDepth_shader : texturemap

<maya_hairtubeshader>.translucenceDepth_paramName : string

<maya_hairtubeshader>.opacityGain_connected : boolean

<maya_hairtubeshader>.opacityGain_shader : texturemap

<maya_hairtubeshader>.opacityGain_paramName : string

<maya_hairtubeshader>.glowIntensity_connected : boolean

<maya_hairtubeshader>.glowIntensity_shader : texturemap

<maya_hairtubeshader>.glowIntensity_paramName : string

<maya_hairtubeshader>.hideSource_connected : boolean

<maya_hairtubeshader>.hideSource_shader : texturemap

<maya_hairtubeshader>.hideSource_paramName : string

<maya_hairtubeshader>.surfaceThickness_connected : boolean

<maya_hairtubeshader>.surfaceThickness_shader : texturemap

<maya_hairtubeshader>.surfaceThickness_paramName : string

<maya_hairtubeshader>.shadowAttenuation_connected : boolean

<maya_hairtubeshader>.shadowAttenuation_shader : texturemap

<maya_hairtubeshader>.shadowAttenuation_paramName : string

<maya_hairtubeshader>.transparencyDepth_connected : boolean

<maya_hairtubeshader>.transparencyDepth_shader : texturemap

<maya_hairtubeshader>.transparencyDepth_paramName : string

<maya_hairtubeshader>.lightAbsorbance_connected : boolean

<maya_hairtubeshader>.lightAbsorbance_shader : texturemap

<maya_hairtubeshader>.lightAbsorbance_paramName : string

<maya_hairtubeshader>.chromaticAberration_connected : boolean

<maya_hairtubeshader>.chromaticAberration_shader : texturemap

<maya_hairtubeshader>.chromaticAberration_paramName : string

<maya_hairtubeshader>.normalCamera_connected : boolean

<maya_hairtubeshader>.normalCamera_shader : texturemap

<maya_hairtubeshader>.normalCamera_paramName : string

<maya_hairtubeshader>.matteOpacityMode_connected : boolean

<maya_hairtubeshader>.matteOpacityMode_shader : texturemap

<maya_hairtubeshader>.matteOpacityMode_paramName : string

<maya_hairtubeshader>.matteOpacity_connected : boolean

<maya_hairtubeshader>.matteOpacity_shader : texturemap

<maya_hairtubeshader>.matteOpacity_paramName : string

<maya_hairtubeshader>.irradiance_connected : boolean

<maya_hairtubeshader>.irradiance_shader : texturemap

<maya_hairtubeshader>.irradiance_paramName : string

<maya_hairtubeshader>.irradianceColor_connected : boolean

<maya_hairtubeshader>.irradianceColor_shader : texturemap

<maya_hairtubeshader>.irradianceColor_paramName : string

<maya_hairtubeshader>.refractionBlur_connected : boolean

<maya_hairtubeshader>.refractionBlur_shader : texturemap

<maya_hairtubeshader>.refractionBlur_paramName : string

<maya_hairtubeshader>.refractionBlurLimit_connected : boolean

<maya_hairtubeshader>.refractionBlurLimit_shader : texturemap

<maya_hairtubeshader>.refractionBlurLimit_paramName : string

<maya_hairtubeshader>.refractionRays_connected : boolean

<maya_hairtubeshader>.refractionRays_shader : texturemap

<maya_hairtubeshader>.refractionRays_paramName : string

<maya_hairtubeshader>.reflectionBlur_connected : boolean

<maya_hairtubeshader>.reflectionBlur_shader : texturemap

<maya_hairtubeshader>.reflectionBlur_paramName : string

<maya_hairtubeshader>.reflectionBlurLimit_connected : boolean

<maya_hairtubeshader>.reflectionBlurLimit_shader : texturemap

<maya_hairtubeshader>.reflectionBlurLimit_paramName : string

<maya_hairtubeshader>.reflectionRays_connected : boolean

<maya_hairtubeshader>.reflectionRays_shader : texturemap

<maya_hairtubeshader>.reflectionRays_paramName : string

<maya_hairtubeshader>.tangentUCamera_connected : boolean

<maya_hairtubeshader>.tangentUCamera_shader : texturemap

<maya_hairtubeshader>.tangentUCamera_paramName : string

<maya_hairtubeshader>.tangentVCamera_connected : boolean

<maya_hairtubeshader>.tangentVCamera_shader : texturemap

<maya_hairtubeshader>.tangentVCamera_paramName : string

<maya_hairtubeshader>.scatterColor_connected : boolean

<maya_hairtubeshader>.scatterColor_shader : texturemap

<maya_hairtubeshader>.scatterColor_paramName : string

<maya_hairtubeshader>.scatterRadius_connected : boolean

<maya_hairtubeshader>.scatterRadius_shader : texturemap

<maya_hairtubeshader>.scatterRadius_paramName : string

<maya_hairtubeshader>.scatterAccuracy_connected : boolean

<maya_hairtubeshader>.scatterAccuracy_shader : texturemap

<maya_hairtubeshader>.scatterAccuracy_paramName : string

<maya_hairtubeshader>.scatterFalloff_connected : boolean

<maya_hairtubeshader>.scatterFalloff_shader : texturemap

<maya_hairtubeshader>.scatterFalloff_paramName : string

<maya_hairtubeshader>.scatterLimit_connected : boolean

<maya_hairtubeshader>.scatterLimit_shader : texturemap

<maya_hairtubeshader>.scatterLimit_paramName : string

<maya_hairtubeshader>.scatterCache_connected : boolean

<maya_hairtubeshader>.scatterCache_shader : texturemap

<maya_hairtubeshader>.scatterCache_paramName : string

<maya_hairtubeshader>.TheList : maxObject array

<maya_hairtubeshader>.Shader_Version : integer

maya_hairtubeshader interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_hardwareparticles : textureMap

maya_hardwareparticles : textureMap {7773161f,c56d5835}

Constructor:

maya_hardwareparticles: class instances not creatable by MAXScript

Properties:

<maya_hardwareparticles>.particleSystem : node

<maya_hardwareparticles>.normalDir : integer

<maya_hardwareparticles>.pointSize : integer

<maya_hardwareparticles>.useLighting : boolean

<maya_hardwareparticles>.multiCount : integer

<maya_hardwareparticles>.multiRadius : float

<maya_hardwareparticles>.lineWidth : integer

<maya_hardwareparticles>.tailFade : float

<maya_hardwareparticles>.tailSize : float

<maya_hardwareparticles>.normalDir_connected : boolean

<maya_hardwareparticles>.normalDir_shader : texturemap

<maya_hardwareparticles>.normalDir_paramName : string

<maya_hardwareparticles>.pointSize_connected : boolean

<maya_hardwareparticles>.pointSize_shader : texturemap

<maya_hardwareparticles>.pointSize_paramName : string

<maya_hardwareparticles>.useLighting_connected : boolean

<maya_hardwareparticles>.useLighting_shader : texturemap

<maya_hardwareparticles>.useLighting_paramName : string

<maya_hardwareparticles>.multiCount_connected : boolean

<maya_hardwareparticles>.multiCount_shader : texturemap

<maya_hardwareparticles>.multiCount_paramName : string

<maya_hardwareparticles>.multiRadius_connected : boolean

<maya_hardwareparticles>.multiRadius_shader : texturemap

<maya_hardwareparticles>.multiRadius_paramName : string

<maya_hardwareparticles>.lineWidth_connected : boolean

<maya_hardwareparticles>.lineWidth_shader : texturemap

<maya_hardwareparticles>.lineWidth_paramName : string

<maya_hardwareparticles>.tailFade_connected : boolean

<maya_hardwareparticles>.tailFade_shader : texturemap

<maya_hardwareparticles>.tailFade_paramName : string

<maya_hardwareparticles>.tailSize_connected : boolean

<maya_hardwareparticles>.tailSize_shader : texturemap

<maya_hardwareparticles>.tailSize_paramName : string

<maya_hardwareparticles>.TheList : maxObject array

<maya_hardwareparticles>.Shader_Version : integer

maya_hardwareparticles interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_hsv_to_color : textureMap

maya_hsv_to_color : textureMap {7773161f,6cfb568f}

Constructor:

maya_hsv_to_color: class instances not creatable by MAXScript

Properties:

<maya_hsv_to_color>.h : float

<maya_hsv_to_color>.s : float

<maya_hsv_to_color>.v : float

<maya_hsv_to_color>.a : float

<maya_hsv_to_color>.h_connected : boolean

<maya_hsv_to_color>.h_shader : texturemap

<maya_hsv_to_color>.h_paramName : string

<maya_hsv_to_color>.s_connected : boolean

<maya_hsv_to_color>.s_shader : texturemap

<maya_hsv_to_color>.s_paramName : string

<maya_hsv_to_color>.v_connected : boolean

<maya_hsv_to_color>.v_shader : texturemap

<maya_hsv_to_color>.v_paramName : string

<maya_hsv_to_color>.a_connected : boolean

<maya_hsv_to_color>.a_shader : texturemap

<maya_hsv_to_color>.a_paramName : string

<maya_hsv_to_color>.TheList : maxObject array

<maya_hsv_to_color>.Shader_Version : integer

maya_hsv_to_color interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_hsvtorgb : textureMap

maya_hsvtorgb : textureMap {7773161f,b66aaa37}

Constructor:

maya_hsvtorgb: class instances not creatable by MAXScript

Properties:

<maya_hsvtorgb>.inHsv : fRGBA color

<maya_hsvtorgb>.Structure : paramBlock2

<maya_hsvtorgb>.outRgb : fRGBA color

<maya_hsvtorgb>.inHsv_connected : boolean

<maya_hsvtorgb>.inHsv_shader : texturemap

<maya_hsvtorgb>.inHsv_paramName : string

<maya_hsvtorgb>.TheList : maxObject array

<maya_hsvtorgb>.Shader_Version : integer

maya_hsvtorgb interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_iblemitter : textureMap

maya_iblemitter : textureMap {7773161f,bef24436}

Constructor:

maya_iblemitter: class instances not creatable by MAXScript

Properties:

<maya_iblemitter>.mapping : integer

<maya_iblemitter>.infinite : boolean

<maya_iblemitter>.texture : filename

<maya_iblemitter>.Image_Frame_Number : integer

<maya_iblemitter>.color : fRGBA color

<maya_iblemitter>.standardEmission : boolean

<maya_iblemitter>.invert : boolean

<maya_iblemitter>.colorGain : fRGBA color

<maya_iblemitter>.colorOffset : fRGBA color

<maya_iblemitter>.placement : matrix3

<maya_iblemitter>.mapping_connected : boolean

<maya_iblemitter>.mapping_shader : texturemap

<maya_iblemitter>.mapping_paramName : string

<maya_iblemitter>.infinite_connected : boolean

<maya_iblemitter>.infinite_shader : texturemap

<maya_iblemitter>.infinite_paramName : string

<maya_iblemitter>.texture_connected : boolean

<maya_iblemitter>.texture_shader : texturemap

<maya_iblemitter>.texture_paramName : string

<maya_iblemitter>.color_connected : boolean

<maya_iblemitter>.color_shader : texturemap

<maya_iblemitter>.color_paramName : string

<maya_iblemitter>.standardEmission_connected : boolean

<maya_iblemitter>.standardEmission_shader : texturemap

<maya_iblemitter>.standardEmission_paramName : string

<maya_iblemitter>.invert_connected : boolean

<maya_iblemitter>.invert_shader : texturemap

<maya_iblemitter>.invert_paramName : string

<maya_iblemitter>.colorGain_connected : boolean

<maya_iblemitter>.colorGain_shader : texturemap

<maya_iblemitter>.colorGain_paramName : string

<maya_iblemitter>.colorOffset_connected : boolean

<maya_iblemitter>.colorOffset_shader : texturemap

<maya_iblemitter>.colorOffset_paramName : string

<maya_iblemitter>.placement_connected : boolean

<maya_iblemitter>.placement_shader : texturemap

<maya_iblemitter>.placement_paramName : string

<maya_iblemitter>.TheList : maxObject array

<maya_iblemitter>.Shader_Version : integer

maya_iblemitter interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_iblenv : textureMap

maya_iblenv : textureMap {7773161f,535faa6a}

Constructor:

maya_iblenv: class instances not creatable by MAXScript

Properties:

<maya_iblenv>.mapping : integer

<maya_iblenv>.infinite : boolean

<maya_iblenv>.texture : filename

<maya_iblenv>.Image_Frame_Number : integer

<maya_iblenv>.color : fRGBA color

<maya_iblenv>.visible : boolean

<maya_iblenv>.visibleInReflections : boolean

<maya_iblenv>.visibleInRefractions : boolean

<maya_iblenv>.visibleInEnvironment : boolean

<maya_iblenv>.visibleInFinalGather : boolean

<maya_iblenv>.alphaIsLuminance : boolean

<maya_iblenv>.invert : boolean

<maya_iblenv>.colorGain : fRGBA color

<maya_iblenv>.colorOffset : fRGBA color

<maya_iblenv>.fgInvert : boolean

<maya_iblenv>.fgColorGain : fRGBA color

<maya_iblenv>.fgColorOffset : fRGBA color

<maya_iblenv>.fgFilterSize : float

<maya_iblenv>.placement : matrix3

<maya_iblenv>.mapping_connected : boolean

<maya_iblenv>.mapping_shader : texturemap

<maya_iblenv>.mapping_paramName : string

<maya_iblenv>.infinite_connected : boolean

<maya_iblenv>.infinite_shader : texturemap

<maya_iblenv>.infinite_paramName : string

<maya_iblenv>.texture_connected : boolean

<maya_iblenv>.texture_shader : texturemap

<maya_iblenv>.texture_paramName : string

<maya_iblenv>.color_connected : boolean

<maya_iblenv>.color_shader : texturemap

<maya_iblenv>.color_paramName : string

<maya_iblenv>.visible_connected : boolean

<maya_iblenv>.visible_shader : texturemap

<maya_iblenv>.visible_paramName : string

<maya_iblenv>.visibleInReflections_connected : boolean

<maya_iblenv>.visibleInReflections_shader : texturemap

<maya_iblenv>.visibleInReflections_paramName : string

<maya_iblenv>.visibleInRefractions_connected : boolean

<maya_iblenv>.visibleInRefractions_shader : texturemap

<maya_iblenv>.visibleInRefractions_paramName : string

<maya_iblenv>.visibleInEnvironment_connected : boolean

<maya_iblenv>.visibleInEnvironment_shader : texturemap

<maya_iblenv>.visibleInEnvironment_paramName : string

<maya_iblenv>.visibleInFinalGather_connected : boolean

<maya_iblenv>.visibleInFinalGather_shader : texturemap

<maya_iblenv>.visibleInFinalGather_paramName : string

<maya_iblenv>.alphaIsLuminance_connected : boolean

<maya_iblenv>.alphaIsLuminance_shader : texturemap

<maya_iblenv>.alphaIsLuminance_paramName : string

<maya_iblenv>.invert_connected : boolean

<maya_iblenv>.invert_shader : texturemap

<maya_iblenv>.invert_paramName : string

<maya_iblenv>.colorGain_connected : boolean

<maya_iblenv>.colorGain_shader : texturemap

<maya_iblenv>.colorGain_paramName : string

<maya_iblenv>.colorOffset_connected : boolean

<maya_iblenv>.colorOffset_shader : texturemap

<maya_iblenv>.colorOffset_paramName : string

<maya_iblenv>.fgInvert_connected : boolean

<maya_iblenv>.fgInvert_shader : texturemap

<maya_iblenv>.fgInvert_paramName : string

<maya_iblenv>.fgColorGain_connected : boolean

<maya_iblenv>.fgColorGain_shader : texturemap

<maya_iblenv>.fgColorGain_paramName : string

<maya_iblenv>.fgColorOffset_connected : boolean

<maya_iblenv>.fgColorOffset_shader : texturemap

<maya_iblenv>.fgColorOffset_paramName : string

<maya_iblenv>.fgFilterSize_connected : boolean

<maya_iblenv>.fgFilterSize_shader : texturemap

<maya_iblenv>.fgFilterSize_paramName : string

<maya_iblenv>.placement_connected : boolean

<maya_iblenv>.placement_shader : texturemap

<maya_iblenv>.placement_paramName : string

<maya_iblenv>.TheList : maxObject array

<maya_iblenv>.Shader_Version : integer

maya_iblenv interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_ibllight : textureMap

maya_ibllight : textureMap {7773161f,ab6ea53d}

Constructor:

maya_ibllight: class instances not creatable by MAXScript

Properties:

<maya_ibllight>.mapping : integer

<maya_ibllight>.infinite : boolean

<maya_ibllight>.texture : filename

<maya_ibllight>.Image_Frame_Number : integer

<maya_ibllight>.color : fRGBA color

<maya_ibllight>.filter : point3

<maya_ibllight>.samples : point3

<maya_ibllight>.lowSamples : point3

<maya_ibllight>.jitter : float

<maya_ibllight>.skipBack : boolean

<maya_ibllight>.emitDiffuse : boolean

<maya_ibllight>.emitSpecular : boolean

<maya_ibllight>.useRayTraceShadows : boolean

<maya_ibllight>.shadowColor : fRGBA color

<maya_ibllight>.rayDepthLimit : integer

<maya_ibllight>.invert : boolean

<maya_ibllight>.colorGain : fRGBA color

<maya_ibllight>.colorOffset : fRGBA color

<maya_ibllight>.placement : matrix3

<maya_ibllight>.mapping_connected : boolean

<maya_ibllight>.mapping_shader : texturemap

<maya_ibllight>.mapping_paramName : string

<maya_ibllight>.infinite_connected : boolean

<maya_ibllight>.infinite_shader : texturemap

<maya_ibllight>.infinite_paramName : string

<maya_ibllight>.texture_connected : boolean

<maya_ibllight>.texture_shader : texturemap

<maya_ibllight>.texture_paramName : string

<maya_ibllight>.color_connected : boolean

<maya_ibllight>.color_shader : texturemap

<maya_ibllight>.color_paramName : string

<maya_ibllight>.filter_connected : boolean

<maya_ibllight>.filter_shader : texturemap

<maya_ibllight>.filter_paramName : string

<maya_ibllight>.samples_connected : boolean

<maya_ibllight>.samples_shader : texturemap

<maya_ibllight>.samples_paramName : string

<maya_ibllight>.lowSamples_connected : boolean

<maya_ibllight>.lowSamples_shader : texturemap

<maya_ibllight>.lowSamples_paramName : string

<maya_ibllight>.jitter_connected : boolean

<maya_ibllight>.jitter_shader : texturemap

<maya_ibllight>.jitter_paramName : string

<maya_ibllight>.skipBack_connected : boolean

<maya_ibllight>.skipBack_shader : texturemap

<maya_ibllight>.skipBack_paramName : string

<maya_ibllight>.emitDiffuse_connected : boolean

<maya_ibllight>.emitDiffuse_shader : texturemap

<maya_ibllight>.emitDiffuse_paramName : string

<maya_ibllight>.emitSpecular_connected : boolean

<maya_ibllight>.emitSpecular_shader : texturemap

<maya_ibllight>.emitSpecular_paramName : string

<maya_ibllight>.useRayTraceShadows_connected : boolean

<maya_ibllight>.useRayTraceShadows_shader : texturemap

<maya_ibllight>.useRayTraceShadows_paramName : string

<maya_ibllight>.shadowColor_connected : boolean

<maya_ibllight>.shadowColor_shader : texturemap

<maya_ibllight>.shadowColor_paramName : string

<maya_ibllight>.rayDepthLimit_connected : boolean

<maya_ibllight>.rayDepthLimit_shader : texturemap

<maya_ibllight>.rayDepthLimit_paramName : string

<maya_ibllight>.invert_connected : boolean

<maya_ibllight>.invert_shader : texturemap

<maya_ibllight>.invert_paramName : string

<maya_ibllight>.colorGain_connected : boolean

<maya_ibllight>.colorGain_shader : texturemap

<maya_ibllight>.colorGain_paramName : string

<maya_ibllight>.colorOffset_connected : boolean

<maya_ibllight>.colorOffset_shader : texturemap

<maya_ibllight>.colorOffset_paramName : string

<maya_ibllight>.placement_connected : boolean

<maya_ibllight>.placement_shader : texturemap

<maya_ibllight>.placement_paramName : string

<maya_ibllight>.TheList : maxObject array

<maya_ibllight>.Shader_Version : integer

maya_ibllight interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_imageplane : textureMap

maya_imageplane : textureMap {7773161f,b1f34747}

Constructor:

maya_imageplane: class instances not creatable by MAXScript

Properties:

<maya_imageplane>.type : integer

<maya_imageplane>.imageName : filename

<maya_imageplane>.Image_Frame_Number : integer

<maya_imageplane>.sourceTexture : fRGBA color

<maya_imageplane>.displayMode : integer

<maya_imageplane>.colorGain : fRGBA color

<maya_imageplane>.colorOffset : fRGBA color

<maya_imageplane>.alphaGain : float

<maya_imageplane>.visibleInReflections : boolean

<maya_imageplane>.visibleInRefractions : boolean

<maya_imageplane>.type_connected : boolean

<maya_imageplane>.type_shader : texturemap

<maya_imageplane>.type_paramName : string

<maya_imageplane>.imageName_connected : boolean

<maya_imageplane>.imageName_shader : texturemap

<maya_imageplane>.imageName_paramName : string

<maya_imageplane>.sourceTexture_connected : boolean

<maya_imageplane>.sourceTexture_shader : texturemap

<maya_imageplane>.sourceTexture_paramName : string

<maya_imageplane>.displayMode_connected : boolean

<maya_imageplane>.displayMode_shader : texturemap

<maya_imageplane>.displayMode_paramName : string

<maya_imageplane>.colorGain_connected : boolean

<maya_imageplane>.colorGain_shader : texturemap

<maya_imageplane>.colorGain_paramName : string

<maya_imageplane>.colorOffset_connected : boolean

<maya_imageplane>.colorOffset_shader : texturemap

<maya_imageplane>.colorOffset_paramName : string

<maya_imageplane>.alphaGain_connected : boolean

<maya_imageplane>.alphaGain_shader : texturemap

<maya_imageplane>.alphaGain_paramName : string

<maya_imageplane>.visibleInReflections_connected : boolean

<maya_imageplane>.visibleInReflections_shader : texturemap

<maya_imageplane>.visibleInReflections_paramName : string

<maya_imageplane>.visibleInRefractions_connected : boolean

<maya_imageplane>.visibleInRefractions_shader : texturemap

<maya_imageplane>.visibleInRefractions_paramName : string

<maya_imageplane>.TheList : maxObject array

<maya_imageplane>.Shader_Version : integer

maya_imageplane interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_imageplanedata : textureMap

maya_imageplanedata : textureMap {7773161f,4e52bb68}

Constructor:

maya_imageplanedata: class instances not creatable by MAXScript

Properties:

<maya_imageplanedata>.magic : integer

<maya_imageplanedata>.center : point3

<maya_imageplanedata>.u : point3

<maya_imageplanedata>.v : point3

<maya_imageplanedata>.n : point3

<maya_imageplanedata>.magic_connected : boolean

<maya_imageplanedata>.magic_shader : texturemap

<maya_imageplanedata>.magic_paramName : string

<maya_imageplanedata>.center_connected : boolean

<maya_imageplanedata>.center_shader : texturemap

<maya_imageplanedata>.center_paramName : string

<maya_imageplanedata>.u_connected : boolean

<maya_imageplanedata>.u_shader : texturemap

<maya_imageplanedata>.u_paramName : string

<maya_imageplanedata>.v_connected : boolean

<maya_imageplanedata>.v_shader : texturemap

<maya_imageplanedata>.v_paramName : string

<maya_imageplanedata>.n_connected : boolean

<maya_imageplanedata>.n_shader : texturemap

<maya_imageplanedata>.n_paramName : string

<maya_imageplanedata>.TheList : maxObject array

<maya_imageplanedata>.Shader_Version : integer

maya_imageplanedata interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_int_to_float : textureMap

maya_int_to_float : textureMap {7773161f,71095492}

Constructor:

maya_int_to_float: class instances not creatable by MAXScript

Properties:

<maya_int_to_float>.int : integer

<maya_int_to_float>.int_connected : boolean

<maya_int_to_float>.int_shader : texturemap

<maya_int_to_float>.int_paramName : string

<maya_int_to_float>.TheList : maxObject array

<maya_int_to_float>.Shader_Version : integer

maya_int_to_float interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_lambert : textureMap

maya_lambert : textureMap {7773161f,be5cac63}

maya_lambert: class instances not creatable by MAXScript

Properties:

<maya_lambert>.refractionLimit : integer

<maya_lambert>.refractiveIndex : float

<maya_lambert>.refractions : boolean

<maya_lambert>.diffuse : float

<maya_lambert>.color : fRGBA color

<maya_lambert>.transparency : fRGBA color

<maya_lambert>.ambientColor : fRGBA color

<maya_lambert>.incandescence : fRGBA color

<maya_lambert>.translucence : float

<maya_lambert>.translucenceFocus : float

<maya_lambert>.translucenceDepth : float

<maya_lambert>.opacityGain : float

<maya_lambert>.glowIntensity : float

<maya_lambert>.hideSource : boolean

<maya_lambert>.surfaceThickness : float

<maya_lambert>.shadowAttenuation : float

<maya_lambert>.transparencyDepth : float

<maya_lambert>.lightAbsorbance : float

<maya_lambert>.chromaticAberration : boolean

<maya_lambert>.normalCamera : point3

<maya_lambert>.matteOpacityMode : integer

<maya_lambert>.matteOpacity : float

<maya_lambert>.irradiance : fRGBA color

<maya_lambert>.irradianceColor : fRGBA color

<maya_lambert>.refractionBlur : float

<maya_lambert>.refractionBlurLimit : integer

<maya_lambert>.refractionRays : integer

<maya_lambert>.scatterColor : fRGBA color

<maya_lambert>.scatterRadius : float

<maya_lambert>.scatterAccuracy : integer

<maya_lambert>.scatterFalloff : integer

<maya_lambert>.scatterLimit : integer

<maya_lambert>.scatterCache : integer

<maya_lambert>.Structure : paramBlock2

<maya_lambert>.outColor : fRGBA color

<maya_lambert>.outGlowColor : fRGBA color

<maya_lambert>.outMatteOpacity : fRGBA color

<maya_lambert>.outTransparency : fRGBA color

<maya_lambert>.outAmbient : fRGBA color

<maya_lambert>.outIncandescence : fRGBA color

<maya_lambert>.outIrradiance : fRGBA color

<maya_lambert>.outDiffuseShadowed : fRGBA color

<maya_lambert>.outDiffuseNoShadow : fRGBA color

<maya_lambert>.outShadow : fRGBA color

<maya_lambert>.outSpecularShadowed : fRGBA color

<maya_lambert>.outSpecularNoShadow : fRGBA color

<maya_lambert>.outReflection : fRGBA color

<maya_lambert>.outRefraction : fRGBA color

<maya_lambert>.outScatter : fRGBA color

<maya_lambert>.outOpacity : fRGBA color

<maya_lambert>.refractionLimit_connected : boolean

<maya_lambert>.refractionLimit_shader : texturemap

<maya_lambert>.refractionLimit_paramName : string

<maya_lambert>.refractiveIndex_connected : boolean

<maya_lambert>.refractiveIndex_shader : texturemap

<maya_lambert>.refractiveIndex_paramName : string

<maya_lambert>.refractions_connected : boolean

<maya_lambert>.refractions_shader : texturemap

<maya_lambert>.refractions_paramName : string

<maya_lambert>.diffuse_connected : boolean

<maya_lambert>.diffuse_shader : texturemap

<maya_lambert>.diffuse_paramName : string

<maya_lambert>.color_connected : boolean

<maya_lambert>.color_shader : texturemap

<maya_lambert>.color_paramName : string

<maya_lambert>.transparency_connected : boolean

<maya_lambert>.transparency_shader : texturemap

<maya_lambert>.transparency_paramName : string

<maya_lambert>.ambientColor_connected : boolean

<maya_lambert>.ambientColor_shader : texturemap

<maya_lambert>.ambientColor_paramName : string

<maya_lambert>.incandescence_connected : boolean

<maya_lambert>.incandescence_shader : texturemap

<maya_lambert>.incandescence_paramName : string

<maya_lambert>.translucence_connected : boolean

<maya_lambert>.translucence_shader : texturemap

<maya_lambert>.translucence_paramName : string

<maya_lambert>.translucenceFocus_connected : boolean

<maya_lambert>.translucenceFocus_shader : texturemap

<maya_lambert>.translucenceFocus_paramName : string

<maya_lambert>.translucenceDepth_connected : boolean

<maya_lambert>.translucenceDepth_shader : texturemap

<maya_lambert>.translucenceDepth_paramName : string

<maya_lambert>.opacityGain_connected : boolean

<maya_lambert>.opacityGain_shader : texturemap

<maya_lambert>.opacityGain_paramName : string

<maya_lambert>.glowIntensity_connected : boolean

<maya_lambert>.glowIntensity_shader : texturemap

<maya_lambert>.glowIntensity_paramName : string

<maya_lambert>.hideSource_connected : boolean

<maya_lambert>.hideSource_shader : texturemap

<maya_lambert>.hideSource_paramName : string

<maya_lambert>.surfaceThickness_connected : boolean

<maya_lambert>.surfaceThickness_shader : texturemap

<maya_lambert>.surfaceThickness_paramName : string

<maya_lambert>.shadowAttenuation_connected : boolean

<maya_lambert>.shadowAttenuation_shader : texturemap

<maya_lambert>.shadowAttenuation_paramName : string

<maya_lambert>.transparencyDepth_connected : boolean

<maya_lambert>.transparencyDepth_shader : texturemap

<maya_lambert>.transparencyDepth_paramName : string

<maya_lambert>.lightAbsorbance_connected : boolean

<maya_lambert>.lightAbsorbance_shader : texturemap

<maya_lambert>.lightAbsorbance_paramName : string

<maya_lambert>.chromaticAberration_connected : boolean

<maya_lambert>.chromaticAberration_shader : texturemap

<maya_lambert>.chromaticAberration_paramName : string

<maya_lambert>.normalCamera_connected : boolean

<maya_lambert>.normalCamera_shader : texturemap

<maya_lambert>.normalCamera_paramName : string

<maya_lambert>.matteOpacityMode_connected : boolean

<maya_lambert>.matteOpacityMode_shader : texturemap

<maya_lambert>.matteOpacityMode_paramName : string

<maya_lambert>.matteOpacity_connected : boolean

<maya_lambert>.matteOpacity_shader : texturemap

<maya_lambert>.matteOpacity_paramName : string

<maya_lambert>.irradiance_connected : boolean

<maya_lambert>.irradiance_shader : texturemap

<maya_lambert>.irradiance_paramName : string

<maya_lambert>.irradianceColor_connected : boolean

<maya_lambert>.irradianceColor_shader : texturemap

<maya_lambert>.irradianceColor_paramName : string

<maya_lambert>.refractionBlur_connected : boolean

<maya_lambert>.refractionBlur_shader : texturemap

<maya_lambert>.refractionBlur_paramName : string

<maya_lambert>.refractionBlurLimit_connected : boolean

<maya_lambert>.refractionBlurLimit_shader : texturemap

<maya_lambert>.refractionBlurLimit_paramName : string

<maya_lambert>.refractionRays_connected : boolean

<maya_lambert>.refractionRays_shader : texturemap

<maya_lambert>.refractionRays_paramName : string

<maya_lambert>.scatterColor_connected : boolean

<maya_lambert>.scatterColor_shader : texturemap

<maya_lambert>.scatterColor_paramName : string

<maya_lambert>.scatterRadius_connected : boolean

<maya_lambert>.scatterRadius_shader : texturemap

<maya_lambert>.scatterRadius_paramName : string

<maya_lambert>.scatterAccuracy_connected : boolean

<maya_lambert>.scatterAccuracy_shader : texturemap

<maya_lambert>.scatterAccuracy_paramName : string

<maya_lambert>.scatterFalloff_connected : boolean

<maya_lambert>.scatterFalloff_shader : texturemap

<maya_lambert>.scatterFalloff_paramName : string

<maya_lambert>.scatterLimit_connected : boolean

<maya_lambert>.scatterLimit_shader : texturemap

<maya_lambert>.scatterLimit_paramName : string

<maya_lambert>.scatterCache_connected : boolean

<maya_lambert>.scatterCache_shader : texturemap

<maya_lambert>.scatterCache_paramName : string

<maya_lambert>.TheList : maxObject array

<maya_lambert>.Shader_Version : integer

maya_lambert interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_layeredshader : textureMap

maya_layeredshader : textureMap {7773161f,5e0ea954}

Constructor:

maya_layeredshader: class instances not creatable by MAXScript

Properties:

<maya_layeredshader>.compositingFlag : integer

<maya_layeredshader>.inputs : paramBlock2 array

<maya_layeredshader>.matteOpacityMode : integer

<maya_layeredshader>.matteOpacity : float

<maya_layeredshader>.color : fRGBA color

<maya_layeredshader>.transparency : fRGBA color

<maya_layeredshader>.glowColor : fRGBA color

<maya_layeredshader>.Structure : paramBlock2

<maya_layeredshader>.outColor : fRGBA color

<maya_layeredshader>.outGlowColor : fRGBA color

<maya_layeredshader>.outMatteOpacity : fRGBA color

<maya_layeredshader>.outTransparency : fRGBA color

<maya_layeredshader>.outAmbient : fRGBA color

<maya_layeredshader>.outIncandescence : fRGBA color

<maya_layeredshader>.outIrradiance : fRGBA color

<maya_layeredshader>.outDiffuseShadowed : fRGBA color

<maya_layeredshader>.outDiffuseNoShadow : fRGBA color

<maya_layeredshader>.outShadow : fRGBA color

<maya_layeredshader>.outSpecularShadowed : fRGBA color

<maya_layeredshader>.outSpecularNoShadow : fRGBA color

<maya_layeredshader>.outReflection : fRGBA color

<maya_layeredshader>.outRefraction : fRGBA color

<maya_layeredshader>.outScatter : fRGBA color

<maya_layeredshader>.outOpacity : fRGBA color

<maya_layeredshader>.compositingFlag_connected : boolean

<maya_layeredshader>.compositingFlag_shader : texturemap

<maya_layeredshader>.compositingFlag_paramName : string

<maya_layeredshader>.matteOpacityMode_connected : boolean

<maya_layeredshader>.matteOpacityMode_shader : texturemap

<maya_layeredshader>.matteOpacityMode_paramName : string

<maya_layeredshader>.matteOpacity_connected : boolean

<maya_layeredshader>.matteOpacity_shader : texturemap

<maya_layeredshader>.matteOpacity_paramName : string

<maya_layeredshader>.TheList : maxObject array

<maya_layeredshader>.Shader_Version : integer

maya_layeredshader interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_layeredtexture : textureMap

maya_layeredtexture : textureMap {7773161f,4e52ac69}

Constructor:

maya_layeredtexture: class instances not creatable by MAXScript

Properties:

<maya_layeredtexture>.inputs : paramBlock2 array

<maya_layeredtexture>.alphaIsLuminance : boolean

<maya_layeredtexture>.color : fRGBA color

<maya_layeredtexture>.alpha : float

<maya_layeredtexture>.blendMode : integer

<maya_layeredtexture>.isVisible : boolean

<maya_layeredtexture>.Structure : paramBlock2

<maya_layeredtexture>.outColor : fRGBA color

<maya_layeredtexture>.outAlpha : float

<maya_layeredtexture>.outTransparency : fRGBA color

<maya_layeredtexture>.alphaIsLuminance_connected : boolean

<maya_layeredtexture>.alphaIsLuminance_shader : texturemap

<maya_layeredtexture>.alphaIsLuminance_paramName : string

<maya_layeredtexture>.TheList : maxObject array

<maya_layeredtexture>.Shader_Version : integer

maya_layeredtexture interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_leather : textureMap

maya_leather : textureMap {7773161f,b86ba959}

Constructor:

maya_leather: class instances not creatable by MAXScript

Properties:

<maya_leather>.cellColor : fRGBA color

<maya_leather>.creaseColor : fRGBA color

<maya_leather>.cellSize : float

<maya_leather>.density : float

<maya_leather>.spottyness : float

<maya_leather>.randomness : float

<maya_leather>.threshold : float

<maya_leather>.creases : boolean

<maya_leather>.filter : float

<maya_leather>.filterSize : point3

<maya_leather>.filterOffset : float

<maya_leather>.blend : float

<maya_leather>.wrap : boolean

<maya_leather>.invert : boolean

<maya_leather>.alphaIsLuminance : boolean

<maya_leather>.colorGain : fRGBA color

<maya_leather>.colorOffset : fRGBA color

<maya_leather>.alphaGain : float

<maya_leather>.alphaOffset : float

<maya_leather>.defaultColor : fRGBA color

<maya_leather>.placementMatrix : matrix3

<maya_leather>.local : boolean

<maya_leather>.Structure : paramBlock2

<maya_leather>.outColor : fRGBA color

<maya_leather>.outAlpha : float

<maya_leather>.cellColor_connected : boolean

<maya_leather>.cellColor_shader : texturemap

<maya_leather>.cellColor_paramName : string

<maya_leather>.creaseColor_connected : boolean

<maya_leather>.creaseColor_shader : texturemap

<maya_leather>.creaseColor_paramName : string

<maya_leather>.cellSize_connected : boolean

<maya_leather>.cellSize_shader : texturemap

<maya_leather>.cellSize_paramName : string

<maya_leather>.density_connected : boolean

<maya_leather>.density_shader : texturemap

<maya_leather>.density_paramName : string

<maya_leather>.spottyness_connected : boolean

<maya_leather>.spottyness_shader : texturemap

<maya_leather>.spottyness_paramName : string

<maya_leather>.randomness_connected : boolean

<maya_leather>.randomness_shader : texturemap

<maya_leather>.randomness_paramName : string

<maya_leather>.threshold_connected : boolean

<maya_leather>.threshold_shader : texturemap

<maya_leather>.threshold_paramName : string

<maya_leather>.creases_connected : boolean

<maya_leather>.creases_shader : texturemap

<maya_leather>.creases_paramName : string

<maya_leather>.filter_connected : boolean

<maya_leather>.filter_shader : texturemap

<maya_leather>.filter_paramName : string

<maya_leather>.filterSize_connected : boolean

<maya_leather>.filterSize_shader : texturemap

<maya_leather>.filterSize_paramName : string

<maya_leather>.filterOffset_connected : boolean

<maya_leather>.filterOffset_shader : texturemap

<maya_leather>.filterOffset_paramName : string

<maya_leather>.blend_connected : boolean

<maya_leather>.blend_shader : texturemap

<maya_leather>.blend_paramName : string

<maya_leather>.wrap_connected : boolean

<maya_leather>.wrap_shader : texturemap

<maya_leather>.wrap_paramName : string

<maya_leather>.invert_connected : boolean

<maya_leather>.invert_shader : texturemap

<maya_leather>.invert_paramName : string

<maya_leather>.alphaIsLuminance_connected : boolean

<maya_leather>.alphaIsLuminance_shader : texturemap

<maya_leather>.alphaIsLuminance_paramName : string

<maya_leather>.colorGain_connected : boolean

<maya_leather>.colorGain_shader : texturemap

<maya_leather>.colorGain_paramName : string

<maya_leather>.colorOffset_connected : boolean

<maya_leather>.colorOffset_shader : texturemap

<maya_leather>.colorOffset_paramName : string

<maya_leather>.alphaGain_connected : boolean

<maya_leather>.alphaGain_shader : texturemap

<maya_leather>.alphaGain_paramName : string

<maya_leather>.alphaOffset_connected : boolean

<maya_leather>.alphaOffset_shader : texturemap

<maya_leather>.alphaOffset_paramName : string

<maya_leather>.defaultColor_connected : boolean

<maya_leather>.defaultColor_shader : texturemap

<maya_leather>.defaultColor_paramName : string

<maya_leather>.placementMatrix_connected : boolean

<maya_leather>.placementMatrix_shader : texturemap

<maya_leather>.placementMatrix_paramName : string

<maya_leather>.local_connected : boolean

<maya_leather>.local_shader : texturemap

<maya_leather>.local_paramName : string

<maya_leather>.TheList : maxObject array

<maya_leather>.Shader_Version : integer

maya_leather interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_lenslightmap : textureMap

maya_lenslightmap : textureMap {7773161f,4f0a596c}

Constructor:

maya_lenslightmap: class instances not creatable by MAXScript

Properties:

<maya_lenslightmap>.content : integer

<maya_lenslightmap>.occlusionRays : integer

<maya_lenslightmap>.occlusionFalloff : float

<maya_lenslightmap>.customShader : texturemap

<maya_lenslightmap>.alphaMode : integer

<maya_lenslightmap>.uvSpace : integer

<maya_lenslightmap>.uvMin : point3

<maya_lenslightmap>.uvMax : point3

<maya_lenslightmap>.rayDirection : integer

<maya_lenslightmap>.normalDirection : integer

<maya_lenslightmap>.backgroundColor : fRGBA color

<maya_lenslightmap>.instances : node array

<maya_lenslightmap>.content_connected : boolean

<maya_lenslightmap>.content_shader : texturemap

<maya_lenslightmap>.content_paramName : string

<maya_lenslightmap>.occlusionRays_connected : boolean

<maya_lenslightmap>.occlusionRays_shader : texturemap

<maya_lenslightmap>.occlusionRays_paramName : string

<maya_lenslightmap>.occlusionFalloff_connected : boolean

<maya_lenslightmap>.occlusionFalloff_shader : texturemap

<maya_lenslightmap>.occlusionFalloff_paramName : string

<maya_lenslightmap>.alphaMode_connected : boolean

<maya_lenslightmap>.alphaMode_shader : texturemap

<maya_lenslightmap>.alphaMode_paramName : string

<maya_lenslightmap>.uvSpace_connected : boolean

<maya_lenslightmap>.uvSpace_shader : texturemap

<maya_lenslightmap>.uvSpace_paramName : string

<maya_lenslightmap>.uvMin_connected : boolean

<maya_lenslightmap>.uvMin_shader : texturemap

<maya_lenslightmap>.uvMin_paramName : string

<maya_lenslightmap>.uvMax_connected : boolean

<maya_lenslightmap>.uvMax_shader : texturemap

<maya_lenslightmap>.uvMax_paramName : string

<maya_lenslightmap>.rayDirection_connected : boolean

<maya_lenslightmap>.rayDirection_shader : texturemap

<maya_lenslightmap>.rayDirection_paramName : string

<maya_lenslightmap>.normalDirection_connected : boolean

<maya_lenslightmap>.normalDirection_shader : texturemap

<maya_lenslightmap>.normalDirection_paramName : string

<maya_lenslightmap>.backgroundColor_connected : boolean

<maya_lenslightmap>.backgroundColor_shader : texturemap

<maya_lenslightmap>.backgroundColor_paramName : string

<maya_lenslightmap>.TheList : maxObject array

<maya_lenslightmap>.Shader_Version : integer

maya_lenslightmap interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_lightdata : textureMap

maya_lightdata : textureMap {7773161f,ad665c41}

Constructor:

maya_lightdata: class instances not creatable by MAXScript

Properties:

<maya_lightdata>.magic : integer

<maya_lightdata>.furShadingType : integer

<maya_lightdata>.furSelfShade : float

<maya_lightdata>.furSelfShadeDarkness : float

<maya_lightdata>.furBackShadeFactor : float

<maya_lightdata>.furBackShadeDarkness : float

<maya_lightdata>.furLightMultiplier : float

<maya_lightdata>.magic_connected : boolean

<maya_lightdata>.magic_shader : texturemap

<maya_lightdata>.magic_paramName : string

<maya_lightdata>.furShadingType_connected : boolean

<maya_lightdata>.furShadingType_shader : texturemap

<maya_lightdata>.furShadingType_paramName : string

<maya_lightdata>.furSelfShade_connected : boolean

<maya_lightdata>.furSelfShade_shader : texturemap

<maya_lightdata>.furSelfShade_paramName : string

<maya_lightdata>.furSelfShadeDarkness_connected : boolean

<maya_lightdata>.furSelfShadeDarkness_shader : texturemap

<maya_lightdata>.furSelfShadeDarkness_paramName : string

<maya_lightdata>.furBackShadeFactor_connected : boolean

<maya_lightdata>.furBackShadeFactor_shader : texturemap

<maya_lightdata>.furBackShadeFactor_paramName : string

<maya_lightdata>.furBackShadeDarkness_connected : boolean

<maya_lightdata>.furBackShadeDarkness_shader : texturemap

<maya_lightdata>.furBackShadeDarkness_paramName : string

<maya_lightdata>.furLightMultiplier_connected : boolean

<maya_lightdata>.furLightMultiplier_shader : texturemap

<maya_lightdata>.furLightMultiplier_paramName : string

<maya_lightdata>.TheList : maxObject array

<maya_lightdata>.Shader_Version : integer

maya_lightdata interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_lightfog : textureMap

maya_lightfog : textureMap {7773161f,af68bd50}

Constructor:

maya_lightfog: class instances not creatable by MAXScript

Properties:

<maya_lightfog>.light : node

<maya_lightfog>.color : fRGBA color

<maya_lightfog>.density : float

<maya_lightfog>.fastDropOff : boolean

<maya_lightfog>.colorBasedTransparency : boolean

<maya_lightfog>.matteOpacityMode : integer

<maya_lightfog>.matteOpacity : float

<maya_lightfog>.visibleInReflections : boolean

<maya_lightfog>.visibleInRefractions : boolean

<maya_lightfog>.Structure : paramBlock2

<maya_lightfog>.outColor : fRGBA color

<maya_lightfog>.outGlowColor : fRGBA color

<maya_lightfog>.outMatteOpacity : fRGBA color

<maya_lightfog>.outTransparency : fRGBA color

<maya_lightfog>.color_connected : boolean

<maya_lightfog>.color_shader : texturemap

<maya_lightfog>.color_paramName : string

<maya_lightfog>.density_connected : boolean

<maya_lightfog>.density_shader : texturemap

<maya_lightfog>.density_paramName : string

<maya_lightfog>.fastDropOff_connected : boolean

<maya_lightfog>.fastDropOff_shader : texturemap

<maya_lightfog>.fastDropOff_paramName : string

<maya_lightfog>.colorBasedTransparency_connected : boolean

<maya_lightfog>.colorBasedTransparency_shader : texturemap

<maya_lightfog>.colorBasedTransparency_paramName : string

<maya_lightfog>.matteOpacityMode_connected : boolean

<maya_lightfog>.matteOpacityMode_shader : texturemap

<maya_lightfog>.matteOpacityMode_paramName : string

<maya_lightfog>.matteOpacity_connected : boolean

<maya_lightfog>.matteOpacity_shader : texturemap

<maya_lightfog>.matteOpacity_paramName : string

<maya_lightfog>.visibleInReflections_connected : boolean

<maya_lightfog>.visibleInReflections_shader : texturemap

<maya_lightfog>.visibleInReflections_paramName : string

<maya_lightfog>.visibleInRefractions_connected : boolean

<maya_lightfog>.visibleInRefractions_shader : texturemap

<maya_lightfog>.visibleInRefractions_paramName : string

<maya_lightfog>.TheList : maxObject array

<maya_lightfog>.Shader_Version : integer

maya_lightfog interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_lightinfo : textureMap

maya_lightinfo : textureMap {7773161f,ae6b5a4f}

Constructor:

maya_lightinfo: class instances not creatable by MAXScript

Properties:

<maya_lightinfo>.light : node

<maya_lightinfo>.lightDirectionOnly : boolean

<maya_lightinfo>.Structure : paramBlock2

<maya_lightinfo>.lightPosition : point3

<maya_lightinfo>.lightDirection : point3

<maya_lightinfo>.sampleDistance : float

<maya_lightinfo>.lightDirectionOnly_connected : boolean

<maya_lightinfo>.lightDirectionOnly_shader : texturemap

<maya_lightinfo>.lightDirectionOnly_paramName : string

<maya_lightinfo>.TheList : maxObject array

<maya_lightinfo>.Shader_Version : integer

maya_lightinfo interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_lightlink : textureMap

maya_lightlink : textureMap {7773161f,b56e5647}

Constructor:

maya_lightlink: class instances not creatable by MAXScript

Properties:

<maya_lightlink>.ignoreLinks : node array

<maya_lightlink>.TheList : maxObject array

<maya_lightlink>.Shader_Version : integer

maya_lightlink interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_luminance : textureMap

maya_luminance : textureMap {7773161f,a85f4a4b}

Constructor:

maya_luminance: class instances not creatable by MAXScript

Properties:

<maya_luminance>.value : fRGBA color

<maya_luminance>.Structure : paramBlock2

<maya_luminance>.outValue : float

<maya_luminance>.value_connected : boolean

<maya_luminance>.value_shader : texturemap

<maya_luminance>.value_paramName : string

<maya_luminance>.TheList : maxObject array

<maya_luminance>.Shader_Version : integer

maya_luminance interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_marble : textureMap

maya_marble : textureMap {7773161f,596fa463}

Constructor:

maya_marble: class instances not creatable by MAXScript

Properties:

<maya_marble>.fillerColor : fRGBA color

<maya_marble>.veinColor : fRGBA color

<maya_marble>.veinWidth : float

<maya_marble>.diffusion : float

<maya_marble>.contrast : float

<maya_marble>.ripples : point3

<maya_marble>.depth : point3

<maya_marble>.amplitude : float

<maya_marble>.ratio : float

<maya_marble>.filter : float

<maya_marble>.filterSize : point3

<maya_marble>.filterOffset : float

<maya_marble>.blend : float

<maya_marble>.wrap : boolean

<maya_marble>.invert : boolean

<maya_marble>.alphaIsLuminance : boolean

<maya_marble>.colorGain : fRGBA color

<maya_marble>.colorOffset : fRGBA color

<maya_marble>.alphaGain : float

<maya_marble>.alphaOffset : float

<maya_marble>.defaultColor : fRGBA color

<maya_marble>.normalCamera : point3

<maya_marble>.placementMatrix : matrix3

<maya_marble>.local : boolean

<maya_marble>.Structure : paramBlock2

<maya_marble>.outColor : fRGBA color

<maya_marble>.outAlpha : float

<maya_marble>.fillerColor_connected : boolean

<maya_marble>.fillerColor_shader : texturemap

<maya_marble>.fillerColor_paramName : string

<maya_marble>.veinColor_connected : boolean

<maya_marble>.veinColor_shader : texturemap

<maya_marble>.veinColor_paramName : string

<maya_marble>.veinWidth_connected : boolean

<maya_marble>.veinWidth_shader : texturemap

<maya_marble>.veinWidth_paramName : string

<maya_marble>.diffusion_connected : boolean

<maya_marble>.diffusion_shader : texturemap

<maya_marble>.diffusion_paramName : string

<maya_marble>.contrast_connected : boolean

<maya_marble>.contrast_shader : texturemap

<maya_marble>.contrast_paramName : string

<maya_marble>.ripples_connected : boolean

<maya_marble>.ripples_shader : texturemap

<maya_marble>.ripples_paramName : string

<maya_marble>.depth_connected : boolean

<maya_marble>.depth_shader : texturemap

<maya_marble>.depth_paramName : string

<maya_marble>.amplitude_connected : boolean

<maya_marble>.amplitude_shader : texturemap

<maya_marble>.amplitude_paramName : string

<maya_marble>.ratio_connected : boolean

<maya_marble>.ratio_shader : texturemap

<maya_marble>.ratio_paramName : string

<maya_marble>.filter_connected : boolean

<maya_marble>.filter_shader : texturemap

<maya_marble>.filter_paramName : string

<maya_marble>.filterSize_connected : boolean

<maya_marble>.filterSize_shader : texturemap

<maya_marble>.filterSize_paramName : string

<maya_marble>.filterOffset_connected : boolean

<maya_marble>.filterOffset_shader : texturemap

<maya_marble>.filterOffset_paramName : string

<maya_marble>.blend_connected : boolean

<maya_marble>.blend_shader : texturemap

<maya_marble>.blend_paramName : string

<maya_marble>.wrap_connected : boolean

<maya_marble>.wrap_shader : texturemap

<maya_marble>.wrap_paramName : string

<maya_marble>.invert_connected : boolean

<maya_marble>.invert_shader : texturemap

<maya_marble>.invert_paramName : string

<maya_marble>.alphaIsLuminance_connected : boolean

<maya_marble>.alphaIsLuminance_shader : texturemap

<maya_marble>.alphaIsLuminance_paramName : string

<maya_marble>.colorGain_connected : boolean

<maya_marble>.colorGain_shader : texturemap

<maya_marble>.colorGain_paramName : string

<maya_marble>.colorOffset_connected : boolean

<maya_marble>.colorOffset_shader : texturemap

<maya_marble>.colorOffset_paramName : string

<maya_marble>.alphaGain_connected : boolean

<maya_marble>.alphaGain_shader : texturemap

<maya_marble>.alphaGain_paramName : string

<maya_marble>.alphaOffset_connected : boolean

<maya_marble>.alphaOffset_shader : texturemap

<maya_marble>.alphaOffset_paramName : string

<maya_marble>.defaultColor_connected : boolean

<maya_marble>.defaultColor_shader : texturemap

<maya_marble>.defaultColor_paramName : string

<maya_marble>.normalCamera_connected : boolean

<maya_marble>.normalCamera_shader : texturemap

<maya_marble>.normalCamera_paramName : string

<maya_marble>.placementMatrix_connected : boolean

<maya_marble>.placementMatrix_shader : texturemap

<maya_marble>.placementMatrix_paramName : string

<maya_marble>.local_connected : boolean

<maya_marble>.local_shader : texturemap

<maya_marble>.local_paramName : string

<maya_marble>.TheList : maxObject array

<maya_marble>.Shader_Version : integer

maya_marble interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_material_displace : textureMap

maya_material_displace : textureMap {7773161f,c26b783e}

Constructor:

maya_material_displace: class instances not creatable by MAXScript

Properties:

<maya_material_displace>.displacement : float

<maya_material_displace>.displacement_connected : boolean

<maya_material_displace>.displacement_shader : texturemap

<maya_material_displace>.displacement_paramName : string

<maya_material_displace>.TheList : maxObject array

<maya_material_displace>.Shader_Version : integer

maya_material_displace interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_mountain : textureMap

maya_mountain : textureMap {7773161f,c369bc45}

maya_mountain: class instances not creatable by MAXScript

Properties:

<maya_mountain>.snowColor : fRGBA color

<maya_mountain>.rockColor : fRGBA color

<maya_mountain>.amplitude : float

<maya_mountain>.snowRoughness : float

<maya_mountain>.rockRoughness : float

<maya_mountain>.boundary : float

<maya_mountain>.snowAltitude : float

<maya_mountain>.snowDropoff : float

<maya_mountain>.snowSlope : float

<maya_mountain>.depthMax : float

<maya_mountain>.uvCoord : point3

<maya_mountain>.uvFilterSize : point3

<maya_mountain>.filter : float

<maya_mountain>.filterOffset : float

<maya_mountain>.invert : boolean

<maya_mountain>.alphaIsLuminance : boolean

<maya_mountain>.colorGain : fRGBA color

<maya_mountain>.colorOffset : fRGBA color

<maya_mountain>.alphaGain : float

<maya_mountain>.alphaOffset : float

<maya_mountain>.defaultColor : fRGBA color

<maya_mountain>.Structure : paramBlock2

<maya_mountain>.outColor : fRGBA color

<maya_mountain>.outAlpha : float

<maya_mountain>.snowColor_connected : boolean

<maya_mountain>.snowColor_shader : texturemap

<maya_mountain>.snowColor_paramName : string

<maya_mountain>.rockColor_connected : boolean

<maya_mountain>.rockColor_shader : texturemap

<maya_mountain>.rockColor_paramName : string

<maya_mountain>.amplitude_connected : boolean

<maya_mountain>.amplitude_shader : texturemap

<maya_mountain>.amplitude_paramName : string

<maya_mountain>.snowRoughness_connected : boolean

<maya_mountain>.snowRoughness_shader : texturemap

<maya_mountain>.snowRoughness_paramName : string

<maya_mountain>.rockRoughness_connected : boolean

<maya_mountain>.rockRoughness_shader : texturemap

<maya_mountain>.rockRoughness_paramName : string

<maya_mountain>.boundary_connected : boolean

<maya_mountain>.boundary_shader : texturemap

<maya_mountain>.boundary_paramName : string

<maya_mountain>.snowAltitude_connected : boolean

<maya_mountain>.snowAltitude_shader : texturemap

<maya_mountain>.snowAltitude_paramName : string

<maya_mountain>.snowDropoff_connected : boolean

<maya_mountain>.snowDropoff_shader : texturemap

<maya_mountain>.snowDropoff_paramName : string

<maya_mountain>.snowSlope_connected : boolean

<maya_mountain>.snowSlope_shader : texturemap

<maya_mountain>.snowSlope_paramName : string

<maya_mountain>.depthMax_connected : boolean

<maya_mountain>.depthMax_shader : texturemap

<maya_mountain>.depthMax_paramName : string

<maya_mountain>.uvCoord_connected : boolean

<maya_mountain>.uvCoord_shader : texturemap

<maya_mountain>.uvCoord_paramName : string

<maya_mountain>.uvFilterSize_connected : boolean

<maya_mountain>.uvFilterSize_shader : texturemap

<maya_mountain>.uvFilterSize_paramName : string

<maya_mountain>.filter_connected : boolean

<maya_mountain>.filter_shader : texturemap

<maya_mountain>.filter_paramName : string

<maya_mountain>.filterOffset_connected : boolean

<maya_mountain>.filterOffset_shader : texturemap

<maya_mountain>.filterOffset_paramName : string

<maya_mountain>.invert_connected : boolean

<maya_mountain>.invert_shader : texturemap

<maya_mountain>.invert_paramName : string

<maya_mountain>.alphaIsLuminance_connected : boolean

<maya_mountain>.alphaIsLuminance_shader : texturemap

<maya_mountain>.alphaIsLuminance_paramName : string

<maya_mountain>.colorGain_connected : boolean

<maya_mountain>.colorGain_shader : texturemap

<maya_mountain>.colorGain_paramName : string

<maya_mountain>.colorOffset_connected : boolean

<maya_mountain>.colorOffset_shader : texturemap

<maya_mountain>.colorOffset_paramName : string

<maya_mountain>.alphaGain_connected : boolean

<maya_mountain>.alphaGain_shader : texturemap

<maya_mountain>.alphaGain_paramName : string

<maya_mountain>.alphaOffset_connected : boolean

<maya_mountain>.alphaOffset_shader : texturemap

<maya_mountain>.alphaOffset_paramName : string

<maya_mountain>.defaultColor_connected : boolean

<maya_mountain>.defaultColor_shader : texturemap

<maya_mountain>.defaultColor_paramName : string

<maya_mountain>.TheList : maxObject array

<maya_mountain>.Shader_Version : integer

maya_mountain interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_multdiv : textureMap

maya_multdiv : textureMap {7773161f,c157ac59}

Constructor:

maya_multdiv: class instances not creatable by MAXScript

Properties:

<maya_multdiv>.operation : integer

<maya_multdiv>.input1 : point3

<maya_multdiv>.input2 : point3

<maya_multdiv>.Structure : paramBlock2

<maya_multdiv>.output : point3

<maya_multdiv>.operation_connected : boolean

<maya_multdiv>.operation_shader : texturemap

<maya_multdiv>.operation_paramName : string

<maya_multdiv>.input1_connected : boolean

<maya_multdiv>.input1_shader : texturemap

<maya_multdiv>.input1_paramName : string

<maya_multdiv>.input2_connected : boolean

<maya_multdiv>.input2_shader : texturemap

<maya_multdiv>.input2_paramName : string

<maya_multdiv>.TheList : maxObject array

<maya_multdiv>.Shader_Version : integer

maya_multdiv interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_noise : textureMap

maya_noise : textureMap {7773161f,4e08ae54}

Constructor:

maya_noise: class instances not creatable by MAXScript

Properties:

<maya_noise>.amplitude : float

<maya_noise>.ratio : float

<maya_noise>.threshold : float

<maya_noise>.depthMax : integer

<maya_noise>.frequency : float

<maya_noise>.frequencyRatio : float

<maya_noise>.inflection : boolean

<maya_noise>.time : float

<maya_noise>.noiseType : integer

<maya_noise>.density : float

<maya_noise>.spottyness : float

<maya_noise>.sizeRand : float

<maya_noise>.randomness : float

<maya_noise>.falloff : integer

<maya_noise>.numWaves : integer

<maya_noise>.implode : float

<maya_noise>.implodeCenter : point3

<maya_noise>.uvCoord : point3

<maya_noise>.uvFilterSize : point3

<maya_noise>.filter : float

<maya_noise>.filterOffset : float

<maya_noise>.invert : boolean

<maya_noise>.alphaIsLuminance : boolean

<maya_noise>.colorGain : fRGBA color

<maya_noise>.colorOffset : fRGBA color

<maya_noise>.alphaGain : float

<maya_noise>.alphaOffset : float

<maya_noise>.defaultColor : fRGBA color

<maya_noise>.Structure : paramBlock2

<maya_noise>.outColor : fRGBA color

<maya_noise>.outAlpha : float

<maya_noise>.amplitude_connected : boolean

<maya_noise>.amplitude_shader : texturemap

<maya_noise>.amplitude_paramName : string

<maya_noise>.ratio_connected : boolean

<maya_noise>.ratio_shader : texturemap

<maya_noise>.ratio_paramName : string

<maya_noise>.threshold_connected : boolean

<maya_noise>.threshold_shader : texturemap

<maya_noise>.threshold_paramName : string

<maya_noise>.depthMax_connected : boolean

<maya_noise>.depthMax_shader : texturemap

<maya_noise>.depthMax_paramName : string

<maya_noise>.frequency_connected : boolean

<maya_noise>.frequency_shader : texturemap

<maya_noise>.frequency_paramName : string

<maya_noise>.frequencyRatio_connected : boolean

<maya_noise>.frequencyRatio_shader : texturemap

<maya_noise>.frequencyRatio_paramName : string

<maya_noise>.inflection_connected : boolean

<maya_noise>.inflection_shader : texturemap

<maya_noise>.inflection_paramName : string

<maya_noise>.time_connected : boolean

<maya_noise>.time_shader : texturemap

<maya_noise>.time_paramName : string

<maya_noise>.noiseType_connected : boolean

<maya_noise>.noiseType_shader : texturemap

<maya_noise>.noiseType_paramName : string

<maya_noise>.density_connected : boolean

<maya_noise>.density_shader : texturemap

<maya_noise>.density_paramName : string

<maya_noise>.spottyness_connected : boolean

<maya_noise>.spottyness_shader : texturemap

<maya_noise>.spottyness_paramName : string

<maya_noise>.sizeRand_connected : boolean

<maya_noise>.sizeRand_shader : texturemap

<maya_noise>.sizeRand_paramName : string

<maya_noise>.randomness_connected : boolean

<maya_noise>.randomness_shader : texturemap

<maya_noise>.randomness_paramName : string

<maya_noise>.falloff_connected : boolean

<maya_noise>.falloff_shader : texturemap

<maya_noise>.falloff_paramName : string

<maya_noise>.numWaves_connected : boolean

<maya_noise>.numWaves_shader : texturemap

<maya_noise>.numWaves_paramName : string

<maya_noise>.implode_connected : boolean

<maya_noise>.implode_shader : texturemap

<maya_noise>.implode_paramName : string

<maya_noise>.implodeCenter_connected : boolean

<maya_noise>.implodeCenter_shader : texturemap

<maya_noise>.implodeCenter_paramName : string

<maya_noise>.uvCoord_connected : boolean

<maya_noise>.uvCoord_shader : texturemap

<maya_noise>.uvCoord_paramName : string

<maya_noise>.uvFilterSize_connected : boolean

<maya_noise>.uvFilterSize_shader : texturemap

<maya_noise>.uvFilterSize_paramName : string

<maya_noise>.filter_connected : boolean

<maya_noise>.filter_shader : texturemap

<maya_noise>.filter_paramName : string

<maya_noise>.filterOffset_connected : boolean

<maya_noise>.filterOffset_shader : texturemap

<maya_noise>.filterOffset_paramName : string

<maya_noise>.invert_connected : boolean

<maya_noise>.invert_shader : texturemap

<maya_noise>.invert_paramName : string

<maya_noise>.alphaIsLuminance_connected : boolean

<maya_noise>.alphaIsLuminance_shader : texturemap

<maya_noise>.alphaIsLuminance_paramName : string

<maya_noise>.colorGain_connected : boolean

<maya_noise>.colorGain_shader : texturemap

<maya_noise>.colorGain_paramName : string

<maya_noise>.colorOffset_connected : boolean

<maya_noise>.colorOffset_shader : texturemap

<maya_noise>.colorOffset_paramName : string

<maya_noise>.alphaGain_connected : boolean

<maya_noise>.alphaGain_shader : texturemap

<maya_noise>.alphaGain_paramName : string

<maya_noise>.alphaOffset_connected : boolean

<maya_noise>.alphaOffset_shader : texturemap

<maya_noise>.alphaOffset_paramName : string

<maya_noise>.defaultColor_connected : boolean

<maya_noise>.defaultColor_shader : texturemap

<maya_noise>.defaultColor_paramName : string

<maya_noise>.TheList : maxObject array

<maya_noise>.Shader_Version : integer

maya_noise interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_objectdata : textureMap

maya_objectdata : textureMap {7773161f,b5005d49}

Constructor:

maya_objectdata: class instances not creatable by MAXScript

Properties:

<maya_objectdata>.magic : integer

<maya_objectdata>.uvSpace : integer

<maya_objectdata>.renderableObjectType : integer

<maya_objectdata>.volumeSamples : integer

<maya_objectdata>.depthJitter : boolean

<maya_objectdata>.overrideFgGi : boolean

<maya_objectdata>.finalgatherRays : integer

<maya_objectdata>.finalgatherMaxRadius : float

<maya_objectdata>.finalgatherMinRadius : float

<maya_objectdata>.finalgatherView : boolean

<maya_objectdata>.finalgatherFilter : integer

<maya_objectdata>.globillumAccuracy : integer

<maya_objectdata>.globillumRadius : float

<maya_objectdata>.causticAccuracy : integer

<maya_objectdata>.causticRadius : float

<maya_objectdata>.finalgatherPoints : integer

<maya_objectdata>.finalgatherImportance : float

<maya_objectdata>.magic_connected : boolean

<maya_objectdata>.magic_shader : texturemap

<maya_objectdata>.magic_paramName : string

<maya_objectdata>.uvSpace_connected : boolean

<maya_objectdata>.uvSpace_shader : texturemap

<maya_objectdata>.uvSpace_paramName : string

<maya_objectdata>.renderableObjectType_connected : boolean

<maya_objectdata>.renderableObjectType_shader : texturemap

<maya_objectdata>.renderableObjectType_paramName : string

<maya_objectdata>.volumeSamples_connected : boolean

<maya_objectdata>.volumeSamples_shader : texturemap

<maya_objectdata>.volumeSamples_paramName : string

<maya_objectdata>.depthJitter_connected : boolean

<maya_objectdata>.depthJitter_shader : texturemap

<maya_objectdata>.depthJitter_paramName : string

<maya_objectdata>.overrideFgGi_connected : boolean

<maya_objectdata>.overrideFgGi_shader : texturemap

<maya_objectdata>.overrideFgGi_paramName : string

<maya_objectdata>.finalgatherRays_connected : boolean

<maya_objectdata>.finalgatherRays_shader : texturemap

<maya_objectdata>.finalgatherRays_paramName : string

<maya_objectdata>.finalgatherMaxRadius_connected : boolean

<maya_objectdata>.finalgatherMaxRadius_shader : texturemap

<maya_objectdata>.finalgatherMaxRadius_paramName : string

<maya_objectdata>.finalgatherMinRadius_connected : boolean

<maya_objectdata>.finalgatherMinRadius_shader : texturemap

<maya_objectdata>.finalgatherMinRadius_paramName : string

<maya_objectdata>.finalgatherView_connected : boolean

<maya_objectdata>.finalgatherView_shader : texturemap

<maya_objectdata>.finalgatherView_paramName : string

<maya_objectdata>.finalgatherFilter_connected : boolean

<maya_objectdata>.finalgatherFilter_shader : texturemap

<maya_objectdata>.finalgatherFilter_paramName : string

<maya_objectdata>.globillumAccuracy_connected : boolean

<maya_objectdata>.globillumAccuracy_shader : texturemap

<maya_objectdata>.globillumAccuracy_paramName : string

<maya_objectdata>.globillumRadius_connected : boolean

<maya_objectdata>.globillumRadius_shader : texturemap

<maya_objectdata>.globillumRadius_paramName : string

<maya_objectdata>.causticAccuracy_connected : boolean

<maya_objectdata>.causticAccuracy_shader : texturemap

<maya_objectdata>.causticAccuracy_paramName : string

<maya_objectdata>.causticRadius_connected : boolean

<maya_objectdata>.causticRadius_shader : texturemap

<maya_objectdata>.causticRadius_paramName : string

<maya_objectdata>.finalgatherPoints_connected : boolean

<maya_objectdata>.finalgatherPoints_shader : texturemap

<maya_objectdata>.finalgatherPoints_paramName : string

<maya_objectdata>.finalgatherImportance_connected : boolean

<maya_objectdata>.finalgatherImportance_shader : texturemap

<maya_objectdata>.finalgatherImportance_paramName : string

<maya_objectdata>.TheList : maxObject array

<maya_objectdata>.Shader_Version : integer

maya_objectdata interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_ocean : textureMap

maya_ocean : textureMap {7773161f,4a0ca466}

Constructor:

maya_ocean: class instances not creatable by MAXScript

Properties:

<maya_ocean>.time : float

<maya_ocean>.scale : float

<maya_ocean>.windUV : point3

<maya_ocean>.observerSpeed : float

<maya_ocean>.waveDirSpread : float

<maya_ocean>.numFrequencies : float

<maya_ocean>.waveLengthMin : float

<maya_ocean>.waveLengthMax : float

<maya_ocean>.waveHeight : paramBlock2 array

<maya_ocean>.waveTurbulence : paramBlock2 array

<maya_ocean>.wavePeaking : paramBlock2 array

<maya_ocean>.foamEmission : float

<maya_ocean>.foamThreshold : float

<maya_ocean>.colorMode : integer

<maya_ocean>.uvCoord : point3

<maya_ocean>.uvFilterSize : point3

<maya_ocean>.filter : float

<maya_ocean>.filterOffset : float

<maya_ocean>.invert : boolean

<maya_ocean>.alphaIsLuminance : boolean

<maya_ocean>.colorGain : fRGBA color

<maya_ocean>.colorOffset : fRGBA color

<maya_ocean>.alphaGain : float

<maya_ocean>.alphaOffset : float

<maya_ocean>.defaultColor : fRGBA color

<maya_ocean>.position : float

<maya_ocean>.floatValue : float

<maya_ocean>.interp : integer

<maya_ocean>.position : float

<maya_ocean>.floatValue : float

<maya_ocean>.interp : integer

<maya_ocean>.position : float

<maya_ocean>.floatValue : float

<maya_ocean>.interp : integer

<maya_ocean>.Structure : paramBlock2

<maya_ocean>.outColor : fRGBA color

<maya_ocean>.outAlpha : float

<maya_ocean>.outFoam : float

<maya_ocean>.time_connected : boolean

<maya_ocean>.time_shader : texturemap

<maya_ocean>.time_paramName : string

<maya_ocean>.scale_connected : boolean

<maya_ocean>.scale_shader : texturemap

<maya_ocean>.scale_paramName : string

<maya_ocean>.windUV_connected : boolean

<maya_ocean>.windUV_shader : texturemap

<maya_ocean>.windUV_paramName : string

<maya_ocean>.observerSpeed_connected : boolean

<maya_ocean>.observerSpeed_shader : texturemap

<maya_ocean>.observerSpeed_paramName : string

<maya_ocean>.waveDirSpread_connected : boolean

<maya_ocean>.waveDirSpread_shader : texturemap

<maya_ocean>.waveDirSpread_paramName : string

<maya_ocean>.numFrequencies_connected : boolean

<maya_ocean>.numFrequencies_shader : texturemap

<maya_ocean>.numFrequencies_paramName : string

<maya_ocean>.waveLengthMin_connected : boolean

<maya_ocean>.waveLengthMin_shader : texturemap

<maya_ocean>.waveLengthMin_paramName : string

<maya_ocean>.waveLengthMax_connected : boolean

<maya_ocean>.waveLengthMax_shader : texturemap

<maya_ocean>.waveLengthMax_paramName : string

<maya_ocean>.foamEmission_connected : boolean

<maya_ocean>.foamEmission_shader : texturemap

<maya_ocean>.foamEmission_paramName : string

<maya_ocean>.foamThreshold_connected : boolean

<maya_ocean>.foamThreshold_shader : texturemap

<maya_ocean>.foamThreshold_paramName : string

<maya_ocean>.colorMode_connected : boolean

<maya_ocean>.colorMode_shader : texturemap

<maya_ocean>.colorMode_paramName : string

<maya_ocean>.uvCoord_connected : boolean

<maya_ocean>.uvCoord_shader : texturemap

<maya_ocean>.uvCoord_paramName : string

<maya_ocean>.uvFilterSize_connected : boolean

<maya_ocean>.uvFilterSize_shader : texturemap

<maya_ocean>.uvFilterSize_paramName : string

<maya_ocean>.filter_connected : boolean

<maya_ocean>.filter_shader : texturemap

<maya_ocean>.filter_paramName : string

<maya_ocean>.filterOffset_connected : boolean

<maya_ocean>.filterOffset_shader : texturemap

<maya_ocean>.filterOffset_paramName : string

<maya_ocean>.invert_connected : boolean

<maya_ocean>.invert_shader : texturemap

<maya_ocean>.invert_paramName : string

<maya_ocean>.alphaIsLuminance_connected : boolean

<maya_ocean>.alphaIsLuminance_shader : texturemap

<maya_ocean>.alphaIsLuminance_paramName : string

<maya_ocean>.colorGain_connected : boolean

<maya_ocean>.colorGain_shader : texturemap

<maya_ocean>.colorGain_paramName : string

<maya_ocean>.colorOffset_connected : boolean

<maya_ocean>.colorOffset_shader : texturemap

<maya_ocean>.colorOffset_paramName : string

<maya_ocean>.alphaGain_connected : boolean

<maya_ocean>.alphaGain_shader : texturemap

<maya_ocean>.alphaGain_paramName : string

<maya_ocean>.alphaOffset_connected : boolean

<maya_ocean>.alphaOffset_shader : texturemap

<maya_ocean>.alphaOffset_paramName : string

<maya_ocean>.defaultColor_connected : boolean

<maya_ocean>.defaultColor_shader : texturemap

<maya_ocean>.defaultColor_paramName : string

<maya_ocean>.TheList : maxObject array

<maya_ocean>.Shader_Version : integer

maya_ocean interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_oceanshader : textureMap

maya_oceanshader : textureMap {7773161f,63fe4845}

Constructor:

maya_oceanshader: class instances not creatable by MAXScript

Properties:

<maya_oceanshader>.refractionLimit : integer

<maya_oceanshader>.refractiveIndex : float

<maya_oceanshader>.refractions : boolean

<maya_oceanshader>.diffuse : float

<maya_oceanshader>.waterColor : fRGBA color

<maya_oceanshader>.transparency : fRGBA color

<maya_oceanshader>.ambientColor : fRGBA color

<maya_oceanshader>.incandescence : fRGBA color

<maya_oceanshader>.translucence : float

<maya_oceanshader>.translucenceFocus : float

<maya_oceanshader>.translucenceDepth : float

<maya_oceanshader>.opacityDepth : float

<maya_oceanshader>.glowIntensity : float

<maya_oceanshader>.specularGlow : float

<maya_oceanshader>.shadowAttenuation : float

<maya_oceanshader>.eccentricity : float

<maya_oceanshader>.specularity : float

<maya_oceanshader>.reflectionLimit : integer

<maya_oceanshader>.specularColor : fRGBA color

<maya_oceanshader>.reflectivity : float

<maya_oceanshader>.environment : paramBlock2 array

<maya_oceanshader>.reflectedColor : fRGBA color

<maya_oceanshader>.reflectionSpecularity : float

<maya_oceanshader>.normalCamera : point3

<maya_oceanshader>.matteOpacityMode : integer

<maya_oceanshader>.matteOpacity : float

<maya_oceanshader>.time : float

<maya_oceanshader>.scale : float

<maya_oceanshader>.windUV : point3

<maya_oceanshader>.observerSpeed : float

<maya_oceanshader>.waveDirSpread : float

<maya_oceanshader>.numFrequencies : float

<maya_oceanshader>.waveLengthMin : float

<maya_oceanshader>.waveLengthMax : float

<maya_oceanshader>.waveHeight : paramBlock2 array

<maya_oceanshader>.waveTurbulence : paramBlock2 array

<maya_oceanshader>.wavePeaking : paramBlock2 array

<maya_oceanshader>.waveHeightOffset : float

<maya_oceanshader>.troughShadowing : float

<maya_oceanshader>.foamColor : fRGBA color

<maya_oceanshader>.foamEmission : float

<maya_oceanshader>.foamThreshold : float

<maya_oceanshader>.foamOffset : float

<maya_oceanshader>.bumpBlur : float

<maya_oceanshader>.waveSpeed : float

<maya_oceanshader>.irradiance : fRGBA color

<maya_oceanshader>.irradianceColor : fRGBA color

<maya_oceanshader>.refractionBlur : float

<maya_oceanshader>.refractionBlurLimit : integer

<maya_oceanshader>.refractionRays : integer

<maya_oceanshader>.reflectionBlur : float

<maya_oceanshader>.reflectionBlurLimit : integer

<maya_oceanshader>.reflectionRays : integer

<maya_oceanshader>.scatterColor : fRGBA color

<maya_oceanshader>.scatterRadius : float

<maya_oceanshader>.scatterAccuracy : integer

<maya_oceanshader>.scatterFalloff : integer

<maya_oceanshader>.scatterLimit : integer

<maya_oceanshader>.scatterCache : integer

<maya_oceanshader>.horizonFilter : float

<maya_oceanshader>.position : float

<maya_oceanshader>.color : fRGBA color

<maya_oceanshader>.interp : integer

<maya_oceanshader>.position : float

<maya_oceanshader>.floatValue : float

<maya_oceanshader>.interp : integer

<maya_oceanshader>.position : float

<maya_oceanshader>.floatValue : float

<maya_oceanshader>.interp : integer

<maya_oceanshader>.position : float

<maya_oceanshader>.floatValue : float

<maya_oceanshader>.interp : integer

<maya_oceanshader>.Structure : paramBlock2

<maya_oceanshader>.outColor : fRGBA color

<maya_oceanshader>.outGlowColor : fRGBA color

<maya_oceanshader>.outMatteOpacity : fRGBA color

<maya_oceanshader>.outTransparency : fRGBA color

<maya_oceanshader>.outAmbient : fRGBA color

<maya_oceanshader>.outIncandescence : fRGBA color

<maya_oceanshader>.outIrradiance : fRGBA color

<maya_oceanshader>.outDiffuseShadowed : fRGBA color

<maya_oceanshader>.outDiffuseNoShadow : fRGBA color

<maya_oceanshader>.outShadow : fRGBA color

<maya_oceanshader>.outSpecularShadowed : fRGBA color

<maya_oceanshader>.outSpecularNoShadow : fRGBA color

<maya_oceanshader>.outReflection : fRGBA color

<maya_oceanshader>.outRefraction : fRGBA color

<maya_oceanshader>.outScatter : fRGBA color

<maya_oceanshader>.outOpacity : fRGBA color

<maya_oceanshader>.displacement : float

<maya_oceanshader>.foam : float

<maya_oceanshader>.refractionLimit_connected : boolean

<maya_oceanshader>.refractionLimit_shader : texturemap

<maya_oceanshader>.refractionLimit_paramName : string

<maya_oceanshader>.refractiveIndex_connected : boolean

<maya_oceanshader>.refractiveIndex_shader : texturemap

<maya_oceanshader>.refractiveIndex_paramName : string

<maya_oceanshader>.refractions_connected : boolean

<maya_oceanshader>.refractions_shader : texturemap

<maya_oceanshader>.refractions_paramName : string

<maya_oceanshader>.diffuse_connected : boolean

<maya_oceanshader>.diffuse_shader : texturemap

<maya_oceanshader>.diffuse_paramName : string

<maya_oceanshader>.waterColor_connected : boolean

<maya_oceanshader>.waterColor_shader : texturemap

<maya_oceanshader>.waterColor_paramName : string

<maya_oceanshader>.transparency_connected : boolean

<maya_oceanshader>.transparency_shader : texturemap

<maya_oceanshader>.transparency_paramName : string

<maya_oceanshader>.ambientColor_connected : boolean

<maya_oceanshader>.ambientColor_shader : texturemap

<maya_oceanshader>.ambientColor_paramName : string

<maya_oceanshader>.incandescence_connected : boolean

<maya_oceanshader>.incandescence_shader : texturemap

<maya_oceanshader>.incandescence_paramName : string

<maya_oceanshader>.translucence_connected : boolean

<maya_oceanshader>.translucence_shader : texturemap

<maya_oceanshader>.translucence_paramName : string

<maya_oceanshader>.translucenceFocus_connected : boolean

<maya_oceanshader>.translucenceFocus_shader : texturemap

<maya_oceanshader>.translucenceFocus_paramName : string

<maya_oceanshader>.translucenceDepth_connected : boolean

<maya_oceanshader>.translucenceDepth_shader : texturemap

<maya_oceanshader>.translucenceDepth_paramName : string

<maya_oceanshader>.opacityDepth_connected : boolean

<maya_oceanshader>.opacityDepth_shader : texturemap

<maya_oceanshader>.opacityDepth_paramName : string

<maya_oceanshader>.glowIntensity_connected : boolean

<maya_oceanshader>.glowIntensity_shader : texturemap

<maya_oceanshader>.glowIntensity_paramName : string

<maya_oceanshader>.specularGlow_connected : boolean

<maya_oceanshader>.specularGlow_shader : texturemap

<maya_oceanshader>.specularGlow_paramName : string

<maya_oceanshader>.shadowAttenuation_connected : boolean

<maya_oceanshader>.shadowAttenuation_shader : texturemap

<maya_oceanshader>.shadowAttenuation_paramName : string

<maya_oceanshader>.eccentricity_connected : boolean

<maya_oceanshader>.eccentricity_shader : texturemap

<maya_oceanshader>.eccentricity_paramName : string

<maya_oceanshader>.specularity_connected : boolean

<maya_oceanshader>.specularity_shader : texturemap

<maya_oceanshader>.specularity_paramName : string

<maya_oceanshader>.reflectionLimit_connected : boolean

<maya_oceanshader>.reflectionLimit_shader : texturemap

<maya_oceanshader>.reflectionLimit_paramName : string

<maya_oceanshader>.specularColor_connected : boolean

<maya_oceanshader>.specularColor_shader : texturemap

<maya_oceanshader>.specularColor_paramName : string

<maya_oceanshader>.reflectivity_connected : boolean

<maya_oceanshader>.reflectivity_shader : texturemap

<maya_oceanshader>.reflectivity_paramName : string

<maya_oceanshader>.reflectedColor_connected : boolean

<maya_oceanshader>.reflectedColor_shader : texturemap

<maya_oceanshader>.reflectedColor_paramName : string

<maya_oceanshader>.reflectionSpecularity_connected : boolean

<maya_oceanshader>.reflectionSpecularity_shader : texturemap

<maya_oceanshader>.reflectionSpecularity_paramName : string

<maya_oceanshader>.normalCamera_connected : boolean

<maya_oceanshader>.normalCamera_shader : texturemap

<maya_oceanshader>.normalCamera_paramName : string

<maya_oceanshader>.matteOpacityMode_connected : boolean

<maya_oceanshader>.matteOpacityMode_shader : texturemap

<maya_oceanshader>.matteOpacityMode_paramName : string

<maya_oceanshader>.matteOpacity_connected : boolean

<maya_oceanshader>.matteOpacity_shader : texturemap

<maya_oceanshader>.matteOpacity_paramName : string

<maya_oceanshader>.time_connected : boolean

<maya_oceanshader>.time_shader : texturemap

<maya_oceanshader>.time_paramName : string

<maya_oceanshader>.scale_connected : boolean

<maya_oceanshader>.scale_shader : texturemap

<maya_oceanshader>.scale_paramName : string

<maya_oceanshader>.windUV_connected : boolean

<maya_oceanshader>.windUV_shader : texturemap

<maya_oceanshader>.windUV_paramName : string

<maya_oceanshader>.observerSpeed_connected : boolean

<maya_oceanshader>.observerSpeed_shader : texturemap

<maya_oceanshader>.observerSpeed_paramName : string

<maya_oceanshader>.waveDirSpread_connected : boolean

<maya_oceanshader>.waveDirSpread_shader : texturemap

<maya_oceanshader>.waveDirSpread_paramName : string

<maya_oceanshader>.numFrequencies_connected : boolean

<maya_oceanshader>.numFrequencies_shader : texturemap

<maya_oceanshader>.numFrequencies_paramName : string

<maya_oceanshader>.waveLengthMin_connected : boolean

<maya_oceanshader>.waveLengthMin_shader : texturemap

<maya_oceanshader>.waveLengthMin_paramName : string

<maya_oceanshader>.waveLengthMax_connected : boolean

<maya_oceanshader>.waveLengthMax_shader : texturemap

<maya_oceanshader>.waveLengthMax_paramName : string

<maya_oceanshader>.waveHeightOffset_connected : boolean

<maya_oceanshader>.waveHeightOffset_shader : texturemap

<maya_oceanshader>.waveHeightOffset_paramName : string

<maya_oceanshader>.troughShadowing_connected : boolean

<maya_oceanshader>.troughShadowing_shader : texturemap

<maya_oceanshader>.troughShadowing_paramName : string

<maya_oceanshader>.foamColor_connected : boolean

<maya_oceanshader>.foamColor_shader : texturemap

<maya_oceanshader>.foamColor_paramName : string

<maya_oceanshader>.foamEmission_connected : boolean

<maya_oceanshader>.foamEmission_shader : texturemap

<maya_oceanshader>.foamEmission_paramName : string

<maya_oceanshader>.foamThreshold_connected : boolean

<maya_oceanshader>.foamThreshold_shader : texturemap

<maya_oceanshader>.foamThreshold_paramName : string

<maya_oceanshader>.foamOffset_connected : boolean

<maya_oceanshader>.foamOffset_shader : texturemap

<maya_oceanshader>.foamOffset_paramName : string

<maya_oceanshader>.bumpBlur_connected : boolean

<maya_oceanshader>.bumpBlur_shader : texturemap

<maya_oceanshader>.bumpBlur_paramName : string

<maya_oceanshader>.waveSpeed_connected : boolean

<maya_oceanshader>.waveSpeed_shader : texturemap

<maya_oceanshader>.waveSpeed_paramName : string

<maya_oceanshader>.irradiance_connected : boolean

<maya_oceanshader>.irradiance_shader : texturemap

<maya_oceanshader>.irradiance_paramName : string

<maya_oceanshader>.irradianceColor_connected : boolean

<maya_oceanshader>.irradianceColor_shader : texturemap

<maya_oceanshader>.irradianceColor_paramName : string

<maya_oceanshader>.refractionBlur_connected : boolean

<maya_oceanshader>.refractionBlur_shader : texturemap

<maya_oceanshader>.refractionBlur_paramName : string

<maya_oceanshader>.refractionBlurLimit_connected : boolean

<maya_oceanshader>.refractionBlurLimit_shader : texturemap

<maya_oceanshader>.refractionBlurLimit_paramName : string

<maya_oceanshader>.refractionRays_connected : boolean

<maya_oceanshader>.refractionRays_shader : texturemap

<maya_oceanshader>.refractionRays_paramName : string

<maya_oceanshader>.reflectionBlur_connected : boolean

<maya_oceanshader>.reflectionBlur_shader : texturemap

<maya_oceanshader>.reflectionBlur_paramName : string

<maya_oceanshader>.reflectionBlurLimit_connected : boolean

<maya_oceanshader>.reflectionBlurLimit_shader : texturemap

<maya_oceanshader>.reflectionBlurLimit_paramName : string

<maya_oceanshader>.reflectionRays_connected : boolean

<maya_oceanshader>.reflectionRays_shader : texturemap

<maya_oceanshader>.reflectionRays_paramName : string

<maya_oceanshader>.scatterColor_connected : boolean

<maya_oceanshader>.scatterColor_shader : texturemap

<maya_oceanshader>.scatterColor_paramName : string

<maya_oceanshader>.scatterRadius_connected : boolean

<maya_oceanshader>.scatterRadius_shader : texturemap

<maya_oceanshader>.scatterRadius_paramName : string

<maya_oceanshader>.scatterAccuracy_connected : boolean

<maya_oceanshader>.scatterAccuracy_shader : texturemap

<maya_oceanshader>.scatterAccuracy_paramName : string

<maya_oceanshader>.scatterFalloff_connected : boolean

<maya_oceanshader>.scatterFalloff_shader : texturemap

<maya_oceanshader>.scatterFalloff_paramName : string

<maya_oceanshader>.scatterLimit_connected : boolean

<maya_oceanshader>.scatterLimit_shader : texturemap

<maya_oceanshader>.scatterLimit_paramName : string

<maya_oceanshader>.scatterCache_connected : boolean

<maya_oceanshader>.scatterCache_shader : texturemap

<maya_oceanshader>.scatterCache_paramName : string

<maya_oceanshader>.horizonFilter_connected : boolean

<maya_oceanshader>.horizonFilter_shader : texturemap

<maya_oceanshader>.horizonFilter_paramName : string

<maya_oceanshader>.TheList : maxObject array

<maya_oceanshader>.Shader_Version : integer

maya_oceanshader interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_options : textureMap

maya_options : textureMap {7773161f,ac59a56e}

Constructor:

maya_options: class instances not creatable by MAXScript

Properties:

<maya_options>.magic : integer

<maya_options>.renderPass : integer

<maya_options>.shadowLimit : integer

<maya_options>.computeFilterSize : boolean

<maya_options>.defaultFilterSize : float

<maya_options>.aggressiveCaching : boolean

<maya_options>.disableShaderGlow : boolean

<maya_options>.asqMinThreshold : float

<maya_options>.asqMaxThreshold : float

<maya_options>.refractionBlurLimit : integer

<maya_options>.reflectionBlurLimit : integer

<maya_options>.magic_connected : boolean

<maya_options>.magic_shader : texturemap

<maya_options>.magic_paramName : string

<maya_options>.renderPass_connected : boolean

<maya_options>.renderPass_shader : texturemap

<maya_options>.renderPass_paramName : string

<maya_options>.shadowLimit_connected : boolean

<maya_options>.shadowLimit_shader : texturemap

<maya_options>.shadowLimit_paramName : string

<maya_options>.computeFilterSize_connected : boolean

<maya_options>.computeFilterSize_shader : texturemap

<maya_options>.computeFilterSize_paramName : string

<maya_options>.defaultFilterSize_connected : boolean

<maya_options>.defaultFilterSize_shader : texturemap

<maya_options>.defaultFilterSize_paramName : string

<maya_options>.aggressiveCaching_connected : boolean

<maya_options>.aggressiveCaching_shader : texturemap

<maya_options>.aggressiveCaching_paramName : string

<maya_options>.disableShaderGlow_connected : boolean

<maya_options>.disableShaderGlow_shader : texturemap

<maya_options>.disableShaderGlow_paramName : string

<maya_options>.asqMinThreshold_connected : boolean

<maya_options>.asqMinThreshold_shader : texturemap

<maya_options>.asqMinThreshold_paramName : string

<maya_options>.asqMaxThreshold_connected : boolean

<maya_options>.asqMaxThreshold_shader : texturemap

<maya_options>.asqMaxThreshold_paramName : string

<maya_options>.refractionBlurLimit_connected : boolean

<maya_options>.refractionBlurLimit_shader : texturemap

<maya_options>.refractionBlurLimit_paramName : string

<maya_options>.reflectionBlurLimit_connected : boolean

<maya_options>.reflectionBlurLimit_shader : texturemap

<maya_options>.reflectionBlurLimit_paramName : string

<maya_options>.TheList : maxObject array

<maya_options>.Shader_Version : integer

maya_options interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_particlecloud : textureMap

maya_particlecloud : textureMap {7773161f,5609c369}

Constructor:

maya_particlecloud: class instances not creatable by MAXScript

Properties:

<maya_particlecloud>.color : fRGBA color

<maya_particlecloud>.transparency : fRGBA color

<maya_particlecloud>.incandescence : fRGBA color

<maya_particlecloud>.density : float

<maya_particlecloud>.glowIntensity : float

<maya_particlecloud>.noise : float

<maya_particlecloud>.noiseFreq : float

<maya_particlecloud>.noiseAspect : float

<maya_particlecloud>.blobMap : fRGBA color

<maya_particlecloud>.normalCamera : point3

<maya_particlecloud>.translucenceCoeff : float

<maya_particlecloud>.diffuseCoeff : float

<maya_particlecloud>.surfaceShadingShadow : boolean

<maya_particlecloud>.surfaceColor : fRGBA color

<maya_particlecloud>.solidCoreSize : float

<maya_particlecloud>.translucence : float

<maya_particlecloud>.noiseAnimRate : float

<maya_particlecloud>.roundness : float

<maya_particlecloud>.Structure : paramBlock2

<maya_particlecloud>.outParticleEmission : fRGBA color

<maya_particlecloud>.outColor : fRGBA color

<maya_particlecloud>.outGlowColor : fRGBA color

<maya_particlecloud>.outTransparency : fRGBA color

<maya_particlecloud>.color_connected : boolean

<maya_particlecloud>.color_shader : texturemap

<maya_particlecloud>.color_paramName : string

<maya_particlecloud>.transparency_connected : boolean

<maya_particlecloud>.transparency_shader : texturemap

<maya_particlecloud>.transparency_paramName : string

<maya_particlecloud>.incandescence_connected : boolean

<maya_particlecloud>.incandescence_shader : texturemap

<maya_particlecloud>.incandescence_paramName : string

<maya_particlecloud>.density_connected : boolean

<maya_particlecloud>.density_shader : texturemap

<maya_particlecloud>.density_paramName : string

<maya_particlecloud>.glowIntensity_connected : boolean

<maya_particlecloud>.glowIntensity_shader : texturemap

<maya_particlecloud>.glowIntensity_paramName : string

<maya_particlecloud>.noise_connected : boolean

<maya_particlecloud>.noise_shader : texturemap

<maya_particlecloud>.noise_paramName : string

<maya_particlecloud>.noiseFreq_connected : boolean

<maya_particlecloud>.noiseFreq_shader : texturemap

<maya_particlecloud>.noiseFreq_paramName : string

<maya_particlecloud>.noiseAspect_connected : boolean

<maya_particlecloud>.noiseAspect_shader : texturemap

<maya_particlecloud>.noiseAspect_paramName : string

<maya_particlecloud>.blobMap_connected : boolean

<maya_particlecloud>.blobMap_shader : texturemap

<maya_particlecloud>.blobMap_paramName : string

<maya_particlecloud>.normalCamera_connected : boolean

<maya_particlecloud>.normalCamera_shader : texturemap

<maya_particlecloud>.normalCamera_paramName : string

<maya_particlecloud>.translucenceCoeff_connected : boolean

<maya_particlecloud>.translucenceCoeff_shader : texturemap

<maya_particlecloud>.translucenceCoeff_paramName : string

<maya_particlecloud>.diffuseCoeff_connected : boolean

<maya_particlecloud>.diffuseCoeff_shader : texturemap

<maya_particlecloud>.diffuseCoeff_paramName : string

<maya_particlecloud>.surfaceShadingShadow_connected : boolean

<maya_particlecloud>.surfaceShadingShadow_shader : texturemap

<maya_particlecloud>.surfaceShadingShadow_paramName : string

<maya_particlecloud>.surfaceColor_connected : boolean

<maya_particlecloud>.surfaceColor_shader : texturemap

<maya_particlecloud>.surfaceColor_paramName : string

<maya_particlecloud>.solidCoreSize_connected : boolean

<maya_particlecloud>.solidCoreSize_shader : texturemap

<maya_particlecloud>.solidCoreSize_paramName : string

<maya_particlecloud>.translucence_connected : boolean

<maya_particlecloud>.translucence_shader : texturemap

<maya_particlecloud>.translucence_paramName : string

<maya_particlecloud>.noiseAnimRate_connected : boolean

<maya_particlecloud>.noiseAnimRate_shader : texturemap

<maya_particlecloud>.noiseAnimRate_paramName : string

<maya_particlecloud>.roundness_connected : boolean

<maya_particlecloud>.roundness_shader : texturemap

<maya_particlecloud>.roundness_paramName : string

<maya_particlecloud>.TheList : maxObject array

<maya_particlecloud>.Shader_Version : integer

maya_particlecloud interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_particlesamplerinfo : textureMap

maya_particlesamplerinfo : textureMap {7773161f,550b4d4d}

Constructor:

maya_particlesamplerinfo: class instances not creatable by MAXScript

Properties:

<maya_particlesamplerinfo>.outUvType : integer

<maya_particlesamplerinfo>.normalizationValue : float

<maya_particlesamplerinfo>.normalizationMethod : integer

<maya_particlesamplerinfo>.inverseOutUv : boolean

<maya_particlesamplerinfo>.Structure : paramBlock2

<maya_particlesamplerinfo>.outUvCoord : point3

<maya_particlesamplerinfo>.outColor : fRGBA color

<maya_particlesamplerinfo>.outTransparency : fRGBA color

<maya_particlesamplerinfo>.outIncandescence : fRGBA color

<maya_particlesamplerinfo>.particleId : integer

<maya_particlesamplerinfo>.age : float

<maya_particlesamplerinfo>.outUvType_connected : boolean

<maya_particlesamplerinfo>.outUvType_shader : texturemap

<maya_particlesamplerinfo>.outUvType_paramName : string

<maya_particlesamplerinfo>.normalizationValue_connected : boolean

<maya_particlesamplerinfo>.normalizationValue_shader : texturemap

<maya_particlesamplerinfo>.normalizationValue_paramName : string

<maya_particlesamplerinfo>.normalizationMethod_connected : boolean

<maya_particlesamplerinfo>.normalizationMethod_shader : texturemap

<maya_particlesamplerinfo>.normalizationMethod_paramName : string

<maya_particlesamplerinfo>.inverseOutUv_connected : boolean

<maya_particlesamplerinfo>.inverseOutUv_shader : texturemap

<maya_particlesamplerinfo>.inverseOutUv_paramName : string

<maya_particlesamplerinfo>.TheList : maxObject array

<maya_particlesamplerinfo>.Shader_Version : integer

maya_particlesamplerinfo interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_phong : textureMap

maya_phong : textureMap {7773161f,5403ba6f}

Constructor:

maya_phong: class instances not creatable by MAXScript

Properties:

<maya_phong>.cosinePower : float

<maya_phong>.reflectionLimit : integer

<maya_phong>.specularColor : fRGBA color

<maya_phong>.reflectivity : float

<maya_phong>.reflectedColor : fRGBA color

<maya_phong>.reflectionSpecularity : float

<maya_phong>.refractionLimit : integer

<maya_phong>.refractiveIndex : float

<maya_phong>.refractions : boolean

<maya_phong>.diffuse : float

<maya_phong>.color : fRGBA color

<maya_phong>.transparency : fRGBA color

<maya_phong>.ambientColor : fRGBA color

<maya_phong>.incandescence : fRGBA color

<maya_phong>.translucence : float

<maya_phong>.translucenceFocus : float

<maya_phong>.translucenceDepth : float

<maya_phong>.opacityGain : float

<maya_phong>.glowIntensity : float

<maya_phong>.hideSource : boolean

<maya_phong>.surfaceThickness : float

<maya_phong>.shadowAttenuation : float

<maya_phong>.transparencyDepth : float

<maya_phong>.lightAbsorbance : float

<maya_phong>.chromaticAberration : boolean

<maya_phong>.normalCamera : point3

<maya_phong>.matteOpacityMode : integer

<maya_phong>.matteOpacity : float

<maya_phong>.irradiance : fRGBA color

<maya_phong>.irradianceColor : fRGBA color

<maya_phong>.refractionBlur : float

<maya_phong>.refractionBlurLimit : integer

<maya_phong>.refractionRays : integer

<maya_phong>.reflectionBlur : float

<maya_phong>.reflectionBlurLimit : integer

<maya_phong>.reflectionRays : integer

<maya_phong>.scatterColor : fRGBA color

<maya_phong>.scatterRadius : float

<maya_phong>.scatterAccuracy : integer

<maya_phong>.scatterFalloff : integer

<maya_phong>.scatterLimit : integer

<maya_phong>.scatterCache : integer

<maya_phong>.Structure : paramBlock2

<maya_phong>.outColor : fRGBA color

<maya_phong>.outGlowColor : fRGBA color

<maya_phong>.outMatteOpacity : fRGBA color

<maya_phong>.outTransparency : fRGBA color

<maya_phong>.outAmbient : fRGBA color

<maya_phong>.outIncandescence : fRGBA color

<maya_phong>.outIrradiance : fRGBA color

<maya_phong>.outDiffuseShadowed : fRGBA color

<maya_phong>.outDiffuseNoShadow : fRGBA color

<maya_phong>.outShadow : fRGBA color

<maya_phong>.outSpecularShadowed : fRGBA color

<maya_phong>.outSpecularNoShadow : fRGBA color

<maya_phong>.outReflection : fRGBA color

<maya_phong>.outRefraction : fRGBA color

<maya_phong>.outScatter : fRGBA color

<maya_phong>.outOpacity : fRGBA color

<maya_phong>.cosinePower_connected : boolean

<maya_phong>.cosinePower_shader : texturemap

<maya_phong>.cosinePower_paramName : string

<maya_phong>.reflectionLimit_connected : boolean

<maya_phong>.reflectionLimit_shader : texturemap

<maya_phong>.reflectionLimit_paramName : string

<maya_phong>.specularColor_connected : boolean

<maya_phong>.specularColor_shader : texturemap

<maya_phong>.specularColor_paramName : string

<maya_phong>.reflectivity_connected : boolean

<maya_phong>.reflectivity_shader : texturemap

<maya_phong>.reflectivity_paramName : string

<maya_phong>.reflectedColor_connected : boolean

<maya_phong>.reflectedColor_shader : texturemap

<maya_phong>.reflectedColor_paramName : string

<maya_phong>.reflectionSpecularity_connected : boolean

<maya_phong>.reflectionSpecularity_shader : texturemap

<maya_phong>.reflectionSpecularity_paramName : string

<maya_phong>.refractionLimit_connected : boolean

<maya_phong>.refractionLimit_shader : texturemap

<maya_phong>.refractionLimit_paramName : string

<maya_phong>.refractiveIndex_connected : boolean

<maya_phong>.refractiveIndex_shader : texturemap

<maya_phong>.refractiveIndex_paramName : string

<maya_phong>.refractions_connected : boolean

<maya_phong>.refractions_shader : texturemap

<maya_phong>.refractions_paramName : string

<maya_phong>.diffuse_connected : boolean

<maya_phong>.diffuse_shader : texturemap

<maya_phong>.diffuse_paramName : string

<maya_phong>.color_connected : boolean

<maya_phong>.color_shader : texturemap

<maya_phong>.color_paramName : string

<maya_phong>.transparency_connected : boolean

<maya_phong>.transparency_shader : texturemap

<maya_phong>.transparency_paramName : string

<maya_phong>.ambientColor_connected : boolean

<maya_phong>.ambientColor_shader : texturemap

<maya_phong>.ambientColor_paramName : string

<maya_phong>.incandescence_connected : boolean

<maya_phong>.incandescence_shader : texturemap

<maya_phong>.incandescence_paramName : string

<maya_phong>.translucence_connected : boolean

<maya_phong>.translucence_shader : texturemap

<maya_phong>.translucence_paramName : string

<maya_phong>.translucenceFocus_connected : boolean

<maya_phong>.translucenceFocus_shader : texturemap

<maya_phong>.translucenceFocus_paramName : string

<maya_phong>.translucenceDepth_connected : boolean

<maya_phong>.translucenceDepth_shader : texturemap

<maya_phong>.translucenceDepth_paramName : string

<maya_phong>.opacityGain_connected : boolean

<maya_phong>.opacityGain_shader : texturemap

<maya_phong>.opacityGain_paramName : string

<maya_phong>.glowIntensity_connected : boolean

<maya_phong>.glowIntensity_shader : texturemap

<maya_phong>.glowIntensity_paramName : string

<maya_phong>.hideSource_connected : boolean

<maya_phong>.hideSource_shader : texturemap

<maya_phong>.hideSource_paramName : string

<maya_phong>.surfaceThickness_connected : boolean

<maya_phong>.surfaceThickness_shader : texturemap

<maya_phong>.surfaceThickness_paramName : string

<maya_phong>.shadowAttenuation_connected : boolean

<maya_phong>.shadowAttenuation_shader : texturemap

<maya_phong>.shadowAttenuation_paramName : string

<maya_phong>.transparencyDepth_connected : boolean

<maya_phong>.transparencyDepth_shader : texturemap

<maya_phong>.transparencyDepth_paramName : string

<maya_phong>.lightAbsorbance_connected : boolean

<maya_phong>.lightAbsorbance_shader : texturemap

<maya_phong>.lightAbsorbance_paramName : string

<maya_phong>.chromaticAberration_connected : boolean

<maya_phong>.chromaticAberration_shader : texturemap

<maya_phong>.chromaticAberration_paramName : string

<maya_phong>.normalCamera_connected : boolean

<maya_phong>.normalCamera_shader : texturemap

<maya_phong>.normalCamera_paramName : string

<maya_phong>.matteOpacityMode_connected : boolean

<maya_phong>.matteOpacityMode_shader : texturemap

<maya_phong>.matteOpacityMode_paramName : string

<maya_phong>.matteOpacity_connected : boolean

<maya_phong>.matteOpacity_shader : texturemap

<maya_phong>.matteOpacity_paramName : string

<maya_phong>.irradiance_connected : boolean

<maya_phong>.irradiance_shader : texturemap

<maya_phong>.irradiance_paramName : string

<maya_phong>.irradianceColor_connected : boolean

<maya_phong>.irradianceColor_shader : texturemap

<maya_phong>.irradianceColor_paramName : string

<maya_phong>.refractionBlur_connected : boolean

<maya_phong>.refractionBlur_shader : texturemap

<maya_phong>.refractionBlur_paramName : string

<maya_phong>.refractionBlurLimit_connected : boolean

<maya_phong>.refractionBlurLimit_shader : texturemap

<maya_phong>.refractionBlurLimit_paramName : string

<maya_phong>.refractionRays_connected : boolean

<maya_phong>.refractionRays_shader : texturemap

<maya_phong>.refractionRays_paramName : string

<maya_phong>.reflectionBlur_connected : boolean

<maya_phong>.reflectionBlur_shader : texturemap

<maya_phong>.reflectionBlur_paramName : string

<maya_phong>.reflectionBlurLimit_connected : boolean

<maya_phong>.reflectionBlurLimit_shader : texturemap

<maya_phong>.reflectionBlurLimit_paramName : string

<maya_phong>.reflectionRays_connected : boolean

<maya_phong>.reflectionRays_shader : texturemap

<maya_phong>.reflectionRays_paramName : string

<maya_phong>.scatterColor_connected : boolean

<maya_phong>.scatterColor_shader : texturemap

<maya_phong>.scatterColor_paramName : string

<maya_phong>.scatterRadius_connected : boolean

<maya_phong>.scatterRadius_shader : texturemap

<maya_phong>.scatterRadius_paramName : string

<maya_phong>.scatterAccuracy_connected : boolean

<maya_phong>.scatterAccuracy_shader : texturemap

<maya_phong>.scatterAccuracy_paramName : string

<maya_phong>.scatterFalloff_connected : boolean

<maya_phong>.scatterFalloff_shader : texturemap

<maya_phong>.scatterFalloff_paramName : string

<maya_phong>.scatterLimit_connected : boolean

<maya_phong>.scatterLimit_shader : texturemap

<maya_phong>.scatterLimit_paramName : string

<maya_phong>.scatterCache_connected : boolean

<maya_phong>.scatterCache_shader : texturemap

<maya_phong>.scatterCache_paramName : string

<maya_phong>.TheList : maxObject array

<maya_phong>.Shader_Version : integer

maya_phong interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_phongE : textureMap

maya_phongE : textureMap {7773161f,5446ba6f}

Constructor:

maya_phongE: class instances not creatable by MAXScript

Properties:

<maya_phongE>.roughness : float

<maya_phongE>.highlightSize : float

<maya_phongE>.whiteness : fRGBA color

<maya_phongE>.reflectionLimit : integer

<maya_phongE>.specularColor : fRGBA color

<maya_phongE>.reflectivity : float

<maya_phongE>.reflectedColor : fRGBA color

<maya_phongE>.reflectionSpecularity : float

<maya_phongE>.refractionLimit : integer

<maya_phongE>.refractiveIndex : float

<maya_phongE>.refractions : boolean

<maya_phongE>.diffuse : float

<maya_phongE>.color : fRGBA color

<maya_phongE>.transparency : fRGBA color

<maya_phongE>.ambientColor : fRGBA color

<maya_phongE>.incandescence : fRGBA color

<maya_phongE>.translucence : float

<maya_phongE>.translucenceFocus : float

<maya_phongE>.translucenceDepth : float

<maya_phongE>.opacityGain : float

<maya_phongE>.glowIntensity : float

<maya_phongE>.hideSource : boolean

<maya_phongE>.surfaceThickness : float

<maya_phongE>.shadowAttenuation : float

<maya_phongE>.transparencyDepth : float

<maya_phongE>.lightAbsorbance : float

<maya_phongE>.chromaticAberration : boolean

<maya_phongE>.normalCamera : point3

<maya_phongE>.matteOpacityMode : integer

<maya_phongE>.matteOpacity : float

<maya_phongE>.irradiance : fRGBA color

<maya_phongE>.irradianceColor : fRGBA color

<maya_phongE>.refractionBlur : float

<maya_phongE>.refractionBlurLimit : integer

<maya_phongE>.refractionRays : integer

<maya_phongE>.reflectionBlur : float

<maya_phongE>.reflectionBlurLimit : integer

<maya_phongE>.reflectionRays : integer

<maya_phongE>.scatterColor : fRGBA color

<maya_phongE>.scatterRadius : float

<maya_phongE>.scatterAccuracy : integer

<maya_phongE>.scatterFalloff : integer

<maya_phongE>.scatterLimit : integer

<maya_phongE>.scatterCache : integer

<maya_phongE>.Structure : paramBlock2

<maya_phongE>.outColor : fRGBA color

<maya_phongE>.outGlowColor : fRGBA color

<maya_phongE>.outMatteOpacity : fRGBA color

<maya_phongE>.outTransparency : fRGBA color

<maya_phongE>.outAmbient : fRGBA color

<maya_phongE>.outIncandescence : fRGBA color

<maya_phongE>.outIrradiance : fRGBA color

<maya_phongE>.outDiffuseShadowed : fRGBA color

<maya_phongE>.outDiffuseNoShadow : fRGBA color

<maya_phongE>.outShadow : fRGBA color

<maya_phongE>.outSpecularShadowed : fRGBA color

<maya_phongE>.outSpecularNoShadow : fRGBA color

<maya_phongE>.outReflection : fRGBA color

<maya_phongE>.outRefraction : fRGBA color

<maya_phongE>.outScatter : fRGBA color

<maya_phongE>.outOpacity : fRGBA color

<maya_phongE>.roughness_connected : boolean

<maya_phongE>.roughness_shader : texturemap

<maya_phongE>.roughness_paramName : string

<maya_phongE>.highlightSize_connected : boolean

<maya_phongE>.highlightSize_shader : texturemap

<maya_phongE>.highlightSize_paramName : string

<maya_phongE>.whiteness_connected : boolean

<maya_phongE>.whiteness_shader : texturemap

<maya_phongE>.whiteness_paramName : string

<maya_phongE>.reflectionLimit_connected : boolean

<maya_phongE>.reflectionLimit_shader : texturemap

<maya_phongE>.reflectionLimit_paramName : string

<maya_phongE>.specularColor_connected : boolean

<maya_phongE>.specularColor_shader : texturemap

<maya_phongE>.specularColor_paramName : string

<maya_phongE>.reflectivity_connected : boolean

<maya_phongE>.reflectivity_shader : texturemap

<maya_phongE>.reflectivity_paramName : string

<maya_phongE>.reflectedColor_connected : boolean

<maya_phongE>.reflectedColor_shader : texturemap

<maya_phongE>.reflectedColor_paramName : string

<maya_phongE>.reflectionSpecularity_connected : boolean

<maya_phongE>.reflectionSpecularity_shader : texturemap

<maya_phongE>.reflectionSpecularity_paramName : string

<maya_phongE>.refractionLimit_connected : boolean

<maya_phongE>.refractionLimit_shader : texturemap

<maya_phongE>.refractionLimit_paramName : string

<maya_phongE>.refractiveIndex_connected : boolean

<maya_phongE>.refractiveIndex_shader : texturemap

<maya_phongE>.refractiveIndex_paramName : string

<maya_phongE>.refractions_connected : boolean

<maya_phongE>.refractions_shader : texturemap

<maya_phongE>.refractions_paramName : string

<maya_phongE>.diffuse_connected : boolean

<maya_phongE>.diffuse_shader : texturemap

<maya_phongE>.diffuse_paramName : string

<maya_phongE>.color_connected : boolean

<maya_phongE>.color_shader : texturemap

<maya_phongE>.color_paramName : string

<maya_phongE>.transparency_connected : boolean

<maya_phongE>.transparency_shader : texturemap

<maya_phongE>.transparency_paramName : string

<maya_phongE>.ambientColor_connected : boolean

<maya_phongE>.ambientColor_shader : texturemap

<maya_phongE>.ambientColor_paramName : string

<maya_phongE>.incandescence_connected : boolean

<maya_phongE>.incandescence_shader : texturemap

<maya_phongE>.incandescence_paramName : string

<maya_phongE>.translucence_connected : boolean

<maya_phongE>.translucence_shader : texturemap

<maya_phongE>.translucence_paramName : string

<maya_phongE>.translucenceFocus_connected : boolean

<maya_phongE>.translucenceFocus_shader : texturemap

<maya_phongE>.translucenceFocus_paramName : string

<maya_phongE>.translucenceDepth_connected : boolean

<maya_phongE>.translucenceDepth_shader : texturemap

<maya_phongE>.translucenceDepth_paramName : string

<maya_phongE>.opacityGain_connected : boolean

<maya_phongE>.opacityGain_shader : texturemap

<maya_phongE>.opacityGain_paramName : string

<maya_phongE>.glowIntensity_connected : boolean

<maya_phongE>.glowIntensity_shader : texturemap

<maya_phongE>.glowIntensity_paramName : string

<maya_phongE>.hideSource_connected : boolean

<maya_phongE>.hideSource_shader : texturemap

<maya_phongE>.hideSource_paramName : string

<maya_phongE>.surfaceThickness_connected : boolean

<maya_phongE>.surfaceThickness_shader : texturemap

<maya_phongE>.surfaceThickness_paramName : string

<maya_phongE>.shadowAttenuation_connected : boolean

<maya_phongE>.shadowAttenuation_shader : texturemap

<maya_phongE>.shadowAttenuation_paramName : string

<maya_phongE>.transparencyDepth_connected : boolean

<maya_phongE>.transparencyDepth_shader : texturemap

<maya_phongE>.transparencyDepth_paramName : string

<maya_phongE>.lightAbsorbance_connected : boolean

<maya_phongE>.lightAbsorbance_shader : texturemap

<maya_phongE>.lightAbsorbance_paramName : string

<maya_phongE>.chromaticAberration_connected : boolean

<maya_phongE>.chromaticAberration_shader : texturemap

<maya_phongE>.chromaticAberration_paramName : string

<maya_phongE>.normalCamera_connected : boolean

<maya_phongE>.normalCamera_shader : texturemap

<maya_phongE>.normalCamera_paramName : string

<maya_phongE>.matteOpacityMode_connected : boolean

<maya_phongE>.matteOpacityMode_shader : texturemap

<maya_phongE>.matteOpacityMode_paramName : string

<maya_phongE>.matteOpacity_connected : boolean

<maya_phongE>.matteOpacity_shader : texturemap

<maya_phongE>.matteOpacity_paramName : string

<maya_phongE>.irradiance_connected : boolean

<maya_phongE>.irradiance_shader : texturemap

<maya_phongE>.irradiance_paramName : string

<maya_phongE>.irradianceColor_connected : boolean

<maya_phongE>.irradianceColor_shader : texturemap

<maya_phongE>.irradianceColor_paramName : string

<maya_phongE>.refractionBlur_connected : boolean

<maya_phongE>.refractionBlur_shader : texturemap

<maya_phongE>.refractionBlur_paramName : string

<maya_phongE>.refractionBlurLimit_connected : boolean

<maya_phongE>.refractionBlurLimit_shader : texturemap

<maya_phongE>.refractionBlurLimit_paramName : string

<maya_phongE>.refractionRays_connected : boolean

<maya_phongE>.refractionRays_shader : texturemap

<maya_phongE>.refractionRays_paramName : string

<maya_phongE>.reflectionBlur_connected : boolean

<maya_phongE>.reflectionBlur_shader : texturemap

<maya_phongE>.reflectionBlur_paramName : string

<maya_phongE>.reflectionBlurLimit_connected : boolean

<maya_phongE>.reflectionBlurLimit_shader : texturemap

<maya_phongE>.reflectionBlurLimit_paramName : string

<maya_phongE>.reflectionRays_connected : boolean

<maya_phongE>.reflectionRays_shader : texturemap

<maya_phongE>.reflectionRays_paramName : string

<maya_phongE>.scatterColor_connected : boolean

<maya_phongE>.scatterColor_shader : texturemap

<maya_phongE>.scatterColor_paramName : string

<maya_phongE>.scatterRadius_connected : boolean

<maya_phongE>.scatterRadius_shader : texturemap

<maya_phongE>.scatterRadius_paramName : string

<maya_phongE>.scatterAccuracy_connected : boolean

<maya_phongE>.scatterAccuracy_shader : texturemap

<maya_phongE>.scatterAccuracy_paramName : string

<maya_phongE>.scatterFalloff_connected : boolean

<maya_phongE>.scatterFalloff_shader : texturemap

<maya_phongE>.scatterFalloff_paramName : string

<maya_phongE>.scatterLimit_connected : boolean

<maya_phongE>.scatterLimit_shader : texturemap

<maya_phongE>.scatterLimit_paramName : string

<maya_phongE>.scatterCache_connected : boolean

<maya_phongE>.scatterCache_shader : texturemap

<maya_phongE>.scatterCache_paramName : string

<maya_phongE>.TheList : maxObject array

<maya_phongE>.Shader_Version : integer

maya_phongE interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_photonsurface : textureMap

maya_photonsurface : textureMap {7773161f,620bad63}

Constructor:

maya_photonsurface: class instances not creatable by MAXScript

Properties:

<maya_photonsurface>.shinyness : float

<maya_photonsurface>.spreadX : float

<maya_photonsurface>.spreadY : float

<maya_photonsurface>.angle : float

<maya_photonsurface>.whiteness : fRGBA color

<maya_photonsurface>.specularColor : fRGBA color

<maya_photonsurface>.reflectivity : float

<maya_photonsurface>.refractiveIndex : float

<maya_photonsurface>.refractions : boolean

<maya_photonsurface>.absorbs : boolean

<maya_photonsurface>.diffuse : float

<maya_photonsurface>.color : fRGBA color

<maya_photonsurface>.transparency : fRGBA color

<maya_photonsurface>.translucence : float

<maya_photonsurface>.translucenceFocus : float

<maya_photonsurface>.normalCamera : point3

<maya_photonsurface>.colorNorm : integer

<maya_photonsurface>.shinyness_connected : boolean

<maya_photonsurface>.shinyness_shader : texturemap

<maya_photonsurface>.shinyness_paramName : string

<maya_photonsurface>.spreadX_connected : boolean

<maya_photonsurface>.spreadX_shader : texturemap

<maya_photonsurface>.spreadX_paramName : string

<maya_photonsurface>.spreadY_connected : boolean

<maya_photonsurface>.spreadY_shader : texturemap

<maya_photonsurface>.spreadY_paramName : string

<maya_photonsurface>.angle_connected : boolean

<maya_photonsurface>.angle_shader : texturemap

<maya_photonsurface>.angle_paramName : string

<maya_photonsurface>.whiteness_connected : boolean

<maya_photonsurface>.whiteness_shader : texturemap

<maya_photonsurface>.whiteness_paramName : string

<maya_photonsurface>.specularColor_connected : boolean

<maya_photonsurface>.specularColor_shader : texturemap

<maya_photonsurface>.specularColor_paramName : string

<maya_photonsurface>.reflectivity_connected : boolean

<maya_photonsurface>.reflectivity_shader : texturemap

<maya_photonsurface>.reflectivity_paramName : string

<maya_photonsurface>.refractiveIndex_connected : boolean

<maya_photonsurface>.refractiveIndex_shader : texturemap

<maya_photonsurface>.refractiveIndex_paramName : string

<maya_photonsurface>.refractions_connected : boolean

<maya_photonsurface>.refractions_shader : texturemap

<maya_photonsurface>.refractions_paramName : string

<maya_photonsurface>.absorbs_connected : boolean

<maya_photonsurface>.absorbs_shader : texturemap

<maya_photonsurface>.absorbs_paramName : string

<maya_photonsurface>.diffuse_connected : boolean

<maya_photonsurface>.diffuse_shader : texturemap

<maya_photonsurface>.diffuse_paramName : string

<maya_photonsurface>.color_connected : boolean

<maya_photonsurface>.color_shader : texturemap

<maya_photonsurface>.color_paramName : string

<maya_photonsurface>.transparency_connected : boolean

<maya_photonsurface>.transparency_shader : texturemap

<maya_photonsurface>.transparency_paramName : string

<maya_photonsurface>.translucence_connected : boolean

<maya_photonsurface>.translucence_shader : texturemap

<maya_photonsurface>.translucence_paramName : string

<maya_photonsurface>.translucenceFocus_connected : boolean

<maya_photonsurface>.translucenceFocus_shader : texturemap

<maya_photonsurface>.translucenceFocus_paramName : string

<maya_photonsurface>.normalCamera_connected : boolean

<maya_photonsurface>.normalCamera_shader : texturemap

<maya_photonsurface>.normalCamera_paramName : string

<maya_photonsurface>.colorNorm_connected : boolean

<maya_photonsurface>.colorNorm_shader : texturemap

<maya_photonsurface>.colorNorm_paramName : string

<maya_photonsurface>.TheList : maxObject array

<maya_photonsurface>.Shader_Version : integer

maya_photonsurface interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_place2dtex : textureMap

maya_place2dtex : textureMap {7773161f,aa515538}

Constructor:

maya_place2dtex: class instances not creatable by MAXScript

Properties:

<maya_place2dtex>.uvCoord : point3

<maya_place2dtex>.uvFilterSize : point3

<maya_place2dtex>.coverage : point3

<maya_place2dtex>.translateFrame : point3

<maya_place2dtex>.rotateFrame : float

<maya_place2dtex>.mirrorU : boolean

<maya_place2dtex>.mirrorV : boolean

<maya_place2dtex>.stagger : boolean

<maya_place2dtex>.wrapU : boolean

<maya_place2dtex>.wrapV : boolean

<maya_place2dtex>.repeatUV : point3

<maya_place2dtex>.offset : point3

<maya_place2dtex>.rotateUV : float

<maya_place2dtex>.noiseUV : point3

<maya_place2dtex>.Structure : paramBlock2

<maya_place2dtex>.outUV : point3

<maya_place2dtex>.outUvFilterSize : point3

<maya_place2dtex>.coverage : point3

<maya_place2dtex>.translateFrame : point3

<maya_place2dtex>.rotateFrame : float

<maya_place2dtex>.mirrorU : boolean

<maya_place2dtex>.mirrorV : boolean

<maya_place2dtex>.stagger : boolean

<maya_place2dtex>.wrapU : boolean

<maya_place2dtex>.wrapV : boolean

<maya_place2dtex>.repeatUV : point3

<maya_place2dtex>.offset : point3

<maya_place2dtex>.rotateUV : float

<maya_place2dtex>.noiseUV : point3

<maya_place2dtex>.uvCoord_connected : boolean

<maya_place2dtex>.uvCoord_shader : texturemap

<maya_place2dtex>.uvCoord_paramName : string

<maya_place2dtex>.uvFilterSize_connected : boolean

<maya_place2dtex>.uvFilterSize_shader : texturemap

<maya_place2dtex>.uvFilterSize_paramName : string

<maya_place2dtex>.coverage_connected : boolean

<maya_place2dtex>.coverage_shader : texturemap

<maya_place2dtex>.coverage_paramName : string

<maya_place2dtex>.translateFrame_connected : boolean

<maya_place2dtex>.translateFrame_shader : texturemap

<maya_place2dtex>.translateFrame_paramName : string

<maya_place2dtex>.rotateFrame_connected : boolean

<maya_place2dtex>.rotateFrame_shader : texturemap

<maya_place2dtex>.rotateFrame_paramName : string

<maya_place2dtex>.mirrorU_connected : boolean

<maya_place2dtex>.mirrorU_shader : texturemap

<maya_place2dtex>.mirrorU_paramName : string

<maya_place2dtex>.mirrorV_connected : boolean

<maya_place2dtex>.mirrorV_shader : texturemap

<maya_place2dtex>.mirrorV_paramName : string

<maya_place2dtex>.stagger_connected : boolean

<maya_place2dtex>.stagger_shader : texturemap

<maya_place2dtex>.stagger_paramName : string

<maya_place2dtex>.wrapU_connected : boolean

<maya_place2dtex>.wrapU_shader : texturemap

<maya_place2dtex>.wrapU_paramName : string

<maya_place2dtex>.wrapV_connected : boolean

<maya_place2dtex>.wrapV_shader : texturemap

<maya_place2dtex>.wrapV_paramName : string

<maya_place2dtex>.repeatUV_connected : boolean

<maya_place2dtex>.repeatUV_shader : texturemap

<maya_place2dtex>.repeatUV_paramName : string

<maya_place2dtex>.offset_connected : boolean

<maya_place2dtex>.offset_shader : texturemap

<maya_place2dtex>.offset_paramName : string

<maya_place2dtex>.rotateUV_connected : boolean

<maya_place2dtex>.rotateUV_shader : texturemap

<maya_place2dtex>.rotateUV_paramName : string

<maya_place2dtex>.noiseUV_connected : boolean

<maya_place2dtex>.noiseUV_shader : texturemap

<maya_place2dtex>.noiseUV_paramName : string

<maya_place2dtex>.TheList : maxObject array

<maya_place2dtex>.Shader_Version : integer

maya_place2dtex interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_place3dtex : textureMap

maya_place3dtex : textureMap {7773161f,aa505538}

Constructor:

maya_place3dtex: class instances not creatable by MAXScript

Properties:

<maya_place3dtex>.placementMatrix : matrix3

<maya_place3dtex>.placementMatrixMotion : matrix3

<maya_place3dtex>.Structure : paramBlock2

<maya_place3dtex>.worldInverseMatrix : matrix3

<maya_place3dtex>.placementMatrix_connected : boolean

<maya_place3dtex>.placementMatrix_shader : texturemap

<maya_place3dtex>.placementMatrix_paramName : string

<maya_place3dtex>.placementMatrixMotion_connected : boolean

<maya_place3dtex>.placementMatrixMotion_shader : texturemap

<maya_place3dtex>.placementMatrixMotion_paramName : string

<maya_place3dtex>.TheList : maxObject array

<maya_place3dtex>.Shader_Version : integer

maya_place3dtex interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_plusminusavg : textureMap

maya_plusminusavg : textureMap {7773161f,520f5366}

Constructor:

maya_plusminusavg: class instances not creatable by MAXScript

Properties:

<maya_plusminusavg>.operation : integer

<maya_plusminusavg>.input1D : float array

<maya_plusminusavg>.input2D : point3 array

<maya_plusminusavg>.input3D : point3 array

<maya_plusminusavg>.Structure : paramBlock2

<maya_plusminusavg>.output1D : float

<maya_plusminusavg>.output2D : point3

<maya_plusminusavg>.output3D : point3

<maya_plusminusavg>.operation_connected : boolean

<maya_plusminusavg>.operation_shader : texturemap

<maya_plusminusavg>.operation_paramName : string

<maya_plusminusavg>.TheList : maxObject array

<maya_plusminusavg>.Shader_Version : integer

maya_plusminusavg interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_pointlight : textureMap

maya_pointlight : textureMap {7773161f,a700514e}

Constructor:

maya_pointlight: class instances not creatable by MAXScript

Properties:

<maya_pointlight>.lightRadius : float

<maya_pointlight>.decayRate : integer

<maya_pointlight>.useDepthMapShadows : boolean

<maya_pointlight>.emitDiffuse : boolean

<maya_pointlight>.emitSpecular : boolean

<maya_pointlight>.color : fRGBA color

<maya_pointlight>.intensity : float

<maya_pointlight>.useRayTraceShadows : boolean

<maya_pointlight>.shadowColor : fRGBA color

<maya_pointlight>.shadowRays : integer

<maya_pointlight>.rayDepthLimit : integer

<maya_pointlight>.fogRadius : float

<maya_pointlight>.fogType : integer

<maya_pointlight>.fogIntensity : float

<maya_pointlight>.lightProfile : string

<maya_pointlight>.lightRadius_connected : boolean

<maya_pointlight>.lightRadius_shader : texturemap

<maya_pointlight>.lightRadius_paramName : string

<maya_pointlight>.decayRate_connected : boolean

<maya_pointlight>.decayRate_shader : texturemap

<maya_pointlight>.decayRate_paramName : string

<maya_pointlight>.useDepthMapShadows_connected : boolean

<maya_pointlight>.useDepthMapShadows_shader : texturemap

<maya_pointlight>.useDepthMapShadows_paramName : string

<maya_pointlight>.emitDiffuse_connected : boolean

<maya_pointlight>.emitDiffuse_shader : texturemap

<maya_pointlight>.emitDiffuse_paramName : string

<maya_pointlight>.emitSpecular_connected : boolean

<maya_pointlight>.emitSpecular_shader : texturemap

<maya_pointlight>.emitSpecular_paramName : string

<maya_pointlight>.color_connected : boolean

<maya_pointlight>.color_shader : texturemap

<maya_pointlight>.color_paramName : string

<maya_pointlight>.intensity_connected : boolean

<maya_pointlight>.intensity_shader : texturemap

<maya_pointlight>.intensity_paramName : string

<maya_pointlight>.useRayTraceShadows_connected : boolean

<maya_pointlight>.useRayTraceShadows_shader : texturemap

<maya_pointlight>.useRayTraceShadows_paramName : string

<maya_pointlight>.shadowColor_connected : boolean

<maya_pointlight>.shadowColor_shader : texturemap

<maya_pointlight>.shadowColor_paramName : string

<maya_pointlight>.shadowRays_connected : boolean

<maya_pointlight>.shadowRays_shader : texturemap

<maya_pointlight>.shadowRays_paramName : string

<maya_pointlight>.rayDepthLimit_connected : boolean

<maya_pointlight>.rayDepthLimit_shader : texturemap

<maya_pointlight>.rayDepthLimit_paramName : string

<maya_pointlight>.fogRadius_connected : boolean

<maya_pointlight>.fogRadius_shader : texturemap

<maya_pointlight>.fogRadius_paramName : string

<maya_pointlight>.fogType_connected : boolean

<maya_pointlight>.fogType_shader : texturemap

<maya_pointlight>.fogType_paramName : string

<maya_pointlight>.fogIntensity_connected : boolean

<maya_pointlight>.fogIntensity_shader : texturemap

<maya_pointlight>.fogIntensity_paramName : string

<maya_pointlight>.TheList : maxObject array

<maya_pointlight>.Shader_Version : integer

maya_pointlight interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_postlightmap : textureMap

maya_postlightmap : textureMap {7773161f,5a044d71}

Constructor:

maya_postlightmap: class instances not creatable by MAXScript

Properties:

<maya_postlightmap>.overbake : float

<maya_postlightmap>.extendEdgeColor : boolean

<maya_postlightmap>.overbake_connected : boolean

<maya_postlightmap>.overbake_shader : texturemap

<maya_postlightmap>.overbake_paramName : string

<maya_postlightmap>.extendEdgeColor_connected : boolean

<maya_postlightmap>.extendEdgeColor_shader : texturemap

<maya_postlightmap>.extendEdgeColor_paramName : string

<maya_postlightmap>.TheList : maxObject array

<maya_postlightmap>.Shader_Version : integer

maya_postlightmap interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_projection : textureMap

maya_projection : textureMap {7773161f,bff85f44}

Constructor:

maya_projection: class instances not creatable by MAXScript

Properties:

<maya_projection>.imageSize : point3

<maya_projection>.image : fRGBA color

<maya_projection>.uAngle : float

<maya_projection>.vAngle : float

<maya_projection>.projType : integer

<maya_projection>.linkedCamera : node

<maya_projection>.fitType : integer

<maya_projection>.fitFill : integer

<maya_projection>.ripples : point3

<maya_projection>.depth : point3

<maya_projection>.amplitudeX : float

<maya_projection>.amplitudeY : float

<maya_projection>.ratio : float

<maya_projection>.filter : float

<maya_projection>.filterSize : point3

<maya_projection>.filterOffset : float

<maya_projection>.blend : float

<maya_projection>.wrap : boolean

<maya_projection>.invert : boolean

<maya_projection>.alphaIsLuminance : boolean

<maya_projection>.colorGain : fRGBA color

<maya_projection>.colorOffset : fRGBA color

<maya_projection>.alphaGain : float

<maya_projection>.alphaOffset : float

<maya_projection>.defaultColor : fRGBA color

<maya_projection>.normalCamera : point3

<maya_projection>.placementMatrix : matrix3

<maya_projection>.local : boolean

<maya_projection>.Structure : paramBlock2

<maya_projection>.outColor : fRGBA color

<maya_projection>.outAlpha : float

<maya_projection>.imageSize_connected : boolean

<maya_projection>.imageSize_shader : texturemap

<maya_projection>.imageSize_paramName : string

<maya_projection>.image_connected : boolean

<maya_projection>.image_shader : texturemap

<maya_projection>.image_paramName : string

<maya_projection>.uAngle_connected : boolean

<maya_projection>.uAngle_shader : texturemap

<maya_projection>.uAngle_paramName : string

<maya_projection>.vAngle_connected : boolean

<maya_projection>.vAngle_shader : texturemap

<maya_projection>.vAngle_paramName : string

<maya_projection>.projType_connected : boolean

<maya_projection>.projType_shader : texturemap

<maya_projection>.projType_paramName : string

<maya_projection>.fitType_connected : boolean

<maya_projection>.fitType_shader : texturemap

<maya_projection>.fitType_paramName : string

<maya_projection>.fitFill_connected : boolean

<maya_projection>.fitFill_shader : texturemap

<maya_projection>.fitFill_paramName : string

<maya_projection>.ripples_connected : boolean

<maya_projection>.ripples_shader : texturemap

<maya_projection>.ripples_paramName : string

<maya_projection>.depth_connected : boolean

<maya_projection>.depth_shader : texturemap

<maya_projection>.depth_paramName : string

<maya_projection>.amplitudeX_connected : boolean

<maya_projection>.amplitudeX_shader : texturemap

<maya_projection>.amplitudeX_paramName : string

<maya_projection>.amplitudeY_connected : boolean

<maya_projection>.amplitudeY_shader : texturemap

<maya_projection>.amplitudeY_paramName : string

<maya_projection>.ratio_connected : boolean

<maya_projection>.ratio_shader : texturemap

<maya_projection>.ratio_paramName : string

<maya_projection>.filter_connected : boolean

<maya_projection>.filter_shader : texturemap

<maya_projection>.filter_paramName : string

<maya_projection>.filterSize_connected : boolean

<maya_projection>.filterSize_shader : texturemap

<maya_projection>.filterSize_paramName : string

<maya_projection>.filterOffset_connected : boolean

<maya_projection>.filterOffset_shader : texturemap

<maya_projection>.filterOffset_paramName : string

<maya_projection>.blend_connected : boolean

<maya_projection>.blend_shader : texturemap

<maya_projection>.blend_paramName : string

<maya_projection>.wrap_connected : boolean

<maya_projection>.wrap_shader : texturemap

<maya_projection>.wrap_paramName : string

<maya_projection>.invert_connected : boolean

<maya_projection>.invert_shader : texturemap

<maya_projection>.invert_paramName : string

<maya_projection>.alphaIsLuminance_connected : boolean

<maya_projection>.alphaIsLuminance_shader : texturemap

<maya_projection>.alphaIsLuminance_paramName : string

<maya_projection>.colorGain_connected : boolean

<maya_projection>.colorGain_shader : texturemap

<maya_projection>.colorGain_paramName : string

<maya_projection>.colorOffset_connected : boolean

<maya_projection>.colorOffset_shader : texturemap

<maya_projection>.colorOffset_paramName : string

<maya_projection>.alphaGain_connected : boolean

<maya_projection>.alphaGain_shader : texturemap

<maya_projection>.alphaGain_paramName : string

<maya_projection>.alphaOffset_connected : boolean

<maya_projection>.alphaOffset_shader : texturemap

<maya_projection>.alphaOffset_paramName : string

<maya_projection>.defaultColor_connected : boolean

<maya_projection>.defaultColor_shader : texturemap

<maya_projection>.defaultColor_paramName : string

<maya_projection>.normalCamera_connected : boolean

<maya_projection>.normalCamera_shader : texturemap

<maya_projection>.normalCamera_paramName : string

<maya_projection>.placementMatrix_connected : boolean

<maya_projection>.placementMatrix_shader : texturemap

<maya_projection>.placementMatrix_paramName : string

<maya_projection>.local_connected : boolean

<maya_projection>.local_shader : texturemap

<maya_projection>.local_paramName : string

<maya_projection>.TheList : maxObject array

<maya_projection>.Shader_Version : integer

maya_projection interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_quadswitch : textureMap

maya_quadswitch : textureMap {7773161f,af054435}

Constructor:

maya_quadswitch: class instances not creatable by MAXScript

Properties:

<maya_quadswitch>.default : paramBlock2

<maya_quadswitch>.input : paramBlock2 array

<maya_quadswitch>.defTriple : point3

<maya_quadswitch>.defSingle : float

<maya_quadswitch>.inTriple : point3

<maya_quadswitch>.inSingle : float

<maya_quadswitch>.inShape : node

<maya_quadswitch>.inQuad : paramBlock2

<maya_quadswitch>.Structure : paramBlock2

<maya_quadswitch>.outTriple : point3

<maya_quadswitch>.outSingle : float

<maya_quadswitch>.Connection_struct__0000__default : paramBlock2

<maya_quadswitch>.defTriple_connected : boolean

<maya_quadswitch>.defTriple_shader : texturemap

<maya_quadswitch>.defTriple_paramName : string

<maya_quadswitch>.defSingle_connected : boolean

<maya_quadswitch>.defSingle_shader : texturemap

<maya_quadswitch>.defSingle_paramName : string

<maya_quadswitch>.TheList : maxObject array

<maya_quadswitch>.Shader_Version : integer

maya_quadswitch interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_ramp : textureMap

maya_ramp : textureMap {7773161f,520a5755}

Constructor:

maya_ramp: class instances not creatable by MAXScript

Properties:

<maya_ramp>.type : integer

<maya_ramp>.interpolation : integer

<maya_ramp>.colorEntryList : paramBlock2 array

<maya_ramp>.uWave : float

<maya_ramp>.vWave : float

<maya_ramp>.noise : float

<maya_ramp>.noiseFreq : float

<maya_ramp>.hueNoise : float

<maya_ramp>.satNoise : float

<maya_ramp>.valNoise : float

<maya_ramp>.hueNoiseFreq : float

<maya_ramp>.satNoiseFreq : float

<maya_ramp>.valNoiseFreq : float

<maya_ramp>.uvCoord : point3

<maya_ramp>.uvFilterSize : point3

<maya_ramp>.filter : float

<maya_ramp>.filterOffset : float

<maya_ramp>.invert : boolean

<maya_ramp>.alphaIsLuminance : boolean

<maya_ramp>.colorGain : fRGBA color

<maya_ramp>.colorOffset : fRGBA color

<maya_ramp>.alphaGain : float

<maya_ramp>.alphaOffset : float

<maya_ramp>.defaultColor : fRGBA color

<maya_ramp>.position : float

<maya_ramp>.color : fRGBA color

<maya_ramp>.Structure : paramBlock2

<maya_ramp>.outColor : fRGBA color

<maya_ramp>.outAlpha : float

<maya_ramp>.type_connected : boolean

<maya_ramp>.type_shader : texturemap

<maya_ramp>.type_paramName : string

<maya_ramp>.interpolation_connected : boolean

<maya_ramp>.interpolation_shader : texturemap

<maya_ramp>.interpolation_paramName : string

<maya_ramp>.uWave_connected : boolean

<maya_ramp>.uWave_shader : texturemap

<maya_ramp>.uWave_paramName : string

<maya_ramp>.vWave_connected : boolean

<maya_ramp>.vWave_shader : texturemap

<maya_ramp>.vWave_paramName : string

<maya_ramp>.noise_connected : boolean

<maya_ramp>.noise_shader : texturemap

<maya_ramp>.noise_paramName : string

<maya_ramp>.noiseFreq_connected : boolean

<maya_ramp>.noiseFreq_shader : texturemap

<maya_ramp>.noiseFreq_paramName : string

<maya_ramp>.hueNoise_connected : boolean

<maya_ramp>.hueNoise_shader : texturemap

<maya_ramp>.hueNoise_paramName : string

<maya_ramp>.satNoise_connected : boolean

<maya_ramp>.satNoise_shader : texturemap

<maya_ramp>.satNoise_paramName : string

<maya_ramp>.valNoise_connected : boolean

<maya_ramp>.valNoise_shader : texturemap

<maya_ramp>.valNoise_paramName : string

<maya_ramp>.hueNoiseFreq_connected : boolean

<maya_ramp>.hueNoiseFreq_shader : texturemap

<maya_ramp>.hueNoiseFreq_paramName : string

<maya_ramp>.satNoiseFreq_connected : boolean

<maya_ramp>.satNoiseFreq_shader : texturemap

<maya_ramp>.satNoiseFreq_paramName : string

<maya_ramp>.valNoiseFreq_connected : boolean

<maya_ramp>.valNoiseFreq_shader : texturemap

<maya_ramp>.valNoiseFreq_paramName : string

<maya_ramp>.uvCoord_connected : boolean

<maya_ramp>.uvCoord_shader : texturemap

<maya_ramp>.uvCoord_paramName : string

<maya_ramp>.uvFilterSize_connected : boolean

<maya_ramp>.uvFilterSize_shader : texturemap

<maya_ramp>.uvFilterSize_paramName : string

<maya_ramp>.filter_connected : boolean

<maya_ramp>.filter_shader : texturemap

<maya_ramp>.filter_paramName : string

<maya_ramp>.filterOffset_connected : boolean

<maya_ramp>.filterOffset_shader : texturemap

<maya_ramp>.filterOffset_paramName : string

<maya_ramp>.invert_connected : boolean

<maya_ramp>.invert_shader : texturemap

<maya_ramp>.invert_paramName : string

<maya_ramp>.alphaIsLuminance_connected : boolean

<maya_ramp>.alphaIsLuminance_shader : texturemap

<maya_ramp>.alphaIsLuminance_paramName : string

<maya_ramp>.colorGain_connected : boolean

<maya_ramp>.colorGain_shader : texturemap

<maya_ramp>.colorGain_paramName : string

<maya_ramp>.colorOffset_connected : boolean

<maya_ramp>.colorOffset_shader : texturemap

<maya_ramp>.colorOffset_paramName : string

<maya_ramp>.alphaGain_connected : boolean

<maya_ramp>.alphaGain_shader : texturemap

<maya_ramp>.alphaGain_paramName : string

<maya_ramp>.alphaOffset_connected : boolean

<maya_ramp>.alphaOffset_shader : texturemap

<maya_ramp>.alphaOffset_paramName : string

<maya_ramp>.defaultColor_connected : boolean

<maya_ramp>.defaultColor_shader : texturemap

<maya_ramp>.defaultColor_paramName : string

<maya_ramp>.TheList : maxObject array

<maya_ramp>.Shader_Version : integer

maya_ramp interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_rampshader : textureMap

maya_rampshader : textureMap {7773161f,b2f44939}

Constructor:

maya_rampshader: class instances not creatable by MAXScript

Properties:

<maya_rampshader>.refractionLimit : integer

<maya_rampshader>.refractiveIndex : float

<maya_rampshader>.refractions : boolean

<maya_rampshader>.diffuse : float

<maya_rampshader>.forwardScatter : float

<maya_rampshader>.color : paramBlock2 array

<maya_rampshader>.colorInput : integer

<maya_rampshader>.transparency : paramBlock2 array

<maya_rampshader>.ambientColor : fRGBA color

<maya_rampshader>.incandescence : paramBlock2 array

<maya_rampshader>.translucence : float

<maya_rampshader>.translucenceFocus : float

<maya_rampshader>.translucenceDepth : float

<maya_rampshader>.opacityDepth : float

<maya_rampshader>.glowIntensity : float

<maya_rampshader>.specularGlow : float

<maya_rampshader>.hideSource : boolean

<maya_rampshader>.surfaceThickness : float

<maya_rampshader>.shadowAttenuation : float

<maya_rampshader>.transparencyDepth : float

<maya_rampshader>.lightAbsorbance : float

<maya_rampshader>.chromaticAberration : boolean

<maya_rampshader>.eccentricity : float

<maya_rampshader>.specularity : float

<maya_rampshader>.specularRollOff : paramBlock2 array

<maya_rampshader>.reflectionLimit : integer

<maya_rampshader>.specularColor : paramBlock2 array

<maya_rampshader>.reflectivity : paramBlock2 array

<maya_rampshader>.environment : paramBlock2 array

<maya_rampshader>.reflectedColor : fRGBA color

<maya_rampshader>.reflectionSpecularity : float

<maya_rampshader>.normalCamera : point3

<maya_rampshader>.matteOpacityMode : integer

<maya_rampshader>.matteOpacity : float

<maya_rampshader>.irradiance : fRGBA color

<maya_rampshader>.irradianceColor : fRGBA color

<maya_rampshader>.refractionBlur : float

<maya_rampshader>.refractionBlurLimit : integer

<maya_rampshader>.refractionRays : integer

<maya_rampshader>.reflectionBlur : float

<maya_rampshader>.reflectionBlurLimit : integer

<maya_rampshader>.reflectionRays : integer

<maya_rampshader>.shadowMode : integer

<maya_rampshader>.shadowColor : fRGBA color

<maya_rampshader>.shadowThreshold : float

<maya_rampshader>.position : float

<maya_rampshader>.color : fRGBA color

<maya_rampshader>.interp : integer

<maya_rampshader>.position : float

<maya_rampshader>.color : fRGBA color

<maya_rampshader>.interp : integer

<maya_rampshader>.position : float

<maya_rampshader>.color : fRGBA color

<maya_rampshader>.interp : integer

<maya_rampshader>.position : float

<maya_rampshader>.floatValue : float

<maya_rampshader>.interp : integer

<maya_rampshader>.position : float

<maya_rampshader>.color : fRGBA color

<maya_rampshader>.interp : integer

<maya_rampshader>.position : float

<maya_rampshader>.floatValue : float

<maya_rampshader>.interp : integer

<maya_rampshader>.position : float

<maya_rampshader>.color : fRGBA color

<maya_rampshader>.interp : integer

<maya_rampshader>.Structure : paramBlock2

<maya_rampshader>.outColor : fRGBA color

<maya_rampshader>.outGlowColor : fRGBA color

<maya_rampshader>.outMatteOpacity : fRGBA color

<maya_rampshader>.outTransparency : fRGBA color

<maya_rampshader>.outAmbient : fRGBA color

<maya_rampshader>.outIncandescence : fRGBA color

<maya_rampshader>.outIrradiance : fRGBA color

<maya_rampshader>.outDiffuseShadowed : fRGBA color

<maya_rampshader>.outDiffuseNoShadow : fRGBA color

<maya_rampshader>.outShadow : fRGBA color

<maya_rampshader>.outSpecularShadowed : fRGBA color

<maya_rampshader>.outSpecularNoShadow : fRGBA color

<maya_rampshader>.outReflection : fRGBA color

<maya_rampshader>.outRefraction : fRGBA color

<maya_rampshader>.outScatter : fRGBA color

<maya_rampshader>.outOpacity : fRGBA color

<maya_rampshader>.refractionLimit_connected : boolean

<maya_rampshader>.refractionLimit_shader : texturemap

<maya_rampshader>.refractionLimit_paramName : string

<maya_rampshader>.refractiveIndex_connected : boolean

<maya_rampshader>.refractiveIndex_shader : texturemap

<maya_rampshader>.refractiveIndex_paramName : string

<maya_rampshader>.refractions_connected : boolean

<maya_rampshader>.refractions_shader : texturemap

<maya_rampshader>.refractions_paramName : string

<maya_rampshader>.diffuse_connected : boolean

<maya_rampshader>.diffuse_shader : texturemap

<maya_rampshader>.diffuse_paramName : string

<maya_rampshader>.forwardScatter_connected : boolean

<maya_rampshader>.forwardScatter_shader : texturemap

<maya_rampshader>.forwardScatter_paramName : string

<maya_rampshader>.colorInput_connected : boolean

<maya_rampshader>.colorInput_shader : texturemap

<maya_rampshader>.colorInput_paramName : string

<maya_rampshader>.ambientColor_connected : boolean

<maya_rampshader>.ambientColor_shader : texturemap

<maya_rampshader>.ambientColor_paramName : string

<maya_rampshader>.translucence_connected : boolean

<maya_rampshader>.translucence_shader : texturemap

<maya_rampshader>.translucence_paramName : string

<maya_rampshader>.translucenceFocus_connected : boolean

<maya_rampshader>.translucenceFocus_shader : texturemap

<maya_rampshader>.translucenceFocus_paramName : string

<maya_rampshader>.translucenceDepth_connected : boolean

<maya_rampshader>.translucenceDepth_shader : texturemap

<maya_rampshader>.translucenceDepth_paramName : string

<maya_rampshader>.opacityDepth_connected : boolean

<maya_rampshader>.opacityDepth_shader : texturemap

<maya_rampshader>.opacityDepth_paramName : string

<maya_rampshader>.glowIntensity_connected : boolean

<maya_rampshader>.glowIntensity_shader : texturemap

<maya_rampshader>.glowIntensity_paramName : string

<maya_rampshader>.specularGlow_connected : boolean

<maya_rampshader>.specularGlow_shader : texturemap

<maya_rampshader>.specularGlow_paramName : string

<maya_rampshader>.hideSource_connected : boolean

<maya_rampshader>.hideSource_shader : texturemap

<maya_rampshader>.hideSource_paramName : string

<maya_rampshader>.surfaceThickness_connected : boolean

<maya_rampshader>.surfaceThickness_shader : texturemap

<maya_rampshader>.surfaceThickness_paramName : string

<maya_rampshader>.shadowAttenuation_connected : boolean

<maya_rampshader>.shadowAttenuation_shader : texturemap

<maya_rampshader>.shadowAttenuation_paramName : string

<maya_rampshader>.transparencyDepth_connected : boolean

<maya_rampshader>.transparencyDepth_shader : texturemap

<maya_rampshader>.transparencyDepth_paramName : string

<maya_rampshader>.lightAbsorbance_connected : boolean

<maya_rampshader>.lightAbsorbance_shader : texturemap

<maya_rampshader>.lightAbsorbance_paramName : string

<maya_rampshader>.chromaticAberration_connected : boolean

<maya_rampshader>.chromaticAberration_shader : texturemap

<maya_rampshader>.chromaticAberration_paramName : string

<maya_rampshader>.eccentricity_connected : boolean

<maya_rampshader>.eccentricity_shader : texturemap

<maya_rampshader>.eccentricity_paramName : string

<maya_rampshader>.specularity_connected : boolean

<maya_rampshader>.specularity_shader : texturemap

<maya_rampshader>.specularity_paramName : string

<maya_rampshader>.reflectionLimit_connected : boolean

<maya_rampshader>.reflectionLimit_shader : texturemap

<maya_rampshader>.reflectionLimit_paramName : string

<maya_rampshader>.reflectedColor_connected : boolean

<maya_rampshader>.reflectedColor_shader : texturemap

<maya_rampshader>.reflectedColor_paramName : string

<maya_rampshader>.reflectionSpecularity_connected : boolean

<maya_rampshader>.reflectionSpecularity_shader : texturemap

<maya_rampshader>.reflectionSpecularity_paramName : string

<maya_rampshader>.normalCamera_connected : boolean

<maya_rampshader>.normalCamera_shader : texturemap

<maya_rampshader>.normalCamera_paramName : string

<maya_rampshader>.matteOpacityMode_connected : boolean

<maya_rampshader>.matteOpacityMode_shader : texturemap

<maya_rampshader>.matteOpacityMode_paramName : string

<maya_rampshader>.matteOpacity_connected : boolean

<maya_rampshader>.matteOpacity_shader : texturemap

<maya_rampshader>.matteOpacity_paramName : string

<maya_rampshader>.irradiance_connected : boolean

<maya_rampshader>.irradiance_shader : texturemap

<maya_rampshader>.irradiance_paramName : string

<maya_rampshader>.irradianceColor_connected : boolean

<maya_rampshader>.irradianceColor_shader : texturemap

<maya_rampshader>.irradianceColor_paramName : string

<maya_rampshader>.refractionBlur_connected : boolean

<maya_rampshader>.refractionBlur_shader : texturemap

<maya_rampshader>.refractionBlur_paramName : string

<maya_rampshader>.refractionBlurLimit_connected : boolean

<maya_rampshader>.refractionBlurLimit_shader : texturemap

<maya_rampshader>.refractionBlurLimit_paramName : string

<maya_rampshader>.refractionRays_connected : boolean

<maya_rampshader>.refractionRays_shader : texturemap

<maya_rampshader>.refractionRays_paramName : string

<maya_rampshader>.reflectionBlur_connected : boolean

<maya_rampshader>.reflectionBlur_shader : texturemap

<maya_rampshader>.reflectionBlur_paramName : string

<maya_rampshader>.reflectionBlurLimit_connected : boolean

<maya_rampshader>.reflectionBlurLimit_shader : texturemap

<maya_rampshader>.reflectionBlurLimit_paramName : string

<maya_rampshader>.reflectionRays_connected : boolean

<maya_rampshader>.reflectionRays_shader : texturemap

<maya_rampshader>.reflectionRays_paramName : string

<maya_rampshader>.shadowMode_connected : boolean

<maya_rampshader>.shadowMode_shader : texturemap

<maya_rampshader>.shadowMode_paramName : string

<maya_rampshader>.shadowColor_connected : boolean

<maya_rampshader>.shadowColor_shader : texturemap

<maya_rampshader>.shadowColor_paramName : string

<maya_rampshader>.shadowThreshold_connected : boolean

<maya_rampshader>.shadowThreshold_shader : texturemap

<maya_rampshader>.shadowThreshold_paramName : string

<maya_rampshader>.TheList : maxObject array

<maya_rampshader>.Shader_Version : integer

maya_rampshader interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_remapcolor : textureMap

maya_remapcolor : textureMap {7773161f,a8ff5052}

Constructor:

maya_remapcolor: class instances not creatable by MAXScript

Properties:

<maya_remapcolor>.color : fRGBA color

<maya_remapcolor>.inputMin : float

<maya_remapcolor>.inputMax : float

<maya_remapcolor>.outputMin : float

<maya_remapcolor>.outputMax : float

<maya_remapcolor>.red : paramBlock2 array

<maya_remapcolor>.green : paramBlock2 array

<maya_remapcolor>.blue : paramBlock2 array

<maya_remapcolor>.position : float

<maya_remapcolor>.floatValue : float

<maya_remapcolor>.interp : integer

<maya_remapcolor>.position : float

<maya_remapcolor>.floatValue : float

<maya_remapcolor>.interp : integer

<maya_remapcolor>.position : float

<maya_remapcolor>.floatValue : float

<maya_remapcolor>.interp : integer

<maya_remapcolor>.Structure : paramBlock2

<maya_remapcolor>.outColor : fRGBA color

<maya_remapcolor>.color_connected : boolean

<maya_remapcolor>.color_shader : texturemap

<maya_remapcolor>.color_paramName : string

<maya_remapcolor>.inputMin_connected : boolean

<maya_remapcolor>.inputMin_shader : texturemap

<maya_remapcolor>.inputMin_paramName : string

<maya_remapcolor>.inputMax_connected : boolean

<maya_remapcolor>.inputMax_shader : texturemap

<maya_remapcolor>.inputMax_paramName : string

<maya_remapcolor>.outputMin_connected : boolean

<maya_remapcolor>.outputMin_shader : texturemap

<maya_remapcolor>.outputMin_paramName : string

<maya_remapcolor>.outputMax_connected : boolean

<maya_remapcolor>.outputMax_shader : texturemap

<maya_remapcolor>.outputMax_paramName : string

<maya_remapcolor>.TheList : maxObject array

<maya_remapcolor>.Shader_Version : integer

maya_remapcolor interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_remaphsv : textureMap

maya_remaphsv : textureMap {7773161f,c566a738}

Constructor:

maya_remaphsv: class instances not creatable by MAXScript

Properties:

<maya_remaphsv>.color : fRGBA color

<maya_remaphsv>.inputMin : float

<maya_remaphsv>.inputMax : float

<maya_remaphsv>.outputMin : float

<maya_remaphsv>.outputMax : float

<maya_remaphsv>.hue : paramBlock2 array

<maya_remaphsv>.saturation : paramBlock2 array

<maya_remaphsv>.value : paramBlock2 array

<maya_remaphsv>.position : float

<maya_remaphsv>.floatValue : float

<maya_remaphsv>.interp : integer

<maya_remaphsv>.position : float

<maya_remaphsv>.floatValue : float

<maya_remaphsv>.interp : integer

<maya_remaphsv>.position : float

<maya_remaphsv>.floatValue : float

<maya_remaphsv>.interp : integer

<maya_remaphsv>.Structure : paramBlock2

<maya_remaphsv>.outColor : fRGBA color

<maya_remaphsv>.color_connected : boolean

<maya_remaphsv>.color_shader : texturemap

<maya_remaphsv>.color_paramName : string

<maya_remaphsv>.inputMin_connected : boolean

<maya_remaphsv>.inputMin_shader : texturemap

<maya_remaphsv>.inputMin_paramName : string

<maya_remaphsv>.inputMax_connected : boolean

<maya_remaphsv>.inputMax_shader : texturemap

<maya_remaphsv>.inputMax_paramName : string

<maya_remaphsv>.outputMin_connected : boolean

<maya_remaphsv>.outputMin_shader : texturemap

<maya_remaphsv>.outputMin_paramName : string

<maya_remaphsv>.outputMax_connected : boolean

<maya_remaphsv>.outputMax_shader : texturemap

<maya_remaphsv>.outputMax_paramName : string

<maya_remaphsv>.TheList : maxObject array

<maya_remaphsv>.Shader_Version : integer

maya_remaphsv interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_remapvalue : textureMap

maya_remapvalue : textureMap {7773161f,b3015a52}

Constructor:

maya_remapvalue: class instances not creatable by MAXScript

Properties:

<maya_remapvalue>.inputValue : float

<maya_remapvalue>.inputMin : float

<maya_remapvalue>.inputMax : float

<maya_remapvalue>.outputMin : float

<maya_remapvalue>.outputMax : float

<maya_remapvalue>.color : paramBlock2 array

<maya_remapvalue>.value : paramBlock2 array

<maya_remapvalue>.position : float

<maya_remapvalue>.color : fRGBA color

<maya_remapvalue>.interp : integer

<maya_remapvalue>.position : float

<maya_remapvalue>.floatValue : float

<maya_remapvalue>.interp : integer

<maya_remapvalue>.Structure : paramBlock2

<maya_remapvalue>.outColor : fRGBA color

<maya_remapvalue>.outValue : float

<maya_remapvalue>.inputValue_connected : boolean

<maya_remapvalue>.inputValue_shader : texturemap

<maya_remapvalue>.inputValue_paramName : string

<maya_remapvalue>.inputMin_connected : boolean

<maya_remapvalue>.inputMin_shader : texturemap

<maya_remapvalue>.inputMin_paramName : string

<maya_remapvalue>.inputMax_connected : boolean

<maya_remapvalue>.inputMax_shader : texturemap

<maya_remapvalue>.inputMax_paramName : string

<maya_remapvalue>.outputMin_connected : boolean

<maya_remapvalue>.outputMin_shader : texturemap

<maya_remapvalue>.outputMin_paramName : string

<maya_remapvalue>.outputMax_connected : boolean

<maya_remapvalue>.outputMax_shader : texturemap

<maya_remapvalue>.outputMax_paramName : string

<maya_remapvalue>.TheList : maxObject array

<maya_remapvalue>.Shader_Version : integer

maya_remapvalue interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_reverse : textureMap

maya_reverse : textureMap {7773161f,b861a56a}

Constructor:

maya_reverse: class instances not creatable by MAXScript

Properties:

<maya_reverse>.input : point3

<maya_reverse>.Structure : paramBlock2

<maya_reverse>.output : point3

<maya_reverse>.input_connected : boolean

<maya_reverse>.input_shader : texturemap

<maya_reverse>.input_paramName : string

<maya_reverse>.TheList : maxObject array

<maya_reverse>.Shader_Version : integer

maya_reverse interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_rgb_to_color : textureMap

maya_rgb_to_color : textureMap {7773161f,790f4c8f}

Constructor:

maya_rgb_to_color: class instances not creatable by MAXScript

Properties:

<maya_rgb_to_color>.r : float

<maya_rgb_to_color>.g : float

<maya_rgb_to_color>.b : float

<maya_rgb_to_color>.a : float

<maya_rgb_to_color>.r_connected : boolean

<maya_rgb_to_color>.r_shader : texturemap

<maya_rgb_to_color>.r_paramName : string

<maya_rgb_to_color>.g_connected : boolean

<maya_rgb_to_color>.g_shader : texturemap

<maya_rgb_to_color>.g_paramName : string

<maya_rgb_to_color>.b_connected : boolean

<maya_rgb_to_color>.b_shader : texturemap

<maya_rgb_to_color>.b_paramName : string

<maya_rgb_to_color>.a_connected : boolean

<maya_rgb_to_color>.a_shader : texturemap

<maya_rgb_to_color>.a_paramName : string

<maya_rgb_to_color>.TheList : maxObject array

<maya_rgb_to_color>.Shader_Version : integer

maya_rgb_to_color interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_rgbtohsv : textureMap

maya_rgbtohsv : textureMap {7773161f,b668c043}

Constructor:

maya_rgbtohsv: class instances not creatable by MAXScript

Properties:

<maya_rgbtohsv>.inRgb : fRGBA color

<maya_rgbtohsv>.Structure : paramBlock2

<maya_rgbtohsv>.outHsv : fRGBA color

<maya_rgbtohsv>.inRgb_connected : boolean

<maya_rgbtohsv>.inRgb_shader : texturemap

<maya_rgbtohsv>.inRgb_paramName : string

<maya_rgbtohsv>.TheList : maxObject array

<maya_rgbtohsv>.Shader_Version : integer

maya_rgbtohsv interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_rock : textureMap

maya_rock : textureMap {7773161f,4808576c}

Constructor:

maya_rock: class instances not creatable by MAXScript

Properties:

<maya_rock>.color1 : fRGBA color

<maya_rock>.color2 : fRGBA color

<maya_rock>.grainSize : float

<maya_rock>.diffusion : float

<maya_rock>.mixRatio : float

<maya_rock>.filter : float

<maya_rock>.filterSize : point3

<maya_rock>.filterOffset : float

<maya_rock>.blend : float

<maya_rock>.wrap : boolean

<maya_rock>.invert : boolean

<maya_rock>.alphaIsLuminance : boolean

<maya_rock>.colorGain : fRGBA color

<maya_rock>.colorOffset : fRGBA color

<maya_rock>.alphaGain : float

<maya_rock>.alphaOffset : float

<maya_rock>.defaultColor : fRGBA color

<maya_rock>.placementMatrix : matrix3

<maya_rock>.local : boolean

<maya_rock>.Structure : paramBlock2

<maya_rock>.outColor : fRGBA color

<maya_rock>.outAlpha : float

<maya_rock>.color1_connected : boolean

<maya_rock>.color1_shader : texturemap

<maya_rock>.color1_paramName : string

<maya_rock>.color2_connected : boolean

<maya_rock>.color2_shader : texturemap

<maya_rock>.color2_paramName : string

<maya_rock>.grainSize_connected : boolean

<maya_rock>.grainSize_shader : texturemap

<maya_rock>.grainSize_paramName : string

<maya_rock>.diffusion_connected : boolean

<maya_rock>.diffusion_shader : texturemap

<maya_rock>.diffusion_paramName : string

<maya_rock>.mixRatio_connected : boolean

<maya_rock>.mixRatio_shader : texturemap

<maya_rock>.mixRatio_paramName : string

<maya_rock>.filter_connected : boolean

<maya_rock>.filter_shader : texturemap

<maya_rock>.filter_paramName : string

<maya_rock>.filterSize_connected : boolean

<maya_rock>.filterSize_shader : texturemap

<maya_rock>.filterSize_paramName : string

<maya_rock>.filterOffset_connected : boolean

<maya_rock>.filterOffset_shader : texturemap

<maya_rock>.filterOffset_paramName : string

<maya_rock>.blend_connected : boolean

<maya_rock>.blend_shader : texturemap

<maya_rock>.blend_paramName : string

<maya_rock>.wrap_connected : boolean

<maya_rock>.wrap_shader : texturemap

<maya_rock>.wrap_paramName : string

<maya_rock>.invert_connected : boolean

<maya_rock>.invert_shader : texturemap

<maya_rock>.invert_paramName : string

<maya_rock>.alphaIsLuminance_connected : boolean

<maya_rock>.alphaIsLuminance_shader : texturemap

<maya_rock>.alphaIsLuminance_paramName : string

<maya_rock>.colorGain_connected : boolean

<maya_rock>.colorGain_shader : texturemap

<maya_rock>.colorGain_paramName : string

<maya_rock>.colorOffset_connected : boolean

<maya_rock>.colorOffset_shader : texturemap

<maya_rock>.colorOffset_paramName : string

<maya_rock>.alphaGain_connected : boolean

<maya_rock>.alphaGain_shader : texturemap

<maya_rock>.alphaGain_paramName : string

<maya_rock>.alphaOffset_connected : boolean

<maya_rock>.alphaOffset_shader : texturemap

<maya_rock>.alphaOffset_paramName : string

<maya_rock>.defaultColor_connected : boolean

<maya_rock>.defaultColor_shader : texturemap

<maya_rock>.defaultColor_paramName : string

<maya_rock>.placementMatrix_connected : boolean

<maya_rock>.placementMatrix_shader : texturemap

<maya_rock>.placementMatrix_paramName : string

<maya_rock>.local_connected : boolean

<maya_rock>.local_shader : texturemap

<maya_rock>.local_paramName : string

<maya_rock>.TheList : maxObject array

<maya_rock>.Shader_Version : integer

maya_rock interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_samplerinfo : textureMap

maya_samplerinfo : textureMap {7773161f,570d543e}

Constructor:

maya_samplerinfo: class instances not creatable by MAXScript

Properties:

<maya_samplerinfo>.resultSpace : integer

<maya_samplerinfo>.ignoreBits : integer

<maya_samplerinfo>.Structure : paramBlock2

<maya_samplerinfo>.pointCamera : point3

<maya_samplerinfo>.pointObj : point3

<maya_samplerinfo>.pointWorld : point3

<maya_samplerinfo>.normalCamera : point3

<maya_samplerinfo>.uvCoord : point3

<maya_samplerinfo>.rayDirection : point3

<maya_samplerinfo>.tangentUCamera : point3

<maya_samplerinfo>.tangentVCamera : point3

<maya_samplerinfo>.pixelCenter : point3

<maya_samplerinfo>.flippedNormal : boolean

<maya_samplerinfo>.facingRatio : float

<maya_samplerinfo>.resultSpace_connected : boolean

<maya_samplerinfo>.resultSpace_shader : texturemap

<maya_samplerinfo>.resultSpace_paramName : string

<maya_samplerinfo>.ignoreBits_connected : boolean

<maya_samplerinfo>.ignoreBits_shader : texturemap

<maya_samplerinfo>.ignoreBits_paramName : string

<maya_samplerinfo>.TheList : maxObject array

<maya_samplerinfo>.Shader_Version : integer

maya_samplerinfo interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_scalar_curve : textureMap

maya_scalar_curve : textureMap {7773161f,6f0c4a6b}

Constructor:

maya_scalar_curve: class instances not creatable by MAXScript

Properties:

<maya_scalar_curve>.input : float

<maya_scalar_curve>.curve : texturemap

<maya_scalar_curve>.Structure : paramBlock2

<maya_scalar_curve>.output : float

<maya_scalar_curve>.input_connected : boolean

<maya_scalar_curve>.input_shader : texturemap

<maya_scalar_curve>.input_paramName : string

<maya_scalar_curve>.TheList : maxObject array

<maya_scalar_curve>.Shader_Version : integer

maya_scalar_curve interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_setrange : textureMap

maya_setrange : textureMap {7773161f,b864b738}

Constructor:

maya_setrange: class instances not creatable by MAXScript

Properties:

<maya_setrange>.value : point3

<maya_setrange>.min : point3

<maya_setrange>.max : point3

<maya_setrange>.oldMin : point3

<maya_setrange>.oldMax : point3

<maya_setrange>.Structure : paramBlock2

<maya_setrange>.outValue : point3

<maya_setrange>.value_connected : boolean

<maya_setrange>.value_shader : texturemap

<maya_setrange>.value_paramName : string

<maya_setrange>.min_connected : boolean

<maya_setrange>.min_shader : texturemap

<maya_setrange>.min_paramName : string

<maya_setrange>.max_connected : boolean

<maya_setrange>.max_shader : texturemap

<maya_setrange>.max_paramName : string

<maya_setrange>.oldMin_connected : boolean

<maya_setrange>.oldMin_shader : texturemap

<maya_setrange>.oldMin_paramName : string

<maya_setrange>.oldMax_connected : boolean

<maya_setrange>.oldMax_shader : texturemap

<maya_setrange>.oldMax_paramName : string

<maya_setrange>.TheList : maxObject array

<maya_setrange>.Shader_Version : integer

maya_setrange interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_shaderglow : textureMap

maya_shaderglow : textureMap {7773161f,ad065c4d}

Constructor:

maya_shaderglow: class instances not creatable by MAXScript

Properties:

<maya_shaderglow>.glowType : integer

<maya_shaderglow>.haloType : integer

<maya_shaderglow>.glowIntensity : float

<maya_shaderglow>.glowColor : fRGBA color

<maya_shaderglow>.glowSpread : float

<maya_shaderglow>.glowEccentricity : float

<maya_shaderglow>.glowRadialNoise : float

<maya_shaderglow>.glowStarLevel : float

<maya_shaderglow>.glowOpacity : float

<maya_shaderglow>.glowRingIntensity : float

<maya_shaderglow>.glowRingFrequency : float

<maya_shaderglow>.glowFilterWidth : integer

<maya_shaderglow>.haloIntensity : float

<maya_shaderglow>.haloColor : fRGBA color

<maya_shaderglow>.haloSpread : float

<maya_shaderglow>.haloEccentricity : float

<maya_shaderglow>.haloRadialNoise : float

<maya_shaderglow>.haloStarLevel : float

<maya_shaderglow>.haloOpacity : float

<maya_shaderglow>.haloRingIntensity : float

<maya_shaderglow>.haloRingFrequency : float

<maya_shaderglow>.haloFilterWidth : integer

<maya_shaderglow>.quality : float

<maya_shaderglow>.threshold : float

<maya_shaderglow>.radialFrequency : float

<maya_shaderglow>.starPoints : float

<maya_shaderglow>.rotation : float

<maya_shaderglow>.autoExposure : boolean

<maya_shaderglow>.glowColorBuffer : integer

<maya_shaderglow>.glowType_connected : boolean

<maya_shaderglow>.glowType_shader : texturemap

<maya_shaderglow>.glowType_paramName : string

<maya_shaderglow>.haloType_connected : boolean

<maya_shaderglow>.haloType_shader : texturemap

<maya_shaderglow>.haloType_paramName : string

<maya_shaderglow>.glowIntensity_connected : boolean

<maya_shaderglow>.glowIntensity_shader : texturemap

<maya_shaderglow>.glowIntensity_paramName : string

<maya_shaderglow>.glowColor_connected : boolean

<maya_shaderglow>.glowColor_shader : texturemap

<maya_shaderglow>.glowColor_paramName : string

<maya_shaderglow>.glowSpread_connected : boolean

<maya_shaderglow>.glowSpread_shader : texturemap

<maya_shaderglow>.glowSpread_paramName : string

<maya_shaderglow>.glowEccentricity_connected : boolean

<maya_shaderglow>.glowEccentricity_shader : texturemap

<maya_shaderglow>.glowEccentricity_paramName : string

<maya_shaderglow>.glowRadialNoise_connected : boolean

<maya_shaderglow>.glowRadialNoise_shader : texturemap

<maya_shaderglow>.glowRadialNoise_paramName : string

<maya_shaderglow>.glowStarLevel_connected : boolean

<maya_shaderglow>.glowStarLevel_shader : texturemap

<maya_shaderglow>.glowStarLevel_paramName : string

<maya_shaderglow>.glowOpacity_connected : boolean

<maya_shaderglow>.glowOpacity_shader : texturemap

<maya_shaderglow>.glowOpacity_paramName : string

<maya_shaderglow>.glowRingIntensity_connected : boolean

<maya_shaderglow>.glowRingIntensity_shader : texturemap

<maya_shaderglow>.glowRingIntensity_paramName : string

<maya_shaderglow>.glowRingFrequency_connected : boolean

<maya_shaderglow>.glowRingFrequency_shader : texturemap

<maya_shaderglow>.glowRingFrequency_paramName : string

<maya_shaderglow>.glowFilterWidth_connected : boolean

<maya_shaderglow>.glowFilterWidth_shader : texturemap

<maya_shaderglow>.glowFilterWidth_paramName : string

<maya_shaderglow>.haloIntensity_connected : boolean

<maya_shaderglow>.haloIntensity_shader : texturemap

<maya_shaderglow>.haloIntensity_paramName : string

<maya_shaderglow>.haloColor_connected : boolean

<maya_shaderglow>.haloColor_shader : texturemap

<maya_shaderglow>.haloColor_paramName : string

<maya_shaderglow>.haloSpread_connected : boolean

<maya_shaderglow>.haloSpread_shader : texturemap

<maya_shaderglow>.haloSpread_paramName : string

<maya_shaderglow>.haloEccentricity_connected : boolean

<maya_shaderglow>.haloEccentricity_shader : texturemap

<maya_shaderglow>.haloEccentricity_paramName : string

<maya_shaderglow>.haloRadialNoise_connected : boolean

<maya_shaderglow>.haloRadialNoise_shader : texturemap

<maya_shaderglow>.haloRadialNoise_paramName : string

<maya_shaderglow>.haloStarLevel_connected : boolean

<maya_shaderglow>.haloStarLevel_shader : texturemap

<maya_shaderglow>.haloStarLevel_paramName : string

<maya_shaderglow>.haloOpacity_connected : boolean

<maya_shaderglow>.haloOpacity_shader : texturemap

<maya_shaderglow>.haloOpacity_paramName : string

<maya_shaderglow>.haloRingIntensity_connected : boolean

<maya_shaderglow>.haloRingIntensity_shader : texturemap

<maya_shaderglow>.haloRingIntensity_paramName : string

<maya_shaderglow>.haloRingFrequency_connected : boolean

<maya_shaderglow>.haloRingFrequency_shader : texturemap

<maya_shaderglow>.haloRingFrequency_paramName : string

<maya_shaderglow>.haloFilterWidth_connected : boolean

<maya_shaderglow>.haloFilterWidth_shader : texturemap

<maya_shaderglow>.haloFilterWidth_paramName : string

<maya_shaderglow>.quality_connected : boolean

<maya_shaderglow>.quality_shader : texturemap

<maya_shaderglow>.quality_paramName : string

<maya_shaderglow>.threshold_connected : boolean

<maya_shaderglow>.threshold_shader : texturemap

<maya_shaderglow>.threshold_paramName : string

<maya_shaderglow>.radialFrequency_connected : boolean

<maya_shaderglow>.radialFrequency_shader : texturemap

<maya_shaderglow>.radialFrequency_paramName : string

<maya_shaderglow>.starPoints_connected : boolean

<maya_shaderglow>.starPoints_shader : texturemap

<maya_shaderglow>.starPoints_paramName : string

<maya_shaderglow>.rotation_connected : boolean

<maya_shaderglow>.rotation_shader : texturemap

<maya_shaderglow>.rotation_paramName : string

<maya_shaderglow>.autoExposure_connected : boolean

<maya_shaderglow>.autoExposure_shader : texturemap

<maya_shaderglow>.autoExposure_paramName : string

<maya_shaderglow>.glowColorBuffer_connected : boolean

<maya_shaderglow>.glowColorBuffer_shader : texturemap

<maya_shaderglow>.glowColorBuffer_paramName : string

<maya_shaderglow>.TheList : maxObject array

<maya_shaderglow>.Shader_Version : integer

maya_shaderglow interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_shadingengine : textureMap

maya_shadingengine : textureMap {7773161f,540ab470}

Constructor:

maya_shadingengine: class instances not creatable by MAXScript

Properties:

<maya_shadingengine>.surfaceShader : fRGBA color

<maya_shadingengine>.cutAwayOpacity : float

<maya_shadingengine>.alphaMode : integer

<maya_shadingengine>.surfaceShader_connected : boolean

<maya_shadingengine>.surfaceShader_shader : texturemap

<maya_shadingengine>.surfaceShader_paramName : string

<maya_shadingengine>.cutAwayOpacity_connected : boolean

<maya_shadingengine>.cutAwayOpacity_shader : texturemap

<maya_shadingengine>.cutAwayOpacity_paramName : string

<maya_shadingengine>.alphaMode_connected : boolean

<maya_shadingengine>.alphaMode_shader : texturemap

<maya_shadingengine>.alphaMode_paramName : string

<maya_shadingengine>.TheList : maxObject array

<maya_shadingengine>.Shader_Version : integer

maya_shadingengine interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_shadingmap : textureMap

maya_shadingmap : textureMap {7773161f,ad015e4e}

Constructor:

maya_shadingmap: class instances not creatable by MAXScript

Properties:

<maya_shadingmap>.color : fRGBA color

<maya_shadingmap>.shadingMapColor : fRGBA color

<maya_shadingmap>.glowColor : fRGBA color

<maya_shadingmap>.transparency : fRGBA color

<maya_shadingmap>.matteOpacityMode : integer

<maya_shadingmap>.matteOpacity : float

<maya_shadingmap>.mapFunctionU : integer

<maya_shadingmap>.mapFunctionV : integer

<maya_shadingmap>.Structure : paramBlock2

<maya_shadingmap>.outColor : fRGBA color

<maya_shadingmap>.outGlowColor : fRGBA color

<maya_shadingmap>.outMatteOpacity : fRGBA color

<maya_shadingmap>.outTransparency : fRGBA color

<maya_shadingmap>.outAmbient : fRGBA color

<maya_shadingmap>.outIncandescence : fRGBA color

<maya_shadingmap>.outIrradiance : fRGBA color

<maya_shadingmap>.outDiffuseShadowed : fRGBA color

<maya_shadingmap>.outDiffuseNoShadow : fRGBA color

<maya_shadingmap>.outShadow : fRGBA color

<maya_shadingmap>.outSpecularShadowed : fRGBA color

<maya_shadingmap>.outSpecularNoShadow : fRGBA color

<maya_shadingmap>.outReflection : fRGBA color

<maya_shadingmap>.outRefraction : fRGBA color

<maya_shadingmap>.outScatter : fRGBA color

<maya_shadingmap>.outOpacity : fRGBA color

<maya_shadingmap>.color_connected : boolean

<maya_shadingmap>.color_shader : texturemap

<maya_shadingmap>.color_paramName : string

<maya_shadingmap>.shadingMapColor_connected : boolean

<maya_shadingmap>.shadingMapColor_shader : texturemap

<maya_shadingmap>.shadingMapColor_paramName : string

<maya_shadingmap>.glowColor_connected : boolean

<maya_shadingmap>.glowColor_shader : texturemap

<maya_shadingmap>.glowColor_paramName : string

<maya_shadingmap>.transparency_connected : boolean

<maya_shadingmap>.transparency_shader : texturemap

<maya_shadingmap>.transparency_paramName : string

<maya_shadingmap>.matteOpacityMode_connected : boolean

<maya_shadingmap>.matteOpacityMode_shader : texturemap

<maya_shadingmap>.matteOpacityMode_paramName : string

<maya_shadingmap>.matteOpacity_connected : boolean

<maya_shadingmap>.matteOpacity_shader : texturemap

<maya_shadingmap>.matteOpacity_paramName : string

<maya_shadingmap>.mapFunctionU_connected : boolean

<maya_shadingmap>.mapFunctionU_shader : texturemap

<maya_shadingmap>.mapFunctionU_paramName : string

<maya_shadingmap>.mapFunctionV_connected : boolean

<maya_shadingmap>.mapFunctionV_shader : texturemap

<maya_shadingmap>.mapFunctionV_paramName : string

<maya_shadingmap>.TheList : maxObject array

<maya_shadingmap>.Shader_Version : integer

maya_shadingmap interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_shadow : textureMap

maya_shadow : textureMap {7773161f,4658c169}

Constructor:

maya_shadow: class instances not creatable by MAXScript

Properties:

<maya_shadow>.transparency : fRGBA color

<maya_shadow>.shadowAttenuation : float

<maya_shadow>.translucenceDepth : float

<maya_shadow>.transparency_connected : boolean

<maya_shadow>.transparency_shader : texturemap

<maya_shadow>.transparency_paramName : string

<maya_shadow>.shadowAttenuation_connected : boolean

<maya_shadow>.shadowAttenuation_shader : texturemap

<maya_shadow>.shadowAttenuation_paramName : string

<maya_shadow>.translucenceDepth_connected : boolean

<maya_shadow>.translucenceDepth_shader : texturemap

<maya_shadow>.translucenceDepth_paramName : string

<maya_shadow>.TheList : maxObject array

<maya_shadow>.Shader_Version : integer

maya_shadow interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_shapelight : textureMap

maya_shapelight : textureMap {7773161f,aefb6338}

Constructor:

maya_shapelight: class instances not creatable by MAXScript

Properties:

<maya_shapelight>.shapeIntensity : float

<maya_shapelight>.decayRate : integer

<maya_shapelight>.useDepthMapShadows : boolean

<maya_shapelight>.emitDiffuse : boolean

<maya_shapelight>.emitSpecular : boolean

<maya_shapelight>.color : fRGBA color

<maya_shapelight>.intensity : float

<maya_shapelight>.useRayTraceShadows : boolean

<maya_shapelight>.shadowColor : fRGBA color

<maya_shapelight>.shadowRays : integer

<maya_shapelight>.rayDepthLimit : integer

<maya_shapelight>.shapeIntensity_connected : boolean

<maya_shapelight>.shapeIntensity_shader : texturemap

<maya_shapelight>.shapeIntensity_paramName : string

<maya_shapelight>.decayRate_connected : boolean

<maya_shapelight>.decayRate_shader : texturemap

<maya_shapelight>.decayRate_paramName : string

<maya_shapelight>.useDepthMapShadows_connected : boolean

<maya_shapelight>.useDepthMapShadows_shader : texturemap

<maya_shapelight>.useDepthMapShadows_paramName : string

<maya_shapelight>.emitDiffuse_connected : boolean

<maya_shapelight>.emitDiffuse_shader : texturemap

<maya_shapelight>.emitDiffuse_paramName : string

<maya_shapelight>.emitSpecular_connected : boolean

<maya_shapelight>.emitSpecular_shader : texturemap

<maya_shapelight>.emitSpecular_paramName : string

<maya_shapelight>.color_connected : boolean

<maya_shapelight>.color_shader : texturemap

<maya_shapelight>.color_paramName : string

<maya_shapelight>.intensity_connected : boolean

<maya_shapelight>.intensity_shader : texturemap

<maya_shapelight>.intensity_paramName : string

<maya_shapelight>.useRayTraceShadows_connected : boolean

<maya_shapelight>.useRayTraceShadows_shader : texturemap

<maya_shapelight>.useRayTraceShadows_paramName : string

<maya_shapelight>.shadowColor_connected : boolean

<maya_shapelight>.shadowColor_shader : texturemap

<maya_shapelight>.shadowColor_paramName : string

<maya_shapelight>.shadowRays_connected : boolean

<maya_shapelight>.shadowRays_shader : texturemap

<maya_shapelight>.shadowRays_paramName : string

<maya_shapelight>.rayDepthLimit_connected : boolean

<maya_shapelight>.rayDepthLimit_shader : texturemap

<maya_shapelight>.rayDepthLimit_paramName : string

<maya_shapelight>.TheList : maxObject array

<maya_shapelight>.Shader_Version : integer

maya_shapelight interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_singleswitch : textureMap

maya_singleswitch : textureMap {7773161f,64f35b5d}

Constructor:

maya_singleswitch: class instances not creatable by MAXScript

Properties:

<maya_singleswitch>.default : float

<maya_singleswitch>.input : paramBlock2 array

<maya_singleswitch>.inShape : node

<maya_singleswitch>.inSingle : float

<maya_singleswitch>.Structure : paramBlock2

<maya_singleswitch>.output : float

<maya_singleswitch>.default_connected : boolean

<maya_singleswitch>.default_shader : texturemap

<maya_singleswitch>.default_paramName : string

<maya_singleswitch>.TheList : maxObject array

<maya_singleswitch>.Shader_Version : integer

maya_singleswitch interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_snow : textureMap

maya_snow : textureMap {7773161f,54095658}

Constructor:

maya_snow: class instances not creatable by MAXScript

Properties:

<maya_snow>.snowColor : fRGBA color

<maya_snow>.surfaceColor : fRGBA color

<maya_snow>.threshold : float

<maya_snow>.depthDecay : float

<maya_snow>.thickness : float

<maya_snow>.filter : float

<maya_snow>.filterSize : point3

<maya_snow>.filterOffset : float

<maya_snow>.blend : float

<maya_snow>.wrap : boolean

<maya_snow>.invert : boolean

<maya_snow>.alphaIsLuminance : boolean

<maya_snow>.colorGain : fRGBA color

<maya_snow>.colorOffset : fRGBA color

<maya_snow>.alphaGain : float

<maya_snow>.alphaOffset : float

<maya_snow>.defaultColor : fRGBA color

<maya_snow>.normalCamera : point3

<maya_snow>.placementMatrix : matrix3

<maya_snow>.local : boolean

<maya_snow>.Structure : paramBlock2

<maya_snow>.outColor : fRGBA color

<maya_snow>.outAlpha : float

<maya_snow>.snowColor_connected : boolean

<maya_snow>.snowColor_shader : texturemap

<maya_snow>.snowColor_paramName : string

<maya_snow>.surfaceColor_connected : boolean

<maya_snow>.surfaceColor_shader : texturemap

<maya_snow>.surfaceColor_paramName : string

<maya_snow>.threshold_connected : boolean

<maya_snow>.threshold_shader : texturemap

<maya_snow>.threshold_paramName : string

<maya_snow>.depthDecay_connected : boolean

<maya_snow>.depthDecay_shader : texturemap

<maya_snow>.depthDecay_paramName : string

<maya_snow>.thickness_connected : boolean

<maya_snow>.thickness_shader : texturemap

<maya_snow>.thickness_paramName : string

<maya_snow>.filter_connected : boolean

<maya_snow>.filter_shader : texturemap

<maya_snow>.filter_paramName : string

<maya_snow>.filterSize_connected : boolean

<maya_snow>.filterSize_shader : texturemap

<maya_snow>.filterSize_paramName : string

<maya_snow>.filterOffset_connected : boolean

<maya_snow>.filterOffset_shader : texturemap

<maya_snow>.filterOffset_paramName : string

<maya_snow>.blend_connected : boolean

<maya_snow>.blend_shader : texturemap

<maya_snow>.blend_paramName : string

<maya_snow>.wrap_connected : boolean

<maya_snow>.wrap_shader : texturemap

<maya_snow>.wrap_paramName : string

<maya_snow>.invert_connected : boolean

<maya_snow>.invert_shader : texturemap

<maya_snow>.invert_paramName : string

<maya_snow>.alphaIsLuminance_connected : boolean

<maya_snow>.alphaIsLuminance_shader : texturemap

<maya_snow>.alphaIsLuminance_paramName : string

<maya_snow>.colorGain_connected : boolean

<maya_snow>.colorGain_shader : texturemap

<maya_snow>.colorGain_paramName : string

<maya_snow>.colorOffset_connected : boolean

<maya_snow>.colorOffset_shader : texturemap

<maya_snow>.colorOffset_paramName : string

<maya_snow>.alphaGain_connected : boolean

<maya_snow>.alphaGain_shader : texturemap

<maya_snow>.alphaGain_paramName : string

<maya_snow>.alphaOffset_connected : boolean

<maya_snow>.alphaOffset_shader : texturemap

<maya_snow>.alphaOffset_paramName : string

<maya_snow>.defaultColor_connected : boolean

<maya_snow>.defaultColor_shader : texturemap

<maya_snow>.defaultColor_paramName : string

<maya_snow>.normalCamera_connected : boolean

<maya_snow>.normalCamera_shader : texturemap

<maya_snow>.normalCamera_paramName : string

<maya_snow>.placementMatrix_connected : boolean

<maya_snow>.placementMatrix_shader : texturemap

<maya_snow>.placementMatrix_paramName : string

<maya_snow>.local_connected : boolean

<maya_snow>.local_shader : texturemap

<maya_snow>.local_paramName : string

<maya_snow>.TheList : maxObject array

<maya_snow>.Shader_Version : integer

maya_snow interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_solidfractal : textureMap

maya_solidfractal : textureMap {7773161f,63f65969}

Constructor:

maya_solidfractal: class instances not creatable by MAXScript

Properties:

<maya_solidfractal>.amplitude : float

<maya_solidfractal>.ratio : float

<maya_solidfractal>.threshold : float

<maya_solidfractal>.ripples : point3

<maya_solidfractal>.depth : point3

<maya_solidfractal>.filter : float

<maya_solidfractal>.filterSize : point3

<maya_solidfractal>.filterOffset : float

<maya_solidfractal>.blend : float

<maya_solidfractal>.wrap : boolean

<maya_solidfractal>.invert : boolean

<maya_solidfractal>.alphaIsLuminance : boolean

<maya_solidfractal>.colorGain : fRGBA color

<maya_solidfractal>.colorOffset : fRGBA color

<maya_solidfractal>.alphaGain : float

<maya_solidfractal>.alphaOffset : float

<maya_solidfractal>.defaultColor : fRGBA color

<maya_solidfractal>.placementMatrix : matrix3

<maya_solidfractal>.local : boolean

<maya_solidfractal>.frequencyRatio : float

<maya_solidfractal>.bias : float

<maya_solidfractal>.inflection : boolean

<maya_solidfractal>.animated : boolean

<maya_solidfractal>.timeRatio : float

<maya_solidfractal>.time : float

<maya_solidfractal>.Structure : paramBlock2

<maya_solidfractal>.outColor : fRGBA color

<maya_solidfractal>.outAlpha : float

<maya_solidfractal>.amplitude_connected : boolean

<maya_solidfractal>.amplitude_shader : texturemap

<maya_solidfractal>.amplitude_paramName : string

<maya_solidfractal>.ratio_connected : boolean

<maya_solidfractal>.ratio_shader : texturemap

<maya_solidfractal>.ratio_paramName : string

<maya_solidfractal>.threshold_connected : boolean

<maya_solidfractal>.threshold_shader : texturemap

<maya_solidfractal>.threshold_paramName : string

<maya_solidfractal>.ripples_connected : boolean

<maya_solidfractal>.ripples_shader : texturemap

<maya_solidfractal>.ripples_paramName : string

<maya_solidfractal>.depth_connected : boolean

<maya_solidfractal>.depth_shader : texturemap

<maya_solidfractal>.depth_paramName : string

<maya_solidfractal>.filter_connected : boolean

<maya_solidfractal>.filter_shader : texturemap

<maya_solidfractal>.filter_paramName : string

<maya_solidfractal>.filterSize_connected : boolean

<maya_solidfractal>.filterSize_shader : texturemap

<maya_solidfractal>.filterSize_paramName : string

<maya_solidfractal>.filterOffset_connected : boolean

<maya_solidfractal>.filterOffset_shader : texturemap

<maya_solidfractal>.filterOffset_paramName : string

<maya_solidfractal>.blend_connected : boolean

<maya_solidfractal>.blend_shader : texturemap

<maya_solidfractal>.blend_paramName : string

<maya_solidfractal>.wrap_connected : boolean

<maya_solidfractal>.wrap_shader : texturemap

<maya_solidfractal>.wrap_paramName : string

<maya_solidfractal>.invert_connected : boolean

<maya_solidfractal>.invert_shader : texturemap

<maya_solidfractal>.invert_paramName : string

<maya_solidfractal>.alphaIsLuminance_connected : boolean

<maya_solidfractal>.alphaIsLuminance_shader : texturemap

<maya_solidfractal>.alphaIsLuminance_paramName : string

<maya_solidfractal>.colorGain_connected : boolean

<maya_solidfractal>.colorGain_shader : texturemap

<maya_solidfractal>.colorGain_paramName : string

<maya_solidfractal>.colorOffset_connected : boolean

<maya_solidfractal>.colorOffset_shader : texturemap

<maya_solidfractal>.colorOffset_paramName : string

<maya_solidfractal>.alphaGain_connected : boolean

<maya_solidfractal>.alphaGain_shader : texturemap

<maya_solidfractal>.alphaGain_paramName : string

<maya_solidfractal>.alphaOffset_connected : boolean

<maya_solidfractal>.alphaOffset_shader : texturemap

<maya_solidfractal>.alphaOffset_paramName : string

<maya_solidfractal>.defaultColor_connected : boolean

<maya_solidfractal>.defaultColor_shader : texturemap

<maya_solidfractal>.defaultColor_paramName : string

<maya_solidfractal>.placementMatrix_connected : boolean

<maya_solidfractal>.placementMatrix_shader : texturemap

<maya_solidfractal>.placementMatrix_paramName : string

<maya_solidfractal>.local_connected : boolean

<maya_solidfractal>.local_shader : texturemap

<maya_solidfractal>.local_paramName : string

<maya_solidfractal>.frequencyRatio_connected : boolean

<maya_solidfractal>.frequencyRatio_shader : texturemap

<maya_solidfractal>.frequencyRatio_paramName : string

<maya_solidfractal>.bias_connected : boolean

<maya_solidfractal>.bias_shader : texturemap

<maya_solidfractal>.bias_paramName : string

<maya_solidfractal>.inflection_connected : boolean

<maya_solidfractal>.inflection_shader : texturemap

<maya_solidfractal>.inflection_paramName : string

<maya_solidfractal>.animated_connected : boolean

<maya_solidfractal>.animated_shader : texturemap

<maya_solidfractal>.animated_paramName : string

<maya_solidfractal>.timeRatio_connected : boolean

<maya_solidfractal>.timeRatio_shader : texturemap

<maya_solidfractal>.timeRatio_paramName : string

<maya_solidfractal>.time_connected : boolean

<maya_solidfractal>.time_shader : texturemap

<maya_solidfractal>.time_paramName : string

<maya_solidfractal>.TheList : maxObject array

<maya_solidfractal>.Shader_Version : integer

maya_solidfractal interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_sphere : textureMap

maya_sphere : textureMap {7773161f,4f5ea46a}

Constructor:

maya_sphere: class instances not creatable by MAXScript

Properties:

<maya_sphere>.radius : float

<maya_sphere>.uSpans : integer

<maya_sphere>.vSpans : integer

<maya_sphere>.renderableObjectType : integer

<maya_sphere>.volumeSamplesOverride : boolean

<maya_sphere>.volumeSamples : integer

<maya_sphere>.depthJitter : boolean

<maya_sphere>.radius_connected : boolean

<maya_sphere>.radius_shader : texturemap

<maya_sphere>.radius_paramName : string

<maya_sphere>.uSpans_connected : boolean

<maya_sphere>.uSpans_shader : texturemap

<maya_sphere>.uSpans_paramName : string

<maya_sphere>.vSpans_connected : boolean

<maya_sphere>.vSpans_shader : texturemap

<maya_sphere>.vSpans_paramName : string

<maya_sphere>.renderableObjectType_connected : boolean

<maya_sphere>.renderableObjectType_shader : texturemap

<maya_sphere>.renderableObjectType_paramName : string

<maya_sphere>.volumeSamplesOverride_connected : boolean

<maya_sphere>.volumeSamplesOverride_shader : texturemap

<maya_sphere>.volumeSamplesOverride_paramName : string

<maya_sphere>.volumeSamples_connected : boolean

<maya_sphere>.volumeSamples_shader : texturemap

<maya_sphere>.volumeSamples_paramName : string

<maya_sphere>.depthJitter_connected : boolean

<maya_sphere>.depthJitter_shader : texturemap

<maya_sphere>.depthJitter_paramName : string

<maya_sphere>.TheList : maxObject array

<maya_sphere>.Shader_Version : integer

maya_sphere interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_spotlight : textureMap

maya_spotlight : textureMap {7773161f,af524e41}

Constructor:

maya_spotlight: class instances not creatable by MAXScript

Properties:

<maya_spotlight>.coneAngle : float

<maya_spotlight>.penumbraAngle : float

<maya_spotlight>.dropoff : float

<maya_spotlight>.barnDoors : boolean

<maya_spotlight>.leftBarnDoor : float

<maya_spotlight>.rightBarnDoor : float

<maya_spotlight>.topBarnDoor : float

<maya_spotlight>.bottomBarnDoor : float

<maya_spotlight>.useDecayRegions : boolean

<maya_spotlight>.startDistance1 : float

<maya_spotlight>.endDistance1 : float

<maya_spotlight>.startDistance2 : float

<maya_spotlight>.endDistance2 : float

<maya_spotlight>.startDistance3 : float

<maya_spotlight>.endDistance3 : float

<maya_spotlight>.lightRadius : float

<maya_spotlight>.decayRate : integer

<maya_spotlight>.useDepthMapShadows : boolean

<maya_spotlight>.emitDiffuse : boolean

<maya_spotlight>.emitSpecular : boolean

<maya_spotlight>.color : fRGBA color

<maya_spotlight>.intensity : float

<maya_spotlight>.useRayTraceShadows : boolean

<maya_spotlight>.shadowColor : fRGBA color

<maya_spotlight>.shadowRays : integer

<maya_spotlight>.rayDepthLimit : integer

<maya_spotlight>.fogSpread : float

<maya_spotlight>.fogIntensity : float

<maya_spotlight>.coneAngle_connected : boolean

<maya_spotlight>.coneAngle_shader : texturemap

<maya_spotlight>.coneAngle_paramName : string

<maya_spotlight>.penumbraAngle_connected : boolean

<maya_spotlight>.penumbraAngle_shader : texturemap

<maya_spotlight>.penumbraAngle_paramName : string

<maya_spotlight>.dropoff_connected : boolean

<maya_spotlight>.dropoff_shader : texturemap

<maya_spotlight>.dropoff_paramName : string

<maya_spotlight>.barnDoors_connected : boolean

<maya_spotlight>.barnDoors_shader : texturemap

<maya_spotlight>.barnDoors_paramName : string

<maya_spotlight>.leftBarnDoor_connected : boolean

<maya_spotlight>.leftBarnDoor_shader : texturemap

<maya_spotlight>.leftBarnDoor_paramName : string

<maya_spotlight>.rightBarnDoor_connected : boolean

<maya_spotlight>.rightBarnDoor_shader : texturemap

<maya_spotlight>.rightBarnDoor_paramName : string

<maya_spotlight>.topBarnDoor_connected : boolean

<maya_spotlight>.topBarnDoor_shader : texturemap

<maya_spotlight>.topBarnDoor_paramName : string

<maya_spotlight>.bottomBarnDoor_connected : boolean

<maya_spotlight>.bottomBarnDoor_shader : texturemap

<maya_spotlight>.bottomBarnDoor_paramName : string

<maya_spotlight>.useDecayRegions_connected : boolean

<maya_spotlight>.useDecayRegions_shader : texturemap

<maya_spotlight>.useDecayRegions_paramName : string

<maya_spotlight>.startDistance1_connected : boolean

<maya_spotlight>.startDistance1_shader : texturemap

<maya_spotlight>.startDistance1_paramName : string

<maya_spotlight>.endDistance1_connected : boolean

<maya_spotlight>.endDistance1_shader : texturemap

<maya_spotlight>.endDistance1_paramName : string

<maya_spotlight>.startDistance2_connected : boolean

<maya_spotlight>.startDistance2_shader : texturemap

<maya_spotlight>.startDistance2_paramName : string

<maya_spotlight>.endDistance2_connected : boolean

<maya_spotlight>.endDistance2_shader : texturemap

<maya_spotlight>.endDistance2_paramName : string

<maya_spotlight>.startDistance3_connected : boolean

<maya_spotlight>.startDistance3_shader : texturemap

<maya_spotlight>.startDistance3_paramName : string

<maya_spotlight>.endDistance3_connected : boolean

<maya_spotlight>.endDistance3_shader : texturemap

<maya_spotlight>.endDistance3_paramName : string

<maya_spotlight>.lightRadius_connected : boolean

<maya_spotlight>.lightRadius_shader : texturemap

<maya_spotlight>.lightRadius_paramName : string

<maya_spotlight>.decayRate_connected : boolean

<maya_spotlight>.decayRate_shader : texturemap

<maya_spotlight>.decayRate_paramName : string

<maya_spotlight>.useDepthMapShadows_connected : boolean

<maya_spotlight>.useDepthMapShadows_shader : texturemap

<maya_spotlight>.useDepthMapShadows_paramName : string

<maya_spotlight>.emitDiffuse_connected : boolean

<maya_spotlight>.emitDiffuse_shader : texturemap

<maya_spotlight>.emitDiffuse_paramName : string

<maya_spotlight>.emitSpecular_connected : boolean

<maya_spotlight>.emitSpecular_shader : texturemap

<maya_spotlight>.emitSpecular_paramName : string

<maya_spotlight>.color_connected : boolean

<maya_spotlight>.color_shader : texturemap

<maya_spotlight>.color_paramName : string

<maya_spotlight>.intensity_connected : boolean

<maya_spotlight>.intensity_shader : texturemap

<maya_spotlight>.intensity_paramName : string

<maya_spotlight>.useRayTraceShadows_connected : boolean

<maya_spotlight>.useRayTraceShadows_shader : texturemap

<maya_spotlight>.useRayTraceShadows_paramName : string

<maya_spotlight>.shadowColor_connected : boolean

<maya_spotlight>.shadowColor_shader : texturemap

<maya_spotlight>.shadowColor_paramName : string

<maya_spotlight>.shadowRays_connected : boolean

<maya_spotlight>.shadowRays_shader : texturemap

<maya_spotlight>.shadowRays_paramName : string

<maya_spotlight>.rayDepthLimit_connected : boolean

<maya_spotlight>.rayDepthLimit_shader : texturemap

<maya_spotlight>.rayDepthLimit_paramName : string

<maya_spotlight>.fogSpread_connected : boolean

<maya_spotlight>.fogSpread_shader : texturemap

<maya_spotlight>.fogSpread_paramName : string

<maya_spotlight>.fogIntensity_connected : boolean

<maya_spotlight>.fogIntensity_shader : texturemap

<maya_spotlight>.fogIntensity_paramName : string

<maya_spotlight>.TheList : maxObject array

<maya_spotlight>.Shader_Version : integer

maya_spotlight interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_state : textureMap

maya_state : textureMap {7773161f,45ffbb59}

Constructor:

maya_state: class instances not creatable by MAXScript

Properties:

<maya_state>.passAlphaThrough : boolean

<maya_state>.passLabelThrough : boolean

<maya_state>.passDepthThrough : boolean

<maya_state>.glowColorBuffer : integer

<maya_state>.passAlphaThrough_connected : boolean

<maya_state>.passAlphaThrough_shader : texturemap

<maya_state>.passAlphaThrough_paramName : string

<maya_state>.passLabelThrough_connected : boolean

<maya_state>.passLabelThrough_shader : texturemap

<maya_state>.passLabelThrough_paramName : string

<maya_state>.passDepthThrough_connected : boolean

<maya_state>.passDepthThrough_shader : texturemap

<maya_state>.passDepthThrough_paramName : string

<maya_state>.glowColorBuffer_connected : boolean

<maya_state>.glowColorBuffer_shader : texturemap

<maya_state>.glowColorBuffer_paramName : string

<maya_state>.TheList : maxObject array

<maya_state>.Shader_Version : integer

maya_state interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_stencil : textureMap

maya_stencil : textureMap {7773161f,ae56b56f}

Constructor:

maya_stencil: class instances not creatable by MAXScript

Properties:

<maya_stencil>.image : fRGBA color

<maya_stencil>.mask : float

<maya_stencil>.edgeBlend : float

<maya_stencil>.keyMasking : boolean

<maya_stencil>.positiveKey : boolean

<maya_stencil>.colorKey : fRGBA color

<maya_stencil>.hueRange : float

<maya_stencil>.saturationRange : float

<maya_stencil>.valueRange : float

<maya_stencil>.threshold : float

<maya_stencil>.uvCoord : point3

<maya_stencil>.uvFilterSize : point3

<maya_stencil>.filter : float

<maya_stencil>.filterOffset : float

<maya_stencil>.invert : boolean

<maya_stencil>.alphaIsLuminance : boolean

<maya_stencil>.colorGain : fRGBA color

<maya_stencil>.colorOffset : fRGBA color

<maya_stencil>.alphaGain : float

<maya_stencil>.alphaOffset : float

<maya_stencil>.defaultColor : fRGBA color

<maya_stencil>.Structure : paramBlock2

<maya_stencil>.outColor : fRGBA color

<maya_stencil>.outAlpha : float

<maya_stencil>.image_connected : boolean

<maya_stencil>.image_shader : texturemap

<maya_stencil>.image_paramName : string

<maya_stencil>.mask_connected : boolean

<maya_stencil>.mask_shader : texturemap

<maya_stencil>.mask_paramName : string

<maya_stencil>.edgeBlend_connected : boolean

<maya_stencil>.edgeBlend_shader : texturemap

<maya_stencil>.edgeBlend_paramName : string

<maya_stencil>.keyMasking_connected : boolean

<maya_stencil>.keyMasking_shader : texturemap

<maya_stencil>.keyMasking_paramName : string

<maya_stencil>.positiveKey_connected : boolean

<maya_stencil>.positiveKey_shader : texturemap

<maya_stencil>.positiveKey_paramName : string

<maya_stencil>.colorKey_connected : boolean

<maya_stencil>.colorKey_shader : texturemap

<maya_stencil>.colorKey_paramName : string

<maya_stencil>.hueRange_connected : boolean

<maya_stencil>.hueRange_shader : texturemap

<maya_stencil>.hueRange_paramName : string

<maya_stencil>.saturationRange_connected : boolean

<maya_stencil>.saturationRange_shader : texturemap

<maya_stencil>.saturationRange_paramName : string

<maya_stencil>.valueRange_connected : boolean

<maya_stencil>.valueRange_shader : texturemap

<maya_stencil>.valueRange_paramName : string

<maya_stencil>.threshold_connected : boolean

<maya_stencil>.threshold_shader : texturemap

<maya_stencil>.threshold_paramName : string

<maya_stencil>.uvCoord_connected : boolean

<maya_stencil>.uvCoord_shader : texturemap

<maya_stencil>.uvCoord_paramName : string

<maya_stencil>.uvFilterSize_connected : boolean

<maya_stencil>.uvFilterSize_shader : texturemap

<maya_stencil>.uvFilterSize_paramName : string

<maya_stencil>.filter_connected : boolean

<maya_stencil>.filter_shader : texturemap

<maya_stencil>.filter_paramName : string

<maya_stencil>.filterOffset_connected : boolean

<maya_stencil>.filterOffset_shader : texturemap

<maya_stencil>.filterOffset_paramName : string

<maya_stencil>.invert_connected : boolean

<maya_stencil>.invert_shader : texturemap

<maya_stencil>.invert_paramName : string

<maya_stencil>.alphaIsLuminance_connected : boolean

<maya_stencil>.alphaIsLuminance_shader : texturemap

<maya_stencil>.alphaIsLuminance_paramName : string

<maya_stencil>.colorGain_connected : boolean

<maya_stencil>.colorGain_shader : texturemap

<maya_stencil>.colorGain_paramName : string

<maya_stencil>.colorOffset_connected : boolean

<maya_stencil>.colorOffset_shader : texturemap

<maya_stencil>.colorOffset_paramName : string

<maya_stencil>.alphaGain_connected : boolean

<maya_stencil>.alphaGain_shader : texturemap

<maya_stencil>.alphaGain_paramName : string

<maya_stencil>.alphaOffset_connected : boolean

<maya_stencil>.alphaOffset_shader : texturemap

<maya_stencil>.alphaOffset_paramName : string

<maya_stencil>.defaultColor_connected : boolean

<maya_stencil>.defaultColor_shader : texturemap

<maya_stencil>.defaultColor_paramName : string

<maya_stencil>.TheList : maxObject array

<maya_stencil>.Shader_Version : integer

maya_stencil interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_stucco : textureMap

maya_stucco : textureMap {7773161f,5a54b564}

Constructor:

maya_stucco: class instances not creatable by MAXScript

Properties:

<maya_stucco>.shaker : float

<maya_stucco>.channel1 : fRGBA color

<maya_stucco>.channel2 : fRGBA color

<maya_stucco>.normalMelt : float

<maya_stucco>.normalDepth : float

<maya_stucco>.filter : float

<maya_stucco>.filterSize : point3

<maya_stucco>.filterOffset : float

<maya_stucco>.blend : float

<maya_stucco>.wrap : boolean

<maya_stucco>.invert : boolean

<maya_stucco>.alphaIsLuminance : boolean

<maya_stucco>.colorGain : fRGBA color

<maya_stucco>.colorOffset : fRGBA color

<maya_stucco>.alphaGain : float

<maya_stucco>.alphaOffset : float

<maya_stucco>.defaultColor : fRGBA color

<maya_stucco>.normalCamera : point3

<maya_stucco>.placementMatrix : matrix3

<maya_stucco>.local : boolean

<maya_stucco>.Structure : paramBlock2

<maya_stucco>.outColor : fRGBA color

<maya_stucco>.outAlpha : float

<maya_stucco>.outNormal : point3

<maya_stucco>.shaker_connected : boolean

<maya_stucco>.shaker_shader : texturemap

<maya_stucco>.shaker_paramName : string

<maya_stucco>.channel1_connected : boolean

<maya_stucco>.channel1_shader : texturemap

<maya_stucco>.channel1_paramName : string

<maya_stucco>.channel2_connected : boolean

<maya_stucco>.channel2_shader : texturemap

<maya_stucco>.channel2_paramName : string

<maya_stucco>.normalMelt_connected : boolean

<maya_stucco>.normalMelt_shader : texturemap

<maya_stucco>.normalMelt_paramName : string

<maya_stucco>.normalDepth_connected : boolean

<maya_stucco>.normalDepth_shader : texturemap

<maya_stucco>.normalDepth_paramName : string

<maya_stucco>.filter_connected : boolean

<maya_stucco>.filter_shader : texturemap

<maya_stucco>.filter_paramName : string

<maya_stucco>.filterSize_connected : boolean

<maya_stucco>.filterSize_shader : texturemap

<maya_stucco>.filterSize_paramName : string

<maya_stucco>.filterOffset_connected : boolean

<maya_stucco>.filterOffset_shader : texturemap

<maya_stucco>.filterOffset_paramName : string

<maya_stucco>.blend_connected : boolean

<maya_stucco>.blend_shader : texturemap

<maya_stucco>.blend_paramName : string

<maya_stucco>.wrap_connected : boolean

<maya_stucco>.wrap_shader : texturemap

<maya_stucco>.wrap_paramName : string

<maya_stucco>.invert_connected : boolean

<maya_stucco>.invert_shader : texturemap

<maya_stucco>.invert_paramName : string

<maya_stucco>.alphaIsLuminance_connected : boolean

<maya_stucco>.alphaIsLuminance_shader : texturemap

<maya_stucco>.alphaIsLuminance_paramName : string

<maya_stucco>.colorGain_connected : boolean

<maya_stucco>.colorGain_shader : texturemap

<maya_stucco>.colorGain_paramName : string

<maya_stucco>.colorOffset_connected : boolean

<maya_stucco>.colorOffset_shader : texturemap

<maya_stucco>.colorOffset_paramName : string

<maya_stucco>.alphaGain_connected : boolean

<maya_stucco>.alphaGain_shader : texturemap

<maya_stucco>.alphaGain_paramName : string

<maya_stucco>.alphaOffset_connected : boolean

<maya_stucco>.alphaOffset_shader : texturemap

<maya_stucco>.alphaOffset_paramName : string

<maya_stucco>.defaultColor_connected : boolean

<maya_stucco>.defaultColor_shader : texturemap

<maya_stucco>.defaultColor_paramName : string

<maya_stucco>.normalCamera_connected : boolean

<maya_stucco>.normalCamera_shader : texturemap

<maya_stucco>.normalCamera_paramName : string

<maya_stucco>.placementMatrix_connected : boolean

<maya_stucco>.placementMatrix_shader : texturemap

<maya_stucco>.placementMatrix_paramName : string

<maya_stucco>.local_connected : boolean

<maya_stucco>.local_shader : texturemap

<maya_stucco>.local_paramName : string

<maya_stucco>.TheList : maxObject array

<maya_stucco>.Shader_Version : integer

maya_stucco interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_surfaceluminance : textureMap

maya_surfaceluminance : textureMap {7773161f,c25eab46}

Constructor:

maya_surfaceluminance: class instances not creatable by MAXScript

Properties:

<maya_surfaceluminance>.normalCamera : point3

<maya_surfaceluminance>.Structure : paramBlock2

<maya_surfaceluminance>.outValue : float

<maya_surfaceluminance>.normalCamera_connected : boolean

<maya_surfaceluminance>.normalCamera_shader : texturemap

<maya_surfaceluminance>.normalCamera_paramName : string

<maya_surfaceluminance>.TheList : maxObject array

<maya_surfaceluminance>.Shader_Version : integer

maya_surfaceluminance interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_surfaceshader : textureMap

maya_surfaceshader : textureMap {7773161f,5800ad55}

Constructor:

maya_surfaceshader: class instances not creatable by MAXScript

Properties:

<maya_surfaceshader>.outColor : fRGBA color

<maya_surfaceshader>.outGlowColor : fRGBA color

<maya_surfaceshader>.outMatteOpacity : fRGBA color

<maya_surfaceshader>.outTransparency : fRGBA color

<maya_surfaceshader>.outAmbient : fRGBA color

<maya_surfaceshader>.outIncandescence : fRGBA color

<maya_surfaceshader>.outIrradiance : fRGBA color

<maya_surfaceshader>.outDiffuseShadowed : fRGBA color

<maya_surfaceshader>.outDiffuseNoShadow : fRGBA color

<maya_surfaceshader>.outShadow : fRGBA color

<maya_surfaceshader>.outSpecularShadowed : fRGBA color

<maya_surfaceshader>.outSpecularNoShadow : fRGBA color

<maya_surfaceshader>.outReflection : fRGBA color

<maya_surfaceshader>.outRefraction : fRGBA color

<maya_surfaceshader>.outScatter : fRGBA color

<maya_surfaceshader>.outOpacity : fRGBA color

<maya_surfaceshader>.Structure : paramBlock2

<maya_surfaceshader>.outColor : fRGBA color

<maya_surfaceshader>.outGlowColor : fRGBA color

<maya_surfaceshader>.outMatteOpacity : fRGBA color

<maya_surfaceshader>.outTransparency : fRGBA color

<maya_surfaceshader>.outAmbient : fRGBA color

<maya_surfaceshader>.outIncandescence : fRGBA color

<maya_surfaceshader>.outIrradiance : fRGBA color

<maya_surfaceshader>.outDiffuseShadowed : fRGBA color

<maya_surfaceshader>.outDiffuseNoShadow : fRGBA color

<maya_surfaceshader>.outShadow : fRGBA color

<maya_surfaceshader>.outSpecularShadowed : fRGBA color

<maya_surfaceshader>.outSpecularNoShadow : fRGBA color

<maya_surfaceshader>.outReflection : fRGBA color

<maya_surfaceshader>.outRefraction : fRGBA color

<maya_surfaceshader>.outScatter : fRGBA color

<maya_surfaceshader>.outOpacity : fRGBA color

<maya_surfaceshader>.outColor_connected : boolean

<maya_surfaceshader>.outColor_shader : texturemap

<maya_surfaceshader>.outColor_paramName : string

<maya_surfaceshader>.outGlowColor_connected : boolean

<maya_surfaceshader>.outGlowColor_shader : texturemap

<maya_surfaceshader>.outGlowColor_paramName : string

<maya_surfaceshader>.outMatteOpacity_connected : boolean

<maya_surfaceshader>.outMatteOpacity_shader : texturemap

<maya_surfaceshader>.outMatteOpacity_paramName : string

<maya_surfaceshader>.outTransparency_connected : boolean

<maya_surfaceshader>.outTransparency_shader : texturemap

<maya_surfaceshader>.outTransparency_paramName : string

<maya_surfaceshader>.outAmbient_connected : boolean

<maya_surfaceshader>.outAmbient_shader : texturemap

<maya_surfaceshader>.outAmbient_paramName : string

<maya_surfaceshader>.outIncandescence_connected : boolean

<maya_surfaceshader>.outIncandescence_shader : texturemap

<maya_surfaceshader>.outIncandescence_paramName : string

<maya_surfaceshader>.outIrradiance_connected : boolean

<maya_surfaceshader>.outIrradiance_shader : texturemap

<maya_surfaceshader>.outIrradiance_paramName : string

<maya_surfaceshader>.outDiffuseShadowed_connected : boolean

<maya_surfaceshader>.outDiffuseShadowed_shader : texturemap

<maya_surfaceshader>.outDiffuseShadowed_paramName : string

<maya_surfaceshader>.outDiffuseNoShadow_connected : boolean

<maya_surfaceshader>.outDiffuseNoShadow_shader : texturemap

<maya_surfaceshader>.outDiffuseNoShadow_paramName : string

<maya_surfaceshader>.outShadow_connected : boolean

<maya_surfaceshader>.outShadow_shader : texturemap

<maya_surfaceshader>.outShadow_paramName : string

<maya_surfaceshader>.outSpecularShadowed_connected : boolean

<maya_surfaceshader>.outSpecularShadowed_shader : texturemap

<maya_surfaceshader>.outSpecularShadowed_paramName : string

<maya_surfaceshader>.outSpecularNoShadow_connected : boolean

<maya_surfaceshader>.outSpecularNoShadow_shader : texturemap

<maya_surfaceshader>.outSpecularNoShadow_paramName : string

<maya_surfaceshader>.outReflection_connected : boolean

<maya_surfaceshader>.outReflection_shader : texturemap

<maya_surfaceshader>.outReflection_paramName : string

<maya_surfaceshader>.outRefraction_connected : boolean

<maya_surfaceshader>.outRefraction_shader : texturemap

<maya_surfaceshader>.outRefraction_paramName : string

<maya_surfaceshader>.outScatter_connected : boolean

<maya_surfaceshader>.outScatter_shader : texturemap

<maya_surfaceshader>.outScatter_paramName : string

<maya_surfaceshader>.outOpacity_connected : boolean

<maya_surfaceshader>.outOpacity_shader : texturemap

<maya_surfaceshader>.outOpacity_paramName : string

<maya_surfaceshader>.TheList : maxObject array

<maya_surfaceshader>.Shader_Version : integer

maya_surfaceshader interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_time_curve : textureMap

maya_time_curve : textureMap {7773161f,bf088038}

Constructor:

maya_time_curve: class instances not creatable by MAXScript

Properties:

<maya_time_curve>.input : float

<maya_time_curve>.curve : texturemap

<maya_time_curve>.Structure : paramBlock2

<maya_time_curve>.output : float

<maya_time_curve>.input_connected : boolean

<maya_time_curve>.input_shader : texturemap

<maya_time_curve>.input_paramName : string

<maya_time_curve>.TheList : maxObject array

<maya_time_curve>.Shader_Version : integer

maya_time_curve interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_tripleswitch : textureMap

maya_tripleswitch : textureMap {7773161f,5e0c5470}

Constructor:

maya_tripleswitch: class instances not creatable by MAXScript

Properties:

<maya_tripleswitch>.default : point3

<maya_tripleswitch>.input : paramBlock2 array

<maya_tripleswitch>.inShape : node

<maya_tripleswitch>.inTriple : point3

<maya_tripleswitch>.Structure : paramBlock2

<maya_tripleswitch>.output : point3

<maya_tripleswitch>.default_connected : boolean

<maya_tripleswitch>.default_shader : texturemap

<maya_tripleswitch>.default_paramName : string

<maya_tripleswitch>.TheList : maxObject array

<maya_tripleswitch>.Shader_Version : integer

maya_tripleswitch interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_tubeparticles : textureMap

maya_tubeparticles : textureMap {7773161f,6300c359}

Constructor:

maya_tubeparticles: class instances not creatable by MAXScript

Properties:

<maya_tubeparticles>.filterRadius : float

<maya_tubeparticles>.volumeShader : texturemap

<maya_tubeparticles>.particleSystem : node

<maya_tubeparticles>.visibleInReflections : boolean

<maya_tubeparticles>.visibleInRefractions : boolean

<maya_tubeparticles>.filterRadius_connected : boolean

<maya_tubeparticles>.filterRadius_shader : texturemap

<maya_tubeparticles>.filterRadius_paramName : string

<maya_tubeparticles>.visibleInReflections_connected : boolean

<maya_tubeparticles>.visibleInReflections_shader : texturemap

<maya_tubeparticles>.visibleInReflections_paramName : string

<maya_tubeparticles>.visibleInRefractions_connected : boolean

<maya_tubeparticles>.visibleInRefractions_shader : texturemap

<maya_tubeparticles>.visibleInRefractions_paramName : string

<maya_tubeparticles>.TheList : maxObject array

<maya_tubeparticles>.Shader_Version : integer

maya_tubeparticles interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_unitconversion : textureMap

maya_unitconversion : textureMap {7773161f,5b56c16c}

Constructor:

maya_unitconversion: class instances not creatable by MAXScript

Properties:

<maya_unitconversion>.input : float

<maya_unitconversion>.conversionFactor : float

<maya_unitconversion>.Structure : paramBlock2

<maya_unitconversion>.output : float

<maya_unitconversion>.input_connected : boolean

<maya_unitconversion>.input_shader : texturemap

<maya_unitconversion>.input_paramName : string

<maya_unitconversion>.conversionFactor_connected : boolean

<maya_unitconversion>.conversionFactor_shader : texturemap

<maya_unitconversion>.conversionFactor_paramName : string

<maya_unitconversion>.TheList : maxObject array

<maya_unitconversion>.Shader_Version : integer

maya_unitconversion interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_usebackground : textureMap

maya_usebackground : textureMap {7773161f,5ff8a76c}

Constructor:

maya_usebackground: class instances not creatable by MAXScript

Properties:

<maya_usebackground>.normalCamera : point3

<maya_usebackground>.shadowMask : float

<maya_usebackground>.reflectionLimit : integer

<maya_usebackground>.specularColor : fRGBA color

<maya_usebackground>.reflectivity : float

<maya_usebackground>.matteOpacityMode : integer

<maya_usebackground>.matteOpacity : float

<maya_usebackground>.imagePlanes : node array

<maya_usebackground>.reflectionBlur : float

<maya_usebackground>.reflectionBlurLimit : integer

<maya_usebackground>.reflectionRays : integer

<maya_usebackground>.occlusionMask : float

<maya_usebackground>.Structure : paramBlock2

<maya_usebackground>.outColor : fRGBA color

<maya_usebackground>.outGlowColor : fRGBA color

<maya_usebackground>.outMatteOpacity : fRGBA color

<maya_usebackground>.outTransparency : fRGBA color

<maya_usebackground>.outAmbient : fRGBA color

<maya_usebackground>.outIncandescence : fRGBA color

<maya_usebackground>.outIrradiance : fRGBA color

<maya_usebackground>.outDiffuseShadowed : fRGBA color

<maya_usebackground>.outDiffuseNoShadow : fRGBA color

<maya_usebackground>.outShadow : fRGBA color

<maya_usebackground>.outSpecularShadowed : fRGBA color

<maya_usebackground>.outSpecularNoShadow : fRGBA color

<maya_usebackground>.outReflection : fRGBA color

<maya_usebackground>.outRefraction : fRGBA color

<maya_usebackground>.outScatter : fRGBA color

<maya_usebackground>.outOpacity : fRGBA color

<maya_usebackground>.normalCamera_connected : boolean

<maya_usebackground>.normalCamera_shader : texturemap

<maya_usebackground>.normalCamera_paramName : string

<maya_usebackground>.shadowMask_connected : boolean

<maya_usebackground>.shadowMask_shader : texturemap

<maya_usebackground>.shadowMask_paramName : string

<maya_usebackground>.reflectionLimit_connected : boolean

<maya_usebackground>.reflectionLimit_shader : texturemap

<maya_usebackground>.reflectionLimit_paramName : string

<maya_usebackground>.specularColor_connected : boolean

<maya_usebackground>.specularColor_shader : texturemap

<maya_usebackground>.specularColor_paramName : string

<maya_usebackground>.reflectivity_connected : boolean

<maya_usebackground>.reflectivity_shader : texturemap

<maya_usebackground>.reflectivity_paramName : string

<maya_usebackground>.matteOpacityMode_connected : boolean

<maya_usebackground>.matteOpacityMode_shader : texturemap

<maya_usebackground>.matteOpacityMode_paramName : string

<maya_usebackground>.matteOpacity_connected : boolean

<maya_usebackground>.matteOpacity_shader : texturemap

<maya_usebackground>.matteOpacity_paramName : string

<maya_usebackground>.reflectionBlur_connected : boolean

<maya_usebackground>.reflectionBlur_shader : texturemap

<maya_usebackground>.reflectionBlur_paramName : string

<maya_usebackground>.reflectionBlurLimit_connected : boolean

<maya_usebackground>.reflectionBlurLimit_shader : texturemap

<maya_usebackground>.reflectionBlurLimit_paramName : string

<maya_usebackground>.reflectionRays_connected : boolean

<maya_usebackground>.reflectionRays_shader : texturemap

<maya_usebackground>.reflectionRays_paramName : string

<maya_usebackground>.occlusionMask_connected : boolean

<maya_usebackground>.occlusionMask_shader : texturemap

<maya_usebackground>.occlusionMask_paramName : string

<maya_usebackground>.TheList : maxObject array

<maya_usebackground>.Shader_Version : integer

maya_usebackground interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_uvchooser : textureMap

maya_uvchooser : textureMap {7773161f,b7524d52}

Constructor:

maya_uvchooser: class instances not creatable by MAXScript

Properties:

<maya_uvchooser>.uvSets : paramBlock2 array

<maya_uvchooser>.object : node

<maya_uvchooser>.index : integer

<maya_uvchooser>.Structure : paramBlock2

<maya_uvchooser>.outUv : point3

<maya_uvchooser>.outVertexUvOne : point3

<maya_uvchooser>.outVertexUvTwo : point3

<maya_uvchooser>.outVertexUvThree : point3

<maya_uvchooser>.TheList : maxObject array

<maya_uvchooser>.Shader_Version : integer

maya_uvchooser interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_uvw_to_vector : textureMap

maya_uvw_to_vector : textureMap {7773161f,82f5bb87}

Constructor:

maya_uvw_to_vector: class instances not creatable by MAXScript

Properties:

<maya_uvw_to_vector>.u : float

<maya_uvw_to_vector>.v : float

<maya_uvw_to_vector>.w : float

<maya_uvw_to_vector>.u_connected : boolean

<maya_uvw_to_vector>.u_shader : texturemap

<maya_uvw_to_vector>.u_paramName : string

<maya_uvw_to_vector>.v_connected : boolean

<maya_uvw_to_vector>.v_shader : texturemap

<maya_uvw_to_vector>.v_paramName : string

<maya_uvw_to_vector>.w_connected : boolean

<maya_uvw_to_vector>.w_shader : texturemap

<maya_uvw_to_vector>.w_paramName : string

<maya_uvw_to_vector>.TheList : maxObject array

<maya_uvw_to_vector>.Shader_Version : integer

maya_uvw_to_vector interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_vector_to_color : textureMap

maya_vector_to_color : textureMap {7773161f,9250bf70}

Constructor:

maya_vector_to_color: class instances not creatable by MAXScript

Properties:

<maya_vector_to_color>.vector : point3

<maya_vector_to_color>.a : float

<maya_vector_to_color>.vector_connected : boolean

<maya_vector_to_color>.vector_shader : texturemap

<maya_vector_to_color>.vector_paramName : string

<maya_vector_to_color>.a_connected : boolean

<maya_vector_to_color>.a_shader : texturemap

<maya_vector_to_color>.a_paramName : string

<maya_vector_to_color>.TheList : maxObject array

<maya_vector_to_color>.Shader_Version : integer

maya_vector_to_color interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_vector_to_uvw : textureMap

maya_vector_to_uvw : textureMap {7773161f,6e23a457}

Constructor:

maya_vector_to_uvw: class instances not creatable by MAXScript

Properties:

<maya_vector_to_uvw>.vector : point3

<maya_vector_to_uvw>.Structure : paramBlock2

<maya_vector_to_uvw>.u : float

<maya_vector_to_uvw>.v : float

<maya_vector_to_uvw>.w : float

<maya_vector_to_uvw>.vector_connected : boolean

<maya_vector_to_uvw>.vector_shader : texturemap

<maya_vector_to_uvw>.vector_paramName : string

<maya_vector_to_uvw>.TheList : maxObject array

<maya_vector_to_uvw>.Shader_Version : integer

maya_vector_to_uvw interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_vector_to_xyz : textureMap

maya_vector_to_xyz : textureMap {7773161f,6b23b15e}

Constructor:

maya_vector_to_xyz: class instances not creatable by MAXScript

Properties:

<maya_vector_to_xyz>.vector : point3

<maya_vector_to_xyz>.Structure : paramBlock2

<maya_vector_to_xyz>.x : float

<maya_vector_to_xyz>.y : float

<maya_vector_to_xyz>.z : float

<maya_vector_to_xyz>.vector_connected : boolean

<maya_vector_to_xyz>.vector_shader : texturemap

<maya_vector_to_xyz>.vector_paramName : string

<maya_vector_to_xyz>.TheList : maxObject array

<maya_vector_to_xyz>.Shader_Version : integer

maya_vector_to_xyz interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_vectorproduct : textureMap

maya_vectorproduct : textureMap {7773161f,4cfca76a}

Constructor:

maya_vectorproduct: class instances not creatable by MAXScript

Properties:

<maya_vectorproduct>.operation : integer

<maya_vectorproduct>.input1 : point3

<maya_vectorproduct>.input2 : point3

<maya_vectorproduct>.matrix : matrix3

<maya_vectorproduct>.normalizeOutput : boolean

<maya_vectorproduct>.Structure : paramBlock2

<maya_vectorproduct>.output : point3

<maya_vectorproduct>.operation_connected : boolean

<maya_vectorproduct>.operation_shader : texturemap

<maya_vectorproduct>.operation_paramName : string

<maya_vectorproduct>.input1_connected : boolean

<maya_vectorproduct>.input1_shader : texturemap

<maya_vectorproduct>.input1_paramName : string

<maya_vectorproduct>.input2_connected : boolean

<maya_vectorproduct>.input2_shader : texturemap

<maya_vectorproduct>.input2_paramName : string

<maya_vectorproduct>.matrix_connected : boolean

<maya_vectorproduct>.matrix_shader : texturemap

<maya_vectorproduct>.matrix_paramName : string

<maya_vectorproduct>.normalizeOutput_connected : boolean

<maya_vectorproduct>.normalizeOutput_shader : texturemap

<maya_vectorproduct>.normalizeOutput_paramName : string

<maya_vectorproduct>.TheList : maxObject array

<maya_vectorproduct>.Shader_Version : integer

maya_vectorproduct interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_vertexcolors : textureMap

maya_vertexcolors : textureMap {7773161f,47fd626d}

Constructor:

maya_vertexcolors: class instances not creatable by MAXScript

Properties:

<maya_vertexcolors>.cpvSets : paramBlock2 array

<maya_vertexcolors>.invert : boolean

<maya_vertexcolors>.alphaIsLuminance : boolean

<maya_vertexcolors>.colorGain : fRGBA color

<maya_vertexcolors>.colorOffset : fRGBA color

<maya_vertexcolors>.alphaGain : float

<maya_vertexcolors>.alphaOffset : float

<maya_vertexcolors>.defaultColor : fRGBA color

<maya_vertexcolors>.object : node

<maya_vertexcolors>.index : integer

<maya_vertexcolors>.Structure : paramBlock2

<maya_vertexcolors>.outColor : fRGBA color

<maya_vertexcolors>.outAlpha : float

<maya_vertexcolors>.invert_connected : boolean

<maya_vertexcolors>.invert_shader : texturemap

<maya_vertexcolors>.invert_paramName : string

<maya_vertexcolors>.alphaIsLuminance_connected : boolean

<maya_vertexcolors>.alphaIsLuminance_shader : texturemap

<maya_vertexcolors>.alphaIsLuminance_paramName : string

<maya_vertexcolors>.colorGain_connected : boolean

<maya_vertexcolors>.colorGain_shader : texturemap

<maya_vertexcolors>.colorGain_paramName : string

<maya_vertexcolors>.colorOffset_connected : boolean

<maya_vertexcolors>.colorOffset_shader : texturemap

<maya_vertexcolors>.colorOffset_paramName : string

<maya_vertexcolors>.alphaGain_connected : boolean

<maya_vertexcolors>.alphaGain_shader : texturemap

<maya_vertexcolors>.alphaGain_paramName : string

<maya_vertexcolors>.alphaOffset_connected : boolean

<maya_vertexcolors>.alphaOffset_shader : texturemap

<maya_vertexcolors>.alphaOffset_paramName : string

<maya_vertexcolors>.defaultColor_connected : boolean

<maya_vertexcolors>.defaultColor_shader : texturemap

<maya_vertexcolors>.defaultColor_paramName : string

<maya_vertexcolors>.TheList : maxObject array

<maya_vertexcolors>.Shader_Version : integer

maya_vertexcolors interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_vertexdata : textureMap

maya_vertexdata : textureMap {7773161f,bcf74a3a}

Constructor:

maya_vertexdata: class instances not creatable by MAXScript

Properties:

<maya_vertexdata>.magic : integer

<maya_vertexdata>.data : paramBlock2 array

<maya_vertexdata>.uvs : paramBlock2 array

<maya_vertexdata>.cpv : paramBlock2 array

<maya_vertexdata>.name : string

<maya_vertexdata>.type : integer

<maya_vertexdata>.size : integer

<maya_vertexdata>.offset : integer

<maya_vertexdata>.name : string

<maya_vertexdata>.type : integer

<maya_vertexdata>.size : integer

<maya_vertexdata>.offset : integer

<maya_vertexdata>.name : string

<maya_vertexdata>.type : integer

<maya_vertexdata>.size : integer

<maya_vertexdata>.offset : integer

<maya_vertexdata>.magic_connected : boolean

<maya_vertexdata>.magic_shader : texturemap

<maya_vertexdata>.magic_paramName : string

<maya_vertexdata>.TheList : maxObject array

<maya_vertexdata>.Shader_Version : integer

maya_vertexdata interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_volumefog : textureMap

maya_volumefog : textureMap {7773161f,b165613b}

Constructor:

maya_volumefog: class instances not creatable by MAXScript

Properties:

<maya_volumefog>.color : fRGBA color

<maya_volumefog>.colorRampInput : integer

<maya_volumefog>.colorRamp : paramBlock2 array

<maya_volumefog>.transparency : fRGBA color

<maya_volumefog>.incandescence : fRGBA color

<maya_volumefog>.glowIntensity : float

<maya_volumefog>.density : float

<maya_volumefog>.densityMode : integer

<maya_volumefog>.dropoffShape : integer

<maya_volumefog>.edgeDropoff : float

<maya_volumefog>.axialDropoff : float

<maya_volumefog>.dropoffMethod : integer

<maya_volumefog>.dropoffSubtract : float

<maya_volumefog>.illuminated : boolean

<maya_volumefog>.lightScatter : float

<maya_volumefog>.matteOpacityMode : integer

<maya_volumefog>.matteOpacity : float

<maya_volumefog>.visibleInReflections : boolean

<maya_volumefog>.visibleInRefractions : boolean

<maya_volumefog>.position : float

<maya_volumefog>.color : fRGBA color

<maya_volumefog>.interp : integer

<maya_volumefog>.Structure : paramBlock2

<maya_volumefog>.outColor : fRGBA color

<maya_volumefog>.outGlowColor : fRGBA color

<maya_volumefog>.outMatteOpacity : fRGBA color

<maya_volumefog>.outTransparency : fRGBA color

<maya_volumefog>.color_connected : boolean

<maya_volumefog>.color_shader : texturemap

<maya_volumefog>.color_paramName : string

<maya_volumefog>.colorRampInput_connected : boolean

<maya_volumefog>.colorRampInput_shader : texturemap

<maya_volumefog>.colorRampInput_paramName : string

<maya_volumefog>.transparency_connected : boolean

<maya_volumefog>.transparency_shader : texturemap

<maya_volumefog>.transparency_paramName : string

<maya_volumefog>.incandescence_connected : boolean

<maya_volumefog>.incandescence_shader : texturemap

<maya_volumefog>.incandescence_paramName : string

<maya_volumefog>.glowIntensity_connected : boolean

<maya_volumefog>.glowIntensity_shader : texturemap

<maya_volumefog>.glowIntensity_paramName : string

<maya_volumefog>.density_connected : boolean

<maya_volumefog>.density_shader : texturemap

<maya_volumefog>.density_paramName : string

<maya_volumefog>.densityMode_connected : boolean

<maya_volumefog>.densityMode_shader : texturemap

<maya_volumefog>.densityMode_paramName : string

<maya_volumefog>.dropoffShape_connected : boolean

<maya_volumefog>.dropoffShape_shader : texturemap

<maya_volumefog>.dropoffShape_paramName : string

<maya_volumefog>.edgeDropoff_connected : boolean

<maya_volumefog>.edgeDropoff_shader : texturemap

<maya_volumefog>.edgeDropoff_paramName : string

<maya_volumefog>.axialDropoff_connected : boolean

<maya_volumefog>.axialDropoff_shader : texturemap

<maya_volumefog>.axialDropoff_paramName : string

<maya_volumefog>.dropoffMethod_connected : boolean

<maya_volumefog>.dropoffMethod_shader : texturemap

<maya_volumefog>.dropoffMethod_paramName : string

<maya_volumefog>.dropoffSubtract_connected : boolean

<maya_volumefog>.dropoffSubtract_shader : texturemap

<maya_volumefog>.dropoffSubtract_paramName : string

<maya_volumefog>.illuminated_connected : boolean

<maya_volumefog>.illuminated_shader : texturemap

<maya_volumefog>.illuminated_paramName : string

<maya_volumefog>.lightScatter_connected : boolean

<maya_volumefog>.lightScatter_shader : texturemap

<maya_volumefog>.lightScatter_paramName : string

<maya_volumefog>.matteOpacityMode_connected : boolean

<maya_volumefog>.matteOpacityMode_shader : texturemap

<maya_volumefog>.matteOpacityMode_paramName : string

<maya_volumefog>.matteOpacity_connected : boolean

<maya_volumefog>.matteOpacity_shader : texturemap

<maya_volumefog>.matteOpacity_paramName : string

<maya_volumefog>.visibleInReflections_connected : boolean

<maya_volumefog>.visibleInReflections_shader : texturemap

<maya_volumefog>.visibleInReflections_paramName : string

<maya_volumefog>.visibleInRefractions_connected : boolean

<maya_volumefog>.visibleInRefractions_shader : texturemap

<maya_volumefog>.visibleInRefractions_paramName : string

<maya_volumefog>.TheList : maxObject array

<maya_volumefog>.Shader_Version : integer

maya_volumefog interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_volumelight : textureMap

maya_volumelight : textureMap {7773161f,5b0d6141}

Constructor:

maya_volumelight: class instances not creatable by MAXScript

Properties:

<maya_volumelight>.lightShape : integer

<maya_volumelight>.volumeLightDir : integer

<maya_volumelight>.arc : float

<maya_volumelight>.coneEndRadius : float

<maya_volumelight>.colorRange : paramBlock2 array

<maya_volumelight>.penumbra : paramBlock2 array

<maya_volumelight>.emitAmbient : boolean

<maya_volumelight>.lightRadius : float

<maya_volumelight>.decayRate : integer

<maya_volumelight>.useDepthMapShadows : boolean

<maya_volumelight>.emitDiffuse : boolean

<maya_volumelight>.emitSpecular : boolean

<maya_volumelight>.color : fRGBA color

<maya_volumelight>.intensity : float

<maya_volumelight>.useRayTraceShadows : boolean

<maya_volumelight>.shadowColor : fRGBA color

<maya_volumelight>.shadowRays : integer

<maya_volumelight>.rayDepthLimit : integer

<maya_volumelight>.fogRadius : float

<maya_volumelight>.fogType : integer

<maya_volumelight>.fogIntensity : float

<maya_volumelight>.position : float

<maya_volumelight>.color : fRGBA color

<maya_volumelight>.interp : integer

<maya_volumelight>.position : float

<maya_volumelight>.floatValue : float

<maya_volumelight>.interp : integer

<maya_volumelight>.lightShape_connected : boolean

<maya_volumelight>.lightShape_shader : texturemap

<maya_volumelight>.lightShape_paramName : string

<maya_volumelight>.volumeLightDir_connected : boolean

<maya_volumelight>.volumeLightDir_shader : texturemap

<maya_volumelight>.volumeLightDir_paramName : string

<maya_volumelight>.arc_connected : boolean

<maya_volumelight>.arc_shader : texturemap

<maya_volumelight>.arc_paramName : string

<maya_volumelight>.coneEndRadius_connected : boolean

<maya_volumelight>.coneEndRadius_shader : texturemap

<maya_volumelight>.coneEndRadius_paramName : string

<maya_volumelight>.emitAmbient_connected : boolean

<maya_volumelight>.emitAmbient_shader : texturemap

<maya_volumelight>.emitAmbient_paramName : string

<maya_volumelight>.lightRadius_connected : boolean

<maya_volumelight>.lightRadius_shader : texturemap

<maya_volumelight>.lightRadius_paramName : string

<maya_volumelight>.decayRate_connected : boolean

<maya_volumelight>.decayRate_shader : texturemap

<maya_volumelight>.decayRate_paramName : string

<maya_volumelight>.useDepthMapShadows_connected : boolean

<maya_volumelight>.useDepthMapShadows_shader : texturemap

<maya_volumelight>.useDepthMapShadows_paramName : string

<maya_volumelight>.emitDiffuse_connected : boolean

<maya_volumelight>.emitDiffuse_shader : texturemap

<maya_volumelight>.emitDiffuse_paramName : string

<maya_volumelight>.emitSpecular_connected : boolean

<maya_volumelight>.emitSpecular_shader : texturemap

<maya_volumelight>.emitSpecular_paramName : string

<maya_volumelight>.color_connected : boolean

<maya_volumelight>.color_shader : texturemap

<maya_volumelight>.color_paramName : string

<maya_volumelight>.intensity_connected : boolean

<maya_volumelight>.intensity_shader : texturemap

<maya_volumelight>.intensity_paramName : string

<maya_volumelight>.useRayTraceShadows_connected : boolean

<maya_volumelight>.useRayTraceShadows_shader : texturemap

<maya_volumelight>.useRayTraceShadows_paramName : string

<maya_volumelight>.shadowColor_connected : boolean

<maya_volumelight>.shadowColor_shader : texturemap

<maya_volumelight>.shadowColor_paramName : string

<maya_volumelight>.shadowRays_connected : boolean

<maya_volumelight>.shadowRays_shader : texturemap

<maya_volumelight>.shadowRays_paramName : string

<maya_volumelight>.rayDepthLimit_connected : boolean

<maya_volumelight>.rayDepthLimit_shader : texturemap

<maya_volumelight>.rayDepthLimit_paramName : string

<maya_volumelight>.fogRadius_connected : boolean

<maya_volumelight>.fogRadius_shader : texturemap

<maya_volumelight>.fogRadius_paramName : string

<maya_volumelight>.fogType_connected : boolean

<maya_volumelight>.fogType_shader : texturemap

<maya_volumelight>.fogType_paramName : string

<maya_volumelight>.fogIntensity_connected : boolean

<maya_volumelight>.fogIntensity_shader : texturemap

<maya_volumelight>.fogIntensity_paramName : string

<maya_volumelight>.TheList : maxObject array

<maya_volumelight>.Shader_Version : integer

maya_volumelight interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_volumenoise : textureMap

maya_volumenoise : textureMap {7773161f,4bf2573b}

Constructor:

maya_volumenoise: class instances not creatable by MAXScript

Properties:

<maya_volumenoise>.amplitude : float

<maya_volumenoise>.ratio : float

<maya_volumenoise>.threshold : float

<maya_volumenoise>.scale : point3

<maya_volumenoise>.origin : point3

<maya_volumenoise>.depthMax : integer

<maya_volumenoise>.frequency : float

<maya_volumenoise>.frequencyRatio : float

<maya_volumenoise>.inflection : boolean

<maya_volumenoise>.time : float

<maya_volumenoise>.noiseType : integer

<maya_volumenoise>.density : float

<maya_volumenoise>.spottyness : float

<maya_volumenoise>.sizeRand : float

<maya_volumenoise>.randomness : float

<maya_volumenoise>.falloff : integer

<maya_volumenoise>.numWaves : integer

<maya_volumenoise>.implode : float

<maya_volumenoise>.implodeCenter : point3

<maya_volumenoise>.filter : float

<maya_volumenoise>.filterSize : point3

<maya_volumenoise>.filterOffset : float

<maya_volumenoise>.blend : float

<maya_volumenoise>.wrap : boolean

<maya_volumenoise>.invert : boolean

<maya_volumenoise>.alphaIsLuminance : boolean

<maya_volumenoise>.colorGain : fRGBA color

<maya_volumenoise>.colorOffset : fRGBA color

<maya_volumenoise>.alphaGain : float

<maya_volumenoise>.alphaOffset : float

<maya_volumenoise>.defaultColor : fRGBA color

<maya_volumenoise>.placementMatrix : matrix3

<maya_volumenoise>.local : boolean

<maya_volumenoise>.Structure : paramBlock2

<maya_volumenoise>.outColor : fRGBA color

<maya_volumenoise>.outAlpha : float

<maya_volumenoise>.amplitude_connected : boolean

<maya_volumenoise>.amplitude_shader : texturemap

<maya_volumenoise>.amplitude_paramName : string

<maya_volumenoise>.ratio_connected : boolean

<maya_volumenoise>.ratio_shader : texturemap

<maya_volumenoise>.ratio_paramName : string

<maya_volumenoise>.threshold_connected : boolean

<maya_volumenoise>.threshold_shader : texturemap

<maya_volumenoise>.threshold_paramName : string

<maya_volumenoise>.scale_connected : boolean

<maya_volumenoise>.scale_shader : texturemap

<maya_volumenoise>.scale_paramName : string

<maya_volumenoise>.origin_connected : boolean

<maya_volumenoise>.origin_shader : texturemap

<maya_volumenoise>.origin_paramName : string

<maya_volumenoise>.depthMax_connected : boolean

<maya_volumenoise>.depthMax_shader : texturemap

<maya_volumenoise>.depthMax_paramName : string

<maya_volumenoise>.frequency_connected : boolean

<maya_volumenoise>.frequency_shader : texturemap

<maya_volumenoise>.frequency_paramName : string

<maya_volumenoise>.frequencyRatio_connected : boolean

<maya_volumenoise>.frequencyRatio_shader : texturemap

<maya_volumenoise>.frequencyRatio_paramName : string

<maya_volumenoise>.inflection_connected : boolean

<maya_volumenoise>.inflection_shader : texturemap

<maya_volumenoise>.inflection_paramName : string

<maya_volumenoise>.time_connected : boolean

<maya_volumenoise>.time_shader : texturemap

<maya_volumenoise>.time_paramName : string

<maya_volumenoise>.noiseType_connected : boolean

<maya_volumenoise>.noiseType_shader : texturemap

<maya_volumenoise>.noiseType_paramName : string

<maya_volumenoise>.density_connected : boolean

<maya_volumenoise>.density_shader : texturemap

<maya_volumenoise>.density_paramName : string

<maya_volumenoise>.spottyness_connected : boolean

<maya_volumenoise>.spottyness_shader : texturemap

<maya_volumenoise>.spottyness_paramName : string

<maya_volumenoise>.sizeRand_connected : boolean

<maya_volumenoise>.sizeRand_shader : texturemap

<maya_volumenoise>.sizeRand_paramName : string

<maya_volumenoise>.randomness_connected : boolean

<maya_volumenoise>.randomness_shader : texturemap

<maya_volumenoise>.randomness_paramName : string

<maya_volumenoise>.falloff_connected : boolean

<maya_volumenoise>.falloff_shader : texturemap

<maya_volumenoise>.falloff_paramName : string

<maya_volumenoise>.numWaves_connected : boolean

<maya_volumenoise>.numWaves_shader : texturemap

<maya_volumenoise>.numWaves_paramName : string

<maya_volumenoise>.implode_connected : boolean

<maya_volumenoise>.implode_shader : texturemap

<maya_volumenoise>.implode_paramName : string

<maya_volumenoise>.implodeCenter_connected : boolean

<maya_volumenoise>.implodeCenter_shader : texturemap

<maya_volumenoise>.implodeCenter_paramName : string

<maya_volumenoise>.filter_connected : boolean

<maya_volumenoise>.filter_shader : texturemap

<maya_volumenoise>.filter_paramName : string

<maya_volumenoise>.filterSize_connected : boolean

<maya_volumenoise>.filterSize_shader : texturemap

<maya_volumenoise>.filterSize_paramName : string

<maya_volumenoise>.filterOffset_connected : boolean

<maya_volumenoise>.filterOffset_shader : texturemap

<maya_volumenoise>.filterOffset_paramName : string

<maya_volumenoise>.blend_connected : boolean

<maya_volumenoise>.blend_shader : texturemap

<maya_volumenoise>.blend_paramName : string

<maya_volumenoise>.wrap_connected : boolean

<maya_volumenoise>.wrap_shader : texturemap

<maya_volumenoise>.wrap_paramName : string

<maya_volumenoise>.invert_connected : boolean

<maya_volumenoise>.invert_shader : texturemap

<maya_volumenoise>.invert_paramName : string

<maya_volumenoise>.alphaIsLuminance_connected : boolean

<maya_volumenoise>.alphaIsLuminance_shader : texturemap

<maya_volumenoise>.alphaIsLuminance_paramName : string

<maya_volumenoise>.colorGain_connected : boolean

<maya_volumenoise>.colorGain_shader : texturemap

<maya_volumenoise>.colorGain_paramName : string

<maya_volumenoise>.colorOffset_connected : boolean

<maya_volumenoise>.colorOffset_shader : texturemap

<maya_volumenoise>.colorOffset_paramName : string

<maya_volumenoise>.alphaGain_connected : boolean

<maya_volumenoise>.alphaGain_shader : texturemap

<maya_volumenoise>.alphaGain_paramName : string

<maya_volumenoise>.alphaOffset_connected : boolean

<maya_volumenoise>.alphaOffset_shader : texturemap

<maya_volumenoise>.alphaOffset_paramName : string

<maya_volumenoise>.defaultColor_connected : boolean

<maya_volumenoise>.defaultColor_shader : texturemap

<maya_volumenoise>.defaultColor_paramName : string

<maya_volumenoise>.placementMatrix_connected : boolean

<maya_volumenoise>.placementMatrix_shader : texturemap

<maya_volumenoise>.placementMatrix_paramName : string

<maya_volumenoise>.local_connected : boolean

<maya_volumenoise>.local_shader : texturemap

<maya_volumenoise>.local_paramName : string

<maya_volumenoise>.TheList : maxObject array

<maya_volumenoise>.Shader_Version : integer

maya_volumenoise interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_volumesampler : textureMap

maya_volumesampler : textureMap {7773161f,57f5a956}

Constructor:

maya_volumesampler: class instances not creatable by MAXScript

Properties:

<maya_volumesampler>.volumeShader : fRGBA color

<maya_volumesampler>.volumeShader_connected : boolean

<maya_volumesampler>.volumeShader_shader : texturemap

<maya_volumesampler>.volumeShader_paramName : string

<maya_volumesampler>.TheList : maxObject array

<maya_volumesampler>.Shader_Version : integer

maya_volumesampler interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_volumeshader : textureMap

maya_volumeshader : textureMap {7773161f,61095f70}

Constructor:

maya_volumeshader: class instances not creatable by MAXScript

Properties:

<maya_volumeshader>.outColor : fRGBA color

<maya_volumeshader>.outGlowColor : fRGBA color

<maya_volumeshader>.outMatteOpacity : fRGBA color

<maya_volumeshader>.outTransparency : fRGBA color

<maya_volumeshader>.visibleInReflections : boolean

<maya_volumeshader>.visibleInRefractions : boolean

<maya_volumeshader>.Structure : paramBlock2

<maya_volumeshader>.outColor : fRGBA color

<maya_volumeshader>.outGlowColor : fRGBA color

<maya_volumeshader>.outMatteOpacity : fRGBA color

<maya_volumeshader>.outTransparency : fRGBA color

<maya_volumeshader>.outColor_connected : boolean

<maya_volumeshader>.outColor_shader : texturemap

<maya_volumeshader>.outColor_paramName : string

<maya_volumeshader>.outGlowColor_connected : boolean

<maya_volumeshader>.outGlowColor_shader : texturemap

<maya_volumeshader>.outGlowColor_paramName : string

<maya_volumeshader>.outMatteOpacity_connected : boolean

<maya_volumeshader>.outMatteOpacity_shader : texturemap

<maya_volumeshader>.outMatteOpacity_paramName : string

<maya_volumeshader>.outTransparency_connected : boolean

<maya_volumeshader>.outTransparency_shader : texturemap

<maya_volumeshader>.outTransparency_paramName : string

<maya_volumeshader>.visibleInReflections_connected : boolean

<maya_volumeshader>.visibleInReflections_shader : texturemap

<maya_volumeshader>.visibleInReflections_paramName : string

<maya_volumeshader>.visibleInRefractions_connected : boolean

<maya_volumeshader>.visibleInRefractions_shader : texturemap

<maya_volumeshader>.visibleInRefractions_paramName : string

<maya_volumeshader>.TheList : maxObject array

<maya_volumeshader>.Shader_Version : integer

maya_volumeshader interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_w10fur : textureMap

maya_w10fur : textureMap {7773161f,972ca767}

Constructor:

maya_w10fur: class instances not creatable by MAXScript

Properties:

<maya_w10fur>.hairObject : node

<maya_w10fur>.sampleRate : integer

<maya_w10fur>.motionRate : integer

<maya_w10fur>.bvhType : integer

<maya_w10fur>.bvhTradeoff : float

<maya_w10fur>.useDensityGrid : boolean

<maya_w10fur>.resolutionScale : float

<maya_w10fur>.shadingQuality : float

<maya_w10fur>.densityScale : float

<maya_w10fur>.baseColor : fRGBA color

<maya_w10fur>.baseColorNoise : float

<maya_w10fur>.baseColorNoiseFreq : float

<maya_w10fur>.baseColorMap : integer

<maya_w10fur>.tipColor : fRGBA color

<maya_w10fur>.tipColorNoise : float

<maya_w10fur>.tipColorNoiseFreq : float

<maya_w10fur>.tipColorMap : integer

<maya_w10fur>.baseAmbientColor : fRGBA color

<maya_w10fur>.baseAmbientColorNoise : float

<maya_w10fur>.baseAmbientColorNoiseFreq : float

<maya_w10fur>.baseAmbientColorMap : integer

<maya_w10fur>.tipAmbientColor : fRGBA color

<maya_w10fur>.tipAmbientColorNoise : float

<maya_w10fur>.tipAmbientColorNoiseFreq : float

<maya_w10fur>.tipAmbientColorMap : integer

<maya_w10fur>.specularColor : fRGBA color

<maya_w10fur>.specularColorNoise : float

<maya_w10fur>.specularColorNoiseFreq : float

<maya_w10fur>.specularColorMap : integer

<maya_w10fur>.exponent : float

<maya_w10fur>.exponentNoise : float

<maya_w10fur>.exponentNoiseFreq : float

<maya_w10fur>.exponentMap : integer

<maya_w10fur>.baseOpacity : float

<maya_w10fur>.baseOpacityNoise : float

<maya_w10fur>.baseOpacityNoiseFreq : float

<maya_w10fur>.baseOpacityMap : integer

<maya_w10fur>.tipOpacity : float

<maya_w10fur>.tipOpacityNoise : float

<maya_w10fur>.tipOpacityNoiseFreq : float

<maya_w10fur>.tipOpacityMap : integer

<maya_w10fur>.lightModel : integer

<maya_w10fur>.sampleRate_connected : boolean

<maya_w10fur>.sampleRate_shader : texturemap

<maya_w10fur>.sampleRate_paramName : string

<maya_w10fur>.motionRate_connected : boolean

<maya_w10fur>.motionRate_shader : texturemap

<maya_w10fur>.motionRate_paramName : string

<maya_w10fur>.bvhType_connected : boolean

<maya_w10fur>.bvhType_shader : texturemap

<maya_w10fur>.bvhType_paramName : string

<maya_w10fur>.bvhTradeoff_connected : boolean

<maya_w10fur>.bvhTradeoff_shader : texturemap

<maya_w10fur>.bvhTradeoff_paramName : string

<maya_w10fur>.useDensityGrid_connected : boolean

<maya_w10fur>.useDensityGrid_shader : texturemap

<maya_w10fur>.useDensityGrid_paramName : string

<maya_w10fur>.resolutionScale_connected : boolean

<maya_w10fur>.resolutionScale_shader : texturemap

<maya_w10fur>.resolutionScale_paramName : string

<maya_w10fur>.shadingQuality_connected : boolean

<maya_w10fur>.shadingQuality_shader : texturemap

<maya_w10fur>.shadingQuality_paramName : string

<maya_w10fur>.densityScale_connected : boolean

<maya_w10fur>.densityScale_shader : texturemap

<maya_w10fur>.densityScale_paramName : string

<maya_w10fur>.baseColor_connected : boolean

<maya_w10fur>.baseColor_shader : texturemap

<maya_w10fur>.baseColor_paramName : string

<maya_w10fur>.baseColorNoise_connected : boolean

<maya_w10fur>.baseColorNoise_shader : texturemap

<maya_w10fur>.baseColorNoise_paramName : string

<maya_w10fur>.baseColorNoiseFreq_connected : boolean

<maya_w10fur>.baseColorNoiseFreq_shader : texturemap

<maya_w10fur>.baseColorNoiseFreq_paramName : string

<maya_w10fur>.baseColorMap_connected : boolean

<maya_w10fur>.baseColorMap_shader : texturemap

<maya_w10fur>.baseColorMap_paramName : string

<maya_w10fur>.tipColor_connected : boolean

<maya_w10fur>.tipColor_shader : texturemap

<maya_w10fur>.tipColor_paramName : string

<maya_w10fur>.tipColorNoise_connected : boolean

<maya_w10fur>.tipColorNoise_shader : texturemap

<maya_w10fur>.tipColorNoise_paramName : string

<maya_w10fur>.tipColorNoiseFreq_connected : boolean

<maya_w10fur>.tipColorNoiseFreq_shader : texturemap

<maya_w10fur>.tipColorNoiseFreq_paramName : string

<maya_w10fur>.tipColorMap_connected : boolean

<maya_w10fur>.tipColorMap_shader : texturemap

<maya_w10fur>.tipColorMap_paramName : string

<maya_w10fur>.baseAmbientColor_connected : boolean

<maya_w10fur>.baseAmbientColor_shader : texturemap

<maya_w10fur>.baseAmbientColor_paramName : string

<maya_w10fur>.baseAmbientColorNoise_connected : boolean

<maya_w10fur>.baseAmbientColorNoise_shader : texturemap

<maya_w10fur>.baseAmbientColorNoise_paramName : string

<maya_w10fur>.baseAmbientColorNoiseFreq_connected : boolean

<maya_w10fur>.baseAmbientColorNoiseFreq_shader : texturemap

<maya_w10fur>.baseAmbientColorNoiseFreq_paramName : string

<maya_w10fur>.baseAmbientColorMap_connected : boolean

<maya_w10fur>.baseAmbientColorMap_shader : texturemap

<maya_w10fur>.baseAmbientColorMap_paramName : string

<maya_w10fur>.tipAmbientColor_connected : boolean

<maya_w10fur>.tipAmbientColor_shader : texturemap

<maya_w10fur>.tipAmbientColor_paramName : string

<maya_w10fur>.tipAmbientColorNoise_connected : boolean

<maya_w10fur>.tipAmbientColorNoise_shader : texturemap

<maya_w10fur>.tipAmbientColorNoise_paramName : string

<maya_w10fur>.tipAmbientColorNoiseFreq_connected : boolean

<maya_w10fur>.tipAmbientColorNoiseFreq_shader : texturemap

<maya_w10fur>.tipAmbientColorNoiseFreq_paramName : string

<maya_w10fur>.tipAmbientColorMap_connected : boolean

<maya_w10fur>.tipAmbientColorMap_shader : texturemap

<maya_w10fur>.tipAmbientColorMap_paramName : string

<maya_w10fur>.specularColor_connected : boolean

<maya_w10fur>.specularColor_shader : texturemap

<maya_w10fur>.specularColor_paramName : string

<maya_w10fur>.specularColorNoise_connected : boolean

<maya_w10fur>.specularColorNoise_shader : texturemap

<maya_w10fur>.specularColorNoise_paramName : string

<maya_w10fur>.specularColorNoiseFreq_connected : boolean

<maya_w10fur>.specularColorNoiseFreq_shader : texturemap

<maya_w10fur>.specularColorNoiseFreq_paramName : string

<maya_w10fur>.specularColorMap_connected : boolean

<maya_w10fur>.specularColorMap_shader : texturemap

<maya_w10fur>.specularColorMap_paramName : string

<maya_w10fur>.exponent_connected : boolean

<maya_w10fur>.exponent_shader : texturemap

<maya_w10fur>.exponent_paramName : string

<maya_w10fur>.exponentNoise_connected : boolean

<maya_w10fur>.exponentNoise_shader : texturemap

<maya_w10fur>.exponentNoise_paramName : string

<maya_w10fur>.exponentNoiseFreq_connected : boolean

<maya_w10fur>.exponentNoiseFreq_shader : texturemap

<maya_w10fur>.exponentNoiseFreq_paramName : string

<maya_w10fur>.exponentMap_connected : boolean

<maya_w10fur>.exponentMap_shader : texturemap

<maya_w10fur>.exponentMap_paramName : string

<maya_w10fur>.baseOpacity_connected : boolean

<maya_w10fur>.baseOpacity_shader : texturemap

<maya_w10fur>.baseOpacity_paramName : string

<maya_w10fur>.baseOpacityNoise_connected : boolean

<maya_w10fur>.baseOpacityNoise_shader : texturemap

<maya_w10fur>.baseOpacityNoise_paramName : string

<maya_w10fur>.baseOpacityNoiseFreq_connected : boolean

<maya_w10fur>.baseOpacityNoiseFreq_shader : texturemap

<maya_w10fur>.baseOpacityNoiseFreq_paramName : string

<maya_w10fur>.baseOpacityMap_connected : boolean

<maya_w10fur>.baseOpacityMap_shader : texturemap

<maya_w10fur>.baseOpacityMap_paramName : string

<maya_w10fur>.tipOpacity_connected : boolean

<maya_w10fur>.tipOpacity_shader : texturemap

<maya_w10fur>.tipOpacity_paramName : string

<maya_w10fur>.tipOpacityNoise_connected : boolean

<maya_w10fur>.tipOpacityNoise_shader : texturemap

<maya_w10fur>.tipOpacityNoise_paramName : string

<maya_w10fur>.tipOpacityNoiseFreq_connected : boolean

<maya_w10fur>.tipOpacityNoiseFreq_shader : texturemap

<maya_w10fur>.tipOpacityNoiseFreq_paramName : string

<maya_w10fur>.tipOpacityMap_connected : boolean

<maya_w10fur>.tipOpacityMap_shader : texturemap

<maya_w10fur>.tipOpacityMap_paramName : string

<maya_w10fur>.lightModel_connected : boolean

<maya_w10fur>.lightModel_shader : texturemap

<maya_w10fur>.lightModel_paramName : string

<maya_w10fur>.TheList : maxObject array

<maya_w10fur>.Shader_Version : integer

maya_w10fur interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_water : textureMap

maya_water : textureMap {7773161f,5b0aa86a}

Constructor:

maya_water: class instances not creatable by MAXScript

Properties:

<maya_water>.numberOfWaves : integer

<maya_water>.waveTime : float

<maya_water>.waveVelocity : float

<maya_water>.waveAmplitude : float

<maya_water>.waveFrequency : float

<maya_water>.subWaveFrequency : float

<maya_water>.smoothness : float

<maya_water>.windUV : point3

<maya_water>.rippleTime : float

<maya_water>.rippleFrequency : float

<maya_water>.rippleAmplitude : float

<maya_water>.dropSize : float

<maya_water>.rippleOrigin : point3

<maya_water>.groupVelocity : float

<maya_water>.phaseVelocity : float

<maya_water>.spreadStart : float

<maya_water>.spreadRate : float

<maya_water>.reflectionBox : boolean

<maya_water>.boxMin : point3

<maya_water>.boxMax : point3

<maya_water>.fast : boolean

<maya_water>.uvCoord : point3

<maya_water>.uvFilterSize : point3

<maya_water>.filter : float

<maya_water>.filterOffset : float

<maya_water>.invert : boolean

<maya_water>.alphaIsLuminance : boolean

<maya_water>.colorGain : fRGBA color

<maya_water>.colorOffset : fRGBA color

<maya_water>.alphaGain : float

<maya_water>.alphaOffset : float

<maya_water>.defaultColor : fRGBA color

<maya_water>.Structure : paramBlock2

<maya_water>.outColor : fRGBA color

<maya_water>.outAlpha : float

<maya_water>.numberOfWaves_connected : boolean

<maya_water>.numberOfWaves_shader : texturemap

<maya_water>.numberOfWaves_paramName : string

<maya_water>.waveTime_connected : boolean

<maya_water>.waveTime_shader : texturemap

<maya_water>.waveTime_paramName : string

<maya_water>.waveVelocity_connected : boolean

<maya_water>.waveVelocity_shader : texturemap

<maya_water>.waveVelocity_paramName : string

<maya_water>.waveAmplitude_connected : boolean

<maya_water>.waveAmplitude_shader : texturemap

<maya_water>.waveAmplitude_paramName : string

<maya_water>.waveFrequency_connected : boolean

<maya_water>.waveFrequency_shader : texturemap

<maya_water>.waveFrequency_paramName : string

<maya_water>.subWaveFrequency_connected : boolean

<maya_water>.subWaveFrequency_shader : texturemap

<maya_water>.subWaveFrequency_paramName : string

<maya_water>.smoothness_connected : boolean

<maya_water>.smoothness_shader : texturemap

<maya_water>.smoothness_paramName : string

<maya_water>.windUV_connected : boolean

<maya_water>.windUV_shader : texturemap

<maya_water>.windUV_paramName : string

<maya_water>.rippleTime_connected : boolean

<maya_water>.rippleTime_shader : texturemap

<maya_water>.rippleTime_paramName : string

<maya_water>.rippleFrequency_connected : boolean

<maya_water>.rippleFrequency_shader : texturemap

<maya_water>.rippleFrequency_paramName : string

<maya_water>.rippleAmplitude_connected : boolean

<maya_water>.rippleAmplitude_shader : texturemap

<maya_water>.rippleAmplitude_paramName : string

<maya_water>.dropSize_connected : boolean

<maya_water>.dropSize_shader : texturemap

<maya_water>.dropSize_paramName : string

<maya_water>.rippleOrigin_connected : boolean

<maya_water>.rippleOrigin_shader : texturemap

<maya_water>.rippleOrigin_paramName : string

<maya_water>.groupVelocity_connected : boolean

<maya_water>.groupVelocity_shader : texturemap

<maya_water>.groupVelocity_paramName : string

<maya_water>.phaseVelocity_connected : boolean

<maya_water>.phaseVelocity_shader : texturemap

<maya_water>.phaseVelocity_paramName : string

<maya_water>.spreadStart_connected : boolean

<maya_water>.spreadStart_shader : texturemap

<maya_water>.spreadStart_paramName : string

<maya_water>.spreadRate_connected : boolean

<maya_water>.spreadRate_shader : texturemap

<maya_water>.spreadRate_paramName : string

<maya_water>.reflectionBox_connected : boolean

<maya_water>.reflectionBox_shader : texturemap

<maya_water>.reflectionBox_paramName : string

<maya_water>.boxMin_connected : boolean

<maya_water>.boxMin_shader : texturemap

<maya_water>.boxMin_paramName : string

<maya_water>.boxMax_connected : boolean

<maya_water>.boxMax_shader : texturemap

<maya_water>.boxMax_paramName : string

<maya_water>.fast_connected : boolean

<maya_water>.fast_shader : texturemap

<maya_water>.fast_paramName : string

<maya_water>.uvCoord_connected : boolean

<maya_water>.uvCoord_shader : texturemap

<maya_water>.uvCoord_paramName : string

<maya_water>.uvFilterSize_connected : boolean

<maya_water>.uvFilterSize_shader : texturemap

<maya_water>.uvFilterSize_paramName : string

<maya_water>.filter_connected : boolean

<maya_water>.filter_shader : texturemap

<maya_water>.filter_paramName : string

<maya_water>.filterOffset_connected : boolean

<maya_water>.filterOffset_shader : texturemap

<maya_water>.filterOffset_paramName : string

<maya_water>.invert_connected : boolean

<maya_water>.invert_shader : texturemap

<maya_water>.invert_paramName : string

<maya_water>.alphaIsLuminance_connected : boolean

<maya_water>.alphaIsLuminance_shader : texturemap

<maya_water>.alphaIsLuminance_paramName : string

<maya_water>.colorGain_connected : boolean

<maya_water>.colorGain_shader : texturemap

<maya_water>.colorGain_paramName : string

<maya_water>.colorOffset_connected : boolean

<maya_water>.colorOffset_shader : texturemap

<maya_water>.colorOffset_paramName : string

<maya_water>.alphaGain_connected : boolean

<maya_water>.alphaGain_shader : texturemap

<maya_water>.alphaGain_paramName : string

<maya_water>.alphaOffset_connected : boolean

<maya_water>.alphaOffset_shader : texturemap

<maya_water>.alphaOffset_paramName : string

<maya_water>.defaultColor_connected : boolean

<maya_water>.defaultColor_shader : texturemap

<maya_water>.defaultColor_paramName : string

<maya_water>.TheList : maxObject array

<maya_water>.Shader_Version : integer

maya_water interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_wood : textureMap

maya_wood : textureMap {7773161f,54085a69}

Constructor:

maya_wood: class instances not creatable by MAXScript

Properties:

<maya_wood>.fillerColor : fRGBA color

<maya_wood>.veinColor : fRGBA color

<maya_wood>.veinSpread : float

<maya_wood>.layerSize : float

<maya_wood>.randomness : float

<maya_wood>.age : float

<maya_wood>.grainColor : fRGBA color

<maya_wood>.grainContrast : float

<maya_wood>.grainSpacing : float

<maya_wood>.center : point3

<maya_wood>.amplitudeX : float

<maya_wood>.amplitudeY : float

<maya_wood>.ratio : float

<maya_wood>.ripples : point3

<maya_wood>.depth : point3

<maya_wood>.filter : float

<maya_wood>.filterSize : point3

<maya_wood>.filterOffset : float

<maya_wood>.blend : float

<maya_wood>.wrap : boolean

<maya_wood>.invert : boolean

<maya_wood>.alphaIsLuminance : boolean

<maya_wood>.colorGain : fRGBA color

<maya_wood>.colorOffset : fRGBA color

<maya_wood>.alphaGain : float

<maya_wood>.alphaOffset : float

<maya_wood>.defaultColor : fRGBA color

<maya_wood>.normalCamera : point3

<maya_wood>.placementMatrix : matrix3

<maya_wood>.local : boolean

<maya_wood>.Structure : paramBlock2

<maya_wood>.outColor : fRGBA color

<maya_wood>.outAlpha : float

<maya_wood>.fillerColor_connected : boolean

<maya_wood>.fillerColor_shader : texturemap

<maya_wood>.fillerColor_paramName : string

<maya_wood>.veinColor_connected : boolean

<maya_wood>.veinColor_shader : texturemap

<maya_wood>.veinColor_paramName : string

<maya_wood>.veinSpread_connected : boolean

<maya_wood>.veinSpread_shader : texturemap

<maya_wood>.veinSpread_paramName : string

<maya_wood>.layerSize_connected : boolean

<maya_wood>.layerSize_shader : texturemap

<maya_wood>.layerSize_paramName : string

<maya_wood>.randomness_connected : boolean

<maya_wood>.randomness_shader : texturemap

<maya_wood>.randomness_paramName : string

<maya_wood>.age_connected : boolean

<maya_wood>.age_shader : texturemap

<maya_wood>.age_paramName : string

<maya_wood>.grainColor_connected : boolean

<maya_wood>.grainColor_shader : texturemap

<maya_wood>.grainColor_paramName : string

<maya_wood>.grainContrast_connected : boolean

<maya_wood>.grainContrast_shader : texturemap

<maya_wood>.grainContrast_paramName : string

<maya_wood>.grainSpacing_connected : boolean

<maya_wood>.grainSpacing_shader : texturemap

<maya_wood>.grainSpacing_paramName : string

<maya_wood>.center_connected : boolean

<maya_wood>.center_shader : texturemap

<maya_wood>.center_paramName : string

<maya_wood>.amplitudeX_connected : boolean

<maya_wood>.amplitudeX_shader : texturemap

<maya_wood>.amplitudeX_paramName : string

<maya_wood>.amplitudeY_connected : boolean

<maya_wood>.amplitudeY_shader : texturemap

<maya_wood>.amplitudeY_paramName : string

<maya_wood>.ratio_connected : boolean

<maya_wood>.ratio_shader : texturemap

<maya_wood>.ratio_paramName : string

<maya_wood>.ripples_connected : boolean

<maya_wood>.ripples_shader : texturemap

<maya_wood>.ripples_paramName : string

<maya_wood>.depth_connected : boolean

<maya_wood>.depth_shader : texturemap

<maya_wood>.depth_paramName : string

<maya_wood>.filter_connected : boolean

<maya_wood>.filter_shader : texturemap

<maya_wood>.filter_paramName : string

<maya_wood>.filterSize_connected : boolean

<maya_wood>.filterSize_shader : texturemap

<maya_wood>.filterSize_paramName : string

<maya_wood>.filterOffset_connected : boolean

<maya_wood>.filterOffset_shader : texturemap

<maya_wood>.filterOffset_paramName : string

<maya_wood>.blend_connected : boolean

<maya_wood>.blend_shader : texturemap

<maya_wood>.blend_paramName : string

<maya_wood>.wrap_connected : boolean

<maya_wood>.wrap_shader : texturemap

<maya_wood>.wrap_paramName : string

<maya_wood>.invert_connected : boolean

<maya_wood>.invert_shader : texturemap

<maya_wood>.invert_paramName : string

<maya_wood>.alphaIsLuminance_connected : boolean

<maya_wood>.alphaIsLuminance_shader : texturemap

<maya_wood>.alphaIsLuminance_paramName : string

<maya_wood>.colorGain_connected : boolean

<maya_wood>.colorGain_shader : texturemap

<maya_wood>.colorGain_paramName : string

<maya_wood>.colorOffset_connected : boolean

<maya_wood>.colorOffset_shader : texturemap

<maya_wood>.colorOffset_paramName : string

<maya_wood>.alphaGain_connected : boolean

<maya_wood>.alphaGain_shader : texturemap

<maya_wood>.alphaGain_paramName : string

<maya_wood>.alphaOffset_connected : boolean

<maya_wood>.alphaOffset_shader : texturemap

<maya_wood>.alphaOffset_paramName : string

<maya_wood>.defaultColor_connected : boolean

<maya_wood>.defaultColor_shader : texturemap

<maya_wood>.defaultColor_paramName : string

<maya_wood>.normalCamera_connected : boolean

<maya_wood>.normalCamera_shader : texturemap

<maya_wood>.normalCamera_paramName : string

<maya_wood>.placementMatrix_connected : boolean

<maya_wood>.placementMatrix_shader : texturemap

<maya_wood>.placementMatrix_paramName : string

<maya_wood>.local_connected : boolean

<maya_wood>.local_shader : texturemap

<maya_wood>.local_paramName : string

<maya_wood>.TheList : maxObject array

<maya_wood>.Shader_Version : integer

maya_wood interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_woodgrain : textureMap

maya_woodgrain : textureMap {7773161f,b5566352}

Constructor:

maya_woodgrain: class instances not creatable by MAXScript

Properties:

<maya_woodgrain>.woodColor : fRGBA color

<maya_woodgrain>.ringColor : fRGBA color

<maya_woodgrain>.numberOfRings : float

<maya_woodgrain>.contrast : float

<maya_woodgrain>.amountOfSwirl : integer

<maya_woodgrain>.swirlFrequency : float

<maya_woodgrain>.swirlSize : float

<maya_woodgrain>.grainAxisX : float

<maya_woodgrain>.grainAxisY : float

<maya_woodgrain>.grainAxisZ : float

<maya_woodgrain>.filter : float

<maya_woodgrain>.filterSize : point3

<maya_woodgrain>.filterOffset : float

<maya_woodgrain>.blend : float

<maya_woodgrain>.wrap : boolean

<maya_woodgrain>.invert : boolean

<maya_woodgrain>.alphaIsLuminance : boolean

<maya_woodgrain>.colorGain : fRGBA color

<maya_woodgrain>.colorOffset : fRGBA color

<maya_woodgrain>.alphaGain : float

<maya_woodgrain>.alphaOffset : float

<maya_woodgrain>.defaultColor : fRGBA color

<maya_woodgrain>.normalCamera : point3

<maya_woodgrain>.placementMatrix : matrix3

<maya_woodgrain>.local : boolean

<maya_woodgrain>.Structure : paramBlock2

<maya_woodgrain>.outColor : fRGBA color

<maya_woodgrain>.outAlpha : float

<maya_woodgrain>.woodColor_connected : boolean

<maya_woodgrain>.woodColor_shader : texturemap

<maya_woodgrain>.woodColor_paramName : string

<maya_woodgrain>.ringColor_connected : boolean

<maya_woodgrain>.ringColor_shader : texturemap

<maya_woodgrain>.ringColor_paramName : string

<maya_woodgrain>.numberOfRings_connected : boolean

<maya_woodgrain>.numberOfRings_shader : texturemap

<maya_woodgrain>.numberOfRings_paramName : string

<maya_woodgrain>.contrast_connected : boolean

<maya_woodgrain>.contrast_shader : texturemap

<maya_woodgrain>.contrast_paramName : string

<maya_woodgrain>.amountOfSwirl_connected : boolean

<maya_woodgrain>.amountOfSwirl_shader : texturemap

<maya_woodgrain>.amountOfSwirl_paramName : string

<maya_woodgrain>.swirlFrequency_connected : boolean

<maya_woodgrain>.swirlFrequency_shader : texturemap

<maya_woodgrain>.swirlFrequency_paramName : string

<maya_woodgrain>.swirlSize_connected : boolean

<maya_woodgrain>.swirlSize_shader : texturemap

<maya_woodgrain>.swirlSize_paramName : string

<maya_woodgrain>.grainAxisX_connected : boolean

<maya_woodgrain>.grainAxisX_shader : texturemap

<maya_woodgrain>.grainAxisX_paramName : string

<maya_woodgrain>.grainAxisY_connected : boolean

<maya_woodgrain>.grainAxisY_shader : texturemap

<maya_woodgrain>.grainAxisY_paramName : string

<maya_woodgrain>.grainAxisZ_connected : boolean

<maya_woodgrain>.grainAxisZ_shader : texturemap

<maya_woodgrain>.grainAxisZ_paramName : string

<maya_woodgrain>.filter_connected : boolean

<maya_woodgrain>.filter_shader : texturemap

<maya_woodgrain>.filter_paramName : string

<maya_woodgrain>.filterSize_connected : boolean

<maya_woodgrain>.filterSize_shader : texturemap

<maya_woodgrain>.filterSize_paramName : string

<maya_woodgrain>.filterOffset_connected : boolean

<maya_woodgrain>.filterOffset_shader : texturemap

<maya_woodgrain>.filterOffset_paramName : string

<maya_woodgrain>.blend_connected : boolean

<maya_woodgrain>.blend_shader : texturemap

<maya_woodgrain>.blend_paramName : string

<maya_woodgrain>.wrap_connected : boolean

<maya_woodgrain>.wrap_shader : texturemap

<maya_woodgrain>.wrap_paramName : string

<maya_woodgrain>.invert_connected : boolean

<maya_woodgrain>.invert_shader : texturemap

<maya_woodgrain>.invert_paramName : string

<maya_woodgrain>.alphaIsLuminance_connected : boolean

<maya_woodgrain>.alphaIsLuminance_shader : texturemap

<maya_woodgrain>.alphaIsLuminance_paramName : string

<maya_woodgrain>.colorGain_connected : boolean

<maya_woodgrain>.colorGain_shader : texturemap

<maya_woodgrain>.colorGain_paramName : string

<maya_woodgrain>.colorOffset_connected : boolean

<maya_woodgrain>.colorOffset_shader : texturemap

<maya_woodgrain>.colorOffset_paramName : string

<maya_woodgrain>.alphaGain_connected : boolean

<maya_woodgrain>.alphaGain_shader : texturemap

<maya_woodgrain>.alphaGain_paramName : string

<maya_woodgrain>.alphaOffset_connected : boolean

<maya_woodgrain>.alphaOffset_shader : texturemap

<maya_woodgrain>.alphaOffset_paramName : string

<maya_woodgrain>.defaultColor_connected : boolean

<maya_woodgrain>.defaultColor_shader : texturemap

<maya_woodgrain>.defaultColor_paramName : string

<maya_woodgrain>.normalCamera_connected : boolean

<maya_woodgrain>.normalCamera_shader : texturemap

<maya_woodgrain>.normalCamera_paramName : string

<maya_woodgrain>.placementMatrix_connected : boolean

<maya_woodgrain>.placementMatrix_shader : texturemap

<maya_woodgrain>.placementMatrix_paramName : string

<maya_woodgrain>.local_connected : boolean

<maya_woodgrain>.local_shader : texturemap

<maya_woodgrain>.local_paramName : string

<maya_woodgrain>.TheList : maxObject array

<maya_woodgrain>.Shader_Version : integer

maya_woodgrain interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


maya_xyz_to_vector : textureMap

maya_xyz_to_vector : textureMap {7773161f,75febe87}

Constructor:

maya_xyz_to_vector: class instances not creatable by MAXScript

Properties:

<maya_xyz_to_vector>.x : float

<maya_xyz_to_vector>.y : float

<maya_xyz_to_vector>.z : float

<maya_xyz_to_vector>.x_connected : boolean

<maya_xyz_to_vector>.x_shader : texturemap

<maya_xyz_to_vector>.x_paramName : string

<maya_xyz_to_vector>.y_connected : boolean

<maya_xyz_to_vector>.y_shader : texturemap

<maya_xyz_to_vector>.y_paramName : string

<maya_xyz_to_vector>.z_connected : boolean

<maya_xyz_to_vector>.z_shader : texturemap

<maya_xyz_to_vector>.z_paramName : string

<maya_xyz_to_vector>.TheList : maxObject array

<maya_xyz_to_vector>.Shader_Version : integer

maya_xyz_to_vector interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Environment_Background_Camera_Map__mi : textureMap

Environment_Background_Camera_Map__mi - superclass: textureMap; super-superclass:material - 10:0 - classID: #(2004031007, -1587368673)

Constructor:

Environment_Background_Camera_Map__mi ...

Properties:

<Environment_Background_Camera_Map__mi>.degamma Float default: 1.0 -- animatable; float

<Environment_Background_Camera_Map__mi>.Image_Frame_Number Integer default: 0 -- integer

<Environment_Background_Camera_Map__mi>.map String default: "" -- filename

<Environment_Background_Camera_Map__mi>.map_connected BooleanClass default: false -- boolean

<Environment_Background_Camera_Map__mi>.map_paramName UndefinedClass default: undefined -- string

<Environment_Background_Camera_Map__mi>.map_shader UndefinedClass default: undefined -- texturemap

<Environment_Background_Camera_Map__mi>.Multiplier Float default: 1.0 -- animatable; float

<Environment_Background_Camera_Map__mi>.offscreen_color Color default: (color 0 0 0) -- animatable; fRGBA color

<Environment_Background_Camera_Map__mi>.offscreen_is_environment BooleanClass default: true -- animatable; boolean

<Environment_Background_Camera_Map__mi>.per_pixel_match BooleanClass default: false -- animatable; boolean

<Environment_Background_Camera_Map__mi>.transparent_alpha BooleanClass default: true -- animatable; boolean

Environment_Background_Camera_Map__mi interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Environment_Background_Switcher__mi : textureMap

Environment_Background_Switcher__mi - superclass: textureMap; super-superclass:material - 10:0 - classID: #(2004031007, 1711373951)

Constructor:

Environment_Background_Switcher__mi ...

Properties:

<Environment_Background_Switcher__mi>.background Color default: (color 127.5 127.5 127.5 0) -- animatable; fRGBA color

<Environment_Background_Switcher__mi>.background_connected BooleanClass default: false -- boolean

<Environment_Background_Switcher__mi>.background_paramName UndefinedClass default: undefined -- string; <Environment_Background_Switcher__mi>.background_shader UndefinedClass default: undefined -- texturemap

<Environment_Background_Switcher__mi>.environment Color default: (color 127.5 127.5 127.5 0) -- animatable; fRGBA color;

<Environment_Background_Switcher__mi>.environment_connected BooleanClass default: false -- boolean

<Environment_Background_Switcher__mi>.environment_paramName UndefinedClass default: undefined -- string;

<Environment_Background_Switcher__mi>.environment_shader UndefinedClass default: undefined -- texturemap

Environment_Background_Switcher__mi interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Environment_Probe_Chrome_Ball__mi : textureMap

Environment_Probe_Chrome_Ball__mi - superclass: textureMap; super-superclass:material - 10:0 - classID: #(2004031007, -1840094698)

Constructor:

Environment_Probe_Chrome_Ball__mi ...

Properties:

<Environment_Probe_Chrome_Ball__mi>.blur Float default: 0.0 -- animatable; float

<Environment_Probe_Chrome_Ball__mi>.degamma Float default: 1.0 -- animatable; float

<Environment_Probe_Chrome_Ball__mi>.Image_Frame_Number Integer default: 0 -- integer

<Environment_Probe_Chrome_Ball__mi>.Multiplier Float default: 1.0 -- animatable; float

<Environment_Probe_Chrome_Ball__mi>.texture String default: "" -- filename

<Environment_Probe_Chrome_Ball__mi>.texture_connected BooleanClass default: false -- boolean

<Environment_Probe_Chrome_Ball__mi>.texture_paramName UndefinedClass default: undefined -- string;

<Environment_Probe_Chrome_Ball__mi>.texture_shader UndefinedClass default: undefined -- texturemap

Environment_Probe_Chrome_Ball__mi interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Environment_Probe_Gray_Ball__mi : textureMap

Environment_Probe_Gray_Ball__mi - superclass: textureMap; super-superclass:material - 10:0 - classID: #(2004031007, -1871724933)

Constructor:

Environment_Probe_Gray_Ball__mi ...

Properties:

<Environment_Probe_Gray_Ball__mi>.blur Float default: 0.0 -- animatable; float

<Environment_Probe_Gray_Ball__mi>.degamma Float default: 1.0 -- animatable; float

<Environment_Probe_Gray_Ball__mi>.Image_Frame_Number Integer default: 0 -- integer

<Environment_Probe_Gray_Ball__mi>.Multiplier Float default: 1.0 -- animatable; float

<Environment_Probe_Gray_Ball__mi>.texture String default: "" -- filename

<Environment_Probe_Gray_Ball__mi>.texture_connected BooleanClass default: false -- boolean

<Environment_Probe_Gray_Ball__mi>.texture_paramName UndefinedClass default: undefined -- string;

<Environment_Probe_Gray_Ball__mi>.texture_shader UndefinedClass default: undefined -- texturemap

Environment_Probe_Gray_Ball__mi interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Matte_Shadow_Reflection__mi : material

Matte_Shadow_Reflection__mi - superclass: material; super-superclass:MAXWrapper - 77:0 - classID: #(2004030991, -1355984577)

Constructor:

Matte_Shadow_Reflection__mi ...

Properties:

<Matte_Shadow_Reflection__mi>.additional_color Color default: (color 0 0 0) -- animatable; fRGBA color

<Matte_Shadow_Reflection__mi>.ambient Color default: (color 255 255 255) -- animatable; fRGBA color

<Matte_Shadow_Reflection__mi>.ambient_connected BooleanClass default: false -- boolean

<Matte_Shadow_Reflection__mi>.ambient_intensity Float default: 0.2 -- animatable; float

<Matte_Shadow_Reflection__mi>.ambient_intensity_connected BooleanClass default: false -- boolean

<Matte_Shadow_Reflection__mi>.ambient_intensity_paramName UndefinedClass default: undefined -- string

<Matte_Shadow_Reflection__mi>.ambient_intensity_shader UndefinedClass default: undefined -- texturemap

<Matte_Shadow_Reflection__mi>.ambient_paramName UndefinedClass default: undefined -- string

<Matte_Shadow_Reflection__mi>.ambient_shader UndefinedClass default: undefined -- texturemap

<Matte_Shadow_Reflection__mi>.ao_dark Color default: (color 0 0 0) -- animatable; fRGBA color

<Matte_Shadow_Reflection__mi>.ao_dark_connected BooleanClass default: false -- boolean

<Matte_Shadow_Reflection__mi>.ao_dark_paramName UndefinedClass default: undefined -- string

<Matte_Shadow_Reflection__mi>.ao_dark_shader UndefinedClass default: undefined -- texturemap

<Matte_Shadow_Reflection__mi>.ao_distance Float default: 19.685 -- animatable; worldUnits

<Matte_Shadow_Reflection__mi>.ao_on BooleanClass default: true -- animatable; boolean

<Matte_Shadow_Reflection__mi>.ao_samples Integer default: 16 -- animatable; integer

<Matte_Shadow_Reflection__mi>.background Color default: (color 0 0 0 0) -- animatable; fRGBA color

<Matte_Shadow_Reflection__mi>.background_connected BooleanClass default: false -- boolean

<Matte_Shadow_Reflection__mi>.background_paramName UndefinedClass default: undefined -- string;

<Matte_Shadow_Reflection__mi>.background_shader UndefinedClass default: undefined -- texturemap

<Matte_Shadow_Reflection__mi>.bump UndefinedClass default: undefined -- texturemap

<Matte_Shadow_Reflection__mi>.bump_amount Float default: 0.3 -- animatable; float

<Matte_Shadow_Reflection__mi>.bump_amount_connected BooleanClass default: false -- boolean

<Matte_Shadow_Reflection__mi>.bump_amount_paramName UndefinedClass default: undefined -- string

<Matte_Shadow_Reflection__mi>.bump_amount_shader UndefinedClass default: undefined -- texturemap

<Matte_Shadow_Reflection__mi>.catch_illuminators BooleanClass default: false -- animatable; boolean

<Matte_Shadow_Reflection__mi>.catch_indirect BooleanClass default: true -- animatable; boolean

<Matte_Shadow_Reflection__mi>.catch_reflections BooleanClass default: false -- animatable; boolean

<Matte_Shadow_Reflection__mi>.catch_shadows BooleanClass default: true -- animatable; boolean

<Matte_Shadow_Reflection__mi>.colored_shadows Float default: 1.0 -- animatable; float

<Matte_Shadow_Reflection__mi>.Connection_struct__0000__struct_surface UndefinedClass default: undefined -- paramBlock2

<Matte_Shadow_Reflection__mi>.Connection_struct__0001__struct_shadows UndefinedClass default: undefined -- paramBlock2

<Matte_Shadow_Reflection__mi>.Connection_struct__0002__struct_ao UndefinedClass default: undefined -- paramBlock2

<Matte_Shadow_Reflection__mi>.Connection_struct__0003__struct_reflections UndefinedClass default: undefined -- paramBlock2

<Matte_Shadow_Reflection__mi>.Connection_struct__0004__struct_indirect_lighting UndefinedClass default: undefined -- paramBlock2

<Matte_Shadow_Reflection__mi>.Connection_struct__0005__struct_lighting UndefinedClass default: undefined -- paramBlock2

<Matte_Shadow_Reflection__mi>.illuminators ArrayParameter default: #() -- node array; SubAnim

<Matte_Shadow_Reflection__mi>.ImplicitLights ArrayParameter default: #() -- node array; SubAnim

<Matte_Shadow_Reflection__mi>.ImplicitLights ArrayParameter default: #() -- node array; SubAnim

<Matte_Shadow_Reflection__mi>.indirect Float default: 1.0 -- animatable; float

<Matte_Shadow_Reflection__mi>.indirect_connected BooleanClass default: false -- boolean

<Matte_Shadow_Reflection__mi>.indirect_paramName UndefinedClass default: undefined -- string

<Matte_Shadow_Reflection__mi>.indirect_shader UndefinedClass default: undefined -- texturemap

<Matte_Shadow_Reflection__mi>.lights ArrayParameter default: #() -- node array; SubAnim

<Matte_Shadow_Reflection__mi>.mode Integer default: 0 -- animatable; integer

<Matte_Shadow_Reflection__mi>.no_self_shadow BooleanClass default: true -- animatable; boolean

<Matte_Shadow_Reflection__mi>.opacity Float default: 1.0 -- animatable; float

<Matte_Shadow_Reflection__mi>.opacity_connected BooleanClass default: false -- boolean

<Matte_Shadow_Reflection__mi>.opacity_paramName UndefinedClass default: undefined -- string

<Matte_Shadow_Reflection__mi>.opacity_shader UndefinedClass default: undefined -- texturemap

<Matte_Shadow_Reflection__mi>.refl_color Color default: (color 127.5 127.5 127.5) -- animatable; fRGBA color

<Matte_Shadow_Reflection__mi>.refl_color_connected BooleanClass default: false -- boolean

<Matte_Shadow_Reflection__mi>.refl_color_paramName UndefinedClass default: undefined -- string

<Matte_Shadow_Reflection__mi>.refl_color_shader UndefinedClass default: undefined -- texturemap

<Matte_Shadow_Reflection__mi>.refl_falloff Float default: 2.0 -- animatable; float

<Matte_Shadow_Reflection__mi>.refl_glossiness Float default: 1.0 -- animatable; float

<Matte_Shadow_Reflection__mi>.refl_glossiness_connected BooleanClass default: false -- boolean

<Matte_Shadow_Reflection__mi>.refl_glossiness_paramName UndefinedClass default: undefined -- string

<Matte_Shadow_Reflection__mi>.refl_glossiness_shader UndefinedClass default: undefined -- texturemap

<Matte_Shadow_Reflection__mi>.refl_max_dist Float default: 0.0 -- animatable; worldUnits

<Matte_Shadow_Reflection__mi>.refl_samples Integer default: 8 -- animatable; integer

<Matte_Shadow_Reflection__mi>.refl_subtractive Color default: (color 255 255 255) -- animatable; fRGBA color

<Matte_Shadow_Reflection__mi>.refl_subtractive_connected BooleanClass default: false -- boolean

<Matte_Shadow_Reflection__mi>.refl_subtractive_paramName UndefinedClass default: undefined -- string

<Matte_Shadow_Reflection__mi>.refl_subtractive_shader UndefinedClass default: undefined -- texturemap

<Matte_Shadow_Reflection__mi>.shadows Color default: (color 0 0 0) -- animatable; fRGBA color

<Matte_Shadow_Reflection__mi>.struct_ao UndefinedClass default: undefined -- paramBlock2

<Matte_Shadow_Reflection__mi>.struct_indirect_lighting UndefinedClass default: undefined -- paramBlock2

<Matte_Shadow_Reflection__mi>.struct_lighting UndefinedClass default: undefined -- paramBlock2

<Matte_Shadow_Reflection__mi>.struct_reflections UndefinedClass default: undefined -- paramBlock2

<Matte_Shadow_Reflection__mi>.struct_shadows UndefinedClass default: undefined -- paramBlock2

<Matte_Shadow_Reflection__mi>.struct_surface UndefinedClass default: undefined -- paramBlock2

<Matte_Shadow_Reflection__mi>.use_dot_nl BooleanClass default: true -- animatable; boolean

<Matte_Shadow_Reflection__mi>.Use_lights BooleanClass default: false -- boolean

<Matte_Shadow_Reflection__mi>.Use_lights BooleanClass default: false -- boolean

Matte_Shadow_Reflection__mi interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


mr_A_D_Level__Diffuse : RenderElement

mr_A_D_Level__Diffuse - superclass: RenderElement; super-superclass:MAXWrapper - 7:0 - classID: #(1430875960, 440614915)

Constructor:

mr_A_D_Level__Diffuse...

Properties:

<mr_A_D_Level__Diffuse>.atmosphereOn BooleanClass default: true -- boolean

<mr_A_D_Level__Diffuse>.bitmap UndefinedClass default: undefined -- bitmap;

<mr_A_D_Level__Diffuse>.elementName String default: "mr AD Level Diffuse" -- string

<mr_A_D_Level__Diffuse>.enabled BooleanClass default: true -- boolean

<mr_A_D_Level__Diffuse>.filterOn BooleanClass default: true -- boolean; FilteringOn

<mr_A_D_Level__Diffuse>.Multiplier Float default: 1.0 -- animatable; float

<mr_A_D_Level__Diffuse>.shadowOn BooleanClass default: true -- boolean; ShadowsOn

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


mr_A_D_Level__Opacity : RenderElement

mr_A_D_Level__Opacity - superclass: RenderElement; super-superclass:MAXWrapper - 7:0 - classID: #(1430875960, 440614947)

Constructor:

mr_A_D_Level__Opacity...

Properties:

<mr_A_D_Level__Opacity>.atmosphereOn BooleanClass default: true -- boolean

<mr_A_D_Level__Opacity>.bitmap UndefinedClass default: undefined -- bitmap;

<mr_A_D_Level__Opacity>.elementName String default: "mr AD Level Opacity" -- string

<mr_A_D_Level__Opacity>.enabled BooleanClass default: true -- boolean

<mr_A_D_Level__Opacity>.filterOn BooleanClass default: true -- boolean; FilteringOn

<mr_A_D_Level__Opacity>.Multiplier Float default: 1.0 -- animatable; float

<mr_A_D_Level__Opacity>.shadowOn BooleanClass default: true -- boolean; ShadowsOn

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


mr_A_D_Level__Reflections : RenderElement

mr_A_D_Level__Reflections - superclass: RenderElement; super-superclass:MAXWrapper - 7:0 - classID: #(1430875960, 440614921)

Constructor:

mr_A_D_Level__Reflections...

Properties:

<mr_A_D_Level__Reflections>.atmosphereOn BooleanClass default: true -- boolean

<mr_A_D_Level__Reflections>.bitmap UndefinedClass default: undefined -- bitmap

<mr_A_D_Level__Reflections>.elementName String default: "mr AD Level Reflections" -- string

<mr_A_D_Level__Reflections>.enabled BooleanClass default: true -- boolean

<mr_A_D_Level__Reflections>.filterOn BooleanClass default: true -- boolean; FilteringOn

<mr_A_D_Level__Reflections>.Multiplier Float default: 1.0 -- animatable; float

<mr_A_D_Level__Reflections>.shadowOn BooleanClass default: true -- boolean; ShadowsOn

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


mr_A_D_Level__Specular : RenderElement

mr_A_D_Level__Specular - superclass: RenderElement; super-superclass:MAXWrapper - 7:0 - classID: #(1430875960, 440614918)

Constructor:

mr_A_D_Level__Specular...

Properties:

<mr_A_D_Level__Specular>.atmosphereOn BooleanClass default: true -- boolean

<mr_A_D_Level__Specular>.bitmap UndefinedClass default: undefined -- bitmap;

<mr_A_D_Level__Specular>.elementName String default: "mr AD Level Specular" -- string

<mr_A_D_Level__Specular>.enabled BooleanClass default: true -- boolean

<mr_A_D_Level__Specular>.filterOn BooleanClass default: true -- boolean; FilteringOn

<mr_A_D_Level__Specular>.Multiplier Float default: 1.0 -- animatable; float

<mr_A_D_Level__Specular>.shadowOn BooleanClass default: true -- boolean; ShadowsOn

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


mr_A_D_Level__Translucency : RenderElement

mr_A_D_Level__Translucency - superclass: RenderElement; super-superclass:MAXWrapper - 7:0 - classID: #(1430875960, 440614933)

Constructor:

mr_A_D_Level__Translucency...

Properties:

<mr_A_D_Level__Translucency>.atmosphereOn BooleanClass default: true -- boolean

<mr_A_D_Level__Translucency>.bitmap UndefinedClass default: undefined -- bitmap;

<mr_A_D_Level__Translucency>.elementName String default: "mr AD Level Translucency" -- string

<mr_A_D_Level__Translucency>.enabled BooleanClass default: true -- boolean

<mr_A_D_Level__Translucency>.filterOn BooleanClass default: true -- boolean; FilteringOn

<mr_A_D_Level__Translucency>.Multiplier Float default: 1.0 -- animatable; float

<mr_A_D_Level__Translucency>.shadowOn BooleanClass default: true -- boolean; ShadowsOn

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


mr_A_D_Level__Transparency : RenderElement

mr_A_D_Level__Transparency - superclass: RenderElement; super-superclass:MAXWrapper - 7:0 - classID: #(1430875960, 440614930)

Constructor:

mr_A_D_Level__Transparency ...

Properties:

<mr_A_D_Level__Transparency>.atmosphereOn BooleanClass default: true -- boolean

<mr_A_D_Level__Transparency>.bitmap UndefinedClass default: undefined -- bitmap;

<mr_A_D_Level__Transparency>.elementName String default: "mr AD Level Transparency" -- string

<mr_A_D_Level__Transparency>.enabled BooleanClass default: true -- boolean

<mr_A_D_Level__Transparency>.filterOn BooleanClass default: true -- boolean; FilteringOn

<mr_A_D_Level__Transparency>.Multiplier Float default: 1.0 -- animatable; float

<mr_A_D_Level__Transparency>.shadowOn BooleanClass default: true -- boolean; ShadowsOn

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


mr_A_D_Output__Beauty : RenderElement

mr_A_D_Output__Beauty - superclass: RenderElement; super-superclass:MAXWrapper - 7:0 - classID: #(1430875960, 440614912)

Constructor:

mr_A_D_Output__Beauty ...

Properties:

<mr_A_D_Output__Beauty>.atmosphereOn BooleanClass default: true -- boolean

<mr_A_D_Output__Beauty>.bitmap UndefinedClass default: undefined -- bitmap;

<mr_A_D_Output__Beauty>.elementName String default: "mr AD Output Beauty" -- string

<mr_A_D_Output__Beauty>.enabled BooleanClass default: true -- boolean

<mr_A_D_Output__Beauty>.filterOn BooleanClass default: true -- boolean; FilteringOn

<mr_A_D_Output__Beauty>.Multiplier Float default: 1.0 -- animatable; float

<mr_A_D_Output__Beauty>.shadowOn BooleanClass default: true -- boolean; ShadowsOn

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


mr_A_D_Output__Diffuse_Direct_Illumination : RenderElement

mr_A_D_Output__Diffuse_Direct_Illumination - superclass: RenderElement; super-superclass:MAXWrapper - 7:0 - classID: #(1430875960, 440614913)

Constructor:

mr_A_D_Output__Diffuse_Direct_Illumination ...

Properties:

<mr_A_D_Output__Diffuse_Direct_Illumination>.atmosphereOn BooleanClass default: true -- boolean

<mr_A_D_Output__Diffuse_Direct_Illumination>.bitmap UndefinedClass default: undefined -- bitmap; <mr_A_D_Output__Diffuse_Direct_Illumination>.elementName String default: "mr AD Output Diffuse Direct Illumination" -- string

<mr_A_D_Output__Diffuse_Direct_Illumination>.enabled BooleanClass default: true -- boolean

<mr_A_D_Output__Diffuse_Direct_Illumination>.filterOn BooleanClass default: true -- boolean; FilteringOn

<mr_A_D_Output__Diffuse_Direct_Illumination>.Multiplier Float default: 1.0 -- animatable; float

<mr_A_D_Output__Diffuse_Direct_Illumination>.shadowOn BooleanClass default: true -- boolean; ShadowsOn

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


mr_A_D_Output__Diffuse_Indirect_Illumination : RenderElement

mr_A_D_Output__Diffuse_Indirect_Illumination - superclass: RenderElement; super-superclass:MAXWrapper - 7:0 - classID: #(1430875960, 440614934)

Constructor:

mr_A_D_Output__Diffuse_Indirect_Illumination ...

Properties:

<mr_A_D_Output__Diffuse_Indirect_Illumination>.atmosphereOn BooleanClass default: true -- boolean

<mr_A_D_Output__Diffuse_Indirect_Illumination>.bitmap UndefinedClass default: undefined -- bitmap; <mr_A_D_Output__Diffuse_Indirect_Illumination>.elementName String default: "mr AD Output Diffuse Indirect Illumination" -- string

<mr_A_D_Output__Diffuse_Indirect_Illumination>.enabled BooleanClass default: true -- boolean

<mr_A_D_Output__Diffuse_Indirect_Illumination>.filterOn BooleanClass default: true -- boolean; FilteringOn

<mr_A_D_Output__Diffuse_Indirect_Illumination>.Multiplier Float default: 1.0 -- animatable; float

<mr_A_D_Output__Diffuse_Indirect_Illumination>.shadowOn BooleanClass default: true -- boolean; ShadowsOn

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


mr_A_D_Output__Opacity_Background : RenderElement

mr_A_D_Output__Opacity_Background - superclass: RenderElement; super-superclass:MAXWrapper - 7:0 - classID: #(1430875960, 440614945)

Constructor:

mr_A_D_Output__Opacity_Background...

Properties:

<mr_A_D_Output__Opacity_Background>.atmosphereOn BooleanClass default: true -- boolean

<mr_A_D_Output__Opacity_Background>.bitmap UndefinedClass default: undefined -- bitmap;

<mr_A_D_Output__Opacity_Background>.elementName String default: "mr AD Output Opacity Background" -- string

<mr_A_D_Output__Opacity_Background>.enabled BooleanClass default: true -- boolean

<mr_A_D_Output__Opacity_Background>.filterOn BooleanClass default: true -- boolean; FilteringOn

<mr_A_D_Output__Opacity_Background>.Multiplier Float default: 1.0 -- animatable; float

<mr_A_D_Output__Opacity_Background>.shadowOn BooleanClass default: true -- boolean; ShadowsOn

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


mr_A_D_Output__Reflections : RenderElement

mr_A_D_Output__Reflections - superclass: RenderElement; super-superclass:MAXWrapper - 7:0 - classID: #(1430875960, 440614919)

Constructor:

mr_A_D_Output__Reflections ...

Properties:

<mr_A_D_Output__Reflections>.atmosphereOn BooleanClass default: true -- boolean

<mr_A_D_Output__Reflections>.bitmap UndefinedClass default: undefined -- bitmap

<mr_A_D_Output__Reflections>.elementName String default: "mr AD Output Reflections" -- string

<mr_A_D_Output__Reflections>.enabled BooleanClass default: true -- boolean

<mr_A_D_Output__Reflections>.filterOn BooleanClass default: true -- boolean; FilteringOn

<mr_A_D_Output__Reflections>.Multiplier Float default: 1.0 -- animatable; float

<mr_A_D_Output__Reflections>.shadowOn BooleanClass default: true -- boolean; ShadowsOn

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


mr_A_D_Output__Self_Illumination : RenderElement

mr_A_D_Output__Self_Illumination - superclass: RenderElement; super-superclass:MAXWrapper - 7:0 - classID: #(1430875960, 440614944)

Constructor:

mr_A_D_Output__Self_Illumination...

Properties:

<mr_A_D_Output__Self_Illumination>.atmosphereOn BooleanClass default: true -- boolean

<mr_A_D_Output__Self_Illumination>.bitmap UndefinedClass default: undefined -- bitmap

<mr_A_D_Output__Self_Illumination>.elementName String default: "mr AD Output Self Illumination" -- string

<mr_A_D_Output__Self_Illumination>.enabled BooleanClass default: true -- boolean

<mr_A_D_Output__Self_Illumination>.filterOn BooleanClass default: true -- boolean; FilteringOn

<mr_A_D_Output__Self_Illumination>.Multiplier Float default: 1.0 -- animatable; float

<mr_A_D_Output__Self_Illumination>.shadowOn BooleanClass default: true -- boolean; ShadowsOn

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


mr_A_D_Output__Specular : RenderElement

mr_A_D_Output__Specular - superclass: RenderElement; super-superclass:MAXWrapper - 7:0 - classID: #(1430875960, 440614916)

Constructor:

mr_A_D_Output__Specular ...

Properties:

<mr_A_D_Output__Specular>.atmosphereOn BooleanClass default: true -- boolean

<mr_A_D_Output__Specular>.bitmap UndefinedClass default: undefined -- bitmap

<mr_A_D_Output__Specular>.elementName String default: "mr AD Output Specular" -- string

<mr_A_D_Output__Specular>.enabled BooleanClass default: true -- boolean

<mr_A_D_Output__Specular>.filterOn BooleanClass default: true -- boolean; FilteringOn

<mr_A_D_Output__Specular>.Multiplier Float default: 1.0 -- animatable; float

<mr_A_D_Output__Specular>.shadowOn BooleanClass default: true -- boolean; ShadowsOn

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


mr_A_D_Output__Translucency : RenderElement

mr_A_D_Output__Translucency - superclass: RenderElement; super-superclass:MAXWrapper - 7:0 - classID: #(1430875960, 440614931)

Constructor:

mr_A_D_Output__Translucency ...

Properties:

<mr_A_D_Output__Translucency>.atmosphereOn BooleanClass default: true -- boolean

<mr_A_D_Output__Translucency>.bitmap UndefinedClass default: undefined -- bitmap

<mr_A_D_Output__Translucency>.elementName String default: "mr AD Output Translucency" -- string

<mr_A_D_Output__Translucency>.enabled BooleanClass default: true -- boolean

<mr_A_D_Output__Translucency>.filterOn BooleanClass default: true -- boolean; FilteringOn

<mr_A_D_Output__Translucency>.Multiplier Float default: 1.0 -- animatable; float

<mr_A_D_Output__Translucency>.shadowOn BooleanClass default: true -- boolean; ShadowsOn

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


mr_A_D_Output__Transparency : RenderElement

mr_A_D_Output__Transparency - superclass: RenderElement; super-superclass:MAXWrapper - 7:0 - classID: #(1430875960, 440614928)

Constructor:

mr_A_D_Output__Transparency ...

Properties:

<mr_A_D_Output__Transparency>.atmosphereOn BooleanClass default: true -- boolean

<mr_A_D_Output__Transparency>.bitmap UndefinedClass default: undefined -- bitmap

<mr_A_D_Output__Transparency>.elementName String default: "mr AD Output Transparency" -- string

<mr_A_D_Output__Transparency>.enabled BooleanClass default: true -- boolean

<mr_A_D_Output__Transparency>.filterOn BooleanClass default: true -- boolean; FilteringOn

<mr_A_D_Output__Transparency>.Multiplier Float default: 1.0 -- animatable; float

<mr_A_D_Output__Transparency>.shadowOn BooleanClass default: true -- boolean; ShadowsOn

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


mr_A_D_Raw__Ambient_Occlusion : RenderElement

mr_A_D_Raw__Ambient_Occlusion - superclass: RenderElement; super-superclass:MAXWrapper - 7:0 - classID: #(1430875960, 440614937)

Constructor:

mr_A_D_Raw__Ambient_Occlusion ...

Properties:

<mr_A_D_Raw__Ambient_Occlusion>.atmosphereOn BooleanClass default: true -- boolean

<mr_A_D_Raw__Ambient_Occlusion>.bitmap UndefinedClass default: undefined -- bitmap

<mr_A_D_Raw__Ambient_Occlusion>.elementName String default: "mr AD Raw Ambient Occlusion" -- string

<mr_A_D_Raw__Ambient_Occlusion>.enabled BooleanClass default: true -- boolean

<mr_A_D_Raw__Ambient_Occlusion>.filterOn BooleanClass default: true -- boolean; FilteringOn

<mr_A_D_Raw__Ambient_Occlusion>.Multiplier Float default: 1.0 -- animatable; float

<mr_A_D_Raw__Ambient_Occlusion>.shadowOn BooleanClass default: true -- boolean; ShadowsOn

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


mr_A_D_Raw__Diffuse_Direct_Illumination : RenderElement

mr_A_D_Raw__Diffuse_Direct_Illumination - superclass: RenderElement; super-superclass:MAXWrapper - 7:0 - classID: #(1430875960, 440614914)

Constructor:

mr_A_D_Raw__Diffuse_Direct_Illumination ...

Properties:

<mr_A_D_Raw__Diffuse_Direct_Illumination>.atmosphereOn BooleanClass default: true -- boolean

<mr_A_D_Raw__Diffuse_Direct_Illumination>.bitmap UndefinedClass default: undefined -- bitmap

<mr_A_D_Raw__Diffuse_Direct_Illumination>.elementName String default: "mr AD Raw Diffuse Direct Illumination" -- string

<mr_A_D_Raw__Diffuse_Direct_Illumination>.enabled BooleanClass default: true -- boolean

<mr_A_D_Raw__Diffuse_Direct_Illumination>.filterOn BooleanClass default: true -- boolean; FilteringOn

<mr_A_D_Raw__Diffuse_Direct_Illumination>.Multiplier Float default: 1.0 -- animatable; float

<mr_A_D_Raw__Diffuse_Direct_Illumination>.shadowOn BooleanClass default: true -- boolean; ShadowsOn

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


mr_A_D_Raw__Diffuse_Indirect_Illumination : RenderElement

mr_A_D_Raw__Diffuse_Indirect_Illumination - superclass: RenderElement; super-superclass:MAXWrapper - 7:0 - classID: #(1430875960, 440614935)

Constructor:

mr_A_D_Raw__Diffuse_Indirect_Illumination ...

Properties:

<mr_A_D_Raw__Diffuse_Indirect_Illumination>.atmosphereOn BooleanClass default: true -- boolean

<mr_A_D_Raw__Diffuse_Indirect_Illumination>.bitmap UndefinedClass default: undefined -- bitmap

<mr_A_D_Raw__Diffuse_Indirect_Illumination>.elementName String default: "mr AD Raw Diffuse Indirect Illumination" -- string

<mr_A_D_Raw__Diffuse_Indirect_Illumination>.enabled BooleanClass default: true -- boolean

<mr_A_D_Raw__Diffuse_Indirect_Illumination>.filterOn BooleanClass default: true -- boolean; FilteringOn

<mr_A_D_Raw__Diffuse_Indirect_Illumination>.Multiplier Float default: 1.0 -- animatable; float

<mr_A_D_Raw__Diffuse_Indirect_Illumination>.shadowOn BooleanClass default: true -- boolean; ShadowsOn

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


mr_A_D_Raw__Opacity_Background : RenderElement

mr_A_D_Raw__Opacity_Background - superclass: RenderElement; super-superclass:MAXWrapper - 7:0 - classID: #(1430875960, 440614946)

Constructor:

mr_A_D_Raw__Opacity_Background ...

Properties:

<mr_A_D_Raw__Opacity_Background>.atmosphereOn BooleanClass default: true -- boolean

<mr_A_D_Raw__Opacity_Background>.bitmap UndefinedClass default: undefined -- bitmap

<mr_A_D_Raw__Opacity_Background>.elementName String default: "mr AD Raw Opacity Background" -- string

<mr_A_D_Raw__Opacity_Background>.enabled BooleanClass default: true -- boolean

<mr_A_D_Raw__Opacity_Background>.filterOn BooleanClass default: true -- boolean; FilteringOn

<mr_A_D_Raw__Opacity_Background>.Multiplier Float default: 1.0 -- animatable; float

<mr_A_D_Raw__Opacity_Background>.shadowOn BooleanClass default: true -- boolean; ShadowsOn

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


mr_A_D_Raw__Reflections : RenderElement

mr_A_D_Raw__Reflections - superclass: RenderElement; super-superclass:MAXWrapper - 7:0 - classID: #(1430875960, 440614920)

Constructor:

mr_A_D_Raw__Reflections ...

Properties:

<mr_A_D_Raw__Reflections>.atmosphereOn BooleanClass default: true -- boolean

<mr_A_D_Raw__Reflections>.bitmap UndefinedClass default: undefined -- bitmap

<mr_A_D_Raw__Reflections>.elementName String default: "mr AD Raw Reflections" -- string

<mr_A_D_Raw__Reflections>.enabled BooleanClass default: true -- boolean

<mr_A_D_Raw__Reflections>.filterOn BooleanClass default: true -- boolean; FilteringOn

<mr_A_D_Raw__Reflections>.Multiplier Float default: 1.0 -- animatable; float

<mr_A_D_Raw__Reflections>.shadowOn BooleanClass default: true -- boolean; ShadowsOn

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


mr_A_D_Raw__Specular : RenderElement

mr_A_D_Raw__Specular - superclass: RenderElement; super-superclass:MAXWrapper - 7:0 - classID: #(1430875960, 440614917)

Constructor:

mr_A_D_Raw__Specular ...

Properties:

<mr_A_D_Raw__Specular>.atmosphereOn BooleanClass default: true -- boolean

<mr_A_D_Raw__Specular>.bitmap UndefinedClass default: undefined -- bitmap;

<mr_A_D_Raw__Specular>.elementName String default: "mr AD Raw Specular" -- string

<mr_A_D_Raw__Specular>.enabled BooleanClass default: true -- boolean

<mr_A_D_Raw__Specular>.filterOn BooleanClass default: true -- boolean; FilteringOn

<mr_A_D_Raw__Specular>.Multiplier Float default: 1.0 -- animatable; float

<mr_A_D_Raw__Specular>.shadowOn BooleanClass default: true -- boolean; ShadowsOn

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


mr_A_D_Raw__Translucency : RenderElement

mr_A_D_Raw__Translucency - superclass: RenderElement; super-superclass:MAXWrapper - 7:0 - classID: #(1430875960, 440614932)

Constructor:

mr_A_D_Raw__Translucency ...

Properties:

<mr_A_D_Raw__Translucency>.atmosphereOn BooleanClass default: true -- boolean

<mr_A_D_Raw__Translucency>.bitmap UndefinedClass default: undefined -- bitmap;

<mr_A_D_Raw__Translucency>.elementName String default: "mr AD Raw Translucency" -- string

<mr_A_D_Raw__Translucency>.enabled BooleanClass default: true -- boolean

<mr_A_D_Raw__Translucency>.filterOn BooleanClass default: true -- boolean; FilteringOn

<mr_A_D_Raw__Translucency>.Multiplier Float default: 1.0 -- animatable; float

<mr_A_D_Raw__Translucency>.shadowOn BooleanClass default: true -- boolean; ShadowsOn

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


mr_A_D_Raw__Transparency : RenderElement

mr_A_D_Raw__Transparency - superclass: RenderElement; super-superclass:MAXWrapper - 7:0 - classID: #(1430875960, 440614929)

Constructor:

mr_A_D_Raw__Transparency ...

Properties:

<mr_A_D_Raw__Transparency>.atmosphereOn BooleanClass default: true -- boolean

<mr_A_D_Raw__Transparency>.bitmap UndefinedClass default: undefined -- bitmap;

<mr_A_D_Raw__Transparency>.elementName String default: "mr AD Raw Transparency" -- string

<mr_A_D_Raw__Transparency>.enabled BooleanClass default: true -- boolean

<mr_A_D_Raw__Transparency>.filterOn BooleanClass default: true -- boolean; FilteringOn

<mr_A_D_Raw__Transparency>.Multiplier Float default: 1.0 -- animatable; float

<mr_A_D_Raw__Transparency>.shadowOn BooleanClass default: true -- boolean; ShadowsOn

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


mr_A_D_Xtra__Diffuse_Indirect_Illumination_with_AO : RenderElement

mr_A_D_Xtra__Diffuse_Indirect_Illumination_with_AO - superclass: RenderElement; super-superclass:MAXWrapper - 7:0 - classID: #(1430875960, 440614936)

Constructor:

mr_A_D_Xtra__Diffuse_Indirect_Illumination_with_AO ...

Properties:

<mr_A_D_Xtra__Diffuse_Indirect_Illumination_with_AO>.atmosphereOn BooleanClass default: true -- boolean

<mr_A_D_Xtra__Diffuse_Indirect_Illumination_with_AO>.bitmap UndefinedClass default: undefined -- bitmap;

<mr_A_D_Xtra__Diffuse_Indirect_Illumination_with_AO>.elementName String default: "mr AD Xtra Diffuse Inirect Illumination with AO" -- string

<mr_A_D_Xtra__Diffuse_Indirect_Illumination_with_AO>.enabled BooleanClass default: true -- boolean

<mr_A_D_Xtra__Diffuse_Indirect_Illumination_with_AO>.filterOn BooleanClass default: true -- boolean; FilteringOn

<mr_A_D_Xtra__Diffuse_Indirect_Illumination_with_AO>.Multiplier Float default: 1.0 -- animatable; float

<mr_A_D_Xtra__Diffuse_Indirect_Illumination_with_AO>.shadowOn BooleanClass default: true -- boolean; ShadowsOn

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


mr_Shader_Element : RenderElement

mr_Shader_Element - superclass: RenderElement; super-superclass:MAXWrapper - 8:0 - classID: #(584922219, 1020284513)

Constructor:

mr_Shader_Element ...

Properties:

<mr_Shader_Element>.atmosphereOn BooleanClass default: true -- boolean

<mr_Shader_Element>.bitmap UndefinedClass default: undefined -- bitmap; !error setting value!

<mr_Shader_Element>.elementName String default: "mr Shader Element" -- string

<mr_Shader_Element>.enabled BooleanClass default: true -- boolean

<mr_Shader_Element>.filterOn BooleanClass default: true -- boolean; FilteringOn

<mr_Shader_Element>.Multiplier Float default: 1.0 -- animatable; float

<mr_Shader_Element>.shader UndefinedClass default: undefined -- texturemap; Shader_Element

<mr_Shader_Element>.shadowOn BooleanClass default: true -- boolean; ShadowsOn

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Simple_Mtl_Ceramic__adsk : material

Simple_Mtl_Ceramic__adsk - superclass: material; super-superclass:MAXWrapper - 43:0 - classID: #(2004030991, 1543326483)

Constructor:

Simple_Mtl_Ceramic__adsk ...

Properties:

<Simple_Mtl_Ceramic__adsk>.ao_distance Float default: 4.0 -- animatable; float

<Simple_Mtl_Ceramic__adsk>.ao_do_details Integer default: 0 -- animatable; integer

<Simple_Mtl_Ceramic__adsk>.ao_on BooleanClass default: false -- animatable; boolean

<Simple_Mtl_Ceramic__adsk>.ao_samples Integer default: 16 -- animatable; integer

<Simple_Mtl_Ceramic__adsk>.application Integer default: 0 -- animatable; integer

<Simple_Mtl_Ceramic__adsk>.bump_amount Float default: 0.05 -- animatable; float

<Simple_Mtl_Ceramic__adsk>.bump_enable Integer default: 0 -- animatable; integer

<Simple_Mtl_Ceramic__adsk>.bump_map UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Ceramic__adsk>.Connection_struct__0000__m UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Ceramic__adsk>.Connection_struct__0001__o UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Ceramic__adsk>.Connection_struct__0002__p UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Ceramic__adsk>.depthmap String default: "" -- filename

<Simple_Mtl_Ceramic__adsk>.diffuse_color Color default: (color 234.6 234.6 234.6) -- animatable; fRGBA color

<Simple_Mtl_Ceramic__adsk>.diffuse_color_connected BooleanClass default: false -- boolean

<Simple_Mtl_Ceramic__adsk>.diffuse_color_paramName UndefinedClass default: undefined -- string

<Simple_Mtl_Ceramic__adsk>.diffuse_color_shader UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Ceramic__adsk>.front_sss_color Color default: (color 255 216.75 153) -- animatable; RGB color

<Simple_Mtl_Ceramic__adsk>.front_sss_radius Float default: 0.0 -- animatable; float

<Simple_Mtl_Ceramic__adsk>.gbuffer_id Integer default: 8 -- animatable; integer

<Simple_Mtl_Ceramic__adsk>.gbuffer_id_connected BooleanClass default: false -- boolean

<Simple_Mtl_Ceramic__adsk>.gbuffer_id_paramName UndefinedClass default: undefined -- string

<Simple_Mtl_Ceramic__adsk>.gbuffer_id_shader UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Ceramic__adsk>.ImplicitLights ArrayParameter default: #() -- node array; SubAnim

<Simple_Mtl_Ceramic__adsk>.k UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Ceramic__adsk>.lightmap String default: "" -- filename

<Simple_Mtl_Ceramic__adsk>.lightmap_size Float default: 50.0 -- animatable; float

<Simple_Mtl_Ceramic__adsk>.lights ArrayParameter default: #() -- node array; SubAnim

<Simple_Mtl_Ceramic__adsk>.m UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Ceramic__adsk>.mode Integer default: 0 -- animatable; integer

<Simple_Mtl_Ceramic__adsk>.o UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Ceramic__adsk>.p UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Ceramic__adsk>.pattern_amount Float default: 0.25 -- animatable; float

<Simple_Mtl_Ceramic__adsk>.pattern_enable Integer default: 0 -- animatable; integer

<Simple_Mtl_Ceramic__adsk>.pattern_map UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Ceramic__adsk>.refl_depth Integer default: 0 -- animatable; integer

<Simple_Mtl_Ceramic__adsk>.reflection_glossy_samples Integer default: 8 -- animatable; integer

<Simple_Mtl_Ceramic__adsk>.roundcorners_allow_different_materials BooleanClass default: false -- animatable; boolean

<Simple_Mtl_Ceramic__adsk>.roundcorners_radius Float default: 0.0 -- animatable; float

<Simple_Mtl_Ceramic__adsk>.sss_samples Integer default: 64 -- animatable; integer

<Simple_Mtl_Ceramic__adsk>.Type Integer default: 0 -- animatable; integer

<Simple_Mtl_Ceramic__adsk>.Use_lights BooleanClass default: false -- boolean

Simple_Mtl_Ceramic__adsk interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Simple_Mtl_Concrete__adsk : material

Simple_Mtl_Concrete__adsk - superclass: material

Simple_Mtl_Concrete__adsk - superclass: material; super-superclass:MAXWrapper - 48:0 - classID: #(2004030991, 1660902522)

Constructor:

Simple_Mtl_Concrete__adsk ...

adsk_Mtl_Concrete ...

Properties:

<Simple_Mtl_Concrete__adsk>.ao_ambient Color default: (color 0 0 0) -- animatable; fRGBA color

<Simple_Mtl_Concrete__adsk>.ao_dark Color default: (color 51 51 51) -- animatable; fRGBA color

<Simple_Mtl_Concrete__adsk>.ao_distance Float default: 4.0 -- animatable; float

<Simple_Mtl_Concrete__adsk>.ao_do_details BooleanClass default: true -- animatable; boolean

<Simple_Mtl_Concrete__adsk>.ao_on BooleanClass default: false -- animatable; boolean

<Simple_Mtl_Concrete__adsk>.ao_samples Integer default: 16 -- animatable; integer

<Simple_Mtl_Concrete__adsk>.application Integer default: 0 -- animatable; integer

<Simple_Mtl_Concrete__adsk>.brightness_var Integer default: 0 -- animatable; integer

<Simple_Mtl_Concrete__adsk>.brightness_var_map UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Concrete__adsk>.broomcurved_tex String default: "Simple_Concrete_Mtl_BroomCurved_pattern.jpg" -- filename

<Simple_Mtl_Concrete__adsk>.broomstraight_tex String default: "Simple_Concrete_Mtl_BroomStraight_pattern.jpg" -- filename

<Simple_Mtl_Concrete__adsk>.bump_map UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Concrete__adsk>.Connection_struct__0000__m UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Concrete__adsk>.Connection_struct__0001__o UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Concrete__adsk>.Connection_struct__0002__r UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Concrete__adsk>.Connection_struct__0003__p UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Concrete__adsk>.Connection_struct__0004__u UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Concrete__adsk>.Connection_struct__0005__t UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Concrete__adsk>.diffuse_color Color default: (color 178.5 178.5 178.5) -- animatable; fRGBA color

<Simple_Mtl_Concrete__adsk>.diffuse_map UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Concrete__adsk>.diffuse_map_enable Integer default: 0 -- animatable; integer

<Simple_Mtl_Concrete__adsk>.Image_Frame_Number Integer default: 0 -- integer

<Simple_Mtl_Concrete__adsk>.Image_Frame_Number Integer default: 0 -- integer

<Simple_Mtl_Concrete__adsk>.ImplicitLights ArrayParameter default: #() -- node array; SubAnim

<Simple_Mtl_Concrete__adsk>.lights ArrayParameter default: #() -- node array; SubAnim

<Simple_Mtl_Concrete__adsk>.m UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Concrete__adsk>.mode Integer default: 0 -- animatable; integer

<Simple_Mtl_Concrete__adsk>.o UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Concrete__adsk>.p UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Concrete__adsk>.r UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Concrete__adsk>.refl_depth Integer default: 0 -- animatable; integer

<Simple_Mtl_Concrete__adsk>.reflection_glossy_samples Integer default: 8 -- animatable; integer

<Simple_Mtl_Concrete__adsk>.roundcorners_allow_different_materials BooleanClass default: false -- animatable; boolean

<Simple_Mtl_Concrete__adsk>.roundcorners_radius Float default: 0.0 -- animatable; float

<Simple_Mtl_Concrete__adsk>.roundcorners_radius_connected BooleanClass default: false -- boolean

<Simple_Mtl_Concrete__adsk>.roundcorners_radius_paramName UndefinedClass default: undefined -- string; <Simple_Mtl_Concrete__adsk>.roundcorners_radius_shader UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Concrete__adsk>.Scale Float default: 0.0 -- animatable; float

<Simple_Mtl_Concrete__adsk>.Scale_connected BooleanClass default: false -- boolean

<Simple_Mtl_Concrete__adsk>.Scale_paramName UndefinedClass default: undefined -- string

<Simple_Mtl_Concrete__adsk>.Scale_shader UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Concrete__adsk>.t UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Concrete__adsk>.Type Integer default: 0 -- animatable; integer

<Simple_Mtl_Concrete__adsk>.u UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Concrete__adsk>.Use_lights BooleanClass default: false -- boolean

<Simple_Mtl_Concrete__adsk>.uv_channel Integer default: 1 -- animatable; integer

Simple_Mtl_Concrete__adsk interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Simple_Mtl_Generic__adsk : material

Simple_Mtl_Generic__adsk - superclass: material; super-superclass:MAXWrapper - 74:0 - classID: #(2004030991, -1520410832)

Constructor:

Simple_Mtl_Generic__adsk ...

Properties:

<Simple_Mtl_Generic__adsk>.ao_ambient Color default: (color 0 0 0) -- animatable; fRGBA color

<Simple_Mtl_Generic__adsk>.ao_dark Color default: (color 51 51 51) -- animatable; fRGBA color

<Simple_Mtl_Generic__adsk>.ao_distance Float default: 4.0 -- animatable; worldUnits

<Simple_Mtl_Generic__adsk>.ao_do_details BooleanClass default: true -- animatable; boolean

<Simple_Mtl_Generic__adsk>.ao_on BooleanClass default: false -- animatable; boolean

<Simple_Mtl_Generic__adsk>.ao_samples Integer default: 16 -- animatable; integer

<Simple_Mtl_Generic__adsk>.backface_cull BooleanClass default: false -- animatable; boolean

<Simple_Mtl_Generic__adsk>.backface_cull_connected BooleanClass default: false -- boolean

<Simple_Mtl_Generic__adsk>.backface_cull_paramName UndefinedClass default: undefined -- string

<Simple_Mtl_Generic__adsk>.backface_cull_shader UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Generic__adsk>.brdf_0_degree_refl Float default: 0.2 -- animatable; float

<Simple_Mtl_Generic__adsk>.brdf_0_degree_refl_connected BooleanClass default: false -- boolean

<Simple_Mtl_Generic__adsk>.brdf_0_degree_refl_paramName UndefinedClass default: undefined -- string

<Simple_Mtl_Generic__adsk>.brdf_0_degree_refl_shader UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Generic__adsk>.brdf_90_degree_refl Float default: 1.0 -- animatable; float

<Simple_Mtl_Generic__adsk>.brdf_90_degree_refl_connected BooleanClass default: false -- boolean

<Simple_Mtl_Generic__adsk>.brdf_90_degree_refl_paramName UndefinedClass default: undefined -- string

<Simple_Mtl_Generic__adsk>.brdf_90_degree_refl_shader UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Generic__adsk>.bump_amount Float default: 0.3 -- animatable; float

<Simple_Mtl_Generic__adsk>.bump_map UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Generic__adsk>.Connection_struct__0000__m UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Generic__adsk>.Connection_struct__0001__t UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Generic__adsk>.Connection_struct__0002__i UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Generic__adsk>.Connection_struct__0003__o UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Generic__adsk>.Connection_struct__0004__r UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Generic__adsk>.Connection_struct__0005__p UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Generic__adsk>.Connection_struct__0006__x UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Generic__adsk>.cutout_opacity Float default: 1.0 -- animatable; float

<Simple_Mtl_Generic__adsk>.cutout_opacity_connected BooleanClass default: false -- boolean

<Simple_Mtl_Generic__adsk>.cutout_opacity_paramName UndefinedClass default: undefined -- string

<Simple_Mtl_Generic__adsk>.cutout_opacity_shader UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Generic__adsk>.diffuse Color default: (color 191.25 191.25 191.25) -- animatable; fRGBA color

<Simple_Mtl_Generic__adsk>.diffuse_connected BooleanClass default: false -- boolean

<Simple_Mtl_Generic__adsk>.diffuse_paramName UndefinedClass default: undefined -- string

<Simple_Mtl_Generic__adsk>.diffuse_shader UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Generic__adsk>.gbuffer_id Integer default: 9 -- animatable; integer

<Simple_Mtl_Generic__adsk>.i UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Generic__adsk>.ImplicitLights ArrayParameter default: #() -- node array; SubAnim

<Simple_Mtl_Generic__adsk>.lights ArrayParameter default: #() -- node array; SubAnim

<Simple_Mtl_Generic__adsk>.m UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Generic__adsk>.mode Integer default: 0 -- animatable; integer

<Simple_Mtl_Generic__adsk>.o UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Generic__adsk>.p UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Generic__adsk>.r UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Generic__adsk>.x UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Generic__adsk>.refl_depth Integer default: 0 -- animatable; integer

<Simple_Mtl_Generic__adsk>.reflection_glossy_samples Integer default: 8 -- animatable; integer

<Simple_Mtl_Generic__adsk>.refr_depth Integer default: 0 -- animatable; integer

<Simple_Mtl_Generic__adsk>.refr_ior Float default: 1.52 -- animatable; float

<Simple_Mtl_Generic__adsk>.refr_trans_weight Float default: 0.0 -- animatable; float

<Simple_Mtl_Generic__adsk>.refr_trans_weight_connected BooleanClass default: false -- boolean

<Simple_Mtl_Generic__adsk>.refr_trans_weight_paramName UndefinedClass default: undefined -- string

<Simple_Mtl_Generic__adsk>.refr_trans_weight_shader UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Generic__adsk>.refraction_glossy_samples Integer default: 8 -- animatable; integer

<Simple_Mtl_Generic__adsk>.roundcorners_allow_different_materials BooleanClass default: false -- animatable; boolean

<Simple_Mtl_Generic__adsk>.roundcorners_radius Float default: 0.0 -- animatable; worldUnits

<Simple_Mtl_Generic__adsk>.roundcorners_radius_connected BooleanClass default: false -- boolean

<Simple_Mtl_Generic__adsk>.roundcorners_radius_paramName UndefinedClass default: undefined -- string

<Simple_Mtl_Generic__adsk>.roundcorners_radius_shader UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Generic__adsk>.self_illum_color_temperature Float default: 6500.0 -- animatable; float

<Simple_Mtl_Generic__adsk>.self_illum_filter_map Color default: (color 255 255 255) -- animatable; fRGBA color

<Simple_Mtl_Generic__adsk>.self_illum_filter_map_connected BooleanClass default: false -- boolean

<Simple_Mtl_Generic__adsk>.self_illum_filter_map_paramName UndefinedClass default: undefined -- string

<Simple_Mtl_Generic__adsk>.self_illum_filter_map_shader UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Generic__adsk>.self_illum_luminance Float default: 0.0 -- animatable; float

<Simple_Mtl_Generic__adsk>.surf_gloss Float default: 1.0 -- animatable; float

<Simple_Mtl_Generic__adsk>.surf_gloss_connected BooleanClass default: false -- boolean

<Simple_Mtl_Generic__adsk>.surf_gloss_paramName UndefinedClass default: undefined -- string

<Simple_Mtl_Generic__adsk>.surf_gloss_shader UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Generic__adsk>.t UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Generic__adsk>.Transparency Float default: 0.0 -- animatable; float

<Simple_Mtl_Generic__adsk>.Transparency_connected BooleanClass default: false -- boolean

<Simple_Mtl_Generic__adsk>.Transparency_paramName UndefinedClass default: undefined -- string

<Simple_Mtl_Generic__adsk>.Transparency_shader UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Generic__adsk>.Use_lights BooleanClass default: false -- boolean

Simple_Mtl_Generic__adsk interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Simple_Mtl_Glazing__adsk : material

Simple_Mtl_Glazing__adsk - superclass: material; super-superclass:MAXWrapper - 19:0 - classID: #(2004030991, 1190611758)

Constructors:

Simple_Mtl_Glazing__adsk ...

adsk_Mtl_Glazing ...

Properties:

<Simple_Mtl_Glazing__adsk>.Connection_struct__0000__m UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Glazing__adsk>.Connection_struct__0001__p UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Glazing__adsk>.Connection_struct__0002__x UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Glazing__adsk>.gbuffer_id Integer default: 7 -- animatable; integer

<Simple_Mtl_Glazing__adsk>.ImplicitLights ArrayParameter default: #() -- node array; SubAnim

<Simple_Mtl_Glazing__adsk>.lights ArrayParameter default: #() -- node array; SubAnim

<Simple_Mtl_Glazing__adsk>.m UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Glazing__adsk>.p UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Glazing__adsk>.x UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Glazing__adsk>.mode Integer default: 0 -- animatable; integer

<Simple_Mtl_Glazing__adsk>.no_levels Integer default: 2 -- animatable; integer

<Simple_Mtl_Glazing__adsk>.refl_depth Integer default: 0 -- animatable; integer

<Simple_Mtl_Glazing__adsk>.reflectance Float default: 0.1 -- animatable; float

<Simple_Mtl_Glazing__adsk>.refr_depth Integer default: 0 -- animatable; integer

<Simple_Mtl_Glazing__adsk>.transmittance_color Integer default: 0 -- animatable; integer

<Simple_Mtl_Glazing__adsk>.transmittance_map Color default: (color 197.88 210.885 196.095) -- animatable; fRGBA color

<Simple_Mtl_Glazing__adsk>.transmittance_map_connected BooleanClass default: false -- boolean

<Simple_Mtl_Glazing__adsk>.transmittance_map_paramName UndefinedClass default: undefined -- string

<Simple_Mtl_Glazing__adsk>.transmittance_map_shader UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Glazing__adsk>.Use_lights BooleanClass default: false -- boolean

Simple_Mtl_Glazing__adsk interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Simple_Mtl_Hardwood__adsk : material

Simple_Mtl_Hardwood__adsk - superclass: material; super-superclass:MAXWrapper - 35:0 - classID: #(2004030991, 1610308212)

Constructors:

Simple_Mtl_Hardwood__adsk ...

adsk_Mtl_Hardwood ...

Properties:

<Simple_Mtl_Hardwood__adsk>.ao_distance Float default: 4.0 -- animatable; worldUnits

<Simple_Mtl_Hardwood__adsk>.ao_do_details BooleanClass default: false -- animatable; boolean

<Simple_Mtl_Hardwood__adsk>.ao_on BooleanClass default: false -- animatable; boolean

<Simple_Mtl_Hardwood__adsk>.ao_samples Integer default: 16 -- animatable; integer

<Simple_Mtl_Hardwood__adsk>.application Integer default: 0 -- animatable; integer

<Simple_Mtl_Hardwood__adsk>.bump_amount Float default: 0.2 -- animatable; float

<Simple_Mtl_Hardwood__adsk>.bump_enable Integer default: 0 -- animatable; integer

<Simple_Mtl_Hardwood__adsk>.bump_map UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Hardwood__adsk>.Connection_struct__0000__m UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Hardwood__adsk>.Connection_struct__0001__o UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Hardwood__adsk>.Connection_struct__0002__p UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Hardwood__adsk>.Connection_struct__0003__x UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Hardwood__adsk>.diffuse_color UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Hardwood__adsk>.gbuffer_id Integer default: 5 -- animatable; integer

<Simple_Mtl_Hardwood__adsk>.ImplicitLights ArrayParameter default: #() -- node array; SubAnim

<Simple_Mtl_Hardwood__adsk>.lights ArrayParameter default: #() -- node array; SubAnim

<Simple_Mtl_Hardwood__adsk>.m UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Hardwood__adsk>.mode Integer default: 0 -- animatable; integer

<Simple_Mtl_Hardwood__adsk>.o UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Hardwood__adsk>.p UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Hardwood__adsk>.refl_depth Integer default: 0 -- animatable; integer

<Simple_Mtl_Hardwood__adsk>.reflection_glossy_samples Integer default: 8 -- animatable; integer

<Simple_Mtl_Hardwood__adsk>.roundcorners_allow_different_materials BooleanClass default: false -- animatable; boolean

<Simple_Mtl_Hardwood__adsk>.roundcorners_on BooleanClass default: false -- animatable; boolean

<Simple_Mtl_Hardwood__adsk>.roundcorners_radius Float default: 0.25 -- animatable; worldUnits<Simple_Mtl_Hardwood__adsk>.roundcorners_radius_connected BooleanClass default: false -- boolean

<Simple_Mtl_Hardwood__adsk>.roundcorners_radius_paramName UndefinedClass default: undefined -- string

<Simple_Mtl_Hardwood__adsk>.roundcorners_radius_shader UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Hardwood__adsk>.tint Integer default: 0 -- animatable; integer

<Simple_Mtl_Hardwood__adsk>.tint_color Color default: (color 127.5 51 0) -- animatable; fRGBA color

<Simple_Mtl_Hardwood__adsk>.Type Integer default: 0 -- animatable; integer

<Simple_Mtl_Hardwood__adsk>.Use_lights BooleanClass default: false -- boolean

Simple_Mtl_Hardwood__adsk interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Simple_Mtl_Masonry_CMU__adsk : material

Simple_Mtl_Masonry_CMU__adsk - superclass: material; super-superclass:MAXWrapper - 38:0 - classID: #(2004030991, 1395886944)

Constructor:

Simple_Mtl_Masonry__adsk ...

Properties:

<Simple_Mtl_Masonry_CMU__adsk>.ao_ambient Color default: (color 0 0 0) -- animatable; fRGBA color

<Simple_Mtl_Masonry_CMU__adsk>.ao_dark Color default: (color 51 51 51) -- animatable; fRGBA color

<Simple_Mtl_Masonry_CMU__adsk>.ao_distance Float default: 4.0 -- animatable; float

<Simple_Mtl_Masonry_CMU__adsk>.ao_do_details BooleanClass default: true -- animatable; boolean

<Simple_Mtl_Masonry_CMU__adsk>.ao_on BooleanClass default: false -- animatable; boolean

<Simple_Mtl_Masonry_CMU__adsk>.ao_samples Integer default: 16 -- animatable; integer

<Simple_Mtl_Masonry_CMU__adsk>.application Integer default: 0 -- animatable; integer

<Simple_Mtl_Masonry_CMU__adsk>.bump_amount Float default: 0.05 -- animatable; float

<Simple_Mtl_Masonry_CMU__adsk>.bump_enable Integer default: 0 -- animatable; integer

<Simple_Mtl_Masonry_CMU__adsk>.bump_map UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Masonry_CMU__adsk>.Connection_struct__0000__m UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Masonry_CMU__adsk>.Connection_struct__0001__o UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Masonry_CMU__adsk>.Connection_struct__0002__r UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Masonry_CMU__adsk>.Connection_struct__0003__p UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Masonry_CMU__adsk>.diffuse_color Color default: (color 234.6 127.5 234.6) -- animatable; fRGBA color

<Simple_Mtl_Masonry_CMU__adsk>.diffuse_color_connected BooleanClass default: false -- boolean

<Simple_Mtl_Masonry_CMU__adsk>.diffuse_color_paramName UndefinedClass default: undefined -- string

<Simple_Mtl_Masonry_CMU__adsk>.diffuse_color_shader UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Masonry_CMU__adsk>.ImplicitLights ArrayParameter default: #() -- node array; SubAnim

<Simple_Mtl_Masonry_CMU__adsk>.lights ArrayParameter default: #() -- node array; SubAnim

<Simple_Mtl_Masonry_CMU__adsk>.m UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Masonry_CMU__adsk>.mode Integer default: 0 -- animatable; integer

<Simple_Mtl_Masonry_CMU__adsk>.o UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Masonry_CMU__adsk>.p UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Masonry_CMU__adsk>.pattern_amount Float default: 0.25 -- animatable; float

<Simple_Mtl_Masonry_CMU__adsk>.pattern_map UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Masonry_CMU__adsk>.r UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Masonry_CMU__adsk>.refl_depth Integer default: 0 -- animatable; integer

<Simple_Mtl_Masonry_CMU__adsk>.reflection_glossy_samples Integer default: 8 -- animatable; integer

<Simple_Mtl_Masonry_CMU__adsk>.roundcorners_allow_different_materials BooleanClass default: false -- animatable; boolean

<Simple_Mtl_Masonry_CMU__adsk>.roundcorners_radius Float default: 0.0 -- animatable; float

<Simple_Mtl_Masonry_CMU__adsk>.roundcorners_radius_connected BooleanClass default: false -- boolean

<Simple_Mtl_Masonry_CMU__adsk>.roundcorners_radius_paramName UndefinedClass default: undefined -- string

<Simple_Mtl_Masonry_CMU__adsk>.roundcorners_radius_shader UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Masonry_CMU__adsk>.Type Integer default: 0 -- animatable; integer

<Simple_Mtl_Masonry_CMU__adsk>.Use_lights BooleanClass default: false -- boolean

Simple_Mtl_Masonry_CMU__adsk interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Simple_Mtl_Metal__adsk : material

Simple_Mtl_Metal__adsk - superclass: material; super-superclass:MAXWrapper - 67:0 - classID: #(2004030991, -1185657837)

Constructor:

Simple_Mtl_Metal__adsk ...

Properties:

<Simple_Mtl_Metal__adsk>.ao_distance Float default: 4.0 -- animatable; worldUnits

<Simple_Mtl_Metal__adsk>.ao_do_details BooleanClass default: false -- animatable; boolean

<Simple_Mtl_Metal__adsk>.ao_on BooleanClass default: false -- animatable; boolean

<Simple_Mtl_Metal__adsk>.ao_samples Integer default: 16 -- animatable; integer

<Simple_Mtl_Metal__adsk>.application Integer default: 0 -- animatable; integer

<Simple_Mtl_Metal__adsk>.break_def_map String default: "Simple_Metal_Mtl_Break_pattern.jpg" -- filename

<Simple_Mtl_Metal__adsk>.break_def_map_connected BooleanClass default: false -- boolean

<Simple_Mtl_Metal__adsk>.break_def_map_paramName UndefinedClass default: undefined -- string

<Simple_Mtl_Metal__adsk>.break_def_map_shader UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Metal__adsk>.brightness_var Float default: 0.0 -- animatable; float

<Simple_Mtl_Metal__adsk>.brush_def_map String default: "Simple_Metal_Mtl_Brush_pattern.jpg" -- filename

<Simple_Mtl_Metal__adsk>.brush_def_map_connected BooleanClass default: false -- boolean

<Simple_Mtl_Metal__adsk>.brush_def_map_paramName UndefinedClass default: undefined -- string

<Simple_Mtl_Metal__adsk>.brush_def_map_shader UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Metal__adsk>.bump_amount Float default: 0.3 -- animatable; float

<Simple_Mtl_Metal__adsk>.bump_checker_map String default: "Simple_Metal_Mtl_CheckerPlate_pattern.jpg" -- filename

<Simple_Mtl_Metal__adsk>.bump_checker_map_connected BooleanClass default: false -- boolean

<Simple_Mtl_Metal__adsk>.bump_checker_map_paramName UndefinedClass default: undefined -- string

<Simple_Mtl_Metal__adsk>.bump_checker_map_shader UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Metal__adsk>.bump_diamond_map String default: "Simple_Metal_Mtl_DiamondPlate_pattern.jpg" -- filename

<Simple_Mtl_Metal__adsk>.bump_diamond_map_connected BooleanClass default: false -- boolean

<Simple_Mtl_Metal__adsk>.bump_diamond_map_paramName UndefinedClass default: undefined -- string; !error setting value!

<Simple_Mtl_Metal__adsk>.bump_diamond_map_shader UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Metal__adsk>.bump_enable Integer default: 0 -- animatable; integer

<Simple_Mtl_Metal__adsk>.bump_map UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Metal__adsk>.Connection_struct__0000__m UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Metal__adsk>.Connection_struct__0001__o UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Metal__adsk>.Connection_struct__0002__p UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Metal__adsk>.Connection_struct__0003__u UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Metal__adsk>.Connection_struct__0004__t UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Metal__adsk>.Connection_struct__0005__x UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Metal__adsk>.cutouts_enable Integer default: 0 -- animatable; integer

<Simple_Mtl_Metal__adsk>.cutouts_map UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Metal__adsk>.diffuse_color Color default: (color 206.04 210.12 213.945) -- animatable; fRGBA color

<Simple_Mtl_Metal__adsk>.gbuffer_id Integer default: 8 -- animatable; integer

<Simple_Mtl_Metal__adsk>.Image_Frame_Number Integer default: 0 -- integer

<Simple_Mtl_Metal__adsk>.Image_Frame_Number Integer default: 0 -- integer

<Simple_Mtl_Metal__adsk>.Image_Frame_Number Integer default: 0 -- integer

<Simple_Mtl_Metal__adsk>.Image_Frame_Number Integer default: 0 -- integer

<Simple_Mtl_Metal__adsk>.ImplicitLights ArrayParameter default: #() -- node array; SubAnim

<Simple_Mtl_Metal__adsk>.lights ArrayParameter default: #() -- node array; SubAnim

<Simple_Mtl_Metal__adsk>.m UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Metal__adsk>.mode Integer default: 0 -- animatable; integer

<Simple_Mtl_Metal__adsk>.o UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Metal__adsk>.p UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Metal__adsk>.t UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Metal__adsk>.u UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Metal__adsk>.refl_depth Integer default: 0 -- animatable; integer

<Simple_Mtl_Metal__adsk>.refl_gloss_samples Integer default: 8 -- animatable; integer

<Simple_Mtl_Metal__adsk>.roundcorners_allow_different_materials BooleanClass default: false -- animatable; boolean

<Simple_Mtl_Metal__adsk>.roundcorners_radius Float default: 0.0 -- animatable; float

<Simple_Mtl_Metal__adsk>.roundcorners_radius_connected BooleanClass default: false -- boolean

<Simple_Mtl_Metal__adsk>.roundcorners_radius_paramName UndefinedClass default: undefined -- string; !error setting value!

<Simple_Mtl_Metal__adsk>.roundcorners_radius_shader UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Metal__adsk>.Scale Float default: 1.0 -- animatable; float

error accessing parameter: TheList

<Simple_Mtl_Metal__adsk>.Type Integer default: 0 -- animatable; integer

<Simple_Mtl_Metal__adsk>.Use_lights BooleanClass default: false -- boolean

Simple_Mtl_Metal__adsk interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Simple_Mtl_Metal__adsktextureMap : textureMap

Simple_Mtl_Metal__adsktextureMap : textureMap {7773161f,c1705a13}

Constructor:

Simple_Mtl_Metal__adsktextureMap: class instances not creatable by MAXScript

Properties:

<Simple_Mtl_Metal__adsktextureMap>.m : paramBlock2

<Simple_Mtl_Metal__adsktextureMap>.s : paramBlock2

<Simple_Mtl_Metal__adsktextureMap>.o : paramBlock2

<Simple_Mtl_Metal__adsktextureMap>.p : paramBlock2

<Simple_Mtl_Metal__adsktextureMap>.t : paramBlock2

<Simple_Mtl_Metal__adsktextureMap>.u : paramBlock2

<Simple_Mtl_Metal__adsktextureMap>.x : paramBlock2

<Simple_Mtl_Metal__adsktextureMap>.mode : integer

<Simple_Mtl_Metal__adsktextureMap>.lights : node array

<Simple_Mtl_Metal__adsktextureMap>.Use_lights : boolean

<Simple_Mtl_Metal__adsktextureMap>.ImplicitLights : node array

<Simple_Mtl_Metal__adsktextureMap>.diffuse_weight : float

<Simple_Mtl_Metal__adsktextureMap>.diffuse_roughness : float

<Simple_Mtl_Metal__adsktextureMap>.reflectivity : float

<Simple_Mtl_Metal__adsktextureMap>.refl_gloss : float

<Simple_Mtl_Metal__adsktextureMap>.refl_interpolate : boolean

<Simple_Mtl_Metal__adsktextureMap>.refl_is_metal : boolean

<Simple_Mtl_Metal__adsktextureMap>.brdf_0_degree_refl : float

<Simple_Mtl_Metal__adsktextureMap>.brdf_90_degree_refl : float

<Simple_Mtl_Metal__adsktextureMap>.brdf_curve : float

<Simple_Mtl_Metal__adsktextureMap>.bump_local_amount : float

<Simple_Mtl_Metal__adsktextureMap>.diffuse_switcher : integer

<Simple_Mtl_Metal__adsktextureMap>.reflect_switcher : integer

<Simple_Mtl_Metal__adsktextureMap>.bump_switcher : integer

<Simple_Mtl_Metal__adsktextureMap>.aniso_switcher : integer

<Simple_Mtl_Metal__adsktextureMap>.anisorot_switcher : integer

<Simple_Mtl_Metal__adsktextureMap>.user_map : texturemap

<Simple_Mtl_Metal__adsktextureMap>.map_scale : float

<Simple_Mtl_Metal__adsktextureMap>.diffuse_color : fRGBA color

<Simple_Mtl_Metal__adsktextureMap>.reflect_color : fRGBA color

<Simple_Mtl_Metal__adsktextureMap>.reflect_map_amount : float

<Simple_Mtl_Metal__adsktextureMap>.aniso_color : fRGBA color

<Simple_Mtl_Metal__adsktextureMap>.aniso_map_amount : float

<Simple_Mtl_Metal__adsktextureMap>.anisorot_color : fRGBA color

<Simple_Mtl_Metal__adsktextureMap>.anisorot_map_amount : float

<Simple_Mtl_Metal__adsktextureMap>.cutouts_switcher : integer

<Simple_Mtl_Metal__adsktextureMap>.cutouts_user_map : texturemap

<Simple_Mtl_Metal__adsktextureMap>.ao_on : boolean

<Simple_Mtl_Metal__adsktextureMap>.ao_samples : integer

<Simple_Mtl_Metal__adsktextureMap>.ao_distance : float

<Simple_Mtl_Metal__adsktextureMap>.ao_dark : fRGBA color

<Simple_Mtl_Metal__adsktextureMap>.ao_ambient : fRGBA color

<Simple_Mtl_Metal__adsktextureMap>.ao_do_details : boolean

<Simple_Mtl_Metal__adsktextureMap>.refl_gloss_samples : integer

<Simple_Mtl_Metal__adsktextureMap>.refl_depth : integer

<Simple_Mtl_Metal__adsktextureMap>.brush_def_map : filename

<Simple_Mtl_Metal__adsktextureMap>.Image_Frame_Number : integer

<Simple_Mtl_Metal__adsktextureMap>.break_def_map : filename

<Simple_Mtl_Metal__adsktextureMap>.Image_Frame_Number : integer

<Simple_Mtl_Metal__adsktextureMap>.bump_diamond_map : filename

<Simple_Mtl_Metal__adsktextureMap>.Image_Frame_Number : integer

<Simple_Mtl_Metal__adsktextureMap>.bump_checker_map : filename

<Simple_Mtl_Metal__adsktextureMap>.Image_Frame_Number : integer

<Simple_Mtl_Metal__adsktextureMap>.uv_channel : integer

<Simple_Mtl_Metal__adsktextureMap>.u_scale : float

<Simple_Mtl_Metal__adsktextureMap>.v_scale : float

<Simple_Mtl_Metal__adsktextureMap>.noise_tiling : point3

<Simple_Mtl_Metal__adsktextureMap>.noiseanodized_tiling : point3

<Simple_Mtl_Metal__adsktextureMap>.bumpnoise_tiling : point3

<Simple_Mtl_Metal__adsktextureMap>.Connection_struct__0000__m : paramBlock2

<Simple_Mtl_Metal__adsktextureMap>.Connection_struct__0001__s : paramBlock2

<Simple_Mtl_Metal__adsktextureMap>.Connection_struct__0002__o : paramBlock2

<Simple_Mtl_Metal__adsktextureMap>.Connection_struct__0003__p : paramBlock2

<Simple_Mtl_Metal__adsktextureMap>.Connection_struct__0004__t : paramBlock2

<Simple_Mtl_Metal__adsktextureMap>.Connection_struct__0005__u : paramBlock2

<Simple_Mtl_Metal__adsktextureMap>.Connection_struct__0006__x : paramBlock2

<Simple_Mtl_Metal__adsktextureMap>.mode_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.mode_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.mode_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.diffuse_weight_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.diffuse_weight_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.diffuse_weight_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.diffuse_roughness_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.diffuse_roughness_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.diffuse_roughness_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.reflectivity_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.reflectivity_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.reflectivity_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.refl_gloss_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.refl_gloss_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.refl_gloss_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.refl_interpolate_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.refl_interpolate_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.refl_interpolate_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.refl_is_metal_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.refl_is_metal_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.refl_is_metal_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.brdf_0_degree_refl_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.brdf_0_degree_refl_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.brdf_0_degree_refl_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.brdf_90_degree_refl_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.brdf_90_degree_refl_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.brdf_90_degree_refl_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.brdf_curve_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.brdf_curve_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.brdf_curve_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.bump_local_amount_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.bump_local_amount_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.bump_local_amount_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.diffuse_switcher_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.diffuse_switcher_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.diffuse_switcher_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.reflect_switcher_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.reflect_switcher_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.reflect_switcher_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.bump_switcher_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.bump_switcher_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.bump_switcher_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.aniso_switcher_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.aniso_switcher_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.aniso_switcher_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.anisorot_switcher_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.anisorot_switcher_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.anisorot_switcher_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.map_scale_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.map_scale_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.map_scale_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.diffuse_color_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.diffuse_color_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.diffuse_color_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.reflect_color_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.reflect_color_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.reflect_color_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.reflect_map_amount_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.reflect_map_amount_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.reflect_map_amount_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.aniso_color_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.aniso_color_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.aniso_color_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.aniso_map_amount_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.aniso_map_amount_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.aniso_map_amount_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.anisorot_color_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.anisorot_color_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.anisorot_color_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.anisorot_map_amount_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.anisorot_map_amount_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.anisorot_map_amount_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.cutouts_switcher_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.cutouts_switcher_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.cutouts_switcher_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.ao_on_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.ao_on_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.ao_on_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.ao_samples_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.ao_samples_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.ao_samples_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.ao_distance_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.ao_distance_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.ao_distance_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.ao_dark_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.ao_dark_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.ao_dark_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.ao_ambient_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.ao_ambient_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.ao_ambient_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.ao_do_details_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.ao_do_details_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.ao_do_details_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.refl_gloss_samples_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.refl_gloss_samples_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.refl_gloss_samples_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.refl_depth_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.refl_depth_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.refl_depth_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.brush_def_map_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.brush_def_map_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.brush_def_map_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.break_def_map_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.break_def_map_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.break_def_map_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.bump_diamond_map_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.bump_diamond_map_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.bump_diamond_map_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.bump_checker_map_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.bump_checker_map_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.bump_checker_map_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.uv_channel_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.uv_channel_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.uv_channel_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.u_scale_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.u_scale_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.u_scale_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.v_scale_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.v_scale_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.v_scale_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.noise_tiling_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.noise_tiling_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.noise_tiling_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.noiseanodized_tiling_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.noiseanodized_tiling_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.noiseanodized_tiling_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.bumpnoise_tiling_connected : boolean

<Simple_Mtl_Metal__adsktextureMap>.bumpnoise_tiling_shader : texturemap

<Simple_Mtl_Metal__adsktextureMap>.bumpnoise_tiling_paramName : string

<Simple_Mtl_Metal__adsktextureMap>.TheList : maxObject array

<Simple_Mtl_Metal__adsktextureMap>.Shader_Version : integer

Simple_Mtl_Metal__adsktextureMap interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Simple_Mtl_MetallicPaint__adsk : material

Simple_Mtl_MetallicPaint__adsk - superclass: material; super-superclass:MAXWrapper - 35:0 - classID: #(2004030991, -1184796640)

Constructor:

Simple_Mtl_MetallicPaint__adsk ...

Properties:

<Simple_Mtl_MetallicPaint__adsk>.ao_dark Color default: (color 51 51 51) -- animatable; fRGBA color

<Simple_Mtl_MetallicPaint__adsk>.ao_distance Float default: 4.0 -- animatable; float

<Simple_Mtl_MetallicPaint__adsk>.ao_on BooleanClass default: false -- animatable; boolean

<Simple_Mtl_MetallicPaint__adsk>.ao_samples Integer default: 16 -- animatable; integer

<Simple_Mtl_MetallicPaint__adsk>.Connection_struct__0000__m UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_MetallicPaint__adsk>.Connection_struct__0001__o UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_MetallicPaint__adsk>.Connection_struct__0002__r UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_MetallicPaint__adsk>.Connection_struct__0003__p UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_MetallicPaint__adsk>.diffuse_color Color default: (color 204 25.5 0) -- animatable; RGB color

<Simple_Mtl_MetallicPaint__adsk>.diffuse_color_connected BooleanClass default: false -- boolean

<Simple_Mtl_MetallicPaint__adsk>.diffuse_color_paramName UndefinedClass default: undefined -- string

<Simple_Mtl_MetallicPaint__adsk>.diffuse_color_shader UndefinedClass default: undefined -- texturemap

<Simple_Mtl_MetallicPaint__adsk>.flake_color Color default: (color 255 255 255) -- animatable; RGB color

<Simple_Mtl_MetallicPaint__adsk>.flake_color_connected BooleanClass default: false -- boolean

<Simple_Mtl_MetallicPaint__adsk>.flake_color_paramName UndefinedClass default: undefined -- string

<Simple_Mtl_MetallicPaint__adsk>.flake_color_shader UndefinedClass default: undefined -- texturemap

<Simple_Mtl_MetallicPaint__adsk>.flake_enable Integer default: 0 -- animatable; integer

<Simple_Mtl_MetallicPaint__adsk>.ImplicitLights ArrayParameter default: #() -- node array; SubAnim

<Simple_Mtl_MetallicPaint__adsk>.lights ArrayParameter default: #() -- node array; SubAnim

<Simple_Mtl_MetallicPaint__adsk>.m UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_MetallicPaint__adsk>.mode Integer default: 0 -- animatable; integer

<Simple_Mtl_MetallicPaint__adsk>.o UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_MetallicPaint__adsk>.p UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_MetallicPaint__adsk>.r UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_MetallicPaint__adsk>.refl_depth Integer default: 0 -- animatable; integer

<Simple_Mtl_MetallicPaint__adsk>.reflection_glossy_samples Integer default: 8 -- animatable; integer

<Simple_Mtl_MetallicPaint__adsk>.roundcorners_allow_different_materials BooleanClass default: false -- animatable; boolean

<Simple_Mtl_MetallicPaint__adsk>.roundcorners_radius Float default: 0.0 -- animatable; float

<Simple_Mtl_MetallicPaint__adsk>.roundcorners_radius_connected BooleanClass default: false -- boolean

<Simple_Mtl_MetallicPaint__adsk>.roundcorners_radius_paramName UndefinedClass default: undefined -- string

<Simple_Mtl_MetallicPaint__adsk>.roundcorners_radius_shader UndefinedClass default: undefined -- texturemap

<Simple_Mtl_MetallicPaint__adsk>.Type Integer default: 0 -- animatable; integer

<Simple_Mtl_MetallicPaint__adsk>.Use_lights BooleanClass default: false -- boolean

Simple_Mtl_MetallicPaint__adsk interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Simple_Mtl_Mirror__adsk : material

Simple_Mtl_Mirror__adsk - superclass: material; super-superclass:MAXWrapper - 39:0 - classID: #(2004030991, -1156690138)

Constructor:

Simple_Mtl_Mirror__adsk ...

Properties:

<Simple_Mtl_Mirror__adsk>.ao_ambient Color default: (color 0 0 0) -- animatable; fRGBA color

<Simple_Mtl_Mirror__adsk>.ao_ambient_connected BooleanClass default: false -- boolean

<Simple_Mtl_Mirror__adsk>.ao_ambient_paramName UndefinedClass default: undefined -- string

<Simple_Mtl_Mirror__adsk>.ao_ambient_shader UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Mirror__adsk>.ao_dark Color default: (color 51 51 51) -- animatable; fRGBA color

<Simple_Mtl_Mirror__adsk>.ao_dark_connected BooleanClass default: false -- boolean

<Simple_Mtl_Mirror__adsk>.ao_dark_paramName UndefinedClass default: undefined -- string

<Simple_Mtl_Mirror__adsk>.ao_dark_shader UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Mirror__adsk>.ao_distance Float default: 4.0 -- animatable; float

<Simple_Mtl_Mirror__adsk>.ao_distance_connected BooleanClass default: false -- boolean

<Simple_Mtl_Mirror__adsk>.ao_distance_paramName UndefinedClass default: undefined -- string

<Simple_Mtl_Mirror__adsk>.ao_distance_shader UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Mirror__adsk>.ao_do_details BooleanClass default: true -- animatable; boolean

<Simple_Mtl_Mirror__adsk>.ao_do_details_connected BooleanClass default: false -- boolean

<Simple_Mtl_Mirror__adsk>.ao_do_details_paramName UndefinedClass default: undefined -- string

<Simple_Mtl_Mirror__adsk>.ao_do_details_shader UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Mirror__adsk>.ao_on BooleanClass default: false -- animatable; boolean

<Simple_Mtl_Mirror__adsk>.ao_on_connected BooleanClass default: false -- boolean

<Simple_Mtl_Mirror__adsk>.ao_on_paramName UndefinedClass default: undefined -- string

<Simple_Mtl_Mirror__adsk>.ao_on_shader UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Mirror__adsk>.ao_samples Integer default: 16 -- animatable; integer

<Simple_Mtl_Mirror__adsk>.ao_samples_connected BooleanClass default: false -- boolean

<Simple_Mtl_Mirror__adsk>.ao_samples_paramName UndefinedClass default: undefined -- string

<Simple_Mtl_Mirror__adsk>.ao_samples_shader UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Mirror__adsk>.Connection_struct__0000__m UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Mirror__adsk>.ImplicitLights ArrayParameter default: #() -- node array; SubAnim

<Simple_Mtl_Mirror__adsk>.lights ArrayParameter default: #() -- node array; SubAnim

<Simple_Mtl_Mirror__adsk>.m UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Mirror__adsk>.mode Integer default: 0 -- animatable; integer

<Simple_Mtl_Mirror__adsk>.o UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Mirror__adsk>.p UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Mirror__adsk>.r UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Mirror__adsk>.refl_depth Integer default: 0 -- animatable; integer

<Simple_Mtl_Mirror__adsk>.roundcorners_allow_different_materials BooleanClass default: false -- animatable; boolean

<Simple_Mtl_Mirror__adsk>.roundcorners_radius Float default: 0.0 -- animatable; float

<Simple_Mtl_Mirror__adsk>.tint_color Color default: (color 220.575 232.05 220.83) -- animatable; fRGBA color

<Simple_Mtl_Mirror__adsk>.Use_lights BooleanClass default: false -- boolean

Simple_Mtl_Mirror__adsk interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Simple_Mtl_Plastic_Vinyl__adsk : material

Simple_Mtl_Plastic_Vinyl__adsk - superclass: material; super-superclass:MAXWrapper - 41:0 - classID: #(2004030991, -1033983941)

Constructor:

Simple_Mtl_Plastic_Vinyl__adsk ...

Properties:

<Simple_Mtl_Plastic_Vinyl__adsk>.ao_ambient Color default: (color 0 0 0) -- animatable; fRGBA color

<Simple_Mtl_Plastic_Vinyl__adsk>.ao_dark Color default: (color 51 51 51) -- animatable; fRGBA color

<Simple_Mtl_Plastic_Vinyl__adsk>.ao_distance Float default: 4.0 -- animatable; float

<Simple_Mtl_Plastic_Vinyl__adsk>.ao_do_details BooleanClass default: true -- animatable; boolean

<Simple_Mtl_Plastic_Vinyl__adsk>.ao_on BooleanClass default: false -- animatable; boolean

<Simple_Mtl_Plastic_Vinyl__adsk>.ao_samples Integer default: 16 -- animatable; integer

<Simple_Mtl_Plastic_Vinyl__adsk>.application Integer default: 0 -- animatable; integer

<Simple_Mtl_Plastic_Vinyl__adsk>.bump_amount Float default: 0.05 -- animatable; float

<Simple_Mtl_Plastic_Vinyl__adsk>.bump_enable Integer default: 0 -- animatable; integer

<Simple_Mtl_Plastic_Vinyl__adsk>.bump_map UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Plastic_Vinyl__adsk>.Connection_struct__0000__m UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Plastic_Vinyl__adsk>.Connection_struct__0001__o UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Plastic_Vinyl__adsk>.Connection_struct__0002__r UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Plastic_Vinyl__adsk>.Connection_struct__0003__p UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Plastic_Vinyl__adsk>.diffuse_color Color default: (color 225.93 123.93 4.08) -- animatable; fRGBA color

<Simple_Mtl_Plastic_Vinyl__adsk>.diffuse_color_connected BooleanClass default: false -- boolean

<Simple_Mtl_Plastic_Vinyl__adsk>.diffuse_color_paramName UndefinedClass default: undefined -- string; <Simple_Mtl_Plastic_Vinyl__adsk>.diffuse_color_shader UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Plastic_Vinyl__adsk>.ImplicitLights ArrayParameter default: #() -- node array; SubAnim

<Simple_Mtl_Plastic_Vinyl__adsk>.lights ArrayParameter default: #() -- node array; SubAnim

<Simple_Mtl_Plastic_Vinyl__adsk>.m UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Plastic_Vinyl__adsk>.mode Integer default: 0 -- animatable; integer

<Simple_Mtl_Plastic_Vinyl__adsk>.o UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Plastic_Vinyl__adsk>.p UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Plastic_Vinyl__adsk>.pattern_amount Float default: 0.25 -- animatable; float

<Simple_Mtl_Plastic_Vinyl__adsk>.pattern_enable Integer default: 0 -- animatable; integer

<Simple_Mtl_Plastic_Vinyl__adsk>.pattern_map UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Plastic_Vinyl__adsk>.r UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Plastic_Vinyl__adsk>.refl_depth Integer default: 0 -- animatable; integer

<Simple_Mtl_Plastic_Vinyl__adsk>.reflection_glossy_samples Integer default: 8 -- animatable; integer

<Simple_Mtl_Plastic_Vinyl__adsk>.refr_depth Integer default: 0 -- animatable; integer

<Simple_Mtl_Plastic_Vinyl__adsk>.refraction_glossy_samples Integer default: 8 -- animatable; integer

<Simple_Mtl_Plastic_Vinyl__adsk>.roundcorners_allow_different_materials BooleanClass default: false -- animatable; boolean

<Simple_Mtl_Plastic_Vinyl__adsk>.roundcorners_radius Float default: 0.0 -- animatable; float

<Simple_Mtl_Plastic_Vinyl__adsk>.roundcorners_radius_connected BooleanClass default: false -- boolean

<Simple_Mtl_Plastic_Vinyl__adsk>.roundcorners_radius_paramName UndefinedClass default: undefined -- string; <Simple_Mtl_Plastic_Vinyl__adsk>.roundcorners_radius_shader UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Plastic_Vinyl__adsk>.Type Integer default: 0 -- animatable; integer

<Simple_Mtl_Plastic_Vinyl__adsk>.Use_lights BooleanClass default: false -- boolean

Simple_Mtl_Plastic_Vinyl__adsk interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Simple_Mtl_Solid_Glass__adsk : material

Simple_Mtl_Solid_Glass__adsk - superclass: material; super-superclass:MAXWrapper - 33:0 - classID: #(2004030991, 1297002876)

Constructor:

Simple_Mtl_Solid_Glass__adsk ...

Properties:

<Simple_Mtl_Solid_Glass__adsk>.bump_amount Float default: 0.3 -- animatable; float

<Simple_Mtl_Solid_Glass__adsk>.bump_enable Integer default: 0 -- animatable; integer

<Simple_Mtl_Solid_Glass__adsk>.bump_map UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Solid_Glass__adsk>.Connection_struct__0000__m UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Solid_Glass__adsk>.Connection_struct__0001__r UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Solid_Glass__adsk>.Connection_struct__0002__p UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Solid_Glass__adsk>.glossiness Float default: 0.0 -- animatable; float

<Simple_Mtl_Solid_Glass__adsk>.ImplicitLights ArrayParameter default: #() -- node array; SubAnim

<Simple_Mtl_Solid_Glass__adsk>.lights ArrayParameter default: #() -- node array; SubAnim

<Simple_Mtl_Solid_Glass__adsk>.m UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Solid_Glass__adsk>.mode Integer default: 0 -- animatable; integer

<Simple_Mtl_Solid_Glass__adsk>.p UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Solid_Glass__adsk>.r UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Solid_Glass__adsk>.refl_depth Integer default: 0 -- animatable; integer

<Simple_Mtl_Solid_Glass__adsk>.reflectance Float default: 0.05 -- animatable; float

<Simple_Mtl_Solid_Glass__adsk>.reflection_glossy_samples Integer default: 8 -- animatable; integer

<Simple_Mtl_Solid_Glass__adsk>.refr_depth Integer default: 0 -- animatable; integer

<Simple_Mtl_Solid_Glass__adsk>.refr_falloff_dist Float default: 6.0 -- animatable; float

<Simple_Mtl_Solid_Glass__adsk>.refr_ior Float default: 1.52 -- animatable; float

<Simple_Mtl_Solid_Glass__adsk>.refraction_glossy_samples Integer default: 8 -- animatable; integer

<Simple_Mtl_Solid_Glass__adsk>.roundcorners_allow_different_materials BooleanClass default: false -- animatable; boolean

<Simple_Mtl_Solid_Glass__adsk>.roundcorners_radius Float default: 0.0 -- animatable; float

<Simple_Mtl_Solid_Glass__adsk>.roundcorners_radius_connected BooleanClass default: false -- boolean

<Simple_Mtl_Solid_Glass__adsk>.roundcorners_radius_paramName UndefinedClass default: undefined -- string; !error setting value!

<Simple_Mtl_Solid_Glass__adsk>.roundcorners_radius_shader UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Solid_Glass__adsk>.transmittance_color Integer default: 0 -- animatable; integer

<Simple_Mtl_Solid_Glass__adsk>.transmittance_map Color default: (color 197.88 210.885 196.095) -- animatable; fRGBA color

<Simple_Mtl_Solid_Glass__adsk>.transmittance_map_connected BooleanClass default: false -- boolean

<Simple_Mtl_Solid_Glass__adsk>.transmittance_map_paramName UndefinedClass default: undefined -- string; !error setting value!

<Simple_Mtl_Solid_Glass__adsk>.transmittance_map_shader UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Solid_Glass__adsk>.Use_lights BooleanClass default: false -- boolean

Simple_Mtl_Solid_Glass__adsk interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Simple_Mtl_Stone__adsk : material

Simple_Mtl_Stone__adsk - superclass: material; super-superclass:MAXWrapper - 59:0 - classID: #(2004030991, -1369087198)

Constructors:

Simple_Mtl_Stone__adsk ...

adsk_Mtl_Stone ...

Properties:

<Simple_Mtl_Stone__adsk>.ao_distance Float default: 4.0 -- animatable; worldUnits

<Simple_Mtl_Stone__adsk>.ao_do_details BooleanClass default: false -- animatable; boolean

<Simple_Mtl_Stone__adsk>.ao_on BooleanClass default: false -- animatable; boolean

<Simple_Mtl_Stone__adsk>.ao_samples Integer default: 16 -- animatable; integer

<Simple_Mtl_Stone__adsk>.application Integer default: 0 -- animatable; integer

<Simple_Mtl_Stone__adsk>.bump_amount Float default: 0.5 -- animatable; float

<Simple_Mtl_Stone__adsk>.bump_enable Integer default: 0 -- animatable; integer

<Simple_Mtl_Stone__adsk>.bump_map UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Stone__adsk>.Connection_struct__0000__m UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Stone__adsk>.Connection_struct__0001__o UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Stone__adsk>.Connection_struct__0002__p UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Stone__adsk>.Connection_struct__0003__u UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Stone__adsk>.Connection_struct__0004__t UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Stone__adsk>.Connection_struct__0005__x UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Stone__adsk>.diffuse_color Color default: (color 153 153 153) -- animatable; fRGBA color

<Simple_Mtl_Stone__adsk>.diffuse_color_connected BooleanClass default: false -- boolean

<Simple_Mtl_Stone__adsk>.diffuse_color_paramName UndefinedClass default: undefined -- string

<Simple_Mtl_Stone__adsk>.diffuse_color_shader UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Stone__adsk>.gbuffer_id Integer default: 8 -- animatable; integer

<Simple_Mtl_Stone__adsk>.granite_tex String default: "Simple_Stone_Mtl_Granite_bump.jpg" -- filename

<Simple_Mtl_Stone__adsk>.Image_Frame_Number Integer default: 0 -- integer

<Simple_Mtl_Stone__adsk>.Image_Frame_Number Integer default: 0 -- integer

<Simple_Mtl_Stone__adsk>.Image_Frame_Number Integer default: 0 -- integer

<Simple_Mtl_Stone__adsk>.ImplicitLights ArrayParameter default: #() -- node array; SubAnim

<Simple_Mtl_Stone__adsk>.lights ArrayParameter default: #() -- node array; SubAnim

<Simple_Mtl_Stone__adsk>.m UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Stone__adsk>.marble_tex String default: "Simple_Stone_Mtl_Marble_bump.jpg" -- filename

<Simple_Mtl_Stone__adsk>.mode Integer default: 0 -- animatable; integer

<Simple_Mtl_Stone__adsk>.o UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Stone__adsk>.p UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Stone__adsk>.pattern_amount Float default: 0.25 -- animatable; float

<Simple_Mtl_Stone__adsk>.pattern_enable Integer default: 0 -- animatable; integer

<Simple_Mtl_Stone__adsk>.pattern_map UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Stone__adsk>.refl_depth Integer default: 0 -- animatable; integer

<Simple_Mtl_Stone__adsk>.reflection_glossy_samples Integer default: 8 -- animatable; integer

<Simple_Mtl_Stone__adsk>.roundcorners_allow_different_materials BooleanClass default: false -- animatable; boolean

<Simple_Mtl_Stone__adsk>.roundcorners_radius Float default: 0.25 -- animatable; float

<Simple_Mtl_Stone__adsk>.roundcorners_radius_connected BooleanClass default: false -- boolean

<Simple_Mtl_Stone__adsk>.roundcorners_radius_paramName UndefinedClass default: undefined -- string; !error setting value!

<Simple_Mtl_Stone__adsk>.roundcorners_radius_shader UndefinedClass default: undefined -- texturemap

<Simple_Mtl_Stone__adsk>.stonewall_tex String default: "Simple_Stone_Mtl_StoneWall_bump.jpg" -- filename

<Simple_Mtl_Stone__adsk>.t UndefinedClass default: undefined -- paramBlock2

+<Simple_Mtl_Stone__adsk>.tiling Float default: 1.0 -- animatable; float

<Simple_Mtl_Stone__adsk>.u UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Stone__adsk>.Use_lights BooleanClass default: false -- boolean

<Simple_Mtl_Stone__adsk>.uv_channel Integer default: 1 -- animatable; integer

Simple_Mtl_Stone__adsk interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Simple_Mtl_Wall_Paint__adsk : material

Simple_Mtl_Wall_Paint__adsk - superclass: material; super-superclass:MAXWrapper - 30:0 - classID: #(2004030991, 1207541366)

Constructor:

Simple_Mtl_Wall_Paint__adsk ...

Properties:

<Simple_Mtl_Wall_Paint__adsk>.ao_distance Float default: 4.0 -- animatable; worldUnits

<Simple_Mtl_Wall_Paint__adsk>.ao_do_details BooleanClass default: false -- animatable; boolean

<Simple_Mtl_Wall_Paint__adsk>.ao_on BooleanClass default: false -- animatable; boolean

<Simple_Mtl_Wall_Paint__adsk>.ao_samples Integer default: 16 -- animatable; integer

<Simple_Mtl_Wall_Paint__adsk>.application Integer default: 0 -- animatable; integer

<Simple_Mtl_Wall_Paint__adsk>.Connection_struct__0000__m UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Wall_Paint__adsk>.Connection_struct__0001__o UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Wall_Paint__adsk>.Connection_struct__0002__p UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Wall_Paint__adsk>.Connection_struct__0003__x UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Wall_Paint__adsk>.diffuse_color Color default: (color 140.25 51 46.92) -- animatable; fRGBA color

<Simple_Mtl_Wall_Paint__adsk>.gbuffer_id Integer default: 2 -- animatable; integer

<Simple_Mtl_Wall_Paint__adsk>.ImplicitLights ArrayParameter default: #() -- node array; SubAnim

<Simple_Mtl_Wall_Paint__adsk>.Lights ArrayParameter default: #() -- node array; SubAnim

<Simple_Mtl_Wall_Paint__adsk>.m UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Wall_Paint__adsk>.mode Integer default: 0 -- animatable; integer

<Simple_Mtl_Wall_Paint__adsk>.o UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Wall_Paint__adsk>.p UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Wall_Paint__adsk>.refl_depth Integer default: 0 -- animatable; integer

<Simple_Mtl_Wall_Paint__adsk>.reflection_glossy_samples Integer default: 8 -- animatable; integer

<Simple_Mtl_Wall_Paint__adsk>.roundcorners_allow_different_materials BooleanClass default: false -- animatable; boolean

<Simple_Mtl_Wall_Paint__adsk>.roundcorners_on BooleanClass default: false -- animatable; boolean

<Simple_Mtl_Wall_Paint__adsk>.roundcorners_radius Float default: 0.25 -- animatable; worldUnits

<Simple_Mtl_Wall_Paint__adsk>.roundcorners_radius_connected BooleanClass default: false -- boolean

<Simple_Mtl_Wall_Paint__adsk>.roundcorners_radius_paramName UndefinedClass default: undefined -- string;

<Simple_Mtl_Wall_Paint__adsk>.roundcorners_radius_shader UndefinedClass default: undefined -- texturemap<Simple_Mtl_Wall_Paint__adsk>.x UndefinedClass default: undefined -- paramBlock2

Simple_Mtl_Wall_Paint__adsk interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Simple_Mtl_Water__adsk : material

Simple_Mtl_Water__adsk - superclass: material; super-superclass:MAXWrapper - 26:0 - classID: #(2004030991, -1185394665)

Constructors:

Simple_Mtl_Water__adsk ...

adsk_Mtl_Water ...

Properties:

<Simple_Mtl_Water__adsk>.bump_amount Float default: 0.5 -- animatable; float

<Simple_Mtl_Water__adsk>.Connection_struct__0000__m UndefinedClass default: undefined -- paramBlock2

+<Simple_Mtl_Water__adsk>.Connection_struct__0001__p UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Water__adsk>.ImplicitLights ArrayParameter default: #() -- node array; SubAnim

<Simple_Mtl_Water__adsk>.lights ArrayParameter default: #() -- node array; SubAnim

<Simple_Mtl_Water__adsk>.m UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Water__adsk>.mode Integer default: 0 -- animatable; integer

<Simple_Mtl_Water__adsk>.p UndefinedClass default: undefined -- paramBlock2

<Simple_Mtl_Water__adsk>.refl_depth Integer default: 0 -- animatable; integer

<Simple_Mtl_Water__adsk>.reflection_glossy_samples Integer default: 8 -- animatable; integer

<Simple_Mtl_Water__adsk>.refr_depth Integer default: 0 -- animatable; integer

<Simple_Mtl_Water__adsk>.refraction_glossy_samples Integer default: 8 -- animatable; integer

<Simple_Mtl_Water__adsk>.tint_color Color default: (color 220.575 232.05 220.83) -- animatable; fRGBA color

<Simple_Mtl_Water__adsk>.tint_enable Integer default: 0 -- animatable; integer

<Simple_Mtl_Water__adsk>.Type Integer default: 0 -- animatable; integer

<Simple_Mtl_Water__adsk>.Use_lights BooleanClass default: false -- boolean

Simple_Mtl_Water__adsk interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Simple_Checker_Map__adsk : textureMap

Simple_Checker_Map__adsk : textureMap {7773161f,8ffb5f4c}

Constructor:

Simple_Checker_Map__adsk: class instances not creatable by MAXScript

Properties:

<Simple_Checker_Map__adsk>.m : paramBlock2

<Simple_Checker_Map__adsk>.u : paramBlock2

<Simple_Checker_Map__adsk>.mode : integer

<Simple_Checker_Map__adsk>.lights : node array

<Simple_Checker_Map__adsk>.Use_lights : boolean

<Simple_Checker_Map__adsk>.ImplicitLights : node array

<Simple_Checker_Map__adsk>.Color1 : fRGBA color

<Simple_Checker_Map__adsk>.Color2 : fRGBA color

<Simple_Checker_Map__adsk>.Soften : float

<Simple_Checker_Map__adsk>.UScale : float

<Simple_Checker_Map__adsk>.VScale : float

<Simple_Checker_Map__adsk>.UOffset : float

<Simple_Checker_Map__adsk>.VOffset : float

<Simple_Checker_Map__adsk>.WAngle : float

<Simple_Checker_Map__adsk>.MapChannel : integer

<Simple_Checker_Map__adsk>.Connection_struct__0000__m : paramBlock2

<Simple_Checker_Map__adsk>.Connection_struct__0001__u : paramBlock2

<Simple_Checker_Map__adsk>.Color1_connected : boolean

<Simple_Checker_Map__adsk>.Color1_shader : texturemap

<Simple_Checker_Map__adsk>.Color1_paramName : string

<Simple_Checker_Map__adsk>.Color2_connected : boolean

<Simple_Checker_Map__adsk>.Color2_shader : texturemap

<Simple_Checker_Map__adsk>.Color2_paramName : string

<Simple_Checker_Map__adsk>.TheList : maxObject array

<Simple_Checker_Map__adsk>.Shader_Version : integer

Simple_Checker_Map__adsk interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Simple_Hemispherical_Map__adsk : textureMap

Simple_Hemispherical_Map__adsk : textureMap {7773161f,a44ebc28}

Constructor:

Simple_Hemispherical_Map__adsk: class instances not creatable by MAXScript

Properties:

<Simple_Hemispherical_Map__adsk>.m : paramBlock2

<Simple_Hemispherical_Map__adsk>.Bitmap : filename

<Simple_Hemispherical_Map__adsk>.Image_Frame_Number : integer

<Simple_Hemispherical_Map__adsk>.RGBAmount : float

<Simple_Hemispherical_Map__adsk>.Connection_struct__0000__m : paramBlock2

<Simple_Hemispherical_Map__adsk>.Bitmap_connected : boolean

<Simple_Hemispherical_Map__adsk>.Bitmap_shader : texturemap

<Simple_Hemispherical_Map__adsk>.Bitmap_paramName : string

<Simple_Hemispherical_Map__adsk>.RGBAmount_connected : boolean

<Simple_Hemispherical_Map__adsk>.RGBAmount_shader : texturemap

<Simple_Hemispherical_Map__adsk>.RGBAmount_paramName : string

<Simple_Hemispherical_Map__adsk>.TheList : maxObject array

<Simple_Hemispherical_Map__adsk>.Shader_Version : integer

Simple_Hemispherical_Map__adsk interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Simple_Image_Map__Bitmap___adsk : textureMap

Simple_Image_Map__Bitmap___adsk : textureMap {7773161f,7c055833}

Constructor:

Simple_Image_Map__Bitmap___adsk: class instances not creatable by MAXScript

Properties:

<Simple_Image_Map__Bitmap___adsk>.m : paramBlock2

<Simple_Image_Map__Bitmap___adsk>.a : paramBlock2

<Simple_Image_Map__Bitmap___adsk>.u : paramBlock2

<Simple_Image_Map__Bitmap___adsk>.mode : integer

<Simple_Image_Map__Bitmap___adsk>.lights : node array

<Simple_Image_Map__Bitmap___adsk>.Use_lights : boolean

<Simple_Image_Map__Bitmap___adsk>.ImplicitLights : node array

<Simple_Image_Map__Bitmap___adsk>.Bitmap : filename

<Simple_Image_Map__Bitmap___adsk>.Image_Frame_Number : integer

<Simple_Image_Map__Bitmap___adsk>.RGBAmount : float

<Simple_Image_Map__Bitmap___adsk>.Filtering : integer

<Simple_Image_Map__Bitmap___adsk>.Blur : float

<Simple_Image_Map__Bitmap___adsk>.Invert : boolean

<Simple_Image_Map__Bitmap___adsk>.UScale : float

<Simple_Image_Map__Bitmap___adsk>.VScale : float

<Simple_Image_Map__Bitmap___adsk>.UOffset : float

<Simple_Image_Map__Bitmap___adsk>.VOffset : float

<Simple_Image_Map__Bitmap___adsk>.WAngle : float

<Simple_Image_Map__Bitmap___adsk>.MapChannel : integer

<Simple_Image_Map__Bitmap___adsk>.Connection_struct__0000__m : paramBlock2

<Simple_Image_Map__Bitmap___adsk>.Connection_struct__0001__a : paramBlock2

<Simple_Image_Map__Bitmap___adsk>.Connection_struct__0002__u : paramBlock2

<Simple_Image_Map__Bitmap___adsk>.TheList : maxObject array

<Simple_Image_Map__Bitmap___adsk>.Shader_Version : integer

Simple_Image_Map__Bitmap___adsk interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Simple_Marble_Map__adsk : textureMap

Simple_Marble_Map__adsk : textureMap {7773161f,915e5643}

Constructor:

Simple_Marble_Map__adsk: class instances not creatable by MAXScript

Properties:

<Simple_Marble_Map__adsk>.m : paramBlock2

<Simple_Marble_Map__adsk>.u : paramBlock2

<Simple_Marble_Map__adsk>.mode : integer

<Simple_Marble_Map__adsk>.lights : node array

<Simple_Marble_Map__adsk>.Use_lights : boolean

<Simple_Marble_Map__adsk>.ImplicitLights : node array

<Simple_Marble_Map__adsk>.Color1 : fRGBA color

<Simple_Marble_Map__adsk>.Color2 : fRGBA color

<Simple_Marble_Map__adsk>.Size : float

<Simple_Marble_Map__adsk>.Width : float

<Simple_Marble_Map__adsk>.Offset : point3

<Simple_Marble_Map__adsk>.Tiling : point3

<Simple_Marble_Map__adsk>.Angle : point3

<Simple_Marble_Map__adsk>.Connection_struct__0000__m : paramBlock2

<Simple_Marble_Map__adsk>.Connection_struct__0001__u : paramBlock2

<Simple_Marble_Map__adsk>.Color1_connected : boolean

<Simple_Marble_Map__adsk>.Color1_shader : texturemap

<Simple_Marble_Map__adsk>.Color1_paramName : string

<Simple_Marble_Map__adsk>.Color2_connected : boolean

<Simple_Marble_Map__adsk>.Color2_shader : texturemap

<Simple_Marble_Map__adsk>.Color2_paramName : string

<Simple_Marble_Map__adsk>.TheList : maxObject array

<Simple_Marble_Map__adsk>.Shader_Version : integer

Simple_Marble_Map__adsk interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Simple_Noise_Map__adsk : textureMap

Simple_Noise_Map__adsk : textureMap {7773161f,a069bd4d}

Constructor:

Simple_Noise_Map__adsk: class instances not creatable by MAXScript

Properties:

<Simple_Noise_Map__adsk>.m : paramBlock2

<Simple_Noise_Map__adsk>.u : paramBlock2

<Simple_Noise_Map__adsk>.mode : integer

<Simple_Noise_Map__adsk>.lights : node array

<Simple_Noise_Map__adsk>.Use_lights : boolean

<Simple_Noise_Map__adsk>.ImplicitLights : node array

<Simple_Noise_Map__adsk>.Color1 : fRGBA color

<Simple_Noise_Map__adsk>.Color2 : fRGBA color

<Simple_Noise_Map__adsk>.Type : integer

<Simple_Noise_Map__adsk>.Size : float

<Simple_Noise_Map__adsk>.ThresholdLow : float

<Simple_Noise_Map__adsk>.ThresholdHigh : float

<Simple_Noise_Map__adsk>.Levels : float

<Simple_Noise_Map__adsk>.Phase : float

<Simple_Noise_Map__adsk>.Offset : point3

<Simple_Noise_Map__adsk>.Tiling : point3

<Simple_Noise_Map__adsk>.Angle : point3

<Simple_Noise_Map__adsk>.Connection_struct__0000__m : paramBlock2

<Simple_Noise_Map__adsk>.Connection_struct__0001__u : paramBlock2

<Simple_Noise_Map__adsk>.Color1_connected : boolean

<Simple_Noise_Map__adsk>.Color1_shader : texturemap

<Simple_Noise_Map__adsk>.Color1_paramName : string

<Simple_Noise_Map__adsk>.Color2_connected : boolean

<Simple_Noise_Map__adsk>.Color2_shader : texturemap

<Simple_Noise_Map__adsk>.Color2_paramName : string

<Simple_Noise_Map__adsk>.TheList : maxObject array

<Simple_Noise_Map__adsk>.Shader_Version : integer

Simple_Noise_Map__adsk interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Simple_Speckle_Map__adsk : textureMap

Simple_Speckle_Map__adsk : textureMap {7773161f,90104e3c}

Constructor:

Simple_Speckle_Map__adsk: class instances not creatable by MAXScript

Properties:

<Simple_Speckle_Map__adsk>.m : paramBlock2

<Simple_Speckle_Map__adsk>.u : paramBlock2

<Simple_Speckle_Map__adsk>.mode : integer

<Simple_Speckle_Map__adsk>.lights : node array

<Simple_Speckle_Map__adsk>.Use_lights : boolean

<Simple_Speckle_Map__adsk>.ImplicitLights : node array

<Simple_Speckle_Map__adsk>.Color1 : fRGBA color

<Simple_Speckle_Map__adsk>.Color2 : fRGBA color

<Simple_Speckle_Map__adsk>.Size : float

<Simple_Speckle_Map__adsk>.Offset : point3

<Simple_Speckle_Map__adsk>.Tiling : point3

<Simple_Speckle_Map__adsk>.Angle : point3

<Simple_Speckle_Map__adsk>.Connection_struct__0000__m : paramBlock2

<Simple_Speckle_Map__adsk>.Connection_struct__0001__u : paramBlock2

<Simple_Speckle_Map__adsk>.Color1_connected : boolean

<Simple_Speckle_Map__adsk>.Color1_shader : texturemap

<Simple_Speckle_Map__adsk>.Color1_paramName : string

<Simple_Speckle_Map__adsk>.Color2_connected : boolean

<Simple_Speckle_Map__adsk>.Color2_shader : texturemap

<Simple_Speckle_Map__adsk>.Color2_paramName : string

<Simple_Speckle_Map__adsk>.TheList : maxObject array

<Simple_Speckle_Map__adsk>.Shader_Version : integer

Simple_Speckle_Map__adsk interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Simple_Tile_Map__adsk : textureMap

Simple_Tile_Map__adsk : textureMap {7773161f,9264c358}

Constructor:

Simple_Tile_Map__adsk: class instances not creatable by MAXScript

Properties:

<Simple_Tile_Map__adsk>.m : paramBlock2

<Simple_Tile_Map__adsk>.n : paramBlock2

<Simple_Tile_Map__adsk>.o : paramBlock2

<Simple_Tile_Map__adsk>.u : paramBlock2

<Simple_Tile_Map__adsk>.mode : integer

<Simple_Tile_Map__adsk>.lights : node array

<Simple_Tile_Map__adsk>.Use_lights : boolean

<Simple_Tile_Map__adsk>.ImplicitLights : node array

<Simple_Tile_Map__adsk>.BrickType : integer

<Simple_Tile_Map__adsk>.BrickColor : fRGBA color

<Simple_Tile_Map__adsk>.HorizontalCount : float

<Simple_Tile_Map__adsk>.VerticalCount : float

<Simple_Tile_Map__adsk>.ColorVariance : float

<Simple_Tile_Map__adsk>.FadeVariance : float

<Simple_Tile_Map__adsk>.MortarColor : fRGBA color

<Simple_Tile_Map__adsk>.HorizontalGap : float

<Simple_Tile_Map__adsk>.VerticalGap : float

<Simple_Tile_Map__adsk>.EdgeRoughness : float

<Simple_Tile_Map__adsk>.RandomSeed : integer

<Simple_Tile_Map__adsk>.LineShift : float

<Simple_Tile_Map__adsk>.RandomShift : float

<Simple_Tile_Map__adsk>.UseRowEdit : boolean

<Simple_Tile_Map__adsk>.ChangeRow : float

<Simple_Tile_Map__adsk>.PerRow : integer

<Simple_Tile_Map__adsk>.UseColumnEdit : boolean

<Simple_Tile_Map__adsk>.PerColumn : integer

<Simple_Tile_Map__adsk>.ChangeColumn : float

<Simple_Tile_Map__adsk>.UScale : float

<Simple_Tile_Map__adsk>.VScale : float

<Simple_Tile_Map__adsk>.UOffset : float

<Simple_Tile_Map__adsk>.VOffset : float

<Simple_Tile_Map__adsk>.WAngle : float

<Simple_Tile_Map__adsk>.MapChannel : integer

<Simple_Tile_Map__adsk>.Connection_struct__0000__m : paramBlock2

<Simple_Tile_Map__adsk>.Connection_struct__0001__n : paramBlock2

<Simple_Tile_Map__adsk>.Connection_struct__0002__o : paramBlock2

<Simple_Tile_Map__adsk>.Connection_struct__0003__u : paramBlock2

<Simple_Tile_Map__adsk>.BrickColor_connected : boolean

<Simple_Tile_Map__adsk>.BrickColor_shader : texturemap

<Simple_Tile_Map__adsk>.BrickColor_paramName : string

<Simple_Tile_Map__adsk>.MortarColor_connected : boolean

<Simple_Tile_Map__adsk>.MortarColor_shader : texturemap

<Simple_Tile_Map__adsk>.MortarColor_paramName : string

<Simple_Tile_Map__adsk>.TheList : maxObject array

<Simple_Tile_Map__adsk>.Shader_Version : integer

Simple_Tile_Map__adsk interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Simple_Wave_Map__adsk : textureMap

Simple_Wave_Map__adsk : textureMap {7773161f,925abb59}

Constructor:

Simple_Wave_Map__adsk: class instances not creatable by MAXScript

Properties:

<Simple_Wave_Map__adsk>.m : paramBlock2

<Simple_Wave_Map__adsk>.u : paramBlock2

<Simple_Wave_Map__adsk>.mode : integer

<Simple_Wave_Map__adsk>.lights : node array

<Simple_Wave_Map__adsk>.Use_lights : boolean

<Simple_Wave_Map__adsk>.ImplicitLights : node array

<Simple_Wave_Map__adsk>.Color1 : fRGBA color

<Simple_Wave_Map__adsk>.Color2 : fRGBA color

<Simple_Wave_Map__adsk>.Distribution : integer

<Simple_Wave_Map__adsk>.NumWaveSets : integer

<Simple_Wave_Map__adsk>.WaveRadius : float

<Simple_Wave_Map__adsk>.WaveLenMin : float

<Simple_Wave_Map__adsk>.WaveLenMax : float

<Simple_Wave_Map__adsk>.Amplitude : float

<Simple_Wave_Map__adsk>.Phase : float

<Simple_Wave_Map__adsk>.RandomSeed : integer

<Simple_Wave_Map__adsk>.Offset : point3

<Simple_Wave_Map__adsk>.Tiling : point3

<Simple_Wave_Map__adsk>.Angle : point3

<Simple_Wave_Map__adsk>.Connection_struct__0000__m : paramBlock2

<Simple_Wave_Map__adsk>.Connection_struct__0001__u : paramBlock2

<Simple_Wave_Map__adsk>.Color1_connected : boolean

<Simple_Wave_Map__adsk>.Color1_shader : texturemap

<Simple_Wave_Map__adsk>.Color1_paramName : string

<Simple_Wave_Map__adsk>.Color2_connected : boolean

<Simple_Wave_Map__adsk>.Color2_shader : texturemap

<Simple_Wave_Map__adsk>.Color2_paramName : string

<Simple_Wave_Map__adsk>.TheList : maxObject array

<Simple_Wave_Map__adsk>.Shader_Version : integer

Simple_Wave_Map__adsk interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Simple_Wood_Map__adsk : textureMap

Simple_Wood_Map__adsk : textureMap {7773161f,9363bd59}

Constructor:

Simple_Wood_Map__adsk: class instances not creatable by MAXScript

Properties:

<Simple_Wood_Map__adsk>.m : paramBlock2

<Simple_Wood_Map__adsk>.u : paramBlock2

<Simple_Wood_Map__adsk>.mode : integer

<Simple_Wood_Map__adsk>.lights : node array

<Simple_Wood_Map__adsk>.Use_lights : boolean

<Simple_Wood_Map__adsk>.ImplicitLights : node array

<Simple_Wood_Map__adsk>.Color1 : fRGBA color

<Simple_Wood_Map__adsk>.Color2 : fRGBA color

<Simple_Wood_Map__adsk>.Thickness : float

<Simple_Wood_Map__adsk>.RadialNoise : float

<Simple_Wood_Map__adsk>.AxialNoise : float

<Simple_Wood_Map__adsk>.Offset : point3

<Simple_Wood_Map__adsk>.Tiling : point3

<Simple_Wood_Map__adsk>.Angle : point3

<Simple_Wood_Map__adsk>.Connection_struct__0000__m : paramBlock2

<Simple_Wood_Map__adsk>.Connection_struct__0001__u : paramBlock2

<Simple_Wood_Map__adsk>.Color1_connected : boolean

<Simple_Wood_Map__adsk>.Color1_shader : texturemap

<Simple_Wood_Map__adsk>.Color1_paramName : string

<Simple_Wood_Map__adsk>.Color2_connected : boolean

<Simple_Wood_Map__adsk>.Color2_shader : texturemap

<Simple_Wood_Map__adsk>.Color2_paramName : string

<Simple_Wood_Map__adsk>.TheList : maxObject array

<Simple_Wood_Map__adsk>.Shader_Version : integer

Simple_Wood_Map__adsk interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Utility_BumpLookup__protein : textureMap

Utility_BumpLookup__protein : textureMap {7773161f,bf0b6729}

Constructor:

Utility_BumpLookup__protein: class instances not creatable by MAXScript

Properties:

<Utility_BumpLookup__protein>.coord : point3

<Utility_BumpLookup__protein>.elipt_enable : boolean

<Utility_BumpLookup__protein>.elipt_disc_r : float

<Utility_BumpLookup__protein>.elipt_eccmax : float

<Utility_BumpLookup__protein>.elipt_maxminor : float

<Utility_BumpLookup__protein>.elipt_circle : float

<Utility_BumpLookup__protein>.elipt_bilinear : boolean

<Utility_BumpLookup__protein>.elipt_space : integer

<Utility_BumpLookup__protein>.elipt_remap : texturemap

<Utility_BumpLookup__protein>.u : point3

<Utility_BumpLookup__protein>.v : point3

<Utility_BumpLookup__protein>.step : point3

<Utility_BumpLookup__protein>.factor : float

<Utility_BumpLookup__protein>.switcher_slot : integer

<Utility_BumpLookup__protein>.is_3Dbump : boolean

<Utility_BumpLookup__protein>.input_texture_00 : filename

<Utility_BumpLookup__protein>.Image_Frame_Number : integer

<Utility_BumpLookup__protein>.input_texture_01 : filename

<Utility_BumpLookup__protein>.Image_Frame_Number : integer

<Utility_BumpLookup__protein>.input_texture_02 : filename

<Utility_BumpLookup__protein>.Image_Frame_Number : integer

<Utility_BumpLookup__protein>.input_texture_03 : filename

<Utility_BumpLookup__protein>.Image_Frame_Number : integer

<Utility_BumpLookup__protein>.input_texture_04 : filename

<Utility_BumpLookup__protein>.Image_Frame_Number : integer

<Utility_BumpLookup__protein>.input_texture_05 : filename

<Utility_BumpLookup__protein>.Image_Frame_Number : integer

<Utility_BumpLookup__protein>.input_texture_06 : filename

<Utility_BumpLookup__protein>.Image_Frame_Number : integer

<Utility_BumpLookup__protein>.input_texture_07 : filename

<Utility_BumpLookup__protein>.Image_Frame_Number : integer

<Utility_BumpLookup__protein>.input_color_00 : fRGBA color

<Utility_BumpLookup__protein>.input_color_01 : fRGBA color

<Utility_BumpLookup__protein>.input_color_02 : fRGBA color

<Utility_BumpLookup__protein>.input_color_03 : fRGBA color

<Utility_BumpLookup__protein>.input_color_04 : fRGBA color

<Utility_BumpLookup__protein>.input_color_05 : fRGBA color

<Utility_BumpLookup__protein>.input_color_06 : fRGBA color

<Utility_BumpLookup__protein>.input_color_07 : fRGBA color

<Utility_BumpLookup__protein>.coord_connected : boolean

<Utility_BumpLookup__protein>.coord_shader : texturemap

<Utility_BumpLookup__protein>.coord_paramName : string

<Utility_BumpLookup__protein>.elipt_enable_connected : boolean

<Utility_BumpLookup__protein>.elipt_enable_shader : texturemap

<Utility_BumpLookup__protein>.elipt_enable_paramName : string

<Utility_BumpLookup__protein>.u_connected : boolean

<Utility_BumpLookup__protein>.u_shader : texturemap

<Utility_BumpLookup__protein>.u_paramName : string

<Utility_BumpLookup__protein>.v_connected : boolean

<Utility_BumpLookup__protein>.v_shader : texturemap

<Utility_BumpLookup__protein>.v_paramName : string

<Utility_BumpLookup__protein>.is_3Dbump_connected : boolean

<Utility_BumpLookup__protein>.is_3Dbump_shader : texturemap

<Utility_BumpLookup__protein>.is_3Dbump_paramName : string

<Utility_BumpLookup__protein>.input_texture_00_connected : boolean

<Utility_BumpLookup__protein>.input_texture_00_shader : texturemap

<Utility_BumpLookup__protein>.input_texture_00_paramName : string

<Utility_BumpLookup__protein>.input_texture_01_connected : boolean

<Utility_BumpLookup__protein>.input_texture_01_shader : texturemap

<Utility_BumpLookup__protein>.input_texture_01_paramName : string

<Utility_BumpLookup__protein>.input_texture_02_connected : boolean

<Utility_BumpLookup__protein>.input_texture_02_shader : texturemap

<Utility_BumpLookup__protein>.input_texture_02_paramName : string

<Utility_BumpLookup__protein>.input_texture_03_connected : boolean

<Utility_BumpLookup__protein>.input_texture_03_shader : texturemap

<Utility_BumpLookup__protein>.input_texture_03_paramName : string

<Utility_BumpLookup__protein>.input_texture_04_connected : boolean

<Utility_BumpLookup__protein>.input_texture_04_shader : texturemap

<Utility_BumpLookup__protein>.input_texture_04_paramName : string

<Utility_BumpLookup__protein>.input_texture_05_connected : boolean

<Utility_BumpLookup__protein>.input_texture_05_shader : texturemap

<Utility_BumpLookup__protein>.input_texture_05_paramName : string

<Utility_BumpLookup__protein>.input_texture_06_connected : boolean

<Utility_BumpLookup__protein>.input_texture_06_shader : texturemap

<Utility_BumpLookup__protein>.input_texture_06_paramName : string

<Utility_BumpLookup__protein>.input_texture_07_connected : boolean

<Utility_BumpLookup__protein>.input_texture_07_shader : texturemap

<Utility_BumpLookup__protein>.input_texture_07_paramName : string

<Utility_BumpLookup__protein>.input_color_00_connected : boolean

<Utility_BumpLookup__protein>.input_color_00_shader : texturemap

<Utility_BumpLookup__protein>.input_color_00_paramName : string

<Utility_BumpLookup__protein>.input_color_01_connected : boolean

<Utility_BumpLookup__protein>.input_color_01_shader : texturemap

<Utility_BumpLookup__protein>.input_color_01_paramName : string

<Utility_BumpLookup__protein>.input_color_02_connected : boolean

<Utility_BumpLookup__protein>.input_color_02_shader : texturemap

<Utility_BumpLookup__protein>.input_color_02_paramName : string

<Utility_BumpLookup__protein>.input_color_03_connected : boolean

<Utility_BumpLookup__protein>.input_color_03_shader : texturemap

<Utility_BumpLookup__protein>.input_color_03_paramName : string

<Utility_BumpLookup__protein>.input_color_04_connected : boolean

<Utility_BumpLookup__protein>.input_color_04_shader : texturemap

<Utility_BumpLookup__protein>.input_color_04_paramName : string

<Utility_BumpLookup__protein>.input_color_05_connected : boolean

<Utility_BumpLookup__protein>.input_color_05_shader : texturemap

<Utility_BumpLookup__protein>.input_color_05_paramName : string

<Utility_BumpLookup__protein>.input_color_06_connected : boolean

<Utility_BumpLookup__protein>.input_color_06_shader : texturemap

<Utility_BumpLookup__protein>.input_color_06_paramName : string

<Utility_BumpLookup__protein>.input_color_07_connected : boolean

<Utility_BumpLookup__protein>.input_color_07_shader : texturemap

<Utility_BumpLookup__protein>.input_color_07_paramName : string

<Utility_BumpLookup__protein>.TheList : maxObject array

<Utility_BumpLookup__protein>.Shader_Version : integer

Utility_BumpLookup__protein interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Utility_Color_Correction_Internal__protein : textureMap

Utility_Color_Correction_Internal__protein : textureMap {7773161f,bb47b677}

Constructor:

Utility_Color_Correction_Internal__protein: class instances not creatable by MAXScript

Properties:

<Utility_Color_Correction_Internal__protein>.input : fRGBA color

<Utility_Color_Correction_Internal__protein>.gamma : float

<Utility_Color_Correction_Internal__protein>.gain : float

<Utility_Color_Correction_Internal__protein>.bias : float

<Utility_Color_Correction_Internal__protein>.hue : float

<Utility_Color_Correction_Internal__protein>.sat : float

<Utility_Color_Correction_Internal__protein>.value : float

<Utility_Color_Correction_Internal__protein>.invert : boolean

<Utility_Color_Correction_Internal__protein>.dynRangeEnable : boolean

<Utility_Color_Correction_Internal__protein>.dynRangeExpand : float

<Utility_Color_Correction_Internal__protein>.dynRangeStartLum : float

<Utility_Color_Correction_Internal__protein>.dynRangeExponent : float

<Utility_Color_Correction_Internal__protein>.cache_mode : integer

<Utility_Color_Correction_Internal__protein>.input_connected : boolean

<Utility_Color_Correction_Internal__protein>.input_shader : texturemap

<Utility_Color_Correction_Internal__protein>.input_paramName : string

<Utility_Color_Correction_Internal__protein>.gamma_connected : boolean

<Utility_Color_Correction_Internal__protein>.gamma_shader : texturemap

<Utility_Color_Correction_Internal__protein>.gamma_paramName : string

<Utility_Color_Correction_Internal__protein>.gain_connected : boolean

<Utility_Color_Correction_Internal__protein>.gain_shader : texturemap

<Utility_Color_Correction_Internal__protein>.gain_paramName : string

<Utility_Color_Correction_Internal__protein>.bias_connected : boolean

<Utility_Color_Correction_Internal__protein>.bias_shader : texturemap

<Utility_Color_Correction_Internal__protein>.bias_paramName : string

<Utility_Color_Correction_Internal__protein>.hue_connected : boolean

<Utility_Color_Correction_Internal__protein>.hue_shader : texturemap

<Utility_Color_Correction_Internal__protein>.hue_paramName : string

<Utility_Color_Correction_Internal__protein>.sat_connected : boolean

<Utility_Color_Correction_Internal__protein>.sat_shader : texturemap

<Utility_Color_Correction_Internal__protein>.sat_paramName : string

<Utility_Color_Correction_Internal__protein>.value_connected : boolean

<Utility_Color_Correction_Internal__protein>.value_shader : texturemap

<Utility_Color_Correction_Internal__protein>.value_paramName : string

<Utility_Color_Correction_Internal__protein>.invert_connected : boolean

<Utility_Color_Correction_Internal__protein>.invert_shader : texturemap

<Utility_Color_Correction_Internal__protein>.invert_paramName : string

<Utility_Color_Correction_Internal__protein>.dynRangeEnable_connected : boolean

<Utility_Color_Correction_Internal__protein>.dynRangeEnable_shader : texturemap

<Utility_Color_Correction_Internal__protein>.dynRangeEnable_paramName : string

<Utility_Color_Correction_Internal__protein>.dynRangeExpand_connected : boolean

<Utility_Color_Correction_Internal__protein>.dynRangeExpand_shader : texturemap

<Utility_Color_Correction_Internal__protein>.dynRangeExpand_paramName : string

<Utility_Color_Correction_Internal__protein>.dynRangeStartLum_connected : boolean

<Utility_Color_Correction_Internal__protein>.dynRangeStartLum_shader : texturemap

<Utility_Color_Correction_Internal__protein>.dynRangeStartLum_paramName : string

<Utility_Color_Correction_Internal__protein>.dynRangeExponent_connected : boolean

<Utility_Color_Correction_Internal__protein>.dynRangeExponent_shader : texturemap

<Utility_Color_Correction_Internal__protein>.dynRangeExponent_paramName : string

<Utility_Color_Correction_Internal__protein>.cache_mode_connected : boolean

<Utility_Color_Correction_Internal__protein>.cache_mode_shader : texturemap

<Utility_Color_Correction_Internal__protein>.cache_mode_paramName : string

<Utility_Color_Correction_Internal__protein>.TheList : maxObject array

<Utility_Color_Correction_Internal__protein>.Shader_Version : integer

Utility_Color_Correction_Internal__protein interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Utility_ColorCorrection_Maya_Shaders__protein : textureMap

Utility_ColorCorrection_Maya_Shaders__protein : textureMap {7773161f,bb47b669}

Constructor:

Utility_ColorCorrection_Maya_Shaders__protein: class instances not creatable by

MAXScript

Properties:

<Utility_ColorCorrection_Maya_Shaders__protein>.shader : texturemap

<Utility_ColorCorrection_Maya_Shaders__protein>.type : integer

<Utility_ColorCorrection_Maya_Shaders__protein>.gamma : float

<Utility_ColorCorrection_Maya_Shaders__protein>.contrast : float

<Utility_ColorCorrection_Maya_Shaders__protein>.bias : float

<Utility_ColorCorrection_Maya_Shaders__protein>.gamma_connected : boolean

<Utility_ColorCorrection_Maya_Shaders__protein>.gamma_shader : texturemap

<Utility_ColorCorrection_Maya_Shaders__protein>.gamma_paramName : string

<Utility_ColorCorrection_Maya_Shaders__protein>.contrast_connected : boolean

<Utility_ColorCorrection_Maya_Shaders__protein>.contrast_shader : texturemap

<Utility_ColorCorrection_Maya_Shaders__protein>.contrast_paramName : string

<Utility_ColorCorrection_Maya_Shaders__protein>.bias_connected : boolean

<Utility_ColorCorrection_Maya_Shaders__protein>.bias_shader : texturemap

<Utility_ColorCorrection_Maya_Shaders__protein>.bias_paramName : string

<Utility_ColorCorrection_Maya_Shaders__protein>.TheList : maxObject array

<Utility_ColorCorrection_Maya_Shaders__protein>.Shader_Version : integer

Utility_ColorCorrection_Maya_Shaders__protein interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Utility_ColorPassThrough__protein : textureMap

Utility_ColorPassThrough__protein : textureMap {7773161f,bf5fb91e}

Constructor:

Utility_ColorPassThrough__protein: class instances not creatable by MAXScript

Properties:

<Utility_ColorPassThrough__protein>.color : fRGBA color

<Utility_ColorPassThrough__protein>.color_connected : boolean

<Utility_ColorPassThrough__protein>.color_shader : texturemap

<Utility_ColorPassThrough__protein>.color_paramName : string

<Utility_ColorPassThrough__protein>.TheList : maxObject array

<Utility_ColorPassThrough__protein>.Shader_Version : integer

Utility_ColorPassThrough__protein interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Utility_Combine3Bump__protein : textureMap

Utility_Combine3Bump__protein : textureMap {7773161f,63f9743f}

Constructor:

Utility_Combine3Bump__protein: class instances not creatable by MAXScript

Properties:

<Utility_Combine3Bump__protein>.shader : texturemap

<Utility_Combine3Bump__protein>.factor_global : float

<Utility_Combine3Bump__protein>.bump_1 : texturemap

<Utility_Combine3Bump__protein>.factor_1 : float

<Utility_Combine3Bump__protein>.bump_2 : texturemap

<Utility_Combine3Bump__protein>.factor_2 : float

<Utility_Combine3Bump__protein>.bump_3 : texturemap

<Utility_Combine3Bump__protein>.factor_3 : float

<Utility_Combine3Bump__protein>.factor_global_connected : boolean

<Utility_Combine3Bump__protein>.factor_global_shader : texturemap

<Utility_Combine3Bump__protein>.factor_global_paramName : string

<Utility_Combine3Bump__protein>.factor_1_connected : boolean

<Utility_Combine3Bump__protein>.factor_1_shader : texturemap

<Utility_Combine3Bump__protein>.factor_1_paramName : string

<Utility_Combine3Bump__protein>.factor_2_connected : boolean

<Utility_Combine3Bump__protein>.factor_2_shader : texturemap

<Utility_Combine3Bump__protein>.factor_2_paramName : string

<Utility_Combine3Bump__protein>.factor_3_connected : boolean

<Utility_Combine3Bump__protein>.factor_3_shader : texturemap

<Utility_Combine3Bump__protein>.factor_3_paramName : string

<Utility_Combine3Bump__protein>.TheList : maxObject array

<Utility_Combine3Bump__protein>.Shader_Version : integer

Utility_Combine3Bump__protein interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Utility_Elliptical_Bump__protein : textureMap

Utility_Elliptical_Bump__protein : textureMap {7773161f,9b0d4424}

Constructor:

Utility_Elliptical_Bump__protein: class instances not creatable by MAXScript

Properties:

<Utility_Elliptical_Bump__protein>.t : paramBlock2

<Utility_Elliptical_Bump__protein>.b : paramBlock2

<Utility_Elliptical_Bump__protein>.e : paramBlock2

<Utility_Elliptical_Bump__protein>.s : paramBlock2

<Utility_Elliptical_Bump__protein>.input_texture_00 : filename

<Utility_Elliptical_Bump__protein>.Image_Frame_Number : integer

<Utility_Elliptical_Bump__protein>.input_color_00 : fRGBA color

<Utility_Elliptical_Bump__protein>.bump_multiplier : float

<Utility_Elliptical_Bump__protein>.is_3Dbump : boolean

<Utility_Elliptical_Bump__protein>.elipt_enable : boolean

<Utility_Elliptical_Bump__protein>.elipt_disc_r : float

<Utility_Elliptical_Bump__protein>.elipt_circle : float

<Utility_Elliptical_Bump__protein>.elipt_eccmax : float

<Utility_Elliptical_Bump__protein>.elipt_maxminor : float

<Utility_Elliptical_Bump__protein>.elipt_bilinear : boolean

<Utility_Elliptical_Bump__protein>.switcher_slot : integer

<Utility_Elliptical_Bump__protein>.input_texture_01 : filename

<Utility_Elliptical_Bump__protein>.Image_Frame_Number : integer

<Utility_Elliptical_Bump__protein>.input_color_01 : fRGBA color

<Utility_Elliptical_Bump__protein>.input_texture_02 : filename

<Utility_Elliptical_Bump__protein>.Image_Frame_Number : integer

<Utility_Elliptical_Bump__protein>.input_color_02 : fRGBA color

<Utility_Elliptical_Bump__protein>.input_texture_03 : filename

<Utility_Elliptical_Bump__protein>.Image_Frame_Number : integer

<Utility_Elliptical_Bump__protein>.input_color_03 : fRGBA color

<Utility_Elliptical_Bump__protein>.input_texture_04 : filename

<Utility_Elliptical_Bump__protein>.Image_Frame_Number : integer

<Utility_Elliptical_Bump__protein>.input_color_04 : fRGBA color

<Utility_Elliptical_Bump__protein>.input_texture_05 : filename

<Utility_Elliptical_Bump__protein>.Image_Frame_Number : integer

<Utility_Elliptical_Bump__protein>.input_color_05 : fRGBA color

<Utility_Elliptical_Bump__protein>.input_texture_06 : filename

<Utility_Elliptical_Bump__protein>.Image_Frame_Number : integer

<Utility_Elliptical_Bump__protein>.input_color_06 : fRGBA color

<Utility_Elliptical_Bump__protein>.input_texture_07 : filename

<Utility_Elliptical_Bump__protein>.Image_Frame_Number : integer

<Utility_Elliptical_Bump__protein>.input_color_07 : fRGBA color

<Utility_Elliptical_Bump__protein>.Connection_struct__0000__t : paramBlock2

<Utility_Elliptical_Bump__protein>.Connection_struct__0001__b : paramBlock2

<Utility_Elliptical_Bump__protein>.Connection_struct__0002__e : paramBlock2

<Utility_Elliptical_Bump__protein>.bump_multiplier_connected : boolean

<Utility_Elliptical_Bump__protein>.bump_multiplier_shader : texturemap

<Utility_Elliptical_Bump__protein>.bump_multiplier_paramName : string

<Utility_Elliptical_Bump__protein>.TheList : maxObject array

<Utility_Elliptical_Bump__protein>.Shader_Version : integer

Utility_Elliptical_Bump__protein interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Utility_Elliptical_Tex__protein : textureMap

Utility_Elliptical_Tex__protein : textureMap {7773161f,895d5914}

Constructor:

Utility_Elliptical_Tex__protein: class instances not creatable by MAXScript

Properties:

<Utility_Elliptical_Tex__protein>.t : paramBlock2

<Utility_Elliptical_Tex__protein>.e : paramBlock2

<Utility_Elliptical_Tex__protein>.s : paramBlock2

<Utility_Elliptical_Tex__protein>.input_texture_00 : filename

<Utility_Elliptical_Tex__protein>.Image_Frame_Number : integer

<Utility_Elliptical_Tex__protein>.gamma : float

<Utility_Elliptical_Tex__protein>.elipt_enable : boolean

<Utility_Elliptical_Tex__protein>.elipt_disc_r : float

<Utility_Elliptical_Tex__protein>.elipt_circle : float

<Utility_Elliptical_Tex__protein>.elipt_eccmax : float

<Utility_Elliptical_Tex__protein>.elipt_maxminor : float

<Utility_Elliptical_Tex__protein>.elipt_bilinear : boolean

<Utility_Elliptical_Tex__protein>.switcher_slot : integer

<Utility_Elliptical_Tex__protein>.is_color_only : boolean

<Utility_Elliptical_Tex__protein>.input_texture_01 : filename

<Utility_Elliptical_Tex__protein>.Image_Frame_Number : integer

<Utility_Elliptical_Tex__protein>.input_texture_02 : filename

<Utility_Elliptical_Tex__protein>.Image_Frame_Number : integer

<Utility_Elliptical_Tex__protein>.input_texture_03 : filename

<Utility_Elliptical_Tex__protein>.Image_Frame_Number : integer

<Utility_Elliptical_Tex__protein>.input_texture_04 : filename

<Utility_Elliptical_Tex__protein>.Image_Frame_Number : integer

<Utility_Elliptical_Tex__protein>.input_texture_05 : filename

<Utility_Elliptical_Tex__protein>.Image_Frame_Number : integer

<Utility_Elliptical_Tex__protein>.input_texture_06 : filename

<Utility_Elliptical_Tex__protein>.Image_Frame_Number : integer

<Utility_Elliptical_Tex__protein>.input_texture_07 : filename

<Utility_Elliptical_Tex__protein>.Image_Frame_Number : integer

<Utility_Elliptical_Tex__protein>.input_color_00 : fRGBA color

<Utility_Elliptical_Tex__protein>.input_color_01 : fRGBA color

<Utility_Elliptical_Tex__protein>.input_color_02 : fRGBA color

<Utility_Elliptical_Tex__protein>.input_color_03 : fRGBA color

<Utility_Elliptical_Tex__protein>.input_color_04 : fRGBA color

<Utility_Elliptical_Tex__protein>.input_color_05 : fRGBA color

<Utility_Elliptical_Tex__protein>.input_color_06 : fRGBA color

<Utility_Elliptical_Tex__protein>.input_color_07 : fRGBA color

<Utility_Elliptical_Tex__protein>.Connection_struct__0000__t : paramBlock2

<Utility_Elliptical_Tex__protein>.Connection_struct__0001__e : paramBlock2

<Utility_Elliptical_Tex__protein>.TheList : maxObject array

<Utility_Elliptical_Tex__protein>.Shader_Version : integer

Utility_Elliptical_Tex__protein interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Utility_Gamma___Gain__mi : textureMap

Utility_Gamma___Gain__mi - superclass: textureMap; super-superclass:material - 9:0 - classID: #(2004031007, -1720943339)

Constructor:

Utility_Gamma___Gain__mi ...

Properties:

<Utility_Gamma___Gain__mi>.gain Float default: 1.0 -- animatable; float

<Utility_Gamma___Gain__mi>.gamma Float default: 2.2 -- animatable; float

<Utility_Gamma___Gain__mi>.input Color default: (color 0 0 0) -- animatable; fRGBA color

<Utility_Gamma___Gain__mi>.input_connected BooleanClass default: false -- boolean

<Utility_Gamma___Gain__mi>.input_paramName UndefinedClass default: undefined -- string

<Utility_Gamma___Gain__mi>.input_shader UndefinedClass default: undefined -- texturemap

<Utility_Gamma___Gain__mi>.reverse BooleanClass default: true -- animatable; Boolean

Utility_Gamma___Gain__mi interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Utility_Mia_Material__protein : textureMap

Utility_Mia_Material__protein : textureMap {7773161f,600c5920}

Constructor:

Utility_Mia_Material__protein: class instances not creatable by MAXScript

Properties:

<Utility_Mia_Material__protein>.a : paramBlock2

<Utility_Mia_Material__protein>.b : paramBlock2

<Utility_Mia_Material__protein>.c : paramBlock2

<Utility_Mia_Material__protein>.d : paramBlock2

<Utility_Mia_Material__protein>.e : paramBlock2

<Utility_Mia_Material__protein>.f : paramBlock2

<Utility_Mia_Material__protein>.g : paramBlock2

<Utility_Mia_Material__protein>.h : paramBlock2

<Utility_Mia_Material__protein>.i : paramBlock2

<Utility_Mia_Material__protein>.l : paramBlock2

<Utility_Mia_Material__protein>.m : paramBlock2

<Utility_Mia_Material__protein>.n : paramBlock2

<Utility_Mia_Material__protein>.o : paramBlock2

<Utility_Mia_Material__protein>.mode : integer

<Utility_Mia_Material__protein>.lights : node array

<Utility_Mia_Material__protein>.Use_lights : boolean

<Utility_Mia_Material__protein>.ImplicitLights : node array

<Utility_Mia_Material__protein>.diffuse_weight : float

<Utility_Mia_Material__protein>.diffuse : fRGBA color

<Utility_Mia_Material__protein>.diffuse_roughness : float

<Utility_Mia_Material__protein>.reflectivity : float

<Utility_Mia_Material__protein>.refl_color : fRGBA color

<Utility_Mia_Material__protein>.refl_gloss : float

<Utility_Mia_Material__protein>.refl_gloss_samples : integer

<Utility_Mia_Material__protein>.refl_interpolate : boolean

<Utility_Mia_Material__protein>.refl_hl_only : boolean

<Utility_Mia_Material__protein>.refl_is_metal : boolean

<Utility_Mia_Material__protein>.transparency : float

<Utility_Mia_Material__protein>.refr_color : fRGBA color

<Utility_Mia_Material__protein>.refr_gloss : float

<Utility_Mia_Material__protein>.refr_ior : float

<Utility_Mia_Material__protein>.refr_gloss_samples : integer

<Utility_Mia_Material__protein>.refr_interpolate : boolean

<Utility_Mia_Material__protein>.refr_translucency : boolean

<Utility_Mia_Material__protein>.refr_trans_color : fRGBA color

<Utility_Mia_Material__protein>.refr_trans_weight : float

<Utility_Mia_Material__protein>.anisotropy : float

<Utility_Mia_Material__protein>.anisotropy_rotation : float

<Utility_Mia_Material__protein>.anisotropy_channel : integer

<Utility_Mia_Material__protein>.brdf_fresnel : boolean

<Utility_Mia_Material__protein>.brdf_0_degree_refl : float

<Utility_Mia_Material__protein>.brdf_90_degree_refl : float

<Utility_Mia_Material__protein>.brdf_curve : float

<Utility_Mia_Material__protein>.brdf_conserve_energy : boolean

<Utility_Mia_Material__protein>.intr_grid_density : integer

<Utility_Mia_Material__protein>.intr_refl_samples : integer

<Utility_Mia_Material__protein>.intr_refl_ddist_on : boolean

<Utility_Mia_Material__protein>.intr_refl_ddist : float

<Utility_Mia_Material__protein>.intr_refr_samples : integer

<Utility_Mia_Material__protein>.single_env_sample : boolean

<Utility_Mia_Material__protein>.refl_falloff_on : boolean

<Utility_Mia_Material__protein>.refl_falloff_dist : float

<Utility_Mia_Material__protein>.refl_falloff_color_on : boolean

<Utility_Mia_Material__protein>.refl_falloff_color : fRGBA color

<Utility_Mia_Material__protein>.refl_depth : integer

<Utility_Mia_Material__protein>.refl_cutoff : float

<Utility_Mia_Material__protein>.refr_falloff_on : boolean

<Utility_Mia_Material__protein>.refr_falloff_dist : float

<Utility_Mia_Material__protein>.refr_falloff_color_on : boolean

<Utility_Mia_Material__protein>.refr_falloff_color : fRGBA color

<Utility_Mia_Material__protein>.refr_depth : integer

<Utility_Mia_Material__protein>.refr_cutoff : float

<Utility_Mia_Material__protein>.indirect_multiplier : float

<Utility_Mia_Material__protein>.fg_quality : float

<Utility_Mia_Material__protein>.fg_quality_w : float

<Utility_Mia_Material__protein>.ao_on : boolean

<Utility_Mia_Material__protein>.ao_samples : integer

<Utility_Mia_Material__protein>.ao_distance : float

<Utility_Mia_Material__protein>.ao_dark : fRGBA color

<Utility_Mia_Material__protein>.ao_ambient : fRGBA color

<Utility_Mia_Material__protein>.ao_do_details : boolean

<Utility_Mia_Material__protein>.thin_walled : boolean

<Utility_Mia_Material__protein>.no_visible_area_hl : boolean

<Utility_Mia_Material__protein>.skip_inside_refl : boolean

<Utility_Mia_Material__protein>.do_refractive_caustics : boolean

<Utility_Mia_Material__protein>.backface_cull : boolean

<Utility_Mia_Material__protein>.propagate_alpha : boolean

<Utility_Mia_Material__protein>.hl_vs_refl_balance : float

<Utility_Mia_Material__protein>.cutout_opacity : float

<Utility_Mia_Material__protein>.additional_color : fRGBA color

<Utility_Mia_Material__protein>.bump_shader : texturemap

<Utility_Mia_Material__protein>.no_diffuse_bump : boolean

<Utility_Mia_Material__protein>.Connection_struct__0000__a : paramBlock2

<Utility_Mia_Material__protein>.Connection_struct__0001__b : paramBlock2

<Utility_Mia_Material__protein>.Connection_struct__0002__c : paramBlock2

<Utility_Mia_Material__protein>.Connection_struct__0003__d : paramBlock2

<Utility_Mia_Material__protein>.Connection_struct__0004__e : paramBlock2

<Utility_Mia_Material__protein>.Connection_struct__0005__f : paramBlock2

<Utility_Mia_Material__protein>.Connection_struct__0006__g : paramBlock2

<Utility_Mia_Material__protein>.Connection_struct__0007__h : paramBlock2

<Utility_Mia_Material__protein>.Connection_struct__0008__i : paramBlock2

<Utility_Mia_Material__protein>.Connection_struct__0009__l : paramBlock2

<Utility_Mia_Material__protein>.Connection_struct__0010__m : paramBlock2

<Utility_Mia_Material__protein>.Connection_struct__0011__n : paramBlock2

<Utility_Mia_Material__protein>.Connection_struct__0012__o : paramBlock2

<Utility_Mia_Material__protein>.diffuse_weight_connected : boolean

<Utility_Mia_Material__protein>.diffuse_weight_shader : texturemap

<Utility_Mia_Material__protein>.diffuse_weight_paramName : string

<Utility_Mia_Material__protein>.diffuse_connected : boolean

<Utility_Mia_Material__protein>.diffuse_shader : texturemap

<Utility_Mia_Material__protein>.diffuse_paramName : string

<Utility_Mia_Material__protein>.diffuse_roughness_connected : boolean

<Utility_Mia_Material__protein>.diffuse_roughness_shader : texturemap

<Utility_Mia_Material__protein>.diffuse_roughness_paramName : string

<Utility_Mia_Material__protein>.reflectivity_connected : boolean

<Utility_Mia_Material__protein>.reflectivity_shader : texturemap

<Utility_Mia_Material__protein>.reflectivity_paramName : string

<Utility_Mia_Material__protein>.refl_color_connected : boolean

<Utility_Mia_Material__protein>.refl_color_shader : texturemap

<Utility_Mia_Material__protein>.refl_color_paramName : string

<Utility_Mia_Material__protein>.refl_gloss_connected : boolean

<Utility_Mia_Material__protein>.refl_gloss_shader : texturemap

<Utility_Mia_Material__protein>.refl_gloss_paramName : string

<Utility_Mia_Material__protein>.refl_gloss_samples_connected : boolean

<Utility_Mia_Material__protein>.refl_gloss_samples_shader : texturemap

<Utility_Mia_Material__protein>.refl_gloss_samples_paramName : string

<Utility_Mia_Material__protein>.refl_interpolate_connected : boolean

<Utility_Mia_Material__protein>.refl_interpolate_shader : texturemap

<Utility_Mia_Material__protein>.refl_interpolate_paramName : string

<Utility_Mia_Material__protein>.refl_hl_only_connected : boolean

<Utility_Mia_Material__protein>.refl_hl_only_shader : texturemap

<Utility_Mia_Material__protein>.refl_hl_only_paramName : string

<Utility_Mia_Material__protein>.refl_is_metal_connected : boolean

<Utility_Mia_Material__protein>.refl_is_metal_shader : texturemap

<Utility_Mia_Material__protein>.refl_is_metal_paramName : string

<Utility_Mia_Material__protein>.transparency_connected : boolean

<Utility_Mia_Material__protein>.transparency_shader : texturemap

<Utility_Mia_Material__protein>.transparency_paramName : string

<Utility_Mia_Material__protein>.refr_color_connected : boolean

<Utility_Mia_Material__protein>.refr_color_shader : texturemap

<Utility_Mia_Material__protein>.refr_color_paramName : string

<Utility_Mia_Material__protein>.refr_gloss_connected : boolean

<Utility_Mia_Material__protein>.refr_gloss_shader : texturemap

<Utility_Mia_Material__protein>.refr_gloss_paramName : string

<Utility_Mia_Material__protein>.refr_ior_connected : boolean

<Utility_Mia_Material__protein>.refr_ior_shader : texturemap

<Utility_Mia_Material__protein>.refr_ior_paramName : string

<Utility_Mia_Material__protein>.refr_gloss_samples_connected : boolean

<Utility_Mia_Material__protein>.refr_gloss_samples_shader : texturemap

<Utility_Mia_Material__protein>.refr_gloss_samples_paramName : string

<Utility_Mia_Material__protein>.refr_interpolate_connected : boolean

<Utility_Mia_Material__protein>.refr_interpolate_shader : texturemap

<Utility_Mia_Material__protein>.refr_interpolate_paramName : string

<Utility_Mia_Material__protein>.refr_translucency_connected : boolean

<Utility_Mia_Material__protein>.refr_translucency_shader : texturemap

<Utility_Mia_Material__protein>.refr_translucency_paramName : string

<Utility_Mia_Material__protein>.refr_trans_color_connected : boolean

<Utility_Mia_Material__protein>.refr_trans_color_shader : texturemap

<Utility_Mia_Material__protein>.refr_trans_color_paramName : string

<Utility_Mia_Material__protein>.refr_trans_weight_connected : boolean

<Utility_Mia_Material__protein>.refr_trans_weight_shader : texturemap

<Utility_Mia_Material__protein>.refr_trans_weight_paramName : string

<Utility_Mia_Material__protein>.anisotropy_connected : boolean

<Utility_Mia_Material__protein>.anisotropy_shader : texturemap

<Utility_Mia_Material__protein>.anisotropy_paramName : string

<Utility_Mia_Material__protein>.anisotropy_rotation_connected : boolean

<Utility_Mia_Material__protein>.anisotropy_rotation_shader : texturemap

<Utility_Mia_Material__protein>.anisotropy_rotation_paramName : string

<Utility_Mia_Material__protein>.anisotropy_channel_connected : boolean

<Utility_Mia_Material__protein>.anisotropy_channel_shader : texturemap

<Utility_Mia_Material__protein>.anisotropy_channel_paramName : string

<Utility_Mia_Material__protein>.brdf_fresnel_connected : boolean

<Utility_Mia_Material__protein>.brdf_fresnel_shader : texturemap

<Utility_Mia_Material__protein>.brdf_fresnel_paramName : string

<Utility_Mia_Material__protein>.brdf_0_degree_refl_connected : boolean

<Utility_Mia_Material__protein>.brdf_0_degree_refl_shader : texturemap

<Utility_Mia_Material__protein>.brdf_0_degree_refl_paramName : string

<Utility_Mia_Material__protein>.brdf_90_degree_refl_connected : boolean

<Utility_Mia_Material__protein>.brdf_90_degree_refl_shader : texturemap

<Utility_Mia_Material__protein>.brdf_90_degree_refl_paramName : string

<Utility_Mia_Material__protein>.brdf_curve_connected : boolean

<Utility_Mia_Material__protein>.brdf_curve_shader : texturemap

<Utility_Mia_Material__protein>.brdf_curve_paramName : string

<Utility_Mia_Material__protein>.brdf_conserve_energy_connected : boolean

<Utility_Mia_Material__protein>.brdf_conserve_energy_shader : texturemap

<Utility_Mia_Material__protein>.brdf_conserve_energy_paramName : string

<Utility_Mia_Material__protein>.intr_grid_density_connected : boolean

<Utility_Mia_Material__protein>.intr_grid_density_shader : texturemap

<Utility_Mia_Material__protein>.intr_grid_density_paramName : string

<Utility_Mia_Material__protein>.intr_refl_samples_connected : boolean

<Utility_Mia_Material__protein>.intr_refl_samples_shader : texturemap

<Utility_Mia_Material__protein>.intr_refl_samples_paramName : string

<Utility_Mia_Material__protein>.intr_refl_ddist_on_connected : boolean

<Utility_Mia_Material__protein>.intr_refl_ddist_on_shader : texturemap

<Utility_Mia_Material__protein>.intr_refl_ddist_on_paramName : string

<Utility_Mia_Material__protein>.intr_refl_ddist_connected : boolean

<Utility_Mia_Material__protein>.intr_refl_ddist_shader : texturemap

<Utility_Mia_Material__protein>.intr_refl_ddist_paramName : string

<Utility_Mia_Material__protein>.intr_refr_samples_connected : boolean

<Utility_Mia_Material__protein>.intr_refr_samples_shader : texturemap

<Utility_Mia_Material__protein>.intr_refr_samples_paramName : string

<Utility_Mia_Material__protein>.single_env_sample_connected : boolean

<Utility_Mia_Material__protein>.single_env_sample_shader : texturemap

<Utility_Mia_Material__protein>.single_env_sample_paramName : string

<Utility_Mia_Material__protein>.refl_falloff_on_connected : boolean

<Utility_Mia_Material__protein>.refl_falloff_on_shader : texturemap

<Utility_Mia_Material__protein>.refl_falloff_on_paramName : string

<Utility_Mia_Material__protein>.refl_falloff_dist_connected : boolean

<Utility_Mia_Material__protein>.refl_falloff_dist_shader : texturemap

<Utility_Mia_Material__protein>.refl_falloff_dist_paramName : string

<Utility_Mia_Material__protein>.refl_falloff_color_on_connected : boolean

<Utility_Mia_Material__protein>.refl_falloff_color_on_shader : texturemap

<Utility_Mia_Material__protein>.refl_falloff_color_on_paramName : string

<Utility_Mia_Material__protein>.refl_falloff_color_connected : boolean

<Utility_Mia_Material__protein>.refl_falloff_color_shader : texturemap

<Utility_Mia_Material__protein>.refl_falloff_color_paramName : string

<Utility_Mia_Material__protein>.refl_depth_connected : boolean

<Utility_Mia_Material__protein>.refl_depth_shader : texturemap

<Utility_Mia_Material__protein>.refl_depth_paramName : string

<Utility_Mia_Material__protein>.refl_cutoff_connected : boolean

<Utility_Mia_Material__protein>.refl_cutoff_shader : texturemap

<Utility_Mia_Material__protein>.refl_cutoff_paramName : string

<Utility_Mia_Material__protein>.refr_falloff_on_connected : boolean

<Utility_Mia_Material__protein>.refr_falloff_on_shader : texturemap

<Utility_Mia_Material__protein>.refr_falloff_on_paramName : string

<Utility_Mia_Material__protein>.refr_falloff_dist_connected : boolean

<Utility_Mia_Material__protein>.refr_falloff_dist_shader : texturemap

<Utility_Mia_Material__protein>.refr_falloff_dist_paramName : string

<Utility_Mia_Material__protein>.refr_falloff_color_on_connected : boolean

<Utility_Mia_Material__protein>.refr_falloff_color_on_shader : texturemap

<Utility_Mia_Material__protein>.refr_falloff_color_on_paramName : string

<Utility_Mia_Material__protein>.refr_falloff_color_connected : boolean

<Utility_Mia_Material__protein>.refr_falloff_color_shader : texturemap

<Utility_Mia_Material__protein>.refr_falloff_color_paramName : string

<Utility_Mia_Material__protein>.refr_depth_connected : boolean

<Utility_Mia_Material__protein>.refr_depth_shader : texturemap

<Utility_Mia_Material__protein>.refr_depth_paramName : string

<Utility_Mia_Material__protein>.refr_cutoff_connected : boolean

<Utility_Mia_Material__protein>.refr_cutoff_shader : texturemap

<Utility_Mia_Material__protein>.refr_cutoff_paramName : string

<Utility_Mia_Material__protein>.indirect_multiplier_connected : boolean

<Utility_Mia_Material__protein>.indirect_multiplier_shader : texturemap

<Utility_Mia_Material__protein>.indirect_multiplier_paramName : string

<Utility_Mia_Material__protein>.fg_quality_connected : boolean

<Utility_Mia_Material__protein>.fg_quality_shader : texturemap

<Utility_Mia_Material__protein>.fg_quality_paramName : string

<Utility_Mia_Material__protein>.fg_quality_w_connected : boolean

<Utility_Mia_Material__protein>.fg_quality_w_shader : texturemap

<Utility_Mia_Material__protein>.fg_quality_w_paramName : string

<Utility_Mia_Material__protein>.ao_on_connected : boolean

<Utility_Mia_Material__protein>.ao_on_shader : texturemap

<Utility_Mia_Material__protein>.ao_on_paramName : string

<Utility_Mia_Material__protein>.ao_samples_connected : boolean

<Utility_Mia_Material__protein>.ao_samples_shader : texturemap

<Utility_Mia_Material__protein>.ao_samples_paramName : string

<Utility_Mia_Material__protein>.ao_distance_connected : boolean

<Utility_Mia_Material__protein>.ao_distance_shader : texturemap

<Utility_Mia_Material__protein>.ao_distance_paramName : string

<Utility_Mia_Material__protein>.ao_dark_connected : boolean

<Utility_Mia_Material__protein>.ao_dark_shader : texturemap

<Utility_Mia_Material__protein>.ao_dark_paramName : string

<Utility_Mia_Material__protein>.ao_ambient_connected : boolean

<Utility_Mia_Material__protein>.ao_ambient_shader : texturemap

<Utility_Mia_Material__protein>.ao_ambient_paramName : string

<Utility_Mia_Material__protein>.ao_do_details_connected : boolean

<Utility_Mia_Material__protein>.ao_do_details_shader : texturemap

<Utility_Mia_Material__protein>.ao_do_details_paramName : string

<Utility_Mia_Material__protein>.thin_walled_connected : boolean

<Utility_Mia_Material__protein>.thin_walled_shader : texturemap

<Utility_Mia_Material__protein>.thin_walled_paramName : string

<Utility_Mia_Material__protein>.no_visible_area_hl_connected : boolean

<Utility_Mia_Material__protein>.no_visible_area_hl_shader : texturemap

<Utility_Mia_Material__protein>.no_visible_area_hl_paramName : string

<Utility_Mia_Material__protein>.skip_inside_refl_connected : boolean

<Utility_Mia_Material__protein>.skip_inside_refl_shader : texturemap

<Utility_Mia_Material__protein>.skip_inside_refl_paramName : string

<Utility_Mia_Material__protein>.do_refractive_caustics_connected : boolean

<Utility_Mia_Material__protein>.do_refractive_caustics_shader : texturemap

<Utility_Mia_Material__protein>.do_refractive_caustics_paramName : string

<Utility_Mia_Material__protein>.backface_cull_connected : boolean

<Utility_Mia_Material__protein>.backface_cull_shader : texturemap

<Utility_Mia_Material__protein>.backface_cull_paramName : string

<Utility_Mia_Material__protein>.propagate_alpha_connected : boolean

<Utility_Mia_Material__protein>.propagate_alpha_shader : texturemap

<Utility_Mia_Material__protein>.propagate_alpha_paramName : string

<Utility_Mia_Material__protein>.hl_vs_refl_balance_connected : boolean

<Utility_Mia_Material__protein>.hl_vs_refl_balance_shader : texturemap

<Utility_Mia_Material__protein>.hl_vs_refl_balance_paramName : string

<Utility_Mia_Material__protein>.cutout_opacity_connected : boolean

<Utility_Mia_Material__protein>.cutout_opacity_shader : texturemap

<Utility_Mia_Material__protein>.cutout_opacity_paramName : string

<Utility_Mia_Material__protein>.additional_color_connected : boolean

<Utility_Mia_Material__protein>.additional_color_shader : texturemap

<Utility_Mia_Material__protein>.additional_color_paramName : string

<Utility_Mia_Material__protein>.no_diffuse_bump_connected : boolean

<Utility_Mia_Material__protein>.no_diffuse_bump_shader : texturemap

<Utility_Mia_Material__protein>.no_diffuse_bump_paramName : string

<Utility_Mia_Material__protein>.TheList : maxObject array

<Utility_Mia_Material__protein>.Shader_Version : integer

Utility_Mia_Material__protein interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Utility_Mix2Shader__protein : textureMap

Utility_Mix2Shader__protein : textureMap {7773161f,a7f2676e}

Constructor:

Utility_Mix2Shader__protein: class instances not creatable by MAXScript

Properties:

<Utility_Mix2Shader__protein>.shader1 : texturemap

<Utility_Mix2Shader__protein>.shader2 : texturemap

<Utility_Mix2Shader__protein>.mixing_mode : integer

<Utility_Mix2Shader__protein>.mixing_factor : float

<Utility_Mix2Shader__protein>.disable_shader2 : boolean

<Utility_Mix2Shader__protein>.mixing_factor_connected : boolean

<Utility_Mix2Shader__protein>.mixing_factor_shader : texturemap

<Utility_Mix2Shader__protein>.mixing_factor_paramName : string

<Utility_Mix2Shader__protein>.disable_shader2_connected : boolean

<Utility_Mix2Shader__protein>.disable_shader2_shader : texturemap

<Utility_Mix2Shader__protein>.disable_shader2_paramName : string

<Utility_Mix2Shader__protein>.TheList : maxObject array

<Utility_Mix2Shader__protein>.Shader_Version : integer

Utility_Mix2Shader__protein interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Utility_Mix8Shader__adsk : textureMap

Utility_Mix8Shader__adsk : textureMap {7773161f,4dfa9f27}

Constructor:

Utility_Mix8Shader__adsk: class instances not creatable by MAXScript

Properties:

<Utility_Mix8Shader__adsk>.shader1 : texturemap

<Utility_Mix8Shader__adsk>.shader2 : texturemap

<Utility_Mix8Shader__adsk>.mix2_mode : integer

<Utility_Mix8Shader__adsk>.mix2_factor : fRGBA color

<Utility_Mix8Shader__adsk>.shader3 : texturemap

<Utility_Mix8Shader__adsk>.mix3_mode : integer

<Utility_Mix8Shader__adsk>.mix3_factor : fRGBA color

<Utility_Mix8Shader__adsk>.shader4 : texturemap

<Utility_Mix8Shader__adsk>.mix4_mode : integer

<Utility_Mix8Shader__adsk>.mix4_factor : fRGBA color

<Utility_Mix8Shader__adsk>.shader5 : texturemap

<Utility_Mix8Shader__adsk>.mix5_mode : integer

<Utility_Mix8Shader__adsk>.mix5_factor : fRGBA color

<Utility_Mix8Shader__adsk>.shader6 : texturemap

<Utility_Mix8Shader__adsk>.mix6_mode : integer

<Utility_Mix8Shader__adsk>.mix6_factor : fRGBA color

<Utility_Mix8Shader__adsk>.shader7 : texturemap

<Utility_Mix8Shader__adsk>.mix7_mode : integer

<Utility_Mix8Shader__adsk>.mix7_factor : fRGBA color

<Utility_Mix8Shader__adsk>.shader8 : texturemap

<Utility_Mix8Shader__adsk>.mix8_mode : integer

<Utility_Mix8Shader__adsk>.mix8_factor : fRGBA color

<Utility_Mix8Shader__adsk>.mix2_mode_connected : boolean

<Utility_Mix8Shader__adsk>.mix2_mode_shader : texturemap

<Utility_Mix8Shader__adsk>.mix2_mode_paramName : string

<Utility_Mix8Shader__adsk>.mix2_factor_connected : boolean

<Utility_Mix8Shader__adsk>.mix2_factor_shader : texturemap

<Utility_Mix8Shader__adsk>.mix2_factor_paramName : string

<Utility_Mix8Shader__adsk>.mix3_mode_connected : boolean

<Utility_Mix8Shader__adsk>.mix3_mode_shader : texturemap

<Utility_Mix8Shader__adsk>.mix3_mode_paramName : string

<Utility_Mix8Shader__adsk>.mix3_factor_connected : boolean

<Utility_Mix8Shader__adsk>.mix3_factor_shader : texturemap

<Utility_Mix8Shader__adsk>.mix3_factor_paramName : string

<Utility_Mix8Shader__adsk>.mix4_mode_connected : boolean

<Utility_Mix8Shader__adsk>.mix4_mode_shader : texturemap

<Utility_Mix8Shader__adsk>.mix4_mode_paramName : string

<Utility_Mix8Shader__adsk>.mix4_factor_connected : boolean

<Utility_Mix8Shader__adsk>.mix4_factor_shader : texturemap

<Utility_Mix8Shader__adsk>.mix4_factor_paramName : string

<Utility_Mix8Shader__adsk>.mix5_mode_connected : boolean

<Utility_Mix8Shader__adsk>.mix5_mode_shader : texturemap

<Utility_Mix8Shader__adsk>.mix5_mode_paramName : string

<Utility_Mix8Shader__adsk>.mix5_factor_connected : boolean

<Utility_Mix8Shader__adsk>.mix5_factor_shader : texturemap

<Utility_Mix8Shader__adsk>.mix5_factor_paramName : string

<Utility_Mix8Shader__adsk>.mix6_mode_connected : boolean

<Utility_Mix8Shader__adsk>.mix6_mode_shader : texturemap

<Utility_Mix8Shader__adsk>.mix6_mode_paramName : string

<Utility_Mix8Shader__adsk>.mix6_factor_connected : boolean

<Utility_Mix8Shader__adsk>.mix6_factor_shader : texturemap

<Utility_Mix8Shader__adsk>.mix6_factor_paramName : string

<Utility_Mix8Shader__adsk>.mix7_mode_connected : boolean

<Utility_Mix8Shader__adsk>.mix7_mode_shader : texturemap

<Utility_Mix8Shader__adsk>.mix7_mode_paramName : string

<Utility_Mix8Shader__adsk>.mix7_factor_connected : boolean

<Utility_Mix8Shader__adsk>.mix7_factor_shader : texturemap

<Utility_Mix8Shader__adsk>.mix7_factor_paramName : string

<Utility_Mix8Shader__adsk>.mix8_mode_connected : boolean

<Utility_Mix8Shader__adsk>.mix8_mode_shader : texturemap

<Utility_Mix8Shader__adsk>.mix8_mode_paramName : string

<Utility_Mix8Shader__adsk>.mix8_factor_connected : boolean

<Utility_Mix8Shader__adsk>.mix8_factor_shader : texturemap

<Utility_Mix8Shader__adsk>.mix8_factor_paramName : string

<Utility_Mix8Shader__adsk>.TheList : maxObject array

<Utility_Mix8Shader__adsk>.Shader_Version : integer

Utility_Mix8Shader__adsk interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Utility_MultiMixer__protein : textureMap

Utility_MultiMixer__protein : textureMap {7773161f,c42b5d14}

Constructor:

Utility_MultiMixer__protein: class instances not creatable by MAXScript

Properties:

<Utility_MultiMixer__protein>.layers : paramBlock2 array

<Utility_MultiMixer__protein>.switcher : integer

<Utility_MultiMixer__protein>.is_switcher : integer

<Utility_MultiMixer__protein>.type : integer

<Utility_MultiMixer__protein>.shader : texturemap

<Utility_MultiMixer__protein>.opacity : fRGBA color

<Utility_MultiMixer__protein>.mode : integer

<Utility_MultiMixer__protein>.offset : float

<Utility_MultiMixer__protein>.disabled : boolean

<Utility_MultiMixer__protein>.switcher_connected : boolean

<Utility_MultiMixer__protein>.switcher_shader : texturemap

<Utility_MultiMixer__protein>.switcher_paramName : string

<Utility_MultiMixer__protein>.is_switcher_connected : boolean

<Utility_MultiMixer__protein>.is_switcher_shader : texturemap

<Utility_MultiMixer__protein>.is_switcher_paramName : string

<Utility_MultiMixer__protein>.type_connected : boolean

<Utility_MultiMixer__protein>.type_shader : texturemap

<Utility_MultiMixer__protein>.type_paramName : string

<Utility_MultiMixer__protein>.TheList : maxObject array

<Utility_MultiMixer__protein>.Shader_Version : integer

Utility_MultiMixer__protein interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Utility_ShaderPassThrough__protein : textureMap

Utility_ShaderPassThrough__protein : textureMap {7773161f,b1674b1a}

Constructor:

Utility_ShaderPassThrough__protein: class instances not creatable by MAXScript

Properties:

<Utility_ShaderPassThrough__protein>.shader : texturemap

<Utility_ShaderPassThrough__protein>.type : integer

<Utility_ShaderPassThrough__protein>.type_connected : boolean

<Utility_ShaderPassThrough__protein>.type_shader : texturemap

<Utility_ShaderPassThrough__protein>.type_paramName : string

<Utility_ShaderPassThrough__protein>.TheList : maxObject array

<Utility_ShaderPassThrough__protein>.Shader_Version : integer

Utility_ShaderPassThrough__protein interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Utility_Switch8Shader__protein : textureMap

Utility_Switch8Shader__protein : textureMap {7773161f,93ffb662}

Constructor:

Utility_Switch8Shader__protein: class instances not creatable by MAXScript

Properties:

<Utility_Switch8Shader__protein>.switcher : integer

<Utility_Switch8Shader__protein>.type : integer

<Utility_Switch8Shader__protein>.shader_1 : texturemap

<Utility_Switch8Shader__protein>.shader_2 : texturemap

<Utility_Switch8Shader__protein>.shader_3 : texturemap

<Utility_Switch8Shader__protein>.shader_4 : texturemap

<Utility_Switch8Shader__protein>.shader_5 : texturemap

<Utility_Switch8Shader__protein>.shader_6 : texturemap

<Utility_Switch8Shader__protein>.shader_7 : texturemap

<Utility_Switch8Shader__protein>.shader_8 : texturemap

<Utility_Switch8Shader__protein>.switcher_connected : boolean

<Utility_Switch8Shader__protein>.switcher_shader : texturemap

<Utility_Switch8Shader__protein>.switcher_paramName : string

<Utility_Switch8Shader__protein>.type_connected : boolean

<Utility_Switch8Shader__protein>.type_shader : texturemap

<Utility_Switch8Shader__protein>.type_paramName : string

<Utility_Switch8Shader__protein>.TheList : maxObject array

<Utility_Switch8Shader__protein>.Shader_Version : integer

Utility_Switch8Shader__protein interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Utility_TexLookup__protein : textureMap

Utility_TexLookup__protein : textureMap {7773161f,ae6b5747}

Constructor:

Utility_TexLookup__protein: class instances not creatable by MAXScript

Properties:

<Utility_TexLookup__protein>.coord : point3

<Utility_TexLookup__protein>.elipt_enable : boolean

<Utility_TexLookup__protein>.elipt_disc_r : float

<Utility_TexLookup__protein>.elipt_eccmax : float

<Utility_TexLookup__protein>.elipt_maxminor : float

<Utility_TexLookup__protein>.elipt_circle : float

<Utility_TexLookup__protein>.elipt_bilinear : boolean

<Utility_TexLookup__protein>.elipt_space : integer

<Utility_TexLookup__protein>.elipt_remap : texturemap

<Utility_TexLookup__protein>.gamma : float

<Utility_TexLookup__protein>.switcher_slot : integer

<Utility_TexLookup__protein>.is_color_only : boolean

<Utility_TexLookup__protein>.input_texture_00 : filename

<Utility_TexLookup__protein>.Image_Frame_Number : integer

<Utility_TexLookup__protein>.input_texture_01 : filename

<Utility_TexLookup__protein>.Image_Frame_Number : integer

<Utility_TexLookup__protein>.input_texture_02 : filename

<Utility_TexLookup__protein>.Image_Frame_Number : integer

<Utility_TexLookup__protein>.input_texture_03 : filename

<Utility_TexLookup__protein>.Image_Frame_Number : integer

<Utility_TexLookup__protein>.input_texture_04 : filename

<Utility_TexLookup__protein>.Image_Frame_Number : integer

<Utility_TexLookup__protein>.input_texture_05 : filename

<Utility_TexLookup__protein>.Image_Frame_Number : integer

<Utility_TexLookup__protein>.input_texture_06 : filename

<Utility_TexLookup__protein>.Image_Frame_Number : integer

<Utility_TexLookup__protein>.input_texture_07 : filename

<Utility_TexLookup__protein>.Image_Frame_Number : integer

<Utility_TexLookup__protein>.input_color_00 : fRGBA color

<Utility_TexLookup__protein>.input_color_01 : fRGBA color

<Utility_TexLookup__protein>.input_color_02 : fRGBA color

<Utility_TexLookup__protein>.input_color_03 : fRGBA color

<Utility_TexLookup__protein>.input_color_04 : fRGBA color

<Utility_TexLookup__protein>.input_color_05 : fRGBA color

<Utility_TexLookup__protein>.input_color_06 : fRGBA color

<Utility_TexLookup__protein>.input_color_07 : fRGBA color

<Utility_TexLookup__protein>.coord_connected : boolean

<Utility_TexLookup__protein>.coord_shader : texturemap

<Utility_TexLookup__protein>.coord_paramName : string

<Utility_TexLookup__protein>.elipt_enable_connected : boolean

<Utility_TexLookup__protein>.elipt_enable_shader : texturemap

<Utility_TexLookup__protein>.elipt_enable_paramName : string

<Utility_TexLookup__protein>.input_texture_00_connected : boolean

<Utility_TexLookup__protein>.input_texture_00_shader : texturemap

<Utility_TexLookup__protein>.input_texture_00_paramName : string

<Utility_TexLookup__protein>.input_texture_01_connected : boolean

<Utility_TexLookup__protein>.input_texture_01_shader : texturemap

<Utility_TexLookup__protein>.input_texture_01_paramName : string

<Utility_TexLookup__protein>.input_texture_02_connected : boolean

<Utility_TexLookup__protein>.input_texture_02_shader : texturemap

<Utility_TexLookup__protein>.input_texture_02_paramName : string

<Utility_TexLookup__protein>.input_texture_03_connected : boolean

<Utility_TexLookup__protein>.input_texture_03_shader : texturemap

<Utility_TexLookup__protein>.input_texture_03_paramName : string

<Utility_TexLookup__protein>.input_texture_04_connected : boolean

<Utility_TexLookup__protein>.input_texture_04_shader : texturemap

<Utility_TexLookup__protein>.input_texture_04_paramName : string

<Utility_TexLookup__protein>.input_texture_05_connected : boolean

<Utility_TexLookup__protein>.input_texture_05_shader : texturemap

<Utility_TexLookup__protein>.input_texture_05_paramName : string

<Utility_TexLookup__protein>.input_texture_06_connected : boolean

<Utility_TexLookup__protein>.input_texture_06_shader : texturemap

<Utility_TexLookup__protein>.input_texture_06_paramName : string

<Utility_TexLookup__protein>.input_texture_07_connected : boolean

<Utility_TexLookup__protein>.input_texture_07_shader : texturemap

<Utility_TexLookup__protein>.input_texture_07_paramName : string

<Utility_TexLookup__protein>.input_color_00_connected : boolean

<Utility_TexLookup__protein>.input_color_00_shader : texturemap

<Utility_TexLookup__protein>.input_color_00_paramName : string

<Utility_TexLookup__protein>.input_color_01_connected : boolean

<Utility_TexLookup__protein>.input_color_01_shader : texturemap

<Utility_TexLookup__protein>.input_color_01_paramName : string

<Utility_TexLookup__protein>.input_color_02_connected : boolean

<Utility_TexLookup__protein>.input_color_02_shader : texturemap

<Utility_TexLookup__protein>.input_color_02_paramName : string

<Utility_TexLookup__protein>.input_color_03_connected : boolean

<Utility_TexLookup__protein>.input_color_03_shader : texturemap

<Utility_TexLookup__protein>.input_color_03_paramName : string

<Utility_TexLookup__protein>.input_color_04_connected : boolean

<Utility_TexLookup__protein>.input_color_04_shader : texturemap

<Utility_TexLookup__protein>.input_color_04_paramName : string

<Utility_TexLookup__protein>.input_color_05_connected : boolean

<Utility_TexLookup__protein>.input_color_05_shader : texturemap

<Utility_TexLookup__protein>.input_color_05_paramName : string

<Utility_TexLookup__protein>.input_color_06_connected : boolean

<Utility_TexLookup__protein>.input_color_06_shader : texturemap

<Utility_TexLookup__protein>.input_color_06_paramName : string

<Utility_TexLookup__protein>.input_color_07_connected : boolean

<Utility_TexLookup__protein>.input_color_07_shader : texturemap

<Utility_TexLookup__protein>.input_color_07_paramName : string

<Utility_TexLookup__protein>.TheList : maxObject array

<Utility_TexLookup__protein>.Shader_Version : integer

Utility_TexLookup__protein interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


RGB_to_BW : textureMap

to_bw : textureMap {7773161f,a851b316}

Constructor:

RGB_to_BW: class instances not creatable by MAXScript

Alias:

to_bw

Properties:

<RGB_to_BW>.r_weight : float

<RGB_to_BW>.g_weight : float

<RGB_to_BW>.b_weight : float

<RGB_to_BW>.r_weight_connected : boolean

<RGB_to_BW>.r_weight_shader : texturemap

<RGB_to_BW>.r_weight_paramName : string

<RGB_to_BW>.g_weight_connected : boolean

<RGB_to_BW>.g_weight_shader : texturemap

<RGB_to_BW>.g_weight_paramName : string

<RGB_to_BW>.b_weight_connected : boolean

<RGB_to_BW>.b_weight_shader : texturemap

<RGB_to_BW>.b_weight_paramName : string

<RGB_to_BW>.TheList : maxObject array

<RGB_to_BW>.Shader_Version : integer

RGB_to_BW interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


SSS_Fast_Render_Shader___mi : textureMap

SSS_Fast_Render_Shader___mi : textureMap {7773161f,4a48c08a}

Constructor:

SSS_Fast_Render_Shader___mi: class instances not creatable by MAXScript

Properties:

<SSS_Fast_Render_Shader___mi>.lightmap : filename

<SSS_Fast_Render_Shader___mi>.Image_Frame_Number : integer

<SSS_Fast_Render_Shader___mi>.depthmap : filename

<SSS_Fast_Render_Shader___mi>.Image_Frame_Number : integer

<SSS_Fast_Render_Shader___mi>.bump : texturemap

<SSS_Fast_Render_Shader___mi>.diffuse_illum : texturemap

<SSS_Fast_Render_Shader___mi>.diffuse_color : RGB color

<SSS_Fast_Render_Shader___mi>.specular_illum : texturemap

<SSS_Fast_Render_Shader___mi>.diffuse_weight : float

<SSS_Fast_Render_Shader___mi>.front_sss_color : RGB color

<SSS_Fast_Render_Shader___mi>.front_sss_weight : float

<SSS_Fast_Render_Shader___mi>.front_sss_radius : worldUnits

<SSS_Fast_Render_Shader___mi>.back_sss_color : RGB color

<SSS_Fast_Render_Shader___mi>.back_sss_weight : float

<SSS_Fast_Render_Shader___mi>.back_sss_radius : worldUnits

<SSS_Fast_Render_Shader___mi>.back_sss_depth : worldUnits

<SSS_Fast_Render_Shader___mi>.scale_conversion : float

<SSS_Fast_Render_Shader___mi>.screen_composit : boolean

<SSS_Fast_Render_Shader___mi>.output_sss_only : boolean

<SSS_Fast_Render_Shader___mi>.falloff : float

<SSS_Fast_Render_Shader___mi>.samples : integer

<SSS_Fast_Render_Shader___mi>.Structure : paramBlock2

<SSS_Fast_Render_Shader___mi>.result : fRGBA color

<SSS_Fast_Render_Shader___mi>.diffuse_raw : fRGBA color

<SSS_Fast_Render_Shader___mi>.diffuse_result : fRGBA color

<SSS_Fast_Render_Shader___mi>.specular_raw : fRGBA color

<SSS_Fast_Render_Shader___mi>.front_raw : fRGBA color

<SSS_Fast_Render_Shader___mi>.front_result : fRGBA color

<SSS_Fast_Render_Shader___mi>.back_raw : fRGBA color

<SSS_Fast_Render_Shader___mi>.back_result : fRGBA color

<SSS_Fast_Render_Shader___mi>.diffuse_color_connected : boolean

<SSS_Fast_Render_Shader___mi>.diffuse_color_shader : texturemap

<SSS_Fast_Render_Shader___mi>.diffuse_color_paramName : string

<SSS_Fast_Render_Shader___mi>.diffuse_weight_connected : boolean

<SSS_Fast_Render_Shader___mi>.diffuse_weight_shader : texturemap

<SSS_Fast_Render_Shader___mi>.diffuse_weight_paramName : string

<SSS_Fast_Render_Shader___mi>.front_sss_color_connected : boolean

<SSS_Fast_Render_Shader___mi>.front_sss_color_shader : texturemap

<SSS_Fast_Render_Shader___mi>.front_sss_color_paramName : string

<SSS_Fast_Render_Shader___mi>.front_sss_weight_connected : boolean

<SSS_Fast_Render_Shader___mi>.front_sss_weight_shader : texturemap

<SSS_Fast_Render_Shader___mi>.front_sss_weight_paramName : string

<SSS_Fast_Render_Shader___mi>.front_sss_radius_connected : boolean

<SSS_Fast_Render_Shader___mi>.front_sss_radius_shader : texturemap

<SSS_Fast_Render_Shader___mi>.front_sss_radius_paramName : string

<SSS_Fast_Render_Shader___mi>.back_sss_color_connected : boolean

<SSS_Fast_Render_Shader___mi>.back_sss_color_shader : texturemap

<SSS_Fast_Render_Shader___mi>.back_sss_color_paramName : string

<SSS_Fast_Render_Shader___mi>.back_sss_weight_connected : boolean

<SSS_Fast_Render_Shader___mi>.back_sss_weight_shader : texturemap

<SSS_Fast_Render_Shader___mi>.back_sss_weight_paramName : string

<SSS_Fast_Render_Shader___mi>.back_sss_radius_connected : boolean

<SSS_Fast_Render_Shader___mi>.back_sss_radius_shader : texturemap

<SSS_Fast_Render_Shader___mi>.back_sss_radius_paramName : string

<SSS_Fast_Render_Shader___mi>.back_sss_depth_connected : boolean

<SSS_Fast_Render_Shader___mi>.back_sss_depth_shader : texturemap

<SSS_Fast_Render_Shader___mi>.back_sss_depth_paramName : string

<SSS_Fast_Render_Shader___mi>.scale_conversion_connected : boolean

<SSS_Fast_Render_Shader___mi>.scale_conversion_shader : texturemap

<SSS_Fast_Render_Shader___mi>.scale_conversion_paramName : string

<SSS_Fast_Render_Shader___mi>.falloff_connected : boolean

<SSS_Fast_Render_Shader___mi>.falloff_shader : texturemap

<SSS_Fast_Render_Shader___mi>.falloff_paramName : string

<SSS_Fast_Render_Shader___mi>.samples_connected : boolean

<SSS_Fast_Render_Shader___mi>.samples_shader : texturemap

<SSS_Fast_Render_Shader___mi>.samples_paramName : string

<SSS_Fast_Render_Shader___mi>.TheList : maxObject array

<SSS_Fast_Render_Shader___mi>.Shader_Version : integer

SSS_Fast_Render_Shader___mi interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Render_Subset_of_Scene_Masking__mi : textureMap

Render_Subset_of_Scene_Masking__mi - superclass: textureMap; super-superclass:material - 20:0 - classID: #(2004031007, 1931763854)

Constructor:

Render_Subset_of_Scene_Masking__mi ...

Properties:

<Render_Subset_of_Scene_Masking__mi>.background Color default: (color 0 0 0 0) -- animatable; fRGBA color

<Render_Subset_of_Scene_Masking__mi>.background_connected BooleanClass default: false -- boolean

<Render_Subset_of_Scene_Masking__mi>.background_paramName UndefinedClass default: undefined -- string <Render_Subset_of_Scene_Masking__mi>.background_shader UndefinedClass default: undefined -- texturemap

<Render_Subset_of_Scene_Masking__mi>.enabled BooleanClass default: true -- animatable; boolean

<Render_Subset_of_Scene_Masking__mi>.full_screen_fg BooleanClass default: true -- animatable; boolean

<Render_Subset_of_Scene_Masking__mi>.instance_label ArrayParameter default: #() -- int array; SubAnim

<Render_Subset_of_Scene_Masking__mi>.mask_color Color default: (color 255 255 255) -- animatable; fRGBA color

<Render_Subset_of_Scene_Masking__mi>.mask_color_connected BooleanClass default: false -- boolean

<Render_Subset_of_Scene_Masking__mi>.mask_color_paramName UndefinedClass default: undefined -- string

<Render_Subset_of_Scene_Masking__mi>.mask_color_shader UndefinedClass default: undefined -- texturemap

<Render_Subset_of_Scene_Masking__mi>.mask_only BooleanClass default: false -- animatable; boolean

<Render_Subset_of_Scene_Masking__mi>.material UndefinedClass default: undefined -- material

<Render_Subset_of_Scene_Masking__mi>.objects ArrayParameter default: #() -- node array; SubAnim

<Render_Subset_of_Scene_Masking__mi>.other_objects Color default: (color 0 0 0 0) -- animatable; fRGBA color

<Render_Subset_of_Scene_Masking__mi>.other_objects_connected BooleanClass default: false -- boolean

<Render_Subset_of_Scene_Masking__mi>.other_objects_paramName UndefinedClass default: undefined -- string;

<Render_Subset_of_Scene_Masking__mi>.other_objects_shader UndefinedClass default: undefined -- texturemap

Render_Subset_of_Scene_Masking__mi interfaces:

Interface: IMtlRender_Compability_MtlBase

Properties:

Methods:

Actions:

See also

mental ray Shaders Index

MAXScript Extensions for mental ray


Lighting_Data_Export

Constructor:

Class instances not creatable by MAXScript

The ShineExport Interface was introduced in Autodesk VIZ4 and is available in 3ds Max 6 and higher.

Lighting_Data_Export interfaces:

Interface: ShineExport

Methods:

<boolean>doExport()

<boolean>doPickFile()

The 2D Lighting Data Exporter is a Utility. It renders the active viewport to a TIFF file. The TIFF file includes luminance and illuminance data that can be used for lighting analysis. (This is the 32-bit SGI LogLUV image type.)

The 2D Lighting Data Exporter does not render the TIFF file unless you have applied an exposure control to the scene.

EXAMPLE

--Open the plug-in in the Utilities panel:

UtilityPanel.OpenUtility Lighting_Data_Export

True


RPC : GeometryClass

RPC - superclass: GeometryClass; super-superclass:node - classID: #(1469799459, 915686935)

Value > MAXWrapper > Node > GeometryClass > RPC

NOTE:

This class is not available in 3ds Max.
To access this class in Autodesk VIZ, additional Rich Photorealistic Content software must be installed

Properties:

<RPC>.Billboard Integer default: 0 -- integer

<RPC>.brightness Integer default: 55 -- animatable; integer

<RPC>.Cast_Reflections Integer default: 0 -- integer

<RPC>.Cast_Shadows Integer default: 0 -- animatable; integer

<RPC>.Current_Frame Integer default: 0 -- animatable; integer

<RPC>.cycle Integer default: 1 -- integer

<RPC>.Fix_Jitter Integer default: 1 -- integer

<RPC>.height Float default: 72.0 -- animatable; float

<RPC>.Ping_Pong Integer default: 0 -- integer

<RPC>.Ping_Pong_End_Frame Integer default: 0 -- animatable; integer

<RPC>.Ping_Pong_Start_Frame Integer default: 0 -- integer

<RPC>.speed Float default: 0.0 -- animatable; float

<RPC>.Start_Frame Integer default: 0 -- integer

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


Host_Composite : GeometryClass

Host_Composite - GeometryClass

Value > MAXWrapper > Node > GeometryClass > Host_Composite

Constructor

Host_Composite objects are in some cases automatically created when using Modeling Context. Host_Composite objects are not creatable in MAXScript.

NOTE:

This class is not available in 3ds Max.

Properties

There are no properties associated with this class.

See also

GeometryClass Common Properties, Operators, and Methods

Node Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods


DWG Link File Access for VIZ

MAXScript for Autodesk VIZ includes a function for DWG link file access.

Its form is:

linkFile <filename_string> [#noPrompt]

This method attaches and links the named .DWG file and returns a value of true if the file was attached and linked, false otherwise. This method is equivalent to Menu bar > Insert > Linked DWG... in VIZ. The optional #noPrompt argument provides control over the display of the DWG Link Options dialog. This method is available only to VIZ users.

See also

External File Methods

File Name Parsing

Standard Open and Save File Dialogs


MAXScript and GMax

MAXScript is the built-in scripting language for GMax™. Because the functionality of MAXScript in GMax is almost identical to version 4 of 3ds Max™ the topics in this book supplement the main 3ds Max MAXScript Reference. These topics list specific differences between MAXScript for GMax and 3ds Max. There are several non-game related globals, classes, methods, interfaces that are not supported in GMax. There are also additions that have been made to support the more game intensive features. Additionally you will find several restrictions that have been placed on various aspects of MAXScript.

Globals, Classes, Methods, and Interfaces Not Supported in GMax

Additional Classes and Globals Defined in GMax

Documentation for New Methods, Classes, Interfaces in GMax


Globals, Classes, Methods, and Interfaces Not Supported in GMax

Globals

Binding Space Warp Objects | bindSpaceWarp | NodeGeneric
Camera Tracker | closeCameraTracker | Primitive
Bitmaps | display | Generic
Bitmaps | save | Generic
Bitmaps | setPixels | Generic
Bitmaps | setIndexedPixels | Generic
Depth of Field Render Effect | DOF | StructDef
Depth of Field Render Effect | DOF.addCam | Primitive
Depth of Field Render Effect | DOF.addFocalNode | Primitive
Depth of Field Render Effect | DOF.deleteCam | Primitive
Depth of Field Render Effect | DOF.deleteCamByName | Primitive
Depth of Field Render Effect | DOF.deleteFocalNode | Primitive
Depth of Field Render Effect | DOF.deleteFocalNodeByName | Primitive
Editable Patch | patch.getMeshStepsRender | Primitive
Editable Patch | patch.setMeshStepsRender | Primitive
Files | copyFile | Primitive
Files | createFile | Primitive
Files | encryptFile | Primitive
Files | makeDir | Primitive
Files | openEncryptedFile | Primitive
Files | openlog | Primitive
Files | renameFile | Primitive
Files | setFileAttribute | Primitive
Files | setINISetting | Primitive
Flex modifier | flexOps | StructDef
Flex modifier | flexOps.ClearEdgeVertices | Primitive
Flex modifier | flexOps.GetNumberVertices | Primitive
Flex modifier | flexOps.GetVertexWeight | Primitive
Flex modifier | flexOps.isEdgeVertex | Primitive
Flex modifier | flexOps.SelectVertices | Primitive
Flex modifier | flexOps.SetEdgeVertices | Primitive
Flex modifier | flexOps.SetVertexWeights | Primitive
Lens Effects | LE | StructDef
Lens Effects | LE.addASec | Primitive
Lens Effects | LE.addGlow | Primitive
Lens Effects | LE.addLight | Primitive
Lens Effects | LE.addLightNode | Primitive
Lens Effects | LE.addMSec | Primitive
Lens Effects | LE.addRay | Primitive
Lens Effects | LE.addRing | Primitive
Lens Effects | LE.addStar | Primitive
Lens Effects | LE.addStreak | Primitive
Lens Effects | LE.deleteElement | Primitive
Lens Effects | LE.deleteElementByName | Primitive
Lens Effects | LE.deleteLight | Primitive
Lens Effects | LE.deleteLightByName | Primitive
Lens Effects | LE.lightIndex | Primitive
Lens Effects | LE.lightName | Primitive
Lens Effects | LE.load | Primitive
Lens Effects | LE.numLights | Primitive
Lens Effects | LE.save | Primitive
Material Libraries | FileSaveAsMatLib | Primitive
Material Libraries | FileSaveMatLib | Primitive
Material Libraries | SaveMaterialLibrary | Primitive
MAXScript Editor | newScript | Primitive
GMax Files | saveNodes | Primitive
NURBS | addNURBSSet | NodeGeneric
NURBS | appendCurve | Generic
NURBS | appendCurveByID | Generic
NURBS | appendObject | Generic
NURBS | appendUCurve | Generic
NURBS | appendUCurveByID | Generic
NURBS | appendVCurve | Generic
NURBS | appendVCurveByID | Generic
NURBS | breakCurve | NodeGeneric
NURBS | breakSurface | NodeGeneric
NURBS | clearProdTess | Generic
NURBS | clearViewTess | Generic
NURBS | closeU | Generic
NURBS | closeV | Generic
NURBS | convertToNURBSCurve | NodeGeneric
NURBS | convertToNURBSSurface | NodeGeneric
NURBS | deleteObjects | Generic
NURBS | disconnect | Generic
NURBS | evalPos | Generic
NURBS | evalTangent | Generic
NURBS | evalUTangent | Generic
NURBS | evalVTangent | Generic
NURBS | getCurve | Generic
NURBS | getCurveID | Generic
NURBS | getCurveStartPoint | Generic
NURBS | getCV | Generic
NURBS | getEdge | Generic
NURBS | getFlip | Generic
NURBS | getFlipTrim | Generic
NURBS | getGenerateUVs | Generic
NURBS | getKnot | Generic
NURBS | getNURBSSet | NodeGeneric
NURBS | getObject | Generic
NURBS | getParent | Generic
NURBS | getParentID | Generic
NURBS | getPoint | Generic
NURBS | getProdTess | Generic
NURBS | getRadius | Generic
NURBS | getSeed | Generic
NURBS | getTextureSurface | Generic
NURBS | getTextureUVs | Generic
NURBS | getTiling | Generic
NURBS | getTilingOffset | Generic
NURBS | getTrimSurface | Generic
NURBS | getUCurve | Generic
NURBS | getUCurveID | Generic
NURBS | getUKnot | Generic
NURBS | getVCurve | Generic
NURBS | getVCurveID | Generic
NURBS | getViewTess | Generic
NURBS | getVKnot | Generic
NURBS | joinCurves | NodeGeneric
NURBS | joinSurfaces | NodeGeneric
NURBS | makeIndependent | NodeGeneric
NURBS | MakeNURBSConeSurface | Primitive
NURBS | MakeNURBSCylinderSurface | Primitive
NURBS | MakeNURBSLatheSurface | Primitive
NURBS | MakeNURBSSphereSurface | Primitive
NURBS | MakeNURBSTorusSurface | Primitive
NURBS | NURBSExtrudeNode | Primitive
NURBS | NURBSLatheNode | Primitive
NURBS | NURBSNode | Primitive
NURBS | refine | Generic
NURBS | refineU | Generic
NURBS | refineV | Generic
NURBS | reparameterize | Generic
NURBS | setCurve | Generic
NURBS | setCurveByID | Generic
NURBS | setCurveStartPoint | Generic
NURBS | setCV | Generic
NURBS | setEdge | Generic
NURBS | setFlip | Generic
NURBS | setFlipTrim | Generic
NURBS | setGenerateUVs | Generic
NURBS | setKnot | Generic
NURBS | setObject | Generic
NURBS | setParent | Generic
NURBS | setParentID | Generic
NURBS | setPoint | Generic
NURBS | setProdTess | Generic
NURBS | setRadius | Generic
NURBS | setRenderApproximation | NodeGeneric
NURBS | setSeed | Generic
NURBS | setSurfaceDisplay | NodeGeneric
NURBS | setTextureSurface | Generic
NURBS | setTextureUVs | Generic
NURBS | setTiling | Generic
NURBS | setTilingOffset | Generic
NURBS | setTrimSurface | Generic
NURBS | setUCurve | Generic
NURBS | setUCurveByID | Generic
NURBS | setUKnot | Generic
NURBS | setVCurve | Generic
NURBS | setVCurveByID | Generic
NURBS | setViewApproximation | NodeGeneric
NURBS | setViewTess | Generic
NURBS | setVKnot | Generic
OLE | createOLEObject | Primitive
Operating System | DOSCommand | Primitive
Operating System | ShellLaunch | Primitive
Operating System | Windows.sendMessage | Primitive
Particle Systems | particleAge | NodeGeneric
Particle Systems | particleCount | NodeGeneric
Particle Systems | particlePos | NodeGeneric
Particle Systems | particleSize | NodeGeneric
Particle Systems | particleVelocity | NodeGeneric
Preview Rendering | CreatePreview | Primitive
RAM Player | RAMPlayer | Primitive
Reactor Controllers | createReaction | Primitive
Reactor Controllers | deleteReaction | Primitive
Reactor Controllers | getReactionCount | Primitive
Reactor Controllers | getReactionFalloff | Primitive
Reactor Controllers | getReactionInfluence | Primitive
Reactor Controllers | getReactionName | Primitive
Reactor Controllers | getReactionState | Primitive
Reactor Controllers | getReactionStrength | Primitive
Reactor Controllers | getReactionValue | Primitive
Reactor Controllers | getSelectedReactionNum | Primitive
Reactor Controllers | reactTo | Primitive
Reactor Controllers | setReactionFalloff | Primitive
Reactor Controllers | setReactionInfluence | Primitive
Reactor Controllers | setReactionName | Primitive
Reactor Controllers | setReactionState | Primitive
Reactor Controllers | setReactionStrength | Primitive
Reactor Controllers | setReactionValue | Primitive
Rendering | render | Primitive
Schematic View | schematicView | StructDef
Schematic View | schematicView.close | Primitive
Schematic View | schematicView.getSchematicViewName | Primitive
Schematic View | schematicView.numSchematicViews | Primitive
Schematic View | schematicView.open | Primitive
Schematic View | schematicView.zoomSelected | Primitive
Schematic View | selectReaction | Primitive
Skin modifier | skinOps.saveEnvelope | Primitive
Surface Mapper space warp modifier | updateSurfaceMapper | Primitive
Terrain object | terrainOps | StructDef
Terrain object | terrainOps.addOperand | Primitive
Terrain object | terrainOps.deleteOperand | Primitive
Terrain object | terrainOps.getOperand | Primitive
Terrain object | terrainOps.getOperandTM | Primitive
Terrain object | terrainOps.setOperandTM | Primitive
Terrain object | terrainOps.update | Primitive
Video Post | videoPostTracks | MAXTVNode
Viewports | displaySafeFrames | BooleanClass

Classes

NURBS1RailSweepSurface | Class | NURBS
NURBS2RailSweepSurface | Class | NURBS
NURBSBlendCurve | Class | NURBS
NURBSBlendSurface | Class | NURBS
NURBSCapSurface | Class | NURBS
NURBSChamferCurve | Class | NURBS
NURBSControlVertex | Class | NURBS
NURBSCurve | Class | NURBS
NURBSCurveConstPoint | Class | NURBS
NURBSCurveIntersectPoint | Class | NURBS
NURBSCurveOnSurface | Class | NURBS
NURBSCurveSurfaceIntersectPoint | Class | NURBS
NURBSCVCurve | Class | NURBS
NURBSCVSurface | Class | NURBS
NURBSDisplay | Class | NURBS
NURBSExtrudeSurface | Class | NURBS
NURBSFilletCurve | Class | NURBS
NURBSFilletSurface | Class | NURBS
NURBSIndependentPoint | Class | NURBS
NURBSIsoCurve | Class | NURBS
NURBSLatheSurface | Class | NURBS
NURBSMirrorCurve | Class | NURBS
NURBSMirrorSurface | Class | NURBS
NURBSMultiCurveTrimSurface | Class | NURBS
NURBSNBlendSurface | Class | NURBS
NURBSObject | Class | NURBS
NURBSOffsetCurve | Class | NURBS
NURBSOffsetSurface | Class | NURBS
NURBSPoint | Class | NURBS
NURBSPointConstPoint | Class | NURBS
NURBSPointCurve | Class | NURBS
NURBSPointCurveOnSurface | Class | NURBS
NURBSPointSurface | Class | NURBS
NURBSProjectNormalCurve | Class | NURBS
NURBSProjectVectorCurve | Class | NURBS
NURBSRuledSurface | Class | NURBS
NURBSSelection | Class | NURBS
NURBSSet | Class | NURBS
NURBSSurface | Class | NURBS
NURBSSurfaceApproximation | Class | NURBS
NURBSSurfaceEdgeCurve | Class | NURBS
NURBSSurfaceNormalCurve | Class | NURBS
NURBSSurfConstPoint | Class | NURBS
NURBSSurfSurfIntersectionCurve | Class | NURBS
NURBSTexturePoint | Class | NURBS
NURBSTextureSurface | Class | NURBS
NURBSULoftSurface | Class | NURBS
NURBSUVLoftSurface | Class | NURBS
NURBSXFormCurve | Class | NURBS
NURBSXFormSurface | Class | NURBS

MAXClasses

Adobe_Photoshop_Plug_In_Filter | textureMap
Adobe_Premiere_Video_Filter | textureMap
Alpha | RenderElement
alphaRenderElement | RenderElement
Anchor | helper
Anisotropic | Shader
Apollo_Param_Container | GeometryClass
apolloParamContainer | GeometryClass
App_Data_Tester | UtilityPlugin
ASCII_Object_Output | UtilityPlugin
Atmosphere | RenderElement
atmosphereRenderElement | RenderElement
AudioClip | helper
AudioFloat | FloatController
AudioPoint3 | Point3Controller
AudioPosition | PositionController
AudioRotation | RotationController
AudioScale | ScaleController
Auto_Secondary_Element | ReferenceTarget
Autodesk_Animator_Flic | BitmapIO
Automatic_Exposure_Control | ToneOperator
AutomaticAdaptiveExposureControl | ToneOperator
AVI | BitmapIO
Background | helper
BackgroundRenderElement | RenderElement
Beauty | RenderElement
beautyRenderElement | RenderElement
BendModWSM | SpacewarpObject
Bevel | modifier
Bevel_Profile | modifier
bgndRenderElement | RenderElement
Billboard | helper
BlendRenderElement | RenderElement
Blizzard | GeometryClass
BoxGizmo | helper
blur | renderEffect
Bomb | SpacewarpObject
Bombbinding | SpacewarpModifier
Bricks | textureMap
Brightness_and_Contrast | renderEffect
briteCon | renderEffect
C___Object_Output | UtilityPlugin
C_Ext | GeometryClass
Camera_Match | UtilityPlugin
Camera_Tracker | UtilityPlugin
CameraMap | modifier
CameraMapSpaceWarp | SpacewarpObject
CamPoint | helper
Capsule | GeometryClass
Cellular | textureMap
cellularTex | textureMap
ChamferBox | GeometryClass
ChamferCyl | GeometryClass
CIN | BitmapIO
CMB | BitmapIO
collapse | UtilityPlugin
Color_Balance | renderEffect
Color_Clipboard | UtilityPlugin
colorBalance | renderEffect
COM_DCOM_Server_Control | UtilityPlugin
Combustion | textureMap
Compass | helper
ConformSpaceWarp | SpacewarpObject
CV_Curve | shape
CV_Curveshape | shape
CV_Surf | GeometryClass
CylGizmo | helper
Damper | GeometryClass
Deflector | SpacewarpObject
Deflectorbinding | SpacewarpModifier
Dent | textureMap
dents | textureMap
Depth_of_Field | renderEffect
Depth_of_FieldMPassCamEffect | MPassCamEffect
Diffuse | RenderElement
diffuseRenderElement | RenderElement
Disp_Approx | modifier
Displace_Mesh | SpacewarpModifier
Displace_NURBS | SpacewarpModifier
Displacebinding | SpacewarpModifier
DOFEffect | renderEffect
Drag | SpacewarpObject
DragMod | SpacewarpModifier
Dynamics | UtilityPlugin
Dynamics_Position_Controller | PositionController
Dynamics_Rotation_Controller | RotationController
emissionRenderElement | RenderElement
EPS_Image | BitmapIO
fallofftextureMap | textureMap
FFD_Binding | SpacewarpModifier
FFD_Select | modifier
File_Output | renderEffect
fileOut | renderEffect
Fillet_Chamfer | modifier
Film_Grain | renderEffect
FilmGrain | renderEffect
Fire_Effect | atmospheric
Flex | modifier
Float_Motion_Capture | FloatController
Float_Reactor | FloatController
FloatReactor | FloatController
Fog | atmospheric
FogHelper | helper
Gengon | GeometryClass
GIF | BitmapIO
Glow_Element | ReferenceTarget
Gradient_GradCtlData | ReferenceTarget
Gradient_Ramp | textureMap
gravity | SpacewarpObject
Gravitybinding | SpacewarpModifier
Hedra | GeometryClass
Hose | GeometryClass
HSDS_Modifier | modifier
HSDSObject | modifier
IFL | BitmapIO
IFL_Manager | UtilityPlugin
IKHISolver | IKSolver
imageMotionBlur | renderEffect
Inline | helper
JAngleData | ReferenceTarget
JBinaryData | ReferenceTarget
JBoolData | ReferenceTarget
JColor3Data | ReferenceTarget
JColorData | ReferenceTarget
JFlagCtlData | ReferenceTarget
JFlagSetData | ReferenceTarget
JFloat3Data | ReferenceTarget
JFloatData | ReferenceTarget
JGradCtlData | ReferenceTarget
Joystick_Input_Device | ReferenceTarget
JPercent3Data | ReferenceTarget
JPercentData | ReferenceTarget
JSubtex | ReferenceTarget
JWorld3Data | ReferenceTarget
JWorldData | ReferenceTarget
L_Ext | GeometryClass
Lattice | modifier
Lens_Effects | renderEffect
Level_of_Detail | UtilityPlugin
Lines | shape
Link_Inheritance__Selected | UtilityPlugin
LOD | helper
LOD_Controller | FloatController
LZFlare_AutoSec_Base | ReferenceTarget
LZFlare_AutoSec_Data | ReferenceTarget
LZFlare_Aux_Data | ReferenceTarget
LZFlare_Data | ReferenceTarget
LZFlare_Glow_Data | ReferenceTarget
LZFlare_Inferno_Data | ReferenceTarget
LZFlare_ManSec_Base | ReferenceTarget
LZFlare_ManSec_Data | ReferenceTarget
LZFlare_Prefs_Data | ReferenceTarget
LZFlare_Rays_Data | ReferenceTarget
LZFlare_Rend_Data | ReferenceTarget
LZFlare_Ring_Data | ReferenceTarget
LZFlare_Star_Data | ReferenceTarget
LZFlare_Streak_Data | ReferenceTarget
LZFocus_Data | ReferenceTarget
LZGlow_Aux_Data | ReferenceTarget
LZGlow_Data | ReferenceTarget
LZGlow_Rend_Data | ReferenceTarget
LZHilight_Aux_Data | ReferenceTarget
LZHilight_Data | ReferenceTarget
LZHilight_Rend_Data | ReferenceTarget
Manual_Secondary_Element | ReferenceTarget
MaterialByElement | modifier
MAX_File_Finder | UtilityPlugin
MaxRenderer_COM_Server | GlobalUtilityPlugin
Measure | UtilityPlugin
Melt | modifier
MeshCollision | ReferenceMaker
Mesher | GeometryClass
MIDI_Device | ReferenceTarget
Motion_Blur | renderEffect
Motion_BlurMPassCamEffect | MPassCamEffect
Motion_Capture | UtilityPlugin
Motor | SpacewarpObject
MotorMod | SpacewarpModifier
Mouse_Input_Device | ReferenceTarget
Multi_Layer | Shader
MultiLayer | Shader
multiPassDOF | MPassCamEffect
multiPassMotionBlur | MPassCamEffect
MultiRes | modifier
NavInfo | helper
NCurve_Sel | modifier
NSurf_Sel | modifier
NURBS_API_Test | UtilityPlugin
NURBS_Imported_Objects | GeometryClass
Nurbs | GeometryClass
NURBSCurveShape | shape
OilTank | GeometryClass
Oren_Nayar_Blinn | Shader
OrenNayarBlinn | Shader
PArray | GeometryClass
Particle_Age | textureMap
Particle_Cache | SpacewarpModifier
Particle_MBlur | textureMap
particleBlur | textureMap
ParticleCache | SpacewarpModifier
particleMesher | GeometryClass
Path_Follow | SpacewarpObject
Path_FollowMod | SpacewarpModifier
PathDeformSpaceWarp | SpacewarpObject
PBomb | SpacewarpObject
PBombMod | SpacewarpModifier
PCloud | GeometryClass
PDynaFlect | SpacewarpObject
PDynaFlectMod | SpacewarpModifier
PDynaflector | SpacewarpObject
Perlin_Marble | textureMap
perlinMarble | textureMap
PlanarCollision | ReferenceMaker
Planet | textureMap
Plug_in_Manager | GlobalUtilityPlugin
pngio | BitmapIO
Point3_Motion_Capture | Point3Controller
Point3_Reactor | Point3Controller
Point3Reactor | Point3Controller
Point3Spring | Point3Controller
Point_Cache | modifier
Point_CacheSpacewarpModifier | SpacewarpModifier
Point_Curve | shape
Point_Curveshape | shape
Point_Surf | GeometryClass
Point_SurfGeometry | GeometryClass
PointCache | modifier
PointCacheWSM | SpacewarpModifier
POmniFlect | SpacewarpObject
POmniFlectMod | SpacewarpModifier
Portable_Network_Graphics | BitmapIO
Position_Motion_Capture | PositionController
Position_Reactor | PositionController
PositionReactor | PositionController
PositionSpring | PositionController
Prism | GeometryClass
ProxSensor | helper
PSD_I_O | BitmapIO
PushMod | SpacewarpModifier
PushSpaceWarp | SpacewarpObject
Pyramid | GeometryClass
QTime | BitmapIO
Ray_Element | ReferenceTarget
Ray_Engine | ReferenceTarget
Raytrace | textureMap
Raytrace_Engine_Global_Parameters | ReferenceTarget
Raytrace_Texture_ParamBlock | ReferenceTarget
RaytraceMaterial | material
Reflection | RenderElement
reflectionRenderElement | RenderElement
Refraction | RenderElement
refractionRenderElement | RenderElement
Rescale_World_Units | UtilityPlugin
rgb | BitmapIO
Ring_Element | ReferenceTarget
RingWave | GeometryClass
Ripplebinding | SpacewarpModifier
RLA | BitmapIO
RmModel | GeometryClass
RmModelGeometry | GeometryClass
Rotation_Motion_Capture | RotationController
Rotation_Reactor | RotationController
RotationReactor | RotationController
RPF | BitmapIO
Scale_Motion_Capture | ScaleController
Scale_Reactor | ScaleController
ScaleReactor | ScaleController
SDeflectMod | SpacewarpModifier
SDeflector | SpacewarpObject
SDynaFlect | SpacewarpObject
SDynaFlectMod | SpacewarpModifier
SDynaflector | SpacewarpObject
section | shape
Self_Illumination | RenderElement
ShadowRenderElement | RenderElement
Shape_Check | UtilityPlugin
Shellac | material
SimpleOSMToWSMMod | SpacewarpModifier
SlidingDoor | GeometryClass
SlidingWindow | GeometryClass
Smoke | textureMap
Snow | GeometryClass
SOmniFlect | SpacewarpObject
SOmniFlectMod | SpacewarpModifier
Sound | helper
SpaceBend | SpacewarpObject
SpaceCameraMap | SpacewarpModifier
SpaceConform | SpacewarpModifier
Spacedisplace | SpacewarpObject
SpaceFFDBox | SpacewarpObject
SpaceFFDCyl | SpacewarpObject
SpaceNoise | SpacewarpObject
SpacePatchDeform | SpacewarpModifier
SpacePathDeform | SpacewarpModifier
Spaceripple | SpacewarpObject
SpaceSkew | SpacewarpObject
SpaceStretch | SpacewarpObject
SpaceSurfDeform | SpacewarpModifier
SpaceTaper | SpacewarpObject
SpaceTwist | SpacewarpObject
Spacewave | SpacewarpObject
Speckle | textureMap
Specular | RenderElement
specularRenderElement | RenderElement
SphereGizmo | helper
SphericalCollision | ReferenceMaker
Spherify | modifier
Spindle | GeometryClass
Splat | textureMap
Spray | GeometryClass
Spring | GeometryClass
SpringPoint3Controller | Point3Controller
SpringPositionController | PositionController
Squeeze | modifier
Star_Element | ReferenceTarget
STL_Check | modifier
Strauss | Shader
Streak_Element | ReferenceTarget
Stretch | modifier
Strokes | UtilityPlugin
Stucco | textureMap
Sunlight | System
Sunlight_Slave_Controller | PositionController
SuperSpray | GeometryClass
Surface_Approximation | UtilityPlugin
Surface_Mapper | SpacewarpModifier
SurfDeform | modifier
Swirl | textureMap
Terrain | GeometryClass
TexmapsReferenceMaker | ReferenceMaker
This_Data | ReferenceTarget
TimeSensor | helper
Torus_Knot | GeometryClass
TouchSensor | helper
Trim_Extend | modifier
TVDummyControl | Matrix3Controller
UDeflector | SpacewarpObject
UDeflectorMod | SpacewarpModifier
UDynaDeflector | SpacewarpObject
UDynaFlect | SpacewarpObject
UDynaFlectMod | SpacewarpModifier
UOmniFlect | SpacewarpObject
UOmniFlectMod | SpacewarpModifier
Utility_Tester | UtilityPlugin
videoPostTracks | MAXTVNode
Volume_Fog | atmospheric
Volume_Light | atmospheric
Vortex | SpacewarpObject
VortexMod | SpacewarpModifier
VUE_File_Renderer | RendererClass
Water | textureMap
Wavebinding | SpacewarpModifier
Waveform_Float | FloatController
Wind | SpacewarpObject
Windbinding | SpacewarpModifier
Wood | textureMap
YUV | BitmapIO
Z_Depth | RenderElement
ZRenderElement | RenderElement

Interfaces

HDIKSys | Interface
netrender | Interface
pluginManager | Interface
NetCreateHelpers | Interface

Restrictions

Cannot save or export more than 1000 GMax or material library files per session.

Cannot save the cui config file using cui.saveConfig or cui.saveConfigAs more than 1000 times per session.

Strings are limited to 15000 characters.

The path string argument for mapPaths.add and xrefPaths.add is limited to 260 characters.

The number of selected characters in Listener is limited to 10000 characters.

External files cannot be opened in append or write mode.

The number of bitmap path directories is limited to 500.

The following max commands are not supported in GMax:

  • max render scene

  • max render last

  • max quick render

  • max preview

  • max rename preview

  • max safeframe toggle

  • max videopost

The following camera properties are not supported in GMax:

  • <camera>.mpassEnabled

  • <camera>.mpassRenderPerPass

  • <camera>.mpassEffect

Only the Macromedia Flash™ Player (Program ID "ShockwaveFlash.ShockwaveFlash.", Class ID {D27CDB6E-AE6D-11CF-96B8-444553540000}) is supported as an activeXControl UI item.


Additional Classes and Globals Defined in GMax

Custom User Interface | cui.dockDialogBar | Primitive
Custom User Interface | cui.floatDialogBar | Primitive
Custom User Interface | cui.getDockState | Primitive
Custom User Interface | cui.registerDialogBar | Primitive
Custom User Interface | cui.setAppTitle | Primitive
Custom User Interface | cui.unRegisterDialogBar | Primitive

Classes

GMax_File_Finder | Utility Plugin
Missing_Shadow_Type | (max bug fix)

Interface Methods

Interface: colorMan (new methods)

<boolean>SaveIconFile <filename>szFilename <filename>szIconPath

<boolean>LoadIconFile <filename>szFilename

<string>ReadIconFile()

Interface: quadMenuSettings (new methods)

<void>SaveSettingsFile <filename>szFilename

<void>LoadSettingsFile <filename>szFilename

Interface: gridPrefs

Properties:

.spacing : float : Read|Write

.majorLines : integer : Read|Write

Methods:

Actions:


Documentation for New Methods, Classes, Interfaces in GMax

Interface Methods

Interface: colorMan (new methods)

<boolean>SaveIconFile <filename>szFilename <filename>szIconPath

This method saves the szIconPath path string to the specified file. If no path is specified in szFilename, the file will be stored in current CUI directory. The maximum allowed string length for szIconPath is 260 characters. If the specified file already exists, its contents will be overwritten. This method return true if the file was successfully written, false otherwise.

<boolean>LoadIconFile <filename>szFilename

This method reads a string from the specified file. If no path is specified in szFilename, the file will be read from the current CUI directory. This method return true if the file was successfully read, false otherwise.

<string>ReadIconFile()

This method returns the string read in the colorMan.LoadIconFile method.

Interface: quadMenuSettings (new methods)

<void>SaveSettingsFile <filename>szFilename

This method saves the current quad menu settings to the specified file. If no path is specified in szFilename, the file will be stored in current CUI directory. This method return true if the file was successfully written, false otherwise.

<void>LoadSettingsFile <filename>szFilename

This method loads the quad menu settings from the specified file. If no path is specified in szFilename, the file will be read from the current CUI directory. This method return true if the file was successfully read, false otherwise.

Interface: gridPrefs (new interface)

This interface exposes properties related to the construction grid.

Properties

.spacing : float : Read|Write

This property exposes the Grid Spacing value. This property corresponds to the Grid Spacing spinner in the Grid and Snap Settings dialog, Home Grid tab

.majorLines : integer : Read|Write

This property exposes the Major Lines value. This property corresponds to the Major Lines every Nth spinner in the Grid and Snap Settings dialog, Home Grid tab

Notes

Setting these properties does not update the Grid and Snap Settings dialog, Home Grid tab displayed values if the dialog is open.

Interface: statusPanel (new interface)

This interface exposes methods for hiding the status panel, and seeing if the status panel is hidden.

<void>setVisible <boolean>visible

If visible is true, the status panel will be set visible. If false, the status panel will be hidden.

<boolean>isVisible()

Returns true if the status panel is visible, false if hidden.


MAXScript and Plasma

MAXScript is the built-in scripting language for Plasma™. Because the functionality of MAXScript in Plasma is almost identical to version 4 of 3ds Max™, the topics in this book supplement the main 3ds Max MAXScript Reference. These topics list specific differences between MAXScript for Plasma and 3ds Max. Additionally you will find several restrictions that have been placed on various aspects of MAXScript.

Globals Not Supported in Plasma

Classes Not Supported in Plasma

Methods Not Supported in Plasma

Interfaces Not Supported in Plasma

Additional Classes and Globals Defined in Plasma


Globals Not Supported in Plasma

Globals

addAtmospheric | Primitive
addEffect | Primitive
addMorphTarget | Primitive
addNURBSSet | NodeGeneric
appendCurve | Generic
appendCurveByID | Generic
appendGizmo | Generic
appendObject | Generic
appendUCurve | Generic
appendUCurveByID | Generic
appendVCurve | Generic
appendVCurveByID | Generic
assetBrowser | StructDef
assetBrowser.gotoURL | Primitive
assetBrowser.open | Primitive
breakCurve | NodeGeneric
breakSurface | NodeGeneric
clearProdTess | Generic
clearViewTess | Generic
closeU | Generic
closeV | Generic
convertToNURBSCurve | NodeGeneric
convertToNURBSSurface | NodeGeneric
createMorphObject | Primitive
delegates | StructDef
delegates.bboxDisplay | Primitive
delegates.isAssignmentActive | Primitive
delegates.isComputing | Primitive
delegates.lineDisplay | Primitive
delegates.prevVelocity | Primitive
delegates.simTransform | Primitive
delegates.speed | Primitive
delegates.sphereDisplay | Primitive
delegates.startVelocity | Primitive
delegates.textDisplay | Primitive
delegates.velocity | Primitive
deleteAtmospheric | Primitive
deleteEffect | Primitive
deleteGizmo | Generic
deleteMorphTarget | Primitive
deleteObjects | Generic
disconnect | Generic
displayGamma | system Float
DOF | StructDef
DOF.addCam | Primitive
DOF.addFocalNode | Primitive
DOF.deleteCam | Primitive
DOF.deleteCamByName | Primitive
DOF.deleteFocalNode | Primitive
DOF.deleteFocalNodeByName | Primitive
EditAtmosphere | Primitive
editAtmospheric | Primitive
editEffect | Primitive
evalPos | Generic
evalTangent | Generic
evalUTangent | Generic
evalVTangent | Generic
fileInGamma | system Float
fileOutGamma | system Float
FileSaveAsMatLib | Primitive
FileSaveMatLib | Primitive
getAtmospheric | Primitive
GetBkgFrameNum | Primitive
GetBkgRangeVal | Primitive
GetBkgStartTime | Primitive
GetBkgSyncFrame | Primitive
getCurve | Generic
getCurveID | Generic
getCurveStartPoint | Generic
getCV | Generic
getEdge | Generic
getEffect | Primitive
getFlip | Generic
getFlipTrim | Generic
getGenerateUVs | Generic
getGizmo | Generic
GetImageBlurMultController | Primitive
getKnot | Generic
getNURBSSet | NodeGeneric
getObject | Generic
getParent | Generic
getParentID | Generic
GetPatchSteps | Primitive
getPoint | Generic
getProdTess | Generic
getRadius | Generic
GetRendApertureWidth | Primitive
GetRenderType | Primitive
getSeed | Generic
getTextureSurface | Generic
getTextureUVs | Generic
getTiling | Generic
getTilingOffset | Generic
getTrimSurface | Generic
getUCurve | Generic
getUCurveID | Generic
getUKnot | Generic
GetUseDraftRenderer | Primitive
getVCurve | Generic
getVCurveID | Generic
getViewTess | Generic
getVKnot | Generic
globalMotionClipOps | StructDef
globalMotionClipOps.loadfile | Primitive
globalMotionClipOps.savefile | Primitive
globalMotionClipOps.synthesize | Primitive
ik.getBindOrient | Primitive
ik.getBindPos | Primitive
ik.GetEndTime | Primitive
ik.getIsTerminator | Primitive
ik.getPinNode | Primitive
ik.GetPosThreshold | Primitive
ik.getPrecedence | Primitive
ik.GetRotThreshold | Primitive
ik.GetStartTime | Primitive
ik.setBindOrient | Primitive
ik.setBindPos | Primitive
ik.SetEndTime | Primitive
ik.setIsTerminator | Primitive
ik.setPinNode | Primitive
ik.SetPosThreshold | Primitive
ik.setPrecedence | Primitive
ik.SetRotThreshold | Primitive
ik.SetStartTime | Primitive
isActive | Primitive
joinCurves | NodeGeneric
joinSurfaces | NodeGeneric
LE | StructDef
LE.addASec | Primitive
LE.addGlow | Primitive
LE.addLight | Primitive
LE.addLightNode | Primitive
LE.addMSec | Primitive
LE.addRay | Primitive
LE.addRing | Primitive
LE.addStar | Primitive
LE.addStreak | Primitive
LE.deleteElement | Primitive
LE.deleteElementByName | Primitive
LE.deleteLight | Primitive
LE.deleteLightByName | Primitive
LE.lightIndex | Primitive
LE.lightName | Primitive
LE.load | Primitive
LE.numLights | Primitive
LE.save | Primitive
makeIndependent | NodeGeneric
MakeNURBSConeSurface | Primitive
MakeNURBSCylinderSurface | Primitive
MakeNURBSLatheSurface | Primitive
MakeNURBSSphereSurface | Primitive
MakeNURBSTorusSurface | Primitive
mocap | StructDef
numAtmospherics | system Integer
numEffects | system Integer
NURBSExtrudeNode | Primitive
NURBSLatheNode | Primitive
NURBSNode | Primitive
patch | StructDef
patch.addHook | Primitive
patch.addQuadPatch | Primitive
patch.addTriPatch | Primitive
patch.autosmooth | Primitive
patch.changePatchInteriorType | Primitive
patch.changeVertType | Primitive
patch.clonePatchParts | Primitive
patch.deletePatchParts | Primitive
patch.edgeNormal | Primitive
patch.flipPatchNormal | Primitive
patch.getAdaptive | Primitive
patch.getEdges | Primitive
patch.getEdgeVec12 | Primitive
patch.getEdgeVec21 | Primitive
patch.getEdgeVert1 | Primitive
patch.getEdgeVert2 | Primitive
patch.getMapPatch | Primitive
patch.getMapSupport | Primitive
patch.getMapVert | Primitive
patch.getMesh | Primitive
patch.getMeshSteps | Primitive
patch.getMeshStepsRender | Primitive
patch.getNumEdges | Primitive
patch.getNumMaps | Primitive
patch.getNumMapVerts | Primitive
patch.getNumPatches | Primitive
patch.getNumVecs | Primitive
patch.getNumVerts | Primitive
patch.getPatches | Primitive
patch.getPatchInteriorType | Primitive
patch.getPatchMtlID | Primitive
patch.getPatchType | Primitive
patch.getShowInterior | Primitive
patch.getVec | Primitive
patch.getVecPatches | Primitive
patch.getVectors | Primitive
patch.getVecVert | Primitive
patch.getVert | Primitive
patch.getVertEdges | Primitive
patch.getVertPatches | Primitive
patch.getVertType | Primitive
patch.getVertVecs | Primitive
patch.hookFixTopology | Primitive
patch.interpQuadPatch | Primitive
patch.interpTriPatch | Primitive
patch.makeQuadPatch | Primitive
patch.makeTriPatch | Primitive
patch.maxMapChannels | Primitive
patch.patchNormal | Primitive
patch.removeHook | Primitive
patch.setAdaptive | Primitive
patch.setMapPatch | Primitive
patch.setMapSupport | Primitive
patch.setMapVert | Primitive
patch.setMeshSteps | Primitive
patch.setMeshStepsRender | Primitive
patch.setNumEdges | Primitive
patch.setNumMapPatches | Primitive
patch.setNumMaps | Primitive
patch.setNumMapVerts | Primitive
patch.setNumPatches | Primitive
patch.setNumVecs | Primitive
patch.setNumVerts | Primitive
patch.setPatchMtlID | Primitive
patch.setShowInterior | Primitive
patch.setVec | Primitive
patch.setVert | Primitive
patch.subdivideEdges | Primitive
patch.subdividePatches | Primitive
patch.transform | Primitive
patch.unifyNormals | Primitive
patch.update | Primitive
patch.updateHooks | Primitive
patch.updatePatchNormals | Primitive
patch.weld2Verts | Primitive
patch.weldEdges | Primitive
patch.weldVerts | Primitive
patchOps | StructDef
patchOps.addQuad | Primitive
patchOps.addTri | Primitive
patchOps.break | Primitive
patchOps.clearAllSG | Primitive
patchOps.createShapeFromEdges | Primitive
patchOps.delete | Primitive
patchOps.detach | Primitive
patchOps.flipNormal | Primitive
patchOps.hide | Primitive
patchOps.selectByID | Primitive
patchOps.selectBySG | Primitive
patchOps.selectOpenEdges | Primitive
patchOps.startAttach | Primitive
patchOps.startBevel | Primitive
patchOps.startBind | Primitive
patchOps.startCreate | Primitive
patchOps.startExtrude | Primitive
patchOps.startFlipNormalMode | Primitive
patchOps.startWeldTarget | Primitive
patchOps.subdivide | Primitive
patchOps.unbind | Primitive
patchOps.unhideAll | Primitive
patchOps.unifyNormal | Primitive
patchOps.weld | Primitive
RAMPlayer | Primitive
refine | Generic
refineU | Generic
refineV | Generic
removeObject | Generic
rendAtmosphere | system BooleanClass
rendColorCheck | system BooleanClass
rendDither256 | system BooleanClass
rendDitherTrue | system BooleanClass
renderDisplacements | system BooleanClass
renderEffect | MAXSuperClass
RenderEffects | system BooleanClass
renderPixelAspect | system Float
rendFieldOrder | system Integer
rendFieldRender | system BooleanClass
rendMultiThread | system BooleanClass
rendNThSerial | system BooleanClass
rendNTSC_PAL | system Integer
rendShowVFB | system BooleanClass
rendSuperBlack | system BooleanClass
RendSuperBlackThresh | system Integer
rendUseDevice | system BooleanClass
rendUseNet | system BooleanClass
RendVidCorrectMethod | system Integer
reparameterize | Generic
saveMaterialLibrary | Primitive
SaveQuadClr | MAXScriptFunction
scanlineRender | StructDef
schematicView | StructDef
schematicView.close | Primitive
schematicView.getSchematicViewName | Primitive
schematicView.numSchematicViews | Primitive
schematicView.open | Primitive
schematicView.zoomSelected | Primitive
setActive | Primitive
setAtmospheric | Primitive
SetBkgFrameRange | Primitive
SetBkgStartTime | Primitive
SetBkgSyncFrame | Primitive
setCurve | Generic
setCurveByID | Generic
setCurveStartPoint | Generic
setCV | Generic
setEdge | Generic
setEffect | Primitive
setFlip | Generic
setFlipTrim | Generic
setGenerateUVs | Generic
SetImageBlurMultController | Primitive
SetImageBlurMultiplier | Primitive
setKnot | Generic
setMorphTarget | Primitive
setMorphTargetName | Primitive
SetMotBlur | Primitive
setObject | Generic
setParent | Generic
setParentID | Generic
SetPatchSteps | Primitive
setPoint | Generic
setProdTess | Generic
setRadius | Generic
setRenderApproximation | NodeGeneric
SetRenderType | Primitive
setSeed | Generic
setSurfaceDisplay | NodeGeneric
setTextureSurface | Generic
setTextureUVs | Generic
setTiling | Generic
setTilingOffset | Generic
setTrimSurface | Generic
setUCurveByID | Generic
setUKnot | Generic
SetUseDraftRenderer | Primitive
setVCurve | Generic
setVCurveByID | Generic
setViewApproximation | NodeGeneric
setViewTess | Generic
setVKnot | Generic
skinOps.saveEnvelope | Primitive
skipRenderedFrames | system BooleanClass
sliderManipulator | MSPluginClass
surfaceArriveBhvr | StructDef
surfaceArriveBhvr.getPos | Primitive
surfaceArriveBhvr.getState | Primitive
units.CustomName | SystemGlobal
units.CustomUnit | SystemGlobal
units.CustomValue | SystemGlobal
units.decodeValue | Primitive
updateSurfaceMapper | Primitive
vfields | StructDef
vfields.blendVectors | Primitive
vfields.computeVectors | Primitive
videoPostTracks | system MAXTVNode
Viewport.GetBlowupRect | Primitive
Viewport.GetRegionRect | Primitive
Viewport.SetBlowupRect | Primitive
Viewport.SetRegionRect | Primitive


Classes Not Supported in Plasma

Classes

MoFlow | Class
MoFlowScript | Class
MoFlowSnippet | Class
MoFlowTranInfo | Class
MoFlowTransition | Class
MSBipedRootClass | Class
MultipleFSParams | Class
NURBS1RailSweepSurface | Class
NURBS2RailSweepSurface | Class
NURBSBlendCurve | Class
NURBSBlendSurface | Class
NURBSCapSurface | Class
NURBSChamferCurve | Class
NURBSControlVertex | Class
NURBSCurve | Class
NURBSCurveConstPoint | Class
NURBSCurveIntersectPoint | Class
NURBSCurveOnSurface | Class
NURBSCurveSurfaceIntersectPoint | Class
NURBSCVCurve | Class
NURBSCVSurface | Class
NURBSDisplay | Class
NURBSExtrudeSurface | Class
NURBSFilletCurve | Class
NURBSFilletSurface | Class
NURBSIndependentPoint | Class
NURBSIsoCurve | Class
NURBSLatheSurface | Class
NURBSMirrorCurve | Class
NURBSMirrorSurface | Class
NURBSMultiCurveTrimSurface | Class
NURBSNBlendSurface | Class
NURBSObject | Class
NURBSOffsetCurve | Class
NURBSOffsetSurface | Class
NURBSPoint | Class
NURBSPointConstPoint | Class
NURBSPointCurve | Class
NURBSPointCurveOnSurface | Class
NURBSPointSurface | Class
NURBSProjectNormalCurve | Class
NURBSProjectVectorCurve | Class
NURBSRuledSurface | Class
NURBSSelection | Class
NURBSSet | Class
NURBSSurface | Class
NURBSSurfaceApproximation | Class
NURBSSurfaceEdgeCurve | Class
NURBSSurfaceNormalCurve | Class
NURBSSurfConstPoint | Class
NURBSSurfSurfIntersectionCurve | Class
NURBSTexturePoint | Class
NURBSTextureSurface | Class
NURBSULoftSurface | Class
NURBSUVLoftSurface | Class
NURBSXFormCurve | Class
NURBSXFormSurface | Class

MAXClasses

Adobe_Premiere_Video_Filter | MAXClass
Adode_Photoshop_Plug_In_Filter | MAXClass
Alpha | MAXClass
alphaRenderElement | MAXClass
Anisotropic | MAXClass
Apollo_Param_Container | MAXClass
apolloParamContainer | MAXClass
ASCII_Object_Output | MAXClass
Asset_Browser | MAXClass
Assign_Vertex_Colors | MAXClass
Atmosphere | MAXClass
atmosphereRenderElement | MAXClass
Auto_Secondary_Element | MAXClass
Autodesk_Animator_Flic | MAXClass
Automatic_Exposure_Control | MAXClass
Avoid_Behavior | MAXClass
AvoidBehavior | MAXClass
BackgroundRenderElement | MAXClass
Barycentric_Morph_Controller | MAXClass
Beauty | MAXClass
beautyRenderElement | MAXClass
bgndRenderElement | MAXClass
BlendRenderElement | MAXClass
Blizzard | MAXClass
blur | MAXClass
BoxGizmo | MAXClass
Brightness_and_Contrast | MAXClass
briteCon | MAXClass
Camera_Match | MAXClass
Camera_Tracker | MAXClass
CameraMap | MAXClass
CameraMapSpaceWarp | MAXClass
CamPoint | MAXClass
CIN | MAXClass
ClipAssigner | MAXClass
ClipAssignerReferenceTarget | MAXClass
ClipState | MAXClass
CMB | MAXClass
CogControl | MAXClass
collapse | MAXClass
Color_Balance | MAXClass
Color_Clipboard | MAXClass
colorBalance | MAXClass
COM_DCOM_Server_Control | MAXClass
Combustion | MAXClass
Compass | MAXClass
compositematerial | MAXClass
Cone_Angle | MAXClass
ConeAngleManip | MAXClass
ConformSpaceWarp | MAXClass
ControlContainerGeometry | MAXClass
ConvertToPatch | MAXClass
CrossSection | MAXClass
Crowd | MAXClass
CrowdAssignment | MAXClass
CrowdState | MAXClass
CrowdTeam | MAXClass
CrowdTransition | MAXClass
CSolver | MAXClass
Cubic_Morph_Controller | MAXClass
CV_Curve | MAXClass
CV_Curveshape | MAXClass
CV_Surf | MAXClass
CylGizmo | MAXClass
Damper | MAXClass
Dashpot | MAXClass
Delegate | MAXClass
DeleteMesh | MAXClass
DeletePatch | MAXClass
DeleteSplineModifier | MAXClass
Dent | MAXClass
dents | MAXClass
Depth_of_Field | MAXClass
Depth_of_FieldMPassCamEffect | MAXClass
Diffuse | MAXClass
diffuseRenderElement | MAXClass
Disp_Approx | MAXClass
Displace_Mesh | MAXClass
Displace_NURBS | MAXClass
DMCollection | MAXClass
DOFEffect | MAXClass
Dynamics | MAXClass
Dynamics_Position_Controller | MAXClass
Dynamics_Rotation_Controller | MAXClass
Edit_Mesh | MAXClass
Edit_Patch | MAXClass
Edit_Spline | MAXClass
emissionRenderElement | MAXClass
EPS_Image | MAXClass
FFD_2x2x2 | MAXClass
FFD_3x3x3 | MAXClass
FFD_4x4x4 | MAXClass
FFD2x2x2 | MAXClass
FFD3x3x3 | MAXClass
FFD4x4x4 | MAXClass
File_Output | MAXClass
fileOut | MAXClass
Fillet_Chamfer | MAXClass
Film_Grain | MAXClass
FilmGrain | MAXClass
Fire_Effect | MAXClass
Flat_Mirror | MAXClass
flatMirror | MAXClass
Float_Motion_Capture | MAXClass
Float_Wire | MAXClass
Fog | MAXClass
Follow_Bank | MAXClass
Footsteps | MAXClass
Fracture | MAXClass
Global_Container | MAXClass
Global_Motion_Clip | MAXClass
GlobalMotionClip | MAXClass
Glow Element | MAXClass
Glow_Element | MAXClass
Gradient | MAXClass
HSDS_Modifier | MAXClass
HSDSObject | MAXClass
IFL | MAXClass
IFL_Manager | MAXClass
IKHISolver | MAXClass
imageMotionBlur | MAXClass
Joystick_Input_Device | MAXClass
Lens_Effects | MAXClass
Level_of_Detail | MAXClass
Link_Inheritance__Selected | MAXClass
Manual_Secondary_Element | MAXClass
MapPath_Editor | MAXClass
Master_Motion_Clip | MAXClass
MasterClip | MAXClass
MaterialByElement | MAXClass
Materialmodifier | MAXClass
Matte | MAXClass
MatteShadow | MAXClass
MAX_File_Finder | MAXClass
MaxRenderer_COM_Server | MAXClass
MAXScript | MAXClass
Measure | MAXClass
Mesher | MAXClass
Metal | MAXClass
Metal2 | MAXClass
MIDI_Device | MAXClass
MinMaxAvg | MAXClass
Missing_Render_Effect | MAXClass
Morph | MAXClass
Morphermaterial | MAXClass
Motion_Blur | MAXClass
Motion_BlurMPassCamEffect | MAXClass
Motion_Capture | MAXClass
Motion_Clip | MAXClass
Motion_Clip_SlaveFloat | MAXClass
Motion_Clip_SlavePoint3 | MAXClass
Motion_Clip_SlavePos | MAXClass
Motion_Clip_SlaveRotation | MAXClass
Motion_Clip_SlaveScale | MAXClass
Motion_ClipFloatController | MAXClass
Motorhelper | MAXClass
Mouse_Input_Device | MAXClass
MultDeleg | MAXClass
Multi_Layer | MAXClass
MultiLayer | MAXClass
multiPassDOF | MAXClass
multiPassMotionBlur | MAXClass
Multiple_Delegate_Settings | MAXClass
Multiple_Delegates | MAXClass
NCurve_Sel | MAXClass
NSurf_Sel | MAXClass
Nurbs | MAXClass
NURBS_Imported_Objects | MAXClass
NURBSCurveShape | MAXClass
NURBSSurf | MAXClass
ObjAssoc | MAXClass
Oren_Nayar_Blinn | MAXClass
OrenNayarBlinn | MAXClass
Orientation_Behavior | MAXClass
OrientationBehavior | MAXClass
output | MAXClass
PArray | MAXClass
Particle_Age | MAXClass
Particle_Cache | MAXClass
Particle_MBlur | MAXClass
particleBlur | MAXClass
ParticleCache | MAXClass
particleMesher | MAXClass
Patch_Select | MAXClass
PatchDeform | MAXClass
Path_Follow_Behavior | MAXClass
PathFollowBehavior | MAXClass
PCloud | MAXClass
PDynaFlect | MAXClass
PDynaFlectMod | MAXClass
PDynaflector | MAXClass
Perlin_Marble | MAXClass
perlinMarble | MAXClass
Phong | MAXClass
Phong2 | MAXClass
Plane_Angle | MAXClass
PlaneAngleManip | MAXClass
Plug_in_Manager | MAXClass
Point_Cache | MAXClass
Point_CacheSpacewarpModifier | MAXClass
Point_Curve | MAXClass
Point_Curveshape | MAXClass
Point_Nail | MAXClass
Point_Path | MAXClass
Point_Point | MAXClass
Point_Surf | MAXClass
Point_SurfGeometry | MAXClass
Point3_Motion_Capture | MAXClass
Point3_Wire | MAXClass
PointCache | MAXClass
PointCacheWSM | MAXClass
Polygon_Counter | MAXClass
POmniFlect | MAXClass
POmniFlectMod | MAXClass
Position_Motion_Capture | MAXClass
Position_Wire | MAXClass
Priority | MAXClass
Protractor | MAXClass
PSD_I_O | MAXClass
quadPatch | MAXClass
Ray Element | MAXClass
Ray_Element | MAXClass
Ray_Engine | MAXClass
Raytrace | MAXClass
Raytrace_Engine_Global_Parameters | MAXClass
Raytrace_Texture_ParamBlock | MAXClass
RaytraceMaterial | MAXClass
Reflect_Refract | MAXClass
Reflection | MAXClass
reflectionRenderElement | MAXClass
reflectRefract | MAXClass
Refraction | MAXClass
refractionRenderElement | MAXClass
Repel_Behavior | MAXClass
RepelBehavior | MAXClass
Rescale_World_Units | MAXClass
Reset_XForm | MAXClass
Resource_Collector | MAXClass
rgb | MAXClass
RGB_Multiply | MAXClass
RGB_Tint | MAXClass
rgbMult | MAXClass
rgbTint | MAXClass
Ring Element | MAXClass
Ring_Array | MAXClass
Ring_Element | MAXClass
RLA | MAXClass
RmModel | MAXClass
RmModelGeometry | MAXClass
Rotation_Motion_Capture | MAXClass
Rotation_Wire | MAXClass
RPCollection | MAXClass
RPF | MAXClass
SBCollection | MAXClass
Scale_Motion_Capture | MAXClass
Scale_Reactor | MAXClass
Scale_Wire | MAXClass
Scatter | MAXClass
ScatterReferenceTarget | MAXClass
Scripted_Behavior | MAXClass
ScriptedBehavior | MAXClass
SDynaFlect | MAXClass
SDynaFlectMod | MAXClass
SDynaflector | MAXClass
Seek_Behavior | MAXClass
SeekBehavior | MAXClass
Self_Illumination | MAXClass
Setting | MAXClass
ShadowRenderElement | MAXClass
Shape_Check | MAXClass
SharedMoflow | MAXClass
SharedMoflowList | MAXClass
SharedMotionFlow | MAXClass
SharedMotionFlows | MAXClass
Shellac | MAXClass
Slave_Control | MAXClass
smoothReferenceTarget | MAXClass
SOmniFlect | MAXClass
SOmniFlectMod | MAXClass
Space_Warp_Behavior | MAXClass
SpaceCameraMap | MAXClass
SpaceSurfDeform | MAXClass
Specular | MAXClass
specularRenderElement | MAXClass
Speed_Vary_Behavior | MAXClass
SpeedVaryBehavior | MAXClass
SphereGizmo | MAXClass
Star Element | MAXClass
Star_Element | MAXClass
StateCreator | MAXClass
STL_Check | MAXClass
Strauss | MAXClass
Streak Element | MAXClass
Streak_Element | MAXClass
Strokes | MAXClass
Sunlight | MAXClass
Sunlight_Slave_Controller | MAXClass
SuperSpray | MAXClass
surface | MAXClass
Surface_Approximation | MAXClass
Surface_Arrive_Behavior | MAXClass
Surface_Follow_Behavior | MAXClass
Surface_Mapper | MAXClass
SurfaceArriveBehavior | MAXClass
SurfaceFollowBehavior | MAXClass
SurfDeform | MAXClass
Tape | MAXClass
Targa | MAXClass
TexmapsReferenceMaker | MAXClass
tgaio | MAXClass
Thin_Wall_Refraction | MAXClass
thinWallRefraction | MAXClass
TopBottom | MAXClass
topBottomMat | MAXClass
Toy_Car | MAXClass
Transition | MAXClass
Trim_Extend | MAXClass
triPatch | MAXClass
Turn_to_Patch | MAXClass
UDynaDeflector | MAXClass
UDynaFlect | MAXClass
UDynaFlectMod | MAXClass
Unwrap_UVW | MAXClass
UOmniFlect | MAXClass
UOmniFlectMod | MAXClass
UVW_Remove | MAXClass
UVW_Xform | MAXClass
Uvwmap | MAXClass
Vector_Field | MAXClass
Vector_Field_Modifier | MAXClass
VectorField | MAXClass
Vertex_Color | MAXClass
Vertex_Colors | MAXClass
Vertical_Horizontal_Turn | MAXClass
Visual_MAXScript | MAXClass
VisualMSUtil | MAXClass
Volume_Fog | MAXClass
Volume_Light | MAXClass
VUE_File_Renderer | MAXClass
Wall_Repel_Behavior | MAXClass
Wall_Seek_Behavior | MAXClass
WallRepelBehavior | MAXClass
WallSeekBehavior | MAXClass
Wander_Behavior | MAXClass
WanderBehavior | MAXClass
Water | MAXClass
WatertextureMap | MAXClass
Wave | MAXClass
Windhelper | MAXClass
WireFloat | MAXClass
WirePoint3 | MAXClass
WirePosition | MAXClass
WireRotation | MAXClass


Methods Not Supported in Plasma

Methods and Properties

ActiveXControl

ActionMan.loadKeyboardFile

ActionMan.saveKeyboardFile

ActionMan.getKeyboardFile

MaxOps.LoadCUIFile

ColorMan.RegisterColor

ColorMan.loadColorFile

ColorMan.saveColorFile

ColorMan.getColorFile

ColorMan.SetColor

ColorMan.SetIconColorScale

ColorMan.SetIconColorInvert

ColorMan.SetIconFolder

MenuMan.LoadMenuFile

MenuMan.saveMenuFile

MenuMan.getMenuFile

Standard.opacityType

Standard.filterColor

Standard.ior

Standard.applyReflectionDimming

Standard.dimLevel

Standard.reflectionLevel

Standard.sampler

Standard.samplerQuality

Standard.samplerEnable

Standard.samplerAdaptThrestandardhold

Standard.samplerAdaptOn

Standard.subSampleTextureOn

Standard.samplerAdvancedOptionstandard

Standard.samplerByName

Standard.userParam0

Standard.userParam1

Standard.bounce

Standard.staticFriction

Standard.slidingFriction

Extrude.output

Lathe.output

FreeCamera.mpassEnabled

FreeCamera.mpassRenderPerPass

FreeCamera.mpassEffect

TargetCamera.mpassEnabled

TargetCamera.mpassRenderPerPass

TargetCamera.mpassEffect

The following max commands are not supported in Plasma:

max array

max create mode

max customize ui

max display floater

max display mode

max hide main toolbar toggle

max hide tab panel toggle

max load custom UI

max safeframe toggle

max save custom UI as

max utility mode

Restrictions

  • Cannot save or export more than 1000 Plasma or material library files per session.

  • Strings are limited to 15000 characters.

  • The path string argument for mapPaths.add and xrefPaths.add is limited to 260 characters.

  • The number of selected characters in Listener is limited to 10000 characters.

  • External files cannot be opened in append or write mode.

  • The number of bitmap path directories is limited to 500.

  • Macroscripts access is available via macros structure package only.

render()

Specifying outputwidth and outputheight greater than 640000 pixels is invalid. The render will be clamped to the aspect ratio defined by outputwidth and outputheight, and then made as large as possible without exceeding 640000 pixels.

renderWidth

If the resulting resolution will be larger than 64000 pixels, setting renderWidth will change the value of renderHeight so that the resolution will be less than 640000 pixels.

renderHeight

If the resulting resolution will be larger than 64000 pixels, setting renderHeight will change the value of renderWidth so that the resolution will be less than 640000 pixels.


Interfaces Not Supported in Plasma

Interfaces

HDIKSys | Interface
NetCreateHelpers | Interface
netrender | Interface
paramWire | Interface
pluginManager | Interface
SceneExposureControl | Interface


Additional Classes and Globals Defined in Plasma

Additional Classes and Globals Defined in Plasma

Browser | StructDef
Browser.gotoURL | Primitive
Browser.open | Primitive
BrowserUtilityPlugin | MAXClass
mapping | MAXClass
Unwrap_Mapping | MAXClass

Interfaces

s3dexporter | Interface
toolboxOps | Interface

Interface Methods

Interface: S3dexporter

Methods:

<void> preview()

Opens the Shockwave 3D preview window. This window displays the scene as it has been captured by the Shockwave 3D Exporter.

<void> analyze()

Opens the Shockwave 3D analyze dialog. This dialog provides a graphic breakdown of the data in the W3D file.

<void> authcheck()

Opens a window displaying warning messages about possible problems found converting the scene to the W3D file format.

Interface:ToolboxOps

Properties:

.visible : boolean : Read|Write

Get/Set toolbox visible state.

.extendedPanel: boolean : Read|Write

Get/Set toolbox extended panel state. This determines whether or not the Havok buttons are visible at the bottom of the toolbox.


Using the HTML Help Viewer

This online information system is a compiled HTML help (.chm) file; you view it using Microsoft's HTML Help Viewer, powered by Internet Explorer. The HTML Help Viewer is a three-pane window:

  • The Navigation pane is on the left side of the window. It contains four navigational tabs, for Contents, Index, Search , and Favorites .

  • The Topic pane is on the right side of the window. It displays the selected help topic, or the default help topic.

  • The toolbar is the third pane, located below the help window title bar.

Here are some tips on how to find more information when using the HTML Help Viewer:

  • To link to another topic or a list of other topics, click the colored, underlined words in the Topic pane.

  • If you use a particular help topic often, you can add it to your favorites list .

  • Right-click the Contents or Favorites tab or the Topic pane for shortcut menu commands.

See also

Finding Information Fast

Searching for Help Topics

NOTE:

Most of information about using the HTML Help Viewer has been supplied directly by Microsoft. It has been made freely available for inclusion in HTML help projects such as this one. This information has been edited and reformatted to match the Discreet online information systems.

Procedures

To find a help topic

  1. In the Navigation pane, click one of the following tabs:

  • To browse through a table of contents, click the Contents tab. The table of contents is an expandable list of important topics.

  • To see a list of index entries, click the Index tab, and then type a word or scroll through the list. Topics are often indexed under more than one entry.

  • To locate every occurrence of a word or phrase that may be contained in a help file, click the Search tab, and then type the word.

  2. Click the contents entry, index entry, or search results entry to display the corresponding topic.

To copy a help topic

  1. In the Topic pane, right-click the topic you want to copy, and then click Select All.

  2. Right-click again, and then click Copy. This copies the topic to the Clipboard.

  3. Open the document you want to copy the topic to.

  4. Position your cursor where you want the information to appear.

  5. On the Edit menu, click Paste.

To copy only part of a topic

  • Select the text you want to copy, right-click, and then click Copy.

To print the current help topic

  • Right-click a topic, and then click Print.

If you print from the Contents tab (by right-clicking an entry, and then clicking Print) you will see options to print only the current topic, or the current topic and all subtopics.

To hide or show the Navigation pane

  • On the toolbar, click Hide or Show to close or display the Navigation pane, which contains the Contents, Index, Search, and Favorites tabs.

If you close the Help Viewer with the Navigation pane hidden, it will appear that way when you open the Help Viewer again.


Finding Information Fast

Use the Navigation pane in the Help Window to get to information quickly. It contains tabs that let you use Contents, Index, or Search techniques to get to topics you need.

Contents Tab

The Contents tab displays the main sections of this 3ds Max online system as book icons. When you click a book, it expands to show the list of topics contained within it, like chapters in hard-copy books.

To go to a topic from the Contents tab

  1. Click the Contents tab to display the Table of Contents view.

  2. Click the book icon representing the area for which you want information.

The page icons for the book expand below representing all the topics for the book’s feature area.

  1. Click the page icon for the topic you want.

Index Tab

The Index is an alphabetical listing of keywords found in each topic. A single keyword may be linked to more than one topic. You may type the first few letters of a subject to jump to an index entry that matches what you are looking for.

To go to a topic from the Index tab

  1. Click the Index tab to display the Help Index.

  2. In the form at the top of the Index, type the subject you want to find, or scroll through the alphabetical list to find the term for which you need information.

  3. Click the term, then click Display to see the topic for that term, or double-click the term to see its topic.

The topic displays in the right pane and may show links to related topics.

Search Tab

The Search tab summons a full-text search engine that operates on a database of every word in the help system, created when the HTML Help system was compiled. You can use tools on the Search tab to find the help topics containing any word or phrase.


Searching for Help Topics

A basic search consists of the word or phrase you want to find. You can use Boolean, wildcard, and nested expressions. You can also limit the search to previous results, match similar words, or search topic titles only to further define your search.

The basic rules for formulating queries are as follows:

  • Searches are not case-sensitive, so you can type your search in uppercase or lowercase characters.

  • You may search for any combination of letters (a through z) and numbers (0 through 9).

  • Punctuation marks such as the period, colon, semicolon, comma, and hyphen are ignored during a search.

  • Group the elements of your search using double quotes or parentheses to set apart each element. You cannot search for quotation marks.

Note: If you are searching for a file name with an extension, you should group the entire string in double quotes, ("filename.ext"). Otherwise, the period will break the file name into two separate terms. The default operation between terms is AND, so you will create the logical equivalent to "filename AND ext."

Searching for Words or Phrases: Using Wildcards

You can search for words or phrases and use wildcard expressions. Wildcard expressions allow you to search for one or more characters using a question mark or asterisk. The table below describes the results of these different kinds of searches.

Search for

Example

Results

A single word

select

Topics that contain the word "select." (You will also find its grammatical variations, such as "selector" and "selection.")

A phrase

"new operator"
or
new operator

Topics that contain the literal phrase "new operator" and all its grammatical variations.

Without the quotation marks, the query is equivalent to specifying "new AND operator," which will find topics containing both of the individual words, instead of the phrase.

Wildcard expressions

esc*
or
80?86

Topics that contain the terms "ESC," "escape," "escalation," and so on. The asterisk cannot be the only character in the term.

Topics that contain the terms "80186," "80286," "80386," and so on. The question mark cannot be the only character in the term.

Turn on Match Similar Words to include minor grammatical variations for the phrase you search.

Defining Search Terms: Using Boolean Expressions

The AND, OR, NOT, and NEAR operators enable you to precisely define your search by creating a relationship between search terms. The following table shows how you can use each of these operators. If no operator is specified, AND is used. For example, the query "spacing border printing" is equivalent to "spacing AND border AND printing."

Search for | Example | Results
Both terms in the same topic. | dib AND palette | Topics containing both the words "dib" and "palette."
Either term in a topic. | raster OR vector | Topics containing either the word "raster" or the word "vector" or both.
The first term without the second term. | ole NOT dde | Topics containing the word "OLE," but not the word "DDE."
Both terms in the same topic, close together. | user NEAR kernel | Topics containing the word "user" within eight words of the word "kernel."

Note: The |, &, and ! characters don't work as Boolean operators (you must use OR, AND, and NOT).

Using Nested Expressions When Searching

Nested expressions allow you to create complex searches for information. For example, "control AND ((active OR dde) NEAR window)" finds topics containing the word "control" along with the words "active" and "window" close together, or containing "control" along with the words "dde" and "window" close together.

The basic rules for searching help topics using nested expressions are as follows:

  • You can use parentheses to nest expressions within a query. The expressions in parentheses are evaluated before the rest of the query.

  • If a query does not contain a nested expression, it is evaluated from left to right. For example: "Control NOT active OR dde" finds topics containing the word "control" without the word "active," or topics containing the word "dde." On the other hand, "control NOT (active OR dde)" finds topics containing the word "control" without either of the words "active" or "dde."

  • You cannot nest expressions more than five levels deep.

Procedures

To go to a topic from the Search tab

  1. Click the Search tab, and then type the word or phrase you want to find.

  2. Click the Boolean button (to the right of the test field) to add Boolean operators to your search.

  3. Click List Topics, choose the topic you want, and then click Display.

  4. To sort the topic list alphabetically, click the Title column heading.

You can precisely define a search by using wildcard expressions, nested expressions, and Boolean operators.

You can request similar word matches, search only the topic titles, or search the results of a previous search.

You can set the Help Viewer to highlight all instances of search terms that are found in topic files. Click the Options button, and then click Search Highlight On.

To highlight words in searched topics

When searching for words in help topics, you can have each occurrence of the word or phrase highlighted in the topics that are found.

  • To highlight all instances of a search word or phrase, click Options on the toolbar, and then click Search Highlight On.

To turn off this option, click Options on the toolbar, and then click Search Highlight Off.

If you are viewing a long topic, only the first 500 instances of a search word or phrase will be highlighted.

To search for words in the titles of HTML files

  1. Click the Search tab, type the word or phrase you want to find, and then turn on Search Titles Only.

  2. Click List Topics, choose the topic you want, and then click Display.

If you use this option, all HTML topic files will be searched, including any that are not listed in the table of contents.

To find words similar to your search term

This feature enables you to include minor grammatical variations for the phrase you search. For example, a search on the word "add" will find "add," "adds," and "added."

  1. Click the Search tab, type the word or phrase you want to find, and then turn on Match Similar Words.

  2. Click List Topics, choose the topic you want, and then click Display.

This feature only locates variations of the word with common suffixes. For example, a search on the word "add" will find "added," but it will not find "additive."

To search only the last group of topics you searched

This feature enables you to narrow a search that results in too many topics found. You can search through your results list from previous search by using this option.

  1. On the Search tab, turn on Search Previous Results.

  2. Click List Topics, choose the topic you want, and then click Display.

If you want to search through all of the files in a help system, this check box must be off.

If you previously used this feature, the Search tab opens with this check box turned on.

To repeat an earlier search

  • Click the down arrow on the text-entry field and choose a previously used search string, and then click List Topics.


Favorites Tab (HTML Help Viewer)

Favorites Tab

Use tools on the Favorites tab to create a set of topics you use often; you can name them as you choose.

Procedures

To create a list of favorite help topics

  1. Locate the help topic you want to make a favorite topic.

  2. Click the Favorites tab, and then click Add.

To return to a favorite topic

  1. Click the Favorites tab.

  2. Choose the topic, and then click Display.

To rename a topic in the Favorites list

  • Choose the topic, and then enter a new name in the Current topic box.

To remove a favorite topic

  • Choose the topic, and then click Remove.


HTML Help Viewer Toolbar

The Help Viewer toolbar contains the following features.

Hide/Show: Click this toggle to hide the Navigation pane when it is displaying, or show it when it's hidden.

Back/Forward: Click to move to the previously viewed topic, or forward to the following previously-viewed topic.

Print: Prints the current topic (if the Topic pane is active). If the table of contents is active on the Navigation pane, you can choose to print the current topic, or the topic and its subtopics. This is a way of printing a collection of topics.

Options menu: Contains the following commands.

Hide/Show Tabs: Same as Hide/Show buttons, above.

Back/Forward: Same as Back/Forward buttons, above.

Home: Displays the main topic of this online system.

Stop: Halts display of a topic.

Refresh: Redraws the Help Viewer display.

Internet Options: Displays a dialog to change Internet Explorer (IE) settings. The 3ds Max information systems do not use this feature. Making changes here does not affect these systems, but will alter your IE browser settings. We do not recommend you use this option.

Print: Same as the Print button, above.

Search Highlight On/Off: Toggles highlighting on and off for each occurance of a word or phrase found with a search.


HTML Help Viewer Right-Click Menus

There are several commands on the shortcut menu that you can use to display information.

Command | Description
Right-click in the table of contents, and then click Open All. | Opens all books or folders in the table of contents. This command only works if the Contents tab is displayed.
Right-click in the table of contents, and then click Close All. | Closes all books or folders. This command only works if the Contents tab is displayed.
Right-click in the Topic pane, or an entery in the table of contents, and then click Print. | Prints the topic.
Right-click an entry in the Favorites tab. | Choose to display, add, remove, or rename a topic.


Keyboard Shortcuts in the Help Viewer

The following keyboard shortcuts can be used for navigation in the HTML Help Viewer, or the Contents , Index , Search , or Favorites tabs on the Navigation pane.

Help Viewer

To | Press
Close the Help Viewer. | ALT+F4
Switch between the Help Viewer and other open windows. | ALT+TAB
Display the Options menu. | ALT+O
Hide or show the Navigation pane. | ALT+O, and then press T
Print a topic. | ALT+O, and then press P, or right-click in the Topic pane and choose Print.
Move back to the previous topic. | ALT+LEFT ARROW, or ALT+O, and then press B
Move forward to the next topic (provided you have viewed it just previously). | ALT+RIGHT ARROW, or ALT+O, and then press F
Turn on or off search highlighting. | ALT+O, and then press O
Refresh the topic that appears in the Topic pane (this is useful if you have linked to a Web page). | F5, or ALT+O, and then press R
Return to the home page (help authors can specify a home page for a help system). | ALT+O, and then press H
Switch between the Navigation and Topic panes. | F6
Scroll through a topic. | UP ARROW and DOWN ARROW, or PAGE UP and PAGE DOWN
Scroll through all the links in a topic or through all the options on a Navigation pane tab. | TAB
Search inside the current topic | CTRL+F

Contents Tab

To | Press
Display the Contents tab. | ALT+C
Open and close a book or folder. | PLUS SIGN and MINUS SIGN, or LEFT ARROW and RIGHT ARROW
Choose a topic. | DOWN ARROW and UP ARROW
Display the selected topic. | ENTER

Index Tab

To | Press
Display the Index tab. | ALT+N
Type a keyword to search for. | ALT+W, and then type the word
Choose a keyword in the list. | UP ARROW and DOWN ARROW
Display the associated topic. | ALT+D

Search Tab

To | Press
Display the Search tab. | ALT+S
Type a keyword to search for. | ALT+W, and then type the word
Start a search. | ALT+L
Choose a topic in the results list. | ALT+T, and then UP ARROW and DOWN ARROW
Display the selected topic. | ALT+D
Search for a keyword in the result list of a prior search. | ALT+U
Search for words similar to the keyword. For example, to find words like "running" and "runs" for the keyword "run." | ALT+M
Only search through topic titles. | ALT+R

Favorites Tab

To | Press
Display the Favorites tab. | ALT+I
Add the currently displayed topic to the Favorites list. | ALT+A
Choose a topic in the Favorites list. | ALT+P, and then UP ARROW and DOWN ARROW
Display the selected topic. | ALT+D
Remove the selected topic from the list. | ALT+R

Notes

  • There are also shortcut menu commands that can be accessed through the keyboard.

  • Every time you use a shortcut key in the Navigation pane, you lose focus in the Topic pane. To return to the Topic pane, press F6.

  • The Match Similar Words check box, on the Search tab, will be turned on if you used it for your last search.


Animation Controllers - Quick Navigation

Animation Controllers

Animation Controllers
Controller Common Properties, Operators, and Methods
FloatController
AudioFloat | Boolean_Float | Bezier_Float | Block
Float_Expression | Float_List | Float_Motion_Capture | Float_Reactor
Float_Script | Linear_Float | LOD_Controller | Noise_Float
On_Off | SlaveFloat | TCB_Float | Waveform_Float
Float_Layer | Layer_Output |  |
Point3Controller
AudioPoint3 | Bezier_Color | Bezier_Point3 | Color_RGB
Noise_Point3 | Point3_Expression | Point3_List | Point3_Motion_Capture
Point3_Reactor | Point3_Script | Point3_XYZ | Slave_Point3
TCB_Point3 | Point3_Layer | SpringPoint3Controller |
Point4Controller
Point4_Layer |  |  |
PositionController
Attachment | Audioposition | Bezier_Position | Dynamic_Position_Controller
Linear_Position | Noise_Position | Path | Position_Expression
Position_List | Position_Motion_Capture | Position_Reactor | Position_Script
Position_XYZ | Surfaceposition | TCB_Position | Path_Constraint
Position_Constraint | Position_Layer | SpringPositionController |
RotationController
AudioRotation | Bezier_Rotation | Euler_XYZ | Dynamics_Rotation_Controller
Linear_Rotation | Local_Euler_XYZ | Noise_Rotation | Rotation_List
Rotation_Motion_Capture | Rotation_Reactor | Rotation_Script | SlaveRotation
TCB_Rotation | LookAt_Constraint | Orientation_Constraint | Rotation_Layer
ScaleController
AudioScale | Bezier_Scale | Linear_Scale | Noise_Scale
Scale_Expression | Scale_List | Scale_Motion_Capture | Scale_Reactor
Scale_Script | ScaleXYZ | SlaveScale | TCB_Scale
Matrix3Controller
Link_Control | Link_Transform | LookAt | PRS
IK_ControllerMatrix3Controller | Slave_Controller | SplineIKChain | IKChainControl
IKControl | XRef_Controller | Link_Constraint |
MorphController
Barycentric_Morph_Controller | Cubic_Morph_Controller |  |
QuatController
MasterBlockController
Block_Control | MasterBlock |  |


Atmospheric and Render Effects - Quick Navigation

Atmospheric and Render Effects

Atmospheric Effects:
Atmospheric : MAXWrapper
Atmospheric Effects Common Properties, Operators, and Methods
Working with Atmospherics
Fire_Effect | Fog | Volume_Fog | Volume_Light
RenderEffects:
RenderEffect : MAXWrapper
Render Effects Common Properties, Operators, and Methods
Blur Effect | Brightness and Contrast | Color Balance Effect | Depth of Field
File Output Effect | Film Grain | Lighting_Analysis_Overlay | Motion_Blur
Lens Effects
Auto_Secondary | Glow | Manual_Secondary | Ray
Ring | Star | Streak |


Avguard DLX Extension

Prior to 3ds Max 2008, the Avguard DLX Extension developed by Larry Minton, lead MAXScript Developer at Autodesk, was available for free download. It has been used in many 3rd party scripts and is now completely incorporated into the 3ds Max MAXScript language, making the development and distribution of scripts using the functionality provided by the extension much easier.

If a script developed for 3ds Max 2008 uses methods and variables from the Avguard Extension and the script has to be made compatible with 3ds Max 9 and earlier, please download the version of the Avguard DLX Extension for the corresponding earlier version of 3ds Max and make sure the method / variable still exists in that build and uses the same syntax.


Biped Sample Scripts

Here are the sample scripts that ship with character studio 4.

../Cstudio/Docs/Readcsm.ms.

-- A script to input a .csm file

../Cstudio/Docs/csmxport.ms

-- A script to output a .csm file

-- This script assumes that you have set up a .max file containing a biped or bone structure with a set of markers linked to the skeleton.

-- The markers you want to record should be contained in a Selection Set titled "markers"

-- The script will output the data at every frame for the entire animation range.

See also

Biped MAXScript Extensions

MAXScript Extensions in character studio


Character Studio

Biped Creation, Display, Load and Save
Biped Creation | Display Preferences | Biped Load and Save |
Biped Hierarchy, Layers, SubAnims
Node Hierarchy | Layers | Biped Transform | Biped Sub Anims
SubAnim Controller |  |  | Copy and Paste Posture
Biped Footsteps
Footsteps and Footprints | FootSteps : Matrix3 Controller | Biped Footprints | MultFprintParams Class
Biped Controllers
Biped Controllers | Biped Slave Controller | Vertical_Horizontal_Turn(Body) | SubAnim Controller
Sub Anim Methods |  |  |
Biped Keys and Motion Capture
Biped Keys | BipedFSKey | BipedKey | Biped Motion Capture
Biped Motion Flow
Biped Motion Flow | MoFlow | MoFlowScript | MoFlowSnippet
MoFlowTranInfo | MoFlowTransition |  |
Other Biped Topics
Crowd Interaction | Transform Methods | Sample Scripts | Miscellaneous Methods
Crowds
Crowd : Helper | Delegate:Helper | CrowdScatter | CrowdAssignment
CrowdTeam | CrowdState | CrowdTransition | Crowds - Methods
Crowd Behaviors
Avoid_Behavior | CogControl | Orientation_Behavior | Path_Follow_Behavior
Repel_Behavior | Scripted_Behavior | Seek_Behavior | Space_Warp_Behavior
Speed_Vary_Behavior | Wall_Repel_Behavior | Wall_Seek_Behavior | Surface_Follow_Behavior
Wander_Behavior |  |  | Surface_Arrive_Behavior
MotionClips and GlobalMotionClip
Clip_Associations | ClipAssigner | ClipState | ClipAssignerReferenceTarget
Space Warps
Vector_Field |  |  |
WorkBench Core Interfaces
BipWorkBench | BipAnalyzer | BipFixer | BipFilter


MAXScript Extensions in character studio 3

See MAXScript Extensions in character studio for access to character studio.


.topic 0x10000000

 logsystem Struct
 System Globals:
 logsystem.quietMode SystemGlobal:quietMode default:false
 Lets you get and set whether error logging quiet mode is enabled. A Boolean value set to true when you do not want error messages from the renderer to bring up dialog boxes. If set to false, error messages from the renderer will bring up dialog boxes. 3ds Max sets the corresponding internal variable to true during network rendering to suppress error messages such as the "Missing Maps" and "Missing Map Coordinates" dialogs. If this variable is set to true and the renderer generates an error message, the renderer will exit. After setting quiet mode, do not forget to clear it when you are done, since the user will not see any error messages from the renderer while quiet mode is enabled.
 Methods:
 logsystem.logEntry < string > [debug:<bool>] [info:<bool>] [warning:<bool>] [error:<bool>]
 Outputs the string to the log file, based on the various type keyword parameters.
 Default values are: debug:true, info:false, warning:false, error:false
 Output to the log file is filtered by the settings in the Preference Settings dialog, Files tab.

 <filename>logsystem.logName <filename>
 Sets the log file to the given filename. If the log file was created successfully, returns the new log name. If the new file creation failed, returns the current log file name.
 Available in 3ds Max 9 and higher.

 EXAMPLE:

 logsystem.logName "c:\\extra.log"
 "c:\extra.log"
 logsystem.logName "z:\\extra.log" --Z: does not exist, keeps old log
 "c:\extra.log"


Core Interfaces Quick Navigation

Core Interfaces

Animation:
AnimLayerManager | BoneSys | BipAnalyzer | BipFilter
BipFixer | BipWorkBench | HDIKSys | IKSys
LoadSaveAnimation | paramWire | reactionMgr | SkinUtils
tmGizmos | trackviews |  |
Asset Tracking and Scene Data Management:
ATSCustomDepsOps | ATSOps | BitmapProxyMgr | dragAndDrop
SceneExplorerManager | sceneStateMgr | SchematicViews |
Interaction with 3ds Max:
ActionItemOverride Manager | actionMan | autosave | browserMgr
BrushPresetMgr | cmdPanel | colorMan | defaultActions
DialogMonitorOPS | EditRenderRegion | FrameTagManager | gridPrefs
IDisplayGamma | LayerManager | maxOps | menuMan
MtlBrowserFilter_Manager | netrender | ProjectionRenderMgr | quadMenuSettings
rollup | StatusPanel | SteeringWheelsOps | timeSlider
TrackSelectionSets | UtilityPanel | UIAccessor | ViewCubeOps
walkThroughOps |  |  |
Materials, Lighting and Rendering:
AssignVertexColors | batchRenderMgr | BitmapLayerManager | dxshadermanager
globalDXDisplayManager | Hair | IViewport ShadingMgr | LightingUnits
mental_ray_Preferences | medit | ProjectionIntersectorMgr | PseudoColorManager
RadiosityPreferences | radiosityMeshOps | renderpresets | SceneExposureControl
SceneRadiosity | SceneEffectLoader | XMLMaterial |
Nodes, Hierarchies, Objects, Channels, Custom Attributes:
blockMgr | assemblyMgr | custAttribCollapseManager | ChannelInfo
heightManager | InstanceMgr | manip | particleFlow
ParamCollectorOps | refhierarchy | RingArray | simpleFaceManager
SubstManager | WorkingPivot |  |
File and Data I/O
FileLinkMgr | IMetaDataManager | NetworkManager | MemStreamMgr
msZip | objXRefs | pluginManager | s3dexporter
styleMgr |  |  |
Programming and Other Interfaces
MXSDebugger | visualMS | NullInterface |
Daylight Simulation
DaylightSimulationUIOps | DaylightSimulationUtilities | DaylightSystemFactory2 | LightingAnalysisOverlayFactory
LightMeterManager | LuminosityUtil |  |


Creating User Interfaces - Quick Navigation

Creating User Interfaces

Utilities and Rollouts
Scripted Utilities and Rollouts | Scripted Utility Panels
Utility Clauses | Managing Multiple Rollouts in a Scripted Utility
Rollouts and Subrollouts
Rollout Clauses | Rollout Properties, Methods, Event Handlers
Rollout Floater Windows | RolloutCreator Functions
SubRollout Class |
Rollout .Controls Property | Rollout Systems 'category' Mechanism
Visibility of Locals, Functions, Structures and User-Interface Items in Rollout Code
Accessing Locals and Other Items in a Rollout from External Code
MAXScript Dialogs and Rollout Floaters as Extended viewports
Rollout User-Interface Controls
Rollout User-Interface Controls Common Properties
Rollout User-Interface Controls Common Layout Parameters
Setting Focus on User Interface Controls

Rollout User-Interface Controls Types
angle | slider | spinner | progressbar
button | pickbutton | mapbutton | materialbutton
checkbutton | checkbox | colorpicker | radiobuttons
listbox | multilistbox | dropdownlist | combobox
edittext | hyperLink | label | groupBox
bitmap | imgTag |  |
SubRollout | curvecontrol | timer |

Dialogs
CreateDialog | DestroyDialog | GetDialogPos & SetDialogPos
Register and Unregister DialogBar | Dock and Float DialogBar | cui.getDockState
Right Click Menus
popUpMenu | RCMenu Clauses | RCMenu UI Items
menuItem | separator | subMenu
DotNet Controls
DotNet In MAXScript | dotNet Struct Methods |
dotNetClass | dotNetObject | dotNetControl
dotNetMXSValue | dotNetMethod | MXS/.NET Value Conversions
ActiveX Controls
ActiveX Controls in MAXScript Rollouts
ActiveX fix for controls/objects without a default interface
ActiveX by-reference arguments for methods and events
Listview ActiveX functions | updateWindow | loadPicture


Edit Poly Selection Mode

The Edit Poly / Editable Poly Preview Selection Mode introduced in 3ds Max 2008 allows you to pick from three selection modes:

  • Off - the old sub-object selection mode where only the current sub-object element can be selected, without any interactive preview;

  • Sub-Object - the new selection mode where the current sub-object selection is being highlighted by the mouse and can be confirmed with a mouse click;

  • Multi - a new selection mode which highlights the possible sub-object selection closest to the mouse and switches to the currently highlighted element's mode with a mouse click.


Editable Mesh Quick Navigation

Editable Mesh

Constructors:
Constructors (Editable_Mesh) | Constructors (TriMesh) |
General Properties and Methods:
Properties | Methods | General Methods
Vertex Methods:
Vertex Methods | Vertex Methods (meshop struct) | Vertex Data Methods (meshop struct)
Edge Methods:
Edge Methods | Edge Methods (meshop struct) |
Face and Mesh Methods:
Face Methods | Face Methods (meshop struct) | Mesh Methods (meshop struct)
Mapping Methods:
Understanding Texture Coordinates
Texture Vertex Methods | Color-Per-Vertex Methods | General Mapping Methods (meshop struct)
Other Methods:
Subdivision Displacement Surface Properties Methods
Editable Mesh UI Property Methods (meshop struct)
Editable Mesh Modify Panel Command Modes and Operations (meshOps struct)


Editable Poly Quick Navigation

Editable Poly

Editable Poly:GeometryClass :
Properties
Selection Rollout | Soft Selection Rollout | Edit Vertices Rollout
Edit Edges Rollout | Edit Borders Rollout | Edit Polygons Rollout
Edit Geometry Rollout | Edit Elements Rollout | Vertex Properties Rollout
Material IDs Rollout | Smoothing Groups Rollout | Vertex Colors Rollout
Subdivision Surface Rollout | Subdivision Displacement Rollout | Paint Deformation Rollout
polyOp Methods
Get/Set Selection | Get By Flag | Get Count
Get/Set Hidden | Edge Visibility | Open Edges
Get By Face | Get By Edge | Get Dead Elements
Dead Structures | Face Material IDs | Manipulate Vertex
Get A Using B | Face Center,Normal,Area | Attach
Delete | Weld | Create
Auto-Smooth | Triangulation | Subdivisions
Break Divide Split | Face Smoothing Groups | Collapse
Propagate Flags | Tessellate | Detach
Slice_Plane | Extrude Bevel Chamfer | Cap_Holes
Make Planar | Create Shape From Edges | Cut
Mapping Methods |  |
Interface: EditablePoly
Hide Unhide | Copy/Paste NamedSelSets | Create
Delete | Attach_Detach | Break Split Divide
Collapse | Extrude_Faces | Bevel
Chamfer | Bridge | Relax
Slice | Cut | Weld
Make_Planar | Create Shape From Edges | Subdivide
Triangulation | Select Faces By... | UI_Commands
Get Set By Flag | Slice Plane | Get Set Data
Preview Mode | Convert Selection | Remove
Connect | Toggle Shaded Faces | Get Set Selections
Get Vertex | Get Edge | Get Face
Get Map Channel |  |


Geometry Objects Quick Navigation

Geometry Objects

GeometryClass : Node
Common Properties, Operators, and Methods
Standard and Extended Geometry Primitives:
Box | Capsule | ChamferBox | ChamferCyl | Cone
Cylinder | C_Ext | Gengon | Geosphere | Hedra
L_Ext | OilTank | Plane | Prism | Pyramid
RingWave | Sphere | Spindle | TargetObject | Teapot
Torus | Torus_Knot | Tube |  |
Dynamic Geometry Objects:
Damper | Hose | Spring |  |
Compound Geometry Objects:
Boolean2 | Conform | Connect | Loft | Mesher
Morph | Scatter | ShapeMerge | Terrain |
Door and Windows Geometry Objects:
Awning | BiFold | Casement | Fixed | Pivot
Pivoted | Projected | SlidingDoor | SlidingWindow |
Extended AEC Geometry Objects:
Foliage | Railing | Wall |  |
Stairs Geometry Objects:
L_Type_Stair | Spiral_Stair | Straight_Stair | U_Type_Stair |
Patch Geometry Objects:
QuadPatch | TriPatch |  |  |
Particle System Geometry Objects:
PF_Source | Blizzard | PArray | PCloud | Snow
Spray | SuperSpray |  |  |
NURBS Geometry Objects:
NURBSSurf | Point_Surf |  |  |
Bone Geometry Objects:
BoneGeometry |  |  |  |
mental ray Geometry Objects:
mr_Proxy |  |  |  |


Helpers - Quick Navigation

Helpers

Helpers
Standard
Compass | Crowd | Delegate | Dummy
ExposeTm | Grid | Point | Protractor
Tape |  |  | (Bone)
Atmospheric
BoxGizmo | CylGizmo | SphereGizmo |
Camera Match
CamPoint |  |  |
reactor
A_Dashpot | Carwheel | CLCollection | CSolver
DMCollection | Fracture | Hinge | L_Dashpot
Motorhelper | Planehelper | Point_Point | Point_Path
Prismatic | Ragdoll | RBCollection | RPCollection
SBCollection | Springhelper | Toy_Car | Windhelper
Assemly Heads
Luminaire |  |  |
Manipulators
Cone_Angle | Plane_Angle | sliderManipulator |
Particle Flow
SpeedByIcon | Find_Target |  |
VRML97
Anchor | AudioClip | Background | Billboard
FogHelper | InlineHelper | LODHelper | NavInfo
ProxSensor | Sound | TouchSensor | TimeSensor
Miscellaneous
Axis_Helper | LinkOriginPtHelper | Substitute_Object |
Internal Non-Creatable Manipulators
Falloff_Manipulator | Hotspot_Manip | IK_Spline_End_Twist_Manip | IK_Spline_Start_Twist_Manip
IK_Swivel_Manip | Position_Manip | Reactor_Angle_Manip | Rotation_Value
Slider_Manip | uvwMappingHeightManip | uvwMappingLengthManip | uvwMappingUTileManip
uvwMappingVTileManip | uvwMappingWidthManip |  |


How do I set the default path for file operations in MAXScript?

MAXScript FAQ > How do I set the default path for file operations in MAXScript?

A user asked:

When calling functions that read or write files without specifying the path, MAXScript seems to use some sort of current directory. How can I specify it myself?

Answer:

The sysinfo.currentdir global variable shows the current directory where MAXScript will look for files when no explicit path is specified.

Because this variable can not only be read but also set, you can specify a current directory by assigning to the sysinfo.currentdir global variable.

See System Information for more details and examples.


How To ... Develop a Bitmap Painting Tool In Nine Easy Steps

How To > Develop a Bitmap Painting Tool In Nine Easy Steps

The following set of tutorials will demonstrate the process of developing a bitmap painting tool from the simplest form up to an advanced utility with capabilities similar to those found in MS Paint.

1. Basic Utility

2. Strokes Support

3. Brush Size and Color

4. Airbrush and Shapes

5. Smooth Brushes

6. Load and Save

7. Erase Changes

8. Unwrap UV Coordinates

9. 3D Painting


How To ... Read and Write Geometry Data

How To > Output Geometry Data To Text File - Part One

How To ... Output Geometry Data To Text File - Part One

How To ... Read Geometry Data From Text File - Part One

How To ... Output Geometry Data To Text File - Part Two

How To ... Read Geometry Data From Text File - Part Two


How To … Script Particle Flow

How To > Script Particle Flow

How To ... Transfer ParticleFlow Particle Motion To Scene Objects

How To ... Affect Particle Flow Particles by Mass


How To ... Use ActiveX Controls

How To > Use ActiveX Controls

The following tutorials provide practical examples of using ActiveX Controls in MAXScript.

How To ... Develop a Selected Objects Inspector using ListView ActiveX Control - Part One

How To ... Develop a Selected Objects Inspector using ListView ActiveX Control - Part Two

How To ... Develop a Scene Browser using TreeView ActiveX Control - Part One

How To ... Develop a Scene Browser using TreeView ActiveX Control - Part Two

Related topics:

ActiveX Controls in MAXScript Rollouts

ListView ActiveX Control

Listview ActiveX functions

ListView ActiveX Control Example


Interface: NullInterface

Note: Intentionally blank.


Lighting and Rendering - Quick Navigation

Lighting and Rendering

Controlling The Renderer
Controlling the Renderer |  | renderSceneDialog
Render Scene Dialog
TimeOutput | OutputSize | Options
AdvancedLighting | BitmapProxies | RenderOutput
Pre- and Post-Render Scripts |  |
ScanlineRender Struct
Options | Antialiasing | GlobalSupersampling
ObjectMotionBlur | ImageMotionBlur |
ColorRangeLimiting | MemoryManagement |
Renderer Classes
Renderer | Renderers | Default_Scanline_Renderer
Anti-Aliasing Filters | Mental_Ray_Renderer | VUE_File_Renderer
Radiosity and Global Illumination
Interface: RadiosityPreferences |  | Interface: SceneRadiosity
Light_Tracer : RadiosityEffect |  | Radiosity : RadiosityEffect
Interface: SceneExposureControl |  | Interface: INodeGIProperties
Network and Command Line Rendering
Interface: NetRender | Working with the Manager | Working with Jobs
Job Properties that Require SendUpdate | Accessing Render Element Information | Accessing Frame Information
Working with Servers | Working with Groups | Netstatus
NetRender Examples |  |
Command Line Rendering |  |
Misc. Render-related Topics
envEffectsDialog | TabbedDialogs | Last Rendered Image
RTT_Methods : Render To Texture Methods


Lights and Cameras - Quick Navigation

Lights and Cameras

Cameras
Camera Common Properties, Operators, and Methods
FreeCamera | TargetCamera | OmniLight
Depth_of_FieldMPassCamEffect : MPassCamEffect
Motion_BlurMPassCamEffect : MPassCamEffect
Lights
Light Common Properties, Operators, and Methods
DirectionalLight | FreeSpot | OmniLight
TargetSpot | TargetDirectionalLight |
Photometric Lights
Photmetric Lights Common Properties, Operators, and Methods
Free_Point | Target_Point | Free_Area
Target_Area | Free_Linear | Target_Linear
IES_Sky | IES_Sun | Skylight
Shadow Generators
shadowMap | raytraceShadow | Adv__Ray_traced
Area_Shadows |  |
mental ray Lights
mr_Sky : light | mr_Sun : Light |


Materials and Maps - Quick Navigation

Materials and Maps

Material Classes:
Advanced_Lighting_ Override | Architectural | Blend | CompositeMaterial
DirectX_9_Shader | DoubleSided | InkNPaint | Lightscape_Mtl
MatteShadow | MorpherMaterial | MultiMaterial | NoMaterial
RaytraceMaterial | Shell_Material | Shellac | Standard
TopBottom |  |  |
TextureMap Classes:
Adobe_Photoshop_ Plug_In_Filter | BitmapTexture | Bricks | Camera_Map_ Per_Pixel
Adobe_Premiere_ Video_Filter | Cellular | Checker | Combustion
Color_Correction | Composite |  |
Dent | Emulator | Falloff |
FalloffTextureMap | FlatMirror | FoliagetextureMap | Gradient
Gradient_Ramp | Marble | Mask | Mix
Noise | Normal_Bump | NoTexture | Output
Particle_Age | Particle_Mblur | Perlin_Marble | Planet
Raytrace | Reflect_Refract | RGB_Multiply | RGB_Tint
Smoke | Speckle | Splat | Stucco
Swirl | Thin_Wall_Refraction | Vertex_Color | Water
Wood |  |  |
DirectX Shaders:
CubeMap | LightMap | Metal_Bump |
mental ray Shaders Index:
mr MAXScript Extensions | mr Shaders Index | 3dsmax mr Shaders Index |
Arch___Design__mi | mr_Physical_Sky |  |


maxOps Interface - Quick Navigation

maxOps Interface

maxOps Interface
Version and License Info | Trackbar, Controllers
Progressive Mode | Delete Animation
Create Tab | Hierarchy Tab
Motion Tab > Trajectory | Display Tab
Set Key Mode | AutoKey Default Key
Paint Selection Brush | Bitmap Importer
Viewport Display | Custom User Interface
Iterative Rendering | Render Element Manager
Collapse and Clone Nodes |
Window/Crossing Selection Type | Node Handle
Color By ID | Find Nodes


MAXScript Editor Lexer

A Lexer is a Scintilla module which performs language-specific operations on the edited text like for example syntax coloring.

The Lexer is set automatically based on the edited file's extension and can be manually overridden using the Language menu.


MAXScript Editor - Properties File

MAXScript Editor - Properties Files

MAXScript Editor - Properties File Settings
Directory Property Files | Editor Position | Windows (Buffers) Properties
File Loading Properties | File Saving Properties | Reload Properties
Prompts | View Properties | Code Page Properties
Font Properties | Margin Properties | Selection Properties
Caret (Cursor) Properties | Visible Policy Properties | Edge Mode Properties
Control Character Symbol Properties | Error Marker Properties | Bookmark Properties
Fold Properties | Title Properties | Indentation and Tabs Properties
Find / Replace Properties | Comment Properties | Scrollbars Properties
Output Pane | Status Bar Properties | Auto-Complete and Abbreviations Properties
User Shortcuts Properties | User Context Menu Properties | Wrap Properties
Editor Performance-Related Properties | Brace / Bracket Properties | Print Properties
Export Properties | Language Properties | Warning Sounds Properties
Source Control Properties |  |
MAXScript Editor - MAXScript-Specific Language Settings
Lexer Settings | Keyword Settings | File Extension Settings
Characters Settings | Style Settings |


MAXScript Editor Quick Navigation

MAXScript Editor

MAXScript Tabbed Editor Features:
MAXScript Tabbed Editor Window
MAXScript Tabbed Editor Overview
MAXScript Editor Commands
File | Edit | Search | View | Tools
Options | Language | Windows | Help |
Keyboard Shortcuts
Regular Expressions in Find and Replace Dialogs
Customizing the Editor:
Properties File Settings
MAXScript-Specific Language Settings
Customizing Syntax Color Schemes
Defining Custom Keyboard Shortcuts
Defining Custom Context Menu Items
List of Editor Menu Commands
List of Editor Key Commands
Defining And Using Abbreviations
Defining Custom Status Bars
The Legacy Editor:
The MAXScript Legacy Editor Windows
MAXScript Legacy Editor Commands


mental_ray__material_custom_attributes_manager: GlobalUtilityPlugin

Class instances not creatable by MAXScript

Alias:

mrMaterialCustAttrib_Manager


mental_ray__object_custom_attributes_manager: GlobalUtilityPlugin

Class instances not creatable by MAXScript

Alias:

mrObjectCustAttrib_Manager


mental ray Renderer - Quick Navigation

mental ray Renderer

Renderer Tab
Sampling Quality Rollout
Samples per Pixel | Filter | Spatial Contrast | Options
Algorithms Rollout
Scanline | Ray Tracing | Raytrace Acceleration | Trace Depth
 |  | Subset Pixel Rendering |
Camera Effects Rollout
Motion Blur | Contours | Camera Shaders | Depth Of Field
Shadows & Displacement Rollout
Shadows | Shadow Maps | Displacement (Global Settings) |
Indirect Illumination Tab
Final Gather Rollout
Basic | Final Gather Map | Advanced |
Trace Depth | FG Point Interpolation |  |
Caustics and GI Rollout
Caustics | Global Illumination | Volumes | Photon Map
Trace Depth | Light Properties | Geometry Properties |
Processing Tab
Translator Options Rollout
Memory Options | Geometry Caching | Material Override |
Export to .mi File | Render Passes | Mapping |
Diagnostics Rollout
Distributed Bucket Rendering Rollout
Not in the UI
Last Time Statistics | Other Properties | mental_ray_renderer interfaces |


Modifier Classes Quick Navigation

Modifier Classes

Modifier Classes :
Selection Modifiers
FFD_Select | Mesh_Select | NSurf_Sel | Patch_Select | Poly_Select
SplineSelect | VolumeSelect |  |  |
Animation Modifiers
Flex | Melt | Morpher | Linked_XForm | PatchDeform
PathDeform | Skin | Skin_Morph | Skin_Wrap | Skin_Wrap_Patch
SpacePatchDeform | SpacePathDeform | SpaceSurfDeform | Spline_IK_Control | SurfDeform
Cache Modifiers
Point_Cache | Point_CacheWSM |  |  |
Conversion Modifiers
Turn_to_Mesh | Turn_to_Patch | Turn_to_Poly |  |
Free Form Deformation Modifiers
FFDBox | FFDCyl | FFD_2x2x2 | FFD_3x3x3 | FFD_4x4x4
UV Mapping Modifiers
CameraMap | MapScaler | MapScalerWSM | Projection | Select_By_Channel
SpaceCameraMap | Surface_Mapper | Unwrap_UVW | UVW_Mapping_Add | UVW_Mapping_Clear
UVW_Mapping_Paste | UVWMap | UVW_XForm |  |
Mesh Editing Modifiers
Bevel | Bevel_Profile | Cap_Holes | DeleteMesh | Edit_Mesh
Edit_Normals | Edit_Poly | Extrude | Face_Extrude | MultiRes
NormalModifier | Optimize | Smooth | STL_Check | Symmetry
Tesselate | Vertex_Colors | Vertex_Weld | VertexPaint |
Procedural Modifiers
Affect_Region | Bend | Displace | Lattice | Mirror
Noise | Preserve | Push | Relax | Ripple
Shell | Skew | SliceModifier | Spherify | Squeeze
Stretch | Substitute | Taper | Twist | Wave
XForm |  |  |  |
Patch and Spline Editing Modifiers
CrossSection | DeletePatch | DeleteSpline | Edit_Patch | Edit_Spline
Fillet_Chamfer | Lathe | NCurve_Sel | Normalize_Spl | Renderable_Spline
Surface | Sweep | Trim_Extend |  |
Radiosity Modifiers
Subdivide | SubdivideWSM | LS_Mesh | LS_Colors |
Subdivision Modifiers
HSDS_Modifier | MeshSmooth | TurboSmooth |  |
Surface Modifiers
Disp_Approx | Displace_Mesh | Displace_NURBS | Material | MaterialByElement


mrOptions: ReferenceTarget

Class instances not creatable by MAXScript


mrPBParameter: ReferenceTarget

Class instances not creatable by MAXScript


Multi-line editText UI items in Scripted Rollouts

Multi-line editText UI items can now be created in scripted rollouts.

If an explicit height: parameter is supplied on an editText item definition that specifies a pixel height greater than one line of text, that editText item becomes a multi-line edit box, allowing multiple lines of text to be entered.

When in multi-line mode, <enter> keystrokes no longer cause the 'on entered' handler to be called, but are inserted into the edit box as new lines.

They do, of course, cause 'on changed' handlers to be called. These are called on every keystroke.

For multi-line editText items, 'on entered' handlers are called when the edit box loses keyboard focus, such as if you tab or click out of the edit box.

See also

Edittext

Rollout Floater Windows


Node Common Properties, Operators and Methods - Quick Navigation

Node Common Properties, Operators and Methods

Constructors and Transforms:
Constructors | Node Transform Properties | Using Node Transform Properties
Properties:
General Node Properties | Viewport Node Properties | Layer Node Properties
Rendering Node Properties | mental ray Node Properties |
Methods
Render-Related Methods | Group-Related Methods | Node Viewport State Methods
Node Selection Methods | Modifier Stack Related Methods | Node Modifier Transform Methods
Node Deformable Methods | Node Bounding Box Methods | Node Conversion Methods
Node Utility Methods | Node User Properties Methods | Inverse Kinematics Methods
Miscellaneous Methods |  |


Particle Flow Quick Navigation

Particle Flow

Particle Flow Interfaces and Sources
PFlow Interfaces | particleFlow Global Interface | PF_Source |  |
Operators
Birth | Birth_Script | DeleteParticles |  |
Position_Icon | Position_Object | rotation | scaleParticles | Spin
Keep_Apart | speed | Speed_By_Surface | SpeedByIcon |
shapeStandard | Shape_Facing | Shape_Instance | Shape_Mark |
mapping | Material_Dynamic | Material_Frequency | Material_Static |
Force | Script_Operator |  |  |
Meta-Operators:
Cache | Notes | Event | renderParticles | displayParticles
Tests:
Age_Test | Collision | Collision_Spawn | Find_Target | Go_To_Rotation
Scale_Test | Script_Test | Send_Out | Spawn | Speed_Test
Split_Amount | Split_Selected | Split_Source |  |


PF_NotifyDep_Catcher: ReferenceTarget

PF_NotifyDep_Catcher: ReferenceTarget #(1962490636, 515064576)

Class instances not creatable by MAXScript

Alias:

PFNotifyDepCatcher

Properties:

No Properties or Methods Exposed.


RaytraceGlobalSettings : ReferenceTarget

RaytraceGlobalSettings - superclass: ReferenceTarget; super-superclass:MAXWrapper - classID: #(1336499867, 161640038)

The RaytraceGlobalSettings provide access to the settings of the raytrace engine.

Constructor

RaytraceGlobalSettings ...

Properties

<RaytraceGlobalSettings>.adaptive_antialiasing_enable_flag Boolean default: false -- boolean

<RaytraceGlobalSettings>.adaptive_antialiasing_threshold Float default: 0.1 -- animatable; float

<RaytraceGlobalSettings>.adaptive_ray_depth_threshold Float default: 0.05 -- animatable; float

<RaytraceGlobalSettings>.antialiasing_maximum_rays_to_fire Integer default: 32 -- animatable; integer

<RaytraceGlobalSettings>.antialiasing_minimum_rays_to_fire Integer default: 4 -- animatable; integer

<RaytraceGlobalSettings>.blurring_amount Float default: 0.0 -- animatable; float

<RaytraceGlobalSettings>.blurring_aspect_ratio Float default: 1.0 -- animatable; float

<RaytraceGlobalSettings>.defocusing_amount Float default: 0.0 -- animatable; float

<RaytraceGlobalSettings>.defocusing_aspect_ratio Float default: 1.0 -- animatable; float

<RaytraceGlobalSettings>.enable_antialiasing Boolean default: false -- animatable; boolean

<RaytraceGlobalSettings>.enable_atmosphere Boolean default: true -- animatable; boolean

<RaytraceGlobalSettings>.enable_atmosphere_in_raytrace_objects Boolean default: true -- animatable; boolean

<RaytraceGlobalSettings>.enable_material_id_rendering_support Boolean default: true -- animatable; boolean

<RaytraceGlobalSettings>.enable_objects_in_raytrace_objects Boolean default: true -- animatable; boolean

<RaytraceGlobalSettings>.enable_raytracing Boolean default: true -- animatable; boolean

<RaytraceGlobalSettings>.enable_refract_special_effects Boolean default: true -- animatable; boolean

<RaytraceGlobalSettings>.enable_self_reflect_refract Boolean default: true -- animatable; boolean

<RaytraceGlobalSettings>.excludeList Array default: #()

<RaytraceGlobalSettings>.includeList UndefinedClass default: undefined

<RaytraceGlobalSettings>.max_levels_color_mode Integer default: 1 -- integer

<RaytraceGlobalSettings>.max_levels_specify_color Color default: (color 0 0 0) -- animatable; RGB color

<RaytraceGlobalSettings>.max_ray_depth Integer default: 9 -- animatable; integer

<RaytraceGlobalSettings>.showMessages Boolean default: true -- boolean

<RaytraceGlobalSettings>.showProgressDlg Boolean default: true -- boolean

<RaytraceGlobalSettings>.vox_dim Integer default: 30 -- animatable; integer

<RaytraceGlobalSettings>.vox_face_limit Integer default: 10 -- animatable; integer

<RaytraceGlobalSettings>.vox_maxdepth Integer default: 8 -- animatable; integer

<RaytraceGlobalSettings>.vox_previs Float default: 4.0 -- animatable; float

See also

RayTraceMaterial : Material

Raytrace : TextureMap


Reactor - Quick Navigation

Reactor

Reactor Interfaces
reactorInterface | rigidBodyInterface | primitiveInterface | Collision_Info
Reactor Helpers
RBCollection | CSolver | Point_Point | Point_Path
Hinge | Ragdoll | Carwheel | Prismatic
L_Dashpot | A_Dashpot | CLCollection | DMCollection
RPCollection | SBCollection | Fracture | Motorhelper
Planehelper | Springhelper | Toy_Car | Windhelper
Reactor Space Warps and Object Space Modifiers
WaterSpaceWarp | reactor_Cloth | reactor_Rope | reactor_SoftBod


Render and Bake Elements - Quick Navigation

Render Elements and Bake Elements

RenderElements
alphaRenderElement | atmosphereRenderElement | BackgroundRenderElement
Beauty | BlendRenderElement | diffuseRenderElement
emissionRenderElement | Illuminance_Render_Element | Ink
Lighting | Lighting_Analysis_Data |
Lumination_Render_Element | Luminance_Render_Element |
Material_ID | MatteRenderElement | Object_ID
PaintRenderElement | reflectionRenderElement | refractionRenderElement
Self_Illumination | ShadowRenderElement | specularRenderElement
velocity : RenderElement | ZRenderElement |
Bake Elements
AlphaMap | Ambient_Occlusion | BlendMap
CompleteMap | diffuseMap | HeightMap
LightingMap | Missing_Texture_Bake_Element | NormalsMap
ShadowsMap | specularMap |
Exposure Controls (ToneOperators)
Automatic_Exposure_Control | Linear_Exposure_Control | Logarithmic_Exposure_Control
Pseudo_Color_Exposure_Control | mr_Photographic_Exposure_Control | Interface: SceneExposureControl


Shapes and Splines - Quick Navigation

Shape and Splines

Shape : Node
Shape Common Properties, Operators, and Methods Spline Shape Common Properties, Operators, and Methods
Shapes - Splines
Arc | Circle | Donut | Ellipse | Helix
Line | NGon | Rectangle | Section | Star
Text |  |  |  |
Shapes - Extended
Angle | Channel | Tee | WalledRectangle | WideFlange
SplineShape
Rendering Rollout | Interpolation Rollout | Selection Rollout | SoftSelection Rollout | SurfaceProperties Rollout
Geometry Rollout |  |  |  |
Shape Methods | Spline Methods | Segment Methods | Knot Methods |
Editable Spline Modify Panel Command Modes and Operations
Shapes - NURBS Curves
CV_Curve | Point_Curve |  |  |


Skyscraper-like structure

Executing the code multiple times will generate a different structures by extruding the original 16 faces randomly 50 times. Changing the extrusion value to (random 1.0 10.0) will give you an even more random look...


Spacewarp - Dynamics Interface

Value > MAXWrapper > Node > SpacewarpObject > Dynamics Interface

The following list shows the Modifier-Based space warp objects:

PDynaFlect

SDynaFlect

UDynaFlect


Ticks

3ds Max stores time internally in integer units called Ticks.

One second always contains 4800 ticks, thus one Tick is defined as a 1/4800th of a second.

The importance of the number 4800 comes from the fact that it is divisible by all typical frame rates without a floating point part:

4800 ticks per second / 24 frames per second (Movies) = 200 ticks per frame

4800 ticks per second / 25 frames per second (PAL TV) = 192 ticks per frame

4800 ticks per second / 30 frames per second (NTSC TV) = 160 ticks per frame

The current number of Ticks per Frame can be acquired using the TicksPerFrame system global variable.


Unwrap_UVW Modifier_Quick_Navigation

Unwrap_UVW Modifier

Unwrap_UVW : Modifier | Properties | Apply To Whole Object | Hide Polygons in Viewports |
Selection Parameters Rollout | SubObject Mode | Expand Contract Selection | Edge Ring And Loop Selection | Get Vert And Edge Selection
Ignore Backface Culling | Select By Element | Planar Threshold | Select By Material ID | Select By Smoothing Group
Parameters Rollout | Parameters Rollout Buttons | Map Channel Settings | Display Settings | Prevent Reflattening
Map Parameters Rollout | Projection Type and Quick Planar Map | Mapping Mode | Mapping Align Mode | Edit Convert Pelt Seams Buttons
Pelt Map Dialog | Pelt Stretcher Controls | Pelt Spring Controls | Pelt Select Controls | Pelt Simulation Controls
Editor Floater | Editor Update Methods | Lock Aspect | Editor Window Size | Other Window Methods
File Menu |  |  |  |
Edit Menu | Copy And Paste Selection |  |  |
Select Menu | Convert Selection |  |  |
Tools Menu | Break And Weld | Stitch | Pack | Sketch
 | Relax | Relax By Spring | Relax By Angle | Render UV Template Dialog
Mapping Menu | Flatten Map | Normal Map | Unfold Map |
Options Menu | Load Save Default Settings |  |  |
Display Menu | Lock Hide Freeze | Filter Selected | Hidden Edge Display |
 | Show Edge Distortion | Show Vertex Connections |  |
Editor Main Toolbar | Move Rotate Scale | UV Space Flyout | Texture Map Display | Auto Background
Bottom Toolbar | Lock_State | Material ID | Pan Zoom | Snap
Bottom Tools Panel | Soft Selection | Selection Modes | Paint Selection |
 | Bitmap Options | Viewport Options |  |
Options Dialog | Colors | Fill_Mode | Open Edges Display | Display Preferences
 | Map_Tiling | Grid | Hit Size | Tick Size
Transforming and Selecting | Map Scale | Number Of | Vertex Selection | Vertex Weight
Synchronize Selection | Selected Edges | Selected Faces | Old Selection Method | Always Edit Mode
Transform Selected | UV Edge Mode | Scale Selected XY | Pivot | Polygon Mode
Selection Inside Gizmo | Transform Selected Vertices | Selected Polygons |  |
Topology_Editing |  |  |  |
Multi-Editing |  |  |  |


Values - Quick Navigation

Values and Collections

Values
Value Common Properties, Operators, and Methods
Working with Values
Basic Data Values
Number Values | String Values | Name Values | BooleanClass Values
Color Values | Point3 Values | Point2 Values | Point4 Values
Quat Values | AngleAxis Values | Ray Values |
EulerAngles Values | Matrix3 Values | BigMatrix Values | Box2 Values
BitArray Values | ArrayParameter Values |  |
Time Data Values
Time Values | Interval Values |  |
Special Data Values
Undefined Value | Ok Value | Unsupplied Value | DontCollect Value
Bitmap Values
Stream Values
FileStream Values | StringStream Values | WindowStream Values | MemStream Values
MAXKey Values |  |  |
DataPair Values |  |  |
Collections
Array Values | PathName Values | ObjectSet Values | SelectionSet Values
SelectionSetArray Values | NodeChildrenArray Values | VertexSelection Values | FaceSelection Values
EdgeSelection Values | KeyArray Values | MAXNoteKeyArray Values | ModifierArray Values
MaterialLibrary Values | NURBSSet Values |  |


Vector Arithmetic

This topic is a quick review for readers who need a reminder about vector arithmetic. If you’re familiar with vectors and vector calculations, you can skip this topic. If this topic is difficult to follow, you might consult a more basic reference on mathematics.

A vector expresses a length and a direction in a particular space. The vector is expressed as a point; for example, [5, 5, 7]. The length is the distance from the origin to that point, and the direction is similarly from the origin to (and through) the point.

In 3ds Max, vectors have three values and describe positions in three-dimensional space. They can also represent percent scaling in X, Y, and Z; and—more abstractly—describe locations in RGB color space.

Unit Vectors and Basic Vectors

A unit vector has a length of one. Unit vectors are often used to express direction only. The three basic vectors are unit vectors that describe the three axes (X, Y, and Z) of 3D space.

Basic vectors and the XYZ axes

Adding and Subtracting Vectors

Adding two vectors creates a new vector that combines the length and direction of the original two. Vector addition is commutative: V+W = W+V.

Adding two vectors

Subtracting two vectors gives the vector between the two points.

Subtracting two vectors

Scalar Multiplication and Division

Multiplying a vector by a scalar changes the vector’s length, as does dividing the vector by a scalar.

Vector Length and Direction

The length of a vector is obtained from the Pythagorean theorem.

In MAXScript, the length() function returns this value.

The direction of the vector is the vector divided by its length; this gives you a unit vector with the same direction.

The distance between two points is the length of the vector between them.

Subtracting vectors to obtain a distance

See also

Point3 Values

How do I make a vector from a vertex position?

How do I find the angle between two vectors?

How do I align the UVW_Modifier's Gizmo to a selected face?


Viewport Lighting and Shadows Dialog

This is the 3ds Max Viewport Configuration Dialog.

The Red Area corresponds to the IViewportShadingMgr.ShadingLimits property.

The Blue Area corresponds to the IViewportShadingMgr.AutoDisplaySelLights property.

The Green Area corresponds to the IViewportShadingMgr.DefaultLightCastShadows and IViewportShadingMgr.GlobalShadowIntensity properties.


What is a Mixin Interface?

A Mixin Interface provides a way for a plug-in to expose some of its functionality for use by other plug-ins or MAXScript.

The notion of "Mixin" refers to the idea that the interface is a sub-class of the plug-in class and thus "mixed in" with it.

There are two ways to access methods of a Mixin Interface:

  • As a stand-alone interface. This method is usually much faster to execute. In this case, the object to operate on MUST be provided as the first argument, like in
    someInterface.someMethod $MyObject01 1 2

  • As an interface of a particular object, like in
    $MyObject01.someInterface.someMethod 1 2

When using the second approach, properties and methods exposed by a Mixin Interface can be accessed directly as properties and methods of the object exposing the Interface without explicitly providing the name of the Interface, like in
$MyObject01.someMethod 1 2

MAXScript will search for the property or name in the object itself and in all its interfaces. If multiple interfaces of an object expose properties or methods with identical names, specifying the Interface explicitly will resolve such naming collisions.